@intentius/chant-lexicon-aws 0.124.30 → 0.124.32

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 (644) hide show
  1. package/dist/actions/dynamodb.js +41 -0
  2. package/dist/actions/ecr.js +9 -0
  3. package/dist/actions/ecs.js +5 -0
  4. package/dist/actions/iam.js +3 -0
  5. package/dist/actions/index.js +9 -0
  6. package/dist/actions/lambda.js +11 -0
  7. package/dist/actions/logs.js +4 -0
  8. package/dist/actions/s3.js +40 -0
  9. package/dist/actions/sns.js +5 -0
  10. package/dist/actions/sqs.js +15 -0
  11. package/dist/agentcore/trace-fetch.d.ts.map +1 -1
  12. package/dist/agentcore/trace-fetch.js +472 -0
  13. package/dist/agentcore/trace-render.js +359 -0
  14. package/dist/ambient.js +148 -0
  15. package/dist/api/credential-chain.d.ts +30 -3
  16. package/dist/api/credential-chain.d.ts.map +1 -1
  17. package/dist/api/credential-chain.js +509 -0
  18. package/dist/api/read-client.d.ts +16 -43
  19. package/dist/api/read-client.d.ts.map +1 -1
  20. package/dist/api/read-client.js +458 -0
  21. package/dist/api/sigv4.d.ts +4 -4
  22. package/dist/api/sigv4.js +185 -0
  23. package/dist/behaviour-kinds.js +114 -0
  24. package/dist/caller-identity.d.ts +3 -5
  25. package/dist/caller-identity.d.ts.map +1 -1
  26. package/dist/caller-identity.js +146 -0
  27. package/dist/codegen/docs-cli.js +2 -0
  28. package/dist/codegen/docs.js +120 -0
  29. package/dist/codegen/enum-overlay.js +162 -0
  30. package/dist/codegen/extensions.js +139 -0
  31. package/dist/codegen/fallback.js +32 -0
  32. package/dist/codegen/generate-cli.js +15 -0
  33. package/dist/codegen/generate-lexicon.js +70 -0
  34. package/dist/codegen/generate-typescript.js +226 -0
  35. package/dist/codegen/generate.d.ts.map +1 -1
  36. package/dist/codegen/generate.js +234 -0
  37. package/dist/codegen/naming.js +135 -0
  38. package/dist/codegen/package.js +67 -0
  39. package/dist/codegen/patches.d.ts +26 -1
  40. package/dist/codegen/patches.d.ts.map +1 -1
  41. package/dist/codegen/patches.js +90 -0
  42. package/dist/codegen/property-overlay.js +85 -0
  43. package/dist/codegen/property-overlay.json +1 -16
  44. package/dist/codegen/sam.js +402 -0
  45. package/dist/codegen/typecheck.js +4 -0
  46. package/dist/codegen/versions.js +31 -0
  47. package/dist/components/__tests__/mock-cloud-executor.js +326 -0
  48. package/dist/components/apply.d.ts +44 -1
  49. package/dist/components/apply.d.ts.map +1 -1
  50. package/dist/components/apply.js +752 -0
  51. package/dist/components/builders.js +37 -0
  52. package/dist/components/capability-plugin.js +66 -0
  53. package/dist/components/cloud-executor.d.ts +35 -0
  54. package/dist/components/cloud-executor.d.ts.map +1 -1
  55. package/dist/components/cloud-executor.js +576 -0
  56. package/dist/components/config-bom.js +207 -0
  57. package/dist/components/host-delivery.js +117 -0
  58. package/dist/components/index.js +18 -0
  59. package/dist/components/job-submission.js +77 -0
  60. package/dist/components/publish.js +234 -0
  61. package/dist/components/safety.js +62 -0
  62. package/dist/components/wait-aws.js +68 -0
  63. package/dist/composites/agentcore-agent.js +187 -0
  64. package/dist/composites/agentcore-trust-policy.js +13 -0
  65. package/dist/composites/alb-shared.js +84 -0
  66. package/dist/composites/bucket-deployment.js +93 -0
  67. package/dist/composites/catalog.js +2714 -0
  68. package/dist/composites/dynamodb-table.js +66 -0
  69. package/dist/composites/ec2-instance-bundle.js +75 -0
  70. package/dist/composites/ec2-instance-role.js +26 -0
  71. package/dist/composites/ecr-repository.js +64 -0
  72. package/dist/composites/ecs-trust-policy.js +10 -0
  73. package/dist/composites/efs-with-access-point.js +44 -0
  74. package/dist/composites/eks-cluster.js +118 -0
  75. package/dist/composites/fargate-alb.js +216 -0
  76. package/dist/composites/fargate-service.js +222 -0
  77. package/dist/composites/index.js +28 -0
  78. package/dist/composites/lambda-api.js +15 -0
  79. package/dist/composites/lambda-dynamodb.js +77 -0
  80. package/dist/composites/lambda-eventbridge.js +27 -0
  81. package/dist/composites/lambda-function.js +54 -0
  82. package/dist/composites/lambda-s3.js +93 -0
  83. package/dist/composites/lambda-sns.js +23 -0
  84. package/dist/composites/lambda-sqs.js +34 -0
  85. package/dist/composites/landing-zone.js +82 -0
  86. package/dist/composites/microvm-app.js +293 -0
  87. package/dist/composites/minimal-vpc.js +40 -0
  88. package/dist/composites/monitoring-stack.js +105 -0
  89. package/dist/composites/nlb-service.js +61 -0
  90. package/dist/composites/rds-instance.js +98 -0
  91. package/dist/composites/scheduled-lambda.js +28 -0
  92. package/dist/composites/solr-fargate-service.js +33 -0
  93. package/dist/composites/step-functions-workflow.js +78 -0
  94. package/dist/composites/vpc-default.js +132 -0
  95. package/dist/condition.js +43 -0
  96. package/dist/coverage.js +4 -0
  97. package/dist/deep-observe.d.ts.map +1 -1
  98. package/dist/deep-observe.js +709 -0
  99. package/dist/deep-topology.js +226 -0
  100. package/dist/default-tags.js +50 -0
  101. package/dist/defaults.js +85 -0
  102. package/dist/dependencies.js +269 -0
  103. package/dist/detect.js +21 -0
  104. package/dist/disruption.d.ts.map +1 -1
  105. package/dist/disruption.js +129 -0
  106. package/dist/effect-receipt-row.js +107 -0
  107. package/dist/generated/index.d.ts +1297 -82
  108. package/dist/generated/index.d.ts.map +1 -1
  109. package/dist/generated/index.js +12382 -0
  110. package/dist/generated/runtime.js +4 -0
  111. package/dist/governance.js +131 -0
  112. package/dist/identity-observe.d.ts.map +1 -1
  113. package/dist/identity-observe.js +127 -0
  114. package/dist/import/generator.js +757 -0
  115. package/dist/import/live-export.js +34 -0
  116. package/dist/import/parser.js +394 -0
  117. package/dist/index.js +69 -0
  118. package/dist/integrity.json +6 -6
  119. package/dist/intrinsics.js +393 -0
  120. package/dist/lint/audit-catalog.js +87 -0
  121. package/dist/lint/audit-lineage.js +150 -0
  122. package/dist/lint/post-synth/cf-refs.js +247 -0
  123. package/dist/lint/post-synth/cor020.js +60 -0
  124. package/dist/lint/post-synth/ext001.d.ts.map +1 -1
  125. package/dist/lint/post-synth/ext001.js +197 -0
  126. package/dist/lint/post-synth/index.js +124 -0
  127. package/dist/lint/post-synth/waw010.js +41 -0
  128. package/dist/lint/post-synth/waw011.js +41 -0
  129. package/dist/lint/post-synth/waw013.js +38 -0
  130. package/dist/lint/post-synth/waw014.js +42 -0
  131. package/dist/lint/post-synth/waw015.js +88 -0
  132. package/dist/lint/post-synth/waw016.d.ts.map +1 -1
  133. package/dist/lint/post-synth/waw016.js +116 -0
  134. package/dist/lint/post-synth/waw017.js +43 -0
  135. package/dist/lint/post-synth/waw018.js +61 -0
  136. package/dist/lint/post-synth/waw019.js +64 -0
  137. package/dist/lint/post-synth/waw020.js +56 -0
  138. package/dist/lint/post-synth/waw021.js +44 -0
  139. package/dist/lint/post-synth/waw022.js +36 -0
  140. package/dist/lint/post-synth/waw023.js +40 -0
  141. package/dist/lint/post-synth/waw024.js +46 -0
  142. package/dist/lint/post-synth/waw025.js +36 -0
  143. package/dist/lint/post-synth/waw026.js +38 -0
  144. package/dist/lint/post-synth/waw027.js +41 -0
  145. package/dist/lint/post-synth/waw028.js +39 -0
  146. package/dist/lint/post-synth/waw029.js +54 -0
  147. package/dist/lint/post-synth/waw030.js +282 -0
  148. package/dist/lint/post-synth/waw031.js +58 -0
  149. package/dist/lint/post-synth/waw032.js +45 -0
  150. package/dist/lint/post-synth/waw033.js +75 -0
  151. package/dist/lint/post-synth/waw034.js +52 -0
  152. package/dist/lint/post-synth/waw035.js +56 -0
  153. package/dist/lint/post-synth/waw036.js +79 -0
  154. package/dist/lint/post-synth/waw037.js +67 -0
  155. package/dist/lint/post-synth/waw038.js +42 -0
  156. package/dist/lint/post-synth/waw039.js +42 -0
  157. package/dist/lint/post-synth/waw040.js +45 -0
  158. package/dist/lint/post-synth/waw041.js +40 -0
  159. package/dist/lint/post-synth/waw042.js +99 -0
  160. package/dist/lint/post-synth/waw043.js +51 -0
  161. package/dist/lint/post-synth/waw044.js +64 -0
  162. package/dist/lint/post-synth/waw045.js +49 -0
  163. package/dist/lint/post-synth/waw046.js +52 -0
  164. package/dist/lint/post-synth/waw047.js +43 -0
  165. package/dist/lint/post-synth/waw048.js +40 -0
  166. package/dist/lint/post-synth/waw049.js +78 -0
  167. package/dist/lint/post-synth/waw050.js +44 -0
  168. package/dist/lint/post-synth/waw051.js +41 -0
  169. package/dist/lint/post-synth/waw052.js +43 -0
  170. package/dist/lint/post-synth/waw053.js +43 -0
  171. package/dist/lint/post-synth/waw054.js +41 -0
  172. package/dist/lint/post-synth/waw055.js +41 -0
  173. package/dist/lint/post-synth/waw056.js +65 -0
  174. package/dist/lint/post-synth/waw057.js +43 -0
  175. package/dist/lint/post-synth/waw058.js +61 -0
  176. package/dist/lint/post-synth/waw059.js +338 -0
  177. package/dist/lint/post-synth/waw060.js +83 -0
  178. package/dist/lint/post-synth/waw061.js +60 -0
  179. package/dist/lint/post-synth/waw062.js +0 -0
  180. package/dist/lint/post-synth/waw063.js +0 -0
  181. package/dist/lint/post-synth/waw064.js +45 -0
  182. package/dist/lint/post-synth/waw065.js +104 -0
  183. package/dist/lint/post-synth/waw066.js +145 -0
  184. package/dist/lint/post-synth/waw067.js +115 -0
  185. package/dist/lint/post-synth/waw068.js +69 -0
  186. package/dist/lint/post-synth/waw069.js +0 -0
  187. package/dist/lint/rules/hardcoded-region.js +38 -0
  188. package/dist/lint/rules/iam-wildcard.js +60 -0
  189. package/dist/lint/rules/index.js +6 -0
  190. package/dist/lint/rules/s3-encryption.js +60 -0
  191. package/dist/live-attrs.js +42 -0
  192. package/dist/lsp/completions.d.ts.map +1 -1
  193. package/dist/lsp/completions.js +18 -0
  194. package/dist/lsp/hover.d.ts.map +1 -1
  195. package/dist/lsp/hover.js +66 -0
  196. package/dist/manifest.json +1 -1
  197. package/dist/mapping.js +33 -0
  198. package/dist/meta.json +17359 -784
  199. package/dist/nested-stack.js +95 -0
  200. package/dist/okf/index.md +203 -0
  201. package/dist/okf/rules/EXT001.md +1 -0
  202. package/dist/okf/rules/WAW016.md +2 -0
  203. package/dist/okf/rules/WAW019.md +1 -0
  204. package/dist/okf/rules/WAW028.md +1 -0
  205. package/dist/okf/rules/WAW030.md +2 -0
  206. package/dist/okf/rules/WAW039.md +1 -0
  207. package/dist/okf/rules/WAW049.md +1 -0
  208. package/dist/okf/rules/WAW056.md +1 -0
  209. package/dist/okf/rules/WAW058.md +1 -0
  210. package/dist/okf/rules/WAW062.md +1 -0
  211. package/dist/okf/rules/WAW064.md +1 -0
  212. package/dist/okf/rules/WAW065.md +1 -0
  213. package/dist/okf/rules/WAW066.md +1 -0
  214. package/dist/okf/rules/WAW067.md +1 -0
  215. package/dist/okf/rules/WAW068.md +1 -0
  216. package/dist/okf/rules/WAW069.md +4 -0
  217. package/dist/okf/types/AIWorkloadConfig.md +23 -0
  218. package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
  219. package/dist/okf/types/AccountAccessApplication.md +28 -0
  220. package/dist/okf/types/AccountAccessEntitlement.md +22 -0
  221. package/dist/okf/types/ActionTarget.md +20 -0
  222. package/dist/okf/types/AdConfiguration.md +21 -0
  223. package/dist/okf/types/Adapter.md +26 -0
  224. package/dist/okf/types/AgentContext.md +35 -0
  225. package/dist/okf/types/AgentGoal.md +31 -0
  226. package/dist/okf/types/AgentProfile.md +34 -0
  227. package/dist/okf/types/Alarm.md +3 -1
  228. package/dist/okf/types/AlarmModel.md +14 -9
  229. package/dist/okf/types/AmplifyWebhook.md +25 -0
  230. package/dist/okf/types/ApiCache.md +8 -8
  231. package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
  232. package/dist/okf/types/AppAuthorization.md +35 -0
  233. package/dist/okf/types/AppBlockBuilder.md +1 -0
  234. package/dist/okf/types/AppInstance.md +2 -2
  235. package/dist/okf/types/AppInstanceBot.md +2 -2
  236. package/dist/okf/types/AppStreamFleet.md +3 -2
  237. package/dist/okf/types/AppSyncApiKey.md +6 -6
  238. package/dist/okf/types/AppSyncType.md +22 -0
  239. package/dist/okf/types/ApplicationStatusCheck.md +36 -0
  240. package/dist/okf/types/ApplicationVersion.md +4 -1
  241. package/dist/okf/types/ApplicationsList.md +26 -0
  242. package/dist/okf/types/ApprovalPolicy.md +28 -0
  243. package/dist/okf/types/ArchiveRule.md +24 -0
  244. package/dist/okf/types/Asset.md +30 -0
  245. package/dist/okf/types/Backup.md +31 -0
  246. package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
  247. package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
  248. package/dist/okf/types/BedrockSession.md +28 -0
  249. package/dist/okf/types/BillEstimate.md +35 -0
  250. package/dist/okf/types/Brand.md +32 -0
  251. package/dist/okf/types/CallAnalyticsCategory.md +25 -0
  252. package/dist/okf/types/Campaign.md +28 -0
  253. package/dist/okf/types/CapacityProvider.md +30 -0
  254. package/dist/okf/types/Case.md +24 -0
  255. package/dist/okf/types/CertificateAssociation.md +13 -0
  256. package/dist/okf/types/ChangeSet.md +36 -0
  257. package/dist/okf/types/ChannelFlow.md +29 -0
  258. package/dist/okf/types/ChimeChannel.md +39 -0
  259. package/dist/okf/types/Classifier.md +6 -6
  260. package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
  261. package/dist/okf/types/ClientVpnEndpoint.md +2 -0
  262. package/dist/okf/types/ClientVpnRoute.md +5 -5
  263. package/dist/okf/types/CloudConnector.md +29 -0
  264. package/dist/okf/types/Cluster.md +39 -0
  265. package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
  266. package/dist/okf/types/CodeCommitRepository.md +12 -12
  267. package/dist/okf/types/CodeConnectionsHost.md +26 -0
  268. package/dist/okf/types/CodeRepository.md +5 -5
  269. package/dist/okf/types/CompositeAlarm.md +1 -0
  270. package/dist/okf/types/ComputeEnvironment.md +2 -0
  271. package/dist/okf/types/ComputeNodeGroup.md +1 -1
  272. package/dist/okf/types/ComputeQuota.md +34 -0
  273. package/dist/okf/types/ConfigRule.md +1 -1
  274. package/dist/okf/types/ConfigurationRecorder.md +7 -6
  275. package/dist/okf/types/ConnectAttachment.md +2 -0
  276. package/dist/okf/types/ConnectQueue.md +5 -1
  277. package/dist/okf/types/ConnectVocabulary.md +28 -0
  278. package/dist/okf/types/ConnectionType.md +24 -0
  279. package/dist/okf/types/ConsentPortal.md +33 -0
  280. package/dist/okf/types/ContactMethod.md +29 -0
  281. package/dist/okf/types/ContainerAssociation.md +26 -0
  282. package/dist/okf/types/ContainerFleet.md +1 -1
  283. package/dist/okf/types/ContainerGroupDefinition.md +1 -1
  284. package/dist/okf/types/Content.md +40 -0
  285. package/dist/okf/types/ContentAssociation.md +28 -0
  286. package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
  287. package/dist/okf/types/CustomEntityType.md +4 -9
  288. package/dist/okf/types/Customization.md +22 -0
  289. package/dist/okf/types/CwIntegration.md +31 -0
  290. package/dist/okf/types/DAXParameterGroup.md +3 -8
  291. package/dist/okf/types/DAXSubnetGroup.md +0 -5
  292. package/dist/okf/types/DBClusterEndpoint.md +31 -0
  293. package/dist/okf/types/DBProxyTargetGroup.md +1 -0
  294. package/dist/okf/types/DBSnapshot.md +62 -0
  295. package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
  296. package/dist/okf/types/DLPSetting.md +31 -0
  297. package/dist/okf/types/DMSInstanceProfile.md +1 -1
  298. package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
  299. package/dist/okf/types/Daemon.md +1 -0
  300. package/dist/okf/types/DataExchangeDataSet.md +29 -0
  301. package/dist/okf/types/DataIntegrationFlow.md +27 -0
  302. package/dist/okf/types/DataMigration.md +1 -1
  303. package/dist/okf/types/DataProvider.md +2 -1
  304. package/dist/okf/types/DataQualityRuleset.md +6 -11
  305. package/dist/okf/types/DataSource.md +23 -0
  306. package/dist/okf/types/Dataset.md +20 -0
  307. package/dist/okf/types/DatasetIntegration.md +23 -0
  308. package/dist/okf/types/DbCluster.md +1 -1
  309. package/dist/okf/types/DbInstance.md +8 -2
  310. package/dist/okf/types/DeadlineBudget.md +29 -0
  311. package/dist/okf/types/DelegationSet.md +23 -0
  312. package/dist/okf/types/DeliveryChannel.md +6 -11
  313. package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
  314. package/dist/okf/types/DevOpsAgentService.md +1 -0
  315. package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
  316. package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
  317. package/dist/okf/types/Directory.md +60 -0
  318. package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
  319. package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
  320. package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
  321. package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
  322. package/dist/okf/types/Domain.md +27 -0
  323. package/dist/okf/types/EKSCertificateAuthority.md +42 -0
  324. package/dist/okf/types/EKSCluster.md +8 -0
  325. package/dist/okf/types/EcSnapshot.md +66 -0
  326. package/dist/okf/types/EmailIdentityCertificate.md +15 -0
  327. package/dist/okf/types/EndpointConfig.md +14 -13
  328. package/dist/okf/types/EntityRecognizer.md +27 -0
  329. package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
  330. package/dist/okf/types/EnvironmentEC2.md +13 -13
  331. package/dist/okf/types/EvaluationForm.md +1 -0
  332. package/dist/okf/types/Evaluator.md +6 -2
  333. package/dist/okf/types/EventAction.md +26 -0
  334. package/dist/okf/types/EventRule.md +2 -0
  335. package/dist/okf/types/EventSource.md +30 -0
  336. package/dist/okf/types/EventTracker.md +22 -0
  337. package/dist/okf/types/EventsV2EventBus.md +28 -0
  338. package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
  339. package/dist/okf/types/EventsV2Subscriber.md +39 -0
  340. package/dist/okf/types/ExperimentDefinition.md +39 -0
  341. package/dist/okf/types/ExperimentRun.md +33 -0
  342. package/dist/okf/types/ExperimentTrialComponent.md +13 -11
  343. package/dist/okf/types/FHIRDatastore.md +3 -0
  344. package/dist/okf/types/FSxSnapshot.md +5 -5
  345. package/dist/okf/types/FSxVolume.md +9 -9
  346. package/dist/okf/types/FeaturedResultsSet.md +26 -0
  347. package/dist/okf/types/Feed.md +1 -0
  348. package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
  349. package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
  350. package/dist/okf/types/FileCache.md +45 -0
  351. package/dist/okf/types/Filter.md +27 -0
  352. package/dist/okf/types/Firewall.md +6 -0
  353. package/dist/okf/types/FlowMediaStream.md +28 -0
  354. package/dist/okf/types/FlowOutput.md +1 -0
  355. package/dist/okf/types/FpgaImage.md +38 -0
  356. package/dist/okf/types/Function.md +2 -2
  357. package/dist/okf/types/Gateway.md +41 -0
  358. package/dist/okf/types/GatewayClusterAssociations.md +23 -0
  359. package/dist/okf/types/GatewayRateLimit.md +26 -0
  360. package/dist/okf/types/GatewayRule.md +32 -0
  361. package/dist/okf/types/GlobalReplicationGroup.md +3 -0
  362. package/dist/okf/types/GlobalResolver.md +1 -1
  363. package/dist/okf/types/GlobalTable.md +1 -0
  364. package/dist/okf/types/GlueConnection.md +5 -4
  365. package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
  366. package/dist/okf/types/GlueSession.md +38 -0
  367. package/dist/okf/types/GlueTable.md +5 -10
  368. package/dist/okf/types/GlueWorkflow.md +5 -10
  369. package/dist/okf/types/Group.md +27 -0
  370. package/dist/okf/types/Harness.md +1 -0
  371. package/dist/okf/types/HostKey.md +33 -0
  372. package/dist/okf/types/HostedZone.md +1 -0
  373. package/dist/okf/types/HttpApi.md +2 -0
  374. package/dist/okf/types/HttpNamespace.md +5 -5
  375. package/dist/okf/types/HubV2.md +1 -0
  376. package/dist/okf/types/HumanTaskUi.md +22 -0
  377. package/dist/okf/types/IPv4Pool.md +28 -0
  378. package/dist/okf/types/ImageBuilder.md +1 -0
  379. package/dist/okf/types/ImageBuilderImage.md +1 -1
  380. package/dist/okf/types/ImagePipeline.md +1 -1
  381. package/dist/okf/types/InferenceComponent.md +5 -1
  382. package/dist/okf/types/InfluxDBBackup.md +65 -0
  383. package/dist/okf/types/InfluxDBCluster.md +3 -0
  384. package/dist/okf/types/InfrastructureConfiguration.md +2 -0
  385. package/dist/okf/types/IngestionDestination.md +28 -0
  386. package/dist/okf/types/InputSecurityGroup.md +6 -4
  387. package/dist/okf/types/InspectorV2Connector.md +38 -0
  388. package/dist/okf/types/InstanceEventWindow.md +25 -0
  389. package/dist/okf/types/InstanceFleetConfig.md +10 -10
  390. package/dist/okf/types/InstanceGroupConfig.md +3 -3
  391. package/dist/okf/types/InstrumentationConfig.md +31 -0
  392. package/dist/okf/types/IntegrationAssociation.md +3 -0
  393. package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
  394. package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
  395. package/dist/okf/types/IoTSiteWiseTask.md +24 -0
  396. package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
  397. package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
  398. package/dist/okf/types/Job.md +35 -0
  399. package/dist/okf/types/JobTemplate.md +26 -0
  400. package/dist/okf/types/KinesisChannel.md +31 -0
  401. package/dist/okf/types/KinesisStream.md +1 -0
  402. package/dist/okf/types/LambdaResourcePolicy.md +14 -0
  403. package/dist/okf/types/Lexicon.md +34 -0
  404. package/dist/okf/types/LicenseAssetGroup.md +23 -0
  405. package/dist/okf/types/LicenseConfiguration.md +33 -0
  406. package/dist/okf/types/LicenseServerEndpoint.md +32 -0
  407. package/dist/okf/types/LightsailKeyPair.md +29 -0
  408. package/dist/okf/types/LimitsProfile.md +27 -0
  409. package/dist/okf/types/LocationAzureBlob.md +2 -1
  410. package/dist/okf/types/LocationObjectStorage.md +1 -0
  411. package/dist/okf/types/LogAlarm.md +2 -0
  412. package/dist/okf/types/MGNConnector.md +23 -0
  413. package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
  414. package/dist/okf/types/MLTransform.md +15 -15
  415. package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
  416. package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
  417. package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
  418. package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
  419. package/dist/okf/types/MediaConvertQueue.md +8 -10
  420. package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
  421. package/dist/okf/types/MediaLiveInput.md +41 -18
  422. package/dist/okf/types/MediaPackageV2Channel.md +3 -0
  423. package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
  424. package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
  425. package/dist/okf/types/MediaTailorFunction.md +27 -0
  426. package/dist/okf/types/MedicalVocabulary.md +21 -0
  427. package/dist/okf/types/Member.md +26 -0
  428. package/dist/okf/types/Memory.md +6 -0
  429. package/dist/okf/types/MemoryDBSnapshot.md +29 -0
  430. package/dist/okf/types/Metric.md +59 -0
  431. package/dist/okf/types/MetricAttribution.md +23 -0
  432. package/dist/okf/types/MicrosoftAD.md +11 -11
  433. package/dist/okf/types/MigrationProject.md +8 -1
  434. package/dist/okf/types/Monitor.md +26 -0
  435. package/dist/okf/types/NFSFileShare.md +44 -0
  436. package/dist/okf/types/NeptuneGraphGraph.md +1 -0
  437. package/dist/okf/types/NetworkConnector.md +4 -0
  438. package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
  439. package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
  440. package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
  441. package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
  442. package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
  443. package/dist/okf/types/NotebookInstance.md +18 -18
  444. package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
  445. package/dist/okf/types/NotifyConfiguration.md +35 -0
  446. package/dist/okf/types/OTelEnrichment.md +2 -0
  447. package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
  448. package/dist/okf/types/OrganizationConfigRule.md +7 -7
  449. package/dist/okf/types/Outpost.md +32 -0
  450. package/dist/okf/types/ParallelData.md +40 -0
  451. package/dist/okf/types/Partition.md +5 -5
  452. package/dist/okf/types/PaymentConnector.md +4 -1
  453. package/dist/okf/types/Pentest.md +1 -0
  454. package/dist/okf/types/PerfReports.md +28 -0
  455. package/dist/okf/types/PermissionAssociation.md +30 -0
  456. package/dist/okf/types/PersonalizeDataset.md +1 -0
  457. package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
  458. package/dist/okf/types/PersonalizeSchema.md +1 -0
  459. package/dist/okf/types/Pipeline.md +25 -0
  460. package/dist/okf/types/PlaybackConfiguration.md +1 -0
  461. package/dist/okf/types/PolicyAssociation.md +1 -1
  462. package/dist/okf/types/PolicyGrant.md +2 -2
  463. package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
  464. package/dist/okf/types/PortalProduct.md +24 -0
  465. package/dist/okf/types/PrefetchSchedule.md +25 -0
  466. package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
  467. package/dist/okf/types/PrincipalAssociation.md +27 -0
  468. package/dist/okf/types/PrivateDnsNamespace.md +8 -8
  469. package/dist/okf/types/PrivateVirtualInterface.md +1 -0
  470. package/dist/okf/types/ProcurementPortalPreference.md +45 -0
  471. package/dist/okf/types/Program.md +33 -0
  472. package/dist/okf/types/ProjectMembership.md +1 -1
  473. package/dist/okf/types/ProtocolsList.md +26 -0
  474. package/dist/okf/types/PublicDnsNamespace.md +7 -7
  475. package/dist/okf/types/PublicVirtualInterface.md +1 -0
  476. package/dist/okf/types/QEV2IdcApplication.md +25 -0
  477. package/dist/okf/types/QueryLoggingConfig.md +21 -0
  478. package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
  479. package/dist/okf/types/QuickSightAssignment.md +24 -0
  480. package/dist/okf/types/RAMResourceAssociation.md +27 -0
  481. package/dist/okf/types/RDSClusterSnapshot.md +54 -0
  482. package/dist/okf/types/RDSDBParameterGroup.md +5 -0
  483. package/dist/okf/types/RDSDeployment.md +41 -0
  484. package/dist/okf/types/RcsAgent.md +38 -0
  485. package/dist/okf/types/ReceiptRule.md +5 -5
  486. package/dist/okf/types/ReceiptRuleSet.md +1 -6
  487. package/dist/okf/types/RecommenderFilter.md +27 -0
  488. package/dist/okf/types/RecommenderSchema.md +25 -0
  489. package/dist/okf/types/RecordSet.md +16 -22
  490. package/dist/okf/types/RecoveryPlan.md +28 -0
  491. package/dist/okf/types/RedshiftIdcApplication.md +31 -0
  492. package/dist/okf/types/RedshiftSnapshot.md +59 -0
  493. package/dist/okf/types/RegistrationAttachment.md +28 -0
  494. package/dist/okf/types/Registry.md +41 -0
  495. package/dist/okf/types/RegistryRecord.md +38 -0
  496. package/dist/okf/types/RelatedItem.md +24 -0
  497. package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
  498. package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
  499. package/dist/okf/types/ReplicationTask.md +14 -14
  500. package/dist/okf/types/ReportGenerator.md +29 -0
  501. package/dist/okf/types/ReportGroup.md +1 -3
  502. package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
  503. package/dist/okf/types/ResilienceHubV2Service.md +1 -0
  504. package/dist/okf/types/ResourceConfiguration.md +1 -1
  505. package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
  506. package/dist/okf/types/RestApi.md +1 -0
  507. package/dist/okf/types/RetrievalInstruction.md +32 -0
  508. package/dist/okf/types/RouterOutput.md +1 -0
  509. package/dist/okf/types/Rule.md +31 -0
  510. package/dist/okf/types/RunCache.md +29 -0
  511. package/dist/okf/types/Runtime.md +2 -1
  512. package/dist/okf/types/SCNInstance.md +33 -0
  513. package/dist/okf/types/SDBDomain.md +2 -2
  514. package/dist/okf/types/SMBFileShare.md +49 -0
  515. package/dist/okf/types/SageMakerArtifact.md +27 -0
  516. package/dist/okf/types/SageMakerEndpoint.md +0 -1
  517. package/dist/okf/types/ScalableTarget.md +1 -0
  518. package/dist/okf/types/ScalingPlan.md +6 -6
  519. package/dist/okf/types/ScheduledReport.md +31 -0
  520. package/dist/okf/types/SecondaryNetwork.md +26 -0
  521. package/dist/okf/types/SecurityAgentArtifact.md +25 -0
  522. package/dist/okf/types/SecurityAgentIntegration.md +31 -0
  523. package/dist/okf/types/Server.md +1 -0
  524. package/dist/okf/types/ServerlessCache.md +2 -0
  525. package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
  526. package/dist/okf/types/ServerlessRepoApplication.md +32 -0
  527. package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
  528. package/dist/okf/types/SipMediaApplication.md +27 -0
  529. package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
  530. package/dist/okf/types/SnapshotCopyGrant.md +20 -0
  531. package/dist/okf/types/Solution.md +1 -0
  532. package/dist/okf/types/SourceAssociation.md +25 -0
  533. package/dist/okf/types/SourceCredential.md +6 -6
  534. package/dist/okf/types/SourceNetwork.md +23 -0
  535. package/dist/okf/types/StackFleetAssociation.md +2 -7
  536. package/dist/okf/types/StorageTierPolicy.md +20 -0
  537. package/dist/okf/types/StorageVirtualMachine.md +9 -9
  538. package/dist/okf/types/Stream.md +28 -0
  539. package/dist/okf/types/SubnetCidrReservation.md +26 -0
  540. package/dist/okf/types/SubscriptionProvider.md +26 -0
  541. package/dist/okf/types/SupportPermit.md +29 -0
  542. package/dist/okf/types/Table.md +2 -1
  543. package/dist/okf/types/TableOptimizer.md +5 -10
  544. package/dist/okf/types/Tape.md +31 -0
  545. package/dist/okf/types/Template.md +36 -0
  546. package/dist/okf/types/Tenant.md +2 -0
  547. package/dist/okf/types/Terminology.md +39 -0
  548. package/dist/okf/types/Thesaurus.md +25 -0
  549. package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
  550. package/dist/okf/types/Topic.md +1 -0
  551. package/dist/okf/types/TopicRuleDestination.md +1 -0
  552. package/dist/okf/types/TrafficPolicy.md +26 -0
  553. package/dist/okf/types/TrafficPolicyInstance.md +28 -0
  554. package/dist/okf/types/TranscribeVocabulary.md +27 -0
  555. package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
  556. package/dist/okf/types/TransitVirtualInterface.md +1 -0
  557. package/dist/okf/types/Tunnel.md +25 -0
  558. package/dist/okf/types/UsageLimit.md +26 -0
  559. package/dist/okf/types/UseCase.md +23 -0
  560. package/dist/okf/types/User.md +47 -0
  561. package/dist/okf/types/VPCEndpoint.md +1 -1
  562. package/dist/okf/types/VPCEndpointService.md +6 -0
  563. package/dist/okf/types/VPCPeeringConnection.md +2 -2
  564. package/dist/okf/types/VPNConcentrator.md +1 -1
  565. package/dist/okf/types/VPNConnection.md +1 -1
  566. package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
  567. package/dist/okf/types/View.md +27 -0
  568. package/dist/okf/types/VoiceConnector.md +30 -0
  569. package/dist/okf/types/Volume.md +44 -0
  570. package/dist/okf/types/Vpc.md +1 -1
  571. package/dist/okf/types/VpcAttachment.md +2 -0
  572. package/dist/okf/types/WebFunction.md +27 -0
  573. package/dist/okf/types/WebFunctionEndpoint.md +44 -0
  574. package/dist/okf/types/WebFunctionRevision.md +32 -0
  575. package/dist/okf/types/WickrNetwork.md +27 -0
  576. package/dist/okf/types/Worker.md +29 -0
  577. package/dist/okf/types/Workforce.md +26 -0
  578. package/dist/okf/types/Workload.md +35 -0
  579. package/dist/okf/types/WorkloadEstimate.md +35 -0
  580. package/dist/okf/types/Workspace.md +28 -0
  581. package/dist/okf/types/Workteam.md +8 -8
  582. package/dist/op/activities/aws-apply.js +214 -0
  583. package/dist/op/activities/floci.js +97 -0
  584. package/dist/op/activities/index.js +32 -0
  585. package/dist/op/builders.js +50 -0
  586. package/dist/ownership.js +52 -0
  587. package/dist/package-cli.js +25 -0
  588. package/dist/parameter.js +19 -0
  589. package/dist/plugin.d.ts.map +1 -1
  590. package/dist/plugin.js +1006 -0
  591. package/dist/properties.js +166 -0
  592. package/dist/pseudo.js +25 -0
  593. package/dist/receipt-store.d.ts.map +1 -1
  594. package/dist/receipt-store.js +233 -0
  595. package/dist/reference-catalog.js +106 -0
  596. package/dist/rules/ext001.ts +3 -3
  597. package/dist/rules/waw016.ts +2 -2
  598. package/dist/serializer.js +529 -0
  599. package/dist/spec/fetch.js +193 -0
  600. package/dist/spec/parse.js +259 -0
  601. package/dist/spec/pin.js +185 -0
  602. package/dist/spec/pinned-types.json +203 -0
  603. package/dist/stack-errors.js +14 -0
  604. package/dist/taggable.d.ts.map +1 -1
  605. package/dist/taggable.js +33 -0
  606. package/dist/teardown.js +199 -0
  607. package/dist/template-sections.js +53 -0
  608. package/dist/template-transform.js +50 -0
  609. package/dist/types/index.d.ts +18847 -1124
  610. package/dist/validate-cli.js +16 -0
  611. package/dist/validate.js +33 -0
  612. package/package.json +9 -9
  613. package/src/agentcore/trace-fetch.ts +2 -1
  614. package/src/api/credential-chain.ts +119 -9
  615. package/src/api/credential-isolation.test.ts +72 -0
  616. package/src/api/read-client-chain.test.ts +159 -0
  617. package/src/api/read-client.ts +42 -6
  618. package/src/api/sigv4.ts +4 -4
  619. package/src/caller-identity.ts +3 -5
  620. package/src/codegen/any-budget.test.ts +12 -2
  621. package/src/codegen/generate.ts +9 -0
  622. package/src/codegen/package.ts +2 -2
  623. package/src/codegen/patches.test.ts +95 -0
  624. package/src/codegen/patches.ts +53 -9
  625. package/src/codegen/property-overlay.json +1 -16
  626. package/src/components/apply.ts +218 -6
  627. package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
  628. package/src/components/cfn-plan.test.ts +225 -16
  629. package/src/components/cloud-executor.ts +73 -25
  630. package/src/deep-observe.ts +2 -1
  631. package/src/disruption.ts +2 -1
  632. package/src/generated/index.d.ts +18847 -1124
  633. package/src/generated/index.ts +1376 -161
  634. package/src/generated/lexicon-aws.json +17359 -784
  635. package/src/identity-observe.ts +2 -1
  636. package/src/lint/post-synth/ext001.ts +3 -3
  637. package/src/lint/post-synth/waw016.ts +2 -2
  638. package/src/lsp/completions.ts +2 -1
  639. package/src/lsp/hover.ts +2 -1
  640. package/src/plugin.ts +2 -1
  641. package/src/receipt-store.ts +2 -1
  642. package/src/spec/pin.ts +3 -3
  643. package/src/spec/pinned-types.json +203 -0
  644. package/src/taggable.ts +2 -2
