sst 2.16.0 → 2.16.1
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/dev.js +2 -0
- package/constructs/App.d.ts +2 -2
- package/constructs/App.js +2 -2
- package/constructs/Script.js +2 -3
- package/package.json +1 -1
- package/sst.mjs +3 -0
- package/stacks/synth.d.ts +1 -0
- package/stacks/synth.js +1 -0
package/cli/commands/dev.js
CHANGED
|
@@ -114,6 +114,7 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
|
|
|
114
114
|
const useStackBuilder = Context.memo(async () => {
|
|
115
115
|
const watcher = useWatcher();
|
|
116
116
|
const project = useProject();
|
|
117
|
+
const scriptVersion = Date.now().toString();
|
|
117
118
|
let lastDeployed;
|
|
118
119
|
let isWorking = false;
|
|
119
120
|
let isDirty = false;
|
|
@@ -135,6 +136,7 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
|
|
|
135
136
|
project.stacks = sstConfig.stacks;
|
|
136
137
|
const assembly = await Stacks.synth({
|
|
137
138
|
increaseTimeout: args["increase-timeout"],
|
|
139
|
+
scriptVersion,
|
|
138
140
|
fn: project.stacks,
|
|
139
141
|
outDir: `.sst/cdk.out`,
|
|
140
142
|
mode: "dev",
|
package/constructs/App.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface AppDeployProps {
|
|
|
30
30
|
readonly region?: string;
|
|
31
31
|
readonly buildDir?: string;
|
|
32
32
|
readonly account?: string;
|
|
33
|
-
readonly
|
|
33
|
+
readonly debugScriptVersion?: string;
|
|
34
34
|
readonly debugIncreaseTimeout?: boolean;
|
|
35
35
|
readonly mode: "deploy" | "dev" | "remove";
|
|
36
36
|
readonly isActiveStack?: (stackName: string) => boolean;
|
|
@@ -66,7 +66,7 @@ export declare class App extends CDKApp {
|
|
|
66
66
|
*/
|
|
67
67
|
readonly account: string;
|
|
68
68
|
/** @internal */
|
|
69
|
-
readonly
|
|
69
|
+
readonly debugScriptVersion?: string;
|
|
70
70
|
/** @internal */
|
|
71
71
|
readonly debugIncreaseTimeout?: boolean;
|
|
72
72
|
/** @internal */
|
package/constructs/App.js
CHANGED
|
@@ -50,7 +50,7 @@ export class App extends CDKApp {
|
|
|
50
50
|
*/
|
|
51
51
|
account;
|
|
52
52
|
/** @internal */
|
|
53
|
-
|
|
53
|
+
debugScriptVersion;
|
|
54
54
|
/** @internal */
|
|
55
55
|
debugIncreaseTimeout;
|
|
56
56
|
/** @internal */
|
|
@@ -82,7 +82,7 @@ export class App extends CDKApp {
|
|
|
82
82
|
this.isActiveStack = deployProps.isActiveStack;
|
|
83
83
|
this.defaultFunctionProps = [];
|
|
84
84
|
if (this.mode === "dev") {
|
|
85
|
-
this.
|
|
85
|
+
this.debugScriptVersion = deployProps.debugScriptVersion;
|
|
86
86
|
this.debugIncreaseTimeout = deployProps.debugIncreaseTimeout;
|
|
87
87
|
}
|
|
88
88
|
}
|
package/constructs/Script.js
CHANGED
|
@@ -144,9 +144,8 @@ export class Script extends Construct {
|
|
|
144
144
|
// when rebuilding infrastructure. Otherwise, there will always be
|
|
145
145
|
// a change when rebuilding infrastructure b/c the "version" property
|
|
146
146
|
// changes on each build.
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
: this.props.version ?? Date.now().toString();
|
|
147
|
+
const defaultVersion = app.mode === "dev" ? app.debugScriptVersion : Date.now().toString();
|
|
148
|
+
const version = this.props.version ?? defaultVersion;
|
|
150
149
|
new CustomResource(this, "ScriptResource", {
|
|
151
150
|
serviceToken: crFunction.functionArn,
|
|
152
151
|
resourceType: "Custom::SSTScript",
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -5151,6 +5151,7 @@ async function synth(opts) {
|
|
|
5151
5151
|
region: project.config.region,
|
|
5152
5152
|
mode: opts.mode,
|
|
5153
5153
|
debugIncreaseTimeout: opts.increaseTimeout,
|
|
5154
|
+
debugScriptVersion: opts.scriptVersion,
|
|
5154
5155
|
isActiveStack: opts.isActiveStack
|
|
5155
5156
|
},
|
|
5156
5157
|
{
|
|
@@ -7140,6 +7141,7 @@ var dev = (program2) => program2.command(
|
|
|
7140
7141
|
const useStackBuilder = Context2.memo(async () => {
|
|
7141
7142
|
const watcher = useWatcher2();
|
|
7142
7143
|
const project = useProject2();
|
|
7144
|
+
const scriptVersion = Date.now().toString();
|
|
7143
7145
|
let lastDeployed;
|
|
7144
7146
|
let isWorking = false;
|
|
7145
7147
|
let isDirty = false;
|
|
@@ -7163,6 +7165,7 @@ var dev = (program2) => program2.command(
|
|
|
7163
7165
|
project.stacks = sstConfig.stacks;
|
|
7164
7166
|
const assembly = await Stacks.synth({
|
|
7165
7167
|
increaseTimeout: args["increase-timeout"],
|
|
7168
|
+
scriptVersion,
|
|
7166
7169
|
fn: project.stacks,
|
|
7167
7170
|
outDir: `.sst/cdk.out`,
|
|
7168
7171
|
mode: "dev"
|
package/stacks/synth.d.ts
CHANGED
package/stacks/synth.js
CHANGED