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.
package/constructs/SsrSite.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
|
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(
|
|
6
|
+
const useFile = Context.memo(() => {
|
|
7
7
|
const project = useProject();
|
|
8
8
|
const filePath = path.join(project.paths.out, "debug.log");
|
|
9
|
-
const file =
|
|
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()
|
|
30
|
-
|
|
31
|
-
});
|
|
29
|
+
const file = useFile();
|
|
30
|
+
file.write(line.join(" ") + "\n");
|
|
32
31
|
},
|
|
33
32
|
};
|
package/package.json
CHANGED
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
|
-
|
|
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
|
|
69
|
+
contents: generate(ast).code,
|
|
69
70
|
loader: "ts",
|
|
70
71
|
};
|
|
71
72
|
});
|