@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.
Files changed (127) hide show
  1. package/dist/generated/index.d.ts +408 -7
  2. package/dist/generated/index.d.ts.map +1 -1
  3. package/dist/integrity.json +4 -4
  4. package/dist/manifest.json +1 -1
  5. package/dist/meta.json +2040 -35
  6. package/dist/okf/types/AnycastIpList.md +2 -2
  7. package/dist/okf/types/AppMonitor.md +1 -1
  8. package/dist/okf/types/AppSyncApi.md +1 -1
  9. package/dist/okf/types/AppSyncDomainName.md +1 -1
  10. package/dist/okf/types/ApplicationInstance.md +1 -1
  11. package/dist/okf/types/ApprovalTeam.md +1 -1
  12. package/dist/okf/types/AutomatedReasoningPolicy.md +1 -1
  13. package/dist/okf/types/AutomatedReasoningPolicyVersion.md +1 -1
  14. package/dist/okf/types/BatchScramSecret.md +1 -1
  15. package/dist/okf/types/BedrockAgentCoreGateway.md +1 -1
  16. package/dist/okf/types/BedrockFlow.md +1 -1
  17. package/dist/okf/types/BotAlias.md +1 -1
  18. package/dist/okf/types/BotVersion.md +1 -1
  19. package/dist/okf/types/Broker.md +4 -4
  20. package/dist/okf/types/BrowserCustom.md +2 -2
  21. package/dist/okf/types/CalculatedAttributeDefinition.md +1 -1
  22. package/dist/okf/types/CarrierGateway.md +1 -1
  23. package/dist/okf/types/ChannelNamespace.md +3 -3
  24. package/dist/okf/types/ClusterCapacityProviderAssociations.md +2 -2
  25. package/dist/okf/types/CodeInterpreterCustom.md +1 -1
  26. package/dist/okf/types/Collaboration.md +3 -3
  27. package/dist/okf/types/Command.md +1 -1
  28. package/dist/okf/types/ComputeOptimizerAutomationRule.md +1 -1
  29. package/dist/okf/types/ConfiguredTable.md +1 -1
  30. package/dist/okf/types/DataCatalog.md +1 -1
  31. package/dist/okf/types/DataCellsFilter.md +1 -1
  32. package/dist/okf/types/DataProvider.md +1 -1
  33. package/dist/okf/types/DirectConnectConnection.md +1 -1
  34. package/dist/okf/types/DirectConnectGatewayAssociation.md +2 -2
  35. package/dist/okf/types/DocDBGlobalCluster.md +1 -1
  36. package/dist/okf/types/DomainObjectType.md +1 -1
  37. package/dist/okf/types/EIPAssociation.md +1 -1
  38. package/dist/okf/types/EMRServerlessApplication.md +2 -2
  39. package/dist/okf/types/EmailContact.md +1 -1
  40. package/dist/okf/types/EventTrigger.md +2 -2
  41. package/dist/okf/types/EventsEndpoint.md +1 -1
  42. package/dist/okf/types/ExecutionPlan.md +1 -1
  43. package/dist/okf/types/ExperimentTemplate.md +1 -1
  44. package/dist/okf/types/Faq.md +1 -1
  45. package/dist/okf/types/Field.md +1 -1
  46. package/dist/okf/types/Function.md +1 -1
  47. package/dist/okf/types/GameServerGroup.md +3 -3
  48. package/dist/okf/types/GroupingConfiguration.md +1 -1
  49. package/dist/okf/types/GuardHook.md +1 -1
  50. package/dist/okf/types/ImageVersion.md +1 -1
  51. package/dist/okf/types/InboundExternalLink.md +1 -1
  52. package/dist/okf/types/InferenceComponent.md +1 -1
  53. package/dist/okf/types/InstanceAccessControlAttributeConfiguration.md +1 -1
  54. package/dist/okf/types/InvoiceUnit.md +1 -1
  55. package/dist/okf/types/KendraDataSource.md +1 -1
  56. package/dist/okf/types/KendraIndex.md +3 -3
  57. package/dist/okf/types/KinesisResourcePolicy.md +1 -1
  58. package/dist/okf/types/LambdaHook.md +1 -1
  59. package/dist/okf/types/LandingZone.md +1 -1
  60. package/dist/okf/types/LaunchConfiguration.md +1 -1
  61. package/dist/okf/types/Layout.md +1 -1
  62. package/dist/okf/types/LinkRoutingRule.md +1 -1
  63. package/dist/okf/types/LocalGatewayRouteTable.md +1 -1
  64. package/dist/okf/types/LocalGatewayRouteTableVPCAssociation.md +1 -1
  65. package/dist/okf/types/LocalGatewayRouteTableVirtualInterfaceGroupAssociation.md +1 -1
  66. package/dist/okf/types/LogDeliveryConfiguration.md +1 -1
  67. package/dist/okf/types/MPAIdentitySource.md +1 -1
  68. package/dist/okf/types/MSKConfiguration.md +1 -1
  69. package/dist/okf/types/ManagedLoginBranding.md +1 -1
  70. package/dist/okf/types/Memory.md +2 -2
  71. package/dist/okf/types/MetricStream.md +2 -2
  72. package/dist/okf/types/ModelPackage.md +2 -2
  73. package/dist/okf/types/MultiRegionEndpoint.md +1 -1
  74. package/dist/okf/types/Notification.md +1 -1
  75. package/dist/okf/types/NotificationConfiguration.md +1 -1
  76. package/dist/okf/types/OutboundExternalLink.md +1 -1
  77. package/dist/okf/types/PanoramaPackage.md +1 -1
  78. package/dist/okf/types/PolicyStatement.md +2 -2
  79. package/dist/okf/types/PolicyStore.md +1 -1
  80. package/dist/okf/types/PrincipalPermissions.md +2 -2
  81. package/dist/okf/types/PrivateVirtualInterface.md +2 -2
  82. package/dist/okf/types/PublicVirtualInterface.md +1 -1
  83. package/dist/okf/types/RDSGlobalCluster.md +1 -1
  84. package/dist/okf/types/RTBFabricLink.md +2 -2
  85. package/dist/okf/types/RedshiftCluster.md +3 -3
  86. package/dist/okf/types/RedshiftEventSubscription.md +1 -1
  87. package/dist/okf/types/RegistryScanningConfiguration.md +1 -1
  88. package/dist/okf/types/ReplicationSet.md +1 -1
  89. package/dist/okf/types/ReportDefinition.md +2 -2
  90. package/dist/okf/types/RequesterGateway.md +3 -3
  91. package/dist/okf/types/ResourceConfiguration.md +1 -1
  92. package/dist/okf/types/ResourceGateway.md +1 -1
  93. package/dist/okf/types/ResourceGroupsGroup.md +1 -1
  94. package/dist/okf/types/ResponderGateway.md +3 -3
  95. package/dist/okf/types/Route53GlobalResolverFirewallDomainList.md +1 -1
  96. package/dist/okf/types/Route53ResolverFirewallDomainList.md +1 -1
  97. package/dist/okf/types/Runtime.md +1 -1
  98. package/dist/okf/types/SMSVOICEPhoneNumber.md +1 -1
  99. package/dist/okf/types/SageMakerCluster.md +2 -2
  100. package/dist/okf/types/SageMakerPipeline.md +1 -1
  101. package/dist/okf/types/SamplingRule.md +1 -1
  102. package/dist/okf/types/SchemaMapping.md +1 -1
  103. package/dist/okf/types/SecurityAgentAgentSpace.md +1 -1
  104. package/dist/okf/types/SecurityGroup.md +1 -1
  105. package/dist/okf/types/ServiceEnvironment.md +1 -1
  106. package/dist/okf/types/ServiceLevelObjective.md +3 -3
  107. package/dist/okf/types/Stack.md +1 -1
  108. package/dist/okf/types/StateMachineAlias.md +1 -1
  109. package/dist/okf/types/StreamProcessor.md +1 -1
  110. package/dist/okf/types/Studio.md +1 -1
  111. package/dist/okf/types/Subscriber.md +1 -1
  112. package/dist/okf/types/Tag.md +1 -1
  113. package/dist/okf/types/TagAssociation.md +1 -1
  114. package/dist/okf/types/Task.md +2 -2
  115. package/dist/okf/types/TimestreamScheduledQuery.md +1 -1
  116. package/dist/okf/types/TransitVirtualInterface.md +2 -2
  117. package/dist/okf/types/VPCEndpoint.md +1 -1
  118. package/dist/okf/types/VpcConnection.md +2 -2
  119. package/dist/okf/types/WAFv2WebACL.md +1 -1
  120. package/dist/okf/types/WorkGroup.md +1 -1
  121. package/dist/okf/types/XRayGroup.md +1 -1
  122. package/dist/types/index.d.ts +4521 -716
  123. package/package.json +2 -2
  124. package/src/codegen/any-budget.test.ts +66 -0
  125. package/src/generated/index.d.ts +4521 -716
  126. package/src/generated/index.ts +408 -7
  127. 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.60.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.60.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
+ });