sst 2.0.0-rc.9 → 2.0.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.
Files changed (242) hide show
  1. package/bootstrap.d.ts +2 -4
  2. package/bootstrap.js +208 -61
  3. package/bus.d.ts +3 -3
  4. package/bus.js +1 -1
  5. package/cache.js +1 -1
  6. package/cdk/cloudformation-deployments-wrapper.d.ts +3 -0
  7. package/cdk/cloudformation-deployments-wrapper.js +117 -0
  8. package/cdk/cloudformation-deployments.d.ts +19 -4
  9. package/cdk/deploy-stack.d.ts +17 -2
  10. package/cdk/deploy-stack.js +6 -1
  11. package/cli/colors.d.ts +28 -0
  12. package/cli/colors.js +27 -0
  13. package/cli/commands/bind.d.ts +4 -0
  14. package/cli/commands/bind.js +10 -7
  15. package/cli/commands/bootstrap.d.ts +13 -0
  16. package/cli/commands/bootstrap.js +11 -0
  17. package/cli/commands/build.d.ts +6 -2
  18. package/cli/commands/build.js +13 -8
  19. package/cli/commands/console.d.ts +5 -1
  20. package/cli/commands/console.js +8 -6
  21. package/cli/commands/deploy.d.ts +4 -2
  22. package/cli/commands/deploy.js +69 -29
  23. package/cli/commands/dev.d.ts +5 -1
  24. package/cli/commands/dev.js +157 -79
  25. package/cli/commands/diff.d.ts +15 -0
  26. package/cli/commands/diff.js +61 -0
  27. package/cli/commands/env.d.ts +5 -1
  28. package/cli/commands/env.js +14 -15
  29. package/cli/commands/plugins/kysely.js +13 -5
  30. package/cli/commands/plugins/pothos.js +9 -4
  31. package/cli/commands/remove.d.ts +4 -0
  32. package/cli/commands/remove.js +26 -18
  33. package/cli/commands/secrets/get.d.ts +7 -3
  34. package/cli/commands/secrets/get.js +11 -24
  35. package/cli/commands/secrets/list.d.ts +6 -2
  36. package/cli/commands/secrets/list.js +15 -7
  37. package/cli/commands/secrets/remove.d.ts +8 -4
  38. package/cli/commands/secrets/remove.js +18 -16
  39. package/cli/commands/secrets/secrets.js +3 -3
  40. package/cli/commands/secrets/set.d.ts +8 -6
  41. package/cli/commands/secrets/set.js +16 -33
  42. package/cli/commands/telemetry.d.ts +15 -0
  43. package/cli/commands/telemetry.js +17 -0
  44. package/cli/commands/transform.d.ts +15 -0
  45. package/cli/commands/transform.js +55 -0
  46. package/cli/commands/update.d.ts +6 -2
  47. package/cli/commands/update.js +41 -33
  48. package/cli/commands/version.d.ts +13 -0
  49. package/cli/commands/version.js +7 -0
  50. package/cli/local/router.d.ts +6 -6
  51. package/cli/local/router.js +3 -3
  52. package/cli/local/server.d.ts +5 -3
  53. package/cli/local/server.js +21 -14
  54. package/cli/program.d.ts +5 -1
  55. package/cli/program.js +29 -5
  56. package/cli/spinner.js +2 -0
  57. package/cli/sst.js +35 -23
  58. package/cli/telemetry/environment.d.ts +1 -1
  59. package/cli/telemetry/environment.js +1 -1
  60. package/cli/terminal.d.ts +1 -0
  61. package/cli/terminal.js +8 -0
  62. package/cli/ui/deploy.d.ts +3 -2
  63. package/cli/ui/deploy.js +106 -106
  64. package/cli/ui/functions.d.ts +2 -0
  65. package/cli/ui/functions.js +132 -0
  66. package/cli/ui/header.d.ts +5 -0
  67. package/cli/ui/header.js +16 -0
  68. package/cli/ui/stack.d.ts +1 -0
  69. package/cli/ui/stack.js +6 -0
  70. package/config.d.ts +1 -1
  71. package/config.js +8 -8
  72. package/constructs/Api.d.ts +3 -71
  73. package/constructs/Api.js +3 -42
  74. package/constructs/ApiGatewayV1Api.d.ts +3 -3
  75. package/constructs/ApiGatewayV1Api.js +4 -3
  76. package/constructs/App.d.ts +2 -22
  77. package/constructs/App.js +12 -25
  78. package/constructs/AppSyncApi.d.ts +4 -5
  79. package/constructs/AppSyncApi.js +8 -5
  80. package/constructs/AstroSite.d.ts +2 -3
  81. package/constructs/AstroSite.js +43 -53
  82. package/constructs/Auth.js +27 -16
  83. package/constructs/BaseSite.d.ts +10 -10
  84. package/constructs/BaseSite.js +2 -2
  85. package/constructs/Cognito.js +28 -28
  86. package/constructs/EdgeFunction.d.ts +6 -4
  87. package/constructs/EdgeFunction.js +56 -59
  88. package/constructs/EventBus.js +1 -1
  89. package/constructs/Function.d.ts +4 -44
  90. package/constructs/Function.js +14 -50
  91. package/constructs/FunctionalStack.d.ts +2 -2
  92. package/constructs/Job.d.ts +23 -63
  93. package/constructs/Job.js +11 -32
  94. package/constructs/Metadata.d.ts +18 -20
  95. package/constructs/NextjsSite.d.ts +21 -5
  96. package/constructs/NextjsSite.js +67 -101
  97. package/constructs/Queue.js +10 -10
  98. package/constructs/RDS.d.ts +1 -1
  99. package/constructs/RDS.js +1 -1
  100. package/constructs/RemixSite.d.ts +0 -2
  101. package/constructs/RemixSite.js +20 -20
  102. package/constructs/Script.js +1 -1
  103. package/constructs/Secret.js +5 -3
  104. package/constructs/SolidStartSite.d.ts +2 -3
  105. package/constructs/SolidStartSite.js +42 -52
  106. package/constructs/SsrFunction.d.ts +22 -0
  107. package/constructs/SsrFunction.js +113 -0
  108. package/constructs/SsrSite.d.ts +104 -104
  109. package/constructs/SsrSite.js +196 -217
  110. package/constructs/Stack.d.ts +1 -20
  111. package/constructs/Stack.js +3 -65
  112. package/constructs/StaticSite.d.ts +33 -53
  113. package/constructs/StaticSite.js +92 -118
  114. package/constructs/Table.d.ts +1 -1
  115. package/constructs/Table.js +4 -4
  116. package/constructs/Topic.js +1 -1
  117. package/constructs/cdk/certificate-base.d.ts +18 -0
  118. package/constructs/cdk/certificate-base.js +26 -0
  119. package/constructs/cdk/dns-validated-certificate.d.ts +77 -0
  120. package/constructs/cdk/dns-validated-certificate.js +125 -0
  121. package/constructs/cdk/website-redirect.d.ts +53 -0
  122. package/constructs/cdk/website-redirect.js +77 -0
  123. package/constructs/deferred_task.d.ts +1 -1
  124. package/constructs/deprecated/NextjsSite.js +8 -6
  125. package/constructs/index.d.ts +0 -6
  126. package/constructs/index.js +0 -6
  127. package/constructs/util/apiGatewayV1AccessLog.d.ts +1 -1
  128. package/constructs/util/apiGatewayV2AccessLog.js +4 -4
  129. package/constructs/util/apiGatewayV2Domain.js +9 -2
  130. package/constructs/util/appSyncApiDomain.d.ts +1 -1
  131. package/constructs/util/appSyncApiDomain.js +9 -15
  132. package/constructs/util/duration.d.ts +1 -1
  133. package/constructs/util/functionBinding.js +1 -1
  134. package/constructs/util/permission.d.ts +3 -3
  135. package/constructs/util/permission.js +16 -18
  136. package/constructs/util/size.d.ts +1 -1
  137. package/constructs/util/warning.js +2 -2
  138. package/context/context.d.ts +2 -2
  139. package/context/context.js +4 -4
  140. package/context/handler.d.ts +1 -1
  141. package/credentials.d.ts +1 -1
  142. package/credentials.js +42 -6
  143. package/index.d.ts +1 -0
  144. package/index.js +1 -0
  145. package/iot.js +6 -2
  146. package/logger.js +3 -1
  147. package/node/api/index.d.ts +2 -3
  148. package/node/api/index.js +8 -2
  149. package/node/auth/adapter/adapter.d.ts +1 -1
  150. package/node/auth/adapter/facebook.js +1 -1
  151. package/node/auth/adapter/github.js +4 -4
  152. package/node/auth/adapter/google.d.ts +1 -1
  153. package/node/auth/adapter/google.js +2 -2
  154. package/node/auth/adapter/twitch.js +1 -1
  155. package/node/auth/session.d.ts +1 -1
  156. package/node/config/index.d.ts +2 -2
  157. package/node/config/index.js +3 -8
  158. package/node/job/index.d.ts +2 -2
  159. package/node/site/index.js +3 -5
  160. package/package.json +26 -21
  161. package/pothos.js +1 -0
  162. package/project.d.ts +47 -0
  163. package/{app.js → project.js} +60 -53
  164. package/runtime/handlers/dotnet.d.ts +1 -1
  165. package/runtime/handlers/dotnet.js +4 -4
  166. package/runtime/handlers/go.d.ts +1 -1
  167. package/runtime/handlers/go.js +3 -3
  168. package/runtime/handlers/java.d.ts +1 -1
  169. package/runtime/handlers/java.js +4 -4
  170. package/runtime/handlers/node.d.ts +1 -1
  171. package/runtime/handlers/node.js +60 -39
  172. package/runtime/handlers/python.d.ts +1 -1
  173. package/runtime/handlers/python.js +3 -3
  174. package/runtime/handlers.js +15 -12
  175. package/runtime/iot.js +3 -0
  176. package/runtime/runtime.d.ts +4 -0
  177. package/runtime/server.d.ts +3 -3
  178. package/runtime/server.js +11 -5
  179. package/runtime/workers.d.ts +4 -2
  180. package/runtime/workers.js +13 -3
  181. package/site-env.js +2 -1
  182. package/sst.mjs +6357 -20848
  183. package/stacks/app-metadata.d.ts +7 -0
  184. package/stacks/app-metadata.js +78 -0
  185. package/stacks/assembly.d.ts +1 -0
  186. package/stacks/assembly.js +4 -0
  187. package/stacks/build.d.ts +1 -1
  188. package/stacks/build.js +41 -48
  189. package/stacks/deploy.d.ts +1 -0
  190. package/stacks/deploy.js +128 -7
  191. package/stacks/diff.d.ts +8 -0
  192. package/stacks/diff.js +62 -0
  193. package/stacks/index.d.ts +3 -0
  194. package/stacks/index.js +3 -0
  195. package/stacks/metadata.d.ts +2 -0
  196. package/stacks/metadata.js +14 -12
  197. package/stacks/monitor.d.ts +8 -3
  198. package/stacks/monitor.js +38 -4
  199. package/stacks/remove.js +0 -4
  200. package/stacks/synth.d.ts +1 -0
  201. package/stacks/synth.js +27 -13
  202. package/support/base-site-archiver.mjs +1 -1
  203. package/support/bootstrap-metadata-function/index.mjs +68740 -0
  204. package/support/bridge/bridge.mjs +28 -28
  205. package/support/certificate-requestor/index.js +549 -0
  206. package/support/custom-resources/index.mjs +3824 -26567
  207. package/support/dotnet6-bootstrap/release/dotnet-bootstrap.deps.json +1 -1
  208. package/support/dotnet6-bootstrap/release/dotnet-bootstrap.runtimeconfig.json +1 -1
  209. package/support/edge-function/edge-lambda.mjs +2 -2
  210. package/support/job-invoker/index.mjs +26 -0
  211. package/support/nodejs-runtime/index.mjs +75 -72
  212. package/support/rds-migrator/index.mjs +22 -23
  213. package/support/remix-site-function/edge-server.js +1 -1
  214. package/support/script-function/index.mjs +30485 -0
  215. package/support/{edge-function-code-replacer → sls-nextjs-site-function-code-replacer}/lambda-code-updater.py +0 -0
  216. package/support/ssr-site-function-archiver.mjs +96 -0
  217. package/watcher.js +1 -1
  218. package/app.d.ts +0 -36
  219. package/constructs/DebugApp.d.ts +0 -49
  220. package/constructs/DebugApp.js +0 -63
  221. package/constructs/DebugStack.d.ts +0 -34
  222. package/constructs/DebugStack.js +0 -132
  223. package/constructs/GraphQLApi.d.ts +0 -98
  224. package/constructs/GraphQLApi.js +0 -80
  225. package/constructs/ReactStaticSite.d.ts +0 -20
  226. package/constructs/ReactStaticSite.js +0 -54
  227. package/constructs/Script/cfn-response.d.ts +0 -19
  228. package/constructs/Script/cfn-response.js +0 -77
  229. package/constructs/Script/index.d.ts +0 -1
  230. package/constructs/Script/index.js +0 -78
  231. package/constructs/Script/outbound.d.ts +0 -10
  232. package/constructs/Script/outbound.js +0 -42
  233. package/constructs/Script/util.d.ts +0 -2
  234. package/constructs/Script/util.js +0 -11
  235. package/constructs/ViteStaticSite.d.ts +0 -32
  236. package/constructs/ViteStaticSite.js +0 -66
  237. package/support/astro-site-html-stub/index.html +0 -99
  238. package/support/base-site-archiver.cjs +0 -116
  239. package/support/nextjs-site-html-stub/index.html +0 -99
  240. package/support/remix-site-html-stub/index.html +0 -99
  241. package/support/solid-start-site-html-stub/index.html +0 -99
  242. package/support/static-site-stub/index.html +0 -90
