@shawnstack/quickforge 1.3.20 → 1.3.22
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/README.md +348 -348
- package/dist/assets/{anthropic-Bj3HAZgj.js → anthropic-CDKnv1FQ.js} +1 -1
- package/dist/assets/{azure-openai-responses-IdZZrSrI.js → azure-openai-responses-BnUwVl-8.js} +1 -1
- package/dist/assets/{google-Brt_lS1J.js → google-DOEyCDZy.js} +1 -1
- package/dist/assets/{google-vertex-B6HsoZ34.js → google-vertex-BPPf3car.js} +1 -1
- package/dist/assets/{icons-BHkxP7oT.js → icons-WD3UkVNM.js} +1 -1
- package/dist/assets/{index-D0CVLdX_.js → index-CjTN0qaQ.js} +586 -554
- package/dist/assets/index-eeLjaV06.css +3 -0
- package/dist/assets/{mistral-CenXqwPz.js → mistral-Ber29mja.js} +1 -1
- package/dist/assets/{openai-codex-responses-D9ffGwbj.js → openai-codex-responses-D8gq8a3l.js} +1 -1
- package/dist/assets/{openai-completions-eWdeSGBG.js → openai-completions-CATWPFBp.js} +1 -1
- package/dist/assets/{openai-responses-Cavpmjeu.js → openai-responses-DxcB6Ksu.js} +1 -1
- package/dist/assets/{openai-responses-shared-DF3ZGaUx.js → openai-responses-shared-a_PAPxTO.js} +1 -1
- package/dist/assets/{react-vendor-CmyL2roG.js → react-vendor-BcQaTQ90.js} +1 -1
- package/dist/index.html +4 -4
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +11 -11
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +156 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +80 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@nodable/entities/package.json +1 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +1 -1
- package/node_modules/@nodable/entities/src/entities.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +3 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +12 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +184 -0
- package/node_modules/@smithy/core/dist-es/index.js +6 -6
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/{protocols/url-parser → transport}/parseUrl.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/{endpoints → transport}/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/package.json +19 -10
- package/node_modules/@smithy/core/transport.js +5 -0
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/eventsource-parser/README.md +31 -0
- package/node_modules/eventsource-parser/dist/index.cjs +21 -10
- package/node_modules/eventsource-parser/dist/index.js +21 -10
- package/node_modules/eventsource-parser/dist/stream.cjs +4 -3
- package/node_modules/eventsource-parser/dist/stream.js +4 -3
- package/node_modules/eventsource-parser/package.json +8 -8
- package/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/converter.js +4 -2
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
- package/node_modules/typebox/build/type/script/parser.mjs +2 -1
- package/node_modules/typebox/package.json +29 -29
- package/package.json +1 -1
- package/server/agent-manager.mjs +63 -25
- package/server/agent-profiles.mjs +191 -0
- package/server/auto-compaction.mjs +20 -0
- package/server/index.mjs +32 -8
- package/server/mcp/registry.mjs +13 -2
- package/server/routes/agent-profiles.mjs +172 -0
- package/server/routes/lan-access.mjs +20 -0
- package/server/routes/scheduled-tasks.mjs +161 -47
- package/server/routes/shared-conversation.mjs +14 -0
- package/server/routes/storage.mjs +10 -0
- package/server/routes/terminal.mjs +13 -3
- package/server/session-utils.mjs +2 -2
- package/server/storage.mjs +3 -4
- package/server/system-prompt.mjs +10 -5
- package/server/terminal/terminal-manager.mjs +9 -1
- package/server/tools/definitions.mjs +2 -7
- package/server/utils/response.mjs +4 -0
- package/dist/assets/index-D0W9hAl_.css +0 -3
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -46
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -24
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -19
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -27
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +0 -10
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +0 -44
- package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/setFeature.js +0 -14
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -38
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -15
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -9
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -61
- package/node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +0 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/TestVectors.fixture.js +0 -146
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/vectorTypes.fixture.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js +0 -2
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js +0 -399
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemePlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/httpAuthSchemeMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/resolveAuthOptions.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/getHttpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/httpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{pagination → legacy-root-exports/pagination}/createPaginator.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/DefaultIdentityProviderConfig.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpBearerAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/noAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/memoizeIdentityProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{getSmithyContext.js → submodules/transport/getSmithyContext.js} +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpRequest.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpResponse.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{endpoints/util-endpoints/lib → transport}/isValidHostLabel.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/isValidHostname.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{client/util-middleware → transport}/normalizeProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/querystring-parser → transport}/parseQueryString.js +0 -0
|
@@ -34,7 +34,6 @@ export const BASIC_LATIN = {
|
|
|
34
34
|
num: '#',
|
|
35
35
|
dollar: '$',
|
|
36
36
|
percent: '%',
|
|
37
|
-
amp: '&',
|
|
38
37
|
ast: '*',
|
|
39
38
|
commat: '@',
|
|
40
39
|
lowbar: '_',
|
|
@@ -466,9 +465,6 @@ export const CYRILLIC = {
|
|
|
466
465
|
*/
|
|
467
466
|
export const MATH = {
|
|
468
467
|
plus: '+',
|
|
469
|
-
minus: '−',
|
|
470
|
-
mnplus: '∓',
|
|
471
|
-
mp: '∓',
|
|
472
468
|
pm: '±',
|
|
473
469
|
times: '×',
|
|
474
470
|
div: '÷',
|
|
@@ -541,10 +537,6 @@ export const MATH = {
|
|
|
541
537
|
bumpe: '≏',
|
|
542
538
|
bumpeq: '≏',
|
|
543
539
|
HumpEqual: '≏',
|
|
544
|
-
dotminus: '∸',
|
|
545
|
-
minusd: '∸',
|
|
546
|
-
plusdo: '∔',
|
|
547
|
-
dotplus: '∔',
|
|
548
540
|
le: '≤',
|
|
549
541
|
LessEqual: '≤',
|
|
550
542
|
ge: '≥',
|
|
@@ -661,7 +653,6 @@ export const MATH_ADVANCED = {
|
|
|
661
653
|
wreath: '≀',
|
|
662
654
|
nsime: '≄',
|
|
663
655
|
nsimeq: '≄',
|
|
664
|
-
nsimeq: '≄',
|
|
665
656
|
ncong: '≇',
|
|
666
657
|
simne: '≆',
|
|
667
658
|
ncongdot: '⩭̸',
|
|
@@ -778,10 +769,6 @@ export const ARROWS = {
|
|
|
778
769
|
mapsto: '↦',
|
|
779
770
|
mapstodown: '↧',
|
|
780
771
|
crarr: '↵',
|
|
781
|
-
nwarrow: '↖',
|
|
782
|
-
nearrow: '↗',
|
|
783
|
-
searrow: '↘',
|
|
784
|
-
swarrow: '↙',
|
|
785
772
|
nleftarrow: '↚',
|
|
786
773
|
nleftrightarrow: '↮',
|
|
787
774
|
nrightarrow: '↛',
|
|
@@ -822,7 +809,6 @@ export const ARROWS = {
|
|
|
822
809
|
ldrushar: '⥋',
|
|
823
810
|
rdldhar: '⥩',
|
|
824
811
|
lrhard: '⥭',
|
|
825
|
-
rlhar: '⇌',
|
|
826
812
|
uharr: '↾',
|
|
827
813
|
uharl: '↿',
|
|
828
814
|
dharr: '⇂',
|
|
@@ -838,7 +824,6 @@ export const ARROWS = {
|
|
|
838
824
|
nhArr: '⇎',
|
|
839
825
|
nlarr: '↚',
|
|
840
826
|
nlArr: '⇍',
|
|
841
|
-
nrarr: '↛',
|
|
842
827
|
nrArr: '⇏',
|
|
843
828
|
larrb: '⇤',
|
|
844
829
|
LeftArrowBar: '⇤',
|
|
@@ -1000,7 +985,6 @@ export const PUNCTUATION = {
|
|
|
1000
985
|
DiacriticalDot: '˙',
|
|
1001
986
|
DiacriticalDoubleAcute: '˝',
|
|
1002
987
|
grave: '`',
|
|
1003
|
-
acute: '´',
|
|
1004
988
|
};
|
|
1005
989
|
|
|
1006
990
|
/**
|
|
@@ -1014,7 +998,6 @@ export const CURRENCY = {
|
|
|
1014
998
|
yen: '¥',
|
|
1015
999
|
euro: '€',
|
|
1016
1000
|
dollar: '$',
|
|
1017
|
-
euro: '€',
|
|
1018
1001
|
fnof: 'ƒ',
|
|
1019
1002
|
inr: '₹',
|
|
1020
1003
|
af: '؋',
|
|
@@ -1114,7 +1097,6 @@ export const MISC_SYMBOLS = {
|
|
|
1114
1097
|
Vdash: '⊩',
|
|
1115
1098
|
dashv: '⊣',
|
|
1116
1099
|
vDash: '⊨',
|
|
1117
|
-
Vdash: '⊩',
|
|
1118
1100
|
Vvdash: '⊪',
|
|
1119
1101
|
nvdash: '⊬',
|
|
1120
1102
|
nvDash: '⊭',
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var transport = require('@smithy/core/transport');
|
|
4
4
|
var protocols = require('@smithy/core/protocols');
|
|
5
|
+
var types = require('@smithy/types');
|
|
5
6
|
var client = require('@smithy/core/client');
|
|
6
7
|
|
|
7
|
-
const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
|
|
8
|
-
|
|
9
8
|
const resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
|
|
10
9
|
if (!authSchemePreference || authSchemePreference.length === 0) {
|
|
11
10
|
return candidateAuthOptions;
|
|
@@ -321,6 +320,7 @@ const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
|
|
|
321
320
|
};
|
|
322
321
|
};
|
|
323
322
|
|
|
323
|
+
exports.getSmithyContext = transport.getSmithyContext;
|
|
324
324
|
exports.requestBuilder = protocols.requestBuilder;
|
|
325
325
|
exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig;
|
|
326
326
|
exports.EXPIRATION_MS = EXPIRATION_MS;
|
|
@@ -333,7 +333,6 @@ exports.doesIdentityRequireRefresh = doesIdentityRequireRefresh;
|
|
|
333
333
|
exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin;
|
|
334
334
|
exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin;
|
|
335
335
|
exports.getHttpSigningPlugin = getHttpSigningPlugin;
|
|
336
|
-
exports.getSmithyContext = getSmithyContext;
|
|
337
336
|
exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = httpAuthSchemeEndpointRuleSetMiddlewareOptions;
|
|
338
337
|
exports.httpAuthSchemeMiddleware = httpAuthSchemeMiddleware;
|
|
339
338
|
exports.httpAuthSchemeMiddlewareOptions = httpAuthSchemeMiddlewareOptions;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var transport = require('@smithy/core/transport');
|
|
3
4
|
var types = require('@smithy/types');
|
|
4
5
|
var schema = require('@smithy/core/schema');
|
|
5
6
|
|
|
@@ -285,15 +286,6 @@ const priorityWeights = {
|
|
|
285
286
|
low: 1,
|
|
286
287
|
};
|
|
287
288
|
|
|
288
|
-
const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
|
|
289
|
-
|
|
290
|
-
const normalizeProvider = (input) => {
|
|
291
|
-
if (typeof input === "function")
|
|
292
|
-
return input;
|
|
293
|
-
const promisified = Promise.resolve(input);
|
|
294
|
-
return () => promisified;
|
|
295
|
-
};
|
|
296
|
-
|
|
297
289
|
const invalidFunction = (message) => () => {
|
|
298
290
|
throw new Error(message);
|
|
299
291
|
};
|
|
@@ -1097,6 +1089,8 @@ const _json = (obj) => {
|
|
|
1097
1089
|
return obj;
|
|
1098
1090
|
};
|
|
1099
1091
|
|
|
1092
|
+
exports.getSmithyContext = transport.getSmithyContext;
|
|
1093
|
+
exports.normalizeProvider = transport.normalizeProvider;
|
|
1100
1094
|
exports.AlgorithmId = types.AlgorithmId;
|
|
1101
1095
|
exports.Client = Client;
|
|
1102
1096
|
exports.Command = Command;
|
|
@@ -1116,14 +1110,12 @@ exports.getChecksumConfiguration = getChecksumConfiguration;
|
|
|
1116
1110
|
exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
|
|
1117
1111
|
exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration;
|
|
1118
1112
|
exports.getRetryConfiguration = getRetryConfiguration;
|
|
1119
|
-
exports.getSmithyContext = getSmithyContext;
|
|
1120
1113
|
exports.getValueFromTextNode = getValueFromTextNode;
|
|
1121
1114
|
exports.invalidFunction = invalidFunction;
|
|
1122
1115
|
exports.invalidProvider = invalidProvider;
|
|
1123
1116
|
exports.isSerializableHeaderValue = isSerializableHeaderValue;
|
|
1124
1117
|
exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode;
|
|
1125
1118
|
exports.map = map;
|
|
1126
|
-
exports.normalizeProvider = normalizeProvider;
|
|
1127
1119
|
exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig;
|
|
1128
1120
|
exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
|
|
1129
1121
|
exports.resolveRetryRuntimeConfig = resolveRetryRuntimeConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var client = require('@smithy/core/client');
|
|
4
|
-
var
|
|
4
|
+
var transport = require('@smithy/core/transport');
|
|
5
5
|
|
|
6
6
|
class ProviderError extends Error {
|
|
7
7
|
name = "ProviderError";
|
|
@@ -178,7 +178,7 @@ const resolveEndpointsConfig = (input) => {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
const validRegions = new Set();
|
|
181
|
-
const checkRegion = (region, check =
|
|
181
|
+
const checkRegion = (region, check = transport.isValidHostLabel) => {
|
|
182
182
|
if (!validRegions.has(region) && !check(region)) {
|
|
183
183
|
if (region === "*") {
|
|
184
184
|
console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
@@ -6,7 +6,7 @@ var node_crypto = require('node:crypto');
|
|
|
6
6
|
var promises = require('node:fs/promises');
|
|
7
7
|
var types = require('@smithy/types');
|
|
8
8
|
var client = require('@smithy/core/client');
|
|
9
|
-
var
|
|
9
|
+
var transport = require('@smithy/core/transport');
|
|
10
10
|
|
|
11
11
|
class ProviderError extends Error {
|
|
12
12
|
name = "ProviderError";
|
|
@@ -486,7 +486,7 @@ const NODE_REGION_CONFIG_FILE_OPTIONS = {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
const validRegions = new Set();
|
|
489
|
-
const checkRegion = (region, check =
|
|
489
|
+
const checkRegion = (region, check = transport.isValidHostLabel) => {
|
|
490
490
|
if (!validRegions.has(region) && !check(region)) {
|
|
491
491
|
if (region === "*") {
|
|
492
492
|
console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var client = require('@smithy/core/client');
|
|
4
|
-
var
|
|
4
|
+
var transport = require('@smithy/core/transport');
|
|
5
5
|
|
|
6
6
|
class ProviderError extends Error {
|
|
7
7
|
name = "ProviderError";
|
|
@@ -178,7 +178,7 @@ const resolveEndpointsConfig = (input) => {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
const validRegions = new Set();
|
|
181
|
-
const checkRegion = (region, check =
|
|
181
|
+
const checkRegion = (region, check = transport.isValidHostLabel) => {
|
|
182
182
|
if (!validRegions.has(region) && !check(region)) {
|
|
183
183
|
if (region === "*") {
|
|
184
184
|
console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var transport = require('@smithy/core/transport');
|
|
4
4
|
var client = require('@smithy/core/client');
|
|
5
5
|
var types = require('@smithy/types');
|
|
6
6
|
|
|
@@ -93,23 +93,6 @@ const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config,
|
|
|
93
93
|
return configProvider;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
const toEndpointV1 = (endpoint) => {
|
|
97
|
-
if (typeof endpoint === "object") {
|
|
98
|
-
if ("url" in endpoint) {
|
|
99
|
-
const v1Endpoint = protocols.parseUrl(endpoint.url);
|
|
100
|
-
if (endpoint.headers) {
|
|
101
|
-
v1Endpoint.headers = {};
|
|
102
|
-
for (const name in endpoint.headers) {
|
|
103
|
-
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return v1Endpoint;
|
|
107
|
-
}
|
|
108
|
-
return endpoint;
|
|
109
|
-
}
|
|
110
|
-
return protocols.parseUrl(endpoint);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
96
|
function bindGetEndpointFromInstructions(getEndpointFromConfig) {
|
|
114
97
|
return async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
115
98
|
if (!clientConfig.isCustomEndpoint) {
|
|
@@ -121,7 +104,7 @@ function bindGetEndpointFromInstructions(getEndpointFromConfig) {
|
|
|
121
104
|
endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);
|
|
122
105
|
}
|
|
123
106
|
if (endpointFromConfig) {
|
|
124
|
-
clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
|
|
107
|
+
clientConfig.endpoint = () => Promise.resolve(transport.toEndpointV1(endpointFromConfig));
|
|
125
108
|
clientConfig.isCustomEndpoint = true;
|
|
126
109
|
}
|
|
127
110
|
}
|
|
@@ -245,14 +228,14 @@ function bindResolveEndpointConfig(getEndpointFromConfig) {
|
|
|
245
228
|
return (input) => {
|
|
246
229
|
const tls = input.tls ?? true;
|
|
247
230
|
const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
|
|
248
|
-
const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await
|
|
231
|
+
const customEndpointProvider = endpoint != null ? async () => transport.toEndpointV1(await transport.normalizeProvider(endpoint)()) : undefined;
|
|
249
232
|
const isCustomEndpoint = !!endpoint;
|
|
250
233
|
const resolvedConfig = Object.assign(input, {
|
|
251
234
|
endpoint: customEndpointProvider,
|
|
252
235
|
tls,
|
|
253
236
|
isCustomEndpoint,
|
|
254
|
-
useDualstackEndpoint:
|
|
255
|
-
useFipsEndpoint:
|
|
237
|
+
useDualstackEndpoint: transport.normalizeProvider(useDualstackEndpoint ?? false),
|
|
238
|
+
useFipsEndpoint: transport.normalizeProvider(useFipsEndpoint ?? false),
|
|
256
239
|
});
|
|
257
240
|
let configuredEndpointPromise = undefined;
|
|
258
241
|
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
@@ -405,20 +388,6 @@ const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
|
405
388
|
|
|
406
389
|
const isSet = (value) => value != null;
|
|
407
390
|
|
|
408
|
-
const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
409
|
-
const isValidHostLabel = (value, allowSubDomains = false) => {
|
|
410
|
-
if (!allowSubDomains) {
|
|
411
|
-
return VALID_HOST_LABEL_REGEX.test(value);
|
|
412
|
-
}
|
|
413
|
-
const labels = value.split(".");
|
|
414
|
-
for (const label of labels) {
|
|
415
|
-
if (!isValidHostLabel(label)) {
|
|
416
|
-
return false;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return true;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
391
|
function ite(condition, trueValue, falseValue) {
|
|
423
392
|
return condition ? trueValue : falseValue;
|
|
424
393
|
}
|
|
@@ -511,7 +480,7 @@ const endpointFunctions = {
|
|
|
511
480
|
coalesce,
|
|
512
481
|
getAttr,
|
|
513
482
|
isSet,
|
|
514
|
-
isValidHostLabel,
|
|
483
|
+
isValidHostLabel: transport.isValidHostLabel,
|
|
515
484
|
ite,
|
|
516
485
|
not,
|
|
517
486
|
parseURL,
|
|
@@ -841,6 +810,9 @@ const resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
|
|
|
841
810
|
const endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
|
|
842
811
|
const getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);
|
|
843
812
|
|
|
813
|
+
exports.isValidHostLabel = transport.isValidHostLabel;
|
|
814
|
+
exports.middlewareEndpointToEndpointV1 = transport.toEndpointV1;
|
|
815
|
+
exports.toEndpointV1 = transport.toEndpointV1;
|
|
844
816
|
exports.BinaryDecisionDiagram = BinaryDecisionDiagram;
|
|
845
817
|
exports.EndpointCache = EndpointCache;
|
|
846
818
|
exports.EndpointError = EndpointError;
|
|
@@ -851,10 +823,7 @@ exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
|
|
|
851
823
|
exports.getEndpointFromInstructions = getEndpointFromInstructions;
|
|
852
824
|
exports.getEndpointPlugin = getEndpointPlugin;
|
|
853
825
|
exports.isIpAddress = isIpAddress;
|
|
854
|
-
exports.isValidHostLabel = isValidHostLabel;
|
|
855
|
-
exports.middlewareEndpointToEndpointV1 = toEndpointV1;
|
|
856
826
|
exports.resolveEndpoint = resolveEndpoint;
|
|
857
827
|
exports.resolveEndpointConfig = resolveEndpointConfig;
|
|
858
828
|
exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
|
|
859
829
|
exports.resolveParams = resolveParams;
|
|
860
|
-
exports.toEndpointV1 = toEndpointV1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var config = require('@smithy/core/config');
|
|
4
|
-
var
|
|
4
|
+
var transport = require('@smithy/core/transport');
|
|
5
5
|
var client = require('@smithy/core/client');
|
|
6
6
|
var types = require('@smithy/types');
|
|
7
7
|
|
|
@@ -125,23 +125,6 @@ const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config,
|
|
|
125
125
|
return configProvider;
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
const toEndpointV1 = (endpoint) => {
|
|
129
|
-
if (typeof endpoint === "object") {
|
|
130
|
-
if ("url" in endpoint) {
|
|
131
|
-
const v1Endpoint = protocols.parseUrl(endpoint.url);
|
|
132
|
-
if (endpoint.headers) {
|
|
133
|
-
v1Endpoint.headers = {};
|
|
134
|
-
for (const name in endpoint.headers) {
|
|
135
|
-
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return v1Endpoint;
|
|
139
|
-
}
|
|
140
|
-
return endpoint;
|
|
141
|
-
}
|
|
142
|
-
return protocols.parseUrl(endpoint);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
128
|
function bindGetEndpointFromInstructions(getEndpointFromConfig) {
|
|
146
129
|
return async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
147
130
|
if (!clientConfig.isCustomEndpoint) {
|
|
@@ -153,7 +136,7 @@ function bindGetEndpointFromInstructions(getEndpointFromConfig) {
|
|
|
153
136
|
endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);
|
|
154
137
|
}
|
|
155
138
|
if (endpointFromConfig) {
|
|
156
|
-
clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
|
|
139
|
+
clientConfig.endpoint = () => Promise.resolve(transport.toEndpointV1(endpointFromConfig));
|
|
157
140
|
clientConfig.isCustomEndpoint = true;
|
|
158
141
|
}
|
|
159
142
|
}
|
|
@@ -277,14 +260,14 @@ function bindResolveEndpointConfig(getEndpointFromConfig) {
|
|
|
277
260
|
return (input) => {
|
|
278
261
|
const tls = input.tls ?? true;
|
|
279
262
|
const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
|
|
280
|
-
const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await
|
|
263
|
+
const customEndpointProvider = endpoint != null ? async () => transport.toEndpointV1(await transport.normalizeProvider(endpoint)()) : undefined;
|
|
281
264
|
const isCustomEndpoint = !!endpoint;
|
|
282
265
|
const resolvedConfig = Object.assign(input, {
|
|
283
266
|
endpoint: customEndpointProvider,
|
|
284
267
|
tls,
|
|
285
268
|
isCustomEndpoint,
|
|
286
|
-
useDualstackEndpoint:
|
|
287
|
-
useFipsEndpoint:
|
|
269
|
+
useDualstackEndpoint: transport.normalizeProvider(useDualstackEndpoint ?? false),
|
|
270
|
+
useFipsEndpoint: transport.normalizeProvider(useFipsEndpoint ?? false),
|
|
288
271
|
});
|
|
289
272
|
let configuredEndpointPromise = undefined;
|
|
290
273
|
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
@@ -437,20 +420,6 @@ const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
|
437
420
|
|
|
438
421
|
const isSet = (value) => value != null;
|
|
439
422
|
|
|
440
|
-
const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
441
|
-
const isValidHostLabel = (value, allowSubDomains = false) => {
|
|
442
|
-
if (!allowSubDomains) {
|
|
443
|
-
return VALID_HOST_LABEL_REGEX.test(value);
|
|
444
|
-
}
|
|
445
|
-
const labels = value.split(".");
|
|
446
|
-
for (const label of labels) {
|
|
447
|
-
if (!isValidHostLabel(label)) {
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
return true;
|
|
452
|
-
};
|
|
453
|
-
|
|
454
423
|
function ite(condition, trueValue, falseValue) {
|
|
455
424
|
return condition ? trueValue : falseValue;
|
|
456
425
|
}
|
|
@@ -543,7 +512,7 @@ const endpointFunctions = {
|
|
|
543
512
|
coalesce,
|
|
544
513
|
getAttr,
|
|
545
514
|
isSet,
|
|
546
|
-
isValidHostLabel,
|
|
515
|
+
isValidHostLabel: transport.isValidHostLabel,
|
|
547
516
|
ite,
|
|
548
517
|
not,
|
|
549
518
|
parseURL,
|
|
@@ -873,6 +842,9 @@ const resolveEndpointConfig = bindResolveEndpointConfig(getEndpointFromConfig);
|
|
|
873
842
|
const endpointMiddleware = bindEndpointMiddleware(getEndpointFromConfig);
|
|
874
843
|
const getEndpointPlugin = bindGetEndpointPlugin(getEndpointFromConfig);
|
|
875
844
|
|
|
845
|
+
exports.isValidHostLabel = transport.isValidHostLabel;
|
|
846
|
+
exports.middlewareEndpointToEndpointV1 = transport.toEndpointV1;
|
|
847
|
+
exports.toEndpointV1 = transport.toEndpointV1;
|
|
876
848
|
exports.BinaryDecisionDiagram = BinaryDecisionDiagram;
|
|
877
849
|
exports.EndpointCache = EndpointCache;
|
|
878
850
|
exports.EndpointError = EndpointError;
|
|
@@ -883,10 +855,7 @@ exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
|
|
|
883
855
|
exports.getEndpointFromInstructions = getEndpointFromInstructions;
|
|
884
856
|
exports.getEndpointPlugin = getEndpointPlugin;
|
|
885
857
|
exports.isIpAddress = isIpAddress;
|
|
886
|
-
exports.isValidHostLabel = isValidHostLabel;
|
|
887
|
-
exports.middlewareEndpointToEndpointV1 = toEndpointV1;
|
|
888
858
|
exports.resolveEndpoint = resolveEndpoint;
|
|
889
859
|
exports.resolveEndpointConfig = resolveEndpointConfig;
|
|
890
860
|
exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
|
|
891
861
|
exports.resolveParams = resolveParams;
|
|
892
|
-
exports.toEndpointV1 = toEndpointV1;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var serde = require('@smithy/core/serde');
|
|
4
4
|
var schema = require('@smithy/core/schema');
|
|
5
|
+
var transport = require('@smithy/core/transport');
|
|
5
6
|
var types = require('@smithy/types');
|
|
6
7
|
|
|
7
8
|
const collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
@@ -28,90 +29,6 @@ class SerdeContext {
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
class HttpRequest {
|
|
32
|
-
method;
|
|
33
|
-
protocol;
|
|
34
|
-
hostname;
|
|
35
|
-
port;
|
|
36
|
-
path;
|
|
37
|
-
query;
|
|
38
|
-
headers;
|
|
39
|
-
username;
|
|
40
|
-
password;
|
|
41
|
-
fragment;
|
|
42
|
-
body;
|
|
43
|
-
constructor(options) {
|
|
44
|
-
this.method = options.method || "GET";
|
|
45
|
-
this.hostname = options.hostname || "localhost";
|
|
46
|
-
this.port = options.port;
|
|
47
|
-
this.query = options.query || {};
|
|
48
|
-
this.headers = options.headers || {};
|
|
49
|
-
this.body = options.body;
|
|
50
|
-
this.protocol = options.protocol
|
|
51
|
-
? options.protocol.slice(-1) !== ":"
|
|
52
|
-
? `${options.protocol}:`
|
|
53
|
-
: options.protocol
|
|
54
|
-
: "https:";
|
|
55
|
-
this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/";
|
|
56
|
-
this.username = options.username;
|
|
57
|
-
this.password = options.password;
|
|
58
|
-
this.fragment = options.fragment;
|
|
59
|
-
}
|
|
60
|
-
static clone(request) {
|
|
61
|
-
const cloned = new HttpRequest({
|
|
62
|
-
...request,
|
|
63
|
-
headers: { ...request.headers },
|
|
64
|
-
});
|
|
65
|
-
if (cloned.query) {
|
|
66
|
-
cloned.query = cloneQuery(cloned.query);
|
|
67
|
-
}
|
|
68
|
-
return cloned;
|
|
69
|
-
}
|
|
70
|
-
static isInstance(request) {
|
|
71
|
-
if (!request) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
const req = request;
|
|
75
|
-
return ("method" in req &&
|
|
76
|
-
"protocol" in req &&
|
|
77
|
-
"hostname" in req &&
|
|
78
|
-
"path" in req &&
|
|
79
|
-
typeof req["query"] === "object" &&
|
|
80
|
-
typeof req["headers"] === "object");
|
|
81
|
-
}
|
|
82
|
-
clone() {
|
|
83
|
-
return HttpRequest.clone(this);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function cloneQuery(query) {
|
|
87
|
-
return Object.keys(query).reduce((carry, paramName) => {
|
|
88
|
-
const param = query[paramName];
|
|
89
|
-
return {
|
|
90
|
-
...carry,
|
|
91
|
-
[paramName]: Array.isArray(param) ? [...param] : param,
|
|
92
|
-
};
|
|
93
|
-
}, {});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
class HttpResponse {
|
|
97
|
-
statusCode;
|
|
98
|
-
reason;
|
|
99
|
-
headers;
|
|
100
|
-
body;
|
|
101
|
-
constructor(options) {
|
|
102
|
-
this.statusCode = options.statusCode;
|
|
103
|
-
this.reason = options.reason;
|
|
104
|
-
this.headers = options.headers || {};
|
|
105
|
-
this.body = options.body;
|
|
106
|
-
}
|
|
107
|
-
static isInstance(response) {
|
|
108
|
-
if (!response)
|
|
109
|
-
return false;
|
|
110
|
-
const resp = response;
|
|
111
|
-
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
32
|
class HttpProtocol extends SerdeContext {
|
|
116
33
|
options;
|
|
117
34
|
compositeErrorRegistry;
|
|
@@ -124,10 +41,10 @@ class HttpProtocol extends SerdeContext {
|
|
|
124
41
|
}
|
|
125
42
|
}
|
|
126
43
|
getRequestType() {
|
|
127
|
-
return HttpRequest;
|
|
44
|
+
return transport.HttpRequest;
|
|
128
45
|
}
|
|
129
46
|
getResponseType() {
|
|
130
|
-
return HttpResponse;
|
|
47
|
+
return transport.HttpResponse;
|
|
131
48
|
}
|
|
132
49
|
setSerdeContext(serdeContext) {
|
|
133
50
|
this.serdeContext = serdeContext;
|
|
@@ -259,7 +176,7 @@ class HttpBindingProtocol extends HttpProtocol {
|
|
|
259
176
|
const payloadMemberSchemas = [];
|
|
260
177
|
let hasNonHttpBindingMember = false;
|
|
261
178
|
let payload;
|
|
262
|
-
const request = new HttpRequest({
|
|
179
|
+
const request = new transport.HttpRequest({
|
|
263
180
|
protocol: "",
|
|
264
181
|
hostname: "",
|
|
265
182
|
port: undefined,
|
|
@@ -542,7 +459,7 @@ class RpcProtocol extends HttpProtocol {
|
|
|
542
459
|
const schema$1 = ns.getSchema();
|
|
543
460
|
let payload;
|
|
544
461
|
const input = _input && typeof _input === "object" ? _input : {};
|
|
545
|
-
const request = new HttpRequest({
|
|
462
|
+
const request = new transport.HttpRequest({
|
|
546
463
|
protocol: "",
|
|
547
464
|
hostname: "",
|
|
548
465
|
port: undefined,
|
|
@@ -663,7 +580,7 @@ class RequestBuilder {
|
|
|
663
580
|
for (const resolvePath of this.resolvePathStack) {
|
|
664
581
|
resolvePath(this.path);
|
|
665
582
|
}
|
|
666
|
-
return new HttpRequest({
|
|
583
|
+
return new transport.HttpRequest({
|
|
667
584
|
protocol,
|
|
668
585
|
hostname: this.hostname || hostname,
|
|
669
586
|
port,
|
|
@@ -994,11 +911,6 @@ class Fields {
|
|
|
994
911
|
}
|
|
995
912
|
}
|
|
996
913
|
|
|
997
|
-
function isValidHostname(hostname) {
|
|
998
|
-
const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
|
|
999
|
-
return hostPattern.test(hostname);
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
914
|
const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
1003
915
|
return {
|
|
1004
916
|
setHttpHandler(handler) {
|
|
@@ -1025,7 +937,7 @@ const CONTENT_LENGTH_HEADER = "content-length";
|
|
|
1025
937
|
function contentLengthMiddleware(bodyLengthChecker) {
|
|
1026
938
|
return (next) => async (args) => {
|
|
1027
939
|
const request = args.request;
|
|
1028
|
-
if (HttpRequest.isInstance(request)) {
|
|
940
|
+
if (transport.HttpRequest.isInstance(request)) {
|
|
1029
941
|
const { body, headers } = request;
|
|
1030
942
|
if (body &&
|
|
1031
943
|
Object.keys(headers)
|
|
@@ -1086,48 +998,11 @@ function buildQueryString(query) {
|
|
|
1086
998
|
return parts.join("&");
|
|
1087
999
|
}
|
|
1088
1000
|
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
let [key, value = null] = pair.split("=");
|
|
1095
|
-
key = decodeURIComponent(key);
|
|
1096
|
-
if (value) {
|
|
1097
|
-
value = decodeURIComponent(value);
|
|
1098
|
-
}
|
|
1099
|
-
if (!(key in query)) {
|
|
1100
|
-
query[key] = value;
|
|
1101
|
-
}
|
|
1102
|
-
else if (Array.isArray(query[key])) {
|
|
1103
|
-
query[key].push(value);
|
|
1104
|
-
}
|
|
1105
|
-
else {
|
|
1106
|
-
query[key] = [query[key], value];
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
return query;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
const parseUrl = (url) => {
|
|
1114
|
-
if (typeof url === "string") {
|
|
1115
|
-
return parseUrl(new URL(url));
|
|
1116
|
-
}
|
|
1117
|
-
const { hostname, pathname, port, protocol, search } = url;
|
|
1118
|
-
let query;
|
|
1119
|
-
if (search) {
|
|
1120
|
-
query = parseQueryString(search);
|
|
1121
|
-
}
|
|
1122
|
-
return {
|
|
1123
|
-
hostname,
|
|
1124
|
-
port: port ? parseInt(port) : undefined,
|
|
1125
|
-
protocol,
|
|
1126
|
-
path: pathname,
|
|
1127
|
-
query,
|
|
1128
|
-
};
|
|
1129
|
-
};
|
|
1130
|
-
|
|
1001
|
+
exports.HttpRequest = transport.HttpRequest;
|
|
1002
|
+
exports.HttpResponse = transport.HttpResponse;
|
|
1003
|
+
exports.isValidHostname = transport.isValidHostname;
|
|
1004
|
+
exports.parseQueryString = transport.parseQueryString;
|
|
1005
|
+
exports.parseUrl = transport.parseUrl;
|
|
1131
1006
|
exports.Field = Field;
|
|
1132
1007
|
exports.Fields = Fields;
|
|
1133
1008
|
exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
|
|
@@ -1135,8 +1010,6 @@ exports.HttpBindingProtocol = HttpBindingProtocol;
|
|
|
1135
1010
|
exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
|
|
1136
1011
|
exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
|
|
1137
1012
|
exports.HttpProtocol = HttpProtocol;
|
|
1138
|
-
exports.HttpRequest = HttpRequest;
|
|
1139
|
-
exports.HttpResponse = HttpResponse;
|
|
1140
1013
|
exports.RequestBuilder = RequestBuilder;
|
|
1141
1014
|
exports.RpcProtocol = RpcProtocol;
|
|
1142
1015
|
exports.SerdeContext = SerdeContext;
|
|
@@ -1151,9 +1024,6 @@ exports.escapeUriPath = escapeUriPath;
|
|
|
1151
1024
|
exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
|
|
1152
1025
|
exports.getContentLengthPlugin = getContentLengthPlugin;
|
|
1153
1026
|
exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
|
|
1154
|
-
exports.isValidHostname = isValidHostname;
|
|
1155
|
-
exports.parseQueryString = parseQueryString;
|
|
1156
|
-
exports.parseUrl = parseUrl;
|
|
1157
1027
|
exports.requestBuilder = requestBuilder;
|
|
1158
1028
|
exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
|
|
1159
1029
|
exports.resolvedPath = resolvedPath;
|