@commercetools-frontend/deployment-cli 0.0.0-FEC-212-react19-20250122084835
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/LICENSE +21 -0
- package/README.md +60 -0
- package/bin/cli.js +9 -0
- package/cli/dist/commercetools-frontend-deployment-cli-cli.cjs.d.ts +2 -0
- package/cli/dist/commercetools-frontend-deployment-cli-cli.cjs.dev.js +601 -0
- package/cli/dist/commercetools-frontend-deployment-cli-cli.cjs.js +7 -0
- package/cli/dist/commercetools-frontend-deployment-cli-cli.cjs.prod.js +601 -0
- package/cli/dist/commercetools-frontend-deployment-cli-cli.esm.js +581 -0
- package/cli/package.json +4 -0
- package/dist/commercetools-frontend-deployment-cli.cjs.d.ts +2 -0
- package/dist/commercetools-frontend-deployment-cli.cjs.dev.js +2 -0
- package/dist/commercetools-frontend-deployment-cli.cjs.js +7 -0
- package/dist/commercetools-frontend-deployment-cli.cjs.prod.js +2 -0
- package/dist/commercetools-frontend-deployment-cli.esm.js +1 -0
- package/dist/declarations/src/apis.d.ts +76 -0
- package/dist/declarations/src/cli.d.ts +2 -0
- package/dist/declarations/src/helpers.d.ts +66 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { TDeploymentPipeline, TCircleCiClient } from "./apis.js";
|
|
2
|
+
import prompts from 'prompts';
|
|
3
|
+
export type TDeploymentCLIConfig = {
|
|
4
|
+
CircleCI: {
|
|
5
|
+
projectName?: string;
|
|
6
|
+
apiBaseUrl: string;
|
|
7
|
+
deploymentWorkflowName: string;
|
|
8
|
+
deploymentJobPrefix: string;
|
|
9
|
+
pagination?: {
|
|
10
|
+
maxPages?: number;
|
|
11
|
+
pagesForPipelineSelection?: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
MerchantCenter: {
|
|
15
|
+
mcUrl?: string;
|
|
16
|
+
};
|
|
17
|
+
deployments?: {
|
|
18
|
+
[key: string]: {
|
|
19
|
+
jobs: {
|
|
20
|
+
approval: string;
|
|
21
|
+
deployment: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare function loadConfig(): Promise<TDeploymentCLIConfig>;
|
|
27
|
+
declare function throwIfConfigurationLacksRequiredValues(parsedConfiguration: TDeploymentCLIConfig): void;
|
|
28
|
+
declare function throwIfRequiredEnvironmentVariableIsUnset(requiredEnvironmentVariables: string[]): void;
|
|
29
|
+
type TPaginateToDeploymentPipelineArgs = {
|
|
30
|
+
circleCiApis: TCircleCiClient;
|
|
31
|
+
branch?: string;
|
|
32
|
+
buildRevision?: string;
|
|
33
|
+
debug?: boolean;
|
|
34
|
+
maxPages: number;
|
|
35
|
+
};
|
|
36
|
+
declare function paginateToDeploymentPipeline({ circleCiApis, buildRevision, branch, debug, maxPages, }: TPaginateToDeploymentPipelineArgs): Promise<TDeploymentPipeline | undefined>;
|
|
37
|
+
type TWaitForDeploymentPipelinePromptArgs = {
|
|
38
|
+
circleCiApis: TCircleCiClient;
|
|
39
|
+
branch?: string;
|
|
40
|
+
pagesForPipelineSelection: number;
|
|
41
|
+
debug?: boolean;
|
|
42
|
+
};
|
|
43
|
+
declare function waitForDeploymentPipelinePrompt({ circleCiApis, branch, pagesForPipelineSelection, debug, }: TWaitForDeploymentPipelinePromptArgs): Promise<TDeploymentPipeline>;
|
|
44
|
+
type TWaitForConfirmationPromptArgs = {
|
|
45
|
+
approvalJob: string;
|
|
46
|
+
revision: string;
|
|
47
|
+
};
|
|
48
|
+
declare function waitForConfirmationPrompt({ approvalJob, revision, }: TWaitForConfirmationPromptArgs): Promise<prompts.Answers<string>>;
|
|
49
|
+
type TGetJobUrlArgs = {
|
|
50
|
+
pipelineNumber?: string;
|
|
51
|
+
workflowId?: string;
|
|
52
|
+
jobNumber?: number | string;
|
|
53
|
+
projectName?: string;
|
|
54
|
+
};
|
|
55
|
+
declare function getJobUrl({ pipelineNumber, workflowId, jobNumber, projectName, }: TGetJobUrlArgs): string;
|
|
56
|
+
type TWaitForDeploymentJobNumberArgs = {
|
|
57
|
+
workflowId: string;
|
|
58
|
+
deploymentJob: string;
|
|
59
|
+
circleCiApis: TCircleCiClient;
|
|
60
|
+
};
|
|
61
|
+
declare function waitForDeploymentJobNumber({ workflowId, deploymentJob, circleCiApis }: TWaitForDeploymentJobNumberArgs, { debug }: {
|
|
62
|
+
debug?: boolean;
|
|
63
|
+
dryRun?: boolean;
|
|
64
|
+
yes?: boolean;
|
|
65
|
+
}): Promise<number>;
|
|
66
|
+
export { loadConfig, throwIfRequiredEnvironmentVariableIsUnset, throwIfConfigurationLacksRequiredValues, waitForDeploymentJobNumber, waitForDeploymentPipelinePrompt, waitForConfirmationPrompt, paginateToDeploymentPipeline, getJobUrl, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { TDeploymentCLIConfig } from "./helpers.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@commercetools-frontend/deployment-cli",
|
|
3
|
+
"version": "0.0.0-FEC-212-react19-20250122084835",
|
|
4
|
+
"description": "CLI to manage Custom Applications deployments in Google Storage.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"commercetools",
|
|
7
|
+
"cli",
|
|
8
|
+
"deployment"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "dist/commercetools-frontend-deployment-cli.cjs.js",
|
|
12
|
+
"module": "dist/commercetools-frontend-deployment-cli.esm.js",
|
|
13
|
+
"bin": "bin/cli.js",
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"cli",
|
|
17
|
+
"dist",
|
|
18
|
+
"package.json",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@babel/core": "^7.22.11",
|
|
24
|
+
"@babel/runtime-corejs3": "^7.21.0",
|
|
25
|
+
"cac": "^6.7.14",
|
|
26
|
+
"cosmiconfig": "9.0.0",
|
|
27
|
+
"lodash": "4.17.21",
|
|
28
|
+
"p-retry": "4.6.2",
|
|
29
|
+
"prompts": "2.4.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@tsconfig/node20": "20.1.4",
|
|
33
|
+
"@types/lodash": "^4.14.198",
|
|
34
|
+
"@types/node": "20.17.13",
|
|
35
|
+
"@types/prompts": "2.4.9",
|
|
36
|
+
"msw": "1.3.5",
|
|
37
|
+
"typescript": "5.2.2"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=21",
|
|
41
|
+
"npm": ">=6"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"preconstruct": {
|
|
47
|
+
"entrypoints": [
|
|
48
|
+
"./cli.ts",
|
|
49
|
+
"./index.ts"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"typecheck": "tsc --noEmit"
|
|
54
|
+
}
|
|
55
|
+
}
|