sst 2.43.7 → 2.43.8

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.
@@ -276,7 +276,7 @@ export class SsrFunction extends Construct {
276
276
  `export const ${newHandlerFunction} = awslambda.streamifyResponse(async (event, responseStream, context) => {`,
277
277
  ...injections,
278
278
  ` const { ${oldHandlerFunction}: rawHandler} = await import("./${oldHandlerName}.mjs");`,
279
- ` return rawHandler(event, responseStream);`,
279
+ ` return rawHandler(event, responseStream, context);`,
280
280
  `});`,
281
281
  ].join("\n")
282
282
  : [
@@ -6,6 +6,16 @@ export interface SvelteKitSiteProps extends SsrSiteProps {
6
6
  * @default false
7
7
  */
8
8
  edge?: boolean;
9
+ /**
10
+ * Configures the base path for the SvelteKit app.
11
+ * Base path allows the app to live on a non-root path. The base path must start, but not end with /.
12
+ * @default No base path
13
+ * @example
14
+ * ```js
15
+ * basePath: '/docs'
16
+ * ```
17
+ */
18
+ basePath?: `/${string}`;
9
19
  }
10
20
  type SvelteKitSiteNormalizedProps = SvelteKitSiteProps & SsrSiteNormalizedProps;
11
21
  /**
@@ -20,7 +20,8 @@ export class SvelteKitSite extends SsrSite {
20
20
  });
21
21
  }
22
22
  plan() {
23
- const { path: sitePath, edge } = this.props;
23
+ const { path: sitePath, edge, basePath: rawBasePath } = this.props;
24
+ const basePath = rawBasePath ? `/${rawBasePath}` : "";
24
25
  const serverDir = ".svelte-kit/svelte-kit-sst/server";
25
26
  const clientDir = ".svelte-kit/svelte-kit-sst/client";
26
27
  const prerenderedDir = ".svelte-kit/svelte-kit-sst/prerendered";
@@ -91,13 +92,13 @@ export class SvelteKitSite extends SsrSite {
91
92
  copy: [
92
93
  {
93
94
  from: clientDir,
94
- to: "",
95
+ to: basePath,
95
96
  cached: true,
96
97
  versionedSubDir: "_app",
97
98
  },
98
99
  {
99
100
  from: prerenderedDir,
100
- to: "",
101
+ to: basePath,
101
102
  cached: false,
102
103
  },
103
104
  ],
@@ -122,8 +123,8 @@ export class SvelteKitSite extends SsrSite {
122
123
  pattern: fs
123
124
  .statSync(path.join(sitePath, clientDir, item))
124
125
  .isDirectory()
125
- ? `${item}/*`
126
- : item,
126
+ ? `${basePath}${item}/*`
127
+ : `${basePath}${item}`,
127
128
  origin: "s3",
128
129
  })),
129
130
  ],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.43.7",
4
+ "version": "2.43.8",
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.7",
121
+ "astro-sst": "2.43.8",
122
122
  "async": "^3.2.4",
123
123
  "tsx": "^3.12.1",
124
124
  "typescript": "^5.2.2",
@@ -209,7 +209,7 @@ export const useNodeHandler = () => {
209
209
  const cmd = [
210
210
  "npm install",
211
211
  "--omit=dev",
212
- "--no-optional",
212
+ "--omit=optional",
213
213
  "--force",
214
214
  "--platform=linux",
215
215
  input.props.architecture === "arm_64"