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.
- package/constructs/SsrSite.js +5 -0
- package/package.json +1 -1
- package/runtime/handlers/python.js +3 -3
- package/sst.mjs +3 -3
- package/support/bootstrap-metadata-function/index.mjs +575 -68
- package/support/bridge/bridge.mjs +36 -36
- package/support/custom-resources/index.mjs +662 -155
- package/support/job-invoker/index.mjs +16 -16
- package/support/script-function/index.mjs +574 -67
package/constructs/SsrSite.js
CHANGED
|
@@ -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
|
@@ -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 = "
|
|
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
|
|
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:
|
|
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 = "
|
|
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
|
|
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:
|
|
5039
|
+
cwd: src
|
|
5040
5040
|
}
|
|
5041
5041
|
);
|
|
5042
5042
|
proc.on("exit", () => workers.exited(input.workerID));
|