sst 2.0.0-rc.4 → 2.0.0-rc.6
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/cdk/deploy-stack.js +24 -16
- package/package.json +1 -1
- package/sst.mjs +3 -24
- package/stacks/build.js +1 -1
package/cdk/deploy-stack.js
CHANGED
|
@@ -10,7 +10,6 @@ import { contentHash } from "aws-cdk/lib/util/content-hash.js";
|
|
|
10
10
|
import { CfnEvaluationException } from "aws-cdk/lib/api/evaluate-cloudformation-template.js";
|
|
11
11
|
import { tryHotswapDeployment } from "aws-cdk/lib/api/hotswap-deployments.js";
|
|
12
12
|
import { changeSetHasNoChanges, CloudFormationStack, TemplateParameters, waitForChangeSet, waitForStackDeploy, waitForStackDelete, } from "aws-cdk/lib/api/util/cloudformation.js";
|
|
13
|
-
import { StackActivityMonitor, } from "aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.js";
|
|
14
13
|
import { blue } from "colorette";
|
|
15
14
|
const LARGE_TEMPLATE_SIZE_KB = 50;
|
|
16
15
|
export async function deployStack(options) {
|
|
@@ -261,14 +260,19 @@ class FullCloudFormationDeployment {
|
|
|
261
260
|
}
|
|
262
261
|
}
|
|
263
262
|
async monitorDeployment(startTime, expectedChanges) {
|
|
264
|
-
const monitor = this.options.quiet
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
263
|
+
// const monitor = this.options.quiet
|
|
264
|
+
// ? undefined
|
|
265
|
+
// : StackActivityMonitor.withDefaultPrinter(
|
|
266
|
+
// this.cfn,
|
|
267
|
+
// this.stackName,
|
|
268
|
+
// this.stackArtifact,
|
|
269
|
+
// {
|
|
270
|
+
// resourcesTotal: expectedChanges,
|
|
271
|
+
// progress: this.options.progress,
|
|
272
|
+
// changeSetCreationTime: startTime,
|
|
273
|
+
// ci: this.options.ci,
|
|
274
|
+
// }
|
|
275
|
+
// ).start();
|
|
272
276
|
let finalState = this.cloudFormationStack;
|
|
273
277
|
try {
|
|
274
278
|
const successStack = await waitForStackDeploy(this.cfn, this.stackName);
|
|
@@ -279,10 +283,10 @@ class FullCloudFormationDeployment {
|
|
|
279
283
|
finalState = successStack;
|
|
280
284
|
}
|
|
281
285
|
catch (e) {
|
|
282
|
-
throw new Error(suffixWithErrors(e.message
|
|
286
|
+
throw new Error(suffixWithErrors(e.message /*, monitor?.errors*/));
|
|
283
287
|
}
|
|
284
288
|
finally {
|
|
285
|
-
await monitor?.stop();
|
|
289
|
+
// await monitor?.stop();
|
|
286
290
|
}
|
|
287
291
|
debug("Stack %s has completed updating", this.stackName);
|
|
288
292
|
return {
|
|
@@ -399,11 +403,13 @@ export async function destroyStack(options) {
|
|
|
399
403
|
if (!currentStack.exists) {
|
|
400
404
|
return;
|
|
401
405
|
}
|
|
406
|
+
/*
|
|
402
407
|
const monitor = options.quiet
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
408
|
+
? undefined
|
|
409
|
+
: StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, {
|
|
410
|
+
ci: options.ci,
|
|
406
411
|
}).start();
|
|
412
|
+
*/
|
|
407
413
|
try {
|
|
408
414
|
await cfn
|
|
409
415
|
.deleteStack({ StackName: deployName, RoleARN: options.roleArn })
|
|
@@ -415,12 +421,14 @@ export async function destroyStack(options) {
|
|
|
415
421
|
}
|
|
416
422
|
}
|
|
417
423
|
catch (e) {
|
|
418
|
-
throw new Error(suffixWithErrors(e.message, monitor?.errors));
|
|
424
|
+
throw new Error(suffixWithErrors(e.message /* , monitor?.errors */));
|
|
419
425
|
}
|
|
420
426
|
finally {
|
|
427
|
+
/*
|
|
421
428
|
if (monitor) {
|
|
422
|
-
|
|
429
|
+
await monitor.stop();
|
|
423
430
|
}
|
|
431
|
+
*/
|
|
424
432
|
}
|
|
425
433
|
}
|
|
426
434
|
/**
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -1131,7 +1131,7 @@ async function build() {
|
|
|
1131
1131
|
format: "esm",
|
|
1132
1132
|
external: [
|
|
1133
1133
|
"aws-cdk-lib",
|
|
1134
|
-
"
|
|
1134
|
+
"sst",
|
|
1135
1135
|
...Object.keys({
|
|
1136
1136
|
...pkg.devDependencies,
|
|
1137
1137
|
...pkg.dependencies,
|
|
@@ -1324,9 +1324,6 @@ import {
|
|
|
1324
1324
|
waitForStackDeploy,
|
|
1325
1325
|
waitForStackDelete
|
|
1326
1326
|
} from "aws-cdk/lib/api/util/cloudformation.js";
|
|
1327
|
-
import {
|
|
1328
|
-
StackActivityMonitor
|
|
1329
|
-
} from "aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.js";
|
|
1330
1327
|
import { blue as blue2 } from "colorette";
|
|
1331
1328
|
async function deployStack(options) {
|
|
1332
1329
|
const stackArtifact = options.stack;
|
|
@@ -1507,9 +1504,6 @@ async function destroyStack(options) {
|
|
|
1507
1504
|
if (!currentStack.exists) {
|
|
1508
1505
|
return;
|
|
1509
1506
|
}
|
|
1510
|
-
const monitor2 = options.quiet ? void 0 : StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, {
|
|
1511
|
-
ci: options.ci
|
|
1512
|
-
}).start();
|
|
1513
1507
|
try {
|
|
1514
1508
|
await cfn.deleteStack({ StackName: deployName, RoleARN: options.roleArn }).promise();
|
|
1515
1509
|
const destroyedStack = await waitForStackDelete(cfn, deployName);
|
|
@@ -1519,11 +1513,8 @@ async function destroyStack(options) {
|
|
|
1519
1513
|
);
|
|
1520
1514
|
}
|
|
1521
1515
|
} catch (e) {
|
|
1522
|
-
throw new Error(suffixWithErrors(e.message
|
|
1516
|
+
throw new Error(suffixWithErrors(e.message));
|
|
1523
1517
|
} finally {
|
|
1524
|
-
if (monitor2) {
|
|
1525
|
-
await monitor2.stop();
|
|
1526
|
-
}
|
|
1527
1518
|
}
|
|
1528
1519
|
}
|
|
1529
1520
|
async function canSkipDeploy(deployStackOptions, cloudFormationStack, parameterChanges) {
|
|
@@ -1780,17 +1771,6 @@ var init_deploy_stack = __esm({
|
|
|
1780
1771
|
}
|
|
1781
1772
|
}
|
|
1782
1773
|
async monitorDeployment(startTime, expectedChanges) {
|
|
1783
|
-
const monitor2 = this.options.quiet ? void 0 : StackActivityMonitor.withDefaultPrinter(
|
|
1784
|
-
this.cfn,
|
|
1785
|
-
this.stackName,
|
|
1786
|
-
this.stackArtifact,
|
|
1787
|
-
{
|
|
1788
|
-
resourcesTotal: expectedChanges,
|
|
1789
|
-
progress: this.options.progress,
|
|
1790
|
-
changeSetCreationTime: startTime,
|
|
1791
|
-
ci: this.options.ci
|
|
1792
|
-
}
|
|
1793
|
-
).start();
|
|
1794
1774
|
let finalState = this.cloudFormationStack;
|
|
1795
1775
|
try {
|
|
1796
1776
|
const successStack = await waitForStackDeploy(this.cfn, this.stackName);
|
|
@@ -1801,9 +1781,8 @@ var init_deploy_stack = __esm({
|
|
|
1801
1781
|
}
|
|
1802
1782
|
finalState = successStack;
|
|
1803
1783
|
} catch (e) {
|
|
1804
|
-
throw new Error(suffixWithErrors(e.message
|
|
1784
|
+
throw new Error(suffixWithErrors(e.message));
|
|
1805
1785
|
} finally {
|
|
1806
|
-
await monitor2?.stop();
|
|
1807
1786
|
}
|
|
1808
1787
|
debug("Stack %s has completed updating", this.stackName);
|
|
1809
1788
|
return {
|