@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
|
@@ -69,7 +69,7 @@ function extractNamespace(rawTagName) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export default class OrderedObjParser {
|
|
72
|
-
constructor(options) {
|
|
72
|
+
constructor(options, externalEntities) {
|
|
73
73
|
this.options = options;
|
|
74
74
|
this.currentNode = null;
|
|
75
75
|
this.tagsNodeStack = [];
|
|
@@ -92,7 +92,7 @@ export default class OrderedObjParser {
|
|
|
92
92
|
if (typeof this.options.htmlEntities === "object") namedEntities = this.options.htmlEntities;
|
|
93
93
|
else if (this.options.htmlEntities === true) namedEntities = { ...COMMON_HTML, ...CURRENCY };
|
|
94
94
|
this.entityDecoder = new EntityDecoder({
|
|
95
|
-
namedEntities: namedEntities,
|
|
95
|
+
namedEntities: { ...namedEntities, ...externalEntities },
|
|
96
96
|
numericAllowed: this.options.htmlEntities,
|
|
97
97
|
limit: {
|
|
98
98
|
maxTotalExpansions: this.options.processEntities.maxTotalExpansions,
|
|
@@ -269,7 +269,7 @@ function buildAttributesMap(attrStr, jPath, tagName, force = false) {
|
|
|
269
269
|
|
|
270
270
|
if (!hasAttrs) return;
|
|
271
271
|
|
|
272
|
-
if (options.attributesGroupName) {
|
|
272
|
+
if (options.attributesGroupName && !options.preserveOrder) {
|
|
273
273
|
const attrCollection = {};
|
|
274
274
|
attrCollection[options.attributesGroupName] = attrs;
|
|
275
275
|
return attrCollection;
|
|
@@ -655,12 +655,16 @@ function isItStopNode() {
|
|
|
655
655
|
* @returns
|
|
656
656
|
*/
|
|
657
657
|
function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
658
|
+
//TODO: ignore boolean attributes in tag expression
|
|
659
|
+
//TODO: if ignore attributes, dont read full attribute expression but the end. But read for xml declaration
|
|
658
660
|
let attrBoundary = 0;
|
|
659
|
-
const chars = [];
|
|
660
661
|
const len = xmlData.length;
|
|
661
662
|
const closeCode0 = closingChar.charCodeAt(0);
|
|
662
663
|
const closeCode1 = closingChar.length > 1 ? closingChar.charCodeAt(1) : -1;
|
|
663
664
|
|
|
665
|
+
let result = '';
|
|
666
|
+
let segmentStart = i;
|
|
667
|
+
|
|
664
668
|
for (let index = i; index < len; index++) {
|
|
665
669
|
const code = xmlData.charCodeAt(index);
|
|
666
670
|
|
|
@@ -671,17 +675,18 @@ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
|
|
|
671
675
|
} else if (code === closeCode0) {
|
|
672
676
|
if (closeCode1 !== -1) {
|
|
673
677
|
if (xmlData.charCodeAt(index + 1) === closeCode1) {
|
|
674
|
-
|
|
678
|
+
result += xmlData.substring(segmentStart, index);
|
|
679
|
+
return { data: result, index };
|
|
675
680
|
}
|
|
676
681
|
} else {
|
|
677
|
-
|
|
682
|
+
result += xmlData.substring(segmentStart, index);
|
|
683
|
+
return { data: result, index };
|
|
678
684
|
}
|
|
679
|
-
} else if (code === 9) { // \t
|
|
680
|
-
|
|
681
|
-
|
|
685
|
+
} else if (code === 9 && !attrBoundary) { // \t - only replace with space outside attribute values
|
|
686
|
+
// Flush accumulated segment, add space, start new segment
|
|
687
|
+
result += xmlData.substring(segmentStart, index) + ' ';
|
|
688
|
+
segmentStart = index + 1;
|
|
682
689
|
}
|
|
683
|
-
|
|
684
|
-
chars.push(code);
|
|
685
690
|
}
|
|
686
691
|
}
|
|
687
692
|
|
|
@@ -31,8 +31,8 @@ export default class XMLParser {
|
|
|
31
31
|
throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`)
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
const orderedObjParser = new OrderedObjParser(this.options);
|
|
35
|
-
orderedObjParser.entityDecoder.setExternalEntities(this.externalEntities);
|
|
34
|
+
const orderedObjParser = new OrderedObjParser(this.options, this.externalEntities);
|
|
35
|
+
// orderedObjParser.entityDecoder.setExternalEntities(this.externalEntities);
|
|
36
36
|
const orderedResult = orderedObjParser.parseXml(xmlData);
|
|
37
37
|
if (this.options.preserveOrder || orderedResult === undefined) return orderedResult;
|
|
38
38
|
else return prettify(orderedResult, this.options, orderedObjParser.matcher, orderedObjParser.readonlyMatcher);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strnum",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Parse String to Number based on configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "strnum.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/NaturalIntelligence/strnum"
|
|
19
19
|
},
|
|
20
|
-
"author": "Amit Gupta (https://
|
|
20
|
+
"author": "Amit Gupta (https://solothought.work/)",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"funding": [
|
|
23
23
|
{
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
+
"@byspec/numbers": "^0.1.1",
|
|
29
30
|
"jasmine": "^5.6.0"
|
|
30
31
|
}
|
|
31
32
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
|
|
2
|
+
const binRegex = /^0b[01]+$/;
|
|
3
|
+
const octRegex = /^0o[0-7]+$/;
|
|
2
4
|
const numRegex = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/;
|
|
3
|
-
// const octRegex = /^0x[a-z0-9]+/;
|
|
4
|
-
// const binRegex = /0x[a-z0-9]+/;
|
|
5
|
-
|
|
6
5
|
|
|
7
6
|
const consider = {
|
|
8
7
|
hex: true,
|
|
9
|
-
|
|
8
|
+
binary: false,
|
|
9
|
+
octal: false,
|
|
10
10
|
leadingZeros: true,
|
|
11
11
|
decimalPoint: "\.",
|
|
12
12
|
eNotation: true,
|
|
@@ -25,14 +25,14 @@ export default function toNumber(str, options = {}) {
|
|
|
25
25
|
else if (trimmedStr === "0") return 0;
|
|
26
26
|
else if (options.hex && hexRegex.test(trimmedStr)) {
|
|
27
27
|
return parse_int(trimmedStr, 16);
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
} else if (options.binary && binRegex.test(trimmedStr)) {
|
|
29
|
+
return parse_int(trimmedStr, 2);
|
|
30
|
+
} else if (options.octal && octRegex.test(trimmedStr)) {
|
|
31
|
+
return parse_int(trimmedStr, 8);
|
|
30
32
|
} else if (!isFinite(trimmedStr)) { //Infinity
|
|
31
33
|
return handleInfinity(str, Number(trimmedStr), options);
|
|
32
34
|
} else if (trimmedStr.includes('e') || trimmedStr.includes('E')) { //eNotation
|
|
33
35
|
return resolveEnotation(str, trimmedStr, options);
|
|
34
|
-
// }else if (options.parseBin && binRegex.test(str)) {
|
|
35
|
-
// return Number.parseInt(val, 2);
|
|
36
36
|
} else {
|
|
37
37
|
//separate negative sign, leading zeros, and rest number
|
|
38
38
|
const match = numRegex.exec(trimmedStr);
|
|
@@ -130,11 +130,13 @@ function trimZeros(numStr) {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
function parse_int(numStr, base) {
|
|
133
|
-
|
|
133
|
+
const str = numStr.trim();
|
|
134
|
+
if (base === 2 || base === 8) numStr = str.substring(2);
|
|
135
|
+
|
|
134
136
|
if (parseInt) return parseInt(numStr, base);
|
|
135
137
|
else if (Number.parseInt) return Number.parseInt(numStr, base);
|
|
136
138
|
else if (window && window.parseInt) return window.parseInt(numStr, base);
|
|
137
|
-
else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")
|
|
139
|
+
else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
/**
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# xml-naming
|
|
2
|
+
|
|
3
|
+
Validates XML name productions as defined in the [XML 1.0](https://www.w3.org/TR/xml/) and [XML 1.1](https://www.w3.org/TR/xml11/) specifications.
|
|
4
|
+
|
|
5
|
+
Covers all five productions:
|
|
6
|
+
|
|
7
|
+
| Production | Description | Colon | Digit/hyphen start |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `Name` | General XML name | ✅ | ❌ |
|
|
10
|
+
| `NCName` | Non-Colonized name | ❌ | ❌ |
|
|
11
|
+
| `QName` | Namespace-qualified name (`prefix:local`) | ✅ (one only) | ❌ |
|
|
12
|
+
| `NMToken` | Name token (relaxed start) | ✅ | ✅ |
|
|
13
|
+
| `NMTokens` | Whitespace-separated NMToken list | ✅ | ✅ |
|
|
14
|
+
|
|
15
|
+
Used internally by [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser), [fast-xml-validator](https://github.com/NaturalIntelligence/fast-xml-validator), [@nodable\flexible-xml-parser](https://github.com/nodable/flexible-xml-parser) and [fast-svg-parser](https://github.com/amitguptagwl/fast-svg-parser).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install xml-naming
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Boolean validators
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { name, ncName, qName, nmToken, nmTokens } from 'xml-naming';
|
|
33
|
+
|
|
34
|
+
// Name — colon allowed anywhere, used for DOCTYPE entity names
|
|
35
|
+
name('foo') // true
|
|
36
|
+
name('a:b:c') // true ← multiple colons fine for Name
|
|
37
|
+
name('1foo') // false ← digit start invalid
|
|
38
|
+
|
|
39
|
+
// NCName — no colon, used for SVG id attributes, namespace prefixes
|
|
40
|
+
ncName('my-id') // true
|
|
41
|
+
ncName('xlink:href') // false ← colon not allowed
|
|
42
|
+
|
|
43
|
+
// QName — exactly one colon as prefix separator, used for element/attribute names
|
|
44
|
+
qName('svg:circle') // true
|
|
45
|
+
qName('foo') // true ← unprefixed QName is valid
|
|
46
|
+
qName('a:b:c') // false ← only one colon allowed
|
|
47
|
+
qName(':foo') // false ← cannot start with colon
|
|
48
|
+
|
|
49
|
+
// NMToken — any NameChar at start, used for DTD NMTOKEN attributes
|
|
50
|
+
nmToken('123') // true ← digit start is fine
|
|
51
|
+
nmToken('-bar') // true
|
|
52
|
+
nmToken('foo bar') // false ← space not allowed
|
|
53
|
+
|
|
54
|
+
// NMTokens — whitespace-separated NMToken list
|
|
55
|
+
nmTokens('tok1 tok2 -foo 123') // true
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### XML version option
|
|
59
|
+
|
|
60
|
+
All validators accept an optional `{ xmlVersion }` option:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { name } from 'xml-naming';
|
|
64
|
+
|
|
65
|
+
name('\u0085', { xmlVersion: '1.0' }) // false — NEL (Next Line), not in 1.0 ranges
|
|
66
|
+
name('\u0085', { xmlVersion: '1.1' }) // true — explicitly allowed in 1.1
|
|
67
|
+
|
|
68
|
+
name('\uD800\uDC00', { xmlVersion: '1.0' }) // false
|
|
69
|
+
name('\uD800\uDC00', { xmlVersion: '1.1' }) // true
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Diagnostic validation
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
import { validate } from 'xml-naming';
|
|
78
|
+
|
|
79
|
+
validate('svg:circle', 'qName')
|
|
80
|
+
// { valid: true, production: 'qName', input: 'svg:circle' }
|
|
81
|
+
|
|
82
|
+
validate('1foo', 'ncName')
|
|
83
|
+
// {
|
|
84
|
+
// valid: false,
|
|
85
|
+
// production: 'ncName',
|
|
86
|
+
// input: '1foo',
|
|
87
|
+
// reason: 'First character "1" is not a valid NameStartChar',
|
|
88
|
+
// position: 0
|
|
89
|
+
// }
|
|
90
|
+
|
|
91
|
+
validate('foo:bar', 'ncName')
|
|
92
|
+
// {
|
|
93
|
+
// valid: false,
|
|
94
|
+
// production: 'ncName',
|
|
95
|
+
// input: 'foo:bar',
|
|
96
|
+
// reason: 'Colon is not allowed in NCName',
|
|
97
|
+
// position: 3
|
|
98
|
+
// }
|
|
99
|
+
|
|
100
|
+
validate('a:b:c', 'qName')
|
|
101
|
+
// {
|
|
102
|
+
// valid: false,
|
|
103
|
+
// production: 'qName',
|
|
104
|
+
// input: 'a:b:c',
|
|
105
|
+
// reason: 'QName can have at most one colon',
|
|
106
|
+
// position: 3
|
|
107
|
+
// }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Batch validation
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import { validateAll } from 'xml-naming';
|
|
116
|
+
|
|
117
|
+
validateAll(['svg', 'circle', '123bad', 'xlink:href'], 'ncName')
|
|
118
|
+
// [
|
|
119
|
+
// { valid: true, production: 'ncName', input: 'svg' },
|
|
120
|
+
// { valid: true, production: 'ncName', input: 'circle' },
|
|
121
|
+
// { valid: false, production: 'ncName', input: '123bad', reason: '...', position: 0 },
|
|
122
|
+
// { valid: false, production: 'ncName', input: 'xlink:href',reason: '...', position: 5 }
|
|
123
|
+
// ]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### Sanitize / auto-fix
|
|
129
|
+
|
|
130
|
+
Useful when generating XML/SVG programmatically from user-supplied strings:
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
import { sanitize } from 'xml-naming';
|
|
134
|
+
|
|
135
|
+
sanitize('123abc', 'ncName') // '_123abc' ← digit start fixed
|
|
136
|
+
sanitize('my element','name') // 'my_element' ← space replaced
|
|
137
|
+
sanitize('foo:bar', 'ncName') // 'foobar' ← colon stripped
|
|
138
|
+
sanitize('hello!', 'name') // 'hello_' ← illegal char replaced
|
|
139
|
+
|
|
140
|
+
// Custom replacement character
|
|
141
|
+
sanitize('my element', 'name', { replacement: '-' }) // 'my-element'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Which production should I use?
|
|
147
|
+
|
|
148
|
+
| Context | Production |
|
|
149
|
+
|---|---|
|
|
150
|
+
| XML element/attribute names (namespace-aware) | `qName` |
|
|
151
|
+
| SVG `id` attribute values | `ncName` |
|
|
152
|
+
| Namespace prefix alone | `ncName` |
|
|
153
|
+
| DOCTYPE `<!ENTITY name ...>` | `name` |
|
|
154
|
+
| DOCTYPE `<!NOTATION name ...>` | `name` |
|
|
155
|
+
| DTD `NMTOKEN` attribute values | `nmToken` |
|
|
156
|
+
| DTD `NMTOKENS` attribute values | `nmTokens` |
|
|
157
|
+
|
|
158
|
+
> **Note:** DOCTYPE entity and notation names must use `Name`, not `QName`. Colons carry no namespace meaning in the DTD subset.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## API
|
|
163
|
+
|
|
164
|
+
### `name(str, opts?)` → `boolean`
|
|
165
|
+
### `ncName(str, opts?)` → `boolean`
|
|
166
|
+
### `qName(str, opts?)` → `boolean`
|
|
167
|
+
### `nmToken(str, opts?)` → `boolean`
|
|
168
|
+
### `nmTokens(str, opts?)` → `boolean`
|
|
169
|
+
|
|
170
|
+
`opts`:
|
|
171
|
+
- `xmlVersion`: `'1.0'` (default) | `'1.1'`
|
|
172
|
+
|
|
173
|
+
### `validate(str, production, opts?)` → `ValidationResult`
|
|
174
|
+
|
|
175
|
+
`production`: `'name'` | `'ncName'` | `'qName'` | `'nmToken'` | `'nmTokens'`
|
|
176
|
+
|
|
177
|
+
### `validateAll(strings[], production, opts?)` → `ValidationResult[]`
|
|
178
|
+
|
|
179
|
+
### `sanitize(str, production?, opts?)` → `string`
|
|
180
|
+
|
|
181
|
+
`opts`:
|
|
182
|
+
- `xmlVersion`: `'1.0'` | `'1.1'`
|
|
183
|
+
- `replacement`: string (default `'_'`)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
MIT
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xml-naming",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Validates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.js",
|
|
7
|
+
"types": "./src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./src/index.js",
|
|
11
|
+
"types": "./src/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"src",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "jasmine specs/*spec.js"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"xml",
|
|
23
|
+
"xml-name",
|
|
24
|
+
"ncname",
|
|
25
|
+
"qname",
|
|
26
|
+
"nmtoken",
|
|
27
|
+
"xml-validation",
|
|
28
|
+
"xml-namespace",
|
|
29
|
+
"name-validator",
|
|
30
|
+
"xml-1.0",
|
|
31
|
+
"xml-1.1"
|
|
32
|
+
],
|
|
33
|
+
"author": "Amit Gupta (https://solothought.com)",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"funding": [
|
|
36
|
+
{
|
|
37
|
+
"type": "github",
|
|
38
|
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"jasmine": "^5.0.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=16.0.0"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/NaturalIntelligence/xml-naming"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/NaturalIntelligence/xml-naming/issues"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export interface ValidationOptions {
|
|
2
|
+
/** XML specification version to validate against. Defaults to '1.0'. */
|
|
3
|
+
xmlVersion?: '1.0' | '1.1';
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface SanitizeOptions extends ValidationOptions {
|
|
7
|
+
/** Character used to replace invalid characters. Defaults to '_'. */
|
|
8
|
+
replacement?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type Production = 'name' | 'ncName' | 'qName' | 'nmToken' | 'nmTokens';
|
|
12
|
+
|
|
13
|
+
export interface ValidationResult {
|
|
14
|
+
valid: boolean;
|
|
15
|
+
production: Production;
|
|
16
|
+
input: string;
|
|
17
|
+
/** Present only when valid is false. */
|
|
18
|
+
reason?: string;
|
|
19
|
+
/** Index of the first offending character. Present only when valid is false. */
|
|
20
|
+
position?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns true if the string is a valid XML Name.
|
|
25
|
+
* Colons are permitted anywhere (Name production).
|
|
26
|
+
* Used for: DOCTYPE entity names, notation names, DTD element declarations.
|
|
27
|
+
*/
|
|
28
|
+
export function name(str: string, opts?: ValidationOptions): boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns true if the string is a valid NCName (Non-Colonized Name).
|
|
32
|
+
* Colons are not permitted.
|
|
33
|
+
* Used for: namespace prefixes, local names, SVG id attributes.
|
|
34
|
+
*/
|
|
35
|
+
export function ncName(str: string, opts?: ValidationOptions): boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if the string is a valid QName (Qualified Name).
|
|
39
|
+
* Allows exactly one colon as a prefix separator: prefix:localName.
|
|
40
|
+
* Used for: element and attribute names in namespace-aware XML/SVG.
|
|
41
|
+
*/
|
|
42
|
+
export function qName(str: string, opts?: ValidationOptions): boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns true if the string is a valid NMToken.
|
|
46
|
+
* Same character set as Name but no restriction on the first character.
|
|
47
|
+
* Used for: DTD NMTOKEN attribute values.
|
|
48
|
+
*/
|
|
49
|
+
export function nmToken(str: string, opts?: ValidationOptions): boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Returns true if the string is a valid NMTokens value.
|
|
53
|
+
* A whitespace-separated list of NMToken values.
|
|
54
|
+
* Used for: DTD NMTOKENS attribute values.
|
|
55
|
+
*/
|
|
56
|
+
export function nmTokens(str: string, opts?: ValidationOptions): boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Validates a string against a named XML production and returns a detailed result.
|
|
60
|
+
*/
|
|
61
|
+
export function validate(str: string, production: Production, opts?: ValidationOptions): ValidationResult;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Validates an array of strings against a named XML production.
|
|
65
|
+
*/
|
|
66
|
+
export function validateAll(strings: string[], production: Production, opts?: ValidationOptions): ValidationResult[];
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Transforms an invalid string into the nearest valid XML name for the given production.
|
|
70
|
+
* - Strips or replaces illegal characters
|
|
71
|
+
* - Fixes invalid start characters by prepending the replacement character
|
|
72
|
+
* - Removes colons for NCName production
|
|
73
|
+
*/
|
|
74
|
+
export function sanitize(str: string, production?: Production, opts?: SanitizeOptions): string;
|