From 278bb51a94e8b95f76640beca014e44e734cdce1 Mon Sep 17 00:00:00 2001 From: Duc Tai Ly Date: Wed, 28 Aug 2024 09:36:18 +0200 Subject: [PATCH 1/3] Adress packages issues --- lib/defaults.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/defaults.js b/lib/defaults.js index 9353385..d499794 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -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 @@ -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:", @@ -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: "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:" }; } From 6115f19736ddb9a6dd729b78ae71ba8429ae85b3 Mon Sep 17 00:00:00 2001 From: Duc Tai Ly <124802873+ductaily@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:57:49 +0200 Subject: [PATCH 2/3] Update lib/defaults.js Co-authored-by: Simon Heimler --- lib/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/defaults.js b/lib/defaults.js index d499794..7b01abd 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -38,7 +38,7 @@ module.exports = { return { ordId: `${regexWithRemoval(name)}:package:${capNamespace}${tag}`, title: nameWithSpaces(name), - shortDescription: "Description for " + nameWithSpaces(name), + shortDescription: "Short description for " + nameWithSpaces(name), description: "Description for " + nameWithSpaces(name), version: "1.0.0", partOfProducts: [defaultProductOrdId(name)], From 00c2cdd4f97ff025351f836a7d4abca1a27eed37 Mon Sep 17 00:00:00 2001 From: Simon Heimler Date: Wed, 28 Aug 2024 10:00:04 +0200 Subject: [PATCH 3/3] Update lib/defaults.js --- lib/defaults.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/defaults.js b/lib/defaults.js index 7b01abd..99c410d 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -42,7 +42,7 @@ module.exports = { description: "Description for " + nameWithSpaces(name), version: "1.0.0", partOfProducts: [defaultProductOrdId(name)], - vendor: "customer:vendor:customer:" + vendor: "customer:vendor:Customer:" }; }