@@ -0,0 +1,234 @@
1
+ /**
2
+ * AWS CloudFormation generation pipeline — uses core generatePipeline
3
+ * with AWS-specific fetch, parse, naming, and generation callbacks.
4
+ */
5
+ import { generatePipeline, writeGeneratedArtifacts, } from "@intentius/chant/codegen/generate";
6
+ import { fetchSchemaZip } from "../spec/fetch.js";
7
+ import { assertPinnedSpec } from "../spec/pin.js";
8
+ import { parseCFNSchema, cfnShortName } from "../spec/parse.js";
9
+ import { fetchCfnLintPatches, applyPatches } from "./patches.js";
10
+ import { fetchCfnLintExtensions, loadExtensionSchemas } from "./extensions.js";
11
+ import { applyEnumOverlay, assertOverlayCoverage, enumOverlayByType, enumOverlayEntries, redundantOverlayWarnings, } from "./enum-overlay.js";
12
+ import { applyPropertyOverlay, assertPropertyOverlayCoverage, propertyOverlayByType, propertyOverlayEntries, redundantPropertyOverlayWarnings, } from "./property-overlay.js";
13
+ import { samResources } from "./sam.js";
14
+ import { fallbackResources } from "./fallback.js";
15
+ import { NamingStrategy, publishedNames, propertyTypeName, extractDefName } from "./naming.js";
16
+ import { generateLexiconJSON, lambdaRuntimeDeprecations } from "./generate-lexicon.js";
17
+ import { generateTypeScriptDeclarations } from "./generate-typescript.js";
18
+ import { generateRuntimeIndex as coreGenerateRuntimeIndex, } from "@intentius/chant/codegen/generate-runtime-index";
19
+ // AWS-specific state shared between pipeline callbacks
20
+ let awsConstraints = new Map();
21
+ /** chant #1459 — spec type → already-published TS name, reset per `generate()` call. */
22
+ let awsReservedNames = {};
23
+ /**
24
+ * Curated enum overlay state (chant #1497), reset per `generate()` call.
25
+ *
26
+ * The overlay runs in `parseSchema` rather than `augmentSchemas` on purpose:
27
+ * `augmentSchemas` is skipped for a caller-supplied schema set because it
28
+ * fetches, and the overlay fetches nothing. Running it per schema keeps a
29
+ * fixture-driven run and a real run on the same code path.
30
+ */
31
+ let awsOverlay = new Map();
32
+ let awsOverlayApplications = [];
33
+ let awsOverlaySeenTypes = new Set();
34
+ let awsOverlayStrict = false;
35
+ /** Backfilled properties (chant #3953), reset per `generate()` call; strictness and seen types are shared with the enum overlay. */
36
+ let awsPropertyOverlay = new Map();
37
+ let awsPropertyOverlayApplications = [];
38
+ const awsPipelineConfig = {
39
+ fetchSchemas: async (opts) => {
40
+ const schemas = await fetchSchemaZip(opts.force);
41
+ // #1390 — the registry schema has no version in its URL and is republished
42
+ // constantly, so without this any prepack regenerates against whatever
43
+ // CloudFormation shipped that morning.
44
+ assertPinnedSpec(schemas);
45
+ return schemas;
46
+ },
47
+ parseSchema: (typeName, data) => {
48
+ awsOverlaySeenTypes.add(typeName);
49
+ // Properties first, so an enum overlay entry could name a backfilled one.
50
+ const backfilled = applyPropertyOverlay(data, awsPropertyOverlay.get(typeName) ?? []);
51
+ awsPropertyOverlayApplications.push(...backfilled.applications);
52
+ const entries = awsOverlay.get(typeName) ?? [];
53
+ const overlaid = applyEnumOverlay(typeName, backfilled.data, entries, { strict: awsOverlayStrict });
54
+ awsOverlayApplications.push(...overlaid.applications);
55
+ const result = parseCFNSchema(overlaid.data);
56
+ if (!result.resource.typeName)
57
+ return null;
58
+ return result;
59
+ },
60
+ createNaming: (results) => new NamingStrategy(results, awsReservedNames),
61
+ augmentSchemas: async (schemas, opts, log) => {
62
+ const warnings = [];
63
+ // Fetch and apply cfn-lint patches
64
+ try {
65
+ log("Fetching cfn-lint patches...");
66
+ const patchesDir = await fetchCfnLintPatches(opts.force);
67
+ const { schemas: patched, stats } = applyPatches(schemas, patchesDir);
68
+ schemas = patched;
69
+ log(`Applied ${stats.patchesApplied} patches across ${stats.resourcesFixed} resources`);
70
+ for (const s of stats.skipped) {
71
+ log(`Skipped known-stale patch ${s.stale.typeName}/${s.stale.patchFile}: ${s.stale.reason} (${s.error.message})`);
72
+ }
73
+ for (const w of stats.warnings) {
74
+ warnings.push({ file: `${w.typeName}/${w.patchFile}`, error: w.error.message });
75
+ }
76
+ for (const r of stats.retirable) {
77
+ warnings.push({
78
+ file: `${r.typeName}/${r.patchFile}`,
79
+ error: `listed in KNOWN_STALE_PATCHES (src/codegen/patches.ts) but did not fail; retire the entry`,
80
+ });
81
+ }
82
+ }
83
+ catch (err) {
84
+ log(`WARNING: failed to fetch cfn-lint patches: ${err}`);
85
+ }
86
+ // Fetch extension constraints (stored for use in generateRegistry)
87
+ try {
88
+ log("Fetching cfn-lint extensions...");
89
+ const extensionsDir = await fetchCfnLintExtensions(opts.force);
90
+ // We'll apply these later in generateRegistry — store them
91
+ // The parsedTypes set isn't available yet, so we load all and filter later
92
+ awsConstraints = loadExtensionSchemas(extensionsDir, new Set(schemas.keys()));
93
+ log(`Loaded extension constraints for ${awsConstraints.size} resource types`);
94
+ }
95
+ catch (err) {
96
+ log(`WARNING: failed to fetch cfn-lint extensions: ${err}`);
97
+ awsConstraints = new Map();
98
+ }
99
+ return { schemas, warnings };
100
+ },
101
+ augmentResults: (results, _opts, log) => {
102
+ const warnings = [];
103
+ // Add SAM resources
104
+ results.push(...samResources());
105
+ log("Added SAM resources");
106
+ // Add fallback resources for missing priority types
107
+ const parsedTypes = new Set(results.map((r) => r.resource.typeName));
108
+ for (const fb of fallbackResources()) {
109
+ if (!parsedTypes.has(fb.resource.typeName)) {
110
+ results.push(fb);
111
+ parsedTypes.add(fb.resource.typeName);
112
+ warnings.push({
113
+ file: fb.resource.typeName,
114
+ error: `Priority resource missing from schema zip; using fallback`,
115
+ });
116
+ }
117
+ }
118
+ // Re-filter extension constraints now that we have the full type set
119
+ // (augmentSchemas loaded them before parsing, so we already have them)
120
+ // A curated enum that reached nothing is a stale entry (chant #1497), and
121
+ // the only place it can be noticed is here, once every schema has been seen.
122
+ assertOverlayCoverage(enumOverlayEntries(), awsOverlaySeenTypes, awsOverlayStrict);
123
+ const applied = awsOverlayApplications.filter((a) => a.outcome === "applied").length;
124
+ log(`Applied ${applied} curated enum overlay entries`);
125
+ warnings.push(...redundantOverlayWarnings(awsOverlayApplications));
126
+ assertPropertyOverlayCoverage(propertyOverlayEntries(), awsOverlaySeenTypes, awsOverlayStrict);
127
+ const backfilled = awsPropertyOverlayApplications.filter((a) => a.outcome === "applied").length;
128
+ log(`Backfilled ${backfilled} properties the pinned spec predates`);
129
+ warnings.push(...redundantPropertyOverlayWarnings(awsPropertyOverlayApplications));
130
+ log(`Total: ${results.length} resource schemas`);
131
+ return { results, warnings };
132
+ },
133
+ generateRegistry: (results, naming) => {
134
+ const runtimeDeprecations = lambdaRuntimeDeprecations();
135
+ return generateLexiconJSON(results, naming, awsConstraints, runtimeDeprecations);
136
+ },
137
+ generateTypes: (results, naming) => {
138
+ return generateTypeScriptDeclarations(results, naming);
139
+ },
140
+ generateRuntimeIndex: (results, naming) => {
141
+ return generateRuntimeIndex(results, naming);
142
+ },
143
+ };
144
+ /**
145
+ * Run the full AWS generation pipeline.
146
+ */
147
+ export async function generate(opts = {}) {
148
+ // Reset shared state
149
+ awsConstraints = new Map();
150
+ awsOverlay = enumOverlayByType();
151
+ awsOverlayApplications = [];
152
+ awsOverlaySeenTypes = new Set();
153
+ awsPropertyOverlay = propertyOverlayByType();
154
+ awsPropertyOverlayApplications = [];
155
+ // A fixture set is a trimmed subset, so an entry it never reaches is
156
+ // expected; a run over the real zip has no such excuse.
157
+ awsOverlayStrict = !opts.schemaSource;
158
+ // chant #1459 — names already published keep pointing at the types that
159
+ // published them. Skipped for a caller-supplied schema set, exactly as
160
+ // `augmentSchemas` is (see the pipeline's `opts.schemaSource` guard): a
161
+ // fixture run must depend on its fixtures, not on what the lexicon last
162
+ // shipped.
163
+ awsReservedNames = opts.schemaSource ? {} : publishedNames();
164
+ return generatePipeline(awsPipelineConfig, opts);
165
+ }
166
+ /**
167
+ * Write generated artifacts to disk.
168
+ */
169
+ export function writeGeneratedFiles(result, baseDir) {
170
+ writeGeneratedArtifacts({
171
+ baseDir,
172
+ files: {
173
+ "lexicon-aws.json": result.lexiconJSON,
174
+ "index.d.ts": result.typesDTS,
175
+ "index.ts": result.indexTS,
176
+ "runtime.ts": [
177
+ "/**",
178
+ " * Runtime factory constructors — re-exported from core.",
179
+ " */",
180
+ 'export { createResource, createProperty } from "@intentius/chant/runtime";',
181
+ "",
182
+ ].join("\n"),
183
+ },
184
+ });
185
+ }
186
+ /**
187
+ * Generate the runtime index.ts with factory constructor exports.
188
+ */
189
+ function generateRuntimeIndex(results, naming) {
190
+ const resourceEntries = [];
191
+ const propertyEntries = [];
192
+ for (const r of results) {
193
+ const cfnType = r.resource.typeName;
194
+ const tsName = naming.resolve(cfnType);
195
+ if (!tsName)
196
+ continue;
197
+ // Build attrs map: TS key (underscores) → CF attr name (dots)
198
+ const attrs = {};
199
+ for (const a of r.resource.attributes) {
200
+ const tsKey = a.name.replace(/\./g, "_").replace(/\*/g, "Item"); // Subscribers.*.Status → Subscribers_Item_Status
201
+ attrs[tsKey] = a.name; // maps to "Endpoint.Address" for GetAtt
202
+ }
203
+ resourceEntries.push({ tsName, resourceType: cfnType, attrs });
204
+ for (const alias of naming.aliases(cfnType)) {
205
+ resourceEntries.push({ tsName: alias, resourceType: cfnType, attrs });
206
+ }
207
+ // Property types
208
+ const shortName = cfnShortName(cfnType);
209
+ const ptAliases = naming.propertyTypeAliases(cfnType);
210
+ for (const pt of r.propertyTypes) {
211
+ const defName = extractDefName(pt.name, shortName);
212
+ const ptName = propertyTypeName(tsName, defName);
213
+ const ptCfnType = `${cfnType}.${pt.specType}`;
214
+ propertyEntries.push({ tsName: ptName, resourceType: ptCfnType });
215
+ if (ptAliases) {
216
+ const aliasName = ptAliases.get(defName);
217
+ if (aliasName) {
218
+ propertyEntries.push({ tsName: aliasName, resourceType: ptCfnType });
219
+ }
220
+ }
221
+ }
222
+ }
223
+ return coreGenerateRuntimeIndex(resourceEntries, propertyEntries, {
224
+ lexiconName: "aws",
225
+ intrinsicReExports: {
226
+ names: ["Sub", "Ref", "GetAtt", "If", "Join", "Select", "Split", "Base64", "Equals", "And", "Or", "Not"],
227
+ from: "../intrinsics",
228
+ },
229
+ pseudoReExports: {
230
+ names: ["AWS", "StackName", "Region", "AccountId", "StackId", "URLSuffix", "NoValue", "NotificationARNs", "Partition"],
231
+ from: "../pseudo",
232
+ },
233
+ });
234
+ }
@@ -0,0 +1,135 @@
1
+ /**
2
+ * AWS-specific naming configuration for the core NamingStrategy.
3
+ *
4
+ * The algorithm lives in core; only the data tables and helper functions
5
+ * for extracting names from AWS CloudFormation types are defined here.
6
+ */
7
+ import { existsSync, readFileSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ import { NamingStrategy as CoreNamingStrategy, reservedNamesFromSnapshot, } from "@intentius/chant/codegen/naming";
10
+ export { propertyTypeName, extractDefName } from "@intentius/chant/codegen/naming";
11
+ import { cfnShortName, cfnServiceName } from "../spec/parse.js";
12
+ /**
13
+ * Fixed TypeScript class names for backward compatibility.
14
+ */
15
+ const priorityNames = {
16
+ "AWS::S3::Bucket": "Bucket",
17
+ "AWS::Lambda::Function": "Function",
18
+ "AWS::IAM::Role": "Role",
19
+ "AWS::IAM::Policy": "Policy",
20
+ "AWS::DynamoDB::Table": "Table",
21
+ "AWS::SQS::Queue": "Queue",
22
+ "AWS::SNS::Topic": "Topic",
23
+ "AWS::EC2::Instance": "Instance",
24
+ "AWS::EC2::SecurityGroup": "SecurityGroup",
25
+ "AWS::EC2::VPC": "Vpc",
26
+ "AWS::EC2::Subnet": "Subnet",
27
+ "AWS::CloudFormation::Stack": "Stack",
28
+ "AWS::CloudWatch::Alarm": "Alarm",
29
+ "AWS::Events::Rule": "EventRule",
30
+ "AWS::Logs::LogGroup": "LogGroup",
31
+ "AWS::ApiGateway::RestApi": "RestApi",
32
+ "AWS::ApiGatewayV2::Api": "HttpApi",
33
+ "AWS::ECS::Cluster": "EcsCluster",
34
+ "AWS::ECS::Service": "EcsService",
35
+ "AWS::ECS::TaskDefinition": "TaskDefinition",
36
+ "AWS::ElasticLoadBalancingV2::LoadBalancer": "LoadBalancer",
37
+ "AWS::ElasticLoadBalancingV2::TargetGroup": "TargetGroup",
38
+ "AWS::ElasticLoadBalancingV2::Listener": "Listener",
39
+ "AWS::RDS::DBInstance": "DbInstance",
40
+ "AWS::RDS::DBCluster": "DbCluster",
41
+ "AWS::StepFunctions::StateMachine": "StateMachine",
42
+ "AWS::KMS::Key": "KmsKey",
43
+ "AWS::SecretsManager::Secret": "Secret",
44
+ "AWS::SSM::Parameter": "SsmParameter",
45
+ "AWS::Lambda::Permission": "Permission",
46
+ "AWS::Lambda::LayerVersion": "LayerVersion",
47
+ "AWS::IAM::ManagedPolicy": "ManagedPolicy",
48
+ "AWS::IAM::InstanceProfile": "InstanceProfile",
49
+ };
50
+ /**
51
+ * Additional TypeScript names beyond the primary priority name.
52
+ */
53
+ const priorityAliases = {
54
+ "AWS::IAM::Policy": ["IamPolicy"],
55
+ };
56
+ /**
57
+ * Property type aliases that must always be emitted for backward compat.
58
+ */
59
+ const priorityPropertyAliases = {
60
+ "AWS::S3::Bucket": {
61
+ ServerSideEncryptionByDefault: "ServerSideEncryptionByDefault",
62
+ ServerSideEncryptionRule: "ServerSideEncryptionRule",
63
+ BucketEncryption: "BucketEncryption",
64
+ VersioningConfiguration: "VersioningConfiguration",
65
+ PublicAccessBlockConfiguration: "PublicAccessBlockConfiguration",
66
+ LoggingConfiguration: "LoggingConfiguration",
67
+ },
68
+ "AWS::Lambda::Function": {
69
+ Code: "Code",
70
+ Environment: "Environment",
71
+ },
72
+ };
73
+ /**
74
+ * Service name abbreviations for collision-resolved names.
75
+ */
76
+ const serviceAbbreviations = {
77
+ ElasticLoadBalancingV2: "Elbv2",
78
+ CloudFormation: "Cfn",
79
+ CloudWatch: "Cw",
80
+ ApiGateway: "Apigw",
81
+ ApiGatewayV2: "Apigwv2",
82
+ SecretsManager: "Sm",
83
+ StepFunctions: "Sfn",
84
+ CertificateManager: "Acm",
85
+ ElasticLoadBalancing: "Elb",
86
+ CloudFront: "Cf",
87
+ ElastiCache: "Ec",
88
+ };
89
+ const awsNamingConfig = {
90
+ priorityNames,
91
+ priorityAliases,
92
+ priorityPropertyAliases,
93
+ serviceAbbreviations,
94
+ shortName: cfnShortName,
95
+ serviceName: cfnServiceName,
96
+ };
97
+ /**
98
+ * AWS-specific NamingStrategy — wraps the core algorithm with AWS data tables.
99
+ */
100
+ export class NamingStrategy extends CoreNamingStrategy {
101
+ /**
102
+ * @param reservedNames chant #1459 — spec type → already-published TS name,
103
+ * normally {@link publishedNames}. Passed in rather than read here on
104
+ * purpose: a fixture-driven codegen run (`./snapshot.test.ts`) must not
105
+ * inherit the repo's real 1600-entry surface, or its output would depend on
106
+ * whatever the lexicon last shipped instead of on its fixtures.
107
+ */
108
+ constructor(results, reservedNames = {}) {
109
+ const inputs = results.map((r) => ({
110
+ typeName: r.resource.typeName,
111
+ propertyTypes: r.propertyTypes,
112
+ }));
113
+ super(inputs, { ...awsNamingConfig, reservedNames });
114
+ }
115
+ }
116
+ /**
117
+ * Reserved names from the committed surface snapshot, or none when it cannot
118
+ * be read.
119
+ *
120
+ * Defensive: codegen must still run for a lexicon with no snapshot yet, and a
121
+ * missing or malformed snapshot should degrade to the previous naming
122
+ * behaviour rather than fail generation outright. `surface-diff` makes the
123
+ * consequence visible either way.
124
+ */
125
+ export function publishedNames() {
126
+ try {
127
+ const snapshotPath = join(import.meta.dirname, "..", "..", "surface.snapshot.json");
128
+ if (!existsSync(snapshotPath))
129
+ return {};
130
+ return reservedNamesFromSnapshot(JSON.parse(readFileSync(snapshotPath, "utf-8")));
131
+ }
132
+ catch {
133
+ return {};
134
+ }
135
+ }
@@ -0,0 +1,67 @@
1
+ /**
2
+ * AWS lexicon packaging — delegates to core packagePipeline
3
+ * with AWS-specific manifest building and skill collection.
4
+ */
5
+ import { readFileSync } from "fs";
6
+ import { awsPlugin } from "../plugin.js";
7
+ import { join, dirname } from "path";
8
+ import { moduleSourceDir } from "@intentius/chant/module-source";
9
+ import { packagePipeline, collectSkills, } from "@intentius/chant/codegen/package";
10
+ import { generate } from "./generate.js";
11
+ const pkgDir = dirname(moduleSourceDir(import.meta.url));
12
+ /**
13
+ * Map intrinsic name to its CloudFormation output key.
14
+ */
15
+ function intrinsicOutputKey(name) {
16
+ switch (name) {
17
+ case "Ref": return "Ref";
18
+ default: return `Fn::${name}`;
19
+ }
20
+ }
21
+ /**
22
+ * Package the AWS lexicon into a distributable BundleSpec.
23
+ */
24
+ export async function packageLexicon(opts = {}) {
25
+ const pkgJson = JSON.parse(readFileSync(join(pkgDir, "..", "package.json"), "utf-8"));
26
+ return packagePipeline({
27
+ generate: (genOpts) => generate({ verbose: genOpts.verbose, force: genOpts.force }),
28
+ buildManifest: (_genResult) => {
29
+ // Lazy-import to avoid circular dependency
30
+ // Trust the plugin's own `isTag` registration (chant #1067) — this
31
+ // used to recompute `isTag: i.name === "Sub"` independently of
32
+ // ../plugin.ts, a second source of truth that could silently drift
33
+ // from the real registration (the exact shape of bug #1039 found).
34
+ const intrinsics = (awsPlugin.intrinsics?.() ?? []).map((i) => ({
35
+ name: i.name,
36
+ description: i.description,
37
+ outputKey: intrinsicOutputKey(i.name),
38
+ isTag: i.isTag,
39
+ // chant #1044 — carried through verbatim for the same reason as
40
+ // `isTag`: the packaged manifest is what a consumer reads to
41
+ // learn which intrinsics fold, so recomputing it here would be a
42
+ // second source of truth able to drift from ../plugin.ts.
43
+ foldsAsCall: i.foldsAsCall,
44
+ }));
45
+ const pseudoParams = awsPlugin.pseudoParameters?.() ?? [];
46
+ const pseudoParameters = {};
47
+ for (const p of pseudoParams) {
48
+ const shortName = p.split("::").pop();
49
+ pseudoParameters[shortName] = p;
50
+ }
51
+ return {
52
+ name: "aws",
53
+ version: pkgJson.version ?? "0.0.0",
54
+ chantVersion: ">=0.1.0",
55
+ namespace: "AWS",
56
+ intrinsics,
57
+ pseudoParameters,
58
+ };
59
+ },
60
+ srcDir: pkgDir,
61
+ collectSkills: () => {
62
+ const skillDefs = awsPlugin.skills?.() ?? [];
63
+ return collectSkills(skillDefs);
64
+ },
65
+ version: pkgJson.version ?? "0.0.0",
66
+ }, opts);
67
+ }
@@ -5,15 +5,39 @@
5
5
  * before parsing. This enriches the schemas with additional type information,
6
6
  * enum values, and constraint fixes.
7
7
  */
8
+ declare const PATCH_FILES: readonly ["manual.json", "smithy.json", "format.json"];
8
9
  export interface PatchWarning {
9
10
  typeName: string;
10
11
  patchFile: string;
11
12
  error: Error;
12
13
  }
14
+ /**
15
+ * A patch in the pinned cfn-lint release that is known not to apply to the
16
+ * pinned spec. Its failure is reported as a skip rather than a warning; an
17
+ * entry that applies again, or whose patch file is gone, is reported as
18
+ * retirable so the list cannot go stale.
19
+ */
20
+ export interface StalePatch {
21
+ typeName: string;
22
+ patchFile: (typeof PATCH_FILES)[number];
23
+ /** The cfn-lint release the entry was checked against. */
24
+ cfnLint: string;
25
+ reason: string;
26
+ }
27
+ export declare const KNOWN_STALE_PATCHES: readonly StalePatch[];
28
+ export interface PatchSkip {
29
+ stale: StalePatch;
30
+ error: Error;
31
+ }
13
32
  export interface PatchStats {
14
33
  patchesApplied: number;
15
34
  resourcesFixed: number;
35
+ /** Failures not in `KNOWN_STALE_PATCHES`. */
16
36
  warnings: PatchWarning[];
37
+ /** Failures listed in `KNOWN_STALE_PATCHES`. */
38
+ skipped: PatchSkip[];
39
+ /** `KNOWN_STALE_PATCHES` entries that did not fail: applied, or no such schema or patch file. */
40
+ retirable: StalePatch[];
17
41
  }
18
42
  /**
19
43
  * Fetch cfn-lint patches from GitHub tarball and extract to cache.
@@ -25,7 +49,7 @@ export declare function fetchCfnLintPatches(force?: boolean): Promise<string>;
25
49
  * For each schema, converts type name to directory name and applies
26
50
  * manual.json, smithy.json, format.json in order.
27
51
  */
28
- export declare function applyPatches(schemas: Map<string, Buffer>, patchesDir: string): {
52
+ export declare function applyPatches(schemas: Map<string, Buffer>, patchesDir: string, knownStale?: readonly StalePatch[]): {
29
53
  schemas: Map<string, Buffer>;
30
54
  stats: PatchStats;
31
55
  };
@@ -34,4 +58,5 @@ export declare function applyPatches(schemas: Map<string, Buffer>, patchesDir: s
34
58
  * AWS::S3::Bucket → aws_s3_bucket
35
59
  */
36
60
  export declare function typeNameToPatchDir(typeName: string): string;
61
+ export {};
37
62
  //# sourceMappingURL=patches.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../src/codegen/patches.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,UAAU,EAAE,MAAM,GACjB;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAqCrD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3D"}
1
+ {"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../src/codegen/patches.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAcH,QAAA,MAAM,WAAW,YAAI,aAAa,EAAE,aAAa,EAAE,aAAa,CAAU,CAAC;AAE3E,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;IACxC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,SAAS,UAAU,EAYpD,CAAC;AAEF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,gDAAgD;IAChD,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,iGAAiG;IACjG,SAAS,EAAE,UAAU,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAMxE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,UAAU,EAAE,MAAM,EAClB,UAAU,GAAE,SAAS,UAAU,EAAwB,GACtD;IAAE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAwCrD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3D"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * cfn-lint patch fetcher and applier.
3
+ *
4
+ * Downloads cfn-lint patches from GitHub and applies them to raw schemas
5
+ * before parsing. This enriches the schemas with additional type information,
6
+ * enum values, and constraint fixes.
7
+ */
8
+ import { readFileSync } from "fs";
9
+ import { join } from "path";
10
+ import { homedir } from "os";
11
+ import { rfc6902Apply } from "@intentius/chant/codegen/json-patch";
12
+ import { fetchAndExtractTar } from "@intentius/chant/codegen/fetch";
13
+ import { cfnLintTarballUrl, PINNED_VERSIONS } from "./versions.js";
14
+ const CFN_LINT_TARBALL_URL = cfnLintTarballUrl();
15
+ // Keyed by version: the cache lives for 7 days, so an unkeyed directory would
16
+ // keep serving the old release's patches after the pin moves.
17
+ const PATCHES_DEST_DIR = join(homedir(), ".chant", `cfn-lint-patches-${PINNED_VERSIONS.cfnLint}`);
18
+ const PATCHES_TAR_PREFIX = "src/cfnlint/data/schemas/patches/extensions/all/";
19
+ const PATCH_FILES = ["manual.json", "smithy.json", "format.json"];
20
+ export const KNOWN_STALE_PATCHES = [
21
+ {
22
+ // Adds `format: ipv4-network` to `Cidr`, a constraint only; no generated
23
+ // type changes. Every cfn-lint release from v1.32.4 to v1.51.5 still
24
+ // targets the old name, and v1.52.0 removed the patch tree from cfn-lint
25
+ // (it moved to aws-cloudformation/resource-provider-enhanced-schemas,
26
+ // which has the corrected path but publishes only a rolling `latest`).
27
+ typeName: "AWS::MediaLive::InputSecurityGroup",
28
+ patchFile: "format.json",
29
+ cfnLint: "v1.32.4",
30
+ reason: "the 2026-10-19 spec renamed definition InputWhitelistRuleCidr to InputWhitelistRule (#4144)",
31
+ },
32
+ ];
33
+ /**
34
+ * Fetch cfn-lint patches from GitHub tarball and extract to cache.
35
+ * Returns the path to the extracted patches directory.
36
+ */
37
+ export async function fetchCfnLintPatches(force = false) {
38
+ return fetchAndExtractTar({ url: CFN_LINT_TARBALL_URL, destDir: PATCHES_DEST_DIR }, PATCHES_TAR_PREFIX, force);
39
+ }
40
+ /**
41
+ * Apply cfn-lint RFC 6902 patches to raw schema bytes.
42
+ * For each schema, converts type name to directory name and applies
43
+ * manual.json, smithy.json, format.json in order.
44
+ */
45
+ export function applyPatches(schemas, patchesDir, knownStale = KNOWN_STALE_PATCHES) {
46
+ const stats = { patchesApplied: 0, resourcesFixed: 0, warnings: [], skipped: [], retirable: [] };
47
+ const staleByKey = new Map(knownStale.map((s) => [`${s.typeName}/${s.patchFile}`, s]));
48
+ const result = new Map();
49
+ for (const [typeName, data] of schemas) {
50
+ const dirName = typeNameToPatchDir(typeName);
51
+ const patchPath = join(patchesDir, dirName);
52
+ let patched = data;
53
+ for (const pf of PATCH_FILES) {
54
+ const fullPath = join(patchPath, pf);
55
+ let patchData;
56
+ try {
57
+ patchData = readFileSync(fullPath);
58
+ }
59
+ catch {
60
+ continue; // Patch file doesn't exist
61
+ }
62
+ try {
63
+ patched = Buffer.from(rfc6902Apply(patched.toString("utf-8"), patchData.toString("utf-8")));
64
+ stats.patchesApplied++;
65
+ }
66
+ catch (err) {
67
+ const error = err instanceof Error ? err : new Error(String(err));
68
+ const stale = staleByKey.get(`${typeName}/${pf}`);
69
+ if (stale)
70
+ stats.skipped.push({ stale, error });
71
+ else
72
+ stats.warnings.push({ typeName, patchFile: pf, error });
73
+ }
74
+ }
75
+ if (patched !== data) {
76
+ stats.resourcesFixed++;
77
+ }
78
+ result.set(typeName, patched);
79
+ }
80
+ const skippedStale = new Set(stats.skipped.map((s) => s.stale));
81
+ stats.retirable = knownStale.filter((s) => !skippedStale.has(s));
82
+ return { schemas: result, stats };
83
+ }
84
+ /**
85
+ * Convert CloudFormation type name to cfn-lint patch directory name.
86
+ * AWS::S3::Bucket → aws_s3_bucket
87
+ */
88
+ export function typeNameToPatchDir(typeName) {
89
+ return typeName.replaceAll("::", "_").toLowerCase();
90
+ }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Backfilled properties (chant #3953).
3
+ *
4
+ * The Registry spec is pinned by content (src/spec/pin.ts), so a property AWS
5
+ * adds after the pin was accepted does not reach the generated types until the
6
+ * pin moves. Moving it is a reviewed, whole-spec decision: the 2026-08-05 pin
7
+ * against the October upstream is 185 resource types apart. When one property
8
+ * is needed before that, it goes here instead of being cast past the types.
9
+ *
10
+ * Each entry names a top-level property and the schema fragment to add for it,
11
+ * copied from the live Registry schema. It is merged into the raw schema before
12
+ * parsing, so the property reaches the `.d.ts` and the lexicon registry by the
13
+ * same path a spec property does. The overlay has no way to mark a property
14
+ * create-only, so it only suits properties that are updatable in place.
15
+ *
16
+ * Precedence follows the enum overlay (#1497): where the spec already declares
17
+ * the property, the spec wins and the entry is reported as redundant, so a pin
18
+ * bump surfaces the entries it retires.
19
+ */
20
+ import overlayDocument from "./property-overlay.json" with { type: "json" };
21
+ /** The backfilled entries, in file order. */
22
+ export function propertyOverlayEntries() {
23
+ return overlayDocument.entries;
24
+ }
25
+ /** Entries grouped by CloudFormation type name. */
26
+ export function propertyOverlayByType(entries = propertyOverlayEntries()) {
27
+ const byType = new Map();
28
+ for (const entry of entries) {
29
+ const list = byType.get(entry.type);
30
+ if (list)
31
+ list.push(entry);
32
+ else
33
+ byType.set(entry.type, [entry]);
34
+ }
35
+ return byType;
36
+ }
37
+ /** Add the entries for one CloudFormation type to its raw schema bytes. */
38
+ export function applyPropertyOverlay(data, entries) {
39
+ if (entries.length === 0)
40
+ return { data, applications: [] };
41
+ const text = typeof data === "string" ? data : data.toString("utf-8");
42
+ const doc = JSON.parse(text);
43
+ const properties = (doc.properties ?? (doc.properties = {}));
44
+ const applications = [];
45
+ let changed = false;
46
+ for (const entry of entries) {
47
+ if (entry.property in properties) {
48
+ applications.push({ entry, outcome: "redundant" });
49
+ continue;
50
+ }
51
+ properties[entry.property] = structuredClone(entry.schema);
52
+ changed = true;
53
+ applications.push({ entry, outcome: "applied" });
54
+ }
55
+ if (!changed)
56
+ return { data, applications };
57
+ const rewritten = JSON.stringify(doc);
58
+ return {
59
+ data: typeof data === "string" ? rewritten : Buffer.from(rewritten),
60
+ applications,
61
+ };
62
+ }
63
+ /**
64
+ * Fail on an entry whose type the run never saw. Only a run over the real
65
+ * schema zip is strict; a fixture run legitimately lacks most types.
66
+ */
67
+ export function assertPropertyOverlayCoverage(entries, seenTypes, strict) {
68
+ if (!strict)
69
+ return;
70
+ const missing = [...new Set(entries.filter((e) => !seenTypes.has(e.type)).map((e) => e.type))];
71
+ if (missing.length === 0)
72
+ return;
73
+ throw new Error(`property overlay names type(s) the spec does not contain: ${missing.sort().join(", ")}. ` +
74
+ `Drop them from src/codegen/property-overlay.json or fix the type name.`);
75
+ }
76
+ /** One warning line per entry the spec has caught up with. */
77
+ export function redundantPropertyOverlayWarnings(applications) {
78
+ return applications
79
+ .filter((a) => a.outcome === "redundant")
80
+ .map((a) => ({
81
+ file: `${a.entry.type}/properties/${a.entry.property}`,
82
+ error: `property overlay entry is redundant: the spec already declares this property, ` +
83
+ `and the spec wins. Retire the entry from src/codegen/property-overlay.json.`,
84
+ }));
85
+ }