@celonis/content-cli 1.13.1 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +17 -5
  2. package/commands/action-flows/action-flow/action-flow.service.js +9 -9
  3. package/commands/action-flows/module.js +2 -1
  4. package/commands/asset-registry/asset-registry-api.js +1 -30
  5. package/commands/asset-registry/asset-registry.service.js +20 -67
  6. package/commands/asset-registry/module.js +0 -26
  7. package/commands/bookmarks/bookmarks-api.js +49 -0
  8. package/commands/bookmarks/bookmarks-command.service.js +48 -0
  9. package/{core/utils/path.js → commands/bookmarks/bookmarks.interfaces.js} +0 -5
  10. package/commands/bookmarks/module.js +49 -0
  11. package/commands/configuration-management/api/node-api.js +17 -0
  12. package/commands/configuration-management/branch/api/branch.api.js +88 -0
  13. package/commands/configuration-management/branch/branch-export-import.command.service.js +283 -0
  14. package/commands/configuration-management/branch/branch.command.service.js +182 -0
  15. package/commands/configuration-management/branch/interfaces/branch.interfaces.js +41 -0
  16. package/commands/configuration-management/metadata.service.js +9 -5
  17. package/commands/configuration-management/module.js +170 -6
  18. package/commands/configuration-management/node-dependency.service.js +5 -3
  19. package/commands/configuration-management/node-diff.service.js +10 -6
  20. package/commands/configuration-management/node.service.js +14 -10
  21. package/commands/configuration-management/package-validation.service.js +11 -5
  22. package/commands/configuration-management/package-version.service.js +7 -5
  23. package/commands/configuration-management/single-package-export.service.js +6 -6
  24. package/commands/configuration-management/single-package-import.service.js +28 -24
  25. package/commands/configuration-management/staging-package.service.js +9 -5
  26. package/commands/configuration-management/variable.service.js +11 -7
  27. package/commands/data-pipeline/connection/connection.commands.js +4 -2
  28. package/commands/data-pipeline/data-pool/data-pool-service.js +13 -9
  29. package/commands/data-pipeline/data-pool/data-pool.commands.js +2 -1
  30. package/commands/deployment/deployment.service.js +15 -13
  31. package/commands/deployment/module.js +4 -7
  32. package/commands/studio/manager/space.manager.js +21 -10
  33. package/commands/studio/service/asset-service.js +5 -4
  34. package/commands/studio/service/package.service.js +9 -5
  35. package/commands/t2tc/diff.service.js +15 -9
  36. package/commands/t2tc/t2tc-package.service.js +25 -23
  37. package/content-cli.js +4 -0
  38. package/core/command/module-handler.js +8 -1
  39. package/core/feature-flag/feature-disabled-error.js +52 -0
  40. package/core/http/http-client.js +18 -0
  41. package/core/http/http-shared/base.manager.js +35 -59
  42. package/core/utils/branches.js +10 -0
  43. package/core/utils/cui-api.js +52 -0
  44. package/core/utils/cui-file-service.js +106 -0
  45. package/core/utils/file-service.js +7 -13
  46. package/lib/commands/action-flows/action-flow/action-flow.service.d.ts +1 -0
  47. package/lib/commands/asset-registry/asset-registry-api.d.ts +2 -6
  48. package/lib/commands/asset-registry/asset-registry.interfaces.d.ts +0 -17
  49. package/lib/commands/asset-registry/asset-registry.service.d.ts +3 -6
  50. package/lib/commands/asset-registry/module.d.ts +0 -2
  51. package/lib/commands/bookmarks/bookmarks-api.d.ts +8 -0
  52. package/lib/commands/bookmarks/bookmarks-command.service.d.ts +8 -0
  53. package/lib/commands/bookmarks/bookmarks.interfaces.d.ts +34 -0
  54. package/lib/commands/bookmarks/module.d.ts +8 -0
  55. package/lib/commands/configuration-management/api/node-api.d.ts +1 -0
  56. package/lib/commands/configuration-management/branch/api/branch.api.d.ts +12 -0
  57. package/lib/commands/configuration-management/branch/branch-export-import.command.service.d.ts +37 -0
  58. package/lib/commands/configuration-management/branch/branch.command.service.d.ts +19 -0
  59. package/lib/commands/configuration-management/branch/interfaces/branch.interfaces.d.ts +139 -0
  60. package/lib/commands/configuration-management/interfaces/package-validation.interfaces.d.ts +1 -1
  61. package/lib/commands/configuration-management/metadata.service.d.ts +1 -0
  62. package/lib/commands/configuration-management/module.d.ts +8 -0
  63. package/lib/commands/configuration-management/node-dependency.service.d.ts +1 -0
  64. package/lib/commands/configuration-management/node-diff.service.d.ts +1 -0
  65. package/lib/commands/configuration-management/node.service.d.ts +2 -1
  66. package/lib/commands/configuration-management/package-validation.service.d.ts +1 -0
  67. package/lib/commands/configuration-management/package-version.service.d.ts +1 -0
  68. package/lib/commands/configuration-management/single-package-export.service.d.ts +1 -0
  69. package/lib/commands/configuration-management/single-package-import.service.d.ts +6 -3
  70. package/lib/commands/configuration-management/staging-package.service.d.ts +1 -0
  71. package/lib/commands/configuration-management/variable.service.d.ts +1 -0
  72. package/lib/commands/data-pipeline/data-pool/data-pool-service.d.ts +1 -0
  73. package/lib/commands/deployment/deployment.service.d.ts +1 -0
  74. package/lib/commands/studio/service/asset-service.d.ts +1 -0
  75. package/lib/commands/studio/service/package.service.d.ts +1 -0
  76. package/lib/commands/t2tc/diff.service.d.ts +1 -0
  77. package/lib/commands/t2tc/t2tc-package.service.d.ts +1 -0
  78. package/lib/core/command/module-handler.d.ts +4 -4
  79. package/lib/core/feature-flag/feature-disabled-error.d.ts +16 -0
  80. package/lib/core/http/http-client.d.ts +4 -0
  81. package/lib/core/http/http-shared/base.manager.d.ts +7 -5
  82. package/lib/core/http/http-shared/manager-config.interface.d.ts +1 -1
  83. package/lib/core/utils/branches.d.ts +3 -0
  84. package/lib/core/utils/cui-api.d.ts +26 -0
  85. package/lib/core/utils/cui-file-service.d.ts +19 -0
  86. package/lib/core/utils/file-service.d.ts +0 -1
  87. package/package.json +3 -3
  88. package/lib/core/utils/path.d.ts +0 -1
