@larkup/cli 0.3.20 → 0.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.
Files changed (44) hide show
  1. package/dist/{analytics-store-4EI56OLE.js → analytics-store-6SZQ7JBE.js} +1 -1
  2. package/dist/bowser-KBMRPWZW.js +2100 -0
  3. package/dist/{chunk-CUA3FHFQ.js → chunk-3HURSQNH.js} +39 -26
  4. package/dist/{chunk-AKBEY3S4.js → chunk-4Y7OLVDR.js} +4 -4
  5. package/dist/{chunk-YOPP3ETL.js → chunk-5LXQQ3B5.js} +111 -80
  6. package/dist/{chunk-2QWAEE6L.js → chunk-5UNSW2YQ.js} +2 -2
  7. package/dist/{chunk-HYYSI5FE.js → chunk-5YXDD2GC.js} +183 -174
  8. package/dist/{chunk-ZH2A3TFQ.js → chunk-CQRTVM3R.js} +99 -1154
  9. package/dist/{chunk-54YIZOXQ.js → chunk-G4JLV4D2.js} +58 -26
  10. package/dist/chunk-G542PEOG.js +215 -0
  11. package/dist/chunk-JKTTCUZ3.js +653 -0
  12. package/dist/chunk-M4T7TRRC.js +2461 -0
  13. package/dist/chunk-MEKWGOS5.js +76 -0
  14. package/dist/{chunk-6VBJAFWY.js → chunk-MTXSOKLF.js} +97 -77
  15. package/dist/chunk-NMIRIGDS.js +1445 -0
  16. package/dist/chunk-SUBMQE2G.js +1280 -0
  17. package/dist/{chunk-SMQUSHD4.js → chunk-TBMEIDA5.js} +39 -2
  18. package/dist/{chunk-FMBWCTFV.js → chunk-TEVXZRMI.js} +1222 -87
  19. package/dist/{chunk-VZAREDRR.js → chunk-TX2W2TDD.js} +3 -3
  20. package/dist/{chunk-6HRBZ7QP.js → chunk-VMIDDBSU.js} +3 -3
  21. package/dist/{chunk-DTRGAEFR.js → chunk-YL567TPU.js} +4 -4
  22. package/dist/{dist-es-CM7567P2.js → dist-es-64SQQSB2.js} +8 -8
  23. package/dist/{dist-es-DC3KLBPR.js → dist-es-EYJKNFZZ.js} +9 -9
  24. package/dist/{dist-es-PY4YS7TC.js → dist-es-GCJ2YN2W.js} +12 -9
  25. package/dist/{dist-es-KY7QTIEX.js → dist-es-HOKTEA4H.js} +22 -22
  26. package/dist/{dist-es-ZDCXFYRX.js → dist-es-I5PEXU6M.js} +5 -5
  27. package/dist/{dist-es-IS5PH45I.js → dist-es-IBDQOMV4.js} +67 -43
  28. package/dist/{dist-es-M6OXVHSI.js → dist-es-KLJ57YTV.js} +2 -2
  29. package/dist/{dist-es-3SVFRI6P.js → dist-es-RSHHKZQR.js} +251 -237
  30. package/dist/{dist-es-OB4H2RSG.js → dist-es-SM3XZOJI.js} +10 -10
  31. package/dist/{dist-es-FEVR73CQ.js → dist-es-WKOKSFRW.js} +8 -8
  32. package/dist/{chunk-PFTSXAZG.js → event-streams-DE7Y6VJA.js} +59 -40
  33. package/dist/{event-streams-KOWL2S4G.js → event-streams-DO25HTN4.js} +2 -3
  34. package/dist/index.js +22 -27
  35. package/dist/{loadSso-OLMNBQ4H.js → loadSso-RBMT5EPI.js} +68 -62
  36. package/dist/{signin-NBTUJ5KD.js → signin-S7FYOH5Y.js} +79 -66
  37. package/dist/{sso-oidc-WNK6HQX7.js → sso-oidc-YVLODDDB.js} +71 -65
  38. package/dist/{sts-TGY2Y4DZ.js → sts-R6CUYWGQ.js} +77 -71
  39. package/dist/{tool-loader-GFMXFTMW.js → tool-loader-ZRVSMB4T.js} +2 -2
  40. package/dist/{tool-registry-K74GICK5.js → tool-registry-FLO7V4FK.js} +1 -1
  41. package/package.json +13 -13
  42. package/dist/bowser-GZLEN3PD.js +0 -2821
  43. package/dist/chunk-GYXT77I3.js +0 -515
  44. package/dist/chunk-TFGGCUFR.js +0 -126
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  buildQueryString
3
- } from "./chunk-FMBWCTFV.js";
3
+ } from "./chunk-TEVXZRMI.js";
4
4
  import {
5
5
  HttpResponse,
6
6
  hasOwn
7
- } from "./chunk-HYYSI5FE.js";
7
+ } from "./chunk-5YXDD2GC.js";
8
8
 
