@psnext/slingcli 2.5.20260615-2 → 2.5.20260617-2
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/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
- package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
- package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
- package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +7 -9
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +3 -5
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +16 -18
- package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
- package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
- package/node_modules/@aws-sdk/types/package.json +4 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
- package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
- package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +21 -57
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +277 -175
- package/node_modules/@earendil-works/pi-ai/dist/models.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +52 -34
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +11 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +7 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +15 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +18 -17
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +21 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +8 -7
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +17 -22
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js +44 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bun/restore-sandbox-env.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +10 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +8 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +10 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +75 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +17 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +8 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +19 -19
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +6 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +17 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +0 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +0 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +6 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +23 -5
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +17 -17
- package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -6
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +6 -6
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +4 -4
- package/node_modules/marked/README.md +13 -4
- package/node_modules/marked/bin/main.js +16 -14
- package/node_modules/marked/bin/marked.js +2 -1
- package/node_modules/marked/lib/marked.d.ts +157 -125
- package/node_modules/marked/lib/marked.esm.js +67 -2179
- package/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/node_modules/marked/lib/marked.umd.js +67 -2201
- package/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/node_modules/marked/man/marked.1 +4 -2
- package/node_modules/marked/man/marked.1.md +2 -1
- package/node_modules/marked/package.json +27 -35
- package/node_modules/undici/docs/docs/api/Client.md +3 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +27 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
- package/node_modules/undici/lib/core/socks5-client.js +14 -4
- package/node_modules/undici/lib/core/socks5-utils.js +18 -4
- package/node_modules/undici/lib/dispatcher/agent.js +1 -1
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +69 -1
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -0
- package/node_modules/undici/lib/dispatcher/pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +45 -34
- package/node_modules/undici/lib/util/cache.js +8 -2
- package/node_modules/undici/lib/web/cookies/parse.js +17 -25
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
- package/node_modules/undici/lib/web/websocket/receiver.js +80 -23
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
- package/node_modules/undici/lib/web/websocket/websocket.js +8 -1
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +16 -0
- package/package.json +6 -6
- package/slingshot/index.js +253 -253
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
- package/node_modules/marked/lib/marked.cjs +0 -2211
- package/node_modules/marked/lib/marked.cjs.map +0 -7
- package/node_modules/marked/lib/marked.d.cts +0 -728
- package/node_modules/marked/marked.min.js +0 -69
- /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var node_http = require('node:http');
|
|
5
|
-
var protocols = require('@smithy/core/protocols');
|
|
1
|
+
const { ProviderError, CredentialsProviderError, loadConfig } = require("@smithy/core/config");
|
|
2
|
+
const node_http = require("node:http");
|
|
3
|
+
const { parseUrl } = require("@smithy/core/protocols");
|
|
6
4
|
|
|
7
5
|
const isImdsCredentials = (arg) => Boolean(arg) &&
|
|
8
6
|
typeof arg === "object" &&
|
|
@@ -30,17 +28,17 @@ function httpRequest(options) {
|
|
|
30
28
|
hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"),
|
|
31
29
|
});
|
|
32
30
|
req.on("error", (err) => {
|
|
33
|
-
reject(Object.assign(new
|
|
31
|
+
reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err));
|
|
34
32
|
req.destroy();
|
|
35
33
|
});
|
|
36
34
|
req.on("timeout", () => {
|
|
37
|
-
reject(new
|
|
35
|
+
reject(new ProviderError("TimeoutError from instance metadata service"));
|
|
38
36
|
req.destroy();
|
|
39
37
|
});
|
|
40
38
|
req.on("response", (res) => {
|
|
41
39
|
const { statusCode = 400 } = res;
|
|
42
40
|
if (statusCode < 200 || 300 <= statusCode) {
|
|
43
|
-
reject(Object.assign(new
|
|
41
|
+
reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode }));
|
|
44
42
|
req.destroy();
|
|
45
43
|
}
|
|
46
44
|
const chunks = [];
|
|
@@ -73,7 +71,7 @@ const fromContainerMetadata = (init = {}) => {
|
|
|
73
71
|
const requestOptions = await getCmdsUri({ logger: init.logger });
|
|
74
72
|
const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
|
|
75
73
|
if (!isImdsCredentials(credsResponse)) {
|
|
76
|
-
throw new
|
|
74
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
77
75
|
logger: init.logger,
|
|
78
76
|
});
|
|
79
77
|
}
|
|
@@ -109,16 +107,16 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
109
107
|
parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
|
|
110
108
|
}
|
|
111
109
|
catch {
|
|
112
|
-
throw new
|
|
110
|
+
throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
|
|
113
111
|
}
|
|
114
112
|
if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
|
|
115
|
-
throw new
|
|
113
|
+
throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
|
|
116
114
|
tryNextLink: false,
|
|
117
115
|
logger,
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
|
|
121
|
-
throw new
|
|
119
|
+
throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
|
|
122
120
|
tryNextLink: false,
|
|
123
121
|
logger,
|
|
124
122
|
});
|
|
@@ -130,7 +128,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
130
128
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
|
|
131
129
|
};
|
|
132
130
|
}
|
|
133
|
-
throw new
|
|
131
|
+
throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" +
|
|
134
132
|
` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +
|
|
135
133
|
" variable is set", {
|
|
136
134
|
tryNextLink: false,
|
|
@@ -138,7 +136,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
138
136
|
});
|
|
139
137
|
};
|
|
140
138
|
|
|
141
|
-
class InstanceMetadataV1FallbackError extends
|
|
139
|
+
class InstanceMetadataV1FallbackError extends CredentialsProviderError {
|
|
142
140
|
tryNextLink;
|
|
143
141
|
name = "InstanceMetadataV1FallbackError";
|
|
144
142
|
constructor(message, tryNextLink = true) {
|
|
@@ -148,11 +146,11 @@ class InstanceMetadataV1FallbackError extends config.CredentialsProviderError {
|
|
|
148
146
|
}
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
|
|
149
|
+
var Endpoint;
|
|
152
150
|
(function (Endpoint) {
|
|
153
151
|
Endpoint["IPv4"] = "http://169.254.169.254";
|
|
154
152
|
Endpoint["IPv6"] = "http://[fd00:ec2::254]";
|
|
155
|
-
})(
|
|
153
|
+
})(Endpoint || (Endpoint = {}));
|
|
156
154
|
|
|
157
155
|
const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
|
|
158
156
|
const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
|
|
@@ -176,15 +174,15 @@ const ENDPOINT_MODE_CONFIG_OPTIONS = {
|
|
|
176
174
|
default: EndpointMode.IPv4,
|
|
177
175
|
};
|
|
178
176
|
|
|
179
|
-
const getInstanceMetadataEndpoint = async () =>
|
|
180
|
-
const getFromEndpointConfig = async () =>
|
|
177
|
+
const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));
|
|
178
|
+
const getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();
|
|
181
179
|
const getFromEndpointModeConfig = async () => {
|
|
182
|
-
const endpointMode = await
|
|
180
|
+
const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
|
|
183
181
|
switch (endpointMode) {
|
|
184
182
|
case EndpointMode.IPv4:
|
|
185
|
-
return
|
|
183
|
+
return Endpoint.IPv4;
|
|
186
184
|
case EndpointMode.IPv6:
|
|
187
|
-
return
|
|
185
|
+
return Endpoint.IPv6;
|
|
188
186
|
default:
|
|
189
187
|
throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);
|
|
190
188
|
}
|
|
@@ -248,12 +246,12 @@ const getInstanceMetadataProvider = (init = {}) => {
|
|
|
248
246
|
if (isImdsV1Fallback) {
|
|
249
247
|
let fallbackBlockedFromProfile = false;
|
|
250
248
|
let fallbackBlockedFromProcessEnv = false;
|
|
251
|
-
const configValue = await
|
|
249
|
+
const configValue = await loadConfig({
|
|
252
250
|
environmentVariableSelector: (env) => {
|
|
253
251
|
const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
|
|
254
252
|
fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
|
|
255
253
|
if (envValue === undefined) {
|
|
256
|
-
throw new
|
|
254
|
+
throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
|
|
257
255
|
}
|
|
258
256
|
return fallbackBlockedFromProcessEnv;
|
|
259
257
|
},
|
|
@@ -352,7 +350,7 @@ const getCredentialsFromProfile = async (profile, options, init) => {
|
|
|
352
350
|
path: IMDS_PATH + profile,
|
|
353
351
|
})).toString());
|
|
354
352
|
if (!isImdsCredentials(credentialsResponse)) {
|
|
355
|
-
throw new
|
|
353
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
356
354
|
logger: init.logger,
|
|
357
355
|
});
|
|
358
356
|
}
|
|
@@ -364,6 +362,7 @@ exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
|
|
|
364
362
|
exports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;
|
|
365
363
|
exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
|
|
366
364
|
exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
|
|
365
|
+
exports.Endpoint = Endpoint;
|
|
367
366
|
exports.fromContainerMetadata = fromContainerMetadata;
|
|
368
367
|
exports.fromInstanceMetadata = fromInstanceMetadata;
|
|
369
368
|
exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
9
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
10
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
9
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
10
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
14
14
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
15
15
|
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
31
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@smithy/core": "^3.25.0",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var protocols = require('@smithy/core/protocols');
|
|
4
|
-
var serde = require('@smithy/core/serde');
|
|
1
|
+
const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
|
|
2
|
+
const { fromBase64 } = require("@smithy/core/serde");
|
|
5
3
|
|
|
6
4
|
function createRequest(url, requestOptions) {
|
|
7
5
|
return new Request(url, requestOptions);
|
|
@@ -57,7 +55,7 @@ class FetchHttpHandler {
|
|
|
57
55
|
return Promise.reject(abortError);
|
|
58
56
|
}
|
|
59
57
|
let path = request.path;
|
|
60
|
-
const queryString =
|
|
58
|
+
const queryString = buildQueryString(request.query || {});
|
|
61
59
|
if (queryString) {
|
|
62
60
|
path += `?${queryString}`;
|
|
63
61
|
}
|
|
@@ -106,7 +104,7 @@ class FetchHttpHandler {
|
|
|
106
104
|
const hasReadableStream = response.body != undefined;
|
|
107
105
|
if (!hasReadableStream) {
|
|
108
106
|
return response.blob().then((body) => ({
|
|
109
|
-
response: new
|
|
107
|
+
response: new HttpResponse({
|
|
110
108
|
headers: transformedHeaders,
|
|
111
109
|
reason: response.statusText,
|
|
112
110
|
statusCode: response.status,
|
|
@@ -115,7 +113,7 @@ class FetchHttpHandler {
|
|
|
115
113
|
}));
|
|
116
114
|
}
|
|
117
115
|
return {
|
|
118
|
-
response: new
|
|
116
|
+
response: new HttpResponse({
|
|
119
117
|
headers: transformedHeaders,
|
|
120
118
|
reason: response.statusText,
|
|
121
119
|
statusCode: response.status,
|
|
@@ -185,7 +183,7 @@ const streamCollector = async (stream) => {
|
|
|
185
183
|
};
|
|
186
184
|
async function collectBlob(blob) {
|
|
187
185
|
const base64 = await readToBase64(blob);
|
|
188
|
-
const arrayBuffer =
|
|
186
|
+
const arrayBuffer = fromBase64(base64);
|
|
189
187
|
return new Uint8Array(arrayBuffer);
|
|
190
188
|
}
|
|
191
189
|
async function collectStream(stream) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
7
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
8
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
7
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
8
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
9
9
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
10
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
11
11
|
"extract:docs": "api-extractor run --local",
|
|
12
12
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
13
13
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
31
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@smithy/core": "^3.25.0",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@smithy/abort-controller": "^4.
|
|
35
|
+
"@smithy/abort-controller": "^4.3.0",
|
|
36
36
|
"concurrently": "7.0.0",
|
|
37
37
|
"downlevel-dts": "0.10.1",
|
|
38
38
|
"premove": "4.0.0",
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var client = require('@smithy/core/client');
|
|
5
|
-
var protocols = require('@smithy/core/protocols');
|
|
1
|
+
const { fromUtf8, fromHex, toHex, toUint8Array, isArrayBuffer } = require("@smithy/core/serde");
|
|
2
|
+
const { normalizeProvider } = require("@smithy/core/client");
|
|
3
|
+
const { escapeUri, HttpRequest } = require("@smithy/core/protocols");
|
|
6
4
|
|
|
7
5
|
class HeaderFormatter {
|
|
8
6
|
format(headers) {
|
|
9
7
|
const chunks = [];
|
|
10
8
|
for (const headerName of Object.keys(headers)) {
|
|
11
|
-
const bytes =
|
|
9
|
+
const bytes = fromUtf8(headerName);
|
|
12
10
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
13
11
|
}
|
|
14
12
|
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
@@ -48,7 +46,7 @@ class HeaderFormatter {
|
|
|
48
46
|
binBytes.set(header.value, 3);
|
|
49
47
|
return binBytes;
|
|
50
48
|
case "string":
|
|
51
|
-
const utf8Bytes =
|
|
49
|
+
const utf8Bytes = fromUtf8(header.value);
|
|
52
50
|
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
53
51
|
strView.setUint8(0, 7);
|
|
54
52
|
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
@@ -66,7 +64,7 @@ class HeaderFormatter {
|
|
|
66
64
|
}
|
|
67
65
|
const uuidBytes = new Uint8Array(17);
|
|
68
66
|
uuidBytes[0] = 9;
|
|
69
|
-
uuidBytes.set(
|
|
67
|
+
uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
|
|
70
68
|
return uuidBytes;
|
|
71
69
|
}
|
|
72
70
|
}
|
|
@@ -112,7 +110,7 @@ class Int64 {
|
|
|
112
110
|
if (negative) {
|
|
113
111
|
negate(bytes);
|
|
114
112
|
}
|
|
115
|
-
return parseInt(
|
|
113
|
+
return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
|
|
116
114
|
}
|
|
117
115
|
toString() {
|
|
118
116
|
return String(this.valueOf());
|
|
@@ -180,16 +178,16 @@ const getCanonicalQuery = ({ query = {} }) => {
|
|
|
180
178
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
181
179
|
continue;
|
|
182
180
|
}
|
|
183
|
-
const encodedKey =
|
|
181
|
+
const encodedKey = escapeUri(key);
|
|
184
182
|
keys.push(encodedKey);
|
|
185
183
|
const value = query[key];
|
|
186
184
|
if (typeof value === "string") {
|
|
187
|
-
serialized[encodedKey] = `${encodedKey}=${
|
|
185
|
+
serialized[encodedKey] = `${encodedKey}=${escapeUri(value)}`;
|
|
188
186
|
}
|
|
189
187
|
else if (Array.isArray(value)) {
|
|
190
188
|
serialized[encodedKey] = value
|
|
191
189
|
.slice(0)
|
|
192
|
-
.reduce((encoded, value) => encoded.concat([`${encodedKey}=${
|
|
190
|
+
.reduce((encoded, value) => encoded.concat([`${encodedKey}=${escapeUri(value)}`]), [])
|
|
193
191
|
.sort()
|
|
194
192
|
.join("&");
|
|
195
193
|
}
|
|
@@ -229,8 +227,8 @@ class SignatureV4Base {
|
|
|
229
227
|
this.sha256 = sha256;
|
|
230
228
|
this.uriEscapePath = uriEscapePath;
|
|
231
229
|
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
|
|
232
|
-
this.regionProvider =
|
|
233
|
-
this.credentialProvider =
|
|
230
|
+
this.regionProvider = normalizeProvider(region);
|
|
231
|
+
this.credentialProvider = normalizeProvider(credentials);
|
|
234
232
|
}
|
|
235
233
|
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
|
|
236
234
|
const sortedHeaders = Object.keys(canonicalHeaders).sort();
|
|
@@ -244,12 +242,12 @@ ${payloadHash}`;
|
|
|
244
242
|
}
|
|
245
243
|
async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
|
|
246
244
|
const hash = new this.sha256();
|
|
247
|
-
hash.update(
|
|
245
|
+
hash.update(toUint8Array(canonicalRequest));
|
|
248
246
|
const hashedRequest = await hash.digest();
|
|
249
247
|
return `${algorithmIdentifier}
|
|
250
248
|
${longDate}
|
|
251
249
|
${credentialScope}
|
|
252
|
-
${
|
|
250
|
+
${toHex(hashedRequest)}`;
|
|
253
251
|
}
|
|
254
252
|
getCanonicalPath({ path }) {
|
|
255
253
|
if (this.uriEscapePath) {
|
|
@@ -267,7 +265,7 @@ ${serde.toHex(hashedRequest)}`;
|
|
|
267
265
|
}
|
|
268
266
|
}
|
|
269
267
|
const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
|
|
270
|
-
const doubleEncoded =
|
|
268
|
+
const doubleEncoded = escapeUri(normalizedPath);
|
|
271
269
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
272
270
|
}
|
|
273
271
|
return path;
|
|
@@ -296,7 +294,7 @@ const cacheQueue = [];
|
|
|
296
294
|
const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
|
|
297
295
|
const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
|
|
298
296
|
const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
|
|
299
|
-
const cacheKey = `${shortDate}:${region}:${service}:${
|
|
297
|
+
const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;
|
|
300
298
|
if (cacheKey in signingKeyCache) {
|
|
301
299
|
return signingKeyCache[cacheKey];
|
|
302
300
|
}
|
|
@@ -318,7 +316,7 @@ const clearCredentialCache = () => {
|
|
|
318
316
|
};
|
|
319
317
|
const hmac = (ctor, secret, data) => {
|
|
320
318
|
const hash = new ctor(secret);
|
|
321
|
-
hash.update(
|
|
319
|
+
hash.update(toUint8Array(data));
|
|
322
320
|
return hash.digest();
|
|
323
321
|
};
|
|
324
322
|
|
|
@@ -351,10 +349,10 @@ const getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
|
351
349
|
if (body == undefined) {
|
|
352
350
|
return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
353
351
|
}
|
|
354
|
-
else if (typeof body === "string" || ArrayBuffer.isView(body) ||
|
|
352
|
+
else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
|
|
355
353
|
const hashCtor = new hashConstructor();
|
|
356
|
-
hashCtor.update(
|
|
357
|
-
return
|
|
354
|
+
hashCtor.update(toUint8Array(body));
|
|
355
|
+
return toHex(await hashCtor.digest());
|
|
358
356
|
}
|
|
359
357
|
return UNSIGNED_PAYLOAD;
|
|
360
358
|
};
|
|
@@ -370,7 +368,7 @@ const hasHeader = (soughtHeader, headers) => {
|
|
|
370
368
|
};
|
|
371
369
|
|
|
372
370
|
const moveHeadersToQuery = (request, options = {}) => {
|
|
373
|
-
const { headers, query = {} } =
|
|
371
|
+
const { headers, query = {} } = HttpRequest.clone(request);
|
|
374
372
|
for (const name of Object.keys(headers)) {
|
|
375
373
|
const lname = name.toLowerCase();
|
|
376
374
|
if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) ||
|
|
@@ -387,7 +385,7 @@ const moveHeadersToQuery = (request, options = {}) => {
|
|
|
387
385
|
};
|
|
388
386
|
|
|
389
387
|
const prepareRequest = (request) => {
|
|
390
|
-
request =
|
|
388
|
+
request = HttpRequest.clone(request);
|
|
391
389
|
for (const headerName of Object.keys(request.headers)) {
|
|
392
390
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
393
391
|
delete request.headers[headerName];
|
|
@@ -452,7 +450,7 @@ class SignatureV4 extends SignatureV4Base {
|
|
|
452
450
|
const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
|
|
453
451
|
const hash = new this.sha256();
|
|
454
452
|
hash.update(headers);
|
|
455
|
-
const hashedHeaders =
|
|
453
|
+
const hashedHeaders = toHex(await hash.digest());
|
|
456
454
|
const stringToSign = [
|
|
457
455
|
EVENT_ALGORITHM_IDENTIFIER,
|
|
458
456
|
longDate,
|
|
@@ -489,8 +487,8 @@ class SignatureV4 extends SignatureV4Base {
|
|
|
489
487
|
const region = signingRegion ?? (await this.regionProvider());
|
|
490
488
|
const { shortDate } = this.formatDate(signingDate);
|
|
491
489
|
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
|
|
492
|
-
hash.update(
|
|
493
|
-
return
|
|
490
|
+
hash.update(toUint8Array(stringToSign));
|
|
491
|
+
return toHex(await hash.digest());
|
|
494
492
|
}
|
|
495
493
|
async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) {
|
|
496
494
|
const credentials = await this.credentialProvider();
|
|
@@ -519,8 +517,8 @@ class SignatureV4 extends SignatureV4Base {
|
|
|
519
517
|
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
|
520
518
|
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
|
|
521
519
|
const hash = new this.sha256(await keyPromise);
|
|
522
|
-
hash.update(
|
|
523
|
-
return
|
|
520
|
+
hash.update(toUint8Array(stringToSign));
|
|
521
|
+
return toHex(await hash.digest());
|
|
524
522
|
}
|
|
525
523
|
getSigningKey(credentials, region, shortDate, service) {
|
|
526
524
|
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/signature-v4",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"types": "./dist-types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
10
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
11
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
10
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
11
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
12
12
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
13
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
13
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
14
14
|
"extract:docs": "api-extractor run --local",
|
|
15
15
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
16
16
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.
|
|
29
|
-
"@smithy/types": "^4.
|
|
28
|
+
"@smithy/core": "^3.25.0",
|
|
29
|
+
"@smithy/types": "^4.15.0",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.HttpAuthLocation = void 0;
|
|
1
|
+
var HttpAuthLocation;
|
|
4
2
|
(function (HttpAuthLocation) {
|
|
5
3
|
HttpAuthLocation["HEADER"] = "header";
|
|
6
4
|
HttpAuthLocation["QUERY"] = "query";
|
|
7
|
-
})(
|
|
5
|
+
})(HttpAuthLocation || (HttpAuthLocation = {}));
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
var HttpApiKeyAuthLocation;
|
|
10
8
|
(function (HttpApiKeyAuthLocation) {
|
|
11
9
|
HttpApiKeyAuthLocation["HEADER"] = "header";
|
|
12
10
|
HttpApiKeyAuthLocation["QUERY"] = "query";
|
|
13
|
-
})(
|
|
11
|
+
})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
var EndpointURLScheme;
|
|
16
14
|
(function (EndpointURLScheme) {
|
|
17
15
|
EndpointURLScheme["HTTP"] = "http";
|
|
18
16
|
EndpointURLScheme["HTTPS"] = "https";
|
|
19
|
-
})(
|
|
17
|
+
})(EndpointURLScheme || (EndpointURLScheme = {}));
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
var AlgorithmId;
|
|
22
20
|
(function (AlgorithmId) {
|
|
23
21
|
AlgorithmId["MD5"] = "md5";
|
|
24
22
|
AlgorithmId["CRC32"] = "crc32";
|
|
25
23
|
AlgorithmId["CRC32C"] = "crc32c";
|
|
26
24
|
AlgorithmId["SHA1"] = "sha1";
|
|
27
25
|
AlgorithmId["SHA256"] = "sha256";
|
|
28
|
-
})(
|
|
26
|
+
})(AlgorithmId || (AlgorithmId = {}));
|
|
29
27
|
const getChecksumConfiguration = (runtimeConfig) => {
|
|
30
28
|
const checksumAlgorithms = [];
|
|
31
29
|
if (runtimeConfig.sha256 !== undefined) {
|
|
32
30
|
checksumAlgorithms.push({
|
|
33
|
-
algorithmId: () =>
|
|
31
|
+
algorithmId: () => AlgorithmId.SHA256,
|
|
34
32
|
checksumConstructor: () => runtimeConfig.sha256,
|
|
35
33
|
});
|
|
36
34
|
}
|
|
37
35
|
if (runtimeConfig.md5 != undefined) {
|
|
38
36
|
checksumAlgorithms.push({
|
|
39
|
-
algorithmId: () =>
|
|
37
|
+
algorithmId: () => AlgorithmId.MD5,
|
|
40
38
|
checksumConstructor: () => runtimeConfig.md5,
|
|
41
39
|
});
|
|
42
40
|
}
|
|
@@ -64,28 +62,35 @@ const resolveDefaultRuntimeConfig = (config) => {
|
|
|
64
62
|
return resolveChecksumRuntimeConfig(config);
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
var FieldPosition;
|
|
68
66
|
(function (FieldPosition) {
|
|
69
67
|
FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
|
|
70
68
|
FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
|
|
71
|
-
})(
|
|
69
|
+
})(FieldPosition || (FieldPosition = {}));
|
|
72
70
|
|
|
73
71
|
const SMITHY_CONTEXT_KEY = "__smithy_context";
|
|
74
72
|
|
|
75
|
-
|
|
73
|
+
var IniSectionType;
|
|
76
74
|
(function (IniSectionType) {
|
|
77
75
|
IniSectionType["PROFILE"] = "profile";
|
|
78
76
|
IniSectionType["SSO_SESSION"] = "sso-session";
|
|
79
77
|
IniSectionType["SERVICES"] = "services";
|
|
80
|
-
})(
|
|
78
|
+
})(IniSectionType || (IniSectionType = {}));
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
var RequestHandlerProtocol;
|
|
83
81
|
(function (RequestHandlerProtocol) {
|
|
84
82
|
RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
|
|
85
83
|
RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
|
|
86
84
|
RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
|
|
87
|
-
})(
|
|
85
|
+
})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
|
|
88
86
|
|
|
87
|
+
exports.AlgorithmId = AlgorithmId;
|
|
88
|
+
exports.EndpointURLScheme = EndpointURLScheme;
|
|
89
|
+
exports.FieldPosition = FieldPosition;
|
|
90
|
+
exports.HttpApiKeyAuthLocation = HttpApiKeyAuthLocation;
|
|
91
|
+
exports.HttpAuthLocation = HttpAuthLocation;
|
|
92
|
+
exports.IniSectionType = IniSectionType;
|
|
93
|
+
exports.RequestHandlerProtocol = RequestHandlerProtocol;
|
|
89
94
|
exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;
|
|
90
95
|
exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
|
|
91
96
|
exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/types",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
7
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
6
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
7
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
8
8
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4 && node scripts/downlevel",
|
|
9
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
9
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
10
10
|
"extract:docs": "api-extractor run --local",
|
|
11
11
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
12
12
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
## Demo
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Check out the [demo page](https://marked.js.org/demo/) to see Marked in action ⛹️
|
|
21
21
|
|
|
22
22
|
## Docs
|
|
23
23
|
|
|
@@ -32,7 +32,7 @@ Also read about:
|
|
|
32
32
|
|
|
33
33
|
**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.
|
|
34
34
|
|
|
35
|
-
**Browser:**
|
|
35
|
+
**Browser:** [Baseline Widely Available](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility)
|
|
36
36
|
|
|
37
37
|
## Installation
|
|
38
38
|
|
|
@@ -72,6 +72,14 @@ $ cat hello.html
|
|
|
72
72
|
$ marked --help
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
**Node.js**
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
import { marked } from 'marked';
|
|
79
|
+
const html = marked.parse('# Marked in Node.js');
|
|
80
|
+
console.log(html);
|
|
81
|
+
```
|
|
82
|
+
|
|
75
83
|
**Browser**
|
|
76
84
|
|
|
77
85
|
```html
|
|
@@ -83,7 +91,7 @@ $ marked --help
|
|
|
83
91
|
</head>
|
|
84
92
|
<body>
|
|
85
93
|
<div id="content"></div>
|
|
86
|
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.
|
|
94
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
|
|
87
95
|
<script>
|
|
88
96
|
document.getElementById('content').innerHTML =
|
|
89
97
|
marked.parse('# Marked in the browser\n\nRendered by **marked**.');
|
|
@@ -103,4 +111,5 @@ or import esm module
|
|
|
103
111
|
|
|
104
112
|
## License
|
|
105
113
|
|
|
106
|
-
Copyright (c)
|
|
114
|
+
Copyright (c) 2018+, MarkedJS. (MIT License)
|
|
115
|
+
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|