From 7752c72f2666d364579d05894cce3bc7fc6e1585 Mon Sep 17 00:00:00 2001 From: Buqete Mucolli Date: Tue, 20 Aug 2024 08:47:34 +0200 Subject: [PATCH 1/3] TA-3239: Update diff transports --- src/interfaces/diff-package.transport.ts | 24 ++++++++++++++++++++++++ tests/config/config-diff.spec.ts | 8 ++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/interfaces/diff-package.transport.ts b/src/interfaces/diff-package.transport.ts index be6f119..1238d74 100644 --- a/src/interfaces/diff-package.transport.ts +++ b/src/interfaces/diff-package.transport.ts @@ -8,14 +8,38 @@ export interface ConfigurationChangeTransport { export interface NodeDiffTransport { nodeKey: string; changes: ConfigurationChangeTransport[]; + baseConfiguration: NodeConfiguration +} + +export interface NodeConfiguration { + [key: string]: any; } export interface PackageDiffTransport { packageKey: string; + basePackageConfiguration: PackageConfiguration, packageChanges: ConfigurationChangeTransport[]; nodesWithChanges: NodeDiffTransport[]; } +export interface PackageConfiguration { + variables?: VariableDefinition[], + dependencies?: PackageDependency[], + [key: string]: any; +} + +export interface PackageDependency { + key: string, + version: string, + [key: string]: any; +} + +export interface VariableDefinition { + key: string, + type: string, + [key: string]: any; +} + export interface PackageDiffMetadata { packageKey: string; hasChanges: boolean; diff --git a/tests/config/config-diff.spec.ts b/tests/config/config-diff.spec.ts index 8504fe1..1d7e3d2 100644 --- a/tests/config/config-diff.spec.ts +++ b/tests/config/config-diff.spec.ts @@ -58,6 +58,7 @@ describe("Config diff", () => { const diffResponse: PackageDiffTransport[] = [{ packageKey: "package-key", + basePackageConfiguration: {metadata: {description: "test"}}, packageChanges: [ { op: "add", @@ -72,7 +73,8 @@ describe("Config diff", () => { path: "/test", from: "bbb", value: JSON.parse("234") - }] + }], + baseConfiguration: {} }] }]; @@ -100,6 +102,7 @@ describe("Config diff", () => { const diffResponse: PackageDiffTransport[] = [{ packageKey: "package-key", + basePackageConfiguration: {metadata: {description: "test"}}, packageChanges: [ { op: "add", @@ -114,7 +117,8 @@ describe("Config diff", () => { path: "/test", from: "bbb", value: JSON.parse("234") - }] + }], + baseConfiguration: {} }] }]; From c3ec2518edc6154e15e2e58d96f97d82afb507de Mon Sep 17 00:00:00 2001 From: Buqete Mucolli Date: Tue, 20 Aug 2024 08:48:08 +0200 Subject: [PATCH 2/3] TA-3239: Upgrade version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 607d138..a3a5976 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@celonis/content-cli", - "version": "0.10.0", + "version": "0.11.0", "description": "CLI Tool to help manage content in Celonis EMS", "main": "content-cli.js", "bin": { From 7ab2d7015ee7831f6563e372852778267701f271 Mon Sep 17 00:00:00 2001 From: Buqete Mucolli Date: Tue, 20 Aug 2024 10:31:02 +0200 Subject: [PATCH 3/3] TA-3239: Use semicolons on diff interface properties --- src/interfaces/diff-package.transport.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/interfaces/diff-package.transport.ts b/src/interfaces/diff-package.transport.ts index 1238d74..8fd4e05 100644 --- a/src/interfaces/diff-package.transport.ts +++ b/src/interfaces/diff-package.transport.ts @@ -8,7 +8,7 @@ export interface ConfigurationChangeTransport { export interface NodeDiffTransport { nodeKey: string; changes: ConfigurationChangeTransport[]; - baseConfiguration: NodeConfiguration + baseConfiguration: NodeConfiguration; } export interface NodeConfiguration { @@ -17,26 +17,26 @@ export interface NodeConfiguration { export interface PackageDiffTransport { packageKey: string; - basePackageConfiguration: PackageConfiguration, + basePackageConfiguration: PackageConfiguration; packageChanges: ConfigurationChangeTransport[]; nodesWithChanges: NodeDiffTransport[]; } export interface PackageConfiguration { - variables?: VariableDefinition[], - dependencies?: PackageDependency[], + variables?: VariableDefinition[]; + dependencies?: PackageDependency[]; [key: string]: any; } export interface PackageDependency { - key: string, - version: string, + key: string; + version: string; [key: string]: any; } export interface VariableDefinition { - key: string, - type: string, + key: string; + type: string; [key: string]: any; }