sst 2.39.9 → 2.39.10

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/bootstrap.js CHANGED
@@ -20,7 +20,7 @@ const CDK_STACK_NAME = "CDKToolkit";
20
20
  const SST_STACK_NAME = "SSTBootstrap";
21
21
  const OUTPUT_VERSION = "Version";
22
22
  const OUTPUT_BUCKET = "BucketName";
23
- const LATEST_VERSION = "7.2";
23
+ const LATEST_VERSION = "7.3";
24
24
  const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
25
25
  export const useBootstrap = lazy(async () => {
26
26
  Logger.debug("Initializing bootstrap context");
@@ -61,7 +61,7 @@ export interface JobProps {
61
61
  architecture?: "x86_64" | "arm_64";
62
62
  /**
63
63
  * The runtime environment for the job.
64
- * @default "nodejs"
64
+ * @default "nodejs18.x"
65
65
  * @example
66
66
  * ```js
67
67
  * new Job(stack, "MyJob", {
@@ -70,7 +70,7 @@ export interface JobProps {
70
70
  * })
71
71
  *```
72
72
  */
73
- runtime?: "nodejs" | "container";
73
+ runtime?: "nodejs" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "container";
74
74
  /**
75
75
  * For "nodejs" runtime, point to the entry point and handler function.
76
76
  * Of the format: `/path/to/file.function`.
package/constructs/Job.js CHANGED
@@ -275,11 +275,23 @@ export class Job extends Construct {
275
275
  const code = AssetCode.fromAsset(result.out);
276
276
  const codeConfig = code.bind(this);
277
277
  const project = this.job.node.defaultChild;
278
+ const dockerImageMap = {
279
+ arm_64: {
280
+ nodejs: "amazon/aws-lambda-nodejs:16.2023.07.13.14",
281
+ "nodejs16.x": "amazon/aws-lambda-nodejs:16.2023.07.13.14",
282
+ "nodejs18.x": "amazon/aws-lambda-nodejs:18.2023.12.14.13",
283
+ "nodejs20.x": "amazon/aws-lambda-nodejs:20.2023.12.14.13",
284
+ },
285
+ x86_64: {
286
+ nodejs: "amazon/aws-lambda-nodejs:16",
287
+ "nodejs16.x": "amazon/aws-lambda-nodejs:16",
288
+ "nodejs18.x": "amazon/aws-lambda-nodejs:18",
289
+ "nodejs20.x": "amazon/aws-lambda-nodejs:20",
290
+ },
291
+ };
278
292
  const image = LinuxBuildImage.fromDockerRegistry(
279
293
  // ARM images can be found here https://hub.docker.com/r/amazon/aws-lambda-nodejs
280
- architecture === "arm_64"
281
- ? "amazon/aws-lambda-nodejs:16.2023.07.13.14"
282
- : "amazon/aws-lambda-nodejs:16");
294
+ dockerImageMap[architecture ?? "x86_64"][runtime ?? "nodejs18.x"]);
283
295
  project.environment = {
284
296
  ...project.environment,
285
297
  type: architecture === "arm_64" ? "ARM_CONTAINER" : "LINUX_CONTAINER",
@@ -43,6 +43,19 @@ export interface NextjsSiteProps extends Omit<SsrSiteProps, "nodejs"> {
43
43
  */
44
44
  memorySize?: number | Size;
45
45
  };
46
+ openNext?: {
47
+ /**
48
+ * Specify a custom build output path for cases when running OpenNext from
49
+ * a monorepo with decentralized build output. This is passed to the
50
+ * `--build-output-path` flag of OpenNext.
51
+ * @default Default build output path
52
+ * @example
53
+ * ```js
54
+ * buildOutputPath: "dist/apps/example-app"
55
+ * ```
56
+ */
57
+ buildOutputPath?: string;
58
+ };
46
59
  experimental?: {
47
60
  /**
48
61
  * Enable streaming. Currently an experimental feature in OpenNext.
@@ -63,6 +63,9 @@ export class NextjsSite extends SsrSite {
63
63
  "--yes",
64
64
  `open-next@${props?.openNextVersion ?? DEFAULT_OPEN_NEXT_VERSION}`,
65
65
  "build",
66
+ ...(props.openNext?.buildOutputPath
67
+ ? ["--build-output-path", props.openNext.buildOutputPath]
68
+ : []),
66
69
  ...(props.experimental.streaming ? ["--streaming"] : []),
67
70
  ...(props.experimental.disableDynamoDBCache
68
71
  ? ["--dangerously-disable-dynamodb-cache"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.39.9",
4
+ "version": "2.39.10",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
@@ -120,7 +120,7 @@
120
120
  "@types/ws": "^8.5.3",
121
121
  "@types/yargs": "^17.0.13",
122
122
  "archiver": "^5.3.1",
123
- "astro-sst": "2.39.9",
123
+ "astro-sst": "2.39.10",
124
124
  "async": "^3.2.4",
125
125
  "tsx": "^3.12.1",
126
126
  "typescript": "^5.2.2",