@intentius/chant-lexicon-aws 0.45.0 → 0.49.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/api/read-client.d.ts +10 -2
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/composites/agentcore-agent.d.ts +26 -1
- package/dist/composites/agentcore-agent.d.ts.map +1 -1
- package/dist/composites/bucket-deployment.d.ts +82 -0
- package/dist/composites/bucket-deployment.d.ts.map +1 -0
- package/dist/composites/dynamodb-table.d.ts +45 -0
- package/dist/composites/dynamodb-table.d.ts.map +1 -0
- package/dist/composites/ec2-instance-bundle.d.ts +61 -0
- package/dist/composites/ec2-instance-bundle.d.ts.map +1 -0
- package/dist/composites/ecr-repository.d.ts +49 -0
- package/dist/composites/ecr-repository.d.ts.map +1 -0
- package/dist/composites/fargate-service.d.ts +16 -0
- package/dist/composites/fargate-service.d.ts.map +1 -1
- package/dist/composites/index.d.ts +16 -2
- package/dist/composites/index.d.ts.map +1 -1
- package/dist/composites/lambda-function.d.ts +4 -4
- package/dist/composites/lambda-function.d.ts.map +1 -1
- package/dist/composites/monitoring-stack.d.ts +99 -0
- package/dist/composites/monitoring-stack.d.ts.map +1 -0
- package/dist/composites/nlb-service.d.ts +48 -0
- package/dist/composites/nlb-service.d.ts.map +1 -0
- package/dist/composites/step-functions-workflow.d.ts +36 -0
- package/dist/composites/step-functions-workflow.d.ts.map +1 -0
- package/dist/deep-observe.d.ts +45 -0
- package/dist/deep-observe.d.ts.map +1 -1
- package/dist/deep-topology.d.ts +104 -0
- package/dist/deep-topology.d.ts.map +1 -0
- package/dist/effect-receipt-row.d.ts +92 -0
- package/dist/effect-receipt-row.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +9 -4
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/cf-refs.d.ts +24 -0
- package/dist/lint/post-synth/cf-refs.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/waw059.d.ts +36 -0
- package/dist/lint/post-synth/waw059.d.ts.map +1 -0
- package/dist/lint/post-synth/waw060.d.ts +16 -0
- package/dist/lint/post-synth/waw060.d.ts.map +1 -0
- package/dist/lint/post-synth/waw061.d.ts +19 -0
- package/dist/lint/post-synth/waw061.d.ts.map +1 -0
- package/dist/lint/post-synth/waw062.d.ts +19 -0
- package/dist/lint/post-synth/waw062.d.ts.map +1 -0
- package/dist/lint/post-synth/waw063.d.ts +35 -0
- package/dist/lint/post-synth/waw063.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/okf/index.md +5 -0
- package/dist/okf/rules/WAW059.md +25 -0
- package/dist/okf/rules/WAW060.md +17 -0
- package/dist/okf/rules/WAW061.md +17 -0
- package/dist/okf/rules/WAW062.md +27 -0
- package/dist/okf/rules/WAW063.md +19 -0
- package/dist/okf/types/Action.md +2 -0
- package/dist/okf/types/AutoScalingGroup.md +1 -0
- package/dist/okf/types/Bucket.md +2 -0
- package/dist/okf/types/ECRRepository.md +1 -0
- package/dist/okf/types/Function.md +1 -0
- package/dist/okf/types/GlobalTable.md +4 -0
- package/dist/okf/types/IamPolicy.md +3 -0
- package/dist/okf/types/InstanceProfile.md +4 -0
- package/dist/okf/types/LaunchTemplate.md +1 -0
- package/dist/okf/types/LoadBalancer.md +1 -0
- package/dist/okf/types/ManagedPolicy.md +4 -0
- package/dist/okf/types/Map.md +2 -0
- package/dist/okf/types/Queue.md +1 -0
- package/dist/okf/types/Role.md +3 -0
- package/dist/okf/types/SecurityGroup.md +1 -0
- package/dist/okf/types/StateMachine.md +4 -0
- package/dist/okf/types/Subnet.md +4 -0
- package/dist/okf/types/Table.md +2 -0
- package/dist/okf/types/Type.md +5 -0
- package/dist/okf/types/Vpc.md +1 -0
- package/dist/op/activities/aws-apply.d.ts +48 -5
- package/dist/op/activities/aws-apply.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +11 -4
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/ownership.d.ts +18 -0
- package/dist/ownership.d.ts.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/receipt-store.d.ts +109 -0
- package/dist/receipt-store.d.ts.map +1 -0
- package/dist/rules/cf-refs.ts +62 -0
- package/dist/rules/waw059.ts +353 -0
- package/dist/rules/waw060.ts +91 -0
- package/dist/rules/waw061.ts +67 -0
- package/dist/rules/waw062.ts +0 -0
- package/dist/rules/waw063.ts +0 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/skills/chant-aws-carve-terraform.md +26 -23
- package/dist/teardown.d.ts +85 -0
- package/dist/teardown.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/api/read-client.test.ts +9 -0
- package/src/api/read-client.ts +15 -2
- package/src/components/cloud-executor.ts +10 -1
- package/src/composites/agentcore-agent.ts +35 -13
- package/src/composites/bucket-deployment.test.ts +84 -0
- package/src/composites/bucket-deployment.ts +153 -0
- package/src/composites/composites.test.ts +325 -0
- package/src/composites/dynamodb-table.test.ts +154 -0
- package/src/composites/dynamodb-table.ts +124 -0
- package/src/composites/ec2-instance-bundle.ts +134 -0
- package/src/composites/ecr-repository.test.ts +118 -0
- package/src/composites/ecr-repository.ts +117 -0
- package/src/composites/fargate-service.ts +19 -3
- package/src/composites/index.ts +21 -2
- package/src/composites/monitoring-stack.test.ts +130 -0
- package/src/composites/monitoring-stack.ts +164 -0
- package/src/composites/nlb-service.ts +117 -0
- package/src/composites/step-functions-workflow.ts +127 -0
- package/src/deep-observe.test.ts +201 -1
- package/src/deep-observe.ts +204 -0
- package/src/deep-topology.test.ts +392 -0
- package/src/deep-topology.ts +237 -0
- package/src/effect-receipt-row.test.ts +164 -0
- package/src/effect-receipt-row.ts +147 -0
- package/src/index.ts +28 -7
- package/src/lifecycle-integration.test.ts +4 -0
- package/src/lint/audit-catalog.ts +11 -0
- package/src/lint/post-synth/cf-refs.ts +62 -0
- package/src/lint/post-synth/index.ts +10 -0
- package/src/lint/post-synth/waw059.test.ts +309 -0
- package/src/lint/post-synth/waw059.ts +353 -0
- package/src/lint/post-synth/waw060.test.ts +131 -0
- package/src/lint/post-synth/waw060.ts +91 -0
- package/src/lint/post-synth/waw061.test.ts +99 -0
- package/src/lint/post-synth/waw061.ts +67 -0
- package/src/lint/post-synth/waw062.test.ts +109 -0
- package/src/lint/post-synth/waw062.ts +0 -0
- package/src/lint/post-synth/waw063.test.ts +220 -0
- package/src/lint/post-synth/waw063.ts +0 -0
- package/src/op/activities/aws-apply.test.ts +111 -0
- package/src/op/activities/aws-apply.ts +100 -6
- package/src/op/activities/index.ts +20 -3
- package/src/ownership.test.ts +24 -1
- package/src/ownership.ts +37 -0
- package/src/plugin.ts +59 -10
- package/src/receipt-store.test.ts +204 -0
- package/src/receipt-store.ts +315 -0
- package/src/serializer-ownership.test.ts +18 -0
- package/src/serializer.ts +114 -3
- package/src/skills/chant-aws-carve-terraform.md +26 -23
- package/src/teardown.test.ts +258 -0
- package/src/teardown.ts +276 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MonitoringStack — a CloudWatch dashboard wired to up to three named
|
|
3
|
+
* metrics, with an optional alarm per metric.
|
|
4
|
+
*
|
|
5
|
+
* The recurring hand-rolled shape the aws-bench corpus surfaced: a team
|
|
6
|
+
* stands up a `cloudwatch.Dashboard`, a `cloudwatch.Metric` per resource it
|
|
7
|
+
* cares about, and a near-identical `cloudwatch.Alarm` next to each one — 44
|
|
8
|
+
* combined dashboard+alarm+metric instantiations across the corpus' 8 real
|
|
9
|
+
* CDK apps, nothing equivalent shipped in chant (epic #1139).
|
|
10
|
+
*
|
|
11
|
+
* Fixed `metric1..metric3` slots, not a `metrics: MetricSpec[]` array — a
|
|
12
|
+
* loop building `Alarm` resources from an array is exactly the control-flow-
|
|
13
|
+
* over-resources shape EVL002/EVL003 rule out for reference composites (see
|
|
14
|
+
* `EksCluster`'s `addon1..addon3`, this directory). A fourth metric is a bare
|
|
15
|
+
* `Alarm` + a hand-edited `CwDashboard.DashboardBody` the estate declares
|
|
16
|
+
* directly.
|
|
17
|
+
*
|
|
18
|
+
* What is deliberately NOT here:
|
|
19
|
+
* - Notification wiring. `alarm.alarmActions` on each metric takes ARNs the
|
|
20
|
+
* caller already has (an SNS topic from `LambdaSns`, or hand-declared);
|
|
21
|
+
* this composite does not create a `Topic`/`Subscription` itself — who
|
|
22
|
+
* gets paged and on what channel is a real per-estate decision, not a
|
|
23
|
+
* default worth guessing. `defaults.alarm1..3` is the escape hatch for
|
|
24
|
+
* anything else on the alarm (e.g. `OKActions`, `DatapointsToAlarm`).
|
|
25
|
+
* - Math-expression / composite / anomaly-detection alarms (`Alarm.Metrics`,
|
|
26
|
+
* `AlarmModel`) — single-metric threshold alarms only.
|
|
27
|
+
* - Dynamic (`Ref`/`GetAtt`/`Sub`) values inside the dashboard body.
|
|
28
|
+
* `CwDashboard.DashboardBody` is one flat JSON string CloudFormation does
|
|
29
|
+
* not template, so each metric's `namespace`/`metricName`/`dimension.value`
|
|
30
|
+
* must be a literal the caller already knows — the physical name they set
|
|
31
|
+
* on the monitored resource, not one CloudFormation generates. The `Alarm`
|
|
32
|
+
* resources carry no such limit: `Dimensions` is a real structured
|
|
33
|
+
* property, so `alarm.dimensionValue` accepts `Value<string>` and can
|
|
34
|
+
* reference a sibling resource by `Ref`/`GetAtt`.
|
|
35
|
+
*/
|
|
36
|
+
import { type Value } from "@intentius/chant";
|
|
37
|
+
import { Alarm, CwDashboard } from "../generated/index.js";
|
|
38
|
+
export interface MonitoringMetricSpec {
|
|
39
|
+
/** Dashboard widget title, and the alarm's default `AlarmName`. */
|
|
40
|
+
title: string;
|
|
41
|
+
/** CloudWatch namespace, e.g. `"AWS/Lambda"`, `"AWS/DynamoDB"`. */
|
|
42
|
+
namespace: string;
|
|
43
|
+
/** Metric name within the namespace, e.g. `"Errors"`, `"ConsumedReadCapacityUnits"`. */
|
|
44
|
+
metricName: string;
|
|
45
|
+
/**
|
|
46
|
+
* Dimension identifying which resource emits the metric, e.g.
|
|
47
|
+
* `{ name: "FunctionName", value: "my-fn" }`. Omit for an account/region-
|
|
48
|
+
* wide metric. `value` must be a literal — see the dashboard-body note above.
|
|
49
|
+
*/
|
|
50
|
+
dimension?: {
|
|
51
|
+
name: string;
|
|
52
|
+
value: string;
|
|
53
|
+
};
|
|
54
|
+
/** Statistic for both the widget and (if alarmed) the alarm. Default `"Sum"`. */
|
|
55
|
+
statistic?: string;
|
|
56
|
+
/** Period in seconds, for both the widget and the alarm. Default `300`. */
|
|
57
|
+
period?: number;
|
|
58
|
+
/** Alarm this metric when set; omit for a dashboard-only metric. */
|
|
59
|
+
alarm?: {
|
|
60
|
+
threshold: number;
|
|
61
|
+
/** Default `"GreaterThanThreshold"`. */
|
|
62
|
+
comparisonOperator?: string;
|
|
63
|
+
/** Default `1`. */
|
|
64
|
+
evaluationPeriods?: number;
|
|
65
|
+
treatMissingData?: "breaching" | "ignore" | "missing" | "notBreaching";
|
|
66
|
+
/** ARNs to notify on ALARM — an existing SNS topic, typically. */
|
|
67
|
+
alarmActions?: Value<string>[];
|
|
68
|
+
/**
|
|
69
|
+
* Dimension value for the alarm. Defaults to `dimension.value`; set this
|
|
70
|
+
* instead when the alarm needs to track a `Ref`/`GetAtt` the dashboard
|
|
71
|
+
* widget cannot (see the dashboard-body note above).
|
|
72
|
+
*/
|
|
73
|
+
dimensionValue?: Value<string>;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface MonitoringStackProps {
|
|
77
|
+
/** `Value<string>`: a name is routinely built with `Sub`/`Ref` (#1366). */
|
|
78
|
+
dashboardName?: Value<string>;
|
|
79
|
+
metric1: MonitoringMetricSpec;
|
|
80
|
+
metric2?: MonitoringMetricSpec;
|
|
81
|
+
metric3?: MonitoringMetricSpec;
|
|
82
|
+
tags?: Array<{
|
|
83
|
+
Key: string;
|
|
84
|
+
Value: string;
|
|
85
|
+
}>;
|
|
86
|
+
defaults?: {
|
|
87
|
+
dashboard?: Partial<ConstructorParameters<typeof CwDashboard>[0]>;
|
|
88
|
+
alarm1?: Partial<ConstructorParameters<typeof Alarm>[0]>;
|
|
89
|
+
alarm2?: Partial<ConstructorParameters<typeof Alarm>[0]>;
|
|
90
|
+
alarm3?: Partial<ConstructorParameters<typeof Alarm>[0]>;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export declare const MonitoringStack: import("@intentius/chant").CompositeDefinition<MonitoringStackProps, {
|
|
94
|
+
alarm3?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
95
|
+
alarm2?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
96
|
+
alarm1?: (import("@intentius/chant").Declarable & Record<string, string>) | undefined;
|
|
97
|
+
dashboard: import("@intentius/chant").Declarable & Record<string, string>;
|
|
98
|
+
}>;
|
|
99
|
+
//# sourceMappingURL=monitoring-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitoring-stack.d.ts","sourceRoot":"","sources":["../../src/composites/monitoring-stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAA4B,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2E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AAM,eAAe;;;;;EA2BP,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LoadBalancer, TargetGroup, Listener } from "../generated/index.js";
|
|
2
|
+
export interface NlbServiceProps {
|
|
3
|
+
vpcId: string;
|
|
4
|
+
subnetIds: string[];
|
|
5
|
+
listenerPort?: number;
|
|
6
|
+
/** Port the target group forwards traffic to. Defaults to `listenerPort`. */
|
|
7
|
+
targetPort?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Listener + target group protocol. `TLS` terminates TLS at the NLB and
|
|
10
|
+
* requires `certificateArn`; the other protocols pass traffic through
|
|
11
|
+
* unmodified, which is the common case for a Network Load Balancer.
|
|
12
|
+
*/
|
|
13
|
+
protocol?: "TCP" | "UDP" | "TLS" | "TCP_UDP";
|
|
14
|
+
scheme?: "internet-facing" | "internal";
|
|
15
|
+
/**
|
|
16
|
+
* Target group target type. `ip` (the default) covers Fargate awsvpc tasks
|
|
17
|
+
* and any routable IP; use `instance` to register EC2 instance IDs directly,
|
|
18
|
+
* or `alb` to chain an NLB in front of an existing Application Load Balancer.
|
|
19
|
+
*/
|
|
20
|
+
targetType?: "instance" | "ip" | "alb";
|
|
21
|
+
/**
|
|
22
|
+
* Static targets to register at creation time (instance IDs, IPs, or an ALB
|
|
23
|
+
* ARN depending on `targetType`). Omit when targets self-register instead —
|
|
24
|
+
* an ECS service, for instance, that references `targetGroup.TargetGroupArn`.
|
|
25
|
+
*/
|
|
26
|
+
targets?: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
port?: number;
|
|
29
|
+
availabilityZone?: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** ACM certificate ARN. Required when `protocol` is `TLS`. */
|
|
32
|
+
certificateArn?: string;
|
|
33
|
+
healthCheckProtocol?: "TCP" | "HTTP" | "HTTPS";
|
|
34
|
+
healthCheckPort?: string;
|
|
35
|
+
/** Only meaningful when `healthCheckProtocol` is `HTTP` or `HTTPS`. */
|
|
36
|
+
healthCheckPath?: string;
|
|
37
|
+
defaults?: {
|
|
38
|
+
nlb?: Partial<ConstructorParameters<typeof LoadBalancer>[0]>;
|
|
39
|
+
targetGroup?: Partial<ConstructorParameters<typeof TargetGroup>[0]>;
|
|
40
|
+
listener?: Partial<ConstructorParameters<typeof Listener>[0]>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const NlbService: import("@intentius/chant").CompositeDefinition<NlbServiceProps, {
|
|
44
|
+
nlb: import("@intentius/chant").Declarable & Record<string, string>;
|
|
45
|
+
targetGroup: import("@intentius/chant").Declarable & Record<string, string>;
|
|
46
|
+
listener: import("@intentius/chant").Declarable & Record<string, string>;
|
|
47
|
+
}>;
|
|
48
|
+
//# sourceMappingURL=nlb-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nlb-service.d.ts","sourceRoot":"","sources":["../../src/composites/nlb-service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,WAAW,EAEX,QAAQ,EAGT,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;IAC7C,MAAM,CAAC,EAAE,iBAAiB,GAAG,UAAU,CAAC;IACxC;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,KAAK,CAAC;IACvC;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1E,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE;QACT,GAAG,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,WAAW,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpE,QAAQ,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC/D,CAAC;CACH;AAED,eAAO,MAAM,UAAU;;;;EAoEP,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type Value } from "@intentius/chant";
|
|
2
|
+
import { Role, Role_Policy, LogGroup, StateMachine } from "../generated/index.js";
|
|
3
|
+
export interface StepFunctionsWorkflowProps {
|
|
4
|
+
/** `Value<string>`: a name is routinely built with `Sub`/`Ref` (#1366). */
|
|
5
|
+
name?: Value<string>;
|
|
6
|
+
/**
|
|
7
|
+
* ASL state machine definition, authored as a plain object. Passed to
|
|
8
|
+
* CloudFormation's `Definition` property rather than `DefinitionString`:
|
|
9
|
+
* CFN accepts the definition as a native JSON value (verified against
|
|
10
|
+
* Floci — both forms round-trip), so a task's `Resource` can carry a
|
|
11
|
+
* `Ref`/`Fn::GetAtt` intrinsic — e.g. `Resource: someFunc.Arn` — directly,
|
|
12
|
+
* with no `Fn::Sub` string templating needed to splice ARNs into a JSON
|
|
13
|
+
* string. Same `Value<T>`-over-string-building bias as #1366, one level up.
|
|
14
|
+
*/
|
|
15
|
+
definition: Record<string, unknown>;
|
|
16
|
+
/** ARNs of the Lambda functions this workflow's tasks invoke; grants `lambda:InvokeFunction` on each. */
|
|
17
|
+
lambdaFunctionArns?: Value<string>[];
|
|
18
|
+
stateMachineType?: "STANDARD" | "EXPRESS";
|
|
19
|
+
/** CloudWatch Logs retention for the auto-created log group. Default 14. */
|
|
20
|
+
logRetentionDays?: number;
|
|
21
|
+
/** `LoggingConfiguration` level. Default `"ALL"` — set `"OFF"` to skip execution logging. */
|
|
22
|
+
loggingLevel?: "ALL" | "ERROR" | "FATAL" | "OFF";
|
|
23
|
+
ManagedPolicyArns?: string[];
|
|
24
|
+
Policies?: InstanceType<typeof Role_Policy>[];
|
|
25
|
+
defaults?: {
|
|
26
|
+
role?: Partial<ConstructorParameters<typeof Role>[0]>;
|
|
27
|
+
logGroup?: Partial<ConstructorParameters<typeof LogGroup>[0]>;
|
|
28
|
+
stateMachine?: Partial<ConstructorParameters<typeof StateMachine>[0]>;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare const StepFunctionsWorkflow: import("@intentius/chant").CompositeDefinition<StepFunctionsWorkflowProps, {
|
|
32
|
+
role: import("@intentius/chant").Declarable & Record<string, string>;
|
|
33
|
+
logGroup: import("@intentius/chant").Declarable & Record<string, string>;
|
|
34
|
+
stateMachine: import("@intentius/chant").Declarable & Record<string, string>;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=step-functions-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-functions-workflow.d.ts","sourceRoot":"","sources":["../../src/composites/step-functions-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,YAAY,EAIb,MAAM,cAAc,CAAC;AAuCtB,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB;;;;;;;;OAQG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,yGAAyG;IACzG,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC1C,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;IACjD,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,EAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,QAAQ,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACvE,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB;;;;EAiDP,CAAC"}
|
package/dist/deep-observe.d.ts
CHANGED
|
@@ -74,6 +74,51 @@ export declare const DEEP_SOURCES: Record<string, DeepSource>;
|
|
|
74
74
|
* cannot drift apart — the shape of bug #1280 is about.
|
|
75
75
|
*/
|
|
76
76
|
export declare const DEEP_READABLE_TYPES: ReadonlySet<string>;
|
|
77
|
+
/**
|
|
78
|
+
* A child type this reader enumerates under one declared parent (#1015's
|
|
79
|
+
* out-of-band case) — the console-added SNS subscription or inline role
|
|
80
|
+
* policy that no property diff can see, because it is not a property of
|
|
81
|
+
* anything declared: it is a whole resource CloudFormation never made.
|
|
82
|
+
*
|
|
83
|
+
* Cloud Control's `ListResources` takes the parent as a `ResourceModel`
|
|
84
|
+
* scope, which is what `model` builds from the physical id the stack read
|
|
85
|
+
* already resolved. Every listed child is then sorted into declared (it is
|
|
86
|
+
* some stack resource's physical id, or some declared entity's spelled
|
|
87
|
+
* identity) or out-of-band; the out-of-band ones ride into the observation
|
|
88
|
+
* as live resources nobody declared, which the deep diff reports as
|
|
89
|
+
* undeclared entities.
|
|
90
|
+
*/
|
|
91
|
+
export interface DeepChildSource {
|
|
92
|
+
/** The child's CloudFormation type — what `ListResources` is asked for. */
|
|
93
|
+
childType: string;
|
|
94
|
+
/** The `ResourceModel` scoping the listing to one parent. */
|
|
95
|
+
model: (parentPhysicalId: string) => Record<string, unknown>;
|
|
96
|
+
/**
|
|
97
|
+
* Legacy declared forms of the same live child. `AWS::IAM::Policy` attached
|
|
98
|
+
* to a role creates the same inline policy `AWS::IAM::RolePolicy` lists, but
|
|
99
|
+
* under its own physical id — the policy name, which is the second part of
|
|
100
|
+
* the RolePolicy identifier. Without this leg every legacy inline policy
|
|
101
|
+
* reads as out-of-band on a stack that declared it.
|
|
102
|
+
*/
|
|
103
|
+
declaredVia?: Array<{
|
|
104
|
+
type: string;
|
|
105
|
+
/** The part of the child identifier that carries that type's physical id. */
|
|
106
|
+
part: (identifier: string) => string | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Parent type → the child types worth listing under it. Scoped like
|
|
111
|
+
* {@link DEEP_SOURCES}: the high-signal cases first — the issue's own
|
|
112
|
+
* examples — and widened per type, not by wildcard. A child type Cloud
|
|
113
|
+
* Control cannot list parent-scoped does not belong here.
|
|
114
|
+
*/
|
|
115
|
+
export declare const DEEP_CHILD_SOURCES: Record<string, readonly DeepChildSource[]>;
|
|
116
|
+
/**
|
|
117
|
+
* The name an out-of-band child reports under. There is no chant entity name
|
|
118
|
+
* to use — nobody declared it — so the name has to carry the finding on its
|
|
119
|
+
* own: what kind of thing, and which one.
|
|
120
|
+
*/
|
|
121
|
+
export declare function outOfBandChildName(childType: string, identifier: string): string;
|
|
77
122
|
/**
|
|
78
123
|
* `describe-security-groups` -> the `AWS::EC2::SecurityGroup` resource model.
|
|
79
124
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deep-observe.d.ts","sourceRoot":"","sources":["../src/deep-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAGV,sBAAsB,EACtB,qBAAqB,EAItB,MAAM,0BAA0B,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"deep-observe.d.ts","sourceRoot":"","sources":["../src/deep-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,KAAK,EAGV,sBAAsB,EACtB,qBAAqB,EAItB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAML,KAAK,WAAW,EAEjB,MAAM,mBAAmB,CAAC;AAe3B;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,GAAG,EAAE,eAAe,CAAA;CAAE,GACxB;IACE,GAAG,EAAE,KAAK,CAAC;IACX,wDAAwD;IACxD,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpE,CAAC;AAEN,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAkBnD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAAsC,CA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AAM,yBAAyB,EAAE,sBA+EvC,CAAC;AAMF,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAmED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAI/E;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;kDAG8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,sGAAsG;IACtG,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAoKhC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-read sources for the EC2 topology types (#1269).
|
|
3
|
+
*
|
|
4
|
+
* chant's distinguishing answers are folds over topology: `internetFacing`
|
|
5
|
+
* resolves subnet -> route table -> internet gateway, `effectiveIngress`
|
|
6
|
+
* resolves rules across attached security groups, and the default-VPC
|
|
7
|
+
* classification (`defaults.ts`) reads the provider's own markers. The inputs
|
|
8
|
+
* to all of them are the types this file covers — with only the original four
|
|
9
|
+
* kinds readable, a deep snapshot of an EC2 estate carried almost no
|
|
10
|
+
* properties, and a snapshot-backed query could answer identity questions but
|
|
11
|
+
* not a single fold question.
|
|
12
|
+
*
|
|
13
|
+
* Two sources, chosen per type:
|
|
14
|
+
*
|
|
15
|
+
* - The container types (VPC, subnet, route table, internet gateway) read
|
|
16
|
+
* through the EC2 describes. The fold facts live there and nowhere else:
|
|
17
|
+
* `IsDefault`, `DefaultForAz` and a subnet's live `MapPublicIpOnLaunch` are
|
|
18
|
+
* not part of the CloudFormation resource model, so Cloud Control cannot
|
|
19
|
+
* report them. The describes are also bulk (one call per type for the whole
|
|
20
|
+
* stack) and are implemented by the emulators that do not serve Cloud
|
|
21
|
+
* Control's `GetResource`.
|
|
22
|
+
*
|
|
23
|
+
* - The join types (route, association, gateway attachment) and the two whose
|
|
24
|
+
* describes do not fit a flat bulk join (instance rows nest inside
|
|
25
|
+
* reservations; launch-template data lives in a separate versions call) read
|
|
26
|
+
* through Cloud Control, which returns their model in the declared side's
|
|
27
|
+
* own shape.
|
|
28
|
+
*
|
|
29
|
+
* Each type carries its normalization entries alongside (#1269's note: adding
|
|
30
|
+
* a type without them trades a hole for a false positive, which is worse).
|
|
31
|
+
* They are merged into the tables in `deep-observe.ts`.
|
|
32
|
+
*/
|
|
33
|
+
import type { DeepSource } from "./deep-observe.js";
|
|
34
|
+
/**
|
|
35
|
+
* `describe-vpcs` -> the `AWS::EC2::VPC` resource model, plus `IsDefault`.
|
|
36
|
+
*
|
|
37
|
+
* `IsDefault` is the provider's own marker for the VPC nobody wrote — the fact
|
|
38
|
+
* the default classification reads — and it exists only on this surface.
|
|
39
|
+
* Carried even though the model does not name it; the diff subtracts it as a
|
|
40
|
+
* service default (`false`, gated on source silence) so a CloudFormation-made
|
|
41
|
+
* VPC does not report it as undeclared drift.
|
|
42
|
+
*/
|
|
43
|
+
export declare function vpcToModel(row: Record<string, unknown>): Record<string, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* `describe-subnets` -> the `AWS::EC2::Subnet` resource model, plus
|
|
46
|
+
* `DefaultForAz`.
|
|
47
|
+
*
|
|
48
|
+
* `MapPublicIpOnLaunch` is half of `internetFacing`; `DefaultForAz` is the
|
|
49
|
+
* provider's default-subnet marker, off the model for the same reason as a
|
|
50
|
+
* VPC's `IsDefault` and handled the same way.
|
|
51
|
+
*/
|
|
52
|
+
export declare function subnetToModel(row: Record<string, unknown>): Record<string, unknown>;
|
|
53
|
+
/**
|
|
54
|
+
* `describe-route-tables` -> the `AWS::EC2::RouteTable` resource model.
|
|
55
|
+
*
|
|
56
|
+
* The row also carries `Routes` and `Associations`, and this mapping drops
|
|
57
|
+
* them on purpose: a template declares each route as its own
|
|
58
|
+
* `AWS::EC2::Route` and each association as its own
|
|
59
|
+
* `AWS::EC2::SubnetRouteTableAssociation`, both covered below, so carrying
|
|
60
|
+
* them here would report every declared route twice — once as an undeclared
|
|
61
|
+
* array on the table and once through its own resource.
|
|
62
|
+
*/
|
|
63
|
+
export declare function routeTableToModel(row: Record<string, unknown>): Record<string, unknown>;
|
|
64
|
+
/** `describe-internet-gateways` -> the `AWS::EC2::InternetGateway` model, which is tags and nothing else. */
|
|
65
|
+
export declare function internetGatewayToModel(row: Record<string, unknown>): Record<string, unknown>;
|
|
66
|
+
/**
|
|
67
|
+
* The topology types' entries for `DEEP_SOURCES`.
|
|
68
|
+
*
|
|
69
|
+
* The routing-chain joins are addressed by their physical id — for a
|
|
70
|
+
* registry-backed type CloudFormation's physical id *is* the Cloud Control
|
|
71
|
+
* identifier (`rtb-…|0.0.0.0/0` for a route) — so Cloud Control's
|
|
72
|
+
* one-get-per-resource shape fits them exactly and returns the declared
|
|
73
|
+
* model's own field names.
|
|
74
|
+
*/
|
|
75
|
+
export declare const EC2_TOPOLOGY_SOURCES: Record<string, DeepSource>;
|
|
76
|
+
/**
|
|
77
|
+
* Service defaults for the topology types, merged into
|
|
78
|
+
* `AWS_SERVICE_DEFAULTS`. Subtracted on the live side only where source never
|
|
79
|
+
* declared the property — which is how the fold facts (`IsDefault`,
|
|
80
|
+
* `DefaultForAz`, a live `MapPublicIpOnLaunch`) stay in the snapshot for a
|
|
81
|
+
* query to read while never surfacing as drift on a resource CloudFormation
|
|
82
|
+
* itself created.
|
|
83
|
+
*/
|
|
84
|
+
export declare const EC2_TOPOLOGY_SERVICE_DEFAULTS: Record<string, Record<string, unknown>>;
|
|
85
|
+
/**
|
|
86
|
+
* Values the service picks when the template does not supply one, merged into
|
|
87
|
+
* `AWS_GENERATED_NAMES`. A subnet that names no availability zone gets one
|
|
88
|
+
* assigned — a different one is real placement drift only when the template
|
|
89
|
+
* had an opinion, which is exactly the counterpart gate.
|
|
90
|
+
*/
|
|
91
|
+
export declare const EC2_TOPOLOGY_GENERATED_NAMES: Record<string, ReadonlySet<string>>;
|
|
92
|
+
/**
|
|
93
|
+
* Declared properties a type's source cannot see (#1269).
|
|
94
|
+
*
|
|
95
|
+
* `describe-vpcs` does not return the DNS attributes — they live behind
|
|
96
|
+
* `describe-vpc-attribute` — and neither describe returns the IPAM inputs,
|
|
97
|
+
* which are consumed at creation. A declared value for one of these has
|
|
98
|
+
* nothing live to stand against, so the diff would report `value -> <absent>`
|
|
99
|
+
* on every clean apply: a blind spot rendered as drift. Pruned on the
|
|
100
|
+
* declared side, and only where the live tree is silent, so a source that
|
|
101
|
+
* does report the field (Cloud Control, some day) is still compared.
|
|
102
|
+
*/
|
|
103
|
+
export declare const AWS_DEEP_BLIND_SPOTS: Record<string, ReadonlySet<string>>;
|
|
104
|
+
//# sourceMappingURL=deep-topology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-topology.d.ts","sourceRoot":"","sources":["../src/deep-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAShF;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMvF;AAED,6GAA6G;AAC7G,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAK5F;AAYD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA2C3D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBjF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAG5E,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAcpE,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The aws effect-receipt materialization row (#1835, epic #1703): an effect
|
|
3
|
+
* receipt stored as an `AWS::SSM::Parameter`, plain `String`, at
|
|
4
|
+
* `/chant-receipts/<stack>/<env>/<effect>`.
|
|
5
|
+
*
|
|
6
|
+
* Core's `EffectReceipt` factory (#1831) declares a receipt under the `chant`
|
|
7
|
+
* pseudo-lexicon, which no serializer claims — the designed shape until a
|
|
8
|
+
* lexicon materializes it. This module is that materialization for aws: the
|
|
9
|
+
* {@link EffectReceipt} factory here produces the same declaration shape but
|
|
10
|
+
* under `lexicon: "aws"`, so the build partitions it to the aws serializer,
|
|
11
|
+
* #1832's write-exclusion seam withholds it from the apply-bound entity set,
|
|
12
|
+
* and the serializer renders it for visibility through
|
|
13
|
+
* `SerializeContext.receipts` (see ./serializer.ts).
|
|
14
|
+
*
|
|
15
|
+
* Path identity (epic decision 4): the parameter name derives from the SAME
|
|
16
|
+
* ownership-block fields that stamp markers — `ownership.stack` and an
|
|
17
|
+
* explicit `ownership.env` — plus the receipt's `effect`. One derivation,
|
|
18
|
+
* {@link receiptParameterName}, shared by the serializer (the rendered row),
|
|
19
|
+
* the receipt store (../receipt-store.ts — what `receiptRead`/`receiptWrite`
|
|
20
|
+
* actually touch), and the observation leg (plan's live read). No env, no
|
|
21
|
+
* path: the callers error rather than guessing a segment.
|
|
22
|
+
*
|
|
23
|
+
* Plain store (epic decision 7, #1833's COR023): the parameter type is pinned
|
|
24
|
+
* to `String` at the source — the factory does not take a type, and the
|
|
25
|
+
* declared `props.Type` is the literal `"String"`. A receipt value is a
|
|
26
|
+
* witness (an existence marker or a `sha256:` digest), never a secret; a
|
|
27
|
+
* `SecureString` invites masking and rotation semantics that defeat the
|
|
28
|
+
* observe-and-compare loop, and the lint guard fails it.
|
|
29
|
+
*/
|
|
30
|
+
import { type Declarable } from "@intentius/chant/declarable";
|
|
31
|
+
import { EFFECT_RECEIPT_MARKER, type EffectReceiptFlavor, type EffectReceiptOptions } from "@intentius/chant/effect-receipt";
|
|
32
|
+
/** The entityType of the aws materialization row — the real resource kind the
|
|
33
|
+
* receipt is stored as, which is what lint's plain-store guard checks. */
|
|
34
|
+
export declare const AWS_EFFECT_RECEIPT_ENTITY_TYPE = "AWS::SSM::Parameter";
|
|
35
|
+
/** Template-level `Metadata` key the serializer renders receipt rows under.
|
|
36
|
+
* Beside `chant:ownership` (./ownership.ts) and like it deliberately outside
|
|
37
|
+
* `Resources` — the applier writes from `Resources`, and a receipt must never
|
|
38
|
+
* enter the apply-bound document (#1832; the `effect()` step is the sole
|
|
39
|
+
* writer, epic decision 3). */
|
|
40
|
+
export declare const EFFECT_RECEIPTS_METADATA_KEY = "chant:effect-receipts";
|
|
41
|
+
/** Every receipt parameter lives under this prefix, so read-only IAM can be
|
|
42
|
+
* scoped to `arn:…:parameter/chant-receipts/*` and nothing else. */
|
|
43
|
+
export declare const RECEIPT_PATH_PREFIX = "/chant-receipts";
|
|
44
|
+
/**
|
|
45
|
+
* The rendered `Value` of a hash-flavor receipt that still carries reference
|
|
46
|
+
* inputs at synthesis. References resolve at plan and at run, never at
|
|
47
|
+
* synthesis (epic decision 5) — so the row carries this note instead of a
|
|
48
|
+
* digest hashed over placeholders.
|
|
49
|
+
*/
|
|
50
|
+
export declare const RECEIPT_UNRESOLVED_VALUE_NOTE = "unresolved at synthesis \u2014 reference inputs; the expectation resolves at plan and at run (chant #1703, decision 5)";
|
|
51
|
+
/**
|
|
52
|
+
* The SSM parameter name of one effect's receipt:
|
|
53
|
+
* `/chant-receipts/<stack>/<env>/<effect>`, from the resolved ownership
|
|
54
|
+
* marker fields (epic decision 4). The single source of the path identity —
|
|
55
|
+
* the serializer's rendered row, the receipt store's reads and writes, and
|
|
56
|
+
* the observation leg all call this.
|
|
57
|
+
*/
|
|
58
|
+
export declare function receiptParameterName(stack: string, env: string, effect: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* An aws-materialized effect receipt: core's declaration shape (so
|
|
61
|
+
* `isEffectReceipt`, `effect(...)`, lint, and the plan engine all recognize it
|
|
62
|
+
* through the marker), under the aws lexicon and the real resource kind, with
|
|
63
|
+
* the store variant pinned plain.
|
|
64
|
+
*/
|
|
65
|
+
export interface AwsEffectReceiptDeclaration extends Declarable {
|
|
66
|
+
readonly [EFFECT_RECEIPT_MARKER]: true;
|
|
67
|
+
readonly lexicon: "aws";
|
|
68
|
+
readonly entityType: typeof AWS_EFFECT_RECEIPT_ENTITY_TYPE;
|
|
69
|
+
/** The receipt's own name (the export-level identity of the witness). */
|
|
70
|
+
readonly name: string;
|
|
71
|
+
/** The effect this receipt witnesses — the path's final segment. */
|
|
72
|
+
readonly effect: string;
|
|
73
|
+
/** How the receipt is compared: mere presence, or a digest of the inputs. */
|
|
74
|
+
readonly flavor: EffectReceiptFlavor;
|
|
75
|
+
/** The effect's inputs as recorded at synthesis (references as placeholders). */
|
|
76
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
77
|
+
/** The declared parameter variant — pinned `String` at the source, which is
|
|
78
|
+
* the concrete half of #1833's plain-store guard. */
|
|
79
|
+
readonly props: {
|
|
80
|
+
readonly Type: "String";
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Declare an aws-materialized effect receipt. Same signature and semantics as
|
|
85
|
+
* core's `EffectReceipt` (#1831) — the options are validated and frozen by the
|
|
86
|
+
* core factory — but the declaration lands in the aws partition, so the aws
|
|
87
|
+
* serializer renders the `AWS::SSM::Parameter` row and the receipt store
|
|
88
|
+
* (../receipt-store.ts) is its writer. Pass the returned const straight to the
|
|
89
|
+
* `effect(...)` op step.
|
|
90
|
+
*/
|
|
91
|
+
export declare function EffectReceipt(name: string, options: EffectReceiptOptions): AwsEffectReceiptDeclaration;
|
|
92
|
+
//# sourceMappingURL=effect-receipt-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect-receipt-row.d.ts","sourceRoot":"","sources":["../src/effect-receipt-row.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAEL,qBAAqB,EACrB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAEzC;0EAC0E;AAC1E,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AAEpE;;;;+BAI+B;AAC/B,eAAO,MAAM,4BAA4B,0BAA0B,CAAC;AAEpE;oEACoE;AACpE,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,2HAC2E,CAAC;AAkBtH;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvF;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA4B,SAAQ,UAAU;IAC7D,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,OAAO,8BAA8B,CAAC;IAC3D,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD;yDACqD;IACrD,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;KAAE,CAAC;CAC7C;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,2BAA2B,CA0BtG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export { defaultTags, isDefaultTags, DEFAULT_TAGS_MARKER } from "./default-tags.
|
|
|
3
3
|
export type { DefaultTags, TagEntry } from "./default-tags.js";
|
|
4
4
|
export { templateTransform, isTemplateTransform, TEMPLATE_TRANSFORM_MARKER } from "./template-transform.js";
|
|
5
5
|
export type { TemplateTransform } from "./template-transform.js";
|
|
6
|
+
export { EffectReceipt, receiptParameterName, AWS_EFFECT_RECEIPT_ENTITY_TYPE, EFFECT_RECEIPTS_METADATA_KEY, RECEIPT_PATH_PREFIX, RECEIPT_UNRESOLVED_VALUE_NOTE, } from "./effect-receipt-row.js";
|
|
7
|
+
export type { AwsEffectReceiptDeclaration } from "./effect-receipt-row.js";
|
|
8
|
+
export { awsReceiptStore, observeReceiptRows, ssmGetParameter, ssmPutParameter } from "./receipt-store.js";
|
|
9
|
+
export type { AwsReceiptStoreOptions, ReceiptRowObservation } from "./receipt-store.js";
|
|
6
10
|
export { awsSerializer } from "./serializer.js";
|
|
7
11
|
export { nestedStack, isNestedStackInstance, NestedStackOutputRef, isNestedStackOutputRef, NESTED_STACK_MARKER } from "./nested-stack.js";
|
|
8
12
|
export type { NestedStackOptions, NestedStackInstance } from "./nested-stack.js";
|
|
@@ -24,8 +28,8 @@ export type { CFNSchema, SchemaProperty, SchemaDefinition } from "./spec/fetch.j
|
|
|
24
28
|
export { parseCFNSchema, cfnShortName, cfnServiceName } from "./spec/parse.js";
|
|
25
29
|
export type { SchemaParseResult, ParsedResource, ParsedProperty, ParsedAttribute, ParsedPropertyType, ParsedEnum, PropertyConstraints } from "./spec/parse.js";
|
|
26
30
|
export { S3Actions, LambdaActions, DynamoDBActions, SQSActions, SNSActions, IAMActions, ECRActions, LogsActions, ECSActions } from "./actions/index.js";
|
|
27
|
-
export { LambdaFunction, LambdaNode, LambdaPython, NodeLambda, PythonLambda, LambdaApi, LambdaScheduled, ScheduledLambda, LambdaSqs, LambdaEventBridge, LambdaDynamoDB, LambdaS3, LambdaSns, VpcDefault, FargateAlb, AlbShared, FargateService, RdsInstance, RdsPostgres, EfsWithAccessPoint, Ec2InstanceRole, MinimalVpc, EksCluster, SolrFargateService, MicrovmApp, MICROVM_LIMITS, AgentCoreAgent, agentCoreDefaultEndpointArn, OrganizationRoot, GovernanceFoundation, RegionRestriction, OrganizationTrail, } from "./composites/index.js";
|
|
28
|
-
export type { LambdaFunctionProps, LambdaApiProps, ScheduledLambdaProps, LambdaSqsProps, LambdaEventBridgeProps, LambdaDynamoDBProps, LambdaS3Props, LambdaSnsProps, VpcDefaultProps, FargateAlbProps, AlbSharedProps, FargateServiceProps, RdsInstanceProps, RdsPostgresProps, EfsWithAccessPointProps, Ec2InstanceRoleProps, MinimalVpcProps, EksClusterProps, SolrFargateServiceProps, MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB, AgentCoreAgentProps, AgentCoreAgentResult, OrganizationRootProps, GovernanceFoundationProps, RegionRestrictionProps, OrganizationTrailProps, } from "./composites/index.js";
|
|
31
|
+
export { LambdaFunction, LambdaNode, LambdaPython, NodeLambda, PythonLambda, LambdaApi, LambdaScheduled, ScheduledLambda, LambdaSqs, LambdaEventBridge, LambdaDynamoDB, DynamoDBTable, EcrRepository, LambdaS3, LambdaSns, VpcDefault, FargateAlb, AlbShared, FargateService, FARGATE_SERVICE_LIMITS, NlbService, RdsInstance, RdsPostgres, EfsWithAccessPoint, Ec2InstanceRole, Ec2InstanceBundle, MinimalVpc, EksCluster, SolrFargateService, MicrovmApp, MICROVM_LIMITS, AgentCoreAgent, agentCoreDefaultEndpointArn, AGENTCORE_LIMITS, OrganizationRoot, GovernanceFoundation, RegionRestriction, OrganizationTrail, StepFunctionsWorkflow, MonitoringStack, BucketDeployment, } from "./composites/index.js";
|
|
32
|
+
export type { LambdaFunctionProps, LambdaApiProps, ScheduledLambdaProps, LambdaSqsProps, LambdaEventBridgeProps, LambdaDynamoDBProps, DynamoDBTableProps, DynamoDBKey, DynamoDBCapacity, DynamoDBGlobalSecondaryIndex, EcrRepositoryProps, EcrLifecycleRule, EcrEncryption, LambdaS3Props, LambdaSnsProps, VpcDefaultProps, FargateAlbProps, AlbSharedProps, FargateServiceProps, NlbServiceProps, RdsInstanceProps, RdsPostgresProps, EfsWithAccessPointProps, Ec2InstanceRoleProps, Ec2InstanceBundleProps, Ec2InstanceBundleIngressRule, MinimalVpcProps, EksClusterProps, SolrFargateServiceProps, MicrovmAppProps, MicrovmAppResult, MicrovmAppBuildConnectorProps, MicrovmMemoryMiB, AgentCoreAgentProps, AgentCoreAgentResult, OrganizationRootProps, GovernanceFoundationProps, RegionRestrictionProps, OrganizationTrailProps, StepFunctionsWorkflowProps, MonitoringStackProps, MonitoringMetricSpec, BucketDeploymentProps, BucketDeploymentResult, } from "./composites/index.js";
|
|
29
33
|
export { generate, writeGeneratedFiles } from "./codegen/generate.js";
|
|
30
34
|
export { packageLexicon } from "./codegen/package.js";
|
|
31
35
|
export type { PackageOptions, PackageResult } from "./codegen/package.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACzG,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACzG,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAK9D,OA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AAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAChI,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,cAAc,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "73f13702a63ae229fbc2ca77dc23d1fb98a22f2a7a101e8ddf4ec66749527440",
|
|
5
5
|
"meta.json": "2e4cae67cbc2eb2962c3dd0aa57008ae96fb725dd0118af7b04b2b44eab7722a",
|
|
6
6
|
"types/index.d.ts": "6d6b37bd14a9b40fb3ff5c66e1cb49be1ae1032de47a4e167cf5f411c943b7f5",
|
|
7
7
|
"rules/hardcoded-region.ts": "5a0eaf7ab391231fe6cd51426ece29539cb4b36f31c8dd060956638fed55722a",
|
|
8
8
|
"rules/iam-wildcard.ts": "135d7217d278fef50939e605c5da32603ba35674b8c4b5c4d66a06c77903e945",
|
|
9
9
|
"rules/s3-encryption.ts": "c4f9f8aa8dc382ed98c7b04e820a600590cc75335a8db2e087cbfbfe4003d09e",
|
|
10
|
-
"rules/cf-refs.ts": "
|
|
10
|
+
"rules/cf-refs.ts": "3ca38a822b75db5b6370a5507f6a1c088e5419c9f8f5a3c9631468064842ba12",
|
|
11
11
|
"rules/cor020.ts": "915bbb4c083c7b3b84b93e8e891b5ffffe5a138fdccda32ecfdda91b8685798c",
|
|
12
12
|
"rules/ext001.ts": "f8703f37a50ab23d0ecaef539c0215a71269d420fa5e09a3d0454b18b7350b34",
|
|
13
13
|
"rules/waw010.ts": "41c58aaedb8f9fe266f4b40f1a076f762796427fdf9b317b8a4a50c713e45571",
|
|
@@ -58,9 +58,14 @@
|
|
|
58
58
|
"rules/waw056.ts": "d686630ddcdbb9496582b5712a8ceae13f61c19a6803f22f09dd52c0947dd4e9",
|
|
59
59
|
"rules/waw057.ts": "5db562dc7d0c0ccedbfcb08357d2d0f7f561a828df17e1b1a183c338ef0a3ec1",
|
|
60
60
|
"rules/waw058.ts": "fbcfde64bbf81abe919f4e60a7e283a1b2ff30454b2c1cec2e0e099e7ad187e6",
|
|
61
|
+
"rules/waw059.ts": "abaa8b31e5e50837be8d8ebe124b6e2156e0bbb8699e93e60eb63f623db37f24",
|
|
62
|
+
"rules/waw060.ts": "0fd439ba658b44ae16454bc850948d97ebf81739ff5ef0a46de69fcc0c4ac705",
|
|
63
|
+
"rules/waw061.ts": "5e25d1cd07c5ff0c918d84995cf37a8fa22294242de6b421c1eef37f4fb6521d",
|
|
64
|
+
"rules/waw062.ts": "8051ac5cbc3e53fc1e664bb8e6ffd54a75fac0b6e9e802bd0d244dfec59d82a0",
|
|
65
|
+
"rules/waw063.ts": "c64f86e7cea5363c42d6aa59c06c4343b7c6cad20aeb9fbf4fec69de5e63ee87",
|
|
61
66
|
"skills/chant-aws.md": "4d65eb160e001f2af42eb7c622a5b498c2fd1f5afbd6c8155615c010fb265c63",
|
|
62
67
|
"skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe",
|
|
63
|
-
"skills/chant-aws-carve-terraform.md": "
|
|
68
|
+
"skills/chant-aws-carve-terraform.md": "0ae4376590db47979be144d3ac6cdcfd56c9640d0536421aacf7330459d38e52"
|
|
64
69
|
},
|
|
65
|
-
"composite": "
|
|
70
|
+
"composite": "0863289514a6e704688b98dd03fd728b10c1763269f46a0591689f19bc8f9e24"
|
|
66
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAkB,MAAM,gCAAgC,CAAC;AAQ1F,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAkB,MAAM,gCAAgC,CAAC;AAQ1F,6CAA6C;AAC7C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAgEpD,CAAC"}
|
|
@@ -32,6 +32,13 @@ export declare function parseCFTemplate(output: string | {
|
|
|
32
32
|
* Skips pseudo-parameters (those starting with "AWS::").
|
|
33
33
|
*/
|
|
34
34
|
export declare function findResourceRefs(value: unknown): Set<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Build the reverse of `findResourceRefs` for a whole template: logical id →
|
|
37
|
+
* the set of logical ids whose Properties reference it via Ref/Fn::GetAtt.
|
|
38
|
+
* Lets a check walk the graph consumer-ward (who uses this role?) instead of
|
|
39
|
+
* dependency-ward. Used by WAW059.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildReverseRefIndex(template: CFTemplate): Map<string, Set<string>>;
|
|
35
42
|
/**
|
|
36
43
|
* Check if a value is a CloudFormation intrinsic function (Ref, Fn::*, etc.)
|
|
37
44
|
* that cannot be statically evaluated.
|
|
@@ -61,6 +68,23 @@ export declare function getContainerDefinitions(resource: CFResource): Array<Rec
|
|
|
61
68
|
* project that never sets `--env`/`ownership.env` isn't unexpectedly hard-failed.
|
|
62
69
|
*/
|
|
63
70
|
export declare function isFullTierEnv(env: string | undefined): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Parse an IPv4 CIDR literal ("10.0.0.0/16") into its numeric base address
|
|
73
|
+
* and prefix length. Returns null for anything that isn't a plain IPv4 CIDR
|
|
74
|
+
* (IPv6, malformed octets, out-of-range prefix) — callers treat that as
|
|
75
|
+
* "can't prove statically" rather than an error.
|
|
76
|
+
*/
|
|
77
|
+
export declare function parseIpv4Cidr(cidr: string): {
|
|
78
|
+
base: number;
|
|
79
|
+
prefix: number;
|
|
80
|
+
} | null;
|
|
81
|
+
/**
|
|
82
|
+
* Whether `inner` (an IPv4 CIDR literal) falls entirely within `outer`.
|
|
83
|
+
* Returns null — not false — when either literal isn't a plain, parseable
|
|
84
|
+
* IPv4 CIDR (e.g. IPv6, or a CloudFormation intrinsic already stringified
|
|
85
|
+
* elsewhere); a null means "statically unprovable", not "violation".
|
|
86
|
+
*/
|
|
87
|
+
export declare function ipv4CidrContains(outer: string, inner: string): boolean | null;
|
|
64
88
|
/**
|
|
65
89
|
* Check if a port range [fromPort, toPort] contains any of the sensitive ports.
|
|
66
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cf-refs.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/cf-refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,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,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAO7E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,MAAM,EAAE,GACvB,OAAO,CAgBT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAyDvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAwD3C,CAAC"}
|