@@ -2,10 +2,9 @@ import { Construct } from "constructs";
2
2
  import * as cdk from "aws-cdk-lib";
3
3
  import * as lambda from "aws-cdk-lib/aws-lambda";
4
4
  import { FunctionProps, Function as Fn } from "./Function.js";
5
- import * as Config from "./Config.js";
6
5
  import { SSTConstruct } from "./Construct.js";
7
6
  import { Permissions } from "./util/permission.js";
8
- export declare type StackProps = cdk.StackProps;
7
+ export type StackProps = cdk.StackProps;
9
8
  /**
10
9
  * The Stack construct extends cdk.Stack. It automatically prefixes the stack names with the stage and app name to ensure that they can be deployed to multiple regions in the same AWS account. It also ensure that the stack uses the same AWS profile and region as the app. They're defined using functions that return resources that can be imported by other stacks.
11
10
  *
@@ -32,7 +31,6 @@ export declare class Stack extends cdk.Stack {
32
31
  * @internal
33
32
  */
34
33
  readonly customResourceHandler: lambda.Function;
35
- private readonly metadata;
36
34
  constructor(scope: Construct, id: string, props?: StackProps);
37
35
  /**
38
36
  * The default function props to be applied to all the Lambda functions in the stack.
@@ -66,21 +64,6 @@ export declare class Stack extends cdk.Stack {
66
64
  * ```
67
65
  */
