@cdklabs/cdk-ecs-codedeploy 0.0.430 → 0.0.432
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +3 -3
- package/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/index.js +17 -18
- package/node_modules/@aws-sdk/client-codedeploy/package.json +39 -39
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +11 -19
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +11 -19
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +2 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +5 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ProtocolLib.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlShapeSerializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-env/dist-types/fromEnv.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/checkUrl.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/fromHttp.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-http/dist-types/fromHttp/requestHelpers.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/fromIni.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveCredentialSource.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProcessCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveStaticCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveWebIdentityCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +15 -15
- package/node_modules/@aws-sdk/credential-provider-login/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-node/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +3 -3
- package/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/fromProcess.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/getValidatedProcessCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-process/dist-types/resolveProcessCredentials.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/fromSSO.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/isSsoProfile.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/loadSso.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/resolveSSOCredentials.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/ts3.4/loadSso.d.ts +5 -2
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/types.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-types/validateSsoProfile.d.ts +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +2 -2
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +14 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js +1 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromTokenFile.d.ts +1 -1
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
- package/node_modules/@aws-sdk/middleware-host-header/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-host-header/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-logger/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +7 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/configuration.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/getRecursionDetectionPlugin.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/recursionDetectionMiddleware.browser.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/recursionDetectionMiddleware.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/recursionDetectionMiddleware.native.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +4 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts +1 -1
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts +2 -2
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +9 -8
- package/node_modules/@aws-sdk/nested-clients/cognito-identity.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/cognito-identity.js +5 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +60 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/endpoint/ruleset.js +146 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +174 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/models/CognitoIdentityServiceException.js +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/models/errors.js +121 -0
- package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/cognito-identity}/runtimeConfig.browser.js +3 -2
- package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/cognito-identity}/runtimeConfig.js +5 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/runtimeConfig.shared.js +50 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/schemas/schemas_0.js +110 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/endpoint/ruleset.js +128 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +17 -18
- package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/sso}/auth/httpAuthSchemeProvider.js +8 -27
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
- package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/sso}/index.js +18 -71
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.browser.js +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/runtimeConfig.native.js +15 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +101 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +17 -18
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js +140 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +23 -17
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentity.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/CognitoIdentityClient.js +50 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +54 -0
- package/node_modules/@aws-sdk/{client-sso/dist-es/commands/ListAccountRolesCommand.js → nested-clients/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js} +5 -5
- package/node_modules/@aws-sdk/{client-sso/dist-es/commands/LogoutCommand.js → nested-clients/dist-es/submodules/cognito-identity/commands/GetIdCommand.js} +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/commands/index.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/EndpointParameters.js +13 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/ruleset.js +143 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/index.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +109 -0
- package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/runtimeConfig.browser.js +3 -2
- package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/runtimeConfig.js +5 -3
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +46 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +107 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/Signin.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js +128 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/SSO.js +9 -0
- package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/SSOClient.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js +38 -0
- package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/auth/httpAuthSchemeProvider.js +9 -28
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/commands/index.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/endpointResolver.js +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js +103 -0
- package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.browser.js +33 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +48 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.native.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeExtensions.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +87 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/ruleset.js +101 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js +140 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +198 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +30 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +120 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commands/GetIdCommand.d.ts +107 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/endpoint/ruleset.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/index.d.ts +29 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +14 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +119 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/models_0.d.ts +136 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +62 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +62 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +61 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeExtensions.d.ts +17 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/schemas/schemas_0.d.ts +25 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/ruleset.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +32 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/SSOClient.d.ts +6 -8
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/auth/httpAuthExtensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/auth/httpAuthSchemeProvider.d.ts +1 -1
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/commands/GetRoleCredentialsCommand.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/EndpointParameters.d.ts +50 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/endpoint/ruleset.d.ts +2 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/models_0.d.ts +61 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/schemas/schemas_0.d.ts +0 -10
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/defaultRoleAssumers.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/endpoint/ruleset.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentityClient.d.ts +126 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +51 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commands/GetIdCommand.d.ts +41 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/index.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +68 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/models_0.d.ts +23 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +122 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +117 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +126 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +60 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeExtensions.d.ts +13 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/schemas/schemas_0.d.ts +24 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +22 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/SSOClient.d.ts +3 -24
- package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/auth/httpAuthExtensionConfiguration.d.ts +1 -1
- package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/commands/GetRoleCredentialsCommand.d.ts +5 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/commands/index.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/EndpointParameters.d.ts +51 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/index.d.ts +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/models_0.d.ts +14 -0
- package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/schemas/schemas_0.d.ts +0 -10
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +57 -37
- package/node_modules/@aws-sdk/nested-clients/sso.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/sso.js +5 -0
- package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +12 -23
- package/node_modules/@aws-sdk/region-config-resolver/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +2 -2
- package/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +1 -1
- package/node_modules/@aws-sdk/token-providers/package.json +8 -8
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +3 -12
- package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +3 -3
- package/node_modules/@aws-sdk/types/dist-types/extensions/index.d.ts +1 -1
- package/node_modules/@aws-sdk/types/dist-types/http.d.ts +1 -1
- package/node_modules/@aws-sdk/types/dist-types/identity/AnonymousIdentity.d.ts +1 -1
- package/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts +1 -1
- package/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +2 -2
- package/node_modules/@aws-sdk/types/dist-types/token.d.ts +2 -2
- package/node_modules/@aws-sdk/types/package.json +3 -3
- package/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +3 -12
- package/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts +1 -1
- package/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts +1 -1
- package/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts +1 -1
- package/node_modules/@aws-sdk/util-endpoints/package.json +6 -6
- package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +68 -8
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/defaultUserAgent.js +7 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getRuntimeUserAgentPair.js +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedTypeScriptVersion.js +9 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +17 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +29 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedTypeScriptVersion.d.ts +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getTypeScriptPackageJsonPaths.d.ts +10 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getTypeScriptUserAgentPair.d.ts +6 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/is-crt-available.d.ts +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/nodeAppIdConfigOptions.d.ts +1 -1
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedTypeScriptVersion.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptUserAgentPair.d.ts +4 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +9 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +1 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +1 -0
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +1 -0
- package/node_modules/@aws-sdk/xml-builder/dist-types/XmlNode.d.ts +1 -1
- package/node_modules/@aws-sdk/xml-builder/dist-types/XmlText.d.ts +1 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@smithy/abort-controller/package.json +3 -3
- package/node_modules/@smithy/config-resolver/package.json +7 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +23 -3
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -8
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +22 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/resolve-path.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +1 -1
- package/node_modules/@smithy/core/package.json +12 -12
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +18 -4
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +18 -4
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/hash-node/package.json +5 -5
- package/node_modules/@smithy/invalid-dependency/package.json +3 -3
- package/node_modules/@smithy/is-array-buffer/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +4 -4
- package/node_modules/@smithy/middleware-endpoint/package.json +9 -9
- package/node_modules/@smithy/middleware-retry/package.json +10 -10
- package/node_modules/@smithy/middleware-serde/package.json +4 -4
- package/node_modules/@smithy/middleware-stack/package.json +3 -3
- package/node_modules/@smithy/node-config-provider/package.json +5 -5
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +21 -8
- package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +16 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -4
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +3 -4
- package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/package.json +6 -6
- package/node_modules/@smithy/property-provider/package.json +3 -3
- package/node_modules/@smithy/protocol-http/package.json +3 -3
- package/node_modules/@smithy/querystring-builder/package.json +4 -4
- package/node_modules/@smithy/querystring-parser/package.json +3 -3
- package/node_modules/@smithy/service-error-classification/package.json +3 -3
- package/node_modules/@smithy/shared-ini-file-loader/package.json +3 -3
- package/node_modules/@smithy/signature-v4/package.json +9 -9
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +20 -1
- package/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js +20 -1
- package/node_modules/@smithy/smithy-client/dist-types/extensions/checksum.d.ts +9 -7
- package/node_modules/@smithy/smithy-client/dist-types/ts3.4/extensions/checksum.d.ts +9 -7
- package/node_modules/@smithy/smithy-client/package.json +11 -9
- package/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +1 -1
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +1 -1
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +4 -4
- package/node_modules/@smithy/util-base64/package.json +4 -4
- package/node_modules/@smithy/util-body-length-browser/package.json +2 -2
- package/node_modules/@smithy/util-body-length-node/package.json +2 -2
- package/node_modules/@smithy/util-buffer-from/package.json +3 -3
- package/node_modules/@smithy/util-config-provider/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +5 -5
- package/node_modules/@smithy/util-defaults-mode-node/package.json +8 -8
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +1 -1
- package/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +1 -1
- package/node_modules/@smithy/util-endpoints/package.json +4 -4
- package/node_modules/@smithy/util-hex-encoding/package.json +2 -2
- package/node_modules/@smithy/util-middleware/package.json +3 -3
- package/node_modules/@smithy/util-retry/package.json +4 -4
- package/node_modules/@smithy/util-stream/package.json +9 -9
- package/node_modules/@smithy/util-uri-escape/package.json +2 -2
- package/node_modules/@smithy/util-utf8/package.json +3 -3
- package/node_modules/@smithy/util-waiter/package.json +4 -4
- package/node_modules/@smithy/uuid/package.json +2 -2
- package/node_modules/fast-xml-builder/LICENSE +21 -0
- package/node_modules/fast-xml-builder/README.md +23 -0
- package/node_modules/fast-xml-builder/lib/builder.cjs +1 -0
- package/node_modules/fast-xml-builder/lib/builder.min.js +2 -0
- package/node_modules/fast-xml-builder/lib/builder.min.js.map +1 -0
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +167 -0
- package/node_modules/fast-xml-builder/package.json +78 -0
- package/node_modules/fast-xml-builder/src/fxb.d.ts +156 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js → fast-xml-builder/src/fxb.js} +50 -50
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder → fast-xml-builder/src}/orderedJs2Xml.js +14 -3
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/CHANGELOG.md +23 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/lib/fxp.d.cts +15 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/package.json +3 -2
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/fxp.d.ts +16 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/fxp.js +1 -1
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/util.js +1 -26
- package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +106 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OptionsBuilder.js +10 -10
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/BaseOutputBuilder.js +23 -23
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsArrBuilder.js +29 -29
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsObjBuilder.js +39 -39
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/ParserOptionsBuilder.js +17 -17
- package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XMLParser.js +22 -22
- package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/validator.js +34 -34
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +6 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/DocTypeReader.js +1 -1
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/OptionsBuilder.js +2 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/OrderedObjParser.js +27 -5
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/XMLParser.js +21 -21
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/node2json.js +38 -34
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/xmlNode.js +10 -10
- package/node_modules/strnum/README.md +1 -0
- package/node_modules/strnum/package.json +3 -3
- package/node_modules/strnum/strnum.js +85 -59
- package/node_modules/strnum/tests/infinity_test.js +18 -0
- package/node_modules/strnum/{strnum.test.js → tests/strnum_test.js} +67 -68
- package/package.json +6 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/LICENSE +0 -201
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/README.md +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +0 -415
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-cjs/lib/aws/partitions.json +0 -267
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/aws.js +0 -10
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/index.js +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/index.js +0 -3
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js +0 -25
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js +0 -18
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js +0 -41
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partitions.json +0 -267
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/lib/isIpAddress.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/resolveDefaultAwsRegionalEndpointsConfig.js +0 -21
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/resolveEndpoint.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointError.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/RuleSetObject.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/TreeRuleObject.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/index.js +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/shared.js +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/aws.d.ts +0 -2
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/index.d.ts +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/index.d.ts +0 -3
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/isVirtualHostableS3Bucket.d.ts +0 -5
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/parseArn.d.ts +0 -7
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts +0 -38
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/lib/isIpAddress.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/resolveDefaultAwsRegionalEndpointsConfig.d.ts +0 -56
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/resolveEndpoint.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/aws.d.ts +0 -2
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/index.d.ts +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/index.d.ts +0 -3
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/isVirtualHostableS3Bucket.d.ts +0 -4
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/parseArn.d.ts +0 -2
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts +0 -28
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/isIpAddress.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveDefaultAwsRegionalEndpointsConfig.d.ts +0 -35
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/resolveEndpoint.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointError.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts +0 -5
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/index.d.ts +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts +0 -12
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointError.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/index.d.ts +0 -6
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts +0 -1
- package/node_modules/@aws-sdk/client-codedeploy/node_modules/@aws-sdk/util-endpoints/package.json +0 -60
- package/node_modules/@aws-sdk/client-sso/LICENSE +0 -201
- package/node_modules/@aws-sdk/client-sso/README.md +0 -244
- package/node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js +0 -7
- package/node_modules/@aws-sdk/client-sso/dist-cjs/schemas/schemas_0.js +0 -161
- package/node_modules/@aws-sdk/client-sso/dist-es/SSO.js +0 -21
- package/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountsCommand.js +0 -16
- package/node_modules/@aws-sdk/client-sso/dist-es/commands/index.js +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-es/endpoint/ruleset.js +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-es/pagination/Interfaces.js +0 -1
- package/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountRolesPaginator.js +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-es/pagination/ListAccountsPaginator.js +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-es/pagination/index.js +0 -3
- package/node_modules/@aws-sdk/client-sso/dist-es/schemas/schemas_0.js +0 -158
- package/node_modules/@aws-sdk/client-sso/dist-types/SSO.d.ts +0 -67
- package/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountRolesCommand.d.ts +0 -98
- package/node_modules/@aws-sdk/client-sso/dist-types/commands/ListAccountsCommand.d.ts +0 -100
- package/node_modules/@aws-sdk/client-sso/dist-types/commands/LogoutCommand.d.ts +0 -97
- package/node_modules/@aws-sdk/client-sso/dist-types/commands/index.d.ts +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/models/models_0.d.ts +0 -189
- package/node_modules/@aws-sdk/client-sso/dist-types/pagination/Interfaces.d.ts +0 -8
- package/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountRolesPaginator.d.ts +0 -7
- package/node_modules/@aws-sdk/client-sso/dist-types/pagination/ListAccountsPaginator.d.ts +0 -7
- package/node_modules/@aws-sdk/client-sso/dist-types/pagination/index.d.ts +0 -3
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSO.d.ts +0 -91
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountRolesCommand.d.ts +0 -50
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/ListAccountsCommand.d.ts +0 -47
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/LogoutCommand.d.ts +0 -41
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/commands/index.d.ts +0 -4
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/models/models_0.d.ts +0 -45
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/Interfaces.d.ts +0 -5
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountRolesPaginator.d.ts +0 -11
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/ListAccountsPaginator.d.ts +0 -11
- package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/pagination/index.d.ts +0 -3
- package/node_modules/@aws-sdk/client-sso/package.json +0 -99
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +0 -14
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
- package/node_modules/strnum/test.js +0 -9
- /package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/cognito-identity}/endpoint/endpointResolver.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/cognito-identity}/runtimeConfig.native.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/sso}/models/SSOServiceException.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/sso}/models/errors.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-cjs → nested-clients/dist-cjs/submodules/sso}/runtimeConfig.shared.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/auth/httpAuthExtensionConfiguration.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/endpoint/endpointResolver.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/extensionConfiguration.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/models/models_0.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/runtimeConfig.native.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/cognito-identity}/runtimeExtensions.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/commands/GetRoleCredentialsCommand.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/endpoint/EndpointParameters.js +0 -0
- /package/node_modules/@aws-sdk/{client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/EndpointRuleObject.js → nested-clients/dist-es/submodules/sso/extensionConfiguration.js} +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/models/SSOServiceException.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/models/errors.js +0 -0
- /package/node_modules/@aws-sdk/{client-codedeploy/node_modules/@aws-sdk/util-endpoints/dist-es/types/ErrorRuleObject.js → nested-clients/dist-es/submodules/sso/models/models_0.js} +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-es → nested-clients/dist-es/submodules/sso}/runtimeConfig.shared.js +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/cognito-identity}/endpoint/EndpointParameters.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/cognito-identity}/endpoint/endpointResolver.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/extensionConfiguration.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/models/SSOServiceException.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/models/errors.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/runtimeConfig.browser.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/runtimeConfig.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/runtimeConfig.native.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/runtimeConfig.shared.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/submodules/sso}/runtimeExtensions.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/cognito-identity}/endpoint/EndpointParameters.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/cognito-identity}/endpoint/endpointResolver.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types → nested-clients/dist-types/ts3.4/submodules/cognito-identity}/endpoint/ruleset.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/auth/httpAuthSchemeProvider.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/endpoint/ruleset.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/extensionConfiguration.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/models/SSOServiceException.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/models/errors.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/runtimeConfig.browser.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/runtimeConfig.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/runtimeConfig.native.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/runtimeConfig.shared.d.ts +0 -0
- /package/node_modules/@aws-sdk/{client-sso/dist-types/ts3.4 → nested-clients/dist-types/ts3.4/submodules/sso}/runtimeExtensions.d.ts +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js → fast-xml-builder/CHANGELOG.md} +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-builder}/src/ignoreAttributes.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder → fast-xml-builder/src}/prettifyJs2Xml.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/LICENSE +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/README.md +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/cli.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/man.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/read.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/CharsSymbol.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/TagPath.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/TagPathMatcher.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/Xml2JsParser.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XmlPartReader.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XmlSpecialTagsReader.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/inputSource/BufferSource.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/inputSource/StringSource.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/booleanParser.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/booleanParserExt.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/currency.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/join.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/number.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/trim.js +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" };
|
|
2
|
+
const htmlEntities = {
|
|
3
|
+
"space": { regex: /&(nbsp|#160);/g, val: " " },
|
|
4
|
+
// "lt" : { regex: /&(lt|#60);/g, val: "<" },
|
|
5
|
+
// "gt" : { regex: /&(gt|#62);/g, val: ">" },
|
|
6
|
+
// "amp" : { regex: /&(amp|#38);/g, val: "&" },
|
|
7
|
+
// "quot" : { regex: /&(quot|#34);/g, val: "\"" },
|
|
8
|
+
// "apos" : { regex: /&(apos|#39);/g, val: "'" },
|
|
9
|
+
"cent": { regex: /&(cent|#162);/g, val: "¢" },
|
|
10
|
+
"pound": { regex: /&(pound|#163);/g, val: "£" },
|
|
11
|
+
"yen": { regex: /&(yen|#165);/g, val: "¥" },
|
|
12
|
+
"euro": { regex: /&(euro|#8364);/g, val: "€" },
|
|
13
|
+
"copyright": { regex: /&(copy|#169);/g, val: "©" },
|
|
14
|
+
"reg": { regex: /&(reg|#174);/g, val: "®" },
|
|
15
|
+
"inr": { regex: /&(inr|#8377);/g, val: "₹" },
|
|
16
|
+
"num_dec": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCodePoint(Number.parseInt(str, 10)) },
|
|
17
|
+
"num_hex": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCodePoint(Number.parseInt(str, 16)) },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default class EntitiesParser {
|
|
21
|
+
constructor(replaceHtmlEntities) {
|
|
22
|
+
this.replaceHtmlEntities = replaceHtmlEntities;
|
|
23
|
+
this.docTypeEntities = {};
|
|
24
|
+
this.lastEntities = {
|
|
25
|
+
"apos": { regex: /&(apos|#39|#x27);/g, val: "'" },
|
|
26
|
+
"gt": { regex: /&(gt|#62|#x3E);/g, val: ">" },
|
|
27
|
+
"lt": { regex: /&(lt|#60|#x3C);/g, val: "<" },
|
|
28
|
+
"quot": { regex: /&(quot|#34|#x22);/g, val: "\"" },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
addExternalEntities(externalEntities) {
|
|
33
|
+
const entKeys = Object.keys(externalEntities);
|
|
34
|
+
for (let i = 0; i < entKeys.length; i++) {
|
|
35
|
+
const ent = entKeys[i];
|
|
36
|
+
this.addExternalEntity(ent, externalEntities[ent])
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
addExternalEntity(key, val) {
|
|
40
|
+
validateEntityName(key);
|
|
41
|
+
if (val.indexOf("&") !== -1) {
|
|
42
|
+
reportWarning(`Entity ${key} is not added as '&' is found in value;`)
|
|
43
|
+
return;
|
|
44
|
+
} else {
|
|
45
|
+
this.lastEntities[ent] = {
|
|
46
|
+
regex: new RegExp("&" + key + ";", "g"),
|
|
47
|
+
val: val
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
addDocTypeEntities(entities) {
|
|
53
|
+
const entKeys = Object.keys(entities);
|
|
54
|
+
for (let i = 0; i < entKeys.length; i++) {
|
|
55
|
+
const ent = entKeys[i];
|
|
56
|
+
this.docTypeEntities[ent] = {
|
|
57
|
+
regex: new RegExp("&" + ent + ";", "g"),
|
|
58
|
+
val: entities[ent]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
parse(val) {
|
|
64
|
+
return this.replaceEntitiesValue(val)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 1. Replace DOCTYPE entities
|
|
69
|
+
* 2. Replace external entities
|
|
70
|
+
* 3. Replace HTML entities if asked
|
|
71
|
+
* @param {string} val
|
|
72
|
+
*/
|
|
73
|
+
replaceEntitiesValue(val) {
|
|
74
|
+
if (typeof val === "string" && val.length > 0) {
|
|
75
|
+
for (let entityName in this.docTypeEntities) {
|
|
76
|
+
const entity = this.docTypeEntities[entityName];
|
|
77
|
+
val = val.replace(entity.regx, entity.val);
|
|
78
|
+
}
|
|
79
|
+
for (let entityName in this.lastEntities) {
|
|
80
|
+
const entity = this.lastEntities[entityName];
|
|
81
|
+
val = val.replace(entity.regex, entity.val);
|
|
82
|
+
}
|
|
83
|
+
if (this.replaceHtmlEntities) {
|
|
84
|
+
for (let entityName in htmlEntities) {
|
|
85
|
+
const entity = htmlEntities[entityName];
|
|
86
|
+
val = val.replace(entity.regex, entity.val);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
val = val.replace(ampEntity.regex, ampEntity.val);
|
|
90
|
+
}
|
|
91
|
+
return val;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
//an entity name should not contains special characters that may be used in regex
|
|
96
|
+
//Eg !?\\\/[]$%{}^&*()<>
|
|
97
|
+
const specialChar = "!?\\\/[]$%{}^&*()<>|+";
|
|
98
|
+
|
|
99
|
+
function validateEntityName(name) {
|
|
100
|
+
for (let i = 0; i < specialChar.length; i++) {
|
|
101
|
+
const ch = specialChar[i];
|
|
102
|
+
if (name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
|
|
103
|
+
}
|
|
104
|
+
return name;
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import {getAllMatches, isName} from './util.js';
|
|
3
|
+
import { getAllMatches, isName } from './util.js';
|
|
4
4
|
|
|
5
5
|
const defaultOptions = {
|
|
6
6
|
allowBooleanAttributes: false, //A tag can have attributes without any value
|
|
@@ -24,19 +24,19 @@ export function validate(xmlData, options) {
|
|
|
24
24
|
// check for byte order mark (BOM)
|
|
25
25
|
xmlData = xmlData.substr(1);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
for (let i = 0; i < xmlData.length; i++) {
|
|
29
29
|
|
|
30
|
-
if (xmlData[i] === '<' && xmlData[i+1] === '?') {
|
|
31
|
-
i+=2;
|
|
32
|
-
i = readPI(xmlData,i);
|
|
30
|
+
if (xmlData[i] === '<' && xmlData[i + 1] === '?') {
|
|
31
|
+
i += 2;
|
|
32
|
+
i = readPI(xmlData, i);
|
|
33
33
|
if (i.err) return i;
|
|
34
|
-
}else if (xmlData[i] === '<') {
|
|
34
|
+
} else if (xmlData[i] === '<') {
|
|
35
35
|
//starting of tag
|
|
36
36
|
//read until you reach to '>' avoiding any '>' in attribute value
|
|
37
37
|
let tagStartPos = i;
|
|
38
38
|
i++;
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
if (xmlData[i] === '!') {
|
|
41
41
|
i = readCommentAndCDATA(xmlData, i);
|
|
42
42
|
continue;
|
|
@@ -72,14 +72,14 @@ export function validate(xmlData, options) {
|
|
|
72
72
|
if (tagName.trim().length === 0) {
|
|
73
73
|
msg = "Invalid space after '<'.";
|
|
74
74
|
} else {
|
|
75
|
-
msg = "Tag '"+tagName+"' is an invalid name.";
|
|
75
|
+
msg = "Tag '" + tagName + "' is an invalid name.";
|
|
76
76
|
}
|
|
77
77
|
return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const result = readAttributeStr(xmlData, i);
|
|
81
81
|
if (result === false) {
|
|
82
|
-
return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i));
|
|
82
|
+
return getErrorObject('InvalidAttr', "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i));
|
|
83
83
|
}
|
|
84
84
|
let attrStr = result.value;
|
|
85
85
|
i = result.index;
|
|
@@ -100,17 +100,17 @@ export function validate(xmlData, options) {
|
|
|
100
100
|
}
|
|
101
101
|
} else if (closingTag) {
|
|
102
102
|
if (!result.tagClosed) {
|
|
103
|
-
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
|
|
103
|
+
return getErrorObject('InvalidTag', "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
|
|
104
104
|
} else if (attrStr.trim().length > 0) {
|
|
105
|
-
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
|
|
105
|
+
return getErrorObject('InvalidTag', "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
|
|
106
106
|
} else if (tags.length === 0) {
|
|
107
|
-
return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos));
|
|
107
|
+
return getErrorObject('InvalidTag', "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos));
|
|
108
108
|
} else {
|
|
109
109
|
const otg = tags.pop();
|
|
110
110
|
if (tagName !== otg.tagName) {
|
|
111
111
|
let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);
|
|
112
112
|
return getErrorObject('InvalidTag',
|
|
113
|
-
"Expected closing tag '"+otg.tagName+"' (opened in line "+openPos.line+", col "+openPos.col+") instead of closing tag '"+tagName+"'.",
|
|
113
|
+
"Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.",
|
|
114
114
|
getLineNumberForPosition(xmlData, tagStartPos));
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -131,10 +131,10 @@ export function validate(xmlData, options) {
|
|
|
131
131
|
//if the root level has been reached before ...
|
|
132
132
|
if (reachedRoot === true) {
|
|
133
133
|
return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));
|
|
134
|
-
} else if(options.unpairedTags.indexOf(tagName) !== -1){
|
|
134
|
+
} else if (options.unpairedTags.indexOf(tagName) !== -1) {
|
|
135
135
|
//don't push into stack
|
|
136
136
|
} else {
|
|
137
|
-
tags.push({tagName, tagStartPos});
|
|
137
|
+
tags.push({ tagName, tagStartPos });
|
|
138
138
|
}
|
|
139
139
|
tagFound = true;
|
|
140
140
|
}
|
|
@@ -148,10 +148,10 @@ export function validate(xmlData, options) {
|
|
|
148
148
|
i++;
|
|
149
149
|
i = readCommentAndCDATA(xmlData, i);
|
|
150
150
|
continue;
|
|
151
|
-
} else if (xmlData[i+1] === '?') {
|
|
151
|
+
} else if (xmlData[i + 1] === '?') {
|
|
152
152
|
i = readPI(xmlData, ++i);
|
|
153
153
|
if (i.err) return i;
|
|
154
|
-
} else{
|
|
154
|
+
} else {
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
} else if (xmlData[i] === '&') {
|
|
@@ -159,7 +159,7 @@ export function validate(xmlData, options) {
|
|
|
159
159
|
if (afterAmp == -1)
|
|
160
160
|
return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i));
|
|
161
161
|
i = afterAmp;
|
|
162
|
-
}else{
|
|
162
|
+
} else {
|
|
163
163
|
if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {
|
|
164
164
|
return getErrorObject('InvalidXml', "Extra text at the end", getLineNumberForPosition(xmlData, i));
|
|
165
165
|
}
|
|
@@ -170,28 +170,28 @@ export function validate(xmlData, options) {
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
} else {
|
|
173
|
-
if (
|
|
173
|
+
if (isWhiteSpace(xmlData[i])) {
|
|
174
174
|
continue;
|
|
175
175
|
}
|
|
176
|
-
return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i));
|
|
176
|
+
return getErrorObject('InvalidChar', "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i));
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
if (!tagFound) {
|
|
181
181
|
return getErrorObject('InvalidXml', 'Start tag expected.', 1);
|
|
182
|
-
}else if (tags.length == 1) {
|
|
183
|
-
|
|
184
|
-
}else if (tags.length > 0) {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
} else if (tags.length == 1) {
|
|
183
|
+
return getErrorObject('InvalidTag', "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos));
|
|
184
|
+
} else if (tags.length > 0) {
|
|
185
|
+
return getErrorObject('InvalidXml', "Invalid '" +
|
|
186
|
+
JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\r?\n/g, '') +
|
|
187
|
+
"' found.", { line: 1, col: 1 });
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
return true;
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
function isWhiteSpace(char){
|
|
194
|
-
return char === ' ' || char === '\t' || char === '\n'
|
|
193
|
+
function isWhiteSpace(char) {
|
|
194
|
+
return char === ' ' || char === '\t' || char === '\n' || char === '\r';
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* Read Processing insstructions and skip
|
|
@@ -327,25 +327,25 @@ function validateAttributeString(attrStr, options) {
|
|
|
327
327
|
for (let i = 0; i < matches.length; i++) {
|
|
328
328
|
if (matches[i][1].length === 0) {
|
|
329
329
|
//nospace before attribute name: a="sd"b="saf"
|
|
330
|
-
return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(matches[i]))
|
|
330
|
+
return getErrorObject('InvalidAttr', "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i]))
|
|
331
331
|
} else if (matches[i][3] !== undefined && matches[i][4] === undefined) {
|
|
332
|
-
return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' is without value.", getPositionFromMatch(matches[i]));
|
|
332
|
+
return getErrorObject('InvalidAttr', "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i]));
|
|
333
333
|
} else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {
|
|
334
334
|
//independent attribute: ab
|
|
335
|
-
return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(matches[i]));
|
|
335
|
+
return getErrorObject('InvalidAttr', "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i]));
|
|
336
336
|
}
|
|
337
337
|
/* else if(matches[i][6] === undefined){//attribute without value: ab=
|
|
338
338
|
return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}};
|
|
339
339
|
} */
|
|
340
340
|
const attrName = matches[i][2];
|
|
341
341
|
if (!validateAttrName(attrName)) {
|
|
342
|
-
return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(matches[i]));
|
|
342
|
+
return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i]));
|
|
343
343
|
}
|
|
344
|
-
if (!
|
|
344
|
+
if (!Object.prototype.hasOwnProperty.call(attrNames, attrName)) {
|
|
345
345
|
//check for duplicate attribute.
|
|
346
346
|
attrNames[attrName] = 1;
|
|
347
347
|
} else {
|
|
348
|
-
return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(matches[i]));
|
|
348
|
+
return getErrorObject('InvalidAttr', "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i]));
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
@@ -163,6 +163,7 @@ function buildAttributesMap(attrStr, jPath, tagName) {
|
|
|
163
163
|
aName = this.options.transformAttributeName(aName);
|
|
164
164
|
}
|
|
165
165
|
if (aName === "__proto__") aName = "#__proto__";
|
|
166
|
+
|
|
166
167
|
if (oldVal !== undefined) {
|
|
167
168
|
if (this.options.trimValues) {
|
|
168
169
|
oldVal = oldVal.trim();
|
|
@@ -322,6 +323,13 @@ const parseXml = function (xmlData) {
|
|
|
322
323
|
tagName = newTagName;
|
|
323
324
|
}
|
|
324
325
|
|
|
326
|
+
if (this.options.strictReservedNames &&
|
|
327
|
+
(tagName === this.options.commentPropName
|
|
328
|
+
|| tagName === this.options.cdataPropName
|
|
329
|
+
)) {
|
|
330
|
+
throw new Error(`Invalid tag name: ${tagName}`);
|
|
331
|
+
}
|
|
332
|
+
|
|
325
333
|
//save text as child node
|
|
326
334
|
if (currentNode && textData) {
|
|
327
335
|
if (currentNode.tagname !== '!xml') {
|
|
@@ -406,9 +414,23 @@ const parseXml = function (xmlData) {
|
|
|
406
414
|
this.addChild(currentNode, childNode, jPath, startIndex);
|
|
407
415
|
jPath = jPath.substr(0, jPath.lastIndexOf("."));
|
|
408
416
|
}
|
|
417
|
+
else if(this.options.unpairedTags.indexOf(tagName) !== -1){//unpaired tag
|
|
418
|
+
const childNode = new xmlNode(tagName);
|
|
419
|
+
if(tagName !== tagExp && attrExpPresent){
|
|
420
|
+
childNode[":@"] = this.buildAttributesMap(tagExp, jPath);
|
|
421
|
+
}
|
|
422
|
+
this.addChild(currentNode, childNode, jPath, startIndex);
|
|
423
|
+
jPath = jPath.substr(0, jPath.lastIndexOf("."));
|
|
424
|
+
i = result.closeIndex;
|
|
425
|
+
// Continue to next iteration without changing currentNode
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
409
428
|
//opening tag
|
|
410
429
|
else {
|
|
411
430
|
const childNode = new xmlNode(tagName);
|
|
431
|
+
if (this.tagsNodeStack.length > this.options.maxNestedTags) {
|
|
432
|
+
throw new Error("Maximum nested tags exceeded");
|
|
433
|
+
}
|
|
412
434
|
this.tagsNodeStack.push(currentNode);
|
|
413
435
|
|
|
414
436
|
if (tagName !== tagExp && attrExpPresent) {
|
|
@@ -524,19 +546,19 @@ const replaceEntitiesValue = function (val, tagName, jPath) {
|
|
|
524
546
|
}
|
|
525
547
|
|
|
526
548
|
|
|
527
|
-
function saveTextToParentTag(textData,
|
|
549
|
+
function saveTextToParentTag(textData, parentNode, jPath, isLeafNode) {
|
|
528
550
|
if (textData) { //store previously collected data as textNode
|
|
529
|
-
if (isLeafNode === undefined) isLeafNode =
|
|
551
|
+
if (isLeafNode === undefined) isLeafNode = parentNode.child.length === 0
|
|
530
552
|
|
|
531
553
|
textData = this.parseTextData(textData,
|
|
532
|
-
|
|
554
|
+
parentNode.tagname,
|
|
533
555
|
jPath,
|
|
534
556
|
false,
|
|
535
|
-
|
|
557
|
+
parentNode[":@"] ? Object.keys(parentNode[":@"]).length !== 0 : false,
|
|
536
558
|
isLeafNode);
|
|
537
559
|
|
|
538
560
|
if (textData !== undefined && textData !== "")
|
|
539
|
-
|
|
561
|
+
parentNode.add(this.options.textNodeName, textData);
|
|
540
562
|
textData = "";
|
|
541
563
|
}
|
|
542
564
|
return textData;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { buildOptions} from './OptionsBuilder.js';
|
|
1
|
+
import { buildOptions } from './OptionsBuilder.js';
|
|
2
2
|
import OrderedObjParser from './OrderedObjParser.js';
|
|
3
3
|
import prettify from './node2json.js';
|
|
4
|
-
import {validate} from "../validator.js";
|
|
4
|
+
import { validate } from "../validator.js";
|
|
5
5
|
import XmlNode from './xmlNode.js';
|
|
6
6
|
|
|
7
|
-
export default class XMLParser{
|
|
8
|
-
|
|
9
|
-
constructor(options){
|
|
7
|
+
export default class XMLParser {
|
|
8
|
+
|
|
9
|
+
constructor(options) {
|
|
10
10
|
this.externalEntities = {};
|
|
11
11
|
this.options = buildOptions(options);
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Parse XML dats to JS object
|
|
16
16
|
* @param {string|Uint8Array} xmlData
|
|
17
17
|
* @param {boolean|Object} validationOption
|
|
18
18
|
*/
|
|
19
|
-
parse(xmlData,validationOption){
|
|
20
|
-
if(typeof xmlData !== "string" && xmlData.toString){
|
|
19
|
+
parse(xmlData, validationOption) {
|
|
20
|
+
if (typeof xmlData !== "string" && xmlData.toString) {
|
|
21
21
|
xmlData = xmlData.toString();
|
|
22
|
-
}else if(typeof xmlData !== "string"){
|
|
22
|
+
} else if (typeof xmlData !== "string") {
|
|
23
23
|
throw new Error("XML data is accepted in String or Bytes[] form.")
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
if(
|
|
27
|
-
if(validationOption === true) validationOption = {}; //validate with default options
|
|
28
|
-
|
|
25
|
+
|
|
26
|
+
if (validationOption) {
|
|
27
|
+
if (validationOption === true) validationOption = {}; //validate with default options
|
|
28
|
+
|
|
29
29
|
const result = validate(xmlData, validationOption);
|
|
30
30
|
if (result !== true) {
|
|
31
|
-
|
|
31
|
+
throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`)
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
}
|
|
34
34
|
const orderedObjParser = new OrderedObjParser(this.options);
|
|
35
35
|
orderedObjParser.addExternalEntities(this.externalEntities);
|
|
36
36
|
const orderedResult = orderedObjParser.parseXml(xmlData);
|
|
37
|
-
if(this.options.preserveOrder || orderedResult === undefined) return orderedResult;
|
|
37
|
+
if (this.options.preserveOrder || orderedResult === undefined) return orderedResult;
|
|
38
38
|
else return prettify(orderedResult, this.options);
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -43,14 +43,14 @@ export default class XMLParser{
|
|
|
43
43
|
* @param {string} key
|
|
44
44
|
* @param {string} value
|
|
45
45
|
*/
|
|
46
|
-
addEntity(key, value){
|
|
47
|
-
if(value.indexOf("&") !== -1){
|
|
46
|
+
addEntity(key, value) {
|
|
47
|
+
if (value.indexOf("&") !== -1) {
|
|
48
48
|
throw new Error("Entity value can't have '&'")
|
|
49
|
-
}else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){
|
|
49
|
+
} else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) {
|
|
50
50
|
throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'")
|
|
51
|
-
}else if(value === "&"){
|
|
51
|
+
} else if (value === "&") {
|
|
52
52
|
throw new Error("An entity with value '&' is not permitted");
|
|
53
|
-
}else{
|
|
53
|
+
} else {
|
|
54
54
|
this.externalEntities[key] = value;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -10,8 +10,8 @@ const METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
|
10
10
|
* @param {any} options
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
|
-
export default function prettify(node, options){
|
|
14
|
-
return compress(
|
|
13
|
+
export default function prettify(node, options) {
|
|
14
|
+
return compress(node, options);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -21,78 +21,82 @@ export default function prettify(node, options){
|
|
|
21
21
|
* @param {string} jPath
|
|
22
22
|
* @returns object
|
|
23
23
|
*/
|
|
24
|
-
function compress(arr, options, jPath){
|
|
24
|
+
function compress(arr, options, jPath) {
|
|
25
25
|
let text;
|
|
26
|
-
const compressedObj = {};
|
|
26
|
+
const compressedObj = {}; //This is intended to be a plain object
|
|
27
27
|
for (let i = 0; i < arr.length; i++) {
|
|
28
28
|
const tagObj = arr[i];
|
|
29
29
|
const property = propName(tagObj);
|
|
30
30
|
let newJpath = "";
|
|
31
|
-
if(jPath === undefined) newJpath = property;
|
|
31
|
+
if (jPath === undefined) newJpath = property;
|
|
32
32
|
else newJpath = jPath + "." + property;
|
|
33
33
|
|
|
34
|
-
if(property === options.textNodeName){
|
|
35
|
-
if(text === undefined) text = tagObj[property];
|
|
34
|
+
if (property === options.textNodeName) {
|
|
35
|
+
if (text === undefined) text = tagObj[property];
|
|
36
36
|
else text += "" + tagObj[property];
|
|
37
|
-
}else if(property === undefined){
|
|
37
|
+
} else if (property === undefined) {
|
|
38
38
|
continue;
|
|
39
|
-
}else if(tagObj[property]){
|
|
40
|
-
|
|
39
|
+
} else if (tagObj[property]) {
|
|
40
|
+
|
|
41
41
|
let val = compress(tagObj[property], options, newJpath);
|
|
42
42
|
const isLeaf = isLeafTag(val, options);
|
|
43
|
-
if (tagObj[METADATA_SYMBOL] !== undefined) {
|
|
44
|
-
val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata
|
|
45
|
-
}
|
|
46
43
|
|
|
47
|
-
if(tagObj[":@"]){
|
|
48
|
-
assignAttributes(
|
|
49
|
-
}else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){
|
|
44
|
+
if (tagObj[":@"]) {
|
|
45
|
+
assignAttributes(val, tagObj[":@"], newJpath, options);
|
|
46
|
+
} else if (Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) {
|
|
50
47
|
val = val[options.textNodeName];
|
|
51
|
-
}else if(Object.keys(val).length === 0){
|
|
52
|
-
if(options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
48
|
+
} else if (Object.keys(val).length === 0) {
|
|
49
|
+
if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
53
50
|
else val = "";
|
|
54
51
|
}
|
|
55
52
|
|
|
56
|
-
if(
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
if (tagObj[METADATA_SYMBOL] !== undefined && typeof val === "object" && val !== null) {
|
|
54
|
+
val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if (compressedObj[property] !== undefined && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
|
|
59
|
+
if (!Array.isArray(compressedObj[property])) {
|
|
60
|
+
compressedObj[property] = [compressedObj[property]];
|
|
59
61
|
}
|
|
60
62
|
compressedObj[property].push(val);
|
|
61
|
-
}else{
|
|
63
|
+
} else {
|
|
62
64
|
//TODO: if a node is not an array, then check if it should be an array
|
|
63
65
|
//also determine if it is a leaf node
|
|
64
|
-
if (options.isArray(property, newJpath, isLeaf
|
|
66
|
+
if (options.isArray(property, newJpath, isLeaf)) {
|
|
65
67
|
compressedObj[property] = [val];
|
|
66
|
-
}else{
|
|
68
|
+
} else {
|
|
67
69
|
compressedObj[property] = val;
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
|
|
73
|
+
|
|
72
74
|
}
|
|
73
75
|
// if(text && text.length > 0) compressedObj[options.textNodeName] = text;
|
|
74
|
-
if(typeof text === "string"){
|
|
75
|
-
if(text.length > 0) compressedObj[options.textNodeName] = text;
|
|
76
|
-
}else if(text !== undefined) compressedObj[options.textNodeName] = text;
|
|
76
|
+
if (typeof text === "string") {
|
|
77
|
+
if (text.length > 0) compressedObj[options.textNodeName] = text;
|
|
78
|
+
} else if (text !== undefined) compressedObj[options.textNodeName] = text;
|
|
79
|
+
|
|
80
|
+
|
|
77
81
|
return compressedObj;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
function propName(obj){
|
|
84
|
+
function propName(obj) {
|
|
81
85
|
const keys = Object.keys(obj);
|
|
82
86
|
for (let i = 0; i < keys.length; i++) {
|
|
83
87
|
const key = keys[i];
|
|
84
|
-
if(key !== ":@") return key;
|
|
88
|
+
if (key !== ":@") return key;
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
function assignAttributes(obj, attrMap, jpath, options){
|
|
92
|
+
function assignAttributes(obj, attrMap, jpath, options) {
|
|
89
93
|
if (attrMap) {
|
|
90
94
|
const keys = Object.keys(attrMap);
|
|
91
95
|
const len = keys.length; //don't make it inline
|
|
92
96
|
for (let i = 0; i < len; i++) {
|
|
93
97
|
const atrrName = keys[i];
|
|
94
98
|
if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) {
|
|
95
|
-
obj[atrrName] = [
|
|
99
|
+
obj[atrrName] = [attrMap[atrrName]];
|
|
96
100
|
} else {
|
|
97
101
|
obj[atrrName] = attrMap[atrrName];
|
|
98
102
|
}
|
|
@@ -100,10 +104,10 @@ function assignAttributes(obj, attrMap, jpath, options){
|
|
|
100
104
|
}
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
function isLeafTag(obj, options){
|
|
107
|
+
function isLeafTag(obj, options) {
|
|
104
108
|
const { textNodeName } = options;
|
|
105
109
|
const propCount = Object.keys(obj).length;
|
|
106
|
-
|
|
110
|
+
|
|
107
111
|
if (propCount === 0) {
|
|
108
112
|
return true;
|
|
109
113
|
}
|
|
@@ -8,23 +8,23 @@ if (typeof Symbol !== "function") {
|
|
|
8
8
|
METADATA_SYMBOL = Symbol("XML Node Metadata");
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export default class XmlNode{
|
|
11
|
+
export default class XmlNode {
|
|
12
12
|
constructor(tagname) {
|
|
13
13
|
this.tagname = tagname;
|
|
14
14
|
this.child = []; //nested tags, text, cdata, comments in order
|
|
15
|
-
this[":@"] =
|
|
15
|
+
this[":@"] = Object.create(null); //attributes map
|
|
16
16
|
}
|
|
17
|
-
add(key,val){
|
|
17
|
+
add(key, val) {
|
|
18
18
|
// this.child.push( {name : key, val: val, isCdata: isCdata });
|
|
19
|
-
if(key === "__proto__") key = "#__proto__";
|
|
20
|
-
this.child.push(
|
|
19
|
+
if (key === "__proto__") key = "#__proto__";
|
|
20
|
+
this.child.push({ [key]: val });
|
|
21
21
|
}
|
|
22
22
|
addChild(node, startIndex) {
|
|
23
|
-
if(node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
24
|
-
if(node[":@"] && Object.keys(node[":@"]).length > 0){
|
|
25
|
-
this.child.push(
|
|
26
|
-
}else{
|
|
27
|
-
this.child.push(
|
|
23
|
+
if (node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
24
|
+
if (node[":@"] && Object.keys(node[":@"]).length > 0) {
|
|
25
|
+
this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] });
|
|
26
|
+
} else {
|
|
27
|
+
this.child.push({ [node.tagname]: node.child });
|
|
28
28
|
}
|
|
29
29
|
// if requested, add the startIndex
|
|
30
30
|
if (startIndex !== undefined) {
|
|
@@ -94,6 +94,7 @@ hex: true, //when hexadecimal string should be parsed
|
|
|
94
94
|
leadingZeros: true, //when number with leading zeros like 08 should be parsed. 0.0 is not impacted
|
|
95
95
|
eNotation: true, //when number with eNotation or number parsed in eNotation should be considered
|
|
96
96
|
skipLike: /regex/ //when string should not be parsed when it matches the specified regular expression
|
|
97
|
+
infinity: "original", // "null", "infinity" (Infinity type), "string" ("Infinity" (the string literal))
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strnum",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Parse String to Number based on configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "strnum.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "jasmine
|
|
8
|
+
"test": "jasmine tests/*_test.js"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"string",
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"jasmine": "^5.6.0"
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
}
|