@intentius/chant-lexicon-aws 0.60.0 → 0.61.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/generated/index.d.ts +408 -7
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/integrity.json +4 -4
- package/dist/manifest.json +1 -1
- package/dist/meta.json +2040 -35
- package/dist/okf/types/AnycastIpList.md +2 -2
- package/dist/okf/types/AppMonitor.md +1 -1
- package/dist/okf/types/AppSyncApi.md +1 -1
- package/dist/okf/types/AppSyncDomainName.md +1 -1
- package/dist/okf/types/ApplicationInstance.md +1 -1
- package/dist/okf/types/ApprovalTeam.md +1 -1
- package/dist/okf/types/AutomatedReasoningPolicy.md +1 -1
- package/dist/okf/types/AutomatedReasoningPolicyVersion.md +1 -1
- package/dist/okf/types/BatchScramSecret.md +1 -1
- package/dist/okf/types/BedrockAgentCoreGateway.md +1 -1
- package/dist/okf/types/BedrockFlow.md +1 -1
- package/dist/okf/types/BotAlias.md +1 -1
- package/dist/okf/types/BotVersion.md +1 -1
- package/dist/okf/types/Broker.md +4 -4
- package/dist/okf/types/BrowserCustom.md +2 -2
- package/dist/okf/types/CalculatedAttributeDefinition.md +1 -1
- package/dist/okf/types/CarrierGateway.md +1 -1
- package/dist/okf/types/ChannelNamespace.md +3 -3
- package/dist/okf/types/ClusterCapacityProviderAssociations.md +2 -2
- package/dist/okf/types/CodeInterpreterCustom.md +1 -1
- package/dist/okf/types/Collaboration.md +3 -3
- package/dist/okf/types/Command.md +1 -1
- package/dist/okf/types/ComputeOptimizerAutomationRule.md +1 -1
- package/dist/okf/types/ConfiguredTable.md +1 -1
- package/dist/okf/types/DataCatalog.md +1 -1
- package/dist/okf/types/DataCellsFilter.md +1 -1
- package/dist/okf/types/DataProvider.md +1 -1
- package/dist/okf/types/DirectConnectConnection.md +1 -1
- package/dist/okf/types/DirectConnectGatewayAssociation.md +2 -2
- package/dist/okf/types/DocDBGlobalCluster.md +1 -1
- package/dist/okf/types/DomainObjectType.md +1 -1
- package/dist/okf/types/EIPAssociation.md +1 -1
- package/dist/okf/types/EMRServerlessApplication.md +2 -2
- package/dist/okf/types/EmailContact.md +1 -1
- package/dist/okf/types/EventTrigger.md +2 -2
- package/dist/okf/types/EventsEndpoint.md +1 -1
- package/dist/okf/types/ExecutionPlan.md +1 -1
- package/dist/okf/types/ExperimentTemplate.md +1 -1
- package/dist/okf/types/Faq.md +1 -1
- package/dist/okf/types/Field.md +1 -1
- package/dist/okf/types/Function.md +1 -1
- package/dist/okf/types/GameServerGroup.md +3 -3
- package/dist/okf/types/GroupingConfiguration.md +1 -1
- package/dist/okf/types/GuardHook.md +1 -1
- package/dist/okf/types/ImageVersion.md +1 -1
- package/dist/okf/types/InboundExternalLink.md +1 -1
- package/dist/okf/types/InferenceComponent.md +1 -1
- package/dist/okf/types/InstanceAccessControlAttributeConfiguration.md +1 -1
- package/dist/okf/types/InvoiceUnit.md +1 -1
- package/dist/okf/types/KendraDataSource.md +1 -1
- package/dist/okf/types/KendraIndex.md +3 -3
- package/dist/okf/types/KinesisResourcePolicy.md +1 -1
- package/dist/okf/types/LambdaHook.md +1 -1
- package/dist/okf/types/LandingZone.md +1 -1
- package/dist/okf/types/LaunchConfiguration.md +1 -1
- package/dist/okf/types/Layout.md +1 -1
- package/dist/okf/types/LinkRoutingRule.md +1 -1
- package/dist/okf/types/LocalGatewayRouteTable.md +1 -1
- package/dist/okf/types/LocalGatewayRouteTableVPCAssociation.md +1 -1
- package/dist/okf/types/LocalGatewayRouteTableVirtualInterfaceGroupAssociation.md +1 -1
- package/dist/okf/types/LogDeliveryConfiguration.md +1 -1
- package/dist/okf/types/MPAIdentitySource.md +1 -1
- package/dist/okf/types/MSKConfiguration.md +1 -1
- package/dist/okf/types/ManagedLoginBranding.md +1 -1
- package/dist/okf/types/Memory.md +2 -2
- package/dist/okf/types/MetricStream.md +2 -2
- package/dist/okf/types/ModelPackage.md +2 -2
- package/dist/okf/types/MultiRegionEndpoint.md +1 -1
- package/dist/okf/types/Notification.md +1 -1
- package/dist/okf/types/NotificationConfiguration.md +1 -1
- package/dist/okf/types/OutboundExternalLink.md +1 -1
- package/dist/okf/types/PanoramaPackage.md +1 -1
- package/dist/okf/types/PolicyStatement.md +2 -2
- package/dist/okf/types/PolicyStore.md +1 -1
- package/dist/okf/types/PrincipalPermissions.md +2 -2
- package/dist/okf/types/PrivateVirtualInterface.md +2 -2
- package/dist/okf/types/PublicVirtualInterface.md +1 -1
- package/dist/okf/types/RDSGlobalCluster.md +1 -1
- package/dist/okf/types/RTBFabricLink.md +2 -2
- package/dist/okf/types/RedshiftCluster.md +3 -3
- package/dist/okf/types/RedshiftEventSubscription.md +1 -1
- package/dist/okf/types/RegistryScanningConfiguration.md +1 -1
- package/dist/okf/types/ReplicationSet.md +1 -1
- package/dist/okf/types/ReportDefinition.md +2 -2
- package/dist/okf/types/RequesterGateway.md +3 -3
- package/dist/okf/types/ResourceConfiguration.md +1 -1
- package/dist/okf/types/ResourceGateway.md +1 -1
- package/dist/okf/types/ResourceGroupsGroup.md +1 -1
- package/dist/okf/types/ResponderGateway.md +3 -3
- package/dist/okf/types/Route53GlobalResolverFirewallDomainList.md +1 -1
- package/dist/okf/types/Route53ResolverFirewallDomainList.md +1 -1
- package/dist/okf/types/Runtime.md +1 -1
- package/dist/okf/types/SMSVOICEPhoneNumber.md +1 -1
- package/dist/okf/types/SageMakerCluster.md +2 -2
- package/dist/okf/types/SageMakerPipeline.md +1 -1
- package/dist/okf/types/SamplingRule.md +1 -1
- package/dist/okf/types/SchemaMapping.md +1 -1
- package/dist/okf/types/SecurityAgentAgentSpace.md +1 -1
- package/dist/okf/types/SecurityGroup.md +1 -1
- package/dist/okf/types/ServiceEnvironment.md +1 -1
- package/dist/okf/types/ServiceLevelObjective.md +3 -3
- package/dist/okf/types/Stack.md +1 -1
- package/dist/okf/types/StateMachineAlias.md +1 -1
- package/dist/okf/types/StreamProcessor.md +1 -1
- package/dist/okf/types/Studio.md +1 -1
- package/dist/okf/types/Subscriber.md +1 -1
- package/dist/okf/types/Tag.md +1 -1
- package/dist/okf/types/TagAssociation.md +1 -1
- package/dist/okf/types/Task.md +2 -2
- package/dist/okf/types/TimestreamScheduledQuery.md +1 -1
- package/dist/okf/types/TransitVirtualInterface.md +2 -2
- package/dist/okf/types/VPCEndpoint.md +1 -1
- package/dist/okf/types/VpcConnection.md +2 -2
- package/dist/okf/types/WAFv2WebACL.md +1 -1
- package/dist/okf/types/WorkGroup.md +1 -1
- package/dist/okf/types/XRayGroup.md +1 -1
- package/dist/types/index.d.ts +4521 -716
- package/package.json +2 -2
- package/src/codegen/any-budget.test.ts +66 -0
- package/src/generated/index.d.ts +4521 -716
- package/src/generated/index.ts +408 -7
- package/src/generated/lexicon-aws.json +2040 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-aws",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "AWS CloudFormation lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"typescript": "^5.9.3"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@intentius/chant": "^0.
|
|
83
|
+
"@intentius/chant": "^0.61.0",
|
|
84
84
|
"typescript": "^5.9.3"
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A budget on the `any`s in the generated declaration (chant #2205).
|
|
3
|
+
*
|
|
4
|
+
* `Tags?: any` accepts `Tags: 7`, so every `any` in the surface is a property
|
|
5
|
+
* chant does not check. The count is asserted rather than merely reported so
|
|
6
|
+
* that the next drop is a deliberate edit to this file, and so a resolver
|
|
7
|
+
* change that quietly widens the surface fails here.
|
|
8
|
+
*
|
|
9
|
+
* The declaration is gitignored and written by `npm run generate`, so this
|
|
10
|
+
* skips on a checkout that has not generated yet.
|
|
11
|
+
*/
|
|
12
|
+
import { describe, test, expect } from "vitest";
|
|
13
|
+
import { existsSync, readFileSync } from "fs";
|
|
14
|
+
import { dirname, join } from "path";
|
|
15
|
+
import { fileURLToPath } from "url";
|
|
16
|
+
|
|
17
|
+
const pkgDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
18
|
+
const dtsPath = join(pkgDir, "src/generated/index.d.ts");
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* What remains after #2205's three resolver gaps closed, by cause:
|
|
22
|
+
* 161 `$ref`s to a definition that is nothing but a `oneOf`/`anyOf` of object
|
|
23
|
+
* branches (a real sum type, deferred to #2278), 20 properties that declare no
|
|
24
|
+
* type at all, 8 that `$ref` an empty definition, 8 that carry a branch list
|
|
25
|
+
* with nothing beside it, one upstream `$ref` to an undeclared definition, and
|
|
26
|
+
* one `$ref` to a definition that is itself a bare `$ref`. Plus 38
|
|
27
|
+
* non-constructor `any`s (readonly attributes and intrinsic return types).
|
|
28
|
+
*/
|
|
29
|
+
const ANY_BUDGET = 226;
|
|
30
|
+
const ANY_ARRAY_BUDGET = 20;
|
|
31
|
+
|
|
32
|
+
describe.skipIf(!existsSync(dtsPath))("generated `any` budget", () => {
|
|
33
|
+
const dts = existsSync(dtsPath) ? readFileSync(dtsPath, "utf-8") : "";
|
|
34
|
+
const count = (re: RegExp) => (dts.match(re) ?? []).length;
|
|
35
|
+
|
|
36
|
+
test("the `: any;` count has not grown", () => {
|
|
37
|
+
expect(count(/: any;/g)).toBeLessThanOrEqual(ANY_BUDGET);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test("the `: any[];` count has not grown", () => {
|
|
41
|
+
expect(count(/: any\[\];/g)).toBeLessThanOrEqual(ANY_ARRAY_BUDGET);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test("a list definition resolves through its items", () => {
|
|
45
|
+
// AWS::Panorama::ApplicationInstance.Tags is a $ref to a TagList
|
|
46
|
+
// definition whose items are the Tag definition one hop away.
|
|
47
|
+
expect(dts).toContain("Tags?: ApplicationInstance_Tag[];");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test("a branch list beside a type does not erase the type", () => {
|
|
51
|
+
// AWS::AmazonMQ::Broker.EngineType carries `type: "string"` beside an
|
|
52
|
+
// anyOf whose first branch is the enum.
|
|
53
|
+
expect(dts).toContain('EngineType: "ACTIVEMQ" | "RABBITMQ";');
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test("an allOf of one $ref and an annotation resolves as the $ref", () => {
|
|
57
|
+
// AWS::BedrockAgentCore::Gateway.ProtocolType
|
|
58
|
+
expect(dts).toContain("ProtocolType?: BedrockAgentCoreGateway_GatewayProtocolType;");
|
|
59
|
+
expect(dts).toContain('export type BedrockAgentCoreGateway_GatewayProtocolType = "MCP";');
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("no union sits unparenthesized inside an array", () => {
|
|
63
|
+
// `[]` binds tighter than `|`: `"a" | "b"[]` accepts the bare string "a".
|
|
64
|
+
expect(dts).not.toMatch(/: "[^;\n]*" \| [^;\n()]*\[\];/);
|
|
65
|
+
});
|
|
66
|
+
});
|