@suss/manifest-aws 0.31.2 → 0.33.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/README.md CHANGED
@@ -12,9 +12,9 @@ It depends on `@suss/behavioral-ir` and a YAML parser, and it produces data rath
12
12
 
13
13
  ## More
14
14
 
15
- - [Contract sources](https://nimbuscloud-ai.github.io/suss/contract-sources)
16
- - [Documentation](https://nimbuscloud-ai.github.io/suss/)
17
- - [Every package and pack suss ships](https://nimbuscloud-ai.github.io/suss/reference/packages)
15
+ - [Contract sources](https://suss.sh/packs/contract-sources)
16
+ - [Documentation](https://suss.sh/)
17
+ - [Every package and pack suss ships](https://suss.sh/packs/catalog)
18
18
  - [Source and issues](https://github.com/nimbuscloud-ai/suss)
19
19
 
20
20
  ![coverage](../../../.github/badges/coverage-manifest-aws.svg)
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  inheritedEnvVars: () => inheritedEnvVars,
36
36
  loadCloudFormationTemplate: () => loadCloudFormationTemplate,
37
37
  loadTemplateTree: () => loadTemplateTree,
38
- parseHandler: () => parseHandler,
38
+ parseHandler: () => import_ir_core2.parseHandler,
39
39
  qualifiedLogicalId: () => qualifiedLogicalId,
40
40
  readAppSyncResolvers: () => readAppSyncResolvers,
41
41
  readServerlessFunctions: () => readServerlessFunctions,
@@ -613,17 +613,7 @@ function hasUrlScheme(location) {
613
613
 
614
614
  // src/serverlessFunctions.ts
615
615
  var import_ir_core = require("@suss/ir-core");
616
- function parseHandler(handler) {
617
- const trimmed = handler.trim();
618
- const lastDot = trimmed.lastIndexOf(".");
619
- if (lastDot <= 0 || lastDot === trimmed.length - 1) {
620
- return null;
621
- }
622
- return {
623
- modulePath: trimmed.slice(0, lastDot),
624
- exportName: trimmed.slice(lastDot + 1)
625
- };
626
- }
616
+ var import_ir_core2 = require("@suss/ir-core");
627
617
  function readCodeUri(resource) {
628
618
  const codeUri = resource.Properties?.CodeUri;
629
619
  if (typeof codeUri !== "string") {
@@ -676,7 +666,7 @@ function readServerlessFunctions(template) {
676
666
  if (typeof handlerRaw !== "string") {
677
667
  continue;
678
668
  }
679
- const parsed = parseHandler(handlerRaw);
669
+ const parsed = (0, import_ir_core.parseHandler)(handlerRaw);
680
670
  if (parsed === null) {
681
671
  continue;
682
672
  }
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import YAML from 'yaml';
2
+ export { ParsedHandler, parseHandler } from '@suss/ir-core';
2
3
 
3
4
  /**
4
5
  * templateLoader.ts parses a CloudFormation or SAM template file into a
@@ -323,17 +324,7 @@ interface ServerlessFunctionInfo {
323
324
  httpRoutes: ServerlessHttpRoute[];
324
325
  nonHttpEvents: ServerlessNonHttpEvent[];
325
326
  }
326
- interface ParsedHandler {
327
- modulePath: string;
328
- exportName: string;
329
- }
330
- /**
331
- * Split a SAM Handler string into its module path and exported symbol.
332
- * The final dot separates them: `"src/handlers/confirmToken.handler"` →
333
- * `{ modulePath: "src/handlers/confirmToken", exportName: "handler" }`.
334
- * Returns null when there's no dot, since there's no export to bind to.
335
- */
336
- declare function parseHandler(handler: string): ParsedHandler | null;
327
+
337
328
  /**
338
329
  * Read every AWS::Serverless::Function resource in the template into a
339
330
  * code-facing `ServerlessFunctionInfo`. Functions without a parseable
@@ -343,4 +334,4 @@ declare function parseHandler(handler: string): ParsedHandler | null;
343
334
  */
344
335
  declare function readServerlessFunctions(template: CloudFormationTemplate): ServerlessFunctionInfo[];
345
336
 
346
- export { type AppSyncResolverBinding, CLOUDFORMATION_YAML_TAGS, type CloudFormationResource, type CloudFormationTemplate, MAX_STACK_DEPTH, type ParsedHandler, type PatternReduction, type ServerlessFunctionInfo, type ServerlessHttpRoute, type ServerlessNonHttpEvent, type TemplateDocument, type TemplateTree, type UnfollowedReason, type UnfollowedStack, inheritedEnvVars, loadCloudFormationTemplate, loadTemplateTree, parseHandler, qualifiedLogicalId, readAppSyncResolvers, readServerlessFunctions, reduceEventPattern, refTarget, resolveBucketChannel, resolveEventBusToken, resolveQueueChannel, resolveResourceChannel, resolveTopicChannel, resourcesWithGlobals, unfollowedStackMessage };
337
+ export { type AppSyncResolverBinding, CLOUDFORMATION_YAML_TAGS, type CloudFormationResource, type CloudFormationTemplate, MAX_STACK_DEPTH, type PatternReduction, type ServerlessFunctionInfo, type ServerlessHttpRoute, type ServerlessNonHttpEvent, type TemplateDocument, type TemplateTree, type UnfollowedReason, type UnfollowedStack, inheritedEnvVars, loadCloudFormationTemplate, loadTemplateTree, qualifiedLogicalId, readAppSyncResolvers, readServerlessFunctions, reduceEventPattern, refTarget, resolveBucketChannel, resolveEventBusToken, resolveQueueChannel, resolveResourceChannel, resolveTopicChannel, resourcesWithGlobals, unfollowedStackMessage };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import YAML from 'yaml';
2
+ export { ParsedHandler, parseHandler } from '@suss/ir-core';
2
3
 
3
4
  /**
4
5
  * templateLoader.ts parses a CloudFormation or SAM template file into a
@@ -323,17 +324,7 @@ interface ServerlessFunctionInfo {
323
324
  httpRoutes: ServerlessHttpRoute[];
324
325
  nonHttpEvents: ServerlessNonHttpEvent[];
325
326
  }
326
- interface ParsedHandler {
327
- modulePath: string;
328
- exportName: string;
329
- }
330
- /**
331
- * Split a SAM Handler string into its module path and exported symbol.
332
- * The final dot separates them: `"src/handlers/confirmToken.handler"` →
333
- * `{ modulePath: "src/handlers/confirmToken", exportName: "handler" }`.
334
- * Returns null when there's no dot, since there's no export to bind to.
335
- */
336
- declare function parseHandler(handler: string): ParsedHandler | null;
327
+
337
328
  /**
338
329
  * Read every AWS::Serverless::Function resource in the template into a
339
330
  * code-facing `ServerlessFunctionInfo`. Functions without a parseable
@@ -343,4 +334,4 @@ declare function parseHandler(handler: string): ParsedHandler | null;
343
334
  */
344
335
  declare function readServerlessFunctions(template: CloudFormationTemplate): ServerlessFunctionInfo[];
345
336
 
346
- export { type AppSyncResolverBinding, CLOUDFORMATION_YAML_TAGS, type CloudFormationResource, type CloudFormationTemplate, MAX_STACK_DEPTH, type ParsedHandler, type PatternReduction, type ServerlessFunctionInfo, type ServerlessHttpRoute, type ServerlessNonHttpEvent, type TemplateDocument, type TemplateTree, type UnfollowedReason, type UnfollowedStack, inheritedEnvVars, loadCloudFormationTemplate, loadTemplateTree, parseHandler, qualifiedLogicalId, readAppSyncResolvers, readServerlessFunctions, reduceEventPattern, refTarget, resolveBucketChannel, resolveEventBusToken, resolveQueueChannel, resolveResourceChannel, resolveTopicChannel, resourcesWithGlobals, unfollowedStackMessage };
337
+ export { type AppSyncResolverBinding, CLOUDFORMATION_YAML_TAGS, type CloudFormationResource, type CloudFormationTemplate, MAX_STACK_DEPTH, type PatternReduction, type ServerlessFunctionInfo, type ServerlessHttpRoute, type ServerlessNonHttpEvent, type TemplateDocument, type TemplateTree, type UnfollowedReason, type UnfollowedStack, inheritedEnvVars, loadCloudFormationTemplate, loadTemplateTree, qualifiedLogicalId, readAppSyncResolvers, readServerlessFunctions, reduceEventPattern, refTarget, resolveBucketChannel, resolveEventBusToken, resolveQueueChannel, resolveResourceChannel, resolveTopicChannel, resourcesWithGlobals, unfollowedStackMessage };
package/dist/index.js CHANGED
@@ -559,18 +559,8 @@ function hasUrlScheme(location) {
559
559
  }
560
560
 
561
561
  // src/serverlessFunctions.ts
562
- import { codeScopePath } from "@suss/ir-core";
563
- function parseHandler(handler) {
564
- const trimmed = handler.trim();
565
- const lastDot = trimmed.lastIndexOf(".");
566
- if (lastDot <= 0 || lastDot === trimmed.length - 1) {
567
- return null;
568
- }
569
- return {
570
- modulePath: trimmed.slice(0, lastDot),
571
- exportName: trimmed.slice(lastDot + 1)
572
- };
573
- }
562
+ import { codeScopePath, parseHandler } from "@suss/ir-core";
563
+ import { parseHandler as parseHandler2 } from "@suss/ir-core";
574
564
  function readCodeUri(resource) {
575
565
  const codeUri = resource.Properties?.CodeUri;
576
566
  if (typeof codeUri !== "string") {
@@ -648,7 +638,7 @@ export {
648
638
  inheritedEnvVars,
649
639
  loadCloudFormationTemplate,
650
640
  loadTemplateTree,
651
- parseHandler,
641
+ parseHandler2 as parseHandler,
652
642
  qualifiedLogicalId,
653
643
  readAppSyncResolvers,
654
644
  readServerlessFunctions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suss/manifest-aws",
3
- "version": "0.31.2",
3
+ "version": "0.33.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.31.2",
49
+ "@suss/ir-core": "0.33.0",
50
50
  "yaml": "^2.4.0"
51
51
  },
52
52
  "devDependencies": {