sst 2.36.2 → 2.36.3
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/NextjsSite.js +10 -8
- package/package.json +2 -2
- package/project.js +2 -2
package/constructs/NextjsSite.js
CHANGED
|
@@ -339,17 +339,19 @@ export class NextjsSite extends SsrSite {
|
|
|
339
339
|
const injections = [];
|
|
340
340
|
if (this.isPerRouteLoggingEnabled()) {
|
|
341
341
|
injections.push(`
|
|
342
|
-
|
|
342
|
+
if (event.rawPath) {
|
|
343
|
+
const routeData = ${JSON.stringify(this.useRoutes().map(({ regex, logGroupPath }) => ({
|
|
343
344
|
regex,
|
|
344
345
|
logGroupPath,
|
|
345
346
|
})))}.find(({ regex }) => event.rawPath.match(new RegExp(regex)));
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
347
|
+
if (routeData) {
|
|
348
|
+
console.log("::sst::" + JSON.stringify({
|
|
349
|
+
action:"log.split",
|
|
350
|
+
properties: {
|
|
351
|
+
logGroupName:"/sst/lambda/" + context.functionName + routeData.logGroupPath,
|
|
352
|
+
},
|
|
353
|
+
}));
|
|
354
|
+
}
|
|
353
355
|
}`);
|
|
354
356
|
}
|
|
355
357
|
fs.writeFileSync(path.join(serverPath, `${wrapperName}.mjs`), experimental?.streaming
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.36.
|
|
4
|
+
"version": "2.36.3",
|
|
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.36.
|
|
123
|
+
"astro-sst": "2.36.3",
|
|
124
124
|
"async": "^3.2.4",
|
|
125
125
|
"tsx": "^3.12.1",
|
|
126
126
|
"typescript": "^5.2.2",
|
package/project.js
CHANGED
|
@@ -48,7 +48,7 @@ export async function initProject(globals) {
|
|
|
48
48
|
// Logger.debug("loaded sst config");
|
|
49
49
|
return [metafile, config];
|
|
50
50
|
}
|
|
51
|
-
throw new VisibleError("Could not
|
|
51
|
+
throw new VisibleError("Could not find a configuration file", "Make sure one of the following exists", ...CONFIG_EXTENSIONS.map((x) => ` - sst${x}`));
|
|
52
52
|
})();
|
|
53
53
|
const config = await Promise.resolve(sstConfig.config(globals));
|
|
54
54
|
const stage = process.env.SST_STAGE ||
|
|
@@ -163,7 +163,7 @@ async function promptPersonalStage(out, isRetry) {
|
|
|
163
163
|
async function findRoot() {
|
|
164
164
|
async function find(dir) {
|
|
165
165
|
if (dir === "/")
|
|
166
|
-
throw new VisibleError("Could not
|
|
166
|
+
throw new VisibleError("Could not find a configuration file", "Make sure one of the following exists", ...CONFIG_EXTENSIONS.map((ext) => ` - sst${ext}`));
|
|
167
167
|
for (const ext of CONFIG_EXTENSIONS) {
|
|
168
168
|
const configPath = path.join(dir, `sst${ext}`);
|
|
169
169
|
if (fsSync.existsSync(configPath)) {
|