sst 2.11.14 → 2.11.17
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/constructs/Job.js
CHANGED
|
@@ -215,6 +215,7 @@ export class Job extends Construct {
|
|
|
215
215
|
`console.log("// End of the job //")`,
|
|
216
216
|
`console.log("//////////////////////")`,
|
|
217
217
|
`console.log("")`,
|
|
218
|
+
`process.exit(0)`,
|
|
218
219
|
].join("\n"));
|
|
219
220
|
const code = AssetCode.fromAsset(result.out);
|
|
220
221
|
this.updateCodeBuildProjectCode(code, "handler-wrapper.mjs");
|
package/constructs/RDS.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface RDSProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* Database engine of the cluster. Cannot be changed once set.
|
|
15
15
|
*/
|
|
16
|
-
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13";
|
|
16
|
+
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13" | "postgresql11.16";
|
|
17
17
|
/**
|
|
18
18
|
* Name of a database which is automatically created inside the cluster.
|
|
19
19
|
*/
|
|
@@ -191,7 +191,7 @@ export declare class RDS extends Construct implements SSTConstruct {
|
|
|
191
191
|
getConstructMetadata(): {
|
|
192
192
|
type: "RDS";
|
|
193
193
|
data: {
|
|
194
|
-
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13";
|
|
194
|
+
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13" | "postgresql11.16";
|
|
195
195
|
secretArn: string;
|
|
196
196
|
types: RDSTypes | undefined;
|
|
197
197
|
clusterArn: string;
|
package/constructs/RDS.js
CHANGED
|
@@ -204,7 +204,12 @@ export class RDS extends Construct {
|
|
|
204
204
|
version: rds.AuroraPostgresEngineVersion.VER_11_13,
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
else if (engine === "postgresql11.16") {
|
|
208
|
+
return rds.DatabaseClusterEngine.auroraPostgres({
|
|
209
|
+
version: rds.AuroraPostgresEngineVersion.VER_11_16,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
throw new Error(`The specified "engine" is not supported for sst.RDS. Only mysql5.6, mysql5.7, postgresql11.13, and postgresql11.16 engines are currently supported.`);
|
|
208
213
|
}
|
|
209
214
|
getScaling(scaling) {
|
|
210
215
|
return {
|
package/package.json
CHANGED
|
@@ -85,12 +85,15 @@ function isBinaryType(contentType) {
|
|
|
85
85
|
|
|
86
86
|
function convertCfRequestToNode(event) {
|
|
87
87
|
const request = event.Records[0].cf.request;
|
|
88
|
+
if (request.headers["x-forwarded-host"]) {
|
|
89
|
+
request.headers.host = request.headers["x-forwarded-host"];
|
|
90
|
+
}
|
|
88
91
|
|
|
89
|
-
const host = request.headers["host"]
|
|
90
|
-
? request.headers["host"][0].value
|
|
91
|
-
: undefined;
|
|
92
92
|
const search = request.querystring.length ? `?${request.querystring}` : "";
|
|
93
|
-
const url = new URL(
|
|
93
|
+
const url = new URL(
|
|
94
|
+
request.uri + search,
|
|
95
|
+
`https://${request.headers["host"][0].value}`
|
|
96
|
+
);
|
|
94
97
|
|
|
95
98
|
// Build headers
|
|
96
99
|
const headers = new NodeHeaders();
|
|
@@ -83,11 +83,13 @@ function isBinaryType(contentType) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
function convertApigRequestToNode(event) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
if (event.headers["x-forwarded-host"]) {
|
|
87
|
+
event.headers.host = event.headers["x-forwarded-host"];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const search = event.rawQueryString.length ? `?${event.rawQueryString}` : "";
|
|
91
|
+
const url = new URL(event.rawPath + search, `https://${event.headers.host}`);
|
|
92
|
+
const isFormData = event.headers["content-type"]?.includes(
|
|
91
93
|
"multipart/form-data"
|
|
92
94
|
);
|
|
93
95
|
|