sst 2.24.26 → 2.24.27

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.
@@ -378,7 +378,7 @@ export class SsrSite extends Construct {
378
378
  const uploader = new CdkFunction(this, "S3Uploader", {
379
379
  code: Code.fromAsset(path.join(__dirname, "../support/base-site-custom-resource")),
380
380
  layers: [cliLayer],
381
- runtime: Runtime.PYTHON_3_7,
381
+ runtime: Runtime.PYTHON_3_11,
382
382
  handler: "s3-upload.handler",
383
383
  timeout: CdkDuration.minutes(15),
384
384
  memorySize: 1024,
@@ -389,7 +389,7 @@ export class SsrSite extends Construct {
389
389
  const handler = new CdkFunction(this, "S3Handler", {
390
390
  code: Code.fromAsset(path.join(__dirname, "../support/base-site-custom-resource")),
391
391
  layers: [cliLayer],
392
- runtime: Runtime.PYTHON_3_7,
392
+ runtime: Runtime.PYTHON_3_11,
393
393
  handler: "s3-handler.handler",
394
394
  timeout: CdkDuration.minutes(15),
395
395
  memorySize: 1024,
package/logger.js CHANGED
@@ -1,12 +1,12 @@
1
- import fs from "fs/promises";
1
+ import fs from "fs";
2
2
  import path from "path";
3
3
  import { Context } from "./context/context.js";
4
4
  import { useProject } from "./project.js";
5
5
  let previous = new Date();
6
- const useFile = Context.memo(async () => {
6
+ const useFile = Context.memo(() => {
7
7
  const project = useProject();
8
8
  const filePath = path.join(project.paths.out, "debug.log");
9
- const file = await fs.open(filePath, "w");
9
+ const file = fs.createWriteStream(filePath);
10
10
  return file;
11
11
  });
12
12
  export const Logger = {
@@ -26,8 +26,7 @@ export const Logger = {
26
26
  ];
27
27
  if (process.env.SST_VERBOSE)
28
28
  console.log(...line);
29
- useFile().then((file) => {
30
- file.write(line.join(" ") + "\n");
31
- });
29
+ const file = useFile();
30
+ file.write(line.join(" ") + "\n");
32
31
  },
33
32
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sideEffects": false,
3
3
  "name": "sst",
4
- "version": "2.24.26",
4
+ "version": "2.24.27",
5
5
  "bin": {
6
6
  "sst": "cli/sst.js"
7
7
  },
package/stacks/build.js CHANGED
@@ -5,7 +5,8 @@ import { dynamicImport } from "../util/module.js";
5
5
  import { findAbove } from "../util/fs.js";
6
6
  import { VisibleError } from "../error.js";
7
7
  import babel from "@babel/core";
8
- import generate from "@babel/generator";
8
+ const _ = await import("@babel/generator");
9
+ const generate = _.default?.default ?? _.default;
9
10
  // @ts-expect-error
10
11
  import ts from "@babel/plugin-syntax-typescript";
11
12
  export async function load(input, shallow) {
@@ -65,7 +66,7 @@ export async function load(input, shallow) {
65
66
  },
66
67
  });
67
68
  return {
68
- contents: generate.default(ast).code,
69
+ contents: generate(ast).code,
69
70
  loader: "ts",
70
71
  };
71
72
  });
@@ -1,12 +1,10 @@
1
1
  import subprocess
2
2
  import os
3
3
  import tempfile
4
- import json
5
4
  import glob
6
5
  import logging
7
6
  import shutil
8
7
  import boto3
9
- import asyncio
10
8
  from uuid import uuid4
11
9
  from zipfile import ZipFile
12
10