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

TA-3254: Update diff transports #189

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
24 changes: 24 additions & 0 deletions src/interfaces/diff-package.transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,38 @@ export interface ConfigurationChangeTransport {
export interface NodeDiffTransport {
nodeKey: string;
changes: ConfigurationChangeTransport[];
baseConfiguration: NodeConfiguration
promeris marked this conversation as resolved.
Show resolved Hide resolved
}

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;
Expand Down
8 changes: 6 additions & 2 deletions tests/config/config-diff.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe("Config diff", () => {

const diffResponse: PackageDiffTransport[] = [{
packageKey: "package-key",
basePackageConfiguration: {metadata: {description: "test"}},
packageChanges: [
{
op: "add",
Expand All @@ -72,7 +73,8 @@ describe("Config diff", () => {
path: "/test",
from: "bbb",
value: JSON.parse("234")
}]
}],
baseConfiguration: {}
}]
}];

Expand Down Expand Up @@ -100,6 +102,7 @@ describe("Config diff", () => {

const diffResponse: PackageDiffTransport[] = [{
packageKey: "package-key",
basePackageConfiguration: {metadata: {description: "test"}},
packageChanges: [
{
op: "add",
Expand All @@ -114,7 +117,8 @@ describe("Config diff", () => {
path: "/test",
from: "bbb",
value: JSON.parse("234")
}]
}],
baseConfiguration: {}
}]
}];

Expand Down
Loading