68
66
  addDefaultFunctionEnv(environment: Record<string, string>): void;
69
- /**
70
- * Adds additional default config to be applied to all Lambda functions in the stack.
71
- *
72
- * @deprecated The "addDefaultFunctionConfig" method will be removed in SST v2. Pass Parameters and Secrets in through the "addDefaultFunctionBinding" function. Read more about how to upgrade here — https://docs.serverless-stack.com/upgrade-guide#upgrade-to-v116
73
- *
74
- * @example
75
- * ```js
76
- * // Change
77
- * stack.addDefaultFunctionConfig([STRIPE_KEY]);
78
- *
79
- * // To
80
- * stack.addDefaultFunctionBinding([STRIPE_KEY]);
81
- * ```
82
- */
83
- addDefaultFunctionConfig(config: (Config.Secret | Config.Parameter)[]): void;
84
67
  /**
85
68
  * Binds additional resources to be applied to all Lambda functions in the stack.
86
69
  *
@@ -129,9 +112,7 @@ export declare class Stack extends cdk.Stack {
129
112
  * ```
130
113
  */
131
114
  addOutputs(outputs: Record<string, string | cdk.CfnOutputProps>): void;
132
- setStackMetadata(metadata: any): void;
133
115
  private createCustomResourceHandler;
134
- private createStackMetadataResource;
135
116
  private static checkForPropsIsConstruct;