@@ -1,17 +1,19 @@
1
+ /// <reference types="node" />
1
2
  import { ManagerConfig } from "./manager-config.interface";
2
3
  import { Context } from "../../command/cli-context";
4
+ import { CuiFileService } from "../../utils/cui-file-service";
3
5
  export declare abstract class BaseManager {
4
6
  private httpClient;
7
+ protected readonly cuiFileService: CuiFileService;
5
8
  protected readonly fileDownloadedMessage = "File downloaded successfully. New filename: ";
6
9
  protected constructor(context: Context);
7
- pull(): Promise<any>;
8
- pullFile(): Promise<any>;
10
+ pull(): Promise<void>;
11
+ pullFile(): Promise<void>;
9
12
  push(): Promise<any>;
10
13
  update(): Promise<any>;
11
14
  findAll(): Promise<any>;
12
- protected writeToFile(data: any): string;
13
- protected writeStreamToFile(data: any): string;
14
- protected writeToFileWithGivenName(data: any, filename: string): void;
15
+ protected writeToFile(data: any): Promise<string>;
16
+ protected writeStreamToFile(data: Buffer): Promise<string>;
15
17
  protected abstract getConfig(): ManagerConfig;
16
18
  protected abstract getBody(): object;
17
19
  protected abstract getSerializedFileContent(data: any): string;
@@ -6,6 +6,6 @@ export interface ManagerConfig {
6
6
  exportFileName?: string;
7
7
  onPushSuccessMessage?: (data: any) => string;
8
8
  onUpdateSuccessMessage?: () => string;
9
- onFindAll?: (data: any) => void;
9
+ onFindAll?: (data: any) => void | Promise<void>;
10
10
  onFindAllAndExport?: (data: any) => void;
11
11
  }
@@ -1,4 +1,7 @@
1
1
  export declare class BranchUtils {
2
+ static readonly MAIN_BRANCH_KEY = "main";
2
3
  private static readonly BRANCH_SEPARATOR;
3
4
  static isBranchPackageKey(packageKey: string): boolean;
5
+ static constructBranchKey(projectKey: string, branchKey: string): string;
6
+ static extractProjectKey(packageKey: string): string;
4
7
  }
@@ -0,0 +1,26 @@
1
+ import { Context } from "../command/cli-context";
2
+ export declare const CUI_MARKING_FAILED_MESSAGE = "Could not resolve CUI marking. No file was written";
3
+ export interface CuiPdfCoverResponse {
4
+ coverPage?: {
5
+ pdfContent: string;
6
+ encoding: string;
7
+ };
8
+ }
9
+ export declare enum CuiMarking {
10
+ DISABLED = "DISABLED",
11
+ CLASSIFIED = "CLASSIFIED"
12
+ }
13
+ export type CuiMarkingDecision = {
14
+ marking: CuiMarking.DISABLED;
15
+ } | {
16
+ marking: CuiMarking.CLASSIFIED;
17
+ cover: CuiPdfCoverResponse;
18
+ };
19
+ export declare class CuiApi {
20
+ private static readonly CUI_PDF_COVER_SHEET_URL;
21
+ private static readonly STATUS_OK;
22
+ private static readonly STATUS_FORBIDDEN;
23
+ private readonly httpClient;
24
+ constructor(context: Context);
25
+ getCuiMarking(): Promise<CuiMarkingDecision>;
26
+ }
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { Context } from "../command/cli-context";
3
+ export declare class CuiFileService {
4
+ static readonly COVER_SHEET_FILE_NAME = "CUI_Cover_Sheet.pdf";
5
+ static readonly CLASSIFIED_PREFIX = "CUI - ";
6
+ private static readonly BASE64_ENCODING;
7
+ private readonly cuiApi;
8
+ constructor(context: Context);
9
+ writeToFileWithGivenName(data: string, filename: string): Promise<string>;
10
+ writeZipToFileWithGivenName(zipData: Buffer, filename: string): Promise<string>;
11
+ writeDirectoryWithGivenName(write: (targetDir: string) => void, directoryName: string): Promise<string>;
12
+ private writeWithCoverHandling;
13
+ private writeClassifiedArchive;
14
+ private addCoverPage;
15
+ private writeArchive;
16
+ private decodeCoverPage;
17
+ private buildClassifiedArchiveName;
18
+ private prefixFileName;
19
+ }
@@ -4,7 +4,6 @@ export declare class FileService {
4
4
  static readonly fileDownloadedMessage = "File downloaded successfully. New filename: ";
5
5
  writeToFileWithGivenName(data: any, filename: string): void;
6
6
  writeBufferToFileWithGivenName(data: Buffer, filename: string): void;
7
- writeBufferToPath(targetDir: string, filename: string, data: Buffer): string;
8
7
  extractZipBufferToDirectory(data: Buffer, targetDir: string): void;
9
8
  extractZipBufferToTempDirectory(data: Buffer): string;
10
9
  readFileToJson(fileName: string): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celonis/content-cli",
3
- "version": "1.13.1",
3
+ "version": "1.14.1",
4
4
  "description": "CLI Tool to help manage content in Celonis Platform",
5
5
  "main": "content-cli.js",
6
6
  "bin": {
@@ -18,10 +18,10 @@
18
18
  "node": ">=18.20.5"
19
19
  },
20
20
  "dependencies": {
21
- "adm-zip": "0.5.14",
21
+ "adm-zip": "0.6.0",
22
22
  "chalk": "4.1.2",
23
23
  "uuid": "9.0.1",
24
- "axios": "1.16.0",
24
+ "axios": "1.18.0",
25
25
  "commander": "13.1.0",
26
26
  "form-data": "4.0.6",
27
27
  "openid-client": "5.6.1",
@@ -1 +0,0 @@
1
- export declare function trimSlashes(value: string): string;