sst 2.5.4 → 2.5.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.
Files changed (52) hide show
  1. package/cli/commands/bind.js +89 -64
  2. package/cli/commands/version.js +1 -0
  3. package/constructs/Api.d.ts +1 -1
  4. package/constructs/Api.js +1 -1
  5. package/constructs/ApiGatewayV1Api.d.ts +1 -1
  6. package/constructs/ApiGatewayV1Api.js +1 -1
  7. package/constructs/AppSyncApi.d.ts +1 -1
  8. package/constructs/AppSyncApi.js +1 -1
  9. package/constructs/Auth.d.ts +1 -1
  10. package/constructs/Auth.js +1 -1
  11. package/constructs/Bucket.d.ts +1 -1
  12. package/constructs/Bucket.js +1 -1
  13. package/constructs/Cognito.d.ts +1 -1
  14. package/constructs/Cognito.js +1 -1
  15. package/constructs/Cron.d.ts +1 -1
  16. package/constructs/Cron.js +1 -1
  17. package/constructs/EventBus.d.ts +1 -1
  18. package/constructs/EventBus.js +1 -1
  19. package/constructs/Function.d.ts +1 -1
  20. package/constructs/Function.js +1 -1
  21. package/constructs/Job.d.ts +38 -2
  22. package/constructs/Job.js +4 -2
  23. package/constructs/KinesisStream.d.ts +1 -1
  24. package/constructs/KinesisStream.js +1 -1
  25. package/constructs/Parameter.d.ts +1 -1
  26. package/constructs/Parameter.js +1 -1
  27. package/constructs/Queue.d.ts +1 -1
  28. package/constructs/Queue.js +1 -1
  29. package/constructs/RDS.d.ts +2 -2
  30. package/constructs/RDS.js +1 -1
  31. package/constructs/Script.d.ts +2 -2
  32. package/constructs/Script.js +1 -1
  33. package/constructs/Secret.d.ts +1 -1
  34. package/constructs/Secret.js +1 -1
  35. package/constructs/Stack.d.ts +1 -1
  36. package/constructs/Stack.js +1 -1
  37. package/constructs/StaticSite.d.ts +1 -1
  38. package/constructs/StaticSite.js +1 -1
  39. package/constructs/Table.d.ts +1 -1
  40. package/constructs/Table.js +1 -1
  41. package/constructs/Topic.d.ts +1 -1
  42. package/constructs/Topic.js +1 -1
  43. package/constructs/WebSocketApi.d.ts +1 -1
  44. package/constructs/WebSocketApi.js +1 -1
  45. package/constructs/future/Auth.d.ts +1 -1
  46. package/constructs/future/Auth.js +1 -1
  47. package/package.json +1 -1
  48. package/project.d.ts +1 -0
  49. package/project.js +7 -2
  50. package/sst.mjs +93 -63
  51. package/support/bootstrap-metadata-function/index.mjs +238 -238
  52. package/support/custom-resources/index.mjs +238 -238
@@ -1,12 +1,7 @@
1
1
  import path from "path";
2
2
  import { VisibleError } from "../../error.js";
3
- const SSR_SITE_CONFIG = {
4
- NextjsSite: "next.config",
5
- AstroSite: "astro.config",
6
- RemixSite: "remix.config",
7
- SolidStartSite: "vite.config",
8
- SlsNextjsSite: "next.config",
9
- };
3
+ class OutdatedMetadataError extends Error {
4
+ }
10
5
  export const bind = (program) => program
11
6
  .command(["bind <command..>", "env <command..>"], "Bind your app's resources to a command", (yargs) => yargs
12
7
  .array("command")
@@ -25,54 +20,80 @@ export const bind = (program) => program
25
20
  const bus = useBus();
26
21
  const project = useProject();
27
22
  const command = args.command?.join(" ");
28
- const isSsrSite = await isRunningInSsrSite();
23
+ const isSite = await isRunningInSite();
29
24
  let p;
30
25
  let timer;
31
26
  let siteConfigCache;
32
27
  // Handle missing command
33
28
  if (!command) {
34
- throw new VisibleError(`Command is required, e.g. sst bind ${isSsrSite ? "next dev" : "env"}`);
29
+ throw new VisibleError(`Command is required, e.g. sst bind ${isSite ? "next dev" : "vitest run"}`);
35
30
  }
36
31
  // Bind script
37
- const initialMetadata = await getSiteMetadata();
38
- if (!initialMetadata && !isSsrSite) {
32
+ if (!isSite) {
39
33
  Logger.debug("Running in script mode.");
40
34
  return await bindScript();
41
35
  }
42
36
  // Bind site
43
- await bindSite("init");
37
+ try {
38
+ await bindSite("init");
39
+ }
40
+ catch (e) {
41
+ // Bind script (fallback)
42
+ if (e instanceof OutdatedMetadataError) {
43
+ Colors.line(Colors.warning("Warning: This was deployed with an old version of SST. Run `sst dev` or `sst deploy` to update."));
44
+ return await bindScript();
45
+ }
46
+ throw e;
47
+ }
44
48
  bus.subscribe("stacks.metadata.updated", () => bindSite("metadata_updated"));
45
49
  bus.subscribe("stacks.metadata.deleted", () => bindSite("metadata_updated"));
46
50
  bus.subscribe("config.secret.updated", (payload) => {
47
51
  const secretName = payload.properties.name;
48
- if (siteConfigCache?.secrets === undefined)
49
- return;
50
- if (!siteConfigCache.secrets.includes(secretName))
52
+ if (!(siteConfigCache?.secrets || []).includes(secretName))
51
53
  return;
52
54
  Colors.line(`\n`, `SST secrets have been updated. Restarting \`${command}\`...`);
53
55
  bindSite("secrets_updated");
54
56
  });
55
- async function isRunningInSsrSite() {
57
+ async function isRunningInSite() {
56
58
  const { existsAsync } = await import("../../util/fs.js");
57
59
  const { readFile } = await import("fs/promises");
58
- const results = await Promise.all(Object.values(SSR_SITE_CONFIG)
59
- .map((config) => [".js", ".cjs", ".mjs", ".ts"].map(async (ext) => {
60
- const exists = await existsAsync(`${config}${ext}`);
61
- if (exists && config === "vite.config") {
62
- const content = await readFile(`${config}${ext}`);
63
- return content.includes("solid-start");
64
- }
65
- return exists;
66
- }))
67
- .flat());
60
+ const SITE_CONFIGS = [
61
+ { file: "next.config", multiExtension: true },
62
+ { file: "astro.config", multiExtension: true },
63
+ { file: "remix.config", multiExtension: true },
64
+ { file: "svelte.config", multiExtension: true },
65
+ { file: "gatsby-config", multiExtension: true },
66
+ { file: "angular.json" },
67
+ { file: "ember-cli-build.js" },
68
+ {
69
+ file: "vite.config",
70
+ multiExtension: true,
71
+ match: /solid-start|plugin-vue|plugin-react|@preact\/preset-vite/,
72
+ },
73
+ { file: "package.json", match: /react-scripts/ },
74
+ { file: "index.html" }, // plain HTML
75
+ ];
76
+ const results = await Promise.all(SITE_CONFIGS.map((site) => {
77
+ const files = site.multiExtension
78
+ ? [".js", ".cjs", ".mjs", ".ts"].map((ext) => `${site.file}${ext}`)
79
+ : [site.file];
80
+ return files.map(async (file) => {
81
+ const exists = await existsAsync(file);
82
+ if (!exists)
83
+ return false;
84
+ if (site.match) {
85
+ const content = await readFile(file);
86
+ return content.toString().match(site.match);
87
+ }
88
+ return true;
89
+ });
90
+ }).flat());
68
91
  return results.some(Boolean);
69
92
  }
70
93
  async function bindSite(reason) {
71
94
  // Get metadata
72
- const siteMetadata = (reason === "init"
73
- ? initialMetadata
74
- : await getSiteMetadataUntilAvailable());
75
- const siteConfig = await parseSiteConfig(siteMetadata);
95
+ const siteMetadata = await getSiteMetadataUntilAvailable();
96
+ const siteConfig = await parseSiteMetadata(siteMetadata);
76
97
  // Handle rebind due to metadata updated
77
98
  if (reason === "metadata_updated") {
78
99
  if (areEnvsSame(siteConfig.envs, siteConfigCache?.envs || {}))
@@ -113,25 +134,6 @@ export const bind = (program) => program
113
134
  ...(await localIamCredentials()),
114
135
  });
115
136
  }
116
- async function parseSiteConfig(metadata) {
117
- const { LambdaClient, GetFunctionCommand } = await import("@aws-sdk/client-lambda");
118
- const { useAWSClient } = await import("../../credentials.js");
119
- const isBindSupported = metadata.type !== "StaticSite" && metadata.type !== "SlsNextjsSite";
120
- // Handle StaticSite
121
- if (!isBindSupported) {
122
- return { envs: metadata.data.environment };
123
- }
124
- // Get function details
125
- const lambda = useAWSClient(LambdaClient);
126
- const { Configuration: functionConfig } = await lambda.send(new GetFunctionCommand({
127
- FunctionName: metadata.data.server,
128
- }));
129
- return {
130
- role: functionConfig?.Role,
131
- envs: functionConfig?.Environment?.Variables || {},
132
- secrets: metadata.data.secrets,
133
- };
134
- }
135
137
  async function getSiteMetadataUntilAvailable() {
136
138
  const { createSpinner } = await import("../spinner.js");
137
139
  const spinner = createSpinner({});
@@ -139,18 +141,7 @@ export const bind = (program) => program
139
141
  const data = await getSiteMetadata();
140
142
  // Handle site metadata not found
141
143
  if (!data) {
142
- spinner.start(
143
- //"Waiting for SST to start for the first time. Run `sst dev`..."
144
- //"Run `sst dev` for the first time. Waiting..."
145
- "Make sure `sst dev` is running...");
146
- await new Promise((resolve) => setTimeout(resolve, 1000));
147
- continue;
148
- }
149
- // Handle site metadata is old
150
- const isBindSupported = data.type !== "StaticSite" && data.type !== "SlsNextjsSite";
151
- if ((isBindSupported && !data.data.server) ||
152
- (!isBindSupported && !data.data.environment)) {
153
- spinner.start("This was deployed with an old version of SST. Make sure to restart `sst dev`...");
144
+ spinner.start("Make sure `sst dev` is running...");
154
145
  await new Promise((resolve) => setTimeout(resolve, 1000));
155
146
  continue;
156
147
  }
@@ -163,9 +154,43 @@ export const bind = (program) => program
163
154
  const metadataData = await metadata();
164
155
  return Object.values(metadataData)
165
156
  .flat()
166
- .filter((c) => Boolean(c))
167
- .filter((c) => c.type === "StaticSite" || Boolean(SSR_SITE_CONFIG[c.type]))
168
- .find((c) => path.resolve(project.paths.root, c.data.path) === process.cwd());
157
+ .filter((c) => [
158
+ "StaticSite",
159
+ "NextjsSite",
160
+ "AstroSite",
161
+ "RemixSite",
162
+ "SolidStartSite",
163
+ "SlsNextjsSite",
164
+ ].includes(c.type))
165
+ .find((c) => {
166
+ // Handle metadata prior to SST v2.3.0 doesn't have path
167
+ const isSsr = c.type !== "StaticSite" && c.type !== "SlsNextjsSite";
168
+ if (!c.data.path ||
169
+ (isSsr && !c.data.server) ||
170
+ (!isSsr && !c.data.environment)) {
171
+ throw new OutdatedMetadataError();
172
+ }
173
+ return (path.resolve(project.paths.root, c.data.path) === process.cwd());
174
+ });
175
+ }
176
+ async function parseSiteMetadata(metadata) {
177
+ const { LambdaClient, GetFunctionCommand } = await import("@aws-sdk/client-lambda");
178
+ const { useAWSClient } = await import("../../credentials.js");
179
+ const isBindSupported = metadata.type !== "StaticSite" && metadata.type !== "SlsNextjsSite";
180
+ // Handle StaticSite
181
+ if (!isBindSupported) {
182
+ return { envs: metadata.data.environment };
183
+ }
184
+ // Get function details
185
+ const lambda = useAWSClient(LambdaClient);
186
+ const { Configuration: functionConfig } = await lambda.send(new GetFunctionCommand({
187
+ FunctionName: metadata.data.server,
188
+ }));
189
+ return {
190
+ role: functionConfig?.Role,
191
+ envs: functionConfig?.Environment?.Variables || {},
192
+ secrets: metadata.data.secrets,
193
+ };
169
194
  }
170
195
  async function assumeSsrRole(roleArn) {
171
196
  const { STSClient, AssumeRoleCommand } = await import("@aws-sdk/client-sts");
@@ -4,4 +4,5 @@ export const version = (program) => program.command("version", "Print SST and CD
4
4
  const project = useProject();
5
5
  Colors.line(Colors.bold(`SST:`), `v${project.version}`);
6
6
  Colors.line(Colors.bold(`CDK:`), `v${project.cdkVersion}`);
7
+ Colors.line(Colors.bold(`Constructs:`), `v${project.constructsVersion}`);
7
8
  });
@@ -594,7 +594,7 @@ export interface ApiGraphQLRouteProps<AuthorizerKeys> extends ApiBaseRouteProps<
594
594
  * @example
595
595
  *
596
596
  * ```ts
597
- * import { Api } from "@serverless-stack/resources";
597
+ * import { Api } from "sst/constructs";
598
598
  *
599
599
  * new Api(stack, "Api", {
600
600
  * routes: {
package/constructs/Api.js CHANGED
@@ -22,7 +22,7 @@ const PayloadFormatVersions = ["1.0", "2.0"];
22
22
  * @example
23
23
  *
24
24
  * ```ts
25
- * import { Api } from "@serverless-stack/resources";
25
+ * import { Api } from "sst/constructs";
26
26
  *
27
27
  * new Api(stack, "Api", {
28
28
  * routes: {
@@ -461,7 +461,7 @@ export interface ApiGatewayV1ApiCustomDomainProps {
461
461
  * @example
462
462
  *
463
463
  * ```js
464
- * import { ApiGatewayV1Api } from "@serverless-stack/resources";
464
+ * import { ApiGatewayV1Api } from "sst/constructs";
465
465
  *
466
466
  * new ApiGatewayV1Api(stack, "Api", {
467
467
  * routes: {
@@ -31,7 +31,7 @@ const allowedMethods = [
31
31
  * @example
32
32
  *
33
33
  * ```js
34
- * import { ApiGatewayV1Api } from "@serverless-stack/resources";
34
+ * import { ApiGatewayV1Api } from "sst/constructs";
35
35
  *
36
36
  * new ApiGatewayV1Api(stack, "Api", {
37
37
  * routes: {
@@ -372,7 +372,7 @@ export interface AppSyncApiCdkGraphqlProps extends Omit<GraphqlApiProps, "name"
372
372
  * @example
373
373
  *
374
374
  * ```js
375
- * import { AppSyncApi } from "@serverless-stack/resources";
375
+ * import { AppSyncApi } from "sst/constructs";
376
376
  *
377
377
  * new AppSyncApi(stack, "GraphqlApi", {
378
378
  * schema: "graphql/schema.graphql",
@@ -26,7 +26,7 @@ import { GraphqlApi, MappingTemplate as CDKMappingTemplate, SchemaFile, } from "
26
26
  * @example
27
27
  *
28
28
  * ```js
29
- * import { AppSyncApi } from "@serverless-stack/resources";
29
+ * import { AppSyncApi } from "sst/constructs";
30
30
  *
31
31
  * new AppSyncApi(stack, "GraphqlApi", {
32
32
  * schema: "graphql/schema.graphql",
@@ -54,7 +54,7 @@ export interface ApiAttachmentProps {
54
54
  * SST Auth is a lightweight authentication solution for your applications. With a simple set of configuration you can deploy a function attached to your API that can handle various authentication flows. *
55
55
  * @example
56
56
  * ```
57
- * import { Auth } from "@serverless-stack/resources"
57
+ * import { Auth } from "sst/constructs"
58
58
  *
59
59
  * new Auth(stack, "auth", {
60
60
  * authenticator: "functions/authenticator.handler"
@@ -11,7 +11,7 @@ const PREFIX_PROP = "prefix";
11
11
  * SST Auth is a lightweight authentication solution for your applications. With a simple set of configuration you can deploy a function attached to your API that can handle various authentication flows. *
12
12
  * @example
13
13
  * ```
14
- * import { Auth } from "@serverless-stack/resources"
14
+ * import { Auth } from "sst/constructs"
15
15
  *
16
16
  * new Auth(stack, "auth", {
17
17
  * authenticator: "functions/authenticator.handler"
@@ -228,7 +228,7 @@ export interface BucketProps {
228
228
  * @example
229
229
  *
230
230
  * ```js
231
- * import { Bucket } from "@serverless-stack/resources";
231
+ * import { Bucket } from "sst/constructs";
232
232
  *
233
233
  * new Bucket(stack, "Bucket");
234
234
  * ```
@@ -15,7 +15,7 @@ import { LambdaDestination, SnsDestination, SqsDestination, } from "aws-cdk-lib/
15
15
  * @example
16
16
  *
17
17
  * ```js
18
- * import { Bucket } from "@serverless-stack/resources";
18
+ * import { Bucket } from "sst/constructs";
19
19
  *
20
20
  * new Bucket(stack, "Bucket");
21
21
  * ```
@@ -125,7 +125,7 @@ export interface CognitoProps {
125
125
  * @example
126
126
  *
127
127
  * ```js
128
- * import { Cognito } from "@serverless-stack/resources";
128
+ * import { Cognito } from "sst/constructs";
129
129
  *
130
130
  * new Cognito(stack, "Cognito");
131
131
  * ```
@@ -28,7 +28,7 @@ const CognitoUserPoolTriggerOperationMapping = {
28
28
  * @example
29
29
  *
30
30
  * ```js
31
- * import { Cognito } from "@serverless-stack/resources";
31
+ * import { Cognito } from "sst/constructs";
32
32
  *
33
33
  * new Cognito(stack, "Cognito");
34
34
  * ```
@@ -102,7 +102,7 @@ export interface CronProps {
102
102
  * @example
103
103
  *
104
104
  * ```js
105
- * import { Cron } from "@serverless-stack/resources";
105
+ * import { Cron } from "sst/constructs";
106
106
  *
107
107
  * new Cron(stack, "Cron", {
108
108
  * schedule: "rate(1 minute)",
@@ -12,7 +12,7 @@ import { Function as Func, } from "./Function.js";
12
12
  * @example
13
13
  *
14
14
  * ```js
15
- * import { Cron } from "@serverless-stack/resources";
15
+ * import { Cron } from "sst/constructs";
16
16
  *
17
17
  * new Cron(stack, "Cron", {
18
18
  * schedule: "rate(1 minute)",
@@ -258,7 +258,7 @@ export interface EventBusProps {
258
258
  * @example
259
259
  *
260
260
  * ```js
261
- * import { EventBus } from "@serverless-stack/resources";
261
+ * import { EventBus } from "sst/constructs";
262
262
  *
263
263
  * new EventBus(stack, "Bus", {
264
264
  * rules: {
@@ -13,7 +13,7 @@ import { Function as Fn, } from "./Function.js";
13
13
  * @example
14
14
  *
15
15
  * ```js
16
- * import { EventBus } from "@serverless-stack/resources";
16
+ * import { EventBus } from "sst/constructs";
17
17
  *
18
18
  * new EventBus(stack, "Bus", {
19
19
  * rules: {
@@ -527,7 +527,7 @@ export interface FunctionCopyFilesProps {
527
527
  * @example
528
528
  *
529
529
  * ```js
530
- * import { Function } from "@serverless-stack/resources";
530
+ * import { Function } from "sst/constructs";
531
531
  *
532
532
  * new Function(stack, "MySnsLambda", {
533
533
  * handler: "src/sns/index.main",
@@ -54,7 +54,7 @@ const supportedRuntimes = {
54
54
  * @example
55
55
  *
56
56
  * ```js
57
- * import { Function } from "@serverless-stack/resources";
57
+ * import { Function } from "sst/constructs";
58
58
  *
59
59
  * new Function(stack, "MySnsLambda", {
60
60
  * handler: "src/sns/index.main",
@@ -5,7 +5,7 @@ import { Function, NodeJSProps } from "./Function.js";
5
5
  import { Duration } from "./util/duration.js";
6
6
  import { Permissions } from "./util/permission.js";
7
7
  import { FunctionBindingProps } from "./util/functionBinding.js";
8
- import { IVpc } from "aws-cdk-lib/aws-ec2";
8
+ import { ISecurityGroup, IVpc, SubnetSelection } from "aws-cdk-lib/aws-ec2";
9
9
  export type JobMemorySize = "3 GB" | "7 GB" | "15 GB" | "145 GB";
10
10
  export interface JobNodeJSProps extends NodeJSProps {
11
11
  }
@@ -139,6 +139,42 @@ export interface JobProps {
139
139
  * ```
140
140
  */
141
141
  vpc?: IVpc;
142
+ /**
143
+ * Where to place the network interfaces within the VPC.
144
+ * @default All private subnets.
145
+ * @example
146
+ * ```js
147
+ * import { SubnetType } from "aws-cdk-lib/aws-ec2";
148
+ *
149
+ * new Job(stack, "MyJob", {
150
+ * handler: "src/job.handler",
151
+ * cdk: {
152
+ * vpc,
153
+ * vpcSubnets: { subnetType: SubnetType.PRIVATE_WITH_EGRESS }
154
+ * }
155
+ * })
156
+ * ```
157
+ */
158
+ vpcSubnets?: SubnetSelection;
159
+ /**
160
+ * The list of security groups to associate with the Job's network interfaces.
161
+ * @default A new security group is created.
162
+ * @example
163
+ * ```js
164
+ * import { SecurityGroup } from "aws-cdk-lib/aws-ec2";
165
+ *
166
+ * new Job(stack, "MyJob", {
167
+ * handler: "src/job.handler",
168
+ * cdk: {
169
+ * vpc,
170
+ * securityGroups: [
171
+ * new SecurityGroup(stack, "MyJobSG", { vpc })
172
+ * ]
173
+ * }
174
+ * })
175
+ * ```
176
+ */
177
+ securityGroups?: ISecurityGroup[];
142
178
  };
143
179
  }
144
180
  /**
@@ -147,7 +183,7 @@ export interface JobProps {
147
183
  * @example
148
184
  *
149
185
  * ```js
150
- * import { Cron } from "@serverless-stack/resources";
186
+ * import { Cron } from "sst/constructs";
151
187
  *
152
188
  * new Cron(stack, "Cron", {
153
189
  * schedule: "rate(1 minute)",
package/constructs/Job.js CHANGED
@@ -24,7 +24,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
24
24
  * @example
25
25
  *
26
26
  * ```js
27
- * import { Cron } from "@serverless-stack/resources";
27
+ * import { Cron } from "sst/constructs";
28
28
  *
29
29
  * new Cron(stack, "Cron", {
30
30
  * schedule: "rate(1 minute)",
@@ -135,7 +135,6 @@ export class Job extends Construct {
135
135
  const { cdk, memorySize, timeout } = this.props;
136
136
  const app = this.node.root;
137
137
  return new Project(this, "JobProject", {
138
- vpc: cdk?.vpc,
139
138
  projectName: app.logicalPrefixedName(this.node.id),
140
139
  environment: {
141
140
  // CodeBuild offers different build images. The newer ones have much quicker
@@ -163,6 +162,9 @@ export class Job extends Construct {
163
162
  },
164
163
  },
165
164
  }),
165
+ vpc: cdk?.vpc,
166
+ securityGroups: cdk?.securityGroups,
167
+ subnetSelection: cdk?.vpcSubnets,
166
168
  });
167
169
  }
168
170
  createLogRetention() {
@@ -114,7 +114,7 @@ export interface KinesisStreamProps {
114
114
  * @example
115
115
  *
116
116
  * ```js
117
- * import { KinesisStream } from "@serverless-stack/resources";
117
+ * import { KinesisStream } from "sst/constructs";
118
118
  *
119
119
  * new KinesisStream(stack, "Stream", {
120
120
  * consumers: {
@@ -13,7 +13,7 @@ import { Function as Fn, } from "./Function.js";
13
13
  * @example
14
14
  *
15
15
  * ```js
16
- * import { KinesisStream } from "@serverless-stack/resources";
16
+ * import { KinesisStream } from "sst/constructs";
17
17
  *
18
18
  * new KinesisStream(stack, "Stream", {
19
19
  * consumers: {
@@ -14,7 +14,7 @@ export interface ParameterProps {
14
14
  * ### Using the minimal config
15
15
  *
16
16
  * ```js
17
- * import { Config } from "@serverless-stack/resources";
17
+ * import { Config } from "sst/constructs";
18
18
  *
19
19
  * new Config.Parameter(stack, "TABLE_NAME", table.tableName);
20
20
  * ```
@@ -6,7 +6,7 @@ import { Construct } from "constructs";
6
6
  * ### Using the minimal config
7
7
  *
8
8
  * ```js
9
- * import { Config } from "@serverless-stack/resources";
9
+ * import { Config } from "sst/constructs";
10
10
  *
11
11
  * new Config.Parameter(stack, "TABLE_NAME", table.tableName);
12
12
  * ```
@@ -106,7 +106,7 @@ export interface QueueProps {
106
106
  * @example
107
107
  *
108
108
  * ```js
109
- * import { Queue } from "@serverless-stack/resources";
109
+ * import { Queue } from "sst/constructs";
110
110
  *
111
111
  * new Queue(stack, "Queue", {
112
112
  * consumer: "src/queueConsumer.main",
@@ -13,7 +13,7 @@ import { toCdkDuration } from "./util/duration.js";
13
13
  * @example
14
14
  *
15
15
  * ```js
16
- * import { Queue } from "@serverless-stack/resources";
16
+ * import { Queue } from "sst/constructs";
17
17
  *
18
18
  * new Queue(stack, "Queue", {
19
19
  * consumer: "src/queueConsumer.main",
@@ -53,7 +53,7 @@ export interface RDSProps {
53
53
  maxCapacity?: keyof typeof rds.AuroraCapacityUnit;
54
54
  };
55
55
  /**
56
- * Path to the directory that contains the migration scripts. The `RDS` construct uses [Kysely](https://koskimas.github.io/kysely/) to run and manage schema migrations. The `migrations` prop should point to the folder where your migration files are.
56
+ * Path to the directory that contains the migration scripts. The `RDS` construct uses [Kysely](https://kysely-org.github.io/kysely/) to run and manage schema migrations. The `migrations` prop should point to the folder where your migration files are.
57
57
  *
58
58
  * @example
59
59
  *
@@ -145,7 +145,7 @@ export interface RDSCdkServerlessClusterProps extends Omit<rds.ServerlessCluster
145
145
  * @example
146
146
  *
147
147
  * ```js
148
- * import { RDS } from "@serverless-stack/resources";
148
+ * import { RDS } from "sst/constructs";
149
149
  *
150
150
  * new RDS(stack, "Database", {
151
151
  * engine: "postgresql11.13",
package/constructs/RDS.js CHANGED
@@ -20,7 +20,7 @@ const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
20
20
  * @example
21
21
  *
22
22
  * ```js
23
- * import { RDS } from "@serverless-stack/resources";
23
+ * import { RDS } from "sst/constructs";
24
24
  *
25
25
  * new RDS(stack, "Database", {
26
26
  * engine: "postgresql11.13",
@@ -8,7 +8,7 @@ export interface ScriptProps {
8
8
  *
9
9
  * @example
10
10
  * ```js
11
- * import { Script } from "@serverless-stack/resources";
11
+ * import { Script } from "sst/constructs";
12
12
  *
13
13
  * new Script(stack, "Script", {
14
14
  * onCreate: "src/script.create",
@@ -76,7 +76,7 @@ export interface ScriptProps {
76
76
  * @example
77
77
  *
78
78
  * ```js
79
- * import { Script } from "@serverless-stack/resources";
79
+ * import { Script } from "sst/constructs";
80
80
  *
81
81
  * new Script(stack, "Script", {
82
82
  * onCreate: "src/function.create",
@@ -14,7 +14,7 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
14
14
  * @example
15
15
  *
16
16
  * ```js
17
- * import { Script } from "@serverless-stack/resources";
17
+ * import { Script } from "sst/constructs";
18
18
  *
19
19
  * new Script(stack, "Script", {
20
20
  * onCreate: "src/function.create",
@@ -8,7 +8,7 @@ import { FunctionBindingProps } from "./util/functionBinding.js";
8
8
  * ### Using the minimal config
9
9
  *
10
10
  * ```js
11
- * import { Config } from "@serverless-stack/resources";
11
+ * import { Config } from "sst/constructs";
12
12
  *
13
13
  * new Config.Secret(stack, "STRIPE_KEY");
14
14
  * ```
@@ -8,7 +8,7 @@ import { getParameterPath, getParameterFallbackPath, } from "./util/functionBind
8
8
  * ### Using the minimal config
9
9
  *
10
10
  * ```js
11
- * import { Config } from "@serverless-stack/resources";
11
+ * import { Config } from "sst/constructs";
12
12
  *
13
13
  * new Config.Secret(stack, "STRIPE_KEY");
14
14
  * ```
@@ -11,7 +11,7 @@ export type StackProps = cdk.StackProps;
11
11
  * @example
12
12
  *
13
13
  * ```js
14
- * import { StackContext } from "@serverless-stack/resources";
14
+ * import { StackContext } from "sst/constructs";
15
15
  *
16
16
  * export function MyStack({ stack }: StackContext) {
17
17
  * // Define your stack
@@ -13,7 +13,7 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
13
13
  * @example
14
14
  *
15
15
  * ```js
16
- * import { StackContext } from "@serverless-stack/resources";
16
+ * import { StackContext } from "sst/constructs";
17
17
  *
18
18
  * export function MyStack({ stack }: StackContext) {
19
19
  * // Define your stack