136
117
  private static checkForEnvInProps;
137
118
  }
@@ -1,14 +1,9 @@
1
1
  import url from "url";
2
2
  import * as path from "path";
3
3
  import * as cdk from "aws-cdk-lib";
4
- import * as iam from "aws-cdk-lib/aws-iam";
5
4
  import * as lambda from "aws-cdk-lib/aws-lambda";
6
5
  import { Function as Fn } from "./Function.js";
7
6
  import { isConstruct } from "./Construct.js";
8
- import { createRequire } from "module";
9
- import { useApp } from "./context.js";
10
- import { useProject } from "../app.js";
11
- const require = createRequire(import.meta.url);
12
7
  const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
13
8
  /**
14
9
  * The Stack construct extends cdk.Stack. It automatically prefixes the stack names with the stage and app name to ensure that they can be deployed to multiple regions in the same AWS account. It also ensure that the stack uses the same AWS profile and region as the app. They're defined using functions that return resources that can be imported by other stacks.
@@ -36,7 +31,6 @@ export class Stack extends cdk.Stack {
36
31
  * @internal
37
32
  */
38
33
  customResourceHandler;
39
- metadata;
40
34
  constructor(scope, id, props) {
41
35
  const root = scope.node.root;
42
36
  const stackId = root.logicalPrefixedName(id);
@@ -51,15 +45,9 @@ export class Stack extends cdk.Stack {
51
45
  });
