lambda-live-debugger 1.12.8 → 1.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension/extension.zip +0 -0
- package/dist/extension/nodejs/node_modules/interceptor.js +9759 -9028
- package/dist/extension/nodejs/node_modules/interceptor.js.map +4 -4
- package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js +2 -1
- package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/sha/index.js +464 -40
- package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/xxh/index.js +914 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/flexible-checksums/stringUnionSelector.js +2 -1
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/index.browser.js +2 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/index.js +3 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512.js +71 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512Js.js +276 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512WebCrypto.js +76 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/U64.js +190 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/Xxh3.js +274 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/index.js +3 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash3_128/Xxh3_128.js +179 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash3_64/Xxh3_64.js +117 -0
- package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash64/Xxh64.js +150 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/index.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/index.d.ts +3 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512.d.ts +17 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512Js.d.ts +29 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512WebCrypto.d.ts +22 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/U64.d.ts +110 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/Xxh3.d.ts +139 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/index.d.ts +3 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash3_128/Xxh3_128.d.ts +37 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash3_64/Xxh3_64.d.ts +27 -0
- package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash64/Xxh64.d.ts +41 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/index.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/index.d.ts +3 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512.d.ts +12 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512Js.d.ts +22 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512WebCrypto.d.ts +14 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/U64.d.ts +27 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/Xxh3.d.ts +65 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/index.d.ts +3 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash3_128/Xxh3_128.d.ts +12 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash3_64/Xxh3_64.d.ts +10 -0
- package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash64/Xxh64.d.ts +17 -0
- package/node_modules/@aws-sdk/checksums/package.json +16 -6
- package/node_modules/@aws-sdk/checksums/xxh.d.ts +5 -0
- package/node_modules/@aws-sdk/checksums/xxh.js +5 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +38 -6
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/CloudFormationServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/errors.js +29 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/schemas/schemas_0.js +5 -4
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +187 -181
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ContinueUpdateRollbackCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/CloudFormationServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/errors.d.ts +29 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +27 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +184 -180
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/CloudFormationServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/errors.d.ts +29 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +44 -4
- package/node_modules/@aws-sdk/client-iam/dist-es/models/IAMServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-iam/dist-es/models/errors.js +38 -0
- package/node_modules/@aws-sdk/client-iam/dist-es/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/client-iam/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-iam/dist-types/IAM.d.ts +367 -361
- package/node_modules/@aws-sdk/client-iam/dist-types/IAMClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/models/IAMServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/models/errors.d.ts +38 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/IAM.d.ts +364 -363
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/IAMServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/errors.d.ts +38 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iam/package.json +9 -9
- package/node_modules/@aws-sdk/client-iot/dist-cjs/index.js +39 -4
- package/node_modules/@aws-sdk/client-iot/dist-es/models/IoTServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-iot/dist-es/models/errors.js +33 -0
- package/node_modules/@aws-sdk/client-iot/dist-es/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-iot/dist-types/IoT.d.ts +551 -545
- package/node_modules/@aws-sdk/client-iot/dist-types/IoTClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/models/IoTServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/models/errors.d.ts +33 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/models/models_1.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/models/models_2.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot/dist-types/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/IoT.d.ts +548 -547
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/IoTServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/errors.d.ts +33 -0
- package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot/package.json +8 -8
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-cjs/index.js +18 -4
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/models/IoTDataPlaneServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/models/errors.js +12 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/IoTDataPlane.d.ts +29 -23
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/IoTDataPlaneClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/models/IoTDataPlaneServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/models/errors.d.ts +12 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/IoTDataPlane.d.ts +29 -22
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/models/IoTDataPlaneServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/models/errors.d.ts +12 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/client-iot-data-plane/package.json +8 -8
- package/node_modules/@aws-sdk/client-lambda/README.md +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +83 -12
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/LambdaServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +12 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +56 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +12 -11
- package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +184 -178
- package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CheckpointDurableExecutionCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateAliasCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateCapacityProviderCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +9 -7
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteAliasCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetAliasCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +4 -4
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +10 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListAliasesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListEventSourceMappingsCommand.d.ts +4 -3
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionRecursionConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateAliasCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +8 -6
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionCodeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/LambdaServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +20 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +56 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +30 -20
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/Lambda.d.ts +180 -176
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/LambdaServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +14 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +56 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +9 -9
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +63 -17
- package/node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +8 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +21 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +30 -16
- package/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +231 -225
- package/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +3 -2
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +4 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/models/S3ServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +16 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/errors.d.ts +21 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +186 -49
- package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +43 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +228 -224
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/S3ServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +9 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/errors.d.ts +21 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +23 -7
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
- package/node_modules/@aws-sdk/client-s3/package.json +13 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -10
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +104 -1549
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +7 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +12 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +3 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +11 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/credential-providers/README.md +1 -1
- package/node_modules/@aws-sdk/credential-providers/package.json +16 -16
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js +36 -17
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3-control/index.js +6 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.js +6 -3
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-region-redirect/region-redirect-middleware.js +2 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.js +8 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.js +18 -8
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-ssec/middleware-ssec.js +2 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.js +4 -2
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.js +2 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +15 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +17 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +10 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +17 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +24 -12
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +12 -7
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +12 -39
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +24 -4
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +4 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +4 -0
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@inquirer/ansi/README.md +35 -3
- package/node_modules/@inquirer/ansi/package.json +4 -4
- package/node_modules/@inquirer/checkbox/README.md +75 -5
- package/node_modules/@inquirer/checkbox/dist/index.d.ts +7 -7
- package/node_modules/@inquirer/checkbox/dist/index.js +4 -0
- package/node_modules/@inquirer/checkbox/package.json +8 -8
- package/node_modules/@inquirer/confirm/README.md +81 -5
- package/node_modules/@inquirer/confirm/dist/index.d.ts +13 -3
- package/node_modules/@inquirer/confirm/dist/index.js +30 -7
- package/node_modules/@inquirer/confirm/package.json +6 -6
- package/node_modules/@inquirer/core/README.md +35 -3
- package/node_modules/@inquirer/core/dist/index.js +12 -12
- package/node_modules/@inquirer/core/dist/lib/create-prompt.js +84 -55
- package/node_modules/@inquirer/core/dist/lib/hook-engine.js +9 -11
- package/node_modules/@inquirer/core/dist/lib/make-theme.js +3 -3
- package/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js +2 -2
- package/node_modules/@inquirer/core/dist/lib/screen-manager.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/theme.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-effect.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-keypress.js +3 -3
- package/node_modules/@inquirer/core/dist/lib/use-memo.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-prefix.js +3 -3
- package/node_modules/@inquirer/core/dist/lib/use-ref.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/use-state.js +1 -1
- package/node_modules/@inquirer/core/dist/lib/utils.js +1 -1
- package/node_modules/@inquirer/core/package.json +7 -7
- package/node_modules/@inquirer/editor/README.md +75 -5
- package/node_modules/@inquirer/editor/dist/index.d.ts +6 -6
- package/node_modules/@inquirer/editor/package.json +7 -7
- package/node_modules/@inquirer/expand/README.md +75 -5
- package/node_modules/@inquirer/expand/dist/index.d.ts +3 -3
- package/node_modules/@inquirer/expand/dist/index.js +3 -3
- package/node_modules/@inquirer/expand/package.json +6 -6
- package/node_modules/@inquirer/external-editor/README.md +35 -3
- package/node_modules/@inquirer/external-editor/dist/index.js +4 -4
- package/node_modules/@inquirer/external-editor/package.json +4 -4
- package/node_modules/@inquirer/figures/package.json +3 -3
- package/node_modules/@inquirer/input/README.md +75 -5
- package/node_modules/@inquirer/input/dist/index.d.ts +9 -9
- package/node_modules/@inquirer/input/package.json +6 -6
- package/node_modules/@inquirer/number/README.md +75 -5
- package/node_modules/@inquirer/number/dist/index.d.ts +5 -5
- package/node_modules/@inquirer/number/dist/index.js +2 -2
- package/node_modules/@inquirer/number/package.json +6 -6
- package/node_modules/@inquirer/password/README.md +75 -5
- package/node_modules/@inquirer/password/dist/index.d.ts +4 -4
- package/node_modules/@inquirer/password/dist/index.js +1 -1
- package/node_modules/@inquirer/password/package.json +7 -7
- package/node_modules/@inquirer/prompts/README.md +24 -6
- package/node_modules/@inquirer/prompts/package.json +15 -15
- package/node_modules/@inquirer/rawlist/README.md +75 -5
- package/node_modules/@inquirer/rawlist/dist/index.d.ts +3 -3
- package/node_modules/@inquirer/rawlist/dist/index.js +5 -4
- package/node_modules/@inquirer/rawlist/package.json +6 -6
- package/node_modules/@inquirer/search/README.md +74 -4
- package/node_modules/@inquirer/search/dist/index.d.ts +4 -4
- package/node_modules/@inquirer/search/dist/index.js +1 -1
- package/node_modules/@inquirer/search/package.json +7 -7
- package/node_modules/@inquirer/select/README.md +75 -5
- package/node_modules/@inquirer/select/dist/index.d.ts +4 -4
- package/node_modules/@inquirer/select/package.json +8 -8
- package/node_modules/@inquirer/type/dist/index.js +2 -2
- package/node_modules/@inquirer/type/dist/utils.d.ts +11 -0
- package/node_modules/@inquirer/type/dist/utils.js +15 -1
- package/node_modules/@inquirer/type/package.json +3 -3
- package/node_modules/@nodable/entities/package.json +2 -2
- package/node_modules/@nodable/entities/src/index.d.ts +5 -2
- package/node_modules/@smithy/core/CHANGELOG.md +95 -0
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +67 -90
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +100 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +12 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1785 -19
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +64 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +68 -27
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +15 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +32 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +15 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +34 -59
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -16
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +25 -3
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +44 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
- package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +53 -10
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +79 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +12 -3
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +12 -3
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +17 -4
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +20 -7
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
- package/node_modules/@smithy/core/dist-es/submodules/serde/writeKey.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +10 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +19 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +19 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
- package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/errors.d.ts +5 -0
- package/node_modules/@smithy/core/errors.js +5 -0
- package/node_modules/@smithy/core/package.json +12 -2
- package/node_modules/@smithy/fetch-http-handler/CHANGELOG.md +17 -0
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +12 -5
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +8 -3
- package/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +4 -2
- package/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +12 -1
- package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
- package/node_modules/@smithy/node-http-handler/CHANGELOG.md +45 -0
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +84 -29
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +23 -11
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +26 -2
- package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +30 -15
- package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +10 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +10 -1
- package/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/@smithy/signature-v4/CHANGELOG.md +24 -0
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +39 -12
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +7 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +9 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +13 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +5 -1
- package/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@smithy/types/CHANGELOG.md +12 -0
- package/node_modules/@smithy/types/dist-types/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +11 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +8 -7
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +11 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/buffer.d.ts +1 -0
- package/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +22 -10
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/node/ffi.d.ts +14 -0
- package/node_modules/@types/node/http.d.ts +1 -1
- package/node_modules/@types/node/http2.d.ts +3 -2
- package/node_modules/@types/node/net.d.ts +16 -4
- package/node_modules/@types/node/package.json +3 -18
- package/node_modules/@types/node/perf_hooks.d.ts +31 -19
- package/node_modules/@types/node/process.d.ts +1 -0
- package/node_modules/@types/node/quic.d.ts +45 -5
- package/node_modules/@types/node/stream/iter.d.ts +9 -12
- package/node_modules/@types/node/stream/web.d.ts +20 -0
- package/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@types/node/test.d.ts +72 -0
- package/node_modules/@types/node/tls.d.ts +40 -25
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@types/node/vfs.d.ts +7 -6
- package/node_modules/@types/node/vm.d.ts +2 -1
- package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
- package/node_modules/@types/node/worker_threads.d.ts +4 -1
- package/node_modules/@types/node/zlib.d.ts +775 -0
- package/node_modules/chalk/package.json +1 -1
- package/node_modules/chalk/source/index.js +2 -1
- package/node_modules/commander/Readme.md +6 -32
- package/node_modules/commander/index.js +1 -1
- package/node_modules/commander/lib/command.js +22 -9
- package/node_modules/commander/lib/help.js +6 -2
- package/node_modules/commander/lib/option.js +1 -1
- package/node_modules/commander/package.json +2 -1
- package/node_modules/commander/typings/index.d.ts +6 -3
- package/node_modules/fast-xml-builder/CHANGELOG.md +12 -0
- package/node_modules/fast-xml-builder/README.md +4 -1
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -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 +6 -10
- package/node_modules/fast-xml-builder/src/fxb.js +34 -24
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +18 -17
- package/node_modules/fast-xml-builder/src/util.js +10 -3
- package/node_modules/fast-xml-parser/CHANGELOG.md +15 -0
- package/node_modules/fast-xml-parser/README.md +9 -9
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/fast-xml-parser/lib/fxp.d.cts +3 -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 +6 -6
- package/node_modules/fast-xml-parser/src/fxp.d.ts +1 -1
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +47 -11
- package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +7 -1
- package/node_modules/inquirer/README.md +35 -3
- package/node_modules/inquirer/dist/index.js +2 -1
- package/node_modules/inquirer/dist/ui/prompt.js +3 -2
- package/node_modules/inquirer/package.json +8 -8
- package/node_modules/is-unsafe/README.md +34 -1
- package/node_modules/is-unsafe/package.json +3 -3
- package/node_modules/is-unsafe/src/contexts/xml.js +2 -1
- package/node_modules/is-unsafe/src/index.d.ts +9 -1
- package/node_modules/is-unsafe/src/index.js +29 -2
- package/node_modules/is-unsafe/src/util/decode-entities.js +48 -0
- package/node_modules/strnum/CHANGELOG.md +6 -0
- package/node_modules/strnum/package.json +1 -1
- package/node_modules/strnum/strnum.js +10 -9
- package/node_modules/toml/lib/compiler.js +101 -144
- package/node_modules/toml/lib/parser.js +20 -4
- package/node_modules/toml/package.json +1 -1
- package/node_modules/undici-types/client.d.ts +8 -3
- package/node_modules/undici-types/connector.d.ts +1 -0
- package/node_modules/undici-types/cookies.d.ts +1 -1
- package/node_modules/undici-types/dispatcher.d.ts +3 -3
- package/node_modules/undici-types/errors.d.ts +10 -0
- package/node_modules/undici-types/fetch.d.ts +5 -1
- package/node_modules/undici-types/handlers.d.ts +2 -0
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/proxy-agent.d.ts +7 -0
- package/node_modules/xml-naming/README.md +99 -1
- package/node_modules/xml-naming/package.json +4 -2
- package/node_modules/xml-naming/src/index.d.ts +34 -0
- package/node_modules/xml-naming/src/index.js +134 -22
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/package.json +1 -1
- package/package.json +25 -25
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- package/node_modules/@inquirer/core/dist/lib/promise-polyfill.d.ts +0 -7
- package/node_modules/@inquirer/core/dist/lib/promise-polyfill.js +0 -14
- package/node_modules/fast-xml-parser/node_modules/xml-naming/README.md +0 -287
- package/node_modules/fast-xml-parser/node_modules/xml-naming/package.json +0 -56
- package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.d.ts +0 -108
- package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.js +0 -382
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
- /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
- /package/node_modules/{fast-xml-parser/node_modules/xml-naming → xml-naming}/LICENSE +0 -0
|
@@ -178,7 +178,8 @@ const createBuilder = (self, _styler, _isEmpty) => {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
if (arguments_.length === 2) {
|
|
181
|
-
|
|
181
|
+
// The template literal matches `Array#join` coercion (`null` and `undefined` become empty, objects use `toString`) while being faster.
|
|
182
|
+
return applyStyle(builder, `${arguments_[0] ?? ''} ${arguments_[1] ?? ''}`);
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
return applyStyle(builder, arguments_.join(' '));
|
|
@@ -44,7 +44,6 @@ Read this in other languages: English | [简体中文](./Readme_zh-CN.md)
|
|
|
44
44
|
- [Bits and pieces](#bits-and-pieces)
|
|
45
45
|
- [.parse() and .parseAsync()](#parse-and-parseasync)
|
|
46
46
|
- [Parsing Configuration](#parsing-configuration)
|
|
47
|
-
- [Legacy options as properties](#legacy-options-as-properties)
|
|
48
47
|
- [TypeScript](#typescript)
|
|
49
48
|
- [createCommand()](#createcommand)
|
|
50
49
|
- [Node options such as `--harmony`](#node-options-such-as---harmony)
|
|
@@ -54,7 +53,6 @@ Read this in other languages: English | [简体中文](./Readme_zh-CN.md)
|
|
|
54
53
|
- [Override exit and output handling](#override-exit-and-output-handling)
|
|
55
54
|
- [Additional documentation](#additional-documentation)
|
|
56
55
|
- [Support](#support)
|
|
57
|
-
- [Commander for enterprise](#commander-for-enterprise)
|
|
58
56
|
|
|
59
57
|
For information about terms used in this document see: [terminology](./docs/terminology.md)
|
|
60
58
|
|
|
@@ -367,7 +365,8 @@ Example file: [options-variadic.js](./examples/options-variadic.js)
|
|
|
367
365
|
```js
|
|
368
366
|
program
|
|
369
367
|
.option('-n, --number <numbers...>', 'specify numbers')
|
|
370
|
-
.option('-l, --letter [letters...]', 'specify letters')
|
|
368
|
+
.option('-l, --letter [letters...]', 'specify letters')
|
|
369
|
+
.argument('[operand]');
|
|
371
370
|
|
|
372
371
|
program.parse();
|
|
373
372
|
|
|
@@ -380,10 +379,10 @@ $ collect -n 1 2 3 --letter a b c
|
|
|
380
379
|
Options: { number: [ '1', '2', '3' ], letter: [ 'a', 'b', 'c' ] }
|
|
381
380
|
Remaining arguments: []
|
|
382
381
|
$ collect --letter=A -n80 operand
|
|
383
|
-
Options: {
|
|
382
|
+
Options: { letter: [ 'A' ], number: [ '80' ] }
|
|
384
383
|
Remaining arguments: [ 'operand' ]
|
|
385
384
|
$ collect --letter -n 1 -n 2 3 -- operand
|
|
386
|
-
Options: { number: [ '1', '2', '3' ]
|
|
385
|
+
Options: { letter: true, number: [ '1', '2', '3' ] }
|
|
387
386
|
Remaining arguments: [ 'operand' ]
|
|
388
387
|
```
|
|
389
388
|
|
|
@@ -670,7 +669,7 @@ Example file: [action-this.js](./examples/action-this.js)
|
|
|
670
669
|
program
|
|
671
670
|
.command('serve')
|
|
672
671
|
.argument('<script>')
|
|
673
|
-
.option('-p, --port <number>', 'port number', 80)
|
|
672
|
+
.option('-p, --port <number>', 'port number', '80')
|
|
674
673
|
.action(function() {
|
|
675
674
|
console.error('Run script %s on port %s', this.args[0], this.opts().port);
|
|
676
675
|
});
|
|
@@ -1016,25 +1015,6 @@ By default, the option processing shows an error for an unknown option. To have
|
|
|
1016
1015
|
By default, the argument processing displays an error for more command-arguments than expected.
|
|
1017
1016
|
To suppress the error for excess arguments, use `.allowExcessArguments()`.
|
|
1018
1017
|
|
|
1019
|
-
### Legacy options as properties
|
|
1020
|
-
|
|
1021
|
-
Before Commander 7, the option values were stored as properties on the command.
|
|
1022
|
-
This was convenient to code, but the downside was possible clashes with
|
|
1023
|
-
existing properties of `Command`.
|
|
1024
|
-
|
|
1025
|
-
You can revert to the old behaviour to run unmodified legacy code by using `.storeOptionsAsProperties()`.
|
|
1026
|
-
|
|
1027
|
-
```js
|
|
1028
|
-
program
|
|
1029
|
-
.storeOptionsAsProperties()
|
|
1030
|
-
.option('-d, --debug')
|
|
1031
|
-
.action((commandAndOptions) => {
|
|
1032
|
-
if (commandAndOptions.debug) {
|
|
1033
|
-
console.error(`Called ${commandAndOptions.name()}`);
|
|
1034
|
-
}
|
|
1035
|
-
});
|
|
1036
|
-
```
|
|
1037
|
-
|
|
1038
1018
|
### TypeScript
|
|
1039
1019
|
|
|
1040
1020
|
**extra-typings:** There is an optional project to infer extra type information from the option and argument definitions.
|
|
@@ -1075,7 +1055,7 @@ You can enable `--harmony` option in two ways:
|
|
|
1075
1055
|
|
|
1076
1056
|
An executable subcommand is launched as a separate child process.
|
|
1077
1057
|
|
|
1078
|
-
If you are using the node inspector for [debugging](https://nodejs.org/en/
|
|
1058
|
+
If you are using the node inspector for [debugging](https://nodejs.org/en/learn/getting-started/debugging) executable subcommands using `node --inspect` et al.,
|
|
1079
1059
|
the inspector port is incremented by 1 for the spawned subcommand.
|
|
1080
1060
|
|
|
1081
1061
|
If you are using VSCode to debug executable subcommands you need to set the `"autoAttachChildProcesses": true` flag in your `launch.json` configuration.
|
|
@@ -1164,9 +1144,3 @@ The current version of Commander is fully supported on Long Term Support version
|
|
|
1164
1144
|
Older major versions of Commander receive security updates for 12 months. For more see: [Release Policy](./docs/release-policy.md).
|
|
1165
1145
|
|
|
1166
1146
|
The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub.
|
|
1167
|
-
|
|
1168
|
-
### Commander for enterprise
|
|
1169
|
-
|
|
1170
|
-
Available as part of the Tidelift Subscription
|
|
1171
|
-
|
|
1172
|
-
The maintainers of Commander and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-commander?utm_source=npm-commander&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
|
@@ -18,4 +18,4 @@ export const createArgument = (name, description) =>
|
|
|
18
18
|
|
|
19
19
|
export { Command, Option, Argument, Help };
|
|
20
20
|
export { CommanderError, InvalidArgumentError };
|
|
21
|
-
export { InvalidArgumentError as InvalidOptionArgumentError };
|
|
21
|
+
export { InvalidArgumentError as InvalidOptionArgumentError };
|
|
@@ -975,7 +975,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
975
975
|
// global overwrites local, like optsWithGlobals
|
|
976
976
|
let source;
|
|
977
977
|
this._getCommandAndAncestors().forEach((cmd) => {
|
|
978
|
-
if (cmd.
|
|
978
|
+
if (Object.hasOwn(cmd._optionValueSources, key)) {
|
|
979
979
|
source = cmd.getOptionValueSource(key);
|
|
980
980
|
}
|
|
981
981
|
});
|
|
@@ -1768,7 +1768,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1768
1768
|
|
|
1769
1769
|
const negativeNumberArg = (arg) => {
|
|
1770
1770
|
// return false if not a negative number
|
|
1771
|
-
if (!/^-(\d+|\d*\.\d+)(
|
|
1771
|
+
if (!/^-(\d+|\d*\.\d+)([eE][+-]?\d+)?$/.test(arg)) return false;
|
|
1772
1772
|
// negative number is ok unless digit used as an option in command hierarchy
|
|
1773
1773
|
return !this._getCommandAndAncestors().some((cmd) =>
|
|
1774
1774
|
cmd.options
|
|
@@ -2366,7 +2366,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2366
2366
|
* (This does not override a group set directly on the subcommand using .helpGroup().)
|
|
2367
2367
|
*
|
|
2368
2368
|
* @example
|
|
2369
|
-
* program.commandsGroup('Development Commands:);
|
|
2369
|
+
* program.commandsGroup('Development Commands:');
|
|
2370
2370
|
* program.command('watch')...
|
|
2371
2371
|
* program.command('lint')...
|
|
2372
2372
|
* ...
|
|
@@ -2562,7 +2562,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2562
2562
|
* Pass in false to disable the built-in help option.
|
|
2563
2563
|
*
|
|
2564
2564
|
* @example
|
|
2565
|
-
* program.helpOption('-?, --help' 'show help'); // customise
|
|
2565
|
+
* program.helpOption('-?, --help', 'show help'); // customise
|
|
2566
2566
|
* program.helpOption(false); // disable
|
|
2567
2567
|
*
|
|
2568
2568
|
* @param {(string | boolean)} flags
|
|
@@ -2720,7 +2720,12 @@ function incrementNodeInspectorPort(args) {
|
|
|
2720
2720
|
// Testing for these options:
|
|
2721
2721
|
// --inspect[=[host:]port]
|
|
2722
2722
|
// --inspect-brk[=[host:]port]
|
|
2723
|
+
// --inspect-wait[=[host:]port]
|
|
2723
2724
|
// --inspect-port=[host:]port
|
|
2725
|
+
//
|
|
2726
|
+
// Host can be an IP literal encapsulated within square brackets (e.g. [::1]),
|
|
2727
|
+
// an IPv4 address in dotted-decimal form (e.g. 192.168.0.1), or a registered name.
|
|
2728
|
+
// https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.2
|
|
2724
2729
|
return args.map((arg) => {
|
|
2725
2730
|
if (!arg.startsWith('--inspect')) {
|
|
2726
2731
|
return arg;
|
|
@@ -2729,24 +2734,32 @@ function incrementNodeInspectorPort(args) {
|
|
|
2729
2734
|
let debugHost = '127.0.0.1';
|
|
2730
2735
|
let debugPort = '9229';
|
|
2731
2736
|
let match;
|
|
2732
|
-
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
2737
|
+
if ((match = arg.match(/^(--inspect(-brk|-wait)?)$/)) !== null) {
|
|
2733
2738
|
// e.g. --inspect
|
|
2734
2739
|
debugOption = match[1];
|
|
2735
2740
|
} else if (
|
|
2736
|
-
(match = arg.match(
|
|
2741
|
+
(match = arg.match(
|
|
2742
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+)$/,
|
|
2743
|
+
)) !== null
|
|
2737
2744
|
) {
|
|
2745
|
+
// Matches a host or a port, but not both. No colon to separate them.
|
|
2738
2746
|
debugOption = match[1];
|
|
2739
2747
|
if (/^\d+$/.test(match[3])) {
|
|
2748
|
+
// Plain digits so a port number.
|
|
2740
2749
|
// e.g. --inspect=1234
|
|
2741
2750
|
debugPort = match[3];
|
|
2742
2751
|
} else {
|
|
2743
|
-
//
|
|
2752
|
+
// Assume a host.
|
|
2753
|
+
// e.g. --inspect=localhost, --inspect=[::1], --inspect=192.168.0.1
|
|
2744
2754
|
debugHost = match[3];
|
|
2745
2755
|
}
|
|
2746
2756
|
} else if (
|
|
2747
|
-
(match = arg.match(
|
|
2757
|
+
(match = arg.match(
|
|
2758
|
+
/^(--inspect(-brk|-port|-wait)?)=(\[[^\]]+\]|[^:]+):(\d+)$/,
|
|
2759
|
+
)) !== null
|
|
2748
2760
|
) {
|
|
2749
|
-
//
|
|
2761
|
+
// Matched host:port pattern.
|
|
2762
|
+
// e.g. --inspect=localhost:1234, --inspect=[::1]:1234, --inspect=192.168.0.1:1234
|
|
2750
2763
|
debugOption = match[1];
|
|
2751
2764
|
debugHost = match[3];
|
|
2752
2765
|
debugPort = match[4];
|
|
@@ -89,11 +89,15 @@ export class Help {
|
|
|
89
89
|
visibleOptions.push(helpOption); // no changes needed
|
|
90
90
|
} else if (helpOption.long && !removeLong) {
|
|
91
91
|
visibleOptions.push(
|
|
92
|
-
cmd
|
|
92
|
+
cmd
|
|
93
|
+
.createOption(helpOption.long, helpOption.description)
|
|
94
|
+
.helpGroup(helpOption.helpGroupHeading),
|
|
93
95
|
);
|
|
94
96
|
} else if (helpOption.short && !removeShort) {
|
|
95
97
|
visibleOptions.push(
|
|
96
|
-
cmd
|
|
98
|
+
cmd
|
|
99
|
+
.createOption(helpOption.short, helpOption.description)
|
|
100
|
+
.helpGroup(helpOption.helpGroupHeading),
|
|
97
101
|
);
|
|
98
102
|
}
|
|
99
103
|
}
|
|
@@ -15,7 +15,7 @@ export class Option {
|
|
|
15
15
|
this.required = flags.includes('<'); // A value must be supplied when the option is specified.
|
|
16
16
|
this.optional = flags.includes('['); // A value is optional when the option is specified.
|
|
17
17
|
// variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument
|
|
18
|
-
this.variadic = /\
|
|
18
|
+
this.variadic = /\p{ID_Continue}\.\.\.[>\]]$/u.test(flags); // The option can take multiple values.
|
|
19
19
|
this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.
|
|
20
20
|
const optionFlags = splitOptionFlags(flags);
|
|
21
21
|
this.short = optionFlags.shortFlag; // May be a short flag, undefined, or even a long flag (if option has two long flags).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commander",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "the complete solution for node.js command-line programs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commander",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@types/node": "^22.7.4",
|
|
51
51
|
"eslint": "^10.0.2",
|
|
52
52
|
"eslint-config-prettier": "^10.0.1",
|
|
53
|
+
"eslint-node-test": "^1.0.0",
|
|
53
54
|
"globals": "^17.3.0",
|
|
54
55
|
"prettier": "^3.2.5",
|
|
55
56
|
"tsd": "^0.33.0",
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
// - https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts
|
|
11
11
|
// - https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
|
|
12
12
|
type LiteralUnion<LiteralType, BaseType extends string | number> =
|
|
13
|
-
|
|
|
14
|
-
| (BaseType & Record<never, never>);
|
|
13
|
+
LiteralType | (BaseType & Record<never, never>);
|
|
15
14
|
|
|
16
15
|
export class CommanderError extends Error {
|
|
17
16
|
code: string;
|
|
@@ -35,7 +34,7 @@ export class InvalidArgumentError extends CommanderError {
|
|
|
35
34
|
*/
|
|
36
35
|
constructor(message: string);
|
|
37
36
|
}
|
|
38
|
-
export { InvalidArgumentError as InvalidOptionArgumentError };
|
|
37
|
+
export { InvalidArgumentError as InvalidOptionArgumentError };
|
|
39
38
|
|
|
40
39
|
export interface ErrorOptions {
|
|
41
40
|
// optional parameter for error()
|
|
@@ -711,10 +710,13 @@ export class Command {
|
|
|
711
710
|
*
|
|
712
711
|
* @returns `this` command for chaining
|
|
713
712
|
*/
|
|
713
|
+
/** @deprecated since v15 */
|
|
714
714
|
storeOptionsAsProperties<T extends OptionValues>(): this & T;
|
|
715
|
+
/** @deprecated since v15 */
|
|
715
716
|
storeOptionsAsProperties<T extends OptionValues>(
|
|
716
717
|
storeAsProperties: true,
|
|
717
718
|
): this & T;
|
|
719
|
+
/** @deprecated since v15 */
|
|
718
720
|
storeOptionsAsProperties(storeAsProperties?: boolean): this;
|
|
719
721
|
|
|
720
722
|
/**
|
|
@@ -758,6 +760,7 @@ export class Command {
|
|
|
758
760
|
*
|
|
759
761
|
* @returns `this` command for chaining
|
|
760
762
|
*/
|
|
763
|
+
/** @deprecated since v15 */
|
|
761
764
|
combineFlagAndOptionalValue(combine?: boolean): this;
|
|
762
765
|
|
|
763
766
|
/**
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
**1.3.1** (2026-08-14)
|
|
3
|
+
- fix: preserve negative sign for zero (By [rajanpanth](https://github.com/rajanpanth))
|
|
4
|
+
|
|
5
|
+
**1.3.0** (2026-07-11)
|
|
6
|
+
- upgrade:
|
|
7
|
+
- xml-naming v0.3.0: cache support
|
|
8
|
+
- PEM v1.6.2: sibling bug fix
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
**1.2.1** (2026-07-03)
|
|
12
|
+
- fix: escape quotes in stopNode attribute values (By [greymoth](https://github.com/greymoth-jp))
|
|
13
|
+
- fix: neutralize double hyphen in multi-key comment object (By [spokodev](https://github.com/spokodev))
|
|
2
14
|
|
|
3
15
|
|
|
4
16
|
**1.2.0** (2026-05-08)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# fast-xml-builder
|
|
2
2
|
Build XML from JSON
|
|
3
3
|
|
|
4
|
+
[](https://npm-compare.com/fast-xml-builder)
|
|
5
|
+
[](https://www.npmjs.com/package/fast-xml-builder)
|
|
6
|
+
[](https://github.com/NaturalIntelligence/fast-xml-builder)
|
|
4
7
|
|
|
5
8
|
XML Builder was part of [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) for years. But considering that any bug in the parser may false-alarm users who are only using the builder, we have decided to split it into a separate package.
|
|
6
9
|
|
|
@@ -71,4 +74,4 @@ Check [Options reference](docs/Builder_v1.md) for more detail and examples.
|
|
|
71
74
|
- **suppressUnpairedNode**: When `true` (default), unpaired tags are rendered without a closing slash (`<br>`). When `false`, they are rendered as `<br/>`.
|
|
72
75
|
- **tagValueProcessor**: Customize how tag text values are serialized. Receives the tag name and value.
|
|
73
76
|
- **textNodeName**: Property name representing the text content of a tag in the JS object. Default: `'#text'`.
|
|
74
|
-
- **unpairedTags**: List of tag names that have no matching closing tag (e.g. `<br>` in HTML).
|
|
77
|
+
- **unpairedTags**: List of tag names that have no matching closing tag (e.g. `<br>` in HTML).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>w});class i{constructor(t,e={},i){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=i,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let i=0,s="";for(;i<t.length;)t[i]===this.separator?i+1<t.length&&t[i+1]===this.separator?(s.trim()&&(e.push(this._parseSegment(s.trim())),s=""),e.push({type:"deep-wildcard"}),i+=2):(s.trim()&&e.push(this._parseSegment(s.trim())),s="",i++):(s+=t[i],i++);return s.trim()&&e.push(this._parseSegment(s.trim())),e}_parseSegment(t){const e={type:"tag"};let i=null,s=t;const n=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(n&&(s=n[1]+n[3],n[2])){const t=n[2].slice(1,-1);t&&(i=t)}let r,o,a=s;if(s.includes("::")){const e=s.indexOf("::");if(r=s.substring(0,e).trim(),a=s.substring(e+2).trim(),!r)throw new Error(`Invalid namespace in pattern: ${t}`)}let h=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),i=a.substring(t+1).trim();["first","last","odd","even"].includes(i)||/^nth\(\d+\)$/.test(i)?(o=e,h=i):o=a}else o=a;if(!o)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=o,r&&(e.namespace=r),i)if(i.includes("=")){const t=i.indexOf("=");e.attrName=i.substring(0,t).trim(),e.attrValue=i.substring(t+1).trim()}else e.attrName=i.trim();if(h){const t=h.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=h}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class s{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const i=e[e.length-1];return void 0!==i.values&&t in i.values}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class n{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new s(this)}push(t,e=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const s=this.path.length;this.siblingStacks[s]||(this.siblingStacks[s]=new Map);const n=this.siblingStacks[s],r=i?`${i}:${t}`:t,o=n.get(r)||0;let a=0;for(const t of n.values())a+=t;n.set(r,o+1);const h={tag:t,position:a,counter:o};null!=i&&(h.namespace=i),null!=e&&(h.values=e),this.path.push(h)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const i=t||this.separator;if(i===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,i=t.length-1;for(;i>=0&&e>=0;){const s=t[i];if("deep-wildcard"===s.type){if(i--,i<0)return!0;const s=t[i];let n=!1;for(let t=e;t>=0;t--)if(this._matchSegment(s,this.path[t],t===this.path.length-1)){e=t-1,i--,n=!0;break}if(!n)return!1}else{if(!this._matchSegment(s,this.path[e],e===this.path.length-1))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!i)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!i)return!1;const s=e.counter??0;if("first"===t.position&&0!==s)return!1;if("odd"===t.position&&s%2!=1)return!1;if("even"===t.position&&s%2!=0)return!1;if("nth"===t.position&&s!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return this._view}}function r(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function o(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function a(t){return String(t).replace(/"/g,""").replace(/'/g,"'")}const h=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�",p=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",u=p+"\\-\\.\\d·̀-ͯ҇‿-⁀",l=(t,e,i="")=>{const s=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,i),ncName:new RegExp(`^${s}$`,i),qName:new RegExp(`^${s}(?::${s})?$`,i),nmToken:new RegExp(`^[${e}]+$`,i),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,i)}},c=l(h,h+"\\-\\.\\d·̀-ͯ‿-⁀"),g=l(p,u,"u"),d=(t,{xmlVersion:e="1.0"}={})=>((t="1.0")=>"1.1"===t?g:c)(e).qName.test(t);function f(t,e,i,s,n){return i.sanitizeName?d(t,{xmlVersion:n})?t:i.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()}):t}function m(t,e){let s="";e.format&&(s="\n");const r=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let t=0;t<e.stopNodes.length;t++){const s=e.stopNodes[t];"string"==typeof s?r.push(new i(s)):s instanceof i&&r.push(s)}const o=function(t,e){if(!Array.isArray(t)||0===t.length)return"1.0";const i=t[0];if("?xml"===A(i)){const t=i[":@"];if(t){const i=e.attributeNamePrefix+"version";if(t[i])return t[i]}}return"1.0"}(t,e);return N(t,e,s,new n,r,o)}function N(t,e,i,s,n,a){let h="",p=!1;if(e.maxNestedTags&&s.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){let i=t.toString();return i=S(i,e),i}return""}for(let u=0;u<t.length;u++){const l=t[u],c=A(l);if(void 0===c)continue;const g=c===e.textNodeName||c===e.cdataPropName||c===e.commentPropName||"?"===c[0]?c:f(c,!1,e,s,a),d=b(l[":@"],e);s.push(g,d);const m=P(s,n);if(g===e.textNodeName){let t=l[c];m||(t=e.tagValueProcessor(g,t),t=S(t,e)),p&&(h+=i),h+=t,p=!1,s.pop();continue}if(g===e.cdataPropName){p&&(h+=i),h+=`<![CDATA[${o(l[c][0][e.textNodeName])}]]>`,p=!1,s.pop();continue}if(g===e.commentPropName){h+=i+`\x3c!--${r(l[c][0][e.textNodeName])}--\x3e`,p=!0,s.pop();continue}if("?"===g[0]){h+=("?xml"===g?"":i)+`<${g}${$(l[":@"],e,m,s,a)}?>`,p=!0,s.pop();continue}let y=i;""!==y&&(y+=e.indentBy);const v=i+`<${g}${$(l[":@"],e,m,s,a)}`;let w;w=m?x(l[c],e):N(l[c],e,y,s,n,a),-1!==e.unpairedTags.indexOf(g)?e.suppressUnpairedNode?h+=v+">":h+=v+"/>":w&&0!==w.length||!e.suppressEmptyNode?w&&w.endsWith(">")?h+=v+`>${w}${i}</${g}>`:(h+=v+">",w&&""!==i&&(w.includes("/>")||w.includes("</"))?h+=i+e.indentBy+w+i:h+=w,h+=`</${g}>`):h+=v+"/>",p=!0,s.pop()}return h}function b(t,e){if(!t||e.ignoreAttributes)return null;const i={};let s=!1;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n.startsWith(e.attributeNamePrefix)?n.substr(e.attributeNamePrefix.length):n]=a(t[n]),s=!0);return s?i:null}function x(t,e){if(!Array.isArray(t))return null!=t?t.toString():"";let i="";for(let s=0;s<t.length;s++){const n=t[s],r=A(n);if(r===e.textNodeName)i+=n[r];else if(r===e.cdataPropName)i+=n[r][0][e.textNodeName];else if(r===e.commentPropName)i+=n[r][0][e.textNodeName];else{if(r&&"?"===r[0])continue;if(r){const t=y(n[":@"],e),s=x(n[r],e);s&&0!==s.length?i+=`<${r}${t}>${s}</${r}>`:i+=`<${r}${t}/>`}}}return i}function y(t,e){let i="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let n=t[s];!0===n&&e.suppressBooleanAttributes?i+=` ${s.substr(e.attributeNamePrefix.length)}`:i+=` ${s.substr(e.attributeNamePrefix.length)}="${a(n)}"`}return i}function A(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const s=e[i];if(Object.prototype.hasOwnProperty.call(t,s)&&":@"!==s)return s}}function $(t,e,i,s,n){let r="";if(t&&!e.ignoreAttributes)for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const h=o.substr(e.attributeNamePrefix.length),p=i?h:f(h,!0,e,s,n);let u;i?u=t[o]:(u=e.attributeValueProcessor(o,t[o]),u=S(u,e)),!0===u&&e.suppressBooleanAttributes?r+=` ${p}`:r+=` ${p}="${a(u)}"`}return r}function P(t,e){if(!e||0===e.length)return!1;for(let i=0;i<e.length;i++)if(t.matches(e[i]))return!0;return!1}function S(t,e){if(t&&t.length>0&&e.processEntities)for(let i=0;i<e.entities.length;i++){const s=e.entities[i];t=t.replace(s.regex,s.val)}return t}const v={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function w(t){if(this.options=Object.assign({},v,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];"string"==typeof e?this.stopNodeExpressions.push(new i(e)):e instanceof i&&this.stopNodeExpressions.push(e)}var e;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const i of e){if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=C),this.processTextOrObjNode=O,this.options.format?(this.indentate=_,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function E(t,e,i,s,n){return i.sanitizeName?d(t,{xmlVersion:n})?t:i.sanitizeName(t,{isAttribute:e,matcher:s.readOnly()}):t}function O(t,e,i,s,n){const r=this.extractAttributes(t);if(s.push(e,r),this.checkStopNode(s)){const n=this.buildRawContent(t),r=this.buildAttributesForStopNode(t);return s.pop(),this.buildObjectNode(n,e,r,i)}const o=this.j2x(t,i+1,s,n);return s.pop(),"?"===e[0]?this.buildTextValNode("",e,o.attrStr,i,s):void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,i,s):this.buildObjectNode(o.val,e,o.attrStr,i)}function _(t){return this.options.indentBy.repeat(t)}function C(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}w.prototype.build=function(t){if(this.options.preserveOrder)return m(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new n,i=function(t,e){const i=t["?xml"];if(i&&"object"==typeof i){if(e.attributesGroupName&&i[e.attributesGroupName]){const t=i[e.attributesGroupName][e.attributeNamePrefix+"version"];if(t)return t}const t=i[e.attributeNamePrefix+"version"];if(t)return t}return"1.0"}(t,this.options);return this.j2x(t,0,e,i).val}},w.prototype.j2x=function(t,e,i,s){let n="",r="";if(this.options.maxNestedTags&&i.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const o=this.options.jPath?i.toString():i,a=this.checkStopNode(i);for(let h in t){if(!Object.prototype.hasOwnProperty.call(t,h))continue;const p=h===this.options.textNodeName||h===this.options.cdataPropName||h===this.options.commentPropName||this.options.attributesGroupName&&h===this.options.attributesGroupName||this.isAttribute(h)||"?"===h[0]?h:E(h,!1,this.options,i,s);if(void 0===t[h])this.isAttribute(h)&&(r+="");else if(null===t[h])this.isAttribute(h)||p===this.options.cdataPropName||p===this.options.commentPropName?r+="":"?"===p[0]?r+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if(t[h]instanceof Date)r+=this.buildTextValNode(t[h],p,"",e,i);else if("object"!=typeof t[h]){const u=this.isAttribute(h);if(u&&!this.ignoreAttributesFn(u,o)){const e=E(u,!0,this.options,i,s);n+=this.buildAttrPairStr(e,""+t[h],a)}else if(!u)if(h===this.options.textNodeName){let e=this.options.tagValueProcessor(h,""+t[h]);r+=this.replaceEntitiesValue(e)}else{i.push(p);const s=this.checkStopNode(i);if(i.pop(),s){const i=""+t[h];r+=""===i?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+i+"</"+p+this.tagEndChar}else r+=this.buildTextValNode(t[h],p,"",e,i)}}else if(Array.isArray(t[h])){const n=t[h].length;let o="",a="";for(let u=0;u<n;u++){const n=t[h][u];if(void 0===n);else if(null===n)"?"===p[0]?r+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){i.push(p);const t=this.j2x(n,e+1,i,s);i.pop(),o+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else o+=this.processTextOrObjNode(n,p,e,i,s);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(p,n);t=this.replaceEntitiesValue(t),o+=t}else{i.push(p);const t=this.checkStopNode(i);if(i.pop(),t){const t=""+n;o+=""===t?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+t+"</"+p+this.tagEndChar}else o+=this.buildTextValNode(n,p,"",e,i)}}this.options.oneListGroup&&(o=this.buildObjectNode(o,p,a,e)),r+=o}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const e=Object.keys(t[h]),r=e.length;for(let o=0;o<r;o++){const r=E(e[o],!0,this.options,i,s);n+=this.buildAttrPairStr(r,""+t[h][e[o]],a)}}else r+=this.processTextOrObjNode(t[h],p,e,i,s)}return{attrStr:n,val:r}},w.prototype.buildAttrPairStr=function(t,e,i){return i||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+a(e)+'"'},w.prototype.extractAttributes=function(t){if(!t||"object"!=typeof t)return null;const e={};let i=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const s=t[this.options.attributesGroupName];for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(e[t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t]=a(s[t]),i=!0)}else for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;const n=this.isAttribute(s);n&&(e[n]=a(t[s]),i=!0)}return i?e:null},w.prototype.buildRawContent=function(t){if("string"==typeof t)return t;if("object"!=typeof t||null===t)return String(t);if(void 0!==t[this.options.textNodeName])return t[this.options.textNodeName];let e="";for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;if(this.isAttribute(i))continue;if(this.options.attributesGroupName&&i===this.options.attributesGroupName)continue;const s=t[i];if(i===this.options.textNodeName)e+=s;else if(Array.isArray(s)){for(let t of s)if("string"==typeof t||"number"==typeof t)e+=`<${i}>${t}</${i}>`;else if("object"==typeof t&&null!==t){const s=this.buildRawContent(t),n=this.buildAttributesForStopNode(t);e+=""===s?`<${i}${n}/>`:`<${i}${n}>${s}</${i}>`}}else if("object"==typeof s&&null!==s){const t=this.buildRawContent(s),n=this.buildAttributesForStopNode(s);e+=""===t?`<${i}${n}/>`:`<${i}${n}>${t}</${i}>`}else e+=`<${i}>${s}</${i}>`}return e},w.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const i=t[this.options.attributesGroupName];for(let t in i){if(!Object.prototype.hasOwnProperty.call(i,t))continue;const s=t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t,n=i[t];!0===n&&this.options.suppressBooleanAttributes?e+=" "+s:e+=" "+s+'="'+n+'"'}}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const s=this.isAttribute(i);if(s){const n=t[i];!0===n&&this.options.suppressBooleanAttributes?e+=" "+s:e+=" "+s+'="'+n+'"'}}return e},w.prototype.buildObjectNode=function(t,e,i,s){if(""===t)return"?"===e[0]?this.indentate(s)+"<"+e+i+"?"+this.tagEndChar:this.indentate(s)+"<"+e+i+this.closeTag(e)+this.tagEndChar;if("?"===e[0])return this.indentate(s)+"<"+e+i+"?"+this.tagEndChar;{let n="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",n=""),!i&&""!==i||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(s)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(s)+"<"+e+i+r+this.tagEndChar+t+this.indentate(s)+n:this.indentate(s)+"<"+e+i+r+">"+t+n}},w.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},w.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1},w.prototype.buildTextValNode=function(t,e,i,s,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName){const e=o(t);return this.indentate(s)+`<![CDATA[${e}]]>`+this.newLine}if(!1!==this.options.commentPropName&&e===this.options.commentPropName){const e=r(t);return this.indentate(s)+`\x3c!--${e}--\x3e`+this.newLine}if("?"===e[0])return this.indentate(s)+"<"+e+i+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),""===n?this.indentate(s)+"<"+e+i+this.closeTag(e)+this.tagEndChar:this.indentate(s)+"<"+e+i+">"+n+"</"+e+this.tagEndChar}},w.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const i=this.options.entities[e];t=t.replace(i.regex,i.val)}return t},module.exports=e})();
|
|
1
|
+
(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>C});class s{constructor(t,e={},s){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=s,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let s=0,i="";for(;s<t.length;)t[s]===this.separator?s+1<t.length&&t[s+1]===this.separator?(i.trim()&&(e.push(this._parseSegment(i.trim())),i=""),e.push({type:"deep-wildcard"}),s+=2):(i.trim()&&e.push(this._parseSegment(i.trim())),i="",s++):(i+=t[s],s++);return i.trim()&&e.push(this._parseSegment(i.trim())),e}_parseSegment(t){const e={type:"tag"};let s=null,i=t;const n=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(n&&(i=n[1]+n[3],n[2])){const t=n[2].slice(1,-1);t&&(s=t)}let r,o,a=i;if(i.includes("::")){const e=i.indexOf("::");if(r=i.substring(0,e).trim(),a=i.substring(e+2).trim(),!r)throw new Error(`Invalid namespace in pattern: ${t}`)}let h=null;if(a.includes(":")){const t=a.lastIndexOf(":"),e=a.substring(0,t).trim(),s=a.substring(t+1).trim();["first","last","odd","even"].includes(s)||/^nth\(\d+\)$/.test(s)?(o=e,h=s):o=a}else o=a;if(!o)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=o,r&&(e.namespace=r),s)if(s.includes("=")){const t=s.indexOf("=");e.attrName=s.substring(0,t).trim(),e.attrValue=s.substring(t+1).trim()}else e.attrName=s.trim();if(h){const t=h.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=h}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class i{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const s=e[e.length-1];return void 0!==s.values&&t in s.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class n{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new i(this),this._keptAttrs=[]}push(t,e=null,s=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;let r=this.siblingStacks[n];r||(r={counts:new Map,total:0},this.siblingStacks[n]=r);const o=s?`${s}:${t}`:t,a=r.counts.get(o)||0,h=r.total;r.counts.set(o,a+1),r.total++;const p={tag:t,position:h,counter:a};null!=s&&(p.namespace=s),null!=e&&(p.values=e),this.path.push(p);const u=this.path.length,l=null!==i?i.keep:null;if(null!=l&&l.length>0&&e)for(let t=0;t<l.length;t++){const s=l[t];void 0!==e[s]&&this._keptAttrs.push({depth:u,name:s,value:e[s]})}}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return e[s].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let s=e.length-1;s>=0;s--)if(e[s].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const s=t||this.separator;if(s===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(s)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,s=t.length-1;for(;s>=0&&e>=0;){const i=t[s];if("deep-wildcard"===i.type){if(s--,s<0)return!0;const i=t[s];let n=!1;for(let t=e;t>=0;t--)if(this._matchSegment(i,this.path[t],t===this.path.length-1)){e=t-1,s--,n=!0;break}if(!n)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,s--}}return s<0}_matchSegment(t,e,s){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!s)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!s)return!1;const i=e.counter??0;if("first"===t.position&&0!==i)return!1;if("odd"===t.position&&i%2!=1)return!1;if("even"===t.position&&i%2!=0)return!1;if("nth"===t.position&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}function r(t){return"number"==typeof t&&Object.is(t,-0)?"-0":String(t)}function o(t){return r(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function a(t){return r(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function h(t){return r(t).replace(/"/g,""").replace(/'/g,"'")}const p=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�",u=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",l=u+"\\-\\.\\d·̀-ͯ҇‿-⁀",c=(t,e,s="")=>{const i=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,s),ncName:new RegExp(`^${i}$`,s),qName:new RegExp(`^${i}(?::${i})?$`,s),nmToken:new RegExp(`^[${e}]+$`,s),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,s)}},g=c(p,p+"\\-\\.\\d·̀-ͯ‿-⁀"),d=c(u,l,"u"),f=":A-Za-z_",m=c(f,f+"\\-\\.\\d"),N=["name","ncName","qName","nmToken","nmTokens"],b=(t,{xmlVersion:e="1.0",asciiOnly:s=!1,maxCacheSize:i=2048}={})=>{if(!N.includes(t))throw new TypeError(`Unknown production "${t}". Must be one of: ${N.join(", ")}`);const n=((t="1.0",e=!1)=>e?m:"1.1"===t?d:g)(e,s)[t];let r=new Map;const o=t=>{const e=r.get(t);if(void 0!==e)return e;const s=n.test(t);return r.size<i&&r.set(t,s),s};return o.reset=()=>{r=new Map},o};function y(t,e,s,i,n){return s.sanitizeName?n(t)?t:s.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function x(t,e){let i="";e.format&&(i="\n");const r=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let t=0;t<e.stopNodes.length;t++){const i=e.stopNodes[t];"string"==typeof i?r.push(new s(i)):i instanceof s&&r.push(i)}const o=function(t,e){if(!Array.isArray(t)||0===t.length)return"1.0";const s=t[0];if("?xml"===_(s)){const t=s[":@"];if(t){const s=e.attributeNamePrefix+"version";if(t[s])return t[s]}}return"1.0"}(t,e),a=b("qName",{xmlVersion:o});return A(t,e,i,new n,r,a)}function A(t,e,s,i,n,h){let p="",u=!1;if(e.maxNestedTags&&i.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){let s=r(t);return s=O(s,e),s}return""}for(let l=0;l<t.length;l++){const c=t[l],g=_(c);if(void 0===g)continue;const d=g===e.textNodeName||g===e.cdataPropName||g===e.commentPropName||"?"===g[0]?g:y(g,!1,e,i,h),f=P(c[":@"],e);i.push(d,f);const m=w(i,n);if(d===e.textNodeName){let t=c[g];m||(t=e.tagValueProcessor(d,t),t=O(t,e)),t=r(t),u&&(p+=s),p+=t,u=!1,i.pop();continue}if(d===e.cdataPropName){u&&(p+=s),p+=`<![CDATA[${a(c[g][0][e.textNodeName])}]]>`,u=!1,i.pop();continue}if(d===e.commentPropName){p+=s+`\x3c!--${o(c[g][0][e.textNodeName])}--\x3e`,u=!0,i.pop();continue}if("?"===d[0]){p+=("?xml"===d?"":s)+`<${d}${v(c[":@"],e,m,i,h)}?>`,u=!0,i.pop();continue}let N=s;""!==N&&(N+=e.indentBy);const b=s+`<${d}${v(c[":@"],e,m,i,h)}`;let x;x=m?$(c[g],e):A(c[g],e,N,i,n,h),-1!==e.unpairedTags.indexOf(d)?e.suppressUnpairedNode?p+=b+">":p+=b+"/>":x&&0!==x.length||!e.suppressEmptyNode?x&&x.endsWith(">")?p+=b+`>${x}${s}</${d}>`:(p+=b+">",x&&""!==s&&(x.includes("/>")||x.includes("</"))?p+=s+e.indentBy+x+s:p+=x,p+=`</${d}>`):p+=b+"/>",u=!0,i.pop()}return p}function P(t,e){if(!t||e.ignoreAttributes)return null;const s={};let i=!1;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(s[n.startsWith(e.attributeNamePrefix)?n.substr(e.attributeNamePrefix.length):n]=h(t[n]),i=!0);return i?s:null}function $(t,e){if(!Array.isArray(t))return null!=t?r(t):"";let s="";for(let i=0;i<t.length;i++){const n=t[i],o=_(n);if(o===e.textNodeName)s+=r(n[o]);else if(o===e.cdataPropName)s+=n[o][0][e.textNodeName];else if(o===e.commentPropName)s+=n[o][0][e.textNodeName];else{if(o&&"?"===o[0])continue;if(o){const t=S(n[":@"],e),i=$(n[o],e);i&&0!==i.length?s+=`<${o}${t}>${i}</${o}>`:s+=`<${o}${t}/>`}}}return s}function S(t,e){let s="";if(t&&!e.ignoreAttributes)for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let n=t[i];!0===n&&e.suppressBooleanAttributes?s+=` ${i.substr(e.attributeNamePrefix.length)}`:s+=` ${i.substr(e.attributeNamePrefix.length)}="${h(n)}"`}return s}function _(t){const e=Object.keys(t);for(let s=0;s<e.length;s++){const i=e[s];if(Object.prototype.hasOwnProperty.call(t,i)&&":@"!==i)return i}}function v(t,e,s,i,n){let r="";if(t&&!e.ignoreAttributes)for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;const a=o.substr(e.attributeNamePrefix.length),p=s?a:y(a,!0,e,i,n);let u;s?u=t[o]:(u=e.attributeValueProcessor(o,t[o]),u=O(u,e)),!0===u&&e.suppressBooleanAttributes?r+=` ${p}`:r+=` ${p}="${h(u)}"`}return r}function w(t,e){if(!e||0===e.length)return!1;for(let s=0;s<e.length;s++)if(t.matches(e[s]))return!0;return!1}function O(t,e){if(t&&t.length>0&&e.processEntities)for(let s=0;s<e.entities.length;s++){const i=e.entities[s];t=t.replace(i.regex,i.val)}return t}const E={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function C(t){if(this.options=Object.assign({},E,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(t=>"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let t=0;t<this.options.stopNodes.length;t++){const e=this.options.stopNodes[t];"string"==typeof e?this.stopNodeExpressions.push(new s(e)):e instanceof s&&this.stopNodeExpressions.push(e)}var e;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(e=this.options.ignoreAttributes)?e:Array.isArray(e)?t=>{for(const s of e){if("string"==typeof s&&t===s)return!0;if(s instanceof RegExp&&s.test(t))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=V),this.processTextOrObjNode=k,this.options.format?(this.indentate=T,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function j(t,e,s,i,n){return s.sanitizeName?n(t)?t:s.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function k(t,e,s,i,n){const r=this.extractAttributes(t);if(i.push(e,r),this.checkStopNode(i)){const n=this.buildRawContent(t),r=this.buildAttributesForStopNode(t);return i.pop(),this.buildObjectNode(n,e,r,s)}const o=this.j2x(t,s+1,i,n);return i.pop(),"?"===e[0]?this.buildTextValNode("",e,o.attrStr,s,i):void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,o.attrStr,s,i):this.buildObjectNode(o.val,e,o.attrStr,s)}function T(t){return this.options.indentBy.repeat(t)}function V(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}C.prototype.build=function(t){if(this.options.preserveOrder)return x(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new n,s=function(t,e){const s=t["?xml"];if(s&&"object"==typeof s){if(e.attributesGroupName&&s[e.attributesGroupName]){const t=s[e.attributesGroupName][e.attributeNamePrefix+"version"];if(t)return t}const t=s[e.attributeNamePrefix+"version"];if(t)return t}return"1.0"}(t,this.options),i=b("qName",{xmlVersion:s});return this.j2x(t,0,e,i).val}},C.prototype.j2x=function(t,e,s,i){let n="",o="";if(this.options.maxNestedTags&&s.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const a=this.options.jPath?s.toString():s,h=this.checkStopNode(s);for(let p in t){if(!Object.prototype.hasOwnProperty.call(t,p))continue;const u=p===this.options.textNodeName||p===this.options.cdataPropName||p===this.options.commentPropName||this.options.attributesGroupName&&p===this.options.attributesGroupName||this.isAttribute(p)||"?"===p[0]?p:j(p,!1,this.options,s,i);if(void 0===t[p])this.isAttribute(p)&&(o+="");else if(null===t[p])this.isAttribute(p)||u===this.options.cdataPropName||u===this.options.commentPropName?o+="":"?"===u[0]?o+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(t[p]instanceof Date)o+=this.buildTextValNode(t[p],u,"",e,s);else if("object"!=typeof t[p]){const l=this.isAttribute(p);if(l&&!this.ignoreAttributesFn(l,a)){const e=j(l,!0,this.options,s,i);n+=this.buildAttrPairStr(e,r(t[p]),h)}else if(!l)if(p===this.options.textNodeName){let e=this.options.tagValueProcessor(p,r(t[p]));o+=this.replaceEntitiesValue(e)}else{s.push(u);const i=this.checkStopNode(s);if(s.pop(),i){const s=r(t[p]);o+=""===s?this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:this.indentate(e)+"<"+u+">"+s+"</"+u+this.tagEndChar}else o+=this.buildTextValNode(t[p],u,"",e,s)}}else if(Array.isArray(t[p])){const n=t[p].length;let a="",h="";for(let l=0;l<n;l++){const n=t[p][l];if(void 0===n);else if(null===n)"?"===u[0]?o+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){s.push(u);const t=this.j2x(n,e+1,s,i);s.pop(),a+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(h+=t.attrStr)}else a+=this.processTextOrObjNode(n,u,e,s,i);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(u,n);t=this.replaceEntitiesValue(t),t=r(t),a+=t}else{s.push(u);const t=this.checkStopNode(s);if(s.pop(),t){const t=r(n);a+=""===t?this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:this.indentate(e)+"<"+u+">"+t+"</"+u+this.tagEndChar}else a+=this.buildTextValNode(n,u,"",e,s)}}this.options.oneListGroup&&(a=this.buildObjectNode(a,u,h,e)),o+=a}else if(this.options.attributesGroupName&&p===this.options.attributesGroupName){const e=Object.keys(t[p]),o=e.length;for(let a=0;a<o;a++){const o=j(e[a],!0,this.options,s,i);n+=this.buildAttrPairStr(o,r(t[p][e[a]]),h)}}else o+=this.processTextOrObjNode(t[p],u,e,s,i)}return{attrStr:n,val:o}},C.prototype.buildAttrPairStr=function(t,e,s){return s||(e=this.options.attributeValueProcessor(t,r(e)),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+h(e)+'"'},C.prototype.extractAttributes=function(t){if(!t||"object"!=typeof t)return null;const e={};let s=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const i=t[this.options.attributesGroupName];for(let t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t]=h(i[t]),s=!0)}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const n=this.isAttribute(i);n&&(e[n]=h(t[i]),s=!0)}return s?e:null},C.prototype.buildRawContent=function(t){if("string"==typeof t)return t;if("object"!=typeof t||null===t)return String(t);if(void 0!==t[this.options.textNodeName])return t[this.options.textNodeName];let e="";for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;if(this.isAttribute(s))continue;if(this.options.attributesGroupName&&s===this.options.attributesGroupName)continue;const i=t[s];if(s===this.options.textNodeName)e+=i;else if(Array.isArray(i)){for(let t of i)if("string"==typeof t||"number"==typeof t)e+=`<${s}>${t}</${s}>`;else if("object"==typeof t&&null!==t){const i=this.buildRawContent(t),n=this.buildAttributesForStopNode(t);e+=""===i?`<${s}${n}/>`:`<${s}${n}>${i}</${s}>`}}else if("object"==typeof i&&null!==i){const t=this.buildRawContent(i),n=this.buildAttributesForStopNode(i);e+=""===t?`<${s}${n}/>`:`<${s}${n}>${t}</${s}>`}else e+=`<${s}>${i}</${s}>`}return e},C.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const s=t[this.options.attributesGroupName];for(let t in s){if(!Object.prototype.hasOwnProperty.call(s,t))continue;const i=t.startsWith(this.options.attributeNamePrefix)?t.substring(this.options.attributeNamePrefix.length):t,n=s[t];!0===n&&this.options.suppressBooleanAttributes?e+=" "+i:e+=" "+i+'="'+h(n)+'"'}}else for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;const i=this.isAttribute(s);if(i){const n=t[s];!0===n&&this.options.suppressBooleanAttributes?e+=" "+i:e+=" "+i+'="'+h(n)+'"'}}return e},C.prototype.buildObjectNode=function(t,e,s,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+s+"?"+this.tagEndChar:this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar;if("?"===e[0])return this.indentate(i)+"<"+e+s+"?"+this.tagEndChar;{let n="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",n=""),!s&&""!==s||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(i)+`\x3c!--${o(t)}--\x3e`+this.newLine:this.indentate(i)+"<"+e+s+r+this.tagEndChar+t+this.indentate(i)+n:this.indentate(i)+"<"+e+s+r+">"+t+n}},C.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},C.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1},C.prototype.buildTextValNode=function(t,e,s,i,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName){const e=a(t);return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine}if(!1!==this.options.commentPropName&&e===this.options.commentPropName){const e=o(t);return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine}if("?"===e[0])return this.indentate(i)+"<"+e+s+"?"+this.tagEndChar;{let n=this.options.tagValueProcessor(e,t);return n=this.replaceEntitiesValue(n),n=r(n),""===n?this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+s+">"+n+"</"+e+this.tagEndChar}},C.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const s=this.options.entities[e];t=t.replace(s.regex,s.val)}return t},module.exports=e})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fxb=e():t.fxb=e()}(this,()=>(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>_});class r{constructor(t,e={},r){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=r,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let r=0,i="";for(;r<t.length;)t[r]===this.separator?r+1<t.length&&t[r+1]===this.separator?(i.trim()&&(e.push(this._parseSegment(i.trim())),i=""),e.push({type:"deep-wildcard"}),r+=2):(i.trim()&&e.push(this._parseSegment(i.trim())),i="",r++):(i+=t[r],r++);return i.trim()&&e.push(this._parseSegment(i.trim())),e}_parseSegment(t){const e={type:"tag"};let r=null,i=t;const s=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(s&&(i=s[1]+s[3],s[2])){const t=s[2].slice(1,-1);t&&(r=t)}let n,a,o=i;if(i.includes("::")){const e=i.indexOf("::");if(n=i.substring(0,e).trim(),o=i.substring(e+2).trim(),!n)throw new Error(`Invalid namespace in pattern: ${t}`)}let h=null;if(o.includes(":")){const t=o.lastIndexOf(":"),e=o.substring(0,t).trim(),r=o.substring(t+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(a=e,h=r):a=o}else a=o;if(!a)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=a,n&&(e.namespace=n),r)if(r.includes("=")){const t=r.indexOf("=");e.attrName=r.substring(0,t).trim(),e.attrValue=r.substring(t+1).trim()}else e.attrName=r.trim();if(h){const t=h.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=h}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class i{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const r=e[e.length-1];return void 0!==r.values&&t in r.values}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class s{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new i(this)}push(t,e=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);const s=this.siblingStacks[i],n=r?`${r}:${t}`:t,a=s.get(n)||0;let o=0;for(const t of s.values())o+=t;s.set(n,a+1);const h={tag:t,position:o,counter:a};null!=r&&(h.namespace=r),null!=e&&(h.values=e),this.path.push(h)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const r=t||this.separator;if(r===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(r);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(r)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,r=t.length-1;for(;r>=0&&e>=0;){const i=t[r];if("deep-wildcard"===i.type){if(r--,r<0)return!0;const i=t[r];let s=!1;for(let t=e;t>=0;t--)if(this._matchSegment(i,this.path[t],t===this.path.length-1)){e=t-1,r--,s=!0;break}if(!s)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,r--}}return r<0}_matchSegment(t,e,r){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!r)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!r)return!1;const i=e.counter??0;if("first"===t.position&&0!==i)return!1;if("odd"===t.position&&i%2!=1)return!1;if("even"===t.position&&i%2!=0)return!1;if("nth"===t.position&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>new Map(t))}readOnly(){return this._view}}function n(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function a(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function o(t){return String(t).replace(/"/g,""").replace(/'/g,"'")}const h=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�",p=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",u=p+"\\-\\.\\d·̀-ͯ҇‿-⁀",l=(t,e,r="")=>{const i=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,r),ncName:new RegExp(`^${i}$`,r),qName:new RegExp(`^${i}(?::${i})?$`,r),nmToken:new RegExp(`^[${e}]+$`,r),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,r)}},c=l(h,h+"\\-\\.\\d·̀-ͯ‿-⁀"),f=l(p,u,"u"),d=(t,{xmlVersion:e="1.0"}={})=>((t="1.0")=>"1.1"===t?f:c)(e).qName.test(t);function g(t,e,r,i,s){return r.sanitizeName?d(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function m(t,e){var i="";e.format&&(i="\n");var n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(var a=0;a<e.stopNodes.length;a++){var o=e.stopNodes[a];"string"==typeof o?n.push(new r(o)):o instanceof r&&n.push(o)}var h=function(t,e){if(!Array.isArray(t)||0===t.length)return"1.0";var r=t[0];if("?xml"===x(r)){var i=r[":@"];if(i){var s=e.attributeNamePrefix+"version";if(i[s])return i[s]}}return"1.0"}(t,e);return b(t,e,i,new s,n,h)}function b(t,e,r,i,s,o){var h="",p=!1;if(e.maxNestedTags&&i.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){var u=t.toString();return P(u,e)}return""}for(var l=0;l<t.length;l++){var c=t[l],f=x(c);if(void 0!==f){var d=f===e.textNodeName||f===e.cdataPropName||f===e.commentPropName||"?"===f[0]?f:g(f,!1,e,i,o),m=v(c[":@"],e);i.push(d,m);var y=S(i,s);if(d!==e.textNodeName)if(d!==e.cdataPropName)if(d!==e.commentPropName)if("?"!==d[0]){var w=r;""!==w&&(w+=e.indentBy);var E=r+"<"+d+A(c[":@"],e,y,i,o),O=void 0;O=y?N(c[f],e):b(c[f],e,w,i,s,o),-1!==e.unpairedTags.indexOf(d)?e.suppressUnpairedNode?h+=E+">":h+=E+"/>":O&&0!==O.length||!e.suppressEmptyNode?O&&O.endsWith(">")?h+=E+">"+O+r+"</"+d+">":(h+=E+">",O&&""!==r&&(O.includes("/>")||O.includes("</"))?h+=r+e.indentBy+O+r:h+=O,h+="</"+d+">"):h+=E+"/>",p=!0,i.pop()}else h+=("?xml"===d?"":r)+"<"+d+A(c[":@"],e,y,i,o)+"?>",p=!0,i.pop();else h+=r+"\x3c!--"+n(c[f][0][e.textNodeName])+"--\x3e",p=!0,i.pop();else p&&(h+=r),h+="<![CDATA["+a(c[f][0][e.textNodeName])+"]]>",p=!1,i.pop();else{var j=c[f];y||(j=P(j=e.tagValueProcessor(d,j),e)),p&&(h+=r),h+=j,p=!1,i.pop()}}}return h}function v(t,e){if(!t||e.ignoreAttributes)return null;var r={},i=!1;for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s]=o(t[s]),i=!0);return i?r:null}function N(t,e){if(!Array.isArray(t))return null!=t?t.toString():"";for(var r="",i=0;i<t.length;i++){var s=t[i],n=x(s);if(n===e.textNodeName)r+=s[n];else if(n===e.cdataPropName)r+=s[n][0][e.textNodeName];else if(n===e.commentPropName)r+=s[n][0][e.textNodeName];else{if(n&&"?"===n[0])continue;if(n){var a=y(s[":@"],e),o=N(s[n],e);o&&0!==o.length?r+="<"+n+a+">"+o+"</"+n+">":r+="<"+n+a+"/>"}}}return r}function y(t,e){var r="";if(t&&!e.ignoreAttributes)for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];!0===s&&e.suppressBooleanAttributes?r+=" "+i.substr(e.attributeNamePrefix.length):r+=" "+i.substr(e.attributeNamePrefix.length)+'="'+o(s)+'"'}return r}function x(t){for(var e=Object.keys(t),r=0;r<e.length;r++){var i=e[r];if(Object.prototype.hasOwnProperty.call(t,i)&&":@"!==i)return i}}function A(t,e,r,i,s){var n="";if(t&&!e.ignoreAttributes)for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var h=a.substr(e.attributeNamePrefix.length),p=r?h:g(h,!0,e,i,s),u=void 0;!0===(u=r?t[a]:P(u=e.attributeValueProcessor(a,t[a]),e))&&e.suppressBooleanAttributes?n+=" "+p:n+=" "+p+'="'+o(u)+'"'}return n}function S(t,e){if(!e||0===e.length)return!1;for(var r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}function P(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r<e.entities.length;r++){var i=e.entities[r];t=t.replace(i.regex,i.val)}return t}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function E(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return O(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}var j={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function _(t){if(this.options=Object.assign({},j,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(function(t){return"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t})),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(var e=0;e<this.options.stopNodes.length;e++){var i=this.options.stopNodes[e];"string"==typeof i?this.stopNodeExpressions.push(new r(i)):i instanceof r&&this.stopNodeExpressions.push(i)}var s;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(s=this.options.ignoreAttributes)?s:Array.isArray(s)?function(t){for(var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return w(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(s);!(e=r()).done;){var i=e.value;if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:function(){return!1},this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=$),this.processTextOrObjNode=T,this.options.format?(this.indentate=V,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function C(t,e,r,i,s){return r.sanitizeName?d(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function T(t,e,r,i,s){var n=this.extractAttributes(t);if(i.push(e,n),this.checkStopNode(i)){var a=this.buildRawContent(t),o=this.buildAttributesForStopNode(t);return i.pop(),this.buildObjectNode(a,e,o,r)}var h=this.j2x(t,r+1,i,s);return i.pop(),"?"===e[0]?this.buildTextValNode("",e,h.attrStr,r,i):void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,h.attrStr,r,i):this.buildObjectNode(h.val,e,h.attrStr,r)}function V(t){return this.options.indentBy.repeat(t)}function $(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}return _.prototype.build=function(t){if(this.options.preserveOrder)return m(t,this.options);var e;Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&((e={})[this.options.arrayNodeName]=t,t=e);var r=new s,i=function(t,e){var r=t["?xml"];if(r&&"object"==typeof r){if(e.attributesGroupName&&r[e.attributesGroupName]){var i=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(i)return i}var s=r[e.attributeNamePrefix+"version"];if(s)return s}return"1.0"}(t,this.options);return this.j2x(t,0,r,i).val},_.prototype.j2x=function(t,e,r,i){var s="",n="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");var a=this.options.jPath?r.toString():r,o=this.checkStopNode(r);for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)){var p=h===this.options.textNodeName||h===this.options.cdataPropName||h===this.options.commentPropName||this.options.attributesGroupName&&h===this.options.attributesGroupName||this.isAttribute(h)||"?"===h[0]?h:C(h,!1,this.options,r,i);if(void 0===t[h])this.isAttribute(h)&&(n+="");else if(null===t[h])this.isAttribute(h)||p===this.options.cdataPropName||p===this.options.commentPropName?n+="":"?"===p[0]?n+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if(t[h]instanceof Date)n+=this.buildTextValNode(t[h],p,"",e,r);else if("object"!=typeof t[h]){var u=this.isAttribute(h);if(u&&!this.ignoreAttributesFn(u,a)){var l=C(u,!0,this.options,r,i);s+=this.buildAttrPairStr(l,""+t[h],o)}else if(!u)if(h===this.options.textNodeName){var c=this.options.tagValueProcessor(h,""+t[h]);n+=this.replaceEntitiesValue(c)}else{r.push(p);var f=this.checkStopNode(r);if(r.pop(),f){var d=""+t[h];n+=""===d?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+d+"</"+p+this.tagEndChar}else n+=this.buildTextValNode(t[h],p,"",e,r)}}else if(Array.isArray(t[h])){for(var g=t[h].length,m="",b="",v=0;v<g;v++){var N=t[h][v];if(void 0===N);else if(null===N)"?"===p[0]?n+=this.indentate(e)+"<"+p+"?"+this.tagEndChar:n+=this.indentate(e)+"<"+p+"/"+this.tagEndChar;else if("object"==typeof N)if(this.options.oneListGroup){r.push(p);var y=this.j2x(N,e+1,r,i);r.pop(),m+=y.val,this.options.attributesGroupName&&N.hasOwnProperty(this.options.attributesGroupName)&&(b+=y.attrStr)}else m+=this.processTextOrObjNode(N,p,e,r,i);else if(this.options.oneListGroup){var x=this.options.tagValueProcessor(p,N);m+=x=this.replaceEntitiesValue(x)}else{r.push(p);var A=this.checkStopNode(r);if(r.pop(),A){var S=""+N;m+=""===S?this.indentate(e)+"<"+p+this.closeTag(p)+this.tagEndChar:this.indentate(e)+"<"+p+">"+S+"</"+p+this.tagEndChar}else m+=this.buildTextValNode(N,p,"",e,r)}}this.options.oneListGroup&&(m=this.buildObjectNode(m,p,b,e)),n+=m}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName)for(var P=Object.keys(t[h]),w=P.length,E=0;E<w;E++){var O=C(P[E],!0,this.options,r,i);s+=this.buildAttrPairStr(O,""+t[h][P[E]],o)}else n+=this.processTextOrObjNode(t[h],p,e,r,i)}return{attrStr:s,val:n}},_.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+o(e)+'"'},_.prototype.extractAttributes=function(t){if(!t||"object"!=typeof t)return null;var e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){var i=t[this.options.attributesGroupName];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s]=o(i[s]),r=!0)}else for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=this.isAttribute(n);a&&(e[a]=o(t[n]),r=!0)}return r?e:null},_.prototype.buildRawContent=function(t){if("string"==typeof t)return t;if("object"!=typeof t||null===t)return String(t);if(void 0!==t[this.options.textNodeName])return t[this.options.textNodeName];var e="";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&!(this.isAttribute(r)||this.options.attributesGroupName&&r===this.options.attributesGroupName)){var i=t[r];if(r===this.options.textNodeName)e+=i;else if(Array.isArray(i))for(var s,n=E(i);!(s=n()).done;){var a=s.value;if("string"==typeof a||"number"==typeof a)e+="<"+r+">"+a+"</"+r+">";else if("object"==typeof a&&null!==a){var o=this.buildRawContent(a),h=this.buildAttributesForStopNode(a);e+=""===o?"<"+r+h+"/>":"<"+r+h+">"+o+"</"+r+">"}}else if("object"==typeof i&&null!==i){var p=this.buildRawContent(i),u=this.buildAttributesForStopNode(i);e+=""===p?"<"+r+u+"/>":"<"+r+u+">"+p+"</"+r+">"}else e+="<"+r+">"+i+"</"+r+">"}return e},_.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";var e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){var r=t[this.options.attributesGroupName];for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var s=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,n=r[i];!0===n&&this.options.suppressBooleanAttributes?e+=" "+s:e+=" "+s+'="'+n+'"'}}else for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=this.isAttribute(a);if(o){var h=t[a];!0===h&&this.options.suppressBooleanAttributes?e+=" "+o:e+=" "+o+'="'+h+'"'}}return e},_.prototype.buildObjectNode=function(t,e,r,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+r+"?"+this.tagEndChar:this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar;if("?"===e[0])return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;var s="</"+e+this.tagEndChar,n="";return"?"===e[0]&&(n="?",s=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===n.length?this.indentate(i)+"\x3c!--"+t+"--\x3e"+this.newLine:this.indentate(i)+"<"+e+r+n+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+r+n+">"+t+s},_.prototype.closeTag=function(t){var e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":"></"+t,e},_.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(var e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1},_.prototype.buildTextValNode=function(t,e,r,i,s){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName){var o=a(t);return this.indentate(i)+"<![CDATA["+o+"]]>"+this.newLine}if(!1!==this.options.commentPropName&&e===this.options.commentPropName){var h=n(t);return this.indentate(i)+"\x3c!--"+h+"--\x3e"+this.newLine}if("?"===e[0])return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;var p=this.options.tagValueProcessor(e,t);return""===(p=this.replaceEntitiesValue(p))?this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+r+">"+p+"</"+e+this.tagEndChar},_.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(var e=0;e<this.options.entities.length;e++){var r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t},e})());
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fxb=e():t.fxb=e()}(this,()=>(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{default:()=>$});class r{constructor(t,e={},r){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=r,this._hasDeepWildcard=this.segments.some(t=>"deep-wildcard"===t.type),this._hasAttributeCondition=this.segments.some(t=>void 0!==t.attrName),this._hasPositionSelector=this.segments.some(t=>void 0!==t.position)}_parse(t){const e=[];let r=0,i="";for(;r<t.length;)t[r]===this.separator?r+1<t.length&&t[r+1]===this.separator?(i.trim()&&(e.push(this._parseSegment(i.trim())),i=""),e.push({type:"deep-wildcard"}),r+=2):(i.trim()&&e.push(this._parseSegment(i.trim())),i="",r++):(i+=t[r],r++);return i.trim()&&e.push(this._parseSegment(i.trim())),e}_parseSegment(t){const e={type:"tag"};let r=null,i=t;const s=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(s&&(i=s[1]+s[3],s[2])){const t=s[2].slice(1,-1);t&&(r=t)}let n,a,o=i;if(i.includes("::")){const e=i.indexOf("::");if(n=i.substring(0,e).trim(),o=i.substring(e+2).trim(),!n)throw new Error(`Invalid namespace in pattern: ${t}`)}let h=null;if(o.includes(":")){const t=o.lastIndexOf(":"),e=o.substring(0,t).trim(),r=o.substring(t+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(a=e,h=r):a=o}else a=o;if(!a)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=a,n&&(e.namespace=n),r)if(r.includes("=")){const t=r.indexOf("=");e.attrName=r.substring(0,t).trim(),e.attrValue=r.substring(t+1).trim()}else e.attrName=r.trim();if(h){const t=h.match(/^nth\((\d+)\)$/);t?(e.position="nth",e.positionValue=parseInt(t[1],10)):e.position=h}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class i{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){const t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){const t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){const e=this._matcher.path;if(0!==e.length)return e[e.length-1].values?.[t]}hasAttr(t){const e=this._matcher.path;if(0===e.length)return!1;const r=e[e.length-1];return void 0!==r.values&&t in r.values}getAnyParentAttr(t){return this._matcher.getAnyParentAttr(t)}hasAnyParentAttr(t){return this._matcher.hasAnyParentAttr(t)}getPosition(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].position??0}getCounter(){const t=this._matcher.path;return 0===t.length?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class s{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new i(this),this._keptAttrs=[]}push(t,e=null,r=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const s=this.path.length;let n=this.siblingStacks[s];n||(n={counts:new Map,total:0},this.siblingStacks[s]=n);const a=r?`${r}:${t}`:t,o=n.counts.get(a)||0,h=n.total;n.counts.set(a,o+1),n.total++;const p={tag:t,position:h,counter:o};null!=r&&(p.namespace=r),null!=e&&(p.values=e),this.path.push(p);const u=this.path.length,l=null!==i?i.keep:null;if(null!=l&&l.length>0&&e)for(let t=0;t<l.length;t++){const r=l[t];void 0!==e[r]&&this._keptAttrs.push({depth:u,name:r,value:e[r]})}}pop(){if(0===this.path.length)return;this._pathStringCache=null;const t=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);const e=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=e;)this._keptAttrs.pop();return t}updateCurrent(t){if(this.path.length>0){const e=this.path[this.path.length-1];null!=t&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(0!==this.path.length)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(0===this.path.length)return!1;const e=this.path[this.path.length-1];return void 0!==e.values&&t in e.values}getAnyParentAttr(t){const e=this._keptAttrs;for(let r=e.length-1;r>=0;r--)if(e[r].name===t)return e[r].value}hasAnyParentAttr(t){const e=this._keptAttrs;for(let r=e.length-1;r>=0;r--)if(e[r].name===t)return!0;return!1}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){const r=t||this.separator;if(r===this.separator&&!0===e){if(null!==this._pathStringCache)return this._pathStringCache;const t=this.path.map(t=>t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(r);return this._pathStringCache=t,t}return this.path.map(t=>e&&t.namespace?`${t.namespace}:${t.tag}`:t.tag).join(r)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(t){const e=t.segments;return 0!==e.length&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,r=t.length-1;for(;r>=0&&e>=0;){const i=t[r];if("deep-wildcard"===i.type){if(r--,r<0)return!0;const i=t[r];let s=!1;for(let t=e;t>=0;t--)if(this._matchSegment(i,this.path[t],t===this.path.length-1)){e=t-1,r--,s=!0;break}if(!s)return!1}else{if(!this._matchSegment(i,this.path[e],e===this.path.length-1))return!1;e--,r--}}return r<0}_matchSegment(t,e,r){if("*"!==t.tag&&t.tag!==e.tag)return!1;if(void 0!==t.namespace&&"*"!==t.namespace&&t.namespace!==e.namespace)return!1;if(void 0!==t.attrName){if(!r)return!1;if(!e.values||!(t.attrName in e.values))return!1;if(void 0!==t.attrValue&&String(e.values[t.attrName])!==String(t.attrValue))return!1}if(void 0!==t.position){if(!r)return!1;const i=e.counter??0;if("first"===t.position&&0!==i)return!1;if("odd"===t.position&&i%2!=1)return!1;if("even"===t.position&&i%2!=0)return!1;if("nth"===t.position&&i!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),keptAttrs:this._keptAttrs.map(t=>({...t}))}}restore(t){this._pathStringCache=null,this.path=t.path.map(t=>({...t})),this.siblingStacks=t.siblingStacks.map(t=>t?{counts:new Map(t.counts),total:t.total}:t),this._keptAttrs=(t.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}}function n(t){return"number"==typeof t&&Object.is(t,-0)?"-0":String(t)}function a(t){return n(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function o(t){return n(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function h(t){return n(t).replace(/"/g,""").replace(/'/g,"'")}const p=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�",u=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",l=u+"\\-\\.\\d·̀-ͯ҇‿-⁀",c=(t,e,r="")=>{const i=`[${t.replace(":","")}][${e.replace(":","")}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,r),ncName:new RegExp(`^${i}$`,r),qName:new RegExp(`^${i}(?::${i})?$`,r),nmToken:new RegExp(`^[${e}]+$`,r),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,r)}},f=c(p,p+"\\-\\.\\d·̀-ͯ‿-⁀"),d=c(u,l,"u"),g=":A-Za-z_",m=c(g,g+"\\-\\.\\d"),b=["name","ncName","qName","nmToken","nmTokens"],v=(t,{xmlVersion:e="1.0",asciiOnly:r=!1,maxCacheSize:i=2048}={})=>{if(!b.includes(t))throw new TypeError(`Unknown production "${t}". Must be one of: ${b.join(", ")}`);const s=((t="1.0",e=!1)=>e?m:"1.1"===t?d:f)(e,r)[t];let n=new Map;const a=t=>{const e=n.get(t);if(void 0!==e)return e;const r=s.test(t);return n.size<i&&n.set(t,r),r};return a.reset=()=>{n=new Map},a};function N(t,e,r,i,s){return r.sanitizeName?s(t)?t:r.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function y(t,e){var i="";e.format&&(i="\n");var n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(var a=0;a<e.stopNodes.length;a++){var o=e.stopNodes[a];"string"==typeof o?n.push(new r(o)):o instanceof r&&n.push(o)}var h=function(t,e){if(!Array.isArray(t)||0===t.length)return"1.0";var r=t[0];if("?xml"===_(r)){var i=r[":@"];if(i){var s=e.attributeNamePrefix+"version";if(i[s])return i[s]}}return"1.0"}(t,e),p=v("qName",{xmlVersion:h});return A(t,e,i,new s,n,p)}function A(t,e,r,i,s,h){var p="",u=!1;if(e.maxNestedTags&&i.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(null!=t){var l=n(t);return E(l,e)}return""}for(var c=0;c<t.length;c++){var f=t[c],d=_(f);if(void 0!==d){var g=d===e.textNodeName||d===e.cdataPropName||d===e.commentPropName||"?"===d[0]?d:N(d,!1,e,i,h),m=x(f[":@"],e);i.push(g,m);var b=O(i,s);if(g!==e.textNodeName)if(g!==e.cdataPropName)if(g!==e.commentPropName)if("?"!==g[0]){var v=r;""!==v&&(v+=e.indentBy);var y=r+"<"+g+w(f[":@"],e,b,i,h),S=void 0;S=b?P(f[d],e):A(f[d],e,v,i,s,h),-1!==e.unpairedTags.indexOf(g)?e.suppressUnpairedNode?p+=y+">":p+=y+"/>":S&&0!==S.length||!e.suppressEmptyNode?S&&S.endsWith(">")?p+=y+">"+S+r+"</"+g+">":(p+=y+">",S&&""!==r&&(S.includes("/>")||S.includes("</"))?p+=r+e.indentBy+S+r:p+=S,p+="</"+g+">"):p+=y+"/>",u=!0,i.pop()}else p+=("?xml"===g?"":r)+"<"+g+w(f[":@"],e,b,i,h)+"?>",u=!0,i.pop();else p+=r+"\x3c!--"+a(f[d][0][e.textNodeName])+"--\x3e",u=!0,i.pop();else u&&(p+=r),p+="<![CDATA["+o(f[d][0][e.textNodeName])+"]]>",u=!1,i.pop();else{var j=f[d];b||(j=E(j=e.tagValueProcessor(g,j),e)),u&&(p+=r),p+=j=n(j),u=!1,i.pop()}}}return p}function x(t,e){if(!t||e.ignoreAttributes)return null;var r={},i=!1;for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s]=h(t[s]),i=!0);return i?r:null}function P(t,e){if(!Array.isArray(t))return null!=t?n(t):"";for(var r="",i=0;i<t.length;i++){var s=t[i],a=_(s);if(a===e.textNodeName)r+=n(s[a]);else if(a===e.cdataPropName)r+=s[a][0][e.textNodeName];else if(a===e.commentPropName)r+=s[a][0][e.textNodeName];else{if(a&&"?"===a[0])continue;if(a){var o=S(s[":@"],e),h=P(s[a],e);h&&0!==h.length?r+="<"+a+o+">"+h+"</"+a+">":r+="<"+a+o+"/>"}}}return r}function S(t,e){var r="";if(t&&!e.ignoreAttributes)for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];!0===s&&e.suppressBooleanAttributes?r+=" "+i.substr(e.attributeNamePrefix.length):r+=" "+i.substr(e.attributeNamePrefix.length)+'="'+h(s)+'"'}return r}function _(t){for(var e=Object.keys(t),r=0;r<e.length;r++){var i=e[r];if(Object.prototype.hasOwnProperty.call(t,i)&&":@"!==i)return i}}function w(t,e,r,i,s){var n="";if(t&&!e.ignoreAttributes)for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=a.substr(e.attributeNamePrefix.length),p=r?o:N(o,!0,e,i,s),u=void 0;!0===(u=r?t[a]:E(u=e.attributeValueProcessor(a,t[a]),e))&&e.suppressBooleanAttributes?n+=" "+p:n+=" "+p+'="'+h(u)+'"'}return n}function O(t,e){if(!e||0===e.length)return!1;for(var r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}function E(t,e){if(t&&t.length>0&&e.processEntities)for(var r=0;r<e.entities.length;r++){var i=e.entities[r];t=t.replace(i.regex,i.val)}return t}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function C(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}var T={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function $(t){if(this.options=Object.assign({},T,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(function(t){return"string"==typeof t&&t.startsWith("*.")?".."+t.substring(2):t})),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(var e=0;e<this.options.stopNodes.length;e++){var i=this.options.stopNodes[e];"string"==typeof i?this.stopNodeExpressions.push(new r(i)):i instanceof r&&this.stopNodeExpressions.push(i)}var s;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(s=this.options.ignoreAttributes)?s:Array.isArray(s)?function(t){for(var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return j(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(s);!(e=r()).done;){var i=e.value;if("string"==typeof i&&t===i)return!0;if(i instanceof RegExp&&i.test(t))return!0}}:function(){return!1},this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=D),this.processTextOrObjNode=G,this.options.format?(this.indentate=R,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function V(t,e,r,i,s){return r.sanitizeName?s(t)?t:r.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()}):t}function G(t,e,r,i,s){var n=this.extractAttributes(t);if(i.push(e,n),this.checkStopNode(i)){var a=this.buildRawContent(t),o=this.buildAttributesForStopNode(t);return i.pop(),this.buildObjectNode(a,e,o,r)}var h=this.j2x(t,r+1,i,s);return i.pop(),"?"===e[0]?this.buildTextValNode("",e,h.attrStr,r,i):void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,h.attrStr,r,i):this.buildObjectNode(h.val,e,h.attrStr,r)}function R(t){return this.options.indentBy.repeat(t)}function D(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}return $.prototype.build=function(t){if(this.options.preserveOrder)return y(t,this.options);var e;Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&((e={})[this.options.arrayNodeName]=t,t=e);var r=new s,i=function(t,e){var r=t["?xml"];if(r&&"object"==typeof r){if(e.attributesGroupName&&r[e.attributesGroupName]){var i=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(i)return i}var s=r[e.attributeNamePrefix+"version"];if(s)return s}return"1.0"}(t,this.options),n=v("qName",{xmlVersion:i});return this.j2x(t,0,r,n).val},$.prototype.j2x=function(t,e,r,i){var s="",a="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");var o=this.options.jPath?r.toString():r,h=this.checkStopNode(r);for(var p in t)if(Object.prototype.hasOwnProperty.call(t,p)){var u=p===this.options.textNodeName||p===this.options.cdataPropName||p===this.options.commentPropName||this.options.attributesGroupName&&p===this.options.attributesGroupName||this.isAttribute(p)||"?"===p[0]?p:V(p,!1,this.options,r,i);if(void 0===t[p])this.isAttribute(p)&&(a+="");else if(null===t[p])this.isAttribute(p)||u===this.options.cdataPropName||u===this.options.commentPropName?a+="":"?"===u[0]?a+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:a+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(t[p]instanceof Date)a+=this.buildTextValNode(t[p],u,"",e,r);else if("object"!=typeof t[p]){var l=this.isAttribute(p);if(l&&!this.ignoreAttributesFn(l,o)){var c=V(l,!0,this.options,r,i);s+=this.buildAttrPairStr(c,n(t[p]),h)}else if(!l)if(p===this.options.textNodeName){var f=this.options.tagValueProcessor(p,n(t[p]));a+=this.replaceEntitiesValue(f)}else{r.push(u);var d=this.checkStopNode(r);if(r.pop(),d){var g=n(t[p]);a+=""===g?this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:this.indentate(e)+"<"+u+">"+g+"</"+u+this.tagEndChar}else a+=this.buildTextValNode(t[p],u,"",e,r)}}else if(Array.isArray(t[p])){for(var m=t[p].length,b="",v="",N=0;N<m;N++){var y=t[p][N];if(void 0===y);else if(null===y)"?"===u[0]?a+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:a+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if("object"==typeof y)if(this.options.oneListGroup){r.push(u);var A=this.j2x(y,e+1,r,i);r.pop(),b+=A.val,this.options.attributesGroupName&&y.hasOwnProperty(this.options.attributesGroupName)&&(v+=A.attrStr)}else b+=this.processTextOrObjNode(y,u,e,r,i);else if(this.options.oneListGroup){var x=this.options.tagValueProcessor(u,y);b+=x=n(x=this.replaceEntitiesValue(x))}else{r.push(u);var P=this.checkStopNode(r);if(r.pop(),P){var S=n(y);b+=""===S?this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:this.indentate(e)+"<"+u+">"+S+"</"+u+this.tagEndChar}else b+=this.buildTextValNode(y,u,"",e,r)}}this.options.oneListGroup&&(b=this.buildObjectNode(b,u,v,e)),a+=b}else if(this.options.attributesGroupName&&p===this.options.attributesGroupName)for(var _=Object.keys(t[p]),w=_.length,O=0;O<w;O++){var E=V(_[O],!0,this.options,r,i);s+=this.buildAttrPairStr(E,n(t[p][_[O]]),h)}else a+=this.processTextOrObjNode(t[p],u,e,r,i)}return{attrStr:s,val:a}},$.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,n(e)),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+h(e)+'"'},$.prototype.extractAttributes=function(t){if(!t||"object"!=typeof t)return null;var e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){var i=t[this.options.attributesGroupName];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s]=h(i[s]),r=!0)}else for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=this.isAttribute(n);a&&(e[a]=h(t[n]),r=!0)}return r?e:null},$.prototype.buildRawContent=function(t){if("string"==typeof t)return t;if("object"!=typeof t||null===t)return String(t);if(void 0!==t[this.options.textNodeName])return t[this.options.textNodeName];var e="";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&!(this.isAttribute(r)||this.options.attributesGroupName&&r===this.options.attributesGroupName)){var i=t[r];if(r===this.options.textNodeName)e+=i;else if(Array.isArray(i))for(var s,n=C(i);!(s=n()).done;){var a=s.value;if("string"==typeof a||"number"==typeof a)e+="<"+r+">"+a+"</"+r+">";else if("object"==typeof a&&null!==a){var o=this.buildRawContent(a),h=this.buildAttributesForStopNode(a);e+=""===o?"<"+r+h+"/>":"<"+r+h+">"+o+"</"+r+">"}}else if("object"==typeof i&&null!==i){var p=this.buildRawContent(i),u=this.buildAttributesForStopNode(i);e+=""===p?"<"+r+u+"/>":"<"+r+u+">"+p+"</"+r+">"}else e+="<"+r+">"+i+"</"+r+">"}return e},$.prototype.buildAttributesForStopNode=function(t){if(!t||"object"!=typeof t)return"";var e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){var r=t[this.options.attributesGroupName];for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var s=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,n=r[i];!0===n&&this.options.suppressBooleanAttributes?e+=" "+s:e+=" "+s+'="'+h(n)+'"'}}else for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var o=this.isAttribute(a);if(o){var p=t[a];!0===p&&this.options.suppressBooleanAttributes?e+=" "+o:e+=" "+o+'="'+h(p)+'"'}}return e},$.prototype.buildObjectNode=function(t,e,r,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+r+"?"+this.tagEndChar:this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar;if("?"===e[0])return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;var s="</"+e+this.tagEndChar,n="";return"?"===e[0]&&(n="?",s=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===n.length?this.indentate(i)+"\x3c!--"+a(t)+"--\x3e"+this.newLine:this.indentate(i)+"<"+e+r+n+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+r+n+">"+t+s},$.prototype.closeTag=function(t){var e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":"></"+t,e},$.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(var e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1},$.prototype.buildTextValNode=function(t,e,r,i,s){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName){var h=o(t);return this.indentate(i)+"<![CDATA["+h+"]]>"+this.newLine}if(!1!==this.options.commentPropName&&e===this.options.commentPropName){var p=a(t);return this.indentate(i)+"\x3c!--"+p+"--\x3e"+this.newLine}if("?"===e[0])return this.indentate(i)+"<"+e+r+"?"+this.tagEndChar;var u=this.options.tagValueProcessor(e,t);return""===(u=n(u=this.replaceEntitiesValue(u)))?this.indentate(i)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+r+">"+u+"</"+e+this.tagEndChar},$.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(var e=0;e<this.options.entities.length;e++){var r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t},e})());
|
|
2
2
|
//# sourceMappingURL=fxb.min.js.map
|