Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Address issues with packages #47

Merged
merged 3 commits into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const nameWithSpaces = (name) => {
return regexWithRemoval(name.charAt(0)) + name.slice(1, name.length).replace(/[^a-zA-Z0-9]/g,' ');
}

const defaultProductOrdId = (name) => `customer:product:${nameWithDot(name)}:`

/**
* Module containing default configuration for ORD Document.
* @module defaults
Expand All @@ -24,7 +26,7 @@ module.exports = {
description: "this is an application description",
products: (name) => [
{
ordId: `customer:product:${nameWithDot(name)}:`,
ordId: defaultProductOrdId(name),
title: nameWithSpaces(name),
shortDescription: "Description for " + nameWithSpaces(name),
vendor: "customer:vendor:customer:",
Expand All @@ -35,12 +37,12 @@ module.exports = {
function createPackage(name, tag) {
return {
ordId: `${regexWithRemoval(name)}:package:${capNamespace}${tag}`,
title: `sample title for ${regexWithRemoval(name)}`,
shortDescription: "Here is the shortDescription for packages",
description: "Here is the description for packages",
title: nameWithSpaces(name),
shortDescription: "Short description for " + nameWithSpaces(name),
description: "Description for " + nameWithSpaces(name),
version: "1.0.0",
partOfProducts: [`customer:product:${nameWithDot(name)}:`],
vendor: "customer:vendor:SAP:"
partOfProducts: [defaultProductOrdId(name)],
vendor: "customer:vendor:Customer:"
};
}

Expand Down