@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function split(value, delimiter, limit) {
|
|
2
|
+
if (limit === 1) {
|
|
3
|
+
return [value];
|
|
4
|
+
}
|
|
5
|
+
if (value === "") {
|
|
6
|
+
return [""];
|
|
7
|
+
}
|
|
8
|
+
const parts = value.split(delimiter);
|
|
9
|
+
if (limit === 0) {
|
|
10
|
+
return parts;
|
|
11
|
+
}
|
|
12
|
+
return parts.slice(0, limit - 1).concat(parts.slice(1).join(delimiter));
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const substring = (input, start, stop, reverse) => {
|
|
2
|
-
if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
|
|
2
|
+
if (input == null || start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) {
|
|
3
3
|
return null;
|
|
4
4
|
}
|
|
5
5
|
if (!reverse) {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { booleanEquals, getAttr, isSet, isValidHostLabel, not, parseURL, stringEquals, substring, uriEncode, } from "../lib";
|
|
1
|
+
import { booleanEquals, coalesce, getAttr, isSet, isValidHostLabel, ite, not, parseURL, split, stringEquals, substring, uriEncode, } from "../lib";
|
|
2
2
|
export const endpointFunctions = {
|
|
3
3
|
booleanEquals,
|
|
4
|
+
coalesce,
|
|
4
5
|
getAttr,
|
|
5
6
|
isSet,
|
|
6
7
|
isValidHostLabel,
|
|
8
|
+
ite,
|
|
7
9
|
not,
|
|
8
10
|
parseURL,
|
|
11
|
+
split,
|
|
9
12
|
stringEquals,
|
|
10
13
|
substring,
|
|
11
14
|
uriEncode,
|
|
@@ -16,12 +16,27 @@ export const evaluateExpression = (obj, keyName, options) => {
|
|
|
16
16
|
throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
|
|
17
17
|
};
|
|
18
18
|
export const callFunction = ({ fn, argv }, options) => {
|
|
19
|
-
const evaluatedArgs = argv.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const evaluatedArgs = Array(argv.length);
|
|
20
|
+
for (let i = 0; i < evaluatedArgs.length; ++i) {
|
|
21
|
+
const arg = argv[i];
|
|
22
|
+
if (typeof arg === "boolean" || typeof arg === "number") {
|
|
23
|
+
evaluatedArgs[i] = arg;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
evaluatedArgs[i] = group.evaluateExpression(arg, "arg", options);
|
|
27
|
+
}
|
|
23
28
|
}
|
|
24
|
-
|
|
29
|
+
if (fn.includes(".")) {
|
|
30
|
+
const fnSegments = fn.split(".");
|
|
31
|
+
if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {
|
|
32
|
+
return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (typeof endpointFunctions[fn] !== "function") {
|
|
36
|
+
throw new Error(`function ${fn} not loaded in endpointFunctions.`);
|
|
37
|
+
}
|
|
38
|
+
const callable = endpointFunctions[fn];
|
|
39
|
+
return callable(...evaluatedArgs);
|
|
25
40
|
};
|
|
26
41
|
export const group = {
|
|
27
42
|
evaluateExpression,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { getAttr } from "../lib";
|
|
2
2
|
export const evaluateTemplate = (template, options) => {
|
|
3
3
|
const evaluatedTemplateArr = [];
|
|
4
|
-
const
|
|
5
|
-
...options.endpointParams,
|
|
6
|
-
...options.referenceRecord,
|
|
7
|
-
};
|
|
4
|
+
const { referenceRecord, endpointParams } = options;
|
|
8
5
|
let currentIndex = 0;
|
|
9
6
|
while (currentIndex < template.length) {
|
|
10
7
|
const openingBraceIndex = template.indexOf("{", currentIndex);
|
|
@@ -25,10 +22,10 @@ export const evaluateTemplate = (template, options) => {
|
|
|
25
22
|
const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
|
|
26
23
|
if (parameterName.includes("#")) {
|
|
27
24
|
const [refName, attrName] = parameterName.split("#");
|
|
28
|
-
evaluatedTemplateArr.push(getAttr(
|
|
25
|
+
evaluatedTemplateArr.push(getAttr((referenceRecord[refName] ?? endpointParams[refName]), attrName));
|
|
29
26
|
}
|
|
30
27
|
else {
|
|
31
|
-
evaluatedTemplateArr.push(
|
|
28
|
+
evaluatedTemplateArr.push((referenceRecord[parameterName] ?? endpointParams[parameterName]));
|
|
32
29
|
}
|
|
33
30
|
currentIndex = closingBraceIndex + 1;
|
|
34
31
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EndpointObjectHeaders, ParameterObject } from "@smithy/types";
|
|
2
|
+
import type { FunctionArgv } from "../types/shared";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
type BddCondition = [string, FunctionArgv] | [string, FunctionArgv, string];
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
type BddResult = [-1] | [-1, string] | [string, Record<string, ParameterObject>, EndpointObjectHeaders];
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare class BinaryDecisionDiagram {
|
|
15
|
+
nodes: Int32Array;
|
|
16
|
+
root: number;
|
|
17
|
+
conditions: BddCondition[];
|
|
18
|
+
results: BddResult[];
|
|
19
|
+
private constructor();
|
|
20
|
+
static from(bdd: Int32Array, root: number, conditions: BddCondition[] | any[], results: BddResult[] | any[]): BinaryDecisionDiagram;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EndpointV2 } from "@smithy/types";
|
|
2
|
+
import type { BinaryDecisionDiagram } from "./bdd/BinaryDecisionDiagram";
|
|
3
|
+
import type { EndpointResolverOptions } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Resolves an endpoint URL by processing the endpoints bdd and options.
|
|
6
|
+
*/
|
|
7
|
+
export declare const decideEndpoint: (bdd: BinaryDecisionDiagram, options: EndpointResolverOptions) => EndpointV2;
|
|
@@ -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";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The split function divides a string into an array of substrings based on a non-empty delimiter.
|
|
3
|
+
* The behavior is controlled by the limit parameter:
|
|
4
|
+
*
|
|
5
|
+
* limit = 0: Split all occurrences (unlimited).
|
|
6
|
+
* limit = 1: No split performed (returns original string as single element array).
|
|
7
|
+
* limit > 1: Split into at most 'limit' parts (performs limit-1 splits).
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function split(value: string, delimiter: string, limit: number): string[];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { coalesce, ite, split } from "../lib";
|
|
1
2
|
export declare const endpointFunctions: {
|
|
2
3
|
booleanEquals: (value1: boolean, value2: boolean) => boolean;
|
|
4
|
+
coalesce: typeof coalesce;
|
|
3
5
|
getAttr: (value: import("../lib").GetAttrValue, path: string) => import("../lib").GetAttrValue;
|
|
4
6
|
isSet: (value: unknown) => value is {};
|
|
5
7
|
isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean;
|
|
8
|
+
ite: typeof ite;
|
|
6
9
|
not: (value: boolean) => boolean;
|
|
7
10
|
parseURL: (value: string | URL | import("@smithy/types").Endpoint) => import("@smithy/types").EndpointURL | null;
|
|
11
|
+
split: typeof split;
|
|
8
12
|
stringEquals: (value1: string, value2: string) => boolean;
|
|
9
13
|
substring: (input: string, start: number, stop: number, reverse: boolean) => string | null;
|
|
10
14
|
uriEncode: (value: string) => string;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import type { EvaluateOptions, ReferenceObject } from "../types";
|
|
2
|
-
export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => import("
|
|
2
|
+
export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => string | number | boolean | import("@smithy/types").EndpointPartition | import("@smithy/types").EndpointARN | {
|
|
3
|
+
[key: string]: import("../types").FunctionReturn;
|
|
4
|
+
};
|
|
@@ -261,6 +261,9 @@ class StandardRetryStrategy {
|
|
|
261
261
|
isRetryableError(errorType) {
|
|
262
262
|
return errorType === "THROTTLING" || errorType === "TRANSIENT";
|
|
263
263
|
}
|
|
264
|
+
async maxAttempts() {
|
|
265
|
+
return this.maxAttemptsProvider();
|
|
266
|
+
}
|
|
264
267
|
}
|
|
265
268
|
|
|
266
269
|
class AdaptiveRetryStrategy {
|
|
@@ -289,6 +292,9 @@ class AdaptiveRetryStrategy {
|
|
|
289
292
|
this.rateLimiter.updateClientSendingRate({});
|
|
290
293
|
this.standardRetryStrategy.recordSuccess(token);
|
|
291
294
|
}
|
|
295
|
+
async maxAttemptsProvider() {
|
|
296
|
+
return this.standardRetryStrategy.maxAttempts();
|
|
297
|
+
}
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
class ConfiguredRetryStrategy extends StandardRetryStrategy {
|
|
@@ -30,4 +30,9 @@ export declare class AdaptiveRetryStrategy implements RetryStrategyV2 {
|
|
|
30
30
|
acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
|
|
31
31
|
refreshRetryTokenForRetry(tokenToRenew: StandardRetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
|
|
32
32
|
recordSuccess(token: StandardRetryToken): void;
|
|
33
|
+
/**
|
|
34
|
+
* There is an existing integration which accesses this field.
|
|
35
|
+
* @deprecated
|
|
36
|
+
*/
|
|
37
|
+
maxAttemptsProvider(): Promise<number>;
|
|
33
38
|
}
|
|
@@ -40,4 +40,9 @@ export declare class StandardRetryStrategy implements RetryStrategyV2 {
|
|
|
40
40
|
private shouldRetry;
|
|
41
41
|
private getCapacityCost;
|
|
42
42
|
private isRetryableError;
|
|
43
|
+
/**
|
|
44
|
+
* There is an existing integration which accesses this field.
|
|
45
|
+
* @deprecated
|
|
46
|
+
*/
|
|
47
|
+
maxAttempts(): Promise<number>;
|
|
43
48
|
}
|