9
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js
9
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js
10
10
  function buildAbortError(abortSignal) {
11
11
  const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : void 0;
12
12
  if (reason) {
@@ -25,31 +25,32 @@ function buildAbortError(abortSignal) {
25
25
  return abortError;
26
26
  }
27
27
 
28
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/constants.js
28
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/constants.js
29
29
  var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
30
30
 
31
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js
31
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js
32
32
  var getTransformedHeaders = (headers) => {
33
33
  const transformedHeaders = {};
34
34
  for (const name in headers) {
35
- if (!hasOwn(headers, name))
35
+ if (!hasOwn(headers, name)) {
36
36
  continue;
37
+ }
37
38
  const headerValues = headers[name];
38
39
  transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
39
40
  }
40
41
  return transformedHeaders;
41
42
  };
42
43
 
43
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/node-https.js
44
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/node-https.js
44
45
  import node_https from "https";
45
46
 
46
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/timing.js
47
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/timing.js
47
48
  var timing = {
48
49
  setTimeout: (cb, ms) => setTimeout(cb, ms),
49
50
  clearTimeout: (timeoutId) => clearTimeout(timeoutId)
50
51
  };
51
52
 
52
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
53
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
53
54
  var DEFER_EVENT_LISTENER_TIME = 1e3;
54
55
  var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
55
56
  if (!timeoutInMs) {
@@ -84,7 +85,7 @@ var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
84
85
  return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
85
86
  };
86
87
 
87
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js
88
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js
88
89
  var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
89
90
  if (timeoutInMs) {
90
91
  return timing.setTimeout(() => {
@@ -105,7 +106,7 @@ var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, lo
105
106
  return -1;
106
107
  };
107
108
 
108
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js
109
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js
109
110
  var DEFER_EVENT_LISTENER_TIME2 = 3e3;
110
111
  var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {
111
112
  if (keepAlive !== true) {
@@ -127,14 +128,28 @@ var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs =
127
128
  return timing.setTimeout(registerListener, deferTimeMs);
128
129
  };
129
130
 
130
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js
131
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js
132
+ var resolveDefaultSocketTimeout = (config) => {
133
+ const value = config?.defaultSocketTimeout;
134
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
135
+ };
136
+
137
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js
131
138
  var DEFER_EVENT_LISTENER_TIME3 = 3e3;
132
- var setSocketTimeout = (request, reject, timeoutInMs = 0) => {
139
+ var setSocketTimeout = (request, reject, timeoutInMs = 0, destroyResponseBodyOnTimeout = false) => {
140
+ let response;
141
+ if (destroyResponseBodyOnTimeout) {
142
+ request.once("response", (res) => response = res);
143
+ }
133
144
  const registerTimeout = (offset) => {
134
145
  const timeout = timeoutInMs - offset;
135
146
  const onTimeout = () => {
147
+ const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${destroyResponseBodyOnTimeout ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
148
+ if (destroyResponseBodyOnTimeout) {
149
+ response?.destroy(error);
150
+ }
136
151
  request.destroy();
137
- reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
152
+ reject(error);
138
153
  };
139
154
  if (request.socket) {
140
155
  request.socket.setTimeout(timeout, onTimeout);
@@ -147,10 +162,15 @@ var setSocketTimeout = (request, reject, timeoutInMs = 0) => {
147
162
  registerTimeout(0);
148
163
  return 0;
149
164
  }
150
- return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), DEFER_EVENT_LISTENER_TIME3);
165
+ const deferralId = timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3), DEFER_EVENT_LISTENER_TIME3);
166
+ if (destroyResponseBodyOnTimeout) {
167
+ request.once("close", () => timing.clearTimeout(deferralId));
168
+ return 0;
169
+ }
170
+ return deferralId;
151
171
  };
152
172
 
153
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js
173
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js
154
174
  import { Readable } from "stream";
155
175
  var MIN_WAIT_TIME = 6e3;
156
176
  async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
@@ -210,7 +230,7 @@ function writeBody(httpRequest, body) {
210
230
  httpRequest.end();
211
231
  }
212
232
 
213
- // ../../node_modules/.pnpm/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js
233
+ // ../../node_modules/.pnpm/@smithy+node-http-handler@4.14.1/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js
214
234
  var hAgent = void 0;
215
235
  var hRequest = void 0;
216
236
  var NodeHttpHandler = class _NodeHttpHandler {
@@ -236,8 +256,9 @@ var NodeHttpHandler = class _NodeHttpHandler {
236
256
  }
237
257
  if (sockets && requests) {
238
258
  for (const origin in sockets) {
239
- if (!hasOwn(sockets, origin))
259
+ if (!hasOwn(sockets, origin)) {
240
260
  continue;
261
+ }
241
262
  const socketsInUse = sockets[origin]?.length ?? 0;
242
263
  const requestsEnqueued = requests[origin]?.length ?? 0;
243
264
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
@@ -379,7 +400,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
379
400
  const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
380
401
  connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
381
402
  requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger ?? console);
382
- socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
403
+ const defaultSocketTimeout = config.socketTimeout === void 0 ? resolveDefaultSocketTimeout(config) : void 0;
404
+ if (defaultSocketTimeout) {
405
+ socketTimeoutId = setSocketTimeout(req, reject, defaultSocketTimeout, true);
406
+ } else {
407
+ socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
408
+ }
383
409
  const httpAgent = nodeHttpsOptions.agent;
384
410
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
385
411
  keepAliveTimeoutId = setSocketKeepAlive(req, {
@@ -396,11 +422,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
396
422
  updateHttpClientConfig(key, value) {
397
423
  this.config = void 0;
398
424
  this.configProvider = this.configProvider.then((config) => {
399
- if (key === Symbol.for("logger")) {
400
- return {
401
- ...config,
402
- logger: config.logger ?? value
403
- };
425
+ switch (key) {
426
+ case Symbol.for("logger"):
427
+ key = "logger";
428
+ value = config.logger ?? value;
429
+ break;
430
+ case Symbol.for("@smithy/defaultSocketTimeout"):
431
+ key = "defaultSocketTimeout";
432
+ value = resolveDefaultSocketTimeout(config) ?? value;
433
+ break;
404
434
  }
405
435
  return {
406
436
  ...config,
@@ -415,13 +445,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
415
445
  const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger } = options || {};
416
446
  const keepAlive = true;
417
447
  const maxSockets = 50;
448
+ let httpAgentPromise;
418
449
  return {
419
450
  connectionTimeout,
420
451
  requestTimeout,
421
452
  socketTimeout,
453
+ defaultSocketTimeout: resolveDefaultSocketTimeout(options),
422
454
  socketAcquisitionWarningTimeout,
423
455
  throwOnRequestTimeout,
424
- httpAgentProvider: async () => {
456
+ httpAgentProvider: () => httpAgentPromise ??= (async () => {
425
457
  const node_http = await import("http");
426
458
  const { Agent, request } = node_http.default ?? node_http;
427
459
  hRequest = request;
@@ -431,7 +463,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
431
463
  return httpAgent;
432
464
  }
433
465
  return new hAgent({ keepAlive, maxSockets, ...httpAgent });
434
- },
466
+ })(),
435
467
  httpsAgent: (() => {
436
468
  if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
437
469
  this.externalAgent = true;
@@ -0,0 +1,215 @@
1
+ // ../../node_modules/.pnpm/@smithy+types@4.20.0/node_modules/@smithy/types/dist-es/extensions/checksum.js
2
+ var AlgorithmId;
3
+ (function(AlgorithmId2) {
4
+ AlgorithmId2["MD5"] = "md5";
5
+ AlgorithmId2["CRC32"] = "crc32";
6
+ AlgorithmId2["CRC32C"] = "crc32c";
7
+ AlgorithmId2["SHA1"] = "sha1";
8
+ AlgorithmId2["SHA256"] = "sha256";
9
+ })(AlgorithmId || (AlgorithmId = {}));
10
+
11
+ // ../../node_modules/.pnpm/@smithy+types@4.20.0/node_modules/@smithy/types/dist-es/middleware.js
12
+ var SMITHY_CONTEXT_KEY = "__smithy_context";
13
+
14
+ // ../../node_modules/.pnpm/@smithy+types@4.20.0/node_modules/@smithy/types/dist-es/endpoint.js
15
+ var EndpointURLScheme;
16
+ (function(EndpointURLScheme2) {
17
+ EndpointURLScheme2["HTTP"] = "http";
18
+ EndpointURLScheme2["HTTPS"] = "https";
19
+ })(EndpointURLScheme || (EndpointURLScheme = {}));
20
+
21
+ // ../../node_modules/.pnpm/@smithy+types@4.20.0/node_modules/@smithy/types/dist-es/profile.js
22
+ var IniSectionType;
23
+ (function(IniSectionType2) {
24
+ IniSectionType2["PROFILE"] = "profile";
25
+ IniSectionType2["SSO_SESSION"] = "sso-session";
26
+ IniSectionType2["SERVICES"] = "services";
27
+ })(IniSectionType || (IniSectionType = {}));
28
+
29
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
30
+ var getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});
31
+
32
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js
33
+ function hasOwn(o, k) {
34
+ return Object.prototype.hasOwnProperty.call(o, k);
35
+ }
36
+
37
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js
38
+ var normalizeProvider = (input) => {
39
+ if (typeof input === "function") {
40
+ return input;
41
+ }
42
+ const promisified = Promise.resolve(input);
43
+ return () => promisified;
44
+ };
45
+
46
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
47
+ var HttpRequest = class _HttpRequest {
48
+ method;
49
+ protocol;
50
+ hostname;
51
+ port;
52
+ path;
53
+ query;
54
+ headers;
55
+ username;
56
+ password;
57
+ fragment;
58
+ body;
59
+ constructor(options) {
60
+ this.method = options.method || "GET";
61
+ this.hostname = options.hostname || "localhost";
62
+ this.port = options.port;
63
+ this.query = options.query || {};
64
+ this.headers = options.headers || {};
65
+ this.body = options.body;
66
+ this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
67
+ this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
68
+ this.username = options.username;
69
+ this.password = options.password;
70
+ this.fragment = options.fragment;
71
+ }
72
+ static clone(request) {
73
+ const cloned = new _HttpRequest({
74
+ ...request,
75
+ headers: { ...request.headers }
76
+ });
77
+ if (cloned.query) {
78
+ cloned.query = cloneQuery(cloned.query);
79
+ }
80
+ return cloned;
81
+ }
82
+ static isInstance(request) {
83
+ if (!request) {
84
+ return false;
85
+ }
86
+ const req = request;
87
+ return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
88
+ }
89
+ clone() {
90
+ return _HttpRequest.clone(this);
91
+ }
92
+ };
93
+ function cloneQuery(query) {
94
+ return Object.keys(query).reduce((carry, paramName) => {
95
+ const param = query[paramName];
96
+ return {
97
+ ...carry,
98
+ [paramName]: Array.isArray(param) ? [...param] : param
99
+ };
100
+ }, {});
101
+ }
102
+
103
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
104
+ var HttpResponse = class {
105
+ statusCode;
106
+ reason;
107
+ headers;
108
+ body;
109
+ constructor(options) {
110
+ this.statusCode = options.statusCode;
111
+ this.reason = options.reason;
112
+ this.headers = options.headers || {};
113
+ this.body = options.body;
114
+ }
115
+ static isInstance(response) {
116
+ if (!response) {
117
+ return false;
118
+ }
119
+ const resp = response;
120
+ return typeof resp.statusCode === "number" && typeof resp.headers === "object";
121
+ }
122
+ };
123
+
124
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/isValidHostLabel.js
125
+ var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
126
+ var isValidHostLabel = (value, allowSubDomains = false) => {
127
+ if (!allowSubDomains) {
128
+ return VALID_HOST_LABEL_REGEX.test(value);
129
+ }
130
+ const labels = value.split(".");
131
+ for (const label of labels) {
132
+ if (!isValidHostLabel(label)) {
133
+ return false;
134
+ }
135
+ }
136
+ return true;
137
+ };
138
+
139
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
140
+ function parseQueryString(querystring) {
141
+ const query = {};
142
+ querystring = querystring.replace(/^\?/, "");
143
+ if (querystring) {
144
+ for (const pair of querystring.split("&")) {
145
+ let [key, value = null] = pair.split("=");
146
+ key = decodeURIComponent(key);
147
+ if (value) {
148
+ value = decodeURIComponent(value);
149
+ }
150
+ if (!(key in query)) {
151
+ query[key] = value;
152
+ } else if (Array.isArray(query[key])) {
153
+ query[key].push(value);
154
+ } else {
155
+ query[key] = [query[key], value];
156
+ }
157
+ }
158
+ }
159
+ return query;
160
+ }
161
+
162
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
163
+ var parseUrl = (url) => {
164
+ if (typeof url === "string") {
165
+ return parseUrl(new URL(url));
166
+ }
167
+ const { hostname, pathname, port, protocol, search } = url;
168
+ let query;
169
+ if (search) {
170
+ query = parseQueryString(search);
171
+ }
172
+ return {
173
+ hostname,
174
+ port: port ? parseInt(port) : void 0,
175
+ protocol,
176
+ path: pathname,
177
+ query
178
+ };
179
+ };
180
+
181
+ // ../../node_modules/.pnpm/@smithy+core@3.39.0/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
182
+ var toEndpointV1 = (endpoint) => {
183
+ if (typeof endpoint === "object") {
184
+ if ("url" in endpoint) {
185
+ const v1Endpoint = parseUrl(endpoint.url);
186
+ if (endpoint.headers) {
187
+ v1Endpoint.headers = {};
188
+ for (const name in endpoint.headers) {
189
+ if (!hasOwn(endpoint.headers, name)) {
190
+ continue;
191
+ }
192
+ v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
193
+ }
194
+ }
195
+ return v1Endpoint;
196
+ }
197
+ return endpoint;
198
+ }
199
+ return parseUrl(endpoint);
200
+ };
201
+
202
+ export {
203
+ EndpointURLScheme,
204
+ AlgorithmId,
205
+ SMITHY_CONTEXT_KEY,
206
+ IniSectionType,
207
+ getSmithyContext,
208
+ hasOwn,
209
+ HttpRequest,
210
+ HttpResponse,
211
+ isValidHostLabel,
212
+ normalizeProvider,
213
+ parseUrl,
214
+ toEndpointV1
215
+ };