@celonis/content-cli 0.13.5 → 1.0.0
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.
- package/README.md +13 -6
- package/{api → commands/action-flows/action-flow}/action-flow-api.js +10 -9
- package/commands/{action-flow.command.js → action-flows/action-flow/action-flow-command.service.js} +11 -8
- package/{services/action-flow/action-flow-service.js → commands/action-flows/action-flow/action-flow.service.js} +12 -10
- package/commands/action-flows/module.js +88 -0
- package/commands/{skill.command.js → action-flows/skill/skill-command.service.js} +9 -11
- package/{content/factory/skill-manager.factory.js → commands/action-flows/skill/skill.manager-factory.js} +7 -4
- package/{content/manager → commands/action-flows/skill}/skill.manager.js +7 -4
- package/commands/analysis/analysis-bookmarks-command.service.js +39 -0
- package/{content/factory/analysis-bookmarks-manager.factory.js → commands/analysis/analysis-bookmarks.manager-factory.js} +7 -4
- package/{content/manager → commands/analysis}/analysis-bookmarks.manager.js +8 -5
- package/commands/analysis/module.js +52 -0
- package/commands/configuration-management/api/batch-import-export-api.js +84 -0
- package/{api → commands/configuration-management/api}/diff-api.js +8 -7
- package/commands/configuration-management/api/variable-assignment-candidates-api.js +41 -0
- package/{services/package-manager/batch-import-export-service.js → commands/configuration-management/batch-import-export.service.js} +31 -26
- package/commands/{config.command.js → configuration-management/config-command.service.js} +21 -16
- package/{services/package-manager/diff-service.js → commands/configuration-management/diff.service.js} +11 -8
- package/commands/configuration-management/module.js +102 -0
- package/{services/studio → commands/configuration-management}/studio.service.js +33 -24
- package/commands/{variable.command.js → configuration-management/variable-command.service.js} +10 -7
- package/{services/package-manager/variable-service.js → commands/configuration-management/variable.service.js} +36 -42
- package/commands/{ctp.command.js → cpm4/ctp-command.service.js} +11 -13
- package/{content/manager → commands/cpm4}/ctp.analysis.manager.js +3 -0
- package/{content/manager → commands/cpm4}/ctp.datamodel.manager.js +2 -2
- package/{content/factory/ctp-manager.factory.js → commands/cpm4/ctp.manager-factory.js} +9 -6
- package/{content/manager → commands/cpm4}/ctp.manager.js +6 -4
- package/commands/cpm4/module.js +46 -0
- package/commands/{connection.command.js → data-pipeline/connection/connection-command.service.js} +14 -11
- package/commands/data-pipeline/connection/connection.commands.js +65 -0
- package/{services → commands/data-pipeline}/connection/connection.service.js +18 -15
- package/{api → commands/data-pipeline/data-pool}/data-pool-api.js +14 -13
- package/commands/{data-pool.command.js → data-pipeline/data-pool/data-pool-command.service.js} +25 -23
- package/{content/factory → commands/data-pipeline/data-pool}/data-pool-manager.factory.js +9 -6
- package/{services → commands/data-pipeline}/data-pool/data-pool-service.js +13 -10
- package/commands/data-pipeline/data-pool/data-pool.commands.js +99 -0
- package/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.js +8 -9
- package/commands/data-pipeline/module.js +24 -0
- package/commands/profile/module.js +60 -0
- package/commands/profile/profile-command.service.js +94 -0
- package/{api → commands/studio/api}/asset-api.js +8 -7
- package/{api → commands/studio/api}/compute-pool-api.js +7 -6
- package/{api → commands/studio/api}/node-api.js +9 -8
- package/{api → commands/studio/api}/package-api.js +18 -17
- package/{api → commands/studio/api}/package-dependencies-api.js +12 -11
- package/{api → commands/studio/api}/space-api.js +10 -9
- package/commands/{analysis-bookmarks.command.js → studio/api/studio-variables-api.js} +18 -13
- package/commands/{asset.command.js → studio/command-service/asset-command.service.js} +21 -19
- package/commands/{package.command.js → studio/command-service/package-command.service.js} +22 -20
- package/commands/{space.command.js → studio/command-service/space-command.service.js} +9 -11
- package/commands/studio/command-service/widget.command.js +56 -0
- package/{content/factory/asset-manager.factory.js → commands/studio/manager/asset.manager-factory.js} +7 -4
- package/{content → commands/studio}/manager/asset.manager.js +8 -5
- package/{content/factory/package-manager.factory.js → commands/studio/manager/package.manager-factory.js} +7 -4
- package/{content → commands/studio}/manager/package.manager.js +9 -6
- package/{content/factory/space-manager.factory.js → commands/studio/manager/space.manager-factory.js} +6 -3
- package/{content → commands/studio}/manager/space.manager.js +7 -4
- package/{content/factory/widget-manager.factory.js → commands/studio/manager/widget.manager-factory.js} +8 -5
- package/{content → commands/studio}/manager/widget.manager.js +5 -5
- package/commands/studio/module.js +169 -0
- package/{services/package-manager → commands/studio/service}/asset-service.js +10 -9
- package/{services/package-manager/datamodel-service.js → commands/studio/service/data-model.service.js} +8 -6
- package/{services/package-manager/package-service.js → commands/studio/service/package.service.js} +59 -49
- package/{services/package-manager/space-service.js → commands/studio/service/space.service.js} +9 -9
- package/commands/studio/service/studio-variable.service.js +41 -0
- package/content-cli.js +69 -20
- package/core/command/cli-context.js +69 -0
- package/core/command/module-handler.js +200 -0
- package/core/http/base-api.js +115 -0
- package/{services/http-client-service.v2.js → core/http/http-client.js} +39 -24
- package/{services/context.service.js → core/http/http-shared/base.manager.helper.js} +6 -16
- package/{content/manager → core/http/http-shared}/base.manager.js +14 -21
- package/{services → core/profile}/profile.service.js +11 -5
- package/{validators → core/profile}/profile.validator.js +3 -3
- package/{services → core/utils}/file-service.js +2 -7
- package/core/utils/logger.js +102 -0
- package/{services → core/utils}/question.service.js +18 -7
- package/{util → core/utils}/version.js +1 -1
- package/lib/{api → commands/action-flows/action-flow}/action-flow-api.d.ts +4 -4
- package/lib/commands/{action-flow.command.d.ts → action-flows/action-flow/action-flow-command.service.d.ts} +4 -1
- package/lib/{services/action-flow/action-flow-service.d.ts → commands/action-flows/action-flow/action-flow.service.d.ts} +4 -4
- package/lib/commands/action-flows/module.d.ts +14 -0
- package/lib/commands/{skill.command.d.ts → action-flows/skill/skill-command.service.d.ts} +3 -2
- package/lib/commands/action-flows/skill/skill.manager-factory.d.ts +8 -0
- package/lib/{content/manager → commands/action-flows/skill}/skill.manager.d.ts +4 -2
- package/lib/commands/analysis/analysis-bookmarks-command.service.d.ts +7 -0
- package/lib/commands/analysis/analysis-bookmarks.manager-factory.d.ts +8 -0
- package/lib/{content/manager → commands/analysis}/analysis-bookmarks.manager.d.ts +4 -2
- package/lib/commands/analysis/module.d.ts +11 -0
- package/lib/{api → commands/configuration-management/api}/batch-import-export-api.d.ts +5 -5
- package/lib/{api → commands/configuration-management/api}/diff-api.d.ts +5 -5
- package/lib/commands/configuration-management/api/variable-assignment-candidates-api.d.ts +8 -0
- package/lib/{services/package-manager/batch-import-export-service.d.ts → commands/configuration-management/batch-import-export.service.d.ts} +6 -3
- package/lib/commands/{config.command.d.ts → configuration-management/config-command.service.d.ts} +6 -1
- package/lib/{services/package-manager/diff-service.d.ts → commands/configuration-management/diff.service.d.ts} +4 -3
- package/lib/{interfaces/package-export-transport.d.ts → commands/configuration-management/interfaces/package-export.interfaces.d.ts} +2 -2
- package/lib/{api/variable-assignment-apis.d.ts → commands/configuration-management/interfaces/variable-assignment-apis.constants.d.ts} +3 -1
- package/lib/commands/configuration-management/module.d.ts +15 -0
- package/lib/{services/studio → commands/configuration-management}/studio.service.d.ts +12 -5
- package/lib/commands/configuration-management/variable-command.service.d.ts +6 -0
- package/lib/{services/package-manager/variable-service.d.ts → commands/configuration-management/variable.service.d.ts} +8 -8
- package/lib/commands/cpm4/ctp-command.service.d.ts +7 -0
- package/lib/{content/manager → commands/cpm4}/ctp.analysis.manager.d.ts +2 -0
- package/lib/{content/manager → commands/cpm4}/ctp.datamodel.manager.d.ts +2 -1
- package/lib/{content/factory/ctp-manager.factory.d.ts → commands/cpm4/ctp.manager-factory.d.ts} +4 -1
- package/lib/{content/manager → commands/cpm4}/ctp.manager.d.ts +4 -2
- package/lib/commands/cpm4/module.d.ts +10 -0
- package/lib/commands/data-pipeline/connection/connection-command.service.d.ts +8 -0
- package/lib/commands/data-pipeline/connection/connection.commands.d.ts +11 -0
- package/lib/{services → commands/data-pipeline}/connection/connection.service.d.ts +4 -3
- package/lib/{api → commands/data-pipeline/data-pool}/data-pool-api.d.ts +5 -5
- package/lib/commands/data-pipeline/data-pool/data-pool-command.service.d.ts +14 -0
- package/lib/commands/data-pipeline/data-pool/data-pool-manager.factory.d.ts +9 -0
- package/lib/{services → commands/data-pipeline}/data-pool/data-pool-service.d.ts +4 -3
- package/lib/commands/data-pipeline/data-pool/data-pool.commands.d.ts +15 -0
- package/lib/{content/manager → commands/data-pipeline/data-pool}/data-pool.manager.d.ts +4 -2
- package/lib/commands/data-pipeline/module.d.ts +9 -0
- package/lib/commands/profile/module.d.ts +12 -0
- package/lib/commands/{profile.command.d.ts → profile/profile-command.service.d.ts} +1 -1
- package/lib/{api → commands/studio/api}/asset-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/compute-pool-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/node-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/package-api.d.ts +4 -4
- package/lib/{api → commands/studio/api}/package-dependencies-api.d.ts +4 -4
- package/lib/commands/studio/api/space-api.d.ts +9 -0
- package/lib/commands/studio/api/studio-variables-api.d.ts +8 -0
- package/lib/commands/studio/command-service/asset-command.service.d.ts +11 -0
- package/lib/commands/{package.command.d.ts → studio/command-service/package-command.service.d.ts} +8 -5
- package/lib/commands/studio/command-service/space-command.service.d.ts +6 -0
- package/lib/commands/studio/command-service/widget.command.d.ts +7 -0
- package/lib/{interfaces/batch-export-node-transport.d.ts → commands/studio/interfaces/batch-export-node.interfaces.d.ts} +1 -9
- package/lib/{content/factory/asset-manager.factory.d.ts → commands/studio/manager/asset.manager-factory.d.ts} +4 -1
- package/lib/{content → commands/studio}/manager/asset.manager.d.ts +4 -2
- package/lib/{content/factory/package-manager.factory.d.ts → commands/studio/manager/package.manager-factory.d.ts} +4 -1
- package/lib/{content → commands/studio}/manager/package.manager.d.ts +4 -2
- package/lib/commands/studio/manager/space.manager-factory.d.ts +8 -0
- package/lib/{content → commands/studio}/manager/space.manager.d.ts +4 -2
- package/lib/{content/factory/widget-manager.factory.d.ts → commands/studio/manager/widget.manager-factory.d.ts} +10 -7
- package/lib/{content → commands/studio}/manager/widget.manager.d.ts +4 -2
- package/lib/commands/studio/module.d.ts +21 -0
- package/lib/{services/package-manager → commands/studio/service}/asset-service.d.ts +4 -3
- package/lib/{services/package-manager/datamodel-service.d.ts → commands/studio/service/data-model.service.d.ts} +5 -5
- package/lib/{services/package-manager/package-service.d.ts → commands/studio/service/package.service.d.ts} +13 -6
- package/lib/commands/studio/service/space.service.d.ts +11 -0
- package/lib/commands/studio/service/studio-variable.service.d.ts +9 -0
- package/lib/core/command/cli-context.d.ts +17 -0
- package/lib/core/command/module-handler.d.ts +57 -0
- package/lib/core/http/base-api.d.ts +32 -0
- package/lib/{services/http-client-service.v2.d.ts → core/http/http-client.d.ts} +8 -3
- package/lib/{content/manager → core/http/http-shared}/base.manager.d.ts +4 -6
- package/lib/core/http/http-shared/base.manager.helper.d.ts +4 -0
- package/lib/{services → core/profile}/profile.service.d.ts +2 -1
- package/lib/{validators → core/profile}/profile.validator.d.ts +1 -1
- package/lib/{services → core/utils}/file-service.d.ts +0 -2
- package/lib/core/utils/question.service.d.ts +10 -0
- package/package.json +3 -3
- package/api/batch-import-export-api.js +0 -62
- package/api/variables-api.js +0 -56
- package/commands/profile.command.js +0 -88
- package/commands/widget.command.js +0 -36
- package/content-cli-analyze.js +0 -56
- package/content-cli-config.js +0 -119
- package/content-cli-export.js +0 -90
- package/content-cli-get.js +0 -52
- package/content-cli-import.js +0 -93
- package/content-cli-list.js +0 -129
- package/content-cli-profile.js +0 -64
- package/content-cli-pull.js +0 -104
- package/content-cli-push.js +0 -196
- package/content-cli-set.js +0 -55
- package/content-cli-update.js +0 -44
- package/interfaces/variable-assignment-api.interface.js +0 -12
- package/lib/api/space-api.d.ts +0 -9
- package/lib/api/variables-api.d.ts +0 -14
- package/lib/commands/analysis-bookmarks.command.d.ts +0 -6
- package/lib/commands/asset.command.d.ts +0 -8
- package/lib/commands/connection.command.d.ts +0 -5
- package/lib/commands/ctp.command.d.ts +0 -6
- package/lib/commands/data-pool.command.d.ts +0 -11
- package/lib/commands/space.command.d.ts +0 -5
- package/lib/commands/variable.command.d.ts +0 -3
- package/lib/commands/widget.command.d.ts +0 -5
- package/lib/content/factory/analysis-bookmarks-manager.factory.d.ts +0 -5
- package/lib/content/factory/data-pool-manager.factory.d.ts +0 -6
- package/lib/content/factory/skill-manager.factory.d.ts +0 -5
- package/lib/content/factory/space-manager.factory.d.ts +0 -5
- package/lib/content-cli-analyze.d.ts +0 -1
- package/lib/content-cli-config.d.ts +0 -8
- package/lib/content-cli-export.d.ts +0 -6
- package/lib/content-cli-get.d.ts +0 -1
- package/lib/content-cli-import.d.ts +0 -6
- package/lib/content-cli-list.d.ts +0 -9
- package/lib/content-cli-profile.d.ts +0 -1
- package/lib/content-cli-pull.d.ts +0 -1
- package/lib/content-cli-push.d.ts +0 -1
- package/lib/content-cli-set.d.ts +0 -1
- package/lib/content-cli-update.d.ts +0 -1
- package/lib/interfaces/variable-assignment-api.interface.d.ts +0 -3
- package/lib/services/command.service.d.ts +0 -6
- package/lib/services/content.service.d.ts +0 -11
- package/lib/services/context.service.d.ts +0 -13
- package/lib/services/http-client.service.d.ts +0 -15
- package/lib/services/package-manager/space-service.d.ts +0 -11
- package/lib/services/question.service.d.ts +0 -4
- package/lib/util/context-initializer.d.ts +0 -3
- package/lib/util/program.d.ts +0 -2
- package/services/command.service.js +0 -24
- package/services/content.service.js +0 -130
- package/services/http-client.service.js +0 -157
- package/util/context-initializer.js +0 -39
- package/util/logger.js +0 -49
- package/util/program.js +0 -16
- /package/{interfaces/batch-export-import-constants.js → commands/configuration-management/interfaces/batch-export-import.constants.js} +0 -0
- /package/{interfaces/diff-package.transport.js → commands/configuration-management/interfaces/diff-package.interfaces.js} +0 -0
- /package/{interfaces/batch-export-node-transport.js → commands/configuration-management/interfaces/package-export.interfaces.js} +0 -0
- /package/{api/variable-assignment-apis.js → commands/configuration-management/interfaces/variable-assignment-apis.constants.js} +0 -0
- /package/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.js +0 -0
- /package/{interfaces/manager-config.interface.js → commands/studio/interfaces/batch-export-node.interfaces.js} +0 -0
- /package/{interfaces/manifest-transport.js → commands/studio/interfaces/manifest.interface.js} +0 -0
- /package/{interfaces → commands/studio/interfaces}/package-manager.interfaces.js +0 -0
- /package/{interfaces → commands/studio/interfaces}/save-content-node.interface.js +0 -0
- /package/{interfaces/package-export-transport.js → commands/studio/interfaces/space.interface.js} +0 -0
- /package/{util → commands/studio/utils}/semantic-versioning.js +0 -0
- /package/{util → core/http}/axios-initializer.js +0 -0
- /package/{interfaces/save-space.interface.js → core/http/http-shared/manager-config.interface.js} +0 -0
- /package/{util → core/http}/tracing.js +0 -0
- /package/{interfaces → core/profile}/profile.interface.js +0 -0
- /package/{util → core/utils}/json.js +0 -0
- /package/{util → core/utils}/yaml.js +0 -0
- /package/lib/{interfaces/batch-export-import-constants.d.ts → commands/configuration-management/interfaces/batch-export-import.constants.d.ts} +0 -0
- /package/lib/{interfaces/diff-package.transport.d.ts → commands/configuration-management/interfaces/diff-package.interfaces.d.ts} +0 -0
- /package/lib/{interfaces → commands/data-pipeline/data-pool}/data-pool-manager.interfaces.d.ts +0 -0
- /package/lib/{interfaces/manifest-transport.d.ts → commands/studio/interfaces/manifest.interface.d.ts} +0 -0
- /package/lib/{interfaces → commands/studio/interfaces}/package-manager.interfaces.d.ts +0 -0
- /package/lib/{interfaces → commands/studio/interfaces}/save-content-node.interface.d.ts +0 -0
- /package/lib/{interfaces/save-space.interface.d.ts → commands/studio/interfaces/space.interface.d.ts} +0 -0
- /package/lib/{util → commands/studio/utils}/semantic-versioning.d.ts +0 -0
- /package/lib/{util → core/http}/axios-initializer.d.ts +0 -0
- /package/lib/{interfaces → core/http/http-shared}/manager-config.interface.d.ts +0 -0
- /package/lib/{util → core/http}/tracing.d.ts +0 -0
- /package/lib/{interfaces → core/profile}/profile.interface.d.ts +0 -0
- /package/lib/{util → core/utils}/json.d.ts +0 -0
- /package/lib/{util → core/utils}/logger.d.ts +0 -0
- /package/lib/{util → core/utils}/version.d.ts +0 -0
- /package/lib/{util → core/utils}/yaml.d.ts +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { DataPoolInstallVersionReport, DataPoolPageTransport } from "
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { DataPoolInstallVersionReport, DataPoolPageTransport } from "./data-pool-manager.interfaces";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class DataPoolApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
findAllPagedPools(limit: string, page: string): Promise<DataPoolPageTransport>;
|
|
5
7
|
executeDataPoolsBatchImport(importRequest: string): Promise<DataPoolInstallVersionReport>;
|
|
6
8
|
exportDataPool(poolId: string): Promise<string>;
|
|
@@ -9,5 +11,3 @@ declare class DataPoolApi {
|
|
|
9
11
|
getTypedConnection(poolId: string, connectionId: string, type: string): Promise<any>;
|
|
10
12
|
updateTypedConnection(poolId: string, connectionId: string, type: string, data: any): Promise<any>;
|
|
11
13
|
}
|
|
12
|
-
export declare const dataPoolApi: DataPoolApi;
|
|
13
|
-
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class DataPoolCommandService {
|
|
3
|
+
private baseManagerHelper;
|
|
4
|
+
private dataPoolManagerFactory;
|
|
5
|
+
private dataPoolService;
|
|
6
|
+
constructor(context: Context);
|
|
7
|
+
pullDataPool(id: string): Promise<void>;
|
|
8
|
+
pushDataPool(filename: string): Promise<void>;
|
|
9
|
+
exportDataPool(poolId: string, outputToJsonFile: boolean): Promise<void>;
|
|
10
|
+
pushDataPools(): Promise<void>;
|
|
11
|
+
batchImportDataPools(requestFile: string, outputToJsonFile: boolean): Promise<void>;
|
|
12
|
+
updateDataPool(id: string, filename: string): Promise<any>;
|
|
13
|
+
listDataPools(jsonResponse: boolean): Promise<any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataPoolManager } from "./data-pool.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class DataPoolManagerFactory {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
createManager(id: string, filename: string): DataPoolManager;
|
|
7
|
+
createManagers(): DataPoolManager[];
|
|
8
|
+
private readFile;
|
|
9
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class DataPoolService {
|
|
3
|
+
private dataPoolApi;
|
|
4
|
+
constructor(context: Context);
|
|
2
5
|
batchImportDataPools(requestFilePath: string, outputToJsonFile: boolean): Promise<void>;
|
|
3
6
|
exportDataPool(poolId: string, outputToJsonFile: boolean): Promise<void>;
|
|
4
7
|
listDataPools(): Promise<void>;
|
|
@@ -6,5 +9,3 @@ declare class DataPoolService {
|
|
|
6
9
|
private findAllPools;
|
|
7
10
|
private exportListOfPools;
|
|
8
11
|
}
|
|
9
|
-
export declare const dataPoolService: DataPoolService;
|
|
10
|
-
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands related to the Data Pools.
|
|
3
|
+
*/
|
|
4
|
+
import { Context } from "../../../core/command/cli-context";
|
|
5
|
+
import { Configurator } from "../../../core/command/module-handler";
|
|
6
|
+
export declare class DataPoolCommands {
|
|
7
|
+
register(context: Context, configurator: Configurator): void;
|
|
8
|
+
private exportDataPool;
|
|
9
|
+
private batchImportDataPools;
|
|
10
|
+
private listDataPools;
|
|
11
|
+
private pullDataPool;
|
|
12
|
+
private pushDataPool;
|
|
13
|
+
private pushDataPools;
|
|
14
|
+
private updateDataPool;
|
|
15
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseManager } from "
|
|
2
|
-
import { ManagerConfig } from "
|
|
1
|
+
import { BaseManager } from "../../../core/http/http-shared/base.manager";
|
|
2
|
+
import { ManagerConfig } from "../../../core/http/http-shared/manager-config.interface";
|
|
3
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
4
|
export declare class DataPoolManager extends BaseManager {
|
|
4
5
|
static DATA_POOL_FILE_NAME_PREFIX: string;
|
|
5
6
|
private static API_URL;
|
|
@@ -8,6 +9,7 @@ export declare class DataPoolManager extends BaseManager {
|
|
|
8
9
|
private static DATA_POOL_PULL_URL;
|
|
9
10
|
private _id;
|
|
10
11
|
private _content;
|
|
12
|
+
constructor(context: Context);
|
|
11
13
|
get content(): string;
|
|
12
14
|
set content(value: string);
|
|
13
15
|
get id(): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands related to the Data Pipeline area.
|
|
3
|
+
*/
|
|
4
|
+
import { Configurator, IModule } from "../../core/command/module-handler";
|
|
5
|
+
import { Context } from "../../core/command/cli-context";
|
|
6
|
+
declare class Module extends IModule {
|
|
7
|
+
register(context: Context, configurator: Configurator): void;
|
|
8
|
+
}
|
|
9
|
+
export = Module;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands to create and list access profiles.
|
|
3
|
+
*/
|
|
4
|
+
import { Configurator, IModule } from "../../core/command/module-handler";
|
|
5
|
+
import { Context } from "../../core/command/cli-context";
|
|
6
|
+
declare class Module extends IModule {
|
|
7
|
+
register(context: Context, configurator: Configurator): void;
|
|
8
|
+
private defaultProfile;
|
|
9
|
+
private createProfile;
|
|
10
|
+
private listProfiles;
|
|
11
|
+
}
|
|
12
|
+
export = Module;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SaveContentNode } from "../interfaces/save-content-node.interface";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class AssetApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
findAllAssets(assetType: string): Promise<SaveContentNode[]>;
|
|
5
7
|
private getFindAllAssetsUrl;
|
|
6
8
|
}
|
|
7
|
-
export declare const assetApi: AssetApi;
|
|
8
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StudioComputeNodeDescriptor } from "../interfaces/package-manager.interfaces";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class ComputePoolApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
findAllDataModelsDetails(): Promise<StudioComputeNodeDescriptor[]>;
|
|
5
7
|
}
|
|
6
|
-
export declare const computePoolApi: ComputePoolApi;
|
|
7
|
-
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ContentNodeTransport } from "../interfaces/package-manager.interfaces";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class NodeApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
findAllNodesOfType(assetType?: string): Promise<ContentNodeTransport[]>;
|
|
5
7
|
findOneByKeyAndRootNodeKey(packageKey: string, nodeKey: string): Promise<ContentNodeTransport | null>;
|
|
6
8
|
}
|
|
7
|
-
export declare const nodeApi: NodeApi;
|
|
8
|
-
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ActivatePackageTransport, ContentNodeTransport, PackageHistoryTransport, PackageManagerVariableType, PackageWithVariableAssignments } from "../interfaces/package-manager.interfaces";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { Context } from "../../../core/command/cli-context";
|
|
4
|
+
export declare class PackageApi {
|
|
5
|
+
private httpClient;
|
|
6
|
+
constructor(context: Context);
|
|
5
7
|
findAllPackages(): Promise<ContentNodeTransport[]>;
|
|
6
8
|
exportPackage(rootPackageKey: string, version?: string, excludeActionFlows?: boolean): Promise<Buffer>;
|
|
7
9
|
findAllPackagesWithVariableAssignments(type: PackageManagerVariableType): Promise<PackageWithVariableAssignments[]>;
|
|
@@ -13,5 +15,3 @@ declare class PackageApi {
|
|
|
13
15
|
movePackageToSpace(nodeId: string, spaceId: string): Promise<void>;
|
|
14
16
|
publishPackage(activatePackage: ActivatePackageTransport): Promise<void>;
|
|
15
17
|
}
|
|
16
|
-
export declare const packageApi: PackageApi;
|
|
17
|
-
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { PackageDependencyTransport } from "../interfaces/package-manager.interfaces";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class PackageDependenciesApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
findDependenciesOfPackage(nodeId: string, draftId: string): Promise<PackageDependencyTransport[]>;
|
|
5
7
|
findPackageDependenciesByIds(nodeDraftIdMap: Map<string, string>): Promise<Map<string, PackageDependencyTransport[]>>;
|
|
6
8
|
updatePackageDependency(nodeId: string, packageDependency: PackageDependencyTransport): Promise<void>;
|
|
7
9
|
createDependencies(packageId: string, packageDependency: PackageDependencyTransport[]): Promise<void>;
|
|
8
10
|
deleteDependency(packageId: string, packageDependencyKey: string): Promise<void>;
|
|
9
11
|
}
|
|
10
|
-
export declare const packageDependenciesApi: PackageDependenciesApi;
|
|
11
|
-
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { SpaceTransport } from "../interfaces/space.interface";
|
|
3
|
+
export declare class SpaceApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
findOne(spaceId: string): Promise<SpaceTransport>;
|
|
7
|
+
findAllSpaces(): Promise<SpaceTransport[]>;
|
|
8
|
+
createSpace(space: SpaceTransport): Promise<SpaceTransport>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContentNodeTransport, VariablesAssignments } from "../interfaces/package-manager.interfaces";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class StudioVariablesApi {
|
|
4
|
+
private httpClient;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
assignVariableValues(packageKey: string, variablesAssignments: VariablesAssignments[]): Promise<ContentNodeTransport[]>;
|
|
7
|
+
getRuntimeVariableValues(packageKey: string, appMode: string): Promise<VariablesAssignments[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class AssetCommandService {
|
|
3
|
+
private baseManagerHelper;
|
|
4
|
+
private assetManagerFactory;
|
|
5
|
+
private assetService;
|
|
6
|
+
constructor(context: Context);
|
|
7
|
+
pullAsset(key: string): Promise<void>;
|
|
8
|
+
pushAsset(fileName: string, packageKey: string): Promise<void>;
|
|
9
|
+
pushAssets(packageKey: string): Promise<void>;
|
|
10
|
+
listAssets(jsonResponse: boolean, assetType: string): Promise<void>;
|
|
11
|
+
}
|
package/lib/commands/{package.command.d.ts → studio/command-service/package-command.service.d.ts}
RENAMED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class PackageCommandService {
|
|
3
|
+
private baseManagerHelper;
|
|
3
4
|
private packageManagerFactory;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private packageService;
|
|
6
|
+
constructor(context: Context);
|
|
7
|
+
pullPackage(key: string, store: boolean, newKey: string, draft: boolean): Promise<void>;
|
|
8
|
+
pushPackage(spaceKey: string, fileName: string, newKey: string, overwrite: boolean): Promise<void>;
|
|
9
|
+
pushPackages(spaceKey: string): Promise<void>;
|
|
7
10
|
listPackages(jsonResponse: boolean, includeDependencies: boolean, packageKeys: string[]): Promise<void>;
|
|
8
11
|
batchExportPackages(packageKeys: string[], includeDependencies: boolean, excludeActionFlows?: boolean): Promise<void>;
|
|
9
12
|
batchImportPackages(spaceMappings: string[], dataModelMappingsFilePath: string, exportedPackagesFile: string, overwrite: boolean, excludeActionFlows?: boolean): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class WidgetCommand {
|
|
3
|
+
private widgetManagerFactory;
|
|
4
|
+
constructor(context: Context);
|
|
5
|
+
pushWidget(tenantIndependent: boolean, userSpecific: boolean): Promise<void>;
|
|
6
|
+
private pushToAwsIfAuthorized;
|
|
7
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentNodeTransport, PackageDependencyTransport, PackageHistoryTransport, StudioComputeNodeDescriptor, VariablesAssignments } from "./package-manager.interfaces";
|
|
2
|
-
import { SpaceTransport } from "./
|
|
2
|
+
import { SpaceTransport } from "./space.interface";
|
|
3
3
|
export interface BatchExportNodeTransport extends ContentNodeTransport {
|
|
4
4
|
workingDraftId: string;
|
|
5
5
|
activatedDraftId: string;
|
|
@@ -9,11 +9,3 @@ export interface BatchExportNodeTransport extends ContentNodeTransport {
|
|
|
9
9
|
variables?: VariablesAssignments[];
|
|
10
10
|
space?: SpaceTransport;
|
|
11
11
|
}
|
|
12
|
-
export interface PackageAndAssetTransport {
|
|
13
|
-
rootNode: ContentNodeTransport;
|
|
14
|
-
nodes: ContentNodeTransport[];
|
|
15
|
-
}
|
|
16
|
-
export interface SpaceMappingTransport {
|
|
17
|
-
packageKey: string;
|
|
18
|
-
spaceId: string;
|
|
19
|
-
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { AssetManager } from "
|
|
1
|
+
import { AssetManager } from "./asset.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
3
|
export declare class AssetManagerFactory {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: Context);
|
|
3
6
|
createManager(key?: string, fileName?: string, packageKey?: string): AssetManager;
|
|
4
7
|
createManagers(packageKey: string): AssetManager[];
|
|
5
8
|
private isAssetFilePath;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseManager } from "
|
|
2
|
-
import {
|
|
1
|
+
import { BaseManager } from "../../../core/http/http-shared/base.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
import { ManagerConfig } from "../../../core/http/http-shared/manager-config.interface";
|
|
3
4
|
export declare class AssetManager extends BaseManager {
|
|
4
5
|
static ASSET_FILE_PREFIX: string;
|
|
5
6
|
private static BASE_URL;
|
|
@@ -8,6 +9,7 @@ export declare class AssetManager extends BaseManager {
|
|
|
8
9
|
private _key;
|
|
9
10
|
private _content;
|
|
10
11
|
private _packageKey;
|
|
12
|
+
constructor(context: Context);
|
|
11
13
|
get key(): string;
|
|
12
14
|
set key(value: string);
|
|
13
15
|
get content(): string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { PackageManager } from "./package.manager";
|
|
2
3
|
export declare class PackageManagerFactory {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: Context);
|
|
3
6
|
createPullManager(key: string, store?: boolean, newKey?: string, draft?: boolean): PackageManager;
|
|
4
7
|
createPushManager(spaceKey: string, fileName: string, newKey?: string, overwrite?: boolean): PackageManager;
|
|
5
8
|
createPushManagers(spaceKey: string): PackageManager[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BaseManager } from "../../../core/http/http-shared/base.manager";
|
|
2
|
+
import { ManagerConfig } from "../../../core/http/http-shared/manager-config.interface";
|
|
3
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
4
|
export declare class PackageManager extends BaseManager {
|
|
4
5
|
static PACKAGE_FILE_PREFIX: string;
|
|
5
6
|
static PACKAGE_FILE_EXTENSION: string;
|
|
@@ -13,6 +14,7 @@ export declare class PackageManager extends BaseManager {
|
|
|
13
14
|
private _newKey;
|
|
14
15
|
private _overwrite;
|
|
15
16
|
private _draft;
|
|
17
|
+
constructor(context: Context);
|
|
16
18
|
get key(): string;
|
|
17
19
|
set key(value: string);
|
|
18
20
|
get spaceKey(): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SpaceManager } from "./space.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class SpaceManagerFactory {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
createListManager(jsonResponse: boolean): SpaceManager;
|
|
7
|
+
createManager(jsonResponse?: boolean): SpaceManager;
|
|
8
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseManager } from "
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { BaseManager } from "../../../core/http/http-shared/base.manager";
|
|
3
|
+
import { ManagerConfig } from "../../../core/http/http-shared/manager-config.interface";
|
|
3
4
|
export declare class SpaceManager extends BaseManager {
|
|
4
5
|
private static BASE_URL;
|
|
5
6
|
private _jsonResponse;
|
|
7
|
+
constructor(context: Context);
|
|
6
8
|
get jsonResponse(): boolean;
|
|
7
9
|
set jsonResponse(value: boolean);
|
|
8
10
|
getConfig(): ManagerConfig;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import { WidgetManager } from "
|
|
1
|
+
import { WidgetManager } from "./widget.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class WidgetManagerFactory {
|
|
4
|
+
private readonly context;
|
|
5
|
+
constructor(context: Context);
|
|
6
|
+
createManager(tenantIndependent?: boolean, userSpecific?: boolean): WidgetManager;
|
|
7
|
+
private readContent;
|
|
8
|
+
fetchManifest(): Manifest;
|
|
9
|
+
validateManifest(manifest: Manifest): void;
|
|
10
|
+
}
|
|
2
11
|
interface Manifest {
|
|
3
12
|
key: string;
|
|
4
13
|
name: string;
|
|
@@ -11,10 +20,4 @@ interface ManifestWidget {
|
|
|
11
20
|
widgetId: string;
|
|
12
21
|
name: string;
|
|
13
22
|
}
|
|
14
|
-
export declare class WidgetManagerFactory {
|
|
15
|
-
createManager(tenantIndependent?: boolean, userSpecific?: boolean): WidgetManager;
|
|
16
|
-
private readContent;
|
|
17
|
-
fetchManifest(): Manifest;
|
|
18
|
-
validateManifest(manifest: Manifest): void;
|
|
19
|
-
}
|
|
20
23
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseManager } from "
|
|
2
|
-
import {
|
|
1
|
+
import { BaseManager } from "../../../core/http/http-shared/base.manager";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
import { ManagerConfig } from "../../../core/http/http-shared/manager-config.interface";
|
|
3
4
|
export declare class WidgetManager extends BaseManager {
|
|
4
5
|
private static PACKAGE_MANAGER_BASE_URL;
|
|
5
6
|
private static WIDGET_API;
|
|
@@ -8,6 +9,7 @@ export declare class WidgetManager extends BaseManager {
|
|
|
8
9
|
private _content;
|
|
9
10
|
private _tenantIndependent;
|
|
10
11
|
private _userSpecific;
|
|
12
|
+
constructor(context: Context);
|
|
11
13
|
get content(): any;
|
|
12
14
|
set content(value: any);
|
|
13
15
|
get tenantIndependent(): any;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands related to the Studio area.
|
|
3
|
+
*/
|
|
4
|
+
import { Configurator, IModule } from "../../core/command/module-handler";
|
|
5
|
+
import { Context } from "../../core/command/cli-context";
|
|
6
|
+
declare class Module extends IModule {
|
|
7
|
+
register(context: Context, configurator: Configurator): void;
|
|
8
|
+
private batchExportPackages;
|
|
9
|
+
private batchImportPackages;
|
|
10
|
+
private listPackages;
|
|
11
|
+
private listSpaces;
|
|
12
|
+
private listAssets;
|
|
13
|
+
private pullAsset;
|
|
14
|
+
private pullPackage;
|
|
15
|
+
private pushAsset;
|
|
16
|
+
private pushAssets;
|
|
17
|
+
private pushPackage;
|
|
18
|
+
private pushPackages;
|
|
19
|
+
private pushWidget;
|
|
20
|
+
}
|
|
21
|
+
export = Module;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
export declare class AssetService {
|
|
2
3
|
protected readonly fileDownloadedMessage = "File downloaded successfully. New filename: ";
|
|
4
|
+
private assetApi;
|
|
5
|
+
constructor(context: Context);
|
|
3
6
|
listAssets(assetType: string): Promise<void>;
|
|
4
7
|
findAndExportAllAssets(assetType: string): Promise<void>;
|
|
5
8
|
}
|
|
6
|
-
export declare const assetService: AssetService;
|
|
7
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PackageWithVariableAssignments, StudioComputeNodeDescriptor } from "
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { PackageWithVariableAssignments, StudioComputeNodeDescriptor } from "../interfaces/package-manager.interfaces";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class DataModelService {
|
|
4
|
+
private computePoolApi;
|
|
5
|
+
constructor(context: Context);
|
|
4
6
|
getDataModelDetailsForPackages(packagesWithDataModelVariables: PackageWithVariableAssignments[]): Promise<Map<string, StudioComputeNodeDescriptor[]>>;
|
|
5
7
|
}
|
|
6
|
-
export declare const dataModelService: DataModelService;
|
|
7
|
-
export {};
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PackageDependencyTransport } from "
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { PackageDependencyTransport } from "../interfaces/package-manager.interfaces";
|
|
3
|
+
import { BatchExportNodeTransport } from "../interfaces/batch-export-node.interfaces";
|
|
4
|
+
import { ManifestNodeTransport } from "../interfaces/manifest.interface";
|
|
5
|
+
export declare class PackageService {
|
|
5
6
|
protected readonly fileDownloadedMessage = "File downloaded successfully. New filename: ";
|
|
7
|
+
private packageApi;
|
|
8
|
+
private nodeApi;
|
|
9
|
+
private packageDependenciesApi;
|
|
10
|
+
private dataModelService;
|
|
11
|
+
private variableService;
|
|
12
|
+
private spaceService;
|
|
13
|
+
constructor(context: Context);
|
|
6
14
|
listPackages(): Promise<void>;
|
|
7
15
|
findAndExportListOfAllPackages(includeDependencies: boolean, packageKeys: string[]): Promise<void>;
|
|
8
16
|
batchImportPackages(spaceMappings: string[], dataModelMappingsFilePath: string, exportedPackagesFile: string, overwrite: boolean, excludeActionFlows: boolean): Promise<void>;
|
|
@@ -25,6 +33,5 @@ declare class PackageService {
|
|
|
25
33
|
private exportPackagesAndAssets;
|
|
26
34
|
private exportToZip;
|
|
27
35
|
private exportManifestOfPackages;
|
|
36
|
+
private readManifestFile;
|
|
28
37
|
}
|
|
29
|
-
export declare const packageService: PackageService;
|
|
30
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Context } from "../../../core/command/cli-context";
|
|
2
|
+
import { SpaceTransport } from "../interfaces/space.interface";
|
|
3
|
+
import { BatchExportNodeTransport } from "../interfaces/batch-export-node.interfaces";
|
|
4
|
+
export declare class SpaceService {
|
|
5
|
+
private allSpaces;
|
|
6
|
+
private spaceApi;
|
|
7
|
+
constructor(context: Context);
|
|
8
|
+
getParentSpaces(nodes: BatchExportNodeTransport[]): Promise<BatchExportNodeTransport[]>;
|
|
9
|
+
createSpace(spaceName: string, spaceIcon: string): Promise<SpaceTransport>;
|
|
10
|
+
refreshAndGetAllSpaces(): Promise<SpaceTransport[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PackageManagerVariableType, PackageWithVariableAssignments, VariablesAssignments } from "../interfaces/package-manager.interfaces";
|
|
2
|
+
import { Context } from "../../../core/command/cli-context";
|
|
3
|
+
export declare class StudioVariableService {
|
|
4
|
+
private packageApi;
|
|
5
|
+
private variablesApi;
|
|
6
|
+
constructor(context: Context);
|
|
7
|
+
getVariableAssignmentsForNodes(type?: PackageManagerVariableType): Promise<PackageWithVariableAssignments[]>;
|
|
8
|
+
assignVariableValues(packageKey: string, variablesAssignments: VariablesAssignments[]): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HttpClient } from "../http/http-client";
|
|
2
|
+
import { Profile } from "../profile/profile.interface";
|
|
3
|
+
/**
|
|
4
|
+
* The execution context object is passed to the modules to access
|
|
5
|
+
* foundational services such as APIs, profiles, logging etc. It is
|
|
6
|
+
* configured upon the start of the CLI.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Context {
|
|
9
|
+
httpClient: HttpClient;
|
|
10
|
+
profile: Profile;
|
|
11
|
+
private log;
|
|
12
|
+
private profileName;
|
|
13
|
+
private profileService;
|
|
14
|
+
constructor(options: any);
|
|
15
|
+
init(): Promise<void>;
|
|
16
|
+
private loadProfile;
|
|
17
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Command, CommandOptions, OptionValues } from "commander";
|
|
2
|
+
import { Context } from "./cli-context";
|
|
3
|
+
export declare abstract class IModule {
|
|
4
|
+
abstract register(context: Context, commandConfig: Configurator): void;
|
|
5
|
+
}
|
|
6
|
+
export type IModuleConstructor = new () => IModule;
|
|
7
|
+
export declare class ModuleHandler {
|
|
8
|
+
program: Command;
|
|
9
|
+
context: Context;
|
|
10
|
+
configurator: Configurator;
|
|
11
|
+
constructor(program: Command, context: Context);
|
|
12
|
+
registeredModules: IModule[];
|
|
13
|
+
/**
|
|
14
|
+
* Discovers modules in the specified directory, imports them,
|
|
15
|
+
* instantiates the default exported class, and calls its register method.
|
|
16
|
+
*
|
|
17
|
+
* @param {any} rootPath - __dirname when invoked from the main entry file
|
|
18
|
+
* @param devMode - Use uncompiled modules for development debug mode
|
|
19
|
+
*/
|
|
20
|
+
discoverAndRegisterModules(rootPath: string, devMode?: boolean): void;
|
|
21
|
+
}
|
|
22
|
+
type CommandHandler = (context: Context, command: Command, options: OptionValues) => Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Allows the creation of root level commands.
|
|
25
|
+
*/
|
|
26
|
+
export declare class Configurator {
|
|
27
|
+
private program;
|
|
28
|
+
private ctx;
|
|
29
|
+
rootCommandMap: Map<string, CommandConfig>;
|
|
30
|
+
constructor(program: Command, ctx: Context);
|
|
31
|
+
/**
|
|
32
|
+
* Get or create a root level command.
|
|
33
|
+
* @param name
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
36
|
+
command(name: string): CommandConfig;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Delegate wrapper around the Command object, to simply change the way the program is
|
|
40
|
+
* executed.
|
|
41
|
+
*/
|
|
42
|
+
export declare class CommandConfig {
|
|
43
|
+
private cmd;
|
|
44
|
+
private ctx;
|
|
45
|
+
private deprecationMessage;
|
|
46
|
+
constructor(cmd: Command, ctx: Context);
|
|
47
|
+
command(nameAndArgs: string, opts?: CommandOptions): CommandConfig;
|
|
48
|
+
alias(alias: string): CommandConfig;
|
|
49
|
+
description(description: string): CommandConfig;
|
|
50
|
+
argument(name: string, description?: string, defaultValue?: unknown): CommandConfig;
|
|
51
|
+
option(flags: string, description?: string, defaultValue?: string | boolean | string[]): CommandConfig;
|
|
52
|
+
requiredOption(flags: string, description?: string, defaultValue?: string | boolean | string[]): CommandConfig;
|
|
53
|
+
deprecationNotice(deprecationMessage: string): CommandConfig;
|
|
54
|
+
action(handler: CommandHandler): void;
|
|
55
|
+
private printDeprecationNoticeIfDeprecated;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base API implementation, which provides basic error handling for common problems.
|
|
3
|
+
*/
|
|
4
|
+
import { HttpClient } from "./http-client";
|
|
5
|
+
export declare class ForbiddenError extends Error {
|
|
6
|
+
constructor(message?: string);
|
|
7
|
+
}
|
|
8
|
+
export declare class ServerError extends Error {
|
|
9
|
+
constructor(message?: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class NotFoundError extends Error {
|
|
12
|
+
constructor(message?: string);
|
|
13
|
+
}
|
|
14
|
+
export declare class NetworkError extends Error {
|
|
15
|
+
constructor(message?: string);
|
|
16
|
+
}
|
|
17
|
+
export declare abstract class BaseApi {
|
|
18
|
+
protected readonly httpClient: HttpClient;
|
|
19
|
+
/**
|
|
20
|
+
* Constructor for BaseApiService.
|
|
21
|
+
* @param httpClient - An instance of HttpClient to be used for requests.
|
|
22
|
+
*/
|
|
23
|
+
constructor(httpClient: HttpClient);
|
|
24
|
+
/**
|
|
25
|
+
* Handles errors from HttpClient requests.
|
|
26
|
+
* Logs the error and throws specific custom errors based on HTTP status codes.
|
|
27
|
+
* Subclasses can override this for more specific error handling.
|
|
28
|
+
* @param error - The error object caught from the HttpClient promise.
|
|
29
|
+
* @returns Never, as this method always throws an error.
|
|
30
|
+
*/
|
|
31
|
+
protected handleError(error: any): never;
|
|
32
|
+
}
|