sst 2.22.9 → 2.22.10
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 +1 -1
- package/project.js +8 -1
- package/sst.mjs +2 -1
package/package.json
CHANGED
package/project.js
CHANGED
|
@@ -47,10 +47,17 @@ export async function initProject(globals) {
|
|
|
47
47
|
throw new VisibleError("Could not found a configuration file", "Make sure one of the following exists", ...CONFIG_EXTENSIONS.map((x) => ` - sst${x}`));
|
|
48
48
|
})();
|
|
49
49
|
const config = await Promise.resolve(sstConfig.config(globals));
|
|
50
|
-
const stage =
|
|
50
|
+
const stage = process.env.SST_STAGE ||
|
|
51
|
+
globals.stage ||
|
|
51
52
|
config.stage ||
|
|
52
53
|
(await usePersonalStage(out)) ||
|
|
53
54
|
(await promptPersonalStage(out));
|
|
55
|
+
// Set stage to SST_STAGE so that if SST spawned processes are aware
|
|
56
|
+
// of the stage. ie.
|
|
57
|
+
// `sst deploy --stage prod`: `prod` stage passed in via CLI
|
|
58
|
+
// -> spawns `open-next build`
|
|
59
|
+
// -> spawns `sst bind`: `prod` stage read from SST_STAGE
|
|
60
|
+
process.env.SST_STAGE = stage;
|
|
54
61
|
const [version, cdkVersion, constructsVersion] = await (async () => {
|
|
55
62
|
try {
|
|
56
63
|
const packageJson = JSON.parse(await fs
|
package/sst.mjs
CHANGED
|
@@ -381,7 +381,8 @@ async function initProject(globals) {
|
|
|
381
381
|
);
|
|
382
382
|
}();
|
|
383
383
|
const config = await Promise.resolve(sstConfig.config(globals));
|
|
384
|
-
const stage = globals.stage || config.stage || await usePersonalStage(out) || await promptPersonalStage(out);
|
|
384
|
+
const stage = process.env.SST_STAGE || globals.stage || config.stage || await usePersonalStage(out) || await promptPersonalStage(out);
|
|
385
|
+
process.env.SST_STAGE = stage;
|
|
385
386
|
const [version2, cdkVersion, constructsVersion] = await (async () => {
|
|
386
387
|
try {
|
|
387
388
|
const packageJson = JSON.parse(
|