@suss/manifest-aws 0.35.0 → 0.36.0
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/dist/index.cjs +4 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -666,7 +666,9 @@ function readServerlessFunctions(template) {
|
|
|
666
666
|
if (typeof handlerRaw !== "string") {
|
|
667
667
|
continue;
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const runtimeRaw = resource.Properties?.Runtime;
|
|
670
|
+
const runtime = typeof runtimeRaw === "string" ? runtimeRaw : void 0;
|
|
671
|
+
const parsed = (0, import_ir_core.parseHandler)(handlerRaw, runtime);
|
|
670
672
|
if (parsed === null) {
|
|
671
673
|
continue;
|
|
672
674
|
}
|
|
@@ -679,6 +681,7 @@ function readServerlessFunctions(template) {
|
|
|
679
681
|
modulePath: parsed.modulePath,
|
|
680
682
|
exportName: parsed.exportName,
|
|
681
683
|
codeUri: readCodeUri(resource),
|
|
684
|
+
...runtime !== void 0 ? { runtime } : {},
|
|
682
685
|
httpRoutes,
|
|
683
686
|
nonHttpEvents
|
|
684
687
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -309,15 +309,17 @@ interface ServerlessFunctionInfo {
|
|
|
309
309
|
logicalId: string;
|
|
310
310
|
/** Raw Handler string, e.g. "src/handlers/confirmToken.handler". */
|
|
311
311
|
handler: string;
|
|
312
|
-
/** Module-path portion of the handler
|
|
312
|
+
/** Module-path portion of the handler, as `parseHandler` splits it. */
|
|
313
313
|
modulePath: string;
|
|
314
|
-
/**
|
|
314
|
+
/** The function the handler points at, as `parseHandler` splits it. */
|
|
315
315
|
exportName: string;
|
|
316
316
|
/**
|
|
317
317
|
* CodeUri base directory the handler resolves against: the function's
|
|
318
318
|
* own CodeUri, else the `Globals.Function.CodeUri` default, else ".".
|
|
319
319
|
*/
|
|
320
320
|
codeUri: string;
|
|
321
|
+
/** The `Runtime`, from the function or Globals, when the template states one. */
|
|
322
|
+
runtime?: string;
|
|
321
323
|
httpRoutes: ServerlessHttpRoute[];
|
|
322
324
|
nonHttpEvents: ServerlessNonHttpEvent[];
|
|
323
325
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -309,15 +309,17 @@ interface ServerlessFunctionInfo {
|
|
|
309
309
|
logicalId: string;
|
|
310
310
|
/** Raw Handler string, e.g. "src/handlers/confirmToken.handler". */
|
|
311
311
|
handler: string;
|
|
312
|
-
/** Module-path portion of the handler
|
|
312
|
+
/** Module-path portion of the handler, as `parseHandler` splits it. */
|
|
313
313
|
modulePath: string;
|
|
314
|
-
/**
|
|
314
|
+
/** The function the handler points at, as `parseHandler` splits it. */
|
|
315
315
|
exportName: string;
|
|
316
316
|
/**
|
|
317
317
|
* CodeUri base directory the handler resolves against: the function's
|
|
318
318
|
* own CodeUri, else the `Globals.Function.CodeUri` default, else ".".
|
|
319
319
|
*/
|
|
320
320
|
codeUri: string;
|
|
321
|
+
/** The `Runtime`, from the function or Globals, when the template states one. */
|
|
322
|
+
runtime?: string;
|
|
321
323
|
httpRoutes: ServerlessHttpRoute[];
|
|
322
324
|
nonHttpEvents: ServerlessNonHttpEvent[];
|
|
323
325
|
}
|
package/dist/index.js
CHANGED
|
@@ -613,7 +613,9 @@ function readServerlessFunctions(template) {
|
|
|
613
613
|
if (typeof handlerRaw !== "string") {
|
|
614
614
|
continue;
|
|
615
615
|
}
|
|
616
|
-
const
|
|
616
|
+
const runtimeRaw = resource.Properties?.Runtime;
|
|
617
|
+
const runtime = typeof runtimeRaw === "string" ? runtimeRaw : void 0;
|
|
618
|
+
const parsed = parseHandler(handlerRaw, runtime);
|
|
617
619
|
if (parsed === null) {
|
|
618
620
|
continue;
|
|
619
621
|
}
|
|
@@ -626,6 +628,7 @@ function readServerlessFunctions(template) {
|
|
|
626
628
|
modulePath: parsed.modulePath,
|
|
627
629
|
exportName: parsed.exportName,
|
|
628
630
|
codeUri: readCodeUri(resource),
|
|
631
|
+
...runtime !== void 0 ? { runtime } : {},
|
|
629
632
|
httpRoutes,
|
|
630
633
|
nonHttpEvents
|
|
631
634
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/manifest-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Parse a CloudFormation or SAM template into plain data, the facts every suss reader of an AWS template works from.",
|
|
6
6
|
"keywords": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@suss/ir-core": "0.
|
|
49
|
+
"@suss/ir-core": "0.36.0",
|
|
50
50
|
"yaml": "^2.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|