52
46
  this.stage = root.stage;
53
47
  this.defaultFunctionProps = root.defaultFunctionProps.map((dfp) => typeof dfp === "function" ? dfp(this) : dfp);
54
- // We created the Metadata resource first with empty metadata, and on
55
- // app synthesis we'll update it with the actual metadata.
56
- // We do this two step process because we call the "Template.fromStack"
57
- // method in the tests. And the call triggers an app synethsis. And we
58
- // end up synthesize an app multiple times. If we created the Metadata
59
- // resource on app synth, the tests would fail because the resource
60
- // would already exist.
48
+ // Create a custom resource handler per stack. This handler will
49
+ // be used by all the custom resources in the stack.
61
50
  this.customResourceHandler = this.createCustomResourceHandler();
62
- this.metadata = this.createStackMetadataResource();
63
51
  }
64
52
  /**
65
53
  * The default function props to be applied to all the Lambda functions in the stack.
@@ -106,23 +94,6 @@ export class Stack extends cdk.Stack {
106
94
  environment,
107
95
  });
108
96
  }
109
- /**
110
- * Adds additional default config to be applied to all Lambda functions in the stack.
111
- *
112
- * @deprecated The "addDefaultFunctionConfig" method will be removed in SST v2. Pass Parameters and Secrets in through the "addDefaultFunctionBinding" function. Read more about how to upgrade here — https://docs.serverless-stack.com/upgrade-guide#upgrade-to-v116
113
- *
114
- * @example
115
- * ```js
116
- * // Change
117
- * stack.addDefaultFunctionConfig([STRIPE_KEY]);
118
- *
119
- * // To
120
- * stack.addDefaultFunctionBinding([STRIPE_KEY]);
121
- * ```
122
- */
123
- addDefaultFunctionConfig(config) {
124
- this.defaultFunctionProps.push({ config });
125
- }
126
97
  /**
127
98
  * Binds additional resources to be applied to all Lambda functions in the stack.
128
99
  *
@@ -200,13 +171,10 @@ export class Stack extends cdk.Stack {
200
171
  }
201
172
  });
202
173
  }
203
- setStackMetadata(metadata) {
204
- this.metadata.node.defaultChild.addPropertyOverride("Metadata", metadata);
205
- }
206
174
  createCustomResourceHandler() {
207
175
  return new lambda.Function(this, "CustomResourceHandler", {
208
176
  code: lambda.Code.fromAsset(path.join(__dirname, "../support/custom-resources/"), {
209
- assetHash: this.stackName + "-custom-resources-v1",
177
+ assetHash: this.stackName + "-custom-resources-20230130",
210
178
  }),
211
179
  handler: "index.handler",
212
180
  runtime: lambda.Runtime.NODEJS_16_X,
@@ -214,36 +182,6 @@ export class Stack extends cdk.Stack {
214
182
  memorySize: 1024,
215
183
  });
216
184
  }
217
- createStackMetadataResource() {
218
- const app = useApp();
219
- // Create execution policy
220
- this.customResourceHandler.addToRolePolicy(new iam.PolicyStatement({
221
- actions: ["s3:PutObject", "s3:DeleteObject"],
222
- resources: [`arn:aws:s3:::${app.bootstrap.bucket}/*`],
223
- }));
224
- // Temporary: Add permissions to migrate SSM paths for secrets (piggybacking on the stack metadata custom resource handler)
225
- this.customResourceHandler.addToRolePolicy(new iam.PolicyStatement({
226
- actions: ["ssm:GetParametersByPath", "ssm:PutParameter"],
227
- resources: [
228
- `arn:aws:ssm:${app.region}:${app.account}:parameter/sst/${app.name}/${app.stage}/*`,
229
- `arn:aws:ssm:${app.region}:${app.account}:parameter/sst/${app.name}/.fallback/*`,
230
- ],
231
- }));
232
- return new cdk.CustomResource(this, "StackMetadata", {
233
- serviceToken: this.customResourceHandler.functionArn,
234
- resourceType: "Custom::StackMetadata",
235
- properties: {
236
- App: app.name,
237
- Stage: this.stage,
238
- Stack: this.stackName,
239
- SSTVersion: useProject().version,
240
- BootstrapBucketName: app.bootstrap.bucket,
241
- ForceUpdate: process.env.SST_FORCE_UPDATE_METADATA
242
- ? Date.now().toString()
243
- : undefined,
244
- },
245
- });
246
- }
247
185
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
248
186
  static checkForPropsIsConstruct(id, props) {
249
187
  // If a construct is passed in as stack props, let's detect it and throw a
@@ -14,7 +14,7 @@ export interface StaticSiteFileOptions {
14
14
  export interface StaticSiteProps {
15
15
  /**
16
16
  * Path to the directory where the website source is located.
17
- *
17
+ * @default "."
18
18
  * @example
19
19
  * ```js
20
20
  * new StaticSite(stack, "Site", {
@@ -22,7 +22,7 @@ export interface StaticSiteProps {
22
22
  * });
23
23
  * ```
24
24
  */
