@cdklabs/cdk-ssm-documents 0.0.58 → 0.0.60
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/.jsii +12 -12
- package/lib/construct/synth-utils.js +1 -1
- package/lib/document/automation-document.js +1 -1
- package/lib/document/command-document.js +1 -1
- package/lib/document/document-builder.js +2 -2
- package/lib/document/ssm-document.js +1 -1
- package/lib/domain/aws-service.js +1 -1
- package/lib/domain/choice.js +1 -1
- package/lib/domain/data-type.js +1 -1
- package/lib/domain/enum/install-action.js +2 -2
- package/lib/domain/enum/install-uninstall-repair.js +2 -2
- package/lib/domain/enum/installation-type.js +2 -2
- package/lib/domain/enum/package-name.js +2 -2
- package/lib/domain/input.js +1 -1
- package/lib/domain/operation.js +1 -1
- package/lib/domain/platform.js +1 -1
- package/lib/domain/precondition.js +1 -1
- package/lib/incident-response/incident-response.js +3 -3
- package/lib/interface/approve-hook.js +2 -2
- package/lib/interface/auth-method.js +3 -3
- package/lib/interface/aws-invoker.js +2 -2
- package/lib/interface/downloadable-content.js +8 -8
- package/lib/interface/environment.js +3 -3
- package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
- package/lib/interface/observer.js +1 -1
- package/lib/interface/on-failure.js +6 -6
- package/lib/interface/pause-hook.js +2 -2
- package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
- package/lib/interface/run-document-location.js +2 -2
- package/lib/interface/sleep-hook.js +2 -2
- package/lib/interface/step-ref.js +1 -1
- package/lib/interface/variables/boolean-variable.js +2 -2
- package/lib/interface/variables/map-list-variable.js +2 -2
- package/lib/interface/variables/number-variable.js +2 -2
- package/lib/interface/variables/secure-string-variable.js +4 -4
- package/lib/interface/variables/string-list-variable.js +2 -2
- package/lib/interface/variables/string-map-variable.js +2 -2
- package/lib/interface/variables/string-variable.js +4 -4
- package/lib/interface/variables/variable.js +2 -2
- package/lib/interface/webhook.js +1 -1
- package/lib/parent-steps/automation/approve-step.js +1 -1
- package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
- package/lib/parent-steps/automation/aws-api-step.js +1 -1
- package/lib/parent-steps/automation/branch-step.js +1 -1
- package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
- package/lib/parent-steps/automation/copy-image-step.js +1 -1
- package/lib/parent-steps/automation/create-image-step.js +1 -1
- package/lib/parent-steps/automation/create-stack-step.js +3 -3
- package/lib/parent-steps/automation/create-tags-step.js +3 -3
- package/lib/parent-steps/automation/delete-image-step.js +1 -1
- package/lib/parent-steps/automation/delete-stack-step.js +1 -1
- package/lib/parent-steps/automation/execute-automation-step.js +1 -1
- package/lib/parent-steps/automation/execute-script-step.js +5 -5
- package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
- package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
- package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
- package/lib/parent-steps/automation/pause-step.js +1 -1
- package/lib/parent-steps/automation/run-command-step.js +3 -3
- package/lib/parent-steps/automation/run-instance-step.js +1 -1
- package/lib/parent-steps/automation/sleep-step.js +1 -1
- package/lib/parent-steps/automation/update-variable.js +1 -1
- package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
- package/lib/parent-steps/automation-step.js +1 -1
- package/lib/parent-steps/command/applications-step.js +1 -1
- package/lib/parent-steps/command/configure-docker-step.js +1 -1
- package/lib/parent-steps/command/configure-package-step.js +1 -1
- package/lib/parent-steps/command/domain-join-step.js +1 -1
- package/lib/parent-steps/command/download-content-step.js +1 -1
- package/lib/parent-steps/command/ps-module-step.js +1 -1
- package/lib/parent-steps/command/run-docker-action-step.js +1 -1
- package/lib/parent-steps/command/run-document-step.js +1 -1
- package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
- package/lib/parent-steps/command/run-shell-script-step.js +1 -1
- package/lib/parent-steps/command/software-inventory-step.js +1 -1
- package/lib/parent-steps/command/update-agent-step.js +1 -1
- package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
- package/lib/parent-steps/command-step.js +1 -1
- package/lib/parent-steps/step.js +1 -1
- package/lib/patterns/automation/composite-step.js +2 -2
- package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
- package/lib/patterns/automation/string-step.js +1 -1
- package/lib/patterns/document/string-document.js +1 -1
- package/lib/patterns/document/timed-document.js +1 -1
- package/lib/samples/hello-world.js +1 -1
- package/lib/simulation/automation/approve-simulation.js +1 -1
- package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
- package/lib/simulation/automation/automation-simulation-base.js +1 -1
- package/lib/simulation/automation/aws-api-simulation.js +1 -1
- package/lib/simulation/automation/branch-simulation.js +1 -1
- package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
- package/lib/simulation/automation/copy-image-simulation.js +1 -1
- package/lib/simulation/automation/create-image-simulation.js +1 -1
- package/lib/simulation/automation/create-stack-simulation.js +1 -1
- package/lib/simulation/automation/create-tags-simulation.js +1 -1
- package/lib/simulation/automation/delete-image-simulation.js +1 -1
- package/lib/simulation/automation/delete-stack-simulation.js +1 -1
- package/lib/simulation/automation/execute-script-simulation.js +1 -1
- package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
- package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
- package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
- package/lib/simulation/automation/pause-simulation.js +1 -1
- package/lib/simulation/automation/run-command-simulation.js +1 -1
- package/lib/simulation/automation/run-instance-simulation.js +1 -1
- package/lib/simulation/automation/sleep-simulation.js +1 -1
- package/lib/simulation/automation/update-variable-simulation.js +1 -1
- package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
- package/lib/simulation/automation-step-simulation.js +1 -1
- package/lib/simulation/command/command-simulation-base.js +1 -1
- package/lib/simulation/command/ps-module-simulation.js +1 -1
- package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
- package/lib/simulation/command/run-shell-script-simulation.js +1 -1
- package/lib/simulation/command-step-simulation.js +1 -1
- package/lib/simulation/document/automation-simulation.js +1 -1
- package/lib/simulation/document/command-simulation.js +1 -1
- package/lib/simulation/simulation.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +9 -9
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForChangeSetCreateComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackCreateComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackDeleteComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackExists.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackImportComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackRefactorCreateComplete.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackRefactorExecuteComplete.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackRollbackComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/waiters/waitForStackUpdateComplete.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +11 -10
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +13 -10
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForChangeSetCreateComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackCreateComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackDeleteComplete.d.ts +11 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackImportComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackRefactorCreateComplete.d.ts +11 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackRefactorExecuteComplete.d.ts +11 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackRollbackComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForStackUpdateComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/waiters/waitForTypeRegistrationComplete.d.ts +11 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForChangeSetCreateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackCreateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackDeleteComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackImportComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackRefactorCreateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackRefactorExecuteComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackRollbackComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForStackUpdateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/waiters/waitForTypeRegistrationComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/waiters/waitForAlarmExists.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/waiters/waitForAlarmMuteRuleExists.js +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/waiters/waitForCompositeAlarmExists.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/CloudWatch.d.ts +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/DeleteDashboardsCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/GetOTelEnrichmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/PutDashboardCommand.d.ts +6 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/StartOTelEnrichmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/StopOTelEnrichmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/TagResourceCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/UntagResourceCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/models_0.d.ts +37 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/CloudWatch.d.ts +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/models/models_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/waiters/waitForAlarmExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/waiters/waitForAlarmMuteRuleExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/waiters/waitForCompositeAlarmExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/waiters/waitForAlarmExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/waiters/waitForAlarmMuteRuleExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/waiters/waitForCompositeAlarmExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +8 -8
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +17 -17
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +12 -8
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +12 -8
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForImageAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForImageExists.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInstanceExists.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInstanceRunning.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInstanceStatusOk.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInstanceStopped.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInstanceTerminated.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForInternetGatewayExists.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForKeyPairExists.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForNatGatewayAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForNatGatewayDeleted.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForNetworkInterfaceAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForPasswordDataAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSecondaryNetworkCreateComplete.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSecondarySubnetCreateComplete.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSecurityGroupExists.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSnapshotCompleted.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSpotInstanceRequestFulfilled.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForSubnetAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVolumeAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVolumeDeleted.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVolumeInUse.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVpcAvailable.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVpcExists.js +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVpcPeeringConnectionDeleted.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-es/waiters/waitForVpcPeeringConnectionExists.js +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +44 -44
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceTypesCommand.d.ts +5 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyManagedResourceVisibilityCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyVpnConnectionOptionsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +6 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +50 -44
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyManagedResourceVisibilityCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForBundleTaskComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForConversionTaskCancelled.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForConversionTaskCompleted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForConversionTaskDeleted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForCustomerGatewayAvailable.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForExportTaskCancelled.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForExportTaskCompleted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForImageAvailable.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForImageExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForImageUsageReportAvailable.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInstanceExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInstanceRunning.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInstanceStatusOk.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInstanceStopped.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInstanceTerminated.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForInternetGatewayExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForKeyPairExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForNatGatewayAvailable.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForNatGatewayDeleted.d.ts +11 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForNetworkInterfaceAvailable.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForPasswordDataAvailable.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecondaryNetworkCreateComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecondaryNetworkDeleteComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecondarySubnetCreateComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecondarySubnetDeleteComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecurityGroupExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecurityGroupVpcAssociationAssociated.d.ts +11 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSecurityGroupVpcAssociationDisassociated.d.ts +11 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSnapshotCompleted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSnapshotImported.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSpotInstanceRequestFulfilled.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForStoreImageTaskComplete.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSubnetAvailable.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForSystemStatusOk.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVolumeAvailable.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVolumeDeleted.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVolumeInUse.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpcAvailable.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpcExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpcPeeringConnectionDeleted.d.ts +11 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpcPeeringConnectionExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpnConnectionAvailable.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/waiters/waitForVpnConnectionDeleted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForBundleTaskComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForConversionTaskCancelled.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForConversionTaskCompleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForConversionTaskDeleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForCustomerGatewayAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForExportTaskCancelled.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForExportTaskCompleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForImageAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForImageExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForImageUsageReportAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInstanceExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInstanceRunning.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInstanceStatusOk.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInstanceStopped.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInstanceTerminated.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForInternetGatewayExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForKeyPairExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForNatGatewayAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForNatGatewayDeleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForNetworkInterfaceAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForPasswordDataAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecondaryNetworkCreateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecondaryNetworkDeleteComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecondarySubnetCreateComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecondarySubnetDeleteComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecurityGroupExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecurityGroupVpcAssociationAssociated.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSecurityGroupVpcAssociationDisassociated.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSnapshotCompleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSnapshotImported.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSpotInstanceRequestFulfilled.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForStoreImageTaskComplete.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSubnetAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForSystemStatusOk.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVolumeAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVolumeDeleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVolumeInUse.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpcAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpcExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpcPeeringConnectionDeleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpcPeeringConnectionExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpnConnectionAvailable.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/waiters/waitForVpnConnectionDeleted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ec2/package.json +8 -8
- package/node_modules/@aws-sdk/client-iam/README.md +51 -0
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +4 -4
- package/node_modules/@aws-sdk/client-iam/dist-es/waiters/waitForInstanceProfileExists.js +2 -2
- package/node_modules/@aws-sdk/client-iam/dist-es/waiters/waitForPolicyExists.js +2 -2
- package/node_modules/@aws-sdk/client-iam/dist-es/waiters/waitForRoleExists.js +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-es/waiters/waitForUserExists.js +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/IAM.d.ts +55 -4
- package/node_modules/@aws-sdk/client-iam/dist-types/IAMClient.d.ts +51 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/index.d.ts +51 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/models/models_0.d.ts +5 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/IAM.d.ts +4 -4
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/waiters/waitForInstanceProfileExists.d.ts +9 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/waiters/waitForPolicyExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/waiters/waitForRoleExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/waiters/waitForUserExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/waiters/waitForInstanceProfileExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/waiters/waitForPolicyExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/waiters/waitForRoleExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/waiters/waitForUserExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-iam/package.json +8 -8
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-es/waiters/waitForFunctionActiveV2.js +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-es/waiters/waitForFunctionExists.js +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-es/waiters/waitForFunctionUpdatedV2.js +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +6 -6
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/Lambda.d.ts +6 -6
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForFunctionActive.d.ts +9 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForFunctionActiveV2.d.ts +7 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForFunctionExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForFunctionUpdated.d.ts +9 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForFunctionUpdatedV2.d.ts +7 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/waiters/waitForPublishedVersionActive.d.ts +9 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForFunctionActive.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForFunctionActiveV2.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForFunctionExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForFunctionUpdated.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForFunctionUpdatedV2.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/waiters/waitForPublishedVersionActive.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/package.json +8 -8
- package/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/bdd.js +622 -618
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-es/endpoint/bdd.js +622 -618
- package/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +2 -2
- package/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +5 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +5 -4
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketNotExists.d.ts +8 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectExists.d.ts +7 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectNotExists.d.ts +8 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketNotExists.d.ts +5 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectExists.d.ts +4 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectNotExists.d.ts +5 -3
- package/node_modules/@aws-sdk/client-s3/package.json +12 -12
- package/node_modules/@aws-sdk/client-sns/package.json +7 -7
- package/node_modules/@aws-sdk/client-sqs/package.json +7 -7
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-es/waiters/waitForCommandExecuted.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/SSM.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/SSM.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ssm/dist-types/ts3.4/waiters/waitForCommandExecuted.d.ts +9 -3
- package/node_modules/@aws-sdk/client-ssm/dist-types/waiters/waitForCommandExecuted.d.ts +4 -3
- package/node_modules/@aws-sdk/client-ssm/package.json +8 -8
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +15 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +15 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js +15 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/emitWarningIfUnsupportedVersion.d.ts +1 -2
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +7 -7
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +336 -0
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +26 -0
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +332 -0
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +26 -0
- package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-external/nodable_entities.d.ts +66 -0
- package/node_modules/@aws-sdk/xml-builder/dist-types/xml-external/nodable_entities.d.ts +65 -0
- package/node_modules/@aws-sdk/xml-builder/package.json +3 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +7 -3
- package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +5 -2
- package/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +2 -1
- package/node_modules/@smithy/util-retry/package.json +2 -2
- package/node_modules/fast-xml-builder/CHANGELOG.md +24 -0
- package/node_modules/fast-xml-builder/README.md +53 -2
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
- package/node_modules/fast-xml-builder/package.json +3 -2
- package/node_modules/fast-xml-builder/src/fxb.d.ts +93 -3
- package/node_modules/fast-xml-builder/src/fxb.js +106 -40
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +95 -42
- package/node_modules/fast-xml-builder/src/util.js +16 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +8 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/fast-xml-parser/package.json +1 -1
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +16 -11
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +2 -2
- package/node_modules/strnum/CHANGELOG.md +3 -0
- package/node_modules/strnum/package.json +3 -2
- package/node_modules/strnum/strnum.js +12 -10
- package/node_modules/xml-naming/README.md +189 -0
- package/node_modules/xml-naming/package.json +54 -0
- package/node_modules/xml-naming/src/index.d.ts +74 -0
- package/node_modules/xml-naming/src/index.js +270 -0
- package/package.json +10 -10
|
@@ -1,8 +1,50 @@
|
|
|
1
|
-
// import { Expression } from 'path-expression-matcher';
|
|
1
|
+
// import { Expression, Matcher } from 'path-expression-matcher';
|
|
2
2
|
|
|
3
|
-
type Matcher = unknown;
|
|
3
|
+
//type Matcher = unknown;
|
|
4
4
|
type Expression = unknown;
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* A lightweight, live read-only view of a Matcher instance.
|
|
8
|
+
*
|
|
9
|
+
* Returned by `Matcher.readOnly()`. The same instance is reused across every
|
|
10
|
+
* callback invocation — no allocation overhead per call. Reads directly from
|
|
11
|
+
* the parent Matcher's internal state so it always reflects the current parser
|
|
12
|
+
* position with no copying or freezing.
|
|
13
|
+
*/
|
|
14
|
+
export class MatcherView {
|
|
15
|
+
readonly separator: string;
|
|
16
|
+
|
|
17
|
+
/** Check if current path matches an Expression. */
|
|
18
|
+
matches(expression: Expression): boolean;
|
|
19
|
+
|
|
20
|
+
/** Get current tag name, or `undefined` if path is empty. */
|
|
21
|
+
getCurrentTag(): string | undefined;
|
|
22
|
+
|
|
23
|
+
/** Get current namespace, or `undefined` if not present. */
|
|
24
|
+
getCurrentNamespace(): string | undefined;
|
|
25
|
+
|
|
26
|
+
/** Get attribute value of the current node. */
|
|
27
|
+
getAttrValue(attrName: string): any;
|
|
28
|
+
|
|
29
|
+
/** Check if the current node has a given attribute. */
|
|
30
|
+
hasAttr(attrName: string): boolean;
|
|
31
|
+
|
|
32
|
+
/** Sibling position of the current node (child index in parent). */
|
|
33
|
+
getPosition(): number;
|
|
34
|
+
|
|
35
|
+
/** Occurrence counter of the current tag name at this level. */
|
|
36
|
+
getCounter(): number;
|
|
37
|
+
|
|
38
|
+
/** Number of nodes in the current path. */
|
|
39
|
+
getDepth(): number;
|
|
40
|
+
|
|
41
|
+
/** Current path as a string (e.g. `"root.users.user"`). */
|
|
42
|
+
toString(separator?: string, includeNamespace?: boolean): string;
|
|
43
|
+
|
|
44
|
+
/** Current path as an array of tag names. */
|
|
45
|
+
toArray(): string[];
|
|
46
|
+
}
|
|
47
|
+
|
|
6
48
|
export type XmlBuilderOptions = {
|
|
7
49
|
/**
|
|
8
50
|
* Give a prefix to the attribute name in the resulting JS object
|
|
@@ -164,6 +206,53 @@ export type XmlBuilderOptions = {
|
|
|
164
206
|
* Defaults to `100`
|
|
165
207
|
*/
|
|
166
208
|
maxNestedTags?: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Validate or sanitize tag and attribute names before they are written to XML output.
|
|
212
|
+
*
|
|
213
|
+
* The context object provides:
|
|
214
|
+
* - `isAttribute` — `true` when the name being resolved is an attribute name,
|
|
215
|
+
* `false` when it is a tag name.
|
|
216
|
+
* - `matcher` — the current path matcher (readonly). Can be used to inspect the
|
|
217
|
+
* current element path, e.g. via `.toString()` or `.getDepth()`.
|
|
218
|
+
*
|
|
219
|
+
* Return the (possibly transformed) name to use in the output.
|
|
220
|
+
* Throw an error inside the function to reject an invalid name entirely.
|
|
221
|
+
*
|
|
222
|
+
* When set to `false` (default) all names are written as-is, preserving
|
|
223
|
+
* backward-compatible behaviour.
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* // Auto-fix invalid names using xml-naming
|
|
227
|
+
* import { sanitize } from 'xml-naming';
|
|
228
|
+
* { sanitizeName: (name) => sanitize(name, 'qName') }
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* // Reject invalid names
|
|
232
|
+
* import { qName } from 'xml-naming';
|
|
233
|
+
* { sanitizeName: (name) => { if (!qName(name)) throw new Error(`Invalid XML name: "${name}"`); return name; } }
|
|
234
|
+
*
|
|
235
|
+
* Defaults to `false`
|
|
236
|
+
*/
|
|
237
|
+
sanitizeName?: false | ((name: string, context: SanitizeNameContext) => string);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Context object passed as the second argument to {@link XmlBuilderOptions.sanitizeName}.
|
|
242
|
+
*/
|
|
243
|
+
export type SanitizeNameContext = {
|
|
244
|
+
/**
|
|
245
|
+
* `true` when the name being resolved is an XML attribute name;
|
|
246
|
+
* `false` when it is an XML element (tag) name.
|
|
247
|
+
*/
|
|
248
|
+
isAttribute: boolean;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The current path matcher at the point where the name is being resolved.
|
|
252
|
+
* Readonly from the callback's perspective — do not call mutating methods.
|
|
253
|
+
* Use `.toString()` to get the current jPath string, `.getDepth()` for nesting depth.
|
|
254
|
+
*/
|
|
255
|
+
matcher: MatcherView;
|
|
167
256
|
};
|
|
168
257
|
|
|
169
258
|
export interface XMLBuilder {
|
|
@@ -177,4 +266,5 @@ export interface XMLBuilderConstructor {
|
|
|
177
266
|
|
|
178
267
|
declare const Builder: XMLBuilderConstructor;
|
|
179
268
|
|
|
180
|
-
export
|
|
269
|
+
export { Builder };
|
|
270
|
+
export default Builder;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import buildFromOrderedJs from './orderedJs2Xml.js';
|
|
4
4
|
import getIgnoreAttributesFn from "./ignoreAttributes.js";
|
|
5
5
|
import { Expression, Matcher } from 'path-expression-matcher';
|
|
6
|
+
import { safeComment, safeCdata, escapeAttribute } from './util.js';
|
|
7
|
+
import { qName } from 'xml-naming';
|
|
6
8
|
|
|
7
9
|
const defaultOptions = {
|
|
8
10
|
attributeNamePrefix: '@_',
|
|
@@ -37,7 +39,11 @@ const defaultOptions = {
|
|
|
37
39
|
// transformAttributeName: false,
|
|
38
40
|
oneListGroup: false,
|
|
39
41
|
maxNestedTags: 100,
|
|
40
|
-
jPath: true // When true, callbacks receive string jPath; when false, receive Matcher instance
|
|
42
|
+
jPath: true, // When true, callbacks receive string jPath; when false, receive Matcher instance
|
|
43
|
+
sanitizeName: false // false = allow all names as-is (default, backward-compatible).
|
|
44
|
+
// Set to a function (name, { isAttribute, matcher }) => string to
|
|
45
|
+
// validate/sanitize tag and attribute names. Throw inside the function
|
|
46
|
+
// to reject an invalid name.
|
|
41
47
|
};
|
|
42
48
|
|
|
43
49
|
export default function Builder(options) {
|
|
@@ -94,6 +100,44 @@ export default function Builder(options) {
|
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Detect XML version from the ?xml declaration at the root of a plain-object input.
|
|
105
|
+
* Checks both attributesGroupName and flat attribute forms.
|
|
106
|
+
* Returns '1.0' if no declaration is found.
|
|
107
|
+
*/
|
|
108
|
+
function detectXmlVersionFromObj(jObj, options) {
|
|
109
|
+
const decl = jObj['?xml'];
|
|
110
|
+
if (decl && typeof decl === 'object') {
|
|
111
|
+
// attributesGroupName path e.g. { '$$': { '@_version': '1.1' } }
|
|
112
|
+
if (options.attributesGroupName && decl[options.attributesGroupName]) {
|
|
113
|
+
const v = decl[options.attributesGroupName][options.attributeNamePrefix + 'version'];
|
|
114
|
+
if (v) return v;
|
|
115
|
+
}
|
|
116
|
+
// flat attribute path e.g. { '@_version': '1.1' }
|
|
117
|
+
const v = decl[options.attributeNamePrefix + 'version'];
|
|
118
|
+
if (v) return v;
|
|
119
|
+
}
|
|
120
|
+
return '1.0';
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Resolve a tag or attribute name through sanitizeName if configured.
|
|
125
|
+
* Validation via xml-naming's qName is performed first; the sanitizeName
|
|
126
|
+
* callback is invoked only when the name is invalid. If sanitizeName is
|
|
127
|
+
* false (default), no validation occurs and the name is used as-is.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} name - raw name from the JS object
|
|
130
|
+
* @param {boolean} isAttribute - true when resolving an attribute name
|
|
131
|
+
* @param {object} options
|
|
132
|
+
* @param {Matcher} matcher - current matcher state (readonly from callback perspective)
|
|
133
|
+
* @param {string} xmlVersion - '1.0' or '1.1', forwarded to xml-naming
|
|
134
|
+
*/
|
|
135
|
+
function resolveTagName(name, isAttribute, options, matcher, xmlVersion) {
|
|
136
|
+
if (!options.sanitizeName) return name;
|
|
137
|
+
if (qName(name, { xmlVersion })) return name;
|
|
138
|
+
return options.sanitizeName(name, { isAttribute, matcher: matcher.readOnly() });
|
|
139
|
+
}
|
|
140
|
+
|
|
97
141
|
Builder.prototype.build = function (jObj) {
|
|
98
142
|
if (this.options.preserveOrder) {
|
|
99
143
|
return buildFromOrderedJs(jObj, this.options);
|
|
@@ -105,11 +149,12 @@ Builder.prototype.build = function (jObj) {
|
|
|
105
149
|
}
|
|
106
150
|
// Initialize matcher for path tracking
|
|
107
151
|
const matcher = new Matcher();
|
|
108
|
-
|
|
152
|
+
const xmlVersion = detectXmlVersionFromObj(jObj, this.options);
|
|
153
|
+
return this.j2x(jObj, 0, matcher, xmlVersion).val;
|
|
109
154
|
}
|
|
110
155
|
};
|
|
111
156
|
|
|
112
|
-
Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
157
|
+
Builder.prototype.j2x = function (jObj, level, matcher, xmlVersion) {
|
|
113
158
|
let attrStr = '';
|
|
114
159
|
let val = '';
|
|
115
160
|
if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) {
|
|
@@ -123,6 +168,22 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
123
168
|
|
|
124
169
|
for (let key in jObj) {
|
|
125
170
|
if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;
|
|
171
|
+
|
|
172
|
+
// Resolve the key through sanitizeName before any use.
|
|
173
|
+
// Special keys (textNodeName, cdataPropName, commentPropName, attributeNamePrefix,
|
|
174
|
+
// attributesGroupName, "?" PI tags) are exempt — they are builder-internal conventions,
|
|
175
|
+
// not user-supplied XML names.
|
|
176
|
+
const isSpecialKey = key === this.options.textNodeName
|
|
177
|
+
|| key === this.options.cdataPropName
|
|
178
|
+
|| key === this.options.commentPropName
|
|
179
|
+
|| (this.options.attributesGroupName && key === this.options.attributesGroupName)
|
|
180
|
+
|| this.isAttribute(key)
|
|
181
|
+
|| key[0] === '?';
|
|
182
|
+
|
|
183
|
+
const resolvedKey = isSpecialKey
|
|
184
|
+
? key
|
|
185
|
+
: resolveTagName(key, false, this.options, matcher, xmlVersion);
|
|
186
|
+
|
|
126
187
|
if (typeof jObj[key] === 'undefined') {
|
|
127
188
|
// supress undefined node only if it is not an attribute
|
|
128
189
|
if (this.isAttribute(key)) {
|
|
@@ -132,21 +193,22 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
132
193
|
// null attribute should be ignored by the attribute list, but should not cause the tag closing
|
|
133
194
|
if (this.isAttribute(key)) {
|
|
134
195
|
val += '';
|
|
135
|
-
} else if (
|
|
196
|
+
} else if (resolvedKey === this.options.cdataPropName || resolvedKey === this.options.commentPropName) {
|
|
136
197
|
val += '';
|
|
137
|
-
} else if (
|
|
138
|
-
val += this.indentate(level) + '<' +
|
|
198
|
+
} else if (resolvedKey[0] === '?') {
|
|
199
|
+
val += this.indentate(level) + '<' + resolvedKey + '?' + this.tagEndChar;
|
|
139
200
|
} else {
|
|
140
|
-
val += this.indentate(level) + '<' +
|
|
201
|
+
val += this.indentate(level) + '<' + resolvedKey + '/' + this.tagEndChar;
|
|
141
202
|
}
|
|
142
|
-
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
143
203
|
} else if (jObj[key] instanceof Date) {
|
|
144
|
-
val += this.buildTextValNode(jObj[key],
|
|
204
|
+
val += this.buildTextValNode(jObj[key], resolvedKey, '', level, matcher);
|
|
145
205
|
} else if (typeof jObj[key] !== 'object') {
|
|
146
206
|
//premitive type
|
|
147
207
|
const attr = this.isAttribute(key);
|
|
148
208
|
if (attr && !this.ignoreAttributesFn(attr, jPath)) {
|
|
149
|
-
|
|
209
|
+
// Resolve the attribute name through sanitizeName
|
|
210
|
+
const resolvedAttr = resolveTagName(attr, true, this.options, matcher, xmlVersion);
|
|
211
|
+
attrStr += this.buildAttrPairStr(resolvedAttr, '' + jObj[key], isCurrentStopNode);
|
|
150
212
|
} else if (!attr) {
|
|
151
213
|
//tag value
|
|
152
214
|
if (key === this.options.textNodeName) {
|
|
@@ -154,7 +216,7 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
154
216
|
val += this.replaceEntitiesValue(newval);
|
|
155
217
|
} else {
|
|
156
218
|
// Check if this is a stopNode before building
|
|
157
|
-
matcher.push(
|
|
219
|
+
matcher.push(resolvedKey);
|
|
158
220
|
const isStopNode = this.checkStopNode(matcher);
|
|
159
221
|
matcher.pop();
|
|
160
222
|
|
|
@@ -162,12 +224,12 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
162
224
|
// Build as raw content without encoding
|
|
163
225
|
const textValue = '' + jObj[key];
|
|
164
226
|
if (textValue === '') {
|
|
165
|
-
val += this.indentate(level) + '<' +
|
|
227
|
+
val += this.indentate(level) + '<' + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;
|
|
166
228
|
} else {
|
|
167
|
-
val += this.indentate(level) + '<' +
|
|
229
|
+
val += this.indentate(level) + '<' + resolvedKey + '>' + textValue + '</' + resolvedKey + this.tagEndChar;
|
|
168
230
|
}
|
|
169
231
|
} else {
|
|
170
|
-
val += this.buildTextValNode(jObj[key],
|
|
232
|
+
val += this.buildTextValNode(jObj[key], resolvedKey, '', level, matcher);
|
|
171
233
|
}
|
|
172
234
|
}
|
|
173
235
|
}
|
|
@@ -181,14 +243,13 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
181
243
|
if (typeof item === 'undefined') {
|
|
182
244
|
// supress undefined node
|
|
183
245
|
} else if (item === null) {
|
|
184
|
-
if (
|
|
185
|
-
else val += this.indentate(level) + '<' +
|
|
186
|
-
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
246
|
+
if (resolvedKey[0] === "?") val += this.indentate(level) + '<' + resolvedKey + '?' + this.tagEndChar;
|
|
247
|
+
else val += this.indentate(level) + '<' + resolvedKey + '/' + this.tagEndChar;
|
|
187
248
|
} else if (typeof item === 'object') {
|
|
188
249
|
if (this.options.oneListGroup) {
|
|
189
250
|
// Push tag to matcher before recursive call
|
|
190
|
-
matcher.push(
|
|
191
|
-
const result = this.j2x(item, level + 1, matcher);
|
|
251
|
+
matcher.push(resolvedKey);
|
|
252
|
+
const result = this.j2x(item, level + 1, matcher, xmlVersion);
|
|
192
253
|
// Pop tag from matcher after recursive call
|
|
193
254
|
matcher.pop();
|
|
194
255
|
|
|
@@ -197,16 +258,16 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
197
258
|
listTagAttr += result.attrStr
|
|
198
259
|
}
|
|
199
260
|
} else {
|
|
200
|
-
listTagVal += this.processTextOrObjNode(item,
|
|
261
|
+
listTagVal += this.processTextOrObjNode(item, resolvedKey, level, matcher, xmlVersion)
|
|
201
262
|
}
|
|
202
263
|
} else {
|
|
203
264
|
if (this.options.oneListGroup) {
|
|
204
|
-
let textValue = this.options.tagValueProcessor(
|
|
265
|
+
let textValue = this.options.tagValueProcessor(resolvedKey, item);
|
|
205
266
|
textValue = this.replaceEntitiesValue(textValue);
|
|
206
267
|
listTagVal += textValue;
|
|
207
268
|
} else {
|
|
208
269
|
// Check if this is a stopNode before building
|
|
209
|
-
matcher.push(
|
|
270
|
+
matcher.push(resolvedKey);
|
|
210
271
|
const isStopNode = this.checkStopNode(matcher);
|
|
211
272
|
matcher.pop();
|
|
212
273
|
|
|
@@ -214,18 +275,18 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
214
275
|
// Build as raw content without encoding
|
|
215
276
|
const textValue = '' + item;
|
|
216
277
|
if (textValue === '') {
|
|
217
|
-
listTagVal += this.indentate(level) + '<' +
|
|
278
|
+
listTagVal += this.indentate(level) + '<' + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;
|
|
218
279
|
} else {
|
|
219
|
-
listTagVal += this.indentate(level) + '<' +
|
|
280
|
+
listTagVal += this.indentate(level) + '<' + resolvedKey + '>' + textValue + '</' + resolvedKey + this.tagEndChar;
|
|
220
281
|
}
|
|
221
282
|
} else {
|
|
222
|
-
listTagVal += this.buildTextValNode(item,
|
|
283
|
+
listTagVal += this.buildTextValNode(item, resolvedKey, '', level, matcher);
|
|
223
284
|
}
|
|
224
285
|
}
|
|
225
286
|
}
|
|
226
287
|
}
|
|
227
288
|
if (this.options.oneListGroup) {
|
|
228
|
-
listTagVal = this.buildObjectNode(listTagVal,
|
|
289
|
+
listTagVal = this.buildObjectNode(listTagVal, resolvedKey, listTagAttr, level);
|
|
229
290
|
}
|
|
230
291
|
val += listTagVal;
|
|
231
292
|
} else {
|
|
@@ -234,10 +295,12 @@ Builder.prototype.j2x = function (jObj, level, matcher) {
|
|
|
234
295
|
const Ks = Object.keys(jObj[key]);
|
|
235
296
|
const L = Ks.length;
|
|
236
297
|
for (let j = 0; j < L; j++) {
|
|
237
|
-
|
|
298
|
+
// Resolve attribute names inside attributesGroupName
|
|
299
|
+
const resolvedAttr = resolveTagName(Ks[j], true, this.options, matcher, xmlVersion);
|
|
300
|
+
attrStr += this.buildAttrPairStr(resolvedAttr, '' + jObj[key][Ks[j]], isCurrentStopNode);
|
|
238
301
|
}
|
|
239
302
|
} else {
|
|
240
|
-
val += this.processTextOrObjNode(jObj[key],
|
|
303
|
+
val += this.processTextOrObjNode(jObj[key], resolvedKey, level, matcher, xmlVersion)
|
|
241
304
|
}
|
|
242
305
|
}
|
|
243
306
|
}
|
|
@@ -251,10 +314,10 @@ Builder.prototype.buildAttrPairStr = function (attrName, val, isStopNode) {
|
|
|
251
314
|
}
|
|
252
315
|
if (this.options.suppressBooleanAttributes && val === "true") {
|
|
253
316
|
return ' ' + attrName;
|
|
254
|
-
} else return ' ' + attrName + '="' + val + '"';
|
|
317
|
+
} else return ' ' + attrName + '="' + escapeAttribute(val) + '"';
|
|
255
318
|
}
|
|
256
319
|
|
|
257
|
-
function processTextOrObjNode(object, key, level, matcher) {
|
|
320
|
+
function processTextOrObjNode(object, key, level, matcher, xmlVersion) {
|
|
258
321
|
// Extract attributes to pass to matcher
|
|
259
322
|
const attrValues = this.extractAttributes(object);
|
|
260
323
|
|
|
@@ -272,11 +335,15 @@ function processTextOrObjNode(object, key, level, matcher) {
|
|
|
272
335
|
return this.buildObjectNode(rawContent, key, attrStr, level);
|
|
273
336
|
}
|
|
274
337
|
|
|
275
|
-
const result = this.j2x(object, level + 1, matcher);
|
|
338
|
+
const result = this.j2x(object, level + 1, matcher, xmlVersion);
|
|
276
339
|
// Pop tag from matcher after recursion
|
|
277
340
|
matcher.pop();
|
|
278
341
|
|
|
279
|
-
|
|
342
|
+
// PI/XML-declaration tags must never emit text content — route through
|
|
343
|
+
// buildTextValNode which correctly ignores the text node for "?" tags.
|
|
344
|
+
if (key[0] === '?') {
|
|
345
|
+
return this.buildTextValNode('', key, result.attrStr, level, matcher);
|
|
346
|
+
} else if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {
|
|
280
347
|
return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);
|
|
281
348
|
} else {
|
|
282
349
|
return this.buildObjectNode(result.val, key, result.attrStr, level);
|
|
@@ -299,7 +366,7 @@ Builder.prototype.extractAttributes = function (obj) {
|
|
|
299
366
|
const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix)
|
|
300
367
|
? attrKey.substring(this.options.attributeNamePrefix.length)
|
|
301
368
|
: attrKey;
|
|
302
|
-
attrValues[cleanKey] = attrGroup[attrKey];
|
|
369
|
+
attrValues[cleanKey] = escapeAttribute(attrGroup[attrKey]);
|
|
303
370
|
hasAttrs = true;
|
|
304
371
|
}
|
|
305
372
|
} else {
|
|
@@ -308,7 +375,7 @@ Builder.prototype.extractAttributes = function (obj) {
|
|
|
308
375
|
if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
|
|
309
376
|
const attr = this.isAttribute(key);
|
|
310
377
|
if (attr) {
|
|
311
|
-
attrValues[attr] = obj[key];
|
|
378
|
+
attrValues[attr] = escapeAttribute(obj[key]);
|
|
312
379
|
hasAttrs = true;
|
|
313
380
|
}
|
|
314
381
|
}
|
|
@@ -425,8 +492,10 @@ Builder.prototype.buildObjectNode = function (val, key, attrStr, level) {
|
|
|
425
492
|
else {
|
|
426
493
|
return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;
|
|
427
494
|
}
|
|
495
|
+
} else if (key[0] === "?") {
|
|
496
|
+
// PI/XML-declaration tags never have body content — treat them like empty.
|
|
497
|
+
return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;
|
|
428
498
|
} else {
|
|
429
|
-
|
|
430
499
|
let tagEndExp = '</' + key + this.tagEndChar;
|
|
431
500
|
let piClosingChar = "";
|
|
432
501
|
|
|
@@ -479,19 +548,16 @@ function buildEmptyObjNode(val, key, attrStr, level) {
|
|
|
479
548
|
if (key[0] === "?") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;
|
|
480
549
|
else {
|
|
481
550
|
return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;
|
|
482
|
-
// return this.buildTagStr(level,key, attrStr);
|
|
483
551
|
}
|
|
484
552
|
}
|
|
485
553
|
}
|
|
486
554
|
|
|
487
555
|
Builder.prototype.buildTextValNode = function (val, key, attrStr, level, matcher) {
|
|
488
556
|
if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {
|
|
489
|
-
const safeVal =
|
|
557
|
+
const safeVal = safeCdata(val);
|
|
490
558
|
return this.indentate(level) + `<![CDATA[${safeVal}]]>` + this.newLine;
|
|
491
559
|
} else if (this.options.commentPropName !== false && key === this.options.commentPropName) {
|
|
492
|
-
const safeVal =
|
|
493
|
-
.replace(/--/g, '- -') // -- is illegal anywhere in comment content
|
|
494
|
-
.replace(/-$/, '- '); // trailing - would form -- with the closing -->
|
|
560
|
+
const safeVal = safeComment(val);
|
|
495
561
|
return this.indentate(level) + `<!--${safeVal}-->` + this.newLine;
|
|
496
562
|
} else if (key[0] === "?") {//PI tag
|
|
497
563
|
return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;
|