@suss/contract-appsync 0.0.1
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/LICENSE +205 -0
- package/dist/index.cjs +750 -0
- package/dist/index.d.cts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +717 -0
- package/package.json +62 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BehavioralSummary } from '@suss/behavioral-ir';
|
|
2
|
+
|
|
3
|
+
interface CfnTemplate {
|
|
4
|
+
Resources?: Record<string, CfnResource | undefined>;
|
|
5
|
+
}
|
|
6
|
+
interface CfnResource {
|
|
7
|
+
Type?: string;
|
|
8
|
+
Properties?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface AppsyncToSummariesOptions {
|
|
12
|
+
/** Logical source path recorded on each summary's `location.file`. */
|
|
13
|
+
source?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Directory used to resolve relative external schema paths
|
|
16
|
+
* (`DefinitionS3Location` / `SchemaUri`). `appsyncFileToSummaries`
|
|
17
|
+
* sets this to the template's directory; in-memory callers pass it
|
|
18
|
+
* when their schema references are relative.
|
|
19
|
+
*/
|
|
20
|
+
baseDir?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Convert an already-parsed CloudFormation / SAM template to AppSync
|
|
24
|
+
* resolver summaries. Call this when the caller has a template object in
|
|
25
|
+
* memory (CDK `Template.fromStack`, JSON from a build tool, etc.).
|
|
26
|
+
*/
|
|
27
|
+
declare function appsyncToSummaries(template: CfnTemplate, options?: AppsyncToSummariesOptions): BehavioralSummary[];
|
|
28
|
+
/**
|
|
29
|
+
* Read a CloudFormation / SAM template from disk and emit resolver
|
|
30
|
+
* summaries. Accepts JSON and YAML (SAM / CDK-synth shapes). Relative
|
|
31
|
+
* external schema paths resolve against the template's directory.
|
|
32
|
+
*/
|
|
33
|
+
declare function appsyncFileToSummaries(filePath: string, options?: AppsyncToSummariesOptions): BehavioralSummary[];
|
|
34
|
+
|
|
35
|
+
export { type AppsyncToSummariesOptions, type CfnTemplate, appsyncFileToSummaries, appsyncToSummaries };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BehavioralSummary } from '@suss/behavioral-ir';
|
|
2
|
+
|
|
3
|
+
interface CfnTemplate {
|
|
4
|
+
Resources?: Record<string, CfnResource | undefined>;
|
|
5
|
+
}
|
|
6
|
+
interface CfnResource {
|
|
7
|
+
Type?: string;
|
|
8
|
+
Properties?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface AppsyncToSummariesOptions {
|
|
12
|
+
/** Logical source path recorded on each summary's `location.file`. */
|
|
13
|
+
source?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Directory used to resolve relative external schema paths
|
|
16
|
+
* (`DefinitionS3Location` / `SchemaUri`). `appsyncFileToSummaries`
|
|
17
|
+
* sets this to the template's directory; in-memory callers pass it
|
|
18
|
+
* when their schema references are relative.
|
|
19
|
+
*/
|
|
20
|
+
baseDir?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Convert an already-parsed CloudFormation / SAM template to AppSync
|
|
24
|
+
* resolver summaries. Call this when the caller has a template object in
|
|
25
|
+
* memory (CDK `Template.fromStack`, JSON from a build tool, etc.).
|
|
26
|
+
*/
|
|
27
|
+
declare function appsyncToSummaries(template: CfnTemplate, options?: AppsyncToSummariesOptions): BehavioralSummary[];
|
|
28
|
+
/**
|
|
29
|
+
* Read a CloudFormation / SAM template from disk and emit resolver
|
|
30
|
+
* summaries. Accepts JSON and YAML (SAM / CDK-synth shapes). Relative
|
|
31
|
+
* external schema paths resolve against the template's directory.
|
|
32
|
+
*/
|
|
33
|
+
declare function appsyncFileToSummaries(filePath: string, options?: AppsyncToSummariesOptions): BehavioralSummary[];
|
|
34
|
+
|
|
35
|
+
export { type AppsyncToSummariesOptions, type CfnTemplate, appsyncFileToSummaries, appsyncToSummaries };
|