sst 2.0.0-rc.10 → 2.0.0-rc.11
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/cli/commands/update.js +7 -3
- package/package.json +1 -1
- package/runtime/handlers.js +13 -10
- package/sst.mjs +20 -11
package/cli/commands/update.js
CHANGED
|
@@ -25,9 +25,13 @@ export const update = (program) => program.command("update [ver]", "Update SST a
|
|
|
25
25
|
for (const [pkg, existing] of Object.entries(deps)) {
|
|
26
26
|
if (!PACKAGE_MATCH.some((x) => pkg.startsWith(x)))
|
|
27
27
|
continue;
|
|
28
|
-
const desired =
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const desired = (() => {
|
|
29
|
+
if (pkg === "sst")
|
|
30
|
+
return metadata.version;
|
|
31
|
+
if (pkg.endsWith("alpha"))
|
|
32
|
+
return metadata.dependencies["@aws-cdk/aws-apigatewayv2-alpha"];
|
|
33
|
+
return metadata.dependencies["aws-cdk-lib"];
|
|
34
|
+
})();
|
|
31
35
|
if (existing === desired)
|
|
32
36
|
continue;
|
|
33
37
|
let arr = results.get(file);
|
package/package.json
CHANGED
package/runtime/handlers.js
CHANGED
|
@@ -101,17 +101,20 @@ export const useFunctionBuilder = Context.memo(() => {
|
|
|
101
101
|
};
|
|
102
102
|
const watcher = useWatcher();
|
|
103
103
|
watcher.subscribe("file.changed", async (evt) => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
104
|
+
try {
|
|
105
|
+
const functions = useFunctions();
|
|
106
|
+
for (const [functionID, props] of Object.entries(functions.all)) {
|
|
107
|
+
const handler = handlers.for(props.runtime);
|
|
108
|
+
if (!handler?.shouldBuild({
|
|
109
|
+
functionID,
|
|
110
|
+
file: evt.properties.file,
|
|
111
|
+
}))
|
|
112
|
+
continue;
|
|
113
|
+
await result.build(functionID);
|
|
114
|
+
Logger.debug("Rebuilt function", functionID);
|
|
115
|
+
}
|
|
114
116
|
}
|
|
117
|
+
catch { }
|
|
115
118
|
});
|
|
116
119
|
return result;
|
|
117
120
|
});
|
package/sst.mjs
CHANGED
|
@@ -2671,16 +2671,19 @@ var init_handlers = __esm({
|
|
|
2671
2671
|
};
|
|
2672
2672
|
const watcher = useWatcher();
|
|
2673
2673
|
watcher.subscribe("file.changed", async (evt) => {
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
const
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2674
|
+
try {
|
|
2675
|
+
const functions = useFunctions();
|
|
2676
|
+
for (const [functionID, props] of Object.entries(functions.all)) {
|
|
2677
|
+
const handler = handlers.for(props.runtime);
|
|
2678
|
+
if (!handler?.shouldBuild({
|
|
2679
|
+
functionID,
|
|
2680
|
+
file: evt.properties.file
|
|
2681
|
+
}))
|
|
2682
|
+
continue;
|
|
2683
|
+
await result.build(functionID);
|
|
2684
|
+
Logger.debug("Rebuilt function", functionID);
|
|
2685
|
+
}
|
|
2686
|
+
} catch {
|
|
2684
2687
|
}
|
|
2685
2688
|
});
|
|
2686
2689
|
return result;
|
|
@@ -20894,7 +20897,13 @@ var update = (program2) => program2.command(
|
|
|
20894
20897
|
for (const [pkg, existing] of Object.entries(deps)) {
|
|
20895
20898
|
if (!PACKAGE_MATCH.some((x) => pkg.startsWith(x)))
|
|
20896
20899
|
continue;
|
|
20897
|
-
const desired =
|
|
20900
|
+
const desired = (() => {
|
|
20901
|
+
if (pkg === "sst")
|
|
20902
|
+
return metadata2.version;
|
|
20903
|
+
if (pkg.endsWith("alpha"))
|
|
20904
|
+
return metadata2.dependencies["@aws-cdk/aws-apigatewayv2-alpha"];
|
|
20905
|
+
return metadata2.dependencies["aws-cdk-lib"];
|
|
20906
|
+
})();
|
|
20898
20907
|
if (existing === desired)
|
|
20899
20908
|
continue;
|
|
20900
20909
|
let arr = results.get(file);
|