sst 2.19.2 → 2.20.0
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/package.json +2 -2
- package/runtime/handlers/node.js +13 -6
- package/sst.mjs +300 -21
- package/support/base-site-archiver.mjs +14 -14
- package/support/bootstrap-metadata-function/index.mjs +3734 -1114
- package/support/bridge/bridge.mjs +36 -36
- package/support/custom-resources/index.mjs +8495 -3739
- package/support/edge-function/edge-lambda-version.mjs +2 -2
- package/support/edge-function/edge-lambda.mjs +2 -2
- package/support/edge-function/s3-bucket.mjs +2 -2
- package/support/event-bus-retrier/index.mjs +24 -24
- package/support/job-invoker/index.mjs +2836 -576
- package/support/nodejs-runtime/index.mjs +2 -0
- package/support/rds-migrator/index.mjs +19 -19
- package/support/script-function/index.mjs +3491 -943
- package/support/ssr-site-function-archiver.mjs +11 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.20.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"cross-spawn": "^7.0.3",
|
|
67
67
|
"dendriform-immer-patch-optimiser": "^2.1.0",
|
|
68
68
|
"dotenv": "^16.0.3",
|
|
69
|
-
"esbuild": "0.
|
|
69
|
+
"esbuild": "0.18.11",
|
|
70
70
|
"express": "^4.18.2",
|
|
71
71
|
"fast-jwt": "^1.6.1",
|
|
72
72
|
"get-port": "^6.1.2",
|
package/runtime/handlers/node.js
CHANGED
|
@@ -26,7 +26,7 @@ export const useNodeHandler = Context.memo(async () => {
|
|
|
26
26
|
.relative(project.paths.root, input.file)
|
|
27
27
|
.split(path.sep)
|
|
28
28
|
.join(path.posix.sep);
|
|
29
|
-
return Boolean(result.metafile?.inputs[relative]);
|
|
29
|
+
return Boolean(result.last.metafile?.inputs[relative]);
|
|
30
30
|
},
|
|
31
31
|
canHandle: (input) => input.startsWith("nodejs"),
|
|
32
32
|
startWorker: async (input) => {
|
|
@@ -89,9 +89,12 @@ export const useNodeHandler = Context.memo(async () => {
|
|
|
89
89
|
.relative(input.out, target.replace(extension, parsed.ext))
|
|
90
90
|
.split(path.sep)
|
|
91
91
|
.join(path.posix.sep);
|
|
92
|
-
if (exists
|
|
93
|
-
const result = await exists.rebuild();
|
|
94
|
-
cache[input.functionID] =
|
|
92
|
+
if (exists) {
|
|
93
|
+
const result = await exists.ctx.rebuild();
|
|
94
|
+
cache[input.functionID] = {
|
|
95
|
+
ctx: exists.ctx,
|
|
96
|
+
last: result,
|
|
97
|
+
};
|
|
95
98
|
return {
|
|
96
99
|
type: "success",
|
|
97
100
|
handler,
|
|
@@ -146,7 +149,8 @@ export const useNodeHandler = Context.memo(async () => {
|
|
|
146
149
|
...override,
|
|
147
150
|
};
|
|
148
151
|
try {
|
|
149
|
-
const
|
|
152
|
+
const ctx = await esbuild.context(options);
|
|
153
|
+
const result = await ctx.rebuild();
|
|
150
154
|
// Install node_modules
|
|
151
155
|
const installPackages = [
|
|
152
156
|
...(nodejs.install || []),
|
|
@@ -202,7 +206,10 @@ export const useNodeHandler = Context.memo(async () => {
|
|
|
202
206
|
}
|
|
203
207
|
catch { }
|
|
204
208
|
}
|
|
205
|
-
cache[input.functionID] =
|
|
209
|
+
cache[input.functionID] = {
|
|
210
|
+
ctx,
|
|
211
|
+
last: result,
|
|
212
|
+
};
|
|
206
213
|
return {
|
|
207
214
|
type: "success",
|
|
208
215
|
handler,
|