@cdklabs/cdk-ssm-documents 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +12 -12
- package/lib/construct/synth-utils.js +1 -1
- package/lib/document/automation-document.js +1 -1
- package/lib/document/command-document.js +1 -1
- package/lib/document/document-builder.js +2 -2
- package/lib/document/ssm-document.js +1 -1
- package/lib/domain/aws-service.js +1 -1
- package/lib/domain/choice.js +1 -1
- package/lib/domain/data-type.js +1 -1
- package/lib/domain/enum/install-action.js +2 -2
- package/lib/domain/enum/install-uninstall-repair.js +2 -2
- package/lib/domain/enum/installation-type.js +2 -2
- package/lib/domain/enum/package-name.js +2 -2
- package/lib/domain/input.js +1 -1
- package/lib/domain/operation.js +1 -1
- package/lib/domain/platform.js +1 -1
- package/lib/domain/precondition.js +1 -1
- package/lib/incident-response/incident-response.js +3 -3
- package/lib/interface/approve-hook.js +2 -2
- package/lib/interface/auth-method.js +3 -3
- package/lib/interface/aws-invoker.js +2 -2
- package/lib/interface/downloadable-content.js +8 -8
- package/lib/interface/environment.js +3 -3
- package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
- package/lib/interface/observer.js +1 -1
- package/lib/interface/on-failure.js +6 -6
- package/lib/interface/pause-hook.js +2 -2
- package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
- package/lib/interface/run-document-location.js +2 -2
- package/lib/interface/sleep-hook.js +2 -2
- package/lib/interface/step-ref.js +1 -1
- package/lib/interface/variables/boolean-variable.js +2 -2
- package/lib/interface/variables/map-list-variable.js +2 -2
- package/lib/interface/variables/number-variable.js +2 -2
- package/lib/interface/variables/secure-string-variable.js +4 -4
- package/lib/interface/variables/string-list-variable.js +2 -2
- package/lib/interface/variables/string-map-variable.js +2 -2
- package/lib/interface/variables/string-variable.js +4 -4
- package/lib/interface/variables/variable.js +2 -2
- package/lib/interface/webhook.js +1 -1
- package/lib/parent-steps/automation/approve-step.js +1 -1
- package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
- package/lib/parent-steps/automation/aws-api-step.js +1 -1
- package/lib/parent-steps/automation/branch-step.js +1 -1
- package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
- package/lib/parent-steps/automation/copy-image-step.js +1 -1
- package/lib/parent-steps/automation/create-image-step.js +1 -1
- package/lib/parent-steps/automation/create-stack-step.js +3 -3
- package/lib/parent-steps/automation/create-tags-step.js +3 -3
- package/lib/parent-steps/automation/delete-image-step.js +1 -1
- package/lib/parent-steps/automation/delete-stack-step.js +1 -1
- package/lib/parent-steps/automation/execute-automation-step.js +1 -1
- package/lib/parent-steps/automation/execute-script-step.js +5 -5
- package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
- package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
- package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
- package/lib/parent-steps/automation/pause-step.js +1 -1
- package/lib/parent-steps/automation/run-command-step.js +3 -3
- package/lib/parent-steps/automation/run-instance-step.js +1 -1
- package/lib/parent-steps/automation/sleep-step.js +1 -1
- package/lib/parent-steps/automation/update-variable.js +1 -1
- package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
- package/lib/parent-steps/automation-step.js +1 -1
- package/lib/parent-steps/command/applications-step.js +1 -1
- package/lib/parent-steps/command/configure-docker-step.js +1 -1
- package/lib/parent-steps/command/configure-package-step.js +1 -1
- package/lib/parent-steps/command/domain-join-step.js +1 -1
- package/lib/parent-steps/command/download-content-step.js +1 -1
- package/lib/parent-steps/command/ps-module-step.js +1 -1
- package/lib/parent-steps/command/run-docker-action-step.js +1 -1
- package/lib/parent-steps/command/run-document-step.js +1 -1
- package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
- package/lib/parent-steps/command/run-shell-script-step.js +1 -1
- package/lib/parent-steps/command/software-inventory-step.js +1 -1
- package/lib/parent-steps/command/update-agent-step.js +1 -1
- package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
- package/lib/parent-steps/command-step.js +1 -1
- package/lib/parent-steps/step.js +1 -1
- package/lib/patterns/automation/composite-step.js +2 -2
- package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
- package/lib/patterns/automation/string-step.js +1 -1
- package/lib/patterns/document/string-document.js +1 -1
- package/lib/patterns/document/timed-document.js +1 -1
- package/lib/samples/hello-world.js +1 -1
- package/lib/simulation/automation/approve-simulation.js +1 -1
- package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
- package/lib/simulation/automation/automation-simulation-base.js +1 -1
- package/lib/simulation/automation/aws-api-simulation.js +1 -1
- package/lib/simulation/automation/branch-simulation.js +1 -1
- package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
- package/lib/simulation/automation/copy-image-simulation.js +1 -1
- package/lib/simulation/automation/create-image-simulation.js +1 -1
- package/lib/simulation/automation/create-stack-simulation.js +1 -1
- package/lib/simulation/automation/create-tags-simulation.js +1 -1
- package/lib/simulation/automation/delete-image-simulation.js +1 -1
- package/lib/simulation/automation/delete-stack-simulation.js +1 -1
- package/lib/simulation/automation/execute-script-simulation.js +1 -1
- package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
- package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
- package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
- package/lib/simulation/automation/pause-simulation.js +1 -1
- package/lib/simulation/automation/run-command-simulation.js +1 -1
- package/lib/simulation/automation/run-instance-simulation.js +1 -1
- package/lib/simulation/automation/sleep-simulation.js +1 -1
- package/lib/simulation/automation/update-variable-simulation.js +1 -1
- package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
- package/lib/simulation/automation-step-simulation.js +1 -1
- package/lib/simulation/command/command-simulation-base.js +1 -1
- package/lib/simulation/command/ps-module-simulation.js +1 -1
- package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
- package/lib/simulation/command/run-shell-script-simulation.js +1 -1
- package/lib/simulation/command-step-simulation.js +1 -1
- package/lib/simulation/document/automation-simulation.js +1 -1
- package/lib/simulation/document/command-simulation.js +1 -1
- package/lib/simulation/simulation.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +36 -36
- package/node_modules/@aws-sdk/client-ec2/README.md +14 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +41 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +156 -78
- package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +6 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerMonitoredTagKeysCommand.js +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/UpdateCapacityManagerMonitoredTagKeysCommand.js +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetCapacityManagerMonitoredTagKeysPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +96 -18
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +23 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +9 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +9 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +87 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetConsoleScreenshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +91 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +126 -79
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +81 -122
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +168 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +55 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +12 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetConsoleScreenshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +10 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +23 -18
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +19 -34
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +43 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +36 -36
- package/node_modules/@aws-sdk/client-iam/package.json +35 -35
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/models/errors.js +52 -1
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/schemas/schemas_0.js +29 -8
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +48 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +22 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +66 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +6 -6
- package/node_modules/@aws-sdk/client-lambda/dist-types/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +30 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +38 -38
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/package.json +50 -50
- package/node_modules/@aws-sdk/client-sns/package.json +33 -33
- package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/client-sqs/dist-es/commands/ReceiveMessageCommand.js +2 -0
- package/node_modules/@aws-sdk/client-sqs/package.json +36 -36
- package/node_modules/@aws-sdk/client-ssm/package.json +34 -34
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +17 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +17 -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/longPollMiddleware.js +15 -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/longPollMiddleware.d.ts +14 -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/longPollMiddleware.d.ts +15 -0
- package/node_modules/@aws-sdk/core/package.json +11 -11
- package/node_modules/@aws-sdk/crc64-nvme/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-expect-continue/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +10 -10
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-location-constraint/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +8 -8
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +11 -11
- package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-ssec/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- package/node_modules/@aws-sdk/util-format-url/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/package.json +1 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +154 -61
- package/node_modules/@smithy/util-endpoints/dist-es/bdd/BinaryDecisionDiagram.js +15 -0
- package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +41 -0
- package/node_modules/@smithy/util-endpoints/dist-es/index.js +2 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/coalesce.js +8 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/index.js +3 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/ite.js +3 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/split.js +13 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +1 -1
- package/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +4 -1
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +20 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +3 -6
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-types/bdd/BinaryDecisionDiagram.d.ts +22 -0
- package/node_modules/@smithy/util-endpoints/dist-types/decideEndpoint.d.ts +7 -0
- package/node_modules/@smithy/util-endpoints/dist-types/index.d.ts +2 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/coalesce.d.ts +7 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts +3 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/ite.d.ts +6 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/split.d.ts +11 -0
- package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +4 -0
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +3 -1
- package/node_modules/@smithy/util-endpoints/package.json +1 -1
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +6 -0
- package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +3 -0
- package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +3 -0
- package/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts +5 -0
- package/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts +5 -0
- package/node_modules/@smithy/util-retry/package.json +1 -1
- package/node_modules/path-expression-matcher/README.md +214 -62
- package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
- package/node_modules/path-expression-matcher/lib/pem.d.cts +111 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -1
- package/node_modules/path-expression-matcher/package.json +1 -1
- package/node_modules/path-expression-matcher/src/Expression.js +2 -2
- package/node_modules/path-expression-matcher/src/ExpressionSet.js +209 -0
- package/node_modules/path-expression-matcher/src/Matcher.js +235 -177
- package/node_modules/path-expression-matcher/src/index.d.ts +199 -194
- package/node_modules/path-expression-matcher/src/index.js +3 -2
- package/package.json +10 -10
- package/node_modules/strnum/.github/SECURITY.md +0 -5
- package/node_modules/strnum/.vscode/launch.json +0 -25
- package/node_modules/strnum/algo.stflow +0 -84
- package/node_modules/strnum/tests/infinity_test.js +0 -18
- package/node_modules/strnum/tests/strnum_test.js +0 -175
- package/node_modules/strnum/tests/temp.js +0 -8
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/CHANGELOG.md +0 -0
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/LICENSE +0 -0
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/README.md +0 -0
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/strnum.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/region-config-resolver",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline region-config-resolver",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@aws-sdk/types": "^3.973.
|
|
27
|
-
"@smithy/config-resolver": "^4.4.
|
|
28
|
-
"@smithy/node-config-provider": "^4.3.
|
|
29
|
-
"@smithy/types": "^4.
|
|
26
|
+
"@aws-sdk/types": "^3.973.7",
|
|
27
|
+
"@smithy/config-resolver": "^4.4.14",
|
|
28
|
+
"@smithy/node-config-provider": "^4.3.13",
|
|
29
|
+
"@smithy/types": "^4.14.0",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/signature-v4-multi-region",
|
|
3
|
-
"version": "3.996.
|
|
3
|
+
"version": "3.996.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline signature-v4-multi-region",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/middleware-sdk-s3": "^3.972.
|
|
29
|
-
"@aws-sdk/types": "^3.973.
|
|
30
|
-
"@smithy/protocol-http": "^5.3.
|
|
31
|
-
"@smithy/signature-v4": "^5.3.
|
|
32
|
-
"@smithy/types": "^4.
|
|
28
|
+
"@aws-sdk/middleware-sdk-s3": "^3.972.28",
|
|
29
|
+
"@aws-sdk/types": "^3.973.7",
|
|
30
|
+
"@smithy/protocol-http": "^5.3.13",
|
|
31
|
+
"@smithy/signature-v4": "^5.3.13",
|
|
32
|
+
"@smithy/types": "^4.14.0",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1026.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"license": "Apache-2.0",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aws-sdk/core": "^3.973.
|
|
33
|
-
"@aws-sdk/nested-clients": "^3.996.
|
|
34
|
-
"@aws-sdk/types": "^3.973.
|
|
35
|
-
"@smithy/property-provider": "^4.2.
|
|
36
|
-
"@smithy/shared-ini-file-loader": "^4.4.
|
|
37
|
-
"@smithy/types": "^4.
|
|
32
|
+
"@aws-sdk/core": "^3.973.27",
|
|
33
|
+
"@aws-sdk/nested-clients": "^3.996.19",
|
|
34
|
+
"@aws-sdk/types": "^3.973.7",
|
|
35
|
+
"@smithy/property-provider": "^4.2.13",
|
|
36
|
+
"@smithy/shared-ini-file-loader": "^4.4.8",
|
|
37
|
+
"@smithy/types": "^4.14.0",
|
|
38
38
|
"tslib": "^2.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/types",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.7",
|
|
4
4
|
"main": "./dist-cjs/index.js",
|
|
5
5
|
"module": "./dist-es/index.js",
|
|
6
6
|
"types": "./dist-types/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"directory": "packages-internal/types"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@smithy/types": "^4.
|
|
45
|
+
"@smithy/types": "^4.14.0",
|
|
46
46
|
"tslib": "^2.6.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/util-endpoints",
|
|
3
|
-
"version": "3.996.
|
|
3
|
+
"version": "3.996.6",
|
|
4
4
|
"description": "Utilities to help with endpoint resolution",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aws-sdk/types": "^3.973.
|
|
29
|
-
"@smithy/types": "^4.
|
|
30
|
-
"@smithy/url-parser": "^4.2.
|
|
31
|
-
"@smithy/util-endpoints": "^3.3.
|
|
28
|
+
"@aws-sdk/types": "^3.973.7",
|
|
29
|
+
"@smithy/types": "^4.14.0",
|
|
30
|
+
"@smithy/url-parser": "^4.2.13",
|
|
31
|
+
"@smithy/util-endpoints": "^3.3.4",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/util-format-url",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline util-format-url",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/types": "^3.973.
|
|
26
|
-
"@smithy/querystring-builder": "^4.2.
|
|
27
|
-
"@smithy/types": "^4.
|
|
25
|
+
"@aws-sdk/types": "^3.973.7",
|
|
26
|
+
"@smithy/querystring-builder": "^4.2.13",
|
|
27
|
+
"@smithy/types": "^4.14.0",
|
|
28
28
|
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/util-user-agent-browser",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline util-user-agent-browser",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"react-native": "dist-es/index.native.js",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/types": "^3.973.
|
|
28
|
-
"@smithy/types": "^4.
|
|
27
|
+
"@aws-sdk/types": "^3.973.7",
|
|
28
|
+
"@smithy/types": "^4.14.0",
|
|
29
29
|
"bowser": "^2.11.0",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/util-user-agent-node",
|
|
3
|
-
"version": "3.973.
|
|
3
|
+
"version": "3.973.15",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline util-user-agent-node",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
28
|
-
"@aws-sdk/types": "^3.973.
|
|
29
|
-
"@smithy/node-config-provider": "^4.3.
|
|
30
|
-
"@smithy/types": "^4.
|
|
27
|
+
"@aws-sdk/middleware-user-agent": "^3.972.29",
|
|
28
|
+
"@aws-sdk/types": "^3.973.7",
|
|
29
|
+
"@smithy/node-config-provider": "^4.3.13",
|
|
30
|
+
"@smithy/types": "^4.14.0",
|
|
31
31
|
"@smithy/util-config-provider": "^4.2.2",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/xml-builder",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.17",
|
|
4
4
|
"description": "XML utilities for the AWS SDK",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@smithy/types": "^4.
|
|
6
|
+
"@smithy/types": "^4.14.0",
|
|
7
7
|
"fast-xml-parser": "5.5.8",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/config-resolver",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.15",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline config-resolver",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@smithy/node-config-provider": "^4.3.13",
|
|
28
28
|
"@smithy/types": "^4.14.0",
|
|
29
29
|
"@smithy/util-config-provider": "^4.2.2",
|
|
30
|
-
"@smithy/util-endpoints": "^3.
|
|
30
|
+
"@smithy/util-endpoints": "^3.4.0",
|
|
31
31
|
"@smithy/util-middleware": "^4.2.13",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-retry",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@smithy/smithy-client": "^4.12.9",
|
|
41
41
|
"@smithy/types": "^4.14.0",
|
|
42
42
|
"@smithy/util-middleware": "^4.2.13",
|
|
43
|
-
"@smithy/util-retry": "^4.3.
|
|
43
|
+
"@smithy/util-retry": "^4.3.1",
|
|
44
44
|
"@smithy/uuid": "^1.1.2",
|
|
45
45
|
"tslib": "^2.6.2"
|
|
46
46
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/util-defaults-mode-node",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.50",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline util-defaults-mode-node",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@smithy/config-resolver": "^4.4.
|
|
26
|
+
"@smithy/config-resolver": "^4.4.15",
|
|
27
27
|
"@smithy/credential-provider-imds": "^4.2.13",
|
|
28
28
|
"@smithy/node-config-provider": "^4.3.13",
|
|
29
29
|
"@smithy/property-provider": "^4.2.13",
|
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
var types = require('@smithy/types');
|
|
4
4
|
|
|
5
|
+
class BinaryDecisionDiagram {
|
|
6
|
+
nodes;
|
|
7
|
+
root;
|
|
8
|
+
conditions;
|
|
9
|
+
results;
|
|
10
|
+
constructor(bdd, root, conditions, results) {
|
|
11
|
+
this.nodes = bdd;
|
|
12
|
+
this.root = root;
|
|
13
|
+
this.conditions = conditions;
|
|
14
|
+
this.results = results;
|
|
15
|
+
}
|
|
16
|
+
static from(bdd, root, conditions, results) {
|
|
17
|
+
return new BinaryDecisionDiagram(bdd, root, conditions, results);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
5
21
|
class EndpointCache {
|
|
6
22
|
capacity;
|
|
7
23
|
data = new Map();
|
|
@@ -53,24 +69,12 @@ class EndpointCache {
|
|
|
53
69
|
}
|
|
54
70
|
}
|
|
55
71
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const isValidHostLabel = (value, allowSubDomains = false) => {
|
|
61
|
-
if (!allowSubDomains) {
|
|
62
|
-
return VALID_HOST_LABEL_REGEX.test(value);
|
|
63
|
-
}
|
|
64
|
-
const labels = value.split(".");
|
|
65
|
-
for (const label of labels) {
|
|
66
|
-
if (!isValidHostLabel(label)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
72
|
+
class EndpointError extends Error {
|
|
73
|
+
constructor(message) {
|
|
74
|
+
super(message);
|
|
75
|
+
this.name = "EndpointError";
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const customEndpointFunctions = {};
|
|
77
|
+
}
|
|
74
78
|
|
|
75
79
|
const debugId = "endpoints";
|
|
76
80
|
|
|
@@ -87,15 +91,19 @@ function toDebugString(input) {
|
|
|
87
91
|
return JSON.stringify(input, null, 2);
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
constructor(message) {
|
|
92
|
-
super(message);
|
|
93
|
-
this.name = "EndpointError";
|
|
94
|
-
}
|
|
95
|
-
}
|
|
94
|
+
const customEndpointFunctions = {};
|
|
96
95
|
|
|
97
96
|
const booleanEquals = (value1, value2) => value1 === value2;
|
|
98
97
|
|
|
98
|
+
function coalesce(...args) {
|
|
99
|
+
for (const arg of args) {
|
|
100
|
+
if (arg != null) {
|
|
101
|
+
return arg;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
99
107
|
const getAttrPathList = (path) => {
|
|
100
108
|
const parts = path.split(".");
|
|
101
109
|
const pathList = [];
|
|
@@ -133,8 +141,29 @@ const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
|
133
141
|
|
|
134
142
|
const isSet = (value) => value != null;
|
|
135
143
|
|
|
144
|
+
const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
145
|
+
const isValidHostLabel = (value, allowSubDomains = false) => {
|
|
146
|
+
if (!allowSubDomains) {
|
|
147
|
+
return VALID_HOST_LABEL_REGEX.test(value);
|
|
148
|
+
}
|
|
149
|
+
const labels = value.split(".");
|
|
150
|
+
for (const label of labels) {
|
|
151
|
+
if (!isValidHostLabel(label)) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return true;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
function ite(condition, trueValue, falseValue) {
|
|
159
|
+
return condition ? trueValue : falseValue;
|
|
160
|
+
}
|
|
161
|
+
|
|
136
162
|
const not = (value) => !value;
|
|
137
163
|
|
|
164
|
+
const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
|
|
165
|
+
const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]"));
|
|
166
|
+
|
|
138
167
|
const DEFAULT_PORTS = {
|
|
139
168
|
[types.EndpointURLScheme.HTTP]: 80,
|
|
140
169
|
[types.EndpointURLScheme.HTTPS]: 443,
|
|
@@ -185,10 +214,24 @@ const parseURL = (value) => {
|
|
|
185
214
|
};
|
|
186
215
|
};
|
|
187
216
|
|
|
217
|
+
function split(value, delimiter, limit) {
|
|
218
|
+
if (limit === 1) {
|
|
219
|
+
return [value];
|
|
220
|
+
}
|
|
221
|
+
if (value === "") {
|
|
222
|
+
return [""];
|
|
223
|
+
}
|
|
224
|
+
const parts = value.split(delimiter);
|
|
225
|
+
if (limit === 0) {
|
|
226
|
+
return parts;
|
|
227
|
+
}
|
|
228
|
+
return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));
|
|
229
|
+
}
|
|
230
|
+
|
|
188
231
|
const stringEquals = (value1, value2) => value1 === value2;
|
|
189
232
|
|
|
190
233
|
const substring = (input, start, stop, reverse) => {
|
|
191
|
-
if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
|
|
234
|
+
if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
|
|
192
235
|
return null;
|
|
193
236
|
}
|
|
194
237
|
if (!reverse) {
|
|
@@ -201,11 +244,14 @@ const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) =
|
|
|
201
244
|
|
|
202
245
|
const endpointFunctions = {
|
|
203
246
|
booleanEquals,
|
|
247
|
+
coalesce,
|
|
204
248
|
getAttr,
|
|
205
249
|
isSet,
|
|
206
250
|
isValidHostLabel,
|
|
251
|
+
ite,
|
|
207
252
|
not,
|
|
208
253
|
parseURL,
|
|
254
|
+
split,
|
|
209
255
|
stringEquals,
|
|
210
256
|
substring,
|
|
211
257
|
uriEncode,
|
|
@@ -213,10 +259,7 @@ const endpointFunctions = {
|
|
|
213
259
|
|
|
214
260
|
const evaluateTemplate = (template, options) => {
|
|
215
261
|
const evaluatedTemplateArr = [];
|
|
216
|
-
const
|
|
217
|
-
...options.endpointParams,
|
|
218
|
-
...options.referenceRecord,
|
|
219
|
-
};
|
|
262
|
+
const { referenceRecord, endpointParams } = options;
|
|
220
263
|
let currentIndex = 0;
|
|
221
264
|
while (currentIndex < template.length) {
|
|
222
265
|
const openingBraceIndex = template.indexOf("{", currentIndex);
|
|
@@ -237,10 +280,10 @@ const evaluateTemplate = (template, options) => {
|
|
|
237
280
|
const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
|
|
238
281
|
if (parameterName.includes("#")) {
|
|
239
282
|
const [refName, attrName] = parameterName.split("#");
|
|
240
|
-
evaluatedTemplateArr.push(getAttr(
|
|
283
|
+
evaluatedTemplateArr.push(getAttr((referenceRecord[refName] ?? endpointParams[refName]), attrName));
|
|
241
284
|
}
|
|
242
285
|
else {
|
|
243
|
-
evaluatedTemplateArr.push(
|
|
286
|
+
evaluatedTemplateArr.push((referenceRecord[parameterName] ?? endpointParams[parameterName]));
|
|
244
287
|
}
|
|
245
288
|
currentIndex = closingBraceIndex + 1;
|
|
246
289
|
}
|
|
@@ -248,11 +291,7 @@ const evaluateTemplate = (template, options) => {
|
|
|
248
291
|
};
|
|
249
292
|
|
|
250
293
|
const getReferenceValue = ({ ref }, options) => {
|
|
251
|
-
|
|
252
|
-
...options.endpointParams,
|
|
253
|
-
...options.referenceRecord,
|
|
254
|
-
};
|
|
255
|
-
return referenceRecord[ref];
|
|
294
|
+
return options.referenceRecord[ref] ?? options.endpointParams[ref];
|
|
256
295
|
};
|
|
257
296
|
|
|
258
297
|
const evaluateExpression = (obj, keyName, options) => {
|
|
@@ -268,12 +307,27 @@ const evaluateExpression = (obj, keyName, options) => {
|
|
|
268
307
|
throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
|
|
269
308
|
};
|
|
270
309
|
const callFunction = ({ fn, argv }, options) => {
|
|
271
|
-
const evaluatedArgs = argv.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
310
|
+
const evaluatedArgs = Array(argv.length);
|
|
311
|
+
for (let i = 0; i < evaluatedArgs.length; ++i) {
|
|
312
|
+
const arg = argv[i];
|
|
313
|
+
if (typeof arg === "boolean" || typeof arg === "number") {
|
|
314
|
+
evaluatedArgs[i] = arg;
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
evaluatedArgs[i] = group$2.evaluateExpression(arg, "arg", options);
|
|
318
|
+
}
|
|
275
319
|
}
|
|
276
|
-
|
|
320
|
+
if (fn.includes(".")) {
|
|
321
|
+
const fnSegments = fn.split(".");
|
|
322
|
+
if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {
|
|
323
|
+
return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (typeof endpointFunctions[fn] !== "function") {
|
|
327
|
+
throw new Error(`function ${fn} not loaded in endpointFunctions.`);
|
|
328
|
+
}
|
|
329
|
+
const callable = endpointFunctions[fn];
|
|
330
|
+
return callable(...evaluatedArgs);
|
|
277
331
|
};
|
|
278
332
|
const group$2 = {
|
|
279
333
|
evaluateExpression,
|
|
@@ -292,27 +346,6 @@ const evaluateCondition = ({ assign, ...fnArgs }, options) => {
|
|
|
292
346
|
};
|
|
293
347
|
};
|
|
294
348
|
|
|
295
|
-
const evaluateConditions = (conditions = [], options) => {
|
|
296
|
-
const conditionsReferenceRecord = {};
|
|
297
|
-
for (const condition of conditions) {
|
|
298
|
-
const { result, toAssign } = evaluateCondition(condition, {
|
|
299
|
-
...options,
|
|
300
|
-
referenceRecord: {
|
|
301
|
-
...options.referenceRecord,
|
|
302
|
-
...conditionsReferenceRecord,
|
|
303
|
-
},
|
|
304
|
-
});
|
|
305
|
-
if (!result) {
|
|
306
|
-
return { result };
|
|
307
|
-
}
|
|
308
|
-
if (toAssign) {
|
|
309
|
-
conditionsReferenceRecord[toAssign.name] = toAssign.value;
|
|
310
|
-
options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
return { result: true, referenceRecord: conditionsReferenceRecord };
|
|
314
|
-
};
|
|
315
|
-
|
|
316
349
|
const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
|
|
317
350
|
...acc,
|
|
318
351
|
[headerKey]: headerVal.map((headerValEntry) => {
|
|
@@ -365,6 +398,64 @@ const getEndpointUrl = (endpointUrl, options) => {
|
|
|
365
398
|
throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
|
|
366
399
|
};
|
|
367
400
|
|
|
401
|
+
const RESULT = 100_000_000;
|
|
402
|
+
const decideEndpoint = (bdd, options) => {
|
|
403
|
+
const { nodes, root, results, conditions } = bdd;
|
|
404
|
+
let ref = root;
|
|
405
|
+
const referenceRecord = {};
|
|
406
|
+
const closure = {
|
|
407
|
+
referenceRecord,
|
|
408
|
+
endpointParams: options.endpointParams,
|
|
409
|
+
logger: options.logger,
|
|
410
|
+
};
|
|
411
|
+
while (ref !== 1 && ref !== -1 && ref < RESULT) {
|
|
412
|
+
const node_i = 3 * (Math.abs(ref) - 1);
|
|
413
|
+
const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]];
|
|
414
|
+
const [fn, argv, assign] = conditions[condition_i];
|
|
415
|
+
const evaluation = evaluateCondition({ fn, assign, argv }, closure);
|
|
416
|
+
if (evaluation.toAssign) {
|
|
417
|
+
const { name, value } = evaluation.toAssign;
|
|
418
|
+
referenceRecord[name] = value;
|
|
419
|
+
}
|
|
420
|
+
ref = ref >= 0 === evaluation.result ? highRef : lowRef;
|
|
421
|
+
}
|
|
422
|
+
if (ref >= RESULT) {
|
|
423
|
+
const result = results[ref - RESULT];
|
|
424
|
+
if (result[0] === -1) {
|
|
425
|
+
const [, errorMessage] = result;
|
|
426
|
+
throw new EndpointError(errorMessage);
|
|
427
|
+
}
|
|
428
|
+
const [url, properties, headers] = result;
|
|
429
|
+
return {
|
|
430
|
+
url: getEndpointUrl(url, closure),
|
|
431
|
+
properties: getEndpointProperties(properties, closure),
|
|
432
|
+
headers: getEndpointHeaders(headers, closure),
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
throw new EndpointError(`No matching endpoint.`);
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
const evaluateConditions = (conditions = [], options) => {
|
|
439
|
+
const conditionsReferenceRecord = {};
|
|
440
|
+
for (const condition of conditions) {
|
|
441
|
+
const { result, toAssign } = evaluateCondition(condition, {
|
|
442
|
+
...options,
|
|
443
|
+
referenceRecord: {
|
|
444
|
+
...options.referenceRecord,
|
|
445
|
+
...conditionsReferenceRecord,
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
if (!result) {
|
|
449
|
+
return { result };
|
|
450
|
+
}
|
|
451
|
+
if (toAssign) {
|
|
452
|
+
conditionsReferenceRecord[toAssign.name] = toAssign.value;
|
|
453
|
+
options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return { result: true, referenceRecord: conditionsReferenceRecord };
|
|
457
|
+
};
|
|
458
|
+
|
|
368
459
|
const evaluateEndpointRule = (endpointRule, options) => {
|
|
369
460
|
const { conditions, endpoint } = endpointRule;
|
|
370
461
|
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
@@ -464,9 +555,11 @@ const resolveEndpoint = (ruleSetObject, options) => {
|
|
|
464
555
|
return endpoint;
|
|
465
556
|
};
|
|
466
557
|
|
|
558
|
+
exports.BinaryDecisionDiagram = BinaryDecisionDiagram;
|
|
467
559
|
exports.EndpointCache = EndpointCache;
|
|
468
560
|
exports.EndpointError = EndpointError;
|
|
469
561
|
exports.customEndpointFunctions = customEndpointFunctions;
|
|
562
|
+
exports.decideEndpoint = decideEndpoint;
|
|
470
563
|
exports.isIpAddress = isIpAddress;
|
|
471
564
|
exports.isValidHostLabel = isValidHostLabel;
|
|
472
565
|
exports.resolveEndpoint = resolveEndpoint;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class BinaryDecisionDiagram {
|
|
2
|
+
nodes;
|
|
3
|
+
root;
|
|
4
|
+
conditions;
|
|
5
|
+
results;
|
|
6
|
+
constructor(bdd, root, conditions, results) {
|
|
7
|
+
this.nodes = bdd;
|
|
8
|
+
this.root = root;
|
|
9
|
+
this.conditions = conditions;
|
|
10
|
+
this.results = results;
|
|
11
|
+
}
|
|
12
|
+
static from(bdd, root, conditions, results) {
|
|
13
|
+
return new BinaryDecisionDiagram(bdd, root, conditions, results);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EndpointError } from "./types";
|
|
2
|
+
import { evaluateCondition } from "./utils/evaluateCondition";
|
|
3
|
+
import { getEndpointHeaders } from "./utils/getEndpointHeaders";
|
|
4
|
+
import { getEndpointProperties } from "./utils/getEndpointProperties";
|
|
5
|
+
import { getEndpointUrl } from "./utils/getEndpointUrl";
|
|
6
|
+
const RESULT = 100_000_000;
|
|
7
|
+
export const decideEndpoint = (bdd, options) => {
|
|
8
|
+
const { nodes, root, results, conditions } = bdd;
|
|
9
|
+
let ref = root;
|
|
10
|
+
const referenceRecord = {};
|
|
11
|
+
const closure = {
|
|
12
|
+
referenceRecord,
|
|
13
|
+
endpointParams: options.endpointParams,
|
|
14
|
+
logger: options.logger,
|
|
15
|
+
};
|
|
16
|
+
while (ref !== 1 && ref !== -1 && ref < RESULT) {
|
|
17
|
+
const node_i = 3 * (Math.abs(ref) - 1);
|
|
18
|
+
const [condition_i, highRef, lowRef] = [nodes[node_i], nodes[node_i + 1], nodes[node_i + 2]];
|
|
19
|
+
const [fn, argv, assign] = conditions[condition_i];
|
|
20
|
+
const evaluation = evaluateCondition({ fn, assign, argv }, closure);
|
|
21
|
+
if (evaluation.toAssign) {
|
|
22
|
+
const { name, value } = evaluation.toAssign;
|
|
23
|
+
referenceRecord[name] = value;
|
|
24
|
+
}
|
|
25
|
+
ref = ref >= 0 === evaluation.result ? highRef : lowRef;
|
|
26
|
+
}
|
|
27
|
+
if (ref >= RESULT) {
|
|
28
|
+
const result = results[ref - RESULT];
|
|
29
|
+
if (result[0] === -1) {
|
|
30
|
+
const [, errorMessage] = result;
|
|
31
|
+
throw new EndpointError(errorMessage);
|
|
32
|
+
}
|
|
33
|
+
const [url, properties, headers] = result;
|
|
34
|
+
return {
|
|
35
|
+
url: getEndpointUrl(url, closure),
|
|
36
|
+
properties: getEndpointProperties(properties, closure),
|
|
37
|
+
headers: getEndpointHeaders(headers, closure),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
throw new EndpointError(`No matching endpoint.`);
|
|
41
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export { BinaryDecisionDiagram } from "./bdd/BinaryDecisionDiagram";
|
|
1
2
|
export * from "./cache/EndpointCache";
|
|
3
|
+
export { decideEndpoint } from "./decideEndpoint";
|
|
2
4
|
export * from "./lib/isIpAddress";
|
|
3
5
|
export * from "./lib/isValidHostLabel";
|
|
4
6
|
export * from "./utils/customEndpointFunctions";
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export * from "./booleanEquals";
|
|
2
|
+
export * from "./coalesce";
|
|
2
3
|
export * from "./getAttr";
|
|
3
4
|
export * from "./isSet";
|
|
4
5
|
export * from "./isValidHostLabel";
|
|
6
|
+
export * from "./ite";
|
|
5
7
|
export * from "./not";
|
|
6
8
|
export * from "./parseURL";
|
|
9
|
+
export * from "./split";
|
|
7
10
|
export * from "./stringEquals";
|
|
8
11
|
export * from "./substring";
|
|
9
12
|
export * from "./uriEncode";
|