@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.
- package/dist/actions/dynamodb.js +41 -0
- package/dist/actions/ecr.js +9 -0
- package/dist/actions/ecs.js +5 -0
- package/dist/actions/iam.js +3 -0
- package/dist/actions/index.js +9 -0
- package/dist/actions/lambda.js +11 -0
- package/dist/actions/logs.js +4 -0
- package/dist/actions/s3.js +40 -0
- package/dist/actions/sns.js +5 -0
- package/dist/actions/sqs.js +15 -0
- package/dist/agentcore/trace-fetch.d.ts.map +1 -1
- package/dist/agentcore/trace-fetch.js +472 -0
- package/dist/agentcore/trace-render.js +359 -0
- package/dist/ambient.js +148 -0
- package/dist/api/credential-chain.d.ts +30 -3
- package/dist/api/credential-chain.d.ts.map +1 -1
- package/dist/api/credential-chain.js +509 -0
- package/dist/api/read-client.d.ts +16 -43
- package/dist/api/read-client.d.ts.map +1 -1
- package/dist/api/read-client.js +458 -0
- package/dist/api/sigv4.d.ts +4 -4
- package/dist/api/sigv4.js +185 -0
- package/dist/behaviour-kinds.js +114 -0
- package/dist/caller-identity.d.ts +3 -5
- package/dist/caller-identity.d.ts.map +1 -1
- package/dist/caller-identity.js +146 -0
- package/dist/codegen/docs-cli.js +2 -0
- package/dist/codegen/docs.js +120 -0
- package/dist/codegen/enum-overlay.js +162 -0
- package/dist/codegen/extensions.js +139 -0
- package/dist/codegen/fallback.js +32 -0
- package/dist/codegen/generate-cli.js +15 -0
- package/dist/codegen/generate-lexicon.js +70 -0
- package/dist/codegen/generate-typescript.js +226 -0
- package/dist/codegen/generate.d.ts.map +1 -1
- package/dist/codegen/generate.js +234 -0
- package/dist/codegen/naming.js +135 -0
- package/dist/codegen/package.js +67 -0
- package/dist/codegen/patches.d.ts +26 -1
- package/dist/codegen/patches.d.ts.map +1 -1
- package/dist/codegen/patches.js +90 -0
- package/dist/codegen/property-overlay.js +85 -0
- package/dist/codegen/property-overlay.json +1 -16
- package/dist/codegen/sam.js +402 -0
- package/dist/codegen/typecheck.js +4 -0
- package/dist/codegen/versions.js +31 -0
- package/dist/components/__tests__/mock-cloud-executor.js +326 -0
- package/dist/components/apply.d.ts +44 -1
- package/dist/components/apply.d.ts.map +1 -1
- package/dist/components/apply.js +752 -0
- package/dist/components/builders.js +37 -0
- package/dist/components/capability-plugin.js +66 -0
- package/dist/components/cloud-executor.d.ts +35 -0
- package/dist/components/cloud-executor.d.ts.map +1 -1
- package/dist/components/cloud-executor.js +576 -0
- package/dist/components/config-bom.js +207 -0
- package/dist/components/host-delivery.js +117 -0
- package/dist/components/index.js +18 -0
- package/dist/components/job-submission.js +77 -0
- package/dist/components/publish.js +234 -0
- package/dist/components/safety.js +62 -0
- package/dist/components/wait-aws.js +68 -0
- package/dist/composites/agentcore-agent.js +187 -0
- package/dist/composites/agentcore-trust-policy.js +13 -0
- package/dist/composites/alb-shared.js +84 -0
- package/dist/composites/bucket-deployment.js +93 -0
- package/dist/composites/catalog.js +2714 -0
- package/dist/composites/dynamodb-table.js +66 -0
- package/dist/composites/ec2-instance-bundle.js +75 -0
- package/dist/composites/ec2-instance-role.js +26 -0
- package/dist/composites/ecr-repository.js +64 -0
- package/dist/composites/ecs-trust-policy.js +10 -0
- package/dist/composites/efs-with-access-point.js +44 -0
- package/dist/composites/eks-cluster.js +118 -0
- package/dist/composites/fargate-alb.js +216 -0
- package/dist/composites/fargate-service.js +222 -0
- package/dist/composites/index.js +28 -0
- package/dist/composites/lambda-api.js +15 -0
- package/dist/composites/lambda-dynamodb.js +77 -0
- package/dist/composites/lambda-eventbridge.js +27 -0
- package/dist/composites/lambda-function.js +54 -0
- package/dist/composites/lambda-s3.js +93 -0
- package/dist/composites/lambda-sns.js +23 -0
- package/dist/composites/lambda-sqs.js +34 -0
- package/dist/composites/landing-zone.js +82 -0
- package/dist/composites/microvm-app.js +293 -0
- package/dist/composites/minimal-vpc.js +40 -0
- package/dist/composites/monitoring-stack.js +105 -0
- package/dist/composites/nlb-service.js +61 -0
- package/dist/composites/rds-instance.js +98 -0
- package/dist/composites/scheduled-lambda.js +28 -0
- package/dist/composites/solr-fargate-service.js +33 -0
- package/dist/composites/step-functions-workflow.js +78 -0
- package/dist/composites/vpc-default.js +132 -0
- package/dist/condition.js +43 -0
- package/dist/coverage.js +4 -0
- package/dist/deep-observe.d.ts.map +1 -1
- package/dist/deep-observe.js +709 -0
- package/dist/deep-topology.js +226 -0
- package/dist/default-tags.js +50 -0
- package/dist/defaults.js +85 -0
- package/dist/dependencies.js +269 -0
- package/dist/detect.js +21 -0
- package/dist/disruption.d.ts.map +1 -1
- package/dist/disruption.js +129 -0
- package/dist/effect-receipt-row.js +107 -0
- package/dist/generated/index.d.ts +1297 -82
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +12382 -0
- package/dist/generated/runtime.js +4 -0
- package/dist/governance.js +131 -0
- package/dist/identity-observe.d.ts.map +1 -1
- package/dist/identity-observe.js +127 -0
- package/dist/import/generator.js +757 -0
- package/dist/import/live-export.js +34 -0
- package/dist/import/parser.js +394 -0
- package/dist/index.js +69 -0
- package/dist/integrity.json +6 -6
- package/dist/intrinsics.js +393 -0
- package/dist/lint/audit-catalog.js +87 -0
- package/dist/lint/audit-lineage.js +150 -0
- package/dist/lint/post-synth/cf-refs.js +247 -0
- package/dist/lint/post-synth/cor020.js +60 -0
- package/dist/lint/post-synth/ext001.d.ts.map +1 -1
- package/dist/lint/post-synth/ext001.js +197 -0
- package/dist/lint/post-synth/index.js +124 -0
- package/dist/lint/post-synth/waw010.js +41 -0
- package/dist/lint/post-synth/waw011.js +41 -0
- package/dist/lint/post-synth/waw013.js +38 -0
- package/dist/lint/post-synth/waw014.js +42 -0
- package/dist/lint/post-synth/waw015.js +88 -0
- package/dist/lint/post-synth/waw016.d.ts.map +1 -1
- package/dist/lint/post-synth/waw016.js +116 -0
- package/dist/lint/post-synth/waw017.js +43 -0
- package/dist/lint/post-synth/waw018.js +61 -0
- package/dist/lint/post-synth/waw019.js +64 -0
- package/dist/lint/post-synth/waw020.js +56 -0
- package/dist/lint/post-synth/waw021.js +44 -0
- package/dist/lint/post-synth/waw022.js +36 -0
- package/dist/lint/post-synth/waw023.js +40 -0
- package/dist/lint/post-synth/waw024.js +46 -0
- package/dist/lint/post-synth/waw025.js +36 -0
- package/dist/lint/post-synth/waw026.js +38 -0
- package/dist/lint/post-synth/waw027.js +41 -0
- package/dist/lint/post-synth/waw028.js +39 -0
- package/dist/lint/post-synth/waw029.js +54 -0
- package/dist/lint/post-synth/waw030.js +282 -0
- package/dist/lint/post-synth/waw031.js +58 -0
- package/dist/lint/post-synth/waw032.js +45 -0
- package/dist/lint/post-synth/waw033.js +75 -0
- package/dist/lint/post-synth/waw034.js +52 -0
- package/dist/lint/post-synth/waw035.js +56 -0
- package/dist/lint/post-synth/waw036.js +79 -0
- package/dist/lint/post-synth/waw037.js +67 -0
- package/dist/lint/post-synth/waw038.js +42 -0
- package/dist/lint/post-synth/waw039.js +42 -0
- package/dist/lint/post-synth/waw040.js +45 -0
- package/dist/lint/post-synth/waw041.js +40 -0
- package/dist/lint/post-synth/waw042.js +99 -0
- package/dist/lint/post-synth/waw043.js +51 -0
- package/dist/lint/post-synth/waw044.js +64 -0
- package/dist/lint/post-synth/waw045.js +49 -0
- package/dist/lint/post-synth/waw046.js +52 -0
- package/dist/lint/post-synth/waw047.js +43 -0
- package/dist/lint/post-synth/waw048.js +40 -0
- package/dist/lint/post-synth/waw049.js +78 -0
- package/dist/lint/post-synth/waw050.js +44 -0
- package/dist/lint/post-synth/waw051.js +41 -0
- package/dist/lint/post-synth/waw052.js +43 -0
- package/dist/lint/post-synth/waw053.js +43 -0
- package/dist/lint/post-synth/waw054.js +41 -0
- package/dist/lint/post-synth/waw055.js +41 -0
- package/dist/lint/post-synth/waw056.js +65 -0
- package/dist/lint/post-synth/waw057.js +43 -0
- package/dist/lint/post-synth/waw058.js +61 -0
- package/dist/lint/post-synth/waw059.js +338 -0
- package/dist/lint/post-synth/waw060.js +83 -0
- package/dist/lint/post-synth/waw061.js +60 -0
- package/dist/lint/post-synth/waw062.js +0 -0
- package/dist/lint/post-synth/waw063.js +0 -0
- package/dist/lint/post-synth/waw064.js +45 -0
- package/dist/lint/post-synth/waw065.js +104 -0
- package/dist/lint/post-synth/waw066.js +145 -0
- package/dist/lint/post-synth/waw067.js +115 -0
- package/dist/lint/post-synth/waw068.js +69 -0
- package/dist/lint/post-synth/waw069.js +0 -0
- package/dist/lint/rules/hardcoded-region.js +38 -0
- package/dist/lint/rules/iam-wildcard.js +60 -0
- package/dist/lint/rules/index.js +6 -0
- package/dist/lint/rules/s3-encryption.js +60 -0
- package/dist/live-attrs.js +42 -0
- package/dist/lsp/completions.d.ts.map +1 -1
- package/dist/lsp/completions.js +18 -0
- package/dist/lsp/hover.d.ts.map +1 -1
- package/dist/lsp/hover.js +66 -0
- package/dist/manifest.json +1 -1
- package/dist/mapping.js +33 -0
- package/dist/meta.json +17359 -784
- package/dist/nested-stack.js +95 -0
- package/dist/okf/index.md +203 -0
- package/dist/okf/rules/EXT001.md +1 -0
- package/dist/okf/rules/WAW016.md +2 -0
- package/dist/okf/rules/WAW019.md +1 -0
- package/dist/okf/rules/WAW028.md +1 -0
- package/dist/okf/rules/WAW030.md +2 -0
- package/dist/okf/rules/WAW039.md +1 -0
- package/dist/okf/rules/WAW049.md +1 -0
- package/dist/okf/rules/WAW056.md +1 -0
- package/dist/okf/rules/WAW058.md +1 -0
- package/dist/okf/rules/WAW062.md +1 -0
- package/dist/okf/rules/WAW064.md +1 -0
- package/dist/okf/rules/WAW065.md +1 -0
- package/dist/okf/rules/WAW066.md +1 -0
- package/dist/okf/rules/WAW067.md +1 -0
- package/dist/okf/rules/WAW068.md +1 -0
- package/dist/okf/rules/WAW069.md +4 -0
- package/dist/okf/types/AIWorkloadConfig.md +23 -0
- package/dist/okf/types/ARCRegionSwitchPlan.md +1 -0
- package/dist/okf/types/AccountAccessApplication.md +28 -0
- package/dist/okf/types/AccountAccessEntitlement.md +22 -0
- package/dist/okf/types/ActionTarget.md +20 -0
- package/dist/okf/types/AdConfiguration.md +21 -0
- package/dist/okf/types/Adapter.md +26 -0
- package/dist/okf/types/AgentContext.md +35 -0
- package/dist/okf/types/AgentGoal.md +31 -0
- package/dist/okf/types/AgentProfile.md +34 -0
- package/dist/okf/types/Alarm.md +3 -1
- package/dist/okf/types/AlarmModel.md +14 -9
- package/dist/okf/types/AmplifyWebhook.md +25 -0
- package/dist/okf/types/ApiCache.md +8 -8
- package/dist/okf/types/ApiGatewayManagedOverrides.md +5 -5
- package/dist/okf/types/AppAuthorization.md +35 -0
- package/dist/okf/types/AppBlockBuilder.md +1 -0
- package/dist/okf/types/AppInstance.md +2 -2
- package/dist/okf/types/AppInstanceBot.md +2 -2
- package/dist/okf/types/AppStreamFleet.md +3 -2
- package/dist/okf/types/AppSyncApiKey.md +6 -6
- package/dist/okf/types/AppSyncType.md +22 -0
- package/dist/okf/types/ApplicationStatusCheck.md +36 -0
- package/dist/okf/types/ApplicationVersion.md +4 -1
- package/dist/okf/types/ApplicationsList.md +26 -0
- package/dist/okf/types/ApprovalPolicy.md +28 -0
- package/dist/okf/types/ArchiveRule.md +24 -0
- package/dist/okf/types/Asset.md +30 -0
- package/dist/okf/types/Backup.md +31 -0
- package/dist/okf/types/BedrockAgentCoreDataset.md +1 -1
- package/dist/okf/types/BedrockAgentCoreGateway.md +3 -0
- package/dist/okf/types/BedrockSession.md +28 -0
- package/dist/okf/types/BillEstimate.md +35 -0
- package/dist/okf/types/Brand.md +32 -0
- package/dist/okf/types/CallAnalyticsCategory.md +25 -0
- package/dist/okf/types/Campaign.md +28 -0
- package/dist/okf/types/CapacityProvider.md +30 -0
- package/dist/okf/types/Case.md +24 -0
- package/dist/okf/types/CertificateAssociation.md +13 -0
- package/dist/okf/types/ChangeSet.md +36 -0
- package/dist/okf/types/ChannelFlow.md +29 -0
- package/dist/okf/types/ChimeChannel.md +39 -0
- package/dist/okf/types/Classifier.md +6 -6
- package/dist/okf/types/ClientVpnAuthorizationRule.md +6 -6
- package/dist/okf/types/ClientVpnEndpoint.md +2 -0
- package/dist/okf/types/ClientVpnRoute.md +5 -5
- package/dist/okf/types/CloudConnector.md +29 -0
- package/dist/okf/types/Cluster.md +39 -0
- package/dist/okf/types/ClusterSchedulerConfig.md +30 -0
- package/dist/okf/types/CodeCommitRepository.md +12 -12
- package/dist/okf/types/CodeConnectionsHost.md +26 -0
- package/dist/okf/types/CodeRepository.md +5 -5
- package/dist/okf/types/CompositeAlarm.md +1 -0
- package/dist/okf/types/ComputeEnvironment.md +2 -0
- package/dist/okf/types/ComputeNodeGroup.md +1 -1
- package/dist/okf/types/ComputeQuota.md +34 -0
- package/dist/okf/types/ConfigRule.md +1 -1
- package/dist/okf/types/ConfigurationRecorder.md +7 -6
- package/dist/okf/types/ConnectAttachment.md +2 -0
- package/dist/okf/types/ConnectQueue.md +5 -1
- package/dist/okf/types/ConnectVocabulary.md +28 -0
- package/dist/okf/types/ConnectionType.md +24 -0
- package/dist/okf/types/ConsentPortal.md +33 -0
- package/dist/okf/types/ContactMethod.md +29 -0
- package/dist/okf/types/ContainerAssociation.md +26 -0
- package/dist/okf/types/ContainerFleet.md +1 -1
- package/dist/okf/types/ContainerGroupDefinition.md +1 -1
- package/dist/okf/types/Content.md +40 -0
- package/dist/okf/types/ContentAssociation.md +28 -0
- package/dist/okf/types/CustomDetectionRuleAssociation.md +28 -0
- package/dist/okf/types/CustomEntityType.md +4 -9
- package/dist/okf/types/Customization.md +22 -0
- package/dist/okf/types/CwIntegration.md +31 -0
- package/dist/okf/types/DAXParameterGroup.md +3 -8
- package/dist/okf/types/DAXSubnetGroup.md +0 -5
- package/dist/okf/types/DBClusterEndpoint.md +31 -0
- package/dist/okf/types/DBProxyTargetGroup.md +1 -0
- package/dist/okf/types/DBSnapshot.md +62 -0
- package/dist/okf/types/DLMLifecyclePolicy.md +12 -12
- package/dist/okf/types/DLPSetting.md +31 -0
- package/dist/okf/types/DMSInstanceProfile.md +1 -1
- package/dist/okf/types/DRSLaunchConfigurationTemplate.md +28 -0
- package/dist/okf/types/Daemon.md +1 -0
- package/dist/okf/types/DataExchangeDataSet.md +29 -0
- package/dist/okf/types/DataIntegrationFlow.md +27 -0
- package/dist/okf/types/DataMigration.md +1 -1
- package/dist/okf/types/DataProvider.md +2 -1
- package/dist/okf/types/DataQualityRuleset.md +6 -11
- package/dist/okf/types/DataSource.md +23 -0
- package/dist/okf/types/Dataset.md +20 -0
- package/dist/okf/types/DatasetIntegration.md +23 -0
- package/dist/okf/types/DbCluster.md +1 -1
- package/dist/okf/types/DbInstance.md +8 -2
- package/dist/okf/types/DeadlineBudget.md +29 -0
- package/dist/okf/types/DelegationSet.md +23 -0
- package/dist/okf/types/DeliveryChannel.md +6 -11
- package/dist/okf/types/DevOpsAgentAgentSpace.md +4 -0
- package/dist/okf/types/DevOpsAgentService.md +1 -0
- package/dist/okf/types/DevOpsAgentTrigger.md +28 -0
- package/dist/okf/types/DirectConnectGatewayAttachment.md +2 -0
- package/dist/okf/types/Directory.md +60 -0
- package/dist/okf/types/DocDBDBClusterParameterGroup.md +5 -10
- package/dist/okf/types/DocDBDBSubnetGroup.md +4 -9
- package/dist/okf/types/DocDBElasticClusterSnapshot.md +36 -0
- package/dist/okf/types/DocumentClassifierEndpoint.md +27 -0
- package/dist/okf/types/Domain.md +27 -0
- package/dist/okf/types/EKSCertificateAuthority.md +42 -0
- package/dist/okf/types/EKSCluster.md +8 -0
- package/dist/okf/types/EcSnapshot.md +66 -0
- package/dist/okf/types/EmailIdentityCertificate.md +15 -0
- package/dist/okf/types/EndpointConfig.md +14 -13
- package/dist/okf/types/EntityRecognizer.md +27 -0
- package/dist/okf/types/EntityRecognizerEndpoint.md +31 -0
- package/dist/okf/types/EnvironmentEC2.md +13 -13
- package/dist/okf/types/EvaluationForm.md +1 -0
- package/dist/okf/types/Evaluator.md +6 -2
- package/dist/okf/types/EventAction.md +26 -0
- package/dist/okf/types/EventRule.md +2 -0
- package/dist/okf/types/EventSource.md +30 -0
- package/dist/okf/types/EventTracker.md +22 -0
- package/dist/okf/types/EventsV2EventBus.md +28 -0
- package/dist/okf/types/EventsV2ResourcePolicy.md +19 -0
- package/dist/okf/types/EventsV2Subscriber.md +39 -0
- package/dist/okf/types/ExperimentDefinition.md +39 -0
- package/dist/okf/types/ExperimentRun.md +33 -0
- package/dist/okf/types/ExperimentTrialComponent.md +13 -11
- package/dist/okf/types/FHIRDatastore.md +3 -0
- package/dist/okf/types/FSxSnapshot.md +5 -5
- package/dist/okf/types/FSxVolume.md +9 -9
- package/dist/okf/types/FeaturedResultsSet.md +26 -0
- package/dist/okf/types/Feed.md +1 -0
- package/dist/okf/types/FieldLevelEncryptionConfig.md +25 -0
- package/dist/okf/types/FieldLevelEncryptionProfile.md +22 -0
- package/dist/okf/types/FileCache.md +45 -0
- package/dist/okf/types/Filter.md +27 -0
- package/dist/okf/types/Firewall.md +6 -0
- package/dist/okf/types/FlowMediaStream.md +28 -0
- package/dist/okf/types/FlowOutput.md +1 -0
- package/dist/okf/types/FpgaImage.md +38 -0
- package/dist/okf/types/Function.md +2 -2
- package/dist/okf/types/Gateway.md +41 -0
- package/dist/okf/types/GatewayClusterAssociations.md +23 -0
- package/dist/okf/types/GatewayRateLimit.md +26 -0
- package/dist/okf/types/GatewayRule.md +32 -0
- package/dist/okf/types/GlobalReplicationGroup.md +3 -0
- package/dist/okf/types/GlobalResolver.md +1 -1
- package/dist/okf/types/GlobalTable.md +1 -0
- package/dist/okf/types/GlueConnection.md +5 -4
- package/dist/okf/types/GlueSecurityConfiguration.md +1 -6
- package/dist/okf/types/GlueSession.md +38 -0
- package/dist/okf/types/GlueTable.md +5 -10
- package/dist/okf/types/GlueWorkflow.md +5 -10
- package/dist/okf/types/Group.md +27 -0
- package/dist/okf/types/Harness.md +1 -0
- package/dist/okf/types/HostKey.md +33 -0
- package/dist/okf/types/HostedZone.md +1 -0
- package/dist/okf/types/HttpApi.md +2 -0
- package/dist/okf/types/HttpNamespace.md +5 -5
- package/dist/okf/types/HubV2.md +1 -0
- package/dist/okf/types/HumanTaskUi.md +22 -0
- package/dist/okf/types/IPv4Pool.md +28 -0
- package/dist/okf/types/ImageBuilder.md +1 -0
- package/dist/okf/types/ImageBuilderImage.md +1 -1
- package/dist/okf/types/ImagePipeline.md +1 -1
- package/dist/okf/types/InferenceComponent.md +5 -1
- package/dist/okf/types/InfluxDBBackup.md +65 -0
- package/dist/okf/types/InfluxDBCluster.md +3 -0
- package/dist/okf/types/InfrastructureConfiguration.md +2 -0
- package/dist/okf/types/IngestionDestination.md +28 -0
- package/dist/okf/types/InputSecurityGroup.md +6 -4
- package/dist/okf/types/InspectorV2Connector.md +38 -0
- package/dist/okf/types/InstanceEventWindow.md +25 -0
- package/dist/okf/types/InstanceFleetConfig.md +10 -10
- package/dist/okf/types/InstanceGroupConfig.md +3 -3
- package/dist/okf/types/InstrumentationConfig.md +31 -0
- package/dist/okf/types/IntegrationAssociation.md +3 -0
- package/dist/okf/types/IoTSiteWiseApplication.md +34 -0
- package/dist/okf/types/IoTSiteWiseDataset.md +5 -2
- package/dist/okf/types/IoTSiteWiseTask.md +24 -0
- package/dist/okf/types/IpamExternalResourceVerificationToken.md +35 -0
- package/dist/okf/types/IpamInternetRegistryAssociation.md +32 -0
- package/dist/okf/types/Job.md +35 -0
- package/dist/okf/types/JobTemplate.md +26 -0
- package/dist/okf/types/KinesisChannel.md +31 -0
- package/dist/okf/types/KinesisStream.md +1 -0
- package/dist/okf/types/LambdaResourcePolicy.md +14 -0
- package/dist/okf/types/Lexicon.md +34 -0
- package/dist/okf/types/LicenseAssetGroup.md +23 -0
- package/dist/okf/types/LicenseConfiguration.md +33 -0
- package/dist/okf/types/LicenseServerEndpoint.md +32 -0
- package/dist/okf/types/LightsailKeyPair.md +29 -0
- package/dist/okf/types/LimitsProfile.md +27 -0
- package/dist/okf/types/LocationAzureBlob.md +2 -1
- package/dist/okf/types/LocationObjectStorage.md +1 -0
- package/dist/okf/types/LogAlarm.md +2 -0
- package/dist/okf/types/MGNConnector.md +23 -0
- package/dist/okf/types/MGNLaunchConfigurationTemplate.md +37 -0
- package/dist/okf/types/MLTransform.md +15 -15
- package/dist/okf/types/MWAAServerlessWorkflow.md +3 -0
- package/dist/okf/types/ManagedNotificationAccountContactAssociation.md +1 -0
- package/dist/okf/types/ManagedNotificationAdditionalChannelAssociation.md +1 -0
- package/dist/okf/types/MediaConvertJobTemplate.md +11 -13
- package/dist/okf/types/MediaConvertQueue.md +8 -10
- package/dist/okf/types/MediaInsightsPipelineConfiguration.md +28 -0
- package/dist/okf/types/MediaLiveInput.md +41 -18
- package/dist/okf/types/MediaPackageV2Channel.md +3 -0
- package/dist/okf/types/MediaPackageV2OriginEndpoint.md +1 -0
- package/dist/okf/types/MediaPipelineKinesisVideoStreamPool.md +28 -0
- package/dist/okf/types/MediaTailorFunction.md +27 -0
- package/dist/okf/types/MedicalVocabulary.md +21 -0
- package/dist/okf/types/Member.md +26 -0
- package/dist/okf/types/Memory.md +6 -0
- package/dist/okf/types/MemoryDBSnapshot.md +29 -0
- package/dist/okf/types/Metric.md +59 -0
- package/dist/okf/types/MetricAttribution.md +23 -0
- package/dist/okf/types/MicrosoftAD.md +11 -11
- package/dist/okf/types/MigrationProject.md +8 -1
- package/dist/okf/types/Monitor.md +26 -0
- package/dist/okf/types/NFSFileShare.md +44 -0
- package/dist/okf/types/NeptuneGraphGraph.md +1 -0
- package/dist/okf/types/NetworkConnector.md +4 -0
- package/dist/okf/types/NetworkFlowMonitorScope.md +23 -0
- package/dist/okf/types/NetworkMigrationDefinition.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerDeployment.md +31 -0
- package/dist/okf/types/NetworkSecurityManagerPolicy.md +32 -0
- package/dist/okf/types/NetworkSecurityManagerScope.md +29 -0
- package/dist/okf/types/NotebookInstance.md +18 -18
- package/dist/okf/types/NotebookInstanceLifecycleConfig.md +6 -5
- package/dist/okf/types/NotifyConfiguration.md +35 -0
- package/dist/okf/types/OTelEnrichment.md +2 -0
- package/dist/okf/types/OnlineEvaluationConfig.md +0 -1
- package/dist/okf/types/OrganizationConfigRule.md +7 -7
- package/dist/okf/types/Outpost.md +32 -0
- package/dist/okf/types/ParallelData.md +40 -0
- package/dist/okf/types/Partition.md +5 -5
- package/dist/okf/types/PaymentConnector.md +4 -1
- package/dist/okf/types/Pentest.md +1 -0
- package/dist/okf/types/PerfReports.md +28 -0
- package/dist/okf/types/PermissionAssociation.md +30 -0
- package/dist/okf/types/PersonalizeDataset.md +1 -0
- package/dist/okf/types/PersonalizeDatasetGroup.md +1 -0
- package/dist/okf/types/PersonalizeSchema.md +1 -0
- package/dist/okf/types/Pipeline.md +25 -0
- package/dist/okf/types/PlaybackConfiguration.md +1 -0
- package/dist/okf/types/PolicyAssociation.md +1 -1
- package/dist/okf/types/PolicyGrant.md +2 -2
- package/dist/okf/types/PolicyPrincipalAttachment.md +2 -7
- package/dist/okf/types/PortalProduct.md +24 -0
- package/dist/okf/types/PrefetchSchedule.md +25 -0
- package/dist/okf/types/PricingPlanManagerSubscription.md +31 -0
- package/dist/okf/types/PrincipalAssociation.md +27 -0
- package/dist/okf/types/PrivateDnsNamespace.md +8 -8
- package/dist/okf/types/PrivateVirtualInterface.md +1 -0
- package/dist/okf/types/ProcurementPortalPreference.md +45 -0
- package/dist/okf/types/Program.md +33 -0
- package/dist/okf/types/ProjectMembership.md +1 -1
- package/dist/okf/types/ProtocolsList.md +26 -0
- package/dist/okf/types/PublicDnsNamespace.md +7 -7
- package/dist/okf/types/PublicVirtualInterface.md +1 -0
- package/dist/okf/types/QEV2IdcApplication.md +25 -0
- package/dist/okf/types/QueryLoggingConfig.md +21 -0
- package/dist/okf/types/QuerySuggestionsBlockList.md +25 -0
- package/dist/okf/types/QuickSightAssignment.md +24 -0
- package/dist/okf/types/RAMResourceAssociation.md +27 -0
- package/dist/okf/types/RDSClusterSnapshot.md +54 -0
- package/dist/okf/types/RDSDBParameterGroup.md +5 -0
- package/dist/okf/types/RDSDeployment.md +41 -0
- package/dist/okf/types/RcsAgent.md +38 -0
- package/dist/okf/types/ReceiptRule.md +5 -5
- package/dist/okf/types/ReceiptRuleSet.md +1 -6
- package/dist/okf/types/RecommenderFilter.md +27 -0
- package/dist/okf/types/RecommenderSchema.md +25 -0
- package/dist/okf/types/RecordSet.md +16 -22
- package/dist/okf/types/RecoveryPlan.md +28 -0
- package/dist/okf/types/RedshiftIdcApplication.md +31 -0
- package/dist/okf/types/RedshiftSnapshot.md +59 -0
- package/dist/okf/types/RegistrationAttachment.md +28 -0
- package/dist/okf/types/Registry.md +41 -0
- package/dist/okf/types/RegistryRecord.md +38 -0
- package/dist/okf/types/RelatedItem.md +24 -0
- package/dist/okf/types/ReplicationConfigurationTemplate.md +35 -0
- package/dist/okf/types/ReplicationSubnetGroup.md +4 -9
- package/dist/okf/types/ReplicationTask.md +14 -14
- package/dist/okf/types/ReportGenerator.md +29 -0
- package/dist/okf/types/ReportGroup.md +1 -3
- package/dist/okf/types/ResilienceHubV2Policy.md +1 -0
- package/dist/okf/types/ResilienceHubV2Service.md +1 -0
- package/dist/okf/types/ResourceConfiguration.md +1 -1
- package/dist/okf/types/ResourceMetricsConfiguration.md +21 -0
- package/dist/okf/types/RestApi.md +1 -0
- package/dist/okf/types/RetrievalInstruction.md +32 -0
- package/dist/okf/types/RouterOutput.md +1 -0
- package/dist/okf/types/Rule.md +31 -0
- package/dist/okf/types/RunCache.md +29 -0
- package/dist/okf/types/Runtime.md +2 -1
- package/dist/okf/types/SCNInstance.md +33 -0
- package/dist/okf/types/SDBDomain.md +2 -2
- package/dist/okf/types/SMBFileShare.md +49 -0
- package/dist/okf/types/SageMakerArtifact.md +27 -0
- package/dist/okf/types/SageMakerEndpoint.md +0 -1
- package/dist/okf/types/ScalableTarget.md +1 -0
- package/dist/okf/types/ScalingPlan.md +6 -6
- package/dist/okf/types/ScheduledReport.md +31 -0
- package/dist/okf/types/SecondaryNetwork.md +26 -0
- package/dist/okf/types/SecurityAgentArtifact.md +25 -0
- package/dist/okf/types/SecurityAgentIntegration.md +31 -0
- package/dist/okf/types/Server.md +1 -0
- package/dist/okf/types/ServerlessCache.md +2 -0
- package/dist/okf/types/ServerlessCacheSnapshot.md +31 -0
- package/dist/okf/types/ServerlessRepoApplication.md +32 -0
- package/dist/okf/types/ServiceDiscoveryInstance.md +3 -7
- package/dist/okf/types/SipMediaApplication.md +27 -0
- package/dist/okf/types/SiteToSiteVpnAttachment.md +2 -0
- package/dist/okf/types/SnapshotCopyGrant.md +20 -0
- package/dist/okf/types/Solution.md +1 -0
- package/dist/okf/types/SourceAssociation.md +25 -0
- package/dist/okf/types/SourceCredential.md +6 -6
- package/dist/okf/types/SourceNetwork.md +23 -0
- package/dist/okf/types/StackFleetAssociation.md +2 -7
- package/dist/okf/types/StorageTierPolicy.md +20 -0
- package/dist/okf/types/StorageVirtualMachine.md +9 -9
- package/dist/okf/types/Stream.md +28 -0
- package/dist/okf/types/SubnetCidrReservation.md +26 -0
- package/dist/okf/types/SubscriptionProvider.md +26 -0
- package/dist/okf/types/SupportPermit.md +29 -0
- package/dist/okf/types/Table.md +2 -1
- package/dist/okf/types/TableOptimizer.md +5 -10
- package/dist/okf/types/Tape.md +31 -0
- package/dist/okf/types/Template.md +36 -0
- package/dist/okf/types/Tenant.md +2 -0
- package/dist/okf/types/Terminology.md +39 -0
- package/dist/okf/types/Thesaurus.md +25 -0
- package/dist/okf/types/ThingPrincipalAttachment.md +3 -8
- package/dist/okf/types/Topic.md +1 -0
- package/dist/okf/types/TopicRuleDestination.md +1 -0
- package/dist/okf/types/TrafficPolicy.md +26 -0
- package/dist/okf/types/TrafficPolicyInstance.md +28 -0
- package/dist/okf/types/TranscribeVocabulary.md +27 -0
- package/dist/okf/types/TransitGatewayRouteTableAttachment.md +2 -0
- package/dist/okf/types/TransitVirtualInterface.md +1 -0
- package/dist/okf/types/Tunnel.md +25 -0
- package/dist/okf/types/UsageLimit.md +26 -0
- package/dist/okf/types/UseCase.md +23 -0
- package/dist/okf/types/User.md +47 -0
- package/dist/okf/types/VPCEndpoint.md +1 -1
- package/dist/okf/types/VPCEndpointService.md +6 -0
- package/dist/okf/types/VPCPeeringConnection.md +2 -2
- package/dist/okf/types/VPNConcentrator.md +1 -1
- package/dist/okf/types/VPNConnection.md +1 -1
- package/dist/okf/types/VerifiedDestinationNumber.md +25 -0
- package/dist/okf/types/View.md +27 -0
- package/dist/okf/types/VoiceConnector.md +30 -0
- package/dist/okf/types/Volume.md +44 -0
- package/dist/okf/types/Vpc.md +1 -1
- package/dist/okf/types/VpcAttachment.md +2 -0
- package/dist/okf/types/WebFunction.md +27 -0
- package/dist/okf/types/WebFunctionEndpoint.md +44 -0
- package/dist/okf/types/WebFunctionRevision.md +32 -0
- package/dist/okf/types/WickrNetwork.md +27 -0
- package/dist/okf/types/Worker.md +29 -0
- package/dist/okf/types/Workforce.md +26 -0
- package/dist/okf/types/Workload.md +35 -0
- package/dist/okf/types/WorkloadEstimate.md +35 -0
- package/dist/okf/types/Workspace.md +28 -0
- package/dist/okf/types/Workteam.md +8 -8
- package/dist/op/activities/aws-apply.js +214 -0
- package/dist/op/activities/floci.js +97 -0
- package/dist/op/activities/index.js +32 -0
- package/dist/op/builders.js +50 -0
- package/dist/ownership.js +52 -0
- package/dist/package-cli.js +25 -0
- package/dist/parameter.js +19 -0
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +1006 -0
- package/dist/properties.js +166 -0
- package/dist/pseudo.js +25 -0
- package/dist/receipt-store.d.ts.map +1 -1
- package/dist/receipt-store.js +233 -0
- package/dist/reference-catalog.js +106 -0
- package/dist/rules/ext001.ts +3 -3
- package/dist/rules/waw016.ts +2 -2
- package/dist/serializer.js +529 -0
- package/dist/spec/fetch.js +193 -0
- package/dist/spec/parse.js +259 -0
- package/dist/spec/pin.js +185 -0
- package/dist/spec/pinned-types.json +203 -0
- package/dist/stack-errors.js +14 -0
- package/dist/taggable.d.ts.map +1 -1
- package/dist/taggable.js +33 -0
- package/dist/teardown.js +199 -0
- package/dist/template-sections.js +53 -0
- package/dist/template-transform.js +50 -0
- package/dist/types/index.d.ts +18847 -1124
- package/dist/validate-cli.js +16 -0
- package/dist/validate.js +33 -0
- package/package.json +9 -9
- package/src/agentcore/trace-fetch.ts +2 -1
- package/src/api/credential-chain.ts +119 -9
- package/src/api/credential-isolation.test.ts +72 -0
- package/src/api/read-client-chain.test.ts +159 -0
- package/src/api/read-client.ts +42 -6
- package/src/api/sigv4.ts +4 -4
- package/src/caller-identity.ts +3 -5
- package/src/codegen/any-budget.test.ts +12 -2
- package/src/codegen/generate.ts +9 -0
- package/src/codegen/package.ts +2 -2
- package/src/codegen/patches.test.ts +95 -0
- package/src/codegen/patches.ts +53 -9
- package/src/codegen/property-overlay.json +1 -16
- package/src/components/apply.ts +218 -6
- package/src/components/cfn-plan-floci.e2e.test.ts +76 -0
- package/src/components/cfn-plan.test.ts +225 -16
- package/src/components/cloud-executor.ts +73 -25
- package/src/deep-observe.ts +2 -1
- package/src/disruption.ts +2 -1
- package/src/generated/index.d.ts +18847 -1124
- package/src/generated/index.ts +1376 -161
- package/src/generated/lexicon-aws.json +17359 -784
- package/src/identity-observe.ts +2 -1
- package/src/lint/post-synth/ext001.ts +3 -3
- package/src/lint/post-synth/waw016.ts +2 -2
- package/src/lsp/completions.ts +2 -1
- package/src/lsp/hover.ts +2 -1
- package/src/plugin.ts +2 -1
- package/src/receipt-store.ts +2 -1
- package/src/spec/pin.ts +3 -3
- package/src/spec/pinned-types.json +203 -0
- package/src/taggable.ts +2 -2
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cfn-lint extension constraints — cross-property validation rules.
|
|
3
|
+
*
|
|
4
|
+
* Downloads extension schemas from the same cfn-lint tarball and parses
|
|
5
|
+
* them into typed constraint objects for inclusion in lexicon JSON.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync, readdirSync, statSync } from "fs";
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
import { homedir } from "os";
|
|
10
|
+
import { fetchAndExtractTar } from "@intentius/chant/codegen/fetch";
|
|
11
|
+
import { typeNameToPatchDir } from "./patches.js";
|
|
12
|
+
import { cfnLintTarballUrl } from "./versions.js";
|
|
13
|
+
const CFN_LINT_TARBALL_URL = cfnLintTarballUrl();
|
|
14
|
+
const EXTENSIONS_DEST_DIR = join(homedir(), ".chant", "cfn-lint-extensions");
|
|
15
|
+
const EXTENSIONS_TAR_PREFIX = "src/cfnlint/data/schemas/extensions/";
|
|
16
|
+
/**
|
|
17
|
+
* Fetch cfn-lint extensions from GitHub tarball and extract to cache.
|
|
18
|
+
*/
|
|
19
|
+
export async function fetchCfnLintExtensions(force = false) {
|
|
20
|
+
return fetchAndExtractTar({ url: CFN_LINT_TARBALL_URL, destDir: EXTENSIONS_DEST_DIR }, EXTENSIONS_TAR_PREFIX, force);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Load extension schemas for known resource types.
|
|
24
|
+
* Returns a map of CFN type name → extension constraints.
|
|
25
|
+
*/
|
|
26
|
+
export function loadExtensionSchemas(extensionsDir, knownTypes) {
|
|
27
|
+
// Build reverse map: directory name → CFN type name
|
|
28
|
+
const dirToType = new Map();
|
|
29
|
+
for (const typeName of knownTypes) {
|
|
30
|
+
dirToType.set(typeNameToPatchDir(typeName), typeName);
|
|
31
|
+
}
|
|
32
|
+
const result = new Map();
|
|
33
|
+
let entries;
|
|
34
|
+
try {
|
|
35
|
+
entries = readdirSync(extensionsDir);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
const fullPath = join(extensionsDir, entry);
|
|
42
|
+
try {
|
|
43
|
+
if (!statSync(fullPath).isDirectory())
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const cfnType = dirToType.get(entry);
|
|
50
|
+
if (!cfnType)
|
|
51
|
+
continue;
|
|
52
|
+
const constraints = loadDirectoryConstraints(fullPath);
|
|
53
|
+
if (constraints.length > 0) {
|
|
54
|
+
result.set(cfnType, constraints);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Load all constraints from JSON files in a directory.
|
|
61
|
+
*/
|
|
62
|
+
function loadDirectoryConstraints(dir) {
|
|
63
|
+
const constraints = [];
|
|
64
|
+
let entries;
|
|
65
|
+
try {
|
|
66
|
+
entries = readdirSync(dir);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return constraints;
|
|
70
|
+
}
|
|
71
|
+
for (const entry of entries) {
|
|
72
|
+
if (!entry.endsWith(".json"))
|
|
73
|
+
continue;
|
|
74
|
+
let data;
|
|
75
|
+
try {
|
|
76
|
+
data = readFileSync(join(dir, entry), "utf-8");
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
const parsed = parseExtensionSchema(entry, data);
|
|
83
|
+
constraints.push(...parsed);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
// Skip files that don't parse as constraints
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return constraints;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Parse a single extension JSON Schema file into constraint objects.
|
|
93
|
+
*/
|
|
94
|
+
function parseExtensionSchema(fileName, data) {
|
|
95
|
+
const raw = JSON.parse(data);
|
|
96
|
+
const name = fileName.replace(/\.json$/, "");
|
|
97
|
+
const constraints = [];
|
|
98
|
+
// Check for allOf containing multiple constraints
|
|
99
|
+
if ("allOf" in raw && Array.isArray(raw.allOf)) {
|
|
100
|
+
for (let i = 0; i < raw.allOf.length; i++) {
|
|
101
|
+
const item = raw.allOf[i];
|
|
102
|
+
try {
|
|
103
|
+
const c = classifySingleConstraint(`${name}_${i}`, item);
|
|
104
|
+
constraints.push(c);
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// Skip unrecognized items
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (constraints.length > 0)
|
|
111
|
+
return constraints;
|
|
112
|
+
}
|
|
113
|
+
// Single top-level constraint
|
|
114
|
+
const c = classifySingleConstraint(name, raw);
|
|
115
|
+
return [c];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Classify a single JSON Schema document into an ExtensionConstraint.
|
|
119
|
+
*/
|
|
120
|
+
function classifySingleConstraint(name, raw) {
|
|
121
|
+
const hasIf = "if" in raw;
|
|
122
|
+
const hasThen = "then" in raw;
|
|
123
|
+
const hasDependentExcluded = "dependentExcluded" in raw;
|
|
124
|
+
const hasRequiredOr = "requiredOr" in raw;
|
|
125
|
+
const hasRequiredXor = "requiredXor" in raw;
|
|
126
|
+
if (hasRequiredXor) {
|
|
127
|
+
return { name, type: "required_xor", requirement: raw.requiredXor };
|
|
128
|
+
}
|
|
129
|
+
if (hasRequiredOr) {
|
|
130
|
+
return { name, type: "required_or", requirement: raw.requiredOr };
|
|
131
|
+
}
|
|
132
|
+
if (hasDependentExcluded) {
|
|
133
|
+
return { name, type: "dependent_excluded", requirement: raw.dependentExcluded };
|
|
134
|
+
}
|
|
135
|
+
if (hasIf && hasThen) {
|
|
136
|
+
return { name, type: "if_then", condition: raw.if, requirement: raw.then };
|
|
137
|
+
}
|
|
138
|
+
throw new Error(`unrecognized constraint pattern in ${name}`);
|
|
139
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fallback resource definitions for priority types missing from the schema zip.
|
|
3
|
+
* Acts as a safety net — if the schema zip already contains the resource,
|
|
4
|
+
* the fallback is not used.
|
|
5
|
+
*/
|
|
6
|
+
export function fallbackResources() {
|
|
7
|
+
return [fallbackLogGroup()];
|
|
8
|
+
}
|
|
9
|
+
function fallbackLogGroup() {
|
|
10
|
+
return {
|
|
11
|
+
resource: {
|
|
12
|
+
typeName: "AWS::Logs::LogGroup",
|
|
13
|
+
properties: [
|
|
14
|
+
{ name: "LogGroupName", tsType: "string", required: false, constraints: {} },
|
|
15
|
+
{ name: "RetentionInDays", tsType: "number", required: false, constraints: {} },
|
|
16
|
+
{ name: "KmsKeyId", tsType: "string", required: false, constraints: {} },
|
|
17
|
+
{ name: "DataProtectionPolicy", tsType: "any", required: false, constraints: {} },
|
|
18
|
+
{ name: "Tags", tsType: "Tag[]", required: false, constraints: {} },
|
|
19
|
+
{ name: "LogGroupClass", tsType: "string", required: false, constraints: {} },
|
|
20
|
+
],
|
|
21
|
+
attributes: [{ name: "Arn", tsType: "string" }],
|
|
22
|
+
createOnly: [],
|
|
23
|
+
writeOnly: [],
|
|
24
|
+
primaryIdentifier: [],
|
|
25
|
+
deprecatedProperties: [],
|
|
26
|
+
inferredDeprecations: [],
|
|
27
|
+
conditionalCreateOnly: [],
|
|
28
|
+
},
|
|
29
|
+
propertyTypes: [],
|
|
30
|
+
enums: [],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
/**
|
|
3
|
+
* Thin entry point for `npm run generate` in lexicon-aws.
|
|
4
|
+
*/
|
|
5
|
+
import { generate, writeGeneratedFiles } from "./generate.js";
|
|
6
|
+
import { dirname } from "path";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
const result = await generate({ verbose: true });
|
|
9
|
+
// src/codegen/generate-cli.ts → dirname x3 → package root
|
|
10
|
+
const pkgDir = dirname(dirname(dirname(fileURLToPath(import.meta.url))));
|
|
11
|
+
writeGeneratedFiles(result, pkgDir);
|
|
12
|
+
console.error(`Generated ${result.resources} resources, ${result.properties} property types, ${result.enums} enums`);
|
|
13
|
+
if (result.warnings.length > 0) {
|
|
14
|
+
console.error(`${result.warnings.length} warnings`);
|
|
15
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexicon JSON generator — produces lexicon-aws.json with metadata for all resources.
|
|
3
|
+
*
|
|
4
|
+
* Output is a Record<string, LexiconEntry> keyed by generated class name.
|
|
5
|
+
*/
|
|
6
|
+
import { cfnShortName } from "../spec/parse.js";
|
|
7
|
+
import { buildRegistry, serializeRegistry, } from "@intentius/chant/codegen/generate-registry";
|
|
8
|
+
/**
|
|
9
|
+
* Generate the lexicon-aws.json content.
|
|
10
|
+
*/
|
|
11
|
+
export function generateLexiconJSON(results, naming, constraints, runtimeDeprecations) {
|
|
12
|
+
// Adapt SchemaParseResult[] to RegistryResource[]
|
|
13
|
+
const registryResources = results.map((r) => ({
|
|
14
|
+
typeName: r.resource.typeName,
|
|
15
|
+
attributes: r.resource.attributes,
|
|
16
|
+
properties: r.resource.properties,
|
|
17
|
+
propertyTypes: r.propertyTypes,
|
|
18
|
+
}));
|
|
19
|
+
const entries = buildRegistry(registryResources, naming, {
|
|
20
|
+
shortName: cfnShortName,
|
|
21
|
+
buildEntry: (resource, _tsName, attrs, propConstraints) => {
|
|
22
|
+
const cfnType = resource.typeName;
|
|
23
|
+
const r = results.find((res) => res.resource.typeName === cfnType);
|
|
24
|
+
// Runtime deprecation data for Lambda resources with Runtime property
|
|
25
|
+
let runtimeDepr;
|
|
26
|
+
if (runtimeDeprecations && r.resource.properties.some((p) => p.name === "Runtime")) {
|
|
27
|
+
runtimeDepr = runtimeDeprecations;
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
resourceType: cfnType,
|
|
31
|
+
kind: "resource",
|
|
32
|
+
lexicon: "aws",
|
|
33
|
+
...(attrs && { attrs }),
|
|
34
|
+
...(constraints.has(cfnType) && { constraints: constraints.get(cfnType) }),
|
|
35
|
+
...(propConstraints && { propertyConstraints: propConstraints }),
|
|
36
|
+
...(r.resource.createOnly.length > 0 && { createOnly: r.resource.createOnly }),
|
|
37
|
+
...(r.resource.writeOnly.length > 0 && { writeOnly: r.resource.writeOnly }),
|
|
38
|
+
...(r.resource.primaryIdentifier.length > 0 && { primaryIdentifier: r.resource.primaryIdentifier }),
|
|
39
|
+
...(r.resource.deprecatedProperties?.length && { deprecatedProperties: r.resource.deprecatedProperties }),
|
|
40
|
+
...(r.resource.inferredDeprecations?.length && { inferredDeprecations: r.resource.inferredDeprecations }),
|
|
41
|
+
...(r.resource.conditionalCreateOnly?.length && { conditionalCreateOnly: r.resource.conditionalCreateOnly }),
|
|
42
|
+
...(r.resource.replacementStrategy && { replacementStrategy: r.resource.replacementStrategy }),
|
|
43
|
+
...(r.resource.tagging && { tagging: r.resource.tagging }),
|
|
44
|
+
...(runtimeDepr && { runtimeDeprecations: runtimeDepr }),
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
buildPropertyEntry: (resourceType, propertyType) => ({
|
|
48
|
+
resourceType: `${resourceType}.${propertyType}`,
|
|
49
|
+
kind: "property",
|
|
50
|
+
lexicon: "aws",
|
|
51
|
+
}),
|
|
52
|
+
});
|
|
53
|
+
return serializeRegistry(entries);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Lambda runtime deprecation fallback data.
|
|
57
|
+
*/
|
|
58
|
+
export function lambdaRuntimeDeprecations() {
|
|
59
|
+
return {
|
|
60
|
+
"nodejs14.x": "deprecated",
|
|
61
|
+
"nodejs16.x": "deprecated",
|
|
62
|
+
"nodejs18.x": "approaching_eol",
|
|
63
|
+
"python3.7": "deprecated",
|
|
64
|
+
"python3.8": "deprecated",
|
|
65
|
+
"python3.9": "approaching_eol",
|
|
66
|
+
"dotnet6": "deprecated",
|
|
67
|
+
"java8": "deprecated",
|
|
68
|
+
"ruby2.7": "deprecated",
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration file generator — produces index.d.ts with all resource classes.
|
|
3
|
+
*
|
|
4
|
+
* Output includes:
|
|
5
|
+
* - Resource classes with typed constructors and readonly attributes
|
|
6
|
+
* - Property type classes
|
|
7
|
+
* - Enum union types
|
|
8
|
+
* - Static content (intrinsics, pseudo-parameters, common interfaces)
|
|
9
|
+
*/
|
|
10
|
+
import { cfnShortName } from "../spec/parse.js";
|
|
11
|
+
import { propertyTypeName, extractDefName } from "./naming.js";
|
|
12
|
+
import { writeResourceClass, writePropertyClass, writeEnumType, } from "@intentius/chant/codegen/generate-typescript";
|
|
13
|
+
/**
|
|
14
|
+
* Generate the complete .d.ts file content.
|
|
15
|
+
*/
|
|
16
|
+
export function generateTypeScriptDeclarations(results, naming) {
|
|
17
|
+
const lines = [];
|
|
18
|
+
lines.push("// Code generated by chant aws generate. DO NOT EDIT generated sections.");
|
|
19
|
+
const resources = [];
|
|
20
|
+
const properties = [];
|
|
21
|
+
const enums = [];
|
|
22
|
+
for (const r of results) {
|
|
23
|
+
const cfnType = r.resource.typeName;
|
|
24
|
+
const tsName = naming.resolve(cfnType);
|
|
25
|
+
if (!tsName)
|
|
26
|
+
continue;
|
|
27
|
+
// Build remap from parser property type names to resolved names
|
|
28
|
+
const shortName = cfnShortName(cfnType);
|
|
29
|
+
const remap = new Map();
|
|
30
|
+
for (const pt of r.propertyTypes) {
|
|
31
|
+
const defName = extractDefName(pt.name, shortName);
|
|
32
|
+
remap.set(pt.name, propertyTypeName(tsName, defName));
|
|
33
|
+
}
|
|
34
|
+
for (const e of r.enums) {
|
|
35
|
+
const defName = extractDefName(e.name, shortName);
|
|
36
|
+
remap.set(e.name, propertyTypeName(tsName, defName));
|
|
37
|
+
}
|
|
38
|
+
// Map ParsedProperty/ParsedAttribute → DtsProperty/DtsAttribute
|
|
39
|
+
const dtsProps = r.resource.properties.map((p) => ({
|
|
40
|
+
name: p.name,
|
|
41
|
+
type: isPolicyDocumentProperty(p.name, p.tsType) ? "PolicyDocument" : p.tsType,
|
|
42
|
+
required: p.required,
|
|
43
|
+
description: p.description,
|
|
44
|
+
}));
|
|
45
|
+
const dtsAttrs = r.resource.attributes.map((a) => ({
|
|
46
|
+
name: a.name.replace(/\./g, "_").replace(/\*/g, "Item"), // Subscribers.*.Status → Subscribers_Item_Status
|
|
47
|
+
type: a.tsType,
|
|
48
|
+
}));
|
|
49
|
+
resources.push({ tsName, properties: dtsProps, attributes: dtsAttrs, remap });
|
|
50
|
+
// Alias entries as separate resource entries
|
|
51
|
+
for (const alias of naming.aliases(cfnType)) {
|
|
52
|
+
resources.push({ tsName: alias, properties: dtsProps, attributes: dtsAttrs, remap });
|
|
53
|
+
}
|
|
54
|
+
const ptAliases = naming.propertyTypeAliases(cfnType);
|
|
55
|
+
for (const pt of r.propertyTypes) {
|
|
56
|
+
const defName = extractDefName(pt.name, shortName);
|
|
57
|
+
const ptName = propertyTypeName(tsName, defName);
|
|
58
|
+
const ptProps = pt.properties.map((p) => ({
|
|
59
|
+
name: p.name,
|
|
60
|
+
type: isPolicyDocumentProperty(p.name, p.tsType) ? "PolicyDocument" : p.tsType,
|
|
61
|
+
required: p.required,
|
|
62
|
+
description: p.description,
|
|
63
|
+
}));
|
|
64
|
+
properties.push({ tsName: ptName, properties: ptProps, remap });
|
|
65
|
+
// Alias class declaration for globally unique property types
|
|
66
|
+
if (ptAliases) {
|
|
67
|
+
const aliasName = ptAliases.get(defName);
|
|
68
|
+
if (aliasName) {
|
|
69
|
+
properties.push({ tsName: aliasName, properties: ptProps, remap });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (const e of r.enums) {
|
|
74
|
+
const defName = extractDefName(e.name, shortName);
|
|
75
|
+
const eName = propertyTypeName(tsName, defName);
|
|
76
|
+
enums.push({ tsName: eName, values: e.values });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Sort all entries alphabetically
|
|
80
|
+
resources.sort((a, b) => a.tsName.localeCompare(b.tsName));
|
|
81
|
+
properties.sort((a, b) => a.tsName.localeCompare(b.tsName));
|
|
82
|
+
enums.sort((a, b) => a.tsName.localeCompare(b.tsName));
|
|
83
|
+
// Section 1: Resource classes
|
|
84
|
+
lines.push("");
|
|
85
|
+
lines.push("// --- Resource classes ---");
|
|
86
|
+
for (const re of resources) {
|
|
87
|
+
writeResourceClass(lines, re.tsName, re.properties, re.attributes, re.remap, "CFResourceAttributes");
|
|
88
|
+
}
|
|
89
|
+
// Section 2: Property classes
|
|
90
|
+
lines.push("");
|
|
91
|
+
lines.push("// --- Property classes ---");
|
|
92
|
+
for (const pe of properties) {
|
|
93
|
+
writePropertyClass(lines, pe.tsName, pe.properties, pe.remap);
|
|
94
|
+
}
|
|
95
|
+
// Section 3: Enum types
|
|
96
|
+
if (enums.length > 0) {
|
|
97
|
+
lines.push("");
|
|
98
|
+
lines.push("// --- Enum types ---");
|
|
99
|
+
for (const ee of enums) {
|
|
100
|
+
writeEnumType(lines, ee.tsName, ee.values);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Section 4: Static content
|
|
104
|
+
lines.push("");
|
|
105
|
+
lines.push(staticTypeScript());
|
|
106
|
+
lines.push("");
|
|
107
|
+
return lines.join("\n");
|
|
108
|
+
}
|
|
109
|
+
// --- PolicyDocument type overrides ---
|
|
110
|
+
const policyDocumentPropertyNames = new Set([
|
|
111
|
+
"assumerolepolicydocument",
|
|
112
|
+
"policydocument",
|
|
113
|
+
"permissionspolicydocument",
|
|
114
|
+
"resourcepolicydocument",
|
|
115
|
+
]);
|
|
116
|
+
function isPolicyDocumentProperty(name, tsType) {
|
|
117
|
+
return tsType === "Record<string, any>" &&
|
|
118
|
+
policyDocumentPropertyNames.has(name.toLowerCase());
|
|
119
|
+
}
|
|
120
|
+
// --- Static content ---
|
|
121
|
+
function staticTypeScript() {
|
|
122
|
+
const lines = [];
|
|
123
|
+
// Intrinsic functions
|
|
124
|
+
lines.push("// --- Intrinsic functions ---");
|
|
125
|
+
lines.push("");
|
|
126
|
+
const intrinsics = [
|
|
127
|
+
["And", "(conditions: unknown[]): any"],
|
|
128
|
+
["Base64", "(value: unknown): any"],
|
|
129
|
+
["Cidr", "(ipBlock: unknown, count: unknown, cidrBits?: unknown): any"],
|
|
130
|
+
["And", "(...conditions: unknown[]): any"],
|
|
131
|
+
["Equals", "(a: unknown, b: unknown): any"],
|
|
132
|
+
["FindInMap", "(mapName: string, firstKey: unknown, secondKey: unknown): any"],
|
|
133
|
+
["GetAtt", "(logicalName: string, attribute: string): any"],
|
|
134
|
+
["GetAZs", "(region?: string): any"],
|
|
135
|
+
["If", "(condition: string | Declarable, valueIfTrue: unknown, valueIfFalse: unknown): any"],
|
|
136
|
+
["ImportValue", "(sharedValue: unknown): any"],
|
|
137
|
+
["Join", "(delimiter: string, values: unknown[]): any"],
|
|
138
|
+
["Not", "(condition: unknown): any"],
|
|
139
|
+
["Or", "(conditions: unknown[]): any"],
|
|
140
|
+
["Ref", "(logicalName: string): any"],
|
|
141
|
+
["Select", "(index: number, values: unknown[]): any"],
|
|
142
|
+
["Split", "(delimiter: string, source: unknown): any"],
|
|
143
|
+
["Sub", "(parts: TemplateStringsArray, ...values: unknown[]): any"],
|
|
144
|
+
["Transform", "(name: string, parameters: Record<string, unknown>): any"],
|
|
145
|
+
];
|
|
146
|
+
intrinsics.sort((a, b) => a[0].localeCompare(b[0]));
|
|
147
|
+
for (const [name, sig] of intrinsics) {
|
|
148
|
+
lines.push(`export declare function ${name}${sig};`);
|
|
149
|
+
}
|
|
150
|
+
// Pseudo-parameters
|
|
151
|
+
lines.push("");
|
|
152
|
+
lines.push("// --- Pseudo-parameters ---");
|
|
153
|
+
lines.push("");
|
|
154
|
+
lines.push("export declare const AWS: {");
|
|
155
|
+
const pseudoParams = [
|
|
156
|
+
"AccountId",
|
|
157
|
+
"NotificationARNs",
|
|
158
|
+
"NoValue",
|
|
159
|
+
"Partition",
|
|
160
|
+
"Region",
|
|
161
|
+
"StackId",
|
|
162
|
+
"StackName",
|
|
163
|
+
"URLSuffix",
|
|
164
|
+
];
|
|
165
|
+
for (const p of pseudoParams) {
|
|
166
|
+
lines.push(` readonly ${p}: any;`);
|
|
167
|
+
}
|
|
168
|
+
lines.push("};");
|
|
169
|
+
// Type interfaces
|
|
170
|
+
lines.push("");
|
|
171
|
+
lines.push("// --- Type interfaces ---");
|
|
172
|
+
lines.push("");
|
|
173
|
+
lines.push("export interface Declarable {");
|
|
174
|
+
lines.push(" readonly entityType: string;");
|
|
175
|
+
lines.push("}");
|
|
176
|
+
lines.push("");
|
|
177
|
+
lines.push("export interface CFResourceAttributes {");
|
|
178
|
+
lines.push(" DependsOn?: Declarable | Declarable[] | string | string[];");
|
|
179
|
+
lines.push(" Condition?: string | Declarable;");
|
|
180
|
+
lines.push(' DeletionPolicy?: "Delete" | "Retain" | "RetainExceptOnCreate" | "Snapshot";');
|
|
181
|
+
lines.push(' UpdateReplacePolicy?: "Delete" | "Retain" | "Snapshot";');
|
|
182
|
+
lines.push(" UpdatePolicy?: {");
|
|
183
|
+
lines.push(" AutoScalingReplacingUpdate?: { WillReplace?: boolean };");
|
|
184
|
+
lines.push(" AutoScalingRollingUpdate?: {");
|
|
185
|
+
lines.push(" MaxBatchSize?: number;");
|
|
186
|
+
lines.push(" MinInstancesInService?: number;");
|
|
187
|
+
lines.push(" PauseTime?: string;");
|
|
188
|
+
lines.push(" WaitOnResourceSignals?: boolean;");
|
|
189
|
+
lines.push(" };");
|
|
190
|
+
lines.push(" };");
|
|
191
|
+
lines.push(" CreationPolicy?: {");
|
|
192
|
+
lines.push(" ResourceSignal?: { Count?: number; Timeout?: string };");
|
|
193
|
+
lines.push(" };");
|
|
194
|
+
lines.push(" Metadata?: Record<string, unknown>;");
|
|
195
|
+
lines.push("}");
|
|
196
|
+
lines.push("");
|
|
197
|
+
lines.push("export interface PolicyDocument {");
|
|
198
|
+
lines.push(' Version?: "2012-10-17" | "2008-10-17";');
|
|
199
|
+
lines.push(" Id?: string;");
|
|
200
|
+
lines.push(" Statement: IamPolicyStatement | IamPolicyStatement[];");
|
|
201
|
+
lines.push("}");
|
|
202
|
+
lines.push("");
|
|
203
|
+
lines.push("export interface IamPolicyStatement {");
|
|
204
|
+
lines.push(" Sid?: string;");
|
|
205
|
+
lines.push(' Effect: "Allow" | "Deny";');
|
|
206
|
+
lines.push(" Principal?: IamPolicyPrincipal;");
|
|
207
|
+
lines.push(" NotPrincipal?: IamPolicyPrincipal;");
|
|
208
|
+
lines.push(" Action?: string | string[];");
|
|
209
|
+
lines.push(" NotAction?: string | string[];");
|
|
210
|
+
lines.push(" Resource?: string | string[];");
|
|
211
|
+
lines.push(" NotResource?: string | string[];");
|
|
212
|
+
lines.push(" Condition?: Record<string, Record<string, string | string[]>>;");
|
|
213
|
+
lines.push("}");
|
|
214
|
+
lines.push("");
|
|
215
|
+
lines.push('export type IamPolicyPrincipal = "*" | {');
|
|
216
|
+
lines.push(" AWS?: string | string[];");
|
|
217
|
+
lines.push(" Service?: string | string[];");
|
|
218
|
+
lines.push(" Federated?: string | string[];");
|
|
219
|
+
lines.push("};");
|
|
220
|
+
lines.push("");
|
|
221
|
+
lines.push("export interface Tag {");
|
|
222
|
+
lines.push(" key: string;");
|
|
223
|
+
lines.push(" value: string;");
|
|
224
|
+
lines.push("}");
|
|
225
|
+
return lines.join("\n");
|
|
226
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,mCAAmC,CAAC;AAmC3C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAGpB,MAAM,mCAAmC,CAAC;AAmC3C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AAmJhD;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAkBlF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBjF"}
|