sst 2.12.2 → 2.13.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/local/server.js +0 -4
- package/constructs/EventBus.d.ts +1 -1
- package/constructs/EventBus.js +6 -4
- package/constructs/Queue.js +0 -2
- package/constructs/RDS.d.ts +2 -2
- package/constructs/RDS.js +6 -1
- package/package.json +1 -1
- package/sst.mjs +0 -4
package/cli/local/server.js
CHANGED
|
@@ -126,10 +126,6 @@ export async function useLocalServer(opts) {
|
|
|
126
126
|
};
|
|
127
127
|
},
|
|
128
128
|
});
|
|
129
|
-
process.on("SIGTERM", () => {
|
|
130
|
-
handler.broadcastReconnectNotification();
|
|
131
|
-
wss.close();
|
|
132
|
-
});
|
|
133
129
|
const bus = useBus();
|
|
134
130
|
const pending = [];
|
|
135
131
|
function updateState(cb) {
|
package/constructs/EventBus.d.ts
CHANGED
|
@@ -435,7 +435,7 @@ export declare class EventBus extends Construct implements SSTConstruct {
|
|
|
435
435
|
private addLogGroupTarget;
|
|
436
436
|
private addCdkFunctionTarget;
|
|
437
437
|
private subs;
|
|
438
|
-
subscribe(type: string, target: FunctionDefinition, props?: {
|
|
438
|
+
subscribe(type: string | string[], target: FunctionDefinition, props?: {
|
|
439
439
|
retries?: number;
|
|
440
440
|
}): this;
|
|
441
441
|
private addFunctionTarget;
|
package/constructs/EventBus.js
CHANGED
|
@@ -354,9 +354,11 @@ export class EventBus extends Construct {
|
|
|
354
354
|
}
|
|
355
355
|
subs = new Map();
|
|
356
356
|
subscribe(type, target, props) {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
const
|
|
357
|
+
type = Array.isArray(type) ? type : [type];
|
|
358
|
+
const joined = type.length > 1 ? "multi" : type.join("_");
|
|
359
|
+
const count = this.subs.get(joined) || 0 + 1;
|
|
360
|
+
this.subs.set(joined, count);
|
|
361
|
+
const name = `${joined.replaceAll(/[^a-zA-Z_]/g, "_")}_${count}`;
|
|
360
362
|
const retries = props?.retries || this.props.defaults?.retries;
|
|
361
363
|
const fn = (() => {
|
|
362
364
|
if (retries) {
|
|
@@ -373,7 +375,7 @@ export class EventBus extends Construct {
|
|
|
373
375
|
})();
|
|
374
376
|
this.addRule(this, name + "_rule", {
|
|
375
377
|
pattern: {
|
|
376
|
-
detailType:
|
|
378
|
+
detailType: type,
|
|
377
379
|
},
|
|
378
380
|
targets: {
|
|
379
381
|
[name + "_target"]: {
|
package/constructs/Queue.js
CHANGED
|
@@ -188,8 +188,6 @@ export class Queue extends Construct {
|
|
|
188
188
|
if (root.debugIncreaseTimeout) {
|
|
189
189
|
if (!sqsQueueProps.visibilityTimeout ||
|
|
190
190
|
sqsQueueProps.visibilityTimeout.toSeconds() < 900) {
|
|
191
|
-
// TODO
|
|
192
|
-
console.log(toCdkDuration("900 seconds"));
|
|
193
191
|
debugOverrideProps = {
|
|
194
192
|
visibilityTimeout: toCdkDuration("900 seconds"),
|
|
195
193
|
};
|
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" | "postgresql11.16";
|
|
16
|
+
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13" | "postgresql11.16" | "postgresql13.9";
|
|
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" | "postgresql11.16";
|
|
194
|
+
engine: "mysql5.6" | "mysql5.7" | "postgresql10.14" | "postgresql11.13" | "postgresql11.16" | "postgresql13.9";
|
|
195
195
|
secretArn: string;
|
|
196
196
|
types: RDSTypes | undefined;
|
|
197
197
|
clusterArn: string;
|
package/constructs/RDS.js
CHANGED
|
@@ -209,7 +209,12 @@ export class RDS extends Construct {
|
|
|
209
209
|
version: rds.AuroraPostgresEngineVersion.VER_11_16,
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
else if (engine === "postgresql13.9") {
|
|
213
|
+
return rds.DatabaseClusterEngine.auroraPostgres({
|
|
214
|
+
version: rds.AuroraPostgresEngineVersion.VER_13_9,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
throw new Error(`The specified "engine" is not supported for sst.RDS. Only mysql5.6, mysql5.7, postgresql11.13, postgresql11.16, and postgres13.9 engines are currently supported.`);
|
|
213
218
|
}
|
|
214
219
|
getScaling(scaling) {
|
|
215
220
|
return {
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -5673,10 +5673,6 @@ async function useLocalServer(opts) {
|
|
|
5673
5673
|
};
|
|
5674
5674
|
}
|
|
5675
5675
|
});
|
|
5676
|
-
process.on("SIGTERM", () => {
|
|
5677
|
-
handler.broadcastReconnectNotification();
|
|
5678
|
-
wss.close();
|
|
5679
|
-
});
|
|
5680
5676
|
const bus = useBus();
|
|
5681
5677
|
const pending = [];
|
|
5682
5678
|
function updateState(cb) {
|