sst 2.0.3 → 2.0.4

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.
@@ -468,6 +468,11 @@ export class SsrSite extends Construct {
468
468
  }
469
469
  else {
470
470
  domainNames.push(customDomain.domainName);
471
+ if (customDomain.alternateNames) {
472
+ if (!customDomain.cdk?.certificate)
473
+ throw new Error("Certificates for alternate domains cannot be automatically created. Please specify certificate to use");
474
+ domainNames.push(...customDomain.alternateNames);
475
+ }
471
476
  }
472
477
  return domainNames;
473
478
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
@@ -33,10 +33,10 @@ export const usePythonHandler = Context.memo(async () => {
33
33
  },
34
34
  canHandle: (input) => input.startsWith("python"),
35
35
  startWorker: async (input) => {
36
- const src = "services";
36
+ const src = await findAbove(input.handler, "requirements.txt");
37
37
  const parsed = path.parse(path.relative(src, input.handler));
38
38
  const target = [...parsed.dir.split(path.sep), parsed.name].join(".");
39
- const proc = spawn(os.platform() === "win32" ? "python.exe" : "python3.6".split(".")[0], [
39
+ const proc = spawn(os.platform() === "win32" ? "python.exe" : "python3", [
40
40
  "-u",
41
41
  url.fileURLToPath(new URL("../../support/python-runtime/runtime.py", import.meta.url)),
42
42
  target,
@@ -51,7 +51,7 @@ export const usePythonHandler = Context.memo(async () => {
51
51
  AWS_LAMBDA_RUNTIME_API: `localhost:${server.port}/${input.workerID}`,
52
52
  },
53
53
  shell: true,
54
- cwd: path.join(process.cwd(), src),
54
+ cwd: src,
55
55
  });
56
56
  proc.on("exit", () => workers.exited(input.workerID));
57
57
  proc.stdout.on("data", (data) => {
package/sst.mjs CHANGED
@@ -5013,11 +5013,11 @@ var init_python = __esm({
5013
5013
  },
5014
5014
  canHandle: (input) => input.startsWith("python"),
5015
5015
  startWorker: async (input) => {
5016
- const src = "services";
5016
+ const src = await findAbove(input.handler, "requirements.txt");
5017
5017
  const parsed = path12.parse(path12.relative(src, input.handler));
5018
5018
  const target = [...parsed.dir.split(path12.sep), parsed.name].join(".");
5019
5019
  const proc = spawn4(
5020
- os3.platform() === "win32" ? "python.exe" : "python3.6".split(".")[0],
5020
+ os3.platform() === "win32" ? "python.exe" : "python3",
5021
5021
  [
5022
5022
  "-u",
5023
5023
  url6.fileURLToPath(
@@ -5036,7 +5036,7 @@ var init_python = __esm({
5036
5036
  AWS_LAMBDA_RUNTIME_API: `localhost:${server.port}/${input.workerID}`
5037
5037
  },
5038
5038
  shell: true,
5039
- cwd: path12.join(process.cwd(), src)
5039
+ cwd: src
5040
5040
  }
5041
5041
  );
5042
5042
  proc.on("exit", () => workers.exited(input.workerID));