sst 2.43.4 → 2.43.5
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/bootstrap.js +4 -1
- package/constructs/RDS.d.ts +1 -0
- package/constructs/RDS.js +8 -5
- package/node/auth/adapter/link.d.ts +1 -0
- package/node/auth/adapter/link.js +1 -1
- package/package.json +2 -2
- package/project.d.ts +1 -0
- package/runtime/handlers/node.js +4 -1
- package/support/python-runtime/Dockerfile +1 -1
- package/support/python-runtime/Dockerfile.custom +1 -1
- package/support/python-runtime/Dockerfile.dependencies +1 -1
- package/support/signing-function/index.mjs +1 -1
package/bootstrap.js
CHANGED
|
@@ -18,6 +18,7 @@ import { Stacks } from "./stacks/index.js";
|
|
|
18
18
|
import { lazy } from "./util/lazy.js";
|
|
19
19
|
const CDK_STACK_NAME = "CDKToolkit";
|
|
20
20
|
const SST_STACK_NAME = "SSTBootstrap";
|
|
21
|
+
const SST_STACK_DESCRIPTION = "This stack includes resources needed to deploy SST apps into this environment";
|
|
21
22
|
const OUTPUT_VERSION = "Version";
|
|
22
23
|
const OUTPUT_BUCKET = "BucketName";
|
|
23
24
|
const LATEST_VERSION = "7.3";
|
|
@@ -72,7 +73,7 @@ async function loadCDKStatus() {
|
|
|
72
73
|
return { status: "bootstrap" };
|
|
73
74
|
}
|
|
74
75
|
// Check CDK bootstrap stack is up to date
|
|
75
|
-
// note: there is no a
|
|
76
|
+
// note: there is no a programmatic way to get the minimal required version
|
|
76
77
|
// of CDK bootstrap stack. We are going to hardcode it to 14 for now,
|
|
77
78
|
// which is the latest version as of CDK v2.62.2
|
|
78
79
|
let version;
|
|
@@ -155,10 +156,12 @@ export async function bootstrapSST(cdkBucket) {
|
|
|
155
156
|
// Create bootstrap stack
|
|
156
157
|
const app = new App();
|
|
157
158
|
const stackName = bootstrap?.stackName || SST_STACK_NAME;
|
|
159
|
+
const stackDescription = bootstrap?.stackDescription || SST_STACK_DESCRIPTION;
|
|
158
160
|
const stack = new Stack(app, stackName, {
|
|
159
161
|
env: {
|
|
160
162
|
region,
|
|
161
163
|
},
|
|
164
|
+
description: stackDescription,
|
|
162
165
|
synthesizer: new DefaultStackSynthesizer({
|
|
163
166
|
qualifier: cdk?.qualifier,
|
|
164
167
|
bootstrapStackVersionSsmParameter: cdk?.bootstrapStackVersionSsmParameter,
|
package/constructs/RDS.d.ts
CHANGED
|
@@ -205,6 +205,7 @@ export declare class RDS extends Construct implements SSTConstruct {
|
|
|
205
205
|
};
|
|
206
206
|
/** @internal */
|
|
207
207
|
getBindings(): BindingProps;
|
|
208
|
+
runMigrations(migrations: string, database?: string): void;
|
|
208
209
|
private validateRequiredProps;
|
|
209
210
|
private validateCDKPropWhenIsConstruct;
|
|
210
211
|
private validateCDKPropWhenIsClusterProps;
|
package/constructs/RDS.js
CHANGED
|
@@ -59,9 +59,7 @@ export class RDS extends Construct {
|
|
|
59
59
|
}
|
|
60
60
|
// Create the migrator function
|
|
61
61
|
if (migrations) {
|
|
62
|
-
this.
|
|
63
|
-
this.createMigrationsFunction(migrations);
|
|
64
|
-
this.createMigrationCustomResource(migrations);
|
|
62
|
+
this.runMigrations(migrations);
|
|
65
63
|
}
|
|
66
64
|
const app = this.node.root;
|
|
67
65
|
app.registerTypes(this);
|
|
@@ -150,6 +148,11 @@ export class RDS extends Construct {
|
|
|
150
148
|
},
|
|
151
149
|
};
|
|
152
150
|
}
|
|
151
|
+
runMigrations(migrations, database) {
|
|
152
|
+
this.validateMigrationsFileExists(migrations);
|
|
153
|
+
this.createMigrationsFunction(migrations);
|
|
154
|
+
this.createMigrationCustomResource(migrations, database);
|
|
155
|
+
}
|
|
153
156
|
validateRequiredProps(props) {
|
|
154
157
|
if (!props.engine) {
|
|
155
158
|
throw new Error(`Missing "engine" in the "${this.node.id}" RDS`);
|
|
@@ -335,7 +338,7 @@ export class RDS extends Construct {
|
|
|
335
338
|
this.migratorFunction._overrideMetadataHandler =
|
|
336
339
|
"rds-migrator/index.handler";
|
|
337
340
|
}
|
|
338
|
-
createMigrationCustomResource(migrations) {
|
|
341
|
+
createMigrationCustomResource(migrations, database) {
|
|
339
342
|
const app = this.node.root;
|
|
340
343
|
// Create custom resource handler
|
|
341
344
|
const handler = new Function(this, "MigrationHandler", {
|
|
@@ -367,7 +370,7 @@ export class RDS extends Construct {
|
|
|
367
370
|
properties: {
|
|
368
371
|
UserCreateFunction: app.mode === "dev" ? undefined : this.migratorFunction?.functionName,
|
|
369
372
|
UserUpdateFunction: app.mode === "dev" ? undefined : this.migratorFunction?.functionName,
|
|
370
|
-
UserParams: JSON.stringify({}),
|
|
373
|
+
UserParams: JSON.stringify({ database }),
|
|
371
374
|
MigrationsHash: hash,
|
|
372
375
|
},
|
|
373
376
|
});
|
|
@@ -3,6 +3,7 @@ interface LinkConfig {
|
|
|
3
3
|
onLink: (link: string, claims: Record<string, any>) => Promise<APIGatewayProxyStructuredResultV2>;
|
|
4
4
|
onSuccess: (claims: Record<string, any>) => Promise<APIGatewayProxyStructuredResultV2>;
|
|
5
5
|
onError: () => Promise<APIGatewayProxyStructuredResultV2>;
|
|
6
|
+
expiresInMs?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const LinkAdapter: (config: LinkConfig) => () => Promise<APIGatewayProxyStructuredResultV2>;
|
|
8
9
|
export {};
|
|
@@ -4,7 +4,7 @@ import { createAdapter } from "./adapter.js";
|
|
|
4
4
|
import { getPrivateKey, getPublicKey } from "../auth.js";
|
|
5
5
|
export const LinkAdapter = /* @__PURE__ */ createAdapter((config) => {
|
|
6
6
|
const signer = createSigner({
|
|
7
|
-
expiresIn: 1000 * 60 * 10,
|
|
7
|
+
expiresIn: config.expiresInMs || 1000 * 60 * 10,
|
|
8
8
|
key: getPrivateKey(),
|
|
9
9
|
algorithm: "RS512",
|
|
10
10
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.43.
|
|
4
|
+
"version": "2.43.5",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@types/ws": "^8.5.3",
|
|
119
119
|
"@types/yargs": "^17.0.13",
|
|
120
120
|
"archiver": "^5.3.1",
|
|
121
|
-
"astro-sst": "2.43.
|
|
121
|
+
"astro-sst": "2.43.5",
|
|
122
122
|
"async": "^3.2.4",
|
|
123
123
|
"tsx": "^3.12.1",
|
|
124
124
|
"typescript": "^5.2.2",
|
package/project.d.ts
CHANGED
package/runtime/handlers/node.js
CHANGED
|
@@ -208,13 +208,16 @@ export const useNodeHandler = () => {
|
|
|
208
208
|
}));
|
|
209
209
|
const cmd = [
|
|
210
210
|
"npm install",
|
|
211
|
-
"--platform=linux",
|
|
212
211
|
"--omit=dev",
|
|
213
212
|
"--no-optional",
|
|
214
213
|
"--force",
|
|
214
|
+
"--platform=linux",
|
|
215
215
|
input.props.architecture === "arm_64"
|
|
216
216
|
? "--arch=arm64"
|
|
217
217
|
: "--arch=x64",
|
|
218
|
+
// support npm versions 10 and above
|
|
219
|
+
"--os=linux",
|
|
220
|
+
input.props.architecture === "arm_64" ? "--cpu=arm64" : "--cpu=x64",
|
|
218
221
|
];
|
|
219
222
|
if (installPackages.includes("sharp")) {
|
|
220
223
|
/**
|
|
@@ -4,6 +4,6 @@ ARG IMAGE=amazon/aws-sam-cli-build-image-python3.7
|
|
|
4
4
|
FROM $IMAGE
|
|
5
5
|
|
|
6
6
|
# Ensure rsync is installed
|
|
7
|
-
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync
|
|
7
|
+
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync || dnf repoquery --installed rsync &>/dev/null || dnf install -y rsync
|
|
8
8
|
|
|
9
9
|
CMD [ "python" ]
|
|
@@ -4,7 +4,7 @@ ARG IMAGE=amazon/aws-sam-cli-build-image-python3.7
|
|
|
4
4
|
FROM $IMAGE
|
|
5
5
|
|
|
6
6
|
# Ensure rsync is installed
|
|
7
|
-
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync
|
|
7
|
+
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync || dnf repoquery --installed rsync &>/dev/null || dnf install -y rsync
|
|
8
8
|
|
|
9
9
|
# Upgrade pip (required by cryptography v3.4 and above, which is a dependency of poetry)
|
|
10
10
|
RUN pip install --upgrade pip
|
|
@@ -4,7 +4,7 @@ ARG IMAGE=amazon/aws-sam-cli-build-image-python3.7
|
|
|
4
4
|
FROM $IMAGE
|
|
5
5
|
|
|
6
6
|
# Ensure rsync is installed
|
|
7
|
-
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync
|
|
7
|
+
RUN yum -q list installed rsync &>/dev/null || yum install -y rsync || dnf repoquery --installed rsync &>/dev/null || dnf install -y rsync
|
|
8
8
|
|
|
9
9
|
# Upgrade pip (required by cryptography v3.4 and above, which is a dependency of poetry)
|
|
10
10
|
RUN pip install --upgrade pip
|
|
@@ -3776,7 +3776,7 @@ var queryStringToQueryParameterBag = (queryString) => {
|
|
|
3776
3776
|
const key = split[0];
|
|
3777
3777
|
const value = split[1];
|
|
3778
3778
|
if (query[key] === void 0 || query[key] === null) {
|
|
3779
|
-
query[key] = value ? decodeURIComponent(value) :
|
|
3779
|
+
query[key] = value ? decodeURIComponent(value) : "";
|
|
3780
3780
|
continue;
|
|
3781
3781
|
}
|
|
3782
3782
|
if (value === void 0 || value === "") {
|