@cdklabs/cdk-ssm-documents 0.0.66 → 0.0.67
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 +13 -13
- 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/checksums/package.json +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +3 -3
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +37 -4
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +35 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/AttachImageWatermarkCommand.d.ts +2 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CancelCapacityReservationCommand.d.ts +10 -16
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAwsNetworkPerformanceDataCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamScopeCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.d.ts +15 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +42 -15
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +17 -35
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +86 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetAwsNetworkPerformanceDataCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamScopeCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +7 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +5 -9
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +15 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +4 -4
- package/node_modules/@aws-sdk/client-iam/package.json +3 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +4 -4
- package/node_modules/@aws-sdk/client-lambda/package.json +3 -3
- package/node_modules/@aws-sdk/client-s3/package.json +6 -6
- package/node_modules/@aws-sdk/client-sns/package.json +3 -3
- package/node_modules/@aws-sdk/client-sqs/package.json +3 -3
- package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
- package/node_modules/@aws-sdk/core/package.json +2 -2
- 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-ec2/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +233 -43
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +233 -43
- package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.d.ts +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-types/xml-parser.d.ts +2 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +355 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +456 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +355 -145
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +30 -36
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +54 -110
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +30 -36
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js +27 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js +21 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.browser.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/index.native.js +7 -1
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js +92 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js +29 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js +179 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js +59 -0
- package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js +71 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js +15 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js +4 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +12 -38
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js +18 -33
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Js.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Node.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.browser.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/index.native.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Js.d.ts +19 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Node.d.ts +17 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Js.d.ts +28 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Node.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256WebCrypto.d.ts +22 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/concatBytes.d.ts +6 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/checksum/ChecksumStream.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +8 -2
- package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.d.ts +4 -1
- package/node_modules/@smithy/core/package.json +4 -3
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -55
- package/node_modules/@smithy/fetch-http-handler/dist-es/index.js +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-compression/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -51
- package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
- package/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -3
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/immutable/dist/immutable.es.js +161 -15
- package/node_modules/immutable/dist/immutable.js +161 -15
- package/node_modules/immutable/dist/immutable.min.js +33 -32
- package/node_modules/immutable/package.json +1 -1
- package/node_modules/js-yaml/README.md +5 -3
- package/node_modules/js-yaml/dist/js-yaml.js +3009 -2402
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -33
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +3073 -2381
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/loader.js +7 -11
- package/node_modules/js-yaml/lib/type/float.js +1 -1
- package/node_modules/js-yaml/lib/type/int.js +4 -4
- package/node_modules/js-yaml/package.json +10 -4
- package/package.json +12 -12
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +0 -333
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +0 -332
- package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-external/nodable_entities.d.ts +0 -66
- package/node_modules/@aws-sdk/xml-builder/dist-types/xml-external/nodable_entities.d.ts +0 -65
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +0 -827
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/LICENSE +0 -21
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +0 -202
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +0 -770
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +0 -93
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/cli.js +0 -97
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/man.js +0 -17
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/read.js +0 -43
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +0 -739
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +0 -14
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/ignoreAttributes.js +0 -18
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +0 -61
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +0 -16
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +0 -61
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +0 -69
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +0 -103
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -100
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +0 -154
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +0 -94
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPath.js +0 -81
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +0 -13
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +0 -83
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +0 -235
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +0 -210
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +0 -111
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +0 -116
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +0 -121
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +0 -22
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +0 -19
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +0 -38
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +0 -13
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +0 -14
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +0 -6
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +0 -425
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +0 -6
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +0 -407
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +0 -163
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +0 -840
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +0 -71
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +0 -177
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +0 -40
- package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/CHANGELOG.md +0 -51
- package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/LICENSE +0 -21
- package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/README.md +0 -113
- package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/package.json +0 -36
- package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/strnum.js +0 -171
- package/node_modules/@nodable/entities/README.md +0 -41
- package/node_modules/@nodable/entities/package.json +0 -57
- package/node_modules/@nodable/entities/src/EntityDecoder.js +0 -644
- package/node_modules/@nodable/entities/src/EntityEncoder.js +0 -194
- package/node_modules/@nodable/entities/src/entities.js +0 -1159
- package/node_modules/@nodable/entities/src/entityTries.js +0 -49
- package/node_modules/@nodable/entities/src/index.d.ts +0 -341
- package/node_modules/@nodable/entities/src/index.js +0 -29
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/constants.js +0 -3
- package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/md5.js +0 -168
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/constants.d.ts +0 -12
- package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/md5.d.ts +0 -16
- package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +0 -53
- package/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +0 -2
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -7
- package/node_modules/anynum/LICENSE +0 -21
- package/node_modules/anynum/README.md +0 -142
- package/node_modules/anynum/anynum.js +0 -135
- package/node_modules/anynum/digitTable.js +0 -116
- package/node_modules/anynum/package.json +0 -42
- package/node_modules/fast-xml-builder/CHANGELOG.md +0 -40
- package/node_modules/fast-xml-builder/LICENSE +0 -21
- package/node_modules/fast-xml-builder/README.md +0 -74
- package/node_modules/fast-xml-builder/lib/fxb.cjs +0 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +0 -270
- package/node_modules/fast-xml-builder/lib/fxb.min.js +0 -2
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +0 -1
- package/node_modules/fast-xml-builder/package.json +0 -81
- package/node_modules/fast-xml-builder/src/fxb.d.ts +0 -270
- package/node_modules/fast-xml-builder/src/fxb.js +0 -599
- package/node_modules/fast-xml-builder/src/ignoreAttributes.js +0 -18
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +0 -359
- package/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
- package/node_modules/fast-xml-builder/src/util.js +0 -16
- package/node_modules/path-expression-matcher/LICENSE +0 -21
- package/node_modules/path-expression-matcher/README.md +0 -947
- package/node_modules/path-expression-matcher/lib/pem.cjs +0 -1
- package/node_modules/path-expression-matcher/lib/pem.d.cts +0 -715
- package/node_modules/path-expression-matcher/lib/pem.min.js +0 -2
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +0 -1
- package/node_modules/path-expression-matcher/package.json +0 -79
- package/node_modules/path-expression-matcher/src/Expression.js +0 -232
- package/node_modules/path-expression-matcher/src/ExpressionSet.js +0 -225
- package/node_modules/path-expression-matcher/src/Matcher.js +0 -660
- package/node_modules/path-expression-matcher/src/index.d.ts +0 -589
- package/node_modules/path-expression-matcher/src/index.js +0 -29
- package/node_modules/xml-naming/README.md +0 -189
- package/node_modules/xml-naming/package.json +0 -54
- package/node_modules/xml-naming/src/index.d.ts +0 -74
- package/node_modules/xml-naming/src/index.js +0 -270
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// entityTries.js
|
|
2
|
-
// Builds integer-keyed tries so the decoder never allocates a string object
|
|
3
|
-
// during lookup — every key is a plain charCode number.
|
|
4
|
-
//
|
|
5
|
-
// trie1: Map<code0, entity>
|
|
6
|
-
// trie2: Map<code0, Map<code1, entity>>
|
|
7
|
-
// trie3: Map<code0, Map<code1, Map<code2, entity>>>
|
|
8
|
-
|
|
9
|
-
import { ALL_ENTITIES } from './entities.js';
|
|
10
|
-
|
|
11
|
-
// Reverse map: character sequence → "&name;"
|
|
12
|
-
const CHAR_TO_ENTITY = new Map();
|
|
13
|
-
for (const [name, chars] of Object.entries(ALL_ENTITIES)) {
|
|
14
|
-
CHAR_TO_ENTITY.set(chars, `&${name};`);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export const trie1 = new Map(); // code0 → entity string
|
|
18
|
-
export const trie2 = new Map(); // code0 → Map → entity string
|
|
19
|
-
export const trie3 = new Map(); // code0 → Map → Map → entity string
|
|
20
|
-
|
|
21
|
-
for (const [chars, entity] of CHAR_TO_ENTITY) {
|
|
22
|
-
const len = chars.length;
|
|
23
|
-
|
|
24
|
-
if (len === 1) {
|
|
25
|
-
const c0 = chars.charCodeAt(0);
|
|
26
|
-
// Keep shortest match only if no longer match already claimed this code
|
|
27
|
-
// (longer matches are inserted in the same pass so we just overwrite —
|
|
28
|
-
// trie1 is only consulted after trie2/trie3 both miss, so no conflict)
|
|
29
|
-
trie1.set(c0, entity);
|
|
30
|
-
|
|
31
|
-
} else if (len === 2) {
|
|
32
|
-
const c0 = chars.charCodeAt(0);
|
|
33
|
-
const c1 = chars.charCodeAt(1);
|
|
34
|
-
let inner = trie2.get(c0);
|
|
35
|
-
if (inner === undefined) { inner = new Map(); trie2.set(c0, inner); }
|
|
36
|
-
inner.set(c1, entity);
|
|
37
|
-
|
|
38
|
-
} else if (len === 3) {
|
|
39
|
-
const c0 = chars.charCodeAt(0);
|
|
40
|
-
const c1 = chars.charCodeAt(1);
|
|
41
|
-
const c2 = chars.charCodeAt(2);
|
|
42
|
-
let mid = trie3.get(c0);
|
|
43
|
-
if (mid === undefined) { mid = new Map(); trie3.set(c0, mid); }
|
|
44
|
-
let inner = mid.get(c1);
|
|
45
|
-
if (inner === undefined) { inner = new Map(); mid.set(c1, inner); }
|
|
46
|
-
inner.set(c2, entity);
|
|
47
|
-
}
|
|
48
|
-
// HTML5 has no named entity whose character sequence is longer than 3 chars
|
|
49
|
-
}
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// @nodable/entities — TypeScript declarations
|
|
3
|
-
// ---------------------------------------------------------------------------
|
|
4
|
-
|
|
5
|
-
/** A function-based entity replacement value (used for numeric refs). */
|
|
6
|
-
export type EntityValFn = (match: string, captured: string, ...rest: unknown[]) => string;
|
|
7
|
-
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Entity registration hook
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Actions returned by `onExternalEntity` / `onInputEntity` hooks.
|
|
14
|
-
* Use the `ENTITY_ACTION` constant object instead of raw strings to avoid typos.
|
|
15
|
-
*
|
|
16
|
-
* - `'allow'` — register and expand the entity normally
|
|
17
|
-
* - `'block'` — silently skip the entity (not registered, treated as unknown)
|
|
18
|
-
* - `'throw'` — abort registration with an error
|
|
19
|
-
*/
|
|
20
|
-
export type EntityHookAction = 'allow' | 'block' | 'throw';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Immutable constant bag for entity registration hook return values.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* import { ENTITY_ACTION } from '@nodable/entities';
|
|
27
|
-
* const dec = new EntityDecoder({
|
|
28
|
-
* onInputEntity: (_name, _value) => ENTITY_ACTION.BLOCK,
|
|
29
|
-
* });
|
|
30
|
-
*/
|
|
31
|
-
export const ENTITY_ACTION: Readonly<{
|
|
32
|
-
/** Register and expand the entity normally. */
|
|
33
|
-
ALLOW: 'allow';
|
|
34
|
-
/** Silently skip this entity — it will not be registered. */
|
|
35
|
-
BLOCK: 'block';
|
|
36
|
-
/** Throw an error, aborting entity registration. */
|
|
37
|
-
THROW: 'throw';
|
|
38
|
-
}>;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Callback signature for `onExternalEntity` and `onInputEntity` hooks.
|
|
42
|
-
*
|
|
43
|
-
* Called once per entity **at registration time** (not at decode time).
|
|
44
|
-
* Return `ENTITY_ACTION.ALLOW` (or `'allow'`) to accept, `ENTITY_ACTION.BLOCK`
|
|
45
|
-
* to silently skip, or `ENTITY_ACTION.THROW` to raise an error.
|
|
46
|
-
*
|
|
47
|
-
* @param name — the entity name without `&` / `;`, e.g. `"brand"`
|
|
48
|
-
* @param value — the resolved string value after any `{regex,val}` unwrapping
|
|
49
|
-
*/
|
|
50
|
-
export type EntityRegistrationHook = (name: string, value: string) => EntityHookAction;
|
|
51
|
-
|
|
52
|
-
// ---------------------------------------------------------------------------
|
|
53
|
-
// Encoder options
|
|
54
|
-
// ---------------------------------------------------------------------------
|
|
55
|
-
|
|
56
|
-
export interface EntityEncoderOptions {
|
|
57
|
-
/**
|
|
58
|
-
* Whether to encode XML unsafe characters: `&`, `<`, `>`, `"`, `'`.
|
|
59
|
-
* @default true
|
|
60
|
-
*/
|
|
61
|
-
encodeXmlSafe?: boolean;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Whether to encode non‑ASCII characters (e.g. `é` → `é`) using the
|
|
65
|
-
* built‑in named entity trie.
|
|
66
|
-
* @default true
|
|
67
|
-
*/
|
|
68
|
-
encodeAllNamed?: boolean;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Maximum number of replacements performed **cumulatively** across all
|
|
72
|
-
* `encode()` calls. `0` means unlimited.
|
|
73
|
-
*
|
|
74
|
-
* Use `reset()` to reset the internal counter.
|
|
75
|
-
* @default 0
|
|
76
|
-
*/
|
|
77
|
-
maxReplacements?: number;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// ---------------------------------------------------------------------------
|
|
81
|
-
// EntityEncoder class
|
|
82
|
-
// ---------------------------------------------------------------------------
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* High‑performance encoder that replaces characters with XML/HTML entities.
|
|
86
|
-
*
|
|
87
|
-
* - Escapes XML unsafe characters (`&`, `<`, `>`, `"`, `'`) when `encodeXmlSafe` is true.
|
|
88
|
-
* - Replaces non‑ASCII characters (e.g. `é`, `©`) with named entities using
|
|
89
|
-
* a compact trie‑based lookup when `encodeAllNamed` is true.
|
|
90
|
-
* - Supports a cumulative replacement limit (`maxReplacements`) that persists
|
|
91
|
-
* across multiple `encode()` calls until `reset()` is called.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* const encoder = new EntityEncoder({ encodeXmlSafe: true, encodeAllNamed: true });
|
|
95
|
-
* encoder.encode('<foo>'); // "<foo>"
|
|
96
|
-
* encoder.encode('© 2025'); // "© 2025"
|
|
97
|
-
*
|
|
98
|
-
* // With limit
|
|
99
|
-
* const limited = new EntityEncoder({ maxReplacements: 2 });
|
|
100
|
-
* limited.encode('<>&'); // "<>&" (third replacement omitted)
|
|
101
|
-
* limited.reset(); // reset counter
|
|
102
|
-
*/
|
|
103
|
-
export class EntityEncoder {
|
|
104
|
-
constructor(options?: EntityEncoderOptions);
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Encode a string by replacing XML‑unsafe characters and (optionally)
|
|
108
|
-
* non‑ASCII characters with named entities.
|
|
109
|
-
*
|
|
110
|
-
* If `maxReplacements` is set and the cumulative limit has been reached,
|
|
111
|
-
* the input string is returned unchanged.
|
|
112
|
-
*
|
|
113
|
-
* @returns Encoded string (may be identical to input if no replacements needed
|
|
114
|
-
* or the limit has been exhausted).
|
|
115
|
-
*/
|
|
116
|
-
encode(str: string): string;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Reset the internal replacement counter.
|
|
120
|
-
* Does **not** change `encodeXmlSafe`, `encodeAllNamed`, or `maxReplacements`.
|
|
121
|
-
*/
|
|
122
|
-
reset(): void;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// ---------------------------------------------------------------------------
|
|
126
|
-
// Constructor options for EntityDecoder (existing)
|
|
127
|
-
// ---------------------------------------------------------------------------
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Controls which entity categories count toward the expansion limits.
|
|
131
|
-
*
|
|
132
|
-
* - `'external'` — only untrusted / injected entities (default)
|
|
133
|
-
* - `'base'` — only built‑in XML entities + user‑supplied `namedEntities`
|
|
134
|
-
* - `'all'` — all entities regardless of tier
|
|
135
|
-
* - `string[]` — explicit combination, e.g. `['external', 'base']`
|
|
136
|
-
*/
|
|
137
|
-
export type ApplyLimitsTo = 'external' | 'base' | 'all' | Array<'external' | 'base'>;
|
|
138
|
-
|
|
139
|
-
export interface EntityDecoderLimitOptions {
|
|
140
|
-
/**
|
|
141
|
-
* Maximum number of entity references expanded **per document**.
|
|
142
|
-
* `0` means unlimited.
|
|
143
|
-
* @default 0
|
|
144
|
-
*/
|
|
145
|
-
maxTotalExpansions?: number;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Maximum number of characters **added** by entity expansion per document.
|
|
149
|
-
* `0` means unlimited.
|
|
150
|
-
* @default 0
|
|
151
|
-
*/
|
|
152
|
-
maxExpandedLength?: number;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Which entity tiers count toward the expansion limits.
|
|
156
|
-
*
|
|
157
|
-
* - `'external'` (default) – only input/runtime + persistent external entities
|
|
158
|
-
* - `'base'` – only built‑in XML + `namedEntities`
|
|
159
|
-
* - `'all'` – every entity regardless of tier
|
|
160
|
-
* - `string[]` – explicit combination, e.g. `['external', 'base']`
|
|
161
|
-
*
|
|
162
|
-
* @default 'external'
|
|
163
|
-
*/
|
|
164
|
-
applyLimitsTo?: ApplyLimitsTo;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface EntityDecoderNCROptions {
|
|
168
|
-
/**
|
|
169
|
-
* XML version used for NCR classification.
|
|
170
|
-
* @default 1.0
|
|
171
|
-
*/
|
|
172
|
-
xmlVersion?: 1.0 | 1.1;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Base action for all numeric references.
|
|
176
|
-
* @default 'allow'
|
|
177
|
-
*/
|
|
178
|
-
onNCR?: 'allow' | 'leave' | 'remove' | 'throw';
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Action for null NCR (U+0000).
|
|
182
|
-
* @default 'remove'
|
|
183
|
-
*/
|
|
184
|
-
nullNCR?: 'remove' | 'throw';
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface EntityDecoderOptions {
|
|
188
|
-
/**
|
|
189
|
-
* Extra named entities merged into the **base map** (trusted, counts as `'base'` tier).
|
|
190
|
-
* These are combined with the built‑in XML entities (`lt`, `gt`, `quot`, `apos`).
|
|
191
|
-
* Values containing `&` are silently skipped to prevent recursive expansion.
|
|
192
|
-
*
|
|
193
|
-
* @default null
|
|
194
|
-
*/
|
|
195
|
-
namedEntities?: Record<string, string | { regex: RegExp; val: string | EntityValFn }> | null;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Hook called once on the fully decoded string (after all replacements).
|
|
200
|
-
*
|
|
201
|
-
* - Receives `(resolved, original)` and **must return a string**.
|
|
202
|
-
* - To reject expansion, return `original`.
|
|
203
|
-
* - To sanitize, return a cleaned version of `resolved`.
|
|
204
|
-
*
|
|
205
|
-
* @example
|
|
206
|
-
* postCheck: (resolved, original) =>
|
|
207
|
-
* /<[a-z]/i.test(resolved) ? original : resolved
|
|
208
|
-
*/
|
|
209
|
-
postCheck?: ((resolved: string, original: string) => string) | null;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Whether numeric character references (`&#NNN;`, `&#xHH;`) are allowed.
|
|
213
|
-
* @default true
|
|
214
|
-
*/
|
|
215
|
-
numericAllowed?: boolean;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Array of entity names or numeric references to leave unexpanded.
|
|
219
|
-
* @default []
|
|
220
|
-
*/
|
|
221
|
-
leave?: string[];
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Array of entity names or numeric references to remove.
|
|
225
|
-
* @default []
|
|
226
|
-
*/
|
|
227
|
-
remove?: string[];
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Security limits for entity expansion.
|
|
231
|
-
*/
|
|
232
|
-
limit?: EntityDecoderLimitOptions;
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Numeric Character Reference (NCR) policy.
|
|
236
|
-
*/
|
|
237
|
-
ncr?: EntityDecoderNCROptions;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Hook called once **at registration time** for each entity passed to
|
|
241
|
-
* `setExternalEntities()` or `addExternalEntity()`.
|
|
242
|
-
*
|
|
243
|
-
* - `'allow'` (or `ENTITY_ACTION.ALLOW`) — register the entity normally (default)
|
|
244
|
-
* - `'block'` (or `ENTITY_ACTION.BLOCK`) — silently skip; the entity is not stored
|
|
245
|
-
* - `'throw'` (or `ENTITY_ACTION.THROW`) — abort registration with an `Error`
|
|
246
|
-
*
|
|
247
|
-
* The hook receives the entity name (without `&`/`;`) and the resolved string
|
|
248
|
-
* value. It is **not** called during `decode()` — only when entities are added.
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* const dec = new EntityDecoder({
|
|
252
|
-
* onExternalEntity: (name, value) =>
|
|
253
|
-
* DANGEROUS_NAMES.has(name) ? ENTITY_ACTION.BLOCK : ENTITY_ACTION.ALLOW,
|
|
254
|
-
* });
|
|
255
|
-
*/
|
|
256
|
-
onExternalEntity?: EntityRegistrationHook | null;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Hook called once **at registration time** for each entity passed to
|
|
260
|
-
* `addInputEntities()`.
|
|
261
|
-
*
|
|
262
|
-
* Follows the same `'allow' | 'block' | 'throw'` contract as `onExternalEntity`.
|
|
263
|
-
*
|
|
264
|
-
* @example
|
|
265
|
-
* const dec = new EntityDecoder({
|
|
266
|
-
* // Block all input / DOCTYPE entities unconditionally
|
|
267
|
-
* onInputEntity: () => ENTITY_ACTION.BLOCK,
|
|
268
|
-
* });
|
|
269
|
-
*/
|
|
270
|
-
onInputEntity?: EntityRegistrationHook | null;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
// ---------------------------------------------------------------------------
|
|
274
|
-
// EntityDecoder class (default export)
|
|
275
|
-
// ---------------------------------------------------------------------------
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Single‑pass, zero‑regex entity decoder for XML/HTML content.
|
|
279
|
-
*
|
|
280
|
-
* ## Entity lookup priority (highest → lowest)
|
|
281
|
-
* 1. **input / runtime** – injected via `addInputEntities()` (DOCTYPE per document)
|
|
282
|
-
* 2. **persistent external** – set via `setExternalEntities()` / `addExternalEntity()`
|
|
283
|
-
* 3. **base map** – built‑in XML entities + user‑supplied `namedEntities`
|
|
284
|
-
*
|
|
285
|
-
* Numeric references (`&#NNN;`, `&#xHH;`) are resolved directly and count as the `'base'` tier.
|
|
286
|
-
*
|
|
287
|
-
* @example
|
|
288
|
-
* const decoder = new EntityDecoder({
|
|
289
|
-
* namedEntities: COMMON_HTML,
|
|
290
|
-
* maxTotalExpansions: 100
|
|
291
|
-
* });
|
|
292
|
-
* decoder.setExternalEntities({ brand: 'Acme' });
|
|
293
|
-
*
|
|
294
|
-
* decoder.addInputEntities({ version: '1.0' });
|
|
295
|
-
* decoder.decode('&brand; v&version; <'); // 'Acme v1.0 <'
|
|
296
|
-
*
|
|
297
|
-
* decoder.reset(); // clears input entities + counters, keeps external entities
|
|
298
|
-
*/
|
|
299
|
-
export default class EntityDecoder {
|
|
300
|
-
constructor(options?: EntityDecoderOptions);
|
|
301
|
-
|
|
302
|
-
setExternalEntities(
|
|
303
|
-
map: Record<string, string | { regex: RegExp; val: string | EntityValFn }>
|
|
304
|
-
): void;
|
|
305
|
-
|
|
306
|
-
addExternalEntity(key: string, value: string): void;
|
|
307
|
-
|
|
308
|
-
addInputEntities(
|
|
309
|
-
map: Record<
|
|
310
|
-
string,
|
|
311
|
-
| string
|
|
312
|
-
| { regx: RegExp; val: string | EntityValFn }
|
|
313
|
-
| { regex: RegExp; val: string | EntityValFn }
|
|
314
|
-
>
|
|
315
|
-
): void;
|
|
316
|
-
|
|
317
|
-
reset(): this;
|
|
318
|
-
|
|
319
|
-
decode(str: string): string;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
// ---------------------------------------------------------------------------
|
|
323
|
-
// Named entity group exports (for use with `namedEntities` option)
|
|
324
|
-
// ---------------------------------------------------------------------------
|
|
325
|
-
|
|
326
|
-
export const COMMON_HTML: Record<string, string>;
|
|
327
|
-
export const ALL_ENTITIES: Record<string, string>;
|
|
328
|
-
export const XML: Record<string, string>;
|
|
329
|
-
export const BASIC_LATIN: Record<string, string>;
|
|
330
|
-
export const LATIN_ACCENTS: Record<string, string>;
|
|
331
|
-
export const LATIN_EXTENDED: Record<string, string>;
|
|
332
|
-
export const GREEK: Record<string, string>;
|
|
333
|
-
export const CYRILLIC: Record<string, string>;
|
|
334
|
-
export const MATH: Record<string, string>;
|
|
335
|
-
export const MATH_ADVANCED: Record<string, string>;
|
|
336
|
-
export const ARROWS: Record<string, string>;
|
|
337
|
-
export const SHAPES: Record<string, string>;
|
|
338
|
-
export const PUNCTUATION: Record<string, string>;
|
|
339
|
-
export const CURRENCY: Record<string, string>;
|
|
340
|
-
export const FRACTIONS: Record<string, string>;
|
|
341
|
-
export const MISC_SYMBOLS: Record<string, string>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @nodable/entities
|
|
3
|
-
*
|
|
4
|
-
* Standalone, zero-dependency XML/HTML entity replacement.
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export { default as EntityDecoder, ENTITY_ACTION } from './EntityDecoder.js';
|
|
10
|
-
export {
|
|
11
|
-
COMMON_HTML,
|
|
12
|
-
XML,
|
|
13
|
-
ALL_ENTITIES,
|
|
14
|
-
ARROWS,
|
|
15
|
-
BASIC_LATIN,
|
|
16
|
-
CURRENCY,
|
|
17
|
-
MATH,
|
|
18
|
-
MATH_ADVANCED,
|
|
19
|
-
CYRILLIC,
|
|
20
|
-
FRACTIONS,
|
|
21
|
-
GREEK,
|
|
22
|
-
LATIN_ACCENTS,
|
|
23
|
-
LATIN_EXTENDED,
|
|
24
|
-
MISC_SYMBOLS,
|
|
25
|
-
PUNCTUATION,
|
|
26
|
-
SHAPES,
|
|
27
|
-
} from './entities.js';
|
|
28
|
-
|
|
29
|
-
export { default as EntityEncoder } from './EntityEncoder.js';
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { fromUtf8 } from "@smithy/core/serde";
|
|
2
|
-
import { BLOCK_SIZE, DIGEST_LENGTH, INIT } from "./constants";
|
|
3
|
-
export class Md5 {
|
|
4
|
-
state;
|
|
5
|
-
buffer;
|
|
6
|
-
bufferLength;
|
|
7
|
-
bytesHashed;
|
|
8
|
-
finished;
|
|
9
|
-
constructor() {
|
|
10
|
-
this.reset();
|
|
11
|
-
}
|
|
12
|
-
update(sourceData) {
|
|
13
|
-
if (isEmptyData(sourceData)) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
else if (this.finished) {
|
|
17
|
-
throw new Error("Attempted to update an already finished hash.");
|
|
18
|
-
}
|
|
19
|
-
const data = convertToBuffer(sourceData);
|
|
20
|
-
let position = 0;
|
|
21
|
-
let { byteLength } = data;
|
|
22
|
-
this.bytesHashed += byteLength;
|
|
23
|
-
while (byteLength > 0) {
|
|
24
|
-
this.buffer.setUint8(this.bufferLength++, data[position++]);
|
|
25
|
-
byteLength--;
|
|
26
|
-
if (this.bufferLength === BLOCK_SIZE) {
|
|
27
|
-
this.hashBuffer();
|
|
28
|
-
this.bufferLength = 0;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
async digest() {
|
|
33
|
-
if (!this.finished) {
|
|
34
|
-
const { buffer, bufferLength: undecoratedLength, bytesHashed } = this;
|
|
35
|
-
const bitsHashed = bytesHashed * 8;
|
|
36
|
-
buffer.setUint8(this.bufferLength++, 0b10000000);
|
|
37
|
-
if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {
|
|
38
|
-
for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {
|
|
39
|
-
buffer.setUint8(i, 0);
|
|
40
|
-
}
|
|
41
|
-
this.hashBuffer();
|
|
42
|
-
this.bufferLength = 0;
|
|
43
|
-
}
|
|
44
|
-
for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {
|
|
45
|
-
buffer.setUint8(i, 0);
|
|
46
|
-
}
|
|
47
|
-
buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);
|
|
48
|
-
buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);
|
|
49
|
-
this.hashBuffer();
|
|
50
|
-
this.finished = true;
|
|
51
|
-
}
|
|
52
|
-
const out = new DataView(new ArrayBuffer(DIGEST_LENGTH));
|
|
53
|
-
for (let i = 0; i < 4; i++) {
|
|
54
|
-
out.setUint32(i * 4, this.state[i], true);
|
|
55
|
-
}
|
|
56
|
-
return new Uint8Array(out.buffer, out.byteOffset, out.byteLength);
|
|
57
|
-
}
|
|
58
|
-
hashBuffer() {
|
|
59
|
-
const { buffer, state } = this;
|
|
60
|
-
let a = state[0], b = state[1], c = state[2], d = state[3];
|
|
61
|
-
a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);
|
|
62
|
-
d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);
|
|
63
|
-
c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);
|
|
64
|
-
b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);
|
|
65
|
-
a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);
|
|
66
|
-
d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);
|
|
67
|
-
c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);
|
|
68
|
-
b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);
|
|
69
|
-
a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);
|
|
70
|
-
d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);
|
|
71
|
-
c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);
|
|
72
|
-
b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);
|
|
73
|
-
a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);
|
|
74
|
-
d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);
|
|
75
|
-
c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);
|
|
76
|
-
b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);
|
|
77
|
-
a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);
|
|
78
|
-
d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);
|
|
79
|
-
c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);
|
|
80
|
-
b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);
|
|
81
|
-
a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);
|
|
82
|
-
d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);
|
|
83
|
-
c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);
|
|
84
|
-
b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);
|
|
85
|
-
a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);
|
|
86
|
-
d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);
|
|
87
|
-
c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);
|
|
88
|
-
b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);
|
|
89
|
-
a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);
|
|
90
|
-
d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);
|
|
91
|
-
c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);
|
|
92
|
-
b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);
|
|
93
|
-
a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);
|
|
94
|
-
d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);
|
|
95
|
-
c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);
|
|
96
|
-
b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);
|
|
97
|
-
a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);
|
|
98
|
-
d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);
|
|
99
|
-
c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);
|
|
100
|
-
b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);
|
|
101
|
-
a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);
|
|
102
|
-
d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);
|
|
103
|
-
c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);
|
|
104
|
-
b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);
|
|
105
|
-
a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);
|
|
106
|
-
d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);
|
|
107
|
-
c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);
|
|
108
|
-
b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);
|
|
109
|
-
a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);
|
|
110
|
-
d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);
|
|
111
|
-
c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);
|
|
112
|
-
b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);
|
|
113
|
-
a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);
|
|
114
|
-
d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);
|
|
115
|
-
c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);
|
|
116
|
-
b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);
|
|
117
|
-
a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);
|
|
118
|
-
d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);
|
|
119
|
-
c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);
|
|
120
|
-
b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);
|
|
121
|
-
a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);
|
|
122
|
-
d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);
|
|
123
|
-
c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);
|
|
124
|
-
b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);
|
|
125
|
-
state[0] = (a + state[0]) & 0xffffffff;
|
|
126
|
-
state[1] = (b + state[1]) & 0xffffffff;
|
|
127
|
-
state[2] = (c + state[2]) & 0xffffffff;
|
|
128
|
-
state[3] = (d + state[3]) & 0xffffffff;
|
|
129
|
-
}
|
|
130
|
-
reset() {
|
|
131
|
-
this.state = Uint32Array.from(INIT);
|
|
132
|
-
this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));
|
|
133
|
-
this.bufferLength = 0;
|
|
134
|
-
this.bytesHashed = 0;
|
|
135
|
-
this.finished = false;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
function cmn(q, a, b, x, s, t) {
|
|
139
|
-
a = (((a + q) & 0xffffffff) + ((x + t) & 0xffffffff)) & 0xffffffff;
|
|
140
|
-
return (((a << s) | (a >>> (32 - s))) + b) & 0xffffffff;
|
|
141
|
-
}
|
|
142
|
-
function ff(a, b, c, d, x, s, t) {
|
|
143
|
-
return cmn((b & c) | (~b & d), a, b, x, s, t);
|
|
144
|
-
}
|
|
145
|
-
function gg(a, b, c, d, x, s, t) {
|
|
146
|
-
return cmn((b & d) | (c & ~d), a, b, x, s, t);
|
|
147
|
-
}
|
|
148
|
-
function hh(a, b, c, d, x, s, t) {
|
|
149
|
-
return cmn(b ^ c ^ d, a, b, x, s, t);
|
|
150
|
-
}
|
|
151
|
-
function ii(a, b, c, d, x, s, t) {
|
|
152
|
-
return cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
153
|
-
}
|
|
154
|
-
function isEmptyData(data) {
|
|
155
|
-
if (typeof data === "string") {
|
|
156
|
-
return data.length === 0;
|
|
157
|
-
}
|
|
158
|
-
return data.byteLength === 0;
|
|
159
|
-
}
|
|
160
|
-
function convertToBuffer(data) {
|
|
161
|
-
if (typeof data === "string") {
|
|
162
|
-
return fromUtf8(data);
|
|
163
|
-
}
|
|
164
|
-
if (ArrayBuffer.isView(data)) {
|
|
165
|
-
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
166
|
-
}
|
|
167
|
-
return new Uint8Array(data);
|
|
168
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Checksum, SourceData } from "@smithy/types";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare class Md5 implements Checksum {
|
|
6
|
-
private state;
|
|
7
|
-
private buffer;
|
|
8
|
-
private bufferLength;
|
|
9
|
-
private bytesHashed;
|
|
10
|
-
private finished;
|
|
11
|
-
constructor();
|
|
12
|
-
update(sourceData: SourceData): void;
|
|
13
|
-
digest(): Promise<Uint8Array>;
|
|
14
|
-
private hashBuffer;
|
|
15
|
-
reset(): void;
|
|
16
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { fromBase64 } from "@smithy/core/serde";
|
|
2
|
-
export const streamCollector = async (stream) => {
|
|
3
|
-
if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") {
|
|
4
|
-
if (Blob.prototype.arrayBuffer !== undefined) {
|
|
5
|
-
return new Uint8Array(await stream.arrayBuffer());
|
|
6
|
-
}
|
|
7
|
-
return collectBlob(stream);
|
|
8
|
-
}
|
|
9
|
-
return collectStream(stream);
|
|
10
|
-
};
|
|
11
|
-
async function collectBlob(blob) {
|
|
12
|
-
const base64 = await readToBase64(blob);
|
|
13
|
-
const arrayBuffer = fromBase64(base64);
|
|
14
|
-
return new Uint8Array(arrayBuffer);
|
|
15
|
-
}
|
|
16
|
-
async function collectStream(stream) {
|
|
17
|
-
const chunks = [];
|
|
18
|
-
const reader = stream.getReader();
|
|
19
|
-
let isDone = false;
|
|
20
|
-
let length = 0;
|
|
21
|
-
while (!isDone) {
|
|
22
|
-
const { done, value } = await reader.read();
|
|
23
|
-
if (value) {
|
|
24
|
-
chunks.push(value);
|
|
25
|
-
length += value.length;
|
|
26
|
-
}
|
|
27
|
-
isDone = done;
|
|
28
|
-
}
|
|
29
|
-
const collected = new Uint8Array(length);
|
|
30
|
-
let offset = 0;
|
|
31
|
-
for (const chunk of chunks) {
|
|
32
|
-
collected.set(chunk, offset);
|
|
33
|
-
offset += chunk.length;
|
|
34
|
-
}
|
|
35
|
-
return collected;
|
|
36
|
-
}
|
|
37
|
-
function readToBase64(blob) {
|
|
38
|
-
return new Promise((resolve, reject) => {
|
|
39
|
-
const reader = new FileReader();
|
|
40
|
-
reader.onloadend = () => {
|
|
41
|
-
if (reader.readyState !== 2) {
|
|
42
|
-
return reject(new Error("Reader aborted too early"));
|
|
43
|
-
}
|
|
44
|
-
const result = (reader.result ?? "");
|
|
45
|
-
const commaIndex = result.indexOf(",");
|
|
46
|
-
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
47
|
-
resolve(result.substring(dataOffset));
|
|
48
|
-
};
|
|
49
|
-
reader.onabort = () => reject(new Error("Read aborted"));
|
|
50
|
-
reader.onerror = () => reject(reader.error);
|
|
51
|
-
reader.readAsDataURL(blob);
|
|
52
|
-
});
|
|
53
|
-
}
|