sst 2.2.6 → 2.2.7
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/deploy.js +14 -14
- package/cli/commands/dev.js +14 -14
- package/credentials.js +8 -0
- package/package.json +1 -1
- package/sst.mjs +45 -35
package/cli/commands/deploy.js
CHANGED
|
@@ -25,6 +25,20 @@ export const deploy = (program) => program.command("deploy [filter]", "Deploy yo
|
|
|
25
25
|
useSTSIdentity(),
|
|
26
26
|
useAppMetadata(),
|
|
27
27
|
]);
|
|
28
|
+
async function promptChangeMode() {
|
|
29
|
+
const readline = await import("readline");
|
|
30
|
+
const rl = readline.createInterface({
|
|
31
|
+
input: process.stdin,
|
|
32
|
+
output: process.stdout,
|
|
33
|
+
});
|
|
34
|
+
return new Promise((resolve) => {
|
|
35
|
+
console.log("");
|
|
36
|
+
rl.question(`You were previously running the stage "${project.config.stage}" in dev mode. It is recommended that you use a different stage for production. Read more here — https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to deploy to this stage? (y/N) `, async (input) => {
|
|
37
|
+
rl.close();
|
|
38
|
+
resolve(input.trim() === "y");
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
}
|
|
28
42
|
// Check app mode changed
|
|
29
43
|
if (appMetadata && appMetadata.mode !== "deploy") {
|
|
30
44
|
if (!(await promptChangeMode())) {
|
|
@@ -80,17 +94,3 @@ export const deploy = (program) => program.command("deploy [filter]", "Deploy yo
|
|
|
80
94
|
await saveAppMetadata({ mode: "deploy" });
|
|
81
95
|
process.exit(0);
|
|
82
96
|
});
|
|
83
|
-
async function promptChangeMode() {
|
|
84
|
-
const readline = await import("readline");
|
|
85
|
-
const rl = readline.createInterface({
|
|
86
|
-
input: process.stdin,
|
|
87
|
-
output: process.stdout,
|
|
88
|
-
});
|
|
89
|
-
return new Promise((resolve) => {
|
|
90
|
-
console.log("");
|
|
91
|
-
rl.question("You were previously running this stage in dev mode. It is recommended that you use a different stage for production. Read more here — https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to deploy to this stage? (y/N) ", async (input) => {
|
|
92
|
-
rl.close();
|
|
93
|
-
resolve(input.trim() === "y");
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
package/cli/commands/dev.js
CHANGED
|
@@ -253,6 +253,20 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
|
|
|
253
253
|
live: true,
|
|
254
254
|
}),
|
|
255
255
|
]);
|
|
256
|
+
async function promptChangeMode() {
|
|
257
|
+
const readline = await import("readline");
|
|
258
|
+
const rl = readline.createInterface({
|
|
259
|
+
input: process.stdin,
|
|
260
|
+
output: process.stdout,
|
|
261
|
+
});
|
|
262
|
+
return new Promise((resolve) => {
|
|
263
|
+
console.log("");
|
|
264
|
+
rl.question(`You have previously deployed the stage "${useProject().config.stage}" in production. It is recommended that you use a different stage for development. Read more here — https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to run this stage in dev mode? [y/N] `, async (input) => {
|
|
265
|
+
rl.close();
|
|
266
|
+
resolve(input.trim() === "y");
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
}
|
|
256
270
|
// Check app mode changed
|
|
257
271
|
if (appMetadata && appMetadata.mode !== "dev") {
|
|
258
272
|
if (!(await promptChangeMode())) {
|
|
@@ -274,17 +288,3 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
|
|
|
274
288
|
useStackBuilder(),
|
|
275
289
|
]);
|
|
276
290
|
});
|
|
277
|
-
async function promptChangeMode() {
|
|
278
|
-
const readline = await import("readline");
|
|
279
|
-
const rl = readline.createInterface({
|
|
280
|
-
input: process.stdin,
|
|
281
|
-
output: process.stdout,
|
|
282
|
-
});
|
|
283
|
-
return new Promise((resolve) => {
|
|
284
|
-
console.log("");
|
|
285
|
-
rl.question("You have previously deployed this stage in production. It is recommended that you use a different stage for development. Read more here — https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to run this stage in dev mode? [y/N] ", async (input) => {
|
|
286
|
-
rl.close();
|
|
287
|
-
resolve(input.trim() === "y");
|
|
288
|
-
});
|
|
289
|
-
});
|
|
290
|
-
}
|
package/credentials.js
CHANGED
|
@@ -88,6 +88,14 @@ export function useAWSClient(client, force = false) {
|
|
|
88
88
|
delayDecider: (_, attempts) => {
|
|
89
89
|
return Math.min(1.5 ** attempts * 100, 5000);
|
|
90
90
|
},
|
|
91
|
+
// AWS SDK v3 has an idea of "retry tokens" which are used to
|
|
92
|
+
// prevent multiple retries from happening at the same time.
|
|
93
|
+
// This is a workaround to disable that.
|
|
94
|
+
retryQuota: {
|
|
95
|
+
hasRetryTokens: () => true,
|
|
96
|
+
releaseRetryTokens: () => { },
|
|
97
|
+
retrieveRetryTokens: () => 1,
|
|
98
|
+
},
|
|
91
99
|
}),
|
|
92
100
|
});
|
|
93
101
|
cache.set(client.name, result);
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -1638,6 +1638,12 @@ function useAWSClient(client, force = false) {
|
|
|
1638
1638
|
},
|
|
1639
1639
|
delayDecider: (_, attempts) => {
|
|
1640
1640
|
return Math.min(1.5 ** attempts * 100, 5e3);
|
|
1641
|
+
},
|
|
1642
|
+
retryQuota: {
|
|
1643
|
+
hasRetryTokens: () => true,
|
|
1644
|
+
releaseRetryTokens: () => {
|
|
1645
|
+
},
|
|
1646
|
+
retrieveRetryTokens: () => 1
|
|
1641
1647
|
}
|
|
1642
1648
|
})
|
|
1643
1649
|
});
|
|
@@ -7126,6 +7132,25 @@ var dev = (program2) => program2.command(
|
|
|
7126
7132
|
live: true
|
|
7127
7133
|
})
|
|
7128
7134
|
]);
|
|
7135
|
+
async function promptChangeMode() {
|
|
7136
|
+
const readline = await import("readline");
|
|
7137
|
+
const rl = readline.createInterface({
|
|
7138
|
+
input: process.stdin,
|
|
7139
|
+
output: process.stdout
|
|
7140
|
+
});
|
|
7141
|
+
return new Promise((resolve) => {
|
|
7142
|
+
console.log("");
|
|
7143
|
+
rl.question(
|
|
7144
|
+
`You have previously deployed the stage "${useProject2().config.stage}" in production. It is recommended that you use a different stage for development. Read more here \u2014 https://docs.sst.dev/live-lambda-development
|
|
7145
|
+
|
|
7146
|
+
Are you sure you want to run this stage in dev mode? [y/N] `,
|
|
7147
|
+
async (input) => {
|
|
7148
|
+
rl.close();
|
|
7149
|
+
resolve(input.trim() === "y");
|
|
7150
|
+
}
|
|
7151
|
+
);
|
|
7152
|
+
});
|
|
7153
|
+
}
|
|
7129
7154
|
if (appMetadata && appMetadata.mode !== "dev") {
|
|
7130
7155
|
if (!await promptChangeMode()) {
|
|
7131
7156
|
process.exit(0);
|
|
@@ -7147,23 +7172,6 @@ var dev = (program2) => program2.command(
|
|
|
7147
7172
|
]);
|
|
7148
7173
|
}
|
|
7149
7174
|
);
|
|
7150
|
-
async function promptChangeMode() {
|
|
7151
|
-
const readline = await import("readline");
|
|
7152
|
-
const rl = readline.createInterface({
|
|
7153
|
-
input: process.stdin,
|
|
7154
|
-
output: process.stdout
|
|
7155
|
-
});
|
|
7156
|
-
return new Promise((resolve) => {
|
|
7157
|
-
console.log("");
|
|
7158
|
-
rl.question(
|
|
7159
|
-
"You have previously deployed this stage in production. It is recommended that you use a different stage for development. Read more here \u2014 https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to run this stage in dev mode? [y/N] ",
|
|
7160
|
-
async (input) => {
|
|
7161
|
-
rl.close();
|
|
7162
|
-
resolve(input.trim() === "y");
|
|
7163
|
-
}
|
|
7164
|
-
);
|
|
7165
|
-
});
|
|
7166
|
-
}
|
|
7167
7175
|
|
|
7168
7176
|
// src/cli/commands/bind.ts
|
|
7169
7177
|
init_error();
|
|
@@ -7259,8 +7267,27 @@ var deploy2 = (program2) => program2.command(
|
|
|
7259
7267
|
useSTSIdentity(),
|
|
7260
7268
|
useAppMetadata2()
|
|
7261
7269
|
]);
|
|
7270
|
+
async function promptChangeMode() {
|
|
7271
|
+
const readline = await import("readline");
|
|
7272
|
+
const rl = readline.createInterface({
|
|
7273
|
+
input: process.stdin,
|
|
7274
|
+
output: process.stdout
|
|
7275
|
+
});
|
|
7276
|
+
return new Promise((resolve) => {
|
|
7277
|
+
console.log("");
|
|
7278
|
+
rl.question(
|
|
7279
|
+
`You were previously running the stage "${project.config.stage}" in dev mode. It is recommended that you use a different stage for production. Read more here \u2014 https://docs.sst.dev/live-lambda-development
|
|
7280
|
+
|
|
7281
|
+
Are you sure you want to deploy to this stage? (y/N) `,
|
|
7282
|
+
async (input) => {
|
|
7283
|
+
rl.close();
|
|
7284
|
+
resolve(input.trim() === "y");
|
|
7285
|
+
}
|
|
7286
|
+
);
|
|
7287
|
+
});
|
|
7288
|
+
}
|
|
7262
7289
|
if (appMetadata && appMetadata.mode !== "deploy") {
|
|
7263
|
-
if (!await
|
|
7290
|
+
if (!await promptChangeMode()) {
|
|
7264
7291
|
process.exit(0);
|
|
7265
7292
|
}
|
|
7266
7293
|
}
|
|
@@ -7314,23 +7341,6 @@ var deploy2 = (program2) => program2.command(
|
|
|
7314
7341
|
process.exit(0);
|
|
7315
7342
|
}
|
|
7316
7343
|
);
|
|
7317
|
-
async function promptChangeMode2() {
|
|
7318
|
-
const readline = await import("readline");
|
|
7319
|
-
const rl = readline.createInterface({
|
|
7320
|
-
input: process.stdin,
|
|
7321
|
-
output: process.stdout
|
|
7322
|
-
});
|
|
7323
|
-
return new Promise((resolve) => {
|
|
7324
|
-
console.log("");
|
|
7325
|
-
rl.question(
|
|
7326
|
-
"You were previously running this stage in dev mode. It is recommended that you use a different stage for production. Read more here \u2014 https://docs.sst.dev/live-lambda-development\n\nAre you sure you want to deploy to this stage? (y/N) ",
|
|
7327
|
-
async (input) => {
|
|
7328
|
-
rl.close();
|
|
7329
|
-
resolve(input.trim() === "y");
|
|
7330
|
-
}
|
|
7331
|
-
);
|
|
7332
|
-
});
|
|
7333
|
-
}
|
|
7334
7344
|
|
|
7335
7345
|
// src/cli/commands/remove.tsx
|
|
7336
7346
|
var remove2 = (program2) => program2.command(
|