sst 2.0.10 → 2.0.12

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.
@@ -57,7 +57,11 @@ export const deploy = (program) => program.command("deploy [filter]", "Deploy yo
57
57
  return result;
58
58
  })();
59
59
  const target = assembly.stacks.filter((s) => !args.filter ||
60
- s.stackName.toLowerCase().includes(args.filter.toLowerCase()));
60
+ s.id
61
+ .toLowerCase()
62
+ .replace(project.config.name.toLowerCase(), "")
63
+ .replace(project.config.stage.toLowerCase(), "")
64
+ .includes(args.filter.toLowerCase()));
61
65
  if (!target.length) {
62
66
  Colors.line(`No stacks found matching ${blue(args.filter)}`);
63
67
  process.exit(1);
@@ -30,7 +30,11 @@ export const remove = (program) => program.command("remove [filter]", "Remove yo
30
30
  });
31
31
  })();
32
32
  const target = assembly.stacks.filter((s) => !args.filter ||
33
- s.stackName.toLowerCase().includes(args.filter.toLowerCase()));
33
+ s.id
34
+ .toLowerCase()
35
+ .replace(project.config.name.toLowerCase(), "")
36
+ .replace(project.config.stage.toLowerCase(), "")
37
+ .includes(args.filter.toLowerCase()));
34
38
  if (!target.length) {
35
39
  console.log(`No stacks found matching ${blue(args.filter)}`);
36
40
  process.exit(1);
package/cli/ui/deploy.js CHANGED
@@ -71,7 +71,7 @@ export function printDeploymentResults(assembly, results, remove) {
71
71
  const success = Object.entries(results).filter(([_stack, result]) => Stacks.isSuccess(result.status));
72
72
  if (success.length) {
73
73
  Colors.gap();
74
- Colors.line(Colors.success(`✔`), Colors.bold(remove ? ` Removed:` : ` Deployed:`));
74
+ Colors.line(Colors.success(`✔`), Colors.bold(remove ? ` Removed:` : ` Deployed:`));
75
75
  for (const [stack, result] of success) {
76
76
  const outputs = Object.entries(result.outputs).filter(([key, _]) => !key.includes("SstSiteEnv"));
77
77
  Colors.line(` ${Colors.dim(stackNameToId(stack))}`);
package/constructs/Job.js CHANGED
@@ -257,7 +257,7 @@ export class Job extends Construct {
257
257
  return fn;
258
258
  }
259
259
  createCodeBuildInvoker() {
260
- return new Function(this, this.node.id, {
260
+ const fn = new Function(this, this.node.id, {
261
261
  handler: path.join(__dirname, "../support/job-invoker/index.main"),
262
262
  runtime: "nodejs16.x",
263
263
  timeout: 10,
@@ -275,7 +275,10 @@ export class Job extends Construct {
275
275
  nodejs: {
276
276
  format: "esm",
277
277
  },
278
+ enableLiveDev: false,
278
279
  });
280
+ fn._disableBind = true;
281
+ return fn;
279
282
  }
280
283
  useForCodeBuild(constructs) {
281
284
  const app = this.node.root;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/sst.mjs CHANGED
@@ -793,7 +793,7 @@ var init_site_env = __esm({
793
793
  }
794
794
  });
795
795
 
796
- // ../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.js
796
+ // ../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.es6.js
797
797
  var tslib_es6_exports = {};
798
798
  __export(tslib_es6_exports, {
799
799
  __assign: () => __assign,
@@ -807,6 +807,7 @@ __export(tslib_es6_exports, {
807
807
  __classPrivateFieldSet: () => __classPrivateFieldSet,
808
808
  __createBinding: () => __createBinding,
809
809
  __decorate: () => __decorate,
810
+ __esDecorate: () => __esDecorate,
810
811
  __exportStar: () => __exportStar,
811
812
  __extends: () => __extends,
812
813
  __generator: () => __generator,
@@ -815,8 +816,11 @@ __export(tslib_es6_exports, {
815
816
  __makeTemplateObject: () => __makeTemplateObject,
816
817
  __metadata: () => __metadata,
817
818
  __param: () => __param,
819
+ __propKey: () => __propKey,
818
820
  __read: () => __read,
819
821
  __rest: () => __rest,
822
+ __runInitializers: () => __runInitializers,
823
+ __setFunctionName: () => __setFunctionName,
820
824
  __spread: () => __spread,
821
825
  __spreadArray: () => __spreadArray,
822
826
  __spreadArrays: () => __spreadArrays,
@@ -858,6 +862,65 @@ function __param(paramIndex, decorator) {
858
862
  decorator(target, key, paramIndex);
859
863
  };
860
864
  }
865
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
866
+ function accept(f) {
867
+ if (f !== void 0 && typeof f !== "function")
868
+ throw new TypeError("Function expected");
869
+ return f;
870
+ }
871
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
872
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
873
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
874
+ var _, done = false;
875
+ for (var i = decorators.length - 1; i >= 0; i--) {
876
+ var context = {};
877
+ for (var p in contextIn)
878
+ context[p] = p === "access" ? {} : contextIn[p];
879
+ for (var p in contextIn.access)
880
+ context.access[p] = contextIn.access[p];
881
+ context.addInitializer = function(f) {
882
+ if (done)
883
+ throw new TypeError("Cannot add initializers after decoration has completed");
884
+ extraInitializers.push(accept(f || null));
885
+ };
886
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
887
+ if (kind === "accessor") {
888
+ if (result === void 0)
889
+ continue;
890
+ if (result === null || typeof result !== "object")
891
+ throw new TypeError("Object expected");
892
+ if (_ = accept(result.get))
893
+ descriptor.get = _;
894
+ if (_ = accept(result.set))
895
+ descriptor.set = _;
896
+ if (_ = accept(result.init))
897
+ initializers.push(_);
898
+ } else if (_ = accept(result)) {
899
+ if (kind === "field")
900
+ initializers.push(_);
901
+ else
902
+ descriptor[key] = _;
903
+ }
904
+ }
905
+ if (target)
906
+ Object.defineProperty(target, contextIn.name, descriptor);
907
+ done = true;
908
+ }
909
+ function __runInitializers(thisArg, initializers, value) {
910
+ var useValue = arguments.length > 2;
911
+ for (var i = 0; i < initializers.length; i++) {
912
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
913
+ }
914
+ return useValue ? value : void 0;
915
+ }
916
+ function __propKey(x) {
917
+ return typeof x === "symbol" ? x : "".concat(x);
918
+ }
919
+ function __setFunctionName(f, name, prefix) {
920
+ if (typeof name === "symbol")
921
+ name = name.description ? "[".concat(name.description, "]") : "";
922
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
923
+ }
861
924
  function __metadata(metadataKey, metadataValue) {
862
925
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
863
926
  return Reflect.metadata(metadataKey, metadataValue);
@@ -1077,7 +1140,7 @@ function __asyncDelegator(o) {
1077
1140
  }, i;
1078
1141
  function verb(n, f) {
1079
1142
  i[n] = o[n] ? function(v) {
1080
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
1143
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
1081
1144
  } : f;
1082
1145
  }
1083
1146
  }
@@ -1147,7 +1210,7 @@ function __classPrivateFieldIn(state2, receiver) {
1147
1210
  }
1148
1211
  var extendStatics, __assign, __createBinding, __setModuleDefault;
1149
1212
  var init_tslib_es6 = __esm({
1150
- "../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.js"() {
1213
+ "../../node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.es6.js"() {
1151
1214
  extendStatics = function(d, b) {
1152
1215
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1153
1216
  d2.__proto__ = b2;
@@ -5442,7 +5505,7 @@ function printDeploymentResults(assembly, results, remove4) {
5442
5505
  Colors.gap();
5443
5506
  Colors.line(
5444
5507
  Colors.success(`\u2714`),
5445
- Colors.bold(remove4 ? ` Removed:` : ` Deployed:`)
5508
+ Colors.bold(remove4 ? ` Removed:` : ` Deployed:`)
5446
5509
  );
5447
5510
  for (const [stack, result] of success) {
5448
5511
  const outputs = Object.entries(result.outputs).filter(
@@ -6722,7 +6785,7 @@ var deploy2 = (program2) => program2.command(
6722
6785
  return result;
6723
6786
  }();
6724
6787
  const target = assembly.stacks.filter(
6725
- (s) => !args.filter || s.stackName.toLowerCase().includes(args.filter.toLowerCase())
6788
+ (s) => !args.filter || s.id.toLowerCase().replace(project.config.name.toLowerCase(), "").replace(project.config.stage.toLowerCase(), "").includes(args.filter.toLowerCase())
6726
6789
  );
6727
6790
  if (!target.length) {
6728
6791
  Colors.line(`No stacks found matching ${blue4(args.filter)}`);
@@ -6804,7 +6867,7 @@ var remove2 = (program2) => program2.command(
6804
6867
  });
6805
6868
  }();
6806
6869
  const target = assembly.stacks.filter(
6807
- (s) => !args.filter || s.stackName.toLowerCase().includes(args.filter.toLowerCase())
6870
+ (s) => !args.filter || s.id.toLowerCase().replace(project.config.name.toLowerCase(), "").replace(project.config.stage.toLowerCase(), "").includes(args.filter.toLowerCase())
6808
6871
  );
6809
6872
  if (!target.length) {
6810
6873
  console.log(`No stacks found matching ${blue4(args.filter)}`);