carlin 5.0.1 → 6.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/dist/index.mjs +17 -6
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -931,14 +931,25 @@ const cloudformation = () => {
|
|
|
931
931
|
return cloudFormationClients[key];
|
|
932
932
|
};
|
|
933
933
|
/**
|
|
934
|
-
*
|
|
935
|
-
* timeout of the AWS SDK v2 waiters carlin used before.
|
|
934
|
+
* One hour matches the timeout of the AWS SDK v2 waiters carlin used before.
|
|
936
935
|
*/
|
|
937
936
|
const STACK_WAITER_MAX_WAIT_TIME_IN_SECONDS = 3600;
|
|
937
|
+
/**
|
|
938
|
+
* The SDK's CloudFormation waiters default to `minDelay: 30` and
|
|
939
|
+
* `maxDelay: 120`: they check at 0s and 30s, then sleep a random 30–60s, a
|
|
940
|
+
* random 30–120s, and 120s from there on. A stack that finished right after a
|
|
941
|
+
* check sat unnoticed for up to two minutes, and a deploy that waits on another
|
|
942
|
+
* stack (`^deploy`) paid that once per stack. DescribeStacks every 5–15s stays
|
|
943
|
+
* far below CloudFormation's API limits.
|
|
944
|
+
*/
|
|
945
|
+
const STACK_WAITER_MIN_DELAY_IN_SECONDS = 5;
|
|
946
|
+
const STACK_WAITER_MAX_DELAY_IN_SECONDS = 15;
|
|
938
947
|
const getStackWaiterParams = () => {
|
|
939
948
|
return {
|
|
940
949
|
client: cloudformation(),
|
|
941
|
-
maxWaitTime: STACK_WAITER_MAX_WAIT_TIME_IN_SECONDS
|
|
950
|
+
maxWaitTime: STACK_WAITER_MAX_WAIT_TIME_IN_SECONDS,
|
|
951
|
+
minDelay: STACK_WAITER_MIN_DELAY_IN_SECONDS,
|
|
952
|
+
maxDelay: STACK_WAITER_MAX_DELAY_IN_SECONDS
|
|
942
953
|
};
|
|
943
954
|
};
|
|
944
955
|
const describeStacks = async ({ stackName } = {}) => {
|
|
@@ -1764,7 +1775,7 @@ const baseStackTemplate = deepmerge.all([
|
|
|
1764
1775
|
* website, for example.
|
|
1765
1776
|
*
|
|
1766
1777
|
* - **Lambda Layer builder**. This resource is a CodeBuild project that is
|
|
1767
|
-
* used to create Lambda Layers when [--lambda-
|
|
1778
|
+
* used to create Lambda Layers when [--lambda-external](/docs/carlin/commands/deploy#options)
|
|
1768
1779
|
* has values.
|
|
1769
1780
|
*
|
|
1770
1781
|
* - **Lambda Image builder**. This resource is a CodeBuild project that builds
|
|
@@ -2046,7 +2057,7 @@ const deployLambdaLayer = async ({ packages, deployIfExists = true, runtime }) =
|
|
|
2046
2057
|
const logPrefix$13 = "lambda";
|
|
2047
2058
|
const deployLambdaLayers = async ({ lambdaExternal = [] }) => {
|
|
2048
2059
|
if (lambdaExternal.length === 0) return;
|
|
2049
|
-
log.info(logPrefix$13, `--lambda-
|
|
2060
|
+
log.info(logPrefix$13, `--lambda-external [${lambdaExternal.join(", ")}] was found. Creating other layers...`);
|
|
2050
2061
|
const { dependencies = {} } = (() => {
|
|
2051
2062
|
try {
|
|
2052
2063
|
return JSON.parse(fs$1.readFileSync(path$1.resolve(process.cwd(), "package.json"), "utf8"));
|
|
@@ -5049,7 +5060,7 @@ const options$2 = {
|
|
|
5049
5060
|
const examples = [
|
|
5050
5061
|
["carlin deploy -t src/cloudformation.template1.yml", "Change the CloudFormation template path."],
|
|
5051
5062
|
["carlin deploy -e Production", "Set environment."],
|
|
5052
|
-
["carlin deploy --lambda-
|
|
5063
|
+
["carlin deploy --lambda-external momentjs", "Lambda exists. Don't bundle momentjs."],
|
|
5053
5064
|
["carlin deploy --lambda-runtime nodejs20.x", "Use Node.js 20.x runtime for Lambda functions."],
|
|
5054
5065
|
["carlin deploy --destroy --stack-name StackToBeDeleted", "Destroy a specific stack."]
|
|
5055
5066
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carlin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://ttoss.dev/docs/carlin/",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"ts-node": "^10.9.2",
|
|
62
62
|
"uglify-js": "^3.19.3",
|
|
63
63
|
"yargs": "^18.2.0",
|
|
64
|
-
"@ttoss/cloudformation": "^0.
|
|
65
|
-
"@ttoss/config": "^
|
|
66
|
-
"@ttoss/
|
|
64
|
+
"@ttoss/cloudformation": "^0.20.0",
|
|
65
|
+
"@ttoss/read-config-file": "^4.0.0",
|
|
66
|
+
"@ttoss/config": "^4.0.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/aws-lambda": "^8.10.164",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"jest": "^30.5.2",
|
|
80
80
|
"tsdown": "^0.23.1",
|
|
81
81
|
"typescript": "~6.0.3",
|
|
82
|
-
"@ttoss/test-utils": "^
|
|
82
|
+
"@ttoss/test-utils": "^7.0.0"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public",
|