@webiny/cli-aws 0.0.0-unstable.0156a4c312
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 +11 -0
- package/bin.d.ts +3 -0
- package/bin.js +16 -0
- package/bin.js.map +1 -0
- package/decorators/DeployCommandWithTelemetry.d.ts +11 -0
- package/decorators/DeployCommandWithTelemetry.js +81 -0
- package/decorators/DeployCommandWithTelemetry.js.map +1 -0
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +1 -0
- package/features/DeployCommand/DeployCommand.d.ts +12 -0
- package/features/DeployCommand/DeployCommand.js +176 -0
- package/features/DeployCommand/DeployCommand.js.map +1 -0
- package/features/DeployCommand/deployOutputs/BaseDeployOutput.d.ts +20 -0
- package/features/DeployCommand/deployOutputs/BaseDeployOutput.js +15 -0
- package/features/DeployCommand/deployOutputs/BaseDeployOutput.js.map +1 -0
- package/features/DeployCommand/deployOutputs/DeployOutput.d.ts +5 -0
- package/features/DeployCommand/deployOutputs/DeployOutput.js +23 -0
- package/features/DeployCommand/deployOutputs/DeployOutput.js.map +1 -0
- package/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.d.ts +4 -0
- package/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.js +96 -0
- package/features/DeployCommand/deployOutputs/NoDeploymentLogsDeployOutput.js.map +1 -0
- package/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.d.ts +4 -0
- package/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.js +31 -0
- package/features/DeployCommand/deployOutputs/WithDeploymentLogsDeployOutput.js.map +1 -0
- package/features/DeployCommand/index.d.ts +1 -0
- package/features/DeployCommand/index.js +1 -0
- package/features/DestroyCommand/DestroyCommand.d.ts +22 -0
- package/features/DestroyCommand/DestroyCommand.js +82 -0
- package/features/DestroyCommand/DestroyCommand.js.map +1 -0
- package/features/DestroyCommand/index.d.ts +1 -0
- package/features/DestroyCommand/index.js +1 -0
- package/features/OutputCommand.d.ts +12 -0
- package/features/OutputCommand.js +66 -0
- package/features/OutputCommand.js.map +1 -0
- package/features/PulumiCommand/PulumiCommand.d.ts +13 -0
- package/features/PulumiCommand/PulumiCommand.js +57 -0
- package/features/PulumiCommand/PulumiCommand.js.map +1 -0
- package/features/PulumiCommand/index.d.ts +1 -0
- package/features/PulumiCommand/index.js +1 -0
- package/features/RefreshCommand/RefreshCommand.d.ts +12 -0
- package/features/RefreshCommand/RefreshCommand.js +51 -0
- package/features/RefreshCommand/RefreshCommand.js.map +1 -0
- package/features/RefreshCommand/index.d.ts +1 -0
- package/features/RefreshCommand/index.js +1 -0
- package/features/WatchCommand/WatchCommand.d.ts +11 -0
- package/features/WatchCommand/WatchCommand.js +143 -0
- package/features/WatchCommand/WatchCommand.js.map +1 -0
- package/features/WatchCommand/createPrefixer.d.ts +2 -0
- package/features/WatchCommand/createPrefixer.js +16 -0
- package/features/WatchCommand/createPrefixer.js.map +1 -0
- package/features/WatchCommand/getRandomColorForString.d.ts +1 -0
- package/features/WatchCommand/getRandomColorForString.js +89 -0
- package/features/WatchCommand/getRandomColorForString.js.map +1 -0
- package/features/WatchCommand/index.d.ts +1 -0
- package/features/WatchCommand/index.js +1 -0
- package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.d.ts +6 -0
- package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js +27 -0
- package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js.map +1 -0
- package/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.d.ts +6 -0
- package/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.js +29 -0
- package/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.js.map +1 -0
- package/features/gracefulErrorHandlers/index.d.ts +2 -0
- package/features/gracefulErrorHandlers/index.js +2 -0
- package/features/index.d.ts +7 -0
- package/features/index.js +7 -0
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +41 -0
- package/registerAwsFeatures.d.ts +2 -0
- package/registerAwsFeatures.js +18 -0
- package/registerAwsFeatures.js.map +1 -0
- package/services/GetProjectSdkService.d.ts +9 -0
- package/services/GetProjectSdkService.js +33 -0
- package/services/GetProjectSdkService.js.map +1 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const colors = [
|
|
2
|
+
"#0000CC",
|
|
3
|
+
"#0000FF",
|
|
4
|
+
"#0033CC",
|
|
5
|
+
"#0033FF",
|
|
6
|
+
"#0066CC",
|
|
7
|
+
"#0066FF",
|
|
8
|
+
"#0099CC",
|
|
9
|
+
"#0099FF",
|
|
10
|
+
"#00CC00",
|
|
11
|
+
"#00CC33",
|
|
12
|
+
"#00CC66",
|
|
13
|
+
"#00CC99",
|
|
14
|
+
"#00CCCC",
|
|
15
|
+
"#00CCFF",
|
|
16
|
+
"#3300CC",
|
|
17
|
+
"#3300FF",
|
|
18
|
+
"#3333CC",
|
|
19
|
+
"#3333FF",
|
|
20
|
+
"#3366CC",
|
|
21
|
+
"#3366FF",
|
|
22
|
+
"#3399CC",
|
|
23
|
+
"#3399FF",
|
|
24
|
+
"#33CC00",
|
|
25
|
+
"#33CC33",
|
|
26
|
+
"#33CC66",
|
|
27
|
+
"#33CC99",
|
|
28
|
+
"#33CCCC",
|
|
29
|
+
"#33CCFF",
|
|
30
|
+
"#6600CC",
|
|
31
|
+
"#6600FF",
|
|
32
|
+
"#6633CC",
|
|
33
|
+
"#6633FF",
|
|
34
|
+
"#66CC00",
|
|
35
|
+
"#66CC33",
|
|
36
|
+
"#9900CC",
|
|
37
|
+
"#9900FF",
|
|
38
|
+
"#9933CC",
|
|
39
|
+
"#9933FF",
|
|
40
|
+
"#99CC00",
|
|
41
|
+
"#99CC33",
|
|
42
|
+
"#CC0000",
|
|
43
|
+
"#CC0033",
|
|
44
|
+
"#CC0066",
|
|
45
|
+
"#CC0099",
|
|
46
|
+
"#CC00CC",
|
|
47
|
+
"#CC00FF",
|
|
48
|
+
"#CC3300",
|
|
49
|
+
"#CC3333",
|
|
50
|
+
"#CC3366",
|
|
51
|
+
"#CC3399",
|
|
52
|
+
"#CC33CC",
|
|
53
|
+
"#CC33FF",
|
|
54
|
+
"#CC6600",
|
|
55
|
+
"#CC6633",
|
|
56
|
+
"#CC9900",
|
|
57
|
+
"#CC9933",
|
|
58
|
+
"#CCCC00",
|
|
59
|
+
"#CCCC33",
|
|
60
|
+
"#FF0000",
|
|
61
|
+
"#FF0033",
|
|
62
|
+
"#FF0066",
|
|
63
|
+
"#FF0099",
|
|
64
|
+
"#FF00CC",
|
|
65
|
+
"#FF00FF",
|
|
66
|
+
"#FF3300",
|
|
67
|
+
"#FF3333",
|
|
68
|
+
"#FF3366",
|
|
69
|
+
"#FF3399",
|
|
70
|
+
"#FF33CC",
|
|
71
|
+
"#FF33FF",
|
|
72
|
+
"#FF6600",
|
|
73
|
+
"#FF6633",
|
|
74
|
+
"#FF9900",
|
|
75
|
+
"#FF9933",
|
|
76
|
+
"#FFCC00",
|
|
77
|
+
"#FFCC33"
|
|
78
|
+
];
|
|
79
|
+
const getRandomColorForString = (value)=>{
|
|
80
|
+
let hash = 0;
|
|
81
|
+
for(let i = 0; i < value.length; i++){
|
|
82
|
+
hash = (hash << 5) - hash + value.charCodeAt(i);
|
|
83
|
+
hash |= 0;
|
|
84
|
+
}
|
|
85
|
+
return colors[Math.abs(hash) % colors.length];
|
|
86
|
+
};
|
|
87
|
+
export { getRandomColorForString };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=getRandomColorForString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/WatchCommand/getRandomColorForString.js","sources":["../../../src/features/WatchCommand/getRandomColorForString.ts"],"sourcesContent":["const colors = [\n \"#0000CC\",\n \"#0000FF\",\n \"#0033CC\",\n \"#0033FF\",\n \"#0066CC\",\n \"#0066FF\",\n \"#0099CC\",\n \"#0099FF\",\n \"#00CC00\",\n \"#00CC33\",\n \"#00CC66\",\n \"#00CC99\",\n \"#00CCCC\",\n \"#00CCFF\",\n \"#3300CC\",\n \"#3300FF\",\n \"#3333CC\",\n \"#3333FF\",\n \"#3366CC\",\n \"#3366FF\",\n \"#3399CC\",\n \"#3399FF\",\n \"#33CC00\",\n \"#33CC33\",\n \"#33CC66\",\n \"#33CC99\",\n \"#33CCCC\",\n \"#33CCFF\",\n \"#6600CC\",\n \"#6600FF\",\n \"#6633CC\",\n \"#6633FF\",\n \"#66CC00\",\n \"#66CC33\",\n \"#9900CC\",\n \"#9900FF\",\n \"#9933CC\",\n \"#9933FF\",\n \"#99CC00\",\n \"#99CC33\",\n \"#CC0000\",\n \"#CC0033\",\n \"#CC0066\",\n \"#CC0099\",\n \"#CC00CC\",\n \"#CC00FF\",\n \"#CC3300\",\n \"#CC3333\",\n \"#CC3366\",\n \"#CC3399\",\n \"#CC33CC\",\n \"#CC33FF\",\n \"#CC6600\",\n \"#CC6633\",\n \"#CC9900\",\n \"#CC9933\",\n \"#CCCC00\",\n \"#CCCC33\",\n \"#FF0000\",\n \"#FF0033\",\n \"#FF0066\",\n \"#FF0099\",\n \"#FF00CC\",\n \"#FF00FF\",\n \"#FF3300\",\n \"#FF3333\",\n \"#FF3366\",\n \"#FF3399\",\n \"#FF33CC\",\n \"#FF33FF\",\n \"#FF6600\",\n \"#FF6633\",\n \"#FF9900\",\n \"#FF9933\",\n \"#FFCC00\",\n \"#FFCC33\"\n];\n\nexport const getRandomColorForString = (value: string) => {\n let hash = 0;\n\n for (let i = 0; i < value.length; i++) {\n hash = (hash << 5) - hash + value.charCodeAt(i);\n hash |= 0;\n }\n\n return colors[Math.abs(hash) % colors.length];\n};\n"],"names":["colors","getRandomColorForString","value","hash","i","Math"],"mappings":"AAAA,MAAMA,SAAS;IACX;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACH;AAEM,MAAMC,0BAA0B,CAACC;IACpC,IAAIC,OAAO;IAEX,IAAK,IAAIC,IAAI,GAAGA,IAAIF,MAAM,MAAM,EAAEE,IAAK;QACnCD,OAAQA,AAAAA,CAAAA,QAAQ,KAAKA,OAAOD,MAAM,UAAU,CAACE;QAC7CD,QAAQ;IACZ;IAEA,OAAOH,MAAM,CAACK,KAAK,GAAG,CAACF,QAAQH,OAAO,MAAM,CAAC;AACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./WatchCommand.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./WatchCommand.js";
|
package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ErrorHandler } from "@webiny/cli-core/abstractions/index.js";
|
|
2
|
+
import { IBaseAppParams } from "@webiny/cli-core/abstractions/features/types.js";
|
|
3
|
+
export declare class DdbPutItemConditionalCheckFailedGracefulErrorHandler implements ErrorHandler.Interface<IBaseAppParams> {
|
|
4
|
+
execute({ error }: ErrorHandler.Params<IBaseAppParams>): void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ddbPutItemConditionalCheckFailedGracefulErrorHandler: import("@webiny/di").Implementation<typeof DdbPutItemConditionalCheckFailedGracefulErrorHandler>;
|
package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createImplementation } from "@webiny/di";
|
|
2
|
+
import { ErrorHandler } from "@webiny/cli-core/abstractions/index.js";
|
|
3
|
+
import { GracefulError } from "@webiny/project";
|
|
4
|
+
const MATCH_STRING = "ConditionalCheckFailedException: The conditional request failed";
|
|
5
|
+
const LEARN_MORE_URL = "https://webiny.link/deployment-ddb-conditional-check-failed";
|
|
6
|
+
class DdbPutItemConditionalCheckFailedGracefulErrorHandler {
|
|
7
|
+
execute({ error }) {
|
|
8
|
+
if (!error.message) return;
|
|
9
|
+
if (!error.message.includes(MATCH_STRING)) return;
|
|
10
|
+
const message = [
|
|
11
|
+
"Looks like the deployment failed because Pulumi tried to insert a",
|
|
12
|
+
"record into a DynamoDB table, but the record already exists. The",
|
|
13
|
+
"easiest way to resolve this is to delete the record from the",
|
|
14
|
+
"table and try again.",
|
|
15
|
+
`Learn more: ${LEARN_MORE_URL}`
|
|
16
|
+
].join(" ");
|
|
17
|
+
throw GracefulError.from(error, message);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const ddbPutItemConditionalCheckFailedGracefulErrorHandler = createImplementation({
|
|
21
|
+
abstraction: ErrorHandler,
|
|
22
|
+
implementation: DdbPutItemConditionalCheckFailedGracefulErrorHandler,
|
|
23
|
+
dependencies: []
|
|
24
|
+
});
|
|
25
|
+
export { DdbPutItemConditionalCheckFailedGracefulErrorHandler, ddbPutItemConditionalCheckFailedGracefulErrorHandler };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=DdbPutItemConditionalCheckFailedGracefulErrorHandler.js.map
|
package/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.js","sources":["../../../src/features/gracefulErrorHandlers/DdbPutItemConditionalCheckFailedGracefulErrorHandler.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { ErrorHandler } from \"@webiny/cli-core/abstractions/index.js\";\nimport { IBaseAppParams } from \"@webiny/cli-core/abstractions/features/types.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst MATCH_STRING = \"ConditionalCheckFailedException: The conditional request failed\";\nconst LEARN_MORE_URL = \"https://webiny.link/deployment-ddb-conditional-check-failed\";\n\nexport class DdbPutItemConditionalCheckFailedGracefulErrorHandler implements ErrorHandler.Interface<IBaseAppParams> {\n execute({ error }: ErrorHandler.Params<IBaseAppParams>) {\n if (!error.message) {\n return;\n }\n\n if (!error.message.includes(MATCH_STRING)) {\n return;\n }\n\n const message = [\n `Looks like the deployment failed because Pulumi tried to insert a`,\n `record into a DynamoDB table, but the record already exists. The`,\n `easiest way to resolve this is to delete the record from the`,\n `table and try again.`,\n `Learn more: ${LEARN_MORE_URL}`\n ].join(\" \");\n\n throw GracefulError.from(error, message);\n }\n}\n\nexport const ddbPutItemConditionalCheckFailedGracefulErrorHandler = createImplementation({\n abstraction: ErrorHandler,\n implementation: DdbPutItemConditionalCheckFailedGracefulErrorHandler,\n dependencies: []\n});\n"],"names":["MATCH_STRING","LEARN_MORE_URL","DdbPutItemConditionalCheckFailedGracefulErrorHandler","error","message","GracefulError","ddbPutItemConditionalCheckFailedGracefulErrorHandler","createImplementation","ErrorHandler"],"mappings":";;;AAKA,MAAMA,eAAe;AACrB,MAAMC,iBAAiB;AAEhB,MAAMC;IACT,QAAQ,EAAEC,KAAK,EAAuC,EAAE;QACpD,IAAI,CAACA,MAAM,OAAO,EACd;QAGJ,IAAI,CAACA,MAAM,OAAO,CAAC,QAAQ,CAACH,eACxB;QAGJ,MAAMI,UAAU;YACZ;YACA;YACA;YACA;YACA,CAAC,YAAY,EAAEH,gBAAgB;SAClC,CAAC,IAAI,CAAC;QAEP,MAAMI,cAAc,IAAI,CAACF,OAAOC;IACpC;AACJ;AAEO,MAAME,uDAAuDC,qBAAqB;IACrF,aAAaC;IACb,gBAAgBN;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ErrorHandler } from "@webiny/cli-core/abstractions/index.js";
|
|
2
|
+
import { IBaseAppParams } from "@webiny/cli-core/abstractions/features/types.js";
|
|
3
|
+
export declare class PendingOperationsGracefulErrorHandler implements ErrorHandler.Interface<IBaseAppParams> {
|
|
4
|
+
execute({ error, params }: ErrorHandler.Params<IBaseAppParams>): void;
|
|
5
|
+
}
|
|
6
|
+
export declare const pendingOperationsGracefulErrorHandler: import("@webiny/di").Implementation<typeof PendingOperationsGracefulErrorHandler>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createImplementation } from "@webiny/di";
|
|
2
|
+
import { ErrorHandler } from "@webiny/cli-core/abstractions/index.js";
|
|
3
|
+
import { GracefulError } from "@webiny/project";
|
|
4
|
+
const MATCH_STRING = "the stack is currently locked";
|
|
5
|
+
const LEARN_MORE_URL = "https://webiny.link/locked-stacks";
|
|
6
|
+
class PendingOperationsGracefulErrorHandler {
|
|
7
|
+
execute({ error, params }) {
|
|
8
|
+
if (!error.message) return;
|
|
9
|
+
if (!error.message.includes(MATCH_STRING)) return;
|
|
10
|
+
const appName = params.app ? params.app : "{APP_NAME}";
|
|
11
|
+
const message = [
|
|
12
|
+
"The Pulumi error you've just experienced can occur",
|
|
13
|
+
"if one of the previous deployments has been interrupted or another deployment",
|
|
14
|
+
"is already in progress. For development purposes, the quickest way to get",
|
|
15
|
+
"past this issue is to run the following command: %s.",
|
|
16
|
+
`Learn more: ${LEARN_MORE_URL}`
|
|
17
|
+
].join(" ");
|
|
18
|
+
const cmd = `yarn webiny pulumi ${appName} --env ${params.env} -- cancel`;
|
|
19
|
+
throw GracefulError.from(error, message, cmd);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const pendingOperationsGracefulErrorHandler = createImplementation({
|
|
23
|
+
abstraction: ErrorHandler,
|
|
24
|
+
implementation: PendingOperationsGracefulErrorHandler,
|
|
25
|
+
dependencies: []
|
|
26
|
+
});
|
|
27
|
+
export { PendingOperationsGracefulErrorHandler, pendingOperationsGracefulErrorHandler };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=PendingOperationsGracefulErrorHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.js","sources":["../../../src/features/gracefulErrorHandlers/PendingOperationsGracefulErrorHandler.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { ErrorHandler } from \"@webiny/cli-core/abstractions/index.js\";\nimport { IBaseAppParams } from \"@webiny/cli-core/abstractions/features/types.js\";\nimport { GracefulError } from \"@webiny/project\";\n\nconst MATCH_STRING = \"the stack is currently locked\";\nconst LEARN_MORE_URL = \"https://webiny.link/locked-stacks\";\n\nexport class PendingOperationsGracefulErrorHandler implements ErrorHandler.Interface<IBaseAppParams> {\n execute({ error, params }: ErrorHandler.Params<IBaseAppParams>) {\n if (!error.message) {\n return;\n }\n\n if (!error.message.includes(MATCH_STRING)) {\n return;\n }\n\n const appName = params.app ? params.app : \"{APP_NAME}\";\n\n const message = [\n `The Pulumi error you've just experienced can occur`,\n `if one of the previous deployments has been interrupted or another deployment`,\n `is already in progress. For development purposes, the quickest way to get`,\n `past this issue is to run the following command: %s.`,\n `Learn more: ${LEARN_MORE_URL}`\n ].join(\" \");\n\n const cmd = `yarn webiny pulumi ${appName} --env ${params.env} -- cancel`;\n throw GracefulError.from(error, message, cmd);\n }\n}\n\nexport const pendingOperationsGracefulErrorHandler = createImplementation({\n abstraction: ErrorHandler,\n implementation: PendingOperationsGracefulErrorHandler,\n dependencies: []\n});\n"],"names":["MATCH_STRING","LEARN_MORE_URL","PendingOperationsGracefulErrorHandler","error","params","appName","message","cmd","GracefulError","pendingOperationsGracefulErrorHandler","createImplementation","ErrorHandler"],"mappings":";;;AAKA,MAAMA,eAAe;AACrB,MAAMC,iBAAiB;AAEhB,MAAMC;IACT,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAuC,EAAE;QAC5D,IAAI,CAACD,MAAM,OAAO,EACd;QAGJ,IAAI,CAACA,MAAM,OAAO,CAAC,QAAQ,CAACH,eACxB;QAGJ,MAAMK,UAAUD,OAAO,GAAG,GAAGA,OAAO,GAAG,GAAG;QAE1C,MAAME,UAAU;YACZ;YACA;YACA;YACA;YACA,CAAC,YAAY,EAAEL,gBAAgB;SAClC,CAAC,IAAI,CAAC;QAEP,MAAMM,MAAM,CAAC,mBAAmB,EAAEF,QAAQ,OAAO,EAAED,OAAO,GAAG,CAAC,UAAU,CAAC;QACzE,MAAMI,cAAc,IAAI,CAACL,OAAOG,SAASC;IAC7C;AACJ;AAEO,MAAME,wCAAwCC,qBAAqB;IACtE,aAAaC;IACb,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./DeployCommand/index.js";
|
|
2
|
+
export * from "./DestroyCommand/index.js";
|
|
3
|
+
export * from "./OutputCommand.js";
|
|
4
|
+
export * from "./PulumiCommand/index.js";
|
|
5
|
+
export * from "./RefreshCommand/index.js";
|
|
6
|
+
export * from "./WatchCommand/index.js";
|
|
7
|
+
export * from "./gracefulErrorHandlers/index.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./DeployCommand/index.js";
|
|
2
|
+
export * from "./DestroyCommand/index.js";
|
|
3
|
+
export * from "./OutputCommand.js";
|
|
4
|
+
export * from "./PulumiCommand/index.js";
|
|
5
|
+
export * from "./RefreshCommand/index.js";
|
|
6
|
+
export * from "./WatchCommand/index.js";
|
|
7
|
+
export * from "./gracefulErrorHandlers/index.js";
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/cli-aws",
|
|
3
|
+
"version": "0.0.0-unstable.0156a4c312",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js",
|
|
7
|
+
"./*": "./*"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
12
|
+
},
|
|
13
|
+
"description": "AWS-specific CLI commands for Webiny projects.",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@webiny/cli-core": "0.0.0-unstable.0156a4c312",
|
|
17
|
+
"@webiny/di": "2.0.0",
|
|
18
|
+
"@webiny/project": "0.0.0-unstable.0156a4c312",
|
|
19
|
+
"@webiny/project-aws": "0.0.0-unstable.0156a4c312",
|
|
20
|
+
"@webiny/pulumi-sdk": "0.0.0-unstable.0156a4c312",
|
|
21
|
+
"@webiny/system-requirements": "0.0.0-unstable.0156a4c312",
|
|
22
|
+
"@webiny/telemetry": "0.0.0-unstable.0156a4c312",
|
|
23
|
+
"chalk": "6.0.1",
|
|
24
|
+
"open": "11.0.4",
|
|
25
|
+
"ora": "10.0.0",
|
|
26
|
+
"tsx": "4.23.15"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@webiny/build-tools": "0.0.0-unstable.0156a4c312",
|
|
30
|
+
"typescript": "7.0.2"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"webiny": {
|
|
36
|
+
"publishFrom": "dist"
|
|
37
|
+
},
|
|
38
|
+
"bin": {
|
|
39
|
+
"webiny": "./bin.js"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ddbPutItemConditionalCheckFailedGracefulErrorHandler, deployCommand, destroyCommand, outputCommand, pendingOperationsGracefulErrorHandler, pulumiCommand, refreshCommand, watchCommand } from "./features/index.js";
|
|
2
|
+
import { deployCommandWithTelemetry } from "./decorators/index.js";
|
|
3
|
+
import { awsGetProjectSdkService } from "./services/GetProjectSdkService.js";
|
|
4
|
+
const registerAwsFeatures = (container)=>{
|
|
5
|
+
container.register(awsGetProjectSdkService).inSingletonScope();
|
|
6
|
+
container.register(watchCommand).inSingletonScope();
|
|
7
|
+
container.register(deployCommand).inSingletonScope();
|
|
8
|
+
container.register(destroyCommand).inSingletonScope();
|
|
9
|
+
container.register(pulumiCommand).inSingletonScope();
|
|
10
|
+
container.register(outputCommand).inSingletonScope();
|
|
11
|
+
container.register(refreshCommand).inSingletonScope();
|
|
12
|
+
container.register(ddbPutItemConditionalCheckFailedGracefulErrorHandler).inSingletonScope();
|
|
13
|
+
container.register(pendingOperationsGracefulErrorHandler).inSingletonScope();
|
|
14
|
+
container.registerDecorator(deployCommandWithTelemetry);
|
|
15
|
+
};
|
|
16
|
+
export { registerAwsFeatures };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=registerAwsFeatures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerAwsFeatures.js","sources":["../src/registerAwsFeatures.ts"],"sourcesContent":["import { Container } from \"@webiny/di\";\nimport {\n deployCommand,\n destroyCommand,\n ddbPutItemConditionalCheckFailedGracefulErrorHandler,\n outputCommand,\n pendingOperationsGracefulErrorHandler,\n pulumiCommand,\n refreshCommand,\n watchCommand\n} from \"./features/index.js\";\nimport { deployCommandWithTelemetry } from \"./decorators/index.js\";\nimport { awsGetProjectSdkService } from \"./services/GetProjectSdkService.js\";\n\nexport const registerAwsFeatures = (container: Container): void => {\n // Override the default GetProjectSdkService so the AWS project features\n // (e.g. AwsWatch decorator) are registered into the ProjectSdk container.\n container.register(awsGetProjectSdkService).inSingletonScope();\n\n container.register(watchCommand).inSingletonScope();\n container.register(deployCommand).inSingletonScope();\n container.register(destroyCommand).inSingletonScope();\n container.register(pulumiCommand).inSingletonScope();\n container.register(outputCommand).inSingletonScope();\n container.register(refreshCommand).inSingletonScope();\n\n container.register(ddbPutItemConditionalCheckFailedGracefulErrorHandler).inSingletonScope();\n container.register(pendingOperationsGracefulErrorHandler).inSingletonScope();\n\n container.registerDecorator(deployCommandWithTelemetry);\n};\n"],"names":["registerAwsFeatures","container","awsGetProjectSdkService","watchCommand","deployCommand","destroyCommand","pulumiCommand","outputCommand","refreshCommand","ddbPutItemConditionalCheckFailedGracefulErrorHandler","pendingOperationsGracefulErrorHandler","deployCommandWithTelemetry"],"mappings":";;;AAcO,MAAMA,sBAAsB,CAACC;IAGhCA,UAAU,QAAQ,CAACC,yBAAyB,gBAAgB;IAE5DD,UAAU,QAAQ,CAACE,cAAc,gBAAgB;IACjDF,UAAU,QAAQ,CAACG,eAAe,gBAAgB;IAClDH,UAAU,QAAQ,CAACI,gBAAgB,gBAAgB;IACnDJ,UAAU,QAAQ,CAACK,eAAe,gBAAgB;IAClDL,UAAU,QAAQ,CAACM,eAAe,gBAAgB;IAClDN,UAAU,QAAQ,CAACO,gBAAgB,gBAAgB;IAEnDP,UAAU,QAAQ,CAACQ,sDAAsD,gBAAgB;IACzFR,UAAU,QAAQ,CAACS,uCAAuC,gBAAgB;IAE1ET,UAAU,iBAAiB,CAACU;AAChC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProjectSdk } from "@webiny/project";
|
|
2
|
+
import { CliParamsService, GetArgvService, GetProjectSdkService } from "@webiny/cli-core/abstractions/index.js";
|
|
3
|
+
export declare class AwsGetProjectSdkService implements GetProjectSdkService.Interface {
|
|
4
|
+
private readonly cliParamsService;
|
|
5
|
+
private readonly getArgvService;
|
|
6
|
+
constructor(cliParamsService: CliParamsService.Interface, getArgvService: GetArgvService.Interface);
|
|
7
|
+
execute(): Promise<ProjectSdk>;
|
|
8
|
+
}
|
|
9
|
+
export declare const awsGetProjectSdkService: import("@webiny/di").Implementation<typeof AwsGetProjectSdkService>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createImplementation } from "@webiny/di";
|
|
2
|
+
import { ProjectSdk } from "@webiny/project";
|
|
3
|
+
import { CliParamsService, GetArgvService, GetProjectSdkService } from "@webiny/cli-core/abstractions/index.js";
|
|
4
|
+
import { registerAwsProjectFeatures } from "@webiny/project-aws";
|
|
5
|
+
class AwsGetProjectSdkService {
|
|
6
|
+
constructor(cliParamsService, getArgvService){
|
|
7
|
+
this.cliParamsService = cliParamsService;
|
|
8
|
+
this.getArgvService = getArgvService;
|
|
9
|
+
}
|
|
10
|
+
async execute() {
|
|
11
|
+
const cliParams = this.cliParamsService.get();
|
|
12
|
+
const argv = this.getArgvService.execute();
|
|
13
|
+
return ProjectSdk.init({
|
|
14
|
+
...argv,
|
|
15
|
+
cwd: cliParams.cwd,
|
|
16
|
+
logging: {
|
|
17
|
+
streamToStdout: argv.showLogs,
|
|
18
|
+
level: argv.logLevel
|
|
19
|
+
}
|
|
20
|
+
}, registerAwsProjectFeatures);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const awsGetProjectSdkService = createImplementation({
|
|
24
|
+
abstraction: GetProjectSdkService,
|
|
25
|
+
implementation: AwsGetProjectSdkService,
|
|
26
|
+
dependencies: [
|
|
27
|
+
CliParamsService,
|
|
28
|
+
GetArgvService
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
export { AwsGetProjectSdkService, awsGetProjectSdkService };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=GetProjectSdkService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services/GetProjectSdkService.js","sources":["../../src/services/GetProjectSdkService.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { ProjectSdk } from \"@webiny/project\";\nimport {\n CliParamsService,\n GetArgvService,\n GetProjectSdkService\n} from \"@webiny/cli-core/abstractions/index.js\";\nimport { registerAwsProjectFeatures } from \"@webiny/project-aws\";\n\nexport class AwsGetProjectSdkService implements GetProjectSdkService.Interface {\n constructor(\n private readonly cliParamsService: CliParamsService.Interface,\n private readonly getArgvService: GetArgvService.Interface\n ) {}\n\n async execute() {\n const cliParams = this.cliParamsService.get();\n const argv = this.getArgvService.execute();\n\n return ProjectSdk.init(\n {\n ...argv,\n cwd: cliParams.cwd,\n logging: {\n streamToStdout: argv.showLogs,\n level: argv.logLevel\n }\n },\n registerAwsProjectFeatures\n );\n }\n}\n\nexport const awsGetProjectSdkService = createImplementation({\n abstraction: GetProjectSdkService,\n implementation: AwsGetProjectSdkService,\n dependencies: [CliParamsService, GetArgvService]\n});\n"],"names":["AwsGetProjectSdkService","cliParamsService","getArgvService","cliParams","argv","ProjectSdk","registerAwsProjectFeatures","awsGetProjectSdkService","createImplementation","GetProjectSdkService","CliParamsService","GetArgvService"],"mappings":";;;;AASO,MAAMA;IACT,YACqBC,gBAA4C,EAC5CC,cAAwC,CAC3D;aAFmBD,gBAAgB,GAAhBA;aACAC,cAAc,GAAdA;IAClB;IAEH,MAAM,UAAU;QACZ,MAAMC,YAAY,IAAI,CAAC,gBAAgB,CAAC,GAAG;QAC3C,MAAMC,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO;QAExC,OAAOC,WAAW,IAAI,CAClB;YACI,GAAGD,IAAI;YACP,KAAKD,UAAU,GAAG;YAClB,SAAS;gBACL,gBAAgBC,KAAK,QAAQ;gBAC7B,OAAOA,KAAK,QAAQ;YACxB;QACJ,GACAE;IAER;AACJ;AAEO,MAAMC,0BAA0BC,qBAAqB;IACxD,aAAaC;IACb,gBAAgBT;IAChB,cAAc;QAACU;QAAkBC;KAAe;AACpD"}
|