25
- path: string;
25
+ path?: string;
26
26
  /**
27
27
  * The name of the index page (e.g. "index.html") of the website.
28
28
  * @default "index.html"
@@ -179,19 +179,21 @@ export interface StaticSiteProps {
179
179
  * ```
180
180
  */
181
181
  purgeFiles?: boolean;
182
- /**
183
- * When running `sst start`, a placeholder site is deployed. This is to ensure that the site content remains unchanged, and subsequent `sst start` can start up quickly.
184
- *
185
- * @default false
186
- *
187
- * @example
188
- * ```js
189
- * new StaticSite(stack, "frontend", {
190
- * disablePlaceholder: true
191
- * });
192
- * ```
193
- */
194
- disablePlaceholder?: boolean;
182
+ dev?: {
183
+ /**
184
+ * When running `sst dev, site is not deployed. This is to ensure `sst dev` can start up quickly.
185
+ * @default false
186
+ * @example
187
+ * ```js
188
+ * new StaticSite(stack, "frontend", {
189
+ * dev: {
190
+ * deploy: true
191
+ * }
192
+ * });
193
+ * ```
194
+ */
195
+ deploy?: boolean;
196
+ };
195
197
  vite?: {
196
198
  /**
197
199
  * The path where code-gen should place the type definition for environment variables
@@ -209,11 +211,11 @@ export interface StaticSiteProps {
209
211
  };
210
212
  /**
211
213
  * While deploying, SST waits for the CloudFront cache invalidation process to finish. This ensures that the new content will be served once the deploy command finishes. However, this process can sometimes take more than 5 mins. For non-prod environments it might make sense to pass in `false`. That'll skip waiting for the cache to invalidate and speed up the deploy process.
212
- * @default true
214
+ * @default false
213
215
  * @example
214
216
  * ```js
215
217
  * new StaticSite(stack, "frontend", {
216
- * waitForInvalidation: false
218
+ * waitForInvalidation: true
217
219
  * });
218
220
  * ```
219
221
  */
@@ -280,55 +282,33 @@ export interface StaticSiteCdkDistributionProps extends BaseSiteCdkDistributionP
280
282
  */
281
283
  export declare class StaticSite extends Construct implements SSTConstruct {
282
284
  readonly id: string;
283
- readonly cdk: {
284
- /**
285
- * The internally created CDK `Bucket` instance.
286
- */
287
- bucket: s3.Bucket;
288
- /**
289
- * The internally created CDK `Distribution` instance.
290
- */
291
- distribution: cloudfront.Distribution;
292
- /**
293
- * The Route 53 hosted zone for the custom domain.
294
- */
295
- hostedZone?: route53.IHostedZone;
296
- certificate?: acm.ICertificate;
297
- };
298
285
  private props;
299
- private isPlaceholder;
300
- private assets;
301
- private filenamesAsset?;
302
- private awsCliLayer;
303
- constructor(scope: Construct, id: string, props: StaticSiteProps);
286
+ private doNotDeploy;
287
+ private bucket;
288
+ private distribution;
289
+ private hostedZone?;
290
+ private certificate?;
291
+ constructor(scope: Construct, id: string, props?: StaticSiteProps);
304
292
  /**
305
293
  * The CloudFront URL of the website.
306
294
  */
307
- get url(): string;
295
+ get url(): string | undefined;
308
296
  /**
309
297
  * If the custom domain is enabled, this is the URL of the website with the custom domain.
310
298
  */
311
299
  get customDomainUrl(): string | undefined;
312
300
  /**
313
- * The ARN of the internally created S3 Bucket.
301
+ * The internally created CDK resources.
314
302
  */
315
- get bucketArn(): string;
316
- /**
317
- * The name of the internally created S3 Bucket.
318
- */
319
- get bucketName(): string;
320
- /**
321
- * The ID of the internally created CloudFront Distribution.
322
- */
323
- get distributionId(): string;
324
- /**
325
- * The domain name of the internally created CloudFront Distribution.
326
- */
327
- get distributionDomain(): string;
303
+ get cdk(): {
304
+ bucket: s3.Bucket;
305
+ distribution: cloudfront.Distribution;
306
+ hostedZone: route53.IHostedZone | undefined;
307
+ certificate: acm.ICertificate | undefined;
308
+ };
328
309
  getConstructMetadata(): {
329
310
  type: "StaticSite";
330
311
  data: {
331
- distributionId: string;
332
312
  customDomainUrl: string | undefined;
333
313
  };
334
314
  };