sst 2.1.11 → 2.1.13
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/cli/commands/update.js +3 -2
- package/constructs/Function.d.ts +2 -2
- package/package.json +1 -1
- package/sst.mjs +10 -4
- package/stacks/monitor.js +6 -2
- package/support/bridge/bridge.mjs +1 -1
- package/support/script-function/index.mjs +13 -8
package/cli/commands/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const PACKAGE_MATCH = ["sst", "aws-cdk", "@aws-cdk", "constructs"];
|
|
1
|
+
const PACKAGE_MATCH = ["sst", "astro-sst", "aws-cdk", "@aws-cdk", "constructs"];
|
|
2
2
|
const FIELDS = ["dependencies", "devDependencies"];
|
|
3
3
|
export const update = (program) => program.command("update [version]", "Update your SST and CDK packages", (yargs) => yargs.positional("version", {
|
|
4
4
|
type: "string",
|
|
@@ -45,7 +45,8 @@ export const update = (program) => program.command("update [version]", "Update y
|
|
|
45
45
|
if (!PACKAGE_MATCH.some((x) => pkg.startsWith(x)))
|
|
46
46
|
continue;
|
|
47
47
|
const desired = (() => {
|
|
48
|
-
|
|
48
|
+
// Both sst and astro-sst should be sharing the same version
|
|
49
|
+
if (["sst", "astro-sst"].includes(pkg))
|
|
49
50
|
return metadata.version;
|
|
50
51
|
if (pkg === "constructs")
|
|
51
52
|
return metadata.dependencies.constructs;
|
package/constructs/Function.d.ts
CHANGED
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -3180,8 +3180,10 @@ async function monitor(stack) {
|
|
|
3180
3180
|
"Resource creation cancelled"
|
|
3181
3181
|
) || event.ResourceStatusReason.includes(
|
|
3182
3182
|
"Resource update cancelled"
|
|
3183
|
-
) || event.ResourceStatusReason
|
|
3183
|
+
) || event.ResourceStatusReason.includes(
|
|
3184
3184
|
"Resource creation Initiated"
|
|
3185
|
+
) || event.ResourceStatusReason.startsWith(
|
|
3186
|
+
"The following resource(s) failed to"
|
|
3185
3187
|
))
|
|
3186
3188
|
continue;
|
|
3187
3189
|
errors[event.LogicalResourceId] = event.ResourceStatusReason;
|
|
@@ -3200,7 +3202,11 @@ async function monitor(stack) {
|
|
|
3200
3202
|
"Resource creation cancelled"
|
|
3201
3203
|
) || resource.ResourceStatusReason?.includes(
|
|
3202
3204
|
"Resource update cancelled"
|
|
3203
|
-
) || resource.ResourceStatusReason?.includes(
|
|
3205
|
+
) || resource.ResourceStatusReason?.includes(
|
|
3206
|
+
"Resource creation Initiated"
|
|
3207
|
+
) || resource.ResourceStatusReason?.startsWith(
|
|
3208
|
+
"The following resource(s) failed to"
|
|
3209
|
+
))
|
|
3204
3210
|
continue;
|
|
3205
3211
|
if (resource.ResourceStatusReason)
|
|
3206
3212
|
errors[resource.LogicalResourceId] = resource.ResourceStatusReason;
|
|
@@ -7434,7 +7440,7 @@ function secrets(program2) {
|
|
|
7434
7440
|
}
|
|
7435
7441
|
|
|
7436
7442
|
// src/cli/commands/update.ts
|
|
7437
|
-
var PACKAGE_MATCH = ["sst", "aws-cdk", "@aws-cdk", "constructs"];
|
|
7443
|
+
var PACKAGE_MATCH = ["sst", "astro-sst", "aws-cdk", "@aws-cdk", "constructs"];
|
|
7438
7444
|
var FIELDS = ["dependencies", "devDependencies"];
|
|
7439
7445
|
var update = (program2) => program2.command(
|
|
7440
7446
|
"update [version]",
|
|
@@ -7483,7 +7489,7 @@ var update = (program2) => program2.command(
|
|
|
7483
7489
|
if (!PACKAGE_MATCH.some((x) => pkg.startsWith(x)))
|
|
7484
7490
|
continue;
|
|
7485
7491
|
const desired = (() => {
|
|
7486
|
-
if (
|
|
7492
|
+
if (["sst", "astro-sst"].includes(pkg))
|
|
7487
7493
|
return metadata3.version;
|
|
7488
7494
|
if (pkg === "constructs")
|
|
7489
7495
|
return metadata3.dependencies.constructs;
|
package/stacks/monitor.js
CHANGED
|
@@ -81,7 +81,9 @@ export async function monitor(stack) {
|
|
|
81
81
|
if (event.ResourceStatusReason) {
|
|
82
82
|
if (event.ResourceStatusReason.includes("Resource creation cancelled") ||
|
|
83
83
|
event.ResourceStatusReason.includes("Resource update cancelled") ||
|
|
84
|
-
event.ResourceStatusReason
|
|
84
|
+
event.ResourceStatusReason.includes("Resource creation Initiated") ||
|
|
85
|
+
// ie. The following resource(s) failed to update: [MyResource10A5921D].
|
|
86
|
+
event.ResourceStatusReason.startsWith("The following resource(s) failed to"))
|
|
85
87
|
continue;
|
|
86
88
|
errors[event.LogicalResourceId] = event.ResourceStatusReason;
|
|
87
89
|
}
|
|
@@ -97,7 +99,9 @@ export async function monitor(stack) {
|
|
|
97
99
|
for (const resource of resources.StackResources || []) {
|
|
98
100
|
if (resource.ResourceStatusReason?.includes("Resource creation cancelled") ||
|
|
99
101
|
resource.ResourceStatusReason?.includes("Resource update cancelled") ||
|
|
100
|
-
resource.ResourceStatusReason?.includes("Resource creation Initiated")
|
|
102
|
+
resource.ResourceStatusReason?.includes("Resource creation Initiated") ||
|
|
103
|
+
// ie. The following resource(s) failed to update: [MyResource10A5921D].
|
|
104
|
+
resource.ResourceStatusReason?.startsWith("The following resource(s) failed to"))
|
|
101
105
|
continue;
|
|
102
106
|
if (resource.ResourceStatusReason)
|
|
103
107
|
errors[resource.LogicalResourceId] = resource.ResourceStatusReason;
|