sst 2.0.0-rc.5 → 2.0.0-rc.7

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.
@@ -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
- ? undefined
266
- : StackActivityMonitor.withDefaultPrinter(this.cfn, this.stackName, this.stackArtifact, {
267
- resourcesTotal: expectedChanges,
268
- progress: this.options.progress,
269
- changeSetCreationTime: startTime,
270
- ci: this.options.ci,
271
- }).start();
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, monitor?.errors));
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
- ? undefined
404
- : StackActivityMonitor.withDefaultPrinter(cfn, deployName, options.stack, {
405
- ci: options.ci,
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
- await monitor.stop();
429
+ await monitor.stop();
423
430
  }
431
+ */
424
432
  }
425
433
  }
426
434
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.0-rc.5",
3
+ "version": "2.0.0-rc.7",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
@@ -93,9 +93,7 @@ export const useNodeHandler = Context.memo(() => {
93
93
  entryPoints: [file],
94
94
  platform: "node",
95
95
  external: [
96
- ...(nodejs.format === "esm" || input.props.runtime === "nodejs18.x"
97
- ? []
98
- : ["aws-sdk"]),
96
+ ...(isESM || input.props.runtime === "nodejs18.x" ? [] : ["aws-sdk"]),
99
97
  ...(nodejs.install || []),
100
98
  ...(external || []),
101
99
  ],
package/sst.mjs CHANGED
@@ -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, monitor2?.errors));
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, monitor2?.errors));
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 {
@@ -3299,7 +3278,7 @@ var init_node = __esm({
3299
3278
  entryPoints: [file],
3300
3279
  platform: "node",
3301
3280
  external: [
3302
- ...nodejs.format === "esm" || input.props.runtime === "nodejs18.x" ? [] : ["aws-sdk"],
3281
+ ...isESM || input.props.runtime === "nodejs18.x" ? [] : ["aws-sdk"],
3303
3282
  ...nodejs.install || [],
3304
3283
  ...external || []
3305
3284
  ],