diff --git a/bun.lockb b/bun.lockb
index 9342af7..d735b06 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index f6c9732..25aed8b 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.499.0",
"axios": "^1.7.2",
- "pino": "^8.17.2",
+ "pino": "^10.0.0",
"sharp": "^0.33.2"
},
"main": "lib/index.js",
diff --git a/terraform/bin/index.js b/terraform/bin/index.js
index 12cb812..17fa24d 100644
--- a/terraform/bin/index.js
+++ b/terraform/bin/index.js
@@ -27,7 +27,7 @@ var __export = (target, all) => {
};
var __require = createRequire(import.meta.url);
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/r
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submod
var require_err_helpers = __commonJS((exports, module) => {
var isErrorLike = (err) => {
return err && typeof err.message === "string";
@@ -84,7 +84,7 @@ var require_err_helpers = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
var require_err_proto = __commonJS((exports, module) => {
var seen = Symbol("circular-ref-tag");
var rawSymbol = Symbol("pino-raw-err-ref");
@@ -114,8 +114,8 @@ var require_err_proto = __commonJS((exports, module) => {
get: function() {
return this[rawSymbol];
},
- set: function(val2) {
- this[rawSymbol] = val2;
+ set: function(val) {
+ this[rawSymbol] = val;
}
}
});
@@ -132,7 +132,7 @@ var require_err_proto = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
var require_err = __commonJS((exports, module) => {
var errSerializer = function(err) {
if (!isErrorLike(err)) {
@@ -148,13 +148,13 @@ var require_err = __commonJS((exports, module) => {
}
for (const key in err) {
if (_err[key] === undefined) {
- const val2 = err[key];
- if (isErrorLike(val2)) {
- if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val2, seen)) {
- _err[key] = errSerializer(val2);
+ const val = err[key];
+ if (isErrorLike(val)) {
+ if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) {
+ _err[key] = errSerializer(val);
}
} else {
- _err[key] = val2;
+ _err[key] = val;
}
}
}
@@ -169,7 +169,7 @@ var require_err = __commonJS((exports, module) => {
var { toString } = Object.prototype;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
var require_err_with_cause = __commonJS((exports, module) => {
var errWithCauseSerializer = function(err) {
if (!isErrorLike(err)) {
@@ -188,13 +188,13 @@ var require_err_with_cause = __commonJS((exports, module) => {
}
for (const key in err) {
if (_err[key] === undefined) {
- const val2 = err[key];
- if (isErrorLike(val2)) {
- if (!Object.prototype.hasOwnProperty.call(val2, seen)) {
- _err[key] = errWithCauseSerializer(val2);
+ const val = err[key];
+ if (isErrorLike(val)) {
+ if (!Object.prototype.hasOwnProperty.call(val, seen)) {
+ _err[key] = errWithCauseSerializer(val);
}
} else {
- _err[key] = val2;
+ _err[key] = val;
}
}
}
@@ -209,7 +209,7 @@ var require_err_with_cause = __commonJS((exports, module) => {
var { toString } = Object.prototype;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
var require_req = __commonJS((exports, module) => {
var reqSerializer = function(req) {
const connection = req.info || req.socket;
@@ -290,8 +290,8 @@ var require_req = __commonJS((exports, module) => {
get: function() {
return this[rawSymbol];
},
- set: function(val2) {
- this[rawSymbol] = val2;
+ set: function(val) {
+ this[rawSymbol] = val;
}
}
});
@@ -301,7 +301,7 @@ var require_req = __commonJS((exports, module) => {
});
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
var require_res = __commonJS((exports, module) => {
var resSerializer = function(res) {
const _res = Object.create(pinoResProto);
@@ -336,8 +336,8 @@ var require_res = __commonJS((exports, module) => {
get: function() {
return this[rawSymbol];
},
- set: function(val2) {
- this[rawSymbol] = val2;
+ set: function(val) {
+ this[rawSymbol] = val;
}
}
});
@@ -347,7 +347,7 @@ var require_res = __commonJS((exports, module) => {
});
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/
+// node_modules/@aws-sdk/nested-clients/dist-
var require_pino_std_serializers = __commonJS((exports, module) => {
var errSerializer = require_err();
var errWithCauseSerializer = require_err_with_cause();
@@ -384,7 +384,7 @@ var require_pino_std_serializers = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-ss
+// node_modules/@aws-sdk/nested-cl
var require_caller = __commonJS((exports, module) => {
var noOpPrepareStackTrace = function(_, stack) {
return stack;
@@ -409,524 +409,439 @@ var require_caller = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-cjs
-var require_validator = __commonJS((exports, module) => {
- var validator = function(opts = {}) {
- const {
- ERR_PATHS_MUST_BE_STRINGS = () => "fast-redact - Paths must be (non-empty) strings",
- ERR_INVALID_PATH = (s) => `fast-redact \u2013 Invalid path (${s})`
- } = opts;
- return function validate({ paths }) {
- paths.forEach((s) => {
- if (typeof s !== "string") {
- throw Error(ERR_PATHS_MUST_BE_STRINGS());
- }
- try {
- if (/〇/.test(s))
- throw Error();
- const expr = (s[0] === "[" ? "" : ".") + s.replace(/^\*/, "\u3007").replace(/\.\*/g, ".\u3007").replace(/\[\*\]/g, "[\u3007]");
- if (/\n|\r|;/.test(expr))
- throw Error();
- if (/\/\*/.test(expr))
- throw Error();
- Function(`
- 'use strict'
- const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
- const \u3007 = null;
- o${expr}
- if ([o${expr}].length !== 1) throw Error()`)();
- } catch (e) {
- throw Error(ERR_INVALID_PATH(s));
+// node_modules/@aws-sdk/nested-clie
+var require_slow_redact = __commonJS((exports, module) => {
+ var deepClone = function(obj) {
+ if (obj === null || typeof obj !== "object") {
+ return obj;
+ }
+ if (obj instanceof Date) {
+ return new Date(obj.getTime());
+ }
+ if (obj instanceof Array) {
+ const cloned = [];
+ for (let i = 0;i < obj.length; i++) {
+ cloned[i] = deepClone(obj[i]);
+ }
+ return cloned;
+ }
+ if (typeof obj === "object") {
+ const cloned = Object.create(Object.getPrototypeOf(obj));
+ for (const key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ cloned[key] = deepClone(obj[key]);
}
- });
- };
- };
- module.exports = validator;
-});
-
-// node_modules/@aws-sdk/client-sso/d
-var require_rx = __commonJS((exports, module) => {
- module.exports = /[^.[\]]+|\[((?:.)*?)\]/g;
-});
-
-// node_modules/@aws-sdk/client-sso/dist
-var require_parse = __commonJS((exports, module) => {
- var parse = function({ paths }) {
- const wildcards = [];
- var wcLen = 0;
- const secret = paths.reduce(function(o, strPath, ix) {
- var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, ""));
- const leadingBracket = strPath[0] === "[";
- path = path.map((p) => {
- if (p[0] === "[")
- return p.substr(1, p.length - 2);
- else
- return p;
- });
- const star = path.indexOf("*");
- if (star > -1) {
- const before = path.slice(0, star);
- const beforeStr = before.join(".");
- const after = path.slice(star + 1, path.length);
- const nested = after.length > 0;
- wcLen++;
- wildcards.push({
- before,
- beforeStr,
- after,
- nested
- });
- } else {
- o[strPath] = {
- path,
- val: undefined,
- precensored: false,
- circle: "",
- escPath: JSON.stringify(strPath),
- leadingBracket
- };
}
- return o;
- }, {});
- return { wildcards, wcLen, secret };
- };
- var rx = require_rx();
- module.exports = parse;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cj
-var require_redactor = __commonJS((exports, module) => {
- var redactor = function({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) {
- const redact = Function("o", `
- if (typeof o !== 'object' || o == null) {
- ${strictImpl(strict, serialize)}
- }
- const { censor, secret } = this
- ${redactTmpl(secret, isCensorFct, censorFctTakesPath)}
- this.compileRestore()
- ${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)}
- ${resultTmpl(serialize)}
- `).bind(state);
- if (serialize === false) {
- redact.restore = (o) => state.restore(o);
- }
- return redact;
- };
- var redactTmpl = function(secret, isCensorFct, censorFctTakesPath) {
- return Object.keys(secret).map((path) => {
- const { escPath, leadingBracket, path: arrPath } = secret[path];
- const skip = leadingBracket ? 1 : 0;
- const delim = leadingBracket ? "" : ".";
- const hops = [];
- var match;
- while ((match = rx.exec(path)) !== null) {
- const [, ix] = match;
- const { index, input } = match;
- if (index > skip)
- hops.push(input.substring(0, index - (ix ? 0 : 1)));
- }
- var existence = hops.map((p) => `o${delim}${p}`).join(" && ");
- if (existence.length === 0)
- existence += `o${delim}${path} != null`;
- else
- existence += ` && o${delim}${path} != null`;
- const circularDetection = `
- switch (true) {
- ${hops.reverse().map((p) => `
- case o${delim}${p} === censor:
- secret[${escPath}].circle = ${JSON.stringify(p)}
- break
- `).join("\n")}
- }
- `;
- const censorArgs = censorFctTakesPath ? `val, ${JSON.stringify(arrPath)}` : `val`;
- return `
- if (${existence}) {
- const val = o${delim}${path}
- if (val === censor) {
- secret[${escPath}].precensored = true
+ return cloned;
+ }
+ return obj;
+ };
+ var parsePath = function(path) {
+ const parts = [];
+ let current = "";
+ let inBrackets = false;
+ let inQuotes = false;
+ let quoteChar = "";
+ for (let i = 0;i < path.length; i++) {
+ const char = path[i];
+ if (!inBrackets && char === ".") {
+ if (current) {
+ parts.push(current);
+ current = "";
+ }
+ } else if (char === "[") {
+ if (current) {
+ parts.push(current);
+ current = "";
+ }
+ inBrackets = true;
+ } else if (char === "]" && inBrackets) {
+ parts.push(current);
+ current = "";
+ inBrackets = false;
+ inQuotes = false;
+ } else if ((char === '"' || char === "'") && inBrackets) {
+ if (!inQuotes) {
+ inQuotes = true;
+ quoteChar = char;
+ } else if (char === quoteChar) {
+ inQuotes = false;
+ quoteChar = "";
} else {
- secret[${escPath}].val = val
- o${delim}${path} = ${isCensorFct ? `censor(${censorArgs})` : "censor"}
- ${circularDetection}
+ current += char;
}
+ } else {
+ current += char;
}
- `;
- }).join("\n");
+ }
+ if (current) {
+ parts.push(current);
+ }
+ return parts;
};
- var dynamicRedactTmpl = function(hasWildcards, isCensorFct, censorFctTakesPath) {
- return hasWildcards === true ? `
- {
- const { wildcards, wcLen, groupRedact, nestedRedact } = this
- for (var i = 0; i < wcLen; i++) {
- const { before, beforeStr, after, nested } = wildcards[i]
- if (nested === true) {
- secret[beforeStr] = secret[beforeStr] || []
- nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath})
- } else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath})
+ var setValue = function(obj, parts, value) {
+ let current = obj;
+ for (let i = 0;i < parts.length - 1; i++) {
+ const key = parts[i];
+ if (typeof current !== "object" || current === null || !(key in current)) {
+ return false;
+ }
+ if (typeof current[key] !== "object" || current[key] === null) {
+ return false;
+ }
+ current = current[key];
+ }
+ const lastKey = parts[parts.length - 1];
+ if (lastKey === "*") {
+ if (Array.isArray(current)) {
+ for (let i = 0;i < current.length; i++) {
+ current[i] = value;
+ }
+ } else if (typeof current === "object" && current !== null) {
+ for (const key in current) {
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
+ current[key] = value;
+ }
+ }
+ }
+ } else {
+ if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
+ current[lastKey] = value;
}
}
- ` : "";
+ return true;
};
- var resultTmpl = function(serialize) {
- return serialize === false ? `return o` : `
- var s = this.serialize(o)
- this.restore(o)
- return s
- `;
+ var removeKey = function(obj, parts) {
+ let current = obj;
+ for (let i = 0;i < parts.length - 1; i++) {
+ const key = parts[i];
+ if (typeof current !== "object" || current === null || !(key in current)) {
+ return false;
+ }
+ if (typeof current[key] !== "object" || current[key] === null) {
+ return false;
+ }
+ current = current[key];
+ }
+ const lastKey = parts[parts.length - 1];
+ if (lastKey === "*") {
+ if (Array.isArray(current)) {
+ for (let i = 0;i < current.length; i++) {
+ current[i] = undefined;
+ }
+ } else if (typeof current === "object" && current !== null) {
+ for (const key in current) {
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
+ delete current[key];
+ }
+ }
+ }
+ } else {
+ if (typeof current === "object" && current !== null && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) {
+ delete current[lastKey];
+ }
+ }
+ return true;
};
- var strictImpl = function(strict, serialize) {
- return strict === true ? `throw Error('fast-redact: primitives cannot be redacted')` : serialize === false ? `return o` : `return this.serialize(o)`;
+ var getValueIfExists = function(obj, parts) {
+ let current = obj;
+ for (const part of parts) {
+ if (current === null || current === undefined) {
+ return PATH_NOT_FOUND;
+ }
+ if (typeof current !== "object" || current === null) {
+ return PATH_NOT_FOUND;
+ }
+ if (!(part in current)) {
+ return PATH_NOT_FOUND;
+ }
+ current = current[part];
+ }
+ return current;
};
- var rx = require_rx();
- module.exports = redactor;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs
-var require_modifiers = __commonJS((exports, module) => {
- var groupRestore = function({ keys, values, target }) {
- if (target == null)
- return;
- const length = keys.length;
- for (var i = 0;i < length; i++) {
- const k = keys[i];
- target[k] = values[i];
- }
- };
- var groupRedact = function(o, path, censor, isCensorFct, censorFctTakesPath) {
- const target = get(o, path);
- if (target == null)
- return { keys: null, values: null, target: null, flat: true };
- const keys = Object.keys(target);
- const keysLength = keys.length;
- const pathLength = path.length;
- const pathWithKey = censorFctTakesPath ? [...path] : undefined;
- const values = new Array(keysLength);
- for (var i = 0;i < keysLength; i++) {
- const key = keys[i];
- values[i] = target[key];
- if (censorFctTakesPath) {
- pathWithKey[pathLength] = key;
- target[key] = censor(target[key], pathWithKey);
- } else if (isCensorFct) {
- target[key] = censor(target[key]);
- } else {
- target[key] = censor;
+ var getValue = function(obj, parts) {
+ let current = obj;
+ for (const part of parts) {
+ if (current === null || current === undefined) {
+ return;
+ }
+ if (typeof current !== "object" || current === null) {
+ return;
}
+ current = current[part];
}
- return { keys, values, target, flat: true };
+ return current;
};
- var nestedRestore = function(instructions) {
- for (let i = 0;i < instructions.length; i++) {
- const { target, path, value } = instructions[i];
- let current = target;
- for (let i2 = path.length - 1;i2 > 0; i2--) {
- current = current[path[i2]];
+ var redactPaths = function(obj, paths, censor, remove = false) {
+ for (const path of paths) {
+ const parts = parsePath(path);
+ if (parts.includes("*")) {
+ redactWildcardPath(obj, parts, censor, path, remove);
+ } else {
+ if (remove) {
+ removeKey(obj, parts);
+ } else {
+ const value = getValueIfExists(obj, parts);
+ if (value === PATH_NOT_FOUND) {
+ continue;
+ }
+ const actualCensor = typeof censor === "function" ? censor(value, parts) : censor;
+ setValue(obj, parts, actualCensor);
+ }
}
- current[path[0]] = value;
}
};
- var nestedRedact = function(store, o, path, ns, censor, isCensorFct, censorFctTakesPath) {
- const target = get(o, path);
- if (target == null)
- return;
- const keys = Object.keys(target);
- const keysLength = keys.length;
- for (var i = 0;i < keysLength; i++) {
- const key = keys[i];
- specialSet(store, target, key, path, ns, censor, isCensorFct, censorFctTakesPath);
- }
- return store;
- };
- var has = function(obj, prop) {
- return obj !== undefined && obj !== null ? "hasOwn" in Object ? Object.hasOwn(obj, prop) : Object.prototype.hasOwnProperty.call(obj, prop) : false;
- };
- var specialSet = function(store, o, k, path, afterPath, censor, isCensorFct, censorFctTakesPath) {
- const afterPathLen = afterPath.length;
- const lastPathIndex = afterPathLen - 1;
- const originalKey = k;
- var i = -1;
- var n;
- var nv;
- var ov;
- var oov = null;
- var wc = null;
- var kIsWc;
- var wcov;
- var consecutive = false;
- var level = 0;
- var depth = 0;
- var redactPathCurrent = tree();
- ov = n = o[k];
- if (typeof n !== "object")
- return;
- while (n != null && ++i < afterPathLen) {
- depth += 1;
- k = afterPath[i];
- oov = ov;
- if (k !== "*" && !wc && !(typeof n === "object" && (k in n))) {
- break;
+ var redactWildcardPath = function(obj, parts, censor, originalPath, remove = false) {
+ const wildcardIndex = parts.indexOf("*");
+ if (wildcardIndex === parts.length - 1) {
+ const parentParts = parts.slice(0, -1);
+ let current = obj;
+ for (const part of parentParts) {
+ if (current === null || current === undefined)
+ return;
+ if (typeof current !== "object" || current === null)
+ return;
+ current = current[part];
}
- if (k === "*") {
- if (wc === "*") {
- consecutive = true;
+ if (Array.isArray(current)) {
+ if (remove) {
+ for (let i = 0;i < current.length; i++) {
+ current[i] = undefined;
+ }
+ } else {
+ for (let i = 0;i < current.length; i++) {
+ const indexPath = [...parentParts, i.toString()];
+ const actualCensor = typeof censor === "function" ? censor(current[i], indexPath) : censor;
+ current[i] = actualCensor;
+ }
}
- wc = k;
- if (i !== lastPathIndex) {
- continue;
+ } else if (typeof current === "object" && current !== null) {
+ if (remove) {
+ const keysToDelete = [];
+ for (const key in current) {
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
+ keysToDelete.push(key);
+ }
+ }
+ for (const key of keysToDelete) {
+ delete current[key];
+ }
+ } else {
+ for (const key in current) {
+ const keyPath = [...parentParts, key];
+ const actualCensor = typeof censor === "function" ? censor(current[key], keyPath) : censor;
+ current[key] = actualCensor;
+ }
}
}
- if (wc) {
- const wcKeys = Object.keys(n);
- for (var j = 0;j < wcKeys.length; j++) {
- const wck = wcKeys[j];
- wcov = n[wck];
- kIsWc = k === "*";
- if (consecutive) {
- redactPathCurrent = node(redactPathCurrent, wck, depth);
- level = i;
- ov = iterateNthLevel(wcov, level - 1, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, o[originalKey], depth + 1);
- } else {
- if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) {
- if (kIsWc) {
- ov = wcov;
- } else {
- ov = wcov[k];
- }
- nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path, originalKey, ...afterPath]) : censor(ov) : censor;
- if (kIsWc) {
- const rv = restoreInstr(node(redactPathCurrent, wck, depth), ov, o[originalKey]);
- store.push(rv);
- n[wck] = nv;
- } else {
- if (wcov[k] === nv) {
- } else if (nv === undefined && censor !== undefined || has(wcov, k) && nv === ov) {
- redactPathCurrent = node(redactPathCurrent, wck, depth);
- } else {
- redactPathCurrent = node(redactPathCurrent, wck, depth);
- const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, o[originalKey]);
- store.push(rv);
- wcov[k] = nv;
- }
- }
- }
+ } else {
+ redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
+ }
+ };
+ var redactIntermediateWildcard = function(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
+ const beforeWildcard = parts.slice(0, wildcardIndex);
+ const afterWildcard = parts.slice(wildcardIndex + 1);
+ const pathArray = [];
+ function traverse(current, pathLength) {
+ if (pathLength === beforeWildcard.length) {
+ if (Array.isArray(current)) {
+ for (let i = 0;i < current.length; i++) {
+ pathArray[pathLength] = i.toString();
+ traverse(current[i], pathLength + 1);
+ }
+ } else if (typeof current === "object" && current !== null) {
+ for (const key in current) {
+ pathArray[pathLength] = key;
+ traverse(current[key], pathLength + 1);
}
}
- wc = null;
+ } else if (pathLength < beforeWildcard.length) {
+ const nextKey = beforeWildcard[pathLength];
+ if (current && typeof current === "object" && current !== null && nextKey in current) {
+ pathArray[pathLength] = nextKey;
+ traverse(current[nextKey], pathLength + 1);
+ }
} else {
- ov = n[k];
- redactPathCurrent = node(redactPathCurrent, k, depth);
- nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path, originalKey, ...afterPath]) : censor(ov) : censor;
- if (has(n, k) && nv === ov || nv === undefined && censor !== undefined) {
+ if (remove) {
+ removeKey(current, afterWildcard);
} else {
- const rv = restoreInstr(redactPathCurrent, ov, o[originalKey]);
- store.push(rv);
- n[k] = nv;
+ const fullPath = [...pathArray.slice(0, pathLength), ...afterWildcard];
+ const actualCensor = typeof censor === "function" ? censor(getValue(current, afterWildcard), fullPath) : censor;
+ setValue(current, afterWildcard, actualCensor);
}
- n = n[k];
}
- if (typeof n !== "object")
- break;
- if (ov === oov || typeof ov === "undefined") {
+ }
+ if (beforeWildcard.length === 0) {
+ traverse(obj, 0);
+ } else {
+ let current = obj;
+ for (let i = 0;i < beforeWildcard.length; i++) {
+ const part = beforeWildcard[i];
+ if (current === null || current === undefined)
+ return;
+ if (typeof current !== "object" || current === null)
+ return;
+ current = current[part];
+ pathArray[i] = part;
+ }
+ if (current !== null && current !== undefined) {
+ traverse(current, beforeWildcard.length);
}
}
};
- var get = function(o, p) {
- var i = -1;
- var l = p.length;
- var n = o;
- while (n != null && ++i < l) {
- n = n[p[i]];
+ var buildPathStructure = function(pathsToClone) {
+ if (pathsToClone.length === 0) {
+ return null;
}
- return n;
+ const pathStructure = new Map;
+ for (const path of pathsToClone) {
+ const parts = parsePath(path);
+ let current = pathStructure;
+ for (let i = 0;i < parts.length; i++) {
+ const part = parts[i];
+ if (!current.has(part)) {
+ current.set(part, new Map);
+ }
+ current = current.get(part);
+ }
+ }
+ return pathStructure;
};
- var iterateNthLevel = function(wcov, level, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth) {
- if (level === 0) {
- if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) {
- if (kIsWc) {
- ov = wcov;
- } else {
- ov = wcov[k];
+ var selectiveClone = function(obj, pathStructure) {
+ if (!pathStructure) {
+ return obj;
+ }
+ function cloneSelectively(source, pathMap, depth = 0) {
+ if (!pathMap || pathMap.size === 0) {
+ return source;
+ }
+ if (source === null || typeof source !== "object") {
+ return source;
+ }
+ if (source instanceof Date) {
+ return new Date(source.getTime());
+ }
+ if (Array.isArray(source)) {
+ const cloned2 = [];
+ for (let i = 0;i < source.length; i++) {
+ const indexStr = i.toString();
+ if (pathMap.has(indexStr) || pathMap.has("*")) {
+ cloned2[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get("*"));
+ } else {
+ cloned2[i] = source[i];
+ }
}
- nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path, originalKey, ...afterPath]) : censor(ov) : censor;
- if (kIsWc) {
- const rv = restoreInstr(redactPathCurrent, ov, parent);
- store.push(rv);
- n[wck] = nv;
- } else {
- if (wcov[k] === nv) {
- } else if (nv === undefined && censor !== undefined || has(wcov, k) && nv === ov) {
+ return cloned2;
+ }
+ const cloned = Object.create(Object.getPrototypeOf(source));
+ for (const key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ if (pathMap.has(key) || pathMap.has("*")) {
+ cloned[key] = cloneSelectively(source[key], pathMap.get(key) || pathMap.get("*"));
} else {
- const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, parent);
- store.push(rv);
- wcov[k] = nv;
+ cloned[key] = source[key];
}
}
}
+ return cloned;
+ }
+ return cloneSelectively(obj, pathStructure);
+ };
+ var validatePath = function(path) {
+ if (typeof path !== "string") {
+ throw new Error("Paths must be (non-empty) strings");
+ }
+ if (path === "") {
+ throw new Error("Invalid redaction path ()");
+ }
+ if (path.includes("..")) {
+ throw new Error(`Invalid redaction path (${path})`);
}
- for (const key in wcov) {
- if (typeof wcov[key] === "object") {
- redactPathCurrent = node(redactPathCurrent, key, depth);
- iterateNthLevel(wcov[key], level - 1, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth + 1);
+ if (path.includes(",")) {
+ throw new Error(`Invalid redaction path (${path})`);
+ }
+ let bracketCount = 0;
+ let inQuotes = false;
+ let quoteChar = "";
+ for (let i = 0;i < path.length; i++) {
+ const char = path[i];
+ if ((char === '"' || char === "'") && bracketCount > 0) {
+ if (!inQuotes) {
+ inQuotes = true;
+ quoteChar = char;
+ } else if (char === quoteChar) {
+ inQuotes = false;
+ quoteChar = "";
+ }
+ } else if (char === "[" && !inQuotes) {
+ bracketCount++;
+ } else if (char === "]" && !inQuotes) {
+ bracketCount--;
+ if (bracketCount < 0) {
+ throw new Error(`Invalid redaction path (${path})`);
+ }
}
}
- };
- var tree = function() {
- return { parent: null, key: null, children: [], depth: 0 };
- };
- var node = function(parent, key, depth) {
- if (parent.depth === depth) {
- return node(parent.parent, key, depth);
+ if (bracketCount !== 0) {
+ throw new Error(`Invalid redaction path (${path})`);
}
- var child = {
- parent,
- key,
- depth,
- children: []
- };
- parent.children.push(child);
- return child;
- };
- var restoreInstr = function(node2, value, target) {
- let current = node2;
- const path = [];
- do {
- path.push(current.key);
- current = current.parent;
- } while (current.parent != null);
- return { path, value, target };
- };
- module.exports = {
- groupRedact,
- groupRestore,
- nestedRedact,
- nestedRestore
};
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cj
-var require_restorer = __commonJS((exports, module) => {
- var restorer = function({ secret, wcLen }) {
- return function compileRestore() {
- if (this.restore)
- return;
- const paths = Object.keys(secret);
- const resetters = resetTmpl(secret, paths);
- const hasWildcards = wcLen > 0;
- const state = hasWildcards ? { secret, groupRestore, nestedRestore } : { secret };
- this.restore = Function("o", restoreTmpl(resetters, paths, hasWildcards)).bind(state);
- };
+ var validatePaths = function(paths) {
+ if (!Array.isArray(paths)) {
+ throw new TypeError("paths must be an array");
+ }
+ for (const path of paths) {
+ validatePath(path);
+ }
};
- var resetTmpl = function(secret, paths) {
- return paths.map((path) => {
- const { circle, escPath, leadingBracket } = secret[path];
- const delim = leadingBracket ? "" : ".";
- const reset = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${path} = secret[${escPath}].val`;
- const clear = `secret[${escPath}].val = undefined`;
- return `
- if (secret[${escPath}].val !== undefined) {
- try { ${reset} } catch (e) {}
- ${clear}
- }
- `;
- }).join("");
- };
- var restoreTmpl = function(resetters, paths, hasWildcards) {
- const dynamicReset = hasWildcards === true ? `
- const keys = Object.keys(secret)
- const len = keys.length
- for (var i = len - 1; i >= ${paths.length}; i--) {
- const k = keys[i]
- const o = secret[k]
- if (o.flat === true) this.groupRestore(o)
- else this.nestedRestore(o)
- secret[k] = null
- }
- ` : "";
- return `
- const secret = this.secret
- ${dynamicReset}
- ${resetters}
- return o
- `;
- };
- var { groupRestore, nestedRestore } = require_modifiers();
- module.exports = restorer;
-});
-
-// node_modules/@aws-sdk/client-sso/dist
-var require_state = __commonJS((exports, module) => {
- var state = function(o) {
+ var slowRedact = function(options = {}) {
const {
- secret,
- censor,
- compileRestore,
- serialize,
- groupRedact,
- nestedRedact,
- wildcards,
- wcLen
- } = o;
- const builder = [{ secret, censor, compileRestore }];
- if (serialize !== false)
- builder.push({ serialize });
- if (wcLen > 0)
- builder.push({ groupRedact, nestedRedact, wildcards, wcLen });
- return Object.assign(...builder);
+ paths = [],
+ censor = "[REDACTED]",
+ serialize = JSON.stringify,
+ strict = true,
+ remove = false
+ } = options;
+ validatePaths(paths);
+ const pathStructure = buildPathStructure(paths);
+ return function redact(obj) {
+ if (strict && (obj === null || typeof obj !== "object")) {
+ if (obj === null || obj === undefined) {
+ return serialize ? serialize(obj) : obj;
+ }
+ if (typeof obj !== "object") {
+ return serialize ? serialize(obj) : obj;
+ }
+ }
+ const cloned = selectiveClone(obj, pathStructure);
+ const original = obj;
+ let actualCensor = censor;
+ if (typeof censor === "function") {
+ actualCensor = censor;
+ }
+ redactPaths(cloned, paths, actualCensor, remove);
+ if (serialize === false) {
+ cloned.restore = function() {
+ return deepClone(original);
+ };
+ return cloned;
+ }
+ if (typeof serialize === "function") {
+ return serialize(cloned);
+ }
+ return JSON.stringify(cloned);
+ };
};
- module.exports = state;
+ var PATH_NOT_FOUND = Symbol("PATH_NOT_FOUND");
+ module.exports = slowRedact;
});
-// node_modules/@aws-sdk/client-sso/
-var require_fast_redact = __commonJS((exports, module) => {
- var fastRedact = function(opts = {}) {
- const paths = Array.from(new Set(opts.paths || []));
- const serialize = "serialize" in opts ? opts.serialize === false ? opts.serialize : typeof opts.serialize === "function" ? opts.serialize : JSON.stringify : JSON.stringify;
- const remove = opts.remove;
- if (remove === true && serialize !== JSON.stringify) {
- throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");
- }
- const censor = remove === true ? undefined : ("censor" in opts) ? opts.censor : DEFAULT_CENSOR;
- const isCensorFct = typeof censor === "function";
- const censorFctTakesPath = isCensorFct && censor.length > 1;
- if (paths.length === 0)
- return serialize || noop;
- validate({ paths, serialize, censor });
- const { wildcards, wcLen, secret } = parse({ paths, censor });
- const compileRestore = restorer({ secret, wcLen });
- const strict = "strict" in opts ? opts.strict : true;
- return redactor({ secret, wcLen, serialize, strict, isCensorFct, censorFctTakesPath }, state({
- secret,
- censor,
- compileRestore,
- serialize,
- groupRedact,
- nestedRedact,
- wildcards,
- wcLen
- }));
- };
- var validator = require_validator();
- var parse = require_parse();
- var redactor = require_redactor();
- var restorer = require_restorer();
- var { groupRedact, nestedRedact } = require_modifiers();
- var state = require_state();
- var rx = require_rx();
- var validate = validator();
- var noop = (o) => o;
- noop.restore = noop;
- var DEFAULT_CENSOR = "[REDACTED]";
- fastRedact.rx = rx;
- fastRedact.validator = validator;
- module.exports = fastRedact;
-});
-
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var require_symbols = __commonJS((exports, module) => {
var setLevelSym = Symbol("pino.setLevel");
var getLevelSym = Symbol("pino.getLevel");
var levelValSym = Symbol("pino.levelVal");
+ var levelCompSym = Symbol("pino.levelComp");
var useLevelLabelsSym = Symbol("pino.useLevelLabels");
var useOnlyCustomLevelsSym = Symbol("pino.useOnlyCustomLevels");
var mixinSym = Symbol("pino.mixin");
@@ -958,6 +873,7 @@ var require_symbols = __commonJS((exports, module) => {
setLevelSym,
getLevelSym,
levelValSym,
+ levelCompSym,
useLevelLabelsSym,
mixinSym,
lsCacheSym,
@@ -988,10 +904,10 @@ var require_symbols = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_redaction = __commonJS((exports, module) => {
var redaction = function(opts, serialize) {
- const { paths, censor } = handle(opts);
+ const { paths, censor, remove } = handle(opts);
const shape = paths.reduce((o, str) => {
rx.lastIndex = 0;
const first = rx.exec(str);
@@ -1024,7 +940,7 @@ var require_redaction = __commonJS((exports, module) => {
return o;
}, {});
const result = {
- [redactFmtSym]: fastRedact({ paths, censor, serialize, strict })
+ [redactFmtSym]: slowRedact({ paths, censor, serialize, strict, remove })
};
const topCensor = (...args) => {
return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor);
@@ -1036,11 +952,12 @@ var require_redaction = __commonJS((exports, module) => {
const wrappedCensor = typeof censor === "function" ? (value, path) => {
return censor(value, [k, ...path]);
} : censor;
- o[k] = fastRedact({
+ o[k] = slowRedact({
paths: shape[k],
censor: wrappedCensor,
serialize,
- strict
+ strict,
+ remove
});
}
return o;
@@ -1049,7 +966,6 @@ var require_redaction = __commonJS((exports, module) => {
var handle = function(opts) {
if (Array.isArray(opts)) {
opts = { paths: opts, censor: CENSOR };
- validate(opts);
return opts;
}
let { paths, censor = CENSOR, remove } = opts;
@@ -1058,31 +974,45 @@ var require_redaction = __commonJS((exports, module) => {
}
if (remove === true)
censor = undefined;
- validate({ paths, censor });
- return { paths, censor };
+ return { paths, censor, remove };
};
- var fastRedact = require_fast_redact();
+ var slowRedact = require_slow_redact();
var { redactFmtSym, wildcardFirstSym } = require_symbols();
- var { rx, validator } = fastRedact;
- var validate = validator({
- ERR_PATHS_MUST_BE_STRINGS: () => "pino \u2013 redacted paths must be strings",
- ERR_INVALID_PATH: (s) => `pino \u2013 redact paths array contains an invalid path (${s})`
- });
+ var rx = /[^.[\]]+|\[([^[\]]*?)\]/g;
var CENSOR = "[Redacted]";
var strict = false;
module.exports = redaction;
});
-// node_modules/@aws-sdk/client-
+// node_modules/@aws-sdk/nested-
var require_time = __commonJS((exports, module) => {
var nullTime = () => "";
var epochTime = () => `,"time":${Date.now()}`;
var unixTime = () => `,"time":${Math.round(Date.now() / 1000)}`;
var isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"`;
- module.exports = { nullTime, epochTime, unixTime, isoTime };
+ var NS_PER_MS = 1000000n;
+ var NS_PER_SEC = 1000000000n;
+ var startWallTimeNs = BigInt(Date.now()) * NS_PER_MS;
+ var startHrTime = process.hrtime.bigint();
+ var isoTimeNano = () => {
+ const elapsedNs = process.hrtime.bigint() - startHrTime;
+ const currentTimeNs = startWallTimeNs + elapsedNs;
+ const secondsSinceEpoch = currentTimeNs / NS_PER_SEC;
+ const nanosWithinSecond = currentTimeNs % NS_PER_SEC;
+ const msSinceEpoch = Number(secondsSinceEpoch * 1000n + nanosWithinSecond / 1000000n);
+ const date = new Date(msSinceEpoch);
+ const year = date.getUTCFullYear();
+ const month = (date.getUTCMonth() + 1).toString().padStart(2, "0");
+ const day = date.getUTCDate().toString().padStart(2, "0");
+ const hours = date.getUTCHours().toString().padStart(2, "0");
+ const minutes = date.getUTCMinutes().toString().padStart(2, "0");
+ const seconds = date.getUTCSeconds().toString().padStart(2, "0");
+ return `,"time":"${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${nanosWithinSecond.toString().padStart(9, "0")}Z"`;
+ };
+ module.exports = { nullTime, epochTime, unixTime, isoTime, isoTimeNano };
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
var require_quick_format_unescaped = __commonJS((exports, module) => {
var tryStringify = function(o) {
try {
@@ -1200,7 +1130,7 @@ var require_quick_format_unescaped = __commonJS((exports, module) => {
module.exports = format;
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_atomic_sleep = __commonJS((exports, module) => {
if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") {
let sleep = function(ms) {
@@ -1232,7 +1162,7 @@ var require_atomic_sleep = __commonJS((exports, module) => {
}
});
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var require_sonic_boom = __commonJS((exports, module) => {
var openFile = function(file, sonic) {
sonic._opening = true;
@@ -1254,6 +1184,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
}
return;
}
+ const reopening = sonic._reopening;
sonic.fd = fd;
sonic.file = file;
sonic._reopening = false;
@@ -1264,11 +1195,13 @@ var require_sonic_boom = __commonJS((exports, module) => {
} else {
sonic.emit("ready");
}
- if (sonic._reopening || sonic.destroyed) {
+ if (sonic.destroyed) {
return;
}
if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) {
sonic._actualWrite();
+ } else if (reopening) {
+ process.nextTick(() => sonic.emit("drain"));
}
}
const flags = sonic.append ? "a" : "w";
@@ -1297,7 +1230,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
if (!(this instanceof SonicBoom)) {
return new SonicBoom(opts);
}
- let { fd, dest, minLength, maxLength, maxWrite, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
+ let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
fd = fd || dest;
this._len = 0;
this.fd = -1;
@@ -1314,6 +1247,8 @@ var require_sonic_boom = __commonJS((exports, module) => {
this.minLength = minLength || 0;
this.maxLength = maxLength || 0;
this.maxWrite = maxWrite || MAX_WRITE;
+ this._periodicFlush = periodicFlush || 0;
+ this._periodicFlushTimer = undefined;
this.sync = sync || false;
this.writable = true;
this._fsync = fsync || false;
@@ -1427,6 +1362,10 @@ var require_sonic_boom = __commonJS((exports, module) => {
this._asyncDrainScheduled = false;
}
});
+ if (this._periodicFlush !== 0) {
+ this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush);
+ this._periodicFlushTimer.unref();
+ }
};
var releaseWritingBuf = function(writingBuf, len, n) {
if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) {
@@ -1501,10 +1440,14 @@ var require_sonic_boom = __commonJS((exports, module) => {
this._flushPending = true;
const onDrain = () => {
if (!this._fsync) {
- fs.fsync(this.fd, (err) => {
- this._flushPending = false;
+ try {
+ fs.fsync(this.fd, (err) => {
+ this._flushPending = false;
+ cb(err);
+ });
+ } catch (err) {
cb(err);
- });
+ }
} else {
this._flushPending = false;
cb();
@@ -1671,6 +1614,9 @@ var require_sonic_boom = __commonJS((exports, module) => {
release(err);
}
} else {
+ if (kCopyBuffer) {
+ this._writingBuf = Buffer.from(this._writingBuf);
+ }
fs.write(this.fd, this._writingBuf, release);
}
};
@@ -1679,10 +1625,17 @@ var require_sonic_boom = __commonJS((exports, module) => {
sonic.once("ready", actualClose.bind(null, sonic));
return;
}
+ if (sonic._periodicFlushTimer !== undefined) {
+ clearInterval(sonic._periodicFlushTimer);
+ }
sonic.destroyed = true;
sonic._bufs = [];
sonic._lens = [];
- fs.fsync(sonic.fd, closeWrapped);
+ assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
+ try {
+ fs.fsync(sonic.fd, closeWrapped);
+ } catch {
+ }
function closeWrapped() {
if (sonic.fd !== 1 && sonic.fd !== 2) {
fs.close(sonic.fd, done);
@@ -1706,11 +1659,14 @@ var require_sonic_boom = __commonJS((exports, module) => {
var inherits = __require("util").inherits;
var path = __require("path");
var sleep = require_atomic_sleep();
+ var assert = __require("assert");
var BUSY_WRITE_TIMEOUT = 100;
var kEmptyBuffer = Buffer.allocUnsafe(0);
var MAX_WRITE = 16 * 1024;
var kContentModeBuffer = "buffer";
var kContentModeUtf8 = "utf8";
+ var [major, minor] = (process.versions.node || "0.0").split(".").map(Number);
+ var kCopyBuffer = major >= 22 && minor >= 7;
inherits(SonicBoom, EventEmitter);
SonicBoom.prototype.reopen = function(file) {
if (this.destroyed) {
@@ -1728,6 +1684,9 @@ var require_sonic_boom = __commonJS((exports, module) => {
if (!this.file) {
throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");
}
+ if (file) {
+ this.file = file;
+ }
this._reopening = true;
if (this._writing) {
return;
@@ -1742,7 +1701,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
});
}
});
- openFile(file || this.file, this);
+ openFile(this.file, this);
};
SonicBoom.prototype.end = function() {
if (this.destroyed) {
@@ -1778,7 +1737,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
module.exports = SonicBoom;
});
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
var require_on_exit_leak_free = __commonJS((exports, module) => {
var ensureRegistry = function() {
if (registry === undefined) {
@@ -1869,11 +1828,11 @@ var require_on_exit_leak_free = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
var require_package = __commonJS((exports, module) => {
module.exports = {
name: "thread-stream",
- version: "2.4.1",
+ version: "3.1.0",
description: "A streaming way to send data to a Node.js Worker Thread",
main: "index.js",
types: "index.d.ts",
@@ -1883,21 +1842,23 @@ var require_package = __commonJS((exports, module) => {
devDependencies: {
"@types/node": "^20.1.0",
"@types/tap": "^15.0.0",
+ "@yao-pkg/pkg": "^5.11.5",
desm: "^1.3.0",
fastbench: "^1.0.1",
- husky: "^8.0.1",
- "pino-elasticsearch": "^6.0.0",
- "sonic-boom": "^3.0.0",
+ husky: "^9.0.6",
+ "pino-elasticsearch": "^8.0.0",
+ "sonic-boom": "^4.0.1",
standard: "^17.0.0",
tap: "^16.2.0",
"ts-node": "^10.8.0",
- typescript: "^4.7.2",
+ typescript: "^5.3.2",
"why-is-node-running": "^2.2.2"
},
scripts: {
- test: "standard && npm run transpile && tap test/*.test.*js && tap --ts test/*.test.*ts",
+ build: "tsc --noEmit",
+ test: "standard && npm run build && npm run transpile && tap \"test/**/*.test.*js\" && tap --ts test/*.test.*ts",
"test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts",
- "test:ci:js": "tap --no-check-coverage --coverage-report=lcovonly \"test/**/*.test.*js\"",
+ "test:ci:js": "tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \"test/**/*.test.*js\"",
"test:ci:ts": "tap --ts --no-check-coverage --coverage-report=lcovonly \"test/**/*.test.*ts\"",
"test:yarn": "npm run transpile && tap \"test/**/*.test.js\" --no-check-coverage",
transpile: "sh ./test/ts/transpile.sh",
@@ -1905,7 +1866,8 @@ var require_package = __commonJS((exports, module) => {
},
standard: {
ignore: [
- "test/ts/**/*"
+ "test/ts/**/*",
+ "test/syntax-error.mjs"
]
},
repository: {
@@ -1927,7 +1889,7 @@ var require_package = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
var require_wait = __commonJS((exports, module) => {
var wait = function(state, index, expected, timeout, done) {
const max = Date.now() + timeout;
@@ -1984,7 +1946,7 @@ var require_wait = __commonJS((exports, module) => {
module.exports = { wait, waitDiff };
});
-// node_modules/@aws-sdk/client-sso/dist-cjs
+// node_modules/@aws-sdk/nested-clients/dist
var require_indexes = __commonJS((exports, module) => {
var WRITE_INDEX = 4;
var READ_INDEX = 8;
@@ -1994,7 +1956,7 @@ var require_indexes = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/di
+// node_modules/@aws-sdk/nested-client
var require_thread_stream = __commonJS((exports, module) => {
var createWorker = function(stream, opts) {
const { filename, workerData } = opts;
@@ -2307,6 +2269,9 @@ var require_thread_stream = __commonJS((exports, module) => {
this[kImpl].closed = false;
this[kImpl].buf = "";
this.worker = createWorker(this, opts);
+ this.on("message", (message, transferList) => {
+ this.worker.postMessage(message, transferList);
+ });
}
write(data) {
if (this[kImpl].destroyed) {
@@ -2415,7 +2380,7 @@ var require_thread_stream = __commonJS((exports, module) => {
module.exports = ThreadStream;
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_transport = __commonJS((exports, module) => {
var setupOnExit = function(stream) {
onExit.register(stream, autoEnd);
@@ -2424,11 +2389,12 @@ var require_transport = __commonJS((exports, module) => {
onExit.unregister(stream);
});
};
- var buildStream = function(filename, workerData, workerOpts) {
+ var buildStream = function(filename, workerData, workerOpts, sync) {
const stream = new ThreadStream({
filename,
workerData,
- workerOpts
+ workerOpts,
+ sync
});
stream.on("ready", onReady);
stream.on("close", function() {
@@ -2464,7 +2430,10 @@ var require_transport = __commonJS((exports, module) => {
stream.flushSync();
};
var transport = function(fullOptions) {
- const { pipeline, targets, levels, dedupe, options = {}, worker = {}, caller = getCallers() } = fullOptions;
+ const { pipeline, targets, levels, dedupe, worker = {}, caller = getCallers(), sync = false } = fullOptions;
+ const options = {
+ ...fullOptions.options
+ };
const callers = typeof caller === "string" ? [caller] : caller;
const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
let target = fullOptions.target;
@@ -2473,20 +2442,29 @@ var require_transport = __commonJS((exports, module) => {
}
if (targets) {
target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
- options.targets = targets.map((dest) => {
+ options.targets = targets.filter((dest) => dest.target).map((dest) => {
return {
...dest,
target: fixTarget(dest.target)
};
});
+ options.pipelines = targets.filter((dest) => dest.pipeline).map((dest) => {
+ return dest.pipeline.map((t) => {
+ return {
+ ...t,
+ level: dest.level,
+ target: fixTarget(t.target)
+ };
+ });
+ });
} else if (pipeline) {
- target = bundlerOverrides["pino-pipeline-worker"] || join(__dirname, "worker-pipeline.js");
- options.targets = pipeline.map((dest) => {
+ target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
+ options.pipelines = [pipeline.map((dest) => {
return {
...dest,
target: fixTarget(dest.target)
};
- });
+ })];
}
if (levels) {
options.levels = levels;
@@ -2494,7 +2472,8 @@ var require_transport = __commonJS((exports, module) => {
if (dedupe) {
options.dedupe = dedupe;
}
- return buildStream(fixTarget(target), options, worker);
+ options.pinoWillSendConfig = true;
+ return buildStream(fixTarget(target), options, worker, sync);
function fixTarget(origin) {
origin = bundlerOverrides[origin] || origin;
if (isAbsolute(origin) || origin.indexOf("file://") === 0) {
@@ -2522,14 +2501,14 @@ var require_transport = __commonJS((exports, module) => {
var __dirname = "/app/node_modules/pino/lib";
var { createRequire: createRequire2 } = __require("module");
var getCallers = require_caller();
- var { join, isAbsolute, sep } = __require("path");
+ var { join, isAbsolute, sep } = __require("node:path");
var sleep = require_atomic_sleep();
var onExit = require_on_exit_leak_free();
var ThreadStream = require_thread_stream();
module.exports = transport;
});
-// node_modules/@aws-sdk/client-s
+// node_modules/@aws-sdk/nested-c
var require_tools = __commonJS((exports, module) => {
var noop = function() {
};
@@ -2594,6 +2573,13 @@ var require_tools = __commonJS((exports, module) => {
return point < 32 ? JSON.stringify(str) : '"' + result + '"';
};
var asJson = function(obj, msg, num, time) {
+ if (asJsonChan.hasSubscribers === false) {
+ return _asJson.call(this, obj, msg, num, time);
+ }
+ const store = { instance: this, arguments };
+ return asJsonChan.traceSync(_asJson, store, this, obj, msg, num, time);
+ };
+ var _asJson = function(obj, msg, num, time) {
const stringify2 = this[stringifySym];
const stringifySafe = this[stringifySafeSym];
const stringifiers = this[stringifiersSym];
@@ -2687,7 +2673,7 @@ var require_tools = __commonJS((exports, module) => {
bindings = formatter(bindings);
for (const key in bindings) {
value = bindings[key];
- const valid = key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels" && bindings.hasOwnProperty(key) && value !== undefined;
+ const valid = (key.length < 5 || key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels") && bindings.hasOwnProperty(key) && value !== undefined;
if (valid === true) {
value = serializers[key] ? serializers[key](value) : value;
value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe);
@@ -2704,7 +2690,7 @@ var require_tools = __commonJS((exports, module) => {
var buildSafeSonicBoom = function(opts) {
const stream = new SonicBoom(opts);
stream.on("error", filterBrokenPipe);
- if (!hasNodeCodeCoverage && !opts.sync && isMainThread) {
+ if (!opts.sync && isMainThread) {
onExit.register(stream, autoEnd);
stream.on("close", function() {
onExit.unregister(stream);
@@ -2812,6 +2798,7 @@ var require_tools = __commonJS((exports, module) => {
}
return destination;
};
+ var diagChan = __require("node:diagnostics_channel");
var format = require_quick_format_unescaped();
var { mapHttpRequest, mapHttpResponse } = require_pino_std_serializers();
var SonicBoom = require_sonic_boom();
@@ -2836,7 +2823,7 @@ var require_tools = __commonJS((exports, module) => {
} = require_symbols();
var { isMainThread } = __require("worker_threads");
var transport = require_transport();
- var hasNodeCodeCoverage = process.env.NODE_V8_COVERAGE || process.env.V8_COVERAGE;
+ var asJsonChan = diagChan.tracingChannel("pino_asJson");
module.exports = {
noop,
buildSafeSonicBoom,
@@ -2850,7 +2837,27 @@ var require_tools = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-ss
+// node_modules/@aws-sdk/nested-clien
+var require_constants = __commonJS((exports, module) => {
+ var DEFAULT_LEVELS = {
+ trace: 10,
+ debug: 20,
+ info: 30,
+ warn: 40,
+ error: 50,
+ fatal: 60
+ };
+ var SORTING_ORDER = {
+ ASC: "ASC",
+ DESC: "DESC"
+ };
+ module.exports = {
+ DEFAULT_LEVELS,
+ SORTING_ORDER
+ };
+});
+
+// node_modules/@aws-sdk/nested-cl
var require_levels = __commonJS((exports, module) => {
var genLsCache = function(instance) {
const formatter = instance[formattersSym].level;
@@ -2891,9 +2898,10 @@ var require_levels = __commonJS((exports, module) => {
const preLevelVal = this[levelValSym];
const levelVal = this[levelValSym] = values[level];
const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym];
+ const levelComparison = this[levelCompSym];
const hook = this[hooksSym].logMethod;
for (const key in values) {
- if (levelVal > values[key]) {
+ if (levelComparison(values[key], levelVal) === false) {
this[key] = noop;
continue;
}
@@ -2902,13 +2910,25 @@ var require_levels = __commonJS((exports, module) => {
this.emit("level-change", level, levelVal, labels[preLevelVal], preLevelVal, this);
};
var getLevel = function(level) {
- const { levels: levels2, levelVal } = this;
- return levels2 && levels2.labels ? levels2.labels[levelVal] : "";
+ const { levels, levelVal } = this;
+ return levels && levels.labels ? levels.labels[levelVal] : "";
};
var isLevelEnabled = function(logLevel) {
const { values } = this.levels;
const logLevelVal = values[logLevel];
- return logLevelVal !== undefined && logLevelVal >= this[levelValSym];
+ return logLevelVal !== undefined && this[levelCompSym](logLevelVal, this[levelValSym]);
+ };
+ var compareLevel = function(direction, current, expected) {
+ if (direction === SORTING_ORDER.DESC) {
+ return current <= expected;
+ }
+ return current >= expected;
+ };
+ var genLevelComparison = function(levelComparison) {
+ if (typeof levelComparison === "string") {
+ return compareLevel.bind(null, levelComparison);
+ }
+ return levelComparison;
};
var mappings = function(customLevels = null, useOnlyCustomLevels = false) {
const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => {
@@ -2916,7 +2936,7 @@ var require_levels = __commonJS((exports, module) => {
return o;
}, {}) : null;
const labels = Object.assign(Object.create(Object.prototype, { Infinity: { value: "silent" } }), useOnlyCustomLevels ? null : nums, customNums);
- const values = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : levels, customLevels);
+ const values = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
return { labels, values };
};
var assertDefaultLevelFound = function(defaultLevel, customLevels, useOnlyCustomLevels) {
@@ -2927,13 +2947,13 @@ var require_levels = __commonJS((exports, module) => {
}
return;
}
- const labels = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : levels, customLevels);
+ const labels = Object.assign(Object.create(Object.prototype, { silent: { value: Infinity } }), useOnlyCustomLevels ? null : DEFAULT_LEVELS, customLevels);
if (!(defaultLevel in labels)) {
throw Error(`default level:${defaultLevel} must be included in custom levels`);
}
};
- var assertNoLevelCollisions = function(levels2, customLevels) {
- const { labels, values } = levels2;
+ var assertNoLevelCollisions = function(levels, customLevels) {
+ const { labels, values } = levels;
for (const k in customLevels) {
if (k in values) {
throw Error("levels cannot be overridden");
@@ -2943,26 +2963,29 @@ var require_levels = __commonJS((exports, module) => {
}
}
};
+ var assertLevelComparison = function(levelComparison) {
+ if (typeof levelComparison === "function") {
+ return;
+ }
+ if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) {
+ return;
+ }
+ throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type');
+ };
var {
lsCacheSym,
levelValSym,
useOnlyCustomLevelsSym,
streamSym,
formattersSym,
- hooksSym
+ hooksSym,
+ levelCompSym
} = require_symbols();
var { noop, genLog } = require_tools();
- var levels = {
- trace: 10,
- debug: 20,
- info: 30,
- warn: 40,
- error: 50,
- fatal: 60
- };
+ var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants();
var levelMethods = {
fatal: (hook) => {
- const logFatal = genLog(levels.fatal, hook);
+ const logFatal = genLog(DEFAULT_LEVELS.fatal, hook);
return function(...args) {
const stream = this[streamSym];
logFatal.call(this, ...args);
@@ -2974,14 +2997,14 @@ var require_levels = __commonJS((exports, module) => {
}
};
},
- error: (hook) => genLog(levels.error, hook),
- warn: (hook) => genLog(levels.warn, hook),
- info: (hook) => genLog(levels.info, hook),
- debug: (hook) => genLog(levels.debug, hook),
- trace: (hook) => genLog(levels.trace, hook)
+ error: (hook) => genLog(DEFAULT_LEVELS.error, hook),
+ warn: (hook) => genLog(DEFAULT_LEVELS.warn, hook),
+ info: (hook) => genLog(DEFAULT_LEVELS.info, hook),
+ debug: (hook) => genLog(DEFAULT_LEVELS.debug, hook),
+ trace: (hook) => genLog(DEFAULT_LEVELS.trace, hook)
};
- var nums = Object.keys(levels).reduce((o, k) => {
- o[levels[k]] = k;
+ var nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => {
+ o[DEFAULT_LEVELS[k]] = k;
return o;
}, {});
var initialLsCache = Object.keys(nums).reduce((o, k) => {
@@ -2996,27 +3019,37 @@ var require_levels = __commonJS((exports, module) => {
setLevel,
isLevelEnabled,
mappings,
- levels,
assertNoLevelCollisions,
- assertDefaultLevelFound
+ assertDefaultLevelFound,
+ genLevelComparison,
+ assertLevelComparison
};
});
-// node_modules/@aws-sdk/client-
+// node_modules/@aws-sdk/nested-
var require_meta = __commonJS((exports, module) => {
- module.exports = { version: "8.17.2" };
+ module.exports = { version: "10.0.0" };
});
-// node_modules/@aws-sdk/client-s
+// node_modules/@aws-sdk/nested-c
var require_proto = __commonJS((exports, module) => {
var child = function(bindings2, options) {
if (!bindings2) {
throw Error("missing bindings for child Pino");
}
- options = options || {};
const serializers = this[serializersSym];
const formatters = this[formattersSym];
const instance = Object.create(this);
+ if (options == null) {
+ if (instance[formattersSym].bindings !== resetChildingsFormatter) {
+ instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
+ }
+ instance[chindingsSym] = asChindings(instance, bindings2);
+ if (this.onChild !== noop) {
+ this.onChild(instance);
+ }
+ return instance;
+ }
if (options.hasOwnProperty("serializers") === true) {
instance[serializersSym] = Object.create(null);
for (const k in serializers) {
@@ -3060,8 +3093,10 @@ var require_proto = __commonJS((exports, module) => {
instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options.msgPrefix;
}
instance[chindingsSym] = asChindings(instance, bindings2);
- const childLevel = options.level || this.level;
- instance[setLevelSym](childLevel);
+ if (options.level !== undefined && options.level !== this.level || options.hasOwnProperty("customLevels")) {
+ const childLevel = options.level || this.level;
+ instance[setLevelSym](childLevel);
+ }
this.onChild(instance);
return instance;
};
@@ -3088,6 +3123,7 @@ var require_proto = __commonJS((exports, module) => {
const messageKey = this[messageKeySym];
const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy;
let obj;
+ const streamWriteHook = this[hooksSym].streamWrite;
if (_obj === undefined || _obj === null) {
obj = {};
} else if (_obj instanceof Error) {
@@ -3113,9 +3149,7 @@ var require_proto = __commonJS((exports, module) => {
stream.lastTime = t.slice(this[timeSliceIndexSym]);
stream.lastLogger = this;
}
- stream.write(s);
- };
- var noop = function() {
+ stream.write(streamWriteHook ? streamWriteHook(s) : s);
};
var flush = function(cb) {
if (cb != null && typeof cb !== "function") {
@@ -3127,7 +3161,7 @@ var require_proto = __commonJS((exports, module) => {
} else if (cb)
cb();
};
- var { EventEmitter } = __require("events");
+ var { EventEmitter } = __require("node:events");
var {
lsCacheSym,
levelValSym,
@@ -3152,7 +3186,8 @@ var require_proto = __commonJS((exports, module) => {
stringifySym,
formatOptsSym,
stringifiersSym,
- msgPrefixSym
+ msgPrefixSym,
+ hooksSym
} = require_symbols();
var {
getLevel,
@@ -3167,7 +3202,8 @@ var require_proto = __commonJS((exports, module) => {
asChindings,
asJson,
buildFormatters,
- stringify
+ stringify,
+ noop
} = require_tools();
var {
version
@@ -3195,6 +3231,12 @@ var require_proto = __commonJS((exports, module) => {
set levelVal(n) {
throw Error("levelVal is read-only");
},
+ get msgPrefix() {
+ return this[msgPrefixSym];
+ },
+ get [Symbol.toStringTag]() {
+ return "Pino";
+ },
[lsCacheSym]: initialLsCache,
[writeSym]: write,
[asJsonSym]: asJson,
@@ -3208,7 +3250,7 @@ var require_proto = __commonJS((exports, module) => {
var resetChildingsFormatter = (bindings2) => bindings2;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/e
+// node_modules/@aws-sdk/nested-clients/dist-c
var require_safe_stable_stringify = __commonJS((exports, module) => {
var strEscape = function(str) {
if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) {
@@ -3216,9 +3258,9 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
}
return JSON.stringify(str);
};
- var insertSort = function(array) {
- if (array.length > 200) {
- return array.sort();
+ var sort = function(array, comparator) {
+ if (array.length > 200 || comparator) {
+ return array.sort(comparator);
}
for (let i = 1;i < array.length; i++) {
const currentValue = array[i];
@@ -3265,6 +3307,16 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
}
return '"[Circular]"';
};
+ var getDeterministicOption = function(options) {
+ let value;
+ if (hasOwnProperty.call(options, "deterministic")) {
+ value = options.deterministic;
+ if (typeof value !== "boolean" && typeof value !== "function") {
+ throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');
+ }
+ }
+ return value === undefined ? true : value;
+ };
var getBooleanOption = function(options, key) {
let value;
if (hasOwnProperty.call(options, key)) {
@@ -3335,7 +3387,8 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
}
const circularValue = getCircularValueOption(options);
const bigint = getBooleanOption(options, "bigint");
- const deterministic = getBooleanOption(options, "deterministic");
+ const deterministic = getDeterministicOption(options);
+ const comparator = typeof deterministic === "function" ? deterministic : undefined;
const maximumDepth = getPositiveIntegerOption(options, "maximumDepth");
const maximumBreadth = getPositiveIntegerOption(options, "maximumBreadth");
function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) {
@@ -3406,7 +3459,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
}
const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
if (deterministic && !isTypedArrayWithEntries(value)) {
- keys = insertSort(keys);
+ keys = sort(keys, comparator);
}
stack.push(value);
for (let i = 0;i < maximumPropertiesToStringify; i++) {
@@ -3595,7 +3648,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
separator = join;
}
if (deterministic) {
- keys = insertSort(keys);
+ keys = sort(keys, comparator);
}
stack.push(value);
for (let i = 0;i < maximumPropertiesToStringify; i++) {
@@ -3652,7 +3705,8 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
return circularValue;
}
let res = "";
- if (Array.isArray(value)) {
+ const hasLength = value.length !== undefined;
+ if (hasLength && Array.isArray(value)) {
if (value.length === 0) {
return "[]";
}
@@ -3686,14 +3740,14 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
}
let separator = "";
let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
- if (isTypedArrayWithEntries(value)) {
+ if (hasLength && isTypedArrayWithEntries(value)) {
res += stringifyTypedArray(value, ",", maximumBreadth);
keys = keys.slice(value.length);
maximumPropertiesToStringify -= value.length;
separator = ",";
}
if (deterministic) {
- keys = insertSort(keys);
+ keys = sort(keys, comparator);
}
stack.push(value);
for (let i = 0;i < maximumPropertiesToStringify; i++) {
@@ -3757,17 +3811,16 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
exports.stringify = stringify;
exports.configure = configure;
module.exports = stringify;
- var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;
+ var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;
var typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)), Symbol.toStringTag).get;
});
-// node_modules/@aws-sdk/client-sso/dis
+// node_modules/@aws-sdk/nested-clients
var require_multistream = __commonJS((exports, module) => {
var multistream = function(streamsArray, opts) {
- let counter = 0;
streamsArray = streamsArray || [];
opts = opts || { dedupe: false };
- const streamLevels = Object.create(levels);
+ const streamLevels = Object.create(DEFAULT_LEVELS);
streamLevels.silent = Infinity;
if (opts.levels && typeof opts.levels === "object") {
Object.keys(opts.levels).forEach((i) => {
@@ -3777,9 +3830,12 @@ var require_multistream = __commonJS((exports, module) => {
const res = {
write,
add,
+ remove,
+ emit,
flushSync,
end,
minLevel: 0,
+ lastId: 0,
streams: [],
clone,
[metadata]: true,
@@ -3822,6 +3878,13 @@ var require_multistream = __commonJS((exports, module) => {
}
}
}
+ function emit(...args) {
+ for (const { stream } of this.streams) {
+ if (typeof stream.emit === "function") {
+ stream.emit(...args);
+ }
+ }
+ }
function flushSync() {
for (const { stream } of this.streams) {
if (typeof stream.flushSync === "function") {
@@ -3853,13 +3916,23 @@ var require_multistream = __commonJS((exports, module) => {
stream: stream_,
level,
levelVal: undefined,
- id: counter++
+ id: ++res.lastId
};
streams.unshift(dest_);
streams.sort(compareByLevel);
this.minLevel = streams[0].level;
return res;
}
+ function remove(id) {
+ const { streams } = this;
+ const index = streams.findIndex((s) => s.id === id);
+ if (index >= 0) {
+ streams.splice(index, 1);
+ streams.sort(compareByLevel);
+ this.minLevel = streams.length > 0 ? streams[0].level : -1;
+ }
+ return res;
+ }
function end() {
for (const { stream } of this.streams) {
if (typeof stream.flushSync === "function") {
@@ -3879,9 +3952,11 @@ var require_multistream = __commonJS((exports, module) => {
return {
write,
add,
+ remove,
minLevel: level,
streams,
clone,
+ emit,
flushSync,
[metadata]: true
};
@@ -3900,16 +3975,18 @@ var require_multistream = __commonJS((exports, module) => {
return dedupe ? i >= 0 : i < length;
};
var metadata = Symbol.for("pino.metadata");
- var { levels } = require_levels();
- var DEFAULT_INFO_LEVEL = levels.info;
+ var { DEFAULT_LEVELS } = require_constants();
+ var DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info;
module.exports = multistream;
});
-// node_modules/@aws-sdk/cli
+// node_modules/@aws-sdk/nes
var require_pino = __commonJS((exports, module) => {
var pino = function(...args) {
const instance = {};
const { opts, stream } = normalize(instance, caller(), ...args);
+ if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== undefined)
+ opts.level = opts.level.toLowerCase();
const {
redact,
crlf,
@@ -3922,6 +3999,7 @@ var require_pino = __commonJS((exports, module) => {
name,
level,
customLevels,
+ levelComparison,
mixin,
mixinMergeStrategy,
useOnlyCustomLevels,
@@ -3968,9 +4046,15 @@ var require_pino = __commonJS((exports, module) => {
if (msgPrefix && typeof msgPrefix !== "string")
throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`);
assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels);
- const levels2 = mappings(customLevels, useOnlyCustomLevels);
+ const levels = mappings(customLevels, useOnlyCustomLevels);
+ if (typeof stream.emit === "function") {
+ stream.emit("message", { code: "PINO_CONFIG", config: { levels, messageKey, errorKey } });
+ }
+ assertLevelComparison(levelComparison);
+ const levelCompFunc = genLevelComparison(levelComparison);
Object.assign(instance, {
- levels: levels2,
+ levels,
+ [levelCompSym]: levelCompFunc,
[useOnlyCustomLevelsSym]: useOnlyCustomLevels,
[streamSym]: stream,
[timeSym]: time2,
@@ -3999,7 +4083,7 @@ var require_pino = __commonJS((exports, module) => {
instance[setLevelSym](level);
return instance;
};
- var os = __require("os");
+ var os = __require("node:os");
var stdSerializers = require_pino_std_serializers();
var caller = require_caller();
var redaction = require_redaction();
@@ -4007,7 +4091,8 @@ var require_pino = __commonJS((exports, module) => {
var proto = require_proto();
var symbols = require_symbols();
var { configure } = require_safe_stable_stringify();
- var { assertDefaultLevelFound, mappings, genLsCache, levels } = require_levels();
+ var { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = require_levels();
+ var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants();
var {
createArgsNormalizer,
asChindings,
@@ -4035,6 +4120,7 @@ var require_pino = __commonJS((exports, module) => {
errorKeySym,
nestedKeySym,
mixinSym,
+ levelCompSym,
useOnlyCustomLevelsSym,
formattersSym,
hooksSym,
@@ -4048,7 +4134,8 @@ var require_pino = __commonJS((exports, module) => {
var defaultErrorSerializer = stdSerializers.err;
var defaultOptions = {
level: "info",
- levels,
+ levelComparison: SORTING_ORDER.ASC,
+ levels: DEFAULT_LEVELS,
messageKey: "msg",
errorKey: "err",
nestedKey: null,
@@ -4066,7 +4153,8 @@ var require_pino = __commonJS((exports, module) => {
}
}),
hooks: {
- logMethod: undefined
+ logMethod: undefined,
+ streamWrite: undefined
},
timestamp: epochTime,
name: undefined,
@@ -4098,126 +4186,92 @@ var require_pino = __commonJS((exports, module) => {
module.exports.pino = pino;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
-var require_dist_cjs = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- AlgorithmId: () => AlgorithmId,
- EndpointURLScheme: () => EndpointURLScheme,
- FieldPosition: () => FieldPosition,
- HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,
- HttpAuthLocation: () => HttpAuthLocation,
- IniSectionType: () => IniSectionType,
- RequestHandlerProtocol: () => RequestHandlerProtocol,
- SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,
- getDefaultClientConfiguration: () => getDefaultClientConfiguration,
- resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig
- });
- module.exports = __toCommonJS(src_exports);
- var HttpAuthLocation = ((HttpAuthLocation2) => {
- HttpAuthLocation2["HEADER"] = "header";
- HttpAuthLocation2["QUERY"] = "query";
- return HttpAuthLocation2;
- })(HttpAuthLocation || {});
- var HttpApiKeyAuthLocation = ((HttpApiKeyAuthLocation2) => {
- HttpApiKeyAuthLocation2["HEADER"] = "header";
- HttpApiKeyAuthLocation2["QUERY"] = "query";
- return HttpApiKeyAuthLocation2;
- })(HttpApiKeyAuthLocation || {});
- var EndpointURLScheme = ((EndpointURLScheme2) => {
- EndpointURLScheme2["HTTP"] = "http";
- EndpointURLScheme2["HTTPS"] = "https";
- return EndpointURLScheme2;
- })(EndpointURLScheme || {});
- var AlgorithmId = ((AlgorithmId2) => {
- AlgorithmId2["MD5"] = "md5";
- AlgorithmId2["CRC32"] = "crc32";
- AlgorithmId2["CRC32C"] = "crc32c";
- AlgorithmId2["SHA1"] = "sha1";
- AlgorithmId2["SHA256"] = "sha256";
- return AlgorithmId2;
- })(AlgorithmId || {});
- var getChecksumConfiguration = __name((runtimeConfig) => {
+// node_modules/@aws-sdk/nested-clients/dist-cj
+var require_dist_cjs = __commonJS((exports) => {
+ exports.HttpAuthLocation = undefined;
+ (function(HttpAuthLocation) {
+ HttpAuthLocation["HEADER"] = "header";
+ HttpAuthLocation["QUERY"] = "query";
+ })(exports.HttpAuthLocation || (exports.HttpAuthLocation = {}));
+ exports.HttpApiKeyAuthLocation = undefined;
+ (function(HttpApiKeyAuthLocation) {
+ HttpApiKeyAuthLocation["HEADER"] = "header";
+ HttpApiKeyAuthLocation["QUERY"] = "query";
+ })(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {}));
+ exports.EndpointURLScheme = undefined;
+ (function(EndpointURLScheme) {
+ EndpointURLScheme["HTTP"] = "http";
+ EndpointURLScheme["HTTPS"] = "https";
+ })(exports.EndpointURLScheme || (exports.EndpointURLScheme = {}));
+ exports.AlgorithmId = undefined;
+ (function(AlgorithmId) {
+ AlgorithmId["MD5"] = "md5";
+ AlgorithmId["CRC32"] = "crc32";
+ AlgorithmId["CRC32C"] = "crc32c";
+ AlgorithmId["SHA1"] = "sha1";
+ AlgorithmId["SHA256"] = "sha256";
+ })(exports.AlgorithmId || (exports.AlgorithmId = {}));
+ var getChecksumConfiguration = (runtimeConfig) => {
const checksumAlgorithms = [];
if (runtimeConfig.sha256 !== undefined) {
checksumAlgorithms.push({
- algorithmId: () => "sha256",
+ algorithmId: () => exports.AlgorithmId.SHA256,
checksumConstructor: () => runtimeConfig.sha256
});
}
if (runtimeConfig.md5 != null) {
checksumAlgorithms.push({
- algorithmId: () => "md5",
+ algorithmId: () => exports.AlgorithmId.MD5,
checksumConstructor: () => runtimeConfig.md5
});
}
return {
- _checksumAlgorithms: checksumAlgorithms,
addChecksumAlgorithm(algo) {
- this._checksumAlgorithms.push(algo);
+ checksumAlgorithms.push(algo);
},
checksumAlgorithms() {
- return this._checksumAlgorithms;
+ return checksumAlgorithms;
}
};
- }, "getChecksumConfiguration");
- var resolveChecksumRuntimeConfig = __name((clientConfig) => {
+ };
+ var resolveChecksumRuntimeConfig = (clientConfig) => {
const runtimeConfig = {};
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
});
return runtimeConfig;
- }, "resolveChecksumRuntimeConfig");
- var getDefaultClientConfiguration = __name((runtimeConfig) => {
- return {
- ...getChecksumConfiguration(runtimeConfig)
- };
- }, "getDefaultClientConfiguration");
- var resolveDefaultRuntimeConfig = __name((config) => {
- return {
- ...resolveChecksumRuntimeConfig(config)
- };
- }, "resolveDefaultRuntimeConfig");
- var FieldPosition = ((FieldPosition2) => {
- FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER";
- FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER";
- return FieldPosition2;
- })(FieldPosition || {});
+ };
+ var getDefaultClientConfiguration = (runtimeConfig) => {
+ return getChecksumConfiguration(runtimeConfig);
+ };
+ var resolveDefaultRuntimeConfig = (config) => {
+ return resolveChecksumRuntimeConfig(config);
+ };
+ exports.FieldPosition = undefined;
+ (function(FieldPosition) {
+ FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
+ FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
+ })(exports.FieldPosition || (exports.FieldPosition = {}));
var SMITHY_CONTEXT_KEY = "__smithy_context";
- var IniSectionType = ((IniSectionType2) => {
- IniSectionType2["PROFILE"] = "profile";
- IniSectionType2["SSO_SESSION"] = "sso-session";
- IniSectionType2["SERVICES"] = "services";
- return IniSectionType2;
- })(IniSectionType || {});
- var RequestHandlerProtocol = ((RequestHandlerProtocol2) => {
- RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9";
- RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0";
- RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0";
- return RequestHandlerProtocol2;
- })(RequestHandlerProtocol || {});
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/r
-var require_dist_cjs2 = __commonJS((exports, module) => {
+ exports.IniSectionType = undefined;
+ (function(IniSectionType) {
+ IniSectionType["PROFILE"] = "profile";
+ IniSectionType["SSO_SESSION"] = "sso-session";
+ IniSectionType["SERVICES"] = "services";
+ })(exports.IniSectionType || (exports.IniSectionType = {}));
+ exports.RequestHandlerProtocol = undefined;
+ (function(RequestHandlerProtocol) {
+ RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
+ RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
+ RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
+ })(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
+ exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY;
+ exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
+ exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submod
+var require_dist_cjs2 = __commonJS((exports) => {
var cloneQuery = function(query) {
return Object.keys(query).reduce((carry, paramName) => {
const param = query[paramName];
@@ -4231,60 +4285,34 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;
return hostPattern.test(hostname);
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- Field: () => Field,
- Fields: () => Fields,
- HttpRequest: () => HttpRequest,
- HttpResponse: () => HttpResponse,
- getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,
- isValidHostname: () => isValidHostname,
- resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig
- });
- module.exports = __toCommonJS(src_exports);
- var getHttpHandlerExtensionConfiguration = __name((runtimeConfig) => {
- let httpHandler = runtimeConfig.httpHandler;
+ var types = require_dist_cjs();
+ var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
return {
setHttpHandler(handler) {
- httpHandler = handler;
+ runtimeConfig.httpHandler = handler;
},
httpHandler() {
- return httpHandler;
+ return runtimeConfig.httpHandler;
},
updateHttpClientConfig(key, value) {
- httpHandler.updateHttpClientConfig(key, value);
+ runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
},
httpHandlerConfigs() {
- return httpHandler.httpHandlerConfigs();
+ return runtimeConfig.httpHandler.httpHandlerConfigs();
}
};
- }, "getHttpHandlerExtensionConfiguration");
- var resolveHttpHandlerRuntimeConfig = __name((httpHandlerExtensionConfiguration) => {
+ };
+ var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
return {
httpHandler: httpHandlerExtensionConfiguration.httpHandler()
};
- }, "resolveHttpHandlerRuntimeConfig");
- var import_types = require_dist_cjs();
- var _Field = class _Field2 {
- constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {
+ };
+
+ class Field {
+ name;
+ kind;
+ values;
+ constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {
this.name = name;
this.kind = kind;
this.values = values;
@@ -4304,12 +4332,12 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
get() {
return this.values;
}
- };
- __name(_Field, "Field");
- var Field = _Field;
- var _Fields = class _Fields2 {
+ }
+
+ class Fields {
+ entries = {};
+ encoding;
constructor({ fields = [], encoding = "utf-8" }) {
- this.entries = {};
fields.forEach(this.setField.bind(this));
this.encoding = encoding;
}
@@ -4325,10 +4353,20 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
getByType(kind) {
return Object.values(this.entries).filter((field) => field.kind === kind);
}
- };
- __name(_Fields, "Fields");
- var Fields = _Fields;
- var _HttpRequest = class _HttpRequest2 {
+ }
+
+ class HttpRequest {
+ method;
+ protocol;
+ hostname;
+ port;
+ path;
+ query;
+ headers;
+ username;
+ password;
+ fragment;
+ body;
constructor(options) {
this.method = options.method || "GET";
this.hostname = options.hostname || "localhost";
@@ -4342,26 +4380,33 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
this.password = options.password;
this.fragment = options.fragment;
}
+ static clone(request) {
+ const cloned = new HttpRequest({
+ ...request,
+ headers: { ...request.headers }
+ });
+ if (cloned.query) {
+ cloned.query = cloneQuery(cloned.query);
+ }
+ return cloned;
+ }
static isInstance(request) {
- if (!request)
+ if (!request) {
return false;
+ }
const req = request;
return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
}
clone() {
- const cloned = new _HttpRequest2({
- ...this,
- headers: { ...this.headers }
- });
- if (cloned.query)
- cloned.query = cloneQuery(cloned.query);
- return cloned;
+ return HttpRequest.clone(this);
}
- };
- __name(_HttpRequest, "HttpRequest");
- var HttpRequest = _HttpRequest;
- __name(cloneQuery, "cloneQuery");
- var _HttpResponse = class _HttpResponse2 {
+ }
+
+ class HttpResponse {
+ statusCode;
+ reason;
+ headers;
+ body;
constructor(options) {
this.statusCode = options.statusCode;
this.reason = options.reason;
@@ -4374,22 +4419,28 @@ var require_dist_cjs2 = __commonJS((exports, module) => {
const resp = response;
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
}
- };
- __name(_HttpResponse, "HttpResponse");
- var HttpResponse = _HttpResponse;
- __name(isValidHostname, "isValidHostname");
+ }
+ exports.Field = Field;
+ exports.Fields = Fields;
+ exports.HttpRequest = HttpRequest;
+ exports.HttpResponse = HttpResponse;
+ exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
+ exports.isValidHostname = isValidHostname;
+ exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolve
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/
var require_dist_cjs3 = __commonJS((exports, module) => {
var addExpectContinueMiddleware = function(options) {
return (next) => async (args) => {
const { request } = args;
if (import_protocol_http.HttpRequest.isInstance(request) && request.body && options.runtime === "node") {
- request.headers = {
- ...request.headers,
- Expect: "100-continue"
- };
+ if (options.requestHandler?.constructor?.name !== "FetchHttpHandler") {
+ request.headers = {
+ ...request.headers,
+ Expect: "100-continue"
+ };
+ }
}
return next({
...args,
@@ -4415,13 +4466,13 @@ var require_dist_cjs3 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
+ var index_exports = {};
+ __export2(index_exports, {
addExpectContinueMiddleware: () => addExpectContinueMiddleware,
addExpectContinueMiddlewareOptions: () => addExpectContinueMiddlewareOptions,
getAddExpectContinuePlugin: () => getAddExpectContinuePlugin
});
- module.exports = __toCommonJS(src_exports);
+ module.exports = __toCommonJS(index_exports);
var import_protocol_http = require_dist_cjs2();
__name(addExpectContinueMiddleware, "addExpectContinueMiddleware");
var addExpectContinueMiddlewareOptions = {
@@ -4431,535 +4482,643 @@ var require_dist_cjs3 = __commonJS((exports, module) => {
override: true
};
var getAddExpectContinuePlugin = __name((options) => ({
- applyToStack: (clientStack) => {
+ applyToStack: __name((clientStack) => {
clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);
- }
+ }, "applyToStack")
}), "getAddExpectContinuePlugin");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jss
-var require_dist_cjs4 = __commonJS((exports, module) => {
- var resolveHostHeaderConfig = function(input) {
- return input;
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getHostHeaderPlugin: () => getHostHeaderPlugin,
- hostHeaderMiddleware: () => hostHeaderMiddleware,
- hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,
- resolveHostHeaderConfig: () => resolveHostHeaderConfig
- });
- module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- __name(resolveHostHeaderConfig, "resolveHostHeaderConfig");
- var hostHeaderMiddleware = __name((options) => (next) => async (args) => {
- if (!import_protocol_http.HttpRequest.isInstance(args.request))
- return next(args);
- const { request } = args;
- const { handlerProtocol = "" } = options.requestHandler.metadata || {};
- if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
- delete request.headers["host"];
- request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
- } else if (!request.headers["host"]) {
- let host = request.hostname;
- if (request.port != null)
- host += `:${request.port}`;
- request.headers["host"] = host;
- }
- return next(args);
- }, "hostHeaderMiddleware");
- var hostHeaderMiddlewareOptions = {
- name: "hostHeaderMiddleware",
- step: "build",
- priority: "low",
- tags: ["HOST"],
- override: true
- };
- var getHostHeaderPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
- }
- }), "getHostHeaderPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rulese
-var require_dist_cjs5 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getLoggerPlugin: () => getLoggerPlugin,
- loggerMiddleware: () => loggerMiddleware,
- loggerMiddlewareOptions: () => loggerMiddlewareOptions
- });
- module.exports = __toCommonJS(src_exports);
- var loggerMiddleware = __name(() => (next, context) => async (args) => {
- var _a, _b;
- try {
- const response = await next(args);
- const { clientName, commandName, logger: logger4, dynamoDbDocumentClientOptions = {} } = context;
- const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
- const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
- const { $metadata, ...outputWithoutMetadata } = response.output;
- (_a = logger4 == null ? undefined : logger4.info) == null || _a.call(logger4, {
- clientName,
- commandName,
- input: inputFilterSensitiveLog(args.input),
- output: outputFilterSensitiveLog(outputWithoutMetadata),
- metadata: $metadata
- });
- return response;
- } catch (error) {
- const { clientName, commandName, logger: logger4, dynamoDbDocumentClientOptions = {} } = context;
- const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
- (_b = logger4 == null ? undefined : logger4.error) == null || _b.call(logger4, {
- clientName,
- commandName,
- input: inputFilterSensitiveLog(args.input),
- error,
- metadata: error.$metadata
+// node_modules/@aws-sdk/neste
+var require_tslib = __commonJS((exports, module) => {
+ var __extends;
+ var __assign;
+ var __rest;
+ var __decorate;
+ var __param;
+ var __esDecorate;
+ var __runInitializers;
+ var __propKey;
+ var __setFunctionName;
+ var __metadata;
+ var __awaiter;
+ var __generator;
+ var __exportStar;
+ var __values;
+ var __read;
+ var __spread;
+ var __spreadArrays;
+ var __spreadArray;
+ var __await;
+ var __asyncGenerator;
+ var __asyncDelegator;
+ var __asyncValues;
+ var __makeTemplateObject;
+ var __importStar;
+ var __importDefault;
+ var __classPrivateFieldGet;
+ var __classPrivateFieldSet;
+ var __classPrivateFieldIn;
+ var __createBinding;
+ var __addDisposableResource;
+ var __disposeResources;
+ var __rewriteRelativeImportExtension;
+ (function(factory) {
+ var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
+ if (typeof define === "function" && define.amd) {
+ define("tslib", ["exports"], function(exports2) {
+ factory(createExporter(root, createExporter(exports2)));
});
- throw error;
- }
- }, "loggerMiddleware");
- var loggerMiddlewareOptions = {
- name: "loggerMiddleware",
- tags: ["LOGGER"],
- step: "initialize",
- override: true
- };
- var getLoggerPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
- }
- }), "getLoggerPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.js
-var require_dist_cjs6 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,
- getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,
- recursionDetectionMiddleware: () => recursionDetectionMiddleware
- });
- module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
- var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
- var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
- var recursionDetectionMiddleware = __name((options) => (next) => async (args) => {
- const { request } = args;
- if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== "node" || request.headers.hasOwnProperty(TRACE_ID_HEADER_NAME)) {
- return next(args);
- }
- const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
- const traceId = process.env[ENV_TRACE_ID];
- const nonEmptyString = __name((str) => typeof str === "string" && str.length > 0, "nonEmptyString");
- if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
- request.headers[TRACE_ID_HEADER_NAME] = traceId;
- }
- return next({
- ...args,
- request
- });
- }, "recursionDetectionMiddleware");
- var addRecursionDetectionMiddlewareOptions = {
- step: "build",
- tags: ["RECURSION_DETECTION"],
- name: "recursionDetectionMiddleware",
- override: true,
- priority: "low"
- };
- var getRecursionDetectionPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);
- }
- }), "getRecursionDetectionPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs7 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- constructStack: () => constructStack
- });
- module.exports = __toCommonJS(src_exports);
- var getAllAliases = __name((name, aliases) => {
- const _aliases = [];
- if (name) {
- _aliases.push(name);
- }
- if (aliases) {
- for (const alias of aliases) {
- _aliases.push(alias);
- }
+ } else if (typeof module === "object" && typeof exports === "object") {
+ factory(createExporter(root, createExporter(exports)));
+ } else {
+ factory(createExporter(root));
}
- return _aliases;
- }, "getAllAliases");
- var getMiddlewareNameWithAliases = __name((name, aliases) => {
- return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
- }, "getMiddlewareNameWithAliases");
- var constructStack = __name(() => {
- let absoluteEntries = [];
- let relativeEntries = [];
- let identifyOnResolve = false;
- const entriesNameSet = new Set;
- const sort = __name((entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]), "sort");
- const removeByName = __name((toRemove) => {
- let isRemoved = false;
- const filterCb = __name((entry) => {
- const aliases = getAllAliases(entry.name, entry.aliases);
- if (aliases.includes(toRemove)) {
- isRemoved = true;
- for (const alias of aliases) {
- entriesNameSet.delete(alias);
- }
- return false;
- }
- return true;
- }, "filterCb");
- absoluteEntries = absoluteEntries.filter(filterCb);
- relativeEntries = relativeEntries.filter(filterCb);
- return isRemoved;
- }, "removeByName");
- const removeByReference = __name((toRemove) => {
- let isRemoved = false;
- const filterCb = __name((entry) => {
- if (entry.middleware === toRemove) {
- isRemoved = true;
- for (const alias of getAllAliases(entry.name, entry.aliases)) {
- entriesNameSet.delete(alias);
- }
- return false;
- }
- return true;
- }, "filterCb");
- absoluteEntries = absoluteEntries.filter(filterCb);
- relativeEntries = relativeEntries.filter(filterCb);
- return isRemoved;
- }, "removeByReference");
- const cloneTo = __name((toStack) => {
- var _a;
- absoluteEntries.forEach((entry) => {
- toStack.add(entry.middleware, { ...entry });
- });
- relativeEntries.forEach((entry) => {
- toStack.addRelativeTo(entry.middleware, { ...entry });
- });
- (_a = toStack.identifyOnResolve) == null || _a.call(toStack, stack.identifyOnResolve());
- return toStack;
- }, "cloneTo");
- const expandRelativeMiddlewareList = __name((from) => {
- const expandedMiddlewareList = [];
- from.before.forEach((entry) => {
- if (entry.before.length === 0 && entry.after.length === 0) {
- expandedMiddlewareList.push(entry);
- } else {
- expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
- }
- });
- expandedMiddlewareList.push(from);
- from.after.reverse().forEach((entry) => {
- if (entry.before.length === 0 && entry.after.length === 0) {
- expandedMiddlewareList.push(entry);
+ function createExporter(exports2, previous) {
+ if (exports2 !== root) {
+ if (typeof Object.create === "function") {
+ Object.defineProperty(exports2, "__esModule", { value: true });
} else {
- expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
+ exports2.__esModule = true;
}
- });
- return expandedMiddlewareList;
- }, "expandRelativeMiddlewareList");
- const getMiddlewareList = __name((debug = false) => {
- const normalizedAbsoluteEntries = [];
- const normalizedRelativeEntries = [];
- const normalizedEntriesNameMap = {};
- absoluteEntries.forEach((entry) => {
- const normalizedEntry = {
- ...entry,
- before: [],
- after: []
- };
- for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
- normalizedEntriesNameMap[alias] = normalizedEntry;
+ }
+ return function(id, v) {
+ return exports2[id] = previous ? previous(id, v) : v;
+ };
+ }
+ })(function(exporter) {
+ var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
+ d.__proto__ = b;
+ } || function(d, b) {
+ for (var p in b)
+ if (Object.prototype.hasOwnProperty.call(b, p))
+ d[p] = b[p];
+ };
+ __extends = function(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() {
+ this.constructor = d;
+ }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
+ };
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length;i < n; i++) {
+ s = arguments[i];
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ __rest = function(s, e) {
+ var t = {};
+ for (var p in s)
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
}
- normalizedAbsoluteEntries.push(normalizedEntry);
- });
- relativeEntries.forEach((entry) => {
- const normalizedEntry = {
- ...entry,
- before: [],
- after: []
+ return t;
+ };
+ __decorate = function(decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
+ r = Reflect.decorate(decorators, target, key, desc);
+ else
+ for (var i = decorators.length - 1;i >= 0; i--)
+ if (d = decorators[i])
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+ };
+ __param = function(paramIndex, decorator) {
+ return function(target, key) {
+ decorator(target, key, paramIndex);
+ };
+ };
+ __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
+ function accept(f) {
+ if (f !== undefined && typeof f !== "function")
+ throw new TypeError("Function expected");
+ return f;
+ }
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
+ var _, done = false;
+ for (var i = decorators.length - 1;i >= 0; i--) {
+ var context = {};
+ for (var p in contextIn)
+ context[p] = p === "access" ? {} : contextIn[p];
+ for (var p in contextIn.access)
+ context.access[p] = contextIn.access[p];
+ context.addInitializer = function(f) {
+ if (done)
+ throw new TypeError("Cannot add initializers after decoration has completed");
+ extraInitializers.push(accept(f || null));
};
- for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
- normalizedEntriesNameMap[alias] = normalizedEntry;
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
+ if (kind === "accessor") {
+ if (result === undefined)
+ continue;
+ if (result === null || typeof result !== "object")
+ throw new TypeError("Object expected");
+ if (_ = accept(result.get))
+ descriptor.get = _;
+ if (_ = accept(result.set))
+ descriptor.set = _;
+ if (_ = accept(result.init))
+ initializers.unshift(_);
+ } else if (_ = accept(result)) {
+ if (kind === "field")
+ initializers.unshift(_);
+ else
+ descriptor[key] = _;
}
- normalizedRelativeEntries.push(normalizedEntry);
- });
- normalizedRelativeEntries.forEach((entry) => {
- if (entry.toMiddleware) {
- const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
- if (toMiddleware === undefined) {
- if (debug) {
- return;
- }
- throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
- }
- if (entry.relation === "after") {
- toMiddleware.after.push(entry);
+ }
+ if (target)
+ Object.defineProperty(target, contextIn.name, descriptor);
+ done = true;
+ };
+ __runInitializers = function(thisArg, initializers, value) {
+ var useValue = arguments.length > 2;
+ for (var i = 0;i < initializers.length; i++) {
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
+ }
+ return useValue ? value : undefined;
+ };
+ __propKey = function(x) {
+ return typeof x === "symbol" ? x : "".concat(x);
+ };
+ __setFunctionName = function(f, name, prefix) {
+ if (typeof name === "symbol")
+ name = name.description ? "[".concat(name.description, "]") : "";
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
+ };
+ __metadata = function(metadataKey, metadataValue) {
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
+ return Reflect.metadata(metadataKey, metadataValue);
+ };
+ __awaiter = function(thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P ? value : new P(function(resolve) {
+ resolve(value);
+ });
+ }
+ return new (P || (P = Promise))(function(resolve, reject) {
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e) {
+ reject(e);
}
- if (entry.relation === "before") {
- toMiddleware.before.push(entry);
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e) {
+ reject(e);
}
}
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
});
- const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
- wholeList.push(...expandedMiddlewareList);
- return wholeList;
- }, []);
- return mainChain;
- }, "getMiddlewareList");
- const stack = {
- add: (middleware, options = {}) => {
- const { name, override, aliases: _aliases } = options;
- const entry = {
- step: "initialize",
- priority: "normal",
- middleware,
- ...options
+ };
+ __generator = function(thisArg, body) {
+ var _ = { label: 0, sent: function() {
+ if (t[0] & 1)
+ throw t[1];
+ return t[1];
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
+ return this;
+ }), g;
+ function verb(n) {
+ return function(v) {
+ return step([n, v]);
};
- const aliases = getAllAliases(name, _aliases);
- if (aliases.length > 0) {
- if (aliases.some((alias) => entriesNameSet.has(alias))) {
- if (!override)
- throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
- for (const alias of aliases) {
- const toOverrideIndex = absoluteEntries.findIndex((entry2) => {
- var _a;
- return entry2.name === alias || ((_a = entry2.aliases) == null ? undefined : _a.some((a) => a === alias));
- });
- if (toOverrideIndex === -1) {
+ }
+ function step(op) {
+ if (f)
+ throw new TypeError("Generator is already executing.");
+ while (g && (g = 0, op[0] && (_ = 0)), _)
+ try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
+ return t;
+ if (y = 0, t)
+ op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0:
+ case 1:
+ t = op;
+ break;
+ case 4:
+ _.label++;
+ return { value: op[1], done: false };
+ case 5:
+ _.label++;
+ y = op[1];
+ op = [0];
+ continue;
+ case 7:
+ op = _.ops.pop();
+ _.trys.pop();
+ continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
+ _ = 0;
+ continue;
+ }
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
+ _.label = op[1];
+ break;
+ }
+ if (op[0] === 6 && _.label < t[1]) {
+ _.label = t[1];
+ t = op;
+ break;
+ }
+ if (t && _.label < t[2]) {
+ _.label = t[2];
+ _.ops.push(op);
+ break;
+ }
+ if (t[2])
+ _.ops.pop();
+ _.trys.pop();
continue;
- }
- const toOverride = absoluteEntries[toOverrideIndex];
- if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
- throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`);
- }
- absoluteEntries.splice(toOverrideIndex, 1);
}
+ op = body.call(thisArg, _);
+ } catch (e) {
+ op = [6, e];
+ y = 0;
+ } finally {
+ f = t = 0;
}
- for (const alias of aliases) {
- entriesNameSet.add(alias);
+ if (op[0] & 5)
+ throw op[1];
+ return { value: op[0] ? op[1] : undefined, done: true };
+ }
+ };
+ __exportStar = function(m, o) {
+ for (var p in m)
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
+ __createBinding(o, m, p);
+ };
+ __createBinding = Object.create ? function(o, m, k, k2) {
+ if (k2 === undefined)
+ k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() {
+ return m[k];
+ } };
+ }
+ Object.defineProperty(o, k2, desc);
+ } : function(o, m, k, k2) {
+ if (k2 === undefined)
+ k2 = k;
+ o[k2] = m[k];
+ };
+ __values = function(o) {
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
+ if (m)
+ return m.call(o);
+ if (o && typeof o.length === "number")
+ return {
+ next: function() {
+ if (o && i >= o.length)
+ o = undefined;
+ return { value: o && o[i++], done: !o };
}
- }
- absoluteEntries.push(entry);
- },
- addRelativeTo: (middleware, options) => {
- const { name, override, aliases: _aliases } = options;
- const entry = {
- middleware,
- ...options
};
- const aliases = getAllAliases(name, _aliases);
- if (aliases.length > 0) {
- if (aliases.some((alias) => entriesNameSet.has(alias))) {
- if (!override)
- throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
- for (const alias of aliases) {
- const toOverrideIndex = relativeEntries.findIndex((entry2) => {
- var _a;
- return entry2.name === alias || ((_a = entry2.aliases) == null ? undefined : _a.some((a) => a === alias));
- });
- if (toOverrideIndex === -1) {
- continue;
- }
- const toOverride = relativeEntries[toOverrideIndex];
- if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
- throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`);
- }
- relativeEntries.splice(toOverrideIndex, 1);
- }
- }
- for (const alias of aliases) {
- entriesNameSet.add(alias);
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
+ };
+ __read = function(o, n) {
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
+ if (!m)
+ return o;
+ var i = m.call(o), r, ar = [], e;
+ try {
+ while ((n === undefined || n-- > 0) && !(r = i.next()).done)
+ ar.push(r.value);
+ } catch (error) {
+ e = { error };
+ } finally {
+ try {
+ if (r && !r.done && (m = i["return"]))
+ m.call(i);
+ } finally {
+ if (e)
+ throw e.error;
+ }
+ }
+ return ar;
+ };
+ __spread = function() {
+ for (var ar = [], i = 0;i < arguments.length; i++)
+ ar = ar.concat(__read(arguments[i]));
+ return ar;
+ };
+ __spreadArrays = function() {
+ for (var s = 0, i = 0, il = arguments.length;i < il; i++)
+ s += arguments[i].length;
+ for (var r = Array(s), k = 0, i = 0;i < il; i++)
+ for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
+ r[k] = a[j];
+ return r;
+ };
+ __spreadArray = function(to, from, pack) {
+ if (pack || arguments.length === 2)
+ for (var i = 0, l = from.length, ar;i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar)
+ ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
}
}
- relativeEntries.push(entry);
- },
- clone: () => cloneTo(constructStack()),
- use: (plugin) => {
- plugin.applyToStack(stack);
- },
- remove: (toRemove) => {
- if (typeof toRemove === "string")
- return removeByName(toRemove);
- else
- return removeByReference(toRemove);
- },
- removeByTag: (toRemove) => {
- let isRemoved = false;
- const filterCb = __name((entry) => {
- const { tags, name, aliases: _aliases } = entry;
- if (tags && tags.includes(toRemove)) {
- const aliases = getAllAliases(name, _aliases);
- for (const alias of aliases) {
- entriesNameSet.delete(alias);
+ return to.concat(ar || Array.prototype.slice.call(from));
+ };
+ __await = function(v) {
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
+ };
+ __asyncGenerator = function(thisArg, _arguments, generator) {
+ if (!Symbol.asyncIterator)
+ throw new TypeError("Symbol.asyncIterator is not defined.");
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
+ return this;
+ }, i;
+ function awaitReturn(f) {
+ return function(v) {
+ return Promise.resolve(v).then(f, reject);
+ };
+ }
+ function verb(n, f) {
+ if (g[n]) {
+ i[n] = function(v) {
+ return new Promise(function(a, b) {
+ q.push([n, v, a, b]) > 1 || resume(n, v);
+ });
+ };
+ if (f)
+ i[n] = f(i[n]);
+ }
+ }
+ function resume(n, v) {
+ try {
+ step(g[n](v));
+ } catch (e) {
+ settle(q[0][3], e);
+ }
+ }
+ function step(r) {
+ r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
+ }
+ function fulfill(value) {
+ resume("next", value);
+ }
+ function reject(value) {
+ resume("throw", value);
+ }
+ function settle(f, v) {
+ if (f(v), q.shift(), q.length)
+ resume(q[0][0], q[0][1]);
+ }
+ };
+ __asyncDelegator = function(o) {
+ var i, p;
+ return i = {}, verb("next"), verb("throw", function(e) {
+ throw e;
+ }), verb("return"), i[Symbol.iterator] = function() {
+ return this;
+ }, i;
+ function verb(n, f) {
+ i[n] = o[n] ? function(v) {
+ return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
+ } : f;
+ }
+ };
+ __asyncValues = function(o) {
+ if (!Symbol.asyncIterator)
+ throw new TypeError("Symbol.asyncIterator is not defined.");
+ var m = o[Symbol.asyncIterator], i;
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
+ return this;
+ }, i);
+ function verb(n) {
+ i[n] = o[n] && function(v) {
+ return new Promise(function(resolve, reject) {
+ v = o[n](v), settle(resolve, reject, v.done, v.value);
+ });
+ };
+ }
+ function settle(resolve, reject, d, v) {
+ Promise.resolve(v).then(function(v2) {
+ resolve({ value: v2, done: d });
+ }, reject);
+ }
+ };
+ __makeTemplateObject = function(cooked, raw) {
+ if (Object.defineProperty) {
+ Object.defineProperty(cooked, "raw", { value: raw });
+ } else {
+ cooked.raw = raw;
+ }
+ return cooked;
+ };
+ var __setModuleDefault = Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ };
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
+ var ar = [];
+ for (var k in o2)
+ if (Object.prototype.hasOwnProperty.call(o2, k))
+ ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
+ };
+ __importStar = function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k = ownKeys(mod), i = 0;i < k.length; i++)
+ if (k[i] !== "default")
+ __createBinding(result, mod, k[i]);
+ }
+ __setModuleDefault(result, mod);
+ return result;
+ };
+ __importDefault = function(mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ };
+ __classPrivateFieldGet = function(receiver, state, kind, f) {
+ if (kind === "a" && !f)
+ throw new TypeError("Private accessor was defined without a getter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
+ };
+ __classPrivateFieldSet = function(receiver, state, value, kind, f) {
+ if (kind === "m")
+ throw new TypeError("Private method is not writable");
+ if (kind === "a" && !f)
+ throw new TypeError("Private accessor was defined without a setter");
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
+ };
+ __classPrivateFieldIn = function(state, receiver) {
+ if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
+ throw new TypeError("Cannot use 'in' operator on non-object");
+ return typeof state === "function" ? receiver === state : state.has(receiver);
+ };
+ __addDisposableResource = function(env, value, async) {
+ if (value !== null && value !== undefined) {
+ if (typeof value !== "object" && typeof value !== "function")
+ throw new TypeError("Object expected.");
+ var dispose, inner;
+ if (async) {
+ if (!Symbol.asyncDispose)
+ throw new TypeError("Symbol.asyncDispose is not defined.");
+ dispose = value[Symbol.asyncDispose];
+ }
+ if (dispose === undefined) {
+ if (!Symbol.dispose)
+ throw new TypeError("Symbol.dispose is not defined.");
+ dispose = value[Symbol.dispose];
+ if (async)
+ inner = dispose;
+ }
+ if (typeof dispose !== "function")
+ throw new TypeError("Object not disposable.");
+ if (inner)
+ dispose = function() {
+ try {
+ inner.call(this);
+ } catch (e) {
+ return Promise.reject(e);
}
- isRemoved = true;
- return false;
+ };
+ env.stack.push({ value, dispose, async });
+ } else if (async) {
+ env.stack.push({ async: true });
+ }
+ return value;
+ };
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
+ var e = new Error(message);
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
+ };
+ __disposeResources = function(env) {
+ function fail(e) {
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
+ env.hasError = true;
+ }
+ var r, s = 0;
+ function next() {
+ while (r = env.stack.pop()) {
+ try {
+ if (!r.async && s === 1)
+ return s = 0, env.stack.push(r), Promise.resolve().then(next);
+ if (r.dispose) {
+ var result = r.dispose.call(r.value);
+ if (r.async)
+ return s |= 2, Promise.resolve(result).then(next, function(e) {
+ fail(e);
+ return next();
+ });
+ } else
+ s |= 1;
+ } catch (e) {
+ fail(e);
}
- return true;
- }, "filterCb");
- absoluteEntries = absoluteEntries.filter(filterCb);
- relativeEntries = relativeEntries.filter(filterCb);
- return isRemoved;
- },
- concat: (from) => {
- var _a;
- const cloned = cloneTo(constructStack());
- cloned.use(from);
- cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (((_a = from.identifyOnResolve) == null ? undefined : _a.call(from)) ?? false));
- return cloned;
- },
- applyToStack: cloneTo,
- identify: () => {
- return getMiddlewareList(true).map((mw) => {
- const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
- return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
- });
- },
- identifyOnResolve(toggle) {
- if (typeof toggle === "boolean")
- identifyOnResolve = toggle;
- return identifyOnResolve;
- },
- resolve: (handler, context) => {
- for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
- handler = middleware(handler, context);
}
- if (identifyOnResolve) {
- console.log(stack.identify());
- }
- return handler;
+ if (s === 1)
+ return env.hasError ? Promise.reject(env.error) : Promise.resolve();
+ if (env.hasError)
+ throw env.error;
}
+ return next();
};
- return stack;
- }, "constructStack");
- var stepWeights = {
- initialize: 5,
- serialize: 4,
- build: 3,
- finalizeRequest: 2,
- deserialize: 1
- };
- var priorityWeights = {
- high: 3,
- normal: 2,
- low: 1
- };
+ __rewriteRelativeImportExtension = function(path, preserveJsx) {
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
+ });
+ }
+ return path;
+ };
+ exporter("__extends", __extends);
+ exporter("__assign", __assign);
+ exporter("__rest", __rest);
+ exporter("__decorate", __decorate);
+ exporter("__param", __param);
+ exporter("__esDecorate", __esDecorate);
+ exporter("__runInitializers", __runInitializers);
+ exporter("__propKey", __propKey);
+ exporter("__setFunctionName", __setFunctionName);
+ exporter("__metadata", __metadata);
+ exporter("__awaiter", __awaiter);
+ exporter("__generator", __generator);
+ exporter("__exportStar", __exportStar);
+ exporter("__createBinding", __createBinding);
+ exporter("__values", __values);
+ exporter("__read", __read);
+ exporter("__spread", __spread);
+ exporter("__spreadArrays", __spreadArrays);
+ exporter("__spreadArray", __spreadArray);
+ exporter("__await", __await);
+ exporter("__asyncGenerator", __asyncGenerator);
+ exporter("__asyncDelegator", __asyncDelegator);
+ exporter("__asyncValues", __asyncValues);
+ exporter("__makeTemplateObject", __makeTemplateObject);
+ exporter("__importStar", __importStar);
+ exporter("__importDefault", __importDefault);
+ exporter("__classPrivateFieldGet", __classPrivateFieldGet);
+ exporter("__classPrivateFieldSet", __classPrivateFieldSet);
+ exporter("__classPrivateFieldIn", __classPrivateFieldIn);
+ exporter("__addDisposableResource", __addDisposableResource);
+ exporter("__disposeResources", __disposeResources);
+ exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
+ });
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_dist_cjs8 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-o
+var require_client = __commonJS((exports, module) => {
+ var setCredentialFeature = function(credentials, feature, value) {
+ if (!credentials.$source) {
+ credentials.$source = {};
+ }
+ credentials.$source[feature] = value;
+ return credentials;
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var setFeature = function(context, feature, value) {
+ if (!context.__aws_sdk_context) {
+ context.__aws_sdk_context = {
+ features: {}
+ };
+ } else if (!context.__aws_sdk_context.features) {
+ context.__aws_sdk_context.features = {};
}
- return to;
+ context.__aws_sdk_context.features[feature] = value;
+ };
+ var setTokenFeature = function(token, feature, value) {
+ if (!token.$source) {
+ token.$source = {};
+ }
+ token.$source[feature] = value;
+ return token;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- isArrayBuffer: () => isArrayBuffer
- });
- module.exports = __toCommonJS(src_exports);
- var isArrayBuffer = __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs9 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -4978,111 +5137,194 @@ var require_dist_cjs9 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromArrayBuffer: () => fromArrayBuffer,
- fromString: () => fromString
+ var index_exports = {};
+ __export2(index_exports, {
+ emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
+ setCredentialFeature: () => setCredentialFeature,
+ setFeature: () => setFeature,
+ setTokenFeature: () => setTokenFeature,
+ state: () => state
});
- module.exports = __toCommonJS(src_exports);
- var import_is_array_buffer = require_dist_cjs8();
- var import_buffer = __require("buffer");
- var fromArrayBuffer = __name((input, offset = 0, length = input.byteLength - offset) => {
- if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {
- throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
- }
- return import_buffer.Buffer.from(input, offset, length);
- }, "fromArrayBuffer");
- var fromString = __name((input, encoding) => {
- if (typeof input !== "string") {
- throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
- }
- return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);
- }, "fromString");
-});
+ module.exports = __toCommonJS(index_exports);
+ var state = {
+ warningEmitted: false
+ };
+ var emitWarningIfUnsupportedVersion = __name((version) => {
+ if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) {
+ state.warningEmitted = true;
+ process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
+no longer support Node.js 16.x on January 6, 2025.
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_fromBase64 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.fromBase64 = undefined;
- var util_buffer_from_1 = require_dist_cjs9();
- var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
- var fromBase642 = (input) => {
- if (input.length * 3 % 4 !== 0) {
- throw new TypeError(`Incorrect padding on base64 string.`);
- }
- if (!BASE64_REGEX.exec(input)) {
- throw new TypeError(`Invalid base64 string.`);
+To continue receiving updates to AWS services, bug fixes, and security
+updates please upgrade to a supported Node.js LTS version.
+
+More information can be found at: https://a.co/74kJMmI`);
}
- const buffer = (0, util_buffer_from_1.fromString)(input, "base64");
- return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
- };
- exports.fromBase64 = fromBase642;
+ }, "emitWarningIfUnsupportedVersion");
+ __name(setCredentialFeature, "setCredentialFeature");
+ __name(setFeature, "setFeature");
+ __name(setTokenFeature, "setTokenFeature");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ru
-var require_toBase64 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.toBase64 = undefined;
- var util_buffer_from_1 = require_dist_cjs9();
- var toBase642 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
- exports.toBase64 = toBase642;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_dist_cjs4 = __commonJS((exports) => {
+ var types = require_dist_cjs();
+ var getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
+ var normalizeProvider = (input) => {
+ if (typeof input === "function")
+ return input;
+ const promisified = Promise.resolve(input);
+ return () => promisified;
+ };
+ exports.getSmithyContext = getSmithyContext;
+ exports.normalizeProvider = normalizeProvider;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_dist_cjs10 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs5 = __commonJS((exports) => {
+ var getSerdePlugin = function(config, serializer, deserializer) {
+ return {
+ applyToStack: (commandStack) => {
+ commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);
+ commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);
+ }
+ };
+ };
+ var protocolHttp = require_dist_cjs2();
+ var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
+ const { response } = await next(args);
+ try {
+ const parsed = await deserializer(response, options);
+ return {
+ response,
+ output: parsed
+ };
+ } catch (error) {
+ Object.defineProperty(error, "$response", {
+ value: response
+ });
+ if (!("$metadata" in error)) {
+ const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.\$response on this object.`;
+ try {
+ error.message += "\n " + hint;
+ } catch (e) {
+ if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
+ console.warn(hint);
+ } else {
+ context.logger?.warn?.(hint);
+ }
+ }
+ if (typeof error.$responseBodyText !== "undefined") {
+ if (error.$response) {
+ error.$response.body = error.$responseBodyText;
+ }
+ }
+ try {
+ if (protocolHttp.HttpResponse.isInstance(response)) {
+ const { headers = {} } = response;
+ const headerEntries = Object.entries(headers);
+ error.$metadata = {
+ httpStatusCode: response.statusCode,
+ requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
+ extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
+ cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
+ };
+ }
+ } catch (e) {
+ }
+ }
+ throw error;
}
- return to;
};
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- module.exports = __toCommonJS(src_exports);
- __reExport(src_exports, require_fromBase64(), module.exports);
- __reExport(src_exports, require_toBase64(), module.exports);
+ var findHeader = (pattern, headers) => {
+ return (headers.find(([k]) => {
+ return k.match(pattern);
+ }) || [undefined, undefined])[1];
+ };
+ var serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
+ const endpointConfig = options;
+ const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;
+ if (!endpoint) {
+ throw new Error("No valid endpoint provider available.");
+ }
+ const request = await serializer(args.input, { ...options, endpoint });
+ return next({
+ ...args,
+ request
+ });
+ };
+ var deserializerMiddlewareOption = {
+ name: "deserializerMiddleware",
+ step: "deserialize",
+ tags: ["DESERIALIZER"],
+ override: true
+ };
+ var serializerMiddlewareOption = {
+ name: "serializerMiddleware",
+ step: "serialize",
+ tags: ["SERIALIZER"],
+ override: true
+ };
+ exports.deserializerMiddleware = deserializerMiddleware;
+ exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
+ exports.getSerdePlugin = getSerdePlugin;
+ exports.serializerMiddleware = serializerMiddleware;
+ exports.serializerMiddlewareOption = serializerMiddlewareOption;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoi
-var require_dist_cjs11 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_dist_cjs6 = __commonJS((exports) => {
+ var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
+ exports.isArrayBuffer = isArrayBuffer;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs7 = __commonJS((exports) => {
+ var isArrayBuffer = require_dist_cjs6();
+ var buffer = __require("buffer");
+ var fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
+ if (!isArrayBuffer.isArrayBuffer(input)) {
+ throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
+ }
+ return buffer.Buffer.from(input, offset, length);
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var fromString = (input, encoding) => {
+ if (typeof input !== "string") {
+ throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
}
- return to;
+ return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input);
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromUtf8: () => fromUtf8,
- toUint8Array: () => toUint8Array,
- toUtf8: () => toUtf8
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_buffer_from = require_dist_cjs9();
- var fromUtf8 = __name((input) => {
- const buf = (0, import_util_buffer_from.fromString)(input, "utf8");
+ exports.fromArrayBuffer = fromArrayBuffer;
+ exports.fromString = fromString;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_fromBase64 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fromBase64 = undefined;
+ var util_buffer_from_1 = require_dist_cjs7();
+ var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
+ var fromBase64 = (input) => {
+ if (input.length * 3 % 4 !== 0) {
+ throw new TypeError(`Incorrect padding on base64 string.`);
+ }
+ if (!BASE64_REGEX.exec(input)) {
+ throw new TypeError(`Invalid base64 string.`);
+ }
+ const buffer = (0, util_buffer_from_1.fromString)(input, "base64");
+ return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
+ };
+ exports.fromBase64 = fromBase64;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
+var require_dist_cjs8 = __commonJS((exports) => {
+ var utilBufferFrom = require_dist_cjs7();
+ var fromUtf8 = (input) => {
+ const buf = utilBufferFrom.fromString(input, "utf8");
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
- }, "fromUtf8");
- var toUint8Array = __name((data) => {
+ };
+ var toUint8Array = (data) => {
if (typeof data === "string") {
return fromUtf8(data);
}
@@ -5090,16 +5332,412 @@ var require_dist_cjs11 = __commonJS((exports, module) => {
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
}
return new Uint8Array(data);
- }, "toUint8Array");
- var toUtf8 = __name((input) => (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"), "toUtf8");
+ };
+ var toUtf8 = (input) => {
+ if (typeof input === "string") {
+ return input;
+ }
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
+ throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
+ }
+ return utilBufferFrom.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
+ };
+ exports.fromUtf8 = fromUtf8;
+ exports.toUint8Array = toUint8Array;
+ exports.toUtf8 = toUtf8;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodu
+var require_toBase64 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.toBase64 = undefined;
+ var util_buffer_from_1 = require_dist_cjs7();
+ var util_utf8_1 = require_dist_cjs8();
+ var toBase64 = (_input) => {
+ let input;
+ if (typeof _input === "string") {
+ input = (0, util_utf8_1.fromUtf8)(_input);
+ } else {
+ input = _input;
+ }
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
+ throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
+ }
+ return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
+ };
+ exports.toBase64 = toBase64;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var require_dist_cjs9 = __commonJS((exports) => {
+ var fromBase64 = require_fromBase64();
+ var toBase64 = require_toBase64();
+ Object.keys(fromBase64).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return fromBase64[k];
+ }
+ });
+ });
+ Object.keys(toBase64).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return toBase64[k];
+ }
+ });
+ });
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/en
+var require_ChecksumStream = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ChecksumStream = undefined;
+ var util_base64_1 = require_dist_cjs9();
+ var stream_1 = __require("stream");
+
+ class ChecksumStream extends stream_1.Duplex {
+ expectedChecksum;
+ checksumSourceLocation;
+ checksum;
+ source;
+ base64Encoder;
+ constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
+ super();
+ if (typeof source.pipe === "function") {
+ this.source = source;
+ } else {
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
+ }
+ this.base64Encoder = base64Encoder ?? util_base64_1.toBase64;
+ this.expectedChecksum = expectedChecksum;
+ this.checksum = checksum;
+ this.checksumSourceLocation = checksumSourceLocation;
+ this.source.pipe(this);
+ }
+ _read(size) {
+ }
+ _write(chunk, encoding, callback) {
+ try {
+ this.checksum.update(chunk);
+ this.push(chunk);
+ } catch (e) {
+ return callback(e);
+ }
+ return callback();
+ }
+ async _final(callback) {
+ try {
+ const digest = await this.checksum.digest();
+ const received = this.base64Encoder(digest);
+ if (this.expectedChecksum !== received) {
+ return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + ` in response header "${this.checksumSourceLocation}".`));
+ }
+ } catch (e) {
+ return callback(e);
+ }
+ this.push(null);
+ return callback();
+ }
+ }
+ exports.ChecksumStream = ChecksumStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-o
+var require_stream_type_check = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.isBlob = exports.isReadableStream = undefined;
+ var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
+ exports.isReadableStream = isReadableStream;
+ var isBlob = (blob) => {
+ return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
+ };
+ exports.isBlob = isBlob;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/r
+var require_ChecksumStream_browser = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ChecksumStream = undefined;
+ var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {
+ };
+
+ class ChecksumStream extends ReadableStreamRef {
+ }
+ exports.ChecksumStream = ChecksumStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset
+var require_createChecksumStream_browser = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createChecksumStream = undefined;
+ var util_base64_1 = require_dist_cjs9();
+ var stream_type_check_1 = require_stream_type_check();
+ var ChecksumStream_browser_1 = require_ChecksumStream_browser();
+ var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
+ if (!(0, stream_type_check_1.isReadableStream)(source)) {
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
+ }
+ const encoder = base64Encoder ?? util_base64_1.toBase64;
+ if (typeof TransformStream !== "function") {
+ throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
+ }
+ const transform = new TransformStream({
+ start() {
+ },
+ async transform(chunk, controller) {
+ checksum.update(chunk);
+ controller.enqueue(chunk);
+ },
+ async flush(controller) {
+ const digest = await checksum.digest();
+ const received = encoder(digest);
+ if (expectedChecksum !== received) {
+ const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + ` in response header "${checksumSourceLocation}".`);
+ controller.error(error);
+ } else {
+ controller.terminate();
+ }
+ }
+ });
+ source.pipeThrough(transform);
+ const readable = transform.readable;
+ Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
+ return readable;
+ };
+ exports.createChecksumStream = createChecksumStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint
+var require_createChecksumStream = __commonJS((exports) => {
+ var createChecksumStream = function(init) {
+ if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) {
+ return (0, createChecksumStream_browser_1.createChecksumStream)(init);
+ }
+ return new ChecksumStream_1.ChecksumStream(init);
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createChecksumStream = createChecksumStream;
+ var stream_type_check_1 = require_stream_type_check();
+ var ChecksumStream_1 = require_ChecksumStream();
+ var createChecksumStream_browser_1 = require_createChecksumStream_browser();
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_ByteArrayCollector = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ByteArrayCollector = undefined;
+
+ class ByteArrayCollector {
+ allocByteArray;
+ byteLength = 0;
+ byteArrays = [];
+ constructor(allocByteArray) {
+ this.allocByteArray = allocByteArray;
+ }
+ push(byteArray) {
+ this.byteArrays.push(byteArray);
+ this.byteLength += byteArray.byteLength;
+ }
+ flush() {
+ if (this.byteArrays.length === 1) {
+ const bytes = this.byteArrays[0];
+ this.reset();
+ return bytes;
+ }
+ const aggregation = this.allocByteArray(this.byteLength);
+ let cursor = 0;
+ for (let i = 0;i < this.byteArrays.length; ++i) {
+ const bytes = this.byteArrays[i];
+ aggregation.set(bytes, cursor);
+ cursor += bytes.byteLength;
+ }
+ this.reset();
+ return aggregation;
+ }
+ reset() {
+ this.byteArrays = [];
+ this.byteLength = 0;
+ }
+ }
+ exports.ByteArrayCollector = ByteArrayCollector;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoin
+var require_createBufferedReadableStream = __commonJS((exports) => {
+ var createBufferedReadableStream = function(upstream, size, logger4) {
+ const reader = upstream.getReader();
+ let streamBufferingLoggedWarning = false;
+ let bytesSeen = 0;
+ const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))];
+ let mode = -1;
+ const pull = async (controller) => {
+ const { value, done } = await reader.read();
+ const chunk = value;
+ if (done) {
+ if (mode !== -1) {
+ const remainder = flush(buffers, mode);
+ if (sizeOf(remainder) > 0) {
+ controller.enqueue(remainder);
+ }
+ }
+ controller.close();
+ } else {
+ const chunkMode = modeOf(chunk, false);
+ if (mode !== chunkMode) {
+ if (mode >= 0) {
+ controller.enqueue(flush(buffers, mode));
+ }
+ mode = chunkMode;
+ }
+ if (mode === -1) {
+ controller.enqueue(chunk);
+ return;
+ }
+ const chunkSize = sizeOf(chunk);
+ bytesSeen += chunkSize;
+ const bufferSize = sizeOf(buffers[mode]);
+ if (chunkSize >= size && bufferSize === 0) {
+ controller.enqueue(chunk);
+ } else {
+ const newSize = merge(buffers, mode, chunk);
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
+ streamBufferingLoggedWarning = true;
+ logger4?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
+ }
+ if (newSize >= size) {
+ controller.enqueue(flush(buffers, mode));
+ } else {
+ await pull(controller);
+ }
+ }
+ }
+ };
+ return new ReadableStream({
+ pull
+ });
+ };
+ var merge = function(buffers, mode, chunk) {
+ switch (mode) {
+ case 0:
+ buffers[0] += chunk;
+ return sizeOf(buffers[0]);
+ case 1:
+ case 2:
+ buffers[mode].push(chunk);
+ return sizeOf(buffers[mode]);
+ }
+ };
+ var flush = function(buffers, mode) {
+ switch (mode) {
+ case 0:
+ const s = buffers[0];
+ buffers[0] = "";
+ return s;
+ case 1:
+ case 2:
+ return buffers[mode].flush();
+ }
+ throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
+ };
+ var sizeOf = function(chunk) {
+ return chunk?.byteLength ?? chunk?.length ?? 0;
+ };
+ var modeOf = function(chunk, allowBuffer = true) {
+ if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
+ return 2;
+ }
+ if (chunk instanceof Uint8Array) {
+ return 1;
+ }
+ if (typeof chunk === "string") {
+ return 0;
+ }
+ return -1;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createBufferedReadable = undefined;
+ exports.createBufferedReadableStream = createBufferedReadableStream;
+ exports.merge = merge;
+ exports.flush = flush;
+ exports.sizeOf = sizeOf;
+ exports.modeOf = modeOf;
+ var ByteArrayCollector_1 = require_ByteArrayCollector();
+ exports.createBufferedReadable = createBufferedReadableStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/e
+var require_createBufferedReadable = __commonJS((exports) => {
+ var createBufferedReadable = function(upstream, size, logger4) {
+ if ((0, stream_type_check_1.isReadableStream)(upstream)) {
+ return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger4);
+ }
+ const downstream = new node_stream_1.Readable({ read() {
+ } });
+ let streamBufferingLoggedWarning = false;
+ let bytesSeen = 0;
+ const buffers = [
+ "",
+ new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)),
+ new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
+ ];
+ let mode = -1;
+ upstream.on("data", (chunk) => {
+ const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);
+ if (mode !== chunkMode) {
+ if (mode >= 0) {
+ downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
+ }
+ mode = chunkMode;
+ }
+ if (mode === -1) {
+ downstream.push(chunk);
+ return;
+ }
+ const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);
+ bytesSeen += chunkSize;
+ const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);
+ if (chunkSize >= size && bufferSize === 0) {
+ downstream.push(chunk);
+ } else {
+ const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
+ streamBufferingLoggedWarning = true;
+ logger4?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
+ }
+ if (newSize >= size) {
+ downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
+ }
+ }
+ });
+ upstream.on("end", () => {
+ if (mode !== -1) {
+ const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);
+ if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {
+ downstream.push(remainder);
+ }
+ }
+ downstream.push(null);
+ });
+ return downstream;
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createBufferedReadable = createBufferedReadable;
+ var node_stream_1 = __require("node:stream");
+ var ByteArrayCollector_1 = require_ByteArrayCollector();
+ var createBufferedReadableStream_1 = require_createBufferedReadableStream();
+ var stream_type_check_1 = require_stream_type_check();
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsno
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoi
var require_getAwsChunkedEncodingStream = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAwsChunkedEncodingStream = undefined;
var stream_1 = __require("stream");
- var getAwsChunkedEncodingStream2 = (readableStream, options) => {
+ var getAwsChunkedEncodingStream = (readableStream, options) => {
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
const checksumRequired = base64Encoder !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
@@ -5122,210 +5760,329 @@ var require_getAwsChunkedEncodingStream = __commonJS((exports) => {
});
return awsChunkedEncodingStream;
};
- exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream2;
+ exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_dist_cjs12 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_headStream_browser = __commonJS((exports) => {
+ async function headStream(stream, bytes) {
+ let byteLengthCounter = 0;
+ const chunks = [];
+ const reader = stream.getReader();
+ let isDone = false;
+ while (!isDone) {
+ const { done, value } = await reader.read();
+ if (value) {
+ chunks.push(value);
+ byteLengthCounter += value?.byteLength ?? 0;
+ }
+ if (byteLengthCounter >= bytes) {
+ break;
+ }
+ isDone = done;
}
- return to;
+ reader.releaseLock();
+ const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
+ let offset = 0;
+ for (const chunk of chunks) {
+ if (chunk.byteLength > collected.byteLength - offset) {
+ collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
+ break;
+ } else {
+ collected.set(chunk, offset);
+ }
+ offset += chunk.length;
+ }
+ return collected;
+ }
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.headStream = headStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_headStream = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.headStream = undefined;
+ var stream_1 = __require("stream");
+ var headStream_browser_1 = require_headStream_browser();
+ var stream_type_check_1 = require_stream_type_check();
+ var headStream = (stream, bytes) => {
+ if ((0, stream_type_check_1.isReadableStream)(stream)) {
+ return (0, headStream_browser_1.headStream)(stream, bytes);
+ }
+ return new Promise((resolve, reject) => {
+ const collector = new Collector;
+ collector.limit = bytes;
+ stream.pipe(collector);
+ stream.on("error", (err) => {
+ collector.end();
+ reject(err);
+ });
+ collector.on("error", reject);
+ collector.on("finish", function() {
+ const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
+ resolve(bytes2);
+ });
+ });
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- escapeUri: () => escapeUri,
- escapeUriPath: () => escapeUriPath
- });
- module.exports = __toCommonJS(src_exports);
- var escapeUri = __name((uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode), "escapeUri");
- var hexEncode = __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, "hexEncode");
- var escapeUriPath = __name((uri) => uri.split("/").map(escapeUri).join("/"), "escapeUriPath");
+ exports.headStream = headStream;
+
+ class Collector extends stream_1.Writable {
+ buffers = [];
+ limit = Infinity;
+ bytesBuffered = 0;
+ _write(chunk, encoding, callback) {
+ this.buffers.push(chunk);
+ this.bytesBuffered += chunk.byteLength ?? 0;
+ if (this.bytesBuffered >= this.limit) {
+ const excess = this.bytesBuffered - this.limit;
+ const tailBuffer = this.buffers[this.buffers.length - 1];
+ this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
+ this.emit("finish");
+ }
+ callback();
+ }
+ }
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_dist_cjs10 = __commonJS((exports) => {
+ var escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
+ var hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
+ var escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/");
+ exports.escapeUri = escapeUri;
+ exports.escapeUriPath = escapeUriPath;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_dist_cjs13 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/s
+var require_dist_cjs11 = __commonJS((exports) => {
var buildQueryString = function(query) {
const parts = [];
for (let key of Object.keys(query).sort()) {
const value = query[key];
- key = (0, import_util_uri_escape.escapeUri)(key);
+ key = utilUriEscape.escapeUri(key);
if (Array.isArray(value)) {
for (let i = 0, iLen = value.length;i < iLen; i++) {
- parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);
+ parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`);
}
} else {
let qsEntry = key;
if (value || typeof value === "string") {
- qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;
+ qsEntry += `=${utilUriEscape.escapeUri(value)}`;
}
parts.push(qsEntry);
}
}
return parts.join("&");
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- buildQueryString: () => buildQueryString
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_uri_escape = require_dist_cjs12();
- __name(buildQueryString, "buildQueryString");
+ var utilUriEscape = require_dist_cjs10();
+ exports.buildQueryString = buildQueryString;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rules
-var require_dist_cjs14 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_dist_cjs12 = __commonJS((exports) => {
async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {
const headers = request.headers ?? {};
const expect = headers["Expect"] || headers["expect"];
let timeoutId = -1;
- let hasError = false;
+ let sendBody = true;
if (expect === "100-continue") {
- await Promise.race([
+ sendBody = await Promise.race([
new Promise((resolve) => {
- timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
+ timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
}),
new Promise((resolve) => {
httpRequest.on("continue", () => {
- clearTimeout(timeoutId);
- resolve();
+ timing.clearTimeout(timeoutId);
+ resolve(true);
+ });
+ httpRequest.on("response", () => {
+ timing.clearTimeout(timeoutId);
+ resolve(false);
});
httpRequest.on("error", () => {
- hasError = true;
- clearTimeout(timeoutId);
- resolve();
+ timing.clearTimeout(timeoutId);
+ resolve(false);
});
})
]);
}
- if (!hasError) {
+ if (sendBody) {
writeBody(httpRequest, request.body);
}
}
var writeBody = function(httpRequest, body) {
- if (body instanceof import_stream.Readable) {
+ if (body instanceof stream.Readable) {
body.pipe(httpRequest);
- } else if (body) {
+ return;
+ }
+ if (body) {
+ if (Buffer.isBuffer(body) || typeof body === "string") {
+ httpRequest.end(body);
+ return;
+ }
+ const uint8 = body;
+ if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") {
+ httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
+ return;
+ }
httpRequest.end(Buffer.from(body));
- } else {
- httpRequest.end();
+ return;
}
+ httpRequest.end();
};
- var __create2 = Object.create;
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __getProtoOf2 = Object.getPrototypeOf;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ async function collectReadableStream(stream2) {
+ const chunks = [];
+ const reader = stream2.getReader();
+ let isDone = false;
+ let length = 0;
+ while (!isDone) {
+ const { done, value } = await reader.read();
+ if (value) {
+ chunks.push(value);
+ length += value.length;
+ }
+ isDone = done;
}
- return to;
- };
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,
- NodeHttp2Handler: () => NodeHttp2Handler,
- NodeHttpHandler: () => NodeHttpHandler,
- streamCollector: () => streamCollector
- });
- module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- var import_querystring_builder = require_dist_cjs13();
- var import_http = __require("http");
- var import_https = __require("https");
+ const collected = new Uint8Array(length);
+ let offset = 0;
+ for (const chunk of chunks) {
+ collected.set(chunk, offset);
+ offset += chunk.length;
+ }
+ return collected;
+ }
+ var protocolHttp = require_dist_cjs2();
+ var querystringBuilder = require_dist_cjs11();
+ var http = __require("http");
+ var https = __require("https");
+ var stream = __require("stream");
+ var http2 = __require("http2");
var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
- var getTransformedHeaders = __name((headers) => {
+ var getTransformedHeaders = (headers) => {
const transformedHeaders = {};
for (const name of Object.keys(headers)) {
const headerValues = headers[name];
transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
}
return transformedHeaders;
- }, "getTransformedHeaders");
- var setConnectionTimeout = __name((request, reject, timeoutInMs = 0) => {
+ };
+ var timing = {
+ setTimeout: (cb, ms) => setTimeout(cb, ms),
+ clearTimeout: (timeoutId) => clearTimeout(timeoutId)
+ };
+ var DEFER_EVENT_LISTENER_TIME$2 = 1000;
+ var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
if (!timeoutInMs) {
- return;
+ return -1;
}
- const timeoutId = setTimeout(() => {
- request.destroy();
- reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
- name: "TimeoutError"
- }));
- }, timeoutInMs);
- request.on("socket", (socket) => {
- if (socket.connecting) {
- socket.on("connect", () => {
- clearTimeout(timeoutId);
- });
+ const registerTimeout = (offset) => {
+ const timeoutId = timing.setTimeout(() => {
+ request.destroy();
+ reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
+ name: "TimeoutError"
+ }));
+ }, timeoutInMs - offset);
+ const doWithSocket = (socket) => {
+ if (socket?.connecting) {
+ socket.on("connect", () => {
+ timing.clearTimeout(timeoutId);
+ });
+ } else {
+ timing.clearTimeout(timeoutId);
+ }
+ };
+ if (request.socket) {
+ doWithSocket(request.socket);
} else {
- clearTimeout(timeoutId);
+ request.on("socket", doWithSocket);
}
- });
- }, "setConnectionTimeout");
- var setSocketKeepAlive = __name((request, { keepAlive, keepAliveMsecs }) => {
+ };
+ if (timeoutInMs < 2000) {
+ registerTimeout(0);
+ return 0;
+ }
+ return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
+ };
+ var DEFER_EVENT_LISTENER_TIME$1 = 3000;
+ var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
if (keepAlive !== true) {
- return;
+ return -1;
}
- request.on("socket", (socket) => {
- socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
- });
- }, "setSocketKeepAlive");
- var setSocketTimeout = __name((request, reject, timeoutInMs = 0) => {
- request.setTimeout(timeoutInMs, () => {
- request.destroy();
- reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
- });
- }, "setSocketTimeout");
- var import_stream = __require("stream");
- var MIN_WAIT_TIME = 1000;
- __name(writeRequestBody, "writeRequestBody");
- __name(writeBody, "writeBody");
+ const registerListener = () => {
+ if (request.socket) {
+ request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
+ } else {
+ request.on("socket", (socket) => {
+ socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
+ });
+ }
+ };
+ if (deferTimeMs === 0) {
+ registerListener();
+ return 0;
+ }
+ return timing.setTimeout(registerListener, deferTimeMs);
+ };
+ var DEFER_EVENT_LISTENER_TIME = 3000;
+ var setSocketTimeout = (request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {
+ const registerTimeout = (offset) => {
+ const timeout = timeoutInMs - offset;
+ const onTimeout = () => {
+ request.destroy();
+ reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
+ };
+ if (request.socket) {
+ request.socket.setTimeout(timeout, onTimeout);
+ request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
+ } else {
+ request.setTimeout(timeout, onTimeout);
+ }
+ };
+ if (0 < timeoutInMs && timeoutInMs < 6000) {
+ registerTimeout(0);
+ return 0;
+ }
+ return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
+ };
+ var MIN_WAIT_TIME = 6000;
var DEFAULT_REQUEST_TIMEOUT = 0;
- var _NodeHttpHandler = class _NodeHttpHandler2 {
+
+ class NodeHttpHandler {
+ config;
+ configProvider;
+ socketWarningTimestamp = 0;
+ metadata = { handlerProtocol: "http/1.1" };
+ static create(instanceOrOptions) {
+ if (typeof instanceOrOptions?.handle === "function") {
+ return instanceOrOptions;
+ }
+ return new NodeHttpHandler(instanceOrOptions);
+ }
+ static checkSocketUsage(agent, socketWarningTimestamp, logger4 = console) {
+ const { sockets, requests, maxSockets } = agent;
+ if (typeof maxSockets !== "number" || maxSockets === Infinity) {
+ return socketWarningTimestamp;
+ }
+ const interval = 15000;
+ if (Date.now() - interval < socketWarningTimestamp) {
+ return socketWarningTimestamp;
+ }
+ if (sockets && requests) {
+ for (const origin in sockets) {
+ const socketsInUse = sockets[origin]?.length ?? 0;
+ const requestsEnqueued = requests[origin]?.length ?? 0;
+ if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
+ logger4?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
+See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
+or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
+ return Date.now();
+ }
+ }
+ }
+ return socketWarningTimestamp;
+ }
constructor(options) {
- this.metadata = { handlerProtocol: "http/1.1" };
this.configProvider = new Promise((resolve, reject) => {
if (typeof options === "function") {
options().then((_options) => {
@@ -5336,53 +6093,65 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
}
});
}
- static create(instanceOrOptions) {
- if (typeof (instanceOrOptions == null ? undefined : instanceOrOptions.handle) === "function") {
- return instanceOrOptions;
- }
- return new _NodeHttpHandler2(instanceOrOptions);
- }
resolveDefaultConfig(options) {
- const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
+ const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {};
const keepAlive = true;
const maxSockets = 50;
return {
connectionTimeout,
requestTimeout: requestTimeout ?? socketTimeout,
- httpAgent: httpAgent || new import_http.Agent({ keepAlive, maxSockets }),
- httpsAgent: httpsAgent || new import_https.Agent({ keepAlive, maxSockets })
+ socketAcquisitionWarningTimeout,
+ httpAgent: (() => {
+ if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
+ return httpAgent;
+ }
+ return new http.Agent({ keepAlive, maxSockets, ...httpAgent });
+ })(),
+ httpsAgent: (() => {
+ if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") {
+ return httpsAgent;
+ }
+ return new https.Agent({ keepAlive, maxSockets, ...httpsAgent });
+ })(),
+ logger: console
};
}
destroy() {
- var _a, _b, _c, _d;
- (_b = (_a = this.config) == null ? undefined : _a.httpAgent) == null || _b.destroy();
- (_d = (_c = this.config) == null ? undefined : _c.httpsAgent) == null || _d.destroy();
+ this.config?.httpAgent?.destroy();
+ this.config?.httpsAgent?.destroy();
}
- async handle(request, { abortSignal } = {}) {
+ async handle(request, { abortSignal, requestTimeout } = {}) {
if (!this.config) {
this.config = await this.configProvider;
}
return new Promise((_resolve, _reject) => {
let writeRequestBodyPromise = undefined;
- const resolve = __name(async (arg) => {
+ const timeouts = [];
+ const resolve = async (arg) => {
await writeRequestBodyPromise;
+ timeouts.forEach(timing.clearTimeout);
_resolve(arg);
- }, "resolve");
- const reject = __name(async (arg) => {
+ };
+ const reject = async (arg) => {
await writeRequestBodyPromise;
+ timeouts.forEach(timing.clearTimeout);
_reject(arg);
- }, "reject");
+ };
if (!this.config) {
throw new Error("Node HTTP request handler config is not resolved");
}
- if (abortSignal == null ? undefined : abortSignal.aborted) {
+ if (abortSignal?.aborted) {
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
reject(abortError);
return;
}
const isSSL = request.protocol === "https:";
- const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});
+ const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
+ timeouts.push(timing.setTimeout(() => {
+ this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger);
+ }, this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000)));
+ const queryString = querystringBuilder.buildQueryString(request.query || {});
let auth = undefined;
if (request.username != null || request.password != null) {
const username = request.username ?? "";
@@ -5396,18 +6165,24 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
if (request.fragment) {
path += `#${request.fragment}`;
}
+ let hostname = request.hostname ?? "";
+ if (hostname[0] === "[" && hostname.endsWith("]")) {
+ hostname = request.hostname.slice(1, -1);
+ } else {
+ hostname = request.hostname;
+ }
const nodeHttpsOptions = {
headers: request.headers,
- host: request.hostname,
+ host: hostname,
method: request.method,
path,
port: request.port,
- agent: isSSL ? this.config.httpsAgent : this.config.httpAgent,
+ agent,
auth
};
- const requestFunc = isSSL ? import_https.request : import_http.request;
+ const requestFunc = isSSL ? https.request : http.request;
const req = requestFunc(nodeHttpsOptions, (res) => {
- const httpResponse = new import_protocol_http.HttpResponse({
+ const httpResponse = new protocolHttp.HttpResponse({
statusCode: res.statusCode || -1,
reason: res.statusMessage,
headers: getTransformedHeaders(res.headers),
@@ -5422,24 +6197,35 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
reject(err);
}
});
- setConnectionTimeout(req, reject, this.config.connectionTimeout);
- setSocketTimeout(req, reject, this.config.requestTimeout);
if (abortSignal) {
- abortSignal.onabort = () => {
- req.abort();
+ const onAbort = () => {
+ req.destroy();
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
reject(abortError);
};
+ if (typeof abortSignal.addEventListener === "function") {
+ const signal = abortSignal;
+ signal.addEventListener("abort", onAbort, { once: true });
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
+ } else {
+ abortSignal.onabort = onAbort;
+ }
}
+ const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
+ timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
+ timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout));
const httpAgent = nodeHttpsOptions.agent;
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
- setSocketKeepAlive(req, {
+ timeouts.push(setSocketKeepAlive(req, {
keepAlive: httpAgent.keepAlive,
keepAliveMsecs: httpAgent.keepAliveMsecs
- });
+ }));
}
- writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout).catch((e) => {
+ timeouts.forEach(timing.clearTimeout);
+ return _reject(e);
+ });
});
}
updateHttpClientConfig(key, value) {
@@ -5454,14 +6240,11 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
httpHandlerConfigs() {
return this.config ?? {};
}
- };
- __name(_NodeHttpHandler, "NodeHttpHandler");
- var NodeHttpHandler = _NodeHttpHandler;
- var import_http22 = __require("http2");
- var import_http2 = __toESM2(__require("http2"));
- var _NodeHttp2ConnectionPool = class _NodeHttp2ConnectionPool2 {
+ }
+
+ class NodeHttp2ConnectionPool {
+ sessions = [];
constructor(sessions) {
- this.sessions = [];
this.sessions = sessions ?? [];
}
poll() {
@@ -5490,17 +6273,17 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
}
}
}
- };
- __name(_NodeHttp2ConnectionPool, "NodeHttp2ConnectionPool");
- var NodeHttp2ConnectionPool = _NodeHttp2ConnectionPool;
- var _NodeHttp2ConnectionManager = class _NodeHttp2ConnectionManager2 {
+ }
+
+ class NodeHttp2ConnectionManager {
constructor(config) {
- this.sessionCache = new Map;
this.config = config;
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
throw new RangeError("maxConcurrency must be greater than zero.");
}
}
+ config;
+ sessionCache = new Map;
lease(requestContext, connectionConfiguration) {
const url = this.getUrlString(requestContext);
const existingPool = this.sessionCache.get(url);
@@ -5510,7 +6293,7 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
return existingSession;
}
}
- const session = import_http2.default.connect(url);
+ const session = http2.connect(url);
if (this.config.maxConcurrency) {
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
if (err) {
@@ -5519,10 +6302,10 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
});
}
session.unref();
- const destroySessionCb = __name(() => {
+ const destroySessionCb = () => {
session.destroy();
this.deleteSession(url, session);
- }, "destroySessionCb");
+ };
session.on("goaway", destroySessionCb);
session.on("error", destroySessionCb);
session.on("frameError", destroySessionCb);
@@ -5547,9 +6330,8 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
this.sessionCache.set(authority, existingConnectionPool);
}
release(requestContext, session) {
- var _a;
const cacheKey = this.getUrlString(requestContext);
- (_a = this.sessionCache.get(cacheKey)) == null || _a.offerLast(session);
+ this.sessionCache.get(cacheKey)?.offerLast(session);
}
destroy() {
for (const [key, connectionPool] of this.sessionCache) {
@@ -5563,7 +6345,7 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
}
}
setMaxConcurrentStreams(maxConcurrentStreams) {
- if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
+ if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
throw new RangeError("maxConcurrentStreams must be greater than zero.");
}
this.config.maxConcurrency = maxConcurrentStreams;
@@ -5574,13 +6356,20 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
getUrlString(request) {
return request.destination.toString();
}
- };
- __name(_NodeHttp2ConnectionManager, "NodeHttp2ConnectionManager");
- var NodeHttp2ConnectionManager = _NodeHttp2ConnectionManager;
- var _NodeHttp2Handler = class _NodeHttp2Handler2 {
+ }
+
+ class NodeHttp2Handler {
+ config;
+ configProvider;
+ metadata = { handlerProtocol: "h2" };
+ connectionManager = new NodeHttp2ConnectionManager({});
+ static create(instanceOrOptions) {
+ if (typeof instanceOrOptions?.handle === "function") {
+ return instanceOrOptions;
+ }
+ return new NodeHttp2Handler(instanceOrOptions);
+ }
constructor(options) {
- this.metadata = { handlerProtocol: "h2" };
- this.connectionManager = new NodeHttp2ConnectionManager({});
this.configProvider = new Promise((resolve, reject) => {
if (typeof options === "function") {
options().then((opts) => {
@@ -5591,16 +6380,10 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
}
});
}
- static create(instanceOrOptions) {
- if (typeof (instanceOrOptions == null ? undefined : instanceOrOptions.handle) === "function") {
- return instanceOrOptions;
- }
- return new _NodeHttp2Handler2(instanceOrOptions);
- }
destroy() {
this.connectionManager.destroy();
}
- async handle(request, { abortSignal } = {}) {
+ async handle(request, { abortSignal, requestTimeout } = {}) {
if (!this.config) {
this.config = await this.configProvider;
this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
@@ -5608,20 +6391,20 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
}
}
- const { requestTimeout, disableConcurrentStreams } = this.config;
+ const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
+ const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
return new Promise((_resolve, _reject) => {
- var _a;
let fulfilled = false;
let writeRequestBodyPromise = undefined;
- const resolve = __name(async (arg) => {
+ const resolve = async (arg) => {
await writeRequestBodyPromise;
_resolve(arg);
- }, "resolve");
- const reject = __name(async (arg) => {
+ };
+ const reject = async (arg) => {
await writeRequestBodyPromise;
_reject(arg);
- }, "reject");
- if (abortSignal == null ? undefined : abortSignal.aborted) {
+ };
+ if (abortSignal?.aborted) {
fulfilled = true;
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
@@ -5638,17 +6421,17 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
const requestContext = { destination: new URL(authority) };
const session = this.connectionManager.lease(requestContext, {
- requestTimeout: (_a = this.config) == null ? undefined : _a.sessionTimeout,
+ requestTimeout: this.config?.sessionTimeout,
disableConcurrentStreams: disableConcurrentStreams || false
});
- const rejectWithDestroy = __name((err) => {
+ const rejectWithDestroy = (err) => {
if (disableConcurrentStreams) {
this.destroySession(session);
}
fulfilled = true;
reject(err);
- }, "rejectWithDestroy");
- const queryString = (0, import_querystring_builder.buildQueryString)(query || {});
+ };
+ const queryString = querystringBuilder.buildQueryString(query || {});
let path = request.path;
if (queryString) {
path += `?${queryString}`;
@@ -5658,12 +6441,12 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
}
const req = session.request({
...request.headers,
- [import_http22.constants.HTTP2_HEADER_PATH]: path,
- [import_http22.constants.HTTP2_HEADER_METHOD]: method
+ [http2.constants.HTTP2_HEADER_PATH]: path,
+ [http2.constants.HTTP2_HEADER_METHOD]: method
});
session.ref();
req.on("response", (headers) => {
- const httpResponse = new import_protocol_http.HttpResponse({
+ const httpResponse = new protocolHttp.HttpResponse({
statusCode: headers[":status"] || -1,
headers: getTransformedHeaders(headers),
body: req
@@ -5675,21 +6458,28 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
this.connectionManager.deleteSession(authority, session);
}
});
- if (requestTimeout) {
- req.setTimeout(requestTimeout, () => {
+ if (effectiveRequestTimeout) {
+ req.setTimeout(effectiveRequestTimeout, () => {
req.close();
- const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);
+ const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
timeoutError.name = "TimeoutError";
rejectWithDestroy(timeoutError);
});
}
if (abortSignal) {
- abortSignal.onabort = () => {
+ const onAbort = () => {
req.close();
const abortError = new Error("Request aborted");
abortError.name = "AbortError";
rejectWithDestroy(abortError);
};
+ if (typeof abortSignal.addEventListener === "function") {
+ const signal = abortSignal;
+ signal.addEventListener("abort", onAbort, { once: true });
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
+ } else {
+ abortSignal.onabort = onAbort;
+ }
}
req.on("frameError", (type, code, id) => {
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
@@ -5707,7 +6497,7 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
}
});
- writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout);
});
}
updateHttpClientConfig(key, value) {
@@ -5727,131 +6517,468 @@ var require_dist_cjs14 = __commonJS((exports, module) => {
session.destroy();
}
}
- };
- __name(_NodeHttp2Handler, "NodeHttp2Handler");
- var NodeHttp2Handler = _NodeHttp2Handler;
- var _Collector = class _Collector2 extends import_stream.Writable {
- constructor() {
- super(...arguments);
- this.bufferedBytes = [];
- }
+ }
+
+ class Collector extends stream.Writable {
+ bufferedBytes = [];
_write(chunk, encoding, callback) {
this.bufferedBytes.push(chunk);
callback();
}
- };
- __name(_Collector, "Collector");
- var Collector = _Collector;
- var streamCollector = __name((stream) => new Promise((resolve, reject) => {
- const collector = new Collector;
- stream.pipe(collector);
- stream.on("error", (err) => {
- collector.end();
- reject(err);
- });
- collector.on("error", reject);
- collector.on("finish", function() {
- const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
- resolve(bytes);
+ }
+ var streamCollector = (stream2) => {
+ if (isReadableStreamInstance(stream2)) {
+ return collectReadableStream(stream2);
+ }
+ return new Promise((resolve, reject) => {
+ const collector = new Collector;
+ stream2.pipe(collector);
+ stream2.on("error", (err) => {
+ collector.end();
+ reject(err);
+ });
+ collector.on("error", reject);
+ collector.on("finish", function() {
+ const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
+ resolve(bytes);
+ });
});
- }), "streamCollector");
+ };
+ var isReadableStreamInstance = (stream2) => typeof ReadableStream === "function" && stream2 instanceof ReadableStream;
+ exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
+ exports.NodeHttp2Handler = NodeHttp2Handler;
+ exports.NodeHttpHandler = NodeHttpHandler;
+ exports.streamCollector = streamCollector;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_sdk_stream_mixin = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.sdkStreamMixin = undefined;
- var node_http_handler_1 = require_dist_cjs14();
- var util_buffer_from_1 = require_dist_cjs9();
- var stream_1 = __require("stream");
- var util_1 = __require("util");
- var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
- var sdkStreamMixin2 = (stream) => {
- var _a, _b;
- if (!(stream instanceof stream_1.Readable)) {
- const name = ((_b = (_a = stream === null || stream === undefined ? undefined : stream.__proto__) === null || _a === undefined ? undefined : _a.constructor) === null || _b === undefined ? undefined : _b.name) || stream;
- throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
- }
- let transformed = false;
- const transformToByteArray = async () => {
- if (transformed) {
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
- }
- transformed = true;
- return await (0, node_http_handler_1.streamCollector)(stream);
- };
- return Object.assign(stream, {
- transformToByteArray,
- transformToString: async (encoding) => {
- const buf = await transformToByteArray();
- if (encoding === undefined || Buffer.isEncoding(encoding)) {
- return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
- } else {
- const decoder = new util_1.TextDecoder(encoding);
- return decoder.decode(buf);
- }
- },
- transformToWebStream: () => {
- if (transformed) {
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
- }
- if (stream.readableFlowing !== null) {
- throw new Error("The stream has been consumed by other callbacks.");
- }
- if (typeof stream_1.Readable.toWeb !== "function") {
- throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");
- }
- transformed = true;
- return stream_1.Readable.toWeb(stream);
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/
+var require_dist_cjs13 = __commonJS((exports) => {
+ var createRequest = function(url, requestOptions) {
+ return new Request(url, requestOptions);
+ };
+ var requestTimeout = function(timeoutInMs = 0) {
+ return new Promise((resolve, reject) => {
+ if (timeoutInMs) {
+ setTimeout(() => {
+ const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
+ timeoutError.name = "TimeoutError";
+ reject(timeoutError);
+ }, timeoutInMs);
}
});
};
- exports.sdkStreamMixin = sdkStreamMixin2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_dist_cjs15 = __commonJS((exports, module) => {
- var transformToString = function(payload, encoding = "utf-8") {
- if (encoding === "base64") {
- return (0, import_util_base64.toBase64)(payload);
+ async function collectBlob(blob) {
+ const base64 = await readToBase64(blob);
+ const arrayBuffer = utilBase64.fromBase64(base64);
+ return new Uint8Array(arrayBuffer);
+ }
+ async function collectStream(stream) {
+ const chunks = [];
+ const reader = stream.getReader();
+ let isDone = false;
+ let length = 0;
+ while (!isDone) {
+ const { done, value } = await reader.read();
+ if (value) {
+ chunks.push(value);
+ length += value.length;
+ }
+ isDone = done;
}
- return (0, import_util_utf8.toUtf8)(payload);
- };
- var transformFromString = function(str, encoding) {
- if (encoding === "base64") {
- return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));
+ const collected = new Uint8Array(length);
+ let offset = 0;
+ for (const chunk of chunks) {
+ collected.set(chunk, offset);
+ offset += chunk.length;
}
- return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ return collected;
+ }
+ var readToBase64 = function(blob) {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader;
+ reader.onloadend = () => {
+ if (reader.readyState !== 2) {
+ return reject(new Error("Reader aborted too early"));
+ }
+ const result = reader.result ?? "";
+ const commaIndex = result.indexOf(",");
+ const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
+ resolve(result.substring(dataOffset));
+ };
+ reader.onabort = () => reject(new Error("Read aborted"));
+ reader.onerror = () => reject(reader.error);
+ reader.readAsDataURL(blob);
+ });
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var protocolHttp = require_dist_cjs2();
+ var querystringBuilder = require_dist_cjs11();
+ var utilBase64 = require_dist_cjs9();
+ var keepAliveSupport = {
+ supported: undefined
+ };
+
+ class FetchHttpHandler {
+ config;
+ configProvider;
+ static create(instanceOrOptions) {
+ if (typeof instanceOrOptions?.handle === "function") {
+ return instanceOrOptions;
+ }
+ return new FetchHttpHandler(instanceOrOptions);
}
- return to;
+ constructor(options) {
+ if (typeof options === "function") {
+ this.configProvider = options().then((opts) => opts || {});
+ } else {
+ this.config = options ?? {};
+ this.configProvider = Promise.resolve(this.config);
+ }
+ if (keepAliveSupport.supported === undefined) {
+ keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]"));
+ }
+ }
+ destroy() {
+ }
+ async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) {
+ if (!this.config) {
+ this.config = await this.configProvider;
+ }
+ const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout;
+ const keepAlive = this.config.keepAlive === true;
+ const credentials = this.config.credentials;
+ if (abortSignal?.aborted) {
+ const abortError = new Error("Request aborted");
+ abortError.name = "AbortError";
+ return Promise.reject(abortError);
+ }
+ let path = request.path;
+ const queryString = querystringBuilder.buildQueryString(request.query || {});
+ if (queryString) {
+ path += `?${queryString}`;
+ }
+ if (request.fragment) {
+ path += `#${request.fragment}`;
+ }
+ let auth = "";
+ if (request.username != null || request.password != null) {
+ const username = request.username ?? "";
+ const password = request.password ?? "";
+ auth = `${username}:${password}@`;
+ }
+ const { port, method } = request;
+ const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
+ const body = method === "GET" || method === "HEAD" ? undefined : request.body;
+ const requestOptions = {
+ body,
+ headers: new Headers(request.headers),
+ method,
+ credentials
+ };
+ if (this.config?.cache) {
+ requestOptions.cache = this.config.cache;
+ }
+ if (body) {
+ requestOptions.duplex = "half";
+ }
+ if (typeof AbortController !== "undefined") {
+ requestOptions.signal = abortSignal;
+ }
+ if (keepAliveSupport.supported) {
+ requestOptions.keepalive = keepAlive;
+ }
+ if (typeof this.config.requestInit === "function") {
+ Object.assign(requestOptions, this.config.requestInit(request));
+ }
+ let removeSignalEventListener = () => {
+ };
+ const fetchRequest = createRequest(url, requestOptions);
+ const raceOfPromises = [
+ fetch(fetchRequest).then((response) => {
+ const fetchHeaders = response.headers;
+ const transformedHeaders = {};
+ for (const pair of fetchHeaders.entries()) {
+ transformedHeaders[pair[0]] = pair[1];
+ }
+ const hasReadableStream = response.body != null;
+ if (!hasReadableStream) {
+ return response.blob().then((body2) => ({
+ response: new protocolHttp.HttpResponse({
+ headers: transformedHeaders,
+ reason: response.statusText,
+ statusCode: response.status,
+ body: body2
+ })
+ }));
+ }
+ return {
+ response: new protocolHttp.HttpResponse({
+ headers: transformedHeaders,
+ reason: response.statusText,
+ statusCode: response.status,
+ body: response.body
+ })
+ };
+ }),
+ requestTimeout(requestTimeoutInMs)
+ ];
+ if (abortSignal) {
+ raceOfPromises.push(new Promise((resolve, reject) => {
+ const onAbort = () => {
+ const abortError = new Error("Request aborted");
+ abortError.name = "AbortError";
+ reject(abortError);
+ };
+ if (typeof abortSignal.addEventListener === "function") {
+ const signal = abortSignal;
+ signal.addEventListener("abort", onAbort, { once: true });
+ removeSignalEventListener = () => signal.removeEventListener("abort", onAbort);
+ } else {
+ abortSignal.onabort = onAbort;
+ }
+ }));
+ }
+ return Promise.race(raceOfPromises).finally(removeSignalEventListener);
+ }
+ updateHttpClientConfig(key, value) {
+ this.config = undefined;
+ this.configProvider = this.configProvider.then((config) => {
+ config[key] = value;
+ return config;
+ });
+ }
+ httpHandlerConfigs() {
+ return this.config ?? {};
+ }
+ }
+ var streamCollector = async (stream) => {
+ if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
+ if (Blob.prototype.arrayBuffer !== undefined) {
+ return new Uint8Array(await stream.arrayBuffer());
+ }
+ return collectBlob(stream);
+ }
+ return collectStream(stream);
};
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_base64 = require_dist_cjs10();
- var import_util_utf8 = require_dist_cjs11();
- __name(transformToString, "transformToString");
- __name(transformFromString, "transformFromString");
- var _Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter2 extends Uint8Array {
+ exports.FetchHttpHandler = FetchHttpHandler;
+ exports.keepAliveSupport = keepAliveSupport;
+ exports.streamCollector = streamCollector;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_dist_cjs14 = __commonJS((exports) => {
+ var fromHex = function(encoded) {
+ if (encoded.length % 2 !== 0) {
+ throw new Error("Hex encoded strings must have an even number length");
+ }
+ const out = new Uint8Array(encoded.length / 2);
+ for (let i = 0;i < encoded.length; i += 2) {
+ const encodedByte = encoded.slice(i, i + 2).toLowerCase();
+ if (encodedByte in HEX_TO_SHORT) {
+ out[i / 2] = HEX_TO_SHORT[encodedByte];
+ } else {
+ throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
+ }
+ }
+ return out;
+ };
+ var toHex = function(bytes) {
+ let out = "";
+ for (let i = 0;i < bytes.byteLength; i++) {
+ out += SHORT_TO_HEX[bytes[i]];
+ }
+ return out;
+ };
+ var SHORT_TO_HEX = {};
+ var HEX_TO_SHORT = {};
+ for (let i = 0;i < 256; i++) {
+ let encodedByte = i.toString(16).toLowerCase();
+ if (encodedByte.length === 1) {
+ encodedByte = `0${encodedByte}`;
+ }
+ SHORT_TO_HEX[i] = encodedByte;
+ HEX_TO_SHORT[encodedByte] = i;
+ }
+ exports.fromHex = fromHex;
+ exports.toHex = toHex;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/end
+var require_sdk_stream_mixin_browser = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.sdkStreamMixin = undefined;
+ var fetch_http_handler_1 = require_dist_cjs13();
+ var util_base64_1 = require_dist_cjs9();
+ var util_hex_encoding_1 = require_dist_cjs14();
+ var util_utf8_1 = require_dist_cjs8();
+ var stream_type_check_1 = require_stream_type_check();
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
+ var sdkStreamMixin = (stream) => {
+ if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {
+ const name = stream?.__proto__?.constructor?.name || stream;
+ throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
+ }
+ let transformed = false;
+ const transformToByteArray = async () => {
+ if (transformed) {
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
+ }
+ transformed = true;
+ return await (0, fetch_http_handler_1.streamCollector)(stream);
+ };
+ const blobToWebStream = (blob) => {
+ if (typeof blob.stream !== "function") {
+ throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
+ }
+ return blob.stream();
+ };
+ return Object.assign(stream, {
+ transformToByteArray,
+ transformToString: async (encoding) => {
+ const buf = await transformToByteArray();
+ if (encoding === "base64") {
+ return (0, util_base64_1.toBase64)(buf);
+ } else if (encoding === "hex") {
+ return (0, util_hex_encoding_1.toHex)(buf);
+ } else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") {
+ return (0, util_utf8_1.toUtf8)(buf);
+ } else if (typeof TextDecoder === "function") {
+ return new TextDecoder(encoding).decode(buf);
+ } else {
+ throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
+ }
+ },
+ transformToWebStream: () => {
+ if (transformed) {
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
+ }
+ transformed = true;
+ if (isBlobInstance(stream)) {
+ return blobToWebStream(stream);
+ } else if ((0, stream_type_check_1.isReadableStream)(stream)) {
+ return stream;
+ } else {
+ throw new Error(`Cannot transform payload to web stream, got ${stream}`);
+ }
+ }
+ });
+ };
+ exports.sdkStreamMixin = sdkStreamMixin;
+ var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_sdk_stream_mixin = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.sdkStreamMixin = undefined;
+ var node_http_handler_1 = require_dist_cjs12();
+ var util_buffer_from_1 = require_dist_cjs7();
+ var stream_1 = __require("stream");
+ var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser();
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
+ var sdkStreamMixin = (stream) => {
+ if (!(stream instanceof stream_1.Readable)) {
+ try {
+ return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);
+ } catch (e) {
+ const name = stream?.__proto__?.constructor?.name || stream;
+ throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
+ }
+ }
+ let transformed = false;
+ const transformToByteArray = async () => {
+ if (transformed) {
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
+ }
+ transformed = true;
+ return await (0, node_http_handler_1.streamCollector)(stream);
+ };
+ return Object.assign(stream, {
+ transformToByteArray,
+ transformToString: async (encoding) => {
+ const buf = await transformToByteArray();
+ if (encoding === undefined || Buffer.isEncoding(encoding)) {
+ return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
+ } else {
+ const decoder = new TextDecoder(encoding);
+ return decoder.decode(buf);
+ }
+ },
+ transformToWebStream: () => {
+ if (transformed) {
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
+ }
+ if (stream.readableFlowing !== null) {
+ throw new Error("The stream has been consumed by other callbacks.");
+ }
+ if (typeof stream_1.Readable.toWeb !== "function") {
+ throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
+ }
+ transformed = true;
+ return stream_1.Readable.toWeb(stream);
+ }
+ });
+ };
+ exports.sdkStreamMixin = sdkStreamMixin;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_splitStream_browser = __commonJS((exports) => {
+ async function splitStream(stream) {
+ if (typeof stream.stream === "function") {
+ stream = stream.stream();
+ }
+ const readableStream = stream;
+ return readableStream.tee();
+ }
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.splitStream = splitStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_splitStream = __commonJS((exports) => {
+ async function splitStream(stream) {
+ if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {
+ return (0, splitStream_browser_1.splitStream)(stream);
+ }
+ const stream1 = new stream_1.PassThrough;
+ const stream2 = new stream_1.PassThrough;
+ stream.pipe(stream1);
+ stream.pipe(stream2);
+ return [stream1, stream2];
+ }
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.splitStream = splitStream;
+ var stream_1 = __require("stream");
+ var splitStream_browser_1 = require_splitStream_browser();
+ var stream_type_check_1 = require_stream_type_check();
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var require_dist_cjs15 = __commonJS((exports) => {
+ var transformToString = function(payload, encoding = "utf-8") {
+ if (encoding === "base64") {
+ return utilBase64.toBase64(payload);
+ }
+ return utilUtf8.toUtf8(payload);
+ };
+ var transformFromString = function(str, encoding) {
+ if (encoding === "base64") {
+ return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(str));
+ }
+ return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(str));
+ };
+ var utilBase64 = require_dist_cjs9();
+ var utilUtf8 = require_dist_cjs8();
+ var ChecksumStream = require_ChecksumStream();
+ var createChecksumStream = require_createChecksumStream();
+ var createBufferedReadable = require_createBufferedReadable();
+ var getAwsChunkedEncodingStream = require_getAwsChunkedEncodingStream();
+ var headStream = require_headStream();
+ var sdkStreamMixin = require_sdk_stream_mixin();
+ var splitStream = require_splitStream();
+ var streamTypeCheck = require_stream_type_check();
+
+ class Uint8ArrayBlobAdapter extends Uint8Array {
static fromString(source, encoding = "utf-8") {
switch (typeof source) {
case "string":
@@ -5861,21 +6988,747 @@ var require_dist_cjs15 = __commonJS((exports, module) => {
}
}
static mutate(source) {
- Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter2.prototype);
+ Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
return source;
}
transformToString(encoding = "utf-8") {
return transformToString(this, encoding);
}
+ }
+ exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter;
+ Object.keys(ChecksumStream).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return ChecksumStream[k];
+ }
+ });
+ });
+ Object.keys(createChecksumStream).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return createChecksumStream[k];
+ }
+ });
+ });
+ Object.keys(createBufferedReadable).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return createBufferedReadable[k];
+ }
+ });
+ });
+ Object.keys(getAwsChunkedEncodingStream).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return getAwsChunkedEncodingStream[k];
+ }
+ });
+ });
+ Object.keys(headStream).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return headStream[k];
+ }
+ });
+ });
+ Object.keys(sdkStreamMixin).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return sdkStreamMixin[k];
+ }
+ });
+ });
+ Object.keys(splitStream).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return splitStream[k];
+ }
+ });
+ });
+ Object.keys(streamTypeCheck).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return streamTypeCheck[k];
+ }
+ });
+ });
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_schema = __commonJS((exports) => {
+ var getSchemaSerdePlugin = function(config) {
+ return {
+ applyToStack: (commandStack) => {
+ commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);
+ commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
+ config.protocol.setSerdeContext(config);
+ }
+ };
+ };
+ var protocolHttp = require_dist_cjs2();
+ var utilMiddleware = require_dist_cjs4();
+ var deref = (schemaRef) => {
+ if (typeof schemaRef === "function") {
+ return schemaRef();
+ }
+ return schemaRef;
+ };
+ var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
+ const { response } = await next(args);
+ const { operationSchema } = utilMiddleware.getSmithyContext(context);
+ try {
+ const parsed = await config.protocol.deserializeResponse(operationSchema, {
+ ...config,
+ ...context
+ }, response);
+ return {
+ response,
+ output: parsed
+ };
+ } catch (error2) {
+ Object.defineProperty(error2, "$response", {
+ value: response
+ });
+ if (!("$metadata" in error2)) {
+ const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.\$response on this object.`;
+ try {
+ error2.message += "\n " + hint;
+ } catch (e) {
+ if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
+ console.warn(hint);
+ } else {
+ context.logger?.warn?.(hint);
+ }
+ }
+ if (typeof error2.$responseBodyText !== "undefined") {
+ if (error2.$response) {
+ error2.$response.body = error2.$responseBodyText;
+ }
+ }
+ try {
+ if (protocolHttp.HttpResponse.isInstance(response)) {
+ const { headers = {} } = response;
+ const headerEntries = Object.entries(headers);
+ error2.$metadata = {
+ httpStatusCode: response.statusCode,
+ requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
+ extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
+ cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
+ };
+ }
+ } catch (e) {
+ }
+ }
+ throw error2;
+ }
+ };
+ var findHeader = (pattern, headers) => {
+ return (headers.find(([k]) => {
+ return k.match(pattern);
+ }) || [undefined, undefined])[1];
+ };
+ var schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
+ const { operationSchema } = utilMiddleware.getSmithyContext(context);
+ const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;
+ const request = await config.protocol.serializeRequest(operationSchema, args.input, {
+ ...config,
+ ...context,
+ endpoint
+ });
+ return next({
+ ...args,
+ request
+ });
+ };
+ var deserializerMiddlewareOption = {
+ name: "deserializerMiddleware",
+ step: "deserialize",
+ tags: ["DESERIALIZER"],
+ override: true
+ };
+ var serializerMiddlewareOption = {
+ name: "serializerMiddleware",
+ step: "serialize",
+ tags: ["SERIALIZER"],
+ override: true
+ };
+
+ class TypeRegistry {
+ namespace;
+ schemas;
+ exceptions;
+ static registries = new Map;
+ constructor(namespace, schemas = new Map, exceptions = new Map) {
+ this.namespace = namespace;
+ this.schemas = schemas;
+ this.exceptions = exceptions;
+ }
+ static for(namespace) {
+ if (!TypeRegistry.registries.has(namespace)) {
+ TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));
+ }
+ return TypeRegistry.registries.get(namespace);
+ }
+ register(shapeId, schema) {
+ const qualifiedName = this.normalizeShapeId(shapeId);
+ this.schemas.set(qualifiedName, schema);
+ }
+ getSchema(shapeId) {
+ const id = this.normalizeShapeId(shapeId);
+ if (!this.schemas.has(id)) {
+ throw new Error(`@smithy/core/schema - schema not found for ${id}`);
+ }
+ return this.schemas.get(id);
+ }
+ registerError(errorSchema, ctor) {
+ this.exceptions.set(errorSchema, ctor);
+ }
+ getErrorCtor(errorSchema) {
+ return this.exceptions.get(errorSchema);
+ }
+ getBaseException() {
+ for (const [id, schema] of this.schemas.entries()) {
+ if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
+ return schema;
+ }
+ }
+ return;
+ }
+ find(predicate) {
+ return [...this.schemas.values()].find(predicate);
+ }
+ clear() {
+ this.schemas.clear();
+ this.exceptions.clear();
+ }
+ normalizeShapeId(shapeId) {
+ if (shapeId.includes("#")) {
+ return shapeId;
+ }
+ return this.namespace + "#" + shapeId;
+ }
+ getNamespace(shapeId) {
+ return this.normalizeShapeId(shapeId).split("#")[0];
+ }
+ }
+
+ class Schema {
+ name;
+ namespace;
+ traits;
+ static assign(instance, values) {
+ const schema = Object.assign(instance, values);
+ TypeRegistry.for(schema.namespace).register(schema.name, schema);
+ return schema;
+ }
+ static [Symbol.hasInstance](lhs) {
+ const isPrototype = this.prototype.isPrototypeOf(lhs);
+ if (!isPrototype && typeof lhs === "object" && lhs !== null) {
+ const list2 = lhs;
+ return list2.symbol === this.symbol;
+ }
+ return isPrototype;
+ }
+ getName() {
+ return this.namespace + "#" + this.name;
+ }
+ }
+
+ class ListSchema extends Schema {
+ static symbol = Symbol.for("@smithy/lis");
+ name;
+ traits;
+ valueSchema;
+ symbol = ListSchema.symbol;
+ }
+ var list = (namespace, name, traits, valueSchema) => Schema.assign(new ListSchema, {
+ name,
+ namespace,
+ traits,
+ valueSchema
+ });
+
+ class MapSchema extends Schema {
+ static symbol = Symbol.for("@smithy/map");
+ name;
+ traits;
+ keySchema;
+ valueSchema;
+ symbol = MapSchema.symbol;
+ }
+ var map = (namespace, name, traits, keySchema, valueSchema) => Schema.assign(new MapSchema, {
+ name,
+ namespace,
+ traits,
+ keySchema,
+ valueSchema
+ });
+
+ class OperationSchema extends Schema {
+ static symbol = Symbol.for("@smithy/ope");
+ name;
+ traits;
+ input;
+ output;
+ symbol = OperationSchema.symbol;
+ }
+ var op = (namespace, name, traits, input, output) => Schema.assign(new OperationSchema, {
+ name,
+ namespace,
+ traits,
+ input,
+ output
+ });
+
+ class StructureSchema extends Schema {
+ static symbol = Symbol.for("@smithy/str");
+ name;
+ traits;
+ memberNames;
+ memberList;
+ symbol = StructureSchema.symbol;
+ }
+ var struct = (namespace, name, traits, memberNames, memberList) => Schema.assign(new StructureSchema, {
+ name,
+ namespace,
+ traits,
+ memberNames,
+ memberList
+ });
+
+ class ErrorSchema extends StructureSchema {
+ static symbol = Symbol.for("@smithy/err");
+ ctor;
+ symbol = ErrorSchema.symbol;
+ }
+ var error = (namespace, name, traits, memberNames, memberList, ctor) => Schema.assign(new ErrorSchema, {
+ name,
+ namespace,
+ traits,
+ memberNames,
+ memberList,
+ ctor: null
+ });
+ var SCHEMA = {
+ BLOB: 21,
+ STREAMING_BLOB: 42,
+ BOOLEAN: 2,
+ STRING: 0,
+ NUMERIC: 1,
+ BIG_INTEGER: 17,
+ BIG_DECIMAL: 19,
+ DOCUMENT: 15,
+ TIMESTAMP_DEFAULT: 4,
+ TIMESTAMP_DATE_TIME: 5,
+ TIMESTAMP_HTTP_DATE: 6,
+ TIMESTAMP_EPOCH_SECONDS: 7,
+ LIST_MODIFIER: 64,
+ MAP_MODIFIER: 128
+ };
+
+ class SimpleSchema extends Schema {
+ static symbol = Symbol.for("@smithy/sim");
+ name;
+ schemaRef;
+ traits;
+ symbol = SimpleSchema.symbol;
+ }
+ var sim = (namespace, name, schemaRef, traits) => Schema.assign(new SimpleSchema, {
+ name,
+ namespace,
+ traits,
+ schemaRef
+ });
+
+ class NormalizedSchema {
+ ref;
+ memberName;
+ static symbol = Symbol.for("@smithy/nor");
+ symbol = NormalizedSchema.symbol;
+ name;
+ schema;
+ _isMemberSchema;
+ traits;
+ memberTraits;
+ normalizedTraits;
+ constructor(ref, memberName) {
+ this.ref = ref;
+ this.memberName = memberName;
+ const traitStack = [];
+ let _ref = ref;
+ let schema = ref;
+ this._isMemberSchema = false;
+ while (Array.isArray(_ref)) {
+ traitStack.push(_ref[1]);
+ _ref = _ref[0];
+ schema = deref(_ref);
+ this._isMemberSchema = true;
+ }
+ if (traitStack.length > 0) {
+ this.memberTraits = {};
+ for (let i = traitStack.length - 1;i >= 0; --i) {
+ const traitSet = traitStack[i];
+ Object.assign(this.memberTraits, NormalizedSchema.translateTraits(traitSet));
+ }
+ } else {
+ this.memberTraits = 0;
+ }
+ if (schema instanceof NormalizedSchema) {
+ const computedMemberTraits = this.memberTraits;
+ Object.assign(this, schema);
+ this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
+ this.normalizedTraits = undefined;
+ this.memberName = memberName ?? schema.memberName;
+ return;
+ }
+ this.schema = deref(schema);
+ if (this.schema && typeof this.schema === "object") {
+ this.traits = this.schema?.traits ?? {};
+ } else {
+ this.traits = 0;
+ }
+ this.name = (this.schema instanceof Schema ? this.schema.getName?.() : undefined) ?? this.memberName ?? this.getSchemaName();
+ if (this._isMemberSchema && !memberName) {
+ throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
+ }
+ }
+ static [Symbol.hasInstance](lhs) {
+ return Schema[Symbol.hasInstance].bind(this)(lhs);
+ }
+ static of(ref) {
+ if (ref instanceof NormalizedSchema) {
+ return ref;
+ }
+ if (Array.isArray(ref)) {
+ const [ns, traits] = ref;
+ if (ns instanceof NormalizedSchema) {
+ Object.assign(ns.getMergedTraits(), NormalizedSchema.translateTraits(traits));
+ return ns;
+ }
+ throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
+ }
+ return new NormalizedSchema(ref);
+ }
+ static translateTraits(indicator) {
+ if (typeof indicator === "object") {
+ return indicator;
+ }
+ indicator = indicator | 0;
+ const traits = {};
+ let i = 0;
+ for (const trait of [
+ "httpLabel",
+ "idempotent",
+ "idempotencyToken",
+ "sensitive",
+ "httpPayload",
+ "httpResponseCode",
+ "httpQueryParams"
+ ]) {
+ if ((indicator >> i++ & 1) === 1) {
+ traits[trait] = 1;
+ }
+ }
+ return traits;
+ }
+ getSchema() {
+ if (this.schema instanceof NormalizedSchema) {
+ Object.assign(this, { schema: this.schema.getSchema() });
+ return this.schema;
+ }
+ if (this.schema instanceof SimpleSchema) {
+ return deref(this.schema.schemaRef);
+ }
+ return deref(this.schema);
+ }
+ getName(withNamespace = false) {
+ if (!withNamespace) {
+ if (this.name && this.name.includes("#")) {
+ return this.name.split("#")[1];
+ }
+ }
+ return this.name || undefined;
+ }
+ getMemberName() {
+ if (!this.isMemberSchema()) {
+ throw new Error(`@smithy/core/schema - non-member schema: ${this.getName(true)}`);
+ }
+ return this.memberName;
+ }
+ isMemberSchema() {
+ return this._isMemberSchema;
+ }
+ isUnitSchema() {
+ return this.getSchema() === "unit";
+ }
+ isListSchema() {
+ const inner = this.getSchema();
+ if (typeof inner === "number") {
+ return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER;
+ }
+ return inner instanceof ListSchema;
+ }
+ isMapSchema() {
+ const inner = this.getSchema();
+ if (typeof inner === "number") {
+ return inner >= SCHEMA.MAP_MODIFIER && inner <= 255;
+ }
+ return inner instanceof MapSchema;
+ }
+ isStructSchema() {
+ const inner = this.getSchema();
+ return inner !== null && typeof inner === "object" && "members" in inner || inner instanceof StructureSchema;
+ }
+ isBlobSchema() {
+ return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB;
+ }
+ isTimestampSchema() {
+ const schema = this.getSchema();
+ return typeof schema === "number" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS;
+ }
+ isDocumentSchema() {
+ return this.getSchema() === SCHEMA.DOCUMENT;
+ }
+ isStringSchema() {
+ return this.getSchema() === SCHEMA.STRING;
+ }
+ isBooleanSchema() {
+ return this.getSchema() === SCHEMA.BOOLEAN;
+ }
+ isNumericSchema() {
+ return this.getSchema() === SCHEMA.NUMERIC;
+ }
+ isBigIntegerSchema() {
+ return this.getSchema() === SCHEMA.BIG_INTEGER;
+ }
+ isBigDecimalSchema() {
+ return this.getSchema() === SCHEMA.BIG_DECIMAL;
+ }
+ isStreaming() {
+ const streaming = !!this.getMergedTraits().streaming;
+ if (streaming) {
+ return true;
+ }
+ return this.getSchema() === SCHEMA.STREAMING_BLOB;
+ }
+ isIdempotencyToken() {
+ if (this.normalizedTraits) {
+ return !!this.normalizedTraits.idempotencyToken;
+ }
+ for (const traits of [this.traits, this.memberTraits]) {
+ if (typeof traits === "number") {
+ if ((traits & 4) === 4) {
+ return true;
+ }
+ } else if (typeof traits === "object") {
+ if (!!traits.idempotencyToken) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ getMergedTraits() {
+ return this.normalizedTraits ?? (this.normalizedTraits = {
+ ...this.getOwnTraits(),
+ ...this.getMemberTraits()
+ });
+ }
+ getMemberTraits() {
+ return NormalizedSchema.translateTraits(this.memberTraits);
+ }
+ getOwnTraits() {
+ return NormalizedSchema.translateTraits(this.traits);
+ }
+ getKeySchema() {
+ if (this.isDocumentSchema()) {
+ return this.memberFrom([SCHEMA.DOCUMENT, 0], "key");
+ }
+ if (!this.isMapSchema()) {
+ throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
+ }
+ const schema = this.getSchema();
+ if (typeof schema === "number") {
+ return this.memberFrom([63 & schema, 0], "key");
+ }
+ return this.memberFrom([schema.keySchema, 0], "key");
+ }
+ getValueSchema() {
+ const schema = this.getSchema();
+ if (typeof schema === "number") {
+ if (this.isMapSchema()) {
+ return this.memberFrom([63 & schema, 0], "value");
+ } else if (this.isListSchema()) {
+ return this.memberFrom([63 & schema, 0], "member");
+ }
+ }
+ if (schema && typeof schema === "object") {
+ if (this.isStructSchema()) {
+ throw new Error(`may not getValueSchema() on structure ${this.getName(true)}`);
+ }
+ const collection = schema;
+ if ("valueSchema" in collection) {
+ if (this.isMapSchema()) {
+ return this.memberFrom([collection.valueSchema, 0], "value");
+ } else if (this.isListSchema()) {
+ return this.memberFrom([collection.valueSchema, 0], "member");
+ }
+ }
+ }
+ if (this.isDocumentSchema()) {
+ return this.memberFrom([SCHEMA.DOCUMENT, 0], "value");
+ }
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
+ }
+ hasMemberSchema(member) {
+ if (this.isStructSchema()) {
+ const struct2 = this.getSchema();
+ return struct2.memberNames.includes(member);
+ }
+ return false;
+ }
+ getMemberSchema(member) {
+ if (this.isStructSchema()) {
+ const struct2 = this.getSchema();
+ if (!struct2.memberNames.includes(member)) {
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${member}.`);
+ }
+ const i = struct2.memberNames.indexOf(member);
+ const memberSchema = struct2.memberList[i];
+ return this.memberFrom(Array.isArray(memberSchema) ? memberSchema : [memberSchema, 0], member);
+ }
+ if (this.isDocumentSchema()) {
+ return this.memberFrom([SCHEMA.DOCUMENT, 0], member);
+ }
+ throw new Error(`@smithy/core/schema - ${this.getName(true)} has no members.`);
+ }
+ getMemberSchemas() {
+ const buffer = {};
+ try {
+ for (const [k, v] of this.structIterator()) {
+ buffer[k] = v;
+ }
+ } catch (ignored) {
+ }
+ return buffer;
+ }
+ getEventStreamMember() {
+ if (this.isStructSchema()) {
+ for (const [memberName, memberSchema] of this.structIterator()) {
+ if (memberSchema.isStreaming() && memberSchema.isStructSchema()) {
+ return memberName;
+ }
+ }
+ }
+ return "";
+ }
+ *structIterator() {
+ if (this.isUnitSchema()) {
+ return;
+ }
+ if (!this.isStructSchema()) {
+ throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
+ }
+ const struct2 = this.getSchema();
+ for (let i = 0;i < struct2.memberNames.length; ++i) {
+ yield [struct2.memberNames[i], this.memberFrom([struct2.memberList[i], 0], struct2.memberNames[i])];
+ }
+ }
+ memberFrom(memberSchema, memberName) {
+ if (memberSchema instanceof NormalizedSchema) {
+ return Object.assign(memberSchema, {
+ memberName,
+ _isMemberSchema: true
+ });
+ }
+ return new NormalizedSchema(memberSchema, memberName);
+ }
+ getSchemaName() {
+ const schema = this.getSchema();
+ if (typeof schema === "number") {
+ const _schema = 63 & schema;
+ const container = 192 & schema;
+ const type = Object.entries(SCHEMA).find(([, value]) => {
+ return value === _schema;
+ })?.[0] ?? "Unknown";
+ switch (container) {
+ case SCHEMA.MAP_MODIFIER:
+ return `${type}Map`;
+ case SCHEMA.LIST_MODIFIER:
+ return `${type}List`;
+ case 0:
+ return type;
+ }
+ }
+ return "Unknown";
+ }
+ }
+ exports.ErrorSchema = ErrorSchema;
+ exports.ListSchema = ListSchema;
+ exports.MapSchema = MapSchema;
+ exports.NormalizedSchema = NormalizedSchema;
+ exports.OperationSchema = OperationSchema;
+ exports.SCHEMA = SCHEMA;
+ exports.Schema = Schema;
+ exports.SimpleSchema = SimpleSchema;
+ exports.StructureSchema = StructureSchema;
+ exports.TypeRegistry = TypeRegistry;
+ exports.deref = deref;
+ exports.deserializerMiddlewareOption = deserializerMiddlewareOption;
+ exports.error = error;
+ exports.getSchemaSerdePlugin = getSchemaSerdePlugin;
+ exports.list = list;
+ exports.map = map;
+ exports.op = op;
+ exports.serializerMiddlewareOption = serializerMiddlewareOption;
+ exports.sim = sim;
+ exports.struct = struct;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
+var require_randomUUID = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.randomUUID = undefined;
+ var tslib_1 = require_tslib();
+ var crypto_1 = tslib_1.__importDefault(__require("crypto"));
+ exports.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default);
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-c
+var require_dist_cjs16 = __commonJS((exports) => {
+ var randomUUID = require_randomUUID();
+ var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
+ var v4 = () => {
+ if (randomUUID.randomUUID) {
+ return randomUUID.randomUUID();
+ }
+ const rnds = new Uint8Array(16);
+ crypto.getRandomValues(rnds);
+ rnds[6] = rnds[6] & 15 | 64;
+ rnds[8] = rnds[8] & 63 | 128;
+ return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
};
- __name(_Uint8ArrayBlobAdapter, "Uint8ArrayBlobAdapter");
- var Uint8ArrayBlobAdapter = _Uint8ArrayBlobAdapter;
- __reExport(src_exports, require_getAwsChunkedEncodingStream(), module.exports);
- __reExport(src_exports, require_sdk_stream_mixin(), module.exports);
+ exports.v4 = v4;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/r
-var require_dist_cjs16 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso
+var require_serde = __commonJS((exports) => {
var dateToUtcString = function(date) {
const year = date.getUTCFullYear();
const month = date.getUTCMonth();
@@ -5890,36 +7743,11 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
};
- var extendedEncodeURIComponent = function(str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
- });
- };
- var map = function(arg0, arg1, arg2) {
- let target;
- let filter;
- let instructions;
- if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
- target = {};
- instructions = arg0;
- } else {
- target = arg0;
- if (typeof arg1 === "function") {
- filter = arg1;
- instructions = arg2;
- return mapWithFilter(target, filter, instructions);
- } else {
- instructions = arg1;
- }
- }
- for (const key of Object.keys(instructions)) {
- if (!Array.isArray(instructions[key])) {
- target[key] = instructions[key];
- continue;
- }
- applyInstruction(target, null, instructions, key);
+ var quoteHeader = function(part) {
+ if (part.includes(",") || part.includes('"')) {
+ part = `"${part.replace(/"/g, '\\"')}"`;
}
- return target;
+ return part;
};
var splitEvery = function(value, delimiter, numDelimiters) {
if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
@@ -5947,307 +7775,35 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
}
return compoundSegments;
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ var nv = function(input) {
+ return new NumericValue(String(input), "bigDecimal");
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var uuid = require_dist_cjs16();
+ var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
+ var parseBoolean = (value) => {
+ switch (value) {
+ case "true":
+ return true;
+ case "false":
+ return false;
+ default:
+ throw new Error(`Unable to parse boolean value "${value}"`);
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- Client: () => Client,
- Command: () => Command,
- LazyJsonString: () => LazyJsonString,
- NoOpLogger: () => NoOpLogger,
- SENSITIVE_STRING: () => SENSITIVE_STRING,
- ServiceException: () => ServiceException,
- StringWrapper: () => StringWrapper,
- _json: () => _json,
- collectBody: () => collectBody,
- convertMap: () => convertMap,
- createAggregatedClient: () => createAggregatedClient,
- dateToUtcString: () => dateToUtcString,
- decorateServiceException: () => decorateServiceException,
- emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
- expectBoolean: () => expectBoolean,
- expectByte: () => expectByte,
- expectFloat32: () => expectFloat32,
- expectInt: () => expectInt,
- expectInt32: () => expectInt32,
- expectLong: () => expectLong,
- expectNonNull: () => expectNonNull,
- expectNumber: () => expectNumber,
- expectObject: () => expectObject,
- expectShort: () => expectShort,
- expectString: () => expectString,
- expectUnion: () => expectUnion,
- extendedEncodeURIComponent: () => extendedEncodeURIComponent,
- getArrayIfSingleItem: () => getArrayIfSingleItem,
- getDefaultClientConfiguration: () => getDefaultClientConfiguration,
- getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,
- getValueFromTextNode: () => getValueFromTextNode,
- handleFloat: () => handleFloat,
- limitedParseDouble: () => limitedParseDouble,
- limitedParseFloat: () => limitedParseFloat,
- limitedParseFloat32: () => limitedParseFloat32,
- loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,
- logger: () => logger4,
- map: () => map,
- parseBoolean: () => parseBoolean,
- parseEpochTimestamp: () => parseEpochTimestamp,
- parseRfc3339DateTime: () => parseRfc3339DateTime,
- parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
- parseRfc7231DateTime: () => parseRfc7231DateTime,
- resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,
- resolvedPath: () => resolvedPath,
- serializeFloat: () => serializeFloat,
- splitEvery: () => splitEvery,
- strictParseByte: () => strictParseByte,
- strictParseDouble: () => strictParseDouble,
- strictParseFloat: () => strictParseFloat,
- strictParseFloat32: () => strictParseFloat32,
- strictParseInt: () => strictParseInt,
- strictParseInt32: () => strictParseInt32,
- strictParseLong: () => strictParseLong,
- strictParseShort: () => strictParseShort,
- take: () => take,
- throwDefaultError: () => throwDefaultError,
- withBaseException: () => withBaseException
- });
- module.exports = __toCommonJS(src_exports);
- var _NoOpLogger = class _NoOpLogger2 {
- trace() {
- }
- debug() {
- }
- info() {
- }
- warn() {
+ var expectBoolean = (value) => {
+ if (value === null || value === undefined) {
+ return;
}
- error() {
- }
- };
- __name(_NoOpLogger, "NoOpLogger");
- var NoOpLogger = _NoOpLogger;
- var import_middleware_stack = require_dist_cjs7();
- var _Client = class _Client2 {
- constructor(config) {
- this.middlewareStack = (0, import_middleware_stack.constructStack)();
- this.config = config;
- }
- send(command, optionsOrCb, cb) {
- const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
- const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
- const handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
- if (callback) {
- handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {
- });
- } else {
- return handler(command).then((result) => result.output);
- }
- }
- destroy() {
- if (this.config.requestHandler.destroy)
- this.config.requestHandler.destroy();
- }
- };
- __name(_Client, "Client");
- var Client = _Client;
- var import_util_stream = require_dist_cjs15();
- var collectBody = __name(async (streamBody = new Uint8Array, context) => {
- if (streamBody instanceof Uint8Array) {
- return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
- }
- if (!streamBody) {
- return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array);
- }
- const fromContext = context.streamCollector(streamBody);
- return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
- }, "collectBody");
- var import_types = require_dist_cjs();
- var _Command = class _Command2 {
- constructor() {
- this.middlewareStack = (0, import_middleware_stack.constructStack)();
- }
- static classBuilder() {
- return new ClassBuilder;
- }
- resolveMiddlewareWithContext(clientStack, configuration, options, {
- middlewareFn,
- clientName,
- commandName,
- inputFilterSensitiveLog,
- outputFilterSensitiveLog,
- smithyContext,
- additionalContext,
- CommandCtor
- }) {
- for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
- this.middlewareStack.use(mw);
- }
- const stack = clientStack.concat(this.middlewareStack);
- const { logger: logger22 } = configuration;
- const handlerExecutionContext = {
- logger: logger22,
- clientName,
- commandName,
- inputFilterSensitiveLog,
- outputFilterSensitiveLog,
- [import_types.SMITHY_CONTEXT_KEY]: {
- ...smithyContext
- },
- ...additionalContext
- };
- const { requestHandler } = configuration;
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
- }
- };
- __name(_Command, "Command");
- var Command = _Command;
- var _ClassBuilder = class _ClassBuilder2 {
- constructor() {
- this._init = () => {
- };
- this._ep = {};
- this._middlewareFn = () => [];
- this._commandName = "";
- this._clientName = "";
- this._additionalContext = {};
- this._smithyContext = {};
- this._inputFilterSensitiveLog = (_) => _;
- this._outputFilterSensitiveLog = (_) => _;
- this._serializer = null;
- this._deserializer = null;
- }
- init(cb) {
- this._init = cb;
- }
- ep(endpointParameterInstructions) {
- this._ep = endpointParameterInstructions;
- return this;
- }
- m(middlewareSupplier) {
- this._middlewareFn = middlewareSupplier;
- return this;
- }
- s(service, operation, smithyContext = {}) {
- this._smithyContext = {
- service,
- operation,
- ...smithyContext
- };
- return this;
- }
- c(additionalContext = {}) {
- this._additionalContext = additionalContext;
- return this;
- }
- n(clientName, commandName) {
- this._clientName = clientName;
- this._commandName = commandName;
- return this;
- }
- f(inputFilter = (_) => _, outputFilter = (_) => _) {
- this._inputFilterSensitiveLog = inputFilter;
- this._outputFilterSensitiveLog = outputFilter;
- return this;
- }
- ser(serializer) {
- this._serializer = serializer;
- return this;
- }
- de(deserializer) {
- this._deserializer = deserializer;
- return this;
- }
- build() {
- var _a;
- const closure = this;
- let CommandRef;
- return CommandRef = (_a = class extends Command {
- constructor(input) {
- super();
- this.input = input;
- this.serialize = closure._serializer;
- this.deserialize = closure._deserializer;
- closure._init(this);
- }
- static getEndpointParameterInstructions() {
- return closure._ep;
- }
- resolveMiddleware(stack, configuration, options) {
- return this.resolveMiddlewareWithContext(stack, configuration, options, {
- CommandCtor: CommandRef,
- middlewareFn: closure._middlewareFn,
- clientName: closure._clientName,
- commandName: closure._commandName,
- inputFilterSensitiveLog: closure._inputFilterSensitiveLog,
- outputFilterSensitiveLog: closure._outputFilterSensitiveLog,
- smithyContext: closure._smithyContext,
- additionalContext: closure._additionalContext
- });
- }
- }, __name(_a, "CommandRef"), _a);
- }
- };
- __name(_ClassBuilder, "ClassBuilder");
- var ClassBuilder = _ClassBuilder;
- var SENSITIVE_STRING = "***SensitiveInformation***";
- var createAggregatedClient = __name((commands, Client2) => {
- for (const command of Object.keys(commands)) {
- const CommandCtor = commands[command];
- const methodImpl = __name(async function(args, optionsOrCb, cb) {
- const command2 = new CommandCtor(args);
- if (typeof optionsOrCb === "function") {
- this.send(command2, optionsOrCb);
- } else if (typeof cb === "function") {
- if (typeof optionsOrCb !== "object")
- throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
- this.send(command2, optionsOrCb || {}, cb);
- } else {
- return this.send(command2, optionsOrCb);
- }
- }, "methodImpl");
- const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
- Client2.prototype[methodName] = methodImpl;
- }
- }, "createAggregatedClient");
- var parseBoolean = __name((value) => {
- switch (value) {
- case "true":
- return true;
- case "false":
- return false;
- default:
- throw new Error(`Unable to parse boolean value "${value}"`);
- }
- }, "parseBoolean");
- var expectBoolean = __name((value) => {
- if (value === null || value === undefined) {
- return;
- }
- if (typeof value === "number") {
- if (value === 0 || value === 1) {
- logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
- }
- if (value === 0) {
- return false;
- }
- if (value === 1) {
- return true;
- }
+ if (typeof value === "number") {
+ if (value === 0 || value === 1) {
+ logger4.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
+ }
+ if (value === 0) {
+ return false;
+ }
+ if (value === 1) {
+ return true;
+ }
}
if (typeof value === "string") {
const lower = value.toLowerCase();
@@ -6265,8 +7821,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return value;
}
throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
- }, "expectBoolean");
- var expectNumber = __name((value) => {
+ };
+ var expectNumber = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6283,9 +7839,9 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return value;
}
throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
- }, "expectNumber");
+ };
var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
- var expectFloat32 = __name((value) => {
+ var expectFloat32 = (value) => {
const expected = expectNumber(value);
if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== (-Infinity)) {
if (Math.abs(expected) > MAX_FLOAT) {
@@ -6293,8 +7849,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
}
}
return expected;
- }, "expectFloat32");
- var expectLong = __name((value) => {
+ };
+ var expectLong = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6302,19 +7858,19 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return value;
}
throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
- }, "expectLong");
+ };
var expectInt = expectLong;
- var expectInt32 = __name((value) => expectSizedInt(value, 32), "expectInt32");
- var expectShort = __name((value) => expectSizedInt(value, 16), "expectShort");
- var expectByte = __name((value) => expectSizedInt(value, 8), "expectByte");
- var expectSizedInt = __name((value, size) => {
+ var expectInt32 = (value) => expectSizedInt(value, 32);
+ var expectShort = (value) => expectSizedInt(value, 16);
+ var expectByte = (value) => expectSizedInt(value, 8);
+ var expectSizedInt = (value, size) => {
const expected = expectLong(value);
if (expected !== undefined && castInt(expected, size) !== expected) {
throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
}
return expected;
- }, "expectSizedInt");
- var castInt = __name((value, size) => {
+ };
+ var castInt = (value, size) => {
switch (size) {
case 32:
return Int32Array.of(value)[0];
@@ -6323,8 +7879,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
case 8:
return Int8Array.of(value)[0];
}
- }, "castInt");
- var expectNonNull = __name((value, location) => {
+ };
+ var expectNonNull = (value, location) => {
if (value === null || value === undefined) {
if (location) {
throw new TypeError(`Expected a non-null value for ${location}`);
@@ -6332,8 +7888,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
throw new TypeError("Expected a non-null value");
}
return value;
- }, "expectNonNull");
- var expectObject = __name((value) => {
+ };
+ var expectObject = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6342,8 +7898,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
}
const receivedType = Array.isArray(value) ? "array" : typeof value;
throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
- }, "expectObject");
- var expectString = __name((value) => {
+ };
+ var expectString = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6355,8 +7911,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return String(value);
}
throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
- }, "expectString");
- var expectUnion = __name((value) => {
+ };
+ var expectUnion = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6369,43 +7925,43 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
}
return asObject;
- }, "expectUnion");
- var strictParseDouble = __name((value) => {
+ };
+ var strictParseDouble = (value) => {
if (typeof value == "string") {
return expectNumber(parseNumber(value));
}
return expectNumber(value);
- }, "strictParseDouble");
+ };
var strictParseFloat = strictParseDouble;
- var strictParseFloat32 = __name((value) => {
+ var strictParseFloat32 = (value) => {
if (typeof value == "string") {
return expectFloat32(parseNumber(value));
}
return expectFloat32(value);
- }, "strictParseFloat32");
+ };
var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
- var parseNumber = __name((value) => {
+ var parseNumber = (value) => {
const matches = value.match(NUMBER_REGEX);
if (matches === null || matches[0].length !== value.length) {
throw new TypeError(`Expected real number, got implicit NaN`);
}
return parseFloat(value);
- }, "parseNumber");
- var limitedParseDouble = __name((value) => {
+ };
+ var limitedParseDouble = (value) => {
if (typeof value == "string") {
return parseFloatString(value);
}
return expectNumber(value);
- }, "limitedParseDouble");
+ };
var handleFloat = limitedParseDouble;
var limitedParseFloat = limitedParseDouble;
- var limitedParseFloat32 = __name((value) => {
+ var limitedParseFloat32 = (value) => {
if (typeof value == "string") {
return parseFloatString(value);
}
return expectFloat32(value);
- }, "limitedParseFloat32");
- var parseFloatString = __name((value) => {
+ };
+ var parseFloatString = (value) => {
switch (value) {
case "NaN":
return NaN;
@@ -6416,43 +7972,42 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
default:
throw new Error(`Unable to parse float value: ${value}`);
}
- }, "parseFloatString");
- var strictParseLong = __name((value) => {
+ };
+ var strictParseLong = (value) => {
if (typeof value === "string") {
return expectLong(parseNumber(value));
}
return expectLong(value);
- }, "strictParseLong");
+ };
var strictParseInt = strictParseLong;
- var strictParseInt32 = __name((value) => {
+ var strictParseInt32 = (value) => {
if (typeof value === "string") {
return expectInt32(parseNumber(value));
}
return expectInt32(value);
- }, "strictParseInt32");
- var strictParseShort = __name((value) => {
+ };
+ var strictParseShort = (value) => {
if (typeof value === "string") {
return expectShort(parseNumber(value));
}
return expectShort(value);
- }, "strictParseShort");
- var strictParseByte = __name((value) => {
+ };
+ var strictParseByte = (value) => {
if (typeof value === "string") {
return expectByte(parseNumber(value));
}
return expectByte(value);
- }, "strictParseByte");
- var stackTraceWarning = __name((message) => {
+ };
+ var stackTraceWarning = (message) => {
return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
- }, "stackTraceWarning");
+ };
var logger4 = {
warn: console.warn
};
var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- __name(dateToUtcString, "dateToUtcString");
var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
- var parseRfc3339DateTime = __name((value) => {
+ var parseRfc3339DateTime = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6468,9 +8023,9 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
const month = parseDateValue(monthStr, "month", 1, 12);
const day = parseDateValue(dayStr, "day", 1, 31);
return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
- }, "parseRfc3339DateTime");
+ };
var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
- var parseRfc3339DateTimeWithOffset = __name((value) => {
+ var parseRfc3339DateTimeWithOffset = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6490,11 +8045,11 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));
}
return date;
- }, "parseRfc3339DateTimeWithOffset");
+ };
var IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
var RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
var ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
- var parseRfc7231DateTime = __name((value) => {
+ var parseRfc7231DateTime = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6522,8 +8077,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
}
throw new TypeError("Invalid RFC-7231 date-time value");
- }, "parseRfc7231DateTime");
- var parseEpochTimestamp = __name((value) => {
+ };
+ var parseEpochTimestamp = (value) => {
if (value === null || value === undefined) {
return;
}
@@ -6532,6 +8087,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
valueAsDouble = value;
} else if (typeof value === "string") {
valueAsDouble = strictParseDouble(value);
+ } else if (typeof value === "object" && value.tag === 1) {
+ valueAsDouble = value.value;
} else {
throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
}
@@ -6539,36 +8096,36 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
}
return new Date(Math.round(valueAsDouble * 1000));
- }, "parseEpochTimestamp");
- var buildDate = __name((year, month, day, time) => {
+ };
+ var buildDate = (year, month, day, time) => {
const adjustedMonth = month - 1;
validateDayOfMonth(year, adjustedMonth, day);
return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));
- }, "buildDate");
- var parseTwoDigitYear = __name((value) => {
- const thisYear = (new Date()).getUTCFullYear();
+ };
+ var parseTwoDigitYear = (value) => {
+ const thisYear = new Date().getUTCFullYear();
const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
if (valueInThisCentury < thisYear) {
return valueInThisCentury + 100;
}
return valueInThisCentury;
- }, "parseTwoDigitYear");
+ };
var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;
- var adjustRfc850Year = __name((input) => {
- if (input.getTime() - (new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
+ var adjustRfc850Year = (input) => {
+ if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {
return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
}
return input;
- }, "adjustRfc850Year");
- var parseMonthByShortName = __name((value) => {
+ };
+ var parseMonthByShortName = (value) => {
const monthIdx = MONTHS.indexOf(value);
if (monthIdx < 0) {
throw new TypeError(`Invalid month: ${value}`);
}
return monthIdx + 1;
- }, "parseMonthByShortName");
+ };
var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- var validateDayOfMonth = __name((year, month, day) => {
+ var validateDayOfMonth = (year, month, day) => {
let maxDays = DAYS_IN_MONTH[month];
if (month === 1 && isLeapYear(year)) {
maxDays = 29;
@@ -6576,24 +8133,24 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
if (day > maxDays) {
throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
}
- }, "validateDayOfMonth");
- var isLeapYear = __name((year) => {
+ };
+ var isLeapYear = (year) => {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
- }, "isLeapYear");
- var parseDateValue = __name((value, type, lower, upper) => {
+ };
+ var parseDateValue = (value, type, lower, upper) => {
const dateVal = strictParseByte(stripLeadingZeroes(value));
if (dateVal < lower || dateVal > upper) {
throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
}
return dateVal;
- }, "parseDateValue");
- var parseMilliseconds = __name((value) => {
+ };
+ var parseMilliseconds = (value) => {
if (value === null || value === undefined) {
return 0;
}
return strictParseFloat32("0." + value) * 1000;
- }, "parseMilliseconds");
- var parseOffsetToMilliseconds = __name((value) => {
+ };
+ var parseOffsetToMilliseconds = (value) => {
const directionStr = value[0];
let direction = 1;
if (directionStr == "+") {
@@ -6606,8 +8163,8 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
const hour = Number(value.substring(1, 3));
const minute = Number(value.substring(4, 6));
return direction * (hour * 60 + minute) * 60 * 1000;
- }, "parseOffsetToMilliseconds");
- var stripLeadingZeroes = __name((value) => {
+ };
+ var stripLeadingZeroes = (value) => {
let idx = 0;
while (idx < value.length - 1 && value.charAt(idx) === "0") {
idx++;
@@ -6616,249 +8173,827 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
return value;
}
return value.slice(idx);
- }, "stripLeadingZeroes");
- var _ServiceException = class _ServiceException2 extends Error {
- constructor(options) {
- super(options.message);
- Object.setPrototypeOf(this, _ServiceException2.prototype);
- this.name = options.name;
- this.$fault = options.$fault;
- this.$metadata = options.$metadata;
- }
};
- __name(_ServiceException, "ServiceException");
- var ServiceException = _ServiceException;
- var decorateServiceException = __name((exception, additions = {}) => {
- Object.entries(additions).filter(([, v]) => v !== undefined).forEach(([k, v]) => {
- if (exception[k] == undefined || exception[k] === "") {
- exception[k] = v;
+ var LazyJsonString = function LazyJsonString(val) {
+ const str = Object.assign(new String(val), {
+ deserializeJSON() {
+ return JSON.parse(String(val));
+ },
+ toString() {
+ return String(val);
+ },
+ toJSON() {
+ return String(val);
}
});
- const message = exception.message || exception.Message || "UnknownError";
- exception.message = message;
- delete exception.Message;
- return exception;
- }, "decorateServiceException");
- var throwDefaultError = __name(({ output, parsedBody, exceptionCtor, errorCode }) => {
- const $metadata = deserializeMetadata(output);
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
- const response = new exceptionCtor({
- name: (parsedBody == null ? undefined : parsedBody.code) || (parsedBody == null ? undefined : parsedBody.Code) || errorCode || statusCode || "UnknownError",
- $fault: "client",
- $metadata
+ return str;
+ };
+ LazyJsonString.from = (object) => {
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || ("deserializeJSON" in object))) {
+ return object;
+ } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
+ return LazyJsonString(String(object));
+ }
+ return LazyJsonString(JSON.stringify(object));
+ };
+ LazyJsonString.fromObject = LazyJsonString.from;
+ var splitHeader = (value) => {
+ const z = value.length;
+ const values = [];
+ let withinQuotes = false;
+ let prevChar = undefined;
+ let anchor = 0;
+ for (let i = 0;i < z; ++i) {
+ const char = value[i];
+ switch (char) {
+ case `"`:
+ if (prevChar !== "\\") {
+ withinQuotes = !withinQuotes;
+ }
+ break;
+ case ",":
+ if (!withinQuotes) {
+ values.push(value.slice(anchor, i));
+ anchor = i + 1;
+ }
+ break;
+ }
+ prevChar = char;
+ }
+ values.push(value.slice(anchor));
+ return values.map((v) => {
+ v = v.trim();
+ const z2 = v.length;
+ if (z2 < 2) {
+ return v;
+ }
+ if (v[0] === `"` && v[z2 - 1] === `"`) {
+ v = v.slice(1, z2 - 1);
+ }
+ return v.replace(/\\"/g, '"');
});
- throw decorateServiceException(response, parsedBody);
- }, "throwDefaultError");
- var withBaseException = __name((ExceptionCtor) => {
- return ({ output, parsedBody, errorCode }) => {
- throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
- };
- }, "withBaseException");
- var deserializeMetadata = __name((output) => ({
- httpStatusCode: output.statusCode,
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
- extendedRequestId: output.headers["x-amz-id-2"],
- cfId: output.headers["x-amz-cf-id"]
- }), "deserializeMetadata");
- var loadConfigsForDefaultMode = __name((mode) => {
- switch (mode) {
- case "standard":
- return {
- retryMode: "standard",
- connectionTimeout: 3100
- };
- case "in-region":
- return {
- retryMode: "standard",
- connectionTimeout: 1100
- };
- case "cross-region":
- return {
- retryMode: "standard",
- connectionTimeout: 3100
+ };
+
+ class NumericValue {
+ string;
+ type;
+ constructor(string, type) {
+ this.string = string;
+ this.type = type;
+ let dot = 0;
+ for (let i = 0;i < string.length; ++i) {
+ const char = string.charCodeAt(i);
+ if (i === 0 && char === 45) {
+ continue;
+ }
+ if (char === 46) {
+ if (dot) {
+ throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
+ }
+ dot = 1;
+ continue;
+ }
+ if (char < 48 || char > 57) {
+ throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
+ }
+ }
+ }
+ toString() {
+ return this.string;
+ }
+ static [Symbol.hasInstance](object) {
+ if (!object || typeof object !== "object") {
+ return false;
+ }
+ const _nv = object;
+ const prototypeMatch = NumericValue.prototype.isPrototypeOf(object);
+ if (prototypeMatch) {
+ return prototypeMatch;
+ }
+ if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name?.endsWith("NumericValue")) {
+ return true;
+ }
+ return prototypeMatch;
+ }
+ }
+ Object.defineProperty(exports, "generateIdempotencyToken", {
+ enumerable: true,
+ get: function() {
+ return uuid.v4;
+ }
+ });
+ exports.LazyJsonString = LazyJsonString;
+ exports.NumericValue = NumericValue;
+ exports.copyDocumentWithTransform = copyDocumentWithTransform;
+ exports.dateToUtcString = dateToUtcString;
+ exports.expectBoolean = expectBoolean;
+ exports.expectByte = expectByte;
+ exports.expectFloat32 = expectFloat32;
+ exports.expectInt = expectInt;
+ exports.expectInt32 = expectInt32;
+ exports.expectLong = expectLong;
+ exports.expectNonNull = expectNonNull;
+ exports.expectNumber = expectNumber;
+ exports.expectObject = expectObject;
+ exports.expectShort = expectShort;
+ exports.expectString = expectString;
+ exports.expectUnion = expectUnion;
+ exports.handleFloat = handleFloat;
+ exports.limitedParseDouble = limitedParseDouble;
+ exports.limitedParseFloat = limitedParseFloat;
+ exports.limitedParseFloat32 = limitedParseFloat32;
+ exports.logger = logger4;
+ exports.nv = nv;
+ exports.parseBoolean = parseBoolean;
+ exports.parseEpochTimestamp = parseEpochTimestamp;
+ exports.parseRfc3339DateTime = parseRfc3339DateTime;
+ exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset;
+ exports.parseRfc7231DateTime = parseRfc7231DateTime;
+ exports.quoteHeader = quoteHeader;
+ exports.splitEvery = splitEvery;
+ exports.splitHeader = splitHeader;
+ exports.strictParseByte = strictParseByte;
+ exports.strictParseDouble = strictParseDouble;
+ exports.strictParseFloat = strictParseFloat;
+ exports.strictParseFloat32 = strictParseFloat32;
+ exports.strictParseInt = strictParseInt;
+ exports.strictParseInt32 = strictParseInt32;
+ exports.strictParseLong = strictParseLong;
+ exports.strictParseShort = strictParseShort;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/en
+var require_event_streams = __commonJS((exports) => {
+ var schema = require_schema();
+ var utilUtf8 = require_dist_cjs8();
+
+ class EventStreamSerde {
+ marshaller;
+ serializer;
+ deserializer;
+ serdeContext;
+ defaultContentType;
+ constructor({ marshaller, serializer, deserializer, serdeContext, defaultContentType }) {
+ this.marshaller = marshaller;
+ this.serializer = serializer;
+ this.deserializer = deserializer;
+ this.serdeContext = serdeContext;
+ this.defaultContentType = defaultContentType;
+ }
+ async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
+ const marshaller = this.marshaller;
+ const eventStreamMember = requestSchema.getEventStreamMember();
+ const unionSchema = requestSchema.getMemberSchema(eventStreamMember);
+ unionSchema.getMemberSchemas();
+ const serializer = this.serializer;
+ const defaultContentType = this.defaultContentType;
+ const initialRequestMarker = Symbol("initialRequestMarker");
+ const eventStreamIterable = {
+ async* [Symbol.asyncIterator]() {
+ if (initialRequest) {
+ const headers = {
+ ":event-type": { type: "string", value: "initial-request" },
+ ":message-type": { type: "string", value: "event" },
+ ":content-type": { type: "string", value: defaultContentType }
+ };
+ serializer.write(requestSchema, initialRequest);
+ const body = serializer.flush();
+ yield {
+ [initialRequestMarker]: true,
+ headers,
+ body
+ };
+ }
+ for await (const page of eventStream) {
+ yield page;
+ }
+ }
+ };
+ return marshaller.serialize(eventStreamIterable, (event) => {
+ if (event[initialRequestMarker]) {
+ return {
+ headers: event.headers,
+ body: event.body
+ };
+ }
+ const unionMember = Object.keys(event).find((key) => {
+ return key !== "__type";
+ }) ?? "";
+ const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
+ const headers = {
+ ":event-type": { type: "string", value: eventType },
+ ":message-type": { type: "string", value: "event" },
+ ":content-type": { type: "string", value: explicitPayloadContentType ?? defaultContentType },
+ ...additionalHeaders
};
- case "mobile":
return {
- retryMode: "standard",
- connectionTimeout: 30000
+ headers,
+ body
};
- default:
- return {};
- }
- }, "loadConfigsForDefaultMode");
- var warningEmitted = false;
- var emitWarningIfUnsupportedVersion = __name((version) => {
- if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 14) {
- warningEmitted = true;
+ });
}
- }, "emitWarningIfUnsupportedVersion");
- var getChecksumConfiguration = __name((runtimeConfig) => {
- const checksumAlgorithms = [];
- for (const id in import_types.AlgorithmId) {
- const algorithmId = import_types.AlgorithmId[id];
- if (runtimeConfig[algorithmId] === undefined) {
- continue;
- }
- checksumAlgorithms.push({
- algorithmId: () => algorithmId,
- checksumConstructor: () => runtimeConfig[algorithmId]
+ async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
+ const marshaller = this.marshaller;
+ const eventStreamMember = responseSchema.getEventStreamMember();
+ const unionSchema = responseSchema.getMemberSchema(eventStreamMember);
+ const memberSchemas = unionSchema.getMemberSchemas();
+ const initialResponseMarker = Symbol("initialResponseMarker");
+ const asyncIterable = marshaller.deserialize(response.body, async (event) => {
+ const unionMember = Object.keys(event).find((key) => {
+ return key !== "__type";
+ }) ?? "";
+ if (unionMember === "initial-response") {
+ const dataObject = await this.deserializer.read(responseSchema, event[unionMember].body);
+ delete dataObject[eventStreamMember];
+ return {
+ [initialResponseMarker]: true,
+ ...dataObject
+ };
+ } else if (unionMember in memberSchemas) {
+ const eventStreamSchema = memberSchemas[unionMember];
+ return {
+ [unionMember]: await this.deserializer.read(eventStreamSchema, event[unionMember].body)
+ };
+ } else {
+ return {
+ $unknown: event
+ };
+ }
});
+ const asyncIterator = asyncIterable[Symbol.asyncIterator]();
+ const firstEvent = await asyncIterator.next();
+ if (firstEvent.done) {
+ return asyncIterable;
+ }
+ if (firstEvent.value?.[initialResponseMarker]) {
+ if (!responseSchema) {
+ throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
+ }
+ for (const [key, value] of Object.entries(firstEvent.value)) {
+ initialResponseContainer[key] = value;
+ }
+ }
+ return {
+ async* [Symbol.asyncIterator]() {
+ if (!firstEvent?.value?.[initialResponseMarker]) {
+ yield firstEvent.value;
+ }
+ while (true) {
+ const { done, value } = await asyncIterator.next();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ }
+ };
}
- return {
- _checksumAlgorithms: checksumAlgorithms,
- addChecksumAlgorithm(algo) {
- this._checksumAlgorithms.push(algo);
- },
- checksumAlgorithms() {
- return this._checksumAlgorithms;
+ writeEventBody(unionMember, unionSchema, event) {
+ const serializer = this.serializer;
+ let eventType = unionMember;
+ let explicitPayloadMember = null;
+ let explicitPayloadContentType;
+ const isKnownSchema = unionSchema.hasMemberSchema(unionMember);
+ const additionalHeaders = {};
+ if (!isKnownSchema) {
+ const [type, value] = event[unionMember];
+ eventType = type;
+ serializer.write(schema.SCHEMA.DOCUMENT, value);
+ } else {
+ const eventSchema = unionSchema.getMemberSchema(unionMember);
+ if (eventSchema.isStructSchema()) {
+ for (const [memberName, memberSchema] of eventSchema.structIterator()) {
+ const { eventHeader, eventPayload } = memberSchema.getMergedTraits();
+ if (eventPayload) {
+ explicitPayloadMember = memberName;
+ break;
+ } else if (eventHeader) {
+ const value = event[unionMember][memberName];
+ let type = "binary";
+ if (memberSchema.isNumericSchema()) {
+ if ((-2) ** 31 <= value && value <= 2 ** 31 - 1) {
+ type = "integer";
+ } else {
+ type = "long";
+ }
+ } else if (memberSchema.isTimestampSchema()) {
+ type = "timestamp";
+ } else if (memberSchema.isStringSchema()) {
+ type = "string";
+ } else if (memberSchema.isBooleanSchema()) {
+ type = "boolean";
+ }
+ if (value != null) {
+ additionalHeaders[memberName] = {
+ type,
+ value
+ };
+ delete event[unionMember][memberName];
+ }
+ }
+ }
+ if (explicitPayloadMember !== null) {
+ const payloadSchema = eventSchema.getMemberSchema(explicitPayloadMember);
+ if (payloadSchema.isBlobSchema()) {
+ explicitPayloadContentType = "application/octet-stream";
+ } else if (payloadSchema.isStringSchema()) {
+ explicitPayloadContentType = "text/plain";
+ }
+ serializer.write(payloadSchema, event[unionMember][explicitPayloadMember]);
+ } else {
+ serializer.write(eventSchema, event[unionMember]);
+ }
+ } else {
+ throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
+ }
}
- };
- }, "getChecksumConfiguration");
- var resolveChecksumRuntimeConfig = __name((clientConfig) => {
- const runtimeConfig = {};
- clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
- runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
+ const messageSerialization = serializer.flush();
+ const body = typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8)(messageSerialization) : messageSerialization;
+ return {
+ body,
+ eventType,
+ explicitPayloadContentType,
+ additionalHeaders
+ };
+ }
+ }
+ exports.EventStreamSerde = EventStreamSerde;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_protocols = __commonJS((exports) => {
+ var extendedEncodeURIComponent = function(str) {
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
});
- return runtimeConfig;
- }, "resolveChecksumRuntimeConfig");
- var getRetryConfiguration = __name((runtimeConfig) => {
- let _retryStrategy = runtimeConfig.retryStrategy;
- return {
- setRetryStrategy(retryStrategy) {
- _retryStrategy = retryStrategy;
- },
- retryStrategy() {
- return _retryStrategy;
+ };
+ var requestBuilder = function(input, context) {
+ return new RequestBuilder(input, context);
+ };
+ var determineTimestampFormat = function(ns, settings) {
+ if (settings.timestampFormat.useTrait) {
+ if (ns.isTimestampSchema() && (ns.getSchema() === schema.SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === schema.SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS)) {
+ return ns.getSchema();
}
- };
- }, "getRetryConfiguration");
- var resolveRetryRuntimeConfig = __name((retryStrategyConfiguration) => {
- const runtimeConfig = {};
- runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
- return runtimeConfig;
- }, "resolveRetryRuntimeConfig");
- var getDefaultExtensionConfiguration = __name((runtimeConfig) => {
- return {
- ...getChecksumConfiguration(runtimeConfig),
- ...getRetryConfiguration(runtimeConfig)
- };
- }, "getDefaultExtensionConfiguration");
- var getDefaultClientConfiguration = getDefaultExtensionConfiguration;
- var resolveDefaultRuntimeConfig = __name((config) => {
- return {
- ...resolveChecksumRuntimeConfig(config),
- ...resolveRetryRuntimeConfig(config)
- };
- }, "resolveDefaultRuntimeConfig");
- __name(extendedEncodeURIComponent, "extendedEncodeURIComponent");
- var getArrayIfSingleItem = __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], "getArrayIfSingleItem");
- var getValueFromTextNode = __name((obj) => {
- const textNodeName = "#text";
- for (const key in obj) {
- if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {
- obj[key] = obj[key][textNodeName];
- } else if (typeof obj[key] === "object" && obj[key] !== null) {
- obj[key] = getValueFromTextNode(obj[key]);
+ }
+ const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
+ const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? schema.SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? schema.SCHEMA.TIMESTAMP_DATE_TIME : undefined : undefined;
+ return bindingFormat ?? settings.timestampFormat.default;
+ };
+ var utilStream = require_dist_cjs15();
+ var schema = require_schema();
+ var serde = require_serde();
+ var protocolHttp = require_dist_cjs2();
+ var utilBase64 = require_dist_cjs9();
+ var utilUtf8 = require_dist_cjs8();
+ var collectBody = async (streamBody = new Uint8Array, context) => {
+ if (streamBody instanceof Uint8Array) {
+ return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody);
+ }
+ if (!streamBody) {
+ return utilStream.Uint8ArrayBlobAdapter.mutate(new Uint8Array);
+ }
+ const fromContext = context.streamCollector(streamBody);
+ return utilStream.Uint8ArrayBlobAdapter.mutate(await fromContext);
+ };
+
+ class HttpProtocol {
+ options;
+ serdeContext;
+ constructor(options) {
+ this.options = options;
+ }
+ getRequestType() {
+ return protocolHttp.HttpRequest;
+ }
+ getResponseType() {
+ return protocolHttp.HttpResponse;
+ }
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ this.serializer.setSerdeContext(serdeContext);
+ this.deserializer.setSerdeContext(serdeContext);
+ if (this.getPayloadCodec()) {
+ this.getPayloadCodec().setSerdeContext(serdeContext);
}
}
- return obj;
- }, "getValueFromTextNode");
- var StringWrapper = __name(function() {
- const Class = Object.getPrototypeOf(this).constructor;
- const Constructor = Function.bind.apply(String, [null, ...arguments]);
- const instance = new Constructor;
- Object.setPrototypeOf(instance, Class.prototype);
- return instance;
- }, "StringWrapper");
- StringWrapper.prototype = Object.create(String.prototype, {
- constructor: {
- value: StringWrapper,
- enumerable: false,
- writable: true,
- configurable: true
+ updateServiceEndpoint(request, endpoint) {
+ if ("url" in endpoint) {
+ request.protocol = endpoint.url.protocol;
+ request.hostname = endpoint.url.hostname;
+ request.port = endpoint.url.port ? Number(endpoint.url.port) : undefined;
+ request.path = endpoint.url.pathname;
+ request.fragment = endpoint.url.hash || undefined;
+ request.username = endpoint.url.username || undefined;
+ request.password = endpoint.url.password || undefined;
+ for (const [k, v] of endpoint.url.searchParams.entries()) {
+ if (!request.query) {
+ request.query = {};
+ }
+ request.query[k] = v;
+ }
+ return request;
+ } else {
+ request.protocol = endpoint.protocol;
+ request.hostname = endpoint.hostname;
+ request.port = endpoint.port ? Number(endpoint.port) : undefined;
+ request.path = endpoint.path;
+ request.query = {
+ ...endpoint.query
+ };
+ return request;
+ }
+ }
+ setHostPrefix(request, operationSchema, input) {
+ const operationNs = schema.NormalizedSchema.of(operationSchema);
+ const inputNs = schema.NormalizedSchema.of(operationSchema.input);
+ if (operationNs.getMergedTraits().endpoint) {
+ let hostPrefix = operationNs.getMergedTraits().endpoint?.[0];
+ if (typeof hostPrefix === "string") {
+ const hostLabelInputs = [...inputNs.structIterator()].filter(([, member]) => member.getMergedTraits().hostLabel);
+ for (const [name] of hostLabelInputs) {
+ const replacement = input[name];
+ if (typeof replacement !== "string") {
+ throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
+ }
+ hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
+ }
+ request.hostname = hostPrefix + request.hostname;
+ }
+ }
}
- });
- Object.setPrototypeOf(StringWrapper, String);
- var _LazyJsonString = class _LazyJsonString2 extends StringWrapper {
- deserializeJSON() {
- return JSON.parse(super.toString());
+ deserializeMetadata(output) {
+ return {
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"]
+ };
+ }
+ async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
+ const eventStreamSerde = await this.loadEventStreamCapability();
+ return eventStreamSerde.serializeEventStream({
+ eventStream,
+ requestSchema,
+ initialRequest
+ });
}
- toJSON() {
- return super.toString();
+ async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
+ const eventStreamSerde = await this.loadEventStreamCapability();
+ return eventStreamSerde.deserializeEventStream({
+ response,
+ responseSchema,
+ initialResponseContainer
+ });
+ }
+ async loadEventStreamCapability() {
+ const { EventStreamSerde } = await Promise.resolve().then(() => __toESM(require_event_streams(), 1));
+ return new EventStreamSerde({
+ marshaller: this.getEventStreamMarshaller(),
+ serializer: this.serializer,
+ deserializer: this.deserializer,
+ serdeContext: this.serdeContext,
+ defaultContentType: this.getDefaultContentType()
+ });
}
- static fromObject(object) {
- if (object instanceof _LazyJsonString2) {
- return object;
- } else if (object instanceof String || typeof object === "string") {
- return new _LazyJsonString2(object);
+ getDefaultContentType() {
+ throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
+ }
+ async deserializeHttpMessage(schema2, context, response, arg4, arg5) {
+ return [];
+ }
+ getEventStreamMarshaller() {
+ const context = this.serdeContext;
+ if (!context.eventStreamMarshaller) {
+ throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
}
- return new _LazyJsonString2(JSON.stringify(object));
+ return context.eventStreamMarshaller;
}
- };
- __name(_LazyJsonString, "LazyJsonString");
- var LazyJsonString = _LazyJsonString;
- __name(map, "map");
- var convertMap = __name((target) => {
- const output = {};
- for (const [k, v] of Object.entries(target || {})) {
- output[k] = [, v];
+ }
+
+ class HttpBindingProtocol extends HttpProtocol {
+ async serializeRequest(operationSchema, _input, context) {
+ const input = {
+ ..._input ?? {}
+ };
+ const serializer = this.serializer;
+ const query = {};
+ const headers = {};
+ const endpoint = await context.endpoint();
+ const ns = schema.NormalizedSchema.of(operationSchema?.input);
+ const schema$1 = ns.getSchema();
+ let hasNonHttpBindingMember = false;
+ let payload;
+ const request = new protocolHttp.HttpRequest({
+ protocol: "",
+ hostname: "",
+ port: undefined,
+ path: "",
+ fragment: undefined,
+ query,
+ headers,
+ body: undefined
+ });
+ if (endpoint) {
+ this.updateServiceEndpoint(request, endpoint);
+ this.setHostPrefix(request, operationSchema, input);
+ const opTraits = schema.NormalizedSchema.translateTraits(operationSchema.traits);
+ if (opTraits.http) {
+ request.method = opTraits.http[0];
+ const [path, search] = opTraits.http[1].split("?");
+ if (request.path == "/") {
+ request.path = path;
+ } else {
+ request.path += path;
+ }
+ const traitSearchParams = new URLSearchParams(search ?? "");
+ Object.assign(query, Object.fromEntries(traitSearchParams));
+ }
+ }
+ for (const [memberName, memberNs] of ns.structIterator()) {
+ const memberTraits = memberNs.getMergedTraits() ?? {};
+ const inputMemberValue = input[memberName];
+ if (inputMemberValue == null) {
+ continue;
+ }
+ if (memberTraits.httpPayload) {
+ const isStreaming = memberNs.isStreaming();
+ if (isStreaming) {
+ const isEventStream = memberNs.isStructSchema();
+ if (isEventStream) {
+ if (input[memberName]) {
+ payload = await this.serializeEventStream({
+ eventStream: input[memberName],
+ requestSchema: ns
+ });
+ }
+ } else {
+ payload = inputMemberValue;
+ }
+ } else {
+ serializer.write(memberNs, inputMemberValue);
+ payload = serializer.flush();
+ }
+ delete input[memberName];
+ } else if (memberTraits.httpLabel) {
+ serializer.write(memberNs, inputMemberValue);
+ const replacement = serializer.flush();
+ if (request.path.includes(`{${memberName}+}`)) {
+ request.path = request.path.replace(`{${memberName}+}`, replacement.split("/").map(extendedEncodeURIComponent).join("/"));
+ } else if (request.path.includes(`{${memberName}}`)) {
+ request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));
+ }
+ delete input[memberName];
+ } else if (memberTraits.httpHeader) {
+ serializer.write(memberNs, inputMemberValue);
+ headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
+ delete input[memberName];
+ } else if (typeof memberTraits.httpPrefixHeaders === "string") {
+ for (const [key, val] of Object.entries(inputMemberValue)) {
+ const amalgam = memberTraits.httpPrefixHeaders + key;
+ serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
+ headers[amalgam.toLowerCase()] = serializer.flush();
+ }
+ delete input[memberName];
+ } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {
+ this.serializeQuery(memberNs, inputMemberValue, query);
+ delete input[memberName];
+ } else {
+ hasNonHttpBindingMember = true;
+ }
+ }
+ if (hasNonHttpBindingMember && input) {
+ serializer.write(schema$1, input);
+ payload = serializer.flush();
+ }
+ request.headers = headers;
+ request.query = query;
+ request.body = payload;
+ return request;
}
- return output;
- }, "convertMap");
- var take = __name((source, instructions) => {
- const out = {};
- for (const key in instructions) {
- applyInstruction(out, source, instructions, key);
+ serializeQuery(ns, data, query) {
+ const serializer = this.serializer;
+ const traits = ns.getMergedTraits();
+ if (traits.httpQueryParams) {
+ for (const [key, val] of Object.entries(data)) {
+ if (!(key in query)) {
+ const valueSchema = ns.getValueSchema();
+ Object.assign(valueSchema.getMergedTraits(), {
+ ...traits,
+ httpQuery: key,
+ httpQueryParams: undefined
+ });
+ this.serializeQuery(valueSchema, val, query);
+ }
+ }
+ return;
+ }
+ if (ns.isListSchema()) {
+ const sparse = !!ns.getMergedTraits().sparse;
+ const buffer = [];
+ for (const item of data) {
+ serializer.write([ns.getValueSchema(), traits], item);
+ const serializable = serializer.flush();
+ if (sparse || serializable !== undefined) {
+ buffer.push(serializable);
+ }
+ }
+ query[traits.httpQuery] = buffer;
+ } else {
+ serializer.write([ns, traits], data);
+ query[traits.httpQuery] = serializer.flush();
+ }
+ }
+ async deserializeResponse(operationSchema, context, response) {
+ const deserializer = this.deserializer;
+ const ns = schema.NormalizedSchema.of(operationSchema.output);
+ const dataObject = {};
+ if (response.statusCode >= 300) {
+ const bytes = await collectBody(response.body, context);
+ if (bytes.byteLength > 0) {
+ Object.assign(dataObject, await deserializer.read(schema.SCHEMA.DOCUMENT, bytes));
+ }
+ await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
+ throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
+ }
+ for (const header in response.headers) {
+ const value = response.headers[header];
+ delete response.headers[header];
+ response.headers[header.toLowerCase()] = value;
+ }
+ const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
+ if (nonHttpBindingMembers.length) {
+ const bytes = await collectBody(response.body, context);
+ if (bytes.byteLength > 0) {
+ const dataFromBody = await deserializer.read(ns, bytes);
+ for (const member of nonHttpBindingMembers) {
+ dataObject[member] = dataFromBody[member];
+ }
+ }
+ }
+ dataObject.$metadata = this.deserializeMetadata(response);
+ return dataObject;
}
- return out;
- }, "take");
- var mapWithFilter = __name((target, filter, instructions) => {
- return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
- if (Array.isArray(value)) {
- _instructions[key] = value;
+ async deserializeHttpMessage(schema$1, context, response, arg4, arg5) {
+ let dataObject;
+ if (arg4 instanceof Set) {
+ dataObject = arg5;
} else {
- if (typeof value === "function") {
- _instructions[key] = [filter, value()];
+ dataObject = arg4;
+ }
+ const deserializer = this.deserializer;
+ const ns = schema.NormalizedSchema.of(schema$1);
+ const nonHttpBindingMembers = [];
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ const memberTraits = memberSchema.getMemberTraits();
+ if (memberTraits.httpPayload) {
+ const isStreaming = memberSchema.isStreaming();
+ if (isStreaming) {
+ const isEventStream = memberSchema.isStructSchema();
+ if (isEventStream) {
+ dataObject[memberName] = await this.deserializeEventStream({
+ response,
+ responseSchema: ns
+ });
+ } else {
+ dataObject[memberName] = utilStream.sdkStreamMixin(response.body);
+ }
+ } else if (response.body) {
+ const bytes = await collectBody(response.body, context);
+ if (bytes.byteLength > 0) {
+ dataObject[memberName] = await deserializer.read(memberSchema, bytes);
+ }
+ }
+ } else if (memberTraits.httpHeader) {
+ const key = String(memberTraits.httpHeader).toLowerCase();
+ const value = response.headers[key];
+ if (value != null) {
+ if (memberSchema.isListSchema()) {
+ const headerListValueSchema = memberSchema.getValueSchema();
+ headerListValueSchema.getMergedTraits().httpHeader = key;
+ let sections;
+ if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === schema.SCHEMA.TIMESTAMP_DEFAULT) {
+ sections = serde.splitEvery(value, ",", 2);
+ } else {
+ sections = serde.splitHeader(value);
+ }
+ const list = [];
+ for (const section of sections) {
+ list.push(await deserializer.read(headerListValueSchema, section.trim()));
+ }
+ dataObject[memberName] = list;
+ } else {
+ dataObject[memberName] = await deserializer.read(memberSchema, value);
+ }
+ }
+ } else if (memberTraits.httpPrefixHeaders !== undefined) {
+ dataObject[memberName] = {};
+ for (const [header, value] of Object.entries(response.headers)) {
+ if (header.startsWith(memberTraits.httpPrefixHeaders)) {
+ const valueSchema = memberSchema.getValueSchema();
+ valueSchema.getMergedTraits().httpHeader = header;
+ dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
+ }
+ }
+ } else if (memberTraits.httpResponseCode) {
+ dataObject[memberName] = response.statusCode;
} else {
- _instructions[key] = [filter, value];
+ nonHttpBindingMembers.push(memberName);
}
}
- return _instructions;
- }, {}));
- }, "mapWithFilter");
- var applyInstruction = __name((target, source, instructions, targetKey) => {
- if (source !== null) {
- let instruction = instructions[targetKey];
- if (typeof instruction === "function") {
- instruction = [, instruction];
+ return nonHttpBindingMembers;
+ }
+ }
+
+ class RpcProtocol extends HttpProtocol {
+ async serializeRequest(operationSchema, input, context) {
+ const serializer = this.serializer;
+ const query = {};
+ const headers = {};
+ const endpoint = await context.endpoint();
+ const ns = schema.NormalizedSchema.of(operationSchema?.input);
+ const schema$1 = ns.getSchema();
+ let payload;
+ const request = new protocolHttp.HttpRequest({
+ protocol: "",
+ hostname: "",
+ port: undefined,
+ path: "/",
+ fragment: undefined,
+ query,
+ headers,
+ body: undefined
+ });
+ if (endpoint) {
+ this.updateServiceEndpoint(request, endpoint);
+ this.setHostPrefix(request, operationSchema, input);
}
- const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
- if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
- target[targetKey] = valueFn(source[sourceKey]);
+ const _input = {
+ ...input
+ };
+ if (input) {
+ const eventStreamMember = ns.getEventStreamMember();
+ if (eventStreamMember) {
+ if (_input[eventStreamMember]) {
+ const initialRequest = {};
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ if (memberName !== eventStreamMember && _input[memberName]) {
+ serializer.write(memberSchema, _input[memberName]);
+ initialRequest[memberName] = serializer.flush();
+ }
+ }
+ payload = await this.serializeEventStream({
+ eventStream: _input[eventStreamMember],
+ requestSchema: ns,
+ initialRequest
+ });
+ }
+ } else {
+ serializer.write(schema$1, _input);
+ payload = serializer.flush();
+ }
}
- return;
+ request.headers = headers;
+ request.query = query;
+ request.body = payload;
+ request.method = "POST";
+ return request;
}
- let [filter, value] = instructions[targetKey];
- if (typeof value === "function") {
- let _value;
- const defaultFilterPassed = filter === undefined && (_value = value()) != null;
- const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter;
- if (defaultFilterPassed) {
- target[targetKey] = _value;
- } else if (customFilterPassed) {
- target[targetKey] = value();
- }
- } else {
- const defaultFilterPassed = filter === undefined && value != null;
- const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
- if (defaultFilterPassed || customFilterPassed) {
- target[targetKey] = value;
+ async deserializeResponse(operationSchema, context, response) {
+ const deserializer = this.deserializer;
+ const ns = schema.NormalizedSchema.of(operationSchema.output);
+ const dataObject = {};
+ if (response.statusCode >= 300) {
+ const bytes = await collectBody(response.body, context);
+ if (bytes.byteLength > 0) {
+ Object.assign(dataObject, await deserializer.read(schema.SCHEMA.DOCUMENT, bytes));
+ }
+ await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
+ throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
+ }
+ for (const header in response.headers) {
+ const value = response.headers[header];
+ delete response.headers[header];
+ response.headers[header.toLowerCase()] = value;
+ }
+ const eventStreamMember = ns.getEventStreamMember();
+ if (eventStreamMember) {
+ dataObject[eventStreamMember] = await this.deserializeEventStream({
+ response,
+ responseSchema: ns,
+ initialResponseContainer: dataObject
+ });
+ } else {
+ const bytes = await collectBody(response.body, context);
+ if (bytes.byteLength > 0) {
+ Object.assign(dataObject, await deserializer.read(ns, bytes));
+ }
}
+ dataObject.$metadata = this.deserializeMetadata(response);
+ return dataObject;
}
- }, "applyInstruction");
- var nonNullish = __name((_) => _ != null, "nonNullish");
- var pass = __name((_) => _, "pass");
- var resolvedPath = __name((resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
+ }
+ var resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
if (input != null && input[memberName] !== undefined) {
const labelValue = labelValueProvider();
if (labelValue.length <= 0) {
@@ -6869,1125 +9004,876 @@ var require_dist_cjs16 = __commonJS((exports, module) => {
throw new Error("No value provided for input HTTP label: " + memberName + ".");
}
return resolvedPath2;
- }, "resolvedPath");
- var serializeFloat = __name((value) => {
- if (value !== value) {
- return "NaN";
+ };
+
+ class RequestBuilder {
+ input;
+ context;
+ query = {};
+ method = "";
+ headers = {};
+ path = "";
+ body = null;
+ hostname = "";
+ resolvePathStack = [];
+ constructor(input, context) {
+ this.input = input;
+ this.context = context;
}
- switch (value) {
- case Infinity:
- return "Infinity";
- case (-Infinity):
- return "-Infinity";
- default:
- return value;
- }
- }, "serializeFloat");
- var _json = __name((obj) => {
- if (obj == null) {
- return {};
+ async build() {
+ const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
+ this.path = basePath;
+ for (const resolvePath of this.resolvePathStack) {
+ resolvePath(this.path);
+ }
+ return new protocolHttp.HttpRequest({
+ protocol,
+ hostname: this.hostname || hostname,
+ port,
+ method: this.method,
+ path: this.path,
+ query: this.query,
+ body: this.body,
+ headers: this.headers
+ });
}
- if (Array.isArray(obj)) {
- return obj.filter((_) => _ != null).map(_json);
+ hn(hostname) {
+ this.hostname = hostname;
+ return this;
}
- if (typeof obj === "object") {
- const target = {};
- for (const key of Object.keys(obj)) {
- if (obj[key] == null) {
- continue;
- }
- target[key] = _json(obj[key]);
- }
- return target;
+ bp(uriLabel) {
+ this.resolvePathStack.push((basePath) => {
+ this.path = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
+ });
+ return this;
}
- return obj;
- }, "_json");
- __name(splitEvery, "splitEvery");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_tslib = __commonJS((exports, module) => {
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */
- var __extends;
- var __assign;
- var __rest;
- var __decorate;
- var __param;
- var __metadata;
- var __awaiter;
- var __generator;
- var __exportStar;
- var __values;
- var __read;
- var __spread;
- var __spreadArrays;
- var __await;
- var __asyncGenerator;
- var __asyncDelegator;
- var __asyncValues;
- var __makeTemplateObject;
- var __importStar;
- var __importDefault;
- var __classPrivateFieldGet;
- var __classPrivateFieldSet;
- var __createBinding;
- (function(factory) {
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
- if (typeof define === "function" && define.amd) {
- define("tslib", ["exports"], function(exports2) {
- factory(createExporter(root, createExporter(exports2)));
+ p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
+ this.resolvePathStack.push((path) => {
+ this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
});
- } else if (typeof module === "object" && typeof exports === "object") {
- factory(createExporter(root, createExporter(exports)));
- } else {
- factory(createExporter(root));
+ return this;
}
- function createExporter(exports2, previous) {
- if (exports2 !== root) {
- if (typeof Object.create === "function") {
- Object.defineProperty(exports2, "__esModule", { value: true });
- } else {
- exports2.__esModule = true;
- }
- }
- return function(id, v) {
- return exports2[id] = previous ? previous(id, v) : v;
- };
+ h(headers) {
+ this.headers = headers;
+ return this;
}
- })(function(exporter) {
- var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
- d.__proto__ = b;
- } || function(d, b) {
- for (var p in b)
- if (b.hasOwnProperty(p))
- d[p] = b[p];
- };
- __extends = function(d, b) {
- extendStatics(d, b);
- function __() {
- this.constructor = d;
- }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
- };
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length;i < n; i++) {
- s = arguments[i];
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
- }
- return t;
- };
- __rest = function(s, e) {
- var t = {};
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
+ q(query) {
+ this.query = query;
+ return this;
+ }
+ b(body) {
+ this.body = body;
+ return this;
+ }
+ m(method) {
+ this.method = method;
+ return this;
+ }
+ }
+
+ class FromStringShapeDeserializer {
+ settings;
+ serdeContext;
+ constructor(settings) {
+ this.settings = settings;
+ }
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ read(_schema, data) {
+ const ns = schema.NormalizedSchema.of(_schema);
+ if (ns.isListSchema()) {
+ return serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
+ }
+ if (ns.isBlobSchema()) {
+ return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(data);
+ }
+ if (ns.isTimestampSchema()) {
+ const format = determineTimestampFormat(ns, this.settings);
+ switch (format) {
+ case schema.SCHEMA.TIMESTAMP_DATE_TIME:
+ return serde.parseRfc3339DateTimeWithOffset(data);
+ case schema.SCHEMA.TIMESTAMP_HTTP_DATE:
+ return serde.parseRfc7231DateTime(data);
+ case schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ return serde.parseEpochTimestamp(data);
+ default:
+ console.warn("Missing timestamp format, parsing value with Date constructor:", data);
+ return new Date(data);
}
- return t;
- };
- __decorate = function(decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
- r = Reflect.decorate(decorators, target, key, desc);
- else
- for (var i = decorators.length - 1;i >= 0; i--)
- if (d = decorators[i])
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- __param = function(paramIndex, decorator) {
- return function(target, key) {
- decorator(target, key, paramIndex);
- };
- };
- __metadata = function(metadataKey, metadataValue) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
- return Reflect.metadata(metadataKey, metadataValue);
- };
- __awaiter = function(thisArg, _arguments, P, generator) {
- function adopt(value) {
- return value instanceof P ? value : new P(function(resolve) {
- resolve(value);
- });
}
- return new (P || (P = Promise))(function(resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
+ if (ns.isStringSchema()) {
+ const mediaType = ns.getMergedTraits().mediaType;
+ let intermediateValue = data;
+ if (mediaType) {
+ if (ns.getMergedTraits().httpHeader) {
+ intermediateValue = this.base64ToUtf8(intermediateValue);
}
- }
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
+ if (isJson) {
+ intermediateValue = serde.LazyJsonString.from(intermediateValue);
}
+ return intermediateValue;
}
- function step(result) {
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ switch (true) {
+ case ns.isNumericSchema():
+ return Number(data);
+ case ns.isBigIntegerSchema():
+ return BigInt(data);
+ case ns.isBigDecimalSchema():
+ return new serde.NumericValue(data, "bigDecimal");
+ case ns.isBooleanSchema():
+ return String(data).toLowerCase() === "true";
+ }
+ return data;
+ }
+ base64ToUtf8(base64String) {
+ return (this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8)((this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(base64String));
+ }
+ }
+
+ class HttpInterceptingShapeDeserializer {
+ codecDeserializer;
+ stringDeserializer;
+ serdeContext;
+ constructor(codecDeserializer, codecSettings) {
+ this.codecDeserializer = codecDeserializer;
+ this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);
+ }
+ setSerdeContext(serdeContext) {
+ this.stringDeserializer.setSerdeContext(serdeContext);
+ this.codecDeserializer.setSerdeContext(serdeContext);
+ this.serdeContext = serdeContext;
+ }
+ read(schema$1, data) {
+ const ns = schema.NormalizedSchema.of(schema$1);
+ const traits = ns.getMergedTraits();
+ const toString = this.serdeContext?.utf8Encoder ?? utilUtf8.toUtf8;
+ if (traits.httpHeader || traits.httpResponseCode) {
+ return this.stringDeserializer.read(ns, toString(data));
+ }
+ if (traits.httpPayload) {
+ if (ns.isBlobSchema()) {
+ const toBytes = this.serdeContext?.utf8Decoder ?? utilUtf8.fromUtf8;
+ if (typeof data === "string") {
+ return toBytes(data);
+ }
+ return data;
+ } else if (ns.isStringSchema()) {
+ if ("byteLength" in data) {
+ return toString(data);
+ }
+ return data;
}
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- __generator = function(thisArg, body) {
- var _ = { label: 0, sent: function() {
- if (t[0] & 1)
- throw t[1];
- return t[1];
- }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
- return this;
- }), g;
- function verb(n) {
- return function(v) {
- return step([n, v]);
- };
}
- function step(op) {
- if (f)
- throw new TypeError("Generator is already executing.");
- while (_)
- try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
- return t;
- if (y = 0, t)
- op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0:
- case 1:
- t = op;
+ return this.codecDeserializer.read(ns, data);
+ }
+ }
+
+ class ToStringShapeSerializer {
+ settings;
+ stringBuffer = "";
+ serdeContext = undefined;
+ constructor(settings) {
+ this.settings = settings;
+ }
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ write(schema$1, value) {
+ const ns = schema.NormalizedSchema.of(schema$1);
+ switch (typeof value) {
+ case "object":
+ if (value === null) {
+ this.stringBuffer = "null";
+ return;
+ }
+ if (ns.isTimestampSchema()) {
+ if (!(value instanceof Date)) {
+ throw new Error(`@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`);
+ }
+ const format = determineTimestampFormat(ns, this.settings);
+ switch (format) {
+ case schema.SCHEMA.TIMESTAMP_DATE_TIME:
+ this.stringBuffer = value.toISOString().replace(".000Z", "Z");
+ break;
+ case schema.SCHEMA.TIMESTAMP_HTTP_DATE:
+ this.stringBuffer = serde.dateToUtcString(value);
+ break;
+ case schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ this.stringBuffer = String(value.getTime() / 1000);
break;
- case 4:
- _.label++;
- return { value: op[1], done: false };
- case 5:
- _.label++;
- y = op[1];
- op = [0];
- continue;
- case 7:
- op = _.ops.pop();
- _.trys.pop();
- continue;
default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
- _ = 0;
- continue;
- }
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
- _.label = op[1];
- break;
- }
- if (op[0] === 6 && _.label < t[1]) {
- _.label = t[1];
- t = op;
- break;
- }
- if (t && _.label < t[2]) {
- _.label = t[2];
- _.ops.push(op);
- break;
- }
- if (t[2])
- _.ops.pop();
- _.trys.pop();
- continue;
+ console.warn("Missing timestamp format, using epoch seconds", value);
+ this.stringBuffer = String(value.getTime() / 1000);
}
- op = body.call(thisArg, _);
- } catch (e) {
- op = [6, e];
- y = 0;
- } finally {
- f = t = 0;
+ return;
}
- if (op[0] & 5)
- throw op[1];
- return { value: op[0] ? op[1] : undefined, done: true };
- }
- };
- __createBinding = function(o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- o[k2] = m[k];
- };
- __exportStar = function(m, exports2) {
- for (var p in m)
- if (p !== "default" && !exports2.hasOwnProperty(p))
- exports2[p] = m[p];
- };
- __values = function(o) {
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
- if (m)
- return m.call(o);
- if (o && typeof o.length === "number")
- return {
- next: function() {
- if (o && i >= o.length)
- o = undefined;
- return { value: o && o[i++], done: !o };
+ if (ns.isBlobSchema() && "byteLength" in value) {
+ this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value);
+ return;
}
- };
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
- };
- __read = function(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m)
- return o;
- var i = m.call(o), r, ar = [], e;
- try {
- while ((n === undefined || n-- > 0) && !(r = i.next()).done)
- ar.push(r.value);
- } catch (error) {
- e = { error };
- } finally {
- try {
- if (r && !r.done && (m = i["return"]))
- m.call(i);
- } finally {
- if (e)
- throw e.error;
- }
- }
- return ar;
- };
- __spread = function() {
- for (var ar = [], i = 0;i < arguments.length; i++)
- ar = ar.concat(__read(arguments[i]));
- return ar;
- };
- __spreadArrays = function() {
- for (var s = 0, i = 0, il = arguments.length;i < il; i++)
- s += arguments[i].length;
- for (var r = Array(s), k = 0, i = 0;i < il; i++)
- for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
- r[k] = a[j];
- return r;
- };
- __await = function(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
- };
- __asyncGenerator = function(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i;
- function verb(n) {
- if (g[n])
- i[n] = function(v) {
- return new Promise(function(a, b) {
- q.push([n, v, a, b]) > 1 || resume(n, v);
- });
- };
- }
- function resume(n, v) {
- try {
- step(g[n](v));
- } catch (e) {
- settle(q[0][3], e);
- }
- }
- function step(r) {
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
- }
- function fulfill(value) {
- resume("next", value);
- }
- function reject(value) {
- resume("throw", value);
- }
- function settle(f, v) {
- if (f(v), q.shift(), q.length)
- resume(q[0][0], q[0][1]);
- }
- };
- __asyncDelegator = function(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function(e) {
- throw e;
- }), verb("return"), i[Symbol.iterator] = function() {
- return this;
- }, i;
- function verb(n, f) {
- i[n] = o[n] ? function(v) {
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
- } : f;
- }
- };
- __asyncValues = function(o) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i);
- function verb(n) {
- i[n] = o[n] && function(v) {
- return new Promise(function(resolve, reject) {
- v = o[n](v), settle(resolve, reject, v.done, v.value);
- });
- };
- }
- function settle(resolve, reject, d, v) {
- Promise.resolve(v).then(function(v2) {
- resolve({ value: v2, done: d });
- }, reject);
- }
- };
- __makeTemplateObject = function(cooked, raw) {
- if (Object.defineProperty) {
- Object.defineProperty(cooked, "raw", { value: raw });
- } else {
- cooked.raw = raw;
- }
- return cooked;
- };
- __importStar = function(mod) {
- if (mod && mod.__esModule)
- return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod)
- if (Object.hasOwnProperty.call(mod, k))
- result[k] = mod[k];
- }
- result["default"] = mod;
- return result;
- };
- __importDefault = function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
- };
- __classPrivateFieldGet = function(receiver, privateMap) {
- if (!privateMap.has(receiver)) {
- throw new TypeError("attempted to get private field on non-instance");
- }
- return privateMap.get(receiver);
- };
- __classPrivateFieldSet = function(receiver, privateMap, value) {
- if (!privateMap.has(receiver)) {
- throw new TypeError("attempted to set private field on non-instance");
+ if (ns.isListSchema() && Array.isArray(value)) {
+ let buffer = "";
+ for (const item of value) {
+ this.write([ns.getValueSchema(), ns.getMergedTraits()], item);
+ const headerItem = this.flush();
+ const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : serde.quoteHeader(headerItem);
+ if (buffer !== "") {
+ buffer += ", ";
+ }
+ buffer += serialized;
+ }
+ this.stringBuffer = buffer;
+ return;
+ }
+ this.stringBuffer = JSON.stringify(value, null, 2);
+ break;
+ case "string":
+ const mediaType = ns.getMergedTraits().mediaType;
+ let intermediateValue = value;
+ if (mediaType) {
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
+ if (isJson) {
+ intermediateValue = serde.LazyJsonString.from(intermediateValue);
+ }
+ if (ns.getMergedTraits().httpHeader) {
+ this.stringBuffer = (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(intermediateValue.toString());
+ return;
+ }
+ }
+ this.stringBuffer = value;
+ break;
+ default:
+ this.stringBuffer = String(value);
}
- privateMap.set(receiver, value);
- return value;
- };
- exporter("__extends", __extends);
- exporter("__assign", __assign);
- exporter("__rest", __rest);
- exporter("__decorate", __decorate);
- exporter("__param", __param);
- exporter("__metadata", __metadata);
- exporter("__awaiter", __awaiter);
- exporter("__generator", __generator);
- exporter("__exportStar", __exportStar);
- exporter("__createBinding", __createBinding);
- exporter("__values", __values);
- exporter("__read", __read);
- exporter("__spread", __spread);
- exporter("__spreadArrays", __spreadArrays);
- exporter("__await", __await);
- exporter("__asyncGenerator", __asyncGenerator);
- exporter("__asyncDelegator", __asyncDelegator);
- exporter("__asyncValues", __asyncValues);
- exporter("__makeTemplateObject", __makeTemplateObject);
- exporter("__importStar", __importStar);
- exporter("__importDefault", __importDefault);
- exporter("__classPrivateFieldGet", __classPrivateFieldGet);
- exporter("__classPrivateFieldSet", __classPrivateFieldSet);
- });
-});
+ }
+ flush() {
+ const buffer = this.stringBuffer;
+ this.stringBuffer = "";
+ return buffer;
+ }
+ }
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_pureJs = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.toUtf8 = exports.fromUtf8 = undefined;
- var fromUtf8 = (input) => {
- const bytes = [];
- for (let i = 0, len = input.length;i < len; i++) {
- const value = input.charCodeAt(i);
- if (value < 128) {
- bytes.push(value);
- } else if (value < 2048) {
- bytes.push(value >> 6 | 192, value & 63 | 128);
- } else if (i + 1 < input.length && (value & 64512) === 55296 && (input.charCodeAt(i + 1) & 64512) === 56320) {
- const surrogatePair = 65536 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
- bytes.push(surrogatePair >> 18 | 240, surrogatePair >> 12 & 63 | 128, surrogatePair >> 6 & 63 | 128, surrogatePair & 63 | 128);
- } else {
- bytes.push(value >> 12 | 224, value >> 6 & 63 | 128, value & 63 | 128);
+ class HttpInterceptingShapeSerializer {
+ codecSerializer;
+ stringSerializer;
+ buffer;
+ constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {
+ this.codecSerializer = codecSerializer;
+ this.stringSerializer = stringSerializer;
+ }
+ setSerdeContext(serdeContext) {
+ this.codecSerializer.setSerdeContext(serdeContext);
+ this.stringSerializer.setSerdeContext(serdeContext);
+ }
+ write(schema$1, value) {
+ const ns = schema.NormalizedSchema.of(schema$1);
+ const traits = ns.getMergedTraits();
+ if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {
+ this.stringSerializer.write(ns, value);
+ this.buffer = this.stringSerializer.flush();
+ return;
}
+ return this.codecSerializer.write(ns, value);
}
- return Uint8Array.from(bytes);
- };
- exports.fromUtf8 = fromUtf8;
- var toUtf8 = (input) => {
- let decoded = "";
- for (let i = 0, len = input.length;i < len; i++) {
- const byte = input[i];
- if (byte < 128) {
- decoded += String.fromCharCode(byte);
- } else if (192 <= byte && byte < 224) {
- const nextByte = input[++i];
- decoded += String.fromCharCode((byte & 31) << 6 | nextByte & 63);
- } else if (240 <= byte && byte < 365) {
- const surrogatePair = [byte, input[++i], input[++i], input[++i]];
- const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
- decoded += decodeURIComponent(encoded);
- } else {
- decoded += String.fromCharCode((byte & 15) << 12 | (input[++i] & 63) << 6 | input[++i] & 63);
+ flush() {
+ if (this.buffer !== undefined) {
+ const buffer = this.buffer;
+ this.buffer = undefined;
+ return buffer;
}
+ return this.codecSerializer.flush();
}
- return decoded;
- };
- exports.toUtf8 = toUtf8;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.j
-var require_whatwgEncodingApi = __commonJS((exports) => {
- var fromUtf8 = function(input) {
- return new TextEncoder().encode(input);
- };
- var toUtf8 = function(input) {
- return new TextDecoder("utf-8").decode(input);
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.toUtf8 = exports.fromUtf8 = undefined;
- exports.fromUtf8 = fromUtf8;
- exports.toUtf8 = toUtf8;
+ }
+ exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
+ exports.HttpBindingProtocol = HttpBindingProtocol;
+ exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
+ exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
+ exports.HttpProtocol = HttpProtocol;
+ exports.RequestBuilder = RequestBuilder;
+ exports.RpcProtocol = RpcProtocol;
+ exports.ToStringShapeSerializer = ToStringShapeSerializer;
+ exports.collectBody = collectBody;
+ exports.determineTimestampFormat = determineTimestampFormat;
+ exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
+ exports.requestBuilder = requestBuilder;
+ exports.resolvedPath = resolvedPath;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rulese
+// node_modules/@aws-sdk/nested-clients/dist-c
var require_dist_cjs17 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.toUtf8 = exports.fromUtf8 = undefined;
- var pureJs_1 = require_pureJs();
- var whatwgEncodingApi_1 = require_whatwgEncodingApi();
- var fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);
- exports.fromUtf8 = fromUtf8;
- var toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);
- exports.toUtf8 = toUtf8;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_convertToBuffer = __commonJS((exports) => {
- var convertToBuffer = function(data) {
- if (data instanceof Uint8Array)
- return data;
- if (typeof data === "string") {
- return fromUtf8(data);
- }
- if (ArrayBuffer.isView(data)) {
- return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
- }
- return new Uint8Array(data);
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.convertToBuffer = undefined;
- var util_utf8_browser_1 = require_dist_cjs17();
- var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
- return Buffer.from(input, "utf8");
- } : util_utf8_browser_1.fromUtf8;
- exports.convertToBuffer = convertToBuffer;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_isEmptyData = __commonJS((exports) => {
- var isEmptyData = function(data) {
- if (typeof data === "string") {
- return data.length === 0;
+ var convertHttpAuthSchemesToMap = function(httpAuthSchemes) {
+ const map = new Map;
+ for (const scheme of httpAuthSchemes) {
+ map.set(scheme.schemeId, scheme);
}
- return data.byteLength === 0;
+ return map;
};
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.isEmptyData = undefined;
- exports.isEmptyData = isEmptyData;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var require_numToUint8 = __commonJS((exports) => {
- var numToUint8 = function(num) {
- return new Uint8Array([
- (num & 4278190080) >> 24,
- (num & 16711680) >> 16,
- (num & 65280) >> 8,
- num & 255
- ]);
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.numToUint8 = undefined;
- exports.numToUint8 = numToUint8;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_uint32ArrayFrom = __commonJS((exports) => {
- var uint32ArrayFrom = function(a_lookUpTable) {
- if (!Uint32Array.from) {
- var return_array = new Uint32Array(a_lookUpTable.length);
- var a_index = 0;
- while (a_index < a_lookUpTable.length) {
- return_array[a_index] = a_lookUpTable[a_index];
- a_index += 1;
+ var createPaginator = function(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {
+ return async function* paginateOperation(config, input, ...additionalArguments) {
+ const _input = input;
+ let token = config.startingToken ?? _input[inputTokenName];
+ let hasNext = true;
+ let page;
+ while (hasNext) {
+ _input[inputTokenName] = token;
+ if (pageSizeTokenName) {
+ _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;
+ }
+ if (config.client instanceof ClientCtor) {
+ page = await makePagedClientRequest(CommandCtor, config.client, input, config.withCommand, ...additionalArguments);
+ } else {
+ throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);
+ }
+ yield page;
+ const prevToken = token;
+ token = get(page, outputTokenName);
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
}
- return return_array;
- }
- return Uint32Array.from(a_lookUpTable);
+ return;
+ };
};
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.uint32ArrayFrom = undefined;
- exports.uint32ArrayFrom = uint32ArrayFrom;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
-var require_build = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
- var convertToBuffer_1 = require_convertToBuffer();
- Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function() {
- return convertToBuffer_1.convertToBuffer;
- } });
- var isEmptyData_1 = require_isEmptyData();
- Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function() {
- return isEmptyData_1.isEmptyData;
- } });
- var numToUint8_1 = require_numToUint8();
- Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function() {
- return numToUint8_1.numToUint8;
- } });
- var uint32ArrayFrom_1 = require_uint32ArrayFrom();
- Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function() {
- return uint32ArrayFrom_1.uint32ArrayFrom;
- } });
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var require_aws_crc32 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.AwsCrc32 = undefined;
- var tslib_1 = require_tslib();
- var util_1 = require_build();
- var index_1 = require_build2();
- var AwsCrc32 = function() {
- function AwsCrc322() {
- this.crc32 = new index_1.Crc32;
+ var setFeature = function(context, feature, value) {
+ if (!context.__smithy_context) {
+ context.__smithy_context = {
+ features: {}
+ };
+ } else if (!context.__smithy_context.features) {
+ context.__smithy_context.features = {};
}
- AwsCrc322.prototype.update = function(toHash) {
- if ((0, util_1.isEmptyData)(toHash))
- return;
- this.crc32.update((0, util_1.convertToBuffer)(toHash));
- };
- AwsCrc322.prototype.digest = function() {
- return tslib_1.__awaiter(this, undefined, undefined, function() {
- return tslib_1.__generator(this, function(_a) {
- return [2, (0, util_1.numToUint8)(this.crc32.digest())];
- });
- });
- };
- AwsCrc322.prototype.reset = function() {
- this.crc32 = new index_1.Crc32;
- };
- return AwsCrc322;
- }();
- exports.AwsCrc32 = AwsCrc32;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
-var require_build2 = __commonJS((exports) => {
- var crc32 = function(data) {
- return new Crc32().update(data).digest();
+ context.__smithy_context.features[feature] = value;
};
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
- var tslib_1 = require_tslib();
- var util_1 = require_build();
- exports.crc32 = crc32;
- var Crc32 = function() {
- function Crc322() {
- this.checksum = 4294967295;
+ var types = require_dist_cjs();
+ var utilMiddleware = require_dist_cjs4();
+ var middlewareSerde = require_dist_cjs5();
+ var protocolHttp = require_dist_cjs2();
+ var protocols = require_protocols();
+ var getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
+ var resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
+ if (!authSchemePreference || authSchemePreference.length === 0) {
+ return candidateAuthOptions;
}
- Crc322.prototype.update = function(data) {
- var e_1, _a;
- try {
- for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
- var byte = data_1_1.value;
- this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
- }
- } catch (e_1_1) {
- e_1 = { error: e_1_1 };
- } finally {
- try {
- if (data_1_1 && !data_1_1.done && (_a = data_1.return))
- _a.call(data_1);
- } finally {
- if (e_1)
- throw e_1.error;
+ const preferredAuthOptions = [];
+ for (const preferredSchemeName of authSchemePreference) {
+ for (const candidateAuthOption of candidateAuthOptions) {
+ const candidateAuthSchemeName = candidateAuthOption.schemeId.split("#")[1];
+ if (candidateAuthSchemeName === preferredSchemeName) {
+ preferredAuthOptions.push(candidateAuthOption);
}
}
- return this;
- };
- Crc322.prototype.digest = function() {
- return (this.checksum ^ 4294967295) >>> 0;
- };
- return Crc322;
- }();
- exports.Crc32 = Crc32;
- var a_lookUpTable = [
- 0,
- 1996959894,
- 3993919788,
- 2567524794,
- 124634137,
- 1886057615,
- 3915621685,
- 2657392035,
- 249268274,
- 2044508324,
- 3772115230,
- 2547177864,
- 162941995,
- 2125561021,
- 3887607047,
- 2428444049,
- 498536548,
- 1789927666,
- 4089016648,
- 2227061214,
- 450548861,
- 1843258603,
- 4107580753,
- 2211677639,
- 325883990,
- 1684777152,
- 4251122042,
- 2321926636,
- 335633487,
- 1661365465,
- 4195302755,
- 2366115317,
- 997073096,
- 1281953886,
- 3579855332,
- 2724688242,
- 1006888145,
- 1258607687,
- 3524101629,
- 2768942443,
- 901097722,
- 1119000684,
- 3686517206,
- 2898065728,
- 853044451,
- 1172266101,
- 3705015759,
- 2882616665,
- 651767980,
- 1373503546,
- 3369554304,
- 3218104598,
- 565507253,
- 1454621731,
- 3485111705,
- 3099436303,
- 671266974,
- 1594198024,
- 3322730930,
- 2970347812,
- 795835527,
- 1483230225,
- 3244367275,
- 3060149565,
- 1994146192,
- 31158534,
- 2563907772,
- 4023717930,
- 1907459465,
- 112637215,
- 2680153253,
- 3904427059,
- 2013776290,
- 251722036,
- 2517215374,
- 3775830040,
- 2137656763,
- 141376813,
- 2439277719,
- 3865271297,
- 1802195444,
- 476864866,
- 2238001368,
- 4066508878,
- 1812370925,
- 453092731,
- 2181625025,
- 4111451223,
- 1706088902,
- 314042704,
- 2344532202,
- 4240017532,
- 1658658271,
- 366619977,
- 2362670323,
- 4224994405,
- 1303535960,
- 984961486,
- 2747007092,
- 3569037538,
- 1256170817,
- 1037604311,
- 2765210733,
- 3554079995,
- 1131014506,
- 879679996,
- 2909243462,
- 3663771856,
- 1141124467,
- 855842277,
- 2852801631,
- 3708648649,
- 1342533948,
- 654459306,
- 3188396048,
- 3373015174,
- 1466479909,
- 544179635,
- 3110523913,
- 3462522015,
- 1591671054,
- 702138776,
- 2966460450,
- 3352799412,
- 1504918807,
- 783551873,
- 3082640443,
- 3233442989,
- 3988292384,
- 2596254646,
- 62317068,
- 1957810842,
- 3939845945,
- 2647816111,
- 81470997,
- 1943803523,
- 3814918930,
- 2489596804,
- 225274430,
- 2053790376,
- 3826175755,
- 2466906013,
- 167816743,
- 2097651377,
- 4027552580,
- 2265490386,
- 503444072,
- 1762050814,
- 4150417245,
- 2154129355,
- 426522225,
- 1852507879,
- 4275313526,
- 2312317920,
- 282753626,
- 1742555852,
- 4189708143,
- 2394877945,
- 397917763,
- 1622183637,
- 3604390888,
- 2714866558,
- 953729732,
- 1340076626,
- 3518719985,
- 2797360999,
- 1068828381,
- 1219638859,
- 3624741850,
- 2936675148,
- 906185462,
- 1090812512,
- 3747672003,
- 2825379669,
- 829329135,
- 1181335161,
- 3412177804,
- 3160834842,
- 628085408,
- 1382605366,
- 3423369109,
- 3138078467,
- 570562233,
- 1426400815,
- 3317316542,
- 2998733608,
- 733239954,
- 1555261956,
- 3268935591,
- 3050360625,
- 752459403,
- 1541320221,
- 2607071920,
- 3965973030,
- 1969922972,
- 40735498,
- 2617837225,
- 3943577151,
- 1913087877,
- 83908371,
- 2512341634,
- 3803740692,
- 2075208622,
- 213261112,
- 2463272603,
- 3855990285,
- 2094854071,
- 198958881,
- 2262029012,
- 4057260610,
- 1759359992,
- 534414190,
- 2176718541,
- 4139329115,
- 1873836001,
- 414664567,
- 2282248934,
- 4279200368,
- 1711684554,
- 285281116,
- 2405801727,
- 4167216745,
- 1634467795,
- 376229701,
- 2685067896,
- 3608007406,
- 1308918612,
- 956543938,
- 2808555105,
- 3495958263,
- 1231636301,
- 1047427035,
- 2932959818,
- 3654703836,
- 1088359270,
- 936918000,
- 2847714899,
- 3736837829,
- 1202900863,
- 817233897,
- 3183342108,
- 3401237130,
- 1404277552,
- 615818150,
- 3134207493,
- 3453421203,
- 1423857449,
- 601450431,
- 3009837614,
- 3294710456,
- 1567103746,
- 711928724,
- 3020668471,
- 3272380065,
- 1510334235,
- 755167117
- ];
- var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);
- var aws_crc32_1 = require_aws_crc32();
- Object.defineProperty(exports, "AwsCrc32", { enumerable: true, get: function() {
- return aws_crc32_1.AwsCrc32;
- } });
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rules
-var require_dist_cjs18 = __commonJS((exports, module) => {
- var fromHex = function(encoded) {
- if (encoded.length % 2 !== 0) {
- throw new Error("Hex encoded strings must have an even number length");
}
- const out = new Uint8Array(encoded.length / 2);
- for (let i = 0;i < encoded.length; i += 2) {
- const encodedByte = encoded.slice(i, i + 2).toLowerCase();
- if (encodedByte in HEX_TO_SHORT) {
- out[i / 2] = HEX_TO_SHORT[encodedByte];
- } else {
- throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
+ for (const candidateAuthOption of candidateAuthOptions) {
+ if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {
+ preferredAuthOptions.push(candidateAuthOption);
}
}
- return out;
+ return preferredAuthOptions;
};
- var toHex = function(bytes) {
- let out = "";
- for (let i = 0;i < bytes.byteLength; i++) {
- out += SHORT_TO_HEX[bytes[i]];
+ var httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
+ const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
+ const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
+ const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
+ const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
+ const smithyContext = utilMiddleware.getSmithyContext(context);
+ const failureReasons = [];
+ for (const option of resolvedOptions) {
+ const scheme = authSchemes.get(option.schemeId);
+ if (!scheme) {
+ failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
+ continue;
+ }
+ const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
+ if (!identityProvider) {
+ failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
+ continue;
+ }
+ const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
+ option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
+ option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
+ smithyContext.selectedHttpAuthScheme = {
+ httpAuthOption: option,
+ identity: await identityProvider(option.identityProperties),
+ signer: scheme.signer
+ };
+ break;
}
- return out;
+ if (!smithyContext.selectedHttpAuthScheme) {
+ throw new Error(failureReasons.join("\n"));
+ }
+ return next(args);
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ var httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
+ step: "serialize",
+ tags: ["HTTP_AUTH_SCHEME"],
+ name: "httpAuthSchemeMiddleware",
+ override: true,
+ relation: "before",
+ toMiddleware: "endpointV2Middleware"
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
+ applyToStack: (clientStack) => {
+ clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
+ httpAuthSchemeParametersProvider,
+ identityProviderConfigProvider
+ }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromHex: () => fromHex,
- toHex: () => toHex
});
- module.exports = __toCommonJS(src_exports);
- var SHORT_TO_HEX = {};
- var HEX_TO_SHORT = {};
- for (let i = 0;i < 256; i++) {
- let encodedByte = i.toString(16).toLowerCase();
- if (encodedByte.length === 1) {
- encodedByte = `0${encodedByte}`;
- }
- SHORT_TO_HEX[i] = encodedByte;
- HEX_TO_SHORT[encodedByte] = i;
- }
- __name(fromHex, "fromHex");
- __name(toHex, "toHex");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rules
-var require_dist_cjs19 = __commonJS((exports, module) => {
- var negate = function(bytes) {
- for (let i = 0;i < 8; i++) {
- bytes[i] ^= 255;
- }
- for (let i = 7;i > -1; i--) {
- bytes[i]++;
- if (bytes[i] !== 0)
- break;
+ var httpAuthSchemeMiddlewareOptions = {
+ step: "serialize",
+ tags: ["HTTP_AUTH_SCHEME"],
+ name: "httpAuthSchemeMiddleware",
+ override: true,
+ relation: "before",
+ toMiddleware: middlewareSerde.serializerMiddlewareOption.name
+ };
+ var getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({
+ applyToStack: (clientStack) => {
+ clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
+ httpAuthSchemeParametersProvider,
+ identityProviderConfigProvider
+ }), httpAuthSchemeMiddlewareOptions);
}
+ });
+ var defaultErrorHandler = (signingProperties) => (error) => {
+ throw error;
};
- var splitMessage = function({ byteLength, byteOffset, buffer }) {
- if (byteLength < MINIMUM_MESSAGE_LENGTH) {
- throw new Error("Provided message too short to accommodate event stream message overhead");
+ var defaultSuccessHandler = (httpResponse, signingProperties) => {
+ };
+ var httpSigningMiddleware = (config) => (next, context) => async (args) => {
+ if (!protocolHttp.HttpRequest.isInstance(args.request)) {
+ return next(args);
}
- const view = new DataView(buffer, byteOffset, byteLength);
- const messageLength = view.getUint32(0, false);
- if (byteLength !== messageLength) {
- throw new Error("Reported message length does not match received message length");
+ const smithyContext = utilMiddleware.getSmithyContext(context);
+ const scheme = smithyContext.selectedHttpAuthScheme;
+ if (!scheme) {
+ throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
}
- const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
- const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
- const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
- const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
- if (expectedPreludeChecksum !== checksummer.digest()) {
- throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);
+ const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
+ const output = await next({
+ ...args,
+ request: await signer.sign(args.request, identity, signingProperties)
+ }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
+ (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
+ return output;
+ };
+ var httpSigningMiddlewareOptions = {
+ step: "finalizeRequest",
+ tags: ["HTTP_SIGNING"],
+ name: "httpSigningMiddleware",
+ aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"],
+ override: true,
+ relation: "after",
+ toMiddleware: "retryMiddleware"
+ };
+ var getHttpSigningPlugin = (config) => ({
+ applyToStack: (clientStack) => {
+ clientStack.addRelativeTo(httpSigningMiddleware(), httpSigningMiddlewareOptions);
}
- checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));
- if (expectedMessageChecksum !== checksummer.digest()) {
- throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);
+ });
+ var normalizeProvider = (input) => {
+ if (typeof input === "function")
+ return input;
+ const promisified = Promise.resolve(input);
+ return () => promisified;
+ };
+ var makePagedClientRequest = async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {
+ let command = new CommandCtor(input);
+ command = withCommand(command) ?? command;
+ return await client.send(command, ...args);
+ };
+ var get = (fromObject, path) => {
+ let cursor = fromObject;
+ const pathComponents = path.split(".");
+ for (const step of pathComponents) {
+ if (!cursor || typeof cursor !== "object") {
+ return;
+ }
+ cursor = cursor[step];
}
- return {
- headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
- body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH))
- };
+ return cursor;
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+
+ class DefaultIdentityProviderConfig {
+ authSchemes = new Map;
+ constructor(config) {
+ for (const [key, value] of Object.entries(config)) {
+ if (value !== undefined) {
+ this.authSchemes.set(key, value);
+ }
+ }
+ }
+ getIdentityProvider(schemeId) {
+ return this.authSchemes.get(schemeId);
+ }
+ }
+
+ class HttpApiKeyAuthSigner {
+ async sign(httpRequest, identity, signingProperties) {
+ if (!signingProperties) {
+ throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
+ }
+ if (!signingProperties.name) {
+ throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
+ }
+ if (!signingProperties.in) {
+ throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
+ }
+ if (!identity.apiKey) {
+ throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
+ }
+ const clonedRequest = protocolHttp.HttpRequest.clone(httpRequest);
+ if (signingProperties.in === types.HttpApiKeyAuthLocation.QUERY) {
+ clonedRequest.query[signingProperties.name] = identity.apiKey;
+ } else if (signingProperties.in === types.HttpApiKeyAuthLocation.HEADER) {
+ clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
+ } else {
+ throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`");
+ }
+ return clonedRequest;
+ }
+ }
+
+ class HttpBearerAuthSigner {
+ async sign(httpRequest, identity, signingProperties) {
+ const clonedRequest = protocolHttp.HttpRequest.clone(httpRequest);
+ if (!identity.token) {
+ throw new Error("request could not be signed with `token` since the `token` is not defined");
+ }
+ clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
+ return clonedRequest;
+ }
+ }
+
+ class NoAuthSigner {
+ async sign(httpRequest, identity, signingProperties) {
+ return httpRequest;
+ }
+ }
+ var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {
+ return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var EXPIRATION_MS = 300000;
+ var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
+ var doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined;
+ var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
+ if (provider === undefined) {
+ return;
}
- return to;
+ const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
+ let resolved;
+ let pending;
+ let hasResult;
+ let isConstant = false;
+ const coalesceProvider = async (options) => {
+ if (!pending) {
+ pending = normalizedProvider(options);
+ }
+ try {
+ resolved = await pending;
+ hasResult = true;
+ isConstant = false;
+ } finally {
+ pending = undefined;
+ }
+ return resolved;
+ };
+ if (isExpired === undefined) {
+ return async (options) => {
+ if (!hasResult || options?.forceRefresh) {
+ resolved = await coalesceProvider(options);
+ }
+ return resolved;
+ };
+ }
+ return async (options) => {
+ if (!hasResult || options?.forceRefresh) {
+ resolved = await coalesceProvider(options);
+ }
+ if (isConstant) {
+ return resolved;
+ }
+ if (!requiresRefresh(resolved)) {
+ isConstant = true;
+ return resolved;
+ }
+ if (isExpired(resolved)) {
+ await coalesceProvider(options);
+ return resolved;
+ }
+ return resolved;
+ };
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- EventStreamCodec: () => EventStreamCodec,
- HeaderMarshaller: () => HeaderMarshaller,
- Int64: () => Int64,
- MessageDecoderStream: () => MessageDecoderStream,
- MessageEncoderStream: () => MessageEncoderStream,
- SmithyMessageDecoderStream: () => SmithyMessageDecoderStream,
- SmithyMessageEncoderStream: () => SmithyMessageEncoderStream
+ Object.defineProperty(exports, "requestBuilder", {
+ enumerable: true,
+ get: function() {
+ return protocols.requestBuilder;
+ }
});
- module.exports = __toCommonJS(src_exports);
- var import_crc322 = require_build2();
- var import_util_hex_encoding = require_dist_cjs18();
- var _Int64 = class _Int642 {
- constructor(bytes) {
- this.bytes = bytes;
- if (bytes.byteLength !== 8) {
- throw new Error("Int64 buffers must be exactly 8 bytes");
+ exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig;
+ exports.EXPIRATION_MS = EXPIRATION_MS;
+ exports.HttpApiKeyAuthSigner = HttpApiKeyAuthSigner;
+ exports.HttpBearerAuthSigner = HttpBearerAuthSigner;
+ exports.NoAuthSigner = NoAuthSigner;
+ exports.createIsIdentityExpiredFunction = createIsIdentityExpiredFunction;
+ exports.createPaginator = createPaginator;
+ exports.doesIdentityRequireRefresh = doesIdentityRequireRefresh;
+ exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin;
+ exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin;
+ exports.getHttpSigningPlugin = getHttpSigningPlugin;
+ exports.getSmithyContext = getSmithyContext;
+ exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = httpAuthSchemeEndpointRuleSetMiddlewareOptions;
+ exports.httpAuthSchemeMiddleware = httpAuthSchemeMiddleware;
+ exports.httpAuthSchemeMiddlewareOptions = httpAuthSchemeMiddlewareOptions;
+ exports.httpSigningMiddleware = httpSigningMiddleware;
+ exports.httpSigningMiddlewareOptions = httpSigningMiddlewareOptions;
+ exports.isIdentityExpired = isIdentityExpired;
+ exports.memoizeIdentityProvider = memoizeIdentityProvider;
+ exports.normalizeProvider = normalizeProvider;
+ exports.setFeature = setFeature;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_dist_cjs18 = __commonJS((exports) => {
+ class ProviderError extends Error {
+ name = "ProviderError";
+ tryNextLink;
+ constructor(message, options = true) {
+ let logger4;
+ let tryNextLink = true;
+ if (typeof options === "boolean") {
+ logger4 = undefined;
+ tryNextLink = options;
+ } else if (options != null && typeof options === "object") {
+ logger4 = options.logger;
+ tryNextLink = options.tryNextLink ?? true;
}
+ super(message);
+ this.tryNextLink = tryNextLink;
+ Object.setPrototypeOf(this, ProviderError.prototype);
+ logger4?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
}
- static fromNumber(number) {
- if (number > 9223372036854776000 || number < -9223372036854776000) {
- throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
+ static from(error, options = true) {
+ return Object.assign(new this(error.message, options), error);
+ }
+ }
+
+ class CredentialsProviderError extends ProviderError {
+ name = "CredentialsProviderError";
+ constructor(message, options = true) {
+ super(message, options);
+ Object.setPrototypeOf(this, CredentialsProviderError.prototype);
+ }
+ }
+
+ class TokenProviderError extends ProviderError {
+ name = "TokenProviderError";
+ constructor(message, options = true) {
+ super(message, options);
+ Object.setPrototypeOf(this, TokenProviderError.prototype);
+ }
+ }
+ var chain = (...providers) => async () => {
+ if (providers.length === 0) {
+ throw new ProviderError("No providers in chain");
+ }
+ let lastProviderError;
+ for (const provider of providers) {
+ try {
+ const credentials = await provider();
+ return credentials;
+ } catch (err) {
+ lastProviderError = err;
+ if (err?.tryNextLink) {
+ continue;
+ }
+ throw err;
}
- const bytes = new Uint8Array(8);
- for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
- bytes[i] = remaining;
+ }
+ throw lastProviderError;
+ };
+ var fromStatic = (staticValue) => () => Promise.resolve(staticValue);
+ var memoize = (provider, isExpired, requiresRefresh) => {
+ let resolved;
+ let pending;
+ let hasResult;
+ let isConstant = false;
+ const coalesceProvider = async () => {
+ if (!pending) {
+ pending = provider();
}
- if (number < 0) {
- negate(bytes);
+ try {
+ resolved = await pending;
+ hasResult = true;
+ isConstant = false;
+ } finally {
+ pending = undefined;
}
- return new _Int642(bytes);
+ return resolved;
+ };
+ if (isExpired === undefined) {
+ return async (options) => {
+ if (!hasResult || options?.forceRefresh) {
+ resolved = await coalesceProvider();
+ }
+ return resolved;
+ };
}
- valueOf() {
- const bytes = this.bytes.slice(0);
- const negative = bytes[0] & 128;
- if (negative) {
- negate(bytes);
+ return async (options) => {
+ if (!hasResult || options?.forceRefresh) {
+ resolved = await coalesceProvider();
+ }
+ if (isConstant) {
+ return resolved;
+ }
+ if (requiresRefresh && !requiresRefresh(resolved)) {
+ isConstant = true;
+ return resolved;
}
- return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1);
+ if (isExpired(resolved)) {
+ await coalesceProvider();
+ return resolved;
+ }
+ return resolved;
+ };
+ };
+ exports.CredentialsProviderError = CredentialsProviderError;
+ exports.ProviderError = ProviderError;
+ exports.TokenProviderError = TokenProviderError;
+ exports.chain = chain;
+ exports.fromStatic = fromStatic;
+ exports.memoize = memoize;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submo
+var require_dist_cjs19 = __commonJS((exports) => {
+ var negate = function(bytes) {
+ for (let i = 0;i < 8; i++) {
+ bytes[i] ^= 255;
}
- toString() {
- return String(this.valueOf());
+ for (let i = 7;i > -1; i--) {
+ bytes[i]++;
+ if (bytes[i] !== 0)
+ break;
}
};
- __name(_Int64, "Int64");
- var Int64 = _Int64;
- __name(negate, "negate");
- var _HeaderMarshaller = class _HeaderMarshaller2 {
- constructor(toUtf8, fromUtf8) {
- this.toUtf8 = toUtf8;
- this.fromUtf8 = fromUtf8;
+ var utilHexEncoding = require_dist_cjs14();
+ var utilUtf8 = require_dist_cjs8();
+ var isArrayBuffer = require_dist_cjs6();
+ var protocolHttp = require_dist_cjs2();
+ var utilMiddleware = require_dist_cjs4();
+ var utilUriEscape = require_dist_cjs10();
+ var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
+ var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
+ var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
+ var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
+ var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
+ var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
+ var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
+ var REGION_SET_PARAM = "X-Amz-Region-Set";
+ var AUTH_HEADER = "authorization";
+ var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
+ var DATE_HEADER = "date";
+ var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
+ var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
+ var SHA256_HEADER = "x-amz-content-sha256";
+ var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
+ var HOST_HEADER = "host";
+ var ALWAYS_UNSIGNABLE_HEADERS = {
+ authorization: true,
+ "cache-control": true,
+ connection: true,
+ expect: true,
+ from: true,
+ "keep-alive": true,
+ "max-forwards": true,
+ pragma: true,
+ referer: true,
+ te: true,
+ trailer: true,
+ "transfer-encoding": true,
+ upgrade: true,
+ "user-agent": true,
+ "x-amzn-trace-id": true
+ };
+ var PROXY_HEADER_PATTERN = /^proxy-/;
+ var SEC_HEADER_PATTERN = /^sec-/;
+ var UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];
+ var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
+ var ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256";
+ var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
+ var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
+ var MAX_CACHE_SIZE = 50;
+ var KEY_TYPE_IDENTIFIER = "aws4_request";
+ var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
+ var signingKeyCache = {};
+ var cacheQueue = [];
+ var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
+ var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
+ const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
+ const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`;
+ if (cacheKey in signingKeyCache) {
+ return signingKeyCache[cacheKey];
+ }
+ cacheQueue.push(cacheKey);
+ while (cacheQueue.length > MAX_CACHE_SIZE) {
+ delete signingKeyCache[cacheQueue.shift()];
+ }
+ let key = `AWS4${credentials.secretAccessKey}`;
+ for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
+ key = await hmac(sha256Constructor, key, signable);
+ }
+ return signingKeyCache[cacheKey] = key;
+ };
+ var clearCredentialCache = () => {
+ cacheQueue.length = 0;
+ Object.keys(signingKeyCache).forEach((cacheKey) => {
+ delete signingKeyCache[cacheKey];
+ });
+ };
+ var hmac = (ctor, secret, data) => {
+ const hash = new ctor(secret);
+ hash.update(utilUtf8.toUint8Array(data));
+ return hash.digest();
+ };
+ var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
+ const canonical = {};
+ for (const headerName of Object.keys(headers).sort()) {
+ if (headers[headerName] == undefined) {
+ continue;
+ }
+ const canonicalHeaderName = headerName.toLowerCase();
+ if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
+ if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
+ continue;
+ }
+ }
+ canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
+ }
+ return canonical;
+ };
+ var getPayloadHash = async ({ headers, body }, hashConstructor) => {
+ for (const headerName of Object.keys(headers)) {
+ if (headerName.toLowerCase() === SHA256_HEADER) {
+ return headers[headerName];
+ }
+ }
+ if (body == undefined) {
+ return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
+ } else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) {
+ const hashCtor = new hashConstructor;
+ hashCtor.update(utilUtf8.toUint8Array(body));
+ return utilHexEncoding.toHex(await hashCtor.digest());
}
+ return UNSIGNED_PAYLOAD;
+ };
+
+ class HeaderFormatter {
format(headers) {
const chunks = [];
for (const headerName of Object.keys(headers)) {
- const bytes = this.fromUtf8(headerName);
+ const bytes = utilUtf8.fromUtf8(headerName);
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
}
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
@@ -8027,7 +9913,7 @@ var require_dist_cjs19 = __commonJS((exports, module) => {
binBytes.set(header.value, 3);
return binBytes;
case "string":
- const utf8Bytes = this.fromUtf8(header.value);
+ const utf8Bytes = utilUtf8.fromUtf8(header.value);
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
strView.setUint8(0, 7);
strView.setUint16(1, utf8Bytes.byteLength, false);
@@ -8045,489 +9931,99 @@ var require_dist_cjs19 = __commonJS((exports, module) => {
}
const uuidBytes = new Uint8Array(17);
uuidBytes[0] = 9;
- uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\-/g, "")), 1);
+ uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1);
return uuidBytes;
}
}
- parse(headers) {
- const out = {};
- let position = 0;
- while (position < headers.byteLength) {
- const nameLength = headers.getUint8(position++);
- const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
- position += nameLength;
- switch (headers.getUint8(position++)) {
- case 0:
- out[name] = {
- type: BOOLEAN_TAG,
- value: true
- };
- break;
- case 1:
- out[name] = {
- type: BOOLEAN_TAG,
- value: false
- };
- break;
- case 2:
- out[name] = {
- type: BYTE_TAG,
- value: headers.getInt8(position++)
- };
- break;
- case 3:
- out[name] = {
- type: SHORT_TAG,
- value: headers.getInt16(position, false)
- };
- position += 2;
- break;
- case 4:
- out[name] = {
- type: INT_TAG,
- value: headers.getInt32(position, false)
- };
- position += 4;
- break;
- case 5:
- out[name] = {
- type: LONG_TAG,
- value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
- };
- position += 8;
- break;
- case 6:
- const binaryLength = headers.getUint16(position, false);
- position += 2;
- out[name] = {
- type: BINARY_TAG,
- value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)
- };
- position += binaryLength;
- break;
- case 7:
- const stringLength = headers.getUint16(position, false);
- position += 2;
- out[name] = {
- type: STRING_TAG,
- value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))
- };
- position += stringLength;
- break;
- case 8:
- out[name] = {
- type: TIMESTAMP_TAG,
- value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
- };
- position += 8;
- break;
- case 9:
- const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
- position += 16;
- out[name] = {
- type: UUID_TAG,
- value: `${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(0, 4))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(4, 6))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(6, 8))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(8, 10))}-${(0, import_util_hex_encoding.toHex)(uuidBytes.subarray(10))}`
- };
- break;
- default:
- throw new Error(`Unrecognized header type tag`);
- }
+ }
+ var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
+
+ class Int64 {
+ bytes;
+ constructor(bytes) {
+ this.bytes = bytes;
+ if (bytes.byteLength !== 8) {
+ throw new Error("Int64 buffers must be exactly 8 bytes");
}
- return out;
}
- };
- __name(_HeaderMarshaller, "HeaderMarshaller");
- var HeaderMarshaller = _HeaderMarshaller;
- var BOOLEAN_TAG = "boolean";
- var BYTE_TAG = "byte";
- var SHORT_TAG = "short";
- var INT_TAG = "integer";
- var LONG_TAG = "long";
- var BINARY_TAG = "binary";
- var STRING_TAG = "string";
- var TIMESTAMP_TAG = "timestamp";
- var UUID_TAG = "uuid";
- var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
- var import_crc32 = require_build2();
- var PRELUDE_MEMBER_LENGTH = 4;
- var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
- var CHECKSUM_LENGTH = 4;
- var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;
- __name(splitMessage, "splitMessage");
- var _EventStreamCodec = class _EventStreamCodec2 {
- constructor(toUtf8, fromUtf8) {
- this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);
- this.messageBuffer = [];
- this.isEndOfStream = false;
+ static fromNumber(number) {
+ if (number > 9223372036854776000 || number < -9223372036854776000) {
+ throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
+ }
+ const bytes = new Uint8Array(8);
+ for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
+ bytes[i] = remaining;
+ }
+ if (number < 0) {
+ negate(bytes);
+ }
+ return new Int64(bytes);
}
- feed(message) {
- this.messageBuffer.push(this.decode(message));
+ valueOf() {
+ const bytes = this.bytes.slice(0);
+ const negative = bytes[0] & 128;
+ if (negative) {
+ negate(bytes);
+ }
+ return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1);
}
- endOfStream() {
- this.isEndOfStream = true;
+ toString() {
+ return String(this.valueOf());
}
- getMessage() {
- const message = this.messageBuffer.pop();
- const isEndOfStream = this.isEndOfStream;
- return {
- getMessage() {
- return message;
- },
- isEndOfStream() {
- return isEndOfStream;
- }
- };
+ }
+ var hasHeader = (soughtHeader, headers) => {
+ soughtHeader = soughtHeader.toLowerCase();
+ for (const headerName of Object.keys(headers)) {
+ if (soughtHeader === headerName.toLowerCase()) {
+ return true;
+ }
}
- getAvailableMessages() {
- const messages = this.messageBuffer;
- this.messageBuffer = [];
- const isEndOfStream = this.isEndOfStream;
- return {
- getMessages() {
- return messages;
- },
- isEndOfStream() {
- return isEndOfStream;
- }
- };
- }
- encode({ headers: rawHeaders, body }) {
- const headers = this.headerMarshaller.format(rawHeaders);
- const length = headers.byteLength + body.byteLength + 16;
- const out = new Uint8Array(length);
- const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
- const checksum = new import_crc322.Crc32;
- view.setUint32(0, length, false);
- view.setUint32(4, headers.byteLength, false);
- view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);
- out.set(headers, 12);
- out.set(body, headers.byteLength + 12);
- view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);
- return out;
- }
- decode(message) {
- const { headers, body } = splitMessage(message);
- return { headers: this.headerMarshaller.parse(headers), body };
- }
- formatHeaders(rawHeaders) {
- return this.headerMarshaller.format(rawHeaders);
- }
- };
- __name(_EventStreamCodec, "EventStreamCodec");
- var EventStreamCodec = _EventStreamCodec;
- var _MessageDecoderStream = class _MessageDecoderStream2 {
- constructor(options) {
- this.options = options;
- }
- [Symbol.asyncIterator]() {
- return this.asyncIterator();
- }
- async* asyncIterator() {
- for await (const bytes of this.options.inputStream) {
- const decoded = this.options.decoder.decode(bytes);
- yield decoded;
- }
- }
- };
- __name(_MessageDecoderStream, "MessageDecoderStream");
- var MessageDecoderStream = _MessageDecoderStream;
- var _MessageEncoderStream = class _MessageEncoderStream2 {
- constructor(options) {
- this.options = options;
- }
- [Symbol.asyncIterator]() {
- return this.asyncIterator();
- }
- async* asyncIterator() {
- for await (const msg of this.options.messageStream) {
- const encoded = this.options.encoder.encode(msg);
- yield encoded;
- }
- if (this.options.includeEndFrame) {
- yield new Uint8Array(0);
- }
- }
- };
- __name(_MessageEncoderStream, "MessageEncoderStream");
- var MessageEncoderStream = _MessageEncoderStream;
- var _SmithyMessageDecoderStream = class _SmithyMessageDecoderStream2 {
- constructor(options) {
- this.options = options;
- }
- [Symbol.asyncIterator]() {
- return this.asyncIterator();
- }
- async* asyncIterator() {
- for await (const message of this.options.messageStream) {
- const deserialized = await this.options.deserializer(message);
- if (deserialized === undefined)
- continue;
- yield deserialized;
- }
+ return false;
+ };
+ var moveHeadersToQuery = (request, options = {}) => {
+ const { headers, query = {} } = protocolHttp.HttpRequest.clone(request);
+ for (const name of Object.keys(headers)) {
+ const lname = name.toLowerCase();
+ if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
+ query[name] = headers[name];
+ delete headers[name];
+ }
}
+ return {
+ ...request,
+ headers,
+ query
+ };
};
- __name(_SmithyMessageDecoderStream, "SmithyMessageDecoderStream");
- var SmithyMessageDecoderStream = _SmithyMessageDecoderStream;
- var _SmithyMessageEncoderStream = class _SmithyMessageEncoderStream2 {
- constructor(options) {
- this.options = options;
- }
- [Symbol.asyncIterator]() {
- return this.asyncIterator();
- }
- async* asyncIterator() {
- for await (const chunk of this.options.inputStream) {
- const payloadBuf = this.options.serializer(chunk);
- yield payloadBuf;
+ var prepareRequest = (request) => {
+ request = protocolHttp.HttpRequest.clone(request);
+ for (const headerName of Object.keys(request.headers)) {
+ if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
+ delete request.headers[headerName];
}
}
+ return request;
};
- __name(_SmithyMessageEncoderStream, "SmithyMessageEncoderStream");
- var SmithyMessageEncoderStream = _SmithyMessageEncoderStream;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_dist_cjs20 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getSmithyContext: () => getSmithyContext2,
- normalizeProvider: () => normalizeProvider
- });
- module.exports = __toCommonJS(src_exports);
- var import_types = require_dist_cjs();
- var getSmithyContext2 = __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext");
- var normalizeProvider = __name((input) => {
- if (typeof input === "function")
- return input;
- const promisified = Promise.resolve(input);
- return () => promisified;
- }, "normalizeProvider");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/
-var require_dist_cjs21 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- SignatureV4: () => SignatureV4,
- clearCredentialCache: () => clearCredentialCache,
- createScope: () => createScope,
- getCanonicalHeaders: () => getCanonicalHeaders,
- getCanonicalQuery: () => getCanonicalQuery,
- getPayloadHash: () => getPayloadHash,
- getSigningKey: () => getSigningKey,
- moveHeadersToQuery: () => moveHeadersToQuery,
- prepareRequest: () => prepareRequest
- });
- module.exports = __toCommonJS(src_exports);
- var import_eventstream_codec = require_dist_cjs19();
- var import_util_middleware = require_dist_cjs20();
- var import_util_utf83 = require_dist_cjs11();
- var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
- var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
- var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
- var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
- var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
- var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
- var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
- var AUTH_HEADER = "authorization";
- var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
- var DATE_HEADER = "date";
- var GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
- var SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
- var SHA256_HEADER = "x-amz-content-sha256";
- var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
- var ALWAYS_UNSIGNABLE_HEADERS = {
- authorization: true,
- "cache-control": true,
- connection: true,
- expect: true,
- from: true,
- "keep-alive": true,
- "max-forwards": true,
- pragma: true,
- referer: true,
- te: true,
- trailer: true,
- "transfer-encoding": true,
- upgrade: true,
- "user-agent": true,
- "x-amzn-trace-id": true
- };
- var PROXY_HEADER_PATTERN = /^proxy-/;
- var SEC_HEADER_PATTERN = /^sec-/;
- var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
- var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
- var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
- var MAX_CACHE_SIZE = 50;
- var KEY_TYPE_IDENTIFIER = "aws4_request";
- var MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
- var import_util_hex_encoding = require_dist_cjs18();
- var import_util_utf8 = require_dist_cjs11();
- var signingKeyCache = {};
- var cacheQueue = [];
- var createScope = __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, "createScope");
- var getSigningKey = __name(async (sha256Constructor, credentials, shortDate, region, service) => {
- const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
- const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`;
- if (cacheKey in signingKeyCache) {
- return signingKeyCache[cacheKey];
- }
- cacheQueue.push(cacheKey);
- while (cacheQueue.length > MAX_CACHE_SIZE) {
- delete signingKeyCache[cacheQueue.shift()];
- }
- let key = `AWS4${credentials.secretAccessKey}`;
- for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
- key = await hmac(sha256Constructor, key, signable);
- }
- return signingKeyCache[cacheKey] = key;
- }, "getSigningKey");
- var clearCredentialCache = __name(() => {
- cacheQueue.length = 0;
- Object.keys(signingKeyCache).forEach((cacheKey) => {
- delete signingKeyCache[cacheKey];
- });
- }, "clearCredentialCache");
- var hmac = __name((ctor, secret, data) => {
- const hash = new ctor(secret);
- hash.update((0, import_util_utf8.toUint8Array)(data));
- return hash.digest();
- }, "hmac");
- var getCanonicalHeaders = __name(({ headers }, unsignableHeaders, signableHeaders) => {
- const canonical = {};
- for (const headerName of Object.keys(headers).sort()) {
- if (headers[headerName] == undefined) {
- continue;
- }
- const canonicalHeaderName = headerName.toLowerCase();
- if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders == null ? undefined : unsignableHeaders.has(canonicalHeaderName)) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
- if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
- continue;
- }
- }
- canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
- }
- return canonical;
- }, "getCanonicalHeaders");
- var import_util_uri_escape = require_dist_cjs12();
- var getCanonicalQuery = __name(({ query = {} }) => {
+ var getCanonicalQuery = ({ query = {} }) => {
const keys = [];
const serialized = {};
- for (const key of Object.keys(query).sort()) {
+ for (const key of Object.keys(query)) {
if (key.toLowerCase() === SIGNATURE_HEADER) {
continue;
}
- keys.push(key);
+ const encodedKey = utilUriEscape.escapeUri(key);
+ keys.push(encodedKey);
const value = query[key];
if (typeof value === "string") {
- serialized[key] = `${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value)}`;
+ serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`;
} else if (Array.isArray(value)) {
- serialized[key] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${(0, import_util_uri_escape.escapeUri)(key)}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join("&");
- }
- }
- return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
- }, "getCanonicalQuery");
- var import_is_array_buffer = require_dist_cjs8();
- var import_util_utf82 = require_dist_cjs11();
- var getPayloadHash = __name(async ({ headers, body }, hashConstructor) => {
- for (const headerName of Object.keys(headers)) {
- if (headerName.toLowerCase() === SHA256_HEADER) {
- return headers[headerName];
- }
- }
- if (body == undefined) {
- return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
- } else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {
- const hashCtor = new hashConstructor;
- hashCtor.update((0, import_util_utf82.toUint8Array)(body));
- return (0, import_util_hex_encoding.toHex)(await hashCtor.digest());
- }
- return UNSIGNED_PAYLOAD;
- }, "getPayloadHash");
- var hasHeader = __name((soughtHeader, headers) => {
- soughtHeader = soughtHeader.toLowerCase();
- for (const headerName of Object.keys(headers)) {
- if (soughtHeader === headerName.toLowerCase()) {
- return true;
- }
- }
- return false;
- }, "hasHeader");
- var cloneRequest = __name(({ headers, query, ...rest }) => ({
- ...rest,
- headers: { ...headers },
- query: query ? cloneQuery(query) : undefined
- }), "cloneRequest");
- var cloneQuery = __name((query) => Object.keys(query).reduce((carry, paramName) => {
- const param = query[paramName];
- return {
- ...carry,
- [paramName]: Array.isArray(param) ? [...param] : param
- };
- }, {}), "cloneQuery");
- var moveHeadersToQuery = __name((request, options = {}) => {
- var _a;
- const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
- for (const name of Object.keys(headers)) {
- const lname = name.toLowerCase();
- if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) == null ? undefined : _a.has(lname))) {
- query[name] = headers[name];
- delete headers[name];
- }
- }
- return {
- ...request,
- headers,
- query
- };
- }, "moveHeadersToQuery");
- var prepareRequest = __name((request) => {
- request = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
- for (const headerName of Object.keys(request.headers)) {
- if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
- delete request.headers[headerName];
+ serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value2)}`]), []).sort().join("&");
}
}
- return request;
- }, "prepareRequest");
- var iso8601 = __name((time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), "iso8601");
- var toDate = __name((time) => {
+ return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
+ };
+ var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z");
+ var toDate = (time) => {
if (typeof time === "number") {
return new Date(time * 1000);
}
@@ -8538,43 +10034,102 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
return new Date(time);
}
return time;
- }, "toDate");
- var _SignatureV4 = class _SignatureV42 {
- constructor({
- applyChecksum,
- credentials,
- region,
- service,
- sha256,
- uriEscapePath = true
- }) {
- this.headerMarshaller = new import_eventstream_codec.HeaderMarshaller(import_util_utf83.toUtf8, import_util_utf83.fromUtf8);
+ };
+
+ class SignatureV4Base {
+ service;
+ regionProvider;
+ credentialProvider;
+ sha256;
+ uriEscapePath;
+ applyChecksum;
+ constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
this.service = service;
this.sha256 = sha256;
this.uriEscapePath = uriEscapePath;
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
- this.regionProvider = (0, import_util_middleware.normalizeProvider)(region);
- this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials);
+ this.regionProvider = utilMiddleware.normalizeProvider(region);
+ this.credentialProvider = utilMiddleware.normalizeProvider(credentials);
+ }
+ createCanonicalRequest(request, canonicalHeaders, payloadHash) {
+ const sortedHeaders = Object.keys(canonicalHeaders).sort();
+ return `${request.method}
+${this.getCanonicalPath(request)}
+${getCanonicalQuery(request)}
+${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}
+
+${sortedHeaders.join(";")}
+${payloadHash}`;
+ }
+ async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
+ const hash = new this.sha256;
+ hash.update(utilUtf8.toUint8Array(canonicalRequest));
+ const hashedRequest = await hash.digest();
+ return `${algorithmIdentifier}
+${longDate}
+${credentialScope}
+${utilHexEncoding.toHex(hashedRequest)}`;
+ }
+ getCanonicalPath({ path }) {
+ if (this.uriEscapePath) {
+ const normalizedPathSegments = [];
+ for (const pathSegment of path.split("/")) {
+ if (pathSegment?.length === 0)
+ continue;
+ if (pathSegment === ".")
+ continue;
+ if (pathSegment === "..") {
+ normalizedPathSegments.pop();
+ } else {
+ normalizedPathSegments.push(pathSegment);
+ }
+ }
+ const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
+ const doubleEncoded = utilUriEscape.escapeUri(normalizedPath);
+ return doubleEncoded.replace(/%2F/g, "/");
+ }
+ return path;
+ }
+ validateResolvedCredentials(credentials) {
+ if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
+ throw new Error("Resolved credential object is not valid");
+ }
+ }
+ formatDate(now) {
+ const longDate = iso8601(now).replace(/[\-:]/g, "");
+ return {
+ longDate,
+ shortDate: longDate.slice(0, 8)
+ };
+ }
+ getCanonicalHeaderList(headers) {
+ return Object.keys(headers).sort().join(";");
+ }
+ }
+
+ class SignatureV4 extends SignatureV4Base {
+ headerFormatter = new HeaderFormatter;
+ constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
+ super({
+ applyChecksum,
+ credentials,
+ region,
+ service,
+ sha256,
+ uriEscapePath
+ });
}
async presign(originalRequest, options = {}) {
- const {
- signingDate = new Date,
- expiresIn = 3600,
- unsignableHeaders,
- unhoistableHeaders,
- signableHeaders,
- signingRegion,
- signingService
- } = options;
+ const { signingDate = new Date, expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
const credentials = await this.credentialProvider();
this.validateResolvedCredentials(credentials);
const region = signingRegion ?? await this.regionProvider();
- const { longDate, shortDate } = formatDate(signingDate);
+ const { longDate, shortDate } = this.formatDate(signingDate);
if (expiresIn > MAX_PRESIGNED_TTL) {
return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");
}
const scope = createScope(shortDate, region, signingService ?? this.service);
- const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders });
+ const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });
if (credentials.sessionToken) {
request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
}
@@ -8583,7 +10138,7 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
request.query[AMZ_DATE_QUERY_PARAM] = longDate;
request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
- request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);
+ request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
return request;
}
@@ -8600,12 +10155,12 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
}
async signEvent({ headers, payload }, { signingDate = new Date, priorSignature, signingRegion, signingService }) {
const region = signingRegion ?? await this.regionProvider();
- const { shortDate, longDate } = formatDate(signingDate);
+ const { shortDate, longDate } = this.formatDate(signingDate);
const scope = createScope(shortDate, region, signingService ?? this.service);
const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
const hash = new this.sha256;
hash.update(headers);
- const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest());
+ const hashedHeaders = utilHexEncoding.toHex(await hash.digest());
const stringToSign = [
EVENT_ALGORITHM_IDENTIFIER,
longDate,
@@ -8618,7 +10173,7 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
}
async signMessage(signableMessage, { signingDate = new Date, signingRegion, signingService }) {
const promise = this.signEvent({
- headers: this.headerMarshaller.format(signableMessage.message.headers),
+ headers: this.headerFormatter.format(signableMessage.message.headers),
payload: signableMessage.message.body
}, {
signingDate,
@@ -8634,23 +10189,17 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
const credentials = await this.credentialProvider();
this.validateResolvedCredentials(credentials);
const region = signingRegion ?? await this.regionProvider();
- const { shortDate } = formatDate(signingDate);
+ const { shortDate } = this.formatDate(signingDate);
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
- hash.update((0, import_util_utf83.toUint8Array)(stringToSign));
- return (0, import_util_hex_encoding.toHex)(await hash.digest());
+ hash.update(utilUtf8.toUint8Array(stringToSign));
+ return utilHexEncoding.toHex(await hash.digest());
}
- async signRequest(requestToSign, {
- signingDate = new Date,
- signableHeaders,
- unsignableHeaders,
- signingRegion,
- signingService
- } = {}) {
+ async signRequest(requestToSign, { signingDate = new Date, signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
const credentials = await this.credentialProvider();
this.validateResolvedCredentials(credentials);
const region = signingRegion ?? await this.regionProvider();
const request = prepareRequest(requestToSign);
- const { longDate, shortDate } = formatDate(signingDate);
+ const { longDate, shortDate } = this.formatDate(signingDate);
const scope = createScope(shortDate, region, signingService ?? this.service);
request.headers[AMZ_DATE_HEADER] = longDate;
if (credentials.sessionToken) {
@@ -8662,129 +10211,99 @@ var require_dist_cjs21 = __commonJS((exports, module) => {
}
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
- request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;
+ request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} ` + `Credential=${credentials.accessKeyId}/${scope}, ` + `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + `Signature=${signature}`;
return request;
}
- createCanonicalRequest(request, canonicalHeaders, payloadHash) {
- const sortedHeaders = Object.keys(canonicalHeaders).sort();
- return `${request.method}
-${this.getCanonicalPath(request)}
-${getCanonicalQuery(request)}
-${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}
-
-${sortedHeaders.join(";")}
-${payloadHash}`;
- }
- async createStringToSign(longDate, credentialScope, canonicalRequest) {
- const hash = new this.sha256;
- hash.update((0, import_util_utf83.toUint8Array)(canonicalRequest));
- const hashedRequest = await hash.digest();
- return `${ALGORITHM_IDENTIFIER}
-${longDate}
-${credentialScope}
-${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;
- }
- getCanonicalPath({ path }) {
- if (this.uriEscapePath) {
- const normalizedPathSegments = [];
- for (const pathSegment of path.split("/")) {
- if ((pathSegment == null ? undefined : pathSegment.length) === 0)
- continue;
- if (pathSegment === ".")
- continue;
- if (pathSegment === "..") {
- normalizedPathSegments.pop();
- } else {
- normalizedPathSegments.push(pathSegment);
- }
- }
- const normalizedPath = `${(path == null ? undefined : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? undefined : path.endsWith("/")) ? "/" : ""}`;
- const doubleEncoded = encodeURIComponent(normalizedPath);
- return doubleEncoded.replace(/%2F/g, "/");
- }
- return path;
- }
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
- const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
+ const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
const hash = new this.sha256(await keyPromise);
- hash.update((0, import_util_utf83.toUint8Array)(stringToSign));
- return (0, import_util_hex_encoding.toHex)(await hash.digest());
+ hash.update(utilUtf8.toUint8Array(stringToSign));
+ return utilHexEncoding.toHex(await hash.digest());
}
getSigningKey(credentials, region, shortDate, service) {
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
}
- validateResolvedCredentials(credentials) {
- if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
- throw new Error("Resolved credential object is not valid");
- }
- }
- };
- __name(_SignatureV4, "SignatureV4");
- var SignatureV4 = _SignatureV4;
- var formatDate = __name((now) => {
- const longDate = iso8601(now).replace(/[\-:]/g, "");
- return {
- longDate,
- shortDate: longDate.slice(0, 8)
- };
- }, "formatDate");
- var getCanonicalHeaderList = __name((headers) => Object.keys(headers).sort().join(";"), "getCanonicalHeaderList");
+ }
+ var signatureV4aContainer = {
+ SignatureV4a: null
+ };
+ exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER;
+ exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A;
+ exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM;
+ exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS;
+ exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER;
+ exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM;
+ exports.AUTH_HEADER = AUTH_HEADER;
+ exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM;
+ exports.DATE_HEADER = DATE_HEADER;
+ exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER;
+ exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM;
+ exports.GENERATED_HEADERS = GENERATED_HEADERS;
+ exports.HOST_HEADER = HOST_HEADER;
+ exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER;
+ exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE;
+ exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL;
+ exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN;
+ exports.REGION_SET_PARAM = REGION_SET_PARAM;
+ exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN;
+ exports.SHA256_HEADER = SHA256_HEADER;
+ exports.SIGNATURE_HEADER = SIGNATURE_HEADER;
+ exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM;
+ exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM;
+ exports.SignatureV4 = SignatureV4;
+ exports.SignatureV4Base = SignatureV4Base;
+ exports.TOKEN_HEADER = TOKEN_HEADER;
+ exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM;
+ exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS;
+ exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD;
+ exports.clearCredentialCache = clearCredentialCache;
+ exports.createScope = createScope;
+ exports.getCanonicalHeaders = getCanonicalHeaders;
+ exports.getCanonicalQuery = getCanonicalQuery;
+ exports.getPayloadHash = getPayloadHash;
+ exports.getSigningKey = getSigningKey;
+ exports.hasHeader = hasHeader;
+ exports.moveHeadersToQuery = moveHeadersToQuery;
+ exports.prepareRequest = prepareRequest;
+ exports.signatureV4aContainer = signatureV4aContainer;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.
-var require_dist_cjs22 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpo
+var require_httpAuthSchemes = __commonJS((exports, module) => {
+ var normalizeCredentialProvider = function(config, {
+ credentials,
+ credentialDefaultProvider
+ }) {
+ let credentialsProvider;
+ if (credentials) {
+ if (!credentials?.memoized) {
+ credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh);
+ } else {
+ credentialsProvider = credentials;
+ }
+ } else {
+ if (credentialDefaultProvider) {
+ credentialsProvider = (0, import_core2.normalizeProvider)(credentialDefaultProvider(Object.assign({}, config, {
+ parentClientConfig: config
+ })));
+ } else {
+ credentialsProvider = __name(async () => {
+ throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
+ }, "credentialsProvider");
+ }
}
- return to;
+ credentialsProvider.memoized = true;
+ return credentialsProvider;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- SelectorType: () => SelectorType,
- booleanSelector: () => booleanSelector,
- numberSelector: () => numberSelector
- });
- module.exports = __toCommonJS(src_exports);
- var booleanSelector = __name((obj, key, type) => {
- if (!(key in obj))
- return;
- if (obj[key] === "true")
- return true;
- if (obj[key] === "false")
- return false;
- throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
- }, "booleanSelector");
- var numberSelector = __name((obj, key, type) => {
- if (!(key in obj))
- return;
- const numberValue = parseInt(obj[key], 10);
- if (Number.isNaN(numberValue)) {
- throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);
+ var bindCallerConfig = function(config, credentialsProvider) {
+ if (credentialsProvider.configBound) {
+ return credentialsProvider;
}
- return numberValue;
- }, "numberSelector");
- var SelectorType = ((SelectorType2) => {
- SelectorType2["ENV"] = "env";
- SelectorType2["CONFIG"] = "shared config entry";
- return SelectorType2;
- })(SelectorType || {});
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs23 = __commonJS((exports, module) => {
+ const fn = __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), "fn");
+ fn.memoized = credentialsProvider.memoized;
+ fn.configBound = true;
+ return fn;
+ };
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -8803,1578 +10322,3098 @@ var require_dist_cjs23 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- build: () => build,
- parse: () => parse,
- validate: () => validate
+ var index_exports = {};
+ __export2(index_exports, {
+ AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
+ AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,
+ AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
+ NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,
+ NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,
+ getBearerTokenEnvKey: () => getBearerTokenEnvKey,
+ resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
+ resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,
+ resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,
+ validateSigningProperties: () => validateSigningProperties
});
- module.exports = __toCommonJS(src_exports);
- var validate = __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate");
- var parse = __name((arn) => {
- const segments = arn.split(":");
- if (segments.length < 6 || segments[0] !== "arn")
- throw new Error("Malformed ARN");
- const [
- ,
- partition,
- service,
- region,
- accountId,
- ...resource
- ] = segments;
+ module.exports = __toCommonJS(index_exports);
+ var import_protocol_http2 = require_dist_cjs2();
+ var import_protocol_http = require_dist_cjs2();
+ var getDateHeader = __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined, "getDateHeader");
+ var getSkewCorrectedDate = __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate");
+ var isClockSkewed = __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000, "isClockSkewed");
+ var getUpdatedSystemClockOffset = __name((clockTime, currentSystemClockOffset) => {
+ const clockTimeInMs = Date.parse(clockTime);
+ if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
+ return clockTimeInMs - Date.now();
+ }
+ return currentSystemClockOffset;
+ }, "getUpdatedSystemClockOffset");
+ var throwSigningPropertyError = __name((name, property) => {
+ if (!property) {
+ throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
+ }
+ return property;
+ }, "throwSigningPropertyError");
+ var validateSigningProperties = __name(async (signingProperties) => {
+ const context = throwSigningPropertyError("context", signingProperties.context);
+ const config = throwSigningPropertyError("config", signingProperties.config);
+ const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
+ const signerFunction = throwSigningPropertyError("signer", config.signer);
+ const signer = await signerFunction(authScheme);
+ const signingRegion = signingProperties?.signingRegion;
+ const signingRegionSet = signingProperties?.signingRegionSet;
+ const signingName = signingProperties?.signingName;
return {
- partition,
- service,
- region,
- accountId,
- resource: resource.join(":")
+ config,
+ signer,
+ signingRegion,
+ signingRegionSet,
+ signingName
};
- }, "parse");
- var build = __name((arnObject) => {
- const { partition = "aws", service, region, accountId, resource } = arnObject;
- if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {
- throw new Error("Input ARN object is invalid");
+ }, "validateSigningProperties");
+ var AwsSdkSigV4Signer = class {
+ static {
+ __name(this, "AwsSdkSigV4Signer");
}
- return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
- }, "build");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rulese
-var require_dist_cjs24 = __commonJS((exports, module) => {
- var checkContentLengthHeader = function() {
- return (next, context) => async (args) => {
- var _a;
- const { request } = args;
- if (import_protocol_http.HttpRequest.isInstance(request)) {
- if (!request.headers[CONTENT_LENGTH_HEADER]) {
- const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;
- if (typeof ((_a = context == null ? undefined : context.logger) == null ? undefined : _a.warn) === "function" && !(context.logger instanceof import_smithy_client.NoOpLogger)) {
- context.logger.warn(message);
- } else {
- console.warn(message);
- }
+ async sign(httpRequest, identity, signingProperties) {
+ if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) {
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
+ }
+ const validatedProps = await validateSigningProperties(signingProperties);
+ const { config, signer } = validatedProps;
+ let { signingRegion, signingName } = validatedProps;
+ const handlerExecutionContext = signingProperties.context;
+ if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {
+ const [first, second] = handlerExecutionContext.authSchemes;
+ if (first?.name === "sigv4a" && second?.name === "sigv4") {
+ signingRegion = second?.signingRegion ?? signingRegion;
+ signingName = second?.signingName ?? signingName;
}
}
- return next({ ...args });
- };
- };
- var regionRedirectMiddleware = function(clientConfig) {
- return (next, context) => async (args) => {
- var _a, _b;
- try {
- return await next(args);
- } catch (err) {
- if (clientConfig.followRegionRedirects && ((_a = err == null ? undefined : err.$metadata) == null ? undefined : _a.httpStatusCode) === 301) {
- try {
- const actualRegion = err.$response.headers["x-amz-bucket-region"];
- (_b = context.logger) == null || _b.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);
- context.__s3RegionRedirect = actualRegion;
- } catch (e) {
- throw new Error("Region redirect failed: " + e);
+ const signedRequest = await signer.sign(httpRequest, {
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
+ signingRegion,
+ signingService: signingName
+ });
+ return signedRequest;
+ }
+ errorHandler(signingProperties) {
+ return (error) => {
+ const serverTime = error.ServerTime ?? getDateHeader(error.$response);
+ if (serverTime) {
+ const config = throwSigningPropertyError("config", signingProperties.config);
+ const initialSystemClockOffset = config.systemClockOffset;
+ config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
+ const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;
+ if (clockSkewCorrected && error.$metadata) {
+ error.$metadata.clockSkewCorrected = true;
}
- return next(args);
- } else {
- throw err;
}
+ throw error;
+ };
+ }
+ successHandler(httpResponse, signingProperties) {
+ const dateHeader = getDateHeader(httpResponse);
+ if (dateHeader) {
+ const config = throwSigningPropertyError("config", signingProperties.config);
+ config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
}
- };
+ }
};
- var getCredentialsWithoutSessionToken = function(credentials) {
- const credentialsWithoutSessionToken = {
- accessKeyId: credentials.accessKeyId,
- secretAccessKey: credentials.secretAccessKey,
- expiration: credentials.expiration
- };
- return credentialsWithoutSessionToken;
+ var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
+ var import_protocol_http3 = require_dist_cjs2();
+ var AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {
+ static {
+ __name(this, "AwsSdkSigV4ASigner");
+ }
+ async sign(httpRequest, identity, signingProperties) {
+ if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {
+ throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
+ }
+ const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(signingProperties);
+ const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();
+ const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(",");
+ const signedRequest = await signer.sign(httpRequest, {
+ signingDate: getSkewCorrectedDate(config.systemClockOffset),
+ signingRegion: multiRegionOverride,
+ signingService: signingName
+ });
+ return signedRequest;
+ }
};
- var setSingleOverride = function(privateAccess, credentialsWithoutSessionToken) {
- const id = setTimeout(() => {
- throw new Error("SignatureV4S3Express credential override was created but not called.");
- }, 10);
- const currentCredentialProvider = privateAccess.credentialProvider;
- const overrideCredentialsProviderOnce = __name(() => {
- clearTimeout(id);
- privateAccess.credentialProvider = currentCredentialProvider;
- return Promise.resolve(credentialsWithoutSessionToken);
- }, "overrideCredentialsProviderOnce");
- privateAccess.credentialProvider = overrideCredentialsProviderOnce;
- };
- var validateBucketNameMiddleware = function() {
- return (next) => async (args) => {
- const {
- input: { Bucket }
- } = args;
- if (typeof Bucket === "string" && !(0, import_util_arn_parser.validate)(Bucket) && Bucket.indexOf("/") >= 0) {
- const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);
- err.name = "InvalidBucketName";
- throw err;
+ var getArrayForCommaSeparatedString = __name((str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [], "getArrayForCommaSeparatedString");
+ var getBearerTokenEnvKey = __name((signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`, "getBearerTokenEnvKey");
+ var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
+ var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
+ var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
+ environmentVariableSelector: __name((env, options) => {
+ if (options?.signingName) {
+ const bearerTokenKey = getBearerTokenEnvKey(options.signingName);
+ if (bearerTokenKey in env)
+ return ["httpBearerAuth"];
}
- return next({ ...args });
- };
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env))
+ return;
+ return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
+ }, "environmentVariableSelector"),
+ configFileSelector: __name((profile) => {
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
+ return;
+ return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
+ }, "configFileSelector"),
+ default: []
+ };
+ var import_core = require_dist_cjs17();
+ var import_property_provider = require_dist_cjs18();
+ var resolveAwsSdkSigV4AConfig = __name((config) => {
+ config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet);
+ return config;
+ }, "resolveAwsSdkSigV4AConfig");
+ var NODE_SIGV4A_CONFIG_OPTIONS = {
+ environmentVariableSelector(env) {
+ if (env.AWS_SIGV4A_SIGNING_REGION_SET) {
+ return env.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
+ }
+ throw new import_property_provider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
+ tryNextLink: true
+ });
+ },
+ configFileSelector(profile) {
+ if (profile.sigv4a_signing_region_set) {
+ return (profile.sigv4a_signing_region_set ?? "").split(",").map((_) => _.trim());
+ }
+ throw new import_property_provider.ProviderError("sigv4a_signing_region_set not set in profile.", {
+ tryNextLink: true
+ });
+ },
+ default: undefined
};
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ var import_client = require_client();
+ var import_core2 = require_dist_cjs17();
+ var import_signature_v4 = require_dist_cjs19();
+ var resolveAwsSdkSigV4Config = __name((config) => {
+ let inputCredentials = config.credentials;
+ let isUserSupplied = !!config.credentials;
+ let resolvedCredentials = undefined;
+ Object.defineProperty(config, "credentials", {
+ set(credentials) {
+ if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {
+ isUserSupplied = true;
+ }
+ inputCredentials = credentials;
+ const memoizedProvider = normalizeCredentialProvider(config, {
+ credentials: inputCredentials,
+ credentialDefaultProvider: config.credentialDefaultProvider
+ });
+ const boundProvider = bindCallerConfig(config, memoizedProvider);
+ if (isUserSupplied && !boundProvider.attributed) {
+ resolvedCredentials = __name(async (options) => boundProvider(options).then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_CODE", "e")), "resolvedCredentials");
+ resolvedCredentials.memoized = boundProvider.memoized;
+ resolvedCredentials.configBound = boundProvider.configBound;
+ resolvedCredentials.attributed = true;
+ } else {
+ resolvedCredentials = boundProvider;
+ }
+ },
+ get() {
+ return resolvedCredentials;
+ },
+ enumerable: true,
+ configurable: true
+ });
+ config.credentials = inputCredentials;
+ const {
+ signingEscapePath = true,
+ systemClockOffset = config.systemClockOffset || 0,
+ sha256
+ } = config;
+ let signer;
+ if (config.signer) {
+ signer = (0, import_core2.normalizeProvider)(config.signer);
+ } else if (config.regionInfoProvider) {
+ signer = __name(() => (0, import_core2.normalizeProvider)(config.region)().then(async (region) => [
+ await config.regionInfoProvider(region, {
+ useFipsEndpoint: await config.useFipsEndpoint(),
+ useDualstackEndpoint: await config.useDualstackEndpoint()
+ }) || {},
+ region
+ ]).then(([regionInfo, region]) => {
+ const { signingRegion, signingService } = regionInfo;
+ config.signingRegion = config.signingRegion || signingRegion || region;
+ config.signingName = config.signingName || signingService || config.serviceId;
+ const params = {
+ ...config,
+ credentials: config.credentials,
+ region: config.signingRegion,
+ service: config.signingName,
+ sha256,
+ uriEscapePath: signingEscapePath
+ };
+ const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
+ return new SignerCtor(params);
+ }), "signer");
+ } else {
+ signer = __name(async (authScheme) => {
+ authScheme = Object.assign({}, {
+ name: "sigv4",
+ signingName: config.signingName || config.defaultSigningName,
+ signingRegion: await (0, import_core2.normalizeProvider)(config.region)(),
+ properties: {}
+ }, authScheme);
+ const signingRegion = authScheme.signingRegion;
+ const signingService = authScheme.signingName;
+ config.signingRegion = config.signingRegion || signingRegion;
+ config.signingName = config.signingName || signingService || config.serviceId;
+ const params = {
+ ...config,
+ credentials: config.credentials,
+ region: config.signingRegion,
+ service: config.signingName,
+ sha256,
+ uriEscapePath: signingEscapePath
+ };
+ const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
+ return new SignerCtor(params);
+ }, "signer");
+ }
+ const resolvedConfig = Object.assign(config, {
+ systemClockOffset,
+ signingEscapePath,
+ signer
+ });
+ return resolvedConfig;
+ }, "resolveAwsSdkSigV4Config");
+ var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
+ __name(normalizeCredentialProvider, "normalizeCredentialProvider");
+ __name(bindCallerConfig, "bindCallerConfig");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_dist_cjs20 = __commonJS((exports) => {
+ var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder : null;
+ var calculateBodyLength = (body) => {
+ if (typeof body === "string") {
+ if (TEXT_ENCODER) {
+ return TEXT_ENCODER.encode(body).byteLength;
+ }
+ let len = body.length;
+ for (let i = len - 1;i >= 0; i--) {
+ const code = body.charCodeAt(i);
+ if (code > 127 && code <= 2047)
+ len++;
+ else if (code > 2047 && code <= 65535)
+ len += 2;
+ if (code >= 56320 && code <= 57343)
+ i--;
+ }
+ return len;
+ } else if (typeof body.byteLength === "number") {
+ return body.byteLength;
+ } else if (typeof body.size === "number") {
+ return body.size;
+ }
+ throw new Error(`Body Length computation failed for ${body}`);
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ exports.calculateBodyLength = calculateBodyLength;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
+var require_cbor = __commonJS((exports) => {
+ var alloc = function(size) {
+ return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size);
+ };
+ var tag = function(data2) {
+ data2[tagSymbol] = true;
+ return data2;
+ };
+ var setPayload = function(bytes) {
+ payload = bytes;
+ dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
+ };
+ var decode = function(at, to) {
+ if (at >= to) {
+ throw new Error("unexpected end of (decode) payload.");
+ }
+ const major = (payload[at] & 224) >> 5;
+ const minor = payload[at] & 31;
+ switch (major) {
+ case majorUint64:
+ case majorNegativeInt64:
+ case majorTag:
+ let unsignedInt;
+ let offset;
+ if (minor < 24) {
+ unsignedInt = minor;
+ offset = 1;
+ } else {
+ switch (minor) {
+ case extendedOneByte:
+ case extendedFloat16:
+ case extendedFloat32:
+ case extendedFloat64:
+ const countLength = minorValueToArgumentLength[minor];
+ const countOffset = countLength + 1;
+ offset = countOffset;
+ if (to - at < countOffset) {
+ throw new Error(`countLength ${countLength} greater than remaining buf len.`);
+ }
+ const countIndex = at + 1;
+ if (countLength === 1) {
+ unsignedInt = payload[countIndex];
+ } else if (countLength === 2) {
+ unsignedInt = dataView$1.getUint16(countIndex);
+ } else if (countLength === 4) {
+ unsignedInt = dataView$1.getUint32(countIndex);
+ } else {
+ unsignedInt = dataView$1.getBigUint64(countIndex);
+ }
+ break;
+ default:
+ throw new Error(`unexpected minor value ${minor}.`);
+ }
+ }
+ if (major === majorUint64) {
+ _offset = offset;
+ return castBigInt(unsignedInt);
+ } else if (major === majorNegativeInt64) {
+ let negativeInt;
+ if (typeof unsignedInt === "bigint") {
+ negativeInt = BigInt(-1) - unsignedInt;
+ } else {
+ negativeInt = -1 - unsignedInt;
+ }
+ _offset = offset;
+ return castBigInt(negativeInt);
+ } else {
+ if (minor === 2 || minor === 3) {
+ const length = decodeCount(at + offset, to);
+ let b = BigInt(0);
+ const start = at + offset + _offset;
+ for (let i = start;i < start + length; ++i) {
+ b = b << BigInt(8) | BigInt(payload[i]);
+ }
+ _offset = offset + _offset + length;
+ return minor === 3 ? -b - BigInt(1) : b;
+ } else if (minor === 4) {
+ const decimalFraction = decode(at + offset, to);
+ const [exponent, mantissa] = decimalFraction;
+ const normalizer = mantissa < 0 ? -1 : 1;
+ const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa));
+ let numericString;
+ const sign = mantissa < 0 ? "-" : "";
+ numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
+ numericString = numericString.replace(/^0+/g, "");
+ if (numericString === "") {
+ numericString = "0";
+ }
+ if (numericString[0] === ".") {
+ numericString = "0" + numericString;
+ }
+ numericString = sign + numericString;
+ _offset = offset + _offset;
+ return serde.nv(numericString);
+ } else {
+ const value = decode(at + offset, to);
+ const valueOffset = _offset;
+ _offset = offset + valueOffset;
+ return tag({ tag: castBigInt(unsignedInt), value });
+ }
+ }
+ case majorUtf8String:
+ case majorMap:
+ case majorList:
+ case majorUnstructuredByteString:
+ if (minor === minorIndefinite) {
+ switch (major) {
+ case majorUtf8String:
+ return decodeUtf8StringIndefinite(at, to);
+ case majorMap:
+ return decodeMapIndefinite(at, to);
+ case majorList:
+ return decodeListIndefinite(at, to);
+ case majorUnstructuredByteString:
+ return decodeUnstructuredByteStringIndefinite(at, to);
+ }
+ } else {
+ switch (major) {
+ case majorUtf8String:
+ return decodeUtf8String(at, to);
+ case majorMap:
+ return decodeMap(at, to);
+ case majorList:
+ return decodeList(at, to);
+ case majorUnstructuredByteString:
+ return decodeUnstructuredByteString(at, to);
+ }
+ }
+ default:
+ return decodeSpecial(at, to);
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS: () => NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS,
- S3ExpressIdentityCache: () => S3ExpressIdentityCache,
- S3ExpressIdentityCacheEntry: () => S3ExpressIdentityCacheEntry,
- S3ExpressIdentityProviderImpl: () => S3ExpressIdentityProviderImpl,
- SignatureV4S3Express: () => SignatureV4S3Express,
- checkContentLengthHeader: () => checkContentLengthHeader,
- checkContentLengthHeaderMiddlewareOptions: () => checkContentLengthHeaderMiddlewareOptions,
- getCheckContentLengthHeaderPlugin: () => getCheckContentLengthHeaderPlugin,
- getRegionRedirectMiddlewarePlugin: () => getRegionRedirectMiddlewarePlugin,
- getS3ExpiresMiddlewarePlugin: () => getS3ExpiresMiddlewarePlugin,
- getS3ExpressPlugin: () => getS3ExpressPlugin,
- getThrow200ExceptionsPlugin: () => getThrow200ExceptionsPlugin,
- getValidateBucketNamePlugin: () => getValidateBucketNamePlugin,
- regionRedirectEndpointMiddleware: () => regionRedirectEndpointMiddleware,
- regionRedirectEndpointMiddlewareOptions: () => regionRedirectEndpointMiddlewareOptions,
- regionRedirectMiddleware: () => regionRedirectMiddleware,
- regionRedirectMiddlewareOptions: () => regionRedirectMiddlewareOptions,
- resolveS3Config: () => resolveS3Config,
- s3ExpiresMiddleware: () => s3ExpiresMiddleware,
- s3ExpiresMiddlewareOptions: () => s3ExpiresMiddlewareOptions,
- s3ExpressMiddleware: () => s3ExpressMiddleware,
- s3ExpressMiddlewareOptions: () => s3ExpressMiddlewareOptions,
- throw200ExceptionsMiddleware: () => throw200ExceptionsMiddleware,
- throw200ExceptionsMiddlewareOptions: () => throw200ExceptionsMiddlewareOptions,
- validateBucketNameMiddleware: () => validateBucketNameMiddleware,
- validateBucketNameMiddlewareOptions: () => validateBucketNameMiddlewareOptions
- });
- module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- var import_smithy_client = require_dist_cjs16();
- var CONTENT_LENGTH_HEADER = "content-length";
- __name(checkContentLengthHeader, "checkContentLengthHeader");
- var checkContentLengthHeaderMiddlewareOptions = {
- step: "finalizeRequest",
- tags: ["CHECK_CONTENT_LENGTH_HEADER"],
- name: "getCheckContentLengthHeaderPlugin",
- override: true
+ var bytesToUtf8 = function(bytes, at, to) {
+ if (USE_BUFFER$1 && bytes.constructor?.name === "Buffer") {
+ return bytes.toString("utf-8", at, to);
+ }
+ if (textDecoder) {
+ return textDecoder.decode(bytes.subarray(at, to));
+ }
+ return utilUtf8.toUtf8(bytes.subarray(at, to));
};
- var getCheckContentLengthHeaderPlugin = __name((unused) => ({
- applyToStack: (clientStack) => {
- clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);
+ var demote = function(bigInteger) {
+ const num = Number(bigInteger);
+ if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) {
+ console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`));
}
- }), "getCheckContentLengthHeaderPlugin");
- var regionRedirectEndpointMiddleware = __name((config) => {
- return (next, context) => async (args) => {
- const originalRegion = await config.region();
- const regionProviderRef = config.region;
- if (context.__s3RegionRedirect) {
- config.region = async () => {
- config.region = regionProviderRef;
- return context.__s3RegionRedirect;
- };
+ return num;
+ };
+ var bytesToFloat16 = function(a, b) {
+ const sign = a >> 7;
+ const exponent = (a & 124) >> 2;
+ const fraction = (a & 3) << 8 | b;
+ const scalar = sign === 0 ? 1 : -1;
+ let exponentComponent;
+ let summation;
+ if (exponent === 0) {
+ if (fraction === 0) {
+ return 0;
+ } else {
+ exponentComponent = Math.pow(2, 1 - 15);
+ summation = 0;
}
- const result = await next(args);
- if (context.__s3RegionRedirect) {
- const region = await config.region();
- if (originalRegion !== region) {
- throw new Error("Region was not restored following S3 region redirect.");
- }
+ } else if (exponent === 31) {
+ if (fraction === 0) {
+ return scalar * Infinity;
+ } else {
+ return NaN;
}
- return result;
- };
- }, "regionRedirectEndpointMiddleware");
- var regionRedirectEndpointMiddlewareOptions = {
- tags: ["REGION_REDIRECT", "S3"],
- name: "regionRedirectEndpointMiddleware",
- override: true,
- relation: "before",
- toMiddleware: "endpointV2Middleware"
+ } else {
+ exponentComponent = Math.pow(2, exponent - 15);
+ summation = 1;
+ }
+ summation += fraction / 1024;
+ return scalar * (exponentComponent * summation);
+ };
+ var decodeCount = function(at, to) {
+ const minor = payload[at] & 31;
+ if (minor < 24) {
+ _offset = 1;
+ return minor;
+ }
+ if (minor === extendedOneByte || minor === extendedFloat16 || minor === extendedFloat32 || minor === extendedFloat64) {
+ const countLength = minorValueToArgumentLength[minor];
+ _offset = countLength + 1;
+ if (to - at < _offset) {
+ throw new Error(`countLength ${countLength} greater than remaining buf len.`);
+ }
+ const countIndex = at + 1;
+ if (countLength === 1) {
+ return payload[countIndex];
+ } else if (countLength === 2) {
+ return dataView$1.getUint16(countIndex);
+ } else if (countLength === 4) {
+ return dataView$1.getUint32(countIndex);
+ }
+ return demote(dataView$1.getBigUint64(countIndex));
+ }
+ throw new Error(`unexpected minor value ${minor}.`);
+ };
+ var decodeUtf8String = function(at, to) {
+ const length = decodeCount(at, to);
+ const offset = _offset;
+ at += offset;
+ if (to - at < length) {
+ throw new Error(`string len ${length} greater than remaining buf len.`);
+ }
+ const value = bytesToUtf8(payload, at, at + length);
+ _offset = offset + length;
+ return value;
};
- __name(regionRedirectMiddleware, "regionRedirectMiddleware");
- var regionRedirectMiddlewareOptions = {
- step: "initialize",
- tags: ["REGION_REDIRECT", "S3"],
- name: "regionRedirectMiddleware",
- override: true
+ var decodeUtf8StringIndefinite = function(at, to) {
+ at += 1;
+ const vector = [];
+ for (const base = at;at < to; ) {
+ if (payload[at] === 255) {
+ const data2 = alloc(vector.length);
+ data2.set(vector, 0);
+ _offset = at - base + 2;
+ return bytesToUtf8(data2, 0, data2.length);
+ }
+ const major = (payload[at] & 224) >> 5;
+ const minor = payload[at] & 31;
+ if (major !== majorUtf8String) {
+ throw new Error(`unexpected major type ${major} in indefinite string.`);
+ }
+ if (minor === minorIndefinite) {
+ throw new Error("nested indefinite string.");
+ }
+ const bytes = decodeUnstructuredByteString(at, to);
+ const length = _offset;
+ at += length;
+ for (let i = 0;i < bytes.length; ++i) {
+ vector.push(bytes[i]);
+ }
+ }
+ throw new Error("expected break marker.");
+ };
+ var decodeUnstructuredByteString = function(at, to) {
+ const length = decodeCount(at, to);
+ const offset = _offset;
+ at += offset;
+ if (to - at < length) {
+ throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`);
+ }
+ const value = payload.subarray(at, at + length);
+ _offset = offset + length;
+ return value;
};
- var getRegionRedirectMiddlewarePlugin = __name((clientConfig) => ({
- applyToStack: (clientStack) => {
- clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);
- clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);
+ var decodeUnstructuredByteStringIndefinite = function(at, to) {
+ at += 1;
+ const vector = [];
+ for (const base = at;at < to; ) {
+ if (payload[at] === 255) {
+ const data2 = alloc(vector.length);
+ data2.set(vector, 0);
+ _offset = at - base + 2;
+ return data2;
+ }
+ const major = (payload[at] & 224) >> 5;
+ const minor = payload[at] & 31;
+ if (major !== majorUnstructuredByteString) {
+ throw new Error(`unexpected major type ${major} in indefinite string.`);
+ }
+ if (minor === minorIndefinite) {
+ throw new Error("nested indefinite string.");
+ }
+ const bytes = decodeUnstructuredByteString(at, to);
+ const length = _offset;
+ at += length;
+ for (let i = 0;i < bytes.length; ++i) {
+ vector.push(bytes[i]);
+ }
+ }
+ throw new Error("expected break marker.");
+ };
+ var decodeList = function(at, to) {
+ const listDataLength = decodeCount(at, to);
+ const offset = _offset;
+ at += offset;
+ const base = at;
+ const list = Array(listDataLength);
+ for (let i = 0;i < listDataLength; ++i) {
+ const item = decode(at, to);
+ const itemOffset = _offset;
+ list[i] = item;
+ at += itemOffset;
+ }
+ _offset = offset + (at - base);
+ return list;
+ };
+ var decodeListIndefinite = function(at, to) {
+ at += 1;
+ const list = [];
+ for (const base = at;at < to; ) {
+ if (payload[at] === 255) {
+ _offset = at - base + 2;
+ return list;
+ }
+ const item = decode(at, to);
+ const n = _offset;
+ at += n;
+ list.push(item);
+ }
+ throw new Error("expected break marker.");
+ };
+ var decodeMap = function(at, to) {
+ const mapDataLength = decodeCount(at, to);
+ const offset = _offset;
+ at += offset;
+ const base = at;
+ const map = {};
+ for (let i = 0;i < mapDataLength; ++i) {
+ if (at >= to) {
+ throw new Error("unexpected end of map payload.");
+ }
+ const major = (payload[at] & 224) >> 5;
+ if (major !== majorUtf8String) {
+ throw new Error(`unexpected major type ${major} for map key at index ${at}.`);
+ }
+ const key = decode(at, to);
+ at += _offset;
+ const value = decode(at, to);
+ at += _offset;
+ map[key] = value;
}
- }), "getRegionRedirectMiddlewarePlugin");
- var s3ExpiresMiddleware = __name((config) => {
- return (next, context) => async (args) => {
- var _a;
- const result = await next(args);
- const { response } = result;
- if (import_protocol_http.HttpResponse.isInstance(response)) {
- if (response.headers.expires) {
- response.headers.expiresstring = response.headers.expires;
- try {
- (0, import_smithy_client.parseRfc7231DateTime)(response.headers.expires);
- } catch (e) {
- (_a = context.logger) == null || _a.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);
- delete response.headers.expires;
+ _offset = offset + (at - base);
+ return map;
+ };
+ var decodeMapIndefinite = function(at, to) {
+ at += 1;
+ const base = at;
+ const map = {};
+ for (;at < to; ) {
+ if (at >= to) {
+ throw new Error("unexpected end of map payload.");
+ }
+ if (payload[at] === 255) {
+ _offset = at - base + 2;
+ return map;
+ }
+ const major = (payload[at] & 224) >> 5;
+ if (major !== majorUtf8String) {
+ throw new Error(`unexpected major type ${major} for map key.`);
+ }
+ const key = decode(at, to);
+ at += _offset;
+ const value = decode(at, to);
+ at += _offset;
+ map[key] = value;
+ }
+ throw new Error("expected break marker.");
+ };
+ var decodeSpecial = function(at, to) {
+ const minor = payload[at] & 31;
+ switch (minor) {
+ case specialTrue:
+ case specialFalse:
+ _offset = 1;
+ return minor === specialTrue;
+ case specialNull:
+ _offset = 1;
+ return null;
+ case specialUndefined:
+ _offset = 1;
+ return null;
+ case extendedFloat16:
+ if (to - at < 3) {
+ throw new Error("incomplete float16 at end of buf.");
+ }
+ _offset = 3;
+ return bytesToFloat16(payload[at + 1], payload[at + 2]);
+ case extendedFloat32:
+ if (to - at < 5) {
+ throw new Error("incomplete float32 at end of buf.");
+ }
+ _offset = 5;
+ return dataView$1.getFloat32(at + 1);
+ case extendedFloat64:
+ if (to - at < 9) {
+ throw new Error("incomplete float64 at end of buf.");
+ }
+ _offset = 9;
+ return dataView$1.getFloat64(at + 1);
+ default:
+ throw new Error(`unexpected minor value ${minor}.`);
+ }
+ };
+ var castBigInt = function(bigInt) {
+ if (typeof bigInt === "number") {
+ return bigInt;
+ }
+ const num = Number(bigInt);
+ if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) {
+ return num;
+ }
+ return bigInt;
+ };
+ var ensureSpace = function(bytes) {
+ const remaining = data.byteLength - cursor;
+ if (remaining < bytes) {
+ if (cursor < 16000000) {
+ resize(Math.max(data.byteLength * 4, data.byteLength + bytes));
+ } else {
+ resize(data.byteLength + bytes + 16000000);
+ }
+ }
+ };
+ var toUint8Array = function() {
+ const out = alloc(cursor);
+ out.set(data.subarray(0, cursor), 0);
+ cursor = 0;
+ return out;
+ };
+ var resize = function(size) {
+ const old = data;
+ data = alloc(size);
+ if (old) {
+ if (old.copy) {
+ old.copy(data, 0, 0, old.byteLength);
+ } else {
+ data.set(old, 0);
+ }
+ }
+ dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
+ };
+ var encodeHeader = function(major, value) {
+ if (value < 24) {
+ data[cursor++] = major << 5 | value;
+ } else if (value < 1 << 8) {
+ data[cursor++] = major << 5 | 24;
+ data[cursor++] = value;
+ } else if (value < 1 << 16) {
+ data[cursor++] = major << 5 | extendedFloat16;
+ dataView.setUint16(cursor, value);
+ cursor += 2;
+ } else if (value < 2 ** 32) {
+ data[cursor++] = major << 5 | extendedFloat32;
+ dataView.setUint32(cursor, value);
+ cursor += 4;
+ } else {
+ data[cursor++] = major << 5 | extendedFloat64;
+ dataView.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
+ cursor += 8;
+ }
+ };
+ var encode = function(_input) {
+ const encodeStack = [_input];
+ while (encodeStack.length) {
+ const input = encodeStack.pop();
+ ensureSpace(typeof input === "string" ? input.length * 4 : 64);
+ if (typeof input === "string") {
+ if (USE_BUFFER) {
+ encodeHeader(majorUtf8String, Buffer.byteLength(input));
+ cursor += data.write(input, cursor);
+ } else {
+ const bytes = utilUtf8.fromUtf8(input);
+ encodeHeader(majorUtf8String, bytes.byteLength);
+ data.set(bytes, cursor);
+ cursor += bytes.byteLength;
+ }
+ continue;
+ } else if (typeof input === "number") {
+ if (Number.isInteger(input)) {
+ const nonNegative = input >= 0;
+ const major = nonNegative ? majorUint64 : majorNegativeInt64;
+ const value = nonNegative ? input : -input - 1;
+ if (value < 24) {
+ data[cursor++] = major << 5 | value;
+ } else if (value < 256) {
+ data[cursor++] = major << 5 | 24;
+ data[cursor++] = value;
+ } else if (value < 65536) {
+ data[cursor++] = major << 5 | extendedFloat16;
+ data[cursor++] = value >> 8;
+ data[cursor++] = value;
+ } else if (value < 4294967296) {
+ data[cursor++] = major << 5 | extendedFloat32;
+ dataView.setUint32(cursor, value);
+ cursor += 4;
+ } else {
+ data[cursor++] = major << 5 | extendedFloat64;
+ dataView.setBigUint64(cursor, BigInt(value));
+ cursor += 8;
+ }
+ continue;
+ }
+ data[cursor++] = majorSpecial << 5 | extendedFloat64;
+ dataView.setFloat64(cursor, input);
+ cursor += 8;
+ continue;
+ } else if (typeof input === "bigint") {
+ const nonNegative = input >= 0;
+ const major = nonNegative ? majorUint64 : majorNegativeInt64;
+ const value = nonNegative ? input : -input - BigInt(1);
+ const n = Number(value);
+ if (n < 24) {
+ data[cursor++] = major << 5 | n;
+ } else if (n < 256) {
+ data[cursor++] = major << 5 | 24;
+ data[cursor++] = n;
+ } else if (n < 65536) {
+ data[cursor++] = major << 5 | extendedFloat16;
+ data[cursor++] = n >> 8;
+ data[cursor++] = n & 255;
+ } else if (n < 4294967296) {
+ data[cursor++] = major << 5 | extendedFloat32;
+ dataView.setUint32(cursor, n);
+ cursor += 4;
+ } else if (value < BigInt("18446744073709551616")) {
+ data[cursor++] = major << 5 | extendedFloat64;
+ dataView.setBigUint64(cursor, value);
+ cursor += 8;
+ } else {
+ const binaryBigInt = value.toString(2);
+ const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8));
+ let b = value;
+ let i = 0;
+ while (bigIntBytes.byteLength - ++i >= 0) {
+ bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255));
+ b >>= BigInt(8);
}
+ ensureSpace(bigIntBytes.byteLength * 2);
+ data[cursor++] = nonNegative ? 194 : 195;
+ if (USE_BUFFER) {
+ encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes));
+ } else {
+ encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength);
+ }
+ data.set(bigIntBytes, cursor);
+ cursor += bigIntBytes.byteLength;
+ }
+ continue;
+ } else if (input === null) {
+ data[cursor++] = majorSpecial << 5 | specialNull;
+ continue;
+ } else if (typeof input === "boolean") {
+ data[cursor++] = majorSpecial << 5 | (input ? specialTrue : specialFalse);
+ continue;
+ } else if (typeof input === "undefined") {
+ throw new Error("@smithy/core/cbor: client may not serialize undefined value.");
+ } else if (Array.isArray(input)) {
+ for (let i = input.length - 1;i >= 0; --i) {
+ encodeStack.push(input[i]);
+ }
+ encodeHeader(majorList, input.length);
+ continue;
+ } else if (typeof input.byteLength === "number") {
+ ensureSpace(input.length * 2);
+ encodeHeader(majorUnstructuredByteString, input.length);
+ data.set(input, cursor);
+ cursor += input.byteLength;
+ continue;
+ } else if (typeof input === "object") {
+ if (input instanceof serde.NumericValue) {
+ const decimalIndex = input.string.indexOf(".");
+ const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1;
+ const mantissa = BigInt(input.string.replace(".", ""));
+ data[cursor++] = 196;
+ encodeStack.push(mantissa);
+ encodeStack.push(exponent);
+ encodeHeader(majorList, 2);
+ continue;
+ }
+ if (input[tagSymbol]) {
+ if ("tag" in input && "value" in input) {
+ encodeStack.push(input.value);
+ encodeHeader(majorTag, input.tag);
+ continue;
+ } else {
+ throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input));
+ }
+ }
+ const keys = Object.keys(input);
+ for (let i = keys.length - 1;i >= 0; --i) {
+ const key = keys[i];
+ encodeStack.push(input[key]);
+ encodeStack.push(key);
+ }
+ encodeHeader(majorMap, keys.length);
+ continue;
+ }
+ throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`);
+ }
+ };
+ var serde = require_serde();
+ var utilUtf8 = require_dist_cjs8();
+ var protocols = require_protocols();
+ var protocolHttp = require_dist_cjs2();
+ var utilBodyLengthBrowser = require_dist_cjs20();
+ var schema = require_schema();
+ var utilMiddleware = require_dist_cjs4();
+ var utilBase64 = require_dist_cjs9();
+ var majorUint64 = 0;
+ var majorNegativeInt64 = 1;
+ var majorUnstructuredByteString = 2;
+ var majorUtf8String = 3;
+ var majorList = 4;
+ var majorMap = 5;
+ var majorTag = 6;
+ var majorSpecial = 7;
+ var specialFalse = 20;
+ var specialTrue = 21;
+ var specialNull = 22;
+ var specialUndefined = 23;
+ var extendedOneByte = 24;
+ var extendedFloat16 = 25;
+ var extendedFloat32 = 26;
+ var extendedFloat64 = 27;
+ var minorIndefinite = 31;
+ var tagSymbol = Symbol("@smithy/core/cbor::tagSymbol");
+ var USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
+ var USE_BUFFER$1 = typeof Buffer !== "undefined";
+ var payload = alloc(0);
+ var dataView$1 = new DataView(payload.buffer, payload.byteOffset, payload.byteLength);
+ var textDecoder = USE_TEXT_DECODER ? new TextDecoder : null;
+ var _offset = 0;
+ var minorValueToArgumentLength = {
+ [extendedOneByte]: 1,
+ [extendedFloat16]: 2,
+ [extendedFloat32]: 4,
+ [extendedFloat64]: 8
+ };
+ var USE_BUFFER = typeof Buffer !== "undefined";
+ var initialSize = 2048;
+ var data = alloc(initialSize);
+ var dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);
+ var cursor = 0;
+ var cbor = {
+ deserialize(payload2) {
+ setPayload(payload2);
+ return decode(0, payload2.length);
+ },
+ serialize(input) {
+ try {
+ encode(input);
+ return toUint8Array();
+ } catch (e) {
+ toUint8Array();
+ throw e;
+ }
+ },
+ resizeEncodingBuffer(size) {
+ resize(size);
+ }
+ };
+ var parseCborBody = (streamBody, context) => {
+ return protocols.collectBody(streamBody, context).then(async (bytes) => {
+ if (bytes.length) {
+ try {
+ return cbor.deserialize(bytes);
+ } catch (e) {
+ Object.defineProperty(e, "$responseBodyText", {
+ value: context.utf8Encoder(bytes)
+ });
+ throw e;
}
}
- return result;
+ return {};
+ });
+ };
+ var dateToTag = (date) => {
+ return tag({
+ tag: 1,
+ value: date.getTime() / 1000
+ });
+ };
+ var parseCborErrorBody = async (errorBody, context) => {
+ const value = await parseCborBody(errorBody, context);
+ value.message = value.message ?? value.Message;
+ return value;
+ };
+ var loadSmithyRpcV2CborErrorCode = (output, data2) => {
+ const sanitizeErrorCode = (rawValue) => {
+ let cleanValue = rawValue;
+ if (typeof cleanValue === "number") {
+ cleanValue = cleanValue.toString();
+ }
+ if (cleanValue.indexOf(",") >= 0) {
+ cleanValue = cleanValue.split(",")[0];
+ }
+ if (cleanValue.indexOf(":") >= 0) {
+ cleanValue = cleanValue.split(":")[0];
+ }
+ if (cleanValue.indexOf("#") >= 0) {
+ cleanValue = cleanValue.split("#")[1];
+ }
+ return cleanValue;
};
- }, "s3ExpiresMiddleware");
- var s3ExpiresMiddlewareOptions = {
- tags: ["S3"],
- name: "s3ExpiresMiddleware",
- override: true,
- relation: "after",
- toMiddleware: "deserializerMiddleware"
+ if (data2["__type"] !== undefined) {
+ return sanitizeErrorCode(data2["__type"]);
+ }
+ const codeKey = Object.keys(data2).find((key) => key.toLowerCase() === "code");
+ if (codeKey && data2[codeKey] !== undefined) {
+ return sanitizeErrorCode(data2[codeKey]);
+ }
};
- var getS3ExpiresMiddlewarePlugin = __name((clientConfig) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);
+ var checkCborResponse = (response) => {
+ if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") {
+ throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode);
}
- }), "getS3ExpiresMiddlewarePlugin");
- var _S3ExpressIdentityCache = class _S3ExpressIdentityCache2 {
- constructor(data = {}) {
- this.data = data;
- this.lastPurgeTime = Date.now();
+ };
+ var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
+ const contents = {
+ protocol,
+ hostname,
+ port,
+ method: "POST",
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
+ headers: {
+ ...headers
+ }
+ };
+ if (resolvedHostname !== undefined) {
+ contents.hostname = resolvedHostname;
}
- get(key) {
- const entry = this.data[key];
- if (!entry) {
- return;
+ if (body !== undefined) {
+ contents.body = body;
+ try {
+ contents.headers["content-length"] = String(utilBodyLengthBrowser.calculateBodyLength(body));
+ } catch (e) {
}
- return entry;
}
- set(key, entry) {
- this.data[key] = entry;
- return entry;
+ return new protocolHttp.HttpRequest(contents);
+ };
+
+ class CborCodec {
+ serdeContext;
+ createSerializer() {
+ const serializer = new CborShapeSerializer;
+ serializer.setSerdeContext(this.serdeContext);
+ return serializer;
}
- delete(key) {
- delete this.data[key];
+ createDeserializer() {
+ const deserializer = new CborShapeDeserializer;
+ deserializer.setSerdeContext(this.serdeContext);
+ return deserializer;
}
- async purgeExpired() {
- const now = Date.now();
- if (this.lastPurgeTime + _S3ExpressIdentityCache2.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
- return;
- }
- for (const key in this.data) {
- const entry = this.data[key];
- if (!entry.isRefreshing) {
- const credential = await entry.identity;
- if (credential.expiration) {
- if (credential.expiration.getTime() < now) {
- delete this.data[key];
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ }
+
+ class CborShapeSerializer {
+ serdeContext;
+ value;
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ write(schema2, value) {
+ this.value = this.serialize(schema2, value);
+ }
+ serialize(schema$1, source) {
+ const ns = schema.NormalizedSchema.of(schema$1);
+ if (source == null) {
+ if (ns.isIdempotencyToken()) {
+ return serde.generateIdempotencyToken();
+ }
+ return source;
+ }
+ if (ns.isBlobSchema()) {
+ if (typeof source === "string") {
+ return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(source);
+ }
+ return source;
+ }
+ if (ns.isTimestampSchema()) {
+ if (typeof source === "number" || typeof source === "bigint") {
+ return dateToTag(new Date(Number(source) / 1000 | 0));
+ }
+ return dateToTag(source);
+ }
+ if (typeof source === "function" || typeof source === "object") {
+ const sourceObject = source;
+ if (ns.isListSchema() && Array.isArray(sourceObject)) {
+ const sparse = !!ns.getMergedTraits().sparse;
+ const newArray = [];
+ let i = 0;
+ for (const item of sourceObject) {
+ const value = this.serialize(ns.getValueSchema(), item);
+ if (value != null || sparse) {
+ newArray[i++] = value;
}
}
+ return newArray;
+ }
+ if (sourceObject instanceof Date) {
+ return dateToTag(sourceObject);
+ }
+ const newObject = {};
+ if (ns.isMapSchema()) {
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const key of Object.keys(sourceObject)) {
+ const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
+ if (value != null || sparse) {
+ newObject[key] = value;
+ }
+ }
+ } else if (ns.isStructSchema()) {
+ for (const [key, memberSchema] of ns.structIterator()) {
+ const value = this.serialize(memberSchema, sourceObject[key]);
+ if (value != null) {
+ newObject[key] = value;
+ }
+ }
+ } else if (ns.isDocumentSchema()) {
+ for (const key of Object.keys(sourceObject)) {
+ newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
+ }
}
+ return newObject;
}
+ return source;
}
- };
- __name(_S3ExpressIdentityCache, "S3ExpressIdentityCache");
- _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30000;
- var S3ExpressIdentityCache = _S3ExpressIdentityCache;
- var _S3ExpressIdentityCacheEntry = class _S3ExpressIdentityCacheEntry2 {
- constructor(_identity, isRefreshing = false, accessed = Date.now()) {
- this._identity = _identity;
- this.isRefreshing = isRefreshing;
- this.accessed = accessed;
+ flush() {
+ const buffer = cbor.serialize(this.value);
+ this.value = undefined;
+ return buffer;
}
- get identity() {
- this.accessed = Date.now();
- return this._identity;
+ }
+
+ class CborShapeDeserializer {
+ serdeContext;
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
}
- };
- __name(_S3ExpressIdentityCacheEntry, "S3ExpressIdentityCacheEntry");
- var S3ExpressIdentityCacheEntry = _S3ExpressIdentityCacheEntry;
- var _S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl2 {
- constructor(createSessionFn, cache = new S3ExpressIdentityCache) {
- this.createSessionFn = createSessionFn;
- this.cache = cache;
+ read(schema2, bytes) {
+ const data2 = cbor.deserialize(bytes);
+ return this.readValue(schema2, data2);
}
- async getS3ExpressIdentity(awsIdentity, identityProperties) {
- const key = identityProperties.Bucket;
- const { cache } = this;
- const entry = cache.get(key);
- if (entry) {
- return entry.identity.then((identity) => {
- var _a, _b;
- const isExpired = (((_a = identity.expiration) == null ? undefined : _a.getTime()) ?? 0) < Date.now();
- if (isExpired) {
- return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
+ readValue(_schema, value) {
+ const ns = schema.NormalizedSchema.of(_schema);
+ if (ns.isTimestampSchema() && typeof value === "number") {
+ return serde.parseEpochTimestamp(value);
+ }
+ if (ns.isBlobSchema()) {
+ if (typeof value === "string") {
+ return (this.serdeContext?.base64Decoder ?? utilBase64.fromBase64)(value);
+ }
+ return value;
+ }
+ if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") {
+ return value;
+ } else if (typeof value === "function" || typeof value === "object") {
+ if (value === null) {
+ return null;
+ }
+ if ("byteLength" in value) {
+ return value;
+ }
+ if (value instanceof Date) {
+ return value;
+ }
+ if (ns.isDocumentSchema()) {
+ return value;
+ }
+ if (ns.isListSchema()) {
+ const newArray = [];
+ const memberSchema = ns.getValueSchema();
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const item of value) {
+ const itemValue = this.readValue(memberSchema, item);
+ if (itemValue != null || sparse) {
+ newArray.push(itemValue);
+ }
}
- const isExpiringSoon = (((_b = identity.expiration) == null ? undefined : _b.getTime()) ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl2.REFRESH_WINDOW_MS;
- if (isExpiringSoon && !entry.isRefreshing) {
- entry.isRefreshing = true;
- this.getIdentity(key).then((id) => {
- cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
- });
+ return newArray;
+ }
+ const newObject = {};
+ if (ns.isMapSchema()) {
+ const sparse = !!ns.getMergedTraits().sparse;
+ const targetSchema = ns.getValueSchema();
+ for (const key of Object.keys(value)) {
+ const itemValue = this.readValue(targetSchema, value[key]);
+ if (itemValue != null || sparse) {
+ newObject[key] = itemValue;
+ }
}
- return identity;
- });
+ } else if (ns.isStructSchema()) {
+ for (const [key, memberSchema] of ns.structIterator()) {
+ newObject[key] = this.readValue(memberSchema, value[key]);
+ }
+ }
+ return newObject;
+ } else {
+ return value;
}
- return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
}
- async getIdentity(key) {
- var _a, _b;
- await this.cache.purgeExpired().catch((error) => {
- console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error);
+ }
+
+ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol {
+ codec = new CborCodec;
+ serializer = this.codec.createSerializer();
+ deserializer = this.codec.createDeserializer();
+ constructor({ defaultNamespace }) {
+ super({ defaultNamespace });
+ }
+ getShapeId() {
+ return "smithy.protocols#rpcv2Cbor";
+ }
+ getPayloadCodec() {
+ return this.codec;
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ Object.assign(request.headers, {
+ "content-type": this.getDefaultContentType(),
+ "smithy-protocol": "rpc-v2-cbor",
+ accept: this.getDefaultContentType()
});
- const session = await this.createSessionFn(key);
- if (!((_a = session.Credentials) == null ? undefined : _a.AccessKeyId) || !((_b = session.Credentials) == null ? undefined : _b.SecretAccessKey)) {
- throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
+ if (schema.deref(operationSchema.input) === "unit") {
+ delete request.body;
+ delete request.headers["content-type"];
+ } else {
+ if (!request.body) {
+ this.serializer.write(15, {});
+ request.body = this.serializer.flush();
+ }
+ try {
+ request.headers["content-length"] = String(request.body.byteLength);
+ } catch (e) {
+ }
}
- const identity = {
- accessKeyId: session.Credentials.AccessKeyId,
- secretAccessKey: session.Credentials.SecretAccessKey,
- sessionToken: session.Credentials.SessionToken,
- expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined
- };
- return identity;
- }
- };
- __name(_S3ExpressIdentityProviderImpl, "S3ExpressIdentityProviderImpl");
- _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS = 60000;
- var S3ExpressIdentityProviderImpl = _S3ExpressIdentityProviderImpl;
- var import_signature_v4 = require_dist_cjs21();
- var import_util_config_provider = require_dist_cjs22();
- var S3_EXPRESS_BUCKET_TYPE = "Directory";
- var S3_EXPRESS_BACKEND = "S3Express";
- var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express";
- var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
- var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
- var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH";
- var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth";
- var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV),
- configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, import_util_config_provider.SelectorType.CONFIG),
- default: false
- };
- var _SignatureV4S3Express = class _SignatureV4S3Express2 extends import_signature_v4.SignatureV4 {
- async signWithCredentials(requestToSign, credentials, options) {
- const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
- requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
- const privateAccess = this;
- setSingleOverride(privateAccess, credentialsWithoutSessionToken);
- return privateAccess.signRequest(requestToSign, options ?? {});
+ const { service, operation } = utilMiddleware.getSmithyContext(context);
+ const path = `/service/${service}/operation/${operation}`;
+ if (request.path.endsWith("/")) {
+ request.path += path.slice(1);
+ } else {
+ request.path += path;
+ }
+ return request;
}
- async presignWithCredentials(requestToSign, credentials, options) {
- const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
- delete requestToSign.headers[SESSION_TOKEN_HEADER];
- requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
- requestToSign.query = requestToSign.query ?? {};
- requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
- const privateAccess = this;
- setSingleOverride(privateAccess, credentialsWithoutSessionToken);
- return this.presign(requestToSign, options);
+ async deserializeResponse(operationSchema, context, response) {
+ return super.deserializeResponse(operationSchema, context, response);
}
- };
- __name(_SignatureV4S3Express, "SignatureV4S3Express");
- var SignatureV4S3Express = _SignatureV4S3Express;
- __name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken");
- __name(setSingleOverride, "setSingleOverride");
- var s3ExpressMiddleware = __name((options) => {
- return (next, context) => async (args) => {
- var _a, _b, _c, _d, _e;
- if (context.endpointV2) {
- const endpoint = context.endpointV2;
- const isS3ExpressAuth = ((_c = (_b = (_a = endpoint.properties) == null ? undefined : _a.authSchemes) == null ? undefined : _b[0]) == null ? undefined : _c.name) === S3_EXPRESS_AUTH_SCHEME;
- const isS3ExpressBucket = ((_d = endpoint.properties) == null ? undefined : _d.backend) === S3_EXPRESS_BACKEND || ((_e = endpoint.properties) == null ? undefined : _e.bucketType) === S3_EXPRESS_BUCKET_TYPE;
- if (isS3ExpressBucket) {
- context.isS3ExpressBucket = true;
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
+ let namespace = this.options.defaultNamespace;
+ if (errorName.includes("#")) {
+ [namespace] = errorName.split("#");
+ }
+ const errorMetadata = {
+ $metadata: metadata,
+ $response: response,
+ $fault: response.statusCode <= 500 ? "client" : "server"
+ };
+ const registry = schema.TypeRegistry.for(namespace);
+ let errorSchema;
+ try {
+ errorSchema = registry.getSchema(errorName);
+ } catch (e) {
+ if (dataObject.Message) {
+ dataObject.message = dataObject.Message;
}
- if (isS3ExpressAuth) {
- const requestBucket = args.input.Bucket;
- if (requestBucket) {
- const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {
- Bucket: requestBucket
- });
- context.s3ExpressIdentity = s3ExpressIdentity;
- if (import_protocol_http.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {
- args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;
- }
- }
+ const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
+ const baseExceptionSchema = synthetic.getBaseException();
+ if (baseExceptionSchema) {
+ const ErrorCtor2 = synthetic.getErrorCtor(baseExceptionSchema);
+ throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
}
+ throw Object.assign(new Error(errorName), errorMetadata, dataObject);
}
- return next(args);
- };
- }, "s3ExpressMiddleware");
- var s3ExpressMiddlewareOptions = {
- name: "s3ExpressMiddleware",
- step: "build",
- tags: ["S3", "S3_EXPRESS"],
- override: true
- };
- var getS3ExpressPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);
+ const ns = schema.NormalizedSchema.of(errorSchema);
+ const ErrorCtor = registry.getErrorCtor(errorSchema);
+ const message = dataObject.message ?? dataObject.Message ?? "Unknown";
+ const exception = new ErrorCtor(message);
+ const output = {};
+ for (const [name, member] of ns.structIterator()) {
+ output[name] = this.deserializer.readValue(member, dataObject[name]);
+ }
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
}
- }), "getS3ExpressPlugin");
- var resolveS3Config = __name((input, {
- session
- }) => {
- const [s3ClientProvider, CreateSessionCommandCtor] = session;
- return {
- ...input,
- forcePathStyle: input.forcePathStyle ?? false,
- useAccelerateEndpoint: input.useAccelerateEndpoint ?? false,
- disableMultiregionAccessPoints: input.disableMultiregionAccessPoints ?? false,
- followRegionRedirects: input.followRegionRedirects ?? false,
- s3ExpressIdentityProvider: input.s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({
- Bucket: key,
- SessionMode: "ReadWrite"
- })))
- };
- }, "resolveS3Config");
- var throw200ExceptionsMiddleware = __name((config) => (next) => async (args) => {
- const result = await next(args);
- const { response } = result;
- if (!import_protocol_http.HttpResponse.isInstance(response))
- return result;
- const { statusCode, body } = response;
- if (statusCode < 200 || statusCode >= 300)
- return result;
- const bodyBytes = await collectBody(body, config);
- const bodyString = await collectBodyString(bodyBytes, config);
- if (bodyBytes.length === 0) {
- const err = new Error("S3 aborted request");
- err.name = "InternalError";
- throw err;
- }
- if (bodyString && bodyString.match("")) {
- response.statusCode = 400;
- }
- response.body = bodyBytes;
- return result;
- }, "throw200ExceptionsMiddleware");
- var collectBody = __name((streamBody = new Uint8Array, context) => {
- if (streamBody instanceof Uint8Array) {
- return Promise.resolve(streamBody);
- }
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array);
- }, "collectBody");
- var collectBodyString = __name((streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
- var throw200ExceptionsMiddlewareOptions = {
- relation: "after",
- toMiddleware: "deserializerMiddleware",
- tags: ["THROW_200_EXCEPTIONS", "S3"],
- name: "throw200ExceptionsMiddleware",
- override: true
- };
- var getThrow200ExceptionsPlugin = __name((config) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);
+ getDefaultContentType() {
+ return "application/cbor";
}
- }), "getThrow200ExceptionsPlugin");
- var import_util_arn_parser = require_dist_cjs23();
- __name(validateBucketNameMiddleware, "validateBucketNameMiddleware");
- var validateBucketNameMiddlewareOptions = {
- step: "initialize",
- tags: ["VALIDATE_BUCKET_NAME"],
- name: "validateBucketNameMiddleware",
- override: true
- };
- var getValidateBucketNamePlugin = __name((unused) => ({
- applyToStack: (clientStack) => {
- clientStack.add(validateBucketNameMiddleware(), validateBucketNameMiddlewareOptions);
- }
- }), "getValidateBucketNamePlugin");
+ }
+ exports.CborCodec = CborCodec;
+ exports.CborShapeDeserializer = CborShapeDeserializer;
+ exports.CborShapeSerializer = CborShapeSerializer;
+ exports.SmithyRpcV2CborProtocol = SmithyRpcV2CborProtocol;
+ exports.buildHttpRpcRequest = buildHttpRpcRequest;
+ exports.cbor = cbor;
+ exports.checkCborResponse = checkCborResponse;
+ exports.dateToTag = dateToTag;
+ exports.loadSmithyRpcV2CborErrorCode = loadSmithyRpcV2CborErrorCode;
+ exports.parseCborBody = parseCborBody;
+ exports.parseCborErrorBody = parseCborErrorBody;
+ exports.tag = tag;
+ exports.tagSymbol = tagSymbol;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rules
-var require_dist_cjs25 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- CredentialsProviderError: () => CredentialsProviderError,
- ProviderError: () => ProviderError,
- TokenProviderError: () => TokenProviderError,
- chain: () => chain,
- fromStatic: () => fromStatic,
- memoize: () => memoize
- });
- module.exports = __toCommonJS(src_exports);
- var _ProviderError = class _ProviderError2 extends Error {
- constructor(message, tryNextLink = true) {
- super(message);
- this.tryNextLink = tryNextLink;
- this.name = "ProviderError";
- Object.setPrototypeOf(this, _ProviderError2.prototype);
- }
- static from(error, tryNextLink = true) {
- return Object.assign(new this(error.message, tryNextLink), error);
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs21 = __commonJS((exports) => {
+ var getAllAliases = (name, aliases) => {
+ const _aliases = [];
+ if (name) {
+ _aliases.push(name);
}
- };
- __name(_ProviderError, "ProviderError");
- var ProviderError = _ProviderError;
- var _CredentialsProviderError = class _CredentialsProviderError2 extends ProviderError {
- constructor(message, tryNextLink = true) {
- super(message, tryNextLink);
- this.tryNextLink = tryNextLink;
- this.name = "CredentialsProviderError";
- Object.setPrototypeOf(this, _CredentialsProviderError2.prototype);
+ if (aliases) {
+ for (const alias of aliases) {
+ _aliases.push(alias);
+ }
}
+ return _aliases;
};
- __name(_CredentialsProviderError, "CredentialsProviderError");
- var CredentialsProviderError = _CredentialsProviderError;
- var _TokenProviderError = class _TokenProviderError2 extends ProviderError {
- constructor(message, tryNextLink = true) {
- super(message, tryNextLink);
- this.tryNextLink = tryNextLink;
- this.name = "TokenProviderError";
- Object.setPrototypeOf(this, _TokenProviderError2.prototype);
- }
+ var getMiddlewareNameWithAliases = (name, aliases) => {
+ return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
};
- __name(_TokenProviderError, "TokenProviderError");
- var TokenProviderError = _TokenProviderError;
- var chain = __name((...providers) => async () => {
- if (providers.length === 0) {
- throw new ProviderError("No providers in chain");
- }
- let lastProviderError;
- for (const provider of providers) {
- try {
- const credentials = await provider();
- return credentials;
- } catch (err) {
- lastProviderError = err;
- if (err == null ? undefined : err.tryNextLink) {
- continue;
+ var constructStack = () => {
+ let absoluteEntries = [];
+ let relativeEntries = [];
+ let identifyOnResolve = false;
+ const entriesNameSet = new Set;
+ const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
+ const removeByName = (toRemove) => {
+ let isRemoved = false;
+ const filterCb = (entry) => {
+ const aliases = getAllAliases(entry.name, entry.aliases);
+ if (aliases.includes(toRemove)) {
+ isRemoved = true;
+ for (const alias of aliases) {
+ entriesNameSet.delete(alias);
+ }
+ return false;
}
- throw err;
- }
- }
- throw lastProviderError;
- }, "chain");
- var fromStatic = __name((staticValue) => () => Promise.resolve(staticValue), "fromStatic");
- var memoize = __name((provider, isExpired, requiresRefresh) => {
- let resolved;
- let pending;
- let hasResult;
- let isConstant = false;
- const coalesceProvider = __name(async () => {
- if (!pending) {
- pending = provider();
- }
- try {
- resolved = await pending;
- hasResult = true;
- isConstant = false;
- } finally {
- pending = undefined;
- }
- return resolved;
- }, "coalesceProvider");
- if (isExpired === undefined) {
- return async (options) => {
- if (!hasResult || (options == null ? undefined : options.forceRefresh)) {
- resolved = await coalesceProvider();
+ return true;
+ };
+ absoluteEntries = absoluteEntries.filter(filterCb);
+ relativeEntries = relativeEntries.filter(filterCb);
+ return isRemoved;
+ };
+ const removeByReference = (toRemove) => {
+ let isRemoved = false;
+ const filterCb = (entry) => {
+ if (entry.middleware === toRemove) {
+ isRemoved = true;
+ for (const alias of getAllAliases(entry.name, entry.aliases)) {
+ entriesNameSet.delete(alias);
+ }
+ return false;
}
- return resolved;
+ return true;
};
- }
- return async (options) => {
- if (!hasResult || (options == null ? undefined : options.forceRefresh)) {
- resolved = await coalesceProvider();
- }
- if (isConstant) {
- return resolved;
- }
- if (requiresRefresh && !requiresRefresh(resolved)) {
- isConstant = true;
- return resolved;
- }
- if (isExpired(resolved)) {
- await coalesceProvider();
- return resolved;
- }
- return resolved;
+ absoluteEntries = absoluteEntries.filter(filterCb);
+ relativeEntries = relativeEntries.filter(filterCb);
+ return isRemoved;
};
- }, "memoize");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_dist_cjs26 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- awsAuthMiddleware: () => awsAuthMiddleware,
- awsAuthMiddlewareOptions: () => awsAuthMiddlewareOptions,
- getAwsAuthPlugin: () => getAwsAuthPlugin,
- getSigV4AuthPlugin: () => getSigV4AuthPlugin,
- resolveAwsAuthConfig: () => resolveAwsAuthConfig,
- resolveSigV4AuthConfig: () => resolveSigV4AuthConfig
- });
- module.exports = __toCommonJS(src_exports);
- var import_property_provider = require_dist_cjs25();
- var import_signature_v4 = require_dist_cjs21();
- var import_util_middleware = require_dist_cjs20();
- var CREDENTIAL_EXPIRE_WINDOW = 300000;
- var resolveAwsAuthConfig = __name((input) => {
- const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(input);
- const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
- let signer;
- if (input.signer) {
- signer = (0, import_util_middleware.normalizeProvider)(input.signer);
- } else if (input.regionInfoProvider) {
- signer = __name(() => (0, import_util_middleware.normalizeProvider)(input.region)().then(async (region) => [
- await input.regionInfoProvider(region, {
- useFipsEndpoint: await input.useFipsEndpoint(),
- useDualstackEndpoint: await input.useDualstackEndpoint()
- }) || {},
- region
- ]).then(([regionInfo, region]) => {
- const { signingRegion, signingService } = regionInfo;
- input.signingRegion = input.signingRegion || signingRegion || region;
- input.signingName = input.signingName || signingService || input.serviceId;
- const params = {
- ...input,
- credentials: normalizedCreds,
- region: input.signingRegion,
- service: input.signingName,
- sha256,
- uriEscapePath: signingEscapePath
+ const cloneTo = (toStack) => {
+ absoluteEntries.forEach((entry) => {
+ toStack.add(entry.middleware, { ...entry });
+ });
+ relativeEntries.forEach((entry) => {
+ toStack.addRelativeTo(entry.middleware, { ...entry });
+ });
+ toStack.identifyOnResolve?.(stack.identifyOnResolve());
+ return toStack;
+ };
+ const expandRelativeMiddlewareList = (from) => {
+ const expandedMiddlewareList = [];
+ from.before.forEach((entry) => {
+ if (entry.before.length === 0 && entry.after.length === 0) {
+ expandedMiddlewareList.push(entry);
+ } else {
+ expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
+ }
+ });
+ expandedMiddlewareList.push(from);
+ from.after.reverse().forEach((entry) => {
+ if (entry.before.length === 0 && entry.after.length === 0) {
+ expandedMiddlewareList.push(entry);
+ } else {
+ expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
+ }
+ });
+ return expandedMiddlewareList;
+ };
+ const getMiddlewareList = (debug = false) => {
+ const normalizedAbsoluteEntries = [];
+ const normalizedRelativeEntries = [];
+ const normalizedEntriesNameMap = {};
+ absoluteEntries.forEach((entry) => {
+ const normalizedEntry = {
+ ...entry,
+ before: [],
+ after: []
};
- const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4;
- return new SignerCtor(params);
- }), "signer");
- } else {
- signer = __name(async (authScheme) => {
- authScheme = Object.assign({}, {
- name: "sigv4",
- signingName: input.signingName || input.defaultSigningName,
- signingRegion: await (0, import_util_middleware.normalizeProvider)(input.region)(),
- properties: {}
- }, authScheme);
- const signingRegion = authScheme.signingRegion;
- const signingService = authScheme.signingName;
- input.signingRegion = input.signingRegion || signingRegion;
- input.signingName = input.signingName || signingService || input.serviceId;
- const params = {
- ...input,
- credentials: normalizedCreds,
- region: input.signingRegion,
- service: input.signingName,
- sha256,
- uriEscapePath: signingEscapePath
+ for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
+ normalizedEntriesNameMap[alias] = normalizedEntry;
+ }
+ normalizedAbsoluteEntries.push(normalizedEntry);
+ });
+ relativeEntries.forEach((entry) => {
+ const normalizedEntry = {
+ ...entry,
+ before: [],
+ after: []
};
- const SignerCtor = input.signerConstructor || import_signature_v4.SignatureV4;
- return new SignerCtor(params);
- }, "signer");
- }
- return {
- ...input,
- systemClockOffset,
- signingEscapePath,
- credentials: normalizedCreds,
- signer
+ for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {
+ normalizedEntriesNameMap[alias] = normalizedEntry;
+ }
+ normalizedRelativeEntries.push(normalizedEntry);
+ });
+ normalizedRelativeEntries.forEach((entry) => {
+ if (entry.toMiddleware) {
+ const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
+ if (toMiddleware === undefined) {
+ if (debug) {
+ return;
+ }
+ throw new Error(`${entry.toMiddleware} is not found when adding ` + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + `middleware ${entry.relation} ${entry.toMiddleware}`);
+ }
+ if (entry.relation === "after") {
+ toMiddleware.after.push(entry);
+ }
+ if (entry.relation === "before") {
+ toMiddleware.before.push(entry);
+ }
+ }
+ });
+ const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
+ wholeList.push(...expandedMiddlewareList);
+ return wholeList;
+ }, []);
+ return mainChain;
};
- }, "resolveAwsAuthConfig");
- var resolveSigV4AuthConfig = __name((input) => {
- const normalizedCreds = input.credentials ? normalizeCredentialProvider(input.credentials) : input.credentialDefaultProvider(input);
- const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input;
- let signer;
- if (input.signer) {
- signer = (0, import_util_middleware.normalizeProvider)(input.signer);
- } else {
- signer = (0, import_util_middleware.normalizeProvider)(new import_signature_v4.SignatureV4({
- credentials: normalizedCreds,
- region: input.region,
- service: input.signingName,
- sha256,
- uriEscapePath: signingEscapePath
- }));
- }
- return {
- ...input,
- systemClockOffset,
- signingEscapePath,
- credentials: normalizedCreds,
- signer
+ const stack = {
+ add: (middleware, options = {}) => {
+ const { name, override, aliases: _aliases } = options;
+ const entry = {
+ step: "initialize",
+ priority: "normal",
+ middleware,
+ ...options
+ };
+ const aliases = getAllAliases(name, _aliases);
+ if (aliases.length > 0) {
+ if (aliases.some((alias) => entriesNameSet.has(alias))) {
+ if (!override)
+ throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
+ for (const alias of aliases) {
+ const toOverrideIndex = absoluteEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
+ if (toOverrideIndex === -1) {
+ continue;
+ }
+ const toOverride = absoluteEntries[toOverrideIndex];
+ if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {
+ throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + `${entry.priority} priority in ${entry.step} step.`);
+ }
+ absoluteEntries.splice(toOverrideIndex, 1);
+ }
+ }
+ for (const alias of aliases) {
+ entriesNameSet.add(alias);
+ }
+ }
+ absoluteEntries.push(entry);
+ },
+ addRelativeTo: (middleware, options) => {
+ const { name, override, aliases: _aliases } = options;
+ const entry = {
+ middleware,
+ ...options
+ };
+ const aliases = getAllAliases(name, _aliases);
+ if (aliases.length > 0) {
+ if (aliases.some((alias) => entriesNameSet.has(alias))) {
+ if (!override)
+ throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
+ for (const alias of aliases) {
+ const toOverrideIndex = relativeEntries.findIndex((entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias));
+ if (toOverrideIndex === -1) {
+ continue;
+ }
+ const toOverride = relativeEntries[toOverrideIndex];
+ if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {
+ throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + `"${entry.toMiddleware}" middleware.`);
+ }
+ relativeEntries.splice(toOverrideIndex, 1);
+ }
+ }
+ for (const alias of aliases) {
+ entriesNameSet.add(alias);
+ }
+ }
+ relativeEntries.push(entry);
+ },
+ clone: () => cloneTo(constructStack()),
+ use: (plugin) => {
+ plugin.applyToStack(stack);
+ },
+ remove: (toRemove) => {
+ if (typeof toRemove === "string")
+ return removeByName(toRemove);
+ else
+ return removeByReference(toRemove);
+ },
+ removeByTag: (toRemove) => {
+ let isRemoved = false;
+ const filterCb = (entry) => {
+ const { tags, name, aliases: _aliases } = entry;
+ if (tags && tags.includes(toRemove)) {
+ const aliases = getAllAliases(name, _aliases);
+ for (const alias of aliases) {
+ entriesNameSet.delete(alias);
+ }
+ isRemoved = true;
+ return false;
+ }
+ return true;
+ };
+ absoluteEntries = absoluteEntries.filter(filterCb);
+ relativeEntries = relativeEntries.filter(filterCb);
+ return isRemoved;
+ },
+ concat: (from) => {
+ const cloned = cloneTo(constructStack());
+ cloned.use(from);
+ cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
+ return cloned;
+ },
+ applyToStack: cloneTo,
+ identify: () => {
+ return getMiddlewareList(true).map((mw) => {
+ const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
+ return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
+ });
+ },
+ identifyOnResolve(toggle) {
+ if (typeof toggle === "boolean")
+ identifyOnResolve = toggle;
+ return identifyOnResolve;
+ },
+ resolve: (handler, context) => {
+ for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
+ handler = middleware(handler, context);
+ }
+ if (identifyOnResolve) {
+ console.log(stack.identify());
+ }
+ return handler;
+ }
};
- }, "resolveSigV4AuthConfig");
- var normalizeCredentialProvider = __name((credentials) => {
- if (typeof credentials === "function") {
- return (0, import_property_provider.memoize)(credentials, (credentials2) => credentials2.expiration !== undefined && credentials2.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials2) => credentials2.expiration !== undefined);
+ return stack;
+ };
+ var stepWeights = {
+ initialize: 5,
+ serialize: 4,
+ build: 3,
+ finalizeRequest: 2,
+ deserialize: 1
+ };
+ var priorityWeights = {
+ high: 3,
+ normal: 2,
+ low: 1
+ };
+ exports.constructStack = constructStack;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submod
+var require_dist_cjs22 = __commonJS((exports) => {
+ var schemaLogFilter = function(schema$1, data) {
+ if (data == null) {
+ return data;
}
- return (0, import_util_middleware.normalizeProvider)(credentials);
- }, "normalizeCredentialProvider");
- var import_protocol_http = require_dist_cjs2();
- var getSkewCorrectedDate = __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate");
- var isClockSkewed = __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000, "isClockSkewed");
- var getUpdatedSystemClockOffset = __name((clockTime, currentSystemClockOffset) => {
- const clockTimeInMs = Date.parse(clockTime);
- if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
- return clockTimeInMs - Date.now();
+ const ns = schema.NormalizedSchema.of(schema$1);
+ if (ns.getMergedTraits().sensitive) {
+ return SENSITIVE_STRING$1;
}
- return currentSystemClockOffset;
- }, "getUpdatedSystemClockOffset");
- var awsAuthMiddleware = __name((options) => (next, context) => async function(args) {
- var _a, _b, _c, _d;
- if (!import_protocol_http.HttpRequest.isInstance(args.request))
- return next(args);
- const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? undefined : _a.properties) == null ? undefined : _b.authSchemes) == null ? undefined : _c[0];
- const multiRegionOverride = (authScheme == null ? undefined : authScheme.name) === "sigv4a" ? (_d = authScheme == null ? undefined : authScheme.signingRegionSet) == null ? undefined : _d.join(",") : undefined;
- const signer = await options.signer(authScheme);
- let signedRequest;
- const signingOptions = {
- signingDate: getSkewCorrectedDate(options.systemClockOffset),
- signingRegion: multiRegionOverride || context["signing_region"],
- signingService: context["signing_service"]
- };
- if (context.s3ExpressIdentity) {
- const sigV4MultiRegion = signer;
- signedRequest = await sigV4MultiRegion.signWithCredentials(args.request, context.s3ExpressIdentity, signingOptions);
- if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) {
- throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");
+ if (ns.isListSchema()) {
+ const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive;
+ if (isSensitive) {
+ return SENSITIVE_STRING$1;
}
+ } else if (ns.isMapSchema()) {
+ const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive;
+ if (isSensitive) {
+ return SENSITIVE_STRING$1;
+ }
+ } else if (ns.isStructSchema() && typeof data === "object") {
+ const object = data;
+ const newObject = {};
+ for (const [member, memberNs] of ns.structIterator()) {
+ if (object[member] != null) {
+ newObject[member] = schemaLogFilter(memberNs, object[member]);
+ }
+ }
+ return newObject;
+ }
+ return data;
+ };
+ var map = function(arg0, arg1, arg2) {
+ let target;
+ let filter;
+ let instructions;
+ if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
+ target = {};
+ instructions = arg0;
} else {
- signedRequest = await signer.sign(args.request, signingOptions);
+ target = arg0;
+ if (typeof arg1 === "function") {
+ filter = arg1;
+ instructions = arg2;
+ return mapWithFilter(target, filter, instructions);
+ } else {
+ instructions = arg1;
+ }
}
- const output = await next({
- ...args,
- request: signedRequest
- }).catch((error) => {
- const serverTime = error.ServerTime ?? getDateHeader(error.$response);
- if (serverTime) {
- options.systemClockOffset = getUpdatedSystemClockOffset(serverTime, options.systemClockOffset);
+ for (const key of Object.keys(instructions)) {
+ if (!Array.isArray(instructions[key])) {
+ target[key] = instructions[key];
+ continue;
}
- throw error;
- });
- const dateHeader = getDateHeader(output.response);
- if (dateHeader) {
- options.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, options.systemClockOffset);
+ applyInstruction(target, null, instructions, key);
}
- return output;
- }, "awsAuthMiddleware");
- var getDateHeader = __name((response) => {
- var _a, _b;
- return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? undefined : _a.date) ?? ((_b = response.headers) == null ? undefined : _b.Date) : undefined;
- }, "getDateHeader");
- var awsAuthMiddlewareOptions = {
- name: "awsAuthMiddleware",
- tags: ["SIGNATURE", "AWSAUTH"],
- relation: "after",
- toMiddleware: "retryMiddleware",
- override: true
+ return target;
};
- var getAwsAuthPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(awsAuthMiddleware(options), awsAuthMiddlewareOptions);
+ var middlewareStack = require_dist_cjs21();
+ var protocols = require_protocols();
+ var types = require_dist_cjs();
+ var schema = require_schema();
+ var serde = require_serde();
+
+ class Client {
+ config;
+ middlewareStack = middlewareStack.constructStack();
+ initConfig;
+ handlers;
+ constructor(config) {
+ this.config = config;
}
- }), "getAwsAuthPlugin");
- var getSigV4AuthPlugin = getAwsAuthPlugin;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ru
-var require_dist_cjs27 = __commonJS((exports, module) => {
- var toDebugString = function(input) {
- if (typeof input !== "object" || input == null) {
- return input;
+ send(command, optionsOrCb, cb) {
+ const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined;
+ const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
+ const useHandlerCache = options === undefined && this.config.cacheMiddleware === true;
+ let handler;
+ if (useHandlerCache) {
+ if (!this.handlers) {
+ this.handlers = new WeakMap;
+ }
+ const handlers = this.handlers;
+ if (handlers.has(command.constructor)) {
+ handler = handlers.get(command.constructor);
+ } else {
+ handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
+ handlers.set(command.constructor, handler);
+ }
+ } else {
+ delete this.handlers;
+ handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
+ }
+ if (callback) {
+ handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {
+ });
+ } else {
+ return handler(command).then((result) => result.output);
+ }
}
- if ("ref" in input) {
- return `\$${toDebugString(input.ref)}`;
+ destroy() {
+ this.config?.requestHandler?.destroy?.();
+ delete this.handlers;
}
- if ("fn" in input) {
- return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
+ }
+ var SENSITIVE_STRING$1 = "***SensitiveInformation***";
+
+ class Command {
+ middlewareStack = middlewareStack.constructStack();
+ schema;
+ static classBuilder() {
+ return new ClassBuilder;
}
- return JSON.stringify(input, null, 2);
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
+ for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {
+ this.middlewareStack.use(mw);
+ }
+ const stack = clientStack.concat(this.middlewareStack);
+ const { logger: logger4 } = configuration;
+ const handlerExecutionContext = {
+ logger: logger4,
+ clientName,
+ commandName,
+ inputFilterSensitiveLog,
+ outputFilterSensitiveLog,
+ [types.SMITHY_CONTEXT_KEY]: {
+ commandInstance: this,
+ ...smithyContext
+ },
+ ...additionalContext
+ };
+ const { requestHandler } = configuration;
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- EndpointError: () => EndpointError2,
- customEndpointFunctions: () => customEndpointFunctions,
- isIpAddress: () => isIpAddress2,
- isValidHostLabel: () => isValidHostLabel,
- resolveEndpoint: () => resolveEndpoint2
- });
- module.exports = __toCommonJS(src_exports);
- var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}\$`);
- var isIpAddress2 = __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress");
- var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-\$)(?!-)[a-zA-Z0-9-]{1,63}\$`);
- var isValidHostLabel = __name((value, allowSubDomains = false) => {
- if (!allowSubDomains) {
- return VALID_HOST_LABEL_REGEX.test(value);
+ }
+
+ class ClassBuilder {
+ _init = () => {
+ };
+ _ep = {};
+ _middlewareFn = () => [];
+ _commandName = "";
+ _clientName = "";
+ _additionalContext = {};
+ _smithyContext = {};
+ _inputFilterSensitiveLog = undefined;
+ _outputFilterSensitiveLog = undefined;
+ _serializer = null;
+ _deserializer = null;
+ _operationSchema;
+ init(cb) {
+ this._init = cb;
}
- const labels = value.split(".");
- for (const label of labels) {
- if (!isValidHostLabel(label)) {
- return false;
- }
+ ep(endpointParameterInstructions) {
+ this._ep = endpointParameterInstructions;
+ return this;
}
- return true;
- }, "isValidHostLabel");
- var customEndpointFunctions = {};
- var debugId = "endpoints";
- __name(toDebugString, "toDebugString");
- var _EndpointError = class _EndpointError2 extends Error {
- constructor(message) {
- super(message);
- this.name = "EndpointError";
+ m(middlewareSupplier) {
+ this._middlewareFn = middlewareSupplier;
+ return this;
}
- };
- __name(_EndpointError, "EndpointError");
- var EndpointError2 = _EndpointError;
- var booleanEquals = __name((value1, value2) => value1 === value2, "booleanEquals");
- var getAttrPathList = __name((path) => {
- const parts = path.split(".");
- const pathList = [];
- for (const part of parts) {
- const squareBracketIndex = part.indexOf("[");
- if (squareBracketIndex !== -1) {
- if (part.indexOf("]") !== part.length - 1) {
- throw new EndpointError2(`Path: '${path}' does not end with ']'`);
+ s(service, operation, smithyContext = {}) {
+ this._smithyContext = {
+ service,
+ operation,
+ ...smithyContext
+ };
+ return this;
+ }
+ c(additionalContext = {}) {
+ this._additionalContext = additionalContext;
+ return this;
+ }
+ n(clientName, commandName) {
+ this._clientName = clientName;
+ this._commandName = commandName;
+ return this;
+ }
+ f(inputFilter = (_) => _, outputFilter = (_) => _) {
+ this._inputFilterSensitiveLog = inputFilter;
+ this._outputFilterSensitiveLog = outputFilter;
+ return this;
+ }
+ ser(serializer) {
+ this._serializer = serializer;
+ return this;
+ }
+ de(deserializer) {
+ this._deserializer = deserializer;
+ return this;
+ }
+ sc(operation) {
+ this._operationSchema = operation;
+ this._smithyContext.operationSchema = operation;
+ return this;
+ }
+ build() {
+ const closure = this;
+ let CommandRef;
+ return CommandRef = class extends Command {
+ input;
+ static getEndpointParameterInstructions() {
+ return closure._ep;
}
- const arrayIndex = part.slice(squareBracketIndex + 1, -1);
- if (Number.isNaN(parseInt(arrayIndex))) {
- throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path}'`);
+ constructor(...[input]) {
+ super();
+ this.input = input ?? {};
+ closure._init(this);
+ this.schema = closure._operationSchema;
}
- if (squareBracketIndex !== 0) {
- pathList.push(part.slice(0, squareBracketIndex));
+ resolveMiddleware(stack, configuration, options) {
+ return this.resolveMiddlewareWithContext(stack, configuration, options, {
+ CommandCtor: CommandRef,
+ middlewareFn: closure._middlewareFn,
+ clientName: closure._clientName,
+ commandName: closure._commandName,
+ inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (closure._operationSchema ? schemaLogFilter.bind(null, closure._operationSchema.input) : (_) => _),
+ outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (closure._operationSchema ? schemaLogFilter.bind(null, closure._operationSchema.output) : (_) => _),
+ smithyContext: closure._smithyContext,
+ additionalContext: closure._additionalContext
+ });
}
- pathList.push(arrayIndex);
- } else {
- pathList.push(part);
- }
+ serialize = closure._serializer;
+ deserialize = closure._deserializer;
+ };
}
- return pathList;
- }, "getAttrPathList");
- var getAttr = __name((value, path) => getAttrPathList(path).reduce((acc, index) => {
- if (typeof acc !== "object") {
- throw new EndpointError2(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
- } else if (Array.isArray(acc)) {
- return acc[parseInt(index)];
+ }
+ var SENSITIVE_STRING = "***SensitiveInformation***";
+ var createAggregatedClient = (commands, Client2) => {
+ for (const command of Object.keys(commands)) {
+ const CommandCtor = commands[command];
+ const methodImpl = async function(args, optionsOrCb, cb) {
+ const command2 = new CommandCtor(args);
+ if (typeof optionsOrCb === "function") {
+ this.send(command2, optionsOrCb);
+ } else if (typeof cb === "function") {
+ if (typeof optionsOrCb !== "object")
+ throw new Error(`Expected http options but got ${typeof optionsOrCb}`);
+ this.send(command2, optionsOrCb || {}, cb);
+ } else {
+ return this.send(command2, optionsOrCb);
+ }
+ };
+ const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, "");
+ Client2.prototype[methodName] = methodImpl;
}
- return acc[index];
- }, value), "getAttr");
- var isSet = __name((value) => value != null, "isSet");
- var not = __name((value) => !value, "not");
- var import_types3 = require_dist_cjs();
- var DEFAULT_PORTS = {
- [import_types3.EndpointURLScheme.HTTP]: 80,
- [import_types3.EndpointURLScheme.HTTPS]: 443
};
- var parseURL = __name((value) => {
- const whatwgURL = (() => {
- try {
- if (value instanceof URL) {
- return value;
- }
- if (typeof value === "object" && "hostname" in value) {
- const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value;
- const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`);
- url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&");
- return url;
- }
- return new URL(value);
- } catch (error) {
- return null;
- }
- })();
- if (!whatwgURL) {
- console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
- return null;
+
+ class ServiceException extends Error {
+ $fault;
+ $response;
+ $retryable;
+ $metadata;
+ constructor(options) {
+ super(options.message);
+ Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
+ this.name = options.name;
+ this.$fault = options.$fault;
+ this.$metadata = options.$metadata;
}
- const urlString = whatwgURL.href;
- const { host, hostname, pathname, protocol, search } = whatwgURL;
- if (search) {
- return null;
+ static isInstance(value) {
+ if (!value)
+ return false;
+ const candidate = value;
+ return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
}
- const scheme = protocol.slice(0, -1);
- if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) {
- return null;
+ static [Symbol.hasInstance](instance) {
+ if (!instance)
+ return false;
+ const candidate = instance;
+ if (this === ServiceException) {
+ return ServiceException.isInstance(instance);
+ }
+ if (ServiceException.isInstance(instance)) {
+ if (candidate.name && this.name) {
+ return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
+ }
+ return this.prototype.isPrototypeOf(instance);
+ }
+ return false;
}
- const isIp = isIpAddress2(hostname);
- const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
- const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
- return {
- scheme,
- authority,
- path: pathname,
- normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
- isIp
+ }
+ var decorateServiceException = (exception, additions = {}) => {
+ Object.entries(additions).filter(([, v]) => v !== undefined).forEach(([k, v]) => {
+ if (exception[k] == undefined || exception[k] === "") {
+ exception[k] = v;
+ }
+ });
+ const message = exception.message || exception.Message || "UnknownError";
+ exception.message = message;
+ delete exception.Message;
+ return exception;
+ };
+ var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
+ const $metadata = deserializeMetadata(output);
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
+ const response = new exceptionCtor({
+ name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError",
+ $fault: "client",
+ $metadata
+ });
+ throw decorateServiceException(response, parsedBody);
+ };
+ var withBaseException = (ExceptionCtor) => {
+ return ({ output, parsedBody, errorCode }) => {
+ throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });
};
- }, "parseURL");
- var stringEquals = __name((value1, value2) => value1 === value2, "stringEquals");
- var substring = __name((input, start, stop, reverse) => {
- if (start >= stop || input.length < stop) {
- return null;
+ };
+ var deserializeMetadata = (output) => ({
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"]
+ });
+ var loadConfigsForDefaultMode = (mode) => {
+ switch (mode) {
+ case "standard":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 3100
+ };
+ case "in-region":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 1100
+ };
+ case "cross-region":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 3100
+ };
+ case "mobile":
+ return {
+ retryMode: "standard",
+ connectionTimeout: 30000
+ };
+ default:
+ return {};
}
- if (!reverse) {
- return input.substring(start, stop);
+ };
+ var warningEmitted = false;
+ var emitWarningIfUnsupportedVersion = (version) => {
+ if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
+ warningEmitted = true;
}
- return input.substring(input.length - stop, input.length - start);
- }, "substring");
- var uriEncode = __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), "uriEncode");
- var endpointFunctions = {
- booleanEquals,
- getAttr,
- isSet,
- isValidHostLabel,
- not,
- parseURL,
- stringEquals,
- substring,
- uriEncode
};
- var evaluateTemplate = __name((template, options) => {
- const evaluatedTemplateArr = [];
- const templateContext = {
- ...options.endpointParams,
- ...options.referenceRecord
- };
- let currentIndex = 0;
- while (currentIndex < template.length) {
- const openingBraceIndex = template.indexOf("{", currentIndex);
- if (openingBraceIndex === -1) {
- evaluatedTemplateArr.push(template.slice(currentIndex));
- break;
+ var getChecksumConfiguration = (runtimeConfig) => {
+ const checksumAlgorithms = [];
+ for (const id in types.AlgorithmId) {
+ const algorithmId = types.AlgorithmId[id];
+ if (runtimeConfig[algorithmId] === undefined) {
+ continue;
}
- evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
- const closingBraceIndex = template.indexOf("}", openingBraceIndex);
- if (closingBraceIndex === -1) {
- evaluatedTemplateArr.push(template.slice(openingBraceIndex));
- break;
+ checksumAlgorithms.push({
+ algorithmId: () => algorithmId,
+ checksumConstructor: () => runtimeConfig[algorithmId]
+ });
+ }
+ return {
+ addChecksumAlgorithm(algo) {
+ checksumAlgorithms.push(algo);
+ },
+ checksumAlgorithms() {
+ return checksumAlgorithms;
}
- if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
- evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
- currentIndex = closingBraceIndex + 2;
+ };
+ };
+ var resolveChecksumRuntimeConfig = (clientConfig) => {
+ const runtimeConfig = {};
+ clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
+ runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
+ });
+ return runtimeConfig;
+ };
+ var getRetryConfiguration = (runtimeConfig) => {
+ return {
+ setRetryStrategy(retryStrategy) {
+ runtimeConfig.retryStrategy = retryStrategy;
+ },
+ retryStrategy() {
+ return runtimeConfig.retryStrategy;
}
- const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
- if (parameterName.includes("#")) {
- const [refName, attrName] = parameterName.split("#");
- evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));
- } else {
- evaluatedTemplateArr.push(templateContext[parameterName]);
+ };
+ };
+ var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
+ const runtimeConfig = {};
+ runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
+ return runtimeConfig;
+ };
+ var getDefaultExtensionConfiguration = (runtimeConfig) => {
+ return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
+ };
+ var getDefaultClientConfiguration = getDefaultExtensionConfiguration;
+ var resolveDefaultRuntimeConfig = (config) => {
+ return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
+ };
+ var getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray];
+ var getValueFromTextNode = (obj) => {
+ const textNodeName = "#text";
+ for (const key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) {
+ obj[key] = obj[key][textNodeName];
+ } else if (typeof obj[key] === "object" && obj[key] !== null) {
+ obj[key] = getValueFromTextNode(obj[key]);
}
- currentIndex = closingBraceIndex + 1;
}
- return evaluatedTemplateArr.join("");
- }, "evaluateTemplate");
- var getReferenceValue = __name(({ ref }, options) => {
- const referenceRecord = {
- ...options.endpointParams,
- ...options.referenceRecord
- };
- return referenceRecord[ref];
- }, "getReferenceValue");
- var evaluateExpression = __name((obj, keyName, options) => {
- if (typeof obj === "string") {
- return evaluateTemplate(obj, options);
- } else if (obj["fn"]) {
- return callFunction(obj, options);
- } else if (obj["ref"]) {
- return getReferenceValue(obj, options);
+ return obj;
+ };
+ var isSerializableHeaderValue = (value) => {
+ return value != null;
+ };
+
+ class NoOpLogger {
+ trace() {
}
- throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
- }, "evaluateExpression");
- var callFunction = __name(({ fn, argv }, options) => {
- const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options));
- const fnSegments = fn.split(".");
- if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {
- return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
+ debug() {
}
- return endpointFunctions[fn](...evaluatedArgs);
- }, "callFunction");
- var evaluateCondition = __name(({ assign, ...fnArgs }, options) => {
- var _a, _b;
- if (assign && assign in options.referenceRecord) {
- throw new EndpointError2(`'${assign}' is already defined in Reference Record.`);
+ info() {
}
- const value = callFunction(fnArgs, options);
- (_b = (_a = options.logger) == null ? undefined : _a.debug) == null || _b.call(_a, debugId, `evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);
- return {
- result: value === "" ? true : !!value,
- ...assign != null && { toAssign: { name: assign, value } }
- };
- }, "evaluateCondition");
- var evaluateConditions = __name((conditions = [], options) => {
- var _a, _b;
- const conditionsReferenceRecord = {};
- for (const condition of conditions) {
- const { result, toAssign } = evaluateCondition(condition, {
- ...options,
- referenceRecord: {
- ...options.referenceRecord,
- ...conditionsReferenceRecord
+ warn() {
+ }
+ error() {
+ }
+ }
+ var convertMap = (target) => {
+ const output = {};
+ for (const [k, v] of Object.entries(target || {})) {
+ output[k] = [, v];
+ }
+ return output;
+ };
+ var take = (source, instructions) => {
+ const out = {};
+ for (const key in instructions) {
+ applyInstruction(out, source, instructions, key);
+ }
+ return out;
+ };
+ var mapWithFilter = (target, filter, instructions) => {
+ return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
+ if (Array.isArray(value)) {
+ _instructions[key] = value;
+ } else {
+ if (typeof value === "function") {
+ _instructions[key] = [filter, value()];
+ } else {
+ _instructions[key] = [filter, value];
}
- });
- if (!result) {
- return { result };
}
- if (toAssign) {
- conditionsReferenceRecord[toAssign.name] = toAssign.value;
- (_b = (_a = options.logger) == null ? undefined : _a.debug) == null || _b.call(_a, debugId, `assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
+ return _instructions;
+ }, {}));
+ };
+ var applyInstruction = (target, source, instructions, targetKey) => {
+ if (source !== null) {
+ let instruction = instructions[targetKey];
+ if (typeof instruction === "function") {
+ instruction = [, instruction];
+ }
+ const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
+ if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
+ target[targetKey] = valueFn(source[sourceKey]);
}
+ return;
}
- return { result: true, referenceRecord: conditionsReferenceRecord };
- }, "evaluateConditions");
- var getEndpointHeaders = __name((headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
- ...acc,
- [headerKey]: headerVal.map((headerValEntry) => {
- const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
- if (typeof processedExpr !== "string") {
- throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`);
+ let [filter, value] = instructions[targetKey];
+ if (typeof value === "function") {
+ let _value;
+ const defaultFilterPassed = filter === undefined && (_value = value()) != null;
+ const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter;
+ if (defaultFilterPassed) {
+ target[targetKey] = _value;
+ } else if (customFilterPassed) {
+ target[targetKey] = value();
+ }
+ } else {
+ const defaultFilterPassed = filter === undefined && value != null;
+ const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
+ if (defaultFilterPassed || customFilterPassed) {
+ target[targetKey] = value;
}
- return processedExpr;
- })
- }), {}), "getEndpointHeaders");
- var getEndpointProperty = __name((property, options) => {
- if (Array.isArray(property)) {
- return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
}
- switch (typeof property) {
- case "string":
- return evaluateTemplate(property, options);
- case "object":
- if (property === null) {
- throw new EndpointError2(`Unexpected endpoint property: ${property}`);
- }
- return getEndpointProperties(property, options);
- case "boolean":
- return property;
+ };
+ var nonNullish = (_) => _ != null;
+ var pass = (_) => _;
+ var serializeFloat = (value) => {
+ if (value !== value) {
+ return "NaN";
+ }
+ switch (value) {
+ case Infinity:
+ return "Infinity";
+ case (-Infinity):
+ return "-Infinity";
default:
- throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`);
+ return value;
}
- }, "getEndpointProperty");
- var getEndpointProperties = __name((properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
- ...acc,
- [propertyKey]: getEndpointProperty(propertyVal, options)
- }), {}), "getEndpointProperties");
- var getEndpointUrl = __name((endpointUrl, options) => {
- const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
- if (typeof expression === "string") {
- try {
- return new URL(expression);
- } catch (error) {
- console.error(`Failed to construct URL with ${expression}`, error);
- throw error;
+ };
+ var serializeDateTime = (date) => date.toISOString().replace(".000Z", "Z");
+ var _json = (obj) => {
+ if (obj == null) {
+ return {};
+ }
+ if (Array.isArray(obj)) {
+ return obj.filter((_) => _ != null).map(_json);
+ }
+ if (typeof obj === "object") {
+ const target = {};
+ for (const key of Object.keys(obj)) {
+ if (obj[key] == null) {
+ continue;
+ }
+ target[key] = _json(obj[key]);
}
+ return target;
}
- throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`);
- }, "getEndpointUrl");
- var evaluateEndpointRule = __name((endpointRule, options) => {
- var _a, _b;
- const { conditions, endpoint } = endpointRule;
- const { result, referenceRecord } = evaluateConditions(conditions, options);
- if (!result) {
- return;
+ return obj;
+ };
+ Object.defineProperty(exports, "collectBody", {
+ enumerable: true,
+ get: function() {
+ return protocols.collectBody;
}
- const endpointRuleOptions = {
- ...options,
- referenceRecord: { ...options.referenceRecord, ...referenceRecord }
- };
- const { url, properties, headers } = endpoint;
- (_b = (_a = options.logger) == null ? undefined : _a.debug) == null || _b.call(_a, debugId, `Resolving endpoint from template: ${toDebugString(endpoint)}`);
- return {
- ...headers != null && {
- headers: getEndpointHeaders(headers, endpointRuleOptions)
- },
- ...properties != null && {
- properties: getEndpointProperties(properties, endpointRuleOptions)
- },
- url: getEndpointUrl(url, endpointRuleOptions)
- };
- }, "evaluateEndpointRule");
- var evaluateErrorRule = __name((errorRule, options) => {
- const { conditions, error } = errorRule;
- const { result, referenceRecord } = evaluateConditions(conditions, options);
- if (!result) {
- return;
+ });
+ Object.defineProperty(exports, "extendedEncodeURIComponent", {
+ enumerable: true,
+ get: function() {
+ return protocols.extendedEncodeURIComponent;
}
- throw new EndpointError2(evaluateExpression(error, "Error", {
- ...options,
- referenceRecord: { ...options.referenceRecord, ...referenceRecord }
- }));
- }, "evaluateErrorRule");
- var evaluateTreeRule = __name((treeRule, options) => {
- const { conditions, rules } = treeRule;
- const { result, referenceRecord } = evaluateConditions(conditions, options);
- if (!result) {
- return;
+ });
+ Object.defineProperty(exports, "resolvedPath", {
+ enumerable: true,
+ get: function() {
+ return protocols.resolvedPath;
}
- return evaluateRules(rules, {
- ...options,
- referenceRecord: { ...options.referenceRecord, ...referenceRecord }
- });
- }, "evaluateTreeRule");
- var evaluateRules = __name((rules, options) => {
- for (const rule of rules) {
- if (rule.type === "endpoint") {
- const endpointOrUndefined = evaluateEndpointRule(rule, options);
- if (endpointOrUndefined) {
- return endpointOrUndefined;
+ });
+ exports.Client = Client;
+ exports.Command = Command;
+ exports.NoOpLogger = NoOpLogger;
+ exports.SENSITIVE_STRING = SENSITIVE_STRING;
+ exports.ServiceException = ServiceException;
+ exports._json = _json;
+ exports.convertMap = convertMap;
+ exports.createAggregatedClient = createAggregatedClient;
+ exports.decorateServiceException = decorateServiceException;
+ exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
+ exports.getArrayIfSingleItem = getArrayIfSingleItem;
+ exports.getDefaultClientConfiguration = getDefaultClientConfiguration;
+ exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration;
+ exports.getValueFromTextNode = getValueFromTextNode;
+ exports.isSerializableHeaderValue = isSerializableHeaderValue;
+ exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode;
+ exports.map = map;
+ exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
+ exports.serializeDateTime = serializeDateTime;
+ exports.serializeFloat = serializeFloat;
+ exports.take = take;
+ exports.throwDefaultError = throwDefaultError;
+ exports.withBaseException = withBaseException;
+ Object.keys(serde).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return serde[k];
}
- } else if (rule.type === "error") {
- evaluateErrorRule(rule, options);
- } else if (rule.type === "tree") {
- const endpointOrUndefined = evaluateTreeRule(rule, options);
- if (endpointOrUndefined) {
- return endpointOrUndefined;
+ });
+ });
+});
+
+// node_modules/@aws-sdk/nested-clients/dis
+var require_fxp = __commonJS((exports, module) => {
+ (() => {
+ var t = { d: (e2, n2) => {
+ for (var i2 in n2)
+ t.o(n2, i2) && !t.o(e2, i2) && Object.defineProperty(e2, i2, { enumerable: true, get: n2[i2] });
+ }, o: (t2, e2) => Object.prototype.hasOwnProperty.call(t2, e2), r: (t2) => {
+ typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
+ } }, e = {};
+ t.r(e), t.d(e, { XMLBuilder: () => ft, XMLParser: () => st, XMLValidator: () => mt });
+ const n = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", i = new RegExp("^[" + n + "][" + n + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
+ function s(t2, e2) {
+ const n2 = [];
+ let i2 = e2.exec(t2);
+ for (;i2; ) {
+ const s2 = [];
+ s2.startIndex = e2.lastIndex - i2[0].length;
+ const r2 = i2.length;
+ for (let t3 = 0;t3 < r2; t3++)
+ s2.push(i2[t3]);
+ n2.push(s2), i2 = e2.exec(t2);
+ }
+ return n2;
+ }
+ const r = function(t2) {
+ return !(i.exec(t2) == null);
+ }, o = { allowBooleanAttributes: false, unpairedTags: [] };
+ function a(t2, e2) {
+ e2 = Object.assign({}, o, e2);
+ const n2 = [];
+ let i2 = false, s2 = false;
+ t2[0] === "\uFEFF" && (t2 = t2.substr(1));
+ for (let o2 = 0;o2 < t2.length; o2++)
+ if (t2[o2] === "<" && t2[o2 + 1] === "?") {
+ if (o2 += 2, o2 = u(t2, o2), o2.err)
+ return o2;
+ } else {
+ if (t2[o2] !== "<") {
+ if (l(t2[o2]))
+ continue;
+ return x("InvalidChar", "char '" + t2[o2] + "' is not expected.", N(t2, o2));
+ }
+ {
+ let a2 = o2;
+ if (o2++, t2[o2] === "!") {
+ o2 = h(t2, o2);
+ continue;
+ }
+ {
+ let d2 = false;
+ t2[o2] === "/" && (d2 = true, o2++);
+ let f2 = "";
+ for (;o2 < t2.length && t2[o2] !== ">" && t2[o2] !== " " && t2[o2] !== "\t" && t2[o2] !== "\n" && t2[o2] !== "\r"; o2++)
+ f2 += t2[o2];
+ if (f2 = f2.trim(), f2[f2.length - 1] === "/" && (f2 = f2.substring(0, f2.length - 1), o2--), !r(f2)) {
+ let e3;
+ return e3 = f2.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + f2 + "' is an invalid name.", x("InvalidTag", e3, N(t2, o2));
+ }
+ const p2 = c(t2, o2);
+ if (p2 === false)
+ return x("InvalidAttr", "Attributes for '" + f2 + "' have open quote.", N(t2, o2));
+ let b2 = p2.value;
+ if (o2 = p2.index, b2[b2.length - 1] === "/") {
+ const n3 = o2 - b2.length;
+ b2 = b2.substring(0, b2.length - 1);
+ const s3 = g(b2, e2);
+ if (s3 !== true)
+ return x(s3.err.code, s3.err.msg, N(t2, n3 + s3.err.line));
+ i2 = true;
+ } else if (d2) {
+ if (!p2.tagClosed)
+ return x("InvalidTag", "Closing tag '" + f2 + "' doesn't have proper closing.", N(t2, o2));
+ if (b2.trim().length > 0)
+ return x("InvalidTag", "Closing tag '" + f2 + "' can't have attributes or invalid starting.", N(t2, a2));
+ if (n2.length === 0)
+ return x("InvalidTag", "Closing tag '" + f2 + "' has not been opened.", N(t2, a2));
+ {
+ const e3 = n2.pop();
+ if (f2 !== e3.tagName) {
+ let n3 = N(t2, e3.tagStartPos);
+ return x("InvalidTag", "Expected closing tag '" + e3.tagName + "' (opened in line " + n3.line + ", col " + n3.col + ") instead of closing tag '" + f2 + "'.", N(t2, a2));
+ }
+ n2.length == 0 && (s2 = true);
+ }
+ } else {
+ const r2 = g(b2, e2);
+ if (r2 !== true)
+ return x(r2.err.code, r2.err.msg, N(t2, o2 - b2.length + r2.err.line));
+ if (s2 === true)
+ return x("InvalidXml", "Multiple possible root nodes found.", N(t2, o2));
+ e2.unpairedTags.indexOf(f2) !== -1 || n2.push({ tagName: f2, tagStartPos: a2 }), i2 = true;
+ }
+ for (o2++;o2 < t2.length; o2++)
+ if (t2[o2] === "<") {
+ if (t2[o2 + 1] === "!") {
+ o2++, o2 = h(t2, o2);
+ continue;
+ }
+ if (t2[o2 + 1] !== "?")
+ break;
+ if (o2 = u(t2, ++o2), o2.err)
+ return o2;
+ } else if (t2[o2] === "&") {
+ const e3 = m(t2, o2);
+ if (e3 == -1)
+ return x("InvalidChar", "char '&' is not expected.", N(t2, o2));
+ o2 = e3;
+ } else if (s2 === true && !l(t2[o2]))
+ return x("InvalidXml", "Extra text at the end", N(t2, o2));
+ t2[o2] === "<" && o2--;
+ }
+ }
}
- } else {
- throw new EndpointError2(`Unknown endpoint rule: ${rule}`);
- }
+ return i2 ? n2.length == 1 ? x("InvalidTag", "Unclosed tag '" + n2[0].tagName + "'.", N(t2, n2[0].tagStartPos)) : !(n2.length > 0) || x("InvalidXml", "Invalid '" + JSON.stringify(n2.map((t3) => t3.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 }) : x("InvalidXml", "Start tag expected.", 1);
}
- throw new EndpointError2(`Rules evaluation failed`);
- }, "evaluateRules");
- var resolveEndpoint2 = __name((ruleSetObject, options) => {
- var _a, _b, _c, _d, _e;
- const { endpointParams, logger: logger4 } = options;
- const { parameters, rules } = ruleSetObject;
- (_b = (_a = options.logger) == null ? undefined : _a.debug) == null || _b.call(_a, `${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
- const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);
- if (paramsWithDefault.length > 0) {
- for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
- endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
- }
+ function l(t2) {
+ return t2 === " " || t2 === "\t" || t2 === "\n" || t2 === "\r";
}
- const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);
- for (const requiredParam of requiredParams) {
- if (endpointParams[requiredParam] == null) {
- throw new EndpointError2(`Missing required parameter: '${requiredParam}'`);
+ function u(t2, e2) {
+ const n2 = e2;
+ for (;e2 < t2.length; e2++)
+ if (t2[e2] != "?" && t2[e2] != " ")
+ ;
+ else {
+ const i2 = t2.substr(n2, e2 - n2);
+ if (e2 > 5 && i2 === "xml")
+ return x("InvalidXml", "XML declaration allowed only at the start of the document.", N(t2, e2));
+ if (t2[e2] == "?" && t2[e2 + 1] == ">") {
+ e2++;
+ break;
+ }
+ }
+ return e2;
+ }
+ function h(t2, e2) {
+ if (t2.length > e2 + 5 && t2[e2 + 1] === "-" && t2[e2 + 2] === "-") {
+ for (e2 += 3;e2 < t2.length; e2++)
+ if (t2[e2] === "-" && t2[e2 + 1] === "-" && t2[e2 + 2] === ">") {
+ e2 += 2;
+ break;
+ }
+ } else if (t2.length > e2 + 8 && t2[e2 + 1] === "D" && t2[e2 + 2] === "O" && t2[e2 + 3] === "C" && t2[e2 + 4] === "T" && t2[e2 + 5] === "Y" && t2[e2 + 6] === "P" && t2[e2 + 7] === "E") {
+ let n2 = 1;
+ for (e2 += 8;e2 < t2.length; e2++)
+ if (t2[e2] === "<")
+ n2++;
+ else if (t2[e2] === ">" && (n2--, n2 === 0))
+ break;
+ } else if (t2.length > e2 + 9 && t2[e2 + 1] === "[" && t2[e2 + 2] === "C" && t2[e2 + 3] === "D" && t2[e2 + 4] === "A" && t2[e2 + 5] === "T" && t2[e2 + 6] === "A" && t2[e2 + 7] === "[") {
+ for (e2 += 8;e2 < t2.length; e2++)
+ if (t2[e2] === "]" && t2[e2 + 1] === "]" && t2[e2 + 2] === ">") {
+ e2 += 2;
+ break;
+ }
}
+ return e2;
}
- const endpoint = evaluateRules(rules, { endpointParams, logger: logger4, referenceRecord: {} });
- if ((_c = options.endpointParams) == null ? undefined : _c.Endpoint) {
- try {
- const givenEndpoint = new URL(options.endpointParams.Endpoint);
- const { protocol, port } = givenEndpoint;
- endpoint.url.protocol = protocol;
- endpoint.url.port = port;
- } catch (e) {
+ const d = '"', f = "'";
+ function c(t2, e2) {
+ let n2 = "", i2 = "", s2 = false;
+ for (;e2 < t2.length; e2++) {
+ if (t2[e2] === d || t2[e2] === f)
+ i2 === "" ? i2 = t2[e2] : i2 !== t2[e2] || (i2 = "");
+ else if (t2[e2] === ">" && i2 === "") {
+ s2 = true;
+ break;
+ }
+ n2 += t2[e2];
+ }
+ return i2 === "" && { value: n2, index: e2, tagClosed: s2 };
+ }
+ const p = new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
+ function g(t2, e2) {
+ const n2 = s(t2, p), i2 = {};
+ for (let t3 = 0;t3 < n2.length; t3++) {
+ if (n2[t3][1].length === 0)
+ return x("InvalidAttr", "Attribute '" + n2[t3][2] + "' has no space in starting.", E(n2[t3]));
+ if (n2[t3][3] !== undefined && n2[t3][4] === undefined)
+ return x("InvalidAttr", "Attribute '" + n2[t3][2] + "' is without value.", E(n2[t3]));
+ if (n2[t3][3] === undefined && !e2.allowBooleanAttributes)
+ return x("InvalidAttr", "boolean attribute '" + n2[t3][2] + "' is not allowed.", E(n2[t3]));
+ const s2 = n2[t3][2];
+ if (!b(s2))
+ return x("InvalidAttr", "Attribute '" + s2 + "' is an invalid name.", E(n2[t3]));
+ if (i2.hasOwnProperty(s2))
+ return x("InvalidAttr", "Attribute '" + s2 + "' is repeated.", E(n2[t3]));
+ i2[s2] = 1;
}
+ return true;
}
- (_e = (_d = options.logger) == null ? undefined : _d.debug) == null || _e.call(_d, `${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
- return endpoint;
- }, "resolveEndpoint");
-});
+ function m(t2, e2) {
+ if (t2[++e2] === ";")
+ return -1;
+ if (t2[e2] === "#")
+ return function(t3, e3) {
+ let n3 = /\d/;
+ for (t3[e3] === "x" && (e3++, n3 = /[\da-fA-F]/);e3 < t3.length; e3++) {
+ if (t3[e3] === ";")
+ return e3;
+ if (!t3[e3].match(n3))
+ break;
+ }
+ return -1;
+ }(t2, ++e2);
+ let n2 = 0;
+ for (;e2 < t2.length; e2++, n2++)
+ if (!(t2[e2].match(/\w/) && n2 < 20)) {
+ if (t2[e2] === ";")
+ break;
+ return -1;
+ }
+ return e2;
+ }
+ function x(t2, e2, n2) {
+ return { err: { code: t2, msg: e2, line: n2.line || n2, col: n2.col } };
+ }
+ function b(t2) {
+ return r(t2);
+ }
+ function N(t2, e2) {
+ const n2 = t2.substring(0, e2).split(/\r?\n/);
+ return { line: n2.length, col: n2[n2.length - 1].length + 1 };
+ }
+ function E(t2) {
+ return t2.startIndex + t2[1].length;
+ }
+ const v = { preserveOrder: false, attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, removeNSPrefix: false, allowBooleanAttributes: false, parseTagValue: true, parseAttributeValue: false, trimValues: true, cdataPropName: false, numberParseOptions: { hex: true, leadingZeros: true, eNotation: true }, tagValueProcessor: function(t2, e2) {
+ return e2;
+ }, attributeValueProcessor: function(t2, e2) {
+ return e2;
+ }, stopNodes: [], alwaysCreateTextNode: false, isArray: () => false, commentPropName: false, unpairedTags: [], processEntities: true, htmlEntities: false, ignoreDeclaration: false, ignorePiTags: false, transformTagName: false, transformAttributeName: false, updateTag: function(t2, e2, n2) {
+ return t2;
+ }, captureMetaData: false };
+ let y;
+ y = typeof Symbol != "function" ? "@@xmlMetadata" : Symbol("XML Node Metadata");
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_dist_cjs28 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ class T {
+ constructor(t2) {
+ this.tagname = t2, this.child = [], this[":@"] = {};
+ }
+ add(t2, e2) {
+ t2 === "__proto__" && (t2 = "#__proto__"), this.child.push({ [t2]: e2 });
+ }
+ addChild(t2, e2) {
+ t2.tagname === "__proto__" && (t2.tagname = "#__proto__"), t2[":@"] && Object.keys(t2[":@"]).length > 0 ? this.child.push({ [t2.tagname]: t2.child, ":@": t2[":@"] }) : this.child.push({ [t2.tagname]: t2.child }), e2 !== undefined && (this.child[this.child.length - 1][y] = { startIndex: e2 });
+ }
+ static getMetaDataSymbol() {
+ return y;
+ }
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- ConditionObject: () => import_util_endpoints.ConditionObject,
- DeprecatedObject: () => import_util_endpoints.DeprecatedObject,
- EndpointError: () => import_util_endpoints.EndpointError,
- EndpointObject: () => import_util_endpoints.EndpointObject,
- EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,
- EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,
- EndpointParams: () => import_util_endpoints.EndpointParams,
- EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,
- EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,
- ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,
- EvaluateOptions: () => import_util_endpoints.EvaluateOptions,
- Expression: () => import_util_endpoints.Expression,
- FunctionArgv: () => import_util_endpoints.FunctionArgv,
- FunctionObject: () => import_util_endpoints.FunctionObject,
- FunctionReturn: () => import_util_endpoints.FunctionReturn,
- ParameterObject: () => import_util_endpoints.ParameterObject,
- ReferenceObject: () => import_util_endpoints.ReferenceObject,
- ReferenceRecord: () => import_util_endpoints.ReferenceRecord,
- RuleSetObject: () => import_util_endpoints.RuleSetObject,
- RuleSetRules: () => import_util_endpoints.RuleSetRules,
- TreeRuleObject: () => import_util_endpoints.TreeRuleObject,
- getUserAgentPrefix: () => getUserAgentPrefix,
- isIpAddress: () => import_util_endpoints.isIpAddress,
- partition: () => partition,
- resolveEndpoint: () => import_util_endpoints.resolveEndpoint,
- setPartitionInfo: () => setPartitionInfo,
- useDefaultPartitionInfo: () => useDefaultPartitionInfo
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_endpoints = require_dist_cjs27();
- var isVirtualHostableS3Bucket = __name((value, allowSubDomains = false) => {
- if (allowSubDomains) {
- for (const label of value.split(".")) {
- if (!isVirtualHostableS3Bucket(label)) {
+ function w(t2, e2) {
+ const n2 = {};
+ if (t2[e2 + 3] !== "O" || t2[e2 + 4] !== "C" || t2[e2 + 5] !== "T" || t2[e2 + 6] !== "Y" || t2[e2 + 7] !== "P" || t2[e2 + 8] !== "E")
+ throw new Error("Invalid Tag instead of DOCTYPE");
+ {
+ e2 += 9;
+ let i2 = 1, s2 = false, r2 = false, o2 = "";
+ for (;e2 < t2.length; e2++)
+ if (t2[e2] !== "<" || r2)
+ if (t2[e2] === ">") {
+ if (r2 ? t2[e2 - 1] === "-" && t2[e2 - 2] === "-" && (r2 = false, i2--) : i2--, i2 === 0)
+ break;
+ } else
+ t2[e2] === "[" ? s2 = true : o2 += t2[e2];
+ else {
+ if (s2 && C(t2, "!ENTITY", e2)) {
+ let i3, s3;
+ e2 += 7, [i3, s3, e2] = O(t2, e2 + 1), s3.indexOf("&") === -1 && (n2[i3] = { regx: RegExp(`&${i3};`, "g"), val: s3 });
+ } else if (s2 && C(t2, "!ELEMENT", e2)) {
+ e2 += 8;
+ const { index: n3 } = S(t2, e2 + 1);
+ e2 = n3;
+ } else if (s2 && C(t2, "!ATTLIST", e2))
+ e2 += 8;
+ else if (s2 && C(t2, "!NOTATION", e2)) {
+ e2 += 9;
+ const { index: n3 } = A(t2, e2 + 1);
+ e2 = n3;
+ } else {
+ if (!C(t2, "!--", e2))
+ throw new Error("Invalid DOCTYPE");
+ r2 = true;
+ }
+ i2++, o2 = "";
+ }
+ if (i2 !== 0)
+ throw new Error("Unclosed DOCTYPE");
+ }
+ return { entities: n2, i: e2 };
+ }
+ const P = (t2, e2) => {
+ for (;e2 < t2.length && /\s/.test(t2[e2]); )
+ e2++;
+ return e2;
+ };
+ function O(t2, e2) {
+ e2 = P(t2, e2);
+ let n2 = "";
+ for (;e2 < t2.length && !/\s/.test(t2[e2]) && t2[e2] !== '"' && t2[e2] !== "'"; )
+ n2 += t2[e2], e2++;
+ if ($(n2), e2 = P(t2, e2), t2.substring(e2, e2 + 6).toUpperCase() === "SYSTEM")
+ throw new Error("External entities are not supported");
+ if (t2[e2] === "%")
+ throw new Error("Parameter entities are not supported");
+ let i2 = "";
+ return [e2, i2] = I(t2, e2, "entity"), [n2, i2, --e2];
+ }
+ function A(t2, e2) {
+ e2 = P(t2, e2);
+ let n2 = "";
+ for (;e2 < t2.length && !/\s/.test(t2[e2]); )
+ n2 += t2[e2], e2++;
+ $(n2), e2 = P(t2, e2);
+ const i2 = t2.substring(e2, e2 + 6).toUpperCase();
+ if (i2 !== "SYSTEM" && i2 !== "PUBLIC")
+ throw new Error(`Expected SYSTEM or PUBLIC, found "${i2}"`);
+ e2 += i2.length, e2 = P(t2, e2);
+ let s2 = null, r2 = null;
+ if (i2 === "PUBLIC")
+ [e2, s2] = I(t2, e2, "publicIdentifier"), t2[e2 = P(t2, e2)] !== '"' && t2[e2] !== "'" || ([e2, r2] = I(t2, e2, "systemIdentifier"));
+ else if (i2 === "SYSTEM" && ([e2, r2] = I(t2, e2, "systemIdentifier"), !r2))
+ throw new Error("Missing mandatory system identifier for SYSTEM notation");
+ return { notationName: n2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
+ }
+ function I(t2, e2, n2) {
+ let i2 = "";
+ const s2 = t2[e2];
+ if (s2 !== '"' && s2 !== "'")
+ throw new Error(`Expected quoted string, found "${s2}"`);
+ for (e2++;e2 < t2.length && t2[e2] !== s2; )
+ i2 += t2[e2], e2++;
+ if (t2[e2] !== s2)
+ throw new Error(`Unterminated ${n2} value`);
+ return [++e2, i2];
+ }
+ function S(t2, e2) {
+ e2 = P(t2, e2);
+ let n2 = "";
+ for (;e2 < t2.length && !/\s/.test(t2[e2]); )
+ n2 += t2[e2], e2++;
+ if (!$(n2))
+ throw new Error(`Invalid element name: "${n2}"`);
+ let i2 = "";
+ if (t2[e2 = P(t2, e2)] === "E" && C(t2, "MPTY", e2))
+ e2 += 4;
+ else if (t2[e2] === "A" && C(t2, "NY", e2))
+ e2 += 2;
+ else {
+ if (t2[e2] !== "(")
+ throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
+ for (e2++;e2 < t2.length && t2[e2] !== ")"; )
+ i2 += t2[e2], e2++;
+ if (t2[e2] !== ")")
+ throw new Error("Unterminated content model");
+ }
+ return { elementName: n2, contentModel: i2.trim(), index: e2 };
+ }
+ function C(t2, e2, n2) {
+ for (let i2 = 0;i2 < e2.length; i2++)
+ if (e2[i2] !== t2[n2 + i2 + 1])
return false;
+ return true;
+ }
+ function $(t2) {
+ if (r(t2))
+ return t2;
+ throw new Error(`Invalid entity name ${t2}`);
+ }
+ const j = /^[-+]?0x[a-fA-F0-9]+$/, D = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, V = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
+ const M = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
+ function _(t2) {
+ return typeof t2 == "function" ? t2 : Array.isArray(t2) ? (e2) => {
+ for (const n2 of t2) {
+ if (typeof n2 == "string" && e2 === n2)
+ return true;
+ if (n2 instanceof RegExp && n2.test(e2))
+ return true;
}
+ } : () => false;
+ }
+
+ class k {
+ constructor(t2) {
+ this.options = t2, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = { apos: { regex: /&(apos|#39|#x27);/g, val: "'" }, gt: { regex: /&(gt|#62|#x3E);/g, val: ">" }, lt: { regex: /&(lt|#60|#x3C);/g, val: "<" }, quot: { regex: /&(quot|#34|#x22);/g, val: '"' } }, this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" }, this.htmlEntities = { space: { regex: /&(nbsp|#160);/g, val: " " }, cent: { regex: /&(cent|#162);/g, val: "\xA2" }, pound: { regex: /&(pound|#163);/g, val: "\xA3" }, yen: { regex: /&(yen|#165);/g, val: "\xA5" }, euro: { regex: /&(euro|#8364);/g, val: "\u20AC" }, copyright: { regex: /&(copy|#169);/g, val: "\xA9" }, reg: { regex: /&(reg|#174);/g, val: "\xAE" }, inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }, num_dec: { regex: /([0-9]{1,7});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 10)) }, num_hex: { regex: /([0-9a-fA-F]{1,6});/g, val: (t3, e2) => String.fromCodePoint(Number.parseInt(e2, 16)) } }, this.addExternalEntities = F, this.parseXml = X, this.parseTextData = L, this.resolveNameSpace = B, this.buildAttributesMap = G, this.isItStopNode = Z, this.replaceEntitiesValue = R, this.readStopNodeData = J, this.saveTextToParentTag = q, this.addChild = Y, this.ignoreAttributesFn = _(this.options.ignoreAttributes);
}
- return true;
}
- if (!(0, import_util_endpoints.isValidHostLabel)(value)) {
- return false;
+ function F(t2) {
+ const e2 = Object.keys(t2);
+ for (let n2 = 0;n2 < e2.length; n2++) {
+ const i2 = e2[n2];
+ this.lastEntities[i2] = { regex: new RegExp("&" + i2 + ";", "g"), val: t2[i2] };
+ }
}
- if (value.length < 3 || value.length > 63) {
- return false;
+ function L(t2, e2, n2, i2, s2, r2, o2) {
+ if (t2 !== undefined && (this.options.trimValues && !i2 && (t2 = t2.trim()), t2.length > 0)) {
+ o2 || (t2 = this.replaceEntitiesValue(t2));
+ const i3 = this.options.tagValueProcessor(e2, t2, n2, s2, r2);
+ return i3 == null ? t2 : typeof i3 != typeof t2 || i3 !== t2 ? i3 : this.options.trimValues || t2.trim() === t2 ? H(t2, this.options.parseTagValue, this.options.numberParseOptions) : t2;
+ }
}
- if (value !== value.toLowerCase()) {
- return false;
+ function B(t2) {
+ if (this.options.removeNSPrefix) {
+ const e2 = t2.split(":"), n2 = t2.charAt(0) === "/" ? "/" : "";
+ if (e2[0] === "xmlns")
+ return "";
+ e2.length === 2 && (t2 = n2 + e2[1]);
+ }
+ return t2;
}
- if ((0, import_util_endpoints.isIpAddress)(value)) {
+ const U = new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
+ function G(t2, e2, n2) {
+ if (this.options.ignoreAttributes !== true && typeof t2 == "string") {
+ const n3 = s(t2, U), i2 = n3.length, r2 = {};
+ for (let t3 = 0;t3 < i2; t3++) {
+ const i3 = this.resolveNameSpace(n3[t3][1]);
+ if (this.ignoreAttributesFn(i3, e2))
+ continue;
+ let s2 = n3[t3][4], o2 = this.options.attributeNamePrefix + i3;
+ if (i3.length)
+ if (this.options.transformAttributeName && (o2 = this.options.transformAttributeName(o2)), o2 === "__proto__" && (o2 = "#__proto__"), s2 !== undefined) {
+ this.options.trimValues && (s2 = s2.trim()), s2 = this.replaceEntitiesValue(s2);
+ const t4 = this.options.attributeValueProcessor(i3, s2, e2);
+ r2[o2] = t4 == null ? s2 : typeof t4 != typeof s2 || t4 !== s2 ? t4 : H(s2, this.options.parseAttributeValue, this.options.numberParseOptions);
+ } else
+ this.options.allowBooleanAttributes && (r2[o2] = true);
+ }
+ if (!Object.keys(r2).length)
+ return;
+ if (this.options.attributesGroupName) {
+ const t3 = {};
+ return t3[this.options.attributesGroupName] = r2, t3;
+ }
+ return r2;
+ }
+ }
+ const X = function(t2) {
+ t2 = t2.replace(/\r\n?/g, "\n");
+ const e2 = new T("!xml");
+ let n2 = e2, i2 = "", s2 = "";
+ for (let r2 = 0;r2 < t2.length; r2++)
+ if (t2[r2] === "<")
+ if (t2[r2 + 1] === "/") {
+ const e3 = W(t2, ">", r2, "Closing Tag is not closed.");
+ let o2 = t2.substring(r2 + 2, e3).trim();
+ if (this.options.removeNSPrefix) {
+ const t3 = o2.indexOf(":");
+ t3 !== -1 && (o2 = o2.substr(t3 + 1));
+ }
+ this.options.transformTagName && (o2 = this.options.transformTagName(o2)), n2 && (i2 = this.saveTextToParentTag(i2, n2, s2));
+ const a2 = s2.substring(s2.lastIndexOf(".") + 1);
+ if (o2 && this.options.unpairedTags.indexOf(o2) !== -1)
+ throw new Error(`Unpaired tag can not be used as closing tag: ${o2}>`);
+ let l2 = 0;
+ a2 && this.options.unpairedTags.indexOf(a2) !== -1 ? (l2 = s2.lastIndexOf(".", s2.lastIndexOf(".") - 1), this.tagsNodeStack.pop()) : l2 = s2.lastIndexOf("."), s2 = s2.substring(0, l2), n2 = this.tagsNodeStack.pop(), i2 = "", r2 = e3;
+ } else if (t2[r2 + 1] === "?") {
+ let e3 = z(t2, r2, false, "?>");
+ if (!e3)
+ throw new Error("Pi Tag is not closed.");
+ if (i2 = this.saveTextToParentTag(i2, n2, s2), this.options.ignoreDeclaration && e3.tagName === "?xml" || this.options.ignorePiTags)
+ ;
+ else {
+ const t3 = new T(e3.tagName);
+ t3.add(this.options.textNodeName, ""), e3.tagName !== e3.tagExp && e3.attrExpPresent && (t3[":@"] = this.buildAttributesMap(e3.tagExp, s2, e3.tagName)), this.addChild(n2, t3, s2, r2);
+ }
+ r2 = e3.closeIndex + 1;
+ } else if (t2.substr(r2 + 1, 3) === "!--") {
+ const e3 = W(t2, "-->", r2 + 4, "Comment is not closed.");
+ if (this.options.commentPropName) {
+ const o2 = t2.substring(r2 + 4, e3 - 2);
+ i2 = this.saveTextToParentTag(i2, n2, s2), n2.add(this.options.commentPropName, [{ [this.options.textNodeName]: o2 }]);
+ }
+ r2 = e3;
+ } else if (t2.substr(r2 + 1, 2) === "!D") {
+ const e3 = w(t2, r2);
+ this.docTypeEntities = e3.entities, r2 = e3.i;
+ } else if (t2.substr(r2 + 1, 2) === "![") {
+ const e3 = W(t2, "]]>", r2, "CDATA is not closed.") - 2, o2 = t2.substring(r2 + 9, e3);
+ i2 = this.saveTextToParentTag(i2, n2, s2);
+ let a2 = this.parseTextData(o2, n2.tagname, s2, true, false, true, true);
+ a2 == null && (a2 = ""), this.options.cdataPropName ? n2.add(this.options.cdataPropName, [{ [this.options.textNodeName]: o2 }]) : n2.add(this.options.textNodeName, a2), r2 = e3 + 2;
+ } else {
+ let o2 = z(t2, r2, this.options.removeNSPrefix), a2 = o2.tagName;
+ const l2 = o2.rawTagName;
+ let { tagExp: u2, attrExpPresent: h2, closeIndex: d2 } = o2;
+ this.options.transformTagName && (a2 = this.options.transformTagName(a2)), n2 && i2 && n2.tagname !== "!xml" && (i2 = this.saveTextToParentTag(i2, n2, s2, false));
+ const f2 = n2;
+ f2 && this.options.unpairedTags.indexOf(f2.tagname) !== -1 && (n2 = this.tagsNodeStack.pop(), s2 = s2.substring(0, s2.lastIndexOf("."))), a2 !== e2.tagname && (s2 += s2 ? "." + a2 : a2);
+ const c2 = r2;
+ if (this.isItStopNode(this.options.stopNodes, s2, a2)) {
+ let e3 = "";
+ if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1)
+ a2[a2.length - 1] === "/" ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), r2 = o2.closeIndex;
+ else if (this.options.unpairedTags.indexOf(a2) !== -1)
+ r2 = o2.closeIndex;
+ else {
+ const n3 = this.readStopNodeData(t2, l2, d2 + 1);
+ if (!n3)
+ throw new Error(`Unexpected end of ${l2}`);
+ r2 = n3.i, e3 = n3.tagContent;
+ }
+ const i3 = new T(a2);
+ a2 !== u2 && h2 && (i3[":@"] = this.buildAttributesMap(u2, s2, a2)), e3 && (e3 = this.parseTextData(e3, a2, s2, true, h2, true, true)), s2 = s2.substr(0, s2.lastIndexOf(".")), i3.add(this.options.textNodeName, e3), this.addChild(n2, i3, s2, c2);
+ } else {
+ if (u2.length > 0 && u2.lastIndexOf("/") === u2.length - 1) {
+ a2[a2.length - 1] === "/" ? (a2 = a2.substr(0, a2.length - 1), s2 = s2.substr(0, s2.length - 1), u2 = a2) : u2 = u2.substr(0, u2.length - 1), this.options.transformTagName && (a2 = this.options.transformTagName(a2));
+ const t3 = new T(a2);
+ a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), s2 = s2.substr(0, s2.lastIndexOf("."));
+ } else {
+ const t3 = new T(a2);
+ this.tagsNodeStack.push(n2), a2 !== u2 && h2 && (t3[":@"] = this.buildAttributesMap(u2, s2, a2)), this.addChild(n2, t3, s2, c2), n2 = t3;
+ }
+ i2 = "", r2 = d2;
+ }
+ }
+ else
+ i2 += t2[r2];
+ return e2.child;
+ };
+ function Y(t2, e2, n2, i2) {
+ this.options.captureMetaData || (i2 = undefined);
+ const s2 = this.options.updateTag(e2.tagname, n2, e2[":@"]);
+ s2 === false || (typeof s2 == "string" ? (e2.tagname = s2, t2.addChild(e2, i2)) : t2.addChild(e2, i2));
+ }
+ const R = function(t2) {
+ if (this.options.processEntities) {
+ for (let e2 in this.docTypeEntities) {
+ const n2 = this.docTypeEntities[e2];
+ t2 = t2.replace(n2.regx, n2.val);
+ }
+ for (let e2 in this.lastEntities) {
+ const n2 = this.lastEntities[e2];
+ t2 = t2.replace(n2.regex, n2.val);
+ }
+ if (this.options.htmlEntities)
+ for (let e2 in this.htmlEntities) {
+ const n2 = this.htmlEntities[e2];
+ t2 = t2.replace(n2.regex, n2.val);
+ }
+ t2 = t2.replace(this.ampEntity.regex, this.ampEntity.val);
+ }
+ return t2;
+ };
+ function q(t2, e2, n2, i2) {
+ return t2 && (i2 === undefined && (i2 = e2.child.length === 0), (t2 = this.parseTextData(t2, e2.tagname, n2, false, !!e2[":@"] && Object.keys(e2[":@"]).length !== 0, i2)) !== undefined && t2 !== "" && e2.add(this.options.textNodeName, t2), t2 = ""), t2;
+ }
+ function Z(t2, e2, n2) {
+ const i2 = "*." + n2;
+ for (const n3 in t2) {
+ const s2 = t2[n3];
+ if (i2 === s2 || e2 === s2)
+ return true;
+ }
return false;
}
- return true;
- }, "isVirtualHostableS3Bucket");
- var parseArn = __name((value) => {
- const segments = value.split(":");
- if (segments.length < 6)
- return null;
- const [arn, partition2, service, region, accountId, ...resourceId] = segments;
- if (arn !== "arn" || partition2 === "" || service === "" || resourceId[0] === "")
- return null;
- return {
- partition: partition2,
- service,
- region,
- accountId,
- resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId
- };
- }, "parseArn");
- var partitions_default = {
- partitions: [{
- id: "aws",
- outputs: {
- dnsSuffix: "amazonaws.com",
- dualStackDnsSuffix: "api.aws",
- implicitGlobalRegion: "us-east-1",
- name: "aws",
- supportsDualStack: true,
- supportsFIPS: true
- },
- regionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",
- regions: {
- "af-south-1": {
- description: "Africa (Cape Town)"
- },
- "ap-east-1": {
- description: "Asia Pacific (Hong Kong)"
- },
- "ap-northeast-1": {
- description: "Asia Pacific (Tokyo)"
- },
- "ap-northeast-2": {
- description: "Asia Pacific (Seoul)"
- },
- "ap-northeast-3": {
- description: "Asia Pacific (Osaka)"
- },
- "ap-south-1": {
- description: "Asia Pacific (Mumbai)"
- },
- "ap-south-2": {
- description: "Asia Pacific (Hyderabad)"
- },
- "ap-southeast-1": {
- description: "Asia Pacific (Singapore)"
- },
- "ap-southeast-2": {
- description: "Asia Pacific (Sydney)"
- },
- "ap-southeast-3": {
- description: "Asia Pacific (Jakarta)"
- },
- "ap-southeast-4": {
- description: "Asia Pacific (Melbourne)"
- },
- "aws-global": {
- description: "AWS Standard global region"
- },
- "ca-central-1": {
- description: "Canada (Central)"
- },
- "ca-west-1": {
- description: "Canada West (Calgary)"
- },
- "eu-central-1": {
- description: "Europe (Frankfurt)"
- },
- "eu-central-2": {
- description: "Europe (Zurich)"
- },
- "eu-north-1": {
- description: "Europe (Stockholm)"
- },
- "eu-south-1": {
- description: "Europe (Milan)"
- },
- "eu-south-2": {
- description: "Europe (Spain)"
- },
- "eu-west-1": {
- description: "Europe (Ireland)"
- },
- "eu-west-2": {
- description: "Europe (London)"
- },
- "eu-west-3": {
- description: "Europe (Paris)"
- },
- "il-central-1": {
- description: "Israel (Tel Aviv)"
- },
- "me-central-1": {
- description: "Middle East (UAE)"
- },
- "me-south-1": {
- description: "Middle East (Bahrain)"
- },
- "sa-east-1": {
- description: "South America (Sao Paulo)"
- },
- "us-east-1": {
- description: "US East (N. Virginia)"
- },
- "us-east-2": {
- description: "US East (Ohio)"
- },
- "us-west-1": {
- description: "US West (N. California)"
- },
- "us-west-2": {
- description: "US West (Oregon)"
+ function W(t2, e2, n2, i2) {
+ const s2 = t2.indexOf(e2, n2);
+ if (s2 === -1)
+ throw new Error(i2);
+ return s2 + e2.length - 1;
+ }
+ function z(t2, e2, n2, i2 = ">") {
+ const s2 = function(t3, e3, n3 = ">") {
+ let i3, s3 = "";
+ for (let r3 = e3;r3 < t3.length; r3++) {
+ let e4 = t3[r3];
+ if (i3)
+ e4 === i3 && (i3 = "");
+ else if (e4 === '"' || e4 === "'")
+ i3 = e4;
+ else if (e4 === n3[0]) {
+ if (!n3[1])
+ return { data: s3, index: r3 };
+ if (t3[r3 + 1] === n3[1])
+ return { data: s3, index: r3 };
+ } else
+ e4 === "\t" && (e4 = " ");
+ s3 += e4;
+ }
+ }(t2, e2 + 1, i2);
+ if (!s2)
+ return;
+ let r2 = s2.data;
+ const o2 = s2.index, a2 = r2.search(/\s/);
+ let l2 = r2, u2 = true;
+ a2 !== -1 && (l2 = r2.substring(0, a2), r2 = r2.substring(a2 + 1).trimStart());
+ const h2 = l2;
+ if (n2) {
+ const t3 = l2.indexOf(":");
+ t3 !== -1 && (l2 = l2.substr(t3 + 1), u2 = l2 !== s2.data.substr(t3 + 1));
+ }
+ return { tagName: l2, tagExp: r2, closeIndex: o2, attrExpPresent: u2, rawTagName: h2 };
+ }
+ function J(t2, e2, n2) {
+ const i2 = n2;
+ let s2 = 1;
+ for (;n2 < t2.length; n2++)
+ if (t2[n2] === "<")
+ if (t2[n2 + 1] === "/") {
+ const r2 = W(t2, ">", n2, `${e2} is not closed`);
+ if (t2.substring(n2 + 2, r2).trim() === e2 && (s2--, s2 === 0))
+ return { tagContent: t2.substring(i2, n2), i: r2 };
+ n2 = r2;
+ } else if (t2[n2 + 1] === "?")
+ n2 = W(t2, "?>", n2 + 1, "StopNode is not closed.");
+ else if (t2.substr(n2 + 1, 3) === "!--")
+ n2 = W(t2, "-->", n2 + 3, "StopNode is not closed.");
+ else if (t2.substr(n2 + 1, 2) === "![")
+ n2 = W(t2, "]]>", n2, "StopNode is not closed.") - 2;
+ else {
+ const i3 = z(t2, n2, ">");
+ i3 && ((i3 && i3.tagName) === e2 && i3.tagExp[i3.tagExp.length - 1] !== "/" && s2++, n2 = i3.closeIndex);
+ }
+ }
+ function H(t2, e2, n2) {
+ if (e2 && typeof t2 == "string") {
+ const e3 = t2.trim();
+ return e3 === "true" || e3 !== "false" && function(t3, e4 = {}) {
+ if (e4 = Object.assign({}, V, e4), !t3 || typeof t3 != "string")
+ return t3;
+ let n3 = t3.trim();
+ if (e4.skipLike !== undefined && e4.skipLike.test(n3))
+ return t3;
+ if (t3 === "0")
+ return 0;
+ if (e4.hex && j.test(n3))
+ return function(t4) {
+ if (parseInt)
+ return parseInt(t4, 16);
+ if (Number.parseInt)
+ return Number.parseInt(t4, 16);
+ if (window && window.parseInt)
+ return window.parseInt(t4, 16);
+ throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
+ }(n3);
+ if (n3.search(/.+[eE].+/) !== -1)
+ return function(t4, e5, n4) {
+ if (!n4.eNotation)
+ return t4;
+ const i3 = e5.match(M);
+ if (i3) {
+ let s2 = i3[1] || "";
+ const r2 = i3[3].indexOf("e") === -1 ? "E" : "e", o2 = i3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
+ return o2.length > 1 && a2 ? t4 : o2.length !== 1 || !i3[3].startsWith(`.${r2}`) && i3[3][0] !== r2 ? n4.leadingZeros && !a2 ? (e5 = (i3[1] || "") + i3[3], Number(e5)) : t4 : Number(e5);
+ }
+ return t4;
+ }(t3, n3, e4);
+ {
+ const s2 = D.exec(n3);
+ if (s2) {
+ const r2 = s2[1] || "", o2 = s2[2];
+ let a2 = (i2 = s2[3]) && i2.indexOf(".") !== -1 ? ((i2 = i2.replace(/0+$/, "")) === "." ? i2 = "0" : i2[0] === "." ? i2 = "0" + i2 : i2[i2.length - 1] === "." && (i2 = i2.substring(0, i2.length - 1)), i2) : i2;
+ const l2 = r2 ? t3[o2.length + 1] === "." : t3[o2.length] === ".";
+ if (!e4.leadingZeros && (o2.length > 1 || o2.length === 1 && !l2))
+ return t3;
+ {
+ const i3 = Number(n3), s3 = String(i3);
+ if (i3 === 0 || i3 === -0)
+ return i3;
+ if (s3.search(/[eE]/) !== -1)
+ return e4.eNotation ? i3 : t3;
+ if (n3.indexOf(".") !== -1)
+ return s3 === "0" || s3 === a2 || s3 === `${r2}${a2}` ? i3 : t3;
+ let l3 = o2 ? a2 : n3;
+ return o2 ? l3 === s3 || r2 + l3 === s3 ? i3 : t3 : l3 === s3 || l3 === r2 + s3 ? i3 : t3;
+ }
+ }
+ return t3;
+ }
+ var i2;
+ }(t2, n2);
+ }
+ return t2 !== undefined ? t2 : "";
+ }
+ const K = T.getMetaDataSymbol();
+ function Q(t2, e2) {
+ return tt(t2, e2);
+ }
+ function tt(t2, e2, n2) {
+ let i2;
+ const s2 = {};
+ for (let r2 = 0;r2 < t2.length; r2++) {
+ const o2 = t2[r2], a2 = et(o2);
+ let l2 = "";
+ if (l2 = n2 === undefined ? a2 : n2 + "." + a2, a2 === e2.textNodeName)
+ i2 === undefined ? i2 = o2[a2] : i2 += "" + o2[a2];
+ else {
+ if (a2 === undefined)
+ continue;
+ if (o2[a2]) {
+ let t3 = tt(o2[a2], e2, l2);
+ const n3 = it(t3, e2);
+ o2[K] !== undefined && (t3[K] = o2[K]), o2[":@"] ? nt(t3, o2[":@"], l2, e2) : Object.keys(t3).length !== 1 || t3[e2.textNodeName] === undefined || e2.alwaysCreateTextNode ? Object.keys(t3).length === 0 && (e2.alwaysCreateTextNode ? t3[e2.textNodeName] = "" : t3 = "") : t3 = t3[e2.textNodeName], s2[a2] !== undefined && s2.hasOwnProperty(a2) ? (Array.isArray(s2[a2]) || (s2[a2] = [s2[a2]]), s2[a2].push(t3)) : e2.isArray(a2, l2, n3) ? s2[a2] = [t3] : s2[a2] = t3;
+ }
}
}
- }, {
- id: "aws-cn",
- outputs: {
- dnsSuffix: "amazonaws.com.cn",
- dualStackDnsSuffix: "api.amazonwebservices.com.cn",
- implicitGlobalRegion: "cn-northwest-1",
- name: "aws-cn",
- supportsDualStack: true,
- supportsFIPS: true
- },
- regionRegex: "^cn\\-\\w+\\-\\d+$",
- regions: {
- "aws-cn-global": {
- description: "AWS China global region"
- },
- "cn-north-1": {
- description: "China (Beijing)"
- },
- "cn-northwest-1": {
- description: "China (Ningxia)"
- }
+ return typeof i2 == "string" ? i2.length > 0 && (s2[e2.textNodeName] = i2) : i2 !== undefined && (s2[e2.textNodeName] = i2), s2;
+ }
+ function et(t2) {
+ const e2 = Object.keys(t2);
+ for (let t3 = 0;t3 < e2.length; t3++) {
+ const n2 = e2[t3];
+ if (n2 !== ":@")
+ return n2;
}
- }, {
- id: "aws-us-gov",
- outputs: {
- dnsSuffix: "amazonaws.com",
- dualStackDnsSuffix: "api.aws",
- implicitGlobalRegion: "us-gov-west-1",
- name: "aws-us-gov",
- supportsDualStack: true,
- supportsFIPS: true
- },
- regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
- regions: {
- "aws-us-gov-global": {
- description: "AWS GovCloud (US) global region"
- },
- "us-gov-east-1": {
- description: "AWS GovCloud (US-East)"
- },
- "us-gov-west-1": {
- description: "AWS GovCloud (US-West)"
+ }
+ function nt(t2, e2, n2, i2) {
+ if (e2) {
+ const s2 = Object.keys(e2), r2 = s2.length;
+ for (let o2 = 0;o2 < r2; o2++) {
+ const r3 = s2[o2];
+ i2.isArray(r3, n2 + "." + r3, true, true) ? t2[r3] = [e2[r3]] : t2[r3] = e2[r3];
}
}
- }, {
- id: "aws-iso",
- outputs: {
- dnsSuffix: "c2s.ic.gov",
- dualStackDnsSuffix: "c2s.ic.gov",
- implicitGlobalRegion: "us-iso-east-1",
- name: "aws-iso",
- supportsDualStack: false,
- supportsFIPS: true
- },
- regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
- regions: {
- "aws-iso-global": {
- description: "AWS ISO (US) global region"
- },
- "us-iso-east-1": {
- description: "US ISO East"
- },
- "us-iso-west-1": {
- description: "US ISO WEST"
- }
+ }
+ function it(t2, e2) {
+ const { textNodeName: n2 } = e2, i2 = Object.keys(t2).length;
+ return i2 === 0 || !(i2 !== 1 || !t2[n2] && typeof t2[n2] != "boolean" && t2[n2] !== 0);
+ }
+
+ class st {
+ constructor(t2) {
+ this.externalEntities = {}, this.options = function(t3) {
+ return Object.assign({}, v, t3);
+ }(t2);
}
- }, {
- id: "aws-iso-b",
- outputs: {
- dnsSuffix: "sc2s.sgov.gov",
- dualStackDnsSuffix: "sc2s.sgov.gov",
- implicitGlobalRegion: "us-isob-east-1",
- name: "aws-iso-b",
- supportsDualStack: false,
- supportsFIPS: true
- },
- regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
- regions: {
- "aws-iso-b-global": {
- description: "AWS ISOB (US) global region"
- },
- "us-isob-east-1": {
- description: "US ISOB East (Ohio)"
+ parse(t2, e2) {
+ if (typeof t2 == "string")
+ ;
+ else {
+ if (!t2.toString)
+ throw new Error("XML data is accepted in String or Bytes[] form.");
+ t2 = t2.toString();
+ }
+ if (e2) {
+ e2 === true && (e2 = {});
+ const n3 = a(t2, e2);
+ if (n3 !== true)
+ throw Error(`${n3.err.msg}:${n3.err.line}:${n3.err.col}`);
+ }
+ const n2 = new k(this.options);
+ n2.addExternalEntities(this.externalEntities);
+ const i2 = n2.parseXml(t2);
+ return this.options.preserveOrder || i2 === undefined ? i2 : Q(i2, this.options);
+ }
+ addEntity(t2, e2) {
+ if (e2.indexOf("&") !== -1)
+ throw new Error("Entity value can't have '&'");
+ if (t2.indexOf("&") !== -1 || t2.indexOf(";") !== -1)
+ throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
+ if (e2 === "&")
+ throw new Error("An entity with value '&' is not permitted");
+ this.externalEntities[t2] = e2;
+ }
+ static getMetaDataSymbol() {
+ return T.getMetaDataSymbol();
+ }
+ }
+ function rt(t2, e2) {
+ let n2 = "";
+ return e2.format && e2.indentBy.length > 0 && (n2 = "\n"), ot(t2, e2, "", n2);
+ }
+ function ot(t2, e2, n2, i2) {
+ let s2 = "", r2 = false;
+ for (let o2 = 0;o2 < t2.length; o2++) {
+ const a2 = t2[o2], l2 = at(a2);
+ if (l2 === undefined)
+ continue;
+ let u2 = "";
+ if (u2 = n2.length === 0 ? l2 : `${n2}.${l2}`, l2 === e2.textNodeName) {
+ let t3 = a2[l2];
+ ut(u2, e2) || (t3 = e2.tagValueProcessor(l2, t3), t3 = ht(t3, e2)), r2 && (s2 += i2), s2 += t3, r2 = false;
+ continue;
}
- }
- }, {
- id: "aws-iso-e",
- outputs: {
- dnsSuffix: "cloud.adc-e.uk",
- dualStackDnsSuffix: "cloud.adc-e.uk",
- implicitGlobalRegion: "eu-isoe-west-1",
- name: "aws-iso-e",
- supportsDualStack: false,
- supportsFIPS: true
- },
- regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
- regions: {}
- }, {
- id: "aws-iso-f",
- outputs: {
- dnsSuffix: "csp.hci.ic.gov",
- dualStackDnsSuffix: "csp.hci.ic.gov",
- implicitGlobalRegion: "us-isof-south-1",
- name: "aws-iso-f",
- supportsDualStack: false,
- supportsFIPS: true
- },
- regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
- regions: {}
- }],
- version: "1.1"
- };
- var selectedPartitionsInfo = partitions_default;
- var selectedUserAgentPrefix = "";
- var partition = __name((value) => {
- const { partitions } = selectedPartitionsInfo;
- for (const partition2 of partitions) {
- const { regions, outputs } = partition2;
- for (const [region, regionData] of Object.entries(regions)) {
- if (region === value) {
- return {
- ...outputs,
- ...regionData
- };
+ if (l2 === e2.cdataPropName) {
+ r2 && (s2 += i2), s2 += ``, r2 = false;
+ continue;
+ }
+ if (l2 === e2.commentPropName) {
+ s2 += i2 + ``, r2 = true;
+ continue;
+ }
+ if (l2[0] === "?") {
+ const t3 = lt(a2[":@"], e2), n3 = l2 === "?xml" ? "" : i2;
+ let o3 = a2[l2][0][e2.textNodeName];
+ o3 = o3.length !== 0 ? " " + o3 : "", s2 += n3 + `<${l2}${o3}${t3}?>`, r2 = true;
+ continue;
}
+ let h2 = i2;
+ h2 !== "" && (h2 += e2.indentBy);
+ const d2 = i2 + `<${l2}${lt(a2[":@"], e2)}`, f2 = ot(a2[l2], e2, u2, h2);
+ e2.unpairedTags.indexOf(l2) !== -1 ? e2.suppressUnpairedNode ? s2 += d2 + ">" : s2 += d2 + "/>" : f2 && f2.length !== 0 || !e2.suppressEmptyNode ? f2 && f2.endsWith(">") ? s2 += d2 + `>${f2}${i2}${l2}>` : (s2 += d2 + ">", f2 && i2 !== "" && (f2.includes("/>") || f2.includes("")) ? s2 += i2 + e2.indentBy + f2 + i2 : s2 += f2, s2 += `${l2}>`) : s2 += d2 + "/>", r2 = true;
}
+ return s2;
}
- for (const partition2 of partitions) {
- const { regionRegex, outputs } = partition2;
- if (new RegExp(regionRegex).test(value)) {
- return {
- ...outputs
- };
+ function at(t2) {
+ const e2 = Object.keys(t2);
+ for (let n2 = 0;n2 < e2.length; n2++) {
+ const i2 = e2[n2];
+ if (t2.hasOwnProperty(i2) && i2 !== ":@")
+ return i2;
}
}
- const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
- if (!DEFAULT_PARTITION) {
- throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
+ function lt(t2, e2) {
+ let n2 = "";
+ if (t2 && !e2.ignoreAttributes)
+ for (let i2 in t2) {
+ if (!t2.hasOwnProperty(i2))
+ continue;
+ let s2 = e2.attributeValueProcessor(i2, t2[i2]);
+ s2 = ht(s2, e2), s2 === true && e2.suppressBooleanAttributes ? n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}` : n2 += ` ${i2.substr(e2.attributeNamePrefix.length)}="${s2}"`;
+ }
+ return n2;
}
- return {
- ...DEFAULT_PARTITION.outputs
+ function ut(t2, e2) {
+ let n2 = (t2 = t2.substr(0, t2.length - e2.textNodeName.length - 1)).substr(t2.lastIndexOf(".") + 1);
+ for (let i2 in e2.stopNodes)
+ if (e2.stopNodes[i2] === t2 || e2.stopNodes[i2] === "*." + n2)
+ return true;
+ return false;
+ }
+ function ht(t2, e2) {
+ if (t2 && t2.length > 0 && e2.processEntities)
+ for (let n2 = 0;n2 < e2.entities.length; n2++) {
+ const i2 = e2.entities[n2];
+ t2 = t2.replace(i2.regex, i2.val);
+ }
+ return t2;
+ }
+ const dt = { attributeNamePrefix: "@_", attributesGroupName: false, textNodeName: "#text", ignoreAttributes: true, cdataPropName: false, format: false, indentBy: " ", suppressEmptyNode: false, suppressUnpairedNode: true, suppressBooleanAttributes: true, tagValueProcessor: function(t2, e2) {
+ return e2;
+ }, attributeValueProcessor: function(t2, e2) {
+ return e2;
+ }, preserveOrder: false, commentPropName: false, unpairedTags: [], entities: [{ regex: new RegExp("&", "g"), val: "&" }, { regex: new RegExp(">", "g"), val: ">" }, { regex: new RegExp("<", "g"), val: "<" }, { regex: new RegExp("'", "g"), val: "'" }, { regex: new RegExp('"', "g"), val: """ }], processEntities: true, stopNodes: [], oneListGroup: false };
+ function ft(t2) {
+ this.options = Object.assign({}, dt, t2), this.options.ignoreAttributes === true || this.options.attributesGroupName ? this.isAttribute = function() {
+ return false;
+ } : (this.ignoreAttributesFn = _(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = gt), this.processTextOrObjNode = ct, this.options.format ? (this.indentate = pt, this.tagEndChar = ">\n", this.newLine = "\n") : (this.indentate = function() {
+ return "";
+ }, this.tagEndChar = ">", this.newLine = "");
+ }
+ function ct(t2, e2, n2, i2) {
+ const s2 = this.j2x(t2, n2 + 1, i2.concat(e2));
+ return t2[this.options.textNodeName] !== undefined && Object.keys(t2).length === 1 ? this.buildTextValNode(t2[this.options.textNodeName], e2, s2.attrStr, n2) : this.buildObjectNode(s2.val, e2, s2.attrStr, n2);
+ }
+ function pt(t2) {
+ return this.options.indentBy.repeat(t2);
+ }
+ function gt(t2) {
+ return !(!t2.startsWith(this.options.attributeNamePrefix) || t2 === this.options.textNodeName) && t2.substr(this.attrPrefixLen);
+ }
+ ft.prototype.build = function(t2) {
+ return this.options.preserveOrder ? rt(t2, this.options) : (Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 }), this.j2x(t2, 0, []).val);
+ }, ft.prototype.j2x = function(t2, e2, n2) {
+ let i2 = "", s2 = "";
+ const r2 = n2.join(".");
+ for (let o2 in t2)
+ if (Object.prototype.hasOwnProperty.call(t2, o2))
+ if (t2[o2] === undefined)
+ this.isAttribute(o2) && (s2 += "");
+ else if (t2[o2] === null)
+ this.isAttribute(o2) || o2 === this.options.cdataPropName ? s2 += "" : o2[0] === "?" ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar;
+ else if (t2[o2] instanceof Date)
+ s2 += this.buildTextValNode(t2[o2], o2, "", e2);
+ else if (typeof t2[o2] != "object") {
+ const n3 = this.isAttribute(o2);
+ if (n3 && !this.ignoreAttributesFn(n3, r2))
+ i2 += this.buildAttrPairStr(n3, "" + t2[o2]);
+ else if (!n3)
+ if (o2 === this.options.textNodeName) {
+ let e3 = this.options.tagValueProcessor(o2, "" + t2[o2]);
+ s2 += this.replaceEntitiesValue(e3);
+ } else
+ s2 += this.buildTextValNode(t2[o2], o2, "", e2);
+ } else if (Array.isArray(t2[o2])) {
+ const i3 = t2[o2].length;
+ let r3 = "", a2 = "";
+ for (let l2 = 0;l2 < i3; l2++) {
+ const i4 = t2[o2][l2];
+ if (i4 === undefined)
+ ;
+ else if (i4 === null)
+ o2[0] === "?" ? s2 += this.indentate(e2) + "<" + o2 + "?" + this.tagEndChar : s2 += this.indentate(e2) + "<" + o2 + "/" + this.tagEndChar;
+ else if (typeof i4 == "object")
+ if (this.options.oneListGroup) {
+ const t3 = this.j2x(i4, e2 + 1, n2.concat(o2));
+ r3 += t3.val, this.options.attributesGroupName && i4.hasOwnProperty(this.options.attributesGroupName) && (a2 += t3.attrStr);
+ } else
+ r3 += this.processTextOrObjNode(i4, o2, e2, n2);
+ else if (this.options.oneListGroup) {
+ let t3 = this.options.tagValueProcessor(o2, i4);
+ t3 = this.replaceEntitiesValue(t3), r3 += t3;
+ } else
+ r3 += this.buildTextValNode(i4, o2, "", e2);
+ }
+ this.options.oneListGroup && (r3 = this.buildObjectNode(r3, o2, a2, e2)), s2 += r3;
+ } else if (this.options.attributesGroupName && o2 === this.options.attributesGroupName) {
+ const e3 = Object.keys(t2[o2]), n3 = e3.length;
+ for (let s3 = 0;s3 < n3; s3++)
+ i2 += this.buildAttrPairStr(e3[s3], "" + t2[o2][e3[s3]]);
+ } else
+ s2 += this.processTextOrObjNode(t2[o2], o2, e2, n2);
+ return { attrStr: i2, val: s2 };
+ }, ft.prototype.buildAttrPairStr = function(t2, e2) {
+ return e2 = this.options.attributeValueProcessor(t2, "" + e2), e2 = this.replaceEntitiesValue(e2), this.options.suppressBooleanAttributes && e2 === "true" ? " " + t2 : " " + t2 + '="' + e2 + '"';
+ }, ft.prototype.buildObjectNode = function(t2, e2, n2, i2) {
+ if (t2 === "")
+ return e2[0] === "?" ? this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar;
+ {
+ let s2 = "" + e2 + this.tagEndChar, r2 = "";
+ return e2[0] === "?" && (r2 = "?", s2 = ""), !n2 && n2 !== "" || t2.indexOf("<") !== -1 ? this.options.commentPropName !== false && e2 === this.options.commentPropName && r2.length === 0 ? this.indentate(i2) + `` + this.newLine : this.indentate(i2) + "<" + e2 + n2 + r2 + this.tagEndChar + t2 + this.indentate(i2) + s2 : this.indentate(i2) + "<" + e2 + n2 + r2 + ">" + t2 + s2;
+ }
+ }, ft.prototype.closeTag = function(t2) {
+ let e2 = "";
+ return this.options.unpairedTags.indexOf(t2) !== -1 ? this.options.suppressUnpairedNode || (e2 = "/") : e2 = this.options.suppressEmptyNode ? "/" : `>${t2}`, e2;
+ }, ft.prototype.buildTextValNode = function(t2, e2, n2, i2) {
+ if (this.options.cdataPropName !== false && e2 === this.options.cdataPropName)
+ return this.indentate(i2) + `` + this.newLine;
+ if (this.options.commentPropName !== false && e2 === this.options.commentPropName)
+ return this.indentate(i2) + `` + this.newLine;
+ if (e2[0] === "?")
+ return this.indentate(i2) + "<" + e2 + n2 + "?" + this.tagEndChar;
+ {
+ let s2 = this.options.tagValueProcessor(e2, t2);
+ return s2 = this.replaceEntitiesValue(s2), s2 === "" ? this.indentate(i2) + "<" + e2 + n2 + this.closeTag(e2) + this.tagEndChar : this.indentate(i2) + "<" + e2 + n2 + ">" + s2 + "" + e2 + this.tagEndChar;
+ }
+ }, ft.prototype.replaceEntitiesValue = function(t2) {
+ if (t2 && t2.length > 0 && this.options.processEntities)
+ for (let e2 = 0;e2 < this.options.entities.length; e2++) {
+ const n2 = this.options.entities[e2];
+ t2 = t2.replace(n2.regex, n2.val);
+ }
+ return t2;
};
- }, "partition");
- var setPartitionInfo = __name((partitionsInfo, userAgentPrefix = "") => {
- selectedPartitionsInfo = partitionsInfo;
- selectedUserAgentPrefix = userAgentPrefix;
- }, "setPartitionInfo");
- var useDefaultPartitionInfo = __name(() => {
- setPartitionInfo(partitions_default, "");
- }, "useDefaultPartitionInfo");
- var getUserAgentPrefix = __name(() => selectedUserAgentPrefix, "getUserAgentPrefix");
- var awsEndpointFunctions = {
- isVirtualHostableS3Bucket,
- parseArn,
- partition
+ const mt = { validate: a };
+ module.exports = e;
+ })();
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_xml_parser = __commonJS((exports) => {
+ var parseXML2 = function(xmlString) {
+ return parser.parse(xmlString, true);
};
- import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.parseXML = parseXML2;
+ var fast_xml_parser_1 = require_fxp();
+ var parser = new fast_xml_parser_1.XMLParser({
+ attributeNamePrefix: "",
+ htmlEntities: true,
+ ignoreAttributes: false,
+ ignoreDeclaration: true,
+ parseTagValue: false,
+ trimValues: false,
+ tagValueProcessor: (_, val) => val.trim() === "" && val.includes("\n") ? "" : undefined
+ });
+ parser.addEntity("#xD", "\r");
+ parser.addEntity("#10", "\n");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_dist_cjs29 = __commonJS((exports, module) => {
- var resolveUserAgentConfig = function(input) {
- return {
- ...input,
- customUserAgent: typeof input.customUserAgent === "string" ? [[input.customUserAgent]] : input.customUserAgent
- };
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submo
+var require_dist_cjs23 = __commonJS((exports, module) => {
+ var escapeAttribute = function(value) {
+ return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """);
+ };
+ var escapeElement = function(value) {
+ return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, "
").replace(/\n/g, "
").replace(/\u0085/g, "
").replace(/\u2028/, "
");
};
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -10394,323 +13433,133 @@ var require_dist_cjs29 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,
- getUserAgentPlugin: () => getUserAgentPlugin,
- resolveUserAgentConfig: () => resolveUserAgentConfig,
- userAgentMiddleware: () => userAgentMiddleware
+ var index_exports = {};
+ __export2(index_exports, {
+ XmlNode: () => XmlNode,
+ XmlText: () => XmlText,
+ parseXML: () => import_xml_parser.parseXML
});
- module.exports = __toCommonJS(src_exports);
- __name(resolveUserAgentConfig, "resolveUserAgentConfig");
- var import_util_endpoints = require_dist_cjs28();
- var import_protocol_http = require_dist_cjs2();
- var USER_AGENT = "user-agent";
- var X_AMZ_USER_AGENT = "x-amz-user-agent";
- var SPACE = " ";
- var UA_NAME_SEPARATOR = "/";
- var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
- var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
- var UA_ESCAPE_CHAR = "-";
- var userAgentMiddleware = __name((options) => (next, context) => async (args) => {
- var _a, _b;
- const { request } = args;
- if (!import_protocol_http.HttpRequest.isInstance(request))
- return next(args);
- const { headers } = request;
- const userAgent = ((_a = context == null ? undefined : context.userAgent) == null ? undefined : _a.map(escapeUserAgent)) || [];
- const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
- const customUserAgent = ((_b = options == null ? undefined : options.customUserAgent) == null ? undefined : _b.map(escapeUserAgent)) || [];
- const prefix = (0, import_util_endpoints.getUserAgentPrefix)();
- const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
- const normalUAValue = [
- ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
- ...customUserAgent
- ].join(SPACE);
- if (options.runtime !== "browser") {
- if (normalUAValue) {
- headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
- }
- headers[USER_AGENT] = sdkUserAgentValue;
- } else {
- headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
+ module.exports = __toCommonJS(index_exports);
+ __name(escapeAttribute, "escapeAttribute");
+ __name(escapeElement, "escapeElement");
+ var XmlText = class {
+ constructor(value) {
+ this.value = value;
}
- return next({
- ...args,
- request
- });
- }, "userAgentMiddleware");
- var escapeUserAgent = __name((userAgentPair) => {
- var _a;
- const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
- const version = (_a = userAgentPair[1]) == null ? undefined : _a.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
- const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
- const prefix = name.substring(0, prefixSeparatorIndex);
- let uaName = name.substring(prefixSeparatorIndex + 1);
- if (prefix === "api") {
- uaName = uaName.toLowerCase();
+ static {
+ __name(this, "XmlText");
}
- return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
- switch (index) {
- case 0:
- return item;
- case 1:
- return `${acc}/${item}`;
- default:
- return `${acc}#${item}`;
- }
- }, "");
- }, "escapeUserAgent");
- var getUserAgentMiddlewareOptions = {
- name: "getUserAgentMiddleware",
- step: "build",
- priority: "low",
- tags: ["SET_USER_AGENT", "USER_AGENT"],
- override: true
- };
- var getUserAgentPlugin = __name((config) => ({
- applyToStack: (clientStack) => {
- clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
+ toString() {
+ return escapeElement("" + this.value);
}
- }), "getUserAgentPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_dist_cjs30 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var XmlNode = class _XmlNode {
+ constructor(name, children = []) {
+ this.name = name;
+ this.children = children;
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,
- CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,
- DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,
- DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,
- ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,
- ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,
- NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,
- NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,
- NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,
- NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,
- REGION_ENV_NAME: () => REGION_ENV_NAME,
- REGION_INI_NAME: () => REGION_INI_NAME,
- getRegionInfo: () => getRegionInfo,
- resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,
- resolveEndpointsConfig: () => resolveEndpointsConfig,
- resolveRegionConfig: () => resolveRegionConfig
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_config_provider = require_dist_cjs22();
- var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
- var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
- var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
- var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),
- configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),
- default: false
- };
- var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
- var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
- var DEFAULT_USE_FIPS_ENDPOINT = false;
- var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),
- configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),
- default: false
- };
- var import_util_middleware = require_dist_cjs20();
- var resolveCustomEndpointsConfig = __name((input) => {
- const { endpoint, urlParser } = input;
- return {
- ...input,
- tls: input.tls ?? true,
- endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
- isCustomEndpoint: true,
- useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false)
- };
- }, "resolveCustomEndpointsConfig");
- var getEndpointFromRegion = __name(async (input) => {
- const { tls = true } = input;
- const region = await input.region();
- const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
- if (!dnsHostRegex.test(region)) {
- throw new Error("Invalid region in client config");
+ static {
+ __name(this, "XmlNode");
}
- const useDualstackEndpoint = await input.useDualstackEndpoint();
- const useFipsEndpoint = await input.useFipsEndpoint();
- const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
- if (!hostname) {
- throw new Error("Cannot resolve hostname from client config");
+ attributes = {};
+ static of(name, childText, withName) {
+ const node = new _XmlNode(name);
+ if (childText !== undefined) {
+ node.addChildNode(new XmlText(childText));
+ }
+ if (withName !== undefined) {
+ node.withName(withName);
+ }
+ return node;
}
- return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
- }, "getEndpointFromRegion");
- var resolveEndpointsConfig = __name((input) => {
- const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false);
- const { endpoint, useFipsEndpoint, urlParser } = input;
- return {
- ...input,
- tls: input.tls ?? true,
- endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
- isCustomEndpoint: !!endpoint,
- useDualstackEndpoint
- };
- }, "resolveEndpointsConfig");
- var REGION_ENV_NAME = "AWS_REGION";
- var REGION_INI_NAME = "region";
- var NODE_REGION_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
- configFileSelector: (profile) => profile[REGION_INI_NAME],
- default: () => {
- throw new Error("Region is missing");
+ withName(name) {
+ this.name = name;
+ return this;
}
- };
- var NODE_REGION_CONFIG_FILE_OPTIONS = {
- preferredFile: "credentials"
- };
- var isFipsRegion = __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion");
- var getRealRegion = __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion");
- var resolveRegionConfig = __name((input) => {
- const { region, useFipsEndpoint } = input;
- if (!region) {
- throw new Error("Region is missing");
+ addAttribute(name, value) {
+ this.attributes[name] = value;
+ return this;
}
- return {
- ...input,
- region: async () => {
- if (typeof region === "string") {
- return getRealRegion(region);
- }
- const providedRegion = await region();
- return getRealRegion(providedRegion);
- },
- useFipsEndpoint: async () => {
- const providedRegion = typeof region === "string" ? region : await region();
- if (isFipsRegion(providedRegion)) {
- return true;
- }
- return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
+ addChildNode(child) {
+ this.children.push(child);
+ return this;
+ }
+ removeAttribute(name) {
+ delete this.attributes[name];
+ return this;
+ }
+ n(name) {
+ this.name = name;
+ return this;
+ }
+ c(child) {
+ this.children.push(child);
+ return this;
+ }
+ a(name, value) {
+ if (value != null) {
+ this.attributes[name] = value;
}
- };
- }, "resolveRegionConfig");
- var getHostnameFromVariants = __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => {
- var _a;
- return (_a = variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))) == null ? undefined : _a.hostname;
- }, "getHostnameFromVariants");
- var getResolvedHostname = __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : undefined, "getResolvedHostname");
- var getResolvedPartition = __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition");
- var getResolvedSigningRegion = __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
- if (signingRegion) {
- return signingRegion;
- } else if (useFipsEndpoint) {
- const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
- const regionRegexmatchArray = hostname.match(regionRegexJs);
- if (regionRegexmatchArray) {
- return regionRegexmatchArray[0].slice(1, -1);
+ return this;
+ }
+ cc(input, field, withName = field) {
+ if (input[field] != null) {
+ const node = _XmlNode.of(field, input[field]).withName(withName);
+ this.c(node);
}
}
- }, "getResolvedSigningRegion");
- var getRegionInfo = __name((region, {
- useFipsEndpoint = false,
- useDualstackEndpoint = false,
- signingService,
- regionHash,
- partitionHash
- }) => {
- var _a, _b, _c, _d, _e;
- const partition = getResolvedPartition(region, { partitionHash });
- const resolvedRegion = region in regionHash ? region : ((_a = partitionHash[partition]) == null ? undefined : _a.endpoint) ?? region;
- const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
- const regionHostname = getHostnameFromVariants((_b = regionHash[resolvedRegion]) == null ? undefined : _b.variants, hostnameOptions);
- const partitionHostname = getHostnameFromVariants((_c = partitionHash[partition]) == null ? undefined : _c.variants, hostnameOptions);
- const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
- if (hostname === undefined) {
- throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
+ l(input, listName, memberName, valueProvider) {
+ if (input[listName] != null) {
+ const nodes = valueProvider();
+ nodes.map((node) => {
+ node.withName(memberName);
+ this.c(node);
+ });
+ }
}
- const signingRegion = getResolvedSigningRegion(hostname, {
- signingRegion: (_d = regionHash[resolvedRegion]) == null ? undefined : _d.signingRegion,
- regionRegex: partitionHash[partition].regionRegex,
- useFipsEndpoint
- });
- return {
- partition,
- signingService,
- hostname,
- ...signingRegion && { signingRegion },
- ...((_e = regionHash[resolvedRegion]) == null ? undefined : _e.signingService) && {
- signingService: regionHash[resolvedRegion].signingService
+ lc(input, listName, memberName, valueProvider) {
+ if (input[listName] != null) {
+ const nodes = valueProvider();
+ const containerNode = new _XmlNode(memberName);
+ nodes.map((node) => {
+ containerNode.c(node);
+ });
+ this.c(containerNode);
}
- };
- }, "getRegionInfo");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsno
-var require_dist_cjs31 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return to;
+ toString() {
+ const hasChildren = Boolean(this.children.length);
+ let xmlText = `<${this.name}`;
+ const attributes = this.attributes;
+ for (const attributeName of Object.keys(attributes)) {
+ const attribute = attributes[attributeName];
+ if (attribute != null) {
+ xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
+ }
+ }
+ return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}${this.name}>`;
+ }
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- resolveEventStreamSerdeConfig: () => resolveEventStreamSerdeConfig
- });
- module.exports = __toCommonJS(src_exports);
- var resolveEventStreamSerdeConfig = __name((input) => ({
- ...input,
- eventStreamMarshaller: input.eventStreamSerdeProvider(input)
- }), "resolveEventStreamSerdeConfig");
+ var import_xml_parser = require_xml_parser();
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssol
-var require_dist_cjs32 = __commonJS((exports, module) => {
- var contentLengthMiddleware = function(bodyLengthChecker) {
- return (next) => async (args) => {
- const request = args.request;
- if (import_protocol_http.HttpRequest.isInstance(request)) {
- const { body, headers } = request;
- if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
- try {
- const length = bodyLengthChecker(body);
- request.headers = {
- ...request.headers,
- [CONTENT_LENGTH_HEADER]: String(length)
- };
- } catch (error) {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc
+var require_protocols2 = __commonJS((exports, module) => {
+ var jsonReviver = function(key, value, context) {
+ if (context?.source) {
+ const numericString = context.source;
+ if (typeof value === "number") {
+ if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
+ const isFractional = numericString.includes(".");
+ if (isFractional) {
+ return new import_serde.NumericValue(numericString, "bigDecimal");
+ } else {
+ return BigInt(numericString);
}
}
}
- return next({
- ...args,
- request
- });
- };
+ }
+ return value;
};
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -10730,848 +13579,1645 @@ var require_dist_cjs32 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- contentLengthMiddleware: () => contentLengthMiddleware,
- contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,
- getContentLengthPlugin: () => getContentLengthPlugin
+ var index_exports = {};
+ __export2(index_exports, {
+ AwsEc2QueryProtocol: () => AwsEc2QueryProtocol,
+ AwsJson1_0Protocol: () => AwsJson1_0Protocol,
+ AwsJson1_1Protocol: () => AwsJson1_1Protocol,
+ AwsJsonRpcProtocol: () => AwsJsonRpcProtocol,
+ AwsQueryProtocol: () => AwsQueryProtocol,
+ AwsRestJsonProtocol: () => AwsRestJsonProtocol,
+ AwsRestXmlProtocol: () => AwsRestXmlProtocol,
+ AwsSmithyRpcV2CborProtocol: () => AwsSmithyRpcV2CborProtocol,
+ JsonCodec: () => JsonCodec,
+ JsonShapeDeserializer: () => JsonShapeDeserializer,
+ JsonShapeSerializer: () => JsonShapeSerializer,
+ XmlCodec: () => XmlCodec,
+ XmlShapeDeserializer: () => XmlShapeDeserializer,
+ XmlShapeSerializer: () => XmlShapeSerializer,
+ _toBool: () => _toBool,
+ _toNum: () => _toNum,
+ _toStr: () => _toStr,
+ awsExpectUnion: () => awsExpectUnion,
+ loadRestJsonErrorCode: () => loadRestJsonErrorCode,
+ loadRestXmlErrorCode: () => loadRestXmlErrorCode,
+ parseJsonBody: () => parseJsonBody,
+ parseJsonErrorBody: () => parseJsonErrorBody,
+ parseXmlBody: () => parseXmlBody,
+ parseXmlErrorBody: () => parseXmlErrorBody
});
- module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- var CONTENT_LENGTH_HEADER = "content-length";
- __name(contentLengthMiddleware, "contentLengthMiddleware");
- var contentLengthMiddlewareOptions = {
- step: "build",
- tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
- name: "contentLengthMiddleware",
- override: true
- };
- var getContentLengthPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
+ module.exports = __toCommonJS(index_exports);
+ var import_cbor = require_cbor();
+ var import_schema2 = require_schema();
+ var import_schema = require_schema();
+ var ProtocolLib = class {
+ static {
+ __name(this, "ProtocolLib");
+ }
+ resolveRestContentType(defaultContentType, inputSchema) {
+ const members = inputSchema.getMemberSchemas();
+ const httpPayloadMember = Object.values(members).find((m) => {
+ return !!m.getMergedTraits().httpPayload;
+ });
+ if (httpPayloadMember) {
+ const mediaType = httpPayloadMember.getMergedTraits().mediaType;
+ if (mediaType) {
+ return mediaType;
+ } else if (httpPayloadMember.isStringSchema()) {
+ return "text/plain";
+ } else if (httpPayloadMember.isBlobSchema()) {
+ return "application/octet-stream";
+ } else {
+ return defaultContentType;
+ }
+ } else if (!inputSchema.isUnitSchema()) {
+ const hasBody = Object.values(members).find((m) => {
+ const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
+ const noPrefixHeaders = httpPrefixHeaders === undefined;
+ return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders;
+ });
+ if (hasBody) {
+ return defaultContentType;
+ }
+ }
}
- }), "getContentLengthPlugin");
-});
-
-// node_modules/@aws-sdk/client-
-var require_rng = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var rng = function() {
- if (poolPtr > rnds8Pool.length - 16) {
- _crypto.default.randomFillSync(rnds8Pool);
- poolPtr = 0;
+ async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
+ let namespace = defaultNamespace;
+ let errorName = errorIdentifier;
+ if (errorIdentifier.includes("#")) {
+ [namespace, errorName] = errorIdentifier.split("#");
+ }
+ const errorMetadata = {
+ $metadata: metadata,
+ $response: response,
+ $fault: response.statusCode < 500 ? "client" : "server"
+ };
+ const registry = import_schema.TypeRegistry.for(namespace);
+ try {
+ const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier);
+ return { errorSchema, errorMetadata };
+ } catch (e) {
+ dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
+ const synthetic = import_schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
+ const baseExceptionSchema = synthetic.getBaseException();
+ if (baseExceptionSchema) {
+ const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
+ throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);
+ }
+ throw Object.assign(new Error(errorName), errorMetadata, dataObject);
+ }
+ }
+ setQueryCompatError(output, response) {
+ const queryErrorHeader = response.headers?.["x-amzn-query-error"];
+ if (output !== undefined && queryErrorHeader != null) {
+ const [Code, Type] = queryErrorHeader.split(";");
+ const entries = Object.entries(output);
+ const Error2 = {
+ Code,
+ Type
+ };
+ Object.assign(output, Error2);
+ for (const [k, v] of entries) {
+ Error2[k] = v;
+ }
+ delete Error2.__type;
+ output.Error = Error2;
+ }
}
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = rng;
- var _crypto = _interopRequireDefault(__require("crypto"));
- var rnds8Pool = new Uint8Array(256);
- var poolPtr = rnds8Pool.length;
-});
-
-// node_modules/@aws-sdk/client-ss
-var require_regex = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-sso/d
-var require_validate = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var validate = function(uuid) {
- return typeof uuid === "string" && _regex.default.test(uuid);
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _regex = _interopRequireDefault(require_regex());
- var _default = validate;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-sso/di
-var require_stringify = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var stringify = function(arr, offset = 0) {
- const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
- if (!(0, _validate.default)(uuid)) {
- throw TypeError("Stringified UUID is invalid");
+ queryCompatOutput(queryCompatErrorData, errorData) {
+ if (queryCompatErrorData.Error) {
+ errorData.Error = queryCompatErrorData.Error;
+ }
+ if (queryCompatErrorData.Type) {
+ errorData.Type = queryCompatErrorData.Type;
+ }
+ if (queryCompatErrorData.Code) {
+ errorData.Code = queryCompatErrorData.Code;
+ }
}
- return uuid;
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _validate = _interopRequireDefault(require_validate());
- var byteToHex = [];
- for (let i = 0;i < 256; ++i) {
- byteToHex.push((i + 256).toString(16).substr(1));
- }
- var _default = stringify;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client
-var require_v1 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var v1 = function(options, buf, offset) {
- let i = buf && offset || 0;
- const b = buf || new Array(16);
- options = options || {};
- let node = options.node || _nodeId;
- let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
- if (node == null || clockseq == null) {
- const seedBytes = options.random || (options.rng || _rng.default)();
- if (node == null) {
- node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
- }
- if (clockseq == null) {
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383;
- }
- }
- let msecs = options.msecs !== undefined ? options.msecs : Date.now();
- let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
- const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4;
- if (dt < 0 && options.clockseq === undefined) {
- clockseq = clockseq + 1 & 16383;
- }
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
- nsecs = 0;
- }
- if (nsecs >= 1e4) {
- throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
- }
- _lastMSecs = msecs;
- _lastNSecs = nsecs;
- _clockseq = clockseq;
- msecs += 12219292800000;
- const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296;
- b[i++] = tl >>> 24 & 255;
- b[i++] = tl >>> 16 & 255;
- b[i++] = tl >>> 8 & 255;
- b[i++] = tl & 255;
- const tmh = msecs / 4294967296 * 1e4 & 268435455;
- b[i++] = tmh >>> 8 & 255;
- b[i++] = tmh & 255;
- b[i++] = tmh >>> 24 & 15 | 16;
- b[i++] = tmh >>> 16 & 255;
- b[i++] = clockseq >>> 8 | 128;
- b[i++] = clockseq & 255;
- for (let n = 0;n < 6; ++n) {
- b[i + n] = node[n];
- }
- return buf || (0, _stringify.default)(b);
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _rng = _interopRequireDefault(require_rng());
- var _stringify = _interopRequireDefault(require_stringify());
- var _nodeId;
- var _clockseq;
- var _lastMSecs = 0;
- var _lastNSecs = 0;
- var _default = v1;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-ss
-var require_parse2 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var parse = function(uuid) {
- if (!(0, _validate.default)(uuid)) {
- throw TypeError("Invalid UUID");
- }
- let v;
- const arr = new Uint8Array(16);
- arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
- arr[1] = v >>> 16 & 255;
- arr[2] = v >>> 8 & 255;
- arr[3] = v & 255;
- arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
- arr[5] = v & 255;
- arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
- arr[7] = v & 255;
- arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
- arr[9] = v & 255;
- arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255;
- arr[11] = v / 4294967296 & 255;
- arr[12] = v >>> 24 & 255;
- arr[13] = v >>> 16 & 255;
- arr[14] = v >>> 8 & 255;
- arr[15] = v & 255;
- return arr;
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _validate = _interopRequireDefault(require_validate());
- var _default = parse;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-
-var require_v35 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
};
- var stringToBytes = function(str) {
- str = unescape(encodeURIComponent(str));
- const bytes = [];
- for (let i = 0;i < str.length; ++i) {
- bytes.push(str.charCodeAt(i));
+ var AwsSmithyRpcV2CborProtocol = class extends import_cbor.SmithyRpcV2CborProtocol {
+ static {
+ __name(this, "AwsSmithyRpcV2CborProtocol");
}
- return bytes;
- };
- var _default = function(name, version, hashfunc) {
- function generateUUID(value, namespace, buf, offset) {
- if (typeof value === "string") {
- value = stringToBytes(value);
+ awsQueryCompatible;
+ mixin = new ProtocolLib;
+ constructor({
+ defaultNamespace,
+ awsQueryCompatible
+ }) {
+ super({ defaultNamespace });
+ this.awsQueryCompatible = !!awsQueryCompatible;
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ if (this.awsQueryCompatible) {
+ request.headers["x-amzn-query-mode"] = "true";
}
- if (typeof namespace === "string") {
- namespace = (0, _parse.default)(namespace);
+ return request;
+ }
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ if (this.awsQueryCompatible) {
+ this.mixin.setQueryCompatError(dataObject, response);
}
- if (namespace.length !== 16) {
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
+ const errorName = (0, import_cbor.loadSmithyRpcV2CborErrorCode)(response, dataObject) ?? "Unknown";
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata);
+ const ns = import_schema2.NormalizedSchema.of(errorSchema);
+ const message = dataObject.message ?? dataObject.Message ?? "Unknown";
+ const ErrorCtor = import_schema2.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
+ const exception = new ErrorCtor(message);
+ const output = {};
+ for (const [name, member] of ns.structIterator()) {
+ output[name] = this.deserializer.readValue(member, dataObject[name]);
}
- let bytes = new Uint8Array(16 + value.length);
- bytes.set(namespace);
- bytes.set(value, namespace.length);
- bytes = hashfunc(bytes);
- bytes[6] = bytes[6] & 15 | version;
- bytes[8] = bytes[8] & 63 | 128;
- if (buf) {
- offset = offset || 0;
- for (let i = 0;i < 16; ++i) {
- buf[offset + i] = bytes[i];
- }
- return buf;
+ if (this.awsQueryCompatible) {
+ this.mixin.queryCompatOutput(dataObject, output);
}
- return (0, _stringify.default)(bytes);
- }
- try {
- generateUUID.name = name;
- } catch (err) {
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
}
- generateUUID.DNS = DNS;
- generateUUID.URL = URL2;
- return generateUUID;
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = _default;
- exports.URL = exports.DNS = undefined;
- var _stringify = _interopRequireDefault(require_stringify());
- var _parse = _interopRequireDefault(require_parse2());
- var DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
- exports.DNS = DNS;
- var URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
- exports.URL = URL2;
-});
-
-// node_modules/@aws-sdk/client-
-var require_md5 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var md5 = function(bytes) {
- if (Array.isArray(bytes)) {
- bytes = Buffer.from(bytes);
- } else if (typeof bytes === "string") {
- bytes = Buffer.from(bytes, "utf8");
- }
- return _crypto.default.createHash("md5").update(bytes).digest();
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _crypto = _interopRequireDefault(__require("crypto"));
- var _default = md5;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client
-var require_v3 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _v = _interopRequireDefault(require_v35());
- var _md = _interopRequireDefault(require_md5());
- var v3 = (0, _v.default)("v3", 48, _md.default);
- var _default = v3;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client
-var require_v4 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
};
- var v4 = function(options, buf, offset) {
- options = options || {};
- const rnds = options.random || (options.rng || _rng.default)();
- rnds[6] = rnds[6] & 15 | 64;
- rnds[8] = rnds[8] & 63 | 128;
- if (buf) {
- offset = offset || 0;
- for (let i = 0;i < 16; ++i) {
- buf[offset + i] = rnds[i];
- }
- return buf;
+ var _toStr = __name((val) => {
+ if (val == null) {
+ return val;
}
- return (0, _stringify.default)(rnds);
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _rng = _interopRequireDefault(require_rng());
- var _stringify = _interopRequireDefault(require_stringify());
- var _default = v4;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-s
-var require_sha1 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var sha1 = function(bytes) {
- if (Array.isArray(bytes)) {
- bytes = Buffer.from(bytes);
- } else if (typeof bytes === "string") {
- bytes = Buffer.from(bytes, "utf8");
+ if (typeof val === "number" || typeof val === "bigint") {
+ const warning = new Error(`Received number ${val} where a string was expected.`);
+ warning.name = "Warning";
+ console.warn(warning);
+ return String(val);
}
- return _crypto.default.createHash("sha1").update(bytes).digest();
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _crypto = _interopRequireDefault(__require("crypto"));
- var _default = sha1;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client
-var require_v5 = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _v = _interopRequireDefault(require_v35());
- var _sha = _interopRequireDefault(require_sha1());
- var v5 = (0, _v.default)("v5", 80, _sha.default);
- var _default = v5;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-
-var require_nil = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _default = "00000000-0000-0000-0000-000000000000";
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-sso/
-var require_version = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- var version = function(uuid) {
- if (!(0, _validate.default)(uuid)) {
- throw TypeError("Invalid UUID");
+ if (typeof val === "boolean") {
+ const warning = new Error(`Received boolean ${val} where a string was expected.`);
+ warning.name = "Warning";
+ console.warn(warning);
+ return String(val);
}
- return parseInt(uuid.substr(14, 1), 16);
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = undefined;
- var _validate = _interopRequireDefault(require_validate());
- var _default = version;
- exports.default = _default;
-});
-
-// node_modules/@aws-sdk/client-ss
-var require_dist = __commonJS((exports) => {
- var _interopRequireDefault = function(obj) {
- return obj && obj.__esModule ? obj : { default: obj };
- };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- Object.defineProperty(exports, "v1", {
- enumerable: true,
- get: function() {
- return _v.default;
+ return val;
+ }, "_toStr");
+ var _toBool = __name((val) => {
+ if (val == null) {
+ return val;
}
- });
- Object.defineProperty(exports, "v3", {
- enumerable: true,
- get: function() {
- return _v2.default;
+ if (typeof val === "number") {
}
- });
- Object.defineProperty(exports, "v4", {
- enumerable: true,
- get: function() {
- return _v3.default;
+ if (typeof val === "string") {
+ const lowercase = val.toLowerCase();
+ if (val !== "" && lowercase !== "false" && lowercase !== "true") {
+ const warning = new Error(`Received string "${val}" where a boolean was expected.`);
+ warning.name = "Warning";
+ console.warn(warning);
+ }
+ return val !== "" && lowercase !== "false";
}
- });
- Object.defineProperty(exports, "v5", {
- enumerable: true,
- get: function() {
- return _v4.default;
+ return val;
+ }, "_toBool");
+ var _toNum = __name((val) => {
+ if (val == null) {
+ return val;
}
- });
- Object.defineProperty(exports, "NIL", {
- enumerable: true,
- get: function() {
- return _nil.default;
+ if (typeof val === "boolean") {
}
- });
- Object.defineProperty(exports, "version", {
- enumerable: true,
- get: function() {
- return _version.default;
+ if (typeof val === "string") {
+ const num = Number(val);
+ if (num.toString() !== val) {
+ const warning = new Error(`Received string "${val}" where a number was expected.`);
+ warning.name = "Warning";
+ console.warn(warning);
+ return val;
+ }
+ return num;
}
- });
- Object.defineProperty(exports, "validate", {
- enumerable: true,
- get: function() {
- return _validate.default;
+ return val;
+ }, "_toNum");
+ var import_protocols3 = require_protocols();
+ var import_schema5 = require_schema();
+ var SerdeContextConfig = class {
+ static {
+ __name(this, "SerdeContextConfig");
+ }
+ serdeContext;
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ }
+ };
+ var import_protocols = require_protocols();
+ var import_schema3 = require_schema();
+ var import_serde2 = require_serde();
+ var import_util_base64 = require_dist_cjs9();
+ var import_serde = require_serde();
+ __name(jsonReviver, "jsonReviver");
+ var import_smithy_client = require_dist_cjs22();
+ var import_util_utf8 = require_dist_cjs8();
+ var collectBodyString = __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf8.toUtf8)(body)), "collectBodyString");
+ var parseJsonBody = __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
+ if (encoded.length) {
+ try {
+ return JSON.parse(encoded);
+ } catch (e) {
+ if (e?.name === "SyntaxError") {
+ Object.defineProperty(e, "$responseBodyText", {
+ value: encoded
+ });
+ }
+ throw e;
+ }
}
- });
- Object.defineProperty(exports, "stringify", {
- enumerable: true,
- get: function() {
- return _stringify.default;
+ return {};
+ }), "parseJsonBody");
+ var parseJsonErrorBody = __name(async (errorBody, context) => {
+ const value = await parseJsonBody(errorBody, context);
+ value.message = value.message ?? value.Message;
+ return value;
+ }, "parseJsonErrorBody");
+ var loadRestJsonErrorCode = __name((output, data) => {
+ const findKey = __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
+ const sanitizeErrorCode = __name((rawValue) => {
+ let cleanValue = rawValue;
+ if (typeof cleanValue === "number") {
+ cleanValue = cleanValue.toString();
+ }
+ if (cleanValue.indexOf(",") >= 0) {
+ cleanValue = cleanValue.split(",")[0];
+ }
+ if (cleanValue.indexOf(":") >= 0) {
+ cleanValue = cleanValue.split(":")[0];
+ }
+ if (cleanValue.indexOf("#") >= 0) {
+ cleanValue = cleanValue.split("#")[1];
+ }
+ return cleanValue;
+ }, "sanitizeErrorCode");
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
+ if (headerKey !== undefined) {
+ return sanitizeErrorCode(output.headers[headerKey]);
}
- });
- Object.defineProperty(exports, "parse", {
- enumerable: true,
- get: function() {
- return _parse.default;
+ if (data && typeof data === "object") {
+ const codeKey = findKey(data, "code");
+ if (codeKey && data[codeKey] !== undefined) {
+ return sanitizeErrorCode(data[codeKey]);
+ }
+ if (data["__type"] !== undefined) {
+ return sanitizeErrorCode(data["__type"]);
+ }
+ }
+ }, "loadRestJsonErrorCode");
+ var JsonShapeDeserializer = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ }
+ static {
+ __name(this, "JsonShapeDeserializer");
+ }
+ async read(schema, data) {
+ return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));
+ }
+ readObject(schema, data) {
+ return this._read(schema, data);
+ }
+ _read(schema, value) {
+ const isObject = value !== null && typeof value === "object";
+ const ns = import_schema3.NormalizedSchema.of(schema);
+ if (ns.isListSchema() && Array.isArray(value)) {
+ const listMember = ns.getValueSchema();
+ const out = [];
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const item of value) {
+ if (sparse || item != null) {
+ out.push(this._read(listMember, item));
+ }
+ }
+ return out;
+ } else if (ns.isMapSchema() && isObject) {
+ const mapMember = ns.getValueSchema();
+ const out = {};
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const [_k, _v] of Object.entries(value)) {
+ if (sparse || _v != null) {
+ out[_k] = this._read(mapMember, _v);
+ }
+ }
+ return out;
+ } else if (ns.isStructSchema() && isObject) {
+ const out = {};
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
+ const deserializedValue = this._read(memberSchema, value[fromKey]);
+ if (deserializedValue != null) {
+ out[memberName] = deserializedValue;
+ }
+ }
+ return out;
+ }
+ if (ns.isBlobSchema() && typeof value === "string") {
+ return (0, import_util_base64.fromBase64)(value);
+ }
+ const mediaType = ns.getMergedTraits().mediaType;
+ if (ns.isStringSchema() && typeof value === "string" && mediaType) {
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
+ if (isJson) {
+ return import_serde2.LazyJsonString.from(value);
+ }
+ }
+ if (ns.isTimestampSchema() && value != null) {
+ const format = (0, import_protocols.determineTimestampFormat)(ns, this.settings);
+ switch (format) {
+ case import_schema3.SCHEMA.TIMESTAMP_DATE_TIME:
+ return (0, import_serde2.parseRfc3339DateTimeWithOffset)(value);
+ case import_schema3.SCHEMA.TIMESTAMP_HTTP_DATE:
+ return (0, import_serde2.parseRfc7231DateTime)(value);
+ case import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ return (0, import_serde2.parseEpochTimestamp)(value);
+ default:
+ console.warn("Missing timestamp format, parsing value with Date constructor:", value);
+ return new Date(value);
+ }
+ }
+ if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
+ return BigInt(value);
+ }
+ if (ns.isBigDecimalSchema() && value != null) {
+ if (value instanceof import_serde2.NumericValue) {
+ return value;
+ }
+ const untyped = value;
+ if (untyped.type === "bigDecimal" && "string" in untyped) {
+ return new import_serde2.NumericValue(untyped.string, untyped.type);
+ }
+ return new import_serde2.NumericValue(String(value), "bigDecimal");
+ }
+ if (ns.isNumericSchema() && typeof value === "string") {
+ switch (value) {
+ case "Infinity":
+ return Infinity;
+ case "-Infinity":
+ return (-Infinity);
+ case "NaN":
+ return NaN;
+ }
+ }
+ if (ns.isDocumentSchema()) {
+ if (isObject) {
+ const out = Array.isArray(value) ? [] : {};
+ for (const [k, v] of Object.entries(value)) {
+ if (v instanceof import_serde2.NumericValue) {
+ out[k] = v;
+ } else {
+ out[k] = this._read(ns, v);
+ }
+ }
+ return out;
+ } else {
+ return structuredClone(value);
+ }
+ }
+ return value;
}
- });
- var _v = _interopRequireDefault(require_v1());
- var _v2 = _interopRequireDefault(require_v3());
- var _v3 = _interopRequireDefault(require_v4());
- var _v4 = _interopRequireDefault(require_v5());
- var _nil = _interopRequireDefault(require_nil());
- var _version = _interopRequireDefault(require_version());
- var _validate = _interopRequireDefault(require_validate());
- var _stringify = _interopRequireDefault(require_stringify());
- var _parse = _interopRequireDefault(require_parse2());
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver
-var require_dist_cjs33 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var import_protocols2 = require_protocols();
+ var import_schema4 = require_schema();
+ var import_serde4 = require_serde();
+ var import_util_base642 = require_dist_cjs9();
+ var import_serde3 = require_serde();
+ var NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
+ var JsonReplacer = class {
+ static {
+ __name(this, "JsonReplacer");
+ }
+ values = new Map;
+ counter = 0;
+ stage = 0;
+ createReplacer() {
+ if (this.stage === 1) {
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
+ }
+ if (this.stage === 2) {
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
+ }
+ this.stage = 1;
+ return (key, value) => {
+ if (value instanceof import_serde3.NumericValue) {
+ const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
+ this.values.set(`"${v}"`, value.string);
+ return v;
+ }
+ if (typeof value === "bigint") {
+ const s = value.toString();
+ const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
+ this.values.set(`"${v}"`, s);
+ return v;
+ }
+ return value;
+ };
+ }
+ replaceInJson(json) {
+ if (this.stage === 0) {
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
+ }
+ if (this.stage === 2) {
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
+ }
+ this.stage = 2;
+ if (this.counter === 0) {
+ return json;
+ }
+ for (const [key, value] of this.values) {
+ json = json.replace(key, value);
+ }
+ return json;
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- isClockSkewError: () => isClockSkewError,
- isRetryableByTrait: () => isRetryableByTrait,
- isServerError: () => isServerError,
- isThrottlingError: () => isThrottlingError,
- isTransientError: () => isTransientError
- });
- module.exports = __toCommonJS(src_exports);
- var CLOCK_SKEW_ERROR_CODES = [
- "AuthFailure",
- "InvalidSignatureException",
- "RequestExpired",
- "RequestInTheFuture",
- "RequestTimeTooSkewed",
- "SignatureDoesNotMatch"
- ];
- var THROTTLING_ERROR_CODES = [
- "BandwidthLimitExceeded",
- "EC2ThrottledException",
- "LimitExceededException",
- "PriorRequestNotComplete",
- "ProvisionedThroughputExceededException",
- "RequestLimitExceeded",
- "RequestThrottled",
- "RequestThrottledException",
- "SlowDown",
- "ThrottledException",
- "Throttling",
- "ThrottlingException",
- "TooManyRequestsException",
- "TransactionInProgressException"
- ];
- var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
- var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
- var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
- var isRetryableByTrait = __name((error) => error.$retryable !== undefined, "isRetryableByTrait");
- var isClockSkewError = __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), "isClockSkewError");
- var isThrottlingError = __name((error) => {
- var _a, _b;
- return ((_a = error.$metadata) == null ? undefined : _a.httpStatusCode) === 429 || THROTTLING_ERROR_CODES.includes(error.name) || ((_b = error.$retryable) == null ? undefined : _b.throttling) == true;
- }, "isThrottlingError");
- var isTransientError = __name((error) => {
- var _a;
- return TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes((error == null ? undefined : error.code) || "") || TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) == null ? undefined : _a.httpStatusCode) || 0);
- }, "isTransientError");
- var isServerError = __name((error) => {
- var _a;
- if (((_a = error.$metadata) == null ? undefined : _a.httpStatusCode) !== undefined) {
- const statusCode = error.$metadata.httpStatusCode;
- if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
- return true;
+ var JsonShapeSerializer = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ }
+ static {
+ __name(this, "JsonShapeSerializer");
+ }
+ buffer;
+ rootSchema;
+ write(schema, value) {
+ this.rootSchema = import_schema4.NormalizedSchema.of(schema);
+ this.buffer = this._write(this.rootSchema, value);
+ }
+ writeDiscriminatedDocument(schema, value) {
+ this.write(schema, value);
+ if (typeof this.buffer === "object") {
+ this.buffer.__type = import_schema4.NormalizedSchema.of(schema).getName(true);
+ }
+ }
+ flush() {
+ const { rootSchema } = this;
+ this.rootSchema = undefined;
+ if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
+ const replacer = new JsonReplacer;
+ return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
+ }
+ return this.buffer;
+ }
+ _write(schema, value, container) {
+ const isObject = value !== null && typeof value === "object";
+ const ns = import_schema4.NormalizedSchema.of(schema);
+ if (ns.isListSchema() && Array.isArray(value)) {
+ const listMember = ns.getValueSchema();
+ const out = [];
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const item of value) {
+ if (sparse || item != null) {
+ out.push(this._write(listMember, item));
+ }
+ }
+ return out;
+ } else if (ns.isMapSchema() && isObject) {
+ const mapMember = ns.getValueSchema();
+ const out = {};
+ const sparse = !!ns.getMergedTraits().sparse;
+ for (const [_k, _v] of Object.entries(value)) {
+ if (sparse || _v != null) {
+ out[_k] = this._write(mapMember, _v);
+ }
+ }
+ return out;
+ } else if (ns.isStructSchema() && isObject) {
+ const out = {};
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;
+ const serializableValue = this._write(memberSchema, value[memberName], ns);
+ if (serializableValue !== undefined) {
+ out[targetKey] = serializableValue;
+ }
+ }
+ return out;
}
- return false;
+ if (value === null && container?.isStructSchema()) {
+ return;
+ }
+ if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string") || ns.isDocumentSchema() && value instanceof Uint8Array) {
+ if (ns === this.rootSchema) {
+ return value;
+ }
+ if (!this.serdeContext?.base64Encoder) {
+ return (0, import_util_base642.toBase64)(value);
+ }
+ return this.serdeContext?.base64Encoder(value);
+ }
+ if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) {
+ const format = (0, import_protocols2.determineTimestampFormat)(ns, this.settings);
+ switch (format) {
+ case import_schema4.SCHEMA.TIMESTAMP_DATE_TIME:
+ return value.toISOString().replace(".000Z", "Z");
+ case import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE:
+ return (0, import_serde4.dateToUtcString)(value);
+ case import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ return value.getTime() / 1000;
+ default:
+ console.warn("Missing timestamp format, using epoch seconds", value);
+ return value.getTime() / 1000;
+ }
+ }
+ if (ns.isNumericSchema() && typeof value === "number") {
+ if (Math.abs(value) === Infinity || isNaN(value)) {
+ return String(value);
+ }
+ }
+ if (ns.isStringSchema()) {
+ if (typeof value === "undefined" && ns.isIdempotencyToken()) {
+ return (0, import_serde4.generateIdempotencyToken)();
+ }
+ const mediaType = ns.getMergedTraits().mediaType;
+ if (value != null && mediaType) {
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
+ if (isJson) {
+ return import_serde4.LazyJsonString.from(value);
+ }
+ }
+ }
+ if (ns.isDocumentSchema()) {
+ if (isObject) {
+ const out = Array.isArray(value) ? [] : {};
+ for (const [k, v] of Object.entries(value)) {
+ if (v instanceof import_serde4.NumericValue) {
+ out[k] = v;
+ } else {
+ out[k] = this._write(ns, v);
+ }
+ }
+ return out;
+ } else {
+ return structuredClone(value);
+ }
+ }
+ return value;
}
- return false;
- }, "isServerError");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var require_dist_cjs34 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var JsonCodec = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ }
+ static {
+ __name(this, "JsonCodec");
+ }
+ createSerializer() {
+ const serializer = new JsonShapeSerializer(this.settings);
+ serializer.setSerdeContext(this.serdeContext);
+ return serializer;
+ }
+ createDeserializer() {
+ const deserializer = new JsonShapeDeserializer(this.settings);
+ deserializer.setSerdeContext(this.serdeContext);
+ return deserializer;
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,
- ConfiguredRetryStrategy: () => ConfiguredRetryStrategy,
- DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS,
- DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE,
- DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE,
- DefaultRateLimiter: () => DefaultRateLimiter,
- INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS,
- INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER,
- MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY,
- NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT,
- REQUEST_HEADER: () => REQUEST_HEADER,
- RETRY_COST: () => RETRY_COST,
- RETRY_MODES: () => RETRY_MODES,
- StandardRetryStrategy: () => StandardRetryStrategy,
- THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE,
- TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST
- });
- module.exports = __toCommonJS(src_exports);
- var RETRY_MODES = ((RETRY_MODES2) => {
- RETRY_MODES2["STANDARD"] = "standard";
- RETRY_MODES2["ADAPTIVE"] = "adaptive";
- return RETRY_MODES2;
- })(RETRY_MODES || {});
- var DEFAULT_MAX_ATTEMPTS = 3;
- var DEFAULT_RETRY_MODE = "standard";
- var import_service_error_classification = require_dist_cjs33();
- var _DefaultRateLimiter = class _DefaultRateLimiter2 {
- constructor(options) {
- this.currentCapacity = 0;
- this.enabled = false;
- this.lastMaxRate = 0;
- this.measuredTxRate = 0;
- this.requestCount = 0;
- this.lastTimestamp = 0;
- this.timeWindow = 0;
- this.beta = (options == null ? undefined : options.beta) ?? 0.7;
- this.minCapacity = (options == null ? undefined : options.minCapacity) ?? 1;
- this.minFillRate = (options == null ? undefined : options.minFillRate) ?? 0.5;
- this.scaleConstant = (options == null ? undefined : options.scaleConstant) ?? 0.4;
- this.smooth = (options == null ? undefined : options.smooth) ?? 0.8;
- const currentTimeInSeconds = this.getCurrentTimeInSeconds();
- this.lastThrottleTime = currentTimeInSeconds;
- this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
- this.fillRate = this.minFillRate;
- this.maxCapacity = this.minCapacity;
+ var AwsJsonRpcProtocol = class extends import_protocols3.RpcProtocol {
+ static {
+ __name(this, "AwsJsonRpcProtocol");
}
- getCurrentTimeInSeconds() {
- return Date.now() / 1000;
+ serializer;
+ deserializer;
+ serviceTarget;
+ codec;
+ mixin = new ProtocolLib;
+ awsQueryCompatible;
+ constructor({
+ defaultNamespace,
+ serviceTarget,
+ awsQueryCompatible
+ }) {
+ super({
+ defaultNamespace
+ });
+ this.serviceTarget = serviceTarget;
+ this.codec = new JsonCodec({
+ timestampFormat: {
+ useTrait: true,
+ default: import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS
+ },
+ jsonName: false
+ });
+ this.serializer = this.codec.createSerializer();
+ this.deserializer = this.codec.createDeserializer();
+ this.awsQueryCompatible = !!awsQueryCompatible;
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ if (!request.path.endsWith("/")) {
+ request.path += "/";
+ }
+ Object.assign(request.headers, {
+ "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
+ "x-amz-target": `${this.serviceTarget}.${import_schema5.NormalizedSchema.of(operationSchema).getName()}`
+ });
+ if (this.awsQueryCompatible) {
+ request.headers["x-amzn-query-mode"] = "true";
+ }
+ if ((0, import_schema5.deref)(operationSchema.input) === "unit" || !request.body) {
+ request.body = "{}";
+ }
+ return request;
}
- async getSendToken() {
- return this.acquireTokenBucket(1);
+ getPayloadCodec() {
+ return this.codec;
}
- async acquireTokenBucket(amount) {
- if (!this.enabled) {
- return;
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ if (this.awsQueryCompatible) {
+ this.mixin.setQueryCompatError(dataObject, response);
}
- this.refillTokenBucket();
- if (amount > this.currentCapacity) {
- const delay = (amount - this.currentCapacity) / this.fillRate * 1000;
- await new Promise((resolve) => setTimeout(resolve, delay));
+ const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
+ const ns = import_schema5.NormalizedSchema.of(errorSchema);
+ const message = dataObject.message ?? dataObject.Message ?? "Unknown";
+ const ErrorCtor = import_schema5.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
+ const exception = new ErrorCtor(message);
+ const output = {};
+ for (const [name, member] of ns.structIterator()) {
+ const target = member.getMergedTraits().jsonName ?? name;
+ output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
}
- this.currentCapacity = this.currentCapacity - amount;
+ if (this.awsQueryCompatible) {
+ this.mixin.queryCompatOutput(dataObject, output);
+ }
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
}
- refillTokenBucket() {
- const timestamp = this.getCurrentTimeInSeconds();
- if (!this.lastTimestamp) {
- this.lastTimestamp = timestamp;
- return;
+ };
+ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {
+ static {
+ __name(this, "AwsJson1_0Protocol");
+ }
+ constructor({
+ defaultNamespace,
+ serviceTarget,
+ awsQueryCompatible
+ }) {
+ super({
+ defaultNamespace,
+ serviceTarget,
+ awsQueryCompatible
+ });
+ }
+ getShapeId() {
+ return "aws.protocols#awsJson1_0";
+ }
+ getJsonRpcVersion() {
+ return "1.0";
+ }
+ getDefaultContentType() {
+ return "application/x-amz-json-1.0";
+ }
+ };
+ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {
+ static {
+ __name(this, "AwsJson1_1Protocol");
+ }
+ constructor({
+ defaultNamespace,
+ serviceTarget,
+ awsQueryCompatible
+ }) {
+ super({
+ defaultNamespace,
+ serviceTarget,
+ awsQueryCompatible
+ });
+ }
+ getShapeId() {
+ return "aws.protocols#awsJson1_1";
+ }
+ getJsonRpcVersion() {
+ return "1.1";
+ }
+ getDefaultContentType() {
+ return "application/x-amz-json-1.1";
+ }
+ };
+ var import_protocols4 = require_protocols();
+ var import_schema6 = require_schema();
+ var AwsRestJsonProtocol = class extends import_protocols4.HttpBindingProtocol {
+ static {
+ __name(this, "AwsRestJsonProtocol");
+ }
+ serializer;
+ deserializer;
+ codec;
+ mixin = new ProtocolLib;
+ constructor({ defaultNamespace }) {
+ super({
+ defaultNamespace
+ });
+ const settings = {
+ timestampFormat: {
+ useTrait: true,
+ default: import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS
+ },
+ httpBindings: true,
+ jsonName: true
+ };
+ this.codec = new JsonCodec(settings);
+ this.serializer = new import_protocols4.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
+ this.deserializer = new import_protocols4.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
+ }
+ getShapeId() {
+ return "aws.protocols#restJson1";
+ }
+ getPayloadCodec() {
+ return this.codec;
+ }
+ setSerdeContext(serdeContext) {
+ this.codec.setSerdeContext(serdeContext);
+ super.setSerdeContext(serdeContext);
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ const inputSchema = import_schema6.NormalizedSchema.of(operationSchema.input);
+ if (!request.headers["content-type"]) {
+ const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
+ if (contentType) {
+ request.headers["content-type"] = contentType;
+ }
}
- const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
- this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);
- this.lastTimestamp = timestamp;
+ if (request.headers["content-type"] && !request.body) {
+ request.body = "{}";
+ }
+ return request;
}
- updateClientSendingRate(response) {
- let calculatedRate;
- this.updateMeasuredRate();
- if ((0, import_service_error_classification.isThrottlingError)(response)) {
- const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
- this.lastMaxRate = rateToUse;
- this.calculateTimeWindow();
- this.lastThrottleTime = this.getCurrentTimeInSeconds();
- calculatedRate = this.cubicThrottle(rateToUse);
- this.enableTokenBucket();
- } else {
- this.calculateTimeWindow();
- calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
+ const ns = import_schema6.NormalizedSchema.of(errorSchema);
+ const message = dataObject.message ?? dataObject.Message ?? "Unknown";
+ const ErrorCtor = import_schema6.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
+ const exception = new ErrorCtor(message);
+ await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
+ const output = {};
+ for (const [name, member] of ns.structIterator()) {
+ const target = member.getMergedTraits().jsonName ?? name;
+ output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);
+ }
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
+ }
+ getDefaultContentType() {
+ return "application/json";
+ }
+ };
+ var import_smithy_client2 = require_dist_cjs22();
+ var awsExpectUnion = __name((value) => {
+ if (value == null) {
+ return;
+ }
+ if (typeof value === "object" && "__type" in value) {
+ delete value.__type;
+ }
+ return (0, import_smithy_client2.expectUnion)(value);
+ }, "awsExpectUnion");
+ var import_protocols7 = require_protocols();
+ var import_schema9 = require_schema();
+ var import_xml_builder = require_dist_cjs23();
+ var import_protocols5 = require_protocols();
+ var import_schema7 = require_schema();
+ var import_smithy_client3 = require_dist_cjs22();
+ var import_util_utf82 = require_dist_cjs8();
+ var XmlShapeDeserializer = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ this.stringDeserializer = new import_protocols5.FromStringShapeDeserializer(settings);
+ }
+ static {
+ __name(this, "XmlShapeDeserializer");
+ }
+ stringDeserializer;
+ setSerdeContext(serdeContext) {
+ this.serdeContext = serdeContext;
+ this.stringDeserializer.setSerdeContext(serdeContext);
+ }
+ read(schema, bytes, key) {
+ const ns = import_schema7.NormalizedSchema.of(schema);
+ const memberSchemas = ns.getMemberSchemas();
+ const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => {
+ return !!memberNs.getMemberTraits().eventPayload;
+ });
+ if (isEventPayload) {
+ const output = {};
+ const memberName = Object.keys(memberSchemas)[0];
+ const eventMemberSchema = memberSchemas[memberName];
+ if (eventMemberSchema.isBlobSchema()) {
+ output[memberName] = bytes;
+ } else {
+ output[memberName] = this.read(memberSchemas[memberName], bytes);
+ }
+ return output;
}
- const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
- this.updateTokenBucketRate(newRate);
+ const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)(bytes);
+ const parsedObject = this.parseXml(xmlString);
+ return this.readSchema(schema, key ? parsedObject[key] : parsedObject);
}
- calculateTimeWindow() {
- this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
+ readSchema(_schema, value) {
+ const ns = import_schema7.NormalizedSchema.of(_schema);
+ if (ns.isUnitSchema()) {
+ return;
+ }
+ const traits = ns.getMergedTraits();
+ if (ns.isListSchema() && !Array.isArray(value)) {
+ return this.readSchema(ns, [value]);
+ }
+ if (value == null) {
+ return value;
+ }
+ if (typeof value === "object") {
+ const sparse = !!traits.sparse;
+ const flat = !!traits.xmlFlattened;
+ if (ns.isListSchema()) {
+ const listValue = ns.getValueSchema();
+ const buffer2 = [];
+ const sourceKey = listValue.getMergedTraits().xmlName ?? "member";
+ const source = flat ? value : (value[0] ?? value)[sourceKey];
+ const sourceArray = Array.isArray(source) ? source : [source];
+ for (const v of sourceArray) {
+ if (v != null || sparse) {
+ buffer2.push(this.readSchema(listValue, v));
+ }
+ }
+ return buffer2;
+ }
+ const buffer = {};
+ if (ns.isMapSchema()) {
+ const keyNs = ns.getKeySchema();
+ const memberNs = ns.getValueSchema();
+ let entries;
+ if (flat) {
+ entries = Array.isArray(value) ? value : [value];
+ } else {
+ entries = Array.isArray(value.entry) ? value.entry : [value.entry];
+ }
+ const keyProperty = keyNs.getMergedTraits().xmlName ?? "key";
+ const valueProperty = memberNs.getMergedTraits().xmlName ?? "value";
+ for (const entry of entries) {
+ const key = entry[keyProperty];
+ const value2 = entry[valueProperty];
+ if (value2 != null || sparse) {
+ buffer[key] = this.readSchema(memberNs, value2);
+ }
+ }
+ return buffer;
+ }
+ if (ns.isStructSchema()) {
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ const memberTraits = memberSchema.getMergedTraits();
+ const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName();
+ if (value[xmlObjectKey] != null) {
+ buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);
+ }
+ }
+ return buffer;
+ }
+ if (ns.isDocumentSchema()) {
+ return value;
+ }
+ throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);
+ }
+ if (ns.isListSchema()) {
+ return [];
+ }
+ if (ns.isMapSchema() || ns.isStructSchema()) {
+ return {};
+ }
+ return this.stringDeserializer.read(ns, value);
}
- cubicThrottle(rateToUse) {
- return this.getPrecise(rateToUse * this.beta);
+ parseXml(xml) {
+ if (xml.length) {
+ let parsedObj;
+ try {
+ parsedObj = (0, import_xml_builder.parseXML)(xml);
+ } catch (e) {
+ if (e && typeof e === "object") {
+ Object.defineProperty(e, "$responseBodyText", {
+ value: xml
+ });
+ }
+ throw e;
+ }
+ const textNodeName = "#text";
+ const key = Object.keys(parsedObj)[0];
+ const parsedObjToReturn = parsedObj[key];
+ if (parsedObjToReturn[textNodeName]) {
+ parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
+ delete parsedObjToReturn[textNodeName];
+ }
+ return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn);
+ }
+ return {};
}
- cubicSuccess(timestamp) {
- return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
+ };
+ var import_protocols6 = require_protocols();
+ var import_schema8 = require_schema();
+ var import_serde5 = require_serde();
+ var import_smithy_client4 = require_dist_cjs22();
+ var import_util_base643 = require_dist_cjs9();
+ var QueryShapeSerializer = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ }
+ static {
+ __name(this, "QueryShapeSerializer");
+ }
+ buffer;
+ write(schema, value, prefix = "") {
+ if (this.buffer === undefined) {
+ this.buffer = "";
+ }
+ const ns = import_schema8.NormalizedSchema.of(schema);
+ if (prefix && !prefix.endsWith(".")) {
+ prefix += ".";
+ }
+ if (ns.isBlobSchema()) {
+ if (typeof value === "string" || value instanceof Uint8Array) {
+ this.writeKey(prefix);
+ this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base643.toBase64)(value));
+ }
+ } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
+ if (value != null) {
+ this.writeKey(prefix);
+ this.writeValue(String(value));
+ } else if (ns.isIdempotencyToken()) {
+ this.writeKey(prefix);
+ this.writeValue((0, import_serde5.generateIdempotencyToken)());
+ }
+ } else if (ns.isBigIntegerSchema()) {
+ if (value != null) {
+ this.writeKey(prefix);
+ this.writeValue(String(value));
+ }
+ } else if (ns.isBigDecimalSchema()) {
+ if (value != null) {
+ this.writeKey(prefix);
+ this.writeValue(value instanceof import_serde5.NumericValue ? value.string : String(value));
+ }
+ } else if (ns.isTimestampSchema()) {
+ if (value instanceof Date) {
+ this.writeKey(prefix);
+ const format = (0, import_protocols6.determineTimestampFormat)(ns, this.settings);
+ switch (format) {
+ case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME:
+ this.writeValue(value.toISOString().replace(".000Z", "Z"));
+ break;
+ case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE:
+ this.writeValue((0, import_smithy_client4.dateToUtcString)(value));
+ break;
+ case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ this.writeValue(String(value.getTime() / 1000));
+ break;
+ }
+ }
+ } else if (ns.isDocumentSchema()) {
+ throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`);
+ } else if (ns.isListSchema()) {
+ if (Array.isArray(value)) {
+ if (value.length === 0) {
+ if (this.settings.serializeEmptyLists) {
+ this.writeKey(prefix);
+ this.writeValue("");
+ }
+ } else {
+ const member = ns.getValueSchema();
+ const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
+ let i = 1;
+ for (const item of value) {
+ if (item == null) {
+ continue;
+ }
+ const suffix = this.getKey("member", member.getMergedTraits().xmlName);
+ const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;
+ this.write(member, item, key);
+ ++i;
+ }
+ }
+ }
+ } else if (ns.isMapSchema()) {
+ if (value && typeof value === "object") {
+ const keySchema = ns.getKeySchema();
+ const memberSchema = ns.getValueSchema();
+ const flat = ns.getMergedTraits().xmlFlattened;
+ let i = 1;
+ for (const [k, v] of Object.entries(value)) {
+ if (v == null) {
+ continue;
+ }
+ const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName);
+ const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;
+ const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName);
+ const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;
+ this.write(keySchema, k, key);
+ this.write(memberSchema, v, valueKey);
+ ++i;
+ }
+ }
+ } else if (ns.isStructSchema()) {
+ if (value && typeof value === "object") {
+ for (const [memberName, member] of ns.structIterator()) {
+ if (value[memberName] == null && !member.isIdempotencyToken()) {
+ continue;
+ }
+ const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);
+ const key = `${prefix}${suffix}`;
+ this.write(member, value[memberName], key);
+ }
+ }
+ } else if (ns.isUnitSchema()) {
+ } else {
+ throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
+ }
}
- enableTokenBucket() {
- this.enabled = true;
+ flush() {
+ if (this.buffer === undefined) {
+ throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
+ }
+ const str = this.buffer;
+ delete this.buffer;
+ return str;
}
- updateTokenBucketRate(newRate) {
- this.refillTokenBucket();
- this.fillRate = Math.max(newRate, this.minFillRate);
- this.maxCapacity = Math.max(newRate, this.minCapacity);
- this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);
+ getKey(memberName, xmlName) {
+ const key = xmlName ?? memberName;
+ if (this.settings.capitalizeKeys) {
+ return key[0].toUpperCase() + key.slice(1);
+ }
+ return key;
}
- updateMeasuredRate() {
- const t = this.getCurrentTimeInSeconds();
- const timeBucket = Math.floor(t * 2) / 2;
- this.requestCount++;
- if (timeBucket > this.lastTxRateBucket) {
- const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
- this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
- this.requestCount = 0;
- this.lastTxRateBucket = timeBucket;
+ writeKey(key) {
+ if (key.endsWith(".")) {
+ key = key.slice(0, key.length - 1);
}
+ this.buffer += `&${(0, import_protocols6.extendedEncodeURIComponent)(key)}=`;
}
- getPrecise(num) {
- return parseFloat(num.toFixed(8));
+ writeValue(value) {
+ this.buffer += (0, import_protocols6.extendedEncodeURIComponent)(value);
}
};
- __name(_DefaultRateLimiter, "DefaultRateLimiter");
- var DefaultRateLimiter = _DefaultRateLimiter;
- var DEFAULT_RETRY_DELAY_BASE = 100;
- var MAXIMUM_RETRY_DELAY = 20 * 1000;
- var THROTTLING_RETRY_DELAY_BASE = 500;
- var INITIAL_RETRY_TOKENS = 500;
- var RETRY_COST = 5;
- var TIMEOUT_RETRY_COST = 10;
- var NO_RETRY_INCREMENT = 1;
- var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
- var REQUEST_HEADER = "amz-sdk-request";
- var getDefaultRetryBackoffStrategy = __name(() => {
- let delayBase = DEFAULT_RETRY_DELAY_BASE;
- const computeNextBackoffDelay = __name((attempts) => {
- return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
- }, "computeNextBackoffDelay");
- const setDelayBase = __name((delay) => {
- delayBase = delay;
- }, "setDelayBase");
- return {
- computeNextBackoffDelay,
- setDelayBase
- };
- }, "getDefaultRetryBackoffStrategy");
- var createDefaultRetryToken = __name(({
- retryDelay,
- retryCount,
- retryCost
- }) => {
- const getRetryCount = __name(() => retryCount, "getRetryCount");
- const getRetryDelay = __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), "getRetryDelay");
- const getRetryCost = __name(() => retryCost, "getRetryCost");
- return {
- getRetryCount,
- getRetryDelay,
- getRetryCost
- };
- }, "createDefaultRetryToken");
- var _StandardRetryStrategy = class _StandardRetryStrategy2 {
- constructor(maxAttempts) {
- this.maxAttempts = maxAttempts;
- this.mode = "standard";
- this.capacity = INITIAL_RETRY_TOKENS;
- this.retryBackoffStrategy = getDefaultRetryBackoffStrategy();
- this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts;
+ var AwsQueryProtocol = class extends import_protocols7.RpcProtocol {
+ constructor(options) {
+ super({
+ defaultNamespace: options.defaultNamespace
+ });
+ this.options = options;
+ const settings = {
+ timestampFormat: {
+ useTrait: true,
+ default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME
+ },
+ httpBindings: false,
+ xmlNamespace: options.xmlNamespace,
+ serviceNamespace: options.defaultNamespace,
+ serializeEmptyLists: true
+ };
+ this.serializer = new QueryShapeSerializer(settings);
+ this.deserializer = new XmlShapeDeserializer(settings);
}
- async acquireInitialRetryToken(retryTokenScope) {
- return createDefaultRetryToken({
- retryDelay: DEFAULT_RETRY_DELAY_BASE,
- retryCount: 0
+ static {
+ __name(this, "AwsQueryProtocol");
+ }
+ serializer;
+ deserializer;
+ mixin = new ProtocolLib;
+ getShapeId() {
+ return "aws.protocols#awsQuery";
+ }
+ setSerdeContext(serdeContext) {
+ this.serializer.setSerdeContext(serdeContext);
+ this.deserializer.setSerdeContext(serdeContext);
+ }
+ getPayloadCodec() {
+ throw new Error("AWSQuery protocol has no payload codec.");
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ if (!request.path.endsWith("/")) {
+ request.path += "/";
+ }
+ Object.assign(request.headers, {
+ "content-type": `application/x-www-form-urlencoded`
});
+ if ((0, import_schema9.deref)(operationSchema.input) === "unit" || !request.body) {
+ request.body = "";
+ }
+ const action = operationSchema.name.split("#")[1] ?? operationSchema.name;
+ request.body = `Action=${action}&Version=${this.options.version}` + request.body;
+ if (request.body.endsWith("&")) {
+ request.body = request.body.slice(-1);
+ }
+ return request;
}
- async refreshRetryTokenForRetry(token, errorInfo) {
- const maxAttempts = await this.getMaxAttempts();
- if (this.shouldRetry(token, errorInfo, maxAttempts)) {
- const errorType = errorInfo.errorType;
- this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);
- const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
- const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;
- const capacityCost = this.getCapacityCost(errorType);
- this.capacity -= capacityCost;
- return createDefaultRetryToken({
- retryDelay,
- retryCount: token.getRetryCount() + 1,
- retryCost: capacityCost
- });
+ async deserializeResponse(operationSchema, context, response) {
+ const deserializer = this.deserializer;
+ const ns = import_schema9.NormalizedSchema.of(operationSchema.output);
+ const dataObject = {};
+ if (response.statusCode >= 300) {
+ const bytes2 = await (0, import_protocols7.collectBody)(response.body, context);
+ if (bytes2.byteLength > 0) {
+ Object.assign(dataObject, await deserializer.read(import_schema9.SCHEMA.DOCUMENT, bytes2));
+ }
+ await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
+ }
+ for (const header in response.headers) {
+ const value = response.headers[header];
+ delete response.headers[header];
+ response.headers[header.toLowerCase()] = value;
+ }
+ const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
+ const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : undefined;
+ const bytes = await (0, import_protocols7.collectBody)(response.body, context);
+ if (bytes.byteLength > 0) {
+ Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
+ }
+ const output = {
+ $metadata: this.deserializeMetadata(response),
+ ...dataObject
+ };
+ return output;
+ }
+ useNestedResult() {
+ return true;
+ }
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
+ const errorData = this.loadQueryError(dataObject);
+ const message = this.loadQueryErrorMessage(dataObject);
+ errorData.message = message;
+ errorData.Error = {
+ Type: errorData.Type,
+ Code: errorData.Code,
+ Message: message
+ };
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => registry.find((schema) => import_schema9.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName));
+ const ns = import_schema9.NormalizedSchema.of(errorSchema);
+ const ErrorCtor = import_schema9.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
+ const exception = new ErrorCtor(message);
+ const output = {
+ Error: errorData.Error
+ };
+ for (const [name, member] of ns.structIterator()) {
+ const target = member.getMergedTraits().xmlName ?? name;
+ const value = errorData[target] ?? dataObject[target];
+ output[name] = this.deserializer.readSchema(member, value);
}
- throw new Error("No retry token available");
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
}
- recordSuccess(token) {
- this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
+ loadQueryErrorCode(output, data) {
+ const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
+ if (code !== undefined) {
+ return code;
+ }
+ if (output.statusCode == 404) {
+ return "NotFound";
+ }
}
- getCapacity() {
- return this.capacity;
+ loadQueryError(data) {
+ return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
}
- async getMaxAttempts() {
+ loadQueryErrorMessage(data) {
+ const errorData = this.loadQueryError(data);
+ return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
+ }
+ getDefaultContentType() {
+ return "application/x-www-form-urlencoded";
+ }
+ };
+ var AwsEc2QueryProtocol = class extends AwsQueryProtocol {
+ constructor(options) {
+ super(options);
+ this.options = options;
+ const ec2Settings = {
+ capitalizeKeys: true,
+ flattenLists: true,
+ serializeEmptyLists: false
+ };
+ Object.assign(this.serializer.settings, ec2Settings);
+ }
+ static {
+ __name(this, "AwsEc2QueryProtocol");
+ }
+ useNestedResult() {
+ return false;
+ }
+ };
+ var import_protocols9 = require_protocols();
+ var import_schema11 = require_schema();
+ var import_xml_builder2 = require_dist_cjs23();
+ var import_smithy_client5 = require_dist_cjs22();
+ var parseXmlBody = __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
+ if (encoded.length) {
+ let parsedObj;
try {
- return await this.maxAttemptsProvider();
- } catch (error) {
- console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
- return DEFAULT_MAX_ATTEMPTS;
+ parsedObj = (0, import_xml_builder2.parseXML)(encoded);
+ } catch (e) {
+ if (e && typeof e === "object") {
+ Object.defineProperty(e, "$responseBodyText", {
+ value: encoded
+ });
+ }
+ throw e;
+ }
+ const textNodeName = "#text";
+ const key = Object.keys(parsedObj)[0];
+ const parsedObjToReturn = parsedObj[key];
+ if (parsedObjToReturn[textNodeName]) {
+ parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
+ delete parsedObjToReturn[textNodeName];
}
+ return (0, import_smithy_client5.getValueFromTextNode)(parsedObjToReturn);
}
- shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
- const attempts = tokenToRenew.getRetryCount() + 1;
- return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);
+ return {};
+ }), "parseXmlBody");
+ var parseXmlErrorBody = __name(async (errorBody, context) => {
+ const value = await parseXmlBody(errorBody, context);
+ if (value.Error) {
+ value.Error.message = value.Error.message ?? value.Error.Message;
}
- getCapacityCost(errorType) {
- return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST;
+ return value;
+ }, "parseXmlErrorBody");
+ var loadRestXmlErrorCode = __name((output, data) => {
+ if (data?.Error?.Code !== undefined) {
+ return data.Error.Code;
}
- isRetryableError(errorType) {
- return errorType === "THROTTLING" || errorType === "TRANSIENT";
+ if (data?.Code !== undefined) {
+ return data.Code;
+ }
+ if (output.statusCode == 404) {
+ return "NotFound";
+ }
+ }, "loadRestXmlErrorCode");
+ var import_xml_builder3 = require_dist_cjs23();
+ var import_protocols8 = require_protocols();
+ var import_schema10 = require_schema();
+ var import_serde6 = require_serde();
+ var import_smithy_client6 = require_dist_cjs22();
+ var import_util_base644 = require_dist_cjs9();
+ var XmlShapeSerializer = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
+ }
+ static {
+ __name(this, "XmlShapeSerializer");
+ }
+ stringBuffer;
+ byteBuffer;
+ buffer;
+ write(schema, value) {
+ const ns = import_schema10.NormalizedSchema.of(schema);
+ if (ns.isStringSchema() && typeof value === "string") {
+ this.stringBuffer = value;
+ } else if (ns.isBlobSchema()) {
+ this.byteBuffer = "byteLength" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base644.fromBase64)(value);
+ } else {
+ this.buffer = this.writeStruct(ns, value, undefined);
+ const traits = ns.getMergedTraits();
+ if (traits.httpPayload && !traits.xmlName) {
+ this.buffer.withName(ns.getName());
+ }
+ }
+ }
+ flush() {
+ if (this.byteBuffer !== undefined) {
+ const bytes = this.byteBuffer;
+ delete this.byteBuffer;
+ return bytes;
+ }
+ if (this.stringBuffer !== undefined) {
+ const str = this.stringBuffer;
+ delete this.stringBuffer;
+ return str;
+ }
+ const buffer = this.buffer;
+ if (this.settings.xmlNamespace) {
+ if (!buffer?.attributes?.["xmlns"]) {
+ buffer.addAttribute("xmlns", this.settings.xmlNamespace);
+ }
+ }
+ delete this.buffer;
+ return buffer.toString();
+ }
+ writeStruct(ns, value, parentXmlns) {
+ const traits = ns.getMergedTraits();
+ const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName();
+ if (!name || !ns.isStructSchema()) {
+ throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(true)}.`);
+ }
+ const structXmlNode = import_xml_builder3.XmlNode.of(name);
+ const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
+ for (const [memberName, memberSchema] of ns.structIterator()) {
+ const val = value[memberName];
+ if (val != null || memberSchema.isIdempotencyToken()) {
+ if (memberSchema.getMergedTraits().xmlAttribute) {
+ structXmlNode.addAttribute(memberSchema.getMergedTraits().xmlName ?? memberName, this.writeSimple(memberSchema, val));
+ continue;
+ }
+ if (memberSchema.isListSchema()) {
+ this.writeList(memberSchema, val, structXmlNode, xmlns);
+ } else if (memberSchema.isMapSchema()) {
+ this.writeMap(memberSchema, val, structXmlNode, xmlns);
+ } else if (memberSchema.isStructSchema()) {
+ structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));
+ } else {
+ const memberNode = import_xml_builder3.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());
+ this.writeSimpleInto(memberSchema, val, memberNode, xmlns);
+ structXmlNode.addChildNode(memberNode);
+ }
+ }
+ }
+ if (xmlns) {
+ structXmlNode.addAttribute(xmlnsAttr, xmlns);
+ }
+ return structXmlNode;
+ }
+ writeList(listMember, array, container, parentXmlns) {
+ if (!listMember.isMemberSchema()) {
+ throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`);
+ }
+ const listTraits = listMember.getMergedTraits();
+ const listValueSchema = listMember.getValueSchema();
+ const listValueTraits = listValueSchema.getMergedTraits();
+ const sparse = !!listValueTraits.sparse;
+ const flat = !!listTraits.xmlFlattened;
+ const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);
+ const writeItem = __name((container2, value) => {
+ if (listValueSchema.isListSchema()) {
+ this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns);
+ } else if (listValueSchema.isMapSchema()) {
+ this.writeMap(listValueSchema, value, container2, xmlns);
+ } else if (listValueSchema.isStructSchema()) {
+ const struct = this.writeStruct(listValueSchema, value, xmlns);
+ container2.addChildNode(struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member"));
+ } else {
+ const listItemNode = import_xml_builder3.XmlNode.of(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member");
+ this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);
+ container2.addChildNode(listItemNode);
+ }
+ }, "writeItem");
+ if (flat) {
+ for (const value of array) {
+ if (sparse || value != null) {
+ writeItem(container, value);
+ }
+ }
+ } else {
+ const listNode = import_xml_builder3.XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());
+ if (xmlns) {
+ listNode.addAttribute(xmlnsAttr, xmlns);
+ }
+ for (const value of array) {
+ if (sparse || value != null) {
+ writeItem(listNode, value);
+ }
+ }
+ container.addChildNode(listNode);
+ }
+ }
+ writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {
+ if (!mapMember.isMemberSchema()) {
+ throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`);
+ }
+ const mapTraits = mapMember.getMergedTraits();
+ const mapKeySchema = mapMember.getKeySchema();
+ const mapKeyTraits = mapKeySchema.getMergedTraits();
+ const keyTag = mapKeyTraits.xmlName ?? "key";
+ const mapValueSchema = mapMember.getValueSchema();
+ const mapValueTraits = mapValueSchema.getMergedTraits();
+ const valueTag = mapValueTraits.xmlName ?? "value";
+ const sparse = !!mapValueTraits.sparse;
+ const flat = !!mapTraits.xmlFlattened;
+ const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);
+ const addKeyValue = __name((entry, key, val) => {
+ const keyNode = import_xml_builder3.XmlNode.of(keyTag, key);
+ const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);
+ if (keyXmlns) {
+ keyNode.addAttribute(keyXmlnsAttr, keyXmlns);
+ }
+ entry.addChildNode(keyNode);
+ let valueNode = import_xml_builder3.XmlNode.of(valueTag);
+ if (mapValueSchema.isListSchema()) {
+ this.writeList(mapValueSchema, val, valueNode, xmlns);
+ } else if (mapValueSchema.isMapSchema()) {
+ this.writeMap(mapValueSchema, val, valueNode, xmlns, true);
+ } else if (mapValueSchema.isStructSchema()) {
+ valueNode = this.writeStruct(mapValueSchema, val, xmlns);
+ } else {
+ this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);
+ }
+ entry.addChildNode(valueNode);
+ }, "addKeyValue");
+ if (flat) {
+ for (const [key, val] of Object.entries(map)) {
+ if (sparse || val != null) {
+ const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
+ addKeyValue(entry, key, val);
+ container.addChildNode(entry);
+ }
+ }
+ } else {
+ let mapNode;
+ if (!containerIsMap) {
+ mapNode = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
+ if (xmlns) {
+ mapNode.addAttribute(xmlnsAttr, xmlns);
+ }
+ container.addChildNode(mapNode);
+ }
+ for (const [key, val] of Object.entries(map)) {
+ if (sparse || val != null) {
+ const entry = import_xml_builder3.XmlNode.of("entry");
+ addKeyValue(entry, key, val);
+ (containerIsMap ? container : mapNode).addChildNode(entry);
+ }
+ }
+ }
+ }
+ writeSimple(_schema, value) {
+ if (value === null) {
+ throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");
+ }
+ const ns = import_schema10.NormalizedSchema.of(_schema);
+ let nodeContents = null;
+ if (value && typeof value === "object") {
+ if (ns.isBlobSchema()) {
+ nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base644.toBase64)(value);
+ } else if (ns.isTimestampSchema() && value instanceof Date) {
+ const format = (0, import_protocols8.determineTimestampFormat)(ns, this.settings);
+ switch (format) {
+ case import_schema10.SCHEMA.TIMESTAMP_DATE_TIME:
+ nodeContents = value.toISOString().replace(".000Z", "Z");
+ break;
+ case import_schema10.SCHEMA.TIMESTAMP_HTTP_DATE:
+ nodeContents = (0, import_smithy_client6.dateToUtcString)(value);
+ break;
+ case import_schema10.SCHEMA.TIMESTAMP_EPOCH_SECONDS:
+ nodeContents = String(value.getTime() / 1000);
+ break;
+ default:
+ console.warn("Missing timestamp format, using http date", value);
+ nodeContents = (0, import_smithy_client6.dateToUtcString)(value);
+ break;
+ }
+ } else if (ns.isBigDecimalSchema() && value) {
+ if (value instanceof import_serde6.NumericValue) {
+ return value.string;
+ }
+ return String(value);
+ } else if (ns.isMapSchema() || ns.isListSchema()) {
+ throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.");
+ } else {
+ throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(true)}`);
+ }
+ }
+ if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
+ nodeContents = String(value);
+ }
+ if (ns.isStringSchema()) {
+ if (value === undefined && ns.isIdempotencyToken()) {
+ nodeContents = (0, import_serde6.generateIdempotencyToken)();
+ } else {
+ nodeContents = String(value);
+ }
+ }
+ if (nodeContents === null) {
+ throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);
+ }
+ return nodeContents;
+ }
+ writeSimpleInto(_schema, value, into, parentXmlns) {
+ const nodeContents = this.writeSimple(_schema, value);
+ const ns = import_schema10.NormalizedSchema.of(_schema);
+ const content = new import_xml_builder3.XmlText(nodeContents);
+ const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);
+ if (xmlns) {
+ into.addAttribute(xmlnsAttr, xmlns);
+ }
+ into.addChildNode(content);
+ }
+ getXmlnsAttribute(ns, parentXmlns) {
+ const traits = ns.getMergedTraits();
+ const [prefix, xmlns] = traits.xmlNamespace ?? [];
+ if (xmlns && xmlns !== parentXmlns) {
+ return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns];
+ }
+ return [undefined, undefined];
}
};
- __name(_StandardRetryStrategy, "StandardRetryStrategy");
- var StandardRetryStrategy = _StandardRetryStrategy;
- var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy2 {
- constructor(maxAttemptsProvider, options) {
- this.maxAttemptsProvider = maxAttemptsProvider;
- this.mode = "adaptive";
- const { rateLimiter } = options ?? {};
- this.rateLimiter = rateLimiter ?? new DefaultRateLimiter;
- this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);
+ var XmlCodec = class extends SerdeContextConfig {
+ constructor(settings) {
+ super();
+ this.settings = settings;
}
- async acquireInitialRetryToken(retryTokenScope) {
- await this.rateLimiter.getSendToken();
- return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
+ static {
+ __name(this, "XmlCodec");
}
- async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
- this.rateLimiter.updateClientSendingRate(errorInfo);
- return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
+ createSerializer() {
+ const serializer = new XmlShapeSerializer(this.settings);
+ serializer.setSerdeContext(this.serdeContext);
+ return serializer;
}
- recordSuccess(token) {
- this.rateLimiter.updateClientSendingRate({});
- this.standardRetryStrategy.recordSuccess(token);
+ createDeserializer() {
+ const deserializer = new XmlShapeDeserializer(this.settings);
+ deserializer.setSerdeContext(this.serdeContext);
+ return deserializer;
}
};
- __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy");
- var AdaptiveRetryStrategy = _AdaptiveRetryStrategy;
- var _ConfiguredRetryStrategy = class _ConfiguredRetryStrategy2 extends StandardRetryStrategy {
- constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {
- super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
- if (typeof computeNextBackoffDelay === "number") {
- this.computeNextBackoffDelay = () => computeNextBackoffDelay;
- } else {
- this.computeNextBackoffDelay = computeNextBackoffDelay;
+ var AwsRestXmlProtocol = class extends import_protocols9.HttpBindingProtocol {
+ static {
+ __name(this, "AwsRestXmlProtocol");
+ }
+ codec;
+ serializer;
+ deserializer;
+ mixin = new ProtocolLib;
+ constructor(options) {
+ super(options);
+ const settings = {
+ timestampFormat: {
+ useTrait: true,
+ default: import_schema11.SCHEMA.TIMESTAMP_DATE_TIME
+ },
+ httpBindings: true,
+ xmlNamespace: options.xmlNamespace,
+ serviceNamespace: options.defaultNamespace
+ };
+ this.codec = new XmlCodec(settings);
+ this.serializer = new import_protocols9.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);
+ this.deserializer = new import_protocols9.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);
+ }
+ getPayloadCodec() {
+ return this.codec;
+ }
+ getShapeId() {
+ return "aws.protocols#restXml";
+ }
+ async serializeRequest(operationSchema, input, context) {
+ const request = await super.serializeRequest(operationSchema, input, context);
+ const inputSchema = import_schema11.NormalizedSchema.of(operationSchema.input);
+ if (!request.headers["content-type"]) {
+ const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
+ if (contentType) {
+ request.headers["content-type"] = contentType;
+ }
+ }
+ if (request.headers["content-type"] === this.getDefaultContentType()) {
+ if (typeof request.body === "string") {
+ request.body = '' + request.body;
+ }
}
+ return request;
}
- async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
- const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
- token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
- return token;
+ async deserializeResponse(operationSchema, context, response) {
+ return super.deserializeResponse(operationSchema, context, response);
+ }
+ async handleError(operationSchema, context, response, dataObject, metadata) {
+ const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
+ const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
+ const ns = import_schema11.NormalizedSchema.of(errorSchema);
+ const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
+ const ErrorCtor = import_schema11.TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
+ const exception = new ErrorCtor(message);
+ await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
+ const output = {};
+ for (const [name, member] of ns.structIterator()) {
+ const target = member.getMergedTraits().xmlName ?? name;
+ const value = dataObject.Error?.[target] ?? dataObject[target];
+ output[name] = this.codec.createDeserializer().readSchema(member, value);
+ }
+ throw Object.assign(exception, errorMetadata, {
+ $fault: ns.getMergedTraits().error,
+ message
+ }, output);
+ }
+ getDefaultContentType() {
+ return "application/xml";
}
};
- __name(_ConfiguredRetryStrategy, "ConfiguredRetryStrategy");
- var ConfiguredRetryStrategy = _ConfiguredRetryStrategy;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.jsjsd.jss
-var require_isStreamingPayload = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cj
+var require_dist_cjs24 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- exports.isStreamingPayload = undefined;
- var stream_1 = __require("stream");
- var isStreamingPayload = (request) => (request === null || request === undefined ? undefined : request.body) instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && (request === null || request === undefined ? undefined : request.body) instanceof ReadableStream;
- exports.isStreamingPayload = isStreamingPayload;
+ var tslib_1 = require_tslib();
+ tslib_1.__exportStar(require_client(), exports);
+ tslib_1.__exportStar(require_httpAuthSchemes(), exports);
+ tslib_1.__exportStar(require_protocols2(), exports);
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs35 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.jsfrom/node_modules/@smithy/is-array-buffer/dist-cjs/index.js
+var require_dist_cjs25 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -11592,574 +15238,56 @@ var require_dist_cjs35 = __commonJS((exports, module) => {
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
var src_exports = {};
__export2(src_exports, {
- AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,
- CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,
- CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,
- ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,
- ENV_RETRY_MODE: () => ENV_RETRY_MODE,
- NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
- NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,
- StandardRetryStrategy: () => StandardRetryStrategy,
- defaultDelayDecider: () => defaultDelayDecider,
- defaultRetryDecider: () => defaultRetryDecider,
- getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,
- getRetryAfterHint: () => getRetryAfterHint,
- getRetryPlugin: () => getRetryPlugin,
- omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,
- omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,
- resolveRetryConfig: () => resolveRetryConfig,
- retryMiddleware: () => retryMiddleware,
- retryMiddlewareOptions: () => retryMiddlewareOptions
+ isArrayBuffer: () => isArrayBuffer
});
module.exports = __toCommonJS(src_exports);
- var import_protocol_http = require_dist_cjs2();
- var import_uuid = require_dist();
- var import_util_retry = require_dist_cjs34();
- var getDefaultRetryQuota = __name((initialRetryTokens, options) => {
- const MAX_CAPACITY = initialRetryTokens;
- const noRetryIncrement = (options == null ? undefined : options.noRetryIncrement) ?? import_util_retry.NO_RETRY_INCREMENT;
- const retryCost = (options == null ? undefined : options.retryCost) ?? import_util_retry.RETRY_COST;
- const timeoutRetryCost = (options == null ? undefined : options.timeoutRetryCost) ?? import_util_retry.TIMEOUT_RETRY_COST;
- let availableCapacity = initialRetryTokens;
- const getCapacityAmount = __name((error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost, "getCapacityAmount");
- const hasRetryTokens = __name((error) => getCapacityAmount(error) <= availableCapacity, "hasRetryTokens");
- const retrieveRetryTokens = __name((error) => {
- if (!hasRetryTokens(error)) {
- throw new Error("No retry token available");
- }
- const capacityAmount = getCapacityAmount(error);
- availableCapacity -= capacityAmount;
- return capacityAmount;
- }, "retrieveRetryTokens");
- const releaseRetryTokens = __name((capacityReleaseAmount) => {
- availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
- availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
- }, "releaseRetryTokens");
- return Object.freeze({
- hasRetryTokens,
- retrieveRetryTokens,
- releaseRetryTokens
- });
- }, "getDefaultRetryQuota");
- var defaultDelayDecider = __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), "defaultDelayDecider");
- var import_service_error_classification = require_dist_cjs33();
- var defaultRetryDecider = __name((error) => {
- if (!error) {
- return false;
- }
- return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);
- }, "defaultRetryDecider");
- var asSdkError = __name((error) => {
- if (error instanceof Error)
- return error;
- if (error instanceof Object)
- return Object.assign(new Error, error);
- if (typeof error === "string")
- return new Error(error);
- return new Error(`AWS SDK error wrapper for ${error}`);
- }, "asSdkError");
- var _StandardRetryStrategy = class _StandardRetryStrategy2 {
- constructor(maxAttemptsProvider, options) {
- this.maxAttemptsProvider = maxAttemptsProvider;
- this.mode = import_util_retry.RETRY_MODES.STANDARD;
- this.retryDecider = (options == null ? undefined : options.retryDecider) ?? defaultRetryDecider;
- this.delayDecider = (options == null ? undefined : options.delayDecider) ?? defaultDelayDecider;
- this.retryQuota = (options == null ? undefined : options.retryQuota) ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);
- }
- shouldRetry(error, attempts, maxAttempts) {
- return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
- }
- async getMaxAttempts() {
- let maxAttempts;
- try {
- maxAttempts = await this.maxAttemptsProvider();
- } catch (error) {
- maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;
- }
- return maxAttempts;
- }
- async retry(next, args, options) {
- let retryTokenAmount;
- let attempts = 0;
- let totalDelay = 0;
- const maxAttempts = await this.getMaxAttempts();
- const { request } = args;
- if (import_protocol_http.HttpRequest.isInstance(request)) {
- request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();
- }
- while (true) {
- try {
- if (import_protocol_http.HttpRequest.isInstance(request)) {
- request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
- }
- if (options == null ? undefined : options.beforeRequest) {
- await options.beforeRequest();
- }
- const { response, output } = await next(args);
- if (options == null ? undefined : options.afterRequest) {
- options.afterRequest(response);
- }
- this.retryQuota.releaseRetryTokens(retryTokenAmount);
- output.$metadata.attempts = attempts + 1;
- output.$metadata.totalRetryDelay = totalDelay;
- return { response, output };
- } catch (e) {
- const err = asSdkError(e);
- attempts++;
- if (this.shouldRetry(err, attempts, maxAttempts)) {
- retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
- const delayFromDecider = this.delayDecider((0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE, attempts);
- const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
- const delay = Math.max(delayFromResponse || 0, delayFromDecider);
- totalDelay += delay;
- await new Promise((resolve) => setTimeout(resolve, delay));
- continue;
- }
- if (!err.$metadata) {
- err.$metadata = {};
- }
- err.$metadata.attempts = attempts;
- err.$metadata.totalRetryDelay = totalDelay;
- throw err;
- }
- }
- }
- };
- __name(_StandardRetryStrategy, "StandardRetryStrategy");
- var StandardRetryStrategy = _StandardRetryStrategy;
- var getDelayFromRetryAfterHeader = __name((response) => {
- if (!import_protocol_http.HttpResponse.isInstance(response))
- return;
- const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
- if (!retryAfterHeaderName)
- return;
- const retryAfter = response.headers[retryAfterHeaderName];
- const retryAfterSeconds = Number(retryAfter);
- if (!Number.isNaN(retryAfterSeconds))
- return retryAfterSeconds * 1000;
- const retryAfterDate = new Date(retryAfter);
- return retryAfterDate.getTime() - Date.now();
- }, "getDelayFromRetryAfterHeader");
- var _AdaptiveRetryStrategy = class _AdaptiveRetryStrategy2 extends StandardRetryStrategy {
- constructor(maxAttemptsProvider, options) {
- const { rateLimiter, ...superOptions } = options ?? {};
- super(maxAttemptsProvider, superOptions);
- this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter;
- this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;
- }
- async retry(next, args) {
- return super.retry(next, args, {
- beforeRequest: async () => {
- return this.rateLimiter.getSendToken();
- },
- afterRequest: (response) => {
- this.rateLimiter.updateClientSendingRate(response);
- }
- });
- }
- };
- __name(_AdaptiveRetryStrategy, "AdaptiveRetryStrategy");
- var AdaptiveRetryStrategy = _AdaptiveRetryStrategy;
- var import_util_middleware = require_dist_cjs20();
- var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
- var CONFIG_MAX_ATTEMPTS = "max_attempts";
- var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => {
- const value = env[ENV_MAX_ATTEMPTS];
- if (!value)
- return;
- const maxAttempt = parseInt(value);
- if (Number.isNaN(maxAttempt)) {
- throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
- }
- return maxAttempt;
- },
- configFileSelector: (profile) => {
- const value = profile[CONFIG_MAX_ATTEMPTS];
- if (!value)
- return;
- const maxAttempt = parseInt(value);
- if (Number.isNaN(maxAttempt)) {
- throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
- }
- return maxAttempt;
- },
- default: import_util_retry.DEFAULT_MAX_ATTEMPTS
- };
- var resolveRetryConfig = __name((input) => {
- const { retryStrategy } = input;
- const maxAttempts = (0, import_util_middleware.normalizeProvider)(input.maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS);
- return {
- ...input,
- maxAttempts,
- retryStrategy: async () => {
- if (retryStrategy) {
- return retryStrategy;
- }
- const retryMode = await (0, import_util_middleware.normalizeProvider)(input.retryMode)();
- if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) {
- return new import_util_retry.AdaptiveRetryStrategy(maxAttempts);
- }
- return new import_util_retry.StandardRetryStrategy(maxAttempts);
- }
- };
- }, "resolveRetryConfig");
- var ENV_RETRY_MODE = "AWS_RETRY_MODE";
- var CONFIG_RETRY_MODE = "retry_mode";
- var NODE_RETRY_MODE_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
- configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
- default: import_util_retry.DEFAULT_RETRY_MODE
- };
- var omitRetryHeadersMiddleware = __name(() => (next) => async (args) => {
- const { request } = args;
- if (import_protocol_http.HttpRequest.isInstance(request)) {
- delete request.headers[import_util_retry.INVOCATION_ID_HEADER];
- delete request.headers[import_util_retry.REQUEST_HEADER];
- }
- return next(args);
- }, "omitRetryHeadersMiddleware");
- var omitRetryHeadersMiddlewareOptions = {
- name: "omitRetryHeadersMiddleware",
- tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
- relation: "before",
- toMiddleware: "awsAuthMiddleware",
- override: true
- };
- var getOmitRetryHeadersPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
- }
- }), "getOmitRetryHeadersPlugin");
- var import_smithy_client = require_dist_cjs16();
- var import_isStreamingPayload = require_isStreamingPayload();
- var retryMiddleware = __name((options) => (next, context) => async (args) => {
- var _a;
- let retryStrategy = await options.retryStrategy();
- const maxAttempts = await options.maxAttempts();
- if (isRetryStrategyV2(retryStrategy)) {
- retryStrategy = retryStrategy;
- let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
- let lastError = new Error;
- let attempts = 0;
- let totalRetryDelay = 0;
- const { request } = args;
- const isRequest = import_protocol_http.HttpRequest.isInstance(request);
- if (isRequest) {
- request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();
- }
- while (true) {
- try {
- if (isRequest) {
- request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
- }
- const { response, output } = await next(args);
- retryStrategy.recordSuccess(retryToken);
- output.$metadata.attempts = attempts + 1;
- output.$metadata.totalRetryDelay = totalRetryDelay;
- return { response, output };
- } catch (e) {
- const retryErrorInfo = getRetryErrorInfo(e);
- lastError = asSdkError(e);
- if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {
- (_a = context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger) == null || _a.warn("An error was encountered in a non-retryable streaming request.");
- throw lastError;
- }
- try {
- retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
- } catch (refreshError) {
- if (!lastError.$metadata) {
- lastError.$metadata = {};
- }
- lastError.$metadata.attempts = attempts + 1;
- lastError.$metadata.totalRetryDelay = totalRetryDelay;
- throw lastError;
- }
- attempts = retryToken.getRetryCount();
- const delay = retryToken.getRetryDelay();
- totalRetryDelay += delay;
- await new Promise((resolve) => setTimeout(resolve, delay));
- }
- }
- } else {
- retryStrategy = retryStrategy;
- if (retryStrategy == null ? undefined : retryStrategy.mode)
- context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
- return retryStrategy.retry(next, args);
- }
- }, "retryMiddleware");
- var isRetryStrategyV2 = __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined", "isRetryStrategyV2");
- var getRetryErrorInfo = __name((error) => {
- const errorInfo = {
- errorType: getRetryErrorType(error)
- };
- const retryAfterHint = getRetryAfterHint(error.$response);
- if (retryAfterHint) {
- errorInfo.retryAfterHint = retryAfterHint;
- }
- return errorInfo;
- }, "getRetryErrorInfo");
- var getRetryErrorType = __name((error) => {
- if ((0, import_service_error_classification.isThrottlingError)(error))
- return "THROTTLING";
- if ((0, import_service_error_classification.isTransientError)(error))
- return "TRANSIENT";
- if ((0, import_service_error_classification.isServerError)(error))
- return "SERVER_ERROR";
- return "CLIENT_ERROR";
- }, "getRetryErrorType");
- var retryMiddlewareOptions = {
- name: "retryMiddleware",
- tags: ["RETRY"],
- step: "finalizeRequest",
- priority: "high",
- override: true
- };
- var getRetryPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
- }
- }), "getRetryPlugin");
- var getRetryAfterHint = __name((response) => {
- if (!import_protocol_http.HttpResponse.isInstance(response))
- return;
- const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
- if (!retryAfterHeaderName)
- return;
- const retryAfter = response.headers[retryAfterHeaderName];
- const retryAfterSeconds = Number(retryAfter);
- if (!Number.isNaN(retryAfterSeconds))
- return new Date(retryAfterSeconds * 1000);
- const retryAfterDate = new Date(retryAfter);
- return retryAfterDate;
- }, "getRetryAfterHint");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolve
-var require_getHomeDir = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getHomeDir = undefined;
- var os_1 = __require("os");
- var path_1 = __require("path");
- var homeDirCache = {};
- var getHomeDirCacheKey = () => {
- if (process && process.geteuid) {
- return `${process.geteuid()}`;
- }
- return "DEFAULT";
- };
- var getHomeDir2 = () => {
- const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
- if (HOME)
- return HOME;
- if (USERPROFILE)
- return USERPROFILE;
- if (HOMEPATH)
- return `${HOMEDRIVE}${HOMEPATH}`;
- const homeDirCacheKey = getHomeDirCacheKey();
- if (!homeDirCache[homeDirCacheKey])
- homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
- return homeDirCache[homeDirCacheKey];
- };
- exports.getHomeDir = getHomeDir2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.
-var require_getSSOTokenFilepath = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getSSOTokenFilepath = undefined;
- var crypto_1 = __require("crypto");
- var path_1 = __require("path");
- var getHomeDir_1 = require_getHomeDir();
- var getSSOTokenFilepath2 = (id) => {
- const hasher = (0, crypto_1.createHash)("sha1");
- const cacheName = hasher.update(id).digest("hex");
- return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`);
- };
- exports.getSSOTokenFilepath = getSSOTokenFilepath2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.
-var require_getSSOTokenFromFile = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getSSOTokenFromFile = undefined;
- var fs_1 = __require("fs");
- var getSSOTokenFilepath_1 = require_getSSOTokenFilepath();
- var { readFile } = fs_1.promises;
- var getSSOTokenFromFile2 = async (id) => {
- const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);
- const ssoTokenText = await readFile(ssoTokenFilepath, "utf8");
- return JSON.parse(ssoTokenText);
- };
- exports.getSSOTokenFromFile = getSSOTokenFromFile2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolv
-var require_slurpFile = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.slurpFile = undefined;
- var fs_1 = __require("fs");
- var { readFile } = fs_1.promises;
- var filePromisesHash = {};
- var slurpFile = (path, options) => {
- if (!filePromisesHash[path] || (options === null || options === undefined ? undefined : options.ignoreCache)) {
- filePromisesHash[path] = readFile(path, "utf8");
- }
- return filePromisesHash[path];
- };
- exports.slurpFile = slurpFile;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_dist_cjs36 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var isArrayBuffer = __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.jsfrom/node_modules/@smi
+var require_dist_cjs26 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
var src_exports = {};
__export2(src_exports, {
- CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,
- DEFAULT_PROFILE: () => DEFAULT_PROFILE,
- ENV_PROFILE: () => ENV_PROFILE,
- getProfileName: () => getProfileName,
- loadSharedConfigFiles: () => loadSharedConfigFiles,
- loadSsoSessionData: () => loadSsoSessionData,
- parseKnownFiles: () => parseKnownFiles
+ fromArrayBuffer: () => fromArrayBuffer,
+ fromString: () => fromString
});
module.exports = __toCommonJS(src_exports);
- __reExport(src_exports, require_getHomeDir(), module.exports);
- var ENV_PROFILE = "AWS_PROFILE";
- var DEFAULT_PROFILE = "default";
- var getProfileName = __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName");
- __reExport(src_exports, require_getSSOTokenFilepath(), module.exports);
- __reExport(src_exports, require_getSSOTokenFromFile(), module.exports);
- var import_types = require_dist_cjs();
- var getConfigData = __name((data) => Object.entries(data).filter(([key]) => {
- const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
- if (indexOfSeparator === -1) {
- return false;
- }
- return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator));
- }).reduce((acc, [key, value]) => {
- const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
- const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
- acc[updatedKey] = value;
- return acc;
- }, {
- ...data.default && { default: data.default }
- }), "getConfigData");
- var import_path = __require("path");
- var import_getHomeDir = require_getHomeDir();
- var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
- var getConfigFilepath = __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), ".aws", "config"), "getConfigFilepath");
- var import_getHomeDir2 = require_getHomeDir();
- var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
- var getCredentialsFilepath = __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), ".aws", "credentials"), "getCredentialsFilepath");
- var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
- var profileNameBlockList = ["__proto__", "profile __proto__"];
- var parseIni = __name((iniData) => {
- const map = {};
- let currentSection;
- let currentSubSection;
- for (const iniLine of iniData.split(/\r?\n/)) {
- const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
- const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
- if (isSection) {
- currentSection = undefined;
- currentSubSection = undefined;
- const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
- const matches = prefixKeyRegex.exec(sectionName);
- if (matches) {
- const [, prefix, , name] = matches;
- if (Object.values(import_types.IniSectionType).includes(prefix)) {
- currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
- }
- } else {
- currentSection = sectionName;
- }
- if (profileNameBlockList.includes(sectionName)) {
- throw new Error(`Found invalid profile name "${sectionName}"`);
- }
- } else if (currentSection) {
- const indexOfEqualsSign = trimmedLine.indexOf("=");
- if (![0, -1].includes(indexOfEqualsSign)) {
- const [name, value] = [
- trimmedLine.substring(0, indexOfEqualsSign).trim(),
- trimmedLine.substring(indexOfEqualsSign + 1).trim()
- ];
- if (value === "") {
- currentSubSection = name;
- } else {
- if (currentSubSection && iniLine.trimStart() === iniLine) {
- currentSubSection = undefined;
- }
- map[currentSection] = map[currentSection] || {};
- const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
- map[currentSection][key] = value;
- }
- }
- }
+ var import_is_array_buffer = require_dist_cjs25();
+ var import_buffer = __require("buffer");
+ var fromArrayBuffer = __name((input, offset = 0, length = input.byteLength - offset) => {
+ if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {
+ throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
}
- return map;
- }, "parseIni");
- var import_slurpFile = require_slurpFile();
- var swallowError = __name(() => ({}), "swallowError");
- var CONFIG_PREFIX_SEPARATOR = ".";
- var loadSharedConfigFiles = __name(async (init = {}) => {
- const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
- const parsedFiles = await Promise.all([
- (0, import_slurpFile.slurpFile)(configFilepath, {
- ignoreCache: init.ignoreCache
- }).then(parseIni).then(getConfigData).catch(swallowError),
- (0, import_slurpFile.slurpFile)(filepath, {
- ignoreCache: init.ignoreCache
- }).then(parseIni).catch(swallowError)
- ]);
- return {
- configFile: parsedFiles[0],
- credentialsFile: parsedFiles[1]
- };
- }, "loadSharedConfigFiles");
- var getSsoSessionData = __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.split(CONFIG_PREFIX_SEPARATOR)[1]]: value }), {}), "getSsoSessionData");
- var import_slurpFile2 = require_slurpFile();
- var swallowError2 = __name(() => ({}), "swallowError");
- var loadSsoSessionData = __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), "loadSsoSessionData");
- var mergeConfigFiles = __name((...files) => {
- const merged = {};
- for (const file of files) {
- for (const [key, values] of Object.entries(file)) {
- if (merged[key] !== undefined) {
- Object.assign(merged[key], values);
- } else {
- merged[key] = values;
- }
- }
+ return import_buffer.Buffer.from(input, offset, length);
+ }, "fromArrayBuffer");
+ var fromString = __name((input, encoding) => {
+ if (typeof input !== "string") {
+ throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
}
- return merged;
- }, "mergeConfigFiles");
- var parseKnownFiles = __name(async (init) => {
- const parsedFiles = await loadSharedConfigFiles(init);
- return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
- }, "parseKnownFiles");
+ return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);
+ }, "fromString");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.
-var require_dist_cjs37 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rul
+var require_dist_cjs27 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -12180,3569 +15308,5112 @@ var require_dist_cjs37 = __commonJS((exports, module) => {
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
var src_exports = {};
__export2(src_exports, {
- loadConfig: () => loadConfig
+ fromUtf8: () => fromUtf8,
+ toUint8Array: () => toUint8Array,
+ toUtf8: () => toUtf8
});
module.exports = __toCommonJS(src_exports);
- var import_property_provider = require_dist_cjs25();
- var fromEnv = __name((envVarSelector) => async () => {
- try {
- const config = envVarSelector(process.env);
- if (config === undefined) {
- throw new Error;
- }
- return config;
- } catch (e) {
- throw new import_property_provider.CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`);
+ var import_util_buffer_from = require_dist_cjs26();
+ var fromUtf8 = __name((input) => {
+ const buf = (0, import_util_buffer_from.fromString)(input, "utf8");
+ return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
+ }, "fromUtf8");
+ var toUint8Array = __name((data) => {
+ if (typeof data === "string") {
+ return fromUtf8(data);
}
- }, "fromEnv");
- var import_shared_ini_file_loader = require_dist_cjs36();
- var fromSharedConfigFiles = __name((configSelector, { preferredFile = "config", ...init } = {}) => async () => {
- const profile = (0, import_shared_ini_file_loader.getProfileName)(init);
- const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);
- const profileFromCredentials = credentialsFile[profile] || {};
- const profileFromConfig = configFile[profile] || {};
- const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
- try {
- const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
- const configValue = configSelector(mergedProfile, cfgFile);
- if (configValue === undefined) {
- throw new Error;
- }
- return configValue;
- } catch (e) {
- throw new import_property_provider.CredentialsProviderError(e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`);
+ if (ArrayBuffer.isView(data)) {
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
+ }
+ return new Uint8Array(data);
+ }, "toUint8Array");
+ var toUtf8 = __name((input) => {
+ if (typeof input === "string") {
+ return input;
}
- }, "fromSharedConfigFiles");
- var isFunction = __name((func) => typeof func === "function", "isFunction");
- var fromStatic = __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), "fromStatic");
- var loadConfig = __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, import_property_provider.memoize)((0, import_property_provider.chain)(fromEnv(environmentVariableSelector), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))), "loadConfig");
+ if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
+ throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");
+ }
+ return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
+ }, "toUtf8");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.jsjs
-var require_getEndpointUrlConfig = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
+var require_convertToBuffer = __commonJS((exports) => {
+ var convertToBuffer = function(data) {
+ if (data instanceof Uint8Array)
+ return data;
+ if (typeof data === "string") {
+ return fromUtf8(data);
+ }
+ if (ArrayBuffer.isView(data)) {
+ return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
+ }
+ return new Uint8Array(data);
+ };
Object.defineProperty(exports, "__esModule", { value: true });
- exports.getEndpointUrlConfig = undefined;
- var shared_ini_file_loader_1 = require_dist_cjs36();
- var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
- var CONFIG_ENDPOINT_URL = "endpoint_url";
- var getEndpointUrlConfig = (serviceId) => ({
- environmentVariableSelector: (env) => {
- const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
- const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
- if (serviceEndpointUrl)
- return serviceEndpointUrl;
- const endpointUrl = env[ENV_ENDPOINT_URL];
- if (endpointUrl)
- return endpointUrl;
- return;
- },
- configFileSelector: (profile, config) => {
- if (config && profile.services) {
- const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
- if (servicesSection) {
- const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
- const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
- if (endpointUrl2)
- return endpointUrl2;
- }
- }
- const endpointUrl = profile[CONFIG_ENDPOINT_URL];
- if (endpointUrl)
- return endpointUrl;
- return;
- },
- default: undefined
- });
- exports.getEndpointUrlConfig = getEndpointUrlConfig;
+ exports.convertToBuffer = undefined;
+ var util_utf8_1 = require_dist_cjs27();
+ var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
+ return Buffer.from(input, "utf8");
+ } : util_utf8_1.fromUtf8;
+ exports.convertToBuffer = convertToBuffer;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.jsjsd
-var require_getEndpointFromConfig = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_isEmptyData = __commonJS((exports) => {
+ var isEmptyData = function(data) {
+ if (typeof data === "string") {
+ return data.length === 0;
+ }
+ return data.byteLength === 0;
+ };
Object.defineProperty(exports, "__esModule", { value: true });
- exports.getEndpointFromConfig = undefined;
- var node_config_provider_1 = require_dist_cjs37();
- var getEndpointUrlConfig_1 = require_getEndpointUrlConfig();
- var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))();
- exports.getEndpointFromConfig = getEndpointFromConfig;
+ exports.isEmptyData = undefined;
+ exports.isEmptyData = isEmptyData;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rulese
-var require_dist_cjs38 = __commonJS((exports, module) => {
- var parseQueryString = function(querystring) {
- const query = {};
- querystring = querystring.replace(/^\?/, "");
- if (querystring) {
- for (const pair of querystring.split("&")) {
- let [key, value = null] = pair.split("=");
- key = decodeURIComponent(key);
- if (value) {
- value = decodeURIComponent(value);
- }
- if (!(key in query)) {
- query[key] = value;
- } else if (Array.isArray(query[key])) {
- query[key].push(value);
- } else {
- query[key] = [query[key], value];
- }
- }
- }
- return query;
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_numToUint8 = __commonJS((exports) => {
+ var numToUint8 = function(num) {
+ return new Uint8Array([
+ (num & 4278190080) >> 24,
+ (num & 16711680) >> 16,
+ (num & 65280) >> 8,
+ num & 255
+ ]);
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- parseQueryString: () => parseQueryString
- });
- module.exports = __toCommonJS(src_exports);
- __name(parseQueryString, "parseQueryString");
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.numToUint8 = undefined;
+ exports.numToUint8 = numToUint8;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var require_dist_cjs39 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
+var require_uint32ArrayFrom = __commonJS((exports) => {
+ var uint32ArrayFrom = function(a_lookUpTable) {
+ if (!Uint32Array.from) {
+ var return_array = new Uint32Array(a_lookUpTable.length);
+ var a_index = 0;
+ while (a_index < a_lookUpTable.length) {
+ return_array[a_index] = a_lookUpTable[a_index];
+ a_index += 1;
+ }
+ return return_array;
}
- return to;
+ return Uint32Array.from(a_lookUpTable);
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- parseUrl: () => parseUrl
- });
- module.exports = __toCommonJS(src_exports);
- var import_querystring_parser = require_dist_cjs38();
- var parseUrl = __name((url) => {
- if (typeof url === "string") {
- return parseUrl(new URL(url));
- }
- const { hostname, pathname, port, protocol, search } = url;
- let query;
- if (search) {
- query = (0, import_querystring_parser.parseQueryString)(search);
- }
- return {
- hostname,
- port: port ? parseInt(port) : undefined,
- protocol,
- path: pathname,
- query
- };
- }, "parseUrl");
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.uint32ArrayFrom = undefined;
+ exports.uint32ArrayFrom = uint32ArrayFrom;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs40 = __commonJS((exports, module) => {
- var getSerdePlugin = function(config, serializer, deserializer) {
- return {
- applyToStack: (commandStack) => {
- commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);
- commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);
- }
- };
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- deserializerMiddleware: () => deserializerMiddleware,
- deserializerMiddlewareOption: () => deserializerMiddlewareOption,
- getSerdePlugin: () => getSerdePlugin,
- serializerMiddleware: () => serializerMiddleware,
- serializerMiddlewareOption: () => serializerMiddlewareOption
- });
- module.exports = __toCommonJS(src_exports);
- var deserializerMiddleware = __name((options, deserializer) => (next, context) => async (args) => {
- const { response } = await next(args);
- try {
- const parsed = await deserializer(response, options);
- return {
- response,
- output: parsed
- };
- } catch (error) {
- Object.defineProperty(error, "$response", {
- value: response
- });
- if (!("$metadata" in error)) {
- const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.\$response on this object.`;
- error.message += "\n " + hint;
- }
- throw error;
- }
- }, "deserializerMiddleware");
- var serializerMiddleware = __name((options, serializer) => (next, context) => async (args) => {
- var _a;
- const endpoint = ((_a = context.endpointV2) == null ? undefined : _a.url) && options.urlParser ? async () => options.urlParser(context.endpointV2.url) : options.endpoint;
- if (!endpoint) {
- throw new Error("No valid endpoint provider available.");
- }
- const request = await serializer(args.input, { ...options, endpoint });
- return next({
- ...args,
- request
- });
- }, "serializerMiddleware");
- var deserializerMiddlewareOption = {
- name: "deserializerMiddleware",
- step: "deserialize",
- tags: ["DESERIALIZER"],
- override: true
- };
- var serializerMiddlewareOption = {
- name: "serializerMiddleware",
- step: "serialize",
- tags: ["SERIALIZER"],
- override: true
- };
- __name(getSerdePlugin, "getSerdePlugin");
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
+var require_main = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
+ var convertToBuffer_1 = require_convertToBuffer();
+ Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function() {
+ return convertToBuffer_1.convertToBuffer;
+ } });
+ var isEmptyData_1 = require_isEmptyData();
+ Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function() {
+ return isEmptyData_1.isEmptyData;
+ } });
+ var numToUint8_1 = require_numToUint8();
+ Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function() {
+ return numToUint8_1.numToUint8;
+ } });
+ var uint32ArrayFrom_1 = require_uint32ArrayFrom();
+ Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function() {
+ return uint32ArrayFrom_1.uint32ArrayFrom;
+ } });
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_dist_cjs41 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- endpointMiddleware: () => endpointMiddleware,
- endpointMiddlewareOptions: () => endpointMiddlewareOptions,
- getEndpointFromInstructions: () => getEndpointFromInstructions,
- getEndpointPlugin: () => getEndpointPlugin,
- resolveEndpointConfig: () => resolveEndpointConfig,
- resolveParams: () => resolveParams,
- toEndpointV1: () => toEndpointV1
- });
- module.exports = __toCommonJS(src_exports);
- var resolveParamsForS3 = __name(async (endpointParams) => {
- const bucket = (endpointParams == null ? undefined : endpointParams.Bucket) || "";
- if (typeof endpointParams.Bucket === "string") {
- endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
- }
- if (isArnBucketName(bucket)) {
- if (endpointParams.ForcePathStyle === true) {
- throw new Error("Path-style addressing cannot be used with ARN buckets");
- }
- } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
- endpointParams.ForcePathStyle = true;
- }
- if (endpointParams.DisableMultiRegionAccessPoints) {
- endpointParams.disableMultiRegionAccessPoints = true;
- endpointParams.DisableMRAP = true;
- }
- return endpointParams;
- }, "resolveParamsForS3");
- var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
- var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
- var DOTS_PATTERN = /\.\./;
- var isDnsCompatibleBucketName = __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), "isDnsCompatibleBucketName");
- var isArnBucketName = __name((bucketName) => {
- const [arn, partition, service, region, account, typeOrId] = bucketName.split(":");
- const isArn = arn === "arn" && bucketName.split(":").length >= 6;
- const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5;
- if (isArn && !isValidArn) {
- throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
- }
- return arn === "arn" && !!partition && !!service && !!account && !!typeOrId;
- }, "isArnBucketName");
- var createConfigValueProvider = __name((configKey, canonicalEndpointParamKey, config) => {
- const configProvider = __name(async () => {
- const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
- if (typeof configValue === "function") {
- return configValue();
- }
- return configValue;
- }, "configProvider");
- if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
- return async () => {
- const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
- const configValue = (credentials == null ? undefined : credentials.credentialScope) ?? (credentials == null ? undefined : credentials.CredentialScope);
- return configValue;
- };
- }
- if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
- return async () => {
- const endpoint = await configProvider();
- if (endpoint && typeof endpoint === "object") {
- if ("url" in endpoint) {
- return endpoint.url.href;
- }
- if ("hostname" in endpoint) {
- const { protocol, hostname, port, path } = endpoint;
- return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
- }
- }
- return endpoint;
- };
- }
- return configProvider;
- }, "createConfigValueProvider");
- var import_getEndpointFromConfig = require_getEndpointFromConfig();
- var import_url_parser = require_dist_cjs39();
- var toEndpointV1 = __name((endpoint) => {
- if (typeof endpoint === "object") {
- if ("url" in endpoint) {
- return (0, import_url_parser.parseUrl)(endpoint.url);
- }
- return endpoint;
- }
- return (0, import_url_parser.parseUrl)(endpoint);
- }, "toEndpointV1");
- var getEndpointFromInstructions = __name(async (commandInput, instructionsSupplier, clientConfig, context) => {
- if (!clientConfig.endpoint) {
- const endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId || "");
- if (endpointFromConfig) {
- clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
- }
- }
- const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
- if (typeof clientConfig.endpointProvider !== "function") {
- throw new Error("config.endpointProvider is not set.");
- }
- const endpoint = clientConfig.endpointProvider(endpointParams, context);
- return endpoint;
- }, "getEndpointFromInstructions");
- var resolveParams = __name(async (commandInput, instructionsSupplier, clientConfig) => {
- var _a;
- const endpointParams = {};
- const instructions = ((_a = instructionsSupplier == null ? undefined : instructionsSupplier.getEndpointParameterInstructions) == null ? undefined : _a.call(instructionsSupplier)) || {};
- for (const [name, instruction] of Object.entries(instructions)) {
- switch (instruction.type) {
- case "staticContextParams":
- endpointParams[name] = instruction.value;
- break;
- case "contextParams":
- endpointParams[name] = commandInput[instruction.name];
- break;
- case "clientContextParams":
- case "builtInParams":
- endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
- break;
- default:
- throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
- }
- }
- if (Object.keys(instructions).length === 0) {
- Object.assign(endpointParams, clientConfig);
- }
- if (String(clientConfig.serviceId).toLowerCase() === "s3") {
- await resolveParamsForS3(endpointParams);
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_aws_crc32c = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.AwsCrc32c = undefined;
+ var tslib_1 = require_tslib();
+ var util_1 = require_main();
+ var index_1 = require_main2();
+ var AwsCrc32c = function() {
+ function AwsCrc32c2() {
+ this.crc32c = new index_1.Crc32c;
}
- return endpointParams;
- }, "resolveParams");
- var import_util_middleware = require_dist_cjs20();
- var endpointMiddleware = __name(({
- config,
- instructions
- }) => {
- return (next, context) => async (args) => {
- var _a, _b, _c;
- const endpoint = await getEndpointFromInstructions(args.input, {
- getEndpointParameterInstructions() {
- return instructions;
- }
- }, { ...config }, context);
- context.endpointV2 = endpoint;
- context.authSchemes = (_a = endpoint.properties) == null ? undefined : _a.authSchemes;
- const authScheme = (_b = context.authSchemes) == null ? undefined : _b[0];
- if (authScheme) {
- context["signing_region"] = authScheme.signingRegion;
- context["signing_service"] = authScheme.signingName;
- const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
- const httpAuthOption = (_c = smithyContext == null ? undefined : smithyContext.selectedHttpAuthScheme) == null ? undefined : _c.httpAuthOption;
- if (httpAuthOption) {
- httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
- signing_region: authScheme.signingRegion,
- signingRegion: authScheme.signingRegion,
- signing_service: authScheme.signingName,
- signingName: authScheme.signingName,
- signingRegionSet: authScheme.signingRegionSet
- }, authScheme.properties);
- }
- }
- return next({
- ...args
+ AwsCrc32c2.prototype.update = function(toHash) {
+ if ((0, util_1.isEmptyData)(toHash))
+ return;
+ this.crc32c.update((0, util_1.convertToBuffer)(toHash));
+ };
+ AwsCrc32c2.prototype.digest = function() {
+ return tslib_1.__awaiter(this, undefined, undefined, function() {
+ return tslib_1.__generator(this, function(_a) {
+ return [2, (0, util_1.numToUint8)(this.crc32c.digest())];
+ });
});
};
- }, "endpointMiddleware");
- var import_middleware_serde = require_dist_cjs40();
- var endpointMiddlewareOptions = {
- step: "serialize",
- tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
- name: "endpointV2Middleware",
- override: true,
- relation: "before",
- toMiddleware: import_middleware_serde.serializerMiddlewareOption.name
- };
- var getEndpointPlugin = __name((config, instructions) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(endpointMiddleware({
- config,
- instructions
- }), endpointMiddlewareOptions);
- }
- }), "getEndpointPlugin");
- var resolveEndpointConfig = __name((input) => {
- const tls = input.tls ?? true;
- const { endpoint } = input;
- const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : undefined;
- const isCustomEndpoint = !!endpoint;
- return {
- ...input,
- endpoint: customEndpointProvider,
- tls,
- isCustomEndpoint,
- useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false),
- useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(input.useFipsEndpoint ?? false)
+ AwsCrc32c2.prototype.reset = function() {
+ this.crc32c = new index_1.Crc32c;
};
- }, "resolveEndpointConfig");
+ return AwsCrc32c2;
+ }();
+ exports.AwsCrc32c = AwsCrc32c;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/
-var require_dist_cjs42 = __commonJS((exports, module) => {
- var escapeAttribute = function(value) {
- return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """);
- };
- var escapeElement = function(value) {
- return value.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\r/g, "
").replace(/\n/g, "
").replace(/\u0085/g, "
").replace(/\u2028/, "
");
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- XmlNode: () => XmlNode,
- XmlText: () => XmlText
- });
- module.exports = __toCommonJS(src_exports);
- __name(escapeAttribute, "escapeAttribute");
- __name(escapeElement, "escapeElement");
- var _XmlText = class _XmlText2 {
- constructor(value) {
- this.value = value;
- }
- toString() {
- return escapeElement("" + this.value);
- }
- };
- __name(_XmlText, "XmlText");
- var XmlText = _XmlText;
- var _XmlNode = class _XmlNode2 {
- constructor(name, children = []) {
- this.name = name;
- this.children = children;
- this.attributes = {};
- }
- static of(name, childText, withName) {
- const node = new _XmlNode2(name);
- if (childText !== undefined) {
- node.addChildNode(new XmlText(childText));
- }
- if (withName !== undefined) {
- node.withName(withName);
- }
- return node;
- }
- withName(name) {
- this.name = name;
- return this;
- }
- addAttribute(name, value) {
- this.attributes[name] = value;
- return this;
- }
- addChildNode(child) {
- this.children.push(child);
- return this;
- }
- removeAttribute(name) {
- delete this.attributes[name];
- return this;
- }
- n(name) {
- this.name = name;
- return this;
- }
- c(child) {
- this.children.push(child);
- return this;
- }
- a(name, value) {
- if (value != null) {
- this.attributes[name] = value;
- }
- return this;
- }
- cc(input, field, withName = field) {
- if (input[field] != null) {
- const node = _XmlNode2.of(field, input[field]).withName(withName);
- this.c(node);
- }
- }
- l(input, listName, memberName, valueProvider) {
- if (input[listName] != null) {
- const nodes = valueProvider();
- nodes.map((node) => {
- node.withName(memberName);
- this.c(node);
- });
- }
- }
- lc(input, listName, memberName, valueProvider) {
- if (input[listName] != null) {
- const nodes = valueProvider();
- const containerNode = new _XmlNode2(memberName);
- nodes.map((node) => {
- containerNode.c(node);
- });
- this.c(containerNode);
- }
- }
- toString() {
- const hasChildren = Boolean(this.children.length);
- let xmlText = `<${this.name}`;
- const attributes = this.attributes;
- for (const attributeName of Object.keys(attributes)) {
- const attribute = attributes[attributeName];
- if (attribute != null) {
- xmlText += ` ${attributeName}="${escapeAttribute("" + attribute)}"`;
- }
- }
- return xmlText += !hasChildren ? "/>" : `>${this.children.map((c) => c.toString()).join("")}${this.name}>`;
- }
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submo
+var require_main2 = __commonJS((exports) => {
+ var crc32c = function(data) {
+ return new Crc32c().update(data).digest();
};
- __name(_XmlNode, "XmlNode");
- var XmlNode = _XmlNode;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/e
-var require_dist_cjs43 = __commonJS((exports, module) => {
- var convertHttpAuthSchemesToMap = function(httpAuthSchemes) {
- const map = new Map;
- for (const scheme of httpAuthSchemes) {
- map.set(scheme.schemeId, scheme);
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.AwsCrc32c = exports.Crc32c = exports.crc32c = undefined;
+ var tslib_1 = require_tslib();
+ var util_1 = require_main();
+ exports.crc32c = crc32c;
+ var Crc32c = function() {
+ function Crc32c2() {
+ this.checksum = 4294967295;
}
- return map;
- };
- var requestBuilder = function(input, context) {
- return new RequestBuilder(input, context);
- };
- var createPaginator = function(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {
- return __name(async function* paginateOperation(config, input, ...additionalArguments) {
- let token = config.startingToken || undefined;
- let hasNext = true;
- let page;
- while (hasNext) {
- input[inputTokenName] = token;
- if (pageSizeTokenName) {
- input[pageSizeTokenName] = input[pageSizeTokenName] ?? config.pageSize;
+ Crc32c2.prototype.update = function(data) {
+ var e_1, _a;
+ try {
+ for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
+ var byte = data_1_1.value;
+ this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
}
- if (config.client instanceof ClientCtor) {
- page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments);
- } else {
- throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);
+ } catch (e_1_1) {
+ e_1 = { error: e_1_1 };
+ } finally {
+ try {
+ if (data_1_1 && !data_1_1.done && (_a = data_1.return))
+ _a.call(data_1);
+ } finally {
+ if (e_1)
+ throw e_1.error;
}
- yield page;
- const prevToken = token;
- token = page[outputTokenName];
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
}
- return;
- }, "paginateOperation");
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
+ return this;
+ };
+ Crc32c2.prototype.digest = function() {
+ return (this.checksum ^ 4294967295) >>> 0;
+ };
+ return Crc32c2;
+ }();
+ exports.Crc32c = Crc32c;
+ var a_lookupTable = [
+ 0,
+ 4067132163,
+ 3778769143,
+ 324072436,
+ 3348797215,
+ 904991772,
+ 648144872,
+ 3570033899,
+ 2329499855,
+ 2024987596,
+ 1809983544,
+ 2575936315,
+ 1296289744,
+ 3207089363,
+ 2893594407,
+ 1578318884,
+ 274646895,
+ 3795141740,
+ 4049975192,
+ 51262619,
+ 3619967088,
+ 632279923,
+ 922689671,
+ 3298075524,
+ 2592579488,
+ 1760304291,
+ 2075979607,
+ 2312596564,
+ 1562183871,
+ 2943781820,
+ 3156637768,
+ 1313733451,
+ 549293790,
+ 3537243613,
+ 3246849577,
+ 871202090,
+ 3878099393,
+ 357341890,
+ 102525238,
+ 4101499445,
+ 2858735121,
+ 1477399826,
+ 1264559846,
+ 3107202533,
+ 1845379342,
+ 2677391885,
+ 2361733625,
+ 2125378298,
+ 820201905,
+ 3263744690,
+ 3520608582,
+ 598981189,
+ 4151959214,
+ 85089709,
+ 373468761,
+ 3827903834,
+ 3124367742,
+ 1213305469,
+ 1526817161,
+ 2842354314,
+ 2107672161,
+ 2412447074,
+ 2627466902,
+ 1861252501,
+ 1098587580,
+ 3004210879,
+ 2688576843,
+ 1378610760,
+ 2262928035,
+ 1955203488,
+ 1742404180,
+ 2511436119,
+ 3416409459,
+ 969524848,
+ 714683780,
+ 3639785095,
+ 205050476,
+ 4266873199,
+ 3976438427,
+ 526918040,
+ 1361435347,
+ 2739821008,
+ 2954799652,
+ 1114974503,
+ 2529119692,
+ 1691668175,
+ 2005155131,
+ 2247081528,
+ 3690758684,
+ 697762079,
+ 986182379,
+ 3366744552,
+ 476452099,
+ 3993867776,
+ 4250756596,
+ 255256311,
+ 1640403810,
+ 2477592673,
+ 2164122517,
+ 1922457750,
+ 2791048317,
+ 1412925310,
+ 1197962378,
+ 3037525897,
+ 3944729517,
+ 427051182,
+ 170179418,
+ 4165941337,
+ 746937522,
+ 3740196785,
+ 3451792453,
+ 1070968646,
+ 1905808397,
+ 2213795598,
+ 2426610938,
+ 1657317369,
+ 3053634322,
+ 1147748369,
+ 1463399397,
+ 2773627110,
+ 4215344322,
+ 153784257,
+ 444234805,
+ 3893493558,
+ 1021025245,
+ 3467647198,
+ 3722505002,
+ 797665321,
+ 2197175160,
+ 1889384571,
+ 1674398607,
+ 2443626636,
+ 1164749927,
+ 3070701412,
+ 2757221520,
+ 1446797203,
+ 137323447,
+ 4198817972,
+ 3910406976,
+ 461344835,
+ 3484808360,
+ 1037989803,
+ 781091935,
+ 3705997148,
+ 2460548119,
+ 1623424788,
+ 1939049696,
+ 2180517859,
+ 1429367560,
+ 2807687179,
+ 3020495871,
+ 1180866812,
+ 410100952,
+ 3927582683,
+ 4182430767,
+ 186734380,
+ 3756733383,
+ 763408580,
+ 1053836080,
+ 3434856499,
+ 2722870694,
+ 1344288421,
+ 1131464017,
+ 2971354706,
+ 1708204729,
+ 2545590714,
+ 2229949006,
+ 1988219213,
+ 680717673,
+ 3673779818,
+ 3383336350,
+ 1002577565,
+ 4010310262,
+ 493091189,
+ 238226049,
+ 4233660802,
+ 2987750089,
+ 1082061258,
+ 1395524158,
+ 2705686845,
+ 1972364758,
+ 2279892693,
+ 2494862625,
+ 1725896226,
+ 952904198,
+ 3399985413,
+ 3656866545,
+ 731699698,
+ 4283874585,
+ 222117402,
+ 510512622,
+ 3959836397,
+ 3280807620,
+ 837199303,
+ 582374963,
+ 3504198960,
+ 68661723,
+ 4135334616,
+ 3844915500,
+ 390545967,
+ 1230274059,
+ 3141532936,
+ 2825850620,
+ 1510247935,
+ 2395924756,
+ 2091215383,
+ 1878366691,
+ 2644384480,
+ 3553878443,
+ 565732008,
+ 854102364,
+ 3229815391,
+ 340358836,
+ 3861050807,
+ 4117890627,
+ 119113024,
+ 1493875044,
+ 2875275879,
+ 3090270611,
+ 1247431312,
+ 2660249211,
+ 1828433272,
+ 2141937292,
+ 2378227087,
+ 3811616794,
+ 291187481,
+ 34330861,
+ 4032846830,
+ 615137029,
+ 3603020806,
+ 3314634738,
+ 939183345,
+ 1776939221,
+ 2609017814,
+ 2295496738,
+ 2058945313,
+ 2926798794,
+ 1545135305,
+ 1330124605,
+ 3173225534,
+ 4084100981,
+ 17165430,
+ 307568514,
+ 3762199681,
+ 888469610,
+ 3332340585,
+ 3587147933,
+ 665062302,
+ 2042050490,
+ 2346497209,
+ 2559330125,
+ 1793573966,
+ 3190661285,
+ 1279665062,
+ 1595330642,
+ 2910671697
+ ];
+ var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookupTable);
+ var aws_crc32c_1 = require_aws_crc32c();
+ Object.defineProperty(exports, "AwsCrc32c", { enumerable: true, get: function() {
+ return aws_crc32c_1.AwsCrc32c;
+ } });
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_aws_crc32 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.AwsCrc32 = undefined;
+ var tslib_1 = require_tslib();
+ var util_1 = require_main();
+ var index_1 = require_main3();
+ var AwsCrc32 = function() {
+ function AwsCrc322() {
+ this.crc32 = new index_1.Crc32;
+ }
+ AwsCrc322.prototype.update = function(toHash) {
+ if ((0, util_1.isEmptyData)(toHash))
+ return;
+ this.crc32.update((0, util_1.convertToBuffer)(toHash));
+ };
+ AwsCrc322.prototype.digest = function() {
+ return tslib_1.__awaiter(this, undefined, undefined, function() {
+ return tslib_1.__generator(this, function(_a) {
+ return [2, (0, util_1.numToUint8)(this.crc32.digest())];
+ });
+ });
+ };
+ AwsCrc322.prototype.reset = function() {
+ this.crc32 = new index_1.Crc32;
+ };
+ return AwsCrc322;
+ }();
+ exports.AwsCrc32 = AwsCrc32;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var require_main3 = __commonJS((exports) => {
+ var crc32 = function(data) {
+ return new Crc32().update(data).digest();
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
+ var tslib_1 = require_tslib();
+ var util_1 = require_main();
+ exports.crc32 = crc32;
+ var Crc32 = function() {
+ function Crc322() {
+ this.checksum = 4294967295;
+ }
+ Crc322.prototype.update = function(data) {
+ var e_1, _a;
+ try {
+ for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
+ var byte = data_1_1.value;
+ this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
+ }
+ } catch (e_1_1) {
+ e_1 = { error: e_1_1 };
+ } finally {
+ try {
+ if (data_1_1 && !data_1_1.done && (_a = data_1.return))
+ _a.call(data_1);
+ } finally {
+ if (e_1)
+ throw e_1.error;
+ }
+ }
+ return this;
+ };
+ Crc322.prototype.digest = function() {
+ return (this.checksum ^ 4294967295) >>> 0;
+ };
+ return Crc322;
+ }();
+ exports.Crc32 = Crc32;
+ var a_lookUpTable = [
+ 0,
+ 1996959894,
+ 3993919788,
+ 2567524794,
+ 124634137,
+ 1886057615,
+ 3915621685,
+ 2657392035,
+ 249268274,
+ 2044508324,
+ 3772115230,
+ 2547177864,
+ 162941995,
+ 2125561021,
+ 3887607047,
+ 2428444049,
+ 498536548,
+ 1789927666,
+ 4089016648,
+ 2227061214,
+ 450548861,
+ 1843258603,
+ 4107580753,
+ 2211677639,
+ 325883990,
+ 1684777152,
+ 4251122042,
+ 2321926636,
+ 335633487,
+ 1661365465,
+ 4195302755,
+ 2366115317,
+ 997073096,
+ 1281953886,
+ 3579855332,
+ 2724688242,
+ 1006888145,
+ 1258607687,
+ 3524101629,
+ 2768942443,
+ 901097722,
+ 1119000684,
+ 3686517206,
+ 2898065728,
+ 853044451,
+ 1172266101,
+ 3705015759,
+ 2882616665,
+ 651767980,
+ 1373503546,
+ 3369554304,
+ 3218104598,
+ 565507253,
+ 1454621731,
+ 3485111705,
+ 3099436303,
+ 671266974,
+ 1594198024,
+ 3322730930,
+ 2970347812,
+ 795835527,
+ 1483230225,
+ 3244367275,
+ 3060149565,
+ 1994146192,
+ 31158534,
+ 2563907772,
+ 4023717930,
+ 1907459465,
+ 112637215,
+ 2680153253,
+ 3904427059,
+ 2013776290,
+ 251722036,
+ 2517215374,
+ 3775830040,
+ 2137656763,
+ 141376813,
+ 2439277719,
+ 3865271297,
+ 1802195444,
+ 476864866,
+ 2238001368,
+ 4066508878,
+ 1812370925,
+ 453092731,
+ 2181625025,
+ 4111451223,
+ 1706088902,
+ 314042704,
+ 2344532202,
+ 4240017532,
+ 1658658271,
+ 366619977,
+ 2362670323,
+ 4224994405,
+ 1303535960,
+ 984961486,
+ 2747007092,
+ 3569037538,
+ 1256170817,
+ 1037604311,
+ 2765210733,
+ 3554079995,
+ 1131014506,
+ 879679996,
+ 2909243462,
+ 3663771856,
+ 1141124467,
+ 855842277,
+ 2852801631,
+ 3708648649,
+ 1342533948,
+ 654459306,
+ 3188396048,
+ 3373015174,
+ 1466479909,
+ 544179635,
+ 3110523913,
+ 3462522015,
+ 1591671054,
+ 702138776,
+ 2966460450,
+ 3352799412,
+ 1504918807,
+ 783551873,
+ 3082640443,
+ 3233442989,
+ 3988292384,
+ 2596254646,
+ 62317068,
+ 1957810842,
+ 3939845945,
+ 2647816111,
+ 81470997,
+ 1943803523,
+ 3814918930,
+ 2489596804,
+ 225274430,
+ 2053790376,
+ 3826175755,
+ 2466906013,
+ 167816743,
+ 2097651377,
+ 4027552580,
+ 2265490386,
+ 503444072,
+ 1762050814,
+ 4150417245,
+ 2154129355,
+ 426522225,
+ 1852507879,
+ 4275313526,
+ 2312317920,
+ 282753626,
+ 1742555852,
+ 4189708143,
+ 2394877945,
+ 397917763,
+ 1622183637,
+ 3604390888,
+ 2714866558,
+ 953729732,
+ 1340076626,
+ 3518719985,
+ 2797360999,
+ 1068828381,
+ 1219638859,
+ 3624741850,
+ 2936675148,
+ 906185462,
+ 1090812512,
+ 3747672003,
+ 2825379669,
+ 829329135,
+ 1181335161,
+ 3412177804,
+ 3160834842,
+ 628085408,
+ 1382605366,
+ 3423369109,
+ 3138078467,
+ 570562233,
+ 1426400815,
+ 3317316542,
+ 2998733608,
+ 733239954,
+ 1555261956,
+ 3268935591,
+ 3050360625,
+ 752459403,
+ 1541320221,
+ 2607071920,
+ 3965973030,
+ 1969922972,
+ 40735498,
+ 2617837225,
+ 3943577151,
+ 1913087877,
+ 83908371,
+ 2512341634,
+ 3803740692,
+ 2075208622,
+ 213261112,
+ 2463272603,
+ 3855990285,
+ 2094854071,
+ 198958881,
+ 2262029012,
+ 4057260610,
+ 1759359992,
+ 534414190,
+ 2176718541,
+ 4139329115,
+ 1873836001,
+ 414664567,
+ 2282248934,
+ 4279200368,
+ 1711684554,
+ 285281116,
+ 2405801727,
+ 4167216745,
+ 1634467795,
+ 376229701,
+ 2685067896,
+ 3608007406,
+ 1308918612,
+ 956543938,
+ 2808555105,
+ 3495958263,
+ 1231636301,
+ 1047427035,
+ 2932959818,
+ 3654703836,
+ 1088359270,
+ 936918000,
+ 2847714899,
+ 3736837829,
+ 1202900863,
+ 817233897,
+ 3183342108,
+ 3401237130,
+ 1404277552,
+ 615818150,
+ 3134207493,
+ 3453421203,
+ 1423857449,
+ 601450431,
+ 3009837614,
+ 3294710456,
+ 1567103746,
+ 711928724,
+ 3020668471,
+ 3272380065,
+ 1510334235,
+ 755167117
+ ];
+ var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);
+ var aws_crc32_1 = require_aws_crc32();
+ Object.defineProperty(exports, "AwsCrc32", { enumerable: true, get: function() {
+ return aws_crc32_1.AwsCrc32;
+ } });
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.jsfro
+var require_getCrc32ChecksumAlgorithmFunction = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getCrc32ChecksumAlgorithmFunction = undefined;
+ var tslib_1 = require_tslib();
+ var crc32_1 = require_main3();
+ var util_1 = require_main();
+ var zlib = tslib_1.__importStar(__require("zlib"));
+
+ class NodeCrc32 {
+ checksum = 0;
+ update(data) {
+ this.checksum = zlib.crc32(data, this.checksum);
+ }
+ async digest() {
+ return (0, util_1.numToUint8)(this.checksum);
+ }
+ reset() {
+ this.checksum = 0;
+ }
+ }
+ var getCrc32ChecksumAlgorithmFunction = () => {
+ if (typeof zlib.crc32 === "undefined") {
+ return crc32_1.AwsCrc32;
+ }
+ return NodeCrc32;
+ };
+ exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/end
+var require_dist_cjs28 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ CONFIG_REQUEST_CHECKSUM_CALCULATION: () => CONFIG_REQUEST_CHECKSUM_CALCULATION,
+ CONFIG_RESPONSE_CHECKSUM_VALIDATION: () => CONFIG_RESPONSE_CHECKSUM_VALIDATION,
+ ChecksumAlgorithm: () => ChecksumAlgorithm,
+ ChecksumLocation: () => ChecksumLocation,
+ DEFAULT_CHECKSUM_ALGORITHM: () => DEFAULT_CHECKSUM_ALGORITHM,
+ DEFAULT_REQUEST_CHECKSUM_CALCULATION: () => DEFAULT_REQUEST_CHECKSUM_CALCULATION,
+ DEFAULT_RESPONSE_CHECKSUM_VALIDATION: () => DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
+ ENV_REQUEST_CHECKSUM_CALCULATION: () => ENV_REQUEST_CHECKSUM_CALCULATION,
+ ENV_RESPONSE_CHECKSUM_VALIDATION: () => ENV_RESPONSE_CHECKSUM_VALIDATION,
+ NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: () => NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,
+ NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: () => NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,
+ RequestChecksumCalculation: () => RequestChecksumCalculation,
+ ResponseChecksumValidation: () => ResponseChecksumValidation,
+ crc64NvmeCrtContainer: () => crc64NvmeCrtContainer,
+ flexibleChecksumsMiddleware: () => flexibleChecksumsMiddleware,
+ flexibleChecksumsMiddlewareOptions: () => flexibleChecksumsMiddlewareOptions,
+ getFlexibleChecksumsPlugin: () => getFlexibleChecksumsPlugin,
+ resolveFlexibleChecksumsConfig: () => resolveFlexibleChecksumsConfig
+ });
+ module.exports = __toCommonJS(index_exports);
+ var RequestChecksumCalculation = {
+ WHEN_SUPPORTED: "WHEN_SUPPORTED",
+ WHEN_REQUIRED: "WHEN_REQUIRED"
+ };
+ var DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;
+ var ResponseChecksumValidation = {
+ WHEN_SUPPORTED: "WHEN_SUPPORTED",
+ WHEN_REQUIRED: "WHEN_REQUIRED"
+ };
+ var DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;
+ var ChecksumAlgorithm = ((ChecksumAlgorithm3) => {
+ ChecksumAlgorithm3["MD5"] = "MD5";
+ ChecksumAlgorithm3["CRC32"] = "CRC32";
+ ChecksumAlgorithm3["CRC32C"] = "CRC32C";
+ ChecksumAlgorithm3["CRC64NVME"] = "CRC64NVME";
+ ChecksumAlgorithm3["SHA1"] = "SHA1";
+ ChecksumAlgorithm3["SHA256"] = "SHA256";
+ return ChecksumAlgorithm3;
+ })(ChecksumAlgorithm || {});
+ var ChecksumLocation = ((ChecksumLocation2) => {
+ ChecksumLocation2["HEADER"] = "header";
+ ChecksumLocation2["TRAILER"] = "trailer";
+ return ChecksumLocation2;
+ })(ChecksumLocation || {});
+ var DEFAULT_CHECKSUM_ALGORITHM = "CRC32";
+ var stringUnionSelector = __name((obj, key, union, type) => {
+ if (!(key in obj))
+ return;
+ const value = obj[key].toUpperCase();
+ if (!Object.values(union).includes(value)) {
+ throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`);
+ }
+ return value;
+ }, "stringUnionSelector");
+ var ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
+ var CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
+ var NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
+ environmentVariableSelector: __name((env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "env"), "environmentVariableSelector"),
+ configFileSelector: __name((profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, "shared config entry"), "configFileSelector"),
+ default: DEFAULT_REQUEST_CHECKSUM_CALCULATION
+ };
+ var ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
+ var CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
+ var NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
+ environmentVariableSelector: __name((env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "env"), "environmentVariableSelector"),
+ configFileSelector: __name((profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, "shared config entry"), "configFileSelector"),
+ default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION
+ };
+ var crc64NvmeCrtContainer = {
+ CrtCrc64Nvme: null
+ };
+ var import_core = require_dist_cjs24();
+ var import_protocol_http = require_dist_cjs2();
+ var import_util_stream = require_dist_cjs15();
+ var CLIENT_SUPPORTED_ALGORITHMS = [
+ "CRC32",
+ "CRC32C",
+ "CRC64NVME",
+ "SHA1",
+ "SHA256"
+ ];
+ var PRIORITY_ORDER_ALGORITHMS = [
+ "SHA256",
+ "SHA1",
+ "CRC32",
+ "CRC32C",
+ "CRC64NVME"
+ ];
+ var getChecksumAlgorithmForRequest = __name((input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {
+ if (!requestAlgorithmMember) {
+ return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired ? DEFAULT_CHECKSUM_ALGORITHM : undefined;
+ }
+ if (!input[requestAlgorithmMember]) {
+ return;
+ }
+ const checksumAlgorithm = input[requestAlgorithmMember];
+ if (!CLIENT_SUPPORTED_ALGORITHMS.includes(checksumAlgorithm)) {
+ throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.`);
+ }
+ return checksumAlgorithm;
+ }, "getChecksumAlgorithmForRequest");
+ var getChecksumLocationName = __name((algorithm) => algorithm === "MD5" ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName");
+ var hasHeader = __name((header, headers) => {
+ const soughtHeader = header.toLowerCase();
+ for (const headerName of Object.keys(headers)) {
+ if (soughtHeader === headerName.toLowerCase()) {
+ return true;
+ }
+ }
+ return false;
+ }, "hasHeader");
+ var hasHeaderWithPrefix = __name((headerPrefix, headers) => {
+ const soughtHeaderPrefix = headerPrefix.toLowerCase();
+ for (const headerName of Object.keys(headers)) {
+ if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {
+ return true;
+ }
+ }
+ return false;
+ }, "hasHeaderWithPrefix");
+ var import_is_array_buffer = require_dist_cjs6();
+ var isStreaming = __name((body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !(0, import_is_array_buffer.isArrayBuffer)(body), "isStreaming");
+ var import_crc32c = require_main2();
+ var import_getCrc32ChecksumAlgorithmFunction = require_getCrc32ChecksumAlgorithmFunction();
+ var selectChecksumAlgorithmFunction = __name((checksumAlgorithm, config) => {
+ switch (checksumAlgorithm) {
+ case "MD5":
+ return config.md5;
+ case "CRC32":
+ return (0, import_getCrc32ChecksumAlgorithmFunction.getCrc32ChecksumAlgorithmFunction)();
+ case "CRC32C":
+ return import_crc32c.AwsCrc32c;
+ case "CRC64NVME":
+ if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") {
+ throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
+You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";].
+For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
+ }
+ return crc64NvmeCrtContainer.CrtCrc64Nvme;
+ case "SHA1":
+ return config.sha1;
+ case "SHA256":
+ return config.sha256;
+ default:
+ throw new Error(`Unsupported checksum algorithm: ${checksumAlgorithm}`);
+ }
+ }, "selectChecksumAlgorithmFunction");
+ var import_util_utf8 = require_dist_cjs8();
+ var stringHasher = __name((checksumAlgorithmFn, body) => {
+ const hash = new checksumAlgorithmFn;
+ hash.update((0, import_util_utf8.toUint8Array)(body || ""));
+ return hash.digest();
+ }, "stringHasher");
+ var flexibleChecksumsMiddlewareOptions = {
+ name: "flexibleChecksumsMiddleware",
+ step: "build",
+ tags: ["BODY_CHECKSUM"],
+ override: true
+ };
+ var flexibleChecksumsMiddleware = __name((config, middlewareConfig) => (next, context) => async (args) => {
+ if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
+ return next(args);
+ }
+ if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) {
+ return next(args);
+ }
+ const { request, input } = args;
+ const { body: requestBody, headers } = request;
+ const { base64Encoder, streamHasher } = config;
+ const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;
+ const requestChecksumCalculation = await config.requestChecksumCalculation();
+ const requestAlgorithmMemberName = requestAlgorithmMember?.name;
+ const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;
+ if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {
+ if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {
+ input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;
+ if (requestAlgorithmMemberHttpHeader) {
+ headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;
+ }
+ }
+ }
+ const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {
+ requestChecksumRequired,
+ requestAlgorithmMember: requestAlgorithmMember?.name,
+ requestChecksumCalculation
+ });
+ let updatedBody = requestBody;
+ let updatedHeaders = headers;
+ if (checksumAlgorithm) {
+ switch (checksumAlgorithm) {
+ case "CRC32":
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U");
+ break;
+ case "CRC32C":
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V");
+ break;
+ case "CRC64NVME":
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W");
+ break;
+ case "SHA1":
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X");
+ break;
+ case "SHA256":
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y");
+ break;
+ }
+ const checksumLocationName = getChecksumLocationName(checksumAlgorithm);
+ const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);
+ if (isStreaming(requestBody)) {
+ const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
+ updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024 ? (0, import_util_stream.createBufferedReadable)(requestBody, config.requestStreamBufferSize, context.logger) : requestBody, {
+ base64Encoder,
+ bodyLengthChecker,
+ checksumLocationName,
+ checksumAlgorithmFn,
+ streamHasher
+ });
+ updatedHeaders = {
+ ...headers,
+ "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked",
+ "transfer-encoding": "chunked",
+ "x-amz-decoded-content-length": headers["content-length"],
+ "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
+ "x-amz-trailer": checksumLocationName
+ };
+ delete updatedHeaders["content-length"];
+ } else if (!hasHeader(checksumLocationName, headers)) {
+ const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);
+ updatedHeaders = {
+ ...headers,
+ [checksumLocationName]: base64Encoder(rawChecksum)
+ };
+ }
+ }
+ const result = await next({
+ ...args,
+ request: {
+ ...request,
+ headers: updatedHeaders,
+ body: updatedBody
+ }
+ });
+ return result;
+ }, "flexibleChecksumsMiddleware");
+ var flexibleChecksumsInputMiddlewareOptions = {
+ name: "flexibleChecksumsInputMiddleware",
+ toMiddleware: "serializerMiddleware",
+ relation: "before",
+ tags: ["BODY_CHECKSUM"],
+ override: true
+ };
+ var flexibleChecksumsInputMiddleware = __name((config, middlewareConfig) => (next, context) => async (args) => {
+ const input = args.input;
+ const { requestValidationModeMember } = middlewareConfig;
+ const requestChecksumCalculation = await config.requestChecksumCalculation();
+ const responseChecksumValidation = await config.responseChecksumValidation();
+ switch (requestChecksumCalculation) {
+ case RequestChecksumCalculation.WHEN_REQUIRED:
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a");
+ break;
+ case RequestChecksumCalculation.WHEN_SUPPORTED:
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z");
+ break;
+ }
+ switch (responseChecksumValidation) {
+ case ResponseChecksumValidation.WHEN_REQUIRED:
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c");
+ break;
+ case ResponseChecksumValidation.WHEN_SUPPORTED:
+ (0, import_core.setFeature)(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b");
+ break;
+ }
+ if (requestValidationModeMember && !input[requestValidationModeMember]) {
+ if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {
+ input[requestValidationModeMember] = "ENABLED";
+ }
+ }
+ return next(args);
+ }, "flexibleChecksumsInputMiddleware");
+ var getChecksumAlgorithmListForResponse = __name((responseAlgorithms = []) => {
+ const validChecksumAlgorithms = [];
+ for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {
+ if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {
+ continue;
+ }
+ validChecksumAlgorithms.push(algorithm);
+ }
+ return validChecksumAlgorithms;
+ }, "getChecksumAlgorithmListForResponse");
+ var isChecksumWithPartNumber = __name((checksum) => {
+ const lastHyphenIndex = checksum.lastIndexOf("-");
+ if (lastHyphenIndex !== -1) {
+ const numberPart = checksum.slice(lastHyphenIndex + 1);
+ if (!numberPart.startsWith("0")) {
+ const number = parseInt(numberPart, 10);
+ if (!isNaN(number) && number >= 1 && number <= 1e4) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }, "isChecksumWithPartNumber");
+ var getChecksum = __name(async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body)), "getChecksum");
+ var validateChecksumFromResponse = __name(async (response, { config, responseAlgorithms, logger: logger4 }) => {
+ const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);
+ const { body: responseBody, headers: responseHeaders } = response;
+ for (const algorithm of checksumAlgorithms) {
+ const responseHeader = getChecksumLocationName(algorithm);
+ const checksumFromResponse = responseHeaders[responseHeader];
+ if (checksumFromResponse) {
+ let checksumAlgorithmFn;
+ try {
+ checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);
+ } catch (error) {
+ if (algorithm === "CRC64NVME") {
+ logger4?.warn(`Skipping ${"CRC64NVME"} checksum validation: ${error.message}`);
+ continue;
+ }
+ throw error;
+ }
+ const { base64Encoder } = config;
+ if (isStreaming(responseBody)) {
+ response.body = (0, import_util_stream.createChecksumStream)({
+ expectedChecksum: checksumFromResponse,
+ checksumSourceLocation: responseHeader,
+ checksum: new checksumAlgorithmFn,
+ source: responseBody,
+ base64Encoder
+ });
+ return;
+ }
+ const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });
+ if (checksum === checksumFromResponse) {
+ break;
+ }
+ throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`);
+ }
+ }
+ }, "validateChecksumFromResponse");
+ var flexibleChecksumsResponseMiddlewareOptions = {
+ name: "flexibleChecksumsResponseMiddleware",
+ toMiddleware: "deserializerMiddleware",
+ relation: "after",
+ tags: ["BODY_CHECKSUM"],
+ override: true
+ };
+ var flexibleChecksumsResponseMiddleware = __name((config, middlewareConfig) => (next, context) => async (args) => {
+ if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
+ return next(args);
+ }
+ const input = args.input;
+ const result = await next(args);
+ const response = result.response;
+ const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;
+ if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") {
+ const { clientName, commandName } = context;
+ const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {
+ const responseHeader = getChecksumLocationName(algorithm);
+ const checksumFromResponse = response.headers[responseHeader];
+ return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);
+ });
+ if (isS3WholeObjectMultipartGetResponseChecksum) {
+ return result;
+ }
+ await validateChecksumFromResponse(response, {
+ config,
+ responseAlgorithms,
+ logger: context.logger
+ });
+ }
+ return result;
+ }, "flexibleChecksumsResponseMiddleware");
+ var getFlexibleChecksumsPlugin = __name((config, middlewareConfig) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);
+ clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);
+ clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);
+ }, "applyToStack")
+ }), "getFlexibleChecksumsPlugin");
+ var import_util_middleware = require_dist_cjs4();
+ var resolveFlexibleChecksumsConfig = __name((input) => {
+ const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;
+ return Object.assign(input, {
+ requestChecksumCalculation: (0, import_util_middleware.normalizeProvider)(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),
+ responseChecksumValidation: (0, import_util_middleware.normalizeProvider)(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),
+ requestStreamBufferSize: Number(requestStreamBufferSize ?? 0)
+ });
+ }, "resolveFlexibleChecksumsConfig");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-o
+var require_dist_cjs29 = __commonJS((exports, module) => {
+ var resolveHostHeaderConfig = function(input) {
+ return input;
+ };
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ getHostHeaderPlugin: () => getHostHeaderPlugin,
+ hostHeaderMiddleware: () => hostHeaderMiddleware,
+ hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,
+ resolveHostHeaderConfig: () => resolveHostHeaderConfig
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_protocol_http = require_dist_cjs2();
+ __name(resolveHostHeaderConfig, "resolveHostHeaderConfig");
+ var hostHeaderMiddleware = __name((options) => (next) => async (args) => {
+ if (!import_protocol_http.HttpRequest.isInstance(args.request))
+ return next(args);
+ const { request } = args;
+ const { handlerProtocol = "" } = options.requestHandler.metadata || {};
+ if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
+ delete request.headers["host"];
+ request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
+ } else if (!request.headers["host"]) {
+ let host = request.hostname;
+ if (request.port != null)
+ host += `:${request.port}`;
+ request.headers["host"] = host;
+ }
+ return next(args);
+ }, "hostHeaderMiddleware");
+ var hostHeaderMiddlewareOptions = {
+ name: "hostHeaderMiddleware",
+ step: "build",
+ priority: "low",
+ tags: ["HOST"],
+ override: true
+ };
+ var getHostHeaderPlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
+ }, "applyToStack")
+ }), "getHostHeaderPlugin");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/
+var require_dist_cjs30 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ getLoggerPlugin: () => getLoggerPlugin,
+ loggerMiddleware: () => loggerMiddleware,
+ loggerMiddlewareOptions: () => loggerMiddlewareOptions
+ });
+ module.exports = __toCommonJS(index_exports);
+ var loggerMiddleware = __name(() => (next, context) => async (args) => {
+ try {
+ const response = await next(args);
+ const { clientName, commandName, logger: logger4, dynamoDbDocumentClientOptions = {} } = context;
+ const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
+ const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
+ const { $metadata, ...outputWithoutMetadata } = response.output;
+ logger4?.info?.({
+ clientName,
+ commandName,
+ input: inputFilterSensitiveLog(args.input),
+ output: outputFilterSensitiveLog(outputWithoutMetadata),
+ metadata: $metadata
+ });
+ return response;
+ } catch (error) {
+ const { clientName, commandName, logger: logger4, dynamoDbDocumentClientOptions = {} } = context;
+ const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
+ logger4?.error?.({
+ clientName,
+ commandName,
+ input: inputFilterSensitiveLog(args.input),
+ error,
+ metadata: error.$metadata
+ });
+ throw error;
+ }
+ }, "loggerMiddleware");
+ var loggerMiddlewareOptions = {
+ name: "loggerMiddleware",
+ tags: ["LOGGER"],
+ step: "initialize",
+ override: true
+ };
+ var getLoggerPlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
+ }, "applyToStack")
+ }), "getLoggerPlugin");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/s
+var require_invoke_store = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.InvokeStore = undefined;
+ var async_hooks_1 = __require("async_hooks");
+ var noGlobalAwsLambda = process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "1" || process.env["AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA"] === "true";
+ if (!noGlobalAwsLambda) {
+ globalThis.awslambda = globalThis.awslambda || {};
+ }
+ var PROTECTED_KEYS = {
+ REQUEST_ID: Symbol("_AWS_LAMBDA_REQUEST_ID"),
+ X_RAY_TRACE_ID: Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID")
+ };
+
+ class InvokeStoreImpl {
+ static storage = new async_hooks_1.AsyncLocalStorage;
+ static PROTECTED_KEYS = PROTECTED_KEYS;
+ static run(context, fn) {
+ return this.storage.run({ ...context }, fn);
+ }
+ static getContext() {
+ return this.storage.getStore();
+ }
+ static get(key) {
+ const context = this.storage.getStore();
+ return context?.[key];
+ }
+ static set(key, value) {
+ if (this.isProtectedKey(key)) {
+ throw new Error(`Cannot modify protected Lambda context field`);
+ }
+ const context = this.storage.getStore();
+ if (context) {
+ context[key] = value;
+ }
+ }
+ static getRequestId() {
+ return this.get(this.PROTECTED_KEYS.REQUEST_ID) ?? "-";
+ }
+ static getXRayTraceId() {
+ return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID);
+ }
+ static hasContext() {
+ return this.storage.getStore() !== undefined;
+ }
+ static isProtectedKey(key) {
+ return key === this.PROTECTED_KEYS.REQUEST_ID || key === this.PROTECTED_KEYS.X_RAY_TRACE_ID;
+ }
+ }
+ var instance;
+ if (!noGlobalAwsLambda && globalThis.awslambda?.InvokeStore) {
+ instance = globalThis.awslambda.InvokeStore;
+ } else {
+ instance = InvokeStoreImpl;
+ if (!noGlobalAwsLambda && globalThis.awslambda) {
+ globalThis.awslambda.InvokeStore = instance;
+ }
+ }
+ exports.InvokeStore = instance;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.j
+var require_recursionDetectionMiddleware = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.recursionDetectionMiddleware = undefined;
+ var lambda_invoke_store_1 = require_invoke_store();
+ var protocol_http_1 = require_dist_cjs2();
+ var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
+ var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
+ var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
+ var recursionDetectionMiddleware2 = () => (next) => async (args) => {
+ const { request } = args;
+ if (!protocol_http_1.HttpRequest.isInstance(request)) {
+ return next(args);
+ }
+ const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
+ if (request.headers.hasOwnProperty(traceIdHeader)) {
+ return next(args);
+ }
+ const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
+ const traceIdFromEnv = process.env[ENV_TRACE_ID];
+ const traceIdFromInvokeStore = lambda_invoke_store_1.InvokeStore.getXRayTraceId();
+ const traceId = traceIdFromInvokeStore ?? traceIdFromEnv;
+ const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
+ if (nonEmptyString(functionName) && nonEmptyString(traceId)) {
+ request.headers[TRACE_ID_HEADER_NAME] = traceId;
+ }
+ return next({
+ ...args,
+ request
+ });
+ };
+ exports.recursionDetectionMiddleware = recursionDetectionMiddleware2;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endp
+var require_dist_cjs31 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ getRecursionDetectionPlugin: () => getRecursionDetectionPlugin
+ });
+ module.exports = __toCommonJS(index_exports);
+ var recursionDetectionMiddlewareOptions = {
+ step: "build",
+ tags: ["RECURSION_DETECTION"],
+ name: "recursionDetectionMiddleware",
+ override: true,
+ priority: "low"
+ };
+ var import_recursionDetectionMiddleware = require_recursionDetectionMiddleware();
+ var getRecursionDetectionPlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add((0, import_recursionDetectionMiddleware.recursionDetectionMiddleware)(), recursionDetectionMiddlewareOptions);
+ }, "applyToStack")
+ }), "getRecursionDetectionPlugin");
+ __reExport(index_exports, require_recursionDetectionMiddleware(), module.exports);
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
+var require_dist_cjs32 = __commonJS((exports) => {
+ var booleanSelector = (obj, key, type) => {
+ if (!(key in obj))
+ return;
+ if (obj[key] === "true")
+ return true;
+ if (obj[key] === "false")
+ return false;
+ throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
+ };
+ var numberSelector = (obj, key, type) => {
+ if (!(key in obj))
+ return;
+ const numberValue = parseInt(obj[key], 10);
+ if (Number.isNaN(numberValue)) {
+ throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);
+ }
+ return numberValue;
+ };
+ exports.SelectorType = undefined;
+ (function(SelectorType) {
+ SelectorType["ENV"] = "env";
+ SelectorType["CONFIG"] = "shared config entry";
+ })(exports.SelectorType || (exports.SelectorType = {}));
+ exports.booleanSelector = booleanSelector;
+ exports.numberSelector = numberSelector;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs33 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ build: () => build,
+ parse: () => parse,
+ validate: () => validate
+ });
+ module.exports = __toCommonJS(index_exports);
+ var validate = __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate");
+ var parse = __name((arn) => {
+ const segments = arn.split(":");
+ if (segments.length < 6 || segments[0] !== "arn")
+ throw new Error("Malformed ARN");
+ const [
+ ,
+ partition,
+ service,
+ region,
+ accountId,
+ ...resource
+ ] = segments;
+ return {
+ partition,
+ service,
+ region,
+ accountId,
+ resource: resource.join(":")
+ };
+ }, "parse");
+ var build = __name((arnObject) => {
+ const { partition = "aws", service, region, accountId, resource } = arnObject;
+ if ([service, region, accountId, resource].some((segment) => typeof segment !== "string")) {
+ throw new Error("Input ARN object is invalid");
+ }
+ return `arn:${partition}:${service}:${region}:${accountId}:${resource}`;
+ }, "build");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/
+var require_dist_cjs34 = __commonJS((exports, module) => {
+ var checkContentLengthHeader = function() {
+ return (next, context) => async (args) => {
+ const { request } = args;
+ if (import_protocol_http.HttpRequest.isInstance(request)) {
+ if (!(CONTENT_LENGTH_HEADER in request.headers) && !(DECODED_CONTENT_LENGTH_HEADER in request.headers)) {
+ const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`;
+ if (typeof context?.logger?.warn === "function" && !(context.logger instanceof import_smithy_client.NoOpLogger)) {
+ context.logger.warn(message);
+ } else {
+ console.warn(message);
+ }
+ }
+ }
+ return next({ ...args });
+ };
+ };
+ var regionRedirectMiddleware = function(clientConfig) {
+ return (next, context) => async (args) => {
+ try {
+ return await next(args);
+ } catch (err) {
+ if (clientConfig.followRegionRedirects) {
+ const statusCode = err?.$metadata?.httpStatusCode;
+ const isHeadBucket = context.commandName === "HeadBucketCommand";
+ const bucketRegionHeader = err?.$response?.headers?.["x-amz-bucket-region"];
+ if (bucketRegionHeader) {
+ if (statusCode === 301 || statusCode === 400 && (err?.name === "IllegalLocationConstraintException" || isHeadBucket)) {
+ try {
+ const actualRegion = bucketRegionHeader;
+ context.logger?.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`);
+ context.__s3RegionRedirect = actualRegion;
+ } catch (e) {
+ throw new Error("Region redirect failed: " + e);
+ }
+ return next(args);
+ }
+ }
+ }
+ throw err;
+ }
+ };
+ };
+ var getCredentialsWithoutSessionToken = function(credentials) {
+ const credentialsWithoutSessionToken = {
+ accessKeyId: credentials.accessKeyId,
+ secretAccessKey: credentials.secretAccessKey,
+ expiration: credentials.expiration
+ };
+ return credentialsWithoutSessionToken;
+ };
+ var setSingleOverride = function(privateAccess, credentialsWithoutSessionToken) {
+ const id = setTimeout(() => {
+ throw new Error("SignatureV4S3Express credential override was created but not called.");
+ }, 10);
+ const currentCredentialProvider = privateAccess.credentialProvider;
+ const overrideCredentialsProviderOnce = __name(() => {
+ clearTimeout(id);
+ privateAccess.credentialProvider = currentCredentialProvider;
+ return Promise.resolve(credentialsWithoutSessionToken);
+ }, "overrideCredentialsProviderOnce");
+ privateAccess.credentialProvider = overrideCredentialsProviderOnce;
+ };
+ var bucketEndpointMiddleware = function(options) {
+ return (next, context) => async (args) => {
+ if (options.bucketEndpoint) {
+ const endpoint = context.endpointV2;
+ if (endpoint) {
+ const bucket = args.input.Bucket;
+ if (typeof bucket === "string") {
+ try {
+ const bucketEndpointUrl = new URL(bucket);
+ context.endpointV2 = {
+ ...endpoint,
+ url: bucketEndpointUrl
+ };
+ } catch (e) {
+ const warning = `@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${bucket} could not be parsed as URL.`;
+ if (context.logger?.constructor?.name === "NoOpLogger") {
+ console.warn(warning);
+ } else {
+ context.logger?.warn?.(warning);
+ }
+ throw e;
+ }
+ }
+ }
+ }
+ return next(args);
+ };
+ };
+ var validateBucketNameMiddleware = function({ bucketEndpoint }) {
+ return (next) => async (args) => {
+ const {
+ input: { Bucket }
+ } = args;
+ if (!bucketEndpoint && typeof Bucket === "string" && !(0, import_util_arn_parser.validate)(Bucket) && Bucket.indexOf("/") >= 0) {
+ const err = new Error(`Bucket name shouldn't contain '/', received '${Bucket}'`);
+ err.name = "InvalidBucketName";
+ throw err;
+ }
+ return next({ ...args });
+ };
+ };
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return to;
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS: () => NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS,
+ S3ExpressIdentityCache: () => S3ExpressIdentityCache,
+ S3ExpressIdentityCacheEntry: () => S3ExpressIdentityCacheEntry,
+ S3ExpressIdentityProviderImpl: () => S3ExpressIdentityProviderImpl,
+ SignatureV4S3Express: () => SignatureV4S3Express,
+ checkContentLengthHeader: () => checkContentLengthHeader,
+ checkContentLengthHeaderMiddlewareOptions: () => checkContentLengthHeaderMiddlewareOptions,
+ getCheckContentLengthHeaderPlugin: () => getCheckContentLengthHeaderPlugin,
+ getRegionRedirectMiddlewarePlugin: () => getRegionRedirectMiddlewarePlugin,
+ getS3ExpiresMiddlewarePlugin: () => getS3ExpiresMiddlewarePlugin,
+ getS3ExpressHttpSigningPlugin: () => getS3ExpressHttpSigningPlugin,
+ getS3ExpressPlugin: () => getS3ExpressPlugin,
+ getThrow200ExceptionsPlugin: () => getThrow200ExceptionsPlugin,
+ getValidateBucketNamePlugin: () => getValidateBucketNamePlugin,
+ regionRedirectEndpointMiddleware: () => regionRedirectEndpointMiddleware,
+ regionRedirectEndpointMiddlewareOptions: () => regionRedirectEndpointMiddlewareOptions,
+ regionRedirectMiddleware: () => regionRedirectMiddleware,
+ regionRedirectMiddlewareOptions: () => regionRedirectMiddlewareOptions,
+ resolveS3Config: () => resolveS3Config,
+ s3ExpiresMiddleware: () => s3ExpiresMiddleware,
+ s3ExpiresMiddlewareOptions: () => s3ExpiresMiddlewareOptions,
+ s3ExpressHttpSigningMiddleware: () => s3ExpressHttpSigningMiddleware,
+ s3ExpressHttpSigningMiddlewareOptions: () => s3ExpressHttpSigningMiddlewareOptions,
+ s3ExpressMiddleware: () => s3ExpressMiddleware,
+ s3ExpressMiddlewareOptions: () => s3ExpressMiddlewareOptions,
+ throw200ExceptionsMiddleware: () => throw200ExceptionsMiddleware,
+ throw200ExceptionsMiddlewareOptions: () => throw200ExceptionsMiddlewareOptions,
+ validateBucketNameMiddleware: () => validateBucketNameMiddleware,
+ validateBucketNameMiddlewareOptions: () => validateBucketNameMiddlewareOptions
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_protocol_http = require_dist_cjs2();
+ var import_smithy_client = require_dist_cjs22();
+ var CONTENT_LENGTH_HEADER = "content-length";
+ var DECODED_CONTENT_LENGTH_HEADER = "x-amz-decoded-content-length";
+ __name(checkContentLengthHeader, "checkContentLengthHeader");
+ var checkContentLengthHeaderMiddlewareOptions = {
+ step: "finalizeRequest",
+ tags: ["CHECK_CONTENT_LENGTH_HEADER"],
+ name: "getCheckContentLengthHeaderPlugin",
+ override: true
+ };
+ var getCheckContentLengthHeaderPlugin = __name((unused) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(checkContentLengthHeader(), checkContentLengthHeaderMiddlewareOptions);
+ }, "applyToStack")
+ }), "getCheckContentLengthHeaderPlugin");
+ var regionRedirectEndpointMiddleware = __name((config) => {
+ return (next, context) => async (args) => {
+ const originalRegion = await config.region();
+ const regionProviderRef = config.region;
+ let unlock = __name(() => {
+ }, "unlock");
+ if (context.__s3RegionRedirect) {
+ Object.defineProperty(config, "region", {
+ writable: false,
+ value: __name(async () => {
+ return context.__s3RegionRedirect;
+ }, "value")
+ });
+ unlock = __name(() => Object.defineProperty(config, "region", {
+ writable: true,
+ value: regionProviderRef
+ }), "unlock");
+ }
+ try {
+ const result = await next(args);
+ if (context.__s3RegionRedirect) {
+ unlock();
+ const region = await config.region();
+ if (originalRegion !== region) {
+ throw new Error("Region was not restored following S3 region redirect.");
+ }
+ }
+ return result;
+ } catch (e) {
+ unlock();
+ throw e;
+ }
+ };
+ }, "regionRedirectEndpointMiddleware");
+ var regionRedirectEndpointMiddlewareOptions = {
+ tags: ["REGION_REDIRECT", "S3"],
+ name: "regionRedirectEndpointMiddleware",
+ override: true,
+ relation: "before",
+ toMiddleware: "endpointV2Middleware"
+ };
+ __name(regionRedirectMiddleware, "regionRedirectMiddleware");
+ var regionRedirectMiddlewareOptions = {
+ step: "initialize",
+ tags: ["REGION_REDIRECT", "S3"],
+ name: "regionRedirectMiddleware",
+ override: true
+ };
+ var getRegionRedirectMiddlewarePlugin = __name((clientConfig) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(regionRedirectMiddleware(clientConfig), regionRedirectMiddlewareOptions);
+ clientStack.addRelativeTo(regionRedirectEndpointMiddleware(clientConfig), regionRedirectEndpointMiddlewareOptions);
+ }, "applyToStack")
+ }), "getRegionRedirectMiddlewarePlugin");
+ var s3ExpiresMiddleware = __name((config) => {
+ return (next, context) => async (args) => {
+ const result = await next(args);
+ const { response } = result;
+ if (import_protocol_http.HttpResponse.isInstance(response)) {
+ if (response.headers.expires) {
+ response.headers.expiresstring = response.headers.expires;
+ try {
+ (0, import_smithy_client.parseRfc7231DateTime)(response.headers.expires);
+ } catch (e) {
+ context.logger?.warn(`AWS SDK Warning for ${context.clientName}::${context.commandName} response parsing (${response.headers.expires}): ${e}`);
+ delete response.headers.expires;
+ }
+ }
+ }
+ return result;
+ };
+ }, "s3ExpiresMiddleware");
+ var s3ExpiresMiddlewareOptions = {
+ tags: ["S3"],
+ name: "s3ExpiresMiddleware",
+ override: true,
+ relation: "after",
+ toMiddleware: "deserializerMiddleware"
+ };
+ var getS3ExpiresMiddlewarePlugin = __name((clientConfig) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.addRelativeTo(s3ExpiresMiddleware(clientConfig), s3ExpiresMiddlewareOptions);
+ }, "applyToStack")
+ }), "getS3ExpiresMiddlewarePlugin");
+ var S3ExpressIdentityCache = class _S3ExpressIdentityCache {
+ constructor(data = {}) {
+ this.data = data;
+ }
+ static {
+ __name(this, "S3ExpressIdentityCache");
+ }
+ lastPurgeTime = Date.now();
+ static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30000;
+ get(key) {
+ const entry = this.data[key];
+ if (!entry) {
+ return;
+ }
+ return entry;
+ }
+ set(key, entry) {
+ this.data[key] = entry;
+ return entry;
+ }
+ delete(key) {
+ delete this.data[key];
+ }
+ async purgeExpired() {
+ const now = Date.now();
+ if (this.lastPurgeTime + _S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) {
+ return;
+ }
+ for (const key in this.data) {
+ const entry = this.data[key];
+ if (!entry.isRefreshing) {
+ const credential = await entry.identity;
+ if (credential.expiration) {
+ if (credential.expiration.getTime() < now) {
+ delete this.data[key];
+ }
+ }
+ }
+ }
+ }
+ };
+ var S3ExpressIdentityCacheEntry = class {
+ constructor(_identity, isRefreshing = false, accessed = Date.now()) {
+ this._identity = _identity;
+ this.isRefreshing = isRefreshing;
+ this.accessed = accessed;
+ }
+ static {
+ __name(this, "S3ExpressIdentityCacheEntry");
+ }
+ get identity() {
+ this.accessed = Date.now();
+ return this._identity;
+ }
+ };
+ var S3ExpressIdentityProviderImpl = class _S3ExpressIdentityProviderImpl {
+ constructor(createSessionFn, cache = new S3ExpressIdentityCache) {
+ this.createSessionFn = createSessionFn;
+ this.cache = cache;
+ }
+ static {
+ __name(this, "S3ExpressIdentityProviderImpl");
+ }
+ static REFRESH_WINDOW_MS = 60000;
+ async getS3ExpressIdentity(awsIdentity, identityProperties) {
+ const key = identityProperties.Bucket;
+ const { cache } = this;
+ const entry = cache.get(key);
+ if (entry) {
+ return entry.identity.then((identity) => {
+ const isExpired = (identity.expiration?.getTime() ?? 0) < Date.now();
+ if (isExpired) {
+ return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
+ }
+ const isExpiringSoon = (identity.expiration?.getTime() ?? 0) < Date.now() + _S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS;
+ if (isExpiringSoon && !entry.isRefreshing) {
+ entry.isRefreshing = true;
+ this.getIdentity(key).then((id) => {
+ cache.set(key, new S3ExpressIdentityCacheEntry(Promise.resolve(id)));
+ });
+ }
+ return identity;
+ });
+ }
+ return cache.set(key, new S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity;
+ }
+ async getIdentity(key) {
+ await this.cache.purgeExpired().catch((error) => {
+ console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error);
+ });
+ const session = await this.createSessionFn(key);
+ if (!session.Credentials?.AccessKeyId || !session.Credentials?.SecretAccessKey) {
+ throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");
+ }
+ const identity = {
+ accessKeyId: session.Credentials.AccessKeyId,
+ secretAccessKey: session.Credentials.SecretAccessKey,
+ sessionToken: session.Credentials.SessionToken,
+ expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined
+ };
+ return identity;
+ }
+ };
+ var import_signature_v4 = require_dist_cjs19();
+ var import_util_config_provider = require_dist_cjs32();
+ var S3_EXPRESS_BUCKET_TYPE = "Directory";
+ var S3_EXPRESS_BACKEND = "S3Express";
+ var S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express";
+ var SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token";
+ var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
+ var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH";
+ var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth";
+ var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
+ environmentVariableSelector: __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
+ configFileSelector: __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
+ default: false
+ };
+ var SignatureV4S3Express = class extends import_signature_v4.SignatureV4 {
+ static {
+ __name(this, "SignatureV4S3Express");
+ }
+ async signWithCredentials(requestToSign, credentials, options) {
+ const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
+ requestToSign.headers[SESSION_TOKEN_HEADER] = credentials.sessionToken;
+ const privateAccess = this;
+ setSingleOverride(privateAccess, credentialsWithoutSessionToken);
+ return privateAccess.signRequest(requestToSign, options ?? {});
+ }
+ async presignWithCredentials(requestToSign, credentials, options) {
+ const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials);
+ delete requestToSign.headers[SESSION_TOKEN_HEADER];
+ requestToSign.headers[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
+ requestToSign.query = requestToSign.query ?? {};
+ requestToSign.query[SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken;
+ const privateAccess = this;
+ setSingleOverride(privateAccess, credentialsWithoutSessionToken);
+ return this.presign(requestToSign, options);
+ }
+ };
+ __name(getCredentialsWithoutSessionToken, "getCredentialsWithoutSessionToken");
+ __name(setSingleOverride, "setSingleOverride");
+ var import_core = require_dist_cjs24();
+ var s3ExpressMiddleware = __name((options) => {
+ return (next, context) => async (args) => {
+ if (context.endpointV2) {
+ const endpoint = context.endpointV2;
+ const isS3ExpressAuth = endpoint.properties?.authSchemes?.[0]?.name === S3_EXPRESS_AUTH_SCHEME;
+ const isS3ExpressBucket = endpoint.properties?.backend === S3_EXPRESS_BACKEND || endpoint.properties?.bucketType === S3_EXPRESS_BUCKET_TYPE;
+ if (isS3ExpressBucket) {
+ (0, import_core.setFeature)(context, "S3_EXPRESS_BUCKET", "J");
+ context.isS3ExpressBucket = true;
+ }
+ if (isS3ExpressAuth) {
+ const requestBucket = args.input.Bucket;
+ if (requestBucket) {
+ const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), {
+ Bucket: requestBucket
+ });
+ context.s3ExpressIdentity = s3ExpressIdentity;
+ if (import_protocol_http.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) {
+ args.request.headers[SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken;
+ }
+ }
+ }
+ }
+ return next(args);
+ };
+ }, "s3ExpressMiddleware");
+ var s3ExpressMiddlewareOptions = {
+ name: "s3ExpressMiddleware",
+ step: "build",
+ tags: ["S3", "S3_EXPRESS"],
+ override: true
+ };
+ var getS3ExpressPlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(s3ExpressMiddleware(options), s3ExpressMiddlewareOptions);
+ }, "applyToStack")
+ }), "getS3ExpressPlugin");
+ var import_core2 = require_dist_cjs17();
+ var import_util_middleware = require_dist_cjs4();
+ var signS3Express = __name(async (s3ExpressIdentity, signingOptions, request, sigV4MultiRegionSigner) => {
+ const signedRequest = await sigV4MultiRegionSigner.signWithCredentials(request, s3ExpressIdentity, {});
+ if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) {
+ throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");
+ }
+ return signedRequest;
+ }, "signS3Express");
+ var defaultErrorHandler = __name((signingProperties) => (error) => {
+ throw error;
+ }, "defaultErrorHandler");
+ var defaultSuccessHandler = __name((httpResponse, signingProperties) => {
+ }, "defaultSuccessHandler");
+ var s3ExpressHttpSigningMiddlewareOptions = import_core2.httpSigningMiddlewareOptions;
+ var s3ExpressHttpSigningMiddleware = __name((config) => (next, context) => async (args) => {
+ if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
+ return next(args);
+ }
+ const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
+ const scheme = smithyContext.selectedHttpAuthScheme;
+ if (!scheme) {
+ throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
+ }
+ const {
+ httpAuthOption: { signingProperties = {} },
+ identity,
+ signer
+ } = scheme;
+ let request;
+ if (context.s3ExpressIdentity) {
+ request = await signS3Express(context.s3ExpressIdentity, signingProperties, args.request, await config.signer());
+ } else {
+ request = await signer.sign(args.request, identity, signingProperties);
+ }
+ const output = await next({
+ ...args,
+ request
+ }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
+ (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
+ return output;
+ }, "s3ExpressHttpSigningMiddleware");
+ var getS3ExpressHttpSigningPlugin = __name((config) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.addRelativeTo(s3ExpressHttpSigningMiddleware(config), import_core2.httpSigningMiddlewareOptions);
+ }, "applyToStack")
+ }), "getS3ExpressHttpSigningPlugin");
+ var resolveS3Config = __name((input, {
+ session
+ }) => {
+ const [s3ClientProvider, CreateSessionCommandCtor] = session;
+ const {
+ forcePathStyle,
+ useAccelerateEndpoint,
+ disableMultiregionAccessPoints,
+ followRegionRedirects,
+ s3ExpressIdentityProvider,
+ bucketEndpoint
+ } = input;
+ return Object.assign(input, {
+ forcePathStyle: forcePathStyle ?? false,
+ useAccelerateEndpoint: useAccelerateEndpoint ?? false,
+ disableMultiregionAccessPoints: disableMultiregionAccessPoints ?? false,
+ followRegionRedirects: followRegionRedirects ?? false,
+ s3ExpressIdentityProvider: s3ExpressIdentityProvider ?? new S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({
+ Bucket: key
+ }))),
+ bucketEndpoint: bucketEndpoint ?? false
+ });
+ }, "resolveS3Config");
+ var import_util_stream = require_dist_cjs15();
+ var THROW_IF_EMPTY_BODY = {
+ CopyObjectCommand: true,
+ UploadPartCopyCommand: true,
+ CompleteMultipartUploadCommand: true
+ };
+ var MAX_BYTES_TO_INSPECT = 3000;
+ var throw200ExceptionsMiddleware = __name((config) => (next, context) => async (args) => {
+ const result = await next(args);
+ const { response } = result;
+ if (!import_protocol_http.HttpResponse.isInstance(response)) {
+ return result;
+ }
+ const { statusCode, body: sourceBody } = response;
+ if (statusCode < 200 || statusCode >= 300) {
+ return result;
+ }
+ const isSplittableStream = typeof sourceBody?.stream === "function" || typeof sourceBody?.pipe === "function" || typeof sourceBody?.tee === "function";
+ if (!isSplittableStream) {
+ return result;
+ }
+ let bodyCopy = sourceBody;
+ let body = sourceBody;
+ if (sourceBody && typeof sourceBody === "object" && !(sourceBody instanceof Uint8Array)) {
+ [bodyCopy, body] = await (0, import_util_stream.splitStream)(sourceBody);
+ }
+ response.body = body;
+ const bodyBytes = await collectBody(bodyCopy, {
+ streamCollector: __name(async (stream) => {
+ return (0, import_util_stream.headStream)(stream, MAX_BYTES_TO_INSPECT);
+ }, "streamCollector")
+ });
+ if (typeof bodyCopy?.destroy === "function") {
+ bodyCopy.destroy();
+ }
+ const bodyStringTail = config.utf8Encoder(bodyBytes.subarray(bodyBytes.length - 16));
+ if (bodyBytes.length === 0 && THROW_IF_EMPTY_BODY[context.commandName]) {
+ const err = new Error("S3 aborted request");
+ err.name = "InternalError";
+ throw err;
+ }
+ if (bodyStringTail && bodyStringTail.endsWith("")) {
+ response.statusCode = 400;
+ }
+ return result;
+ }, "throw200ExceptionsMiddleware");
+ var collectBody = __name((streamBody = new Uint8Array, context) => {
+ if (streamBody instanceof Uint8Array) {
+ return Promise.resolve(streamBody);
+ }
+ return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array);
+ }, "collectBody");
+ var throw200ExceptionsMiddlewareOptions = {
+ relation: "after",
+ toMiddleware: "deserializerMiddleware",
+ tags: ["THROW_200_EXCEPTIONS", "S3"],
+ name: "throw200ExceptionsMiddleware",
+ override: true
+ };
+ var getThrow200ExceptionsPlugin = __name((config) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.addRelativeTo(throw200ExceptionsMiddleware(config), throw200ExceptionsMiddlewareOptions);
+ }, "applyToStack")
+ }), "getThrow200ExceptionsPlugin");
+ var import_util_arn_parser = require_dist_cjs33();
+ __name(bucketEndpointMiddleware, "bucketEndpointMiddleware");
+ var bucketEndpointMiddlewareOptions = {
+ name: "bucketEndpointMiddleware",
+ override: true,
+ relation: "after",
+ toMiddleware: "endpointV2Middleware"
+ };
+ __name(validateBucketNameMiddleware, "validateBucketNameMiddleware");
+ var validateBucketNameMiddlewareOptions = {
+ step: "initialize",
+ tags: ["VALIDATE_BUCKET_NAME"],
+ name: "validateBucketNameMiddleware",
+ override: true
+ };
+ var getValidateBucketNamePlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(validateBucketNameMiddleware(options), validateBucketNameMiddlewareOptions);
+ clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
+ }, "applyToStack")
+ }), "getValidateBucketNamePlugin");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodu
+var require_dist_cjs35 = __commonJS((exports) => {
+ var toDebugString = function(input) {
+ if (typeof input !== "object" || input == null) {
+ return input;
+ }
+ if ("ref" in input) {
+ return `\$${toDebugString(input.ref)}`;
+ }
+ if ("fn" in input) {
+ return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
+ }
+ return JSON.stringify(input, null, 2);
+ };
+ var types = require_dist_cjs();
+
+ class EndpointCache {
+ capacity;
+ data = new Map;
+ parameters = [];
+ constructor({ size, params }) {
+ this.capacity = size ?? 50;
+ if (params) {
+ this.parameters = params;
+ }
+ }
+ get(endpointParams, resolver) {
+ const key = this.hash(endpointParams);
+ if (key === false) {
+ return resolver();
+ }
+ if (!this.data.has(key)) {
+ if (this.data.size > this.capacity + 10) {
+ const keys = this.data.keys();
+ let i = 0;
+ while (true) {
+ const { value, done } = keys.next();
+ this.data.delete(value);
+ if (done || ++i > 10) {
+ break;
+ }
+ }
+ }
+ this.data.set(key, resolver());
+ }
+ return this.data.get(key);
+ }
+ size() {
+ return this.data.size;
+ }
+ hash(endpointParams) {
+ let buffer = "";
+ const { parameters } = this;
+ if (parameters.length === 0) {
+ return false;
+ }
+ for (const param of parameters) {
+ const val = String(endpointParams[param] ?? "");
+ if (val.includes("|;")) {
+ return false;
+ }
+ buffer += val + "|;";
+ }
+ return buffer;
+ }
+ }
+ var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}\$`);
+ var isIpAddress2 = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
+ var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-\$)(?!-)[a-zA-Z0-9-]{1,63}\$`);
+ var isValidHostLabel = (value, allowSubDomains = false) => {
+ if (!allowSubDomains) {
+ return VALID_HOST_LABEL_REGEX.test(value);
+ }
+ const labels = value.split(".");
+ for (const label of labels) {
+ if (!isValidHostLabel(label)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ var customEndpointFunctions = {};
+ var debugId = "endpoints";
+
+ class EndpointError2 extends Error {
+ constructor(message) {
+ super(message);
+ this.name = "EndpointError";
+ }
+ }
+ var booleanEquals = (value1, value2) => value1 === value2;
+ var getAttrPathList = (path) => {
+ const parts = path.split(".");
+ const pathList = [];
+ for (const part of parts) {
+ const squareBracketIndex = part.indexOf("[");
+ if (squareBracketIndex !== -1) {
+ if (part.indexOf("]") !== part.length - 1) {
+ throw new EndpointError2(`Path: '${path}' does not end with ']'`);
+ }
+ const arrayIndex = part.slice(squareBracketIndex + 1, -1);
+ if (Number.isNaN(parseInt(arrayIndex))) {
+ throw new EndpointError2(`Invalid array index: '${arrayIndex}' in path: '${path}'`);
+ }
+ if (squareBracketIndex !== 0) {
+ pathList.push(part.slice(0, squareBracketIndex));
+ }
+ pathList.push(arrayIndex);
+ } else {
+ pathList.push(part);
+ }
+ }
+ return pathList;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,
- EXPIRATION_MS: () => EXPIRATION_MS,
- HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,
- HttpBearerAuthSigner: () => HttpBearerAuthSigner,
- NoAuthSigner: () => NoAuthSigner,
- RequestBuilder: () => RequestBuilder,
- createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,
- createPaginator: () => createPaginator,
- doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,
- getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,
- getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,
- getHttpSigningPlugin: () => getHttpSigningPlugin,
- getSmithyContext: () => getSmithyContext3,
- httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,
- httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,
- httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,
- httpSigningMiddleware: () => httpSigningMiddleware,
- httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,
- isIdentityExpired: () => isIdentityExpired,
- memoizeIdentityProvider: () => memoizeIdentityProvider,
- normalizeProvider: () => normalizeProvider,
- requestBuilder: () => requestBuilder
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_middleware = require_dist_cjs20();
- __name(convertHttpAuthSchemesToMap, "convertHttpAuthSchemesToMap");
- var httpAuthSchemeMiddleware = __name((config, mwOptions) => (next, context) => async (args) => {
- var _a;
- const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
- const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
- const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
- const failureReasons = [];
- for (const option of options) {
- const scheme = authSchemes.get(option.schemeId);
- if (!scheme) {
- failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
- continue;
+ var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
+ if (typeof acc !== "object") {
+ throw new EndpointError2(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
+ } else if (Array.isArray(acc)) {
+ return acc[parseInt(index)];
+ }
+ return acc[index];
+ }, value);
+ var isSet = (value) => value != null;
+ var not = (value) => !value;
+ var DEFAULT_PORTS = {
+ [types.EndpointURLScheme.HTTP]: 80,
+ [types.EndpointURLScheme.HTTPS]: 443
+ };
+ var parseURL = (value) => {
+ const whatwgURL = (() => {
+ try {
+ if (value instanceof URL) {
+ return value;
+ }
+ if (typeof value === "object" && "hostname" in value) {
+ const { hostname: hostname2, port, protocol: protocol2 = "", path = "", query = {} } = value;
+ const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path}`);
+ url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&");
+ return url;
+ }
+ return new URL(value);
+ } catch (error) {
+ return null;
}
- const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
- if (!identityProvider) {
- failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
- continue;
+ })();
+ if (!whatwgURL) {
+ console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
+ return null;
+ }
+ const urlString = whatwgURL.href;
+ const { host, hostname, pathname, protocol, search } = whatwgURL;
+ if (search) {
+ return null;
+ }
+ const scheme = protocol.slice(0, -1);
+ if (!Object.values(types.EndpointURLScheme).includes(scheme)) {
+ return null;
+ }
+ const isIp = isIpAddress2(hostname);
+ const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);
+ const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;
+ return {
+ scheme,
+ authority,
+ path: pathname,
+ normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
+ isIp
+ };
+ };
+ var stringEquals = (value1, value2) => value1 === value2;
+ var substring = (input, start, stop, reverse) => {
+ if (start >= stop || input.length < stop) {
+ return null;
+ }
+ if (!reverse) {
+ return input.substring(start, stop);
+ }
+ return input.substring(input.length - stop, input.length - start);
+ };
+ var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
+ var endpointFunctions = {
+ booleanEquals,
+ getAttr,
+ isSet,
+ isValidHostLabel,
+ not,
+ parseURL,
+ stringEquals,
+ substring,
+ uriEncode
+ };
+ var evaluateTemplate = (template, options) => {
+ const evaluatedTemplateArr = [];
+ const templateContext = {
+ ...options.endpointParams,
+ ...options.referenceRecord
+ };
+ let currentIndex = 0;
+ while (currentIndex < template.length) {
+ const openingBraceIndex = template.indexOf("{", currentIndex);
+ if (openingBraceIndex === -1) {
+ evaluatedTemplateArr.push(template.slice(currentIndex));
+ break;
}
- const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) == null ? undefined : _a.call(option, config, context)) || {};
- option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
- option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
- smithyContext.selectedHttpAuthScheme = {
- httpAuthOption: option,
- identity: await identityProvider(option.identityProperties),
- signer: scheme.signer
- };
- break;
+ evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
+ const closingBraceIndex = template.indexOf("}", openingBraceIndex);
+ if (closingBraceIndex === -1) {
+ evaluatedTemplateArr.push(template.slice(openingBraceIndex));
+ break;
+ }
+ if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
+ evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
+ currentIndex = closingBraceIndex + 2;
+ }
+ const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
+ if (parameterName.includes("#")) {
+ const [refName, attrName] = parameterName.split("#");
+ evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));
+ } else {
+ evaluatedTemplateArr.push(templateContext[parameterName]);
+ }
+ currentIndex = closingBraceIndex + 1;
}
- if (!smithyContext.selectedHttpAuthScheme) {
- throw new Error(failureReasons.join("\n"));
+ return evaluatedTemplateArr.join("");
+ };
+ var getReferenceValue = ({ ref }, options) => {
+ const referenceRecord = {
+ ...options.endpointParams,
+ ...options.referenceRecord
+ };
+ return referenceRecord[ref];
+ };
+ var evaluateExpression = (obj, keyName, options) => {
+ if (typeof obj === "string") {
+ return evaluateTemplate(obj, options);
+ } else if (obj["fn"]) {
+ return callFunction(obj, options);
+ } else if (obj["ref"]) {
+ return getReferenceValue(obj, options);
}
- return next(args);
- }, "httpAuthSchemeMiddleware");
- var import_middleware_endpoint = require_dist_cjs41();
- var httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
- step: "serialize",
- tags: ["HTTP_AUTH_SCHEME"],
- name: "httpAuthSchemeMiddleware",
- override: true,
- relation: "before",
- toMiddleware: import_middleware_endpoint.endpointMiddlewareOptions.name
+ throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
};
- var getHttpAuthSchemeEndpointRuleSetPlugin = __name((config, {
- httpAuthSchemeParametersProvider,
- identityProviderConfigProvider
- }) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
- httpAuthSchemeParametersProvider,
- identityProviderConfigProvider
- }), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
+ var callFunction = ({ fn, argv }, options) => {
+ const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options));
+ const fnSegments = fn.split(".");
+ if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {
+ return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
}
- }), "getHttpAuthSchemeEndpointRuleSetPlugin");
- var import_middleware_serde = require_dist_cjs40();
- var httpAuthSchemeMiddlewareOptions = {
- step: "serialize",
- tags: ["HTTP_AUTH_SCHEME"],
- name: "httpAuthSchemeMiddleware",
- override: true,
- relation: "before",
- toMiddleware: import_middleware_serde.serializerMiddlewareOption.name
+ return endpointFunctions[fn](...evaluatedArgs);
};
- var getHttpAuthSchemePlugin = __name((config, {
- httpAuthSchemeParametersProvider,
- identityProviderConfigProvider
- }) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
- httpAuthSchemeParametersProvider,
- identityProviderConfigProvider
- }), httpAuthSchemeMiddlewareOptions);
+ var evaluateCondition = ({ assign, ...fnArgs }, options) => {
+ if (assign && assign in options.referenceRecord) {
+ throw new EndpointError2(`'${assign}' is already defined in Reference Record.`);
}
- }), "getHttpAuthSchemePlugin");
- var import_protocol_http = require_dist_cjs2();
- var defaultErrorHandler = __name((signingProperties) => (error) => {
- throw error;
- }, "defaultErrorHandler");
- var defaultSuccessHandler = __name((httpResponse, signingProperties) => {
- }, "defaultSuccessHandler");
- var httpSigningMiddleware = __name((config) => (next, context) => async (args) => {
- if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
- return next(args);
+ const value = callFunction(fnArgs, options);
+ options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);
+ return {
+ result: value === "" ? true : !!value,
+ ...assign != null && { toAssign: { name: assign, value } }
+ };
+ };
+ var evaluateConditions = (conditions = [], options) => {
+ const conditionsReferenceRecord = {};
+ for (const condition of conditions) {
+ const { result, toAssign } = evaluateCondition(condition, {
+ ...options,
+ referenceRecord: {
+ ...options.referenceRecord,
+ ...conditionsReferenceRecord
+ }
+ });
+ if (!result) {
+ return { result };
+ }
+ if (toAssign) {
+ conditionsReferenceRecord[toAssign.name] = toAssign.value;
+ options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
+ }
}
- const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
- const scheme = smithyContext.selectedHttpAuthScheme;
- if (!scheme) {
- throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
+ return { result: true, referenceRecord: conditionsReferenceRecord };
+ };
+ var getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
+ ...acc,
+ [headerKey]: headerVal.map((headerValEntry) => {
+ const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
+ if (typeof processedExpr !== "string") {
+ throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`);
+ }
+ return processedExpr;
+ })
+ }), {});
+ var getEndpointProperty = (property, options) => {
+ if (Array.isArray(property)) {
+ return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
+ }
+ switch (typeof property) {
+ case "string":
+ return evaluateTemplate(property, options);
+ case "object":
+ if (property === null) {
+ throw new EndpointError2(`Unexpected endpoint property: ${property}`);
+ }
+ return getEndpointProperties(property, options);
+ case "boolean":
+ return property;
+ default:
+ throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`);
}
- const {
- httpAuthOption: { signingProperties = {} },
- identity,
- signer
- } = scheme;
- const output = await next({
- ...args,
- request: await signer.sign(args.request, identity, signingProperties)
- }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
- (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
- return output;
- }, "httpSigningMiddleware");
- var import_middleware_retry = require_dist_cjs35();
- var httpSigningMiddlewareOptions = {
- step: "finalizeRequest",
- tags: ["HTTP_SIGNING"],
- name: "httpSigningMiddleware",
- aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"],
- override: true,
- relation: "after",
- toMiddleware: import_middleware_retry.retryMiddlewareOptions.name
};
- var getHttpSigningPlugin = __name((config) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);
+ var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
+ ...acc,
+ [propertyKey]: getEndpointProperty(propertyVal, options)
+ }), {});
+ var getEndpointUrl = (endpointUrl, options) => {
+ const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
+ if (typeof expression === "string") {
+ try {
+ return new URL(expression);
+ } catch (error) {
+ console.error(`Failed to construct URL with ${expression}`, error);
+ throw error;
+ }
}
- }), "getHttpSigningPlugin");
- var _DefaultIdentityProviderConfig = class _DefaultIdentityProviderConfig2 {
- constructor(config) {
- this.authSchemes = new Map;
- for (const [key, value] of Object.entries(config)) {
- if (value !== undefined) {
- this.authSchemes.set(key, value);
+ throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`);
+ };
+ var evaluateEndpointRule = (endpointRule, options) => {
+ const { conditions, endpoint } = endpointRule;
+ const { result, referenceRecord } = evaluateConditions(conditions, options);
+ if (!result) {
+ return;
+ }
+ const endpointRuleOptions = {
+ ...options,
+ referenceRecord: { ...options.referenceRecord, ...referenceRecord }
+ };
+ const { url, properties, headers } = endpoint;
+ options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
+ return {
+ ...headers != null && {
+ headers: getEndpointHeaders(headers, endpointRuleOptions)
+ },
+ ...properties != null && {
+ properties: getEndpointProperties(properties, endpointRuleOptions)
+ },
+ url: getEndpointUrl(url, endpointRuleOptions)
+ };
+ };
+ var evaluateErrorRule = (errorRule, options) => {
+ const { conditions, error } = errorRule;
+ const { result, referenceRecord } = evaluateConditions(conditions, options);
+ if (!result) {
+ return;
+ }
+ throw new EndpointError2(evaluateExpression(error, "Error", {
+ ...options,
+ referenceRecord: { ...options.referenceRecord, ...referenceRecord }
+ }));
+ };
+ var evaluateTreeRule = (treeRule, options) => {
+ const { conditions, rules } = treeRule;
+ const { result, referenceRecord } = evaluateConditions(conditions, options);
+ if (!result) {
+ return;
+ }
+ return evaluateRules(rules, {
+ ...options,
+ referenceRecord: { ...options.referenceRecord, ...referenceRecord }
+ });
+ };
+ var evaluateRules = (rules, options) => {
+ for (const rule of rules) {
+ if (rule.type === "endpoint") {
+ const endpointOrUndefined = evaluateEndpointRule(rule, options);
+ if (endpointOrUndefined) {
+ return endpointOrUndefined;
+ }
+ } else if (rule.type === "error") {
+ evaluateErrorRule(rule, options);
+ } else if (rule.type === "tree") {
+ const endpointOrUndefined = evaluateTreeRule(rule, options);
+ if (endpointOrUndefined) {
+ return endpointOrUndefined;
+ }
+ } else {
+ throw new EndpointError2(`Unknown endpoint rule: ${rule}`);
+ }
+ }
+ throw new EndpointError2(`Rules evaluation failed`);
+ };
+ var resolveEndpoint2 = (ruleSetObject, options) => {
+ const { endpointParams, logger: logger4 } = options;
+ const { parameters, rules } = ruleSetObject;
+ options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
+ const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);
+ if (paramsWithDefault.length > 0) {
+ for (const [paramKey, paramDefaultValue] of paramsWithDefault) {
+ endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
+ }
+ }
+ const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);
+ for (const requiredParam of requiredParams) {
+ if (endpointParams[requiredParam] == null) {
+ throw new EndpointError2(`Missing required parameter: '${requiredParam}'`);
+ }
+ }
+ const endpoint = evaluateRules(rules, { endpointParams, logger: logger4, referenceRecord: {} });
+ options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
+ return endpoint;
+ };
+ exports.EndpointCache = EndpointCache;
+ exports.EndpointError = EndpointError2;
+ exports.customEndpointFunctions = customEndpointFunctions;
+ exports.isIpAddress = isIpAddress2;
+ exports.isValidHostLabel = isValidHostLabel;
+ exports.resolveEndpoint = resolveEndpoint2;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/
+var require_dist_cjs36 = __commonJS((exports) => {
+ var parseQueryString = function(querystring) {
+ const query = {};
+ querystring = querystring.replace(/^\?/, "");
+ if (querystring) {
+ for (const pair of querystring.split("&")) {
+ let [key, value = null] = pair.split("=");
+ key = decodeURIComponent(key);
+ if (value) {
+ value = decodeURIComponent(value);
+ }
+ if (!(key in query)) {
+ query[key] = value;
+ } else if (Array.isArray(query[key])) {
+ query[key].push(value);
+ } else {
+ query[key] = [query[key], value];
+ }
+ }
+ }
+ return query;
+ };
+ exports.parseQueryString = parseQueryString;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
+var require_dist_cjs37 = __commonJS((exports) => {
+ var querystringParser = require_dist_cjs36();
+ var parseUrl = (url) => {
+ if (typeof url === "string") {
+ return parseUrl(new URL(url));
+ }
+ const { hostname, pathname, port, protocol, search } = url;
+ let query;
+ if (search) {
+ query = querystringParser.parseQueryString(search);
+ }
+ return {
+ hostname,
+ port: port ? parseInt(port) : undefined,
+ protocol,
+ path: pathname,
+ query
+ };
+ };
+ exports.parseUrl = parseUrl;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_dist_cjs38 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ ConditionObject: () => import_util_endpoints.ConditionObject,
+ DeprecatedObject: () => import_util_endpoints.DeprecatedObject,
+ EndpointError: () => import_util_endpoints.EndpointError,
+ EndpointObject: () => import_util_endpoints.EndpointObject,
+ EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,
+ EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,
+ EndpointParams: () => import_util_endpoints.EndpointParams,
+ EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,
+ EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,
+ ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,
+ EvaluateOptions: () => import_util_endpoints.EvaluateOptions,
+ Expression: () => import_util_endpoints.Expression,
+ FunctionArgv: () => import_util_endpoints.FunctionArgv,
+ FunctionObject: () => import_util_endpoints.FunctionObject,
+ FunctionReturn: () => import_util_endpoints.FunctionReturn,
+ ParameterObject: () => import_util_endpoints.ParameterObject,
+ ReferenceObject: () => import_util_endpoints.ReferenceObject,
+ ReferenceRecord: () => import_util_endpoints.ReferenceRecord,
+ RuleSetObject: () => import_util_endpoints.RuleSetObject,
+ RuleSetRules: () => import_util_endpoints.RuleSetRules,
+ TreeRuleObject: () => import_util_endpoints.TreeRuleObject,
+ awsEndpointFunctions: () => awsEndpointFunctions,
+ getUserAgentPrefix: () => getUserAgentPrefix,
+ isIpAddress: () => import_util_endpoints.isIpAddress,
+ partition: () => partition,
+ resolveDefaultAwsRegionalEndpointsConfig: () => resolveDefaultAwsRegionalEndpointsConfig,
+ resolveEndpoint: () => import_util_endpoints.resolveEndpoint,
+ setPartitionInfo: () => setPartitionInfo,
+ toEndpointV1: () => toEndpointV1,
+ useDefaultPartitionInfo: () => useDefaultPartitionInfo
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_util_endpoints = require_dist_cjs35();
+ var isVirtualHostableS3Bucket = __name((value, allowSubDomains = false) => {
+ if (allowSubDomains) {
+ for (const label of value.split(".")) {
+ if (!isVirtualHostableS3Bucket(label)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ if (!(0, import_util_endpoints.isValidHostLabel)(value)) {
+ return false;
+ }
+ if (value.length < 3 || value.length > 63) {
+ return false;
+ }
+ if (value !== value.toLowerCase()) {
+ return false;
+ }
+ if ((0, import_util_endpoints.isIpAddress)(value)) {
+ return false;
+ }
+ return true;
+ }, "isVirtualHostableS3Bucket");
+ var ARN_DELIMITER = ":";
+ var RESOURCE_DELIMITER = "/";
+ var parseArn = __name((value) => {
+ const segments = value.split(ARN_DELIMITER);
+ if (segments.length < 6)
+ return null;
+ const [arn, partition2, service, region, accountId, ...resourcePath] = segments;
+ if (arn !== "arn" || partition2 === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "")
+ return null;
+ const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();
+ return {
+ partition: partition2,
+ service,
+ region,
+ accountId,
+ resourceId
+ };
+ }, "parseArn");
+ var partitions_default = {
+ partitions: [{
+ id: "aws",
+ outputs: {
+ dnsSuffix: "amazonaws.com",
+ dualStackDnsSuffix: "api.aws",
+ implicitGlobalRegion: "us-east-1",
+ name: "aws",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
+ regions: {
+ "af-south-1": {
+ description: "Africa (Cape Town)"
+ },
+ "ap-east-1": {
+ description: "Asia Pacific (Hong Kong)"
+ },
+ "ap-east-2": {
+ description: "Asia Pacific (Taipei)"
+ },
+ "ap-northeast-1": {
+ description: "Asia Pacific (Tokyo)"
+ },
+ "ap-northeast-2": {
+ description: "Asia Pacific (Seoul)"
+ },
+ "ap-northeast-3": {
+ description: "Asia Pacific (Osaka)"
+ },
+ "ap-south-1": {
+ description: "Asia Pacific (Mumbai)"
+ },
+ "ap-south-2": {
+ description: "Asia Pacific (Hyderabad)"
+ },
+ "ap-southeast-1": {
+ description: "Asia Pacific (Singapore)"
+ },
+ "ap-southeast-2": {
+ description: "Asia Pacific (Sydney)"
+ },
+ "ap-southeast-3": {
+ description: "Asia Pacific (Jakarta)"
+ },
+ "ap-southeast-4": {
+ description: "Asia Pacific (Melbourne)"
+ },
+ "ap-southeast-5": {
+ description: "Asia Pacific (Malaysia)"
+ },
+ "ap-southeast-6": {
+ description: "Asia Pacific (New Zealand)"
+ },
+ "ap-southeast-7": {
+ description: "Asia Pacific (Thailand)"
+ },
+ "aws-global": {
+ description: "aws global region"
+ },
+ "ca-central-1": {
+ description: "Canada (Central)"
+ },
+ "ca-west-1": {
+ description: "Canada West (Calgary)"
+ },
+ "eu-central-1": {
+ description: "Europe (Frankfurt)"
+ },
+ "eu-central-2": {
+ description: "Europe (Zurich)"
+ },
+ "eu-north-1": {
+ description: "Europe (Stockholm)"
+ },
+ "eu-south-1": {
+ description: "Europe (Milan)"
+ },
+ "eu-south-2": {
+ description: "Europe (Spain)"
+ },
+ "eu-west-1": {
+ description: "Europe (Ireland)"
+ },
+ "eu-west-2": {
+ description: "Europe (London)"
+ },
+ "eu-west-3": {
+ description: "Europe (Paris)"
+ },
+ "il-central-1": {
+ description: "Israel (Tel Aviv)"
+ },
+ "me-central-1": {
+ description: "Middle East (UAE)"
+ },
+ "me-south-1": {
+ description: "Middle East (Bahrain)"
+ },
+ "mx-central-1": {
+ description: "Mexico (Central)"
+ },
+ "sa-east-1": {
+ description: "South America (Sao Paulo)"
+ },
+ "us-east-1": {
+ description: "US East (N. Virginia)"
+ },
+ "us-east-2": {
+ description: "US East (Ohio)"
+ },
+ "us-west-1": {
+ description: "US West (N. California)"
+ },
+ "us-west-2": {
+ description: "US West (Oregon)"
}
}
- }
- getIdentityProvider(schemeId) {
- return this.authSchemes.get(schemeId);
- }
- };
- __name(_DefaultIdentityProviderConfig, "DefaultIdentityProviderConfig");
- var DefaultIdentityProviderConfig = _DefaultIdentityProviderConfig;
- var import_types = require_dist_cjs();
- var _HttpApiKeyAuthSigner = class _HttpApiKeyAuthSigner2 {
- async sign(httpRequest, identity, signingProperties) {
- if (!signingProperties) {
- throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");
- }
- if (!signingProperties.name) {
- throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");
- }
- if (!signingProperties.in) {
- throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");
- }
- if (!identity.apiKey) {
- throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
- }
- const clonedRequest = httpRequest.clone();
- if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {
- clonedRequest.query[signingProperties.name] = identity.apiKey;
- } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {
- clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
- } else {
- throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`");
+ }, {
+ id: "aws-cn",
+ outputs: {
+ dnsSuffix: "amazonaws.com.cn",
+ dualStackDnsSuffix: "api.amazonwebservices.com.cn",
+ implicitGlobalRegion: "cn-northwest-1",
+ name: "aws-cn",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-cn-global": {
+ description: "aws-cn global region"
+ },
+ "cn-north-1": {
+ description: "China (Beijing)"
+ },
+ "cn-northwest-1": {
+ description: "China (Ningxia)"
+ }
}
- return clonedRequest;
- }
- };
- __name(_HttpApiKeyAuthSigner, "HttpApiKeyAuthSigner");
- var HttpApiKeyAuthSigner = _HttpApiKeyAuthSigner;
- var _HttpBearerAuthSigner = class _HttpBearerAuthSigner2 {
- async sign(httpRequest, identity, signingProperties) {
- const clonedRequest = httpRequest.clone();
- if (!identity.token) {
- throw new Error("request could not be signed with `token` since the `token` is not defined");
+ }, {
+ id: "aws-eusc",
+ outputs: {
+ dnsSuffix: "amazonaws.eu",
+ dualStackDnsSuffix: "api.amazonwebservices.eu",
+ implicitGlobalRegion: "eusc-de-east-1",
+ name: "aws-eusc",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$",
+ regions: {
+ "eusc-de-east-1": {
+ description: "EU (Germany)"
+ }
}
- clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`;
- return clonedRequest;
- }
- };
- __name(_HttpBearerAuthSigner, "HttpBearerAuthSigner");
- var HttpBearerAuthSigner = _HttpBearerAuthSigner;
- var _NoAuthSigner = class _NoAuthSigner2 {
- async sign(httpRequest, identity, signingProperties) {
- return httpRequest;
- }
- };
- __name(_NoAuthSigner, "NoAuthSigner");
- var NoAuthSigner = _NoAuthSigner;
- var createIsIdentityExpiredFunction = __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, "createIsIdentityExpiredFunction");
- var EXPIRATION_MS = 300000;
- var isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);
- var doesIdentityRequireRefresh = __name((identity) => identity.expiration !== undefined, "doesIdentityRequireRefresh");
- var memoizeIdentityProvider = __name((provider, isExpired, requiresRefresh) => {
- if (provider === undefined) {
- return;
- }
- const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
- let resolved;
- let pending;
- let hasResult;
- let isConstant = false;
- const coalesceProvider = __name(async (options) => {
- if (!pending) {
- pending = normalizedProvider(options);
+ }, {
+ id: "aws-iso",
+ outputs: {
+ dnsSuffix: "c2s.ic.gov",
+ dualStackDnsSuffix: "api.aws.ic.gov",
+ implicitGlobalRegion: "us-iso-east-1",
+ name: "aws-iso",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-iso-global": {
+ description: "aws-iso global region"
+ },
+ "us-iso-east-1": {
+ description: "US ISO East"
+ },
+ "us-iso-west-1": {
+ description: "US ISO WEST"
+ }
}
- try {
- resolved = await pending;
- hasResult = true;
- isConstant = false;
- } finally {
- pending = undefined;
+ }, {
+ id: "aws-iso-b",
+ outputs: {
+ dnsSuffix: "sc2s.sgov.gov",
+ dualStackDnsSuffix: "api.aws.scloud",
+ implicitGlobalRegion: "us-isob-east-1",
+ name: "aws-iso-b",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-iso-b-global": {
+ description: "aws-iso-b global region"
+ },
+ "us-isob-east-1": {
+ description: "US ISOB East (Ohio)"
+ }
}
- return resolved;
- }, "coalesceProvider");
- if (isExpired === undefined) {
- return async (options) => {
- if (!hasResult || (options == null ? undefined : options.forceRefresh)) {
- resolved = await coalesceProvider(options);
+ }, {
+ id: "aws-iso-e",
+ outputs: {
+ dnsSuffix: "cloud.adc-e.uk",
+ dualStackDnsSuffix: "api.cloud-aws.adc-e.uk",
+ implicitGlobalRegion: "eu-isoe-west-1",
+ name: "aws-iso-e",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-iso-e-global": {
+ description: "aws-iso-e global region"
+ },
+ "eu-isoe-west-1": {
+ description: "EU ISOE West"
}
- return resolved;
- };
- }
- return async (options) => {
- if (!hasResult || (options == null ? undefined : options.forceRefresh)) {
- resolved = await coalesceProvider(options);
}
- if (isConstant) {
- return resolved;
+ }, {
+ id: "aws-iso-f",
+ outputs: {
+ dnsSuffix: "csp.hci.ic.gov",
+ dualStackDnsSuffix: "api.aws.hci.ic.gov",
+ implicitGlobalRegion: "us-isof-south-1",
+ name: "aws-iso-f",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^us\\-isof\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-iso-f-global": {
+ description: "aws-iso-f global region"
+ },
+ "us-isof-east-1": {
+ description: "US ISOF EAST"
+ },
+ "us-isof-south-1": {
+ description: "US ISOF SOUTH"
+ }
}
- if (!requiresRefresh(resolved)) {
- isConstant = true;
- return resolved;
+ }, {
+ id: "aws-us-gov",
+ outputs: {
+ dnsSuffix: "amazonaws.com",
+ dualStackDnsSuffix: "api.aws",
+ implicitGlobalRegion: "us-gov-west-1",
+ name: "aws-us-gov",
+ supportsDualStack: true,
+ supportsFIPS: true
+ },
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
+ regions: {
+ "aws-us-gov-global": {
+ description: "aws-us-gov global region"
+ },
+ "us-gov-east-1": {
+ description: "AWS GovCloud (US-East)"
+ },
+ "us-gov-west-1": {
+ description: "AWS GovCloud (US-West)"
+ }
}
- if (isExpired(resolved)) {
- await coalesceProvider(options);
- return resolved;
+ }],
+ version: "1.1"
+ };
+ var selectedPartitionsInfo = partitions_default;
+ var selectedUserAgentPrefix = "";
+ var partition = __name((value) => {
+ const { partitions } = selectedPartitionsInfo;
+ for (const partition2 of partitions) {
+ const { regions, outputs } = partition2;
+ for (const [region, regionData] of Object.entries(regions)) {
+ if (region === value) {
+ return {
+ ...outputs,
+ ...regionData
+ };
+ }
}
- return resolved;
- };
- }, "memoizeIdentityProvider");
- var getSmithyContext3 = __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext");
- var normalizeProvider = __name((input) => {
- if (typeof input === "function")
- return input;
- const promisified = Promise.resolve(input);
- return () => promisified;
- }, "normalizeProvider");
- var import_smithy_client = require_dist_cjs16();
- __name(requestBuilder, "requestBuilder");
- var _RequestBuilder = class _RequestBuilder2 {
- constructor(input, context) {
- this.input = input;
- this.context = context;
- this.query = {};
- this.method = "";
- this.headers = {};
- this.path = "";
- this.body = null;
- this.hostname = "";
- this.resolvePathStack = [];
}
- async build() {
- const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
- this.path = basePath;
- for (const resolvePath of this.resolvePathStack) {
- resolvePath(this.path);
+ for (const partition2 of partitions) {
+ const { regionRegex, outputs } = partition2;
+ if (new RegExp(regionRegex).test(value)) {
+ return {
+ ...outputs
+ };
}
- return new import_protocol_http.HttpRequest({
- protocol,
- hostname: this.hostname || hostname,
- port,
- method: this.method,
- path: this.path,
- query: this.query,
- body: this.body,
- headers: this.headers
- });
- }
- hn(hostname) {
- this.hostname = hostname;
- return this;
- }
- bp(uriLabel) {
- this.resolvePathStack.push((basePath) => {
- this.path = `${(basePath == null ? undefined : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + uriLabel;
- });
- return this;
- }
- p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
- this.resolvePathStack.push((path) => {
- this.path = (0, import_smithy_client.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
- });
- return this;
- }
- h(headers) {
- this.headers = headers;
- return this;
}
- q(query) {
- this.query = query;
- return this;
- }
- b(body) {
- this.body = body;
- return this;
- }
- m(method) {
- this.method = method;
- return this;
+ const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === "aws");
+ if (!DEFAULT_PARTITION) {
+ throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
}
+ return {
+ ...DEFAULT_PARTITION.outputs
+ };
+ }, "partition");
+ var setPartitionInfo = __name((partitionsInfo, userAgentPrefix = "") => {
+ selectedPartitionsInfo = partitionsInfo;
+ selectedUserAgentPrefix = userAgentPrefix;
+ }, "setPartitionInfo");
+ var useDefaultPartitionInfo = __name(() => {
+ setPartitionInfo(partitions_default, "");
+ }, "useDefaultPartitionInfo");
+ var getUserAgentPrefix = __name(() => selectedUserAgentPrefix, "getUserAgentPrefix");
+ var awsEndpointFunctions = {
+ isVirtualHostableS3Bucket,
+ parseArn,
+ partition
};
- __name(_RequestBuilder, "RequestBuilder");
- var RequestBuilder = _RequestBuilder;
- var makePagedClientRequest = __name(async (CommandCtor, client, input, ...args) => {
- return await client.send(new CommandCtor(input), ...args);
- }, "makePagedClientRequest");
- __name(createPaginator, "createPaginator");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cj
-var require_util = __commonJS((exports) => {
- var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
- var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
- var nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*";
- var regexName = new RegExp("^" + nameRegexp + "$");
- var getAllMatches = function(string, regex) {
- const matches = [];
- let match = regex.exec(string);
- while (match) {
- const allmatches = [];
- allmatches.startIndex = regex.lastIndex - match[0].length;
- const len = match.length;
- for (let index = 0;index < len; index++) {
- allmatches.push(match[index]);
- }
- matches.push(allmatches);
- match = regex.exec(string);
- }
- return matches;
- };
- var isName = function(string) {
- const match = regexName.exec(string);
- return !(match === null || typeof match === "undefined");
- };
- exports.isExist = function(v) {
- return typeof v !== "undefined";
- };
- exports.isEmptyObject = function(obj) {
- return Object.keys(obj).length === 0;
- };
- exports.merge = function(target, a, arrayMode) {
- if (a) {
- const keys = Object.keys(a);
- const len = keys.length;
- for (let i = 0;i < len; i++) {
- if (arrayMode === "strict") {
- target[keys[i]] = [a[keys[i]]];
- } else {
- target[keys[i]] = a[keys[i]];
- }
- }
+ import_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;
+ var import_url_parser = require_dist_cjs37();
+ var resolveDefaultAwsRegionalEndpointsConfig = __name((input) => {
+ if (typeof input.endpointProvider !== "function") {
+ throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");
}
- };
- exports.getValue = function(v) {
- if (exports.isExist(v)) {
- return v;
- } else {
- return "";
+ const { endpoint } = input;
+ if (endpoint === undefined) {
+ input.endpoint = async () => {
+ return toEndpointV1(input.endpointProvider({
+ Region: typeof input.region === "function" ? await input.region() : input.region,
+ UseDualStack: typeof input.useDualstackEndpoint === "function" ? await input.useDualstackEndpoint() : input.useDualstackEndpoint,
+ UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint,
+ Endpoint: undefined
+ }, { logger: input.logger }));
+ };
}
- };
- exports.isName = isName;
- exports.getAllMatches = getAllMatches;
- exports.nameRegexp = nameRegexp;
+ return input;
+ }, "resolveDefaultAwsRegionalEndpointsConfig");
+ var toEndpointV1 = __name((endpoint) => (0, import_url_parser.parseUrl)(endpoint.url), "toEndpointV1");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
-var require_validator2 = __commonJS((exports) => {
- var isWhiteSpace = function(char) {
- return char === " " || char === "\t" || char === "\n" || char === "\r";
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_dist_cjs39 = __commonJS((exports, module) => {
+ var isValidUserAgentAppId = function(appId) {
+ if (appId === undefined) {
+ return true;
+ }
+ return typeof appId === "string" && appId.length <= 50;
};
- var readPI = function(xmlData, i) {
- const start = i;
- for (;i < xmlData.length; i++) {
- if (xmlData[i] == "?" || xmlData[i] == " ") {
- const tagname = xmlData.substr(start, i - start);
- if (i > 5 && tagname === "xml") {
- return getErrorObject("InvalidXml", "XML declaration allowed only at the start of the document.", getLineNumberForPosition(xmlData, i));
- } else if (xmlData[i] == "?" && xmlData[i + 1] == ">") {
- i++;
- break;
+ var resolveUserAgentConfig = function(input) {
+ const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID);
+ const { customUserAgent } = input;
+ return Object.assign(input, {
+ customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
+ userAgentAppId: __name(async () => {
+ const appId = await normalizedAppIdProvider();
+ if (!isValidUserAgentAppId(appId)) {
+ const logger4 = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
+ if (typeof appId !== "string") {
+ logger4?.warn("userAgentAppId must be a string or undefined.");
+ } else if (appId.length > 50) {
+ logger4?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
+ }
+ }
+ return appId;
+ }, "userAgentAppId")
+ });
+ };
+ async function checkFeatures(context, config, args) {
+ const request = args.request;
+ if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
+ (0, import_core2.setFeature)(context, "PROTOCOL_RPC_V2_CBOR", "M");
+ }
+ if (typeof config.retryStrategy === "function") {
+ const retryStrategy = await config.retryStrategy();
+ if (typeof retryStrategy.acquireInitialRetryToken === "function") {
+ if (retryStrategy.constructor?.name?.includes("Adaptive")) {
+ (0, import_core2.setFeature)(context, "RETRY_MODE_ADAPTIVE", "F");
} else {
- continue;
+ (0, import_core2.setFeature)(context, "RETRY_MODE_STANDARD", "E");
}
+ } else {
+ (0, import_core2.setFeature)(context, "RETRY_MODE_LEGACY", "D");
}
}
- return i;
- };
- var readCommentAndCDATA = function(xmlData, i) {
- if (xmlData.length > i + 5 && xmlData[i + 1] === "-" && xmlData[i + 2] === "-") {
- for (i += 3;i < xmlData.length; i++) {
- if (xmlData[i] === "-" && xmlData[i + 1] === "-" && xmlData[i + 2] === ">") {
- i += 2;
+ if (typeof config.accountIdEndpointMode === "function") {
+ const endpointV2 = context.endpointV2;
+ if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
+ (0, import_core2.setFeature)(context, "ACCOUNT_ID_ENDPOINT", "O");
+ }
+ switch (await config.accountIdEndpointMode?.()) {
+ case "disabled":
+ (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
+ break;
+ case "preferred":
+ (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
+ break;
+ case "required":
+ (0, import_core2.setFeature)(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
break;
- }
}
- } else if (xmlData.length > i + 8 && xmlData[i + 1] === "D" && xmlData[i + 2] === "O" && xmlData[i + 3] === "C" && xmlData[i + 4] === "T" && xmlData[i + 5] === "Y" && xmlData[i + 6] === "P" && xmlData[i + 7] === "E") {
- let angleBracketsCount = 1;
- for (i += 8;i < xmlData.length; i++) {
- if (xmlData[i] === "<") {
- angleBracketsCount++;
- } else if (xmlData[i] === ">") {
- angleBracketsCount--;
- if (angleBracketsCount === 0) {
- break;
- }
- }
+ }
+ const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
+ if (identity?.$source) {
+ const credentials = identity;
+ if (credentials.accountId) {
+ (0, import_core2.setFeature)(context, "RESOLVED_ACCOUNT_ID", "T");
}
- } else if (xmlData.length > i + 9 && xmlData[i + 1] === "[" && xmlData[i + 2] === "C" && xmlData[i + 3] === "D" && xmlData[i + 4] === "A" && xmlData[i + 5] === "T" && xmlData[i + 6] === "A" && xmlData[i + 7] === "[") {
- for (i += 8;i < xmlData.length; i++) {
- if (xmlData[i] === "]" && xmlData[i + 1] === "]" && xmlData[i + 2] === ">") {
- i += 2;
- break;
- }
+ for (const [key, value] of Object.entries(credentials.$source ?? {})) {
+ (0, import_core2.setFeature)(context, key, value);
}
}
- return i;
- };
- var readAttributeStr = function(xmlData, i) {
- let attrStr = "";
- let startChar = "";
- let tagClosed = false;
- for (;i < xmlData.length; i++) {
- if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {
- if (startChar === "") {
- startChar = xmlData[i];
- } else if (startChar !== xmlData[i]) {
+ }
+ var encodeFeatures = function(features) {
+ let buffer = "";
+ for (const key in features) {
+ const val = features[key];
+ if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
+ if (buffer.length) {
+ buffer += "," + val;
} else {
- startChar = "";
+ buffer += val;
}
- } else if (xmlData[i] === ">") {
- if (startChar === "") {
- tagClosed = true;
- break;
- }
- }
- attrStr += xmlData[i];
- }
- if (startChar !== "") {
- return false;
- }
- return {
- value: attrStr,
- index: i,
- tagClosed
- };
- };
- var validateAttributeString = function(attrStr, options) {
- const matches = util.getAllMatches(attrStr, validAttrStrRegxp);
- const attrNames = {};
- for (let i = 0;i < matches.length; i++) {
- if (matches[i][1].length === 0) {
- return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' has no space in starting.", getPositionFromMatch(matches[i]));
- } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {
- return getErrorObject("InvalidAttr", "Attribute '" + matches[i][2] + "' is without value.", getPositionFromMatch(matches[i]));
- } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {
- return getErrorObject("InvalidAttr", "boolean attribute '" + matches[i][2] + "' is not allowed.", getPositionFromMatch(matches[i]));
- }
- const attrName = matches[i][2];
- if (!validateAttrName(attrName)) {
- return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is an invalid name.", getPositionFromMatch(matches[i]));
- }
- if (!attrNames.hasOwnProperty(attrName)) {
- attrNames[attrName] = 1;
- } else {
- return getErrorObject("InvalidAttr", "Attribute '" + attrName + "' is repeated.", getPositionFromMatch(matches[i]));
+ continue;
}
+ break;
}
- return true;
+ return buffer;
};
- var validateNumberAmpersand = function(xmlData, i) {
- let re = /\d/;
- if (xmlData[i] === "x") {
- i++;
- re = /[\da-fA-F]/;
- }
- for (;i < xmlData.length; i++) {
- if (xmlData[i] === ";")
- return i;
- if (!xmlData[i].match(re))
- break;
- }
- return -1;
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
};
- var validateAmpersand = function(xmlData, i) {
- i++;
- if (xmlData[i] === ";")
- return -1;
- if (xmlData[i] === "#") {
- i++;
- return validateNumberAmpersand(xmlData, i);
- }
- let count = 0;
- for (;i < xmlData.length; i++, count++) {
- if (xmlData[i].match(/\w/) && count < 20)
- continue;
- if (xmlData[i] === ";")
- break;
- return -1;
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return i;
- };
- var getErrorObject = function(code, message, lineNumber) {
- return {
- err: {
- code,
- msg: message,
- line: lineNumber.line || lineNumber,
- col: lineNumber.col
- }
- };
- };
- var validateAttrName = function(attrName) {
- return util.isName(attrName);
- };
- var validateTagName = function(tagname) {
- return util.isName(tagname);
- };
- var getLineNumberForPosition = function(xmlData, index) {
- const lines = xmlData.substring(0, index).split(/\r?\n/);
- return {
- line: lines.length,
- col: lines[lines.length - 1].length + 1
- };
- };
- var getPositionFromMatch = function(match) {
- return match.startIndex + match[1].length;
+ return to;
};
- var util = require_util();
- var defaultOptions = {
- allowBooleanAttributes: false,
- unpairedTags: []
- };
- exports.validate = function(xmlData, options) {
- options = Object.assign({}, defaultOptions, options);
- const tags = [];
- let tagFound = false;
- let reachedRoot = false;
- if (xmlData[0] === "\uFEFF") {
- xmlData = xmlData.substr(1);
- }
- for (let i = 0;i < xmlData.length; i++) {
- if (xmlData[i] === "<" && xmlData[i + 1] === "?") {
- i += 2;
- i = readPI(xmlData, i);
- if (i.err)
- return i;
- } else if (xmlData[i] === "<") {
- let tagStartPos = i;
- i++;
- if (xmlData[i] === "!") {
- i = readCommentAndCDATA(xmlData, i);
- continue;
- } else {
- let closingTag = false;
- if (xmlData[i] === "/") {
- closingTag = true;
- i++;
- }
- let tagName = "";
- for (;i < xmlData.length && xmlData[i] !== ">" && xmlData[i] !== " " && xmlData[i] !== "\t" && xmlData[i] !== "\n" && xmlData[i] !== "\r"; i++) {
- tagName += xmlData[i];
- }
- tagName = tagName.trim();
- if (tagName[tagName.length - 1] === "/") {
- tagName = tagName.substring(0, tagName.length - 1);
- i--;
- }
- if (!validateTagName(tagName)) {
- let msg;
- if (tagName.trim().length === 0) {
- msg = "Invalid space after '<'.";
- } else {
- msg = "Tag '" + tagName + "' is an invalid name.";
- }
- return getErrorObject("InvalidTag", msg, getLineNumberForPosition(xmlData, i));
- }
- const result = readAttributeStr(xmlData, i);
- if (result === false) {
- return getErrorObject("InvalidAttr", "Attributes for '" + tagName + "' have open quote.", getLineNumberForPosition(xmlData, i));
- }
- let attrStr = result.value;
- i = result.index;
- if (attrStr[attrStr.length - 1] === "/") {
- const attrStrStart = i - attrStr.length;
- attrStr = attrStr.substring(0, attrStr.length - 1);
- const isValid = validateAttributeString(attrStr, options);
- if (isValid === true) {
- tagFound = true;
- } else {
- return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));
- }
- } else if (closingTag) {
- if (!result.tagClosed) {
- return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
- } else if (attrStr.trim().length > 0) {
- return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
- } else {
- const otg = tags.pop();
- if (tagName !== otg.tagName) {
- let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);
- return getErrorObject("InvalidTag", "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", getLineNumberForPosition(xmlData, tagStartPos));
- }
- if (tags.length == 0) {
- reachedRoot = true;
- }
- }
- } else {
- const isValid = validateAttributeString(attrStr, options);
- if (isValid !== true) {
- return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));
- }
- if (reachedRoot === true) {
- return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i));
- } else if (options.unpairedTags.indexOf(tagName) !== -1) {
- } else {
- tags.push({ tagName, tagStartPos });
- }
- tagFound = true;
- }
- for (i++;i < xmlData.length; i++) {
- if (xmlData[i] === "<") {
- if (xmlData[i + 1] === "!") {
- i++;
- i = readCommentAndCDATA(xmlData, i);
- continue;
- } else if (xmlData[i + 1] === "?") {
- i = readPI(xmlData, ++i);
- if (i.err)
- return i;
- } else {
- break;
- }
- } else if (xmlData[i] === "&") {
- const afterAmp = validateAmpersand(xmlData, i);
- if (afterAmp == -1)
- return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i));
- i = afterAmp;
- } else {
- if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {
- return getErrorObject("InvalidXml", "Extra text at the end", getLineNumberForPosition(xmlData, i));
- }
- }
- }
- if (xmlData[i] === "<") {
- i--;
- }
- }
- } else {
- if (isWhiteSpace(xmlData[i])) {
- continue;
- }
- return getErrorObject("InvalidChar", "char '" + xmlData[i] + "' is not expected.", getLineNumberForPosition(xmlData, i));
- }
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID,
+ getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,
+ getUserAgentPlugin: () => getUserAgentPlugin,
+ resolveUserAgentConfig: () => resolveUserAgentConfig,
+ userAgentMiddleware: () => userAgentMiddleware
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_core = require_dist_cjs17();
+ var DEFAULT_UA_APP_ID = undefined;
+ __name(isValidUserAgentAppId, "isValidUserAgentAppId");
+ __name(resolveUserAgentConfig, "resolveUserAgentConfig");
+ var import_util_endpoints = require_dist_cjs38();
+ var import_protocol_http = require_dist_cjs2();
+ var import_core2 = require_dist_cjs24();
+ var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
+ __name(checkFeatures, "checkFeatures");
+ var USER_AGENT = "user-agent";
+ var X_AMZ_USER_AGENT = "x-amz-user-agent";
+ var SPACE = " ";
+ var UA_NAME_SEPARATOR = "/";
+ var UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g;
+ var UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;
+ var UA_ESCAPE_CHAR = "-";
+ var BYTE_LIMIT = 1024;
+ __name(encodeFeatures, "encodeFeatures");
+ var userAgentMiddleware = __name((options) => (next, context) => async (args) => {
+ const { request } = args;
+ if (!import_protocol_http.HttpRequest.isInstance(request)) {
+ return next(args);
}
- if (!tagFound) {
- return getErrorObject("InvalidXml", "Start tag expected.", 1);
- } else if (tags.length == 1) {
- return getErrorObject("InvalidTag", "Unclosed tag '" + tags[0].tagName + "'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos));
- } else if (tags.length > 0) {
- return getErrorObject("InvalidXml", "Invalid '" + JSON.stringify(tags.map((t) => t.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
+ const { headers } = request;
+ const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
+ const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
+ await checkFeatures(context, options, args);
+ const awsContext = context;
+ defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
+ const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
+ const appId = await options.userAgentAppId();
+ if (appId) {
+ defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));
}
- return true;
- };
- var doubleQuote = '"';
- var singleQuote = "'";
- var validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', "g");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_OptionsBuilder = __commonJS((exports) => {
- var defaultOptions = {
- preserveOrder: false,
- attributeNamePrefix: "@_",
- attributesGroupName: false,
- textNodeName: "#text",
- ignoreAttributes: true,
- removeNSPrefix: false,
- allowBooleanAttributes: false,
- parseTagValue: true,
- parseAttributeValue: false,
- trimValues: true,
- cdataPropName: false,
- numberParseOptions: {
- hex: true,
- leadingZeros: true,
- eNotation: true
- },
- tagValueProcessor: function(tagName, val2) {
- return val2;
- },
- attributeValueProcessor: function(attrName, val2) {
- return val2;
- },
- stopNodes: [],
- alwaysCreateTextNode: false,
- isArray: () => false,
- commentPropName: false,
- unpairedTags: [],
- processEntities: true,
- htmlEntities: false,
- ignoreDeclaration: false,
- ignorePiTags: false,
- transformTagName: false,
- transformAttributeName: false,
- updateTag: function(tagName, jPath, attrs) {
- return tagName;
- }
- };
- var buildOptions = function(options) {
- return Object.assign({}, defaultOptions, options);
- };
- exports.buildOptions = buildOptions;
- exports.defaultOptions = defaultOptions;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ru
-var require_xmlNode = __commonJS((exports, module) => {
- class XmlNode {
- constructor(tagname) {
- this.tagname = tagname;
- this.child = [];
- this[":@"] = {};
- }
- add(key, val2) {
- if (key === "__proto__")
- key = "#__proto__";
- this.child.push({ [key]: val2 });
- }
- addChild(node) {
- if (node.tagname === "__proto__")
- node.tagname = "#__proto__";
- if (node[":@"] && Object.keys(node[":@"]).length > 0) {
- this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] });
- } else {
- this.child.push({ [node.tagname]: node.child });
- }
- }
- }
- module.exports = XmlNode;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.
-var require_DocTypeReader = __commonJS((exports, module) => {
- var readDocType = function(xmlData, i) {
- const entities = {};
- if (xmlData[i + 3] === "O" && xmlData[i + 4] === "C" && xmlData[i + 5] === "T" && xmlData[i + 6] === "Y" && xmlData[i + 7] === "P" && xmlData[i + 8] === "E") {
- i = i + 9;
- let angleBracketsCount = 1;
- let hasBody = false, comment = false;
- let exp = "";
- for (;i < xmlData.length; i++) {
- if (xmlData[i] === "<" && !comment) {
- if (hasBody && isEntity(xmlData, i)) {
- i += 7;
- [entityName, val, i] = readEntityExp(xmlData, i + 1);
- if (val.indexOf("&") === -1)
- entities[validateEntityName(entityName)] = {
- regx: RegExp(`&${entityName};`, "g"),
- val
- };
- } else if (hasBody && isElement(xmlData, i))
- i += 8;
- else if (hasBody && isAttlist(xmlData, i))
- i += 8;
- else if (hasBody && isNotation(xmlData, i))
- i += 9;
- else if (isComment)
- comment = true;
- else
- throw new Error("Invalid DOCTYPE");
- angleBracketsCount++;
- exp = "";
- } else if (xmlData[i] === ">") {
- if (comment) {
- if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") {
- comment = false;
- angleBracketsCount--;
- }
- } else {
- angleBracketsCount--;
- }
- if (angleBracketsCount === 0) {
- break;
- }
- } else if (xmlData[i] === "[") {
- hasBody = true;
- } else {
- exp += xmlData[i];
- }
- }
- if (angleBracketsCount !== 0) {
- throw new Error(`Unclosed DOCTYPE`);
+ const prefix = (0, import_util_endpoints.getUserAgentPrefix)();
+ const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);
+ const normalUAValue = [
+ ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")),
+ ...customUserAgent
+ ].join(SPACE);
+ if (options.runtime !== "browser") {
+ if (normalUAValue) {
+ headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
}
+ headers[USER_AGENT] = sdkUserAgentValue;
} else {
- throw new Error(`Invalid Tag instead of DOCTYPE`);
- }
- return { entities, i };
- };
- var readEntityExp = function(xmlData, i) {
- let entityName2 = "";
- for (;i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) {
- entityName2 += xmlData[i];
+ headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
}
- entityName2 = entityName2.trim();
- if (entityName2.indexOf(" ") !== -1)
- throw new Error("External entites are not supported");
- const startChar = xmlData[i++];
- let val2 = "";
- for (;i < xmlData.length && xmlData[i] !== startChar; i++) {
- val2 += xmlData[i];
+ return next({
+ ...args,
+ request
+ });
+ }, "userAgentMiddleware");
+ var escapeUserAgent = __name((userAgentPair) => {
+ const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);
+ const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);
+ const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);
+ const prefix = name.substring(0, prefixSeparatorIndex);
+ let uaName = name.substring(prefixSeparatorIndex + 1);
+ if (prefix === "api") {
+ uaName = uaName.toLowerCase();
}
- return [entityName2, val2, i];
- };
- var isComment = function(xmlData, i) {
- if (xmlData[i + 1] === "!" && xmlData[i + 2] === "-" && xmlData[i + 3] === "-")
- return true;
- return false;
- };
- var isEntity = function(xmlData, i) {
- if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "N" && xmlData[i + 4] === "T" && xmlData[i + 5] === "I" && xmlData[i + 6] === "T" && xmlData[i + 7] === "Y")
- return true;
- return false;
- };
- var isElement = function(xmlData, i) {
- if (xmlData[i + 1] === "!" && xmlData[i + 2] === "E" && xmlData[i + 3] === "L" && xmlData[i + 4] === "E" && xmlData[i + 5] === "M" && xmlData[i + 6] === "E" && xmlData[i + 7] === "N" && xmlData[i + 8] === "T")
- return true;
- return false;
- };
- var isAttlist = function(xmlData, i) {
- if (xmlData[i + 1] === "!" && xmlData[i + 2] === "A" && xmlData[i + 3] === "T" && xmlData[i + 4] === "T" && xmlData[i + 5] === "L" && xmlData[i + 6] === "I" && xmlData[i + 7] === "S" && xmlData[i + 8] === "T")
- return true;
- return false;
- };
- var isNotation = function(xmlData, i) {
- if (xmlData[i + 1] === "!" && xmlData[i + 2] === "N" && xmlData[i + 3] === "O" && xmlData[i + 4] === "T" && xmlData[i + 5] === "A" && xmlData[i + 6] === "T" && xmlData[i + 7] === "I" && xmlData[i + 8] === "O" && xmlData[i + 9] === "N")
- return true;
- return false;
- };
- var validateEntityName = function(name) {
- if (util.isName(name))
- return name;
- else
- throw new Error(`Invalid entity name ${name}`);
+ return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
+ switch (index) {
+ case 0:
+ return item;
+ case 1:
+ return `${acc}/${item}`;
+ default:
+ return `${acc}#${item}`;
+ }
+ }, "");
+ }, "escapeUserAgent");
+ var getUserAgentMiddlewareOptions = {
+ name: "getUserAgentMiddleware",
+ step: "build",
+ priority: "low",
+ tags: ["SET_USER_AGENT", "USER_AGENT"],
+ override: true
};
- var util = require_util();
- module.exports = readDocType;
+ var getUserAgentPlugin = __name((config) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
+ }, "applyToStack")
+ }), "getUserAgentPlugin");
});
-// node_modules/@aws-sdk/client-
-var require_strnum = __commonJS((exports, module) => {
- var toNumber = function(str, options = {}) {
- options = Object.assign({}, consider, options);
- if (!str || typeof str !== "string")
- return str;
- let trimmedStr = str.trim();
- if (options.skipLike !== undefined && options.skipLike.test(trimmedStr))
- return str;
- else if (options.hex && hexRegex.test(trimmedStr)) {
- return Number.parseInt(trimmedStr, 16);
- } else {
- const match = numRegex.exec(trimmedStr);
- if (match) {
- const sign = match[1];
- const leadingZeros = match[2];
- let numTrimmedByZeros = trimZeros(match[3]);
- const eNotation = match[4] || match[6];
- if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".")
- return str;
- else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".")
- return str;
- else {
- const num = Number(trimmedStr);
- const numStr = "" + num;
- if (numStr.search(/[eE]/) !== -1) {
- if (options.eNotation)
- return num;
- else
- return str;
- } else if (eNotation) {
- if (options.eNotation)
- return num;
- else
- return str;
- } else if (trimmedStr.indexOf(".") !== -1) {
- if (numStr === "0" && numTrimmedByZeros === "")
- return num;
- else if (numStr === numTrimmedByZeros)
- return num;
- else if (sign && numStr === "-" + numTrimmedByZeros)
- return num;
- else
- return str;
- }
- if (leadingZeros) {
- if (numTrimmedByZeros === numStr)
- return num;
- else if (sign + numTrimmedByZeros === numStr)
- return num;
- else
- return str;
- }
- if (trimmedStr === numStr)
- return num;
- else if (trimmedStr === sign + numStr)
- return num;
- return str;
- }
- } else {
- return str;
- }
- }
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var require_dist_cjs40 = __commonJS((exports) => {
+ var utilConfigProvider = require_dist_cjs32();
+ var utilMiddleware = require_dist_cjs4();
+ var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
+ var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
+ var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
+ var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
+ configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
+ default: false
};
- var trimZeros = function(numStr) {
- if (numStr && numStr.indexOf(".") !== -1) {
- numStr = numStr.replace(/0+$/, "");
- if (numStr === ".")
- numStr = "0";
- else if (numStr[0] === ".")
- numStr = "0" + numStr;
- else if (numStr[numStr.length - 1] === ".")
- numStr = numStr.substr(0, numStr.length - 1);
- return numStr;
- }
- return numStr;
+ var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
+ var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
+ var DEFAULT_USE_FIPS_ENDPOINT = false;
+ var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
+ configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
+ default: false
};
- var hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
- var numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;
- if (!Number.parseInt && window.parseInt) {
- Number.parseInt = window.parseInt;
- }
- if (!Number.parseFloat && window.parseFloat) {
- Number.parseFloat = window.parseFloat;
- }
- var consider = {
- hex: true,
- leadingZeros: true,
- decimalPoint: ".",
- eNotation: true
+ var resolveCustomEndpointsConfig = (input) => {
+ const { tls, endpoint, urlParser, useDualstackEndpoint } = input;
+ return Object.assign(input, {
+ tls: tls ?? true,
+ endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
+ isCustomEndpoint: true,
+ useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false)
+ });
};
- module.exports = toNumber;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jss
-var require_OrderedObjParser = __commonJS((exports, module) => {
- var addExternalEntities = function(externalEntities) {
- const entKeys = Object.keys(externalEntities);
- for (let i = 0;i < entKeys.length; i++) {
- const ent = entKeys[i];
- this.lastEntities[ent] = {
- regex: new RegExp("&" + ent + ";", "g"),
- val: externalEntities[ent]
- };
+ var getEndpointFromRegion = async (input) => {
+ const { tls = true } = input;
+ const region = await input.region();
+ const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
+ if (!dnsHostRegex.test(region)) {
+ throw new Error("Invalid region in client config");
}
- };
- var parseTextData = function(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {
- if (val2 !== undefined) {
- if (this.options.trimValues && !dontTrim) {
- val2 = val2.trim();
- }
- if (val2.length > 0) {
- if (!escapeEntities)
- val2 = this.replaceEntitiesValue(val2);
- const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);
- if (newval === null || newval === undefined) {
- return val2;
- } else if (typeof newval !== typeof val2 || newval !== val2) {
- return newval;
- } else if (this.options.trimValues) {
- return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);
- } else {
- const trimmedVal = val2.trim();
- if (trimmedVal === val2) {
- return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);
- } else {
- return val2;
- }
- }
- }
+ const useDualstackEndpoint = await input.useDualstackEndpoint();
+ const useFipsEndpoint = await input.useFipsEndpoint();
+ const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};
+ if (!hostname) {
+ throw new Error("Cannot resolve hostname from client config");
}
+ return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
};
- var resolveNameSpace = function(tagname) {
- if (this.options.removeNSPrefix) {
- const tags = tagname.split(":");
- const prefix = tagname.charAt(0) === "/" ? "/" : "";
- if (tags[0] === "xmlns") {
- return "";
- }
- if (tags.length === 2) {
- tagname = prefix + tags[1];
- }
- }
- return tagname;
- };
- var buildAttributesMap = function(attrStr, jPath, tagName) {
- if (!this.options.ignoreAttributes && typeof attrStr === "string") {
- const matches = util.getAllMatches(attrStr, attrsRegx);
- const len = matches.length;
- const attrs = {};
- for (let i = 0;i < len; i++) {
- const attrName = this.resolveNameSpace(matches[i][1]);
- let oldVal = matches[i][4];
- let aName = this.options.attributeNamePrefix + attrName;
- if (attrName.length) {
- if (this.options.transformAttributeName) {
- aName = this.options.transformAttributeName(aName);
- }
- if (aName === "__proto__")
- aName = "#__proto__";
- if (oldVal !== undefined) {
- if (this.options.trimValues) {
- oldVal = oldVal.trim();
- }
- oldVal = this.replaceEntitiesValue(oldVal);
- const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);
- if (newVal === null || newVal === undefined) {
- attrs[aName] = oldVal;
- } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {
- attrs[aName] = newVal;
- } else {
- attrs[aName] = parseValue(oldVal, this.options.parseAttributeValue, this.options.numberParseOptions);
- }
- } else if (this.options.allowBooleanAttributes) {
- attrs[aName] = true;
- }
- }
- }
- if (!Object.keys(attrs).length) {
- return;
- }
- if (this.options.attributesGroupName) {
- const attrCollection = {};
- attrCollection[this.options.attributesGroupName] = attrs;
- return attrCollection;
- }
- return attrs;
- }
+ var resolveEndpointsConfig = (input) => {
+ const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false);
+ const { endpoint, useFipsEndpoint, urlParser, tls } = input;
+ return Object.assign(input, {
+ tls: tls ?? true,
+ endpoint: endpoint ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
+ isCustomEndpoint: !!endpoint,
+ useDualstackEndpoint
+ });
};
- var addChild = function(currentNode, childNode, jPath) {
- const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]);
- if (result === false) {
- } else if (typeof result === "string") {
- childNode.tagname = result;
- currentNode.addChild(childNode);
- } else {
- currentNode.addChild(childNode);
+ var REGION_ENV_NAME = "AWS_REGION";
+ var REGION_INI_NAME = "region";
+ var NODE_REGION_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => env[REGION_ENV_NAME],
+ configFileSelector: (profile) => profile[REGION_INI_NAME],
+ default: () => {
+ throw new Error("Region is missing");
}
};
- var saveTextToParentTag = function(textData, currentNode, jPath, isLeafNode) {
- if (textData) {
- if (isLeafNode === undefined)
- isLeafNode = Object.keys(currentNode.child).length === 0;
- textData = this.parseTextData(textData, currentNode.tagname, jPath, false, currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, isLeafNode);
- if (textData !== undefined && textData !== "")
- currentNode.add(this.options.textNodeName, textData);
- textData = "";
- }
- return textData;
+ var NODE_REGION_CONFIG_FILE_OPTIONS = {
+ preferredFile: "credentials"
};
- var isItStopNode = function(stopNodes, jPath, currentTagName) {
- const allNodesExp = "*." + currentTagName;
- for (const stopNodePath in stopNodes) {
- const stopNodeExp = stopNodes[stopNodePath];
- if (allNodesExp === stopNodeExp || jPath === stopNodeExp)
- return true;
+ var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
+ var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
+ var resolveRegionConfig = (input) => {
+ const { region, useFipsEndpoint } = input;
+ if (!region) {
+ throw new Error("Region is missing");
}
- return false;
- };
- var tagExpWithClosingIndex = function(xmlData, i, closingChar = ">") {
- let attrBoundary;
- let tagExp = "";
- for (let index = i;index < xmlData.length; index++) {
- let ch = xmlData[index];
- if (attrBoundary) {
- if (ch === attrBoundary)
- attrBoundary = "";
- } else if (ch === '"' || ch === "'") {
- attrBoundary = ch;
- } else if (ch === closingChar[0]) {
- if (closingChar[1]) {
- if (xmlData[index + 1] === closingChar[1]) {
- return {
- data: tagExp,
- index
- };
- }
- } else {
- return {
- data: tagExp,
- index
- };
+ return Object.assign(input, {
+ region: async () => {
+ if (typeof region === "string") {
+ return getRealRegion(region);
+ }
+ const providedRegion = await region();
+ return getRealRegion(providedRegion);
+ },
+ useFipsEndpoint: async () => {
+ const providedRegion = typeof region === "string" ? region : await region();
+ if (isFipsRegion(providedRegion)) {
+ return true;
}
- } else if (ch === "\t") {
- ch = " ";
+ return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
}
- tagExp += ch;
- }
- };
- var findClosingIndex = function(xmlData, str, i, errMsg) {
- const closingIndex = xmlData.indexOf(str, i);
- if (closingIndex === -1) {
- throw new Error(errMsg);
- } else {
- return closingIndex + str.length - 1;
- }
+ });
};
- var readTagExp = function(xmlData, i, removeNSPrefix, closingChar = ">") {
- const result = tagExpWithClosingIndex(xmlData, i + 1, closingChar);
- if (!result)
- return;
- let tagExp = result.data;
- const closeIndex = result.index;
- const separatorIndex = tagExp.search(/\s/);
- let tagName = tagExp;
- let attrExpPresent = true;
- if (separatorIndex !== -1) {
- tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, "");
- tagExp = tagExp.substr(separatorIndex + 1);
- }
- if (removeNSPrefix) {
- const colonIndex = tagName.indexOf(":");
- if (colonIndex !== -1) {
- tagName = tagName.substr(colonIndex + 1);
- attrExpPresent = tagName !== result.data.substr(colonIndex + 1);
+ var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname;
+ var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : undefined;
+ var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws";
+ var getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
+ if (signingRegion) {
+ return signingRegion;
+ } else if (useFipsEndpoint) {
+ const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\.");
+ const regionRegexmatchArray = hostname.match(regionRegexJs);
+ if (regionRegexmatchArray) {
+ return regionRegexmatchArray[0].slice(1, -1);
}
}
- return {
- tagName,
- tagExp,
- closeIndex,
- attrExpPresent
- };
};
- var readStopNodeData = function(xmlData, tagName, i) {
- const startIndex = i;
- let openTagCount = 1;
- for (;i < xmlData.length; i++) {
- if (xmlData[i] === "<") {
- if (xmlData[i + 1] === "/") {
- const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`);
- let closeTagName = xmlData.substring(i + 2, closeIndex).trim();
- if (closeTagName === tagName) {
- openTagCount--;
- if (openTagCount === 0) {
- return {
- tagContent: xmlData.substring(startIndex, i),
- i: closeIndex
- };
- }
- }
- i = closeIndex;
- } else if (xmlData[i + 1] === "?") {
- const closeIndex = findClosingIndex(xmlData, "?>", i + 1, "StopNode is not closed.");
- i = closeIndex;
- } else if (xmlData.substr(i + 1, 3) === "!--") {
- const closeIndex = findClosingIndex(xmlData, "-->", i + 3, "StopNode is not closed.");
- i = closeIndex;
- } else if (xmlData.substr(i + 1, 2) === "![") {
- const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2;
- i = closeIndex;
- } else {
- const tagData = readTagExp(xmlData, i, ">");
- if (tagData) {
- const openTagName = tagData && tagData.tagName;
- if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== "/") {
- openTagCount++;
- }
- i = tagData.closeIndex;
- }
- }
- }
+ var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
+ const partition = getResolvedPartition(region, { partitionHash });
+ const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
+ const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
+ const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);
+ const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);
+ const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });
+ if (hostname === undefined) {
+ throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);
}
- };
- var parseValue = function(val2, shouldParse, options) {
- if (shouldParse && typeof val2 === "string") {
- const newval = val2.trim();
- if (newval === "true")
- return true;
- else if (newval === "false")
- return false;
- else
- return toNumber(val2, options);
- } else {
- if (util.isExist(val2)) {
- return val2;
- } else {
- return "";
+ const signingRegion = getResolvedSigningRegion(hostname, {
+ signingRegion: regionHash[resolvedRegion]?.signingRegion,
+ regionRegex: partitionHash[partition].regionRegex,
+ useFipsEndpoint
+ });
+ return {
+ partition,
+ signingService,
+ hostname,
+ ...signingRegion && { signingRegion },
+ ...regionHash[resolvedRegion]?.signingService && {
+ signingService: regionHash[resolvedRegion].signingService
}
- }
+ };
};
- var util = require_util();
- var xmlNode = require_xmlNode();
- var readDocType = require_DocTypeReader();
- var toNumber = require_strnum();
- var regx = "<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g, util.nameRegexp);
+ exports.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
+ exports.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
+ exports.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
+ exports.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
+ exports.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
+ exports.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
+ exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
+ exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
+ exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS;
+ exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS;
+ exports.REGION_ENV_NAME = REGION_ENV_NAME;
+ exports.REGION_INI_NAME = REGION_INI_NAME;
+ exports.getRegionInfo = getRegionInfo;
+ exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
+ exports.resolveEndpointsConfig = resolveEndpointsConfig;
+ exports.resolveRegionConfig = resolveRegionConfig;
+});
- class OrderedObjParser {
- constructor(options) {
- this.options = options;
- this.currentNode = null;
- this.tagsNodeStack = [];
- this.docTypeEntities = {};
- this.lastEntities = {
- apos: { regex: /&(apos|#39|#x27);/g, val: "'" },
- gt: { regex: /&(gt|#62|#x3E);/g, val: ">" },
- lt: { regex: /&(lt|#60|#x3C);/g, val: "<" },
- quot: { regex: /&(quot|#34|#x22);/g, val: "\"" }
- };
- this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: "&" };
- this.htmlEntities = {
- space: { regex: /&(nbsp|#160);/g, val: " " },
- cent: { regex: /&(cent|#162);/g, val: "\xA2" },
- pound: { regex: /&(pound|#163);/g, val: "\xA3" },
- yen: { regex: /&(yen|#165);/g, val: "\xA5" },
- euro: { regex: /&(euro|#8364);/g, val: "\u20AC" },
- copyright: { regex: /&(copy|#169);/g, val: "\xA9" },
- reg: { regex: /&(reg|#174);/g, val: "\xAE" },
- inr: { regex: /&(inr|#8377);/g, val: "\u20B9" }
- };
- this.addExternalEntities = addExternalEntities;
- this.parseXml = parseXml;
- this.parseTextData = parseTextData;
- this.resolveNameSpace = resolveNameSpace;
- this.buildAttributesMap = buildAttributesMap;
- this.isItStopNode = isItStopNode;
- this.replaceEntitiesValue = replaceEntitiesValue;
- this.readStopNodeData = readStopNodeData;
- this.saveTextToParentTag = saveTextToParentTag;
- this.addChild = addChild;
- }
- }
- var attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', "gm");
- var parseXml = function(xmlData) {
- xmlData = xmlData.replace(/\r\n?/g, "\n");
- const xmlObj = new xmlNode("!xml");
- let currentNode = xmlObj;
- let textData = "";
- let jPath = "";
- for (let i = 0;i < xmlData.length; i++) {
- const ch = xmlData[i];
- if (ch === "<") {
- if (xmlData[i + 1] === "/") {
- const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.");
- let tagName = xmlData.substring(i + 2, closeIndex).trim();
- if (this.options.removeNSPrefix) {
- const colonIndex = tagName.indexOf(":");
- if (colonIndex !== -1) {
- tagName = tagName.substr(colonIndex + 1);
- }
- }
- if (this.options.transformTagName) {
- tagName = this.options.transformTagName(tagName);
- }
- if (currentNode) {
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
- }
- const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1);
- if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {
- throw new Error(`Unpaired tag can not be used as closing tag: ${tagName}>`);
- }
- let propIndex = 0;
- if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {
- propIndex = jPath.lastIndexOf(".", jPath.lastIndexOf(".") - 1);
- this.tagsNodeStack.pop();
- } else {
- propIndex = jPath.lastIndexOf(".");
- }
- jPath = jPath.substring(0, propIndex);
- currentNode = this.tagsNodeStack.pop();
- textData = "";
- i = closeIndex;
- } else if (xmlData[i + 1] === "?") {
- let tagData = readTagExp(xmlData, i, false, "?>");
- if (!tagData)
- throw new Error("Pi Tag is not closed.");
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
- if (this.options.ignoreDeclaration && tagData.tagName === "?xml" || this.options.ignorePiTags) {
- } else {
- const childNode = new xmlNode(tagData.tagName);
- childNode.add(this.options.textNodeName, "");
- if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {
- childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);
- }
- this.addChild(currentNode, childNode, jPath);
- }
- i = tagData.closeIndex + 1;
- } else if (xmlData.substr(i + 1, 3) === "!--") {
- const endIndex = findClosingIndex(xmlData, "-->", i + 4, "Comment is not closed.");
- if (this.options.commentPropName) {
- const comment = xmlData.substring(i + 4, endIndex - 2);
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
- currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);
- }
- i = endIndex;
- } else if (xmlData.substr(i + 1, 2) === "!D") {
- const result = readDocType(xmlData, i);
- this.docTypeEntities = result.entities;
- i = result.i;
- } else if (xmlData.substr(i + 1, 2) === "![") {
- const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
- const tagExp = xmlData.substring(i + 9, closeIndex);
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
- if (this.options.cdataPropName) {
- currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);
- } else {
- let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true);
- if (val2 == undefined)
- val2 = "";
- currentNode.add(this.options.textNodeName, val2);
- }
- i = closeIndex + 2;
- } else {
- let result = readTagExp(xmlData, i, this.options.removeNSPrefix);
- let tagName = result.tagName;
- let tagExp = result.tagExp;
- let attrExpPresent = result.attrExpPresent;
- let closeIndex = result.closeIndex;
- if (this.options.transformTagName) {
- tagName = this.options.transformTagName(tagName);
- }
- if (currentNode && textData) {
- if (currentNode.tagname !== "!xml") {
- textData = this.saveTextToParentTag(textData, currentNode, jPath, false);
- }
- }
- const lastTag = currentNode;
- if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {
- currentNode = this.tagsNodeStack.pop();
- jPath = jPath.substring(0, jPath.lastIndexOf("."));
- }
- if (tagName !== xmlObj.tagname) {
- jPath += jPath ? "." + tagName : tagName;
- }
- if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {
- let tagContent = "";
- if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
- i = result.closeIndex;
- } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {
- i = result.closeIndex;
- } else {
- const result2 = this.readStopNodeData(xmlData, tagName, closeIndex + 1);
- if (!result2)
- throw new Error(`Unexpected end of ${tagName}`);
- i = result2.i;
- tagContent = result2.tagContent;
- }
- const childNode = new xmlNode(tagName);
- if (tagName !== tagExp && attrExpPresent) {
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
- }
- if (tagContent) {
- tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
- }
- jPath = jPath.substr(0, jPath.lastIndexOf("."));
- childNode.add(this.options.textNodeName, tagContent);
- this.addChild(currentNode, childNode, jPath);
- } else {
- if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
- if (tagName[tagName.length - 1] === "/") {
- tagName = tagName.substr(0, tagName.length - 1);
- tagExp = tagName;
- } else {
- tagExp = tagExp.substr(0, tagExp.length - 1);
- }
- if (this.options.transformTagName) {
- tagName = this.options.transformTagName(tagName);
- }
- const childNode = new xmlNode(tagName);
- if (tagName !== tagExp && attrExpPresent) {
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
- }
- this.addChild(currentNode, childNode, jPath);
- jPath = jPath.substr(0, jPath.lastIndexOf("."));
- } else {
- const childNode = new xmlNode(tagName);
- this.tagsNodeStack.push(currentNode);
- if (tagName !== tagExp && attrExpPresent) {
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
- }
- this.addChild(currentNode, childNode, jPath);
- currentNode = childNode;
- }
- textData = "";
- i = closeIndex;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoi
+var require_dist_cjs41 = __commonJS((exports) => {
+ var resolveEventStreamSerdeConfig = (input) => Object.assign(input, {
+ eventStreamMarshaller: input.eventStreamSerdeProvider(input)
+ });
+ exports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_dist_cjs42 = __commonJS((exports) => {
+ var contentLengthMiddleware = function(bodyLengthChecker) {
+ return (next) => async (args) => {
+ const request = args.request;
+ if (protocolHttp.HttpRequest.isInstance(request)) {
+ const { body, headers } = request;
+ if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {
+ try {
+ const length = bodyLengthChecker(body);
+ request.headers = {
+ ...request.headers,
+ [CONTENT_LENGTH_HEADER]: String(length)
+ };
+ } catch (error) {
}
}
- } else {
- textData += xmlData[i];
}
- }
- return xmlObj.child;
+ return next({
+ ...args,
+ request
+ });
+ };
};
- var replaceEntitiesValue = function(val2) {
- if (this.options.processEntities) {
- for (let entityName2 in this.docTypeEntities) {
- const entity = this.docTypeEntities[entityName2];
- val2 = val2.replace(entity.regx, entity.val);
- }
- for (let entityName2 in this.lastEntities) {
- const entity = this.lastEntities[entityName2];
- val2 = val2.replace(entity.regex, entity.val);
- }
- if (this.options.htmlEntities) {
- for (let entityName2 in this.htmlEntities) {
- const entity = this.htmlEntities[entityName2];
- val2 = val2.replace(entity.regex, entity.val);
- }
- }
- val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);
- }
- return val2;
+ var protocolHttp = require_dist_cjs2();
+ var CONTENT_LENGTH_HEADER = "content-length";
+ var contentLengthMiddlewareOptions = {
+ step: "build",
+ tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
+ name: "contentLengthMiddleware",
+ override: true
};
- module.exports = OrderedObjParser;
+ var getContentLengthPlugin = (options) => ({
+ applyToStack: (clientStack) => {
+ clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
+ }
+ });
+ exports.contentLengthMiddleware = contentLengthMiddleware;
+ exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions;
+ exports.getContentLengthPlugin = getContentLengthPlugin;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_node2json = __commonJS((exports) => {
- var prettify = function(node, options) {
- return compress(node, options);
- };
- var compress = function(arr, options, jPath) {
- let text;
- const compressedObj = {};
- for (let i = 0;i < arr.length; i++) {
- const tagObj = arr[i];
- const property = propName(tagObj);
- let newJpath = "";
- if (jPath === undefined)
- newJpath = property;
- else
- newJpath = jPath + "." + property;
- if (property === options.textNodeName) {
- if (text === undefined)
- text = tagObj[property];
- else
- text += "" + tagObj[property];
- } else if (property === undefined) {
- continue;
- } else if (tagObj[property]) {
- let val2 = compress(tagObj[property], options, newJpath);
- const isLeaf = isLeafTag(val2, options);
- if (tagObj[":@"]) {
- assignAttributes(val2, tagObj[":@"], newJpath, options);
- } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) {
- val2 = val2[options.textNodeName];
- } else if (Object.keys(val2).length === 0) {
- if (options.alwaysCreateTextNode)
- val2[options.textNodeName] = "";
- else
- val2 = "";
- }
- if (compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) {
- if (!Array.isArray(compressedObj[property])) {
- compressedObj[property] = [compressedObj[property]];
- }
- compressedObj[property].push(val2);
- } else {
- if (options.isArray(property, newJpath, isLeaf)) {
- compressedObj[property] = [val2];
- } else {
- compressedObj[property] = val2;
- }
- }
- }
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/e
+var require_dist_cjs43 = __commonJS((exports) => {
+ var CLOCK_SKEW_ERROR_CODES = [
+ "AuthFailure",
+ "InvalidSignatureException",
+ "RequestExpired",
+ "RequestInTheFuture",
+ "RequestTimeTooSkewed",
+ "SignatureDoesNotMatch"
+ ];
+ var THROTTLING_ERROR_CODES = [
+ "BandwidthLimitExceeded",
+ "EC2ThrottledException",
+ "LimitExceededException",
+ "PriorRequestNotComplete",
+ "ProvisionedThroughputExceededException",
+ "RequestLimitExceeded",
+ "RequestThrottled",
+ "RequestThrottledException",
+ "SlowDown",
+ "ThrottledException",
+ "Throttling",
+ "ThrottlingException",
+ "TooManyRequestsException",
+ "TransactionInProgressException"
+ ];
+ var TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"];
+ var TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];
+ var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"];
+ var NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"];
+ var isRetryableByTrait = (error) => error?.$retryable !== undefined;
+ var isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name);
+ var isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;
+ var isBrowserNetworkError = (error) => {
+ const errorMessages = new Set([
+ "Failed to fetch",
+ "NetworkError when attempting to fetch resource",
+ "The Internet connection appears to be offline",
+ "Load failed",
+ "Network request failed"
+ ]);
+ const isValid = error && error instanceof TypeError;
+ if (!isValid) {
+ return false;
}
- if (typeof text === "string") {
- if (text.length > 0)
- compressedObj[options.textNodeName] = text;
- } else if (text !== undefined)
- compressedObj[options.textNodeName] = text;
- return compressedObj;
+ return errorMessages.has(error.message);
};
- var propName = function(obj) {
- const keys = Object.keys(obj);
- for (let i = 0;i < keys.length; i++) {
- const key = keys[i];
- if (key !== ":@")
- return key;
- }
- };
- var assignAttributes = function(obj, attrMap, jpath, options) {
- if (attrMap) {
- const keys = Object.keys(attrMap);
- const len = keys.length;
- for (let i = 0;i < len; i++) {
- const atrrName = keys[i];
- if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) {
- obj[atrrName] = [attrMap[atrrName]];
- } else {
- obj[atrrName] = attrMap[atrrName];
- }
+ var isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true;
+ var isTransientError = (error, depth = 0) => isRetryableByTrait(error) || isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1);
+ var isServerError = (error) => {
+ if (error.$metadata?.httpStatusCode !== undefined) {
+ const statusCode = error.$metadata.httpStatusCode;
+ if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {
+ return true;
}
- }
- };
- var isLeafTag = function(obj, options) {
- const { textNodeName } = options;
- const propCount = Object.keys(obj).length;
- if (propCount === 0) {
- return true;
- }
- if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0)) {
- return true;
+ return false;
}
return false;
};
- exports.prettify = prettify;
+ exports.isBrowserNetworkError = isBrowserNetworkError;
+ exports.isClockSkewCorrectedError = isClockSkewCorrectedError;
+ exports.isClockSkewError = isClockSkewError;
+ exports.isRetryableByTrait = isRetryableByTrait;
+ exports.isServerError = isServerError;
+ exports.isThrottlingError = isThrottlingError;
+ exports.isTransientError = isTransientError;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_XMLParser = __commonJS((exports, module) => {
- var { buildOptions } = require_OptionsBuilder();
- var OrderedObjParser = require_OrderedObjParser();
- var { prettify } = require_node2json();
- var validator = require_validator2();
-
- class XMLParser {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
+var require_dist_cjs44 = __commonJS((exports) => {
+ var serviceErrorClassification = require_dist_cjs43();
+ exports.RETRY_MODES = undefined;
+ (function(RETRY_MODES) {
+ RETRY_MODES["STANDARD"] = "standard";
+ RETRY_MODES["ADAPTIVE"] = "adaptive";
+ })(exports.RETRY_MODES || (exports.RETRY_MODES = {}));
+ var DEFAULT_MAX_ATTEMPTS = 3;
+ var DEFAULT_RETRY_MODE = exports.RETRY_MODES.STANDARD;
+
+ class DefaultRateLimiter {
+ static setTimeoutFn = setTimeout;
+ beta;
+ minCapacity;
+ minFillRate;
+ scaleConstant;
+ smooth;
+ currentCapacity = 0;
+ enabled = false;
+ lastMaxRate = 0;
+ measuredTxRate = 0;
+ requestCount = 0;
+ fillRate;
+ lastThrottleTime;
+ lastTimestamp = 0;
+ lastTxRateBucket;
+ maxCapacity;
+ timeWindow = 0;
constructor(options) {
- this.externalEntities = {};
- this.options = buildOptions(options);
+ this.beta = options?.beta ?? 0.7;
+ this.minCapacity = options?.minCapacity ?? 1;
+ this.minFillRate = options?.minFillRate ?? 0.5;
+ this.scaleConstant = options?.scaleConstant ?? 0.4;
+ this.smooth = options?.smooth ?? 0.8;
+ const currentTimeInSeconds = this.getCurrentTimeInSeconds();
+ this.lastThrottleTime = currentTimeInSeconds;
+ this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
+ this.fillRate = this.minFillRate;
+ this.maxCapacity = this.minCapacity;
}
- parse(xmlData, validationOption) {
- if (typeof xmlData === "string") {
- } else if (xmlData.toString) {
- xmlData = xmlData.toString();
- } else {
- throw new Error("XML data is accepted in String or Bytes[] form.");
- }
- if (validationOption) {
- if (validationOption === true)
- validationOption = {};
- const result = validator.validate(xmlData, validationOption);
- if (result !== true) {
- throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);
- }
- }
- const orderedObjParser = new OrderedObjParser(this.options);
- orderedObjParser.addExternalEntities(this.externalEntities);
- const orderedResult = orderedObjParser.parseXml(xmlData);
- if (this.options.preserveOrder || orderedResult === undefined)
- return orderedResult;
- else
- return prettify(orderedResult, this.options);
- }
- addEntity(key, value) {
- if (value.indexOf("&") !== -1) {
- throw new Error("Entity value can't have '&'");
- } else if (key.indexOf("&") !== -1 || key.indexOf(";") !== -1) {
- throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");
- } else if (value === "&") {
- throw new Error("An entity with value '&' is not permitted");
- } else {
- this.externalEntities[key] = value;
- }
+ getCurrentTimeInSeconds() {
+ return Date.now() / 1000;
}
- }
- module.exports = XMLParser;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_orderedJs2Xml = __commonJS((exports, module) => {
- var toXml = function(jArray, options) {
- let indentation = "";
- if (options.format && options.indentBy.length > 0) {
- indentation = EOL;
+ async getSendToken() {
+ return this.acquireTokenBucket(1);
}
- return arrToStr(jArray, options, "", indentation);
- };
- var arrToStr = function(arr, options, jPath, indentation) {
- let xmlStr = "";
- let isPreviousElementTag = false;
- for (let i = 0;i < arr.length; i++) {
- const tagObj = arr[i];
- const tagName = propName(tagObj);
- let newJPath = "";
- if (jPath.length === 0)
- newJPath = tagName;
- else
- newJPath = `${jPath}.${tagName}`;
- if (tagName === options.textNodeName) {
- let tagText = tagObj[tagName];
- if (!isStopNode(newJPath, options)) {
- tagText = options.tagValueProcessor(tagName, tagText);
- tagText = replaceEntitiesValue(tagText, options);
- }
- if (isPreviousElementTag) {
- xmlStr += indentation;
- }
- xmlStr += tagText;
- isPreviousElementTag = false;
- continue;
- } else if (tagName === options.cdataPropName) {
- if (isPreviousElementTag) {
- xmlStr += indentation;
- }
- xmlStr += ``;
- isPreviousElementTag = false;
- continue;
- } else if (tagName === options.commentPropName) {
- xmlStr += indentation + ``;
- isPreviousElementTag = true;
- continue;
- } else if (tagName[0] === "?") {
- const attStr2 = attr_to_str(tagObj[":@"], options);
- const tempInd = tagName === "?xml" ? "" : indentation;
- let piTextNodeName = tagObj[tagName][0][options.textNodeName];
- piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : "";
- xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;
- isPreviousElementTag = true;
- continue;
+ async acquireTokenBucket(amount) {
+ if (!this.enabled) {
+ return;
}
- let newIdentation = indentation;
- if (newIdentation !== "") {
- newIdentation += options.indentBy;
+ this.refillTokenBucket();
+ if (amount > this.currentCapacity) {
+ const delay = (amount - this.currentCapacity) / this.fillRate * 1000;
+ await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));
}
- const attStr = attr_to_str(tagObj[":@"], options);
- const tagStart = indentation + `<${tagName}${attStr}`;
- const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);
- if (options.unpairedTags.indexOf(tagName) !== -1) {
- if (options.suppressUnpairedNode)
- xmlStr += tagStart + ">";
- else
- xmlStr += tagStart + "/>";
- } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {
- xmlStr += tagStart + "/>";
- } else if (tagValue && tagValue.endsWith(">")) {
- xmlStr += tagStart + `>${tagValue}${indentation}${tagName}>`;
- } else {
- xmlStr += tagStart + ">";
- if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes(""))) {
- xmlStr += indentation + options.indentBy + tagValue + indentation;
- } else {
- xmlStr += tagValue;
- }
- xmlStr += `${tagName}>`;
+ this.currentCapacity = this.currentCapacity - amount;
+ }
+ refillTokenBucket() {
+ const timestamp = this.getCurrentTimeInSeconds();
+ if (!this.lastTimestamp) {
+ this.lastTimestamp = timestamp;
+ return;
}
- isPreviousElementTag = true;
+ const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
+ this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);
+ this.lastTimestamp = timestamp;
}
- return xmlStr;
- };
- var propName = function(obj) {
- const keys = Object.keys(obj);
- for (let i = 0;i < keys.length; i++) {
- const key = keys[i];
- if (key !== ":@")
- return key;
- }
- };
- var attr_to_str = function(attrMap, options) {
- let attrStr = "";
- if (attrMap && !options.ignoreAttributes) {
- for (let attr in attrMap) {
- let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);
- attrVal = replaceEntitiesValue(attrVal, options);
- if (attrVal === true && options.suppressBooleanAttributes) {
- attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
- } else {
- attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
- }
+ updateClientSendingRate(response) {
+ let calculatedRate;
+ this.updateMeasuredRate();
+ if (serviceErrorClassification.isThrottlingError(response)) {
+ const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
+ this.lastMaxRate = rateToUse;
+ this.calculateTimeWindow();
+ this.lastThrottleTime = this.getCurrentTimeInSeconds();
+ calculatedRate = this.cubicThrottle(rateToUse);
+ this.enableTokenBucket();
+ } else {
+ this.calculateTimeWindow();
+ calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
}
+ const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
+ this.updateTokenBucketRate(newRate);
}
- return attrStr;
- };
- var isStopNode = function(jPath, options) {
- jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);
- let tagName = jPath.substr(jPath.lastIndexOf(".") + 1);
- for (let index in options.stopNodes) {
- if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName)
- return true;
+ calculateTimeWindow() {
+ this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
}
- return false;
- };
- var replaceEntitiesValue = function(textValue, options) {
- if (textValue && textValue.length > 0 && options.processEntities) {
- for (let i = 0;i < options.entities.length; i++) {
- const entity = options.entities[i];
- textValue = textValue.replace(entity.regex, entity.val);
- }
+ cubicThrottle(rateToUse) {
+ return this.getPrecise(rateToUse * this.beta);
}
- return textValue;
- };
- var EOL = "\n";
- module.exports = toXml;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_json2xml = __commonJS((exports, module) => {
- var Builder = function(options) {
- this.options = Object.assign({}, defaultOptions, options);
- if (this.options.ignoreAttributes || this.options.attributesGroupName) {
- this.isAttribute = function() {
- return false;
- };
- } else {
- this.attrPrefixLen = this.options.attributeNamePrefix.length;
- this.isAttribute = isAttribute;
- }
- this.processTextOrObjNode = processTextOrObjNode;
- if (this.options.format) {
- this.indentate = indentate;
- this.tagEndChar = ">\n";
- this.newLine = "\n";
- } else {
- this.indentate = function() {
- return "";
- };
- this.tagEndChar = ">";
- this.newLine = "";
+ cubicSuccess(timestamp) {
+ return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
}
- };
- var processTextOrObjNode = function(object, key, level) {
- const result = this.j2x(object, level + 1);
- if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {
- return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);
- } else {
- return this.buildObjectNode(result.val, key, result.attrStr, level);
+ enableTokenBucket() {
+ this.enabled = true;
}
- };
- var indentate = function(level) {
- return this.options.indentBy.repeat(level);
- };
- var isAttribute = function(name) {
- if (name.startsWith(this.options.attributeNamePrefix)) {
- return name.substr(this.attrPrefixLen);
- } else {
- return false;
+ updateTokenBucketRate(newRate) {
+ this.refillTokenBucket();
+ this.fillRate = Math.max(newRate, this.minFillRate);
+ this.maxCapacity = Math.max(newRate, this.minCapacity);
+ this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);
+ }
+ updateMeasuredRate() {
+ const t = this.getCurrentTimeInSeconds();
+ const timeBucket = Math.floor(t * 2) / 2;
+ this.requestCount++;
+ if (timeBucket > this.lastTxRateBucket) {
+ const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
+ this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
+ this.requestCount = 0;
+ this.lastTxRateBucket = timeBucket;
+ }
}
+ getPrecise(num) {
+ return parseFloat(num.toFixed(8));
+ }
+ }
+ var DEFAULT_RETRY_DELAY_BASE = 100;
+ var MAXIMUM_RETRY_DELAY = 20 * 1000;
+ var THROTTLING_RETRY_DELAY_BASE = 500;
+ var INITIAL_RETRY_TOKENS = 500;
+ var RETRY_COST = 5;
+ var TIMEOUT_RETRY_COST = 10;
+ var NO_RETRY_INCREMENT = 1;
+ var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
+ var REQUEST_HEADER = "amz-sdk-request";
+ var getDefaultRetryBackoffStrategy = () => {
+ let delayBase = DEFAULT_RETRY_DELAY_BASE;
+ const computeNextBackoffDelay = (attempts) => {
+ return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
+ };
+ const setDelayBase = (delay) => {
+ delayBase = delay;
+ };
+ return {
+ computeNextBackoffDelay,
+ setDelayBase
+ };
};
- var buildFromOrderedJs = require_orderedJs2Xml();
- var defaultOptions = {
- attributeNamePrefix: "@_",
- attributesGroupName: false,
- textNodeName: "#text",
- ignoreAttributes: true,
- cdataPropName: false,
- format: false,
- indentBy: " ",
- suppressEmptyNode: false,
- suppressUnpairedNode: true,
- suppressBooleanAttributes: true,
- tagValueProcessor: function(key, a) {
- return a;
- },
- attributeValueProcessor: function(attrName, a) {
- return a;
- },
- preserveOrder: false,
- commentPropName: false,
- unpairedTags: [],
- entities: [
- { regex: new RegExp("&", "g"), val: "&" },
- { regex: new RegExp(">", "g"), val: ">" },
- { regex: new RegExp("<", "g"), val: "<" },
- { regex: new RegExp("\'", "g"), val: "'" },
- { regex: new RegExp("\"", "g"), val: """ }
- ],
- processEntities: true,
- stopNodes: [],
- oneListGroup: false
+ var createDefaultRetryToken = ({ retryDelay, retryCount, retryCost }) => {
+ const getRetryCount = () => retryCount;
+ const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);
+ const getRetryCost = () => retryCost;
+ return {
+ getRetryCount,
+ getRetryDelay,
+ getRetryCost
+ };
};
- Builder.prototype.build = function(jObj) {
- if (this.options.preserveOrder) {
- return buildFromOrderedJs(jObj, this.options);
- } else {
- if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {
- jObj = {
- [this.options.arrayNodeName]: jObj
- };
+
+ class StandardRetryStrategy {
+ maxAttempts;
+ mode = exports.RETRY_MODES.STANDARD;
+ capacity = INITIAL_RETRY_TOKENS;
+ retryBackoffStrategy = getDefaultRetryBackoffStrategy();
+ maxAttemptsProvider;
+ constructor(maxAttempts) {
+ this.maxAttempts = maxAttempts;
+ this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts;
+ }
+ async acquireInitialRetryToken(retryTokenScope) {
+ return createDefaultRetryToken({
+ retryDelay: DEFAULT_RETRY_DELAY_BASE,
+ retryCount: 0
+ });
+ }
+ async refreshRetryTokenForRetry(token, errorInfo) {
+ const maxAttempts = await this.getMaxAttempts();
+ if (this.shouldRetry(token, errorInfo, maxAttempts)) {
+ const errorType = errorInfo.errorType;
+ this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE);
+ const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
+ const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;
+ const capacityCost = this.getCapacityCost(errorType);
+ this.capacity -= capacityCost;
+ return createDefaultRetryToken({
+ retryDelay,
+ retryCount: token.getRetryCount() + 1,
+ retryCost: capacityCost
+ });
}
- return this.j2x(jObj, 0).val;
+ throw new Error("No retry token available");
}
- };
- Builder.prototype.j2x = function(jObj, level) {
- let attrStr = "";
- let val2 = "";
- for (let key in jObj) {
- if (typeof jObj[key] === "undefined") {
- } else if (jObj[key] === null) {
- if (key[0] === "?")
- val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
- else
- val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
- } else if (jObj[key] instanceof Date) {
- val2 += this.buildTextValNode(jObj[key], key, "", level);
- } else if (typeof jObj[key] !== "object") {
- const attr = this.isAttribute(key);
- if (attr) {
- attrStr += this.buildAttrPairStr(attr, "" + jObj[key]);
- } else {
- if (key === this.options.textNodeName) {
- let newval = this.options.tagValueProcessor(key, "" + jObj[key]);
- val2 += this.replaceEntitiesValue(newval);
- } else {
- val2 += this.buildTextValNode(jObj[key], key, "", level);
- }
- }
- } else if (Array.isArray(jObj[key])) {
- const arrLen = jObj[key].length;
- let listTagVal = "";
- for (let j = 0;j < arrLen; j++) {
- const item = jObj[key][j];
- if (typeof item === "undefined") {
- } else if (item === null) {
- if (key[0] === "?")
- val2 += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
- else
- val2 += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
- } else if (typeof item === "object") {
- if (this.options.oneListGroup) {
- listTagVal += this.j2x(item, level + 1).val;
- } else {
- listTagVal += this.processTextOrObjNode(item, key, level);
- }
- } else {
- listTagVal += this.buildTextValNode(item, key, "", level);
- }
- }
- if (this.options.oneListGroup) {
- listTagVal = this.buildObjectNode(listTagVal, key, "", level);
- }
- val2 += listTagVal;
- } else {
- if (this.options.attributesGroupName && key === this.options.attributesGroupName) {
- const Ks = Object.keys(jObj[key]);
- const L = Ks.length;
- for (let j = 0;j < L; j++) {
- attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]);
- }
- } else {
- val2 += this.processTextOrObjNode(jObj[key], key, level);
- }
+ recordSuccess(token) {
+ this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));
+ }
+ getCapacity() {
+ return this.capacity;
+ }
+ async getMaxAttempts() {
+ try {
+ return await this.maxAttemptsProvider();
+ } catch (error) {
+ console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);
+ return DEFAULT_MAX_ATTEMPTS;
}
}
- return { attrStr, val: val2 };
- };
- Builder.prototype.buildAttrPairStr = function(attrName, val2) {
- val2 = this.options.attributeValueProcessor(attrName, "" + val2);
- val2 = this.replaceEntitiesValue(val2);
- if (this.options.suppressBooleanAttributes && val2 === "true") {
- return " " + attrName;
- } else
- return " " + attrName + '="' + val2 + '"';
- };
- Builder.prototype.buildObjectNode = function(val2, key, attrStr, level) {
- if (val2 === "") {
- if (key[0] === "?")
- return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
- else {
- return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar;
- }
- } else {
- let tagEndExp = "" + key + this.tagEndChar;
- let piClosingChar = "";
- if (key[0] === "?") {
- piClosingChar = "?";
- tagEndExp = "";
- }
- if (attrStr && val2.indexOf("<") === -1) {
- return this.indentate(level) + "<" + key + attrStr + piClosingChar + ">" + val2 + tagEndExp;
- } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {
- return this.indentate(level) + `` + this.newLine;
- } else {
- return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;
- }
+ shouldRetry(tokenToRenew, errorInfo, maxAttempts) {
+ const attempts = tokenToRenew.getRetryCount() + 1;
+ return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);
+ }
+ getCapacityCost(errorType) {
+ return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST;
+ }
+ isRetryableError(errorType) {
+ return errorType === "THROTTLING" || errorType === "TRANSIENT";
+ }
+ }
+
+ class AdaptiveRetryStrategy {
+ maxAttemptsProvider;
+ rateLimiter;
+ standardRetryStrategy;
+ mode = exports.RETRY_MODES.ADAPTIVE;
+ constructor(maxAttemptsProvider, options) {
+ this.maxAttemptsProvider = maxAttemptsProvider;
+ const { rateLimiter } = options ?? {};
+ this.rateLimiter = rateLimiter ?? new DefaultRateLimiter;
+ this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);
}
- };
- Builder.prototype.closeTag = function(key) {
- let closeTag = "";
- if (this.options.unpairedTags.indexOf(key) !== -1) {
- if (!this.options.suppressUnpairedNode)
- closeTag = "/";
- } else if (this.options.suppressEmptyNode) {
- closeTag = "/";
- } else {
- closeTag = `>${key}`;
+ async acquireInitialRetryToken(retryTokenScope) {
+ await this.rateLimiter.getSendToken();
+ return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
}
- return closeTag;
- };
- Builder.prototype.buildTextValNode = function(val2, key, attrStr, level) {
- if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {
- return this.indentate(level) + `` + this.newLine;
- } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {
- return this.indentate(level) + `` + this.newLine;
- } else if (key[0] === "?") {
- return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
- } else {
- let textValue = this.options.tagValueProcessor(key, val2);
- textValue = this.replaceEntitiesValue(textValue);
- if (textValue === "") {
- return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar;
+ async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
+ this.rateLimiter.updateClientSendingRate(errorInfo);
+ return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
+ }
+ recordSuccess(token) {
+ this.rateLimiter.updateClientSendingRate({});
+ this.standardRetryStrategy.recordSuccess(token);
+ }
+ }
+
+ class ConfiguredRetryStrategy extends StandardRetryStrategy {
+ computeNextBackoffDelay;
+ constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {
+ super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts);
+ if (typeof computeNextBackoffDelay === "number") {
+ this.computeNextBackoffDelay = () => computeNextBackoffDelay;
} else {
- return this.indentate(level) + "<" + key + attrStr + ">" + textValue + "" + key + this.tagEndChar;
+ this.computeNextBackoffDelay = computeNextBackoffDelay;
}
}
- };
- Builder.prototype.replaceEntitiesValue = function(textValue) {
- if (textValue && textValue.length > 0 && this.options.processEntities) {
- for (let i = 0;i < this.options.entities.length; i++) {
- const entity = this.options.entities[i];
- textValue = textValue.replace(entity.regex, entity.val);
- }
+ async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
+ const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
+ token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());
+ return token;
}
- return textValue;
- };
- module.exports = Builder;
+ }
+ exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
+ exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy;
+ exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS;
+ exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE;
+ exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE;
+ exports.DefaultRateLimiter = DefaultRateLimiter;
+ exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS;
+ exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER;
+ exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY;
+ exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT;
+ exports.REQUEST_HEADER = REQUEST_HEADER;
+ exports.RETRY_COST = RETRY_COST;
+ exports.StandardRetryStrategy = StandardRetryStrategy;
+ exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE;
+ exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST;
});
-// node_modules/@aws-sdk/client-sso/dist-c
-var require_fxp = __commonJS((exports, module) => {
- var validator = require_validator2();
- var XMLParser = require_XMLParser();
- var XMLBuilder = require_json2xml();
- module.exports = {
- XMLParser,
- XMLValidator: validator,
- XMLBuilder
- };
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jsso
+var require_isStreamingPayload = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.isStreamingPayload = undefined;
+ var stream_1 = __require("stream");
+ var isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream;
+ exports.isStreamingPayload = isStreamingPayload;
});
-// node_modules/@aws-sdk/clien
-var require_tslib2 = __commonJS((exports, module) => {
- var __extends;
- var __assign;
- var __rest;
- var __decorate;
- var __param;
- var __esDecorate;
- var __runInitializers;
- var __propKey;
- var __setFunctionName;
- var __metadata;
- var __awaiter;
- var __generator;
- var __exportStar;
- var __values;
- var __read;
- var __spread;
- var __spreadArrays;
- var __spreadArray;
- var __await;
- var __asyncGenerator;
- var __asyncDelegator;
- var __asyncValues;
- var __makeTemplateObject;
- var __importStar;
- var __importDefault;
- var __classPrivateFieldGet;
- var __classPrivateFieldSet;
- var __classPrivateFieldIn;
- var __createBinding;
- var __addDisposableResource;
- var __disposeResources;
- (function(factory) {
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
- if (typeof define === "function" && define.amd) {
- define("tslib", ["exports"], function(exports2) {
- factory(createExporter(root, createExporter(exports2)));
- });
- } else if (typeof module === "object" && typeof exports === "object") {
- factory(createExporter(root, createExporter(exports)));
- } else {
- factory(createExporter(root));
- }
- function createExporter(exports2, previous) {
- if (exports2 !== root) {
- if (typeof Object.create === "function") {
- Object.defineProperty(exports2, "__esModule", { value: true });
- } else {
- exports2.__esModule = true;
- }
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs45 = __commonJS((exports) => {
+ var utilRetry = require_dist_cjs44();
+ var protocolHttp = require_dist_cjs2();
+ var serviceErrorClassification = require_dist_cjs43();
+ var uuid = require_dist_cjs16();
+ var utilMiddleware = require_dist_cjs4();
+ var smithyClient = require_dist_cjs22();
+ var isStreamingPayload = require_isStreamingPayload();
+ var getDefaultRetryQuota = (initialRetryTokens, options) => {
+ const MAX_CAPACITY = initialRetryTokens;
+ const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT;
+ const retryCost = utilRetry.RETRY_COST;
+ const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST;
+ let availableCapacity = initialRetryTokens;
+ const getCapacityAmount = (error) => error.name === "TimeoutError" ? timeoutRetryCost : retryCost;
+ const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity;
+ const retrieveRetryTokens = (error) => {
+ if (!hasRetryTokens(error)) {
+ throw new Error("No retry token available");
}
- return function(id, v) {
- return exports2[id] = previous ? previous(id, v) : v;
- };
- }
- })(function(exporter) {
- var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
- d.__proto__ = b;
- } || function(d, b) {
- for (var p in b)
- if (Object.prototype.hasOwnProperty.call(b, p))
- d[p] = b[p];
+ const capacityAmount = getCapacityAmount(error);
+ availableCapacity -= capacityAmount;
+ return capacityAmount;
};
- __extends = function(d, b) {
- if (typeof b !== "function" && b !== null)
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
- extendStatics(d, b);
- function __() {
- this.constructor = d;
- }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
+ const releaseRetryTokens = (capacityReleaseAmount) => {
+ availableCapacity += capacityReleaseAmount ?? noRetryIncrement;
+ availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);
};
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length;i < n; i++) {
- s = arguments[i];
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
+ return Object.freeze({
+ hasRetryTokens,
+ retrieveRetryTokens,
+ releaseRetryTokens
+ });
+ };
+ var defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));
+ var defaultRetryDecider = (error) => {
+ if (!error) {
+ return false;
+ }
+ return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error);
+ };
+ var asSdkError = (error) => {
+ if (error instanceof Error)
+ return error;
+ if (error instanceof Object)
+ return Object.assign(new Error, error);
+ if (typeof error === "string")
+ return new Error(error);
+ return new Error(`AWS SDK error wrapper for ${error}`);
+ };
+
+ class StandardRetryStrategy {
+ maxAttemptsProvider;
+ retryDecider;
+ delayDecider;
+ retryQuota;
+ mode = utilRetry.RETRY_MODES.STANDARD;
+ constructor(maxAttemptsProvider, options) {
+ this.maxAttemptsProvider = maxAttemptsProvider;
+ this.retryDecider = options?.retryDecider ?? defaultRetryDecider;
+ this.delayDecider = options?.delayDecider ?? defaultDelayDecider;
+ this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS);
+ }
+ shouldRetry(error, attempts, maxAttempts) {
+ return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);
+ }
+ async getMaxAttempts() {
+ let maxAttempts;
+ try {
+ maxAttempts = await this.maxAttemptsProvider();
+ } catch (error) {
+ maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS;
}
- return t;
- };
- __rest = function(s, e) {
- var t = {};
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
- };
- __decorate = function(decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
- r = Reflect.decorate(decorators, target, key, desc);
- else
- for (var i = decorators.length - 1;i >= 0; i--)
- if (d = decorators[i])
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- __param = function(paramIndex, decorator) {
- return function(target, key) {
- decorator(target, key, paramIndex);
- };
- };
- __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
- function accept(f) {
- if (f !== undefined && typeof f !== "function")
- throw new TypeError("Function expected");
- return f;
+ return maxAttempts;
+ }
+ async retry(next, args, options) {
+ let retryTokenAmount;
+ let attempts = 0;
+ let totalDelay = 0;
+ const maxAttempts = await this.getMaxAttempts();
+ const { request } = args;
+ if (protocolHttp.HttpRequest.isInstance(request)) {
+ request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
}
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
- var _, done = false;
- for (var i = decorators.length - 1;i >= 0; i--) {
- var context = {};
- for (var p in contextIn)
- context[p] = p === "access" ? {} : contextIn[p];
- for (var p in contextIn.access)
- context.access[p] = contextIn.access[p];
- context.addInitializer = function(f) {
- if (done)
- throw new TypeError("Cannot add initializers after decoration has completed");
- extraInitializers.push(accept(f || null));
- };
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
- if (kind === "accessor") {
- if (result === undefined)
+ while (true) {
+ try {
+ if (protocolHttp.HttpRequest.isInstance(request)) {
+ request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
+ }
+ if (options?.beforeRequest) {
+ await options.beforeRequest();
+ }
+ const { response, output } = await next(args);
+ if (options?.afterRequest) {
+ options.afterRequest(response);
+ }
+ this.retryQuota.releaseRetryTokens(retryTokenAmount);
+ output.$metadata.attempts = attempts + 1;
+ output.$metadata.totalRetryDelay = totalDelay;
+ return { response, output };
+ } catch (e) {
+ const err = asSdkError(e);
+ attempts++;
+ if (this.shouldRetry(err, attempts, maxAttempts)) {
+ retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
+ const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts);
+ const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
+ const delay = Math.max(delayFromResponse || 0, delayFromDecider);
+ totalDelay += delay;
+ await new Promise((resolve) => setTimeout(resolve, delay));
continue;
- if (result === null || typeof result !== "object")
- throw new TypeError("Object expected");
- if (_ = accept(result.get))
- descriptor.get = _;
- if (_ = accept(result.set))
- descriptor.set = _;
- if (_ = accept(result.init))
- initializers.unshift(_);
- } else if (_ = accept(result)) {
- if (kind === "field")
- initializers.unshift(_);
- else
- descriptor[key] = _;
- }
- }
- if (target)
- Object.defineProperty(target, contextIn.name, descriptor);
- done = true;
- };
- __runInitializers = function(thisArg, initializers, value) {
- var useValue = arguments.length > 2;
- for (var i = 0;i < initializers.length; i++) {
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
- }
- return useValue ? value : undefined;
- };
- __propKey = function(x) {
- return typeof x === "symbol" ? x : "".concat(x);
- };
- __setFunctionName = function(f, name, prefix) {
- if (typeof name === "symbol")
- name = name.description ? "[".concat(name.description, "]") : "";
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
- };
- __metadata = function(metadataKey, metadataValue) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
- return Reflect.metadata(metadataKey, metadataValue);
- };
- __awaiter = function(thisArg, _arguments, P, generator) {
- function adopt(value) {
- return value instanceof P ? value : new P(function(resolve) {
- resolve(value);
- });
- }
- return new (P || (P = Promise))(function(resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
}
- }
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
+ if (!err.$metadata) {
+ err.$metadata = {};
}
+ err.$metadata.attempts = attempts;
+ err.$metadata.totalRetryDelay = totalDelay;
+ throw err;
}
- function step(result) {
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ }
+ }
+ var getDelayFromRetryAfterHeader = (response) => {
+ if (!protocolHttp.HttpResponse.isInstance(response))
+ return;
+ const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
+ if (!retryAfterHeaderName)
+ return;
+ const retryAfter = response.headers[retryAfterHeaderName];
+ const retryAfterSeconds = Number(retryAfter);
+ if (!Number.isNaN(retryAfterSeconds))
+ return retryAfterSeconds * 1000;
+ const retryAfterDate = new Date(retryAfter);
+ return retryAfterDate.getTime() - Date.now();
+ };
+
+ class AdaptiveRetryStrategy extends StandardRetryStrategy {
+ rateLimiter;
+ constructor(maxAttemptsProvider, options) {
+ const { rateLimiter, ...superOptions } = options ?? {};
+ super(maxAttemptsProvider, superOptions);
+ this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter;
+ this.mode = utilRetry.RETRY_MODES.ADAPTIVE;
+ }
+ async retry(next, args) {
+ return super.retry(next, args, {
+ beforeRequest: async () => {
+ return this.rateLimiter.getSendToken();
+ },
+ afterRequest: (response) => {
+ this.rateLimiter.updateClientSendingRate(response);
}
- step((generator = generator.apply(thisArg, _arguments || [])).next());
});
- };
- __generator = function(thisArg, body) {
- var _ = { label: 0, sent: function() {
- if (t[0] & 1)
- throw t[1];
- return t[1];
- }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
- return this;
- }), g;
- function verb(n) {
- return function(v) {
- return step([n, v]);
- };
- }
- function step(op) {
- if (f)
- throw new TypeError("Generator is already executing.");
- while (g && (g = 0, op[0] && (_ = 0)), _)
- try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
- return t;
- if (y = 0, t)
- op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0:
- case 1:
- t = op;
- break;
- case 4:
- _.label++;
- return { value: op[1], done: false };
- case 5:
- _.label++;
- y = op[1];
- op = [0];
- continue;
- case 7:
- op = _.ops.pop();
- _.trys.pop();
- continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
- _ = 0;
- continue;
- }
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
- _.label = op[1];
- break;
- }
- if (op[0] === 6 && _.label < t[1]) {
- _.label = t[1];
- t = op;
- break;
- }
- if (t && _.label < t[2]) {
- _.label = t[2];
- _.ops.push(op);
- break;
- }
- if (t[2])
- _.ops.pop();
- _.trys.pop();
- continue;
- }
- op = body.call(thisArg, _);
- } catch (e) {
- op = [6, e];
- y = 0;
- } finally {
- f = t = 0;
- }
- if (op[0] & 5)
- throw op[1];
- return { value: op[0] ? op[1] : undefined, done: true };
- }
- };
- __exportStar = function(m, o) {
- for (var p in m)
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
- __createBinding(o, m, p);
- };
- __createBinding = Object.create ? function(o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() {
- return m[k];
- } };
+ }
+ }
+ var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
+ var CONFIG_MAX_ATTEMPTS = "max_attempts";
+ var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => {
+ const value = env[ENV_MAX_ATTEMPTS];
+ if (!value)
+ return;
+ const maxAttempt = parseInt(value);
+ if (Number.isNaN(maxAttempt)) {
+ throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
}
- Object.defineProperty(o, k2, desc);
- } : function(o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- o[k2] = m[k];
- };
- __values = function(o) {
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
- if (m)
- return m.call(o);
- if (o && typeof o.length === "number")
- return {
- next: function() {
- if (o && i >= o.length)
- o = undefined;
- return { value: o && o[i++], done: !o };
- }
- };
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
- };
- __read = function(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m)
- return o;
- var i = m.call(o), r, ar = [], e;
- try {
- while ((n === undefined || n-- > 0) && !(r = i.next()).done)
- ar.push(r.value);
- } catch (error) {
- e = { error };
- } finally {
- try {
- if (r && !r.done && (m = i["return"]))
- m.call(i);
- } finally {
- if (e)
- throw e.error;
- }
+ return maxAttempt;
+ },
+ configFileSelector: (profile) => {
+ const value = profile[CONFIG_MAX_ATTEMPTS];
+ if (!value)
+ return;
+ const maxAttempt = parseInt(value);
+ if (Number.isNaN(maxAttempt)) {
+ throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
}
- return ar;
- };
- __spread = function() {
- for (var ar = [], i = 0;i < arguments.length; i++)
- ar = ar.concat(__read(arguments[i]));
- return ar;
- };
- __spreadArrays = function() {
- for (var s = 0, i = 0, il = arguments.length;i < il; i++)
- s += arguments[i].length;
- for (var r = Array(s), k = 0, i = 0;i < il; i++)
- for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
- r[k] = a[j];
- return r;
- };
- __spreadArray = function(to, from, pack) {
- if (pack || arguments.length === 2)
- for (var i = 0, l = from.length, ar;i < l; i++) {
- if (ar || !(i in from)) {
- if (!ar)
- ar = Array.prototype.slice.call(from, 0, i);
- ar[i] = from[i];
- }
+ return maxAttempt;
+ },
+ default: utilRetry.DEFAULT_MAX_ATTEMPTS
+ };
+ var resolveRetryConfig = (input) => {
+ const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;
+ const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS);
+ return Object.assign(input, {
+ maxAttempts,
+ retryStrategy: async () => {
+ if (retryStrategy) {
+ return retryStrategy;
}
- return to.concat(ar || Array.prototype.slice.call(from));
- };
- __await = function(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
- };
- __asyncGenerator = function(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i;
- function verb(n) {
- if (g[n])
- i[n] = function(v) {
- return new Promise(function(a, b) {
- q.push([n, v, a, b]) > 1 || resume(n, v);
- });
- };
+ const retryMode = await utilMiddleware.normalizeProvider(_retryMode)();
+ if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) {
+ return new utilRetry.AdaptiveRetryStrategy(maxAttempts);
+ }
+ return new utilRetry.StandardRetryStrategy(maxAttempts);
}
- function resume(n, v) {
+ });
+ };
+ var ENV_RETRY_MODE = "AWS_RETRY_MODE";
+ var CONFIG_RETRY_MODE = "retry_mode";
+ var NODE_RETRY_MODE_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
+ configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
+ default: utilRetry.DEFAULT_RETRY_MODE
+ };
+ var omitRetryHeadersMiddleware = () => (next) => async (args) => {
+ const { request } = args;
+ if (protocolHttp.HttpRequest.isInstance(request)) {
+ delete request.headers[utilRetry.INVOCATION_ID_HEADER];
+ delete request.headers[utilRetry.REQUEST_HEADER];
+ }
+ return next(args);
+ };
+ var omitRetryHeadersMiddlewareOptions = {
+ name: "omitRetryHeadersMiddleware",
+ tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"],
+ relation: "before",
+ toMiddleware: "awsAuthMiddleware",
+ override: true
+ };
+ var getOmitRetryHeadersPlugin = (options) => ({
+ applyToStack: (clientStack) => {
+ clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
+ }
+ });
+ var retryMiddleware = (options) => (next, context) => async (args) => {
+ let retryStrategy = await options.retryStrategy();
+ const maxAttempts = await options.maxAttempts();
+ if (isRetryStrategyV2(retryStrategy)) {
+ retryStrategy = retryStrategy;
+ let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
+ let lastError = new Error;
+ let attempts = 0;
+ let totalRetryDelay = 0;
+ const { request } = args;
+ const isRequest = protocolHttp.HttpRequest.isInstance(request);
+ if (isRequest) {
+ request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4();
+ }
+ while (true) {
try {
- step(g[n](v));
+ if (isRequest) {
+ request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
+ }
+ const { response, output } = await next(args);
+ retryStrategy.recordSuccess(retryToken);
+ output.$metadata.attempts = attempts + 1;
+ output.$metadata.totalRetryDelay = totalRetryDelay;
+ return { response, output };
} catch (e) {
- settle(q[0][3], e);
+ const retryErrorInfo = getRetryErrorInfo(e);
+ lastError = asSdkError(e);
+ if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
+ (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
+ throw lastError;
+ }
+ try {
+ retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
+ } catch (refreshError) {
+ if (!lastError.$metadata) {
+ lastError.$metadata = {};
+ }
+ lastError.$metadata.attempts = attempts + 1;
+ lastError.$metadata.totalRetryDelay = totalRetryDelay;
+ throw lastError;
+ }
+ attempts = retryToken.getRetryCount();
+ const delay = retryToken.getRetryDelay();
+ totalRetryDelay += delay;
+ await new Promise((resolve) => setTimeout(resolve, delay));
}
}
- function step(r) {
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
- }
- function fulfill(value) {
- resume("next", value);
- }
- function reject(value) {
- resume("throw", value);
- }
- function settle(f, v) {
- if (f(v), q.shift(), q.length)
- resume(q[0][0], q[0][1]);
- }
- };
- __asyncDelegator = function(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function(e) {
- throw e;
- }), verb("return"), i[Symbol.iterator] = function() {
- return this;
- }, i;
- function verb(n, f) {
- i[n] = o[n] ? function(v) {
- return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
- } : f;
- }
- };
- __asyncValues = function(o) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i);
- function verb(n) {
- i[n] = o[n] && function(v) {
- return new Promise(function(resolve, reject) {
- v = o[n](v), settle(resolve, reject, v.done, v.value);
- });
- };
- }
- function settle(resolve, reject, d, v) {
- Promise.resolve(v).then(function(v2) {
- resolve({ value: v2, done: d });
- }, reject);
- }
+ } else {
+ retryStrategy = retryStrategy;
+ if (retryStrategy?.mode)
+ context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
+ return retryStrategy.retry(next, args);
+ }
+ };
+ var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
+ var getRetryErrorInfo = (error) => {
+ const errorInfo = {
+ error,
+ errorType: getRetryErrorType(error)
};
- __makeTemplateObject = function(cooked, raw) {
- if (Object.defineProperty) {
- Object.defineProperty(cooked, "raw", { value: raw });
- } else {
- cooked.raw = raw;
+ const retryAfterHint = getRetryAfterHint(error.$response);
+ if (retryAfterHint) {
+ errorInfo.retryAfterHint = retryAfterHint;
+ }
+ return errorInfo;
+ };
+ var getRetryErrorType = (error) => {
+ if (serviceErrorClassification.isThrottlingError(error))
+ return "THROTTLING";
+ if (serviceErrorClassification.isTransientError(error))
+ return "TRANSIENT";
+ if (serviceErrorClassification.isServerError(error))
+ return "SERVER_ERROR";
+ return "CLIENT_ERROR";
+ };
+ var retryMiddlewareOptions = {
+ name: "retryMiddleware",
+ tags: ["RETRY"],
+ step: "finalizeRequest",
+ priority: "high",
+ override: true
+ };
+ var getRetryPlugin = (options) => ({
+ applyToStack: (clientStack) => {
+ clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
+ }
+ });
+ var getRetryAfterHint = (response) => {
+ if (!protocolHttp.HttpResponse.isInstance(response))
+ return;
+ const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
+ if (!retryAfterHeaderName)
+ return;
+ const retryAfter = response.headers[retryAfterHeaderName];
+ const retryAfterSeconds = Number(retryAfter);
+ if (!Number.isNaN(retryAfterSeconds))
+ return new Date(retryAfterSeconds * 1000);
+ const retryAfterDate = new Date(retryAfter);
+ return retryAfterDate;
+ };
+ exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy;
+ exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS;
+ exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE;
+ exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS;
+ exports.ENV_RETRY_MODE = ENV_RETRY_MODE;
+ exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS;
+ exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS;
+ exports.StandardRetryStrategy = StandardRetryStrategy;
+ exports.defaultDelayDecider = defaultDelayDecider;
+ exports.defaultRetryDecider = defaultRetryDecider;
+ exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin;
+ exports.getRetryAfterHint = getRetryAfterHint;
+ exports.getRetryPlugin = getRetryPlugin;
+ exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware;
+ exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions;
+ exports.resolveRetryConfig = resolveRetryConfig;
+ exports.retryMiddleware = retryMiddleware;
+ exports.retryMiddlewareOptions = retryMiddlewareOptions;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc
+var require_dist_cjs46 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ SignatureV4MultiRegion: () => SignatureV4MultiRegion,
+ signatureV4CrtContainer: () => signatureV4CrtContainer
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_middleware_sdk_s3 = require_dist_cjs34();
+ var import_signature_v4 = require_dist_cjs19();
+ var signatureV4CrtContainer = {
+ CrtSignerV4: null
+ };
+ var SignatureV4MultiRegion = class {
+ static {
+ __name(this, "SignatureV4MultiRegion");
+ }
+ sigv4aSigner;
+ sigv4Signer;
+ signerOptions;
+ static sigv4aDependency() {
+ if (typeof signatureV4CrtContainer.CrtSignerV4 === "function") {
+ return "crt";
+ } else if (typeof import_signature_v4.signatureV4aContainer.SignatureV4a === "function") {
+ return "js";
}
- return cooked;
- };
- var __setModuleDefault = Object.create ? function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
- } : function(o, v) {
- o["default"] = v;
- };
- __importStar = function(mod) {
- if (mod && mod.__esModule)
- return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod)
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
- __createBinding(result, mod, k);
+ return "none";
+ }
+ constructor(options) {
+ this.sigv4Signer = new import_middleware_sdk_s3.SignatureV4S3Express(options);
+ this.signerOptions = options;
+ }
+ async sign(requestToSign, options = {}) {
+ if (options.signingRegion === "*") {
+ return this.getSigv4aSigner().sign(requestToSign, options);
}
- __setModuleDefault(result, mod);
- return result;
- };
- __importDefault = function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
- };
- __classPrivateFieldGet = function(receiver, state, kind, f) {
- if (kind === "a" && !f)
- throw new TypeError("Private accessor was defined without a getter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
- };
- __classPrivateFieldSet = function(receiver, state, value, kind, f) {
- if (kind === "m")
- throw new TypeError("Private method is not writable");
- if (kind === "a" && !f)
- throw new TypeError("Private accessor was defined without a setter");
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
- };
- __classPrivateFieldIn = function(state, receiver) {
- if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
- throw new TypeError("Cannot use 'in' operator on non-object");
- return typeof state === "function" ? receiver === state : state.has(receiver);
- };
- __addDisposableResource = function(env, value, async) {
- if (value !== null && value !== undefined) {
- if (typeof value !== "object" && typeof value !== "function")
- throw new TypeError("Object expected.");
- var dispose;
- if (async) {
- if (!Symbol.asyncDispose)
- throw new TypeError("Symbol.asyncDispose is not defined.");
- dispose = value[Symbol.asyncDispose];
+ return this.sigv4Signer.sign(requestToSign, options);
+ }
+ async signWithCredentials(requestToSign, credentials, options = {}) {
+ if (options.signingRegion === "*") {
+ const signer = this.getSigv4aSigner();
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
+ if (CrtSignerV4 && signer instanceof CrtSignerV4) {
+ return signer.signWithCredentials(requestToSign, credentials, options);
+ } else {
+ throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
}
- if (dispose === undefined) {
- if (!Symbol.dispose)
- throw new TypeError("Symbol.dispose is not defined.");
- dispose = value[Symbol.dispose];
+ }
+ return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
+ }
+ async presign(originalRequest, options = {}) {
+ if (options.signingRegion === "*") {
+ const signer = this.getSigv4aSigner();
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
+ if (CrtSignerV4 && signer instanceof CrtSignerV4) {
+ return signer.presign(originalRequest, options);
+ } else {
+ throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);
}
- if (typeof dispose !== "function")
- throw new TypeError("Object not disposable.");
- env.stack.push({ value, dispose, async });
- } else if (async) {
- env.stack.push({ async: true });
}
- return value;
- };
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
- var e = new Error(message);
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
- };
- __disposeResources = function(env) {
- function fail(e) {
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
- env.hasError = true;
+ return this.sigv4Signer.presign(originalRequest, options);
+ }
+ async presignWithCredentials(originalRequest, credentials, options = {}) {
+ if (options.signingRegion === "*") {
+ throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
}
- function next() {
- while (env.stack.length) {
- var rec = env.stack.pop();
- try {
- var result = rec.dispose && rec.dispose.call(rec.value);
- if (rec.async)
- return Promise.resolve(result).then(next, function(e) {
- fail(e);
- return next();
- });
- } catch (e) {
- fail(e);
+ return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
+ }
+ getSigv4aSigner() {
+ if (!this.sigv4aSigner) {
+ const CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
+ const JsSigV4aSigner = import_signature_v4.signatureV4aContainer.SignatureV4a;
+ if (this.signerOptions.runtime === "node") {
+ if (!CrtSignerV4 && !JsSigV4aSigner) {
+ throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
+ }
+ if (CrtSignerV4 && typeof CrtSignerV4 === "function") {
+ this.sigv4aSigner = new CrtSignerV4({
+ ...this.signerOptions,
+ signingAlgorithm: 1
+ });
+ } else if (JsSigV4aSigner && typeof JsSigV4aSigner === "function") {
+ this.sigv4aSigner = new JsSigV4aSigner({
+ ...this.signerOptions
+ });
+ } else {
+ throw new Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");
+ }
+ } else {
+ if (!JsSigV4aSigner || typeof JsSigV4aSigner !== "function") {
+ throw new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");
}
+ this.sigv4aSigner = new JsSigV4aSigner({
+ ...this.signerOptions
+ });
}
- if (env.hasError)
- throw env.error;
}
- return next();
- };
- exporter("__extends", __extends);
- exporter("__assign", __assign);
- exporter("__rest", __rest);
- exporter("__decorate", __decorate);
- exporter("__param", __param);
- exporter("__esDecorate", __esDecorate);
- exporter("__runInitializers", __runInitializers);
- exporter("__propKey", __propKey);
- exporter("__setFunctionName", __setFunctionName);
- exporter("__metadata", __metadata);
- exporter("__awaiter", __awaiter);
- exporter("__generator", __generator);
- exporter("__exportStar", __exportStar);
- exporter("__createBinding", __createBinding);
- exporter("__values", __values);
- exporter("__read", __read);
- exporter("__spread", __spread);
- exporter("__spreadArrays", __spreadArrays);
- exporter("__spreadArray", __spreadArray);
- exporter("__await", __await);
- exporter("__asyncGenerator", __asyncGenerator);
- exporter("__asyncDelegator", __asyncDelegator);
- exporter("__asyncValues", __asyncValues);
- exporter("__makeTemplateObject", __makeTemplateObject);
- exporter("__importStar", __importStar);
- exporter("__importDefault", __importDefault);
- exporter("__classPrivateFieldGet", __classPrivateFieldGet);
- exporter("__classPrivateFieldSet", __classPrivateFieldSet);
- exporter("__classPrivateFieldIn", __classPrivateFieldIn);
- exporter("__addDisposableResource", __addDisposableResource);
- exporter("__disposeResources", __disposeResources);
- });
+ return this.sigv4aSigner;
+ }
+ };
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
-var require_package2 = __commonJS((exports, module) => {
- module.exports = {
- name: "@aws-sdk/client-s3",
- description: "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
- version: "3.499.0",
- scripts: {
- build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
- "build:cjs": "node ../../scripts/compilation/inline client-s3",
- "build:es": "tsc -p tsconfig.es.json",
- "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
- "build:types": "tsc -p tsconfig.types.json",
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
- clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
- "extract:docs": "api-extractor run --local",
- "generate:client": "node ../../scripts/generate-clients/single-service --solo s3",
- test: "yarn test:unit",
- "test:e2e": "yarn test:e2e:node && yarn test:e2e:browser",
- "test:e2e:browser": "ts-mocha test/**/*.browser.ispec.ts && karma start karma.conf.js",
- "test:e2e:node": "jest --c jest.config.e2e.js",
- "test:unit": "ts-mocha test/unit/**/*.spec.ts"
- },
- main: "./dist-cjs/index.js",
- types: "./dist-types/index.d.ts",
- module: "./dist-es/index.js",
- sideEffects: false,
- dependencies: {
- "@aws-crypto/sha1-browser": "3.0.0",
- "@aws-crypto/sha256-browser": "3.0.0",
- "@aws-crypto/sha256-js": "3.0.0",
- "@aws-sdk/client-sts": "3.499.0",
- "@aws-sdk/core": "3.496.0",
- "@aws-sdk/credential-provider-node": "3.499.0",
- "@aws-sdk/middleware-bucket-endpoint": "3.496.0",
- "@aws-sdk/middleware-expect-continue": "3.496.0",
- "@aws-sdk/middleware-flexible-checksums": "3.496.0",
- "@aws-sdk/middleware-host-header": "3.496.0",
- "@aws-sdk/middleware-location-constraint": "3.496.0",
- "@aws-sdk/middleware-logger": "3.496.0",
- "@aws-sdk/middleware-recursion-detection": "3.496.0",
- "@aws-sdk/middleware-sdk-s3": "3.499.0",
- "@aws-sdk/middleware-signing": "3.496.0",
- "@aws-sdk/middleware-ssec": "3.498.0",
- "@aws-sdk/middleware-user-agent": "3.496.0",
- "@aws-sdk/region-config-resolver": "3.496.0",
- "@aws-sdk/signature-v4-multi-region": "3.499.0",
- "@aws-sdk/types": "3.496.0",
- "@aws-sdk/util-endpoints": "3.496.0",
- "@aws-sdk/util-user-agent-browser": "3.496.0",
- "@aws-sdk/util-user-agent-node": "3.496.0",
- "@aws-sdk/xml-builder": "3.496.0",
- "@smithy/config-resolver": "^2.1.1",
- "@smithy/core": "^1.3.1",
- "@smithy/eventstream-serde-browser": "^2.1.1",
- "@smithy/eventstream-serde-config-resolver": "^2.1.1",
- "@smithy/eventstream-serde-node": "^2.1.1",
- "@smithy/fetch-http-handler": "^2.4.1",
- "@smithy/hash-blob-browser": "^2.1.1",
- "@smithy/hash-node": "^2.1.1",
- "@smithy/hash-stream-node": "^2.1.1",
- "@smithy/invalid-dependency": "^2.1.1",
- "@smithy/md5-js": "^2.1.1",
- "@smithy/middleware-content-length": "^2.1.1",
- "@smithy/middleware-endpoint": "^2.4.1",
- "@smithy/middleware-retry": "^2.1.1",
- "@smithy/middleware-serde": "^2.1.1",
- "@smithy/middleware-stack": "^2.1.1",
- "@smithy/node-config-provider": "^2.2.1",
- "@smithy/node-http-handler": "^2.3.1",
- "@smithy/protocol-http": "^3.1.1",
- "@smithy/smithy-client": "^2.3.1",
- "@smithy/types": "^2.9.1",
- "@smithy/url-parser": "^2.1.1",
- "@smithy/util-base64": "^2.1.1",
- "@smithy/util-body-length-browser": "^2.1.1",
- "@smithy/util-body-length-node": "^2.2.1",
- "@smithy/util-defaults-mode-browser": "^2.1.1",
- "@smithy/util-defaults-mode-node": "^2.1.1",
- "@smithy/util-endpoints": "^1.1.1",
- "@smithy/util-retry": "^2.1.1",
- "@smithy/util-stream": "^2.1.1",
- "@smithy/util-utf8": "^2.1.1",
- "@smithy/util-waiter": "^2.1.1",
- "fast-xml-parser": "4.2.5",
- tslib: "^2.5.0"
- },
- devDependencies: {
- "@smithy/service-client-documentation-generator": "^2.1.1",
- "@tsconfig/node14": "1.0.3",
- "@types/chai": "^4.2.11",
- "@types/mocha": "^8.0.4",
- "@types/node": "^14.14.31",
- concurrently: "7.0.0",
- "downlevel-dts": "0.10.1",
- rimraf: "3.0.2",
- typescript: "~4.9.5"
- },
- engines: {
- node: ">=14.0.0"
- },
- typesVersions: {
- "<4.0": {
- "dist-types/*": [
- "dist-types/ts3.4/*"
- ]
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/
+var require_getHomeDir = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getHomeDir = undefined;
+ var os_1 = __require("os");
+ var path_1 = __require("path");
+ var homeDirCache = {};
+ var getHomeDirCacheKey = () => {
+ if (process && process.geteuid) {
+ return `${process.geteuid()}`;
+ }
+ return "DEFAULT";
+ };
+ var getHomeDir = () => {
+ const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
+ if (HOME)
+ return HOME;
+ if (USERPROFILE)
+ return USERPROFILE;
+ if (HOMEPATH)
+ return `${HOMEDRIVE}${HOMEPATH}`;
+ const homeDirCacheKey = getHomeDirCacheKey();
+ if (!homeDirCache[homeDirCacheKey])
+ homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
+ return homeDirCache[homeDirCacheKey];
+ };
+ exports.getHomeDir = getHomeDir;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/
+var require_getSSOTokenFilepath = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getSSOTokenFilepath = undefined;
+ var crypto_1 = __require("crypto");
+ var path_1 = __require("path");
+ var getHomeDir_1 = require_getHomeDir();
+ var getSSOTokenFilepath = (id) => {
+ const hasher = (0, crypto_1.createHash)("sha1");
+ const cacheName = hasher.update(id).digest("hex");
+ return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`);
+ };
+ exports.getSSOTokenFilepath = getSSOTokenFilepath;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/
+var require_getSSOTokenFromFile = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getSSOTokenFromFile = exports.tokenIntercept = undefined;
+ var fs_1 = __require("fs");
+ var getSSOTokenFilepath_1 = require_getSSOTokenFilepath();
+ var { readFile } = fs_1.promises;
+ exports.tokenIntercept = {};
+ var getSSOTokenFromFile = async (id) => {
+ if (exports.tokenIntercept[id]) {
+ return exports.tokenIntercept[id];
+ }
+ const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);
+ const ssoTokenText = await readFile(ssoTokenFilepath, "utf8");
+ return JSON.parse(ssoTokenText);
+ };
+ exports.getSSOTokenFromFile = getSSOTokenFromFile;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc
+var require_slurpFile = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.slurpFile = exports.fileIntercept = exports.filePromisesHash = undefined;
+ var fs_1 = __require("fs");
+ var { readFile } = fs_1.promises;
+ exports.filePromisesHash = {};
+ exports.fileIntercept = {};
+ var slurpFile = (path, options) => {
+ if (exports.fileIntercept[path] !== undefined) {
+ return exports.fileIntercept[path];
+ }
+ if (!exports.filePromisesHash[path] || options?.ignoreCache) {
+ exports.filePromisesHash[path] = readFile(path, "utf8");
+ }
+ return exports.filePromisesHash[path];
+ };
+ exports.slurpFile = slurpFile;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_dist_cjs47 = __commonJS((exports) => {
+ var getHomeDir = require_getHomeDir();
+ var getSSOTokenFilepath = require_getSSOTokenFilepath();
+ var getSSOTokenFromFile = require_getSSOTokenFromFile();
+ var path = __require("path");
+ var types = require_dist_cjs();
+ var slurpFile = require_slurpFile();
+ var ENV_PROFILE = "AWS_PROFILE";
+ var DEFAULT_PROFILE = "default";
+ var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
+ var getConfigData = (data) => Object.entries(data).filter(([key]) => {
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
+ if (indexOfSeparator === -1) {
+ return false;
+ }
+ return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator));
+ }).reduce((acc, [key, value]) => {
+ const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
+ const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
+ acc[updatedKey] = value;
+ return acc;
+ }, {
+ ...data.default && { default: data.default }
+ });
+ var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
+ var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config");
+ var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
+ var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials");
+ var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
+ var profileNameBlockList = ["__proto__", "profile __proto__"];
+ var parseIni = (iniData) => {
+ const map = {};
+ let currentSection;
+ let currentSubSection;
+ for (const iniLine of iniData.split(/\r?\n/)) {
+ const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim();
+ const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]";
+ if (isSection) {
+ currentSection = undefined;
+ currentSubSection = undefined;
+ const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);
+ const matches = prefixKeyRegex.exec(sectionName);
+ if (matches) {
+ const [, prefix, , name] = matches;
+ if (Object.values(types.IniSectionType).includes(prefix)) {
+ currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
+ }
+ } else {
+ currentSection = sectionName;
+ }
+ if (profileNameBlockList.includes(sectionName)) {
+ throw new Error(`Found invalid profile name "${sectionName}"`);
+ }
+ } else if (currentSection) {
+ const indexOfEqualsSign = trimmedLine.indexOf("=");
+ if (![0, -1].includes(indexOfEqualsSign)) {
+ const [name, value] = [
+ trimmedLine.substring(0, indexOfEqualsSign).trim(),
+ trimmedLine.substring(indexOfEqualsSign + 1).trim()
+ ];
+ if (value === "") {
+ currentSubSection = name;
+ } else {
+ if (currentSubSection && iniLine.trimStart() === iniLine) {
+ currentSubSection = undefined;
+ }
+ map[currentSection] = map[currentSection] || {};
+ const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;
+ map[currentSection][key] = value;
+ }
+ }
+ }
+ }
+ return map;
+ };
+ var swallowError$1 = () => ({});
+ var CONFIG_PREFIX_SEPARATOR = ".";
+ var loadSharedConfigFiles = async (init = {}) => {
+ const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
+ const homeDir = getHomeDir.getHomeDir();
+ const relativeHomeDirPrefix = "~/";
+ let resolvedFilepath = filepath;
+ if (filepath.startsWith(relativeHomeDirPrefix)) {
+ resolvedFilepath = path.join(homeDir, filepath.slice(2));
+ }
+ let resolvedConfigFilepath = configFilepath;
+ if (configFilepath.startsWith(relativeHomeDirPrefix)) {
+ resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2));
+ }
+ const parsedFiles = await Promise.all([
+ slurpFile.slurpFile(resolvedConfigFilepath, {
+ ignoreCache: init.ignoreCache
+ }).then(parseIni).then(getConfigData).catch(swallowError$1),
+ slurpFile.slurpFile(resolvedFilepath, {
+ ignoreCache: init.ignoreCache
+ }).then(parseIni).catch(swallowError$1)
+ ]);
+ return {
+ configFile: parsedFiles[0],
+ credentialsFile: parsedFiles[1]
+ };
+ };
+ var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
+ var swallowError = () => ({});
+ var loadSsoSessionData = async (init = {}) => slurpFile.slurpFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
+ var mergeConfigFiles = (...files) => {
+ const merged = {};
+ for (const file of files) {
+ for (const [key, values] of Object.entries(file)) {
+ if (merged[key] !== undefined) {
+ Object.assign(merged[key], values);
+ } else {
+ merged[key] = values;
+ }
}
+ }
+ return merged;
+ };
+ var parseKnownFiles = async (init) => {
+ const parsedFiles = await loadSharedConfigFiles(init);
+ return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
+ };
+ var externalDataInterceptor = {
+ getFileRecord() {
+ return slurpFile.fileIntercept;
},
- files: [
- "dist-*/**"
- ],
- author: {
- name: "AWS SDK for JavaScript Team",
- url: "https://aws.amazon.com/javascript/"
- },
- license: "Apache-2.0",
- browser: {
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
+ interceptFile(path2, contents) {
+ slurpFile.fileIntercept[path2] = Promise.resolve(contents);
},
- "react-native": {
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
+ getTokenRecord() {
+ return getSSOTokenFromFile.tokenIntercept;
},
- homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",
- repository: {
- type: "git",
- url: "https://github.com/aws/aws-sdk-js-v3.git",
- directory: "clients/client-s3"
+ interceptToken(id, contents) {
+ getSSOTokenFromFile.tokenIntercept[id] = contents;
}
};
+ Object.defineProperty(exports, "getSSOTokenFromFile", {
+ enumerable: true,
+ get: function() {
+ return getSSOTokenFromFile.getSSOTokenFromFile;
+ }
+ });
+ exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;
+ exports.DEFAULT_PROFILE = DEFAULT_PROFILE;
+ exports.ENV_PROFILE = ENV_PROFILE;
+ exports.externalDataInterceptor = externalDataInterceptor;
+ exports.getProfileName = getProfileName;
+ exports.loadSharedConfigFiles = loadSharedConfigFiles;
+ exports.loadSsoSessionData = loadSsoSessionData;
+ exports.parseKnownFiles = parseKnownFiles;
+ Object.keys(getHomeDir).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return getHomeDir[k];
+ }
+ });
+ });
+ Object.keys(getSSOTokenFilepath).forEach(function(k) {
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
+ Object.defineProperty(exports, k, {
+ enumerable: true,
+ get: function() {
+ return getSSOTokenFilepath[k];
+ }
+ });
+ });
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
-var require_dist_cjs44 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
+var require_dist_cjs48 = __commonJS((exports) => {
+ var getSelectorName = function(functionString) {
+ try {
+ const constants4 = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
+ constants4.delete("CONFIG");
+ constants4.delete("CONFIG_PREFIX_SEPARATOR");
+ constants4.delete("ENV");
+ return [...constants4].join(", ");
+ } catch (e) {
+ return functionString;
+ }
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var propertyProvider = require_dist_cjs18();
+ var sharedIniFileLoader = require_dist_cjs47();
+ var fromEnv = (envVarSelector, options) => async () => {
+ try {
+ const config = envVarSelector(process.env, options);
+ if (config === undefined) {
+ throw new Error;
+ }
+ return config;
+ } catch (e) {
+ throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,
- AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,
- _toBool: () => _toBool,
- _toNum: () => _toNum,
- _toStr: () => _toStr,
- awsExpectUnion: () => awsExpectUnion,
- emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,
- resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,
- resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config
+ var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
+ const profile = sharedIniFileLoader.getProfileName(init);
+ const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init);
+ const profileFromCredentials = credentialsFile[profile] || {};
+ const profileFromConfig = configFile[profile] || {};
+ const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
+ try {
+ const cfgFile = preferredFile === "config" ? configFile : credentialsFile;
+ const configValue = configSelector(mergedProfile, cfgFile);
+ if (configValue === undefined) {
+ throw new Error;
+ }
+ return configValue;
+ } catch (e) {
+ throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
+ }
+ };
+ var isFunction = (func) => typeof func === "function";
+ var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue);
+ var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
+ const { signingName, logger: logger4 } = configuration;
+ const envOptions = { signingName, logger: logger4 };
+ return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
+ };
+ exports.loadConfig = loadConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset
+var require_getEndpointUrlConfig = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getEndpointUrlConfig = undefined;
+ var shared_ini_file_loader_1 = require_dist_cjs47();
+ var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
+ var CONFIG_ENDPOINT_URL = "endpoint_url";
+ var getEndpointUrlConfig = (serviceId) => ({
+ environmentVariableSelector: (env) => {
+ const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
+ const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
+ if (serviceEndpointUrl)
+ return serviceEndpointUrl;
+ const endpointUrl = env[ENV_ENDPOINT_URL];
+ if (endpointUrl)
+ return endpointUrl;
+ return;
+ },
+ configFileSelector: (profile, config) => {
+ if (config && profile.services) {
+ const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
+ if (servicesSection) {
+ const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
+ const endpointUrl2 = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
+ if (endpointUrl2)
+ return endpointUrl2;
+ }
+ }
+ const endpointUrl = profile[CONFIG_ENDPOINT_URL];
+ if (endpointUrl)
+ return endpointUrl;
+ return;
+ },
+ default: undefined
});
- module.exports = __toCommonJS(src_exports);
- var warningEmitted = false;
- var emitWarningIfUnsupportedVersion = __name((version) => {
- if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) {
- warningEmitted = true;
- process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
-no longer support Node.js 14.x on May 1, 2024.
+ exports.getEndpointUrlConfig = getEndpointUrlConfig;
+});
-To continue receiving updates to AWS services, bug fixes, and security
-updates please upgrade to an active Node.js LTS version.
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.
+var require_getEndpointFromConfig = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getEndpointFromConfig = undefined;
+ var node_config_provider_1 = require_dist_cjs48();
+ var getEndpointUrlConfig_1 = require_getEndpointUrlConfig();
+ var getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))();
+ exports.getEndpointFromConfig = getEndpointFromConfig;
+});
-More information can be found at: https://a.co/dzr2AJd`);
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/s
+var require_dist_cjs49 = __commonJS((exports) => {
+ var getEndpointFromConfig = require_getEndpointFromConfig();
+ var urlParser = require_dist_cjs37();
+ var core = require_dist_cjs17();
+ var utilMiddleware = require_dist_cjs4();
+ var middlewareSerde = require_dist_cjs5();
+ var resolveParamsForS3 = async (endpointParams) => {
+ const bucket = endpointParams?.Bucket || "";
+ if (typeof endpointParams.Bucket === "string") {
+ endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
}
- }, "emitWarningIfUnsupportedVersion");
- var import_protocol_http = require_dist_cjs2();
- var getDateHeader = __name((response) => {
- var _a, _b;
- return import_protocol_http.HttpResponse.isInstance(response) ? ((_a = response.headers) == null ? undefined : _a.date) ?? ((_b = response.headers) == null ? undefined : _b.Date) : undefined;
- }, "getDateHeader");
- var getSkewCorrectedDate = __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), "getSkewCorrectedDate");
- var isClockSkewed = __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 300000, "isClockSkewed");
- var getUpdatedSystemClockOffset = __name((clockTime, currentSystemClockOffset) => {
- const clockTimeInMs = Date.parse(clockTime);
- if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {
- return clockTimeInMs - Date.now();
+ if (isArnBucketName(bucket)) {
+ if (endpointParams.ForcePathStyle === true) {
+ throw new Error("Path-style addressing cannot be used with ARN buckets");
+ }
+ } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) {
+ endpointParams.ForcePathStyle = true;
}
- return currentSystemClockOffset;
- }, "getUpdatedSystemClockOffset");
- var throwSigningPropertyError = __name((name, property) => {
- if (!property) {
- throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
+ if (endpointParams.DisableMultiRegionAccessPoints) {
+ endpointParams.disableMultiRegionAccessPoints = true;
+ endpointParams.DisableMRAP = true;
}
- return property;
- }, "throwSigningPropertyError");
- var validateSigningProperties = __name(async (signingProperties) => {
- var _a, _b, _c;
- const context = throwSigningPropertyError("context", signingProperties.context);
- const config = throwSigningPropertyError("config", signingProperties.config);
- const authScheme = (_c = (_b = (_a = context.endpointV2) == null ? undefined : _a.properties) == null ? undefined : _b.authSchemes) == null ? undefined : _c[0];
- const signerFunction = throwSigningPropertyError("signer", config.signer);
- const signer = await signerFunction(authScheme);
- const signingRegion = signingProperties == null ? undefined : signingProperties.signingRegion;
- const signingName = signingProperties == null ? undefined : signingProperties.signingName;
- return {
- config,
- signer,
- signingRegion,
- signingName
- };
- }, "validateSigningProperties");
- var _AwsSdkSigV4Signer = class _AwsSdkSigV4Signer2 {
- async sign(httpRequest, identity, signingProperties) {
- if (!import_protocol_http.HttpRequest.isInstance(httpRequest)) {
- throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
+ return endpointParams;
+ };
+ var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
+ var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
+ var DOTS_PATTERN = /\.\./;
+ var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
+ var isArnBucketName = (bucketName) => {
+ const [arn, partition, service, , , bucket] = bucketName.split(":");
+ const isArn = arn === "arn" && bucketName.split(":").length >= 6;
+ const isValidArn = Boolean(isArn && partition && service && bucket);
+ if (isArn && !isValidArn) {
+ throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
+ }
+ return isValidArn;
+ };
+ var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => {
+ const configProvider = async () => {
+ const configValue = config[configKey] ?? config[canonicalEndpointParamKey];
+ if (typeof configValue === "function") {
+ return configValue();
}
- const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties);
- const signedRequest = await signer.sign(httpRequest, {
- signingDate: getSkewCorrectedDate(config.systemClockOffset),
- signingRegion,
- signingService: signingName
- });
- return signedRequest;
+ return configValue;
+ };
+ if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") {
+ return async () => {
+ const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
+ const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;
+ return configValue;
+ };
}
- errorHandler(signingProperties) {
- return (error) => {
- const serverTime = error.ServerTime ?? getDateHeader(error.$response);
- if (serverTime) {
- const config = throwSigningPropertyError("config", signingProperties.config);
- config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
+ if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") {
+ return async () => {
+ const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
+ const configValue = credentials?.accountId ?? credentials?.AccountId;
+ return configValue;
+ };
+ }
+ if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") {
+ return async () => {
+ if (config.isCustomEndpoint === false) {
+ return;
}
- throw error;
+ const endpoint = await configProvider();
+ if (endpoint && typeof endpoint === "object") {
+ if ("url" in endpoint) {
+ return endpoint.url.href;
+ }
+ if ("hostname" in endpoint) {
+ const { protocol, hostname, port, path } = endpoint;
+ return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
+ }
+ }
+ return endpoint;
};
}
- successHandler(httpResponse, signingProperties) {
- const dateHeader = getDateHeader(httpResponse);
- if (dateHeader) {
- const config = throwSigningPropertyError("config", signingProperties.config);
- config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
+ return configProvider;
+ };
+ var toEndpointV1 = (endpoint) => {
+ if (typeof endpoint === "object") {
+ if ("url" in endpoint) {
+ return urlParser.parseUrl(endpoint.url);
}
+ return endpoint;
}
+ return urlParser.parseUrl(endpoint);
};
- __name(_AwsSdkSigV4Signer, "AwsSdkSigV4Signer");
- var AwsSdkSigV4Signer = _AwsSdkSigV4Signer;
- var AWSSDKSigV4Signer = AwsSdkSigV4Signer;
- var import_core = require_dist_cjs43();
- var import_signature_v4 = require_dist_cjs21();
- var resolveAwsSdkSigV4Config = __name((config) => {
- let normalizedCreds;
- if (config.credentials) {
- normalizedCreds = (0, import_core.memoizeIdentityProvider)(config.credentials, import_core.isIdentityExpired, import_core.doesIdentityRequireRefresh);
- }
- if (!normalizedCreds) {
- if (config.credentialDefaultProvider) {
- normalizedCreds = (0, import_core.normalizeProvider)(config.credentialDefaultProvider(config));
+ var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
+ if (!clientConfig.isCustomEndpoint) {
+ let endpointFromConfig;
+ if (clientConfig.serviceConfiguredEndpoint) {
+ endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
} else {
- normalizedCreds = __name(async () => {
- throw new Error("`credentials` is missing");
- }, "normalizedCreds");
+ endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId);
+ }
+ if (endpointFromConfig) {
+ clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
+ clientConfig.isCustomEndpoint = true;
}
}
- const {
- signingEscapePath = true,
- systemClockOffset = config.systemClockOffset || 0,
- sha256
- } = config;
- let signer;
- if (config.signer) {
- signer = (0, import_core.normalizeProvider)(config.signer);
- } else if (config.regionInfoProvider) {
- signer = __name(() => (0, import_core.normalizeProvider)(config.region)().then(async (region) => [
- await config.regionInfoProvider(region, {
- useFipsEndpoint: await config.useFipsEndpoint(),
- useDualstackEndpoint: await config.useDualstackEndpoint()
- }) || {},
- region
- ]).then(([regionInfo, region]) => {
- const { signingRegion, signingService } = regionInfo;
- config.signingRegion = config.signingRegion || signingRegion || region;
- config.signingName = config.signingName || signingService || config.serviceId;
- const params = {
- ...config,
- credentials: normalizedCreds,
- region: config.signingRegion,
- service: config.signingName,
- sha256,
- uriEscapePath: signingEscapePath
- };
- const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
- return new SignerCtor(params);
- }), "signer");
- } else {
- signer = __name(async (authScheme) => {
- authScheme = Object.assign({}, {
- name: "sigv4",
- signingName: config.signingName || config.defaultSigningName,
- signingRegion: await (0, import_core.normalizeProvider)(config.region)(),
- properties: {}
- }, authScheme);
- const signingRegion = authScheme.signingRegion;
- const signingService = authScheme.signingName;
- config.signingRegion = config.signingRegion || signingRegion;
- config.signingName = config.signingName || signingService || config.serviceId;
- const params = {
- ...config,
- credentials: normalizedCreds,
- region: config.signingRegion,
- service: config.signingName,
- sha256,
- uriEscapePath: signingEscapePath
- };
- const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;
- return new SignerCtor(params);
- }, "signer");
- }
- return {
- ...config,
- systemClockOffset,
- signingEscapePath,
- credentials: normalizedCreds,
- signer
- };
- }, "resolveAwsSdkSigV4Config");
- var resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;
- var _toStr = __name((val2) => {
- if (val2 == null) {
- return val2;
- }
- if (typeof val2 === "number" || typeof val2 === "bigint") {
- const warning = new Error(`Received number ${val2} where a string was expected.`);
- warning.name = "Warning";
- console.warn(warning);
- return String(val2);
- }
- if (typeof val2 === "boolean") {
- const warning = new Error(`Received boolean ${val2} where a string was expected.`);
- warning.name = "Warning";
- console.warn(warning);
- return String(val2);
- }
- return val2;
- }, "_toStr");
- var _toBool = __name((val2) => {
- if (val2 == null) {
- return val2;
- }
- if (typeof val2 === "number") {
+ const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
+ if (typeof clientConfig.endpointProvider !== "function") {
+ throw new Error("config.endpointProvider is not set.");
}
- if (typeof val2 === "string") {
- const lowercase = val2.toLowerCase();
- if (val2 !== "" && lowercase !== "false" && lowercase !== "true") {
- const warning = new Error(`Received string "${val2}" where a boolean was expected.`);
- warning.name = "Warning";
- console.warn(warning);
+ const endpoint = clientConfig.endpointProvider(endpointParams, context);
+ return endpoint;
+ };
+ var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
+ const endpointParams = {};
+ const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
+ for (const [name, instruction] of Object.entries(instructions)) {
+ switch (instruction.type) {
+ case "staticContextParams":
+ endpointParams[name] = instruction.value;
+ break;
+ case "contextParams":
+ endpointParams[name] = commandInput[instruction.name];
+ break;
+ case "clientContextParams":
+ case "builtInParams":
+ endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();
+ break;
+ case "operationContextParams":
+ endpointParams[name] = instruction.get(commandInput);
+ break;
+ default:
+ throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
}
- return val2 !== "" && lowercase !== "false";
}
- return val2;
- }, "_toBool");
- var _toNum = __name((val2) => {
- if (val2 == null) {
- return val2;
+ if (Object.keys(instructions).length === 0) {
+ Object.assign(endpointParams, clientConfig);
}
- if (typeof val2 === "boolean") {
+ if (String(clientConfig.serviceId).toLowerCase() === "s3") {
+ await resolveParamsForS3(endpointParams);
}
- if (typeof val2 === "string") {
- const num = Number(val2);
- if (num.toString() !== val2) {
- const warning = new Error(`Received string "${val2}" where a number was expected.`);
- warning.name = "Warning";
- console.warn(warning);
- return val2;
+ return endpointParams;
+ };
+ var endpointMiddleware = ({ config, instructions }) => {
+ return (next, context) => async (args) => {
+ if (config.isCustomEndpoint) {
+ core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
}
- return num;
- }
- return val2;
- }, "_toNum");
- var import_smithy_client = require_dist_cjs16();
- var awsExpectUnion = __name((value) => {
- if (value == null) {
- return;
+ const endpoint = await getEndpointFromInstructions(args.input, {
+ getEndpointParameterInstructions() {
+ return instructions;
+ }
+ }, { ...config }, context);
+ context.endpointV2 = endpoint;
+ context.authSchemes = endpoint.properties?.authSchemes;
+ const authScheme = context.authSchemes?.[0];
+ if (authScheme) {
+ context["signing_region"] = authScheme.signingRegion;
+ context["signing_service"] = authScheme.signingName;
+ const smithyContext = utilMiddleware.getSmithyContext(context);
+ const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
+ if (httpAuthOption) {
+ httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
+ signing_region: authScheme.signingRegion,
+ signingRegion: authScheme.signingRegion,
+ signing_service: authScheme.signingName,
+ signingName: authScheme.signingName,
+ signingRegionSet: authScheme.signingRegionSet
+ }, authScheme.properties);
+ }
+ }
+ return next({
+ ...args
+ });
+ };
+ };
+ var endpointMiddlewareOptions = {
+ step: "serialize",
+ tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"],
+ name: "endpointV2Middleware",
+ override: true,
+ relation: "before",
+ toMiddleware: middlewareSerde.serializerMiddlewareOption.name
+ };
+ var getEndpointPlugin = (config, instructions) => ({
+ applyToStack: (clientStack) => {
+ clientStack.addRelativeTo(endpointMiddleware({
+ config,
+ instructions
+ }), endpointMiddlewareOptions);
}
- if (typeof value === "object" && "__type" in value) {
- delete value.__type;
+ });
+ var resolveEndpointConfig = (input) => {
+ const tls = input.tls ?? true;
+ const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
+ const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined;
+ const isCustomEndpoint = !!endpoint;
+ const resolvedConfig = Object.assign(input, {
+ endpoint: customEndpointProvider,
+ tls,
+ isCustomEndpoint,
+ useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false),
+ useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false)
+ });
+ let configuredEndpointPromise = undefined;
+ resolvedConfig.serviceConfiguredEndpoint = async () => {
+ if (input.serviceId && !configuredEndpointPromise) {
+ configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId);
+ }
+ return configuredEndpointPromise;
+ };
+ return resolvedConfig;
+ };
+ var resolveEndpointRequiredConfig = (input) => {
+ const { endpoint } = input;
+ if (endpoint === undefined) {
+ input.endpoint = async () => {
+ throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.");
+ };
}
- return (0, import_smithy_client.expectUnion)(value);
- }, "awsExpectUnion");
+ return input;
+ };
+ exports.endpointMiddleware = endpointMiddleware;
+ exports.endpointMiddlewareOptions = endpointMiddlewareOptions;
+ exports.getEndpointFromInstructions = getEndpointFromInstructions;
+ exports.getEndpointPlugin = getEndpointPlugin;
+ exports.resolveEndpointConfig = resolveEndpointConfig;
+ exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig;
+ exports.resolveParams = resolveParams;
+ exports.toEndpointV1 = toEndpointV1;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso
+var require_ruleset = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ruleSet = undefined;
+ var cp = "required";
+ var cq = "type";
+ var cr = "rules";
+ var cs = "conditions";
+ var ct = "fn";
+ var cu = "argv";
+ var cv = "ref";
+ var cw = "assign";
+ var cx = "url";
+ var cy = "properties";
+ var cz = "backend";
+ var cA = "authSchemes";
+ var cB = "disableDoubleEncoding";
+ var cC = "signingName";
+ var cD = "signingRegion";
+ var cE = "headers";
+ var cF = "signingRegionSet";
+ var a = 6;
+ var b = false;
+ var c = true;
+ var d = "isSet";
+ var e = "booleanEquals";
+ var f = "error";
+ var g = "aws.partition";
+ var h = "stringEquals";
+ var i = "getAttr";
+ var j = "name";
+ var k = "substring";
+ var l = "bucketSuffix";
+ var m = "parseURL";
+ var n = "endpoint";
+ var o = "tree";
+ var p = "aws.isVirtualHostableS3Bucket";
+ var q = "{url#scheme}://{Bucket}.{url#authority}{url#path}";
+ var r = "not";
+ var s = "accessPointSuffix";
+ var t = "{url#scheme}://{url#authority}{url#path}";
+ var u = "hardwareType";
+ var v = "regionPrefix";
+ var w = "bucketAliasSuffix";
+ var x = "outpostId";
+ var y = "isValidHostLabel";
+ var z = "sigv4a";
+ var A = "s3-outposts";
+ var B = "s3";
+ var C = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}";
+ var D = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}";
+ var E = "https://{Bucket}.s3.{partitionResult#dnsSuffix}";
+ var F = "aws.parseArn";
+ var G = "bucketArn";
+ var H = "arnType";
+ var I = "";
+ var J = "s3-object-lambda";
+ var K = "accesspoint";
+ var L = "accessPointName";
+ var M = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}";
+ var N = "mrapPartition";
+ var O = "outpostType";
+ var P = "arnPrefix";
+ var Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}";
+ var R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}";
+ var S = "https://s3.{partitionResult#dnsSuffix}";
+ var T = { [cp]: false, [cq]: "String" };
+ var U = { [cp]: true, default: false, [cq]: "Boolean" };
+ var V = { [cp]: false, [cq]: "Boolean" };
+ var W = { [ct]: e, [cu]: [{ [cv]: "Accelerate" }, true] };
+ var X = { [ct]: e, [cu]: [{ [cv]: "UseFIPS" }, true] };
+ var Y = { [ct]: e, [cu]: [{ [cv]: "UseDualStack" }, true] };
+ var Z = { [ct]: d, [cu]: [{ [cv]: "Endpoint" }] };
+ var aa = { [ct]: g, [cu]: [{ [cv]: "Region" }], [cw]: "partitionResult" };
+ var ab = { [ct]: h, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "partitionResult" }, j] }, "aws-cn"] };
+ var ac = { [ct]: d, [cu]: [{ [cv]: "Bucket" }] };
+ var ad = { [cv]: "Bucket" };
+ var ae = { [cs]: [Y], [f]: "S3Express does not support Dual-stack.", [cq]: f };
+ var af = { [cs]: [W], [f]: "S3Express does not support S3 Accelerate.", [cq]: f };
+ var ag = { [cs]: [Z, { [ct]: m, [cu]: [{ [cv]: "Endpoint" }], [cw]: "url" }], [cr]: [{ [cs]: [{ [ct]: d, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }, true] }], [cr]: [{ [cs]: [{ [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] }], [cr]: [{ [cs]: [{ [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" }], [cr]: [{ [n]: { [cx]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: p, [cu]: [ad, false] }], [cr]: [{ [n]: { [cx]: q, [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f }], [cq]: o }, { [cs]: [{ [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] }], [cr]: [{ [cs]: [{ [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" }], [cr]: [{ [n]: { [cx]: "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: p, [cu]: [ad, false] }], [cr]: [{ [n]: { [cx]: q, [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }], [cq]: o }, { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f }], [cq]: o };
+ var ah = { [ct]: m, [cu]: [{ [cv]: "Endpoint" }], [cw]: "url" };
+ var ai = { [ct]: e, [cu]: [{ [ct]: i, [cu]: [{ [cv]: "url" }, "isIp"] }, true] };
+ var aj = { [cv]: "url" };
+ var ak = { [ct]: "uriEncode", [cu]: [ad], [cw]: "uri_encoded_bucket" };
+ var al = { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: "s3express", [cD]: "{Region}" }] };
+ var am = {};
+ var an = { [ct]: p, [cu]: [ad, false] };
+ var ao = { [f]: "S3Express bucket name is not a valid virtual hostable name.", [cq]: f };
+ var ap = { [ct]: d, [cu]: [{ [cv]: "UseS3ExpressControlEndpoint" }] };
+ var aq = { [ct]: e, [cu]: [{ [cv]: "UseS3ExpressControlEndpoint" }, true] };
+ var ar = { [ct]: r, [cu]: [Z] };
+ var as = { [f]: "Unrecognized S3Express bucket name format.", [cq]: f };
+ var at = { [ct]: r, [cu]: [ac] };
+ var au = { [cv]: u };
+ var av = { [cs]: [ar], [f]: "Expected a endpoint to be specified but no endpoint was found", [cq]: f };
+ var aw = { [cA]: [{ [cB]: true, [j]: z, [cC]: A, [cF]: ["*"] }, { [cB]: true, [j]: "sigv4", [cC]: A, [cD]: "{Region}" }] };
+ var ax = { [ct]: e, [cu]: [{ [cv]: "ForcePathStyle" }, false] };
+ var ay = { [cv]: "ForcePathStyle" };
+ var az = { [ct]: e, [cu]: [{ [cv]: "Accelerate" }, false] };
+ var aA = { [ct]: h, [cu]: [{ [cv]: "Region" }, "aws-global"] };
+ var aB = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "us-east-1" }] };
+ var aC = { [ct]: r, [cu]: [aA] };
+ var aD = { [ct]: e, [cu]: [{ [cv]: "UseGlobalEndpoint" }, true] };
+ var aE = { [cx]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{Region}" }] }, [cE]: {} };
+ var aF = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{Region}" }] };
+ var aG = { [ct]: e, [cu]: [{ [cv]: "UseGlobalEndpoint" }, false] };
+ var aH = { [ct]: e, [cu]: [{ [cv]: "UseDualStack" }, false] };
+ var aI = { [cx]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var aJ = { [ct]: e, [cu]: [{ [cv]: "UseFIPS" }, false] };
+ var aK = { [cx]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var aL = { [cx]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var aM = { [ct]: e, [cu]: [{ [ct]: i, [cu]: [aj, "isIp"] }, false] };
+ var aN = { [cx]: C, [cy]: aF, [cE]: {} };
+ var aO = { [cx]: q, [cy]: aF, [cE]: {} };
+ var aP = { [n]: aO, [cq]: n };
+ var aQ = { [cx]: D, [cy]: aF, [cE]: {} };
+ var aR = { [cx]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var aS = { [f]: "Invalid region: region was not a valid DNS name.", [cq]: f };
+ var aT = { [cv]: G };
+ var aU = { [cv]: H };
+ var aV = { [ct]: i, [cu]: [aT, "service"] };
+ var aW = { [cv]: L };
+ var aX = { [cs]: [Y], [f]: "S3 Object Lambda does not support Dual-stack", [cq]: f };
+ var aY = { [cs]: [W], [f]: "S3 Object Lambda does not support S3 Accelerate", [cq]: f };
+ var aZ = { [cs]: [{ [ct]: d, [cu]: [{ [cv]: "DisableAccessPoints" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableAccessPoints" }, true] }], [f]: "Access points are not supported for this operation", [cq]: f };
+ var ba = { [cs]: [{ [ct]: d, [cu]: [{ [cv]: "UseArnRegion" }] }, { [ct]: e, [cu]: [{ [cv]: "UseArnRegion" }, false] }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, "{Region}"] }] }], [f]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [cq]: f };
+ var bb = { [ct]: i, [cu]: [{ [cv]: "bucketPartition" }, j] };
+ var bc = { [ct]: i, [cu]: [aT, "accountId"] };
+ var bd = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: J, [cD]: "{bucketArn#region}" }] };
+ var be = { [f]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [cq]: f };
+ var bf = { [f]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [cq]: f };
+ var bg = { [f]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [cq]: f };
+ var bh = { [f]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [cq]: f };
+ var bi = { [f]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [cq]: f };
+ var bj = { [f]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [cq]: f };
+ var bk = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: B, [cD]: "{bucketArn#region}" }] };
+ var bl = { [cA]: [{ [cB]: true, [j]: z, [cC]: A, [cF]: ["*"] }, { [cB]: true, [j]: "sigv4", [cC]: A, [cD]: "{bucketArn#region}" }] };
+ var bm = { [ct]: F, [cu]: [ad] };
+ var bn = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} };
+ var bo = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} };
+ var bp = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} };
+ var bq = { [cx]: Q, [cy]: aF, [cE]: {} };
+ var br = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aF, [cE]: {} };
+ var bs = { [cv]: "UseObjectLambdaEndpoint" };
+ var bt = { [cA]: [{ [cB]: true, [j]: "sigv4", [cC]: J, [cD]: "{Region}" }] };
+ var bu = { [cx]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var bv = { [cx]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var bw = { [cx]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var bx = { [cx]: t, [cy]: aF, [cE]: {} };
+ var by = { [cx]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [cy]: aF, [cE]: {} };
+ var bz = [{ [cv]: "Region" }];
+ var bA = [{ [cv]: "Endpoint" }];
+ var bB = [ad];
+ var bC = [Y];
+ var bD = [W];
+ var bE = [Z, ah];
+ var bF = [{ [ct]: d, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }] }, { [ct]: e, [cu]: [{ [cv]: "DisableS3ExpressSessionAuth" }, true] }];
+ var bG = [ak];
+ var bH = [an];
+ var bI = [aa];
+ var bJ = [X];
+ var bK = [{ [ct]: k, [cu]: [ad, 6, 14, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 14, 16, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bL = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: {} }, [cq]: n }];
+ var bM = [{ [ct]: k, [cu]: [ad, 6, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bN = [{ [ct]: k, [cu]: [ad, 6, 19, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 19, 21, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bO = [{ [ct]: k, [cu]: [ad, 6, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bP = [{ [ct]: k, [cu]: [ad, 6, 26, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 26, 28, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bQ = [{ [cs]: [X], [n]: { [cx]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }, { [n]: { [cx]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}", [cy]: { [cz]: "S3Express", [cA]: [{ [cB]: true, [j]: "sigv4-s3express", [cC]: "s3express", [cD]: "{Region}" }] }, [cE]: {} }, [cq]: n }];
+ var bR = [ad, 0, 7, true];
+ var bS = [{ [ct]: k, [cu]: [ad, 7, 15, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 15, 17, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bT = [{ [ct]: k, [cu]: [ad, 7, 16, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 16, 18, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bU = [{ [ct]: k, [cu]: [ad, 7, 20, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 20, 22, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bV = [{ [ct]: k, [cu]: [ad, 7, 21, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 21, 23, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bW = [{ [ct]: k, [cu]: [ad, 7, 27, true], [cw]: "s3expressAvailabilityZoneId" }, { [ct]: k, [cu]: [ad, 27, 29, true], [cw]: "s3expressAvailabilityZoneDelim" }, { [ct]: h, [cu]: [{ [cv]: "s3expressAvailabilityZoneDelim" }, "--"] }];
+ var bX = [ac];
+ var bY = [{ [ct]: y, [cu]: [{ [cv]: x }, false] }];
+ var bZ = [{ [ct]: h, [cu]: [{ [cv]: v }, "beta"] }];
+ var ca = ["*"];
+ var cb = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, false] }];
+ var cc = [{ [ct]: h, [cu]: [{ [cv]: "Region" }, "us-east-1"] }];
+ var cd = [{ [ct]: h, [cu]: [aU, K] }];
+ var ce = [{ [ct]: i, [cu]: [aT, "resourceId[1]"], [cw]: L }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aW, I] }] }];
+ var cf = [aT, "resourceId[1]"];
+ var cg = [{ [ct]: r, [cu]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, I] }] }];
+ var ch = [{ [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[2]"] }] }] }];
+ var ci = [aT, "resourceId[2]"];
+ var cj = [{ [ct]: g, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }], [cw]: "bucketPartition" }];
+ var ck = [{ [ct]: h, [cu]: [bb, { [ct]: i, [cu]: [{ [cv]: "partitionResult" }, j] }] }];
+ var cl = [{ [ct]: y, [cu]: [{ [ct]: i, [cu]: [aT, "region"] }, true] }];
+ var cm = [{ [ct]: y, [cu]: [bc, false] }];
+ var cn = [{ [ct]: y, [cu]: [aW, false] }];
+ var co = [{ [ct]: y, [cu]: [{ [cv]: "Region" }, true] }];
+ var _data = { version: "1.0", parameters: { Bucket: T, Region: T, UseFIPS: U, UseDualStack: U, Endpoint: T, ForcePathStyle: U, Accelerate: U, UseGlobalEndpoint: U, UseObjectLambdaEndpoint: V, Key: T, Prefix: T, CopySource: T, DisableAccessPoints: V, DisableMultiRegionAccessPoints: U, UseArnRegion: V, UseS3ExpressControlEndpoint: V, DisableS3ExpressSessionAuth: V }, [cr]: [{ [cs]: [{ [ct]: d, [cu]: bz }], [cr]: [{ [cs]: [W, X], error: "Accelerate cannot be used with FIPS", [cq]: f }, { [cs]: [Y, Z], error: "Cannot set dual-stack in combination with a custom endpoint.", [cq]: f }, { [cs]: [Z, X], error: "A custom endpoint cannot be combined with FIPS", [cq]: f }, { [cs]: [Z, W], error: "A custom endpoint cannot be combined with S3 Accelerate", [cq]: f }, { [cs]: [X, aa, ab], error: "Partition does not support FIPS", [cq]: f }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 0, a, c], [cw]: l }, { [ct]: h, [cu]: [{ [cv]: l }, "--x-s3"] }], [cr]: [ae, af, ag, { [cs]: [ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [ak, ar], [cr]: [{ [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bK, [cr]: bL, [cq]: o }, { [cs]: bM, [cr]: bL, [cq]: o }, { [cs]: bN, [cr]: bL, [cq]: o }, { [cs]: bO, [cr]: bL, [cq]: o }, { [cs]: bP, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bK, [cr]: bQ, [cq]: o }, { [cs]: bM, [cr]: bQ, [cq]: o }, { [cs]: bN, [cr]: bQ, [cq]: o }, { [cs]: bO, [cr]: bQ, [cq]: o }, { [cs]: bP, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: bR, [cw]: s }, { [ct]: h, [cu]: [{ [cv]: s }, "--xa-s3"] }], [cr]: [ae, af, ag, { [cs]: bH, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bF, [cr]: [{ [cs]: bS, [cr]: bL, [cq]: o }, { [cs]: bT, [cr]: bL, [cq]: o }, { [cs]: bU, [cr]: bL, [cq]: o }, { [cs]: bV, [cr]: bL, [cq]: o }, { [cs]: bW, [cr]: bL, [cq]: o }, as], [cq]: o }, { [cs]: bS, [cr]: bQ, [cq]: o }, { [cs]: bT, [cr]: bQ, [cq]: o }, { [cs]: bU, [cr]: bQ, [cq]: o }, { [cs]: bV, [cr]: bQ, [cq]: o }, { [cs]: bW, [cr]: bQ, [cq]: o }, as], [cq]: o }], [cq]: o }, ao], [cq]: o }, { [cs]: [at, ap, aq], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: bE, endpoint: { [cx]: t, [cy]: al, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3express-control.{Region}.{partitionResult#dnsSuffix}", [cy]: al, [cE]: am }, [cq]: n }], [cq]: o }], [cq]: o }, { [cs]: [ac, { [ct]: k, [cu]: [ad, 49, 50, c], [cw]: u }, { [ct]: k, [cu]: [ad, 8, 12, c], [cw]: v }, { [ct]: k, [cu]: bR, [cw]: w }, { [ct]: k, [cu]: [ad, 32, 49, c], [cw]: x }, { [ct]: g, [cu]: bz, [cw]: "regionPartition" }, { [ct]: h, [cu]: [{ [cv]: w }, "--op-s3"] }], [cr]: [{ [cs]: bY, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [au, "e"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.ec2.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [au, "o"] }], [cr]: [{ [cs]: bZ, [cr]: [av, { [cs]: bE, endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.{url#authority}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { endpoint: { [cx]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [cy]: aw, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [cq]: f }], [cq]: o }, { [cs]: bX, [cr]: [{ [cs]: [Z, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [{ [ct]: m, [cu]: bA }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [cq]: f }, { [cs]: [ax, an], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [{ [cs]: [W, ab], error: "S3 Accelerate cannot be used in this region", [cq]: f }, { [cs]: [Y, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, X, az, ar, aC, aD], [cr]: [{ endpoint: aE, [cq]: n }], [cq]: o }, { [cs]: [Y, X, az, ar, aC, aG], endpoint: aE, [cq]: n }, { [cs]: [aH, X, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, X, az, ar, aC, aD], [cr]: [{ endpoint: aI, [cq]: n }], [cq]: o }, { [cs]: [aH, X, az, ar, aC, aG], endpoint: aI, [cq]: n }, { [cs]: [Y, aJ, W, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, W, ar, aC, aD], [cr]: [{ endpoint: aK, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, W, ar, aC, aG], endpoint: aK, [cq]: n }, { [cs]: [Y, aJ, az, ar, aA], endpoint: { [cx]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, aJ, az, ar, aC, aD], [cr]: [{ endpoint: aL, [cq]: n }], [cq]: o }, { [cs]: [Y, aJ, az, ar, aC, aG], endpoint: aL, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aA], endpoint: { [cx]: C, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aA], endpoint: { [cx]: q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aD], [cr]: [{ [cs]: cc, endpoint: aN, [cq]: n }, { endpoint: aN, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aD], [cr]: [{ [cs]: cc, endpoint: aO, [cq]: n }, aP], [cq]: o }, { [cs]: [aH, aJ, az, Z, ah, ai, aC, aG], endpoint: aN, [cq]: n }, { [cs]: [aH, aJ, az, Z, ah, aM, aC, aG], endpoint: aO, [cq]: n }, { [cs]: [aH, aJ, W, ar, aA], endpoint: { [cx]: D, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, W, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: aQ, [cq]: n }, { endpoint: aQ, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, W, ar, aC, aG], endpoint: aQ, [cq]: n }, { [cs]: [aH, aJ, az, ar, aA], endpoint: { [cx]: E, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, aJ, az, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: E, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: aR, [cq]: n }], [cq]: o }, { [cs]: [aH, aJ, az, ar, aC, aG], endpoint: aR, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [Z, ah, { [ct]: h, [cu]: [{ [ct]: i, [cu]: [aj, "scheme"] }, "http"] }, { [ct]: p, [cu]: [ad, c] }, ax, aJ, aH, az], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: cb, [cr]: [aP], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [ax, { [ct]: F, [cu]: bB, [cw]: G }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[0]"], [cw]: H }, { [ct]: r, [cu]: [{ [ct]: h, [cu]: [aU, I] }] }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, J] }], [cr]: [{ [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [aX, aY, { [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bc, I] }], error: "Invalid ARN: Missing account id", [cq]: f }, { [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bE, endpoint: { [cx]: M, [cy]: bd, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bd, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [cq]: f }], [cq]: o }, bj], [cq]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [cq]: f }], [cq]: o }, { [cs]: cd, [cr]: [{ [cs]: ce, [cr]: [{ [cs]: cg, [cr]: [{ [cs]: cd, [cr]: [{ [cs]: cg, [cr]: [aZ, { [cs]: ch, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [bb, "{partitionResult#name}"] }], [cr]: [{ [cs]: cl, [cr]: [{ [cs]: [{ [ct]: h, [cu]: [aV, B] }], [cr]: [{ [cs]: cm, [cr]: [{ [cs]: cn, [cr]: [{ [cs]: bD, error: "Access Points do not support S3 Accelerate", [cq]: f }, { [cs]: [X, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [X, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah], endpoint: { [cx]: M, [cy]: bk, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH], endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bk, [cE]: am }, [cq]: n }], [cq]: o }, be], [cq]: o }, bf], [cq]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [cq]: f }], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, bi], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: y, [cu]: [aW, c] }], [cr]: [{ [cs]: bC, error: "S3 MRAP does not support dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 MRAP does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 MRAP does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [{ [cv]: "DisableMultiRegionAccessPoints" }, c] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [cq]: f }, { [cs]: [{ [ct]: g, [cu]: bz, [cw]: N }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [ct]: i, [cu]: [{ [cv]: N }, j] }, { [ct]: i, [cu]: [aT, "partition"] }] }], [cr]: [{ endpoint: { [cx]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [cy]: { [cA]: [{ [cB]: c, name: z, [cC]: B, [cF]: ca }] }, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [cq]: f }], [cq]: o }], [cq]: o }, { error: "Invalid Access Point Name", [cq]: f }], [cq]: o }, bj], [cq]: o }, { [cs]: [{ [ct]: h, [cu]: [aV, A] }], [cr]: [{ [cs]: bC, error: "S3 Outposts does not support Dual-stack", [cq]: f }, { [cs]: bJ, error: "S3 Outposts does not support FIPS", [cq]: f }, { [cs]: bD, error: "S3 Outposts does not support S3 Accelerate", [cq]: f }, { [cs]: [{ [ct]: d, [cu]: [{ [ct]: i, [cu]: [aT, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [cq]: f }, { [cs]: [{ [ct]: i, [cu]: cf, [cw]: x }], [cr]: [{ [cs]: bY, [cr]: [ba, { [cs]: cj, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: ck, [cr]: [{ [cs]: cl, [cr]: [{ [cs]: cm, [cr]: [{ [cs]: [{ [ct]: i, [cu]: ci, [cw]: O }], [cr]: [{ [cs]: [{ [ct]: i, [cu]: [aT, "resourceId[3]"], [cw]: L }], [cr]: [{ [cs]: [{ [ct]: h, [cu]: [{ [cv]: O }, K] }], [cr]: [{ [cs]: bE, endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [cy]: bl, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [cy]: bl, [cE]: am }, [cq]: n }], [cq]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [cq]: f }], [cq]: o }, { error: "Invalid ARN: expected an access point name", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Expected a 4-component resource", [cq]: f }], [cq]: o }, bf], [cq]: o }, bg], [cq]: o }, bh], [cq]: o }], [cq]: o }], [cq]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [cq]: f }], [cq]: o }, { error: "Invalid ARN: The Outpost Id was not set", [cq]: f }], [cq]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [cq]: f }], [cq]: o }, { error: "Invalid ARN: No ARN type specified", [cq]: f }], [cq]: o }, { [cs]: [{ [ct]: k, [cu]: [ad, 0, 4, b], [cw]: P }, { [ct]: h, [cu]: [{ [cv]: P }, "arn:"] }, { [ct]: r, [cu]: [{ [ct]: d, [cu]: [bm] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [cq]: f }, { [cs]: [{ [ct]: e, [cu]: [ay, c] }, bm], error: "Path-style addressing cannot be used with ARN buckets", [cq]: f }, { [cs]: bG, [cr]: [{ [cs]: bI, [cr]: [{ [cs]: [az], [cr]: [{ [cs]: [Y, ar, X, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, X, aC, aD], [cr]: [{ endpoint: bn, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, X, aC, aG], endpoint: bn, [cq]: n }, { [cs]: [aH, ar, X, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, X, aC, aD], [cr]: [{ endpoint: bo, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, X, aC, aG], endpoint: bo, [cq]: n }, { [cs]: [Y, ar, aJ, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [Y, ar, aJ, aC, aD], [cr]: [{ endpoint: bp, [cq]: n }], [cq]: o }, { [cs]: [Y, ar, aJ, aC, aG], endpoint: bp, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aA], endpoint: { [cx]: Q, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, Z, ah, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: bq, [cq]: n }, { endpoint: bq, [cq]: n }], [cq]: o }, { [cs]: [aH, Z, ah, aJ, aC, aG], endpoint: bq, [cq]: n }, { [cs]: [aH, ar, aJ, aA], endpoint: { [cx]: R, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aH, ar, aJ, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: R, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: br, [cq]: n }], [cq]: o }, { [cs]: [aH, ar, aJ, aC, aG], endpoint: br, [cq]: n }], [cq]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [cq]: f }], [cq]: o }], [cq]: o }], [cq]: o }, { [cs]: [{ [ct]: d, [cu]: [bs] }, { [ct]: e, [cu]: [bs, c] }], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [aX, aY, { [cs]: bE, endpoint: { [cx]: t, [cy]: bt, [cE]: am }, [cq]: n }, { [cs]: bJ, endpoint: { [cx]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }, { endpoint: { [cx]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [cy]: bt, [cE]: am }, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }, { [cs]: [at], [cr]: [{ [cs]: bI, [cr]: [{ [cs]: co, [cr]: [{ [cs]: [X, Y, ar, aA], endpoint: { [cx]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, Y, ar, aC, aD], [cr]: [{ endpoint: bu, [cq]: n }], [cq]: o }, { [cs]: [X, Y, ar, aC, aG], endpoint: bu, [cq]: n }, { [cs]: [X, aH, ar, aA], endpoint: { [cx]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [X, aH, ar, aC, aD], [cr]: [{ endpoint: bv, [cq]: n }], [cq]: o }, { [cs]: [X, aH, ar, aC, aG], endpoint: bv, [cq]: n }, { [cs]: [aJ, Y, ar, aA], endpoint: { [cx]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, Y, ar, aC, aD], [cr]: [{ endpoint: bw, [cq]: n }], [cq]: o }, { [cs]: [aJ, Y, ar, aC, aG], endpoint: bw, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aA], endpoint: { [cx]: t, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, Z, ah, aC, aD], [cr]: [{ [cs]: cc, endpoint: bx, [cq]: n }, { endpoint: bx, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, Z, ah, aC, aG], endpoint: bx, [cq]: n }, { [cs]: [aJ, aH, ar, aA], endpoint: { [cx]: S, [cy]: aB, [cE]: am }, [cq]: n }, { [cs]: [aJ, aH, ar, aC, aD], [cr]: [{ [cs]: cc, endpoint: { [cx]: S, [cy]: aF, [cE]: am }, [cq]: n }, { endpoint: by, [cq]: n }], [cq]: o }, { [cs]: [aJ, aH, ar, aC, aG], endpoint: by, [cq]: n }], [cq]: o }, aS], [cq]: o }], [cq]: o }], [cq]: o }, { error: "A region must be set when sending requests to S3.", [cq]: f }] };
+ exports.ruleSet = _data;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/end
+var require_endpointResolver = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.defaultEndpointResolver = undefined;
+ var util_endpoints_1 = require_dist_cjs38();
+ var util_endpoints_2 = require_dist_cjs35();
+ var ruleset_1 = require_ruleset();
+ var cache = new util_endpoints_2.EndpointCache({
+ size: 50,
+ params: [
+ "Accelerate",
+ "Bucket",
+ "DisableAccessPoints",
+ "DisableMultiRegionAccessPoints",
+ "DisableS3ExpressSessionAuth",
+ "Endpoint",
+ "ForcePathStyle",
+ "Region",
+ "UseArnRegion",
+ "UseDualStack",
+ "UseFIPS",
+ "UseGlobalEndpoint",
+ "UseObjectLambdaEndpoint",
+ "UseS3ExpressControlEndpoint"
+ ]
+ });
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
+ endpointParams,
+ logger: context.logger
+ }));
+ };
+ exports.defaultEndpointResolver = defaultEndpointResolver;
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsno
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpo
var require_httpAuthSchemeProvider = __commonJS((exports) => {
var createAwsAuthSigv4HttpAuthOption = function(authParameters) {
return {
schemeId: "aws.auth#sigv4",
signingProperties: {
- name: "sts",
+ name: "s3",
region: authParameters.region
},
propertiesExtractor: (config, context) => ({
@@ -15753,17 +20424,41 @@ var require_httpAuthSchemeProvider = __commonJS((exports) => {
})
};
};
- var createSmithyApiNoAuthHttpAuthOption = function(authParameters) {
+ var createAwsAuthSigv4aHttpAuthOption = function(authParameters) {
return {
- schemeId: "smithy.api#noAuth"
+ schemeId: "aws.auth#sigv4a",
+ signingProperties: {
+ name: "s3",
+ region: authParameters.region
+ },
+ propertiesExtractor: (config, context) => ({
+ signingProperties: {
+ config,
+ context
+ }
+ })
};
};
Object.defineProperty(exports, "__esModule", { value: true });
- exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = undefined;
- var core_1 = require_dist_cjs44();
- var util_middleware_1 = require_dist_cjs20();
- var STSClient_1 = require_STSClient();
- var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
+ exports.resolveHttpAuthSchemeConfig = exports.defaultS3HttpAuthSchemeProvider = exports.defaultS3HttpAuthSchemeParametersProvider = undefined;
+ var core_1 = require_dist_cjs24();
+ var signature_v4_multi_region_1 = require_dist_cjs46();
+ var middleware_endpoint_1 = require_dist_cjs49();
+ var util_middleware_1 = require_dist_cjs4();
+ var endpointResolver_1 = require_endpointResolver();
+ var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
+ if (!input) {
+ throw new Error(`Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\``);
+ }
+ const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
+ const instructionsFn = (0, util_middleware_1.getSmithyContext)(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
+ if (!instructionsFn) {
+ throw new Error(`getEndpointParameterInstructions() is not defined on \`${context.commandName}\``);
+ }
+ const endpointParameters = await (0, middleware_endpoint_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
+ return Object.assign(defaultParameters, endpointParameters);
+ };
+ var _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {
return {
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
@@ -15771,139 +20466,172 @@ var require_httpAuthSchemeProvider = __commonJS((exports) => {
})()
};
};
- exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
- var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
+ exports.defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);
+ var createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
+ const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
+ const endpoint = defaultEndpointResolver(authParameters);
+ const authSchemes = endpoint.properties?.authSchemes;
+ if (!authSchemes) {
+ return defaultHttpAuthSchemeResolver(authParameters);
+ }
+ const options = [];
+ for (const scheme of authSchemes) {
+ const { name: resolvedName, properties = {}, ...rest } = scheme;
+ const name = resolvedName.toLowerCase();
+ if (resolvedName !== name) {
+ console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${resolvedName}\` to \`${name}\``);
+ }
+ let schemeId;
+ if (name === "sigv4a") {
+ schemeId = "aws.auth#sigv4a";
+ const sigv4Present = authSchemes.find((s) => {
+ const name2 = s.name.toLowerCase();
+ return name2 !== "sigv4a" && name2.startsWith("sigv4");
+ });
+ if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
+ continue;
+ }
+ } else if (name.startsWith("sigv4")) {
+ schemeId = "aws.auth#sigv4";
+ } else {
+ throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${name}\``);
+ }
+ const createOption = createHttpAuthOptionFunctions[schemeId];
+ if (!createOption) {
+ throw new Error(`Could not find HttpAuthOption create function for \`${schemeId}\``);
+ }
+ const option = createOption(authParameters);
+ option.schemeId = schemeId;
+ option.signingProperties = { ...option.signingProperties || {}, ...rest, ...properties };
+ options.push(option);
+ }
+ return options;
+ };
+ return endpointRuleSetHttpAuthSchemeProvider;
+ };
+ var _defaultS3HttpAuthSchemeProvider = (authParameters) => {
const options = [];
switch (authParameters.operation) {
- case "AssumeRoleWithSAML": {
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
- break;
- }
- case "AssumeRoleWithWebIdentity": {
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
- break;
- }
default: {
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
}
}
return options;
};
- exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
- var resolveStsAuthConfig = (input) => ({
- ...input,
- stsClientCtor: STSClient_1.STSClient
+ exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
+ "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
+ "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption
});
- exports.resolveStsAuthConfig = resolveStsAuthConfig;
var resolveHttpAuthSchemeConfig = (config) => {
- const config_0 = (0, exports.resolveStsAuthConfig)(config);
- const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);
- return {
- ...config_1
- };
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
+ const config_1 = (0, core_1.resolveAwsSdkSigV4AConfig)(config_0);
+ return Object.assign(config_1, {
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
+ });
};
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsno
-var require_EndpointParameters = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.commonParams = exports.resolveClientEndpointParameters = undefined;
- var resolveClientEndpointParameters = (options) => {
- return {
- ...options,
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
- useFipsEndpoint: options.useFipsEndpoint ?? false,
- useGlobalEndpoint: options.useGlobalEndpoint ?? false,
- defaultSigningName: "sts"
- };
- };
- exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
- exports.commonParams = {
- UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
- Endpoint: { type: "builtInParams", name: "endpoint" },
- Region: { type: "builtInParams", name: "region" },
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
- };
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
-var require_package3 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cj
+var require_package2 = __commonJS((exports, module) => {
module.exports = {
- name: "@aws-sdk/client-sts",
- description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
- version: "3.499.0",
+ name: "@aws-sdk/client-s3",
+ description: "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
+ version: "3.901.0",
scripts: {
build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
- "build:cjs": "node ../../scripts/compilation/inline client-sts",
+ "build:cjs": "node ../../scripts/compilation/inline client-s3",
"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
- "generate:client": "node ../../scripts/generate-clients/single-service --solo sts",
- test: "yarn test:unit",
- "test:unit": "jest"
+ "generate:client": "node ../../scripts/generate-clients/single-service --solo s3",
+ test: "yarn g:vitest run",
+ "test:browser": "node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts",
+ "test:browser:watch": "node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts",
+ "test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser",
+ "test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts",
+ "test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
+ "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts",
+ "test:watch": "yarn g:vitest watch"
},
main: "./dist-cjs/index.js",
types: "./dist-types/index.d.ts",
module: "./dist-es/index.js",
sideEffects: false,
dependencies: {
- "@aws-crypto/sha256-browser": "3.0.0",
- "@aws-crypto/sha256-js": "3.0.0",
- "@aws-sdk/core": "3.496.0",
- "@aws-sdk/credential-provider-node": "3.499.0",
- "@aws-sdk/middleware-host-header": "3.496.0",
- "@aws-sdk/middleware-logger": "3.496.0",
- "@aws-sdk/middleware-recursion-detection": "3.496.0",
- "@aws-sdk/middleware-user-agent": "3.496.0",
- "@aws-sdk/region-config-resolver": "3.496.0",
- "@aws-sdk/types": "3.496.0",
- "@aws-sdk/util-endpoints": "3.496.0",
- "@aws-sdk/util-user-agent-browser": "3.496.0",
- "@aws-sdk/util-user-agent-node": "3.496.0",
- "@smithy/config-resolver": "^2.1.1",
- "@smithy/core": "^1.3.1",
- "@smithy/fetch-http-handler": "^2.4.1",
- "@smithy/hash-node": "^2.1.1",
- "@smithy/invalid-dependency": "^2.1.1",
- "@smithy/middleware-content-length": "^2.1.1",
- "@smithy/middleware-endpoint": "^2.4.1",
- "@smithy/middleware-retry": "^2.1.1",
- "@smithy/middleware-serde": "^2.1.1",
- "@smithy/middleware-stack": "^2.1.1",
- "@smithy/node-config-provider": "^2.2.1",
- "@smithy/node-http-handler": "^2.3.1",
- "@smithy/protocol-http": "^3.1.1",
- "@smithy/smithy-client": "^2.3.1",
- "@smithy/types": "^2.9.1",
- "@smithy/url-parser": "^2.1.1",
- "@smithy/util-base64": "^2.1.1",
- "@smithy/util-body-length-browser": "^2.1.1",
- "@smithy/util-body-length-node": "^2.2.1",
- "@smithy/util-defaults-mode-browser": "^2.1.1",
- "@smithy/util-defaults-mode-node": "^2.1.1",
- "@smithy/util-endpoints": "^1.1.1",
- "@smithy/util-middleware": "^2.1.1",
- "@smithy/util-retry": "^2.1.1",
- "@smithy/util-utf8": "^2.1.1",
- "fast-xml-parser": "4.2.5",
- tslib: "^2.5.0"
+ "@aws-crypto/sha1-browser": "5.2.0",
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.901.0",
+ "@aws-sdk/credential-provider-node": "3.901.0",
+ "@aws-sdk/middleware-bucket-endpoint": "3.901.0",
+ "@aws-sdk/middleware-expect-continue": "3.901.0",
+ "@aws-sdk/middleware-flexible-checksums": "3.901.0",
+ "@aws-sdk/middleware-host-header": "3.901.0",
+ "@aws-sdk/middleware-location-constraint": "3.901.0",
+ "@aws-sdk/middleware-logger": "3.901.0",
+ "@aws-sdk/middleware-recursion-detection": "3.901.0",
+ "@aws-sdk/middleware-sdk-s3": "3.901.0",
+ "@aws-sdk/middleware-ssec": "3.901.0",
+ "@aws-sdk/middleware-user-agent": "3.901.0",
+ "@aws-sdk/region-config-resolver": "3.901.0",
+ "@aws-sdk/signature-v4-multi-region": "3.901.0",
+ "@aws-sdk/types": "3.901.0",
+ "@aws-sdk/util-endpoints": "3.901.0",
+ "@aws-sdk/util-user-agent-browser": "3.901.0",
+ "@aws-sdk/util-user-agent-node": "3.901.0",
+ "@aws-sdk/xml-builder": "3.901.0",
+ "@smithy/config-resolver": "^4.3.0",
+ "@smithy/core": "^3.14.0",
+ "@smithy/eventstream-serde-browser": "^4.2.0",
+ "@smithy/eventstream-serde-config-resolver": "^4.3.0",
+ "@smithy/eventstream-serde-node": "^4.2.0",
+ "@smithy/fetch-http-handler": "^5.3.0",
+ "@smithy/hash-blob-browser": "^4.2.0",
+ "@smithy/hash-node": "^4.2.0",
+ "@smithy/hash-stream-node": "^4.2.0",
+ "@smithy/invalid-dependency": "^4.2.0",
+ "@smithy/md5-js": "^4.2.0",
+ "@smithy/middleware-content-length": "^4.2.0",
+ "@smithy/middleware-endpoint": "^4.3.0",
+ "@smithy/middleware-retry": "^4.4.0",
+ "@smithy/middleware-serde": "^4.2.0",
+ "@smithy/middleware-stack": "^4.2.0",
+ "@smithy/node-config-provider": "^4.3.0",
+ "@smithy/node-http-handler": "^4.3.0",
+ "@smithy/protocol-http": "^5.3.0",
+ "@smithy/smithy-client": "^4.7.0",
+ "@smithy/types": "^4.6.0",
+ "@smithy/url-parser": "^4.2.0",
+ "@smithy/util-base64": "^4.2.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.0",
+ "@smithy/util-defaults-mode-browser": "^4.2.0",
+ "@smithy/util-defaults-mode-node": "^4.2.0",
+ "@smithy/util-endpoints": "^3.2.0",
+ "@smithy/util-middleware": "^4.2.0",
+ "@smithy/util-retry": "^4.2.0",
+ "@smithy/util-stream": "^4.4.0",
+ "@smithy/util-utf8": "^4.2.0",
+ "@smithy/util-waiter": "^4.2.0",
+ "@smithy/uuid": "^1.1.0",
+ tslib: "^2.6.2"
},
devDependencies: {
- "@smithy/service-client-documentation-generator": "^2.1.1",
- "@tsconfig/node14": "1.0.3",
- "@types/node": "^14.14.31",
+ "@aws-sdk/signature-v4-crt": "3.901.0",
+ "@tsconfig/node18": "18.2.4",
+ "@types/node": "^18.19.69",
concurrently: "7.0.0",
"downlevel-dts": "0.10.1",
rimraf: "3.0.2",
- typescript: "~4.9.5"
+ typescript: "~5.8.3"
},
engines: {
- node: ">=14.0.0"
+ node: ">=18.0.0"
},
typesVersions: {
"<4.0": {
@@ -15926,1446 +20654,1228 @@ var require_package3 = __commonJS((exports, module) => {
"react-native": {
"./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
},
- homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",
repository: {
type: "git",
url: "https://github.com/aws/aws-sdk-js-v3.git",
- directory: "clients/client-sts"
- }
- };
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsn
-var require_STSServiceException = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.STSServiceException = exports.__ServiceException = undefined;
- var smithy_client_1 = require_dist_cjs16();
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function() {
- return smithy_client_1.ServiceException;
- } });
-
- class STSServiceException2 extends smithy_client_1.ServiceException {
- constructor(options) {
- super(options);
- Object.setPrototypeOf(this, STSServiceException2.prototype);
- }
- }
- exports.STSServiceException = STSServiceException2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_models_0 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = undefined;
- var smithy_client_1 = require_dist_cjs16();
- var STSServiceException_1 = require_STSServiceException();
-
- class ExpiredTokenException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "ExpiredTokenException",
- $fault: "client",
- ...opts
- });
- this.name = "ExpiredTokenException";
- this.$fault = "client";
- Object.setPrototypeOf(this, ExpiredTokenException2.prototype);
- }
- }
- exports.ExpiredTokenException = ExpiredTokenException2;
-
- class MalformedPolicyDocumentException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "MalformedPolicyDocumentException",
- $fault: "client",
- ...opts
- });
- this.name = "MalformedPolicyDocumentException";
- this.$fault = "client";
- Object.setPrototypeOf(this, MalformedPolicyDocumentException2.prototype);
- }
- }
- exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException2;
-
- class PackedPolicyTooLargeException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "PackedPolicyTooLargeException",
- $fault: "client",
- ...opts
- });
- this.name = "PackedPolicyTooLargeException";
- this.$fault = "client";
- Object.setPrototypeOf(this, PackedPolicyTooLargeException2.prototype);
- }
- }
- exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException2;
-
- class RegionDisabledException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "RegionDisabledException",
- $fault: "client",
- ...opts
- });
- this.name = "RegionDisabledException";
- this.$fault = "client";
- Object.setPrototypeOf(this, RegionDisabledException2.prototype);
- }
- }
- exports.RegionDisabledException = RegionDisabledException2;
-
- class IDPRejectedClaimException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "IDPRejectedClaimException",
- $fault: "client",
- ...opts
- });
- this.name = "IDPRejectedClaimException";
- this.$fault = "client";
- Object.setPrototypeOf(this, IDPRejectedClaimException2.prototype);
- }
- }
- exports.IDPRejectedClaimException = IDPRejectedClaimException2;
-
- class InvalidIdentityTokenException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "InvalidIdentityTokenException",
- $fault: "client",
- ...opts
- });
- this.name = "InvalidIdentityTokenException";
- this.$fault = "client";
- Object.setPrototypeOf(this, InvalidIdentityTokenException2.prototype);
- }
- }
- exports.InvalidIdentityTokenException = InvalidIdentityTokenException2;
-
- class IDPCommunicationErrorException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "IDPCommunicationErrorException",
- $fault: "client",
- ...opts
- });
- this.name = "IDPCommunicationErrorException";
- this.$fault = "client";
- Object.setPrototypeOf(this, IDPCommunicationErrorException2.prototype);
- }
- }
- exports.IDPCommunicationErrorException = IDPCommunicationErrorException2;
-
- class InvalidAuthorizationMessageException2 extends STSServiceException_1.STSServiceException {
- constructor(opts) {
- super({
- name: "InvalidAuthorizationMessageException",
- $fault: "client",
- ...opts
- });
- this.name = "InvalidAuthorizationMessageException";
- this.$fault = "client";
- Object.setPrototypeOf(this, InvalidAuthorizationMessageException2.prototype);
- }
- }
- exports.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException2;
- var CredentialsFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.SecretAccessKey && { SecretAccessKey: smithy_client_1.SENSITIVE_STRING }
- });
- exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog2;
- var AssumeRoleResponseFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }
- });
- exports.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog2;
- var AssumeRoleWithSAMLRequestFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.SAMLAssertion && { SAMLAssertion: smithy_client_1.SENSITIVE_STRING }
- });
- exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = AssumeRoleWithSAMLRequestFilterSensitiveLog2;
- var AssumeRoleWithSAMLResponseFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }
- });
- exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = AssumeRoleWithSAMLResponseFilterSensitiveLog2;
- var AssumeRoleWithWebIdentityRequestFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.WebIdentityToken && { WebIdentityToken: smithy_client_1.SENSITIVE_STRING }
- });
- exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog2;
- var AssumeRoleWithWebIdentityResponseFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }
- });
- exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog2;
- var GetFederationTokenResponseFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }
- });
- exports.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog2;
- var GetSessionTokenResponseFilterSensitiveLog2 = (obj) => ({
- ...obj,
- ...obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }
- });
- exports.GetSessionTokenResponseFilterSensitiveLog = GetSessionTokenResponseFilterSensitiveLog2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssol
-var require_Aws_query = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.de_GetSessionTokenCommand = exports.de_GetFederationTokenCommand = exports.de_GetCallerIdentityCommand = exports.de_GetAccessKeyInfoCommand = exports.de_DecodeAuthorizationMessageCommand = exports.de_AssumeRoleWithWebIdentityCommand = exports.de_AssumeRoleWithSAMLCommand = exports.de_AssumeRoleCommand = exports.se_GetSessionTokenCommand = exports.se_GetFederationTokenCommand = exports.se_GetCallerIdentityCommand = exports.se_GetAccessKeyInfoCommand = exports.se_DecodeAuthorizationMessageCommand = exports.se_AssumeRoleWithWebIdentityCommand = exports.se_AssumeRoleWithSAMLCommand = exports.se_AssumeRoleCommand = undefined;
- var protocol_http_1 = require_dist_cjs2();
- var smithy_client_1 = require_dist_cjs16();
- var fast_xml_parser_1 = require_fxp();
- var models_0_1 = require_models_0();
- var STSServiceException_1 = require_STSServiceException();
- var se_AssumeRoleCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_AssumeRoleRequest(input, context),
- [_A]: _AR,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_AssumeRoleCommand = se_AssumeRoleCommand;
- var se_AssumeRoleWithSAMLCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_AssumeRoleWithSAMLRequest(input, context),
- [_A]: _ARWSAML,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_AssumeRoleWithSAMLCommand = se_AssumeRoleWithSAMLCommand;
- var se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_AssumeRoleWithWebIdentityRequest(input, context),
- [_A]: _ARWWI,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_AssumeRoleWithWebIdentityCommand = se_AssumeRoleWithWebIdentityCommand;
- var se_DecodeAuthorizationMessageCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_DecodeAuthorizationMessageRequest(input, context),
- [_A]: _DAM,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_DecodeAuthorizationMessageCommand = se_DecodeAuthorizationMessageCommand;
- var se_GetAccessKeyInfoCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_GetAccessKeyInfoRequest(input, context),
- [_A]: _GAKI,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_GetAccessKeyInfoCommand = se_GetAccessKeyInfoCommand;
- var se_GetCallerIdentityCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_GetCallerIdentityRequest(input, context),
- [_A]: _GCI,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_GetCallerIdentityCommand = se_GetCallerIdentityCommand;
- var se_GetFederationTokenCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_GetFederationTokenRequest(input, context),
- [_A]: _GFT,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_GetFederationTokenCommand = se_GetFederationTokenCommand;
- var se_GetSessionTokenCommand = async (input, context) => {
- const headers = SHARED_HEADERS;
- let body;
- body = buildFormUrlencodedString({
- ...se_GetSessionTokenRequest(input, context),
- [_A]: _GST,
- [_V]: _
- });
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
- };
- exports.se_GetSessionTokenCommand = se_GetSessionTokenCommand;
- var de_AssumeRoleCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_AssumeRoleCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_AssumeRoleCommand = de_AssumeRoleCommand;
- var de_AssumeRoleCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "ExpiredTokenException":
- case "com.amazonaws.sts#ExpiredTokenException":
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
- case "MalformedPolicyDocument":
- case "com.amazonaws.sts#MalformedPolicyDocumentException":
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
- case "PackedPolicyTooLarge":
- case "com.amazonaws.sts#PackedPolicyTooLargeException":
- throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
- case "RegionDisabledException":
- case "com.amazonaws.sts#RegionDisabledException":
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_AssumeRoleWithSAMLCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_AssumeRoleWithSAMLCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_AssumeRoleWithSAMLCommand = de_AssumeRoleWithSAMLCommand;
- var de_AssumeRoleWithSAMLCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "ExpiredTokenException":
- case "com.amazonaws.sts#ExpiredTokenException":
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
- case "IDPRejectedClaim":
- case "com.amazonaws.sts#IDPRejectedClaimException":
- throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
- case "InvalidIdentityToken":
- case "com.amazonaws.sts#InvalidIdentityTokenException":
- throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
- case "MalformedPolicyDocument":
- case "com.amazonaws.sts#MalformedPolicyDocumentException":
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
- case "PackedPolicyTooLarge":
- case "com.amazonaws.sts#PackedPolicyTooLargeException":
- throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
- case "RegionDisabledException":
- case "com.amazonaws.sts#RegionDisabledException":
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_AssumeRoleWithWebIdentityCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_AssumeRoleWithWebIdentityCommand = de_AssumeRoleWithWebIdentityCommand;
- var de_AssumeRoleWithWebIdentityCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "ExpiredTokenException":
- case "com.amazonaws.sts#ExpiredTokenException":
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
- case "IDPCommunicationError":
- case "com.amazonaws.sts#IDPCommunicationErrorException":
- throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
- case "IDPRejectedClaim":
- case "com.amazonaws.sts#IDPRejectedClaimException":
- throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
- case "InvalidIdentityToken":
- case "com.amazonaws.sts#InvalidIdentityTokenException":
- throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
- case "MalformedPolicyDocument":
- case "com.amazonaws.sts#MalformedPolicyDocumentException":
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
- case "PackedPolicyTooLarge":
- case "com.amazonaws.sts#PackedPolicyTooLargeException":
- throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
- case "RegionDisabledException":
- case "com.amazonaws.sts#RegionDisabledException":
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_DecodeAuthorizationMessageCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_DecodeAuthorizationMessageCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_DecodeAuthorizationMessageCommand = de_DecodeAuthorizationMessageCommand;
- var de_DecodeAuthorizationMessageCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InvalidAuthorizationMessageException":
- case "com.amazonaws.sts#InvalidAuthorizationMessageException":
- throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_GetAccessKeyInfoCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_GetAccessKeyInfoCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_GetAccessKeyInfoCommand = de_GetAccessKeyInfoCommand;
- var de_GetAccessKeyInfoCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- };
- var de_GetCallerIdentityCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_GetCallerIdentityCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_GetCallerIdentityCommand = de_GetCallerIdentityCommand;
- var de_GetCallerIdentityCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- };
- var de_GetFederationTokenCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_GetFederationTokenCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_GetFederationTokenCommand = de_GetFederationTokenCommand;
- var de_GetFederationTokenCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "MalformedPolicyDocument":
- case "com.amazonaws.sts#MalformedPolicyDocumentException":
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
- case "PackedPolicyTooLarge":
- case "com.amazonaws.sts#PackedPolicyTooLargeException":
- throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
- case "RegionDisabledException":
- case "com.amazonaws.sts#RegionDisabledException":
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_GetSessionTokenCommand = async (output, context) => {
- if (output.statusCode >= 300) {
- return de_GetSessionTokenCommandError(output, context);
- }
- const data = await parseBody(output.body, context);
- let contents = {};
- contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);
- const response = {
- $metadata: deserializeMetadata(output),
- ...contents
- };
- return response;
- };
- exports.de_GetSessionTokenCommand = de_GetSessionTokenCommand;
- var de_GetSessionTokenCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadQueryErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "RegionDisabledException":
- case "com.amazonaws.sts#RegionDisabledException":
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody: parsedBody.Error,
- errorCode
- });
- }
- };
- var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_ExpiredTokenException(body.Error, context);
- const exception = new models_0_1.ExpiredTokenException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_IDPCommunicationErrorException(body.Error, context);
- const exception = new models_0_1.IDPCommunicationErrorException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_IDPRejectedClaimException(body.Error, context);
- const exception = new models_0_1.IDPRejectedClaimException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_InvalidAuthorizationMessageExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_InvalidAuthorizationMessageException(body.Error, context);
- const exception = new models_0_1.InvalidAuthorizationMessageException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_InvalidIdentityTokenException(body.Error, context);
- const exception = new models_0_1.InvalidIdentityTokenException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
- const exception = new models_0_1.MalformedPolicyDocumentException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
- const exception = new models_0_1.PackedPolicyTooLargeException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
- const body = parsedOutput.body;
- const deserialized = de_RegionDisabledException(body.Error, context);
- const exception = new models_0_1.RegionDisabledException({
- $metadata: deserializeMetadata(parsedOutput),
- ...deserialized
- });
- return (0, smithy_client_1.decorateServiceException)(exception, body);
- };
- var se_AssumeRoleRequest = (input, context) => {
- const entries = {};
- if (input[_RA] != null) {
- entries[_RA] = input[_RA];
- }
- if (input[_RSN] != null) {
- entries[_RSN] = input[_RSN];
- }
- if (input[_PA] != null) {
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
- if (input[_PA]?.length === 0) {
- entries.PolicyArns = [];
- }
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `PolicyArns.${key}`;
- entries[loc] = value;
- });
- }
- if (input[_P] != null) {
- entries[_P] = input[_P];
- }
- if (input[_DS] != null) {
- entries[_DS] = input[_DS];
- }
- if (input[_T] != null) {
- const memberEntries = se_tagListType(input[_T], context);
- if (input[_T]?.length === 0) {
- entries.Tags = [];
- }
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `Tags.${key}`;
- entries[loc] = value;
- });
- }
- if (input[_TTK] != null) {
- const memberEntries = se_tagKeyListType(input[_TTK], context);
- if (input[_TTK]?.length === 0) {
- entries.TransitiveTagKeys = [];
- }
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `TransitiveTagKeys.${key}`;
- entries[loc] = value;
- });
- }
- if (input[_EI] != null) {
- entries[_EI] = input[_EI];
- }
- if (input[_SN] != null) {
- entries[_SN] = input[_SN];
- }
- if (input[_TC] != null) {
- entries[_TC] = input[_TC];
- }
- if (input[_SI] != null) {
- entries[_SI] = input[_SI];
- }
- if (input[_PC] != null) {
- const memberEntries = se_ProvidedContextsListType(input[_PC], context);
- if (input[_PC]?.length === 0) {
- entries.ProvidedContexts = [];
- }
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `ProvidedContexts.${key}`;
- entries[loc] = value;
- });
+ directory: "clients/client-s3"
}
- return entries;
};
- var se_AssumeRoleWithSAMLRequest = (input, context) => {
- const entries = {};
- if (input[_RA] != null) {
- entries[_RA] = input[_RA];
- }
- if (input[_PAr] != null) {
- entries[_PAr] = input[_PAr];
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_dist_cjs50 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- if (input[_SAMLA] != null) {
- entries[_SAMLA] = input[_SAMLA];
+ return to;
+ };
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,
+ ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
+ ENV_EXPIRATION: () => ENV_EXPIRATION,
+ ENV_KEY: () => ENV_KEY,
+ ENV_SECRET: () => ENV_SECRET,
+ ENV_SESSION: () => ENV_SESSION,
+ fromEnv: () => fromEnv
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_client = require_client();
+ var import_property_provider = require_dist_cjs18();
+ var ENV_KEY = "AWS_ACCESS_KEY_ID";
+ var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
+ var ENV_SESSION = "AWS_SESSION_TOKEN";
+ var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
+ var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
+ var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID";
+ var fromEnv = __name((init) => async () => {
+ init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
+ const accessKeyId = process.env[ENV_KEY];
+ const secretAccessKey = process.env[ENV_SECRET];
+ const sessionToken = process.env[ENV_SESSION];
+ const expiry = process.env[ENV_EXPIRATION];
+ const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
+ const accountId = process.env[ENV_ACCOUNT_ID];
+ if (accessKeyId && secretAccessKey) {
+ const credentials = {
+ accessKeyId,
+ secretAccessKey,
+ ...sessionToken && { sessionToken },
+ ...expiry && { expiration: new Date(expiry) },
+ ...credentialScope && { credentialScope },
+ ...accountId && { accountId }
+ };
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g");
+ return credentials;
}
- if (input[_PA] != null) {
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
- if (input[_PA]?.length === 0) {
- entries.PolicyArns = [];
- }
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `PolicyArns.${key}`;
- entries[loc] = value;
+ throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
+ }, "fromEnv");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_dist_cjs51 = __commonJS((exports) => {
+ var httpRequest = function(options) {
+ return new Promise((resolve, reject) => {
+ const req = http.request({
+ method: "GET",
+ ...options,
+ hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
});
- }
- if (input[_P] != null) {
- entries[_P] = input[_P];
- }
- if (input[_DS] != null) {
- entries[_DS] = input[_DS];
- }
- return entries;
+ req.on("error", (err) => {
+ reject(Object.assign(new propertyProvider.ProviderError("Unable to connect to instance metadata service"), err));
+ req.destroy();
+ });
+ req.on("timeout", () => {
+ reject(new propertyProvider.ProviderError("TimeoutError from instance metadata service"));
+ req.destroy();
+ });
+ req.on("response", (res) => {
+ const { statusCode = 400 } = res;
+ if (statusCode < 200 || 300 <= statusCode) {
+ reject(Object.assign(new propertyProvider.ProviderError("Error response received from instance metadata service"), { statusCode }));
+ req.destroy();
+ }
+ const chunks = [];
+ res.on("data", (chunk) => {
+ chunks.push(chunk);
+ });
+ res.on("end", () => {
+ resolve(buffer.Buffer.concat(chunks));
+ req.destroy();
+ });
+ });
+ req.end();
+ });
};
- var se_AssumeRoleWithWebIdentityRequest = (input, context) => {
- const entries = {};
- if (input[_RA] != null) {
- entries[_RA] = input[_RA];
- }
- if (input[_RSN] != null) {
- entries[_RSN] = input[_RSN];
- }
- if (input[_WIT] != null) {
- entries[_WIT] = input[_WIT];
- }
- if (input[_PI] != null) {
- entries[_PI] = input[_PI];
+ var propertyProvider = require_dist_cjs18();
+ var url = __require("url");
+ var buffer = __require("buffer");
+ var http = __require("http");
+ var nodeConfigProvider = require_dist_cjs48();
+ var urlParser = require_dist_cjs37();
+ var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string";
+ var fromImdsCredentials = (creds) => ({
+ accessKeyId: creds.AccessKeyId,
+ secretAccessKey: creds.SecretAccessKey,
+ sessionToken: creds.Token,
+ expiration: new Date(creds.Expiration),
+ ...creds.AccountId && { accountId: creds.AccountId }
+ });
+ var DEFAULT_TIMEOUT = 1000;
+ var DEFAULT_MAX_RETRIES = 0;
+ var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
+ var retry = (toRetry, maxRetries) => {
+ let promise = toRetry();
+ for (let i = 0;i < maxRetries; i++) {
+ promise = promise.catch(toRetry);
}
- if (input[_PA] != null) {
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
- if (input[_PA]?.length === 0) {
- entries.PolicyArns = [];
+ return promise;
+ };
+ var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
+ var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
+ var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
+ var fromContainerMetadata = (init = {}) => {
+ const { timeout, maxRetries } = providerConfigFromInit(init);
+ return () => retry(async () => {
+ const requestOptions = await getCmdsUri({ logger: init.logger });
+ const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
+ if (!isImdsCredentials(credsResponse)) {
+ throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", {
+ logger: init.logger
+ });
}
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `PolicyArns.${key}`;
- entries[loc] = value;
- });
- }
- if (input[_P] != null) {
- entries[_P] = input[_P];
- }
- if (input[_DS] != null) {
- entries[_DS] = input[_DS];
- }
- return entries;
+ return fromImdsCredentials(credsResponse);
+ }, maxRetries);
};
- var se_DecodeAuthorizationMessageRequest = (input, context) => {
- const entries = {};
- if (input[_EM] != null) {
- entries[_EM] = input[_EM];
+ var requestFromEcsImds = async (timeout, options) => {
+ if (process.env[ENV_CMDS_AUTH_TOKEN]) {
+ options.headers = {
+ ...options.headers,
+ Authorization: process.env[ENV_CMDS_AUTH_TOKEN]
+ };
}
- return entries;
+ const buffer2 = await httpRequest({
+ ...options,
+ timeout
+ });
+ return buffer2.toString();
};
- var se_GetAccessKeyInfoRequest = (input, context) => {
- const entries = {};
- if (input[_AKI] != null) {
- entries[_AKI] = input[_AKI];
- }
- return entries;
+ var CMDS_IP = "169.254.170.2";
+ var GREENGRASS_HOSTS = {
+ localhost: true,
+ "127.0.0.1": true
};
- var se_GetCallerIdentityRequest = (input, context) => {
- const entries = {};
- return entries;
+ var GREENGRASS_PROTOCOLS = {
+ "http:": true,
+ "https:": true
};
- var se_GetFederationTokenRequest = (input, context) => {
- const entries = {};
- if (input[_N] != null) {
- entries[_N] = input[_N];
- }
- if (input[_P] != null) {
- entries[_P] = input[_P];
+ var getCmdsUri = async ({ logger: logger4 }) => {
+ if (process.env[ENV_CMDS_RELATIVE_URI]) {
+ return {
+ hostname: CMDS_IP,
+ path: process.env[ENV_CMDS_RELATIVE_URI]
+ };
}
- if (input[_PA] != null) {
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
- if (input[_PA]?.length === 0) {
- entries.PolicyArns = [];
+ if (process.env[ENV_CMDS_FULL_URI]) {
+ const parsed = url.parse(process.env[ENV_CMDS_FULL_URI]);
+ if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
+ throw new propertyProvider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
+ tryNextLink: false,
+ logger: logger4
+ });
}
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `PolicyArns.${key}`;
- entries[loc] = value;
- });
- }
- if (input[_DS] != null) {
- entries[_DS] = input[_DS];
- }
- if (input[_T] != null) {
- const memberEntries = se_tagListType(input[_T], context);
- if (input[_T]?.length === 0) {
- entries.Tags = [];
+ if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
+ throw new propertyProvider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
+ tryNextLink: false,
+ logger: logger4
+ });
}
- Object.entries(memberEntries).forEach(([key, value]) => {
- const loc = `Tags.${key}`;
- entries[loc] = value;
- });
+ return {
+ ...parsed,
+ port: parsed.port ? parseInt(parsed.port, 10) : undefined
+ };
}
- return entries;
+ throw new propertyProvider.CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", {
+ tryNextLink: false,
+ logger: logger4
+ });
};
- var se_GetSessionTokenRequest = (input, context) => {
- const entries = {};
- if (input[_DS] != null) {
- entries[_DS] = input[_DS];
- }
- if (input[_SN] != null) {
- entries[_SN] = input[_SN];
- }
- if (input[_TC] != null) {
- entries[_TC] = input[_TC];
+
+ class InstanceMetadataV1FallbackError extends propertyProvider.CredentialsProviderError {
+ tryNextLink;
+ name = "InstanceMetadataV1FallbackError";
+ constructor(message, tryNextLink = true) {
+ super(message, tryNextLink);
+ this.tryNextLink = tryNextLink;
+ Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);
}
- return entries;
+ }
+ exports.Endpoint = undefined;
+ (function(Endpoint) {
+ Endpoint["IPv4"] = "http://169.254.169.254";
+ Endpoint["IPv6"] = "http://[fd00:ec2::254]";
+ })(exports.Endpoint || (exports.Endpoint = {}));
+ var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
+ var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
+ var ENDPOINT_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],
+ configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
+ default: undefined
};
- var se_policyDescriptorListType = (input, context) => {
- const entries = {};
- let counter = 1;
- for (const entry of input) {
- if (entry === null) {
- continue;
- }
- const memberEntries = se_PolicyDescriptorType(entry, context);
- Object.entries(memberEntries).forEach(([key, value]) => {
- entries[`member.${counter}.${key}`] = value;
- });
- counter++;
- }
- return entries;
+ var EndpointMode;
+ (function(EndpointMode2) {
+ EndpointMode2["IPv4"] = "IPv4";
+ EndpointMode2["IPv6"] = "IPv6";
+ })(EndpointMode || (EndpointMode = {}));
+ var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
+ var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
+ var ENDPOINT_MODE_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],
+ configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
+ default: EndpointMode.IPv4
};
- var se_PolicyDescriptorType = (input, context) => {
- const entries = {};
- if (input[_a] != null) {
- entries[_a] = input[_a];
+ var getInstanceMetadataEndpoint = async () => urlParser.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig());
+ var getFromEndpointConfig = async () => nodeConfigProvider.loadConfig(ENDPOINT_CONFIG_OPTIONS)();
+ var getFromEndpointModeConfig = async () => {
+ const endpointMode = await nodeConfigProvider.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
+ switch (endpointMode) {
+ case EndpointMode.IPv4:
+ return exports.Endpoint.IPv4;
+ case EndpointMode.IPv6:
+ return exports.Endpoint.IPv6;
+ default:
+ throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);
}
- return entries;
};
- var se_ProvidedContext = (input, context) => {
- const entries = {};
- if (input[_PAro] != null) {
- entries[_PAro] = input[_PAro];
- }
- if (input[_CA] != null) {
- entries[_CA] = input[_CA];
- }
- return entries;
+ var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;
+ var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
+ var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html";
+ var getExtendedInstanceMetadataCredentials = (credentials, logger4) => {
+ const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
+ const newExpiration = new Date(Date.now() + refreshInterval * 1000);
+ logger4.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " + `credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` + STATIC_STABILITY_DOC_URL);
+ const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
+ return {
+ ...credentials,
+ ...originalExpiration ? { originalExpiration } : {},
+ expiration: newExpiration
+ };
};
- var se_ProvidedContextsListType = (input, context) => {
- const entries = {};
- let counter = 1;
- for (const entry of input) {
- if (entry === null) {
- continue;
+ var staticStabilityProvider = (provider, options = {}) => {
+ const logger4 = options?.logger || console;
+ let pastCredentials;
+ return async () => {
+ let credentials;
+ try {
+ credentials = await provider();
+ if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {
+ credentials = getExtendedInstanceMetadataCredentials(credentials, logger4);
+ }
+ } catch (e) {
+ if (pastCredentials) {
+ logger4.warn("Credential renew failed: ", e);
+ credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger4);
+ } else {
+ throw e;
+ }
}
- const memberEntries = se_ProvidedContext(entry, context);
- Object.entries(memberEntries).forEach(([key, value]) => {
- entries[`member.${counter}.${key}`] = value;
+ pastCredentials = credentials;
+ return credentials;
+ };
+ };
+ var IMDS_PATH = "/latest/meta-data/iam/security-credentials/";
+ var IMDS_TOKEN_PATH = "/latest/api/token";
+ var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED";
+ var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled";
+ var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
+ var fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger });
+ var getInstanceMetadataProvider = (init = {}) => {
+ let disableFetchToken = false;
+ const { logger: logger4, profile } = init;
+ const { timeout, maxRetries } = providerConfigFromInit(init);
+ const getCredentials = async (maxRetries2, options) => {
+ const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;
+ if (isImdsV1Fallback) {
+ let fallbackBlockedFromProfile = false;
+ let fallbackBlockedFromProcessEnv = false;
+ const configValue = await nodeConfigProvider.loadConfig({
+ environmentVariableSelector: (env) => {
+ const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
+ fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
+ if (envValue === undefined) {
+ throw new propertyProvider.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
+ }
+ return fallbackBlockedFromProcessEnv;
+ },
+ configFileSelector: (profile2) => {
+ const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];
+ fallbackBlockedFromProfile = !!profileValue && profileValue !== "false";
+ return fallbackBlockedFromProfile;
+ },
+ default: false
+ }, {
+ profile
+ })();
+ if (init.ec2MetadataV1Disabled || configValue) {
+ const causes = [];
+ if (init.ec2MetadataV1Disabled)
+ causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");
+ if (fallbackBlockedFromProfile)
+ causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);
+ if (fallbackBlockedFromProcessEnv)
+ causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);
+ throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`);
+ }
+ }
+ const imdsProfile = (await retry(async () => {
+ let profile2;
+ try {
+ profile2 = await getProfile(options);
+ } catch (err) {
+ if (err.statusCode === 401) {
+ disableFetchToken = false;
+ }
+ throw err;
+ }
+ return profile2;
+ }, maxRetries2)).trim();
+ return retry(async () => {
+ let creds;
+ try {
+ creds = await getCredentialsFromProfile(imdsProfile, options, init);
+ } catch (err) {
+ if (err.statusCode === 401) {
+ disableFetchToken = false;
+ }
+ throw err;
+ }
+ return creds;
+ }, maxRetries2);
+ };
+ return async () => {
+ const endpoint = await getInstanceMetadataEndpoint();
+ if (disableFetchToken) {
+ logger4?.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
+ return getCredentials(maxRetries, { ...endpoint, timeout });
+ } else {
+ let token;
+ try {
+ token = (await getMetadataToken({ ...endpoint, timeout })).toString();
+ } catch (error) {
+ if (error?.statusCode === 400) {
+ throw Object.assign(error, {
+ message: "EC2 Metadata token request returned error"
+ });
+ } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) {
+ disableFetchToken = true;
+ }
+ logger4?.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
+ return getCredentials(maxRetries, { ...endpoint, timeout });
+ }
+ return getCredentials(maxRetries, {
+ ...endpoint,
+ headers: {
+ [X_AWS_EC2_METADATA_TOKEN]: token
+ },
+ timeout
+ });
+ }
+ };
+ };
+ var getMetadataToken = async (options) => httpRequest({
+ ...options,
+ path: IMDS_TOKEN_PATH,
+ method: "PUT",
+ headers: {
+ "x-aws-ec2-metadata-token-ttl-seconds": "21600"
+ }
+ });
+ var getProfile = async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString();
+ var getCredentialsFromProfile = async (profile, options, init) => {
+ const credentialsResponse = JSON.parse((await httpRequest({
+ ...options,
+ path: IMDS_PATH + profile
+ })).toString());
+ if (!isImdsCredentials(credentialsResponse)) {
+ throw new propertyProvider.CredentialsProviderError("Invalid response received from instance metadata service.", {
+ logger: init.logger
});
- counter++;
}
- return entries;
- };
- var se_Tag = (input, context) => {
- const entries = {};
- if (input[_K] != null) {
- entries[_K] = input[_K];
+ return fromImdsCredentials(credentialsResponse);
+ };
+ exports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES;
+ exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
+ exports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;
+ exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
+ exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
+ exports.fromContainerMetadata = fromContainerMetadata;
+ exports.fromInstanceMetadata = fromInstanceMetadata;
+ exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
+ exports.httpRequest = httpRequest;
+ exports.providerConfigFromInit = providerConfigFromInit;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/r
+var require_checkUrl = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.checkUrl = undefined;
+ var property_provider_1 = require_dist_cjs18();
+ var ECS_CONTAINER_HOST = "169.254.170.2";
+ var EKS_CONTAINER_HOST_IPv4 = "169.254.170.23";
+ var EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]";
+ var checkUrl = (url, logger4) => {
+ if (url.protocol === "https:") {
+ return;
}
- if (input[_Va] != null) {
- entries[_Va] = input[_Va];
+ if (url.hostname === ECS_CONTAINER_HOST || url.hostname === EKS_CONTAINER_HOST_IPv4 || url.hostname === EKS_CONTAINER_HOST_IPv6) {
+ return;
}
- return entries;
- };
- var se_tagKeyListType = (input, context) => {
- const entries = {};
- let counter = 1;
- for (const entry of input) {
- if (entry === null) {
- continue;
+ if (url.hostname.includes("[")) {
+ if (url.hostname === "[::1]" || url.hostname === "[0000:0000:0000:0000:0000:0000:0000:0001]") {
+ return;
+ }
+ } else {
+ if (url.hostname === "localhost") {
+ return;
+ }
+ const ipComponents = url.hostname.split(".");
+ const inRange = (component) => {
+ const num = parseInt(component, 10);
+ return 0 <= num && num <= 255;
+ };
+ if (ipComponents[0] === "127" && inRange(ipComponents[1]) && inRange(ipComponents[2]) && inRange(ipComponents[3]) && ipComponents.length === 4) {
+ return;
}
- entries[`member.${counter}`] = entry;
- counter++;
}
- return entries;
+ throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
+ - loopback CIDR 127.0.0.0/8 or [::1/128]
+ - ECS container host 169.254.170.2
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger: logger4 });
};
- var se_tagListType = (input, context) => {
- const entries = {};
- let counter = 1;
- for (const entry of input) {
- if (entry === null) {
- continue;
+ exports.checkUrl = checkUrl;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset
+var require_requestHelpers = __commonJS((exports) => {
+ var createGetRequest = function(url) {
+ return new protocol_http_1.HttpRequest({
+ protocol: url.protocol,
+ hostname: url.hostname,
+ port: Number(url.port),
+ path: url.pathname,
+ query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {
+ acc[k] = v;
+ return acc;
+ }, {}),
+ fragment: url.hash
+ });
+ };
+ async function getCredentials(response, logger4) {
+ const stream = (0, util_stream_1.sdkStreamMixin)(response.body);
+ const str = await stream.transformToString();
+ if (response.statusCode === 200) {
+ const parsed = JSON.parse(str);
+ if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
+ throw new property_provider_1.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger: logger4 });
}
- const memberEntries = se_Tag(entry, context);
- Object.entries(memberEntries).forEach(([key, value]) => {
- entries[`member.${counter}.${key}`] = value;
+ return {
+ accessKeyId: parsed.AccessKeyId,
+ secretAccessKey: parsed.SecretAccessKey,
+ sessionToken: parsed.Token,
+ expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration)
+ };
+ }
+ if (response.statusCode >= 400 && response.statusCode < 500) {
+ let parsedBody = {};
+ try {
+ parsedBody = JSON.parse(str);
+ } catch (e) {
+ }
+ throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger4 }), {
+ Code: parsedBody.Code,
+ Message: parsedBody.Message
});
- counter++;
}
- return entries;
+ throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger: logger4 });
+ }
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.createGetRequest = createGetRequest;
+ exports.getCredentials = getCredentials;
+ var property_provider_1 = require_dist_cjs18();
+ var protocol_http_1 = require_dist_cjs2();
+ var smithy_client_1 = require_dist_cjs22();
+ var util_stream_1 = require_dist_cjs15();
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rulese
+var require_retry_wrapper = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.retryWrapper = undefined;
+ var retryWrapper = (toRetry, maxRetries, delayMs) => {
+ return async () => {
+ for (let i = 0;i < maxRetries; ++i) {
+ try {
+ return await toRetry();
+ } catch (e) {
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
+ }
+ }
+ return await toRetry();
+ };
};
- var de_AssumedRoleUser = (output, context) => {
- const contents = {};
- if (output[_ARI] != null) {
- contents[_ARI] = (0, smithy_client_1.expectString)(output[_ARI]);
- }
- if (output[_Ar] != null) {
- contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]);
- }
- return contents;
+ exports.retryWrapper = retryWrapper;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/r
+var require_fromHttp = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fromHttp = undefined;
+ var tslib_1 = require_tslib();
+ var client_1 = require_client();
+ var node_http_handler_1 = require_dist_cjs12();
+ var property_provider_1 = require_dist_cjs18();
+ var promises_1 = tslib_1.__importDefault(__require("fs/promises"));
+ var checkUrl_1 = require_checkUrl();
+ var requestHelpers_1 = require_requestHelpers();
+ var retry_wrapper_1 = require_retry_wrapper();
+ var AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
+ var DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2";
+ var AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
+ var AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
+ var fromHttp = (options = {}) => {
+ options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
+ let host;
+ const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
+ const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
+ const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
+ const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
+ const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
+ if (relative && full) {
+ warn("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
+ warn("awsContainerCredentialsFullUri will take precedence.");
+ }
+ if (token && tokenFile) {
+ warn("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.");
+ warn("awsContainerAuthorizationToken will take precedence.");
+ }
+ if (full) {
+ host = full;
+ } else if (relative) {
+ host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;
+ } else {
+ throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
+Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
+ }
+ const url = new URL(host);
+ (0, checkUrl_1.checkUrl)(url, options.logger);
+ const requestHandler = node_http_handler_1.NodeHttpHandler.create({
+ requestTimeout: options.timeout ?? 1000,
+ connectionTimeout: options.timeout ?? 1000
+ });
+ return (0, retry_wrapper_1.retryWrapper)(async () => {
+ const request = (0, requestHelpers_1.createGetRequest)(url);
+ if (token) {
+ request.headers.Authorization = token;
+ } else if (tokenFile) {
+ request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();
+ }
+ try {
+ const result = await requestHandler.handle(request);
+ return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, "CREDENTIALS_HTTP", "z"));
+ } catch (e) {
+ throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger });
+ }
+ }, options.maxRetries ?? 3, options.timeout ?? 1000);
};
- var de_AssumeRoleResponse = (output, context) => {
- const contents = {};
- if (output[_C] != null) {
- contents[_C] = de_Credentials(output[_C], context);
- }
- if (output[_ARU] != null) {
- contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
- }
- if (output[_PPS] != null) {
- contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]);
- }
- if (output[_SI] != null) {
- contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]);
- }
- return contents;
+ exports.fromHttp = fromHttp;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_dist_cjs52 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fromHttp = undefined;
+ var fromHttp_1 = require_fromHttp();
+ Object.defineProperty(exports, "fromHttp", { enumerable: true, get: function() {
+ return fromHttp_1.fromHttp;
+ } });
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoi
+var require_httpAuthSchemeProvider2 = __commonJS((exports) => {
+ var createAwsAuthSigv4HttpAuthOption = function(authParameters) {
+ return {
+ schemeId: "aws.auth#sigv4",
+ signingProperties: {
+ name: "awsssoportal",
+ region: authParameters.region
+ },
+ propertiesExtractor: (config, context) => ({
+ signingProperties: {
+ config,
+ context
+ }
+ })
+ };
+ };
+ var createSmithyApiNoAuthHttpAuthOption = function(authParameters) {
+ return {
+ schemeId: "smithy.api#noAuth"
+ };
};
- var de_AssumeRoleWithSAMLResponse = (output, context) => {
- const contents = {};
- if (output[_C] != null) {
- contents[_C] = de_Credentials(output[_C], context);
- }
- if (output[_ARU] != null) {
- contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
- }
- if (output[_PPS] != null) {
- contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]);
- }
- if (output[_S] != null) {
- contents[_S] = (0, smithy_client_1.expectString)(output[_S]);
- }
- if (output[_ST] != null) {
- contents[_ST] = (0, smithy_client_1.expectString)(output[_ST]);
- }
- if (output[_I] != null) {
- contents[_I] = (0, smithy_client_1.expectString)(output[_I]);
- }
- if (output[_Au] != null) {
- contents[_Au] = (0, smithy_client_1.expectString)(output[_Au]);
- }
- if (output[_NQ] != null) {
- contents[_NQ] = (0, smithy_client_1.expectString)(output[_NQ]);
- }
- if (output[_SI] != null) {
- contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]);
- }
- return contents;
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = undefined;
+ var core_1 = require_dist_cjs24();
+ var util_middleware_1 = require_dist_cjs4();
+ var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
+ return {
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
+ })()
+ };
};
- var de_AssumeRoleWithWebIdentityResponse = (output, context) => {
- const contents = {};
- if (output[_C] != null) {
- contents[_C] = de_Credentials(output[_C], context);
- }
- if (output[_SFWIT] != null) {
- contents[_SFWIT] = (0, smithy_client_1.expectString)(output[_SFWIT]);
- }
- if (output[_ARU] != null) {
- contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
- }
- if (output[_PPS] != null) {
- contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]);
- }
- if (output[_Pr] != null) {
- contents[_Pr] = (0, smithy_client_1.expectString)(output[_Pr]);
- }
- if (output[_Au] != null) {
- contents[_Au] = (0, smithy_client_1.expectString)(output[_Au]);
- }
- if (output[_SI] != null) {
- contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]);
+ exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;
+ var defaultSSOHttpAuthSchemeProvider = (authParameters) => {
+ const options = [];
+ switch (authParameters.operation) {
+ case "GetRoleCredentials": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
+ }
+ case "ListAccountRoles": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
+ }
+ case "ListAccounts": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
+ }
+ case "Logout": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
+ }
+ default: {
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
+ }
}
- return contents;
+ return options;
};
- var de_Credentials = (output, context) => {
- const contents = {};
- if (output[_AKI] != null) {
- contents[_AKI] = (0, smithy_client_1.expectString)(output[_AKI]);
- }
- if (output[_SAK] != null) {
- contents[_SAK] = (0, smithy_client_1.expectString)(output[_SAK]);
- }
- if (output[_STe] != null) {
- contents[_STe] = (0, smithy_client_1.expectString)(output[_STe]);
- }
- if (output[_E] != null) {
- contents[_E] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_E]));
- }
- return contents;
+ exports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;
+ var resolveHttpAuthSchemeConfig = (config) => {
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
+ return Object.assign(config_0, {
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
+ });
};
- var de_DecodeAuthorizationMessageResponse = (output, context) => {
- const contents = {};
- if (output[_DM] != null) {
- contents[_DM] = (0, smithy_client_1.expectString)(output[_DM]);
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs
+var require_package3 = __commonJS((exports, module) => {
+ module.exports = {
+ name: "@aws-sdk/client-sso",
+ description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
+ version: "3.901.0",
+ scripts: {
+ build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
+ "build:cjs": "node ../../scripts/compilation/inline client-sso",
+ "build:es": "tsc -p tsconfig.es.json",
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
+ "build:types": "tsc -p tsconfig.types.json",
+ "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
+ clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
+ "extract:docs": "api-extractor run --local",
+ "generate:client": "node ../../scripts/generate-clients/single-service --solo sso"
+ },
+ main: "./dist-cjs/index.js",
+ types: "./dist-types/index.d.ts",
+ module: "./dist-es/index.js",
+ sideEffects: false,
+ dependencies: {
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.901.0",
+ "@aws-sdk/middleware-host-header": "3.901.0",
+ "@aws-sdk/middleware-logger": "3.901.0",
+ "@aws-sdk/middleware-recursion-detection": "3.901.0",
+ "@aws-sdk/middleware-user-agent": "3.901.0",
+ "@aws-sdk/region-config-resolver": "3.901.0",
+ "@aws-sdk/types": "3.901.0",
+ "@aws-sdk/util-endpoints": "3.901.0",
+ "@aws-sdk/util-user-agent-browser": "3.901.0",
+ "@aws-sdk/util-user-agent-node": "3.901.0",
+ "@smithy/config-resolver": "^4.3.0",
+ "@smithy/core": "^3.14.0",
+ "@smithy/fetch-http-handler": "^5.3.0",
+ "@smithy/hash-node": "^4.2.0",
+ "@smithy/invalid-dependency": "^4.2.0",
+ "@smithy/middleware-content-length": "^4.2.0",
+ "@smithy/middleware-endpoint": "^4.3.0",
+ "@smithy/middleware-retry": "^4.4.0",
+ "@smithy/middleware-serde": "^4.2.0",
+ "@smithy/middleware-stack": "^4.2.0",
+ "@smithy/node-config-provider": "^4.3.0",
+ "@smithy/node-http-handler": "^4.3.0",
+ "@smithy/protocol-http": "^5.3.0",
+ "@smithy/smithy-client": "^4.7.0",
+ "@smithy/types": "^4.6.0",
+ "@smithy/url-parser": "^4.2.0",
+ "@smithy/util-base64": "^4.2.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.0",
+ "@smithy/util-defaults-mode-browser": "^4.2.0",
+ "@smithy/util-defaults-mode-node": "^4.2.0",
+ "@smithy/util-endpoints": "^3.2.0",
+ "@smithy/util-middleware": "^4.2.0",
+ "@smithy/util-retry": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ tslib: "^2.6.2"
+ },
+ devDependencies: {
+ "@tsconfig/node18": "18.2.4",
+ "@types/node": "^18.19.69",
+ concurrently: "7.0.0",
+ "downlevel-dts": "0.10.1",
+ rimraf: "3.0.2",
+ typescript: "~5.8.3"
+ },
+ engines: {
+ node: ">=18.0.0"
+ },
+ typesVersions: {
+ "<4.0": {
+ "dist-types/*": [
+ "dist-types/ts3.4/*"
+ ]
+ }
+ },
+ files: [
+ "dist-*/**"
+ ],
+ author: {
+ name: "AWS SDK for JavaScript Team",
+ url: "https://aws.amazon.com/javascript/"
+ },
+ license: "Apache-2.0",
+ browser: {
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
+ },
+ "react-native": {
+ "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
+ },
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
+ repository: {
+ type: "git",
+ url: "https://github.com/aws/aws-sdk-js-v3.git",
+ directory: "clients/client-sso"
}
- return contents;
};
- var de_ExpiredTokenException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
- }
- return contents;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso
+var require_dist_cjs53 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
};
- var de_FederatedUser = (output, context) => {
- const contents = {};
- if (output[_FUI] != null) {
- contents[_FUI] = (0, smithy_client_1.expectString)(output[_FUI]);
- }
- if (output[_Ar] != null) {
- contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]);
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return contents;
+ return to;
};
- var de_GetAccessKeyInfoResponse = (output, context) => {
- const contents = {};
- if (output[_Ac] != null) {
- contents[_Ac] = (0, smithy_client_1.expectString)(output[_Ac]);
- }
- return contents;
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS,
+ UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,
+ UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,
+ createDefaultUserAgentProvider: () => createDefaultUserAgentProvider,
+ crtAvailability: () => crtAvailability,
+ defaultUserAgent: () => defaultUserAgent
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_os = __require("os");
+ var import_process = __require("process");
+ var crtAvailability = {
+ isCrtAvailable: false
};
- var de_GetCallerIdentityResponse = (output, context) => {
- const contents = {};
- if (output[_UI] != null) {
- contents[_UI] = (0, smithy_client_1.expectString)(output[_UI]);
- }
- if (output[_Ac] != null) {
- contents[_Ac] = (0, smithy_client_1.expectString)(output[_Ac]);
- }
- if (output[_Ar] != null) {
- contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]);
+ var isCrtAvailable = __name(() => {
+ if (crtAvailability.isCrtAvailable) {
+ return ["md/crt-avail"];
}
- return contents;
+ return null;
+ }, "isCrtAvailable");
+ var createDefaultUserAgentProvider = __name(({ serviceId, clientVersion }) => {
+ return async (config) => {
+ const sections = [
+ ["aws-sdk-js", clientVersion],
+ ["ua", "2.1"],
+ [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],
+ ["lang/js"],
+ ["md/nodejs", `${import_process.versions.node}`]
+ ];
+ const crtAvailable = isCrtAvailable();
+ if (crtAvailable) {
+ sections.push(crtAvailable);
+ }
+ if (serviceId) {
+ sections.push([`api/${serviceId}`, clientVersion]);
+ }
+ if (import_process.env.AWS_EXECUTION_ENV) {
+ sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);
+ }
+ const appId = await config?.userAgentAppId?.();
+ const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
+ return resolvedUserAgent;
+ };
+ }, "createDefaultUserAgentProvider");
+ var defaultUserAgent = createDefaultUserAgentProvider;
+ var import_middleware_user_agent = require_dist_cjs39();
+ var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
+ var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
+ var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
+ var NODE_APP_ID_CONFIG_OPTIONS = {
+ environmentVariableSelector: __name((env2) => env2[UA_APP_ID_ENV_NAME], "environmentVariableSelector"),
+ configFileSelector: __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], "configFileSelector"),
+ default: import_middleware_user_agent.DEFAULT_UA_APP_ID
};
- var de_GetFederationTokenResponse = (output, context) => {
- const contents = {};
- if (output[_C] != null) {
- contents[_C] = de_Credentials(output[_C], context);
- }
- if (output[_FU] != null) {
- contents[_FU] = de_FederatedUser(output[_FU], context);
- }
- if (output[_PPS] != null) {
- contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]);
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
+var require_dist_cjs54 = __commonJS((exports) => {
+ var castSourceData = function(toCast, encoding) {
+ if (buffer.Buffer.isBuffer(toCast)) {
+ return toCast;
}
- return contents;
- };
- var de_GetSessionTokenResponse = (output, context) => {
- const contents = {};
- if (output[_C] != null) {
- contents[_C] = de_Credentials(output[_C], context);
+ if (typeof toCast === "string") {
+ return utilBufferFrom.fromString(toCast, encoding);
}
- return contents;
- };
- var de_IDPCommunicationErrorException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ if (ArrayBuffer.isView(toCast)) {
+ return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
}
- return contents;
+ return utilBufferFrom.fromArrayBuffer(toCast);
};
- var de_IDPRejectedClaimException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ var utilBufferFrom = require_dist_cjs7();
+ var utilUtf8 = require_dist_cjs8();
+ var buffer = __require("buffer");
+ var crypto2 = __require("crypto");
+
+ class Hash {
+ algorithmIdentifier;
+ secret;
+ hash;
+ constructor(algorithmIdentifier, secret) {
+ this.algorithmIdentifier = algorithmIdentifier;
+ this.secret = secret;
+ this.reset();
}
- return contents;
- };
- var de_InvalidAuthorizationMessageException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ update(toHash, encoding) {
+ this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding)));
}
- return contents;
- };
- var de_InvalidIdentityTokenException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ digest() {
+ return Promise.resolve(this.hash.digest());
}
- return contents;
- };
- var de_MalformedPolicyDocumentException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ reset() {
+ this.hash = this.secret ? crypto2.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) : crypto2.createHash(this.algorithmIdentifier);
}
- return contents;
- };
- var de_PackedPolicyTooLargeException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ }
+ exports.Hash = Hash;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso
+var require_dist_cjs55 = __commonJS((exports) => {
+ var fs = __require("fs");
+ var calculateBodyLength = (body) => {
+ if (!body) {
+ return 0;
}
- return contents;
- };
- var de_RegionDisabledException = (output, context) => {
- const contents = {};
- if (output[_m] != null) {
- contents[_m] = (0, smithy_client_1.expectString)(output[_m]);
+ if (typeof body === "string") {
+ return Buffer.byteLength(body);
+ } else if (typeof body.byteLength === "number") {
+ return body.byteLength;
+ } else if (typeof body.size === "number") {
+ return body.size;
+ } else if (typeof body.start === "number" && typeof body.end === "number") {
+ return body.end + 1 - body.start;
+ } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) {
+ return fs.lstatSync(body.path).size;
+ } else if (typeof body.fd === "number") {
+ return fs.fstatSync(body.fd).size;
}
- return contents;
+ throw new Error(`Body Length computation failed for ${body}`);
};
- var deserializeMetadata = (output) => ({
- httpStatusCode: output.statusCode,
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
- extendedRequestId: output.headers["x-amz-id-2"],
- cfId: output.headers["x-amz-cf-id"]
+ exports.calculateBodyLength = calculateBodyLength;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_ruleset2 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ruleSet = undefined;
+ var u = "required";
+ var v = "fn";
+ var w = "argv";
+ var x = "ref";
+ var a = true;
+ var b = "isSet";
+ var c = "booleanEquals";
+ var d = "error";
+ var e = "endpoint";
+ var f = "tree";
+ var g = "PartitionResult";
+ var h = "getAttr";
+ var i = { [u]: false, type: "String" };
+ var j = { [u]: true, default: false, type: "Boolean" };
+ var k = { [x]: "Endpoint" };
+ var l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] };
+ var m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] };
+ var n = {};
+ var o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] };
+ var p = { [x]: g };
+ var q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] };
+ var r = [l];
+ var s = [m];
+ var t = [{ [x]: "Region" }];
+ var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
+ exports.ruleSet = _data;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endp
+var require_endpointResolver2 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.defaultEndpointResolver = undefined;
+ var util_endpoints_1 = require_dist_cjs38();
+ var util_endpoints_2 = require_dist_cjs35();
+ var ruleset_1 = require_ruleset2();
+ var cache = new util_endpoints_2.EndpointCache({
+ size: 50,
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
});
- var collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
- var throwDefaultError = (0, smithy_client_1.withBaseException)(STSServiceException_1.STSServiceException);
- var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
- const contents = {
- protocol,
- hostname,
- port,
- method: "POST",
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
- headers
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
+ endpointParams,
+ logger: context.logger
+ }));
+ };
+ exports.defaultEndpointResolver = defaultEndpointResolver;
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc
+var require_runtimeConfig_shared = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getRuntimeConfig = undefined;
+ var core_1 = require_dist_cjs24();
+ var core_2 = require_dist_cjs17();
+ var smithy_client_1 = require_dist_cjs22();
+ var url_parser_1 = require_dist_cjs37();
+ var util_base64_1 = require_dist_cjs9();
+ var util_utf8_1 = require_dist_cjs8();
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider2();
+ var endpointResolver_1 = require_endpointResolver2();
+ var getRuntimeConfig = (config) => {
+ return {
+ apiVersion: "2019-06-10",
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
+ disableHostPrefix: config?.disableHostPrefix ?? false,
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
+ extensions: config?.extensions ?? [],
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
+ {
+ schemeId: "aws.auth#sigv4",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
+ signer: new core_1.AwsSdkSigV4Signer
+ },
+ {
+ schemeId: "smithy.api#noAuth",
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
+ signer: new core_2.NoAuthSigner
+ }
+ ],
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger,
+ serviceId: config?.serviceId ?? "SSO",
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
};
- if (resolvedHostname !== undefined) {
- contents.hostname = resolvedHostname;
- }
- if (body !== undefined) {
- contents.body = body;
- }
- return new protocol_http_1.HttpRequest(contents);
};
- var SHARED_HEADERS = {
- "content-type": "application/x-www-form-urlencoded"
+ exports.getRuntimeConfig = getRuntimeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-o
+var require_dist_cjs56 = __commonJS((exports) => {
+ var configResolver = require_dist_cjs40();
+ var nodeConfigProvider = require_dist_cjs48();
+ var propertyProvider = require_dist_cjs18();
+ var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
+ var AWS_REGION_ENV = "AWS_REGION";
+ var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
+ var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
+ var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
+ var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
+ var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
+ var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
+ var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
+ environmentVariableSelector: (env) => {
+ return env[AWS_DEFAULTS_MODE_ENV];
+ },
+ configFileSelector: (profile) => {
+ return profile[AWS_DEFAULTS_MODE_CONFIG];
+ },
+ default: "legacy"
};
- var _ = "2011-06-15";
- var _A = "Action";
- var _AKI = "AccessKeyId";
- var _AR = "AssumeRole";
- var _ARI = "AssumedRoleId";
- var _ARU = "AssumedRoleUser";
- var _ARWSAML = "AssumeRoleWithSAML";
- var _ARWWI = "AssumeRoleWithWebIdentity";
- var _Ac = "Account";
- var _Ar = "Arn";
- var _Au = "Audience";
- var _C = "Credentials";
- var _CA = "ContextAssertion";
- var _DAM = "DecodeAuthorizationMessage";
- var _DM = "DecodedMessage";
- var _DS = "DurationSeconds";
- var _E = "Expiration";
- var _EI = "ExternalId";
- var _EM = "EncodedMessage";
- var _FU = "FederatedUser";
- var _FUI = "FederatedUserId";
- var _GAKI = "GetAccessKeyInfo";
- var _GCI = "GetCallerIdentity";
- var _GFT = "GetFederationToken";
- var _GST = "GetSessionToken";
- var _I = "Issuer";
- var _K = "Key";
- var _N = "Name";
- var _NQ = "NameQualifier";
- var _P = "Policy";
- var _PA = "PolicyArns";
- var _PAr = "PrincipalArn";
- var _PAro = "ProviderArn";
- var _PC = "ProvidedContexts";
- var _PI = "ProviderId";
- var _PPS = "PackedPolicySize";
- var _Pr = "Provider";
- var _RA = "RoleArn";
- var _RSN = "RoleSessionName";
- var _S = "Subject";
- var _SAK = "SecretAccessKey";
- var _SAMLA = "SAMLAssertion";
- var _SFWIT = "SubjectFromWebIdentityToken";
- var _SI = "SourceIdentity";
- var _SN = "SerialNumber";
- var _ST = "SubjectType";
- var _STe = "SessionToken";
- var _T = "Tags";
- var _TC = "TokenCode";
- var _TTK = "TransitiveTagKeys";
- var _UI = "UserId";
- var _V = "Version";
- var _Va = "Value";
- var _WIT = "WebIdentityToken";
- var _a = "arn";
- var _m = "message";
- var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
- if (encoded.length) {
- const parser = new fast_xml_parser_1.XMLParser({
- attributeNamePrefix: "",
- htmlEntities: true,
- ignoreAttributes: false,
- ignoreDeclaration: true,
- parseTagValue: false,
- trimValues: false,
- tagValueProcessor: (_2, val2) => val2.trim() === "" && val2.includes("\n") ? "" : undefined
- });
- parser.addEntity("#xD", "\r");
- parser.addEntity("#10", "\n");
- const parsedObj = parser.parse(encoded);
- const textNodeName = "#text";
- const key = Object.keys(parsedObj)[0];
- const parsedObjToReturn = parsedObj[key];
- if (parsedObjToReturn[textNodeName]) {
- parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
- delete parsedObjToReturn[textNodeName];
- }
- return (0, smithy_client_1.getValueFromTextNode)(parsedObjToReturn);
+ var resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => propertyProvider.memoize(async () => {
+ const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
+ switch (mode?.toLowerCase()) {
+ case "auto":
+ return resolveNodeDefaultsModeAuto(region);
+ case "in-region":
+ case "cross-region":
+ case "mobile":
+ case "standard":
+ case "legacy":
+ return Promise.resolve(mode?.toLocaleLowerCase());
+ case undefined:
+ return Promise.resolve("legacy");
+ default:
+ throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
}
- return {};
});
- var parseErrorBody = async (errorBody, context) => {
- const value = await parseBody(errorBody, context);
- if (value.Error) {
- value.Error.message = value.Error.message ?? value.Error.Message;
+ var resolveNodeDefaultsModeAuto = async (clientRegion) => {
+ if (clientRegion) {
+ const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
+ const inferredRegion = await inferPhysicalRegion();
+ if (!inferredRegion) {
+ return "standard";
+ }
+ if (resolvedRegion === inferredRegion) {
+ return "in-region";
+ } else {
+ return "cross-region";
+ }
}
- return value;
+ return "standard";
};
- var buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => (0, smithy_client_1.extendedEncodeURIComponent)(key) + "=" + (0, smithy_client_1.extendedEncodeURIComponent)(value)).join("&");
- var loadQueryErrorCode = (output, data) => {
- if (data.Error?.Code !== undefined) {
- return data.Error.Code;
+ var inferPhysicalRegion = async () => {
+ if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
+ return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
}
- if (output.statusCode == 404) {
- return "NotFound";
+ if (!process.env[ENV_IMDS_DISABLED]) {
+ try {
+ const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require_dist_cjs51(), 1));
+ const endpoint = await getInstanceMetadataEndpoint();
+ return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();
+ } catch (e) {
+ }
}
};
+ exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsn
-var require_AssumeRoleCommand = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.AssumeRoleCommand = exports.$Command = undefined;
- var middleware_endpoint_1 = require_dist_cjs41();
- var middleware_serde_1 = require_dist_cjs40();
- var smithy_client_1 = require_dist_cjs16();
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function() {
- return smithy_client_1.Command;
- } });
- var EndpointParameters_1 = require_EndpointParameters();
- var models_0_1 = require_models_0();
- var Aws_query_1 = require_Aws_query();
-
- class AssumeRoleCommand2 extends smithy_client_1.Command.classBuilder().ep({
- ...EndpointParameters_1.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(undefined, models_0_1.AssumeRoleResponseFilterSensitiveLog).ser(Aws_query_1.se_AssumeRoleCommand).de(Aws_query_1.de_AssumeRoleCommand).build() {
- }
- exports.AssumeRoleCommand = AssumeRoleCommand2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.jsjsd.js
-var require_AssumeRoleWithWebIdentityCommand = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/s
+var require_runtimeConfig = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- exports.AssumeRoleWithWebIdentityCommand = exports.$Command = undefined;
- var middleware_endpoint_1 = require_dist_cjs41();
- var middleware_serde_1 = require_dist_cjs40();
- var smithy_client_1 = require_dist_cjs16();
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function() {
- return smithy_client_1.Command;
- } });
- var EndpointParameters_1 = require_EndpointParameters();
- var models_0_1 = require_models_0();
- var Aws_query_1 = require_Aws_query();
-
- class AssumeRoleWithWebIdentityCommand2 extends smithy_client_1.Command.classBuilder().ep({
- ...EndpointParameters_1.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog, models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(Aws_query_1.se_AssumeRoleWithWebIdentityCommand).de(Aws_query_1.de_AssumeRoleWithWebIdentityCommand).build() {
- }
- exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand2;
+ exports.getRuntimeConfig = undefined;
+ var tslib_1 = require_tslib();
+ var package_json_1 = tslib_1.__importDefault(require_package3());
+ var core_1 = require_dist_cjs24();
+ var util_user_agent_node_1 = require_dist_cjs53();
+ var config_resolver_1 = require_dist_cjs40();
+ var hash_node_1 = require_dist_cjs54();
+ var middleware_retry_1 = require_dist_cjs45();
+ var node_config_provider_1 = require_dist_cjs48();
+ var node_http_handler_1 = require_dist_cjs12();
+ var util_body_length_node_1 = require_dist_cjs55();
+ var util_retry_1 = require_dist_cjs44();
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared();
+ var smithy_client_1 = require_dist_cjs22();
+ var util_defaults_mode_node_1 = require_dist_cjs56();
+ var smithy_client_2 = require_dist_cjs22();
+ var getRuntimeConfig = (config) => {
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
+ const loaderConfig = {
+ profile: config?.profile,
+ logger: clientSharedValues.logger
+ };
+ return {
+ ...clientSharedValues,
+ ...config,
+ runtime: "node",
+ defaultsMode,
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
+ }, config),
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
+ };
+ };
+ exports.getRuntimeConfig = getRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver
-var require_defaultStsRoleAssumers = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = undefined;
- var AssumeRoleCommand_1 = require_AssumeRoleCommand();
- var AssumeRoleWithWebIdentityCommand_1 = require_AssumeRoleWithWebIdentityCommand();
- var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
- var decorateDefaultRegion = (region) => {
- if (typeof region !== "function") {
- return region === undefined ? ASSUME_ROLE_DEFAULT_REGION : region;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-o
+var require_dist_cjs57 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return async () => {
- try {
- return await region();
- } catch (e) {
- return ASSUME_ROLE_DEFAULT_REGION;
- }
- };
+ return to;
};
- var getDefaultRoleAssumer = (stsOptions, stsClientCtor) => {
- let stsClient;
- let closureSourceCreds;
- return async (sourceCreds, params) => {
- closureSourceCreds = sourceCreds;
- if (!stsClient) {
- const { logger: logger4, region, requestHandler } = stsOptions;
- stsClient = new stsClientCtor({
- logger: logger4,
- credentialDefaultProvider: () => async () => closureSourceCreds,
- region: decorateDefaultRegion(region || stsOptions.region),
- ...requestHandler ? { requestHandler } : {}
- });
- }
- const { Credentials } = await stsClient.send(new AssumeRoleCommand_1.AssumeRoleCommand(params));
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
- throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,
+ NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,
+ REGION_ENV_NAME: () => REGION_ENV_NAME,
+ REGION_INI_NAME: () => REGION_INI_NAME,
+ getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,
+ resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,
+ resolveRegionConfig: () => resolveRegionConfig
+ });
+ module.exports = __toCommonJS(index_exports);
+ var getAwsRegionExtensionConfiguration = __name((runtimeConfig) => {
+ return {
+ setRegion(region) {
+ runtimeConfig.region = region;
+ },
+ region() {
+ return runtimeConfig.region;
}
- return {
- accessKeyId: Credentials.AccessKeyId,
- secretAccessKey: Credentials.SecretAccessKey,
- sessionToken: Credentials.SessionToken,
- expiration: Credentials.Expiration,
- credentialScope: Credentials.CredentialScope
- };
};
- };
- exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
- var getDefaultRoleAssumerWithWebIdentity = (stsOptions, stsClientCtor) => {
- let stsClient;
- return async (params) => {
- if (!stsClient) {
- const { logger: logger4, region, requestHandler } = stsOptions;
- stsClient = new stsClientCtor({
- logger: logger4,
- region: decorateDefaultRegion(region || stsOptions.region),
- ...requestHandler ? { requestHandler } : {}
- });
- }
- const { Credentials } = await stsClient.send(new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(params));
- if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
- throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
- }
- return {
- accessKeyId: Credentials.AccessKeyId,
- secretAccessKey: Credentials.SecretAccessKey,
- sessionToken: Credentials.SessionToken,
- expiration: Credentials.Expiration,
- credentialScope: Credentials.CredentialScope
- };
+ }, "getAwsRegionExtensionConfiguration");
+ var resolveAwsRegionExtensionConfiguration = __name((awsRegionExtensionConfiguration) => {
+ return {
+ region: awsRegionExtensionConfiguration.region()
};
+ }, "resolveAwsRegionExtensionConfiguration");
+ var REGION_ENV_NAME = "AWS_REGION";
+ var REGION_INI_NAME = "region";
+ var NODE_REGION_CONFIG_OPTIONS = {
+ environmentVariableSelector: __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"),
+ configFileSelector: __name((profile) => profile[REGION_INI_NAME], "configFileSelector"),
+ default: __name(() => {
+ throw new Error("Region is missing");
+ }, "default")
};
- exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
- var decorateDefaultCredentialProvider = (provider) => (input) => provider({
- roleAssumer: (0, exports.getDefaultRoleAssumer)(input, input.stsClientCtor),
- roleAssumerWithWebIdentity: (0, exports.getDefaultRoleAssumerWithWebIdentity)(input, input.stsClientCtor),
- ...input
- });
- exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jsso
-var require_dist_cjs45 = __commonJS((exports, module) => {
- var httpRequest = function(options) {
- return new Promise((resolve, reject) => {
- var _a;
- const req = (0, import_http.request)({
- method: "GET",
- ...options,
- hostname: (_a = options.hostname) == null ? undefined : _a.replace(/^\[(.+)\]$/, "$1")
- });
- req.on("error", (err) => {
- reject(Object.assign(new import_property_provider.ProviderError("Unable to connect to instance metadata service"), err));
- req.destroy();
- });
- req.on("timeout", () => {
- reject(new import_property_provider.ProviderError("TimeoutError from instance metadata service"));
- req.destroy();
- });
- req.on("response", (res) => {
- const { statusCode = 400 } = res;
- if (statusCode < 200 || 300 <= statusCode) {
- reject(Object.assign(new import_property_provider.ProviderError("Error response received from instance metadata service"), { statusCode }));
- req.destroy();
+ var NODE_REGION_CONFIG_FILE_OPTIONS = {
+ preferredFile: "credentials"
+ };
+ var isFipsRegion = __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion");
+ var getRealRegion = __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion");
+ var resolveRegionConfig = __name((input) => {
+ const { region, useFipsEndpoint } = input;
+ if (!region) {
+ throw new Error("Region is missing");
+ }
+ return Object.assign(input, {
+ region: __name(async () => {
+ if (typeof region === "string") {
+ return getRealRegion(region);
}
- const chunks = [];
- res.on("data", (chunk) => {
- chunks.push(chunk);
- });
- res.on("end", () => {
- resolve(import_buffer.Buffer.concat(chunks));
- req.destroy();
- });
- });
- req.end();
+ const providedRegion = await region();
+ return getRealRegion(providedRegion);
+ }, "region"),
+ useFipsEndpoint: __name(async () => {
+ const providedRegion = typeof region === "string" ? region : await region();
+ if (isFipsRegion(providedRegion)) {
+ return true;
+ }
+ return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
+ }, "useFipsEndpoint")
});
- };
+ }, "resolveRegionConfig");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var require_dist_cjs58 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -17384,430 +21894,624 @@ var require_dist_cjs45 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,
- DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,
- ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,
- ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,
- ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,
- fromContainerMetadata: () => fromContainerMetadata,
- fromInstanceMetadata: () => fromInstanceMetadata,
- getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,
- httpRequest: () => httpRequest,
- providerConfigFromInit: () => providerConfigFromInit
+ var index_exports = {};
+ __export2(index_exports, {
+ GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
+ GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,
+ GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,
+ InvalidRequestException: () => InvalidRequestException,
+ ListAccountRolesCommand: () => ListAccountRolesCommand,
+ ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,
+ ListAccountsCommand: () => ListAccountsCommand,
+ ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,
+ LogoutCommand: () => LogoutCommand,
+ LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,
+ ResourceNotFoundException: () => ResourceNotFoundException,
+ RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,
+ SSO: () => SSO,
+ SSOClient: () => SSOClient,
+ SSOServiceException: () => SSOServiceException,
+ TooManyRequestsException: () => TooManyRequestsException,
+ UnauthorizedException: () => UnauthorizedException,
+ __Client: () => import_smithy_client.Client,
+ paginateListAccountRoles: () => paginateListAccountRoles,
+ paginateListAccounts: () => paginateListAccounts
});
- module.exports = __toCommonJS(src_exports);
- var import_url = __require("url");
- var import_property_provider = require_dist_cjs25();
- var import_buffer = __require("buffer");
- var import_http = __require("http");
- __name(httpRequest, "httpRequest");
- var isImdsCredentials = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", "isImdsCredentials");
- var fromImdsCredentials = __name((creds) => ({
- accessKeyId: creds.AccessKeyId,
- secretAccessKey: creds.SecretAccessKey,
- sessionToken: creds.Token,
- expiration: new Date(creds.Expiration)
- }), "fromImdsCredentials");
- var DEFAULT_TIMEOUT = 1000;
- var DEFAULT_MAX_RETRIES = 0;
- var providerConfigFromInit = __name(({
- maxRetries = DEFAULT_MAX_RETRIES,
- timeout = DEFAULT_TIMEOUT
- }) => ({ maxRetries, timeout }), "providerConfigFromInit");
- var retry = __name((toRetry, maxRetries) => {
- let promise = toRetry();
- for (let i = 0;i < maxRetries; i++) {
- promise = promise.catch(toRetry);
- }
- return promise;
- }, "retry");
- var ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
- var ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
- var ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
- var fromContainerMetadata = __name((init = {}) => {
- const { timeout, maxRetries } = providerConfigFromInit(init);
- return () => retry(async () => {
- const requestOptions = await getCmdsUri();
- const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
- if (!isImdsCredentials(credsResponse)) {
- throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service.");
+ module.exports = __toCommonJS(index_exports);
+ var import_middleware_host_header = require_dist_cjs29();
+ var import_middleware_logger = require_dist_cjs30();
+ var import_middleware_recursion_detection = require_dist_cjs31();
+ var import_middleware_user_agent = require_dist_cjs39();
+ var import_config_resolver = require_dist_cjs40();
+ var import_core = require_dist_cjs17();
+ var import_middleware_content_length = require_dist_cjs42();
+ var import_middleware_endpoint = require_dist_cjs49();
+ var import_middleware_retry = require_dist_cjs45();
+ var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider2();
+ var resolveClientEndpointParameters = __name((options) => {
+ return Object.assign(options, {
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
+ defaultSigningName: "awsssoportal"
+ });
+ }, "resolveClientEndpointParameters");
+ var commonParams = {
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
+ Endpoint: { type: "builtInParams", name: "endpoint" },
+ Region: { type: "builtInParams", name: "region" },
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
+ };
+ var import_runtimeConfig = require_runtimeConfig();
+ var import_region_config_resolver = require_dist_cjs57();
+ var import_protocol_http = require_dist_cjs2();
+ var import_smithy_client = require_dist_cjs22();
+ var getHttpAuthExtensionConfiguration = __name((runtimeConfig) => {
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
+ let _credentials = runtimeConfig.credentials;
+ return {
+ setHttpAuthScheme(httpAuthScheme) {
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
+ if (index === -1) {
+ _httpAuthSchemes.push(httpAuthScheme);
+ } else {
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
+ }
+ },
+ httpAuthSchemes() {
+ return _httpAuthSchemes;
+ },
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
+ },
+ httpAuthSchemeProvider() {
+ return _httpAuthSchemeProvider;
+ },
+ setCredentials(credentials) {
+ _credentials = credentials;
+ },
+ credentials() {
+ return _credentials;
}
- return fromImdsCredentials(credsResponse);
- }, maxRetries);
- }, "fromContainerMetadata");
- var requestFromEcsImds = __name(async (timeout, options) => {
- if (process.env[ENV_CMDS_AUTH_TOKEN]) {
- options.headers = {
- ...options.headers,
- Authorization: process.env[ENV_CMDS_AUTH_TOKEN]
- };
+ };
+ }, "getHttpAuthExtensionConfiguration");
+ var resolveHttpAuthRuntimeConfig = __name((config) => {
+ return {
+ httpAuthSchemes: config.httpAuthSchemes(),
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
+ credentials: config.credentials()
+ };
+ }, "resolveHttpAuthRuntimeConfig");
+ var resolveRuntimeExtensions = __name((runtimeConfig, extensions) => {
+ const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
+ }, "resolveRuntimeExtensions");
+ var SSOClient = class extends import_smithy_client.Client {
+ static {
+ __name(this, "SSOClient");
+ }
+ config;
+ constructor(...[configuration]) {
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
+ super(_config_0);
+ this.initConfig = _config_0;
+ const _config_1 = resolveClientEndpointParameters(_config_0);
+ const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
+ const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
+ const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
+ const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
+ this.config = _config_8;
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
+ this.middlewareStack.use((0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
+ httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,
+ identityProviderConfigProvider: __name(async (config) => new import_core.DefaultIdentityProviderConfig({
+ "aws.auth#sigv4": config.credentials
+ }), "identityProviderConfigProvider")
+ }));
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
+ }
+ destroy() {
+ super.destroy();
}
- const buffer = await httpRequest({
- ...options,
- timeout
- });
- return buffer.toString();
- }, "requestFromEcsImds");
- var CMDS_IP = "169.254.170.2";
- var GREENGRASS_HOSTS = {
- localhost: true,
- "127.0.0.1": true
};
- var GREENGRASS_PROTOCOLS = {
- "http:": true,
- "https:": true
+ var import_middleware_serde = require_dist_cjs5();
+ var SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {
+ static {
+ __name(this, "SSOServiceException");
+ }
+ constructor(options) {
+ super(options);
+ Object.setPrototypeOf(this, _SSOServiceException.prototype);
+ }
};
- var getCmdsUri = __name(async () => {
- if (process.env[ENV_CMDS_RELATIVE_URI]) {
- return {
- hostname: CMDS_IP,
- path: process.env[ENV_CMDS_RELATIVE_URI]
- };
+ var InvalidRequestException = class _InvalidRequestException extends SSOServiceException {
+ static {
+ __name(this, "InvalidRequestException");
}
- if (process.env[ENV_CMDS_FULL_URI]) {
- const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]);
- if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {
- throw new import_property_provider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false);
- }
- if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {
- throw new import_property_provider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false);
- }
- return {
- ...parsed,
- port: parsed.port ? parseInt(parsed.port, 10) : undefined
- };
+ name = "InvalidRequestException";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "InvalidRequestException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InvalidRequestException.prototype);
+ }
+ };
+ var ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {
+ static {
+ __name(this, "ResourceNotFoundException");
+ }
+ name = "ResourceNotFoundException";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "ResourceNotFoundException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
+ }
+ };
+ var TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {
+ static {
+ __name(this, "TooManyRequestsException");
+ }
+ name = "TooManyRequestsException";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "TooManyRequestsException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _TooManyRequestsException.prototype);
+ }
+ };
+ var UnauthorizedException = class _UnauthorizedException extends SSOServiceException {
+ static {
+ __name(this, "UnauthorizedException");
+ }
+ name = "UnauthorizedException";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "UnauthorizedException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _UnauthorizedException.prototype);
+ }
+ };
+ var GetRoleCredentialsRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
+ }), "GetRoleCredentialsRequestFilterSensitiveLog");
+ var RoleCredentialsFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },
+ ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }
+ }), "RoleCredentialsFilterSensitiveLog");
+ var GetRoleCredentialsResponseFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }
+ }), "GetRoleCredentialsResponseFilterSensitiveLog");
+ var ListAccountRolesRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
+ }), "ListAccountRolesRequestFilterSensitiveLog");
+ var ListAccountsRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
+ }), "ListAccountsRequestFilterSensitiveLog");
+ var LogoutRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
+ }), "LogoutRequestFilterSensitiveLog");
+ var import_core2 = require_dist_cjs24();
+ var se_GetRoleCredentialsCommand = __name(async (input, context) => {
+ const b = (0, import_core.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xasbt]: input[_aT]
+ });
+ b.bp("/federation/credentials");
+ const query = (0, import_smithy_client.map)({
+ [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],
+ [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
+ });
+ let body;
+ b.m("GET").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_GetRoleCredentialsCommand");
+ var se_ListAccountRolesCommand = __name(async (input, context) => {
+ const b = (0, import_core.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xasbt]: input[_aT]
+ });
+ b.bp("/assignment/roles");
+ const query = (0, import_smithy_client.map)({
+ [_nt]: [, input[_nT]],
+ [_mr]: [() => input.maxResults !== undefined, () => input[_mR].toString()],
+ [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
+ });
+ let body;
+ b.m("GET").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_ListAccountRolesCommand");
+ var se_ListAccountsCommand = __name(async (input, context) => {
+ const b = (0, import_core.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xasbt]: input[_aT]
+ });
+ b.bp("/assignment/accounts");
+ const query = (0, import_smithy_client.map)({
+ [_nt]: [, input[_nT]],
+ [_mr]: [() => input.maxResults !== undefined, () => input[_mR].toString()]
+ });
+ let body;
+ b.m("GET").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_ListAccountsCommand");
+ var se_LogoutCommand = __name(async (input, context) => {
+ const b = (0, import_core.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xasbt]: input[_aT]
+ });
+ b.bp("/logout");
+ let body;
+ b.m("POST").h(headers).b(body);
+ return b.build();
+ }, "se_LogoutCommand");
+ var de_GetRoleCredentialsCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
+ const doc = (0, import_smithy_client.take)(data, {
+ roleCredentials: import_smithy_client._json
+ });
+ Object.assign(contents, doc);
+ return contents;
+ }, "de_GetRoleCredentialsCommand");
+ var de_ListAccountRolesCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
+ const doc = (0, import_smithy_client.take)(data, {
+ nextToken: import_smithy_client.expectString,
+ roleList: import_smithy_client._json
+ });
+ Object.assign(contents, doc);
+ return contents;
+ }, "de_ListAccountRolesCommand");
+ var de_ListAccountsCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
+ const doc = (0, import_smithy_client.take)(data, {
+ accountList: import_smithy_client._json,
+ nextToken: import_smithy_client.expectString
+ });
+ Object.assign(contents, doc);
+ return contents;
+ }, "de_ListAccountsCommand");
+ var de_LogoutCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_LogoutCommand");
+ var de_CommandError = __name(async (output, context) => {
+ const parsedOutput = {
+ ...output,
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
+ };
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
+ switch (errorCode) {
+ case "InvalidRequestException":
+ case "com.amazonaws.sso#InvalidRequestException":
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
+ case "ResourceNotFoundException":
+ case "com.amazonaws.sso#ResourceNotFoundException":
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
+ case "TooManyRequestsException":
+ case "com.amazonaws.sso#TooManyRequestsException":
+ throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
+ case "UnauthorizedException":
+ case "com.amazonaws.sso#UnauthorizedException":
+ throw await de_UnauthorizedExceptionRes(parsedOutput, context);
+ default:
+ const parsedBody = parsedOutput.body;
+ return throwDefaultError({
+ output,
+ parsedBody,
+ errorCode
+ });
+ }
+ }, "de_CommandError");
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);
+ var de_InvalidRequestExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client.take)(data, {
+ message: import_smithy_client.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new InvalidRequestException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidRequestExceptionRes");
+ var de_ResourceNotFoundExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client.take)(data, {
+ message: import_smithy_client.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new ResourceNotFoundException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_ResourceNotFoundExceptionRes");
+ var de_TooManyRequestsExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client.take)(data, {
+ message: import_smithy_client.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new TooManyRequestsException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_TooManyRequestsExceptionRes");
+ var de_UnauthorizedExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client.take)(data, {
+ message: import_smithy_client.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new UnauthorizedException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_UnauthorizedExceptionRes");
+ var deserializeMetadata = __name((output) => ({
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"]
+ }), "deserializeMetadata");
+ var _aI = "accountId";
+ var _aT = "accessToken";
+ var _ai = "account_id";
+ var _mR = "maxResults";
+ var _mr = "max_result";
+ var _nT = "nextToken";
+ var _nt = "next_token";
+ var _rN = "roleName";
+ var _rn = "role_name";
+ var _xasbt = "x-amz-sso_bearer_token";
+ var GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {
+ static {
+ __name(this, "GetRoleCredentialsCommand");
+ }
+ };
+ var ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, undefined).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {
+ static {
+ __name(this, "ListAccountRolesCommand");
}
- throw new import_property_provider.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`, false);
- }, "getCmdsUri");
- var _InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError2 extends import_property_provider.CredentialsProviderError {
- constructor(message, tryNextLink = true) {
- super(message, tryNextLink);
- this.tryNextLink = tryNextLink;
- this.name = "InstanceMetadataV1FallbackError";
- Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError2.prototype);
+ };
+ var ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, undefined).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {
+ static {
+ __name(this, "ListAccountsCommand");
}
};
- __name(_InstanceMetadataV1FallbackError, "InstanceMetadataV1FallbackError");
- var InstanceMetadataV1FallbackError = _InstanceMetadataV1FallbackError;
- var import_node_config_provider = require_dist_cjs37();
- var import_url_parser = require_dist_cjs39();
- var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
- var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
- var ENDPOINT_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],
- configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
- default: undefined
+ var LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, undefined).ser(se_LogoutCommand).de(de_LogoutCommand).build() {
+ static {
+ __name(this, "LogoutCommand");
+ }
};
- var EndpointMode = ((EndpointMode2) => {
- EndpointMode2["IPv4"] = "IPv4";
- EndpointMode2["IPv6"] = "IPv6";
- return EndpointMode2;
- })(EndpointMode || {});
- var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
- var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
- var ENDPOINT_MODE_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],
- configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
- default: "IPv4"
+ var commands = {
+ GetRoleCredentialsCommand,
+ ListAccountRolesCommand,
+ ListAccountsCommand,
+ LogoutCommand
};
- var getInstanceMetadataEndpoint = __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), "getInstanceMetadataEndpoint");
- var getFromEndpointConfig = __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), "getFromEndpointConfig");
- var getFromEndpointModeConfig = __name(async () => {
- const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)();
- switch (endpointMode) {
- case "IPv4":
- return "http://169.254.169.254";
- case "IPv6":
- return "http://[fd00:ec2::254]";
- default:
- throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);
+ var SSO = class extends SSOClient {
+ static {
+ __name(this, "SSO");
}
- }, "getFromEndpointModeConfig");
- var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;
- var STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
- var STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html";
- var getExtendedInstanceMetadataCredentials = __name((credentials, logger4) => {
- const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
- const newExpiration = new Date(Date.now() + refreshInterval * 1000);
- logger4.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: " + STATIC_STABILITY_DOC_URL);
- const originalExpiration = credentials.originalExpiration ?? credentials.expiration;
+ };
+ (0, import_smithy_client.createAggregatedClient)(commands, SSO);
+ var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
+ var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.jsfr
+var require_httpAuthSchemeProvider3 = __commonJS((exports) => {
+ var createAwsAuthSigv4HttpAuthOption = function(authParameters) {
return {
- ...credentials,
- ...originalExpiration ? { originalExpiration } : {},
- expiration: newExpiration
- };
- }, "getExtendedInstanceMetadataCredentials");
- var staticStabilityProvider = __name((provider, options = {}) => {
- const logger4 = (options == null ? undefined : options.logger) || console;
- let pastCredentials;
- return async () => {
- let credentials;
- try {
- credentials = await provider();
- if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {
- credentials = getExtendedInstanceMetadataCredentials(credentials, logger4);
- }
- } catch (e) {
- if (pastCredentials) {
- logger4.warn("Credential renew failed: ", e);
- credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger4);
- } else {
- throw e;
+ schemeId: "aws.auth#sigv4",
+ signingProperties: {
+ name: "sso-oauth",
+ region: authParameters.region
+ },
+ propertiesExtractor: (config, context) => ({
+ signingProperties: {
+ config,
+ context
}
- }
- pastCredentials = credentials;
- return credentials;
+ })
};
- }, "staticStabilityProvider");
- var IMDS_PATH = "/latest/meta-data/iam/security-credentials/";
- var IMDS_TOKEN_PATH = "/latest/api/token";
- var AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED";
- var PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled";
- var X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token";
- var fromInstanceMetadata = __name((init = {}) => staticStabilityProvider(getInstanceImdsProvider(init), { logger: init.logger }), "fromInstanceMetadata");
- var getInstanceImdsProvider = __name((init) => {
- let disableFetchToken = false;
- const { logger: logger4, profile } = init;
- const { timeout, maxRetries } = providerConfigFromInit(init);
- const getCredentials = __name(async (maxRetries2, options) => {
- var _a;
- const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) == null ? undefined : _a[X_AWS_EC2_METADATA_TOKEN]) == null;
- if (isImdsV1Fallback) {
- let fallbackBlockedFromProfile = false;
- let fallbackBlockedFromProcessEnv = false;
- const configValue = await (0, import_node_config_provider.loadConfig)({
- environmentVariableSelector: (env) => {
- const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
- fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
- if (envValue === undefined) {
- throw new import_property_provider.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`);
- }
- return fallbackBlockedFromProcessEnv;
- },
- configFileSelector: (profile2) => {
- const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];
- fallbackBlockedFromProfile = !!profileValue && profileValue !== "false";
- return fallbackBlockedFromProfile;
- },
- default: false
- }, {
- profile
- })();
- if (init.ec2MetadataV1Disabled || configValue) {
- const causes = [];
- if (init.ec2MetadataV1Disabled)
- causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");
- if (fallbackBlockedFromProfile)
- causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);
- if (fallbackBlockedFromProcessEnv)
- causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);
- throw new InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`);
- }
+ };
+ var createSmithyApiNoAuthHttpAuthOption = function(authParameters) {
+ return {
+ schemeId: "smithy.api#noAuth"
+ };
+ };
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = undefined;
+ var core_1 = require_dist_cjs24();
+ var util_middleware_1 = require_dist_cjs4();
+ var defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
+ return {
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
+ })()
+ };
+ };
+ exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;
+ var defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {
+ const options = [];
+ switch (authParameters.operation) {
+ case "CreateToken": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
}
- const imdsProfile = (await retry(async () => {
- let profile2;
- try {
- profile2 = await getProfile(options);
- } catch (err) {
- if (err.statusCode === 401) {
- disableFetchToken = false;
- }
- throw err;
- }
- return profile2;
- }, maxRetries2)).trim();
- return retry(async () => {
- let creds;
- try {
- creds = await getCredentialsFromProfile(imdsProfile, options);
- } catch (err) {
- if (err.statusCode === 401) {
- disableFetchToken = false;
- }
- throw err;
- }
- return creds;
- }, maxRetries2);
- }, "getCredentials");
- return async () => {
- const endpoint = await getInstanceMetadataEndpoint();
- if (disableFetchToken) {
- logger4 == null || logger4.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)");
- return getCredentials(maxRetries, { ...endpoint, timeout });
- } else {
- let token;
- try {
- token = (await getMetadataToken({ ...endpoint, timeout })).toString();
- } catch (error) {
- if ((error == null ? undefined : error.statusCode) === 400) {
- throw Object.assign(error, {
- message: "EC2 Metadata token request returned error"
- });
- } else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) {
- disableFetchToken = true;
- }
- logger4 == null || logger4.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)");
- return getCredentials(maxRetries, { ...endpoint, timeout });
- }
- return getCredentials(maxRetries, {
- ...endpoint,
- headers: {
- [X_AWS_EC2_METADATA_TOKEN]: token
- },
- timeout
- });
+ default: {
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
}
- };
- }, "getInstanceImdsProvider");
- var getMetadataToken = __name(async (options) => httpRequest({
- ...options,
- path: IMDS_TOKEN_PATH,
- method: "PUT",
- headers: {
- "x-aws-ec2-metadata-token-ttl-seconds": "21600"
- }
- }), "getMetadataToken");
- var getProfile = __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), "getProfile");
- var getCredentialsFromProfile = __name(async (profile, options) => {
- const credsResponse = JSON.parse((await httpRequest({
- ...options,
- path: IMDS_PATH + profile
- })).toString());
- if (!isImdsCredentials(credsResponse)) {
- throw new import_property_provider.CredentialsProviderError("Invalid response received from instance metadata service.");
}
- return fromImdsCredentials(credsResponse);
- }, "getCredentialsFromProfile");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jsso
-var require_dist_cjs46 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ return options;
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
+ exports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;
+ var resolveHttpAuthSchemeConfig = (config) => {
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
+ return Object.assign(config_0, {
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
+ });
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,
- ENV_EXPIRATION: () => ENV_EXPIRATION,
- ENV_KEY: () => ENV_KEY,
- ENV_SECRET: () => ENV_SECRET,
- ENV_SESSION: () => ENV_SESSION,
- fromEnv: () => fromEnv
- });
- module.exports = __toCommonJS(src_exports);
- var import_property_provider = require_dist_cjs25();
- var ENV_KEY = "AWS_ACCESS_KEY_ID";
- var ENV_SECRET = "AWS_SECRET_ACCESS_KEY";
- var ENV_SESSION = "AWS_SESSION_TOKEN";
- var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION";
- var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE";
- var fromEnv = __name(() => async () => {
- const accessKeyId = process.env[ENV_KEY];
- const secretAccessKey = process.env[ENV_SECRET];
- const sessionToken = process.env[ENV_SESSION];
- const expiry = process.env[ENV_EXPIRATION];
- const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];
- if (accessKeyId && secretAccessKey) {
- return {
- accessKeyId,
- secretAccessKey,
- ...sessionToken && { sessionToken },
- ...expiry && { expiration: new Date(expiry) },
- ...credentialScope && { credentialScope }
- };
- }
- throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.");
- }, "fromEnv");
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
var require_package4 = __commonJS((exports, module) => {
module.exports = {
- name: "@aws-sdk/client-sso",
- description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
- version: "3.496.0",
+ name: "@aws-sdk/nested-clients",
+ version: "3.901.0",
+ description: "Nested clients for AWS SDK packages.",
+ main: "./dist-cjs/index.js",
+ module: "./dist-es/index.js",
+ types: "./dist-types/index.d.ts",
scripts: {
- build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
- "build:cjs": "node ../../scripts/compilation/inline client-sso",
+ build: "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
+ "build:cjs": "node ../../scripts/compilation/inline nested-clients",
"build:es": "tsc -p tsconfig.es.json",
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
"build:types": "tsc -p tsconfig.types.json",
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
- "extract:docs": "api-extractor run --local",
- "generate:client": "node ../../scripts/generate-clients/single-service --solo sso"
+ lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
+ test: "yarn g:vitest run",
+ "test:watch": "yarn g:vitest watch"
+ },
+ engines: {
+ node: ">=18.0.0"
},
- main: "./dist-cjs/index.js",
- types: "./dist-types/index.d.ts",
- module: "./dist-es/index.js",
sideEffects: false,
+ author: {
+ name: "AWS SDK for JavaScript Team",
+ url: "https://aws.amazon.com/javascript/"
+ },
+ license: "Apache-2.0",
dependencies: {
- "@aws-crypto/sha256-browser": "3.0.0",
- "@aws-crypto/sha256-js": "3.0.0",
- "@aws-sdk/core": "3.496.0",
- "@aws-sdk/middleware-host-header": "3.496.0",
- "@aws-sdk/middleware-logger": "3.496.0",
- "@aws-sdk/middleware-recursion-detection": "3.496.0",
- "@aws-sdk/middleware-user-agent": "3.496.0",
- "@aws-sdk/region-config-resolver": "3.496.0",
- "@aws-sdk/types": "3.496.0",
- "@aws-sdk/util-endpoints": "3.496.0",
- "@aws-sdk/util-user-agent-browser": "3.496.0",
- "@aws-sdk/util-user-agent-node": "3.496.0",
- "@smithy/config-resolver": "^2.1.1",
- "@smithy/core": "^1.3.1",
- "@smithy/fetch-http-handler": "^2.4.1",
- "@smithy/hash-node": "^2.1.1",
- "@smithy/invalid-dependency": "^2.1.1",
- "@smithy/middleware-content-length": "^2.1.1",
- "@smithy/middleware-endpoint": "^2.4.1",
- "@smithy/middleware-retry": "^2.1.1",
- "@smithy/middleware-serde": "^2.1.1",
- "@smithy/middleware-stack": "^2.1.1",
- "@smithy/node-config-provider": "^2.2.1",
- "@smithy/node-http-handler": "^2.3.1",
- "@smithy/protocol-http": "^3.1.1",
- "@smithy/smithy-client": "^2.3.1",
- "@smithy/types": "^2.9.1",
- "@smithy/url-parser": "^2.1.1",
- "@smithy/util-base64": "^2.1.1",
- "@smithy/util-body-length-browser": "^2.1.1",
- "@smithy/util-body-length-node": "^2.2.1",
- "@smithy/util-defaults-mode-browser": "^2.1.1",
- "@smithy/util-defaults-mode-node": "^2.1.1",
- "@smithy/util-endpoints": "^1.1.1",
- "@smithy/util-retry": "^2.1.1",
- "@smithy/util-utf8": "^2.1.1",
- tslib: "^2.5.0"
+ "@aws-crypto/sha256-browser": "5.2.0",
+ "@aws-crypto/sha256-js": "5.2.0",
+ "@aws-sdk/core": "3.901.0",
+ "@aws-sdk/middleware-host-header": "3.901.0",
+ "@aws-sdk/middleware-logger": "3.901.0",
+ "@aws-sdk/middleware-recursion-detection": "3.901.0",
+ "@aws-sdk/middleware-user-agent": "3.901.0",
+ "@aws-sdk/region-config-resolver": "3.901.0",
+ "@aws-sdk/types": "3.901.0",
+ "@aws-sdk/util-endpoints": "3.901.0",
+ "@aws-sdk/util-user-agent-browser": "3.901.0",
+ "@aws-sdk/util-user-agent-node": "3.901.0",
+ "@smithy/config-resolver": "^4.3.0",
+ "@smithy/core": "^3.14.0",
+ "@smithy/fetch-http-handler": "^5.3.0",
+ "@smithy/hash-node": "^4.2.0",
+ "@smithy/invalid-dependency": "^4.2.0",
+ "@smithy/middleware-content-length": "^4.2.0",
+ "@smithy/middleware-endpoint": "^4.3.0",
+ "@smithy/middleware-retry": "^4.4.0",
+ "@smithy/middleware-serde": "^4.2.0",
+ "@smithy/middleware-stack": "^4.2.0",
+ "@smithy/node-config-provider": "^4.3.0",
+ "@smithy/node-http-handler": "^4.3.0",
+ "@smithy/protocol-http": "^5.3.0",
+ "@smithy/smithy-client": "^4.7.0",
+ "@smithy/types": "^4.6.0",
+ "@smithy/url-parser": "^4.2.0",
+ "@smithy/util-base64": "^4.2.0",
+ "@smithy/util-body-length-browser": "^4.2.0",
+ "@smithy/util-body-length-node": "^4.2.0",
+ "@smithy/util-defaults-mode-browser": "^4.2.0",
+ "@smithy/util-defaults-mode-node": "^4.2.0",
+ "@smithy/util-endpoints": "^3.2.0",
+ "@smithy/util-middleware": "^4.2.0",
+ "@smithy/util-retry": "^4.2.0",
+ "@smithy/util-utf8": "^4.2.0",
+ tslib: "^2.6.2"
},
devDependencies: {
- "@smithy/service-client-documentation-generator": "^2.1.1",
- "@tsconfig/node14": "1.0.3",
- "@types/node": "^14.14.31",
concurrently: "7.0.0",
"downlevel-dts": "0.10.1",
rimraf: "3.0.2",
- typescript: "~4.9.5"
- },
- engines: {
- node: ">=14.0.0"
+ typescript: "~5.8.3"
},
typesVersions: {
"<4.0": {
@@ -17817,215 +22521,44 @@ var require_package4 = __commonJS((exports, module) => {
}
},
files: [
+ "./sso-oidc.d.ts",
+ "./sso-oidc.js",
+ "./sts.d.ts",
+ "./sts.js",
"dist-*/**"
],
- author: {
- name: "AWS SDK for JavaScript Team",
- url: "https://aws.amazon.com/javascript/"
- },
- license: "Apache-2.0",
browser: {
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser"
- },
- "react-native": {
- "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
+ "./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
+ "./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
},
- homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",
+ "react-native": {},
+ homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
repository: {
type: "git",
url: "https://github.com/aws/aws-sdk-js-v3.git",
- directory: "clients/client-sso"
- }
- };
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_dist_cjs47 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,
- UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,
- crtAvailability: () => crtAvailability,
- defaultUserAgent: () => defaultUserAgent
- });
- module.exports = __toCommonJS(src_exports);
- var import_node_config_provider = require_dist_cjs37();
- var import_os = __require("os");
- var import_process = __require("process");
- var crtAvailability = {
- isCrtAvailable: false
- };
- var isCrtAvailable = __name(() => {
- if (crtAvailability.isCrtAvailable) {
- return ["md/crt-avail"];
- }
- return null;
- }, "isCrtAvailable");
- var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
- var UA_APP_ID_INI_NAME = "sdk-ua-app-id";
- var defaultUserAgent = __name(({ serviceId, clientVersion }) => {
- const sections = [
- ["aws-sdk-js", clientVersion],
- ["ua", "2.0"],
- [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],
- ["lang/js"],
- ["md/nodejs", `${import_process.versions.node}`]
- ];
- const crtAvailable = isCrtAvailable();
- if (crtAvailable) {
- sections.push(crtAvailable);
- }
- if (serviceId) {
- sections.push([`api/${serviceId}`, clientVersion]);
- }
- if (import_process.env.AWS_EXECUTION_ENV) {
- sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);
- }
- const appIdPromise = (0, import_node_config_provider.loadConfig)({
- environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
- configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME],
- default: undefined
- })();
- let resolvedUserAgent = undefined;
- return async () => {
- if (!resolvedUserAgent) {
- const appId = await appIdPromise;
- resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
+ directory: "packages/nested-clients"
+ },
+ exports: {
+ "./sso-oidc": {
+ types: "./dist-types/submodules/sso-oidc/index.d.ts",
+ module: "./dist-es/submodules/sso-oidc/index.js",
+ node: "./dist-cjs/submodules/sso-oidc/index.js",
+ import: "./dist-es/submodules/sso-oidc/index.js",
+ require: "./dist-cjs/submodules/sso-oidc/index.js"
+ },
+ "./sts": {
+ types: "./dist-types/submodules/sts/index.d.ts",
+ module: "./dist-es/submodules/sts/index.js",
+ node: "./dist-cjs/submodules/sts/index.js",
+ import: "./dist-es/submodules/sts/index.js",
+ require: "./dist-cjs/submodules/sts/index.js"
}
- return resolvedUserAgent;
- };
- }, "defaultUserAgent");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoi
-var require_dist_cjs48 = __commonJS((exports, module) => {
- var castSourceData = function(toCast, encoding) {
- if (import_buffer.Buffer.isBuffer(toCast)) {
- return toCast;
- }
- if (typeof toCast === "string") {
- return (0, import_util_buffer_from.fromString)(toCast, encoding);
- }
- if (ArrayBuffer.isView(toCast)) {
- return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength);
- }
- return (0, import_util_buffer_from.fromArrayBuffer)(toCast);
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- Hash: () => Hash
- });
- module.exports = __toCommonJS(src_exports);
- var import_util_buffer_from = require_dist_cjs9();
- var import_util_utf8 = require_dist_cjs11();
- var import_buffer = __require("buffer");
- var import_crypto = __require("crypto");
- var _Hash = class _Hash2 {
- constructor(algorithmIdentifier, secret) {
- this.algorithmIdentifier = algorithmIdentifier;
- this.secret = secret;
- this.reset();
- }
- update(toHash, encoding) {
- this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding)));
- }
- digest() {
- return Promise.resolve(this.hash.digest());
- }
- reset() {
- this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier);
- }
- };
- __name(_Hash, "Hash");
- var Hash = _Hash;
- __name(castSourceData, "castSourceData");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_dist_cjs49 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- return to;
};
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- calculateBodyLength: () => calculateBodyLength
- });
- module.exports = __toCommonJS(src_exports);
- var import_fs = __require("fs");
- var calculateBodyLength = __name((body) => {
- if (!body) {
- return 0;
- }
- if (typeof body === "string") {
- return Buffer.from(body).length;
- } else if (typeof body.byteLength === "number") {
- return body.byteLength;
- } else if (typeof body.size === "number") {
- return body.size;
- } else if (typeof body.start === "number" && typeof body.end === "number") {
- return body.end + 1 - body.start;
- } else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) {
- return (0, import_fs.lstatSync)(body.path).size;
- } else if (typeof body.fd === "number") {
- return (0, import_fs.fstatSync)(body.fd).size;
- }
- throw new Error(`Body Length computation failed for ${body}`);
- }, "calculateBodyLength");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_ruleset = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js
+var require_ruleset3 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.ruleSet = undefined;
var u = "required";
@@ -18052,292 +22585,130 @@ var require_ruleset = __commonJS((exports) => {
var r = [l];
var s = [m];
var t = [{ [x]: "Region" }];
- var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
+ var _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
exports.ruleSet = _data;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.js
-var require_endpointResolver = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.js
+var require_endpointResolver3 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultEndpointResolver = undefined;
- var util_endpoints_1 = require_dist_cjs27();
- var ruleset_1 = require_ruleset();
+ var util_endpoints_1 = require_dist_cjs38();
+ var util_endpoints_2 = require_dist_cjs35();
+ var ruleset_1 = require_ruleset3();
+ var cache = new util_endpoints_2.EndpointCache({
+ size: 50,
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
+ });
var defaultEndpointResolver = (endpointParams, context = {}) => {
- return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams,
logger: context.logger
- });
+ }));
};
exports.defaultEndpointResolver = defaultEndpointResolver;
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolv
-var require_runtimeConfig_shared = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolv
+var require_runtimeConfig_shared2 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = undefined;
- var smithy_client_1 = require_dist_cjs16();
- var url_parser_1 = require_dist_cjs39();
- var util_base64_1 = require_dist_cjs10();
- var util_utf8_1 = require_dist_cjs11();
- var endpointResolver_1 = require_endpointResolver();
+ var core_1 = require_dist_cjs24();
+ var core_2 = require_dist_cjs17();
+ var smithy_client_1 = require_dist_cjs22();
+ var url_parser_1 = require_dist_cjs37();
+ var util_base64_1 = require_dist_cjs9();
+ var util_utf8_1 = require_dist_cjs8();
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider3();
+ var endpointResolver_1 = require_endpointResolver3();
var getRuntimeConfig = (config) => {
return {
apiVersion: "2019-06-10",
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
disableHostPrefix: config?.disableHostPrefix ?? false,
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
- extensions: config?.extensions ?? [],
- logger: config?.logger ?? new smithy_client_1.NoOpLogger,
- serviceId: config?.serviceId ?? "SSO",
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
- };
- };
- exports.getRuntimeConfig = getRuntimeConfig;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jss
-var require_dist_cjs50 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- resolveDefaultsModeConfig: () => resolveDefaultsModeConfig
- });
- module.exports = __toCommonJS(src_exports);
- var import_config_resolver = require_dist_cjs30();
- var import_credential_provider_imds = require_dist_cjs45();
- var import_node_config_provider = require_dist_cjs37();
- var import_property_provider = require_dist_cjs25();
- var AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV";
- var AWS_REGION_ENV = "AWS_REGION";
- var AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION";
- var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
- var DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"];
- var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
- var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
- var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
- var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => {
- return env[AWS_DEFAULTS_MODE_ENV];
- },
- configFileSelector: (profile) => {
- return profile[AWS_DEFAULTS_MODE_CONFIG];
- },
- default: "legacy"
- };
- var resolveDefaultsModeConfig = __name(({
- region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS),
- defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS)
- } = {}) => (0, import_property_provider.memoize)(async () => {
- const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
- switch (mode == null ? undefined : mode.toLowerCase()) {
- case "auto":
- return resolveNodeDefaultsModeAuto(region);
- case "in-region":
- case "cross-region":
- case "mobile":
- case "standard":
- case "legacy":
- return Promise.resolve(mode == null ? undefined : mode.toLocaleLowerCase());
- case undefined:
- return Promise.resolve("legacy");
- default:
- throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
- }
- }), "resolveDefaultsModeConfig");
- var resolveNodeDefaultsModeAuto = __name(async (clientRegion) => {
- if (clientRegion) {
- const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
- const inferredRegion = await inferPhysicalRegion();
- if (!inferredRegion) {
- return "standard";
- }
- if (resolvedRegion === inferredRegion) {
- return "in-region";
- } else {
- return "cross-region";
- }
- }
- return "standard";
- }, "resolveNodeDefaultsModeAuto");
- var inferPhysicalRegion = __name(async () => {
- if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {
- return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];
- }
- if (!process.env[ENV_IMDS_DISABLED]) {
- try {
- const endpoint = await (0, import_credential_provider_imds.getInstanceMetadataEndpoint)();
- return (await (0, import_credential_provider_imds.httpRequest)({ ...endpoint, path: IMDS_REGION_PATH })).toString();
- } catch (e) {
- }
- }
- }, "inferPhysicalRegion");
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
+ extensions: config?.extensions ?? [],
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
+ {
+ schemeId: "aws.auth#sigv4",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
+ signer: new core_1.AwsSdkSigV4Signer
+ },
+ {
+ schemeId: "smithy.api#noAuth",
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
+ signer: new core_2.NoAuthSigner
+ }
+ ],
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger,
+ serviceId: config?.serviceId ?? "SSO OIDC",
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
+ };
+ };
+ exports.getRuntimeConfig = getRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_runtimeConfig = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset
+var require_runtimeConfig2 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRuntimeConfig = undefined;
- var tslib_1 = require_tslib2();
+ var tslib_1 = require_tslib();
var package_json_1 = tslib_1.__importDefault(require_package4());
- var core_1 = require_dist_cjs44();
- var util_user_agent_node_1 = require_dist_cjs47();
- var config_resolver_1 = require_dist_cjs30();
- var hash_node_1 = require_dist_cjs48();
- var middleware_retry_1 = require_dist_cjs35();
- var node_config_provider_1 = require_dist_cjs37();
- var node_http_handler_1 = require_dist_cjs14();
- var util_body_length_node_1 = require_dist_cjs49();
- var util_retry_1 = require_dist_cjs34();
- var runtimeConfig_shared_1 = require_runtimeConfig_shared();
- var smithy_client_1 = require_dist_cjs16();
- var util_defaults_mode_node_1 = require_dist_cjs50();
- var smithy_client_2 = require_dist_cjs16();
+ var core_1 = require_dist_cjs24();
+ var util_user_agent_node_1 = require_dist_cjs53();
+ var config_resolver_1 = require_dist_cjs40();
+ var hash_node_1 = require_dist_cjs54();
+ var middleware_retry_1 = require_dist_cjs45();
+ var node_config_provider_1 = require_dist_cjs48();
+ var node_http_handler_1 = require_dist_cjs12();
+ var util_body_length_node_1 = require_dist_cjs55();
+ var util_retry_1 = require_dist_cjs44();
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared2();
+ var smithy_client_1 = require_dist_cjs22();
+ var util_defaults_mode_node_1 = require_dist_cjs56();
+ var smithy_client_2 = require_dist_cjs22();
var getRuntimeConfig = (config) => {
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
(0, core_1.emitWarningIfUnsupportedVersion)(process.version);
+ const loaderConfig = {
+ profile: config?.profile,
+ logger: clientSharedValues.logger
+ };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
- requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
- }),
+ }, config),
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
};
};
exports.getRuntimeConfig = getRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jss
-var require_dist_cjs51 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,
- NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,
- REGION_ENV_NAME: () => REGION_ENV_NAME,
- REGION_INI_NAME: () => REGION_INI_NAME,
- getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,
- resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,
- resolveRegionConfig: () => resolveRegionConfig
- });
- module.exports = __toCommonJS(src_exports);
- var getAwsRegionExtensionConfiguration = __name((runtimeConfig) => {
- let runtimeConfigRegion = __name(async () => {
- if (runtimeConfig.region === undefined) {
- throw new Error("Region is missing from runtimeConfig");
- }
- const region = runtimeConfig.region;
- if (typeof region === "string") {
- return region;
- }
- return region();
- }, "runtimeConfigRegion");
- return {
- setRegion(region) {
- runtimeConfigRegion = region;
- },
- region() {
- return runtimeConfigRegion;
- }
- };
- }, "getAwsRegionExtensionConfiguration");
- var resolveAwsRegionExtensionConfiguration = __name((awsRegionExtensionConfiguration) => {
- return {
- region: awsRegionExtensionConfiguration.region()
- };
- }, "resolveAwsRegionExtensionConfiguration");
- var REGION_ENV_NAME = "AWS_REGION";
- var REGION_INI_NAME = "region";
- var NODE_REGION_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
- configFileSelector: (profile) => profile[REGION_INI_NAME],
- default: () => {
- throw new Error("Region is missing");
- }
- };
- var NODE_REGION_CONFIG_FILE_OPTIONS = {
- preferredFile: "credentials"
- };
- var isFipsRegion = __name((region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")), "isFipsRegion");
- var getRealRegion = __name((region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region, "getRealRegion");
- var resolveRegionConfig = __name((input) => {
- const { region, useFipsEndpoint } = input;
- if (!region) {
- throw new Error("Region is missing");
- }
- return {
- ...input,
- region: async () => {
- if (typeof region === "string") {
- return getRealRegion(region);
- }
- const providedRegion = await region();
- return getRealRegion(providedRegion);
- },
- useFipsEndpoint: async () => {
- const providedRegion = typeof region === "string" ? region : await region();
- if (isFipsRegion(providedRegion)) {
- return true;
- }
- return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
- }
- };
- }, "resolveRegionConfig");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_dist_cjs52 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint
+var require_sso_oidc = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -18356,45 +22727,48 @@ var require_dist_cjs52 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,
- GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,
- GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,
- InvalidRequestException: () => InvalidRequestException2,
- ListAccountRolesCommand: () => ListAccountRolesCommand,
- ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,
- ListAccountsCommand: () => ListAccountsCommand,
- ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,
- LogoutCommand: () => LogoutCommand,
- LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,
- ResourceNotFoundException: () => ResourceNotFoundException,
- RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,
- SSO: () => SSO,
- SSOClient: () => SSOClient,
- SSOServiceException: () => SSOServiceException,
- TooManyRequestsException: () => TooManyRequestsException,
- UnauthorizedException: () => UnauthorizedException,
- __Client: () => import_smithy_client.Client,
- paginateListAccountRoles: () => paginateListAccountRoles,
- paginateListAccounts: () => paginateListAccounts
+ var index_exports = {};
+ __export2(index_exports, {
+ $Command: () => import_smithy_client6.Command,
+ AccessDeniedException: () => AccessDeniedException,
+ AccessDeniedExceptionReason: () => AccessDeniedExceptionReason,
+ AuthorizationPendingException: () => AuthorizationPendingException,
+ CreateTokenCommand: () => CreateTokenCommand,
+ CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,
+ CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,
+ ExpiredTokenException: () => ExpiredTokenException,
+ InternalServerException: () => InternalServerException,
+ InvalidClientException: () => InvalidClientException,
+ InvalidGrantException: () => InvalidGrantException,
+ InvalidRequestException: () => InvalidRequestException,
+ InvalidRequestExceptionReason: () => InvalidRequestExceptionReason,
+ InvalidScopeException: () => InvalidScopeException,
+ SSOOIDC: () => SSOOIDC,
+ SSOOIDCClient: () => SSOOIDCClient,
+ SSOOIDCServiceException: () => SSOOIDCServiceException,
+ SlowDownException: () => SlowDownException,
+ UnauthorizedClientException: () => UnauthorizedClientException,
+ UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,
+ __Client: () => import_smithy_client2.Client
});
- module.exports = __toCommonJS(src_exports);
- var import_middleware_host_header = require_dist_cjs4();
- var import_middleware_logger = require_dist_cjs5();
- var import_middleware_recursion_detection = require_dist_cjs6();
- var import_middleware_user_agent = require_dist_cjs29();
- var import_config_resolver = require_dist_cjs30();
- var import_middleware_content_length = require_dist_cjs32();
- var import_middleware_endpoint = require_dist_cjs41();
- var import_middleware_retry = require_dist_cjs35();
+ module.exports = __toCommonJS(index_exports);
+ var import_middleware_host_header = require_dist_cjs29();
+ var import_middleware_logger = require_dist_cjs30();
+ var import_middleware_recursion_detection = require_dist_cjs31();
+ var import_middleware_user_agent = require_dist_cjs39();
+ var import_config_resolver = require_dist_cjs40();
+ var import_core = require_dist_cjs17();
+ var import_middleware_content_length = require_dist_cjs42();
+ var import_middleware_endpoint = require_dist_cjs49();
+ var import_middleware_retry = require_dist_cjs45();
+ var import_smithy_client2 = require_dist_cjs22();
+ var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider3();
var resolveClientEndpointParameters = __name((options) => {
- return {
- ...options,
+ return Object.assign(options, {
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
useFipsEndpoint: options.useFipsEndpoint ?? false,
- defaultSigningName: "awsssoportal"
- };
+ defaultSigningName: "sso-oauth"
+ });
}, "resolveClientEndpointParameters");
var commonParams = {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
@@ -18402,228 +22776,419 @@ var require_dist_cjs52 = __commonJS((exports, module) => {
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
- var import_runtimeConfig = require_runtimeConfig();
- var import_region_config_resolver = require_dist_cjs51();
+ var import_runtimeConfig = require_runtimeConfig2();
+ var import_region_config_resolver = require_dist_cjs57();
var import_protocol_http = require_dist_cjs2();
- var import_smithy_client = require_dist_cjs16();
- var asPartial = __name((t) => t, "asPartial");
- var resolveRuntimeExtensions = __name((runtimeConfig, extensions) => {
- const extensionConfiguration = {
- ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
+ var import_smithy_client = require_dist_cjs22();
+ var getHttpAuthExtensionConfiguration = __name((runtimeConfig) => {
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
+ let _credentials = runtimeConfig.credentials;
+ return {
+ setHttpAuthScheme(httpAuthScheme) {
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
+ if (index === -1) {
+ _httpAuthSchemes.push(httpAuthScheme);
+ } else {
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
+ }
+ },
+ httpAuthSchemes() {
+ return _httpAuthSchemes;
+ },
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
+ },
+ httpAuthSchemeProvider() {
+ return _httpAuthSchemeProvider;
+ },
+ setCredentials(credentials) {
+ _credentials = credentials;
+ },
+ credentials() {
+ return _credentials;
+ }
};
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ }, "getHttpAuthExtensionConfiguration");
+ var resolveHttpAuthRuntimeConfig = __name((config) => {
return {
- ...runtimeConfig,
- ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
- ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
- ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
+ httpAuthSchemes: config.httpAuthSchemes(),
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
+ credentials: config.credentials()
};
+ }, "resolveHttpAuthRuntimeConfig");
+ var resolveRuntimeExtensions = __name((runtimeConfig, extensions) => {
+ const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
}, "resolveRuntimeExtensions");
- var _SSOClient = class _SSOClient2 extends import_smithy_client.Client {
+ var SSOOIDCClient = class extends import_smithy_client2.Client {
+ static {
+ __name(this, "SSOOIDCClient");
+ }
+ config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
+ super(_config_0);
+ this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
- const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
- const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
- const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
+ const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
+ const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
+ const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
- const _config_6 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_5);
- const _config_7 = resolveRuntimeExtensions(_config_6, (configuration == null ? undefined : configuration.extensions) || []);
- super(_config_7);
- this.config = _config_7;
+ const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
+ this.config = _config_8;
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
+ this.middlewareStack.use((0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
+ httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,
+ identityProviderConfigProvider: __name(async (config) => new import_core.DefaultIdentityProviderConfig({
+ "aws.auth#sigv4": config.credentials
+ }), "identityProviderConfigProvider")
+ }));
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
}
destroy() {
super.destroy();
}
};
- __name(_SSOClient, "SSOClient");
- var SSOClient = _SSOClient;
- var import_middleware_serde = require_dist_cjs40();
- var import_types = require_dist_cjs();
- var _SSOServiceException = class _SSOServiceException2 extends import_smithy_client.ServiceException {
+ var import_smithy_client7 = require_dist_cjs22();
+ var import_middleware_endpoint2 = require_dist_cjs49();
+ var import_middleware_serde = require_dist_cjs5();
+ var import_smithy_client6 = require_dist_cjs22();
+ var import_smithy_client4 = require_dist_cjs22();
+ var import_smithy_client3 = require_dist_cjs22();
+ var SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException {
+ static {
+ __name(this, "SSOOIDCServiceException");
+ }
constructor(options) {
super(options);
- Object.setPrototypeOf(this, _SSOServiceException2.prototype);
+ Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
+ }
+ };
+ var AccessDeniedExceptionReason = {
+ KMS_ACCESS_DENIED: "KMS_AccessDeniedException"
+ };
+ var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {
+ static {
+ __name(this, "AccessDeniedException");
+ }
+ name = "AccessDeniedException";
+ $fault = "client";
+ error;
+ reason;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "AccessDeniedException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
+ this.error = opts.error;
+ this.reason = opts.reason;
+ this.error_description = opts.error_description;
+ }
+ };
+ var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {
+ static {
+ __name(this, "AuthorizationPendingException");
+ }
+ name = "AuthorizationPendingException";
+ $fault = "client";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "AuthorizationPendingException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
+ }
+ };
+ var CreateTokenRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING },
+ ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },
+ ...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING }
+ }), "CreateTokenRequestFilterSensitiveLog");
+ var CreateTokenResponseFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING },
+ ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },
+ ...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING }
+ }), "CreateTokenResponseFilterSensitiveLog");
+ var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {
+ static {
+ __name(this, "ExpiredTokenException");
+ }
+ name = "ExpiredTokenException";
+ $fault = "client";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "ExpiredTokenException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
+ }
+ };
+ var InternalServerException = class _InternalServerException extends SSOOIDCServiceException {
+ static {
+ __name(this, "InternalServerException");
+ }
+ name = "InternalServerException";
+ $fault = "server";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "InternalServerException",
+ $fault: "server",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
+ }
+ };
+ var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {
+ static {
+ __name(this, "InvalidClientException");
+ }
+ name = "InvalidClientException";
+ $fault = "client";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "InvalidClientException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InvalidClientException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
+ }
+ };
+ var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
+ static {
+ __name(this, "InvalidGrantException");
+ }
+ name = "InvalidGrantException";
+ $fault = "client";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "InvalidGrantException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InvalidGrantException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
}
};
- __name(_SSOServiceException, "SSOServiceException");
- var SSOServiceException = _SSOServiceException;
- var _InvalidRequestException = class _InvalidRequestException2 extends SSOServiceException {
+ var InvalidRequestExceptionReason = {
+ KMS_DISABLED_KEY: "KMS_DisabledException",
+ KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException",
+ KMS_INVALID_STATE: "KMS_InvalidStateException",
+ KMS_KEY_NOT_FOUND: "KMS_NotFoundException"
+ };
+ var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {
+ static {
+ __name(this, "InvalidRequestException");
+ }
+ name = "InvalidRequestException";
+ $fault = "client";
+ error;
+ reason;
+ error_description;
constructor(opts) {
super({
name: "InvalidRequestException",
$fault: "client",
...opts
});
- this.name = "InvalidRequestException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidRequestException2.prototype);
+ Object.setPrototypeOf(this, _InvalidRequestException.prototype);
+ this.error = opts.error;
+ this.reason = opts.reason;
+ this.error_description = opts.error_description;
}
};
- __name(_InvalidRequestException, "InvalidRequestException");
- var InvalidRequestException2 = _InvalidRequestException;
- var _ResourceNotFoundException = class _ResourceNotFoundException2 extends SSOServiceException {
+ var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {
+ static {
+ __name(this, "InvalidScopeException");
+ }
+ name = "InvalidScopeException";
+ $fault = "client";
+ error;
+ error_description;
constructor(opts) {
super({
- name: "ResourceNotFoundException",
+ name: "InvalidScopeException",
$fault: "client",
...opts
});
- this.name = "ResourceNotFoundException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _ResourceNotFoundException2.prototype);
+ Object.setPrototypeOf(this, _InvalidScopeException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
}
};
- __name(_ResourceNotFoundException, "ResourceNotFoundException");
- var ResourceNotFoundException = _ResourceNotFoundException;
- var _TooManyRequestsException = class _TooManyRequestsException2 extends SSOServiceException {
+ var SlowDownException = class _SlowDownException extends SSOOIDCServiceException {
+ static {
+ __name(this, "SlowDownException");
+ }
+ name = "SlowDownException";
+ $fault = "client";
+ error;
+ error_description;
constructor(opts) {
super({
- name: "TooManyRequestsException",
+ name: "SlowDownException",
$fault: "client",
...opts
});
- this.name = "TooManyRequestsException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _TooManyRequestsException2.prototype);
+ Object.setPrototypeOf(this, _SlowDownException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
}
};
- __name(_TooManyRequestsException, "TooManyRequestsException");
- var TooManyRequestsException = _TooManyRequestsException;
- var _UnauthorizedException = class _UnauthorizedException2 extends SSOServiceException {
+ var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {
+ static {
+ __name(this, "UnauthorizedClientException");
+ }
+ name = "UnauthorizedClientException";
+ $fault = "client";
+ error;
+ error_description;
constructor(opts) {
super({
- name: "UnauthorizedException",
+ name: "UnauthorizedClientException",
$fault: "client",
...opts
});
- this.name = "UnauthorizedException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _UnauthorizedException2.prototype);
+ Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
}
};
- __name(_UnauthorizedException, "UnauthorizedException");
- var UnauthorizedException = _UnauthorizedException;
- var GetRoleCredentialsRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
- }), "GetRoleCredentialsRequestFilterSensitiveLog");
- var RoleCredentialsFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },
- ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }
- }), "RoleCredentialsFilterSensitiveLog");
- var GetRoleCredentialsResponseFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }
- }), "GetRoleCredentialsResponseFilterSensitiveLog");
- var ListAccountRolesRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
- }), "ListAccountRolesRequestFilterSensitiveLog");
- var ListAccountsRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
- }), "ListAccountsRequestFilterSensitiveLog");
- var LogoutRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }
- }), "LogoutRequestFilterSensitiveLog");
- var import_core = require_dist_cjs43();
- var se_GetRoleCredentialsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xasbt]: input[_aT]
- });
- b.bp("/federation/credentials");
- const query = (0, import_smithy_client.map)({
- [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],
- [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
- });
- let body;
- b.m("GET").h(headers).q(query).b(body);
- return b.build();
- }, "se_GetRoleCredentialsCommand");
- var se_ListAccountRolesCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xasbt]: input[_aT]
- });
- b.bp("/assignment/roles");
- const query = (0, import_smithy_client.map)({
- [_nt]: [, input[_nT]],
- [_mr]: [() => input.maxResults !== undefined, () => input[_mR].toString()],
- [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]
- });
- let body;
- b.m("GET").h(headers).q(query).b(body);
- return b.build();
- }, "se_ListAccountRolesCommand");
- var se_ListAccountsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xasbt]: input[_aT]
- });
- b.bp("/assignment/accounts");
- const query = (0, import_smithy_client.map)({
- [_nt]: [, input[_nT]],
- [_mr]: [() => input.maxResults !== undefined, () => input[_mR].toString()]
- });
- let body;
- b.m("GET").h(headers).q(query).b(body);
- return b.build();
- }, "se_ListAccountsCommand");
- var se_LogoutCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xasbt]: input[_aT]
- });
- b.bp("/logout");
+ var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
+ static {
+ __name(this, "UnsupportedGrantTypeException");
+ }
+ name = "UnsupportedGrantTypeException";
+ $fault = "client";
+ error;
+ error_description;
+ constructor(opts) {
+ super({
+ name: "UnsupportedGrantTypeException",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
+ this.error = opts.error;
+ this.error_description = opts.error_description;
+ }
+ };
+ var import_core2 = require_dist_cjs24();
+ var import_core3 = require_dist_cjs17();
+ var import_smithy_client5 = require_dist_cjs22();
+ var se_CreateTokenCommand = __name(async (input, context) => {
+ const b = (0, import_core3.requestBuilder)(input, context);
+ const headers = {
+ "content-type": "application/json"
+ };
+ b.bp("/token");
let body;
+ body = JSON.stringify((0, import_smithy_client5.take)(input, {
+ clientId: [],
+ clientSecret: [],
+ code: [],
+ codeVerifier: [],
+ deviceCode: [],
+ grantType: [],
+ redirectUri: [],
+ refreshToken: [],
+ scope: __name((_) => (0, import_smithy_client5._json)(_), "scope")
+ }));
b.m("POST").h(headers).b(body);
return b.build();
- }, "se_LogoutCommand");
- var de_GetRoleCredentialsCommand = __name(async (output, context) => {
+ }, "se_CreateTokenCommand");
+ var de_CreateTokenCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetRoleCredentialsCommandError(output, context);
+ return de_CommandError(output, context);
}
- const contents = (0, import_smithy_client.map)({
+ const contents = (0, import_smithy_client5.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, import_smithy_client.take)(data, {
- roleCredentials: import_smithy_client._json
+ const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
+ const doc = (0, import_smithy_client5.take)(data, {
+ accessToken: import_smithy_client5.expectString,
+ expiresIn: import_smithy_client5.expectInt32,
+ idToken: import_smithy_client5.expectString,
+ refreshToken: import_smithy_client5.expectString,
+ tokenType: import_smithy_client5.expectString
});
Object.assign(contents, doc);
return contents;
- }, "de_GetRoleCredentialsCommand");
- var de_GetRoleCredentialsCommandError = __name(async (output, context) => {
+ }, "de_CreateTokenCommand");
+ var de_CommandError = __name(async (output, context) => {
const parsedOutput = {
...output,
- body: await parseErrorBody(output.body, context)
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
};
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
switch (errorCode) {
+ case "AccessDeniedException":
+ case "com.amazonaws.ssooidc#AccessDeniedException":
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
+ case "AuthorizationPendingException":
+ case "com.amazonaws.ssooidc#AuthorizationPendingException":
+ throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
+ case "ExpiredTokenException":
+ case "com.amazonaws.ssooidc#ExpiredTokenException":
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
+ case "InternalServerException":
+ case "com.amazonaws.ssooidc#InternalServerException":
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
+ case "InvalidClientException":
+ case "com.amazonaws.ssooidc#InvalidClientException":
+ throw await de_InvalidClientExceptionRes(parsedOutput, context);
+ case "InvalidGrantException":
+ case "com.amazonaws.ssooidc#InvalidGrantException":
+ throw await de_InvalidGrantExceptionRes(parsedOutput, context);
case "InvalidRequestException":
- case "com.amazonaws.sso#InvalidRequestException":
+ case "com.amazonaws.ssooidc#InvalidRequestException":
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "ResourceNotFoundException":
- case "com.amazonaws.sso#ResourceNotFoundException":
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
- case "TooManyRequestsException":
- case "com.amazonaws.sso#TooManyRequestsException":
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
- case "UnauthorizedException":
- case "com.amazonaws.sso#UnauthorizedException":
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
+ case "InvalidScopeException":
+ case "com.amazonaws.ssooidc#InvalidScopeException":
+ throw await de_InvalidScopeExceptionRes(parsedOutput, context);
+ case "SlowDownException":
+ case "com.amazonaws.ssooidc#SlowDownException":
+ throw await de_SlowDownExceptionRes(parsedOutput, context);
+ case "UnauthorizedClientException":
+ case "com.amazonaws.ssooidc#UnauthorizedClientException":
+ throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
+ case "UnsupportedGrantTypeException":
+ case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
+ throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
@@ -18632,1636 +23197,1836 @@ var require_dist_cjs52 = __commonJS((exports, module) => {
errorCode
});
}
- }, "de_GetRoleCredentialsCommandError");
- var de_ListAccountRolesCommand = __name(async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListAccountRolesCommandError(output, context);
- }
- const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ }, "de_CommandError");
+ var throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException);
+ var de_AccessDeniedExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString,
+ reason: import_smithy_client5.expectString
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, import_smithy_client.take)(data, {
- nextToken: import_smithy_client.expectString,
- roleList: import_smithy_client._json
+ Object.assign(contents, doc);
+ const exception = new AccessDeniedException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_AccessDeniedExceptionRes");
+ var de_AuthorizationPendingExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- return contents;
- }, "de_ListAccountRolesCommand");
- var de_ListAccountRolesCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InvalidRequestException":
- case "com.amazonaws.sso#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "ResourceNotFoundException":
- case "com.amazonaws.sso#ResourceNotFoundException":
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
- case "TooManyRequestsException":
- case "com.amazonaws.sso#TooManyRequestsException":
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
- case "UnauthorizedException":
- case "com.amazonaws.sso#UnauthorizedException":
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_ListAccountRolesCommandError");
- var de_ListAccountsCommand = __name(async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListAccountsCommandError(output, context);
- }
- const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ const exception = new AuthorizationPendingException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, import_smithy_client.take)(data, {
- accountList: import_smithy_client._json,
- nextToken: import_smithy_client.expectString
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_AuthorizationPendingExceptionRes");
+ var de_ExpiredTokenExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- return contents;
- }, "de_ListAccountsCommand");
- var de_ListAccountsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InvalidRequestException":
- case "com.amazonaws.sso#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "ResourceNotFoundException":
- case "com.amazonaws.sso#ResourceNotFoundException":
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
- case "TooManyRequestsException":
- case "com.amazonaws.sso#TooManyRequestsException":
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
- case "UnauthorizedException":
- case "com.amazonaws.sso#UnauthorizedException":
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_ListAccountsCommandError");
- var de_LogoutCommand = __name(async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_LogoutCommandError(output, context);
- }
- const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ const exception = new ExpiredTokenException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_ExpiredTokenExceptionRes");
+ var de_InternalServerExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new InternalServerException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InternalServerExceptionRes");
+ var de_InvalidClientExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new InvalidClientException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
});
- await (0, import_smithy_client.collectBody)(output.body, context);
- return contents;
- }, "de_LogoutCommand");
- var de_LogoutCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InvalidRequestException":
- case "com.amazonaws.sso#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "TooManyRequestsException":
- case "com.amazonaws.sso#TooManyRequestsException":
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
- case "UnauthorizedException":
- case "com.amazonaws.sso#UnauthorizedException":
- throw await de_UnauthorizedExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_LogoutCommandError");
- var throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidClientExceptionRes");
+ var de_InvalidGrantExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new InvalidGrantException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidGrantExceptionRes");
var de_InvalidRequestExceptionRes = __name(async (parsedOutput, context) => {
- const contents = (0, import_smithy_client.map)({});
+ const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
- const doc = (0, import_smithy_client.take)(data, {
- message: import_smithy_client.expectString
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString,
+ reason: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- const exception = new InvalidRequestException2({
+ const exception = new InvalidRequestException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidRequestExceptionRes");
- var de_ResourceNotFoundExceptionRes = __name(async (parsedOutput, context) => {
- const contents = (0, import_smithy_client.map)({});
+ var de_InvalidScopeExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
- const doc = (0, import_smithy_client.take)(data, {
- message: import_smithy_client.expectString
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- const exception = new ResourceNotFoundException({
+ const exception = new InvalidScopeException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
- }, "de_ResourceNotFoundExceptionRes");
- var de_TooManyRequestsExceptionRes = __name(async (parsedOutput, context) => {
- const contents = (0, import_smithy_client.map)({});
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidScopeExceptionRes");
+ var de_SlowDownExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
- const doc = (0, import_smithy_client.take)(data, {
- message: import_smithy_client.expectString
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- const exception = new TooManyRequestsException({
+ const exception = new SlowDownException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
- }, "de_TooManyRequestsExceptionRes");
- var de_UnauthorizedExceptionRes = __name(async (parsedOutput, context) => {
- const contents = (0, import_smithy_client.map)({});
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_SlowDownExceptionRes");
+ var de_UnauthorizedClientExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
const data = parsedOutput.body;
- const doc = (0, import_smithy_client.take)(data, {
- message: import_smithy_client.expectString
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
});
Object.assign(contents, doc);
- const exception = new UnauthorizedException({
+ const exception = new UnauthorizedClientException({
$metadata: deserializeMetadata(parsedOutput),
...contents
});
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
- }, "de_UnauthorizedExceptionRes");
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_UnauthorizedClientExceptionRes");
+ var de_UnsupportedGrantTypeExceptionRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client5.map)({});
+ const data = parsedOutput.body;
+ const doc = (0, import_smithy_client5.take)(data, {
+ error: import_smithy_client5.expectString,
+ error_description: import_smithy_client5.expectString
+ });
+ Object.assign(contents, doc);
+ const exception = new UnsupportedGrantTypeException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_UnsupportedGrantTypeExceptionRes");
var deserializeMetadata = __name((output) => ({
httpStatusCode: output.statusCode,
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
extendedRequestId: output.headers["x-amz-id-2"],
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
- var collectBodyString = __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
- var isSerializableHeaderValue = __name((value) => value !== undefined && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
- var _aI = "accountId";
- var _aT = "accessToken";
- var _ai = "account_id";
- var _mR = "maxResults";
- var _mr = "max_result";
- var _nT = "nextToken";
- var _nt = "next_token";
- var _rN = "roleName";
- var _rn = "role_name";
- var _xasbt = "x-amz-sso_bearer_token";
- var parseBody = __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
- if (encoded.length) {
- return JSON.parse(encoded);
+ var CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("AWSSSOOIDCService", "CreateToken", {}).n("SSOOIDCClient", "CreateTokenCommand").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {
+ static {
+ __name(this, "CreateTokenCommand");
}
- return {};
- }), "parseBody");
- var parseErrorBody = __name(async (errorBody, context) => {
- const value = await parseBody(errorBody, context);
- value.message = value.message ?? value.Message;
- return value;
- }, "parseErrorBody");
- var loadRestJsonErrorCode = __name((output, data) => {
- const findKey = __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
- const sanitizeErrorCode = __name((rawValue) => {
- let cleanValue = rawValue;
- if (typeof cleanValue === "number") {
- cleanValue = cleanValue.toString();
- }
- if (cleanValue.indexOf(",") >= 0) {
- cleanValue = cleanValue.split(",")[0];
+ };
+ var commands = {
+ CreateTokenCommand
+ };
+ var SSOOIDC = class extends SSOOIDCClient {
+ static {
+ __name(this, "SSOOIDC");
+ }
+ };
+ (0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC);
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs59 = __commonJS((exports, module) => {
+ var __create2 = Object.create;
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __getProtoOf2 = Object.getPrototypeOf;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+ };
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod));
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ fromEnvSigningName: () => fromEnvSigningName,
+ fromSso: () => fromSso,
+ fromStatic: () => fromStatic,
+ nodeProvider: () => nodeProvider
+ });
+ module.exports = __toCommonJS(index_exports);
+ var import_client = require_client();
+ var import_httpAuthSchemes = require_httpAuthSchemes();
+ var import_property_provider = require_dist_cjs18();
+ var fromEnvSigningName = __name(({ logger: logger4, signingName } = {}) => async () => {
+ logger4?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
+ if (!signingName) {
+ throw new import_property_provider.TokenProviderError("Please pass 'signingName' to compute environment variable key", { logger: logger4 });
+ }
+ const bearerTokenKey = (0, import_httpAuthSchemes.getBearerTokenEnvKey)(signingName);
+ if (!(bearerTokenKey in process.env)) {
+ throw new import_property_provider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger: logger4 });
+ }
+ const token = { token: process.env[bearerTokenKey] };
+ (0, import_client.setTokenFeature)(token, "BEARER_SERVICE_ENV_VARS", "3");
+ return token;
+ }, "fromEnvSigningName");
+ var EXPIRE_WINDOW_MS = 5 * 60 * 1000;
+ var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
+ var getSsoOidcClient = __name(async (ssoRegion, init = {}) => {
+ const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM2(require_sso_oidc()));
+ const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
+ region: ssoRegion ?? init.clientConfig?.region,
+ logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger
+ }));
+ return ssoOidcClient;
+ }, "getSsoOidcClient");
+ var getNewSsoOidcToken = __name(async (ssoToken, ssoRegion, init = {}) => {
+ const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM2(require_sso_oidc()));
+ const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);
+ return ssoOidcClient.send(new CreateTokenCommand({
+ clientId: ssoToken.clientId,
+ clientSecret: ssoToken.clientSecret,
+ refreshToken: ssoToken.refreshToken,
+ grantType: "refresh_token"
+ }));
+ }, "getNewSsoOidcToken");
+ var validateTokenExpiry = __name((token) => {
+ if (token.expiration && token.expiration.getTime() < Date.now()) {
+ throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
+ }
+ }, "validateTokenExpiry");
+ var validateTokenKey = __name((key, value, forRefresh = false) => {
+ if (typeof value === "undefined") {
+ throw new import_property_provider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
+ }
+ }, "validateTokenKey");
+ var import_shared_ini_file_loader = require_dist_cjs47();
+ var import_fs = __require("fs");
+ var { writeFile } = import_fs.promises;
+ var writeSSOTokenToFile = __name((id, ssoToken) => {
+ const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);
+ const tokenString = JSON.stringify(ssoToken, null, 2);
+ return writeFile(tokenFilepath, tokenString);
+ }, "writeSSOTokenToFile");
+ var lastRefreshAttemptTime = new Date(0);
+ var fromSso = __name((_init = {}) => async ({ callerClientConfig } = {}) => {
+ const init = {
+ ..._init,
+ parentClientConfig: {
+ ...callerClientConfig,
+ ..._init.parentClientConfig
}
- if (cleanValue.indexOf(":") >= 0) {
- cleanValue = cleanValue.split(":")[0];
+ };
+ init.logger?.debug("@aws-sdk/token-providers - fromSso");
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)({
+ profile: init.profile ?? callerClientConfig?.profile
+ });
+ const profile = profiles[profileName];
+ if (!profile) {
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
+ } else if (!profile["sso_session"]) {
+ throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
+ }
+ const ssoSessionName = profile["sso_session"];
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
+ const ssoSession = ssoSessions[ssoSessionName];
+ if (!ssoSession) {
+ throw new import_property_provider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
+ }
+ for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
+ if (!ssoSession[ssoSessionRequiredKey]) {
+ throw new import_property_provider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
}
- if (cleanValue.indexOf("#") >= 0) {
- cleanValue = cleanValue.split("#")[1];
+ }
+ const ssoStartUrl = ssoSession["sso_start_url"];
+ const ssoRegion = ssoSession["sso_region"];
+ let ssoToken;
+ try {
+ ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);
+ } catch (e) {
+ throw new import_property_provider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
+ }
+ validateTokenKey("accessToken", ssoToken.accessToken);
+ validateTokenKey("expiresAt", ssoToken.expiresAt);
+ const { accessToken, expiresAt } = ssoToken;
+ const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
+ if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
+ return existingToken;
+ }
+ if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {
+ validateTokenExpiry(existingToken);
+ return existingToken;
+ }
+ validateTokenKey("clientId", ssoToken.clientId, true);
+ validateTokenKey("clientSecret", ssoToken.clientSecret, true);
+ validateTokenKey("refreshToken", ssoToken.refreshToken, true);
+ try {
+ lastRefreshAttemptTime.setTime(Date.now());
+ const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);
+ validateTokenKey("accessToken", newSsoOidcToken.accessToken);
+ validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
+ const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
+ try {
+ await writeSSOTokenToFile(ssoSessionName, {
+ ...ssoToken,
+ accessToken: newSsoOidcToken.accessToken,
+ expiresAt: newTokenExpiration.toISOString(),
+ refreshToken: newSsoOidcToken.refreshToken
+ });
+ } catch (error) {
}
- return cleanValue;
- }, "sanitizeErrorCode");
- const headerKey = findKey(output.headers, "x-amzn-errortype");
- if (headerKey !== undefined) {
- return sanitizeErrorCode(output.headers[headerKey]);
+ return {
+ token: newSsoOidcToken.accessToken,
+ expiration: newTokenExpiration
+ };
+ } catch (error) {
+ validateTokenExpiry(existingToken);
+ return existingToken;
}
- if (data.code !== undefined) {
- return sanitizeErrorCode(data.code);
+ }, "fromSso");
+ var fromStatic = __name(({ token, logger: logger4 }) => async () => {
+ logger4?.debug("@aws-sdk/token-providers - fromStatic");
+ if (!token || !token.token) {
+ throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
}
- if (data["__type"] !== undefined) {
- return sanitizeErrorCode(data["__type"]);
+ return token;
+ }, "fromStatic");
+ var nodeProvider = __name((init = {}) => (0, import_property_provider.memoize)((0, import_property_provider.chain)(fromSso(init), async () => {
+ throw new import_property_provider.TokenProviderError("Could not load token from any providers", false);
+ }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined), "nodeProvider");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_dist_cjs60 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __esm = (fn, res) => function __init() {
+ return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
+ };
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
+ };
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- }, "loadRestJsonErrorCode");
- var _GetRoleCredentialsCommand = class _GetRoleCredentialsCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("SWBPortalService", "GetRoleCredentials", {}).n("SSOClient", "GetRoleCredentialsCommand").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {
+ return to;
};
- __name(_GetRoleCredentialsCommand, "GetRoleCredentialsCommand");
- var GetRoleCredentialsCommand = _GetRoleCredentialsCommand;
- var _ListAccountRolesCommand = class _ListAccountRolesCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("SWBPortalService", "ListAccountRoles", {}).n("SSOClient", "ListAccountRolesCommand").f(ListAccountRolesRequestFilterSensitiveLog, undefined).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var loadSso_exports = {};
+ __export2(loadSso_exports, {
+ GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,
+ SSOClient: () => import_client_sso.SSOClient
+ });
+ var import_client_sso;
+ var init_loadSso = __esm({
+ "src/loadSso.ts"() {
+ import_client_sso = require_dist_cjs58();
+ }
+ });
+ var index_exports = {};
+ __export2(index_exports, {
+ fromSSO: () => fromSSO,
+ isSsoProfile: () => isSsoProfile,
+ validateSsoProfile: () => validateSsoProfile
+ });
+ module.exports = __toCommonJS(index_exports);
+ var isSsoProfile = __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
+ var import_client = require_client();
+ var import_token_providers = require_dist_cjs59();
+ var import_property_provider = require_dist_cjs18();
+ var import_shared_ini_file_loader = require_dist_cjs47();
+ var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
+ var resolveSSOCredentials = __name(async ({
+ ssoStartUrl,
+ ssoSession,
+ ssoAccountId,
+ ssoRegion,
+ ssoRoleName,
+ ssoClient,
+ clientConfig,
+ parentClientConfig,
+ profile,
+ filepath,
+ configFilepath,
+ ignoreCache,
+ logger: logger4
+ }) => {
+ let token;
+ const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
+ if (ssoSession) {
+ try {
+ const _token = await (0, import_token_providers.fromSso)({
+ profile,
+ filepath,
+ configFilepath,
+ ignoreCache
+ })();
+ token = {
+ accessToken: _token.token,
+ expiresAt: new Date(_token.expiration).toISOString()
+ };
+ } catch (e) {
+ throw new import_property_provider.CredentialsProviderError(e.message, {
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
+ logger: logger4
+ });
+ }
+ } else {
+ try {
+ token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);
+ } catch (e) {
+ throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
+ logger: logger4
+ });
+ }
+ }
+ if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
+ throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
+ logger: logger4
+ });
+ }
+ const { accessToken } = token;
+ const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));
+ const sso = ssoClient || new SSOClient2(Object.assign({}, clientConfig ?? {}, {
+ logger: clientConfig?.logger ?? parentClientConfig?.logger,
+ region: clientConfig?.region ?? ssoRegion
+ }));
+ let ssoResp;
+ try {
+ ssoResp = await sso.send(new GetRoleCredentialsCommand2({
+ accountId: ssoAccountId,
+ roleName: ssoRoleName,
+ accessToken
+ }));
+ } catch (e) {
+ throw new import_property_provider.CredentialsProviderError(e, {
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
+ logger: logger4
+ });
+ }
+ const {
+ roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}
+ } = ssoResp;
+ if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
+ throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", {
+ tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
+ logger: logger4
+ });
+ }
+ const credentials = {
+ accessKeyId,
+ secretAccessKey,
+ sessionToken,
+ expiration: new Date(expiration),
+ ...credentialScope && { credentialScope },
+ ...accountId && { accountId }
+ };
+ if (ssoSession) {
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO", "s");
+ } else {
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_SSO_LEGACY", "u");
+ }
+ return credentials;
+ }, "resolveSSOCredentials");
+ var validateSsoProfile = __name((profile, logger4) => {
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
+ if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
+ throw new import_property_provider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
+Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger: logger4 });
+ }
+ return profile;
+ }, "validateSsoProfile");
+ var fromSSO = __name((init = {}) => async ({ callerClientConfig } = {}) => {
+ init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
+ const { ssoClient } = init;
+ const profileName = (0, import_shared_ini_file_loader.getProfileName)({
+ profile: init.profile ?? callerClientConfig?.profile
+ });
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
+ const profile = profiles[profileName];
+ if (!profile) {
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
+ }
+ if (!isSsoProfile(profile)) {
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
+ logger: init.logger
+ });
+ }
+ if (profile?.sso_session) {
+ const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
+ const session = ssoSessions[profile.sso_session];
+ const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
+ if (ssoRegion && ssoRegion !== session.sso_region) {
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
+ tryNextLink: false,
+ logger: init.logger
+ });
+ }
+ if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
+ throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
+ tryNextLink: false,
+ logger: init.logger
+ });
+ }
+ profile.sso_region = session.sso_region;
+ profile.sso_start_url = session.sso_start_url;
+ }
+ const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile, init.logger);
+ return resolveSSOCredentials({
+ ssoStartUrl: sso_start_url,
+ ssoSession: sso_session,
+ ssoAccountId: sso_account_id,
+ ssoRegion: sso_region,
+ ssoRoleName: sso_role_name,
+ ssoClient,
+ clientConfig: init.clientConfig,
+ parentClientConfig: init.parentClientConfig,
+ profile: profileName,
+ filepath: init.filepath,
+ configFilepath: init.configFilepath,
+ ignoreCache: init.ignoreCache,
+ logger: init.logger
+ });
+ } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
+ throw new import_property_provider.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
+ } else {
+ return resolveSSOCredentials({
+ ssoStartUrl,
+ ssoSession,
+ ssoAccountId,
+ ssoRegion,
+ ssoRoleName,
+ ssoClient,
+ clientConfig: init.clientConfig,
+ parentClientConfig: init.parentClientConfig,
+ profile: profileName,
+ filepath: init.filepath,
+ configFilepath: init.configFilepath,
+ ignoreCache: init.ignoreCache,
+ logger: init.logger
+ });
+ }
+ }, "fromSSO");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver
+var require_httpAuthSchemeProvider4 = __commonJS((exports) => {
+ var createAwsAuthSigv4HttpAuthOption = function(authParameters) {
+ return {
+ schemeId: "aws.auth#sigv4",
+ signingProperties: {
+ name: "sts",
+ region: authParameters.region
+ },
+ propertiesExtractor: (config, context) => ({
+ signingProperties: {
+ config,
+ context
+ }
+ })
+ };
};
- __name(_ListAccountRolesCommand, "ListAccountRolesCommand");
- var ListAccountRolesCommand = _ListAccountRolesCommand;
- var _ListAccountsCommand = class _ListAccountsCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("SWBPortalService", "ListAccounts", {}).n("SSOClient", "ListAccountsCommand").f(ListAccountsRequestFilterSensitiveLog, undefined).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {
+ var createSmithyApiNoAuthHttpAuthOption = function(authParameters) {
+ return {
+ schemeId: "smithy.api#noAuth"
+ };
};
- __name(_ListAccountsCommand, "ListAccountsCommand");
- var ListAccountsCommand = _ListAccountsCommand;
- var _LogoutCommand = class _LogoutCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("SWBPortalService", "Logout", {}).n("SSOClient", "LogoutCommand").f(LogoutRequestFilterSensitiveLog, undefined).ser(se_LogoutCommand).de(de_LogoutCommand).build() {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = undefined;
+ var core_1 = require_dist_cjs24();
+ var util_middleware_1 = require_dist_cjs4();
+ var STSClient_1 = require_STSClient();
+ var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
+ return {
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
+ })()
+ };
};
- __name(_LogoutCommand, "LogoutCommand");
- var LogoutCommand = _LogoutCommand;
- var commands = {
- GetRoleCredentialsCommand,
- ListAccountRolesCommand,
- ListAccountsCommand,
- LogoutCommand
+ exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
+ var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
+ const options = [];
+ switch (authParameters.operation) {
+ case "AssumeRoleWithWebIdentity": {
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
+ break;
+ }
+ default: {
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
+ }
+ }
+ return options;
};
- var _SSO = class _SSO2 extends SSOClient {
+ exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
+ var resolveStsAuthConfig = (input) => Object.assign(input, {
+ stsClientCtor: STSClient_1.STSClient
+ });
+ exports.resolveStsAuthConfig = resolveStsAuthConfig;
+ var resolveHttpAuthSchemeConfig = (config) => {
+ const config_0 = (0, exports.resolveStsAuthConfig)(config);
+ const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);
+ return Object.assign(config_1, {
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
+ });
};
- __name(_SSO, "SSO");
- var SSO = _SSO;
- (0, import_smithy_client.createAggregatedClient)(commands, SSO);
- var paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults");
- var paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults");
- var import_util_endpoints = require_dist_cjs28();
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js
-var require_client_sso_oidc_node = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver
+var require_EndpointParameters = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.SSOOIDCClient = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.CreateTokenCommand = exports.AuthorizationPendingException = exports.AccessDeniedException = undefined;
- var middleware_host_header_1 = require_dist_cjs4();
- var middleware_logger_1 = require_dist_cjs5();
- var middleware_recursion_detection_1 = require_dist_cjs6();
- var middleware_user_agent_1 = require_dist_cjs29();
- var config_resolver_1 = require_dist_cjs30();
- var middleware_content_length_1 = require_dist_cjs32();
- var middleware_endpoint_1 = require_dist_cjs41();
- var middleware_retry_1 = require_dist_cjs35();
- var smithy_client_1 = require_dist_cjs16();
+ exports.commonParams = exports.resolveClientEndpointParameters = undefined;
var resolveClientEndpointParameters = (options) => {
- var _a, _b;
- return {
- ...options,
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== undefined ? _a : false,
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== undefined ? _b : false,
- defaultSigningName: "awsssooidc"
- };
+ return Object.assign(options, {
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
+ defaultSigningName: "sts"
+ });
};
- var package_default = { version: "3.429.0" };
- var util_user_agent_node_1 = require_dist_cjs47();
- var config_resolver_2 = require_dist_cjs30();
- var hash_node_1 = require_dist_cjs48();
- var middleware_retry_2 = require_dist_cjs35();
- var node_config_provider_1 = require_dist_cjs37();
- var node_http_handler_1 = require_dist_cjs14();
- var util_body_length_node_1 = require_dist_cjs49();
- var util_retry_1 = require_dist_cjs34();
- var smithy_client_2 = require_dist_cjs16();
- var url_parser_1 = require_dist_cjs39();
- var util_base64_1 = require_dist_cjs10();
- var util_utf8_1 = require_dist_cjs11();
- var util_endpoints_1 = require_dist_cjs27();
- var s = "required";
- var t = "fn";
- var u = "argv";
- var v = "ref";
- var a = "isSet";
- var b = "tree";
- var c = "error";
- var d = "endpoint";
- var e = "PartitionResult";
- var f = "getAttr";
- var g = { [s]: false, type: "String" };
- var h = { [s]: true, default: false, type: "Boolean" };
- var i = { [v]: "Endpoint" };
- var j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] };
- var k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] };
- var l = {};
- var m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] };
- var n = { [v]: e };
- var o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] };
- var p = [j];
- var q = [k];
- var r = [{ [v]: "Region" }];
- var _data = {
- version: "1.0",
- parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g },
- rules: [
- {
- conditions: [{ [t]: a, [u]: [i] }],
- type: b,
- rules: [
- { conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c },
- { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c },
- { endpoint: { url: i, properties: l, headers: l }, type: d }
- ]
- },
- {
- conditions: [{ [t]: a, [u]: r }],
- type: b,
- rules: [
- {
- conditions: [{ [t]: "aws.partition", [u]: r, assign: e }],
- type: b,
- rules: [
- {
- conditions: [j, k],
- type: b,
- rules: [
- {
- conditions: [m, o],
- type: b,
- rules: [
- {
- endpoint: {
- url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
- properties: l,
- headers: l
- },
- type: d
- }
- ]
- },
- { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }
- ]
- },
- {
- conditions: p,
- type: b,
- rules: [
- {
- conditions: [m],
- type: b,
- rules: [
- {
- conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }],
- endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: l, headers: l },
- type: d
- },
- {
- endpoint: {
- url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
- properties: l,
- headers: l
- },
- type: d
- }
- ]
- },
- { error: "FIPS is enabled but this partition does not support FIPS", type: c }
- ]
- },
- {
- conditions: q,
- type: b,
- rules: [
- {
- conditions: [o],
- type: b,
- rules: [
- {
- endpoint: {
- url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
- properties: l,
- headers: l
- },
- type: d
- }
- ]
- },
- { error: "DualStack is enabled but this partition does not support DualStack", type: c }
- ]
- },
- {
- endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l },
- type: d
- }
- ]
- }
- ]
- },
- { error: "Invalid Configuration: Missing Region", type: c }
- ]
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
+ exports.commonParams = {
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
+ Endpoint: { type: "builtInParams", name: "endpoint" },
+ Region: { type: "builtInParams", name: "region" },
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
- var ruleSet = _data;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rules
+var require_ruleset4 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.ruleSet = undefined;
+ var F = "required";
+ var G = "type";
+ var H = "fn";
+ var I = "argv";
+ var J = "ref";
+ var a = false;
+ var b = true;
+ var c = "booleanEquals";
+ var d = "stringEquals";
+ var e = "sigv4";
+ var f = "sts";
+ var g = "us-east-1";
+ var h = "endpoint";
+ var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
+ var j = "tree";
+ var k = "error";
+ var l = "getAttr";
+ var m = { [F]: false, [G]: "String" };
+ var n = { [F]: true, default: false, [G]: "Boolean" };
+ var o = { [J]: "Endpoint" };
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
+ var q = { [J]: "Region" };
+ var r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" };
+ var s = { [J]: "UseFIPS" };
+ var t = { [J]: "UseDualStack" };
+ var u = { url: "https://sts.amazonaws.com", properties: { authSchemes: [{ name: e, signingName: f, signingRegion: g }] }, headers: {} };
+ var v = {};
+ var w = { conditions: [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h };
+ var x = { [H]: c, [I]: [s, true] };
+ var y = { [H]: c, [I]: [t, true] };
+ var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
+ var A = { [J]: "PartitionResult" };
+ var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
+ var C = [{ [H]: "isSet", [I]: [o] }];
+ var D = [x];
+ var E = [y];
+ var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
+ exports.ruleSet = _data;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolv
+var require_endpointResolver4 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.defaultEndpointResolver = undefined;
+ var util_endpoints_1 = require_dist_cjs38();
+ var util_endpoints_2 = require_dist_cjs35();
+ var ruleset_1 = require_ruleset4();
+ var cache = new util_endpoints_2.EndpointCache({
+ size: 50,
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
+ });
var defaultEndpointResolver = (endpointParams, context = {}) => {
- return (0, util_endpoints_1.resolveEndpoint)(ruleSet, {
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
endpointParams,
logger: context.logger
- });
+ }));
};
+ exports.defaultEndpointResolver = defaultEndpointResolver;
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.j
+var require_runtimeConfig_shared3 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getRuntimeConfig = undefined;
+ var core_1 = require_dist_cjs24();
+ var core_2 = require_dist_cjs17();
+ var smithy_client_1 = require_dist_cjs22();
+ var url_parser_1 = require_dist_cjs37();
+ var util_base64_1 = require_dist_cjs9();
+ var util_utf8_1 = require_dist_cjs8();
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
+ var endpointResolver_1 = require_endpointResolver4();
var getRuntimeConfig = (config) => {
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
return {
- apiVersion: "2019-06-10",
- base64Decoder: (_a = config === null || config === undefined ? undefined : config.base64Decoder) !== null && _a !== undefined ? _a : util_base64_1.fromBase64,
- base64Encoder: (_b = config === null || config === undefined ? undefined : config.base64Encoder) !== null && _b !== undefined ? _b : util_base64_1.toBase64,
- disableHostPrefix: (_c = config === null || config === undefined ? undefined : config.disableHostPrefix) !== null && _c !== undefined ? _c : false,
- endpointProvider: (_d = config === null || config === undefined ? undefined : config.endpointProvider) !== null && _d !== undefined ? _d : defaultEndpointResolver,
- extensions: (_e = config === null || config === undefined ? undefined : config.extensions) !== null && _e !== undefined ? _e : [],
- logger: (_f = config === null || config === undefined ? undefined : config.logger) !== null && _f !== undefined ? _f : new smithy_client_2.NoOpLogger,
- serviceId: (_g = config === null || config === undefined ? undefined : config.serviceId) !== null && _g !== undefined ? _g : "SSO OIDC",
- urlParser: (_h = config === null || config === undefined ? undefined : config.urlParser) !== null && _h !== undefined ? _h : url_parser_1.parseUrl,
- utf8Decoder: (_j = config === null || config === undefined ? undefined : config.utf8Decoder) !== null && _j !== undefined ? _j : util_utf8_1.fromUtf8,
- utf8Encoder: (_k = config === null || config === undefined ? undefined : config.utf8Encoder) !== null && _k !== undefined ? _k : util_utf8_1.toUtf8
+ apiVersion: "2011-06-15",
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
+ disableHostPrefix: config?.disableHostPrefix ?? false,
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
+ extensions: config?.extensions ?? [],
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
+ {
+ schemeId: "aws.auth#sigv4",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
+ signer: new core_1.AwsSdkSigV4Signer
+ },
+ {
+ schemeId: "smithy.api#noAuth",
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
+ signer: new core_2.NoAuthSigner
+ }
+ ],
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger,
+ serviceId: config?.serviceId ?? "STS",
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
};
};
- var smithy_client_3 = require_dist_cjs16();
- var util_defaults_mode_node_1 = require_dist_cjs50();
- var smithy_client_4 = require_dist_cjs16();
- var getRuntimeConfig2 = (config) => {
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
- (0, smithy_client_4.emitWarningIfUnsupportedVersion)(process.version);
+ exports.getRuntimeConfig = getRuntimeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ru
+var require_runtimeConfig3 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getRuntimeConfig = undefined;
+ var tslib_1 = require_tslib();
+ var package_json_1 = tslib_1.__importDefault(require_package4());
+ var core_1 = require_dist_cjs24();
+ var util_user_agent_node_1 = require_dist_cjs53();
+ var config_resolver_1 = require_dist_cjs40();
+ var core_2 = require_dist_cjs17();
+ var hash_node_1 = require_dist_cjs54();
+ var middleware_retry_1 = require_dist_cjs45();
+ var node_config_provider_1 = require_dist_cjs48();
+ var node_http_handler_1 = require_dist_cjs12();
+ var util_body_length_node_1 = require_dist_cjs55();
+ var util_retry_1 = require_dist_cjs44();
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared3();
+ var smithy_client_1 = require_dist_cjs22();
+ var util_defaults_mode_node_1 = require_dist_cjs56();
+ var smithy_client_2 = require_dist_cjs22();
+ var getRuntimeConfig = (config) => {
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_3.loadConfigsForDefaultMode);
- const clientSharedValues = getRuntimeConfig(config);
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
+ const loaderConfig = {
+ profile: config?.profile,
+ logger: clientSharedValues.logger
+ };
return {
...clientSharedValues,
...config,
runtime: "node",
defaultsMode,
- bodyLengthChecker: (_a = config === null || config === undefined ? undefined : config.bodyLengthChecker) !== null && _a !== undefined ? _a : util_body_length_node_1.calculateBodyLength,
- defaultUserAgentProvider: (_b = config === null || config === undefined ? undefined : config.defaultUserAgentProvider) !== null && _b !== undefined ? _b : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
- maxAttempts: (_c = config === null || config === undefined ? undefined : config.maxAttempts) !== null && _c !== undefined ? _c : (0, node_config_provider_1.loadConfig)(middleware_retry_2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
- region: (_d = config === null || config === undefined ? undefined : config.region) !== null && _d !== undefined ? _d : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_REGION_CONFIG_OPTIONS, config_resolver_2.NODE_REGION_CONFIG_FILE_OPTIONS),
- requestHandler: (_e = config === null || config === undefined ? undefined : config.requestHandler) !== null && _e !== undefined ? _e : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
- retryMode: (_f = config === null || config === undefined ? undefined : config.retryMode) !== null && _f !== undefined ? _f : (0, node_config_provider_1.loadConfig)({
- ...middleware_retry_2.NODE_RETRY_MODE_CONFIG_OPTIONS,
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
+ {
+ schemeId: "aws.auth#sigv4",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
+ signer: new core_1.AwsSdkSigV4Signer
+ },
+ {
+ schemeId: "smithy.api#noAuth",
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
+ signer: new core_2.NoAuthSigner
+ }
+ ],
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
- }),
- sha256: (_g = config === null || config === undefined ? undefined : config.sha256) !== null && _g !== undefined ? _g : hash_node_1.Hash.bind(null, "sha256"),
- streamCollector: (_h = config === null || config === undefined ? undefined : config.streamCollector) !== null && _h !== undefined ? _h : node_http_handler_1.streamCollector,
- useDualstackEndpoint: (_j = config === null || config === undefined ? undefined : config.useDualstackEndpoint) !== null && _j !== undefined ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
- useFipsEndpoint: (_k = config === null || config === undefined ? undefined : config.useFipsEndpoint) !== null && _k !== undefined ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
+ }, config),
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
};
};
- var region_config_resolver_1 = require_dist_cjs51();
- var protocol_http_1 = require_dist_cjs2();
- var smithy_client_5 = require_dist_cjs16();
- var asPartial = (t2) => t2;
- var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
- const extensionConfiguration = {
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, smithy_client_5.getDefaultExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig))
+ exports.getRuntimeConfig = getRuntimeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/ruleset.jssolver.jsfrom/
+var require_httpAuthExtensionConfiguration = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = undefined;
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
+ let _credentials = runtimeConfig.credentials;
+ return {
+ setHttpAuthScheme(httpAuthScheme) {
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
+ if (index === -1) {
+ _httpAuthSchemes.push(httpAuthScheme);
+ } else {
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
+ }
+ },
+ httpAuthSchemes() {
+ return _httpAuthSchemes;
+ },
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
+ },
+ httpAuthSchemeProvider() {
+ return _httpAuthSchemeProvider;
+ },
+ setCredentials(credentials) {
+ _credentials = credentials;
+ },
+ credentials() {
+ return _credentials;
+ }
};
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ };
+ exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
+ var resolveHttpAuthRuntimeConfig = (config) => {
return {
- ...runtimeConfig,
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
- ...(0, smithy_client_5.resolveDefaultRuntimeConfig)(extensionConfiguration),
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
+ httpAuthSchemes: config.httpAuthSchemes(),
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
+ credentials: config.credentials()
};
};
- var SSOOIDCClient2 = class extends smithy_client_1.Client {
+ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rulese
+var require_runtimeExtensions = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.resolveRuntimeExtensions = undefined;
+ var region_config_resolver_1 = require_dist_cjs57();
+ var protocol_http_1 = require_dist_cjs2();
+ var smithy_client_1 = require_dist_cjs22();
+ var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration();
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
+ const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
+ };
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoin
+var require_STSClient = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.STSClient = exports.__Client = undefined;
+ var middleware_host_header_1 = require_dist_cjs29();
+ var middleware_logger_1 = require_dist_cjs30();
+ var middleware_recursion_detection_1 = require_dist_cjs31();
+ var middleware_user_agent_1 = require_dist_cjs39();
+ var config_resolver_1 = require_dist_cjs40();
+ var core_1 = require_dist_cjs17();
+ var middleware_content_length_1 = require_dist_cjs42();
+ var middleware_endpoint_1 = require_dist_cjs49();
+ var middleware_retry_1 = require_dist_cjs45();
+ var smithy_client_1 = require_dist_cjs22();
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function() {
+ return smithy_client_1.Client;
+ } });
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider4();
+ var EndpointParameters_1 = require_EndpointParameters();
+ var runtimeConfig_1 = require_runtimeConfig3();
+ var runtimeExtensions_1 = require_runtimeExtensions();
+
+ class STSClient extends smithy_client_1.Client {
+ config;
constructor(...[configuration]) {
- const _config_0 = getRuntimeConfig2(configuration || {});
- const _config_1 = resolveClientEndpointParameters(_config_0);
- const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
- const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
- const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
+ const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
+ super(_config_0);
+ this.initConfig = _config_0;
+ const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
+ const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
+ const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
+ const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
- const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);
- const _config_7 = resolveRuntimeExtensions(_config_6, (configuration === null || configuration === undefined ? undefined : configuration.extensions) || []);
- super(_config_7);
- this.config = _config_7;
+ const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
+ const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
+ const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
+ this.config = _config_8;
+ this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
- this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
+ this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
+ identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
+ "aws.auth#sigv4": config.credentials
+ })
+ }));
+ this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
}
destroy() {
super.destroy();
}
+ }
+ exports.STSClient = STSClient;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/end
+var require_sts = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
};
- exports.SSOOIDCClient = SSOOIDCClient2;
- var smithy_client_6 = require_dist_cjs16();
- var middleware_endpoint_2 = require_dist_cjs41();
- var middleware_serde_1 = require_dist_cjs40();
- var smithy_client_7 = require_dist_cjs16();
- var types_1 = require_dist_cjs();
- var protocol_http_2 = require_dist_cjs2();
- var smithy_client_8 = require_dist_cjs16();
- var smithy_client_9 = require_dist_cjs16();
- var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_9.ServiceException {
- constructor(options) {
- super(options);
- Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
+ return to;
};
- var AccessDeniedException2 = class _AccessDeniedException extends SSOOIDCServiceException {
- constructor(opts) {
- super({
- name: "AccessDeniedException",
- $fault: "client",
- ...opts
- });
- this.name = "AccessDeniedException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ AssumeRoleCommand: () => AssumeRoleCommand,
+ AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,
+ AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,
+ AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
+ AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,
+ ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters,
+ CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,
+ ExpiredTokenException: () => ExpiredTokenException,
+ IDPCommunicationErrorException: () => IDPCommunicationErrorException,
+ IDPRejectedClaimException: () => IDPRejectedClaimException,
+ InvalidIdentityTokenException: () => InvalidIdentityTokenException,
+ MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,
+ PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,
+ RegionDisabledException: () => RegionDisabledException,
+ STS: () => STS,
+ STSServiceException: () => STSServiceException,
+ decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,
+ getDefaultRoleAssumer: () => getDefaultRoleAssumer2,
+ getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2
+ });
+ module.exports = __toCommonJS(index_exports);
+ __reExport(index_exports, require_STSClient(), module.exports);
+ var import_smithy_client6 = require_dist_cjs22();
+ var import_middleware_endpoint = require_dist_cjs49();
+ var import_middleware_serde = require_dist_cjs5();
+ var import_smithy_client4 = require_dist_cjs22();
+ var import_EndpointParameters = require_EndpointParameters();
+ var import_smithy_client2 = require_dist_cjs22();
+ var import_smithy_client = require_dist_cjs22();
+ var STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {
+ static {
+ __name(this, "STSServiceException");
}
- };
- exports.AccessDeniedException = AccessDeniedException2;
- var AuthorizationPendingException2 = class _AuthorizationPendingException extends SSOOIDCServiceException {
- constructor(opts) {
- super({
- name: "AuthorizationPendingException",
- $fault: "client",
- ...opts
- });
- this.name = "AuthorizationPendingException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ constructor(options) {
+ super(options);
+ Object.setPrototypeOf(this, _STSServiceException.prototype);
}
};
- exports.AuthorizationPendingException = AuthorizationPendingException2;
- var ExpiredTokenException2 = class _ExpiredTokenException extends SSOOIDCServiceException {
+ var CredentialsFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING }
+ }), "CredentialsFilterSensitiveLog");
+ var AssumeRoleResponseFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
+ }), "AssumeRoleResponseFilterSensitiveLog");
+ var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
+ static {
+ __name(this, "ExpiredTokenException");
+ }
+ name = "ExpiredTokenException";
+ $fault = "client";
constructor(opts) {
super({
name: "ExpiredTokenException",
$fault: "client",
...opts
});
- this.name = "ExpiredTokenException";
- this.$fault = "client";
Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
}
};
- exports.ExpiredTokenException = ExpiredTokenException2;
- var InternalServerException2 = class _InternalServerException extends SSOOIDCServiceException {
- constructor(opts) {
- super({
- name: "InternalServerException",
- $fault: "server",
- ...opts
- });
- this.name = "InternalServerException";
- this.$fault = "server";
- Object.setPrototypeOf(this, _InternalServerException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
+ static {
+ __name(this, "MalformedPolicyDocumentException");
}
- };
- exports.InternalServerException = InternalServerException2;
- var InvalidClientException2 = class _InvalidClientException extends SSOOIDCServiceException {
+ name = "MalformedPolicyDocumentException";
+ $fault = "client";
constructor(opts) {
super({
- name: "InvalidClientException",
+ name: "MalformedPolicyDocumentException",
$fault: "client",
...opts
});
- this.name = "InvalidClientException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidClientException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
}
};
- exports.InvalidClientException = InvalidClientException2;
- var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {
- constructor(opts) {
- super({
- name: "InvalidGrantException",
- $fault: "client",
- ...opts
- });
- this.name = "InvalidGrantException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidGrantException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
+ static {
+ __name(this, "PackedPolicyTooLargeException");
}
- };
- var InvalidRequestException2 = class _InvalidRequestException extends SSOOIDCServiceException {
+ name = "PackedPolicyTooLargeException";
+ $fault = "client";
constructor(opts) {
super({
- name: "InvalidRequestException",
+ name: "PackedPolicyTooLargeException",
$fault: "client",
...opts
});
- this.name = "InvalidRequestException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidRequestException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
}
};
- exports.InvalidRequestException = InvalidRequestException2;
- var InvalidScopeException2 = class _InvalidScopeException extends SSOOIDCServiceException {
- constructor(opts) {
- super({
- name: "InvalidScopeException",
- $fault: "client",
- ...opts
- });
- this.name = "InvalidScopeException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidScopeException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ var RegionDisabledException = class _RegionDisabledException extends STSServiceException {
+ static {
+ __name(this, "RegionDisabledException");
}
- };
- exports.InvalidScopeException = InvalidScopeException2;
- var SlowDownException2 = class _SlowDownException extends SSOOIDCServiceException {
+ name = "RegionDisabledException";
+ $fault = "client";
constructor(opts) {
super({
- name: "SlowDownException",
+ name: "RegionDisabledException",
$fault: "client",
...opts
});
- this.name = "SlowDownException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _SlowDownException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _RegionDisabledException.prototype);
}
};
- exports.SlowDownException = SlowDownException2;
- var UnauthorizedClientException2 = class _UnauthorizedClientException extends SSOOIDCServiceException {
+ var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
+ static {
+ __name(this, "IDPRejectedClaimException");
+ }
+ name = "IDPRejectedClaimException";
+ $fault = "client";
constructor(opts) {
super({
- name: "UnauthorizedClientException",
+ name: "IDPRejectedClaimException",
$fault: "client",
...opts
});
- this.name = "UnauthorizedClientException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
}
};
- exports.UnauthorizedClientException = UnauthorizedClientException2;
- var UnsupportedGrantTypeException2 = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {
+ var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
+ static {
+ __name(this, "InvalidIdentityTokenException");
+ }
+ name = "InvalidIdentityTokenException";
+ $fault = "client";
constructor(opts) {
super({
- name: "UnsupportedGrantTypeException",
+ name: "InvalidIdentityTokenException",
$fault: "client",
...opts
});
- this.name = "UnsupportedGrantTypeException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
}
};
- exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException2;
- var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException {
+ var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING }
+ }), "AssumeRoleWithWebIdentityRequestFilterSensitiveLog");
+ var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
+ }), "AssumeRoleWithWebIdentityResponseFilterSensitiveLog");
+ var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
+ static {
+ __name(this, "IDPCommunicationErrorException");
+ }
+ name = "IDPCommunicationErrorException";
+ $fault = "client";
constructor(opts) {
super({
- name: "InvalidClientMetadataException",
+ name: "IDPCommunicationErrorException",
$fault: "client",
...opts
});
- this.name = "InvalidClientMetadataException";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype);
- this.error = opts.error;
- this.error_description = opts.error_description;
+ Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
}
};
- var se_CreateTokenCommand = async (input, context) => {
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
- const headers = {
- "content-type": "application/json"
- };
- const resolvedPath = `${(basePath === null || basePath === undefined ? undefined : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`;
- let body;
- body = JSON.stringify((0, smithy_client_8.take)(input, {
- clientId: [],
- clientSecret: [],
- code: [],
- deviceCode: [],
- grantType: [],
- redirectUri: [],
- refreshToken: [],
- scope: (_) => (0, smithy_client_8._json)(_)
- }));
- return new protocol_http_2.HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body
- });
- };
- var se_RegisterClientCommand = async (input, context) => {
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
- const headers = {
- "content-type": "application/json"
- };
- const resolvedPath = `${(basePath === null || basePath === undefined ? undefined : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`;
+ var import_core = require_dist_cjs24();
+ var import_protocol_http = require_dist_cjs2();
+ var import_smithy_client3 = require_dist_cjs22();
+ var se_AssumeRoleCommand = __name(async (input, context) => {
+ const headers = SHARED_HEADERS;
let body;
- body = JSON.stringify((0, smithy_client_8.take)(input, {
- clientName: [],
- clientType: [],
- scopes: (_) => (0, smithy_client_8._json)(_)
- }));
- return new protocol_http_2.HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body
+ body = buildFormUrlencodedString({
+ ...se_AssumeRoleRequest(input, context),
+ [_A]: _AR,
+ [_V]: _
});
- };
- var se_StartDeviceAuthorizationCommand = async (input, context) => {
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
- const headers = {
- "content-type": "application/json"
- };
- const resolvedPath = `${(basePath === null || basePath === undefined ? undefined : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`;
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
+ }, "se_AssumeRoleCommand");
+ var se_AssumeRoleWithWebIdentityCommand = __name(async (input, context) => {
+ const headers = SHARED_HEADERS;
let body;
- body = JSON.stringify((0, smithy_client_8.take)(input, {
- clientId: [],
- clientSecret: [],
- startUrl: []
- }));
- return new protocol_http_2.HttpRequest({
- protocol,
- hostname,
- port,
- method: "POST",
- headers,
- path: resolvedPath,
- body
+ body = buildFormUrlencodedString({
+ ...se_AssumeRoleWithWebIdentityRequest(input, context),
+ [_A]: _ARWWI,
+ [_V]: _
});
- };
- var de_CreateTokenCommand = async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CreateTokenCommandError(output, context);
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
+ }, "se_AssumeRoleWithWebIdentityCommand");
+ var de_AssumeRoleCommand = __name(async (output, context) => {
+ if (output.statusCode >= 300) {
+ return de_CommandError(output, context);
}
- const contents = (0, smithy_client_8.map)({
- $metadata: deserializeMetadata(output)
- });
- const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, smithy_client_8.take)(data, {
- accessToken: smithy_client_8.expectString,
- expiresIn: smithy_client_8.expectInt32,
- idToken: smithy_client_8.expectString,
- refreshToken: smithy_client_8.expectString,
- tokenType: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- return contents;
- };
- var de_CreateTokenCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
+ let contents = {};
+ contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);
+ const response = {
+ $metadata: deserializeMetadata(output),
+ ...contents
};
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "AccessDeniedException":
- case "com.amazonaws.ssooidc#AccessDeniedException":
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
- case "AuthorizationPendingException":
- case "com.amazonaws.ssooidc#AuthorizationPendingException":
- throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
- case "ExpiredTokenException":
- case "com.amazonaws.ssooidc#ExpiredTokenException":
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
- case "InternalServerException":
- case "com.amazonaws.ssooidc#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "InvalidClientException":
- case "com.amazonaws.ssooidc#InvalidClientException":
- throw await de_InvalidClientExceptionRes(parsedOutput, context);
- case "InvalidGrantException":
- case "com.amazonaws.ssooidc#InvalidGrantException":
- throw await de_InvalidGrantExceptionRes(parsedOutput, context);
- case "InvalidRequestException":
- case "com.amazonaws.ssooidc#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "InvalidScopeException":
- case "com.amazonaws.ssooidc#InvalidScopeException":
- throw await de_InvalidScopeExceptionRes(parsedOutput, context);
- case "SlowDownException":
- case "com.amazonaws.ssooidc#SlowDownException":
- throw await de_SlowDownExceptionRes(parsedOutput, context);
- case "UnauthorizedClientException":
- case "com.amazonaws.ssooidc#UnauthorizedClientException":
- throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
- case "UnsupportedGrantTypeException":
- case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
- throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- };
- var de_RegisterClientCommand = async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_RegisterClientCommandError(output, context);
+ return response;
+ }, "de_AssumeRoleCommand");
+ var de_AssumeRoleWithWebIdentityCommand = __name(async (output, context) => {
+ if (output.statusCode >= 300) {
+ return de_CommandError(output, context);
}
- const contents = (0, smithy_client_8.map)({
- $metadata: deserializeMetadata(output)
- });
- const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, smithy_client_8.take)(data, {
- authorizationEndpoint: smithy_client_8.expectString,
- clientId: smithy_client_8.expectString,
- clientIdIssuedAt: smithy_client_8.expectLong,
- clientSecret: smithy_client_8.expectString,
- clientSecretExpiresAt: smithy_client_8.expectLong,
- tokenEndpoint: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- return contents;
- };
- var de_RegisterClientCommandError = async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
+ let contents = {};
+ contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);
+ const response = {
+ $metadata: deserializeMetadata(output),
+ ...contents
};
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InternalServerException":
- case "com.amazonaws.ssooidc#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "InvalidClientMetadataException":
- case "com.amazonaws.ssooidc#InvalidClientMetadataException":
- throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context);
- case "InvalidRequestException":
- case "com.amazonaws.ssooidc#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "InvalidScopeException":
- case "com.amazonaws.ssooidc#InvalidScopeException":
- throw await de_InvalidScopeExceptionRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- };
- var de_StartDeviceAuthorizationCommand = async (output, context) => {
- if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_StartDeviceAuthorizationCommandError(output, context);
- }
- const contents = (0, smithy_client_8.map)({
- $metadata: deserializeMetadata(output)
- });
- const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body");
- const doc = (0, smithy_client_8.take)(data, {
- deviceCode: smithy_client_8.expectString,
- expiresIn: smithy_client_8.expectInt32,
- interval: smithy_client_8.expectInt32,
- userCode: smithy_client_8.expectString,
- verificationUri: smithy_client_8.expectString,
- verificationUriComplete: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- return contents;
- };
- var de_StartDeviceAuthorizationCommandError = async (output, context) => {
+ return response;
+ }, "de_AssumeRoleWithWebIdentityCommand");
+ var de_CommandError = __name(async (output, context) => {
const parsedOutput = {
...output,
- body: await parseErrorBody(output.body, context)
+ body: await (0, import_core.parseXmlErrorBody)(output.body, context)
};
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
+ const errorCode = loadQueryErrorCode(output, parsedOutput.body);
switch (errorCode) {
- case "InternalServerException":
- case "com.amazonaws.ssooidc#InternalServerException":
- throw await de_InternalServerExceptionRes(parsedOutput, context);
- case "InvalidClientException":
- case "com.amazonaws.ssooidc#InvalidClientException":
- throw await de_InvalidClientExceptionRes(parsedOutput, context);
- case "InvalidRequestException":
- case "com.amazonaws.ssooidc#InvalidRequestException":
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
- case "SlowDownException":
- case "com.amazonaws.ssooidc#SlowDownException":
- throw await de_SlowDownExceptionRes(parsedOutput, context);
- case "UnauthorizedClientException":
- case "com.amazonaws.ssooidc#UnauthorizedClientException":
- throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
+ case "ExpiredTokenException":
+ case "com.amazonaws.sts#ExpiredTokenException":
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
+ case "MalformedPolicyDocument":
+ case "com.amazonaws.sts#MalformedPolicyDocumentException":
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
+ case "PackedPolicyTooLarge":
+ case "com.amazonaws.sts#PackedPolicyTooLargeException":
+ throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
+ case "RegionDisabledException":
+ case "com.amazonaws.sts#RegionDisabledException":
+ throw await de_RegionDisabledExceptionRes(parsedOutput, context);
+ case "IDPCommunicationError":
+ case "com.amazonaws.sts#IDPCommunicationErrorException":
+ throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
+ case "IDPRejectedClaim":
+ case "com.amazonaws.sts#IDPRejectedClaimException":
+ throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
+ case "InvalidIdentityToken":
+ case "com.amazonaws.sts#InvalidIdentityTokenException":
+ throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
default:
const parsedBody = parsedOutput.body;
return throwDefaultError({
output,
- parsedBody,
+ parsedBody: parsedBody.Error,
errorCode
});
}
- };
- var throwDefaultError = (0, smithy_client_8.withBaseException)(SSOOIDCServiceException);
- var de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new AccessDeniedException2({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new AuthorizationPendingException2({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new ExpiredTokenException2({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InternalServerExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new InternalServerException2({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InvalidClientExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new InvalidClientException2({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new InvalidClientMetadataException({
- $metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
- });
- Object.assign(contents, doc);
- const exception = new InvalidGrantException({
+ }, "de_CommandError");
+ var de_ExpiredTokenExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_ExpiredTokenException(body.Error, context);
+ const exception = new ExpiredTokenException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
+ ...deserialized
});
- Object.assign(contents, doc);
- const exception = new InvalidRequestException2({
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_ExpiredTokenExceptionRes");
+ var de_IDPCommunicationErrorExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_IDPCommunicationErrorException(body.Error, context);
+ const exception = new IDPCommunicationErrorException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
+ ...deserialized
});
- Object.assign(contents, doc);
- const exception = new InvalidScopeException2({
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_IDPCommunicationErrorExceptionRes");
+ var de_IDPRejectedClaimExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_IDPRejectedClaimException(body.Error, context);
+ const exception = new IDPRejectedClaimException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_SlowDownExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
+ ...deserialized
});
- Object.assign(contents, doc);
- const exception = new SlowDownException2({
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_IDPRejectedClaimExceptionRes");
+ var de_InvalidIdentityTokenExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_InvalidIdentityTokenException(body.Error, context);
+ const exception = new InvalidIdentityTokenException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
- });
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
+ ...deserialized
});
- Object.assign(contents, doc);
- const exception = new UnauthorizedClientException2({
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_InvalidIdentityTokenExceptionRes");
+ var de_MalformedPolicyDocumentExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
+ const exception = new MalformedPolicyDocumentException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
+ ...deserialized
});
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
- const contents = (0, smithy_client_8.map)({});
- const data = parsedOutput.body;
- const doc = (0, smithy_client_8.take)(data, {
- error: smithy_client_8.expectString,
- error_description: smithy_client_8.expectString
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_MalformedPolicyDocumentExceptionRes");
+ var de_PackedPolicyTooLargeExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
+ const exception = new PackedPolicyTooLargeException({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...deserialized
});
- Object.assign(contents, doc);
- const exception = new UnsupportedGrantTypeException2({
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_PackedPolicyTooLargeExceptionRes");
+ var de_RegionDisabledExceptionRes = __name(async (parsedOutput, context) => {
+ const body = parsedOutput.body;
+ const deserialized = de_RegionDisabledException(body.Error, context);
+ const exception = new RegionDisabledException({
$metadata: deserializeMetadata(parsedOutput),
- ...contents
+ ...deserialized
});
- return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body);
- };
- var deserializeMetadata = (output) => {
- var _a, _b;
- return {
- httpStatusCode: output.statusCode,
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== undefined ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== undefined ? _b : output.headers["x-amz-request-id"],
- extendedRequestId: output.headers["x-amz-id-2"],
- cfId: output.headers["x-amz-cf-id"]
- };
- };
- var collectBodyString = (streamBody, context) => (0, smithy_client_8.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
- var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
- if (encoded.length) {
- return JSON.parse(encoded);
+ return (0, import_smithy_client3.decorateServiceException)(exception, body);
+ }, "de_RegionDisabledExceptionRes");
+ var se_AssumeRoleRequest = __name((input, context) => {
+ const entries = {};
+ if (input[_RA] != null) {
+ entries[_RA] = input[_RA];
}
- return {};
- });
- var parseErrorBody = async (errorBody, context) => {
- var _a;
- const value = await parseBody(errorBody, context);
- value.message = (_a = value.message) !== null && _a !== undefined ? _a : value.Message;
- return value;
- };
- var loadRestJsonErrorCode = (output, data) => {
- const findKey = (object, key) => Object.keys(object).find((k2) => k2.toLowerCase() === key.toLowerCase());
- const sanitizeErrorCode = (rawValue) => {
- let cleanValue = rawValue;
- if (typeof cleanValue === "number") {
- cleanValue = cleanValue.toString();
+ if (input[_RSN] != null) {
+ entries[_RSN] = input[_RSN];
+ }
+ if (input[_PA] != null) {
+ const memberEntries = se_policyDescriptorListType(input[_PA], context);
+ if (input[_PA]?.length === 0) {
+ entries.PolicyArns = [];
}
- if (cleanValue.indexOf(",") >= 0) {
- cleanValue = cleanValue.split(",")[0];
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ const loc = `PolicyArns.${key}`;
+ entries[loc] = value;
+ });
+ }
+ if (input[_P] != null) {
+ entries[_P] = input[_P];
+ }
+ if (input[_DS] != null) {
+ entries[_DS] = input[_DS];
+ }
+ if (input[_T] != null) {
+ const memberEntries = se_tagListType(input[_T], context);
+ if (input[_T]?.length === 0) {
+ entries.Tags = [];
}
- if (cleanValue.indexOf(":") >= 0) {
- cleanValue = cleanValue.split(":")[0];
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ const loc = `Tags.${key}`;
+ entries[loc] = value;
+ });
+ }
+ if (input[_TTK] != null) {
+ const memberEntries = se_tagKeyListType(input[_TTK], context);
+ if (input[_TTK]?.length === 0) {
+ entries.TransitiveTagKeys = [];
}
- if (cleanValue.indexOf("#") >= 0) {
- cleanValue = cleanValue.split("#")[1];
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ const loc = `TransitiveTagKeys.${key}`;
+ entries[loc] = value;
+ });
+ }
+ if (input[_EI] != null) {
+ entries[_EI] = input[_EI];
+ }
+ if (input[_SN] != null) {
+ entries[_SN] = input[_SN];
+ }
+ if (input[_TC] != null) {
+ entries[_TC] = input[_TC];
+ }
+ if (input[_SI] != null) {
+ entries[_SI] = input[_SI];
+ }
+ if (input[_PC] != null) {
+ const memberEntries = se_ProvidedContextsListType(input[_PC], context);
+ if (input[_PC]?.length === 0) {
+ entries.ProvidedContexts = [];
}
- return cleanValue;
- };
- const headerKey = findKey(output.headers, "x-amzn-errortype");
- if (headerKey !== undefined) {
- return sanitizeErrorCode(output.headers[headerKey]);
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ const loc = `ProvidedContexts.${key}`;
+ entries[loc] = value;
+ });
}
- if (data.code !== undefined) {
- return sanitizeErrorCode(data.code);
+ return entries;
+ }, "se_AssumeRoleRequest");
+ var se_AssumeRoleWithWebIdentityRequest = __name((input, context) => {
+ const entries = {};
+ if (input[_RA] != null) {
+ entries[_RA] = input[_RA];
}
- if (data["__type"] !== undefined) {
- return sanitizeErrorCode(data["__type"]);
+ if (input[_RSN] != null) {
+ entries[_RSN] = input[_RSN];
}
- };
-
- class CreateTokenCommand2 extends smithy_client_7.Command {
- constructor(input) {
- super();
- this.input = input;
+ if (input[_WIT] != null) {
+ entries[_WIT] = input[_WIT];
}
- static getEndpointParameterInstructions() {
- return {
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
- Endpoint: { type: "builtInParams", name: "endpoint" },
- Region: { type: "builtInParams", name: "region" },
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
- };
+ if (input[_PI] != null) {
+ entries[_PI] = input[_PI];
}
- resolveMiddleware(clientStack, configuration, options) {
- this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
- this.middlewareStack.use((0, middleware_endpoint_2.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions()));
- const stack = clientStack.concat(this.middlewareStack);
- const { logger: logger4 } = configuration;
- const clientName = "SSOOIDCClient";
- const commandName = "CreateTokenCommand";
- const handlerExecutionContext = {
- logger: logger4,
- clientName,
- commandName,
- inputFilterSensitiveLog: (_) => _,
- outputFilterSensitiveLog: (_) => _,
- [types_1.SMITHY_CONTEXT_KEY]: {
- service: "AWSSSOOIDCService",
- operation: "CreateToken"
- }
- };
- const { requestHandler } = configuration;
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
+ if (input[_PA] != null) {
+ const memberEntries = se_policyDescriptorListType(input[_PA], context);
+ if (input[_PA]?.length === 0) {
+ entries.PolicyArns = [];
+ }
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ const loc = `PolicyArns.${key}`;
+ entries[loc] = value;
+ });
}
- serialize(input, context) {
- return se_CreateTokenCommand(input, context);
+ if (input[_P] != null) {
+ entries[_P] = input[_P];
}
- deserialize(output, context) {
- return de_CreateTokenCommand(output, context);
+ if (input[_DS] != null) {
+ entries[_DS] = input[_DS];
}
- }
- exports.CreateTokenCommand = CreateTokenCommand2;
- var middleware_endpoint_3 = require_dist_cjs41();
- var middleware_serde_2 = require_dist_cjs40();
- var smithy_client_10 = require_dist_cjs16();
- var types_2 = require_dist_cjs();
-
- class RegisterClientCommand extends smithy_client_10.Command {
- constructor(input) {
- super();
- this.input = input;
+ return entries;
+ }, "se_AssumeRoleWithWebIdentityRequest");
+ var se_policyDescriptorListType = __name((input, context) => {
+ const entries = {};
+ let counter = 1;
+ for (const entry of input) {
+ if (entry === null) {
+ continue;
+ }
+ const memberEntries = se_PolicyDescriptorType(entry, context);
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ entries[`member.${counter}.${key}`] = value;
+ });
+ counter++;
}
- static getEndpointParameterInstructions() {
- return {
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
- Endpoint: { type: "builtInParams", name: "endpoint" },
- Region: { type: "builtInParams", name: "region" },
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
- };
+ return entries;
+ }, "se_policyDescriptorListType");
+ var se_PolicyDescriptorType = __name((input, context) => {
+ const entries = {};
+ if (input[_a] != null) {
+ entries[_a] = input[_a];
}
- resolveMiddleware(clientStack, configuration, options) {
- this.middlewareStack.use((0, middleware_serde_2.getSerdePlugin)(configuration, this.serialize, this.deserialize));
- this.middlewareStack.use((0, middleware_endpoint_3.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions()));
- const stack = clientStack.concat(this.middlewareStack);
- const { logger: logger4 } = configuration;
- const clientName = "SSOOIDCClient";
- const commandName = "RegisterClientCommand";
- const handlerExecutionContext = {
- logger: logger4,
- clientName,
- commandName,
- inputFilterSensitiveLog: (_) => _,
- outputFilterSensitiveLog: (_) => _,
- [types_2.SMITHY_CONTEXT_KEY]: {
- service: "AWSSSOOIDCService",
- operation: "RegisterClient"
- }
- };
- const { requestHandler } = configuration;
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
+ return entries;
+ }, "se_PolicyDescriptorType");
+ var se_ProvidedContext = __name((input, context) => {
+ const entries = {};
+ if (input[_PAr] != null) {
+ entries[_PAr] = input[_PAr];
}
- serialize(input, context) {
- return se_RegisterClientCommand(input, context);
+ if (input[_CA] != null) {
+ entries[_CA] = input[_CA];
}
- deserialize(output, context) {
- return de_RegisterClientCommand(output, context);
+ return entries;
+ }, "se_ProvidedContext");
+ var se_ProvidedContextsListType = __name((input, context) => {
+ const entries = {};
+ let counter = 1;
+ for (const entry of input) {
+ if (entry === null) {
+ continue;
+ }
+ const memberEntries = se_ProvidedContext(entry, context);
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ entries[`member.${counter}.${key}`] = value;
+ });
+ counter++;
}
- }
- var middleware_endpoint_4 = require_dist_cjs41();
- var middleware_serde_3 = require_dist_cjs40();
- var smithy_client_11 = require_dist_cjs16();
- var types_3 = require_dist_cjs();
-
- class StartDeviceAuthorizationCommand extends smithy_client_11.Command {
- constructor(input) {
- super();
- this.input = input;
+ return entries;
+ }, "se_ProvidedContextsListType");
+ var se_Tag = __name((input, context) => {
+ const entries = {};
+ if (input[_K] != null) {
+ entries[_K] = input[_K];
}
- static getEndpointParameterInstructions() {
- return {
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
- Endpoint: { type: "builtInParams", name: "endpoint" },
- Region: { type: "builtInParams", name: "region" },
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
- };
+ if (input[_Va] != null) {
+ entries[_Va] = input[_Va];
}
- resolveMiddleware(clientStack, configuration, options) {
- this.middlewareStack.use((0, middleware_serde_3.getSerdePlugin)(configuration, this.serialize, this.deserialize));
- this.middlewareStack.use((0, middleware_endpoint_4.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions()));
- const stack = clientStack.concat(this.middlewareStack);
- const { logger: logger4 } = configuration;
- const clientName = "SSOOIDCClient";
- const commandName = "StartDeviceAuthorizationCommand";
- const handlerExecutionContext = {
- logger: logger4,
- clientName,
- commandName,
- inputFilterSensitiveLog: (_) => _,
- outputFilterSensitiveLog: (_) => _,
- [types_3.SMITHY_CONTEXT_KEY]: {
- service: "AWSSSOOIDCService",
- operation: "StartDeviceAuthorization"
- }
- };
- const { requestHandler } = configuration;
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
+ return entries;
+ }, "se_Tag");
+ var se_tagKeyListType = __name((input, context) => {
+ const entries = {};
+ let counter = 1;
+ for (const entry of input) {
+ if (entry === null) {
+ continue;
+ }
+ entries[`member.${counter}`] = entry;
+ counter++;
+ }
+ return entries;
+ }, "se_tagKeyListType");
+ var se_tagListType = __name((input, context) => {
+ const entries = {};
+ let counter = 1;
+ for (const entry of input) {
+ if (entry === null) {
+ continue;
+ }
+ const memberEntries = se_Tag(entry, context);
+ Object.entries(memberEntries).forEach(([key, value]) => {
+ entries[`member.${counter}.${key}`] = value;
+ });
+ counter++;
}
- serialize(input, context) {
- return se_StartDeviceAuthorizationCommand(input, context);
+ return entries;
+ }, "se_tagListType");
+ var de_AssumedRoleUser = __name((output, context) => {
+ const contents = {};
+ if (output[_ARI] != null) {
+ contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]);
}
- deserialize(output, context) {
- return de_StartDeviceAuthorizationCommand(output, context);
+ if (output[_Ar] != null) {
+ contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]);
}
- }
- var commands = {
- CreateTokenCommand: CreateTokenCommand2,
- RegisterClientCommand,
- StartDeviceAuthorizationCommand
- };
- var SSOOIDC = class extends SSOOIDCClient2 {
- };
- (0, smithy_client_6.createAggregatedClient)(commands, SSOOIDC);
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs53 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ return contents;
+ }, "de_AssumedRoleUser");
+ var de_AssumeRoleResponse = __name((output, context) => {
+ const contents = {};
+ if (output[_C] != null) {
+ contents[_C] = de_Credentials(output[_C], context);
}
- return to;
- };
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromSso: () => fromSso,
- fromStatic: () => fromStatic,
- nodeProvider: () => nodeProvider
- });
- module.exports = __toCommonJS(src_exports);
- __reExport(src_exports, require_client_sso_oidc_node(), module.exports);
- var EXPIRE_WINDOW_MS = 5 * 60 * 1000;
- var REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
- var import_client_sso_oidc_node2 = require_client_sso_oidc_node();
- var import_client_sso_oidc_node = require_client_sso_oidc_node();
- var ssoOidcClientsHash = {};
- var getSsoOidcClient = __name((ssoRegion) => {
- if (ssoOidcClientsHash[ssoRegion]) {
- return ssoOidcClientsHash[ssoRegion];
- }
- const ssoOidcClient = new import_client_sso_oidc_node.SSOOIDCClient({ region: ssoRegion });
- ssoOidcClientsHash[ssoRegion] = ssoOidcClient;
- return ssoOidcClient;
- }, "getSsoOidcClient");
- var getNewSsoOidcToken = __name((ssoToken, ssoRegion) => {
- const ssoOidcClient = getSsoOidcClient(ssoRegion);
- return ssoOidcClient.send(new import_client_sso_oidc_node2.CreateTokenCommand({
- clientId: ssoToken.clientId,
- clientSecret: ssoToken.clientSecret,
- refreshToken: ssoToken.refreshToken,
- grantType: "refresh_token"
- }));
- }, "getNewSsoOidcToken");
- var import_property_provider = require_dist_cjs25();
- var validateTokenExpiry = __name((token) => {
- if (token.expiration && token.expiration.getTime() < Date.now()) {
- throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
+ if (output[_ARU] != null) {
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
}
- }, "validateTokenExpiry");
- var validateTokenKey = __name((key, value, forRefresh = false) => {
- if (typeof value === "undefined") {
- throw new import_property_provider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
+ if (output[_PPS] != null) {
+ contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);
}
- }, "validateTokenKey");
- var import_shared_ini_file_loader = require_dist_cjs36();
- var import_fs = __require("fs");
- var { writeFile } = import_fs.promises;
- var writeSSOTokenToFile = __name((id, ssoToken) => {
- const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);
- const tokenString = JSON.stringify(ssoToken, null, 2);
- return writeFile(tokenFilepath, tokenString);
- }, "writeSSOTokenToFile");
- var lastRefreshAttemptTime = new Date(0);
- var fromSso = __name((init = {}) => async () => {
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
- const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);
- const profile = profiles[profileName];
- if (!profile) {
- throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
- } else if (!profile["sso_session"]) {
- throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
+ if (output[_SI] != null) {
+ contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);
}
- const ssoSessionName = profile["sso_session"];
- const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
- const ssoSession = ssoSessions[ssoSessionName];
- if (!ssoSession) {
- throw new import_property_provider.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
+ return contents;
+ }, "de_AssumeRoleResponse");
+ var de_AssumeRoleWithWebIdentityResponse = __name((output, context) => {
+ const contents = {};
+ if (output[_C] != null) {
+ contents[_C] = de_Credentials(output[_C], context);
}
- for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
- if (!ssoSession[ssoSessionRequiredKey]) {
- throw new import_property_provider.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
- }
+ if (output[_SFWIT] != null) {
+ contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]);
}
- const ssoStartUrl = ssoSession["sso_start_url"];
- const ssoRegion = ssoSession["sso_region"];
- let ssoToken;
- try {
- ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);
- } catch (e) {
- throw new import_property_provider.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
+ if (output[_ARU] != null) {
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
}
- validateTokenKey("accessToken", ssoToken.accessToken);
- validateTokenKey("expiresAt", ssoToken.expiresAt);
- const { accessToken, expiresAt } = ssoToken;
- const existingToken = { token: accessToken, expiration: new Date(expiresAt) };
- if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
- return existingToken;
+ if (output[_PPS] != null) {
+ contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);
}
- if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) {
- validateTokenExpiry(existingToken);
- return existingToken;
+ if (output[_Pr] != null) {
+ contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]);
}
- validateTokenKey("clientId", ssoToken.clientId, true);
- validateTokenKey("clientSecret", ssoToken.clientSecret, true);
- validateTokenKey("refreshToken", ssoToken.refreshToken, true);
- try {
- lastRefreshAttemptTime.setTime(Date.now());
- const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion);
- validateTokenKey("accessToken", newSsoOidcToken.accessToken);
- validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
- const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
- try {
- await writeSSOTokenToFile(ssoSessionName, {
- ...ssoToken,
- accessToken: newSsoOidcToken.accessToken,
- expiresAt: newTokenExpiration.toISOString(),
- refreshToken: newSsoOidcToken.refreshToken
- });
- } catch (error) {
- }
- return {
- token: newSsoOidcToken.accessToken,
- expiration: newTokenExpiration
- };
- } catch (error) {
- validateTokenExpiry(existingToken);
- return existingToken;
+ if (output[_Au] != null) {
+ contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]);
}
- }, "fromSso");
- var fromStatic = __name(({ token }) => async () => {
- if (!token || !token.token) {
- throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);
+ if (output[_SI] != null) {
+ contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);
}
- return token;
- }, "fromStatic");
- var nodeProvider = __name((init = {}) => (0, import_property_provider.memoize)((0, import_property_provider.chain)(fromSso(init), async () => {
- throw new import_property_provider.TokenProviderError("Could not load token from any providers", false);
- }), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined), "nodeProvider");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jsso
-var require_dist_cjs54 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
+ return contents;
+ }, "de_AssumeRoleWithWebIdentityResponse");
+ var de_Credentials = __name((output, context) => {
+ const contents = {};
+ if (output[_AKI] != null) {
+ contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]);
+ }
+ if (output[_SAK] != null) {
+ contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]);
+ }
+ if (output[_ST] != null) {
+ contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]);
+ }
+ if (output[_E] != null) {
+ contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E]));
+ }
+ return contents;
+ }, "de_Credentials");
+ var de_ExpiredTokenException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_ExpiredTokenException");
+ var de_IDPCommunicationErrorException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_IDPCommunicationErrorException");
+ var de_IDPRejectedClaimException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_IDPRejectedClaimException");
+ var de_InvalidIdentityTokenException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_InvalidIdentityTokenException");
+ var de_MalformedPolicyDocumentException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_MalformedPolicyDocumentException");
+ var de_PackedPolicyTooLargeException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_PackedPolicyTooLargeException");
+ var de_RegionDisabledException = __name((output, context) => {
+ const contents = {};
+ if (output[_m] != null) {
+ contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);
+ }
+ return contents;
+ }, "de_RegionDisabledException");
+ var deserializeMetadata = __name((output) => ({
+ httpStatusCode: output.statusCode,
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
+ extendedRequestId: output.headers["x-amz-id-2"],
+ cfId: output.headers["x-amz-cf-id"]
+ }), "deserializeMetadata");
+ var throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException);
+ var buildHttpRpcRequest = __name(async (context, headers, path, resolvedHostname, body) => {
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
+ const contents = {
+ protocol,
+ hostname,
+ port,
+ method: "POST",
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
+ headers
+ };
+ if (resolvedHostname !== undefined) {
+ contents.hostname = resolvedHostname;
+ }
+ if (body !== undefined) {
+ contents.body = body;
+ }
+ return new import_protocol_http.HttpRequest(contents);
+ }, "buildHttpRpcRequest");
+ var SHARED_HEADERS = {
+ "content-type": "application/x-www-form-urlencoded"
};
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ var _ = "2011-06-15";
+ var _A = "Action";
+ var _AKI = "AccessKeyId";
+ var _AR = "AssumeRole";
+ var _ARI = "AssumedRoleId";
+ var _ARU = "AssumedRoleUser";
+ var _ARWWI = "AssumeRoleWithWebIdentity";
+ var _Ar = "Arn";
+ var _Au = "Audience";
+ var _C = "Credentials";
+ var _CA = "ContextAssertion";
+ var _DS = "DurationSeconds";
+ var _E = "Expiration";
+ var _EI = "ExternalId";
+ var _K = "Key";
+ var _P = "Policy";
+ var _PA = "PolicyArns";
+ var _PAr = "ProviderArn";
+ var _PC = "ProvidedContexts";
+ var _PI = "ProviderId";
+ var _PPS = "PackedPolicySize";
+ var _Pr = "Provider";
+ var _RA = "RoleArn";
+ var _RSN = "RoleSessionName";
+ var _SAK = "SecretAccessKey";
+ var _SFWIT = "SubjectFromWebIdentityToken";
+ var _SI = "SourceIdentity";
+ var _SN = "SerialNumber";
+ var _ST = "SessionToken";
+ var _T = "Tags";
+ var _TC = "TokenCode";
+ var _TTK = "TransitiveTagKeys";
+ var _V = "Version";
+ var _Va = "Value";
+ var _WIT = "WebIdentityToken";
+ var _a = "arn";
+ var _m = "message";
+ var buildFormUrlencodedString = __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + "=" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join("&"), "buildFormUrlencodedString");
+ var loadQueryErrorCode = __name((output, data) => {
+ if (data.Error?.Code !== undefined) {
+ return data.Error.Code;
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromSSO: () => fromSSO,
- isSsoProfile: () => isSsoProfile,
- validateSsoProfile: () => validateSsoProfile
- });
- module.exports = __toCommonJS(src_exports);
- var isSsoProfile = __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
- var import_client_sso = require_dist_cjs52();
- var import_token_providers = require_dist_cjs53();
- var import_property_provider = require_dist_cjs25();
- var import_shared_ini_file_loader = require_dist_cjs36();
- var SHOULD_FAIL_CREDENTIAL_CHAIN = false;
- var resolveSSOCredentials = __name(async ({
- ssoStartUrl,
- ssoSession,
- ssoAccountId,
- ssoRegion,
- ssoRoleName,
- ssoClient,
- profile
- }) => {
- var _a;
- let token;
- const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
- if (ssoSession) {
- try {
- const _token = await (0, import_token_providers.fromSso)({ profile })();
- token = {
- accessToken: _token.token,
- expiresAt: new Date(_token.expiration).toISOString()
- };
- } catch (e) {
- throw new import_property_provider.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN);
- }
- } else {
- try {
- token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);
- } catch (e) {
- throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
- }
+ if (output.statusCode == 404) {
+ return "NotFound";
}
- if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
- throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN);
+ }, "loadQueryErrorCode");
+ var AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(undefined, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {
+ static {
+ __name(this, "AssumeRoleCommand");
}
- const { accessToken } = token;
- const sso = ssoClient || new import_client_sso.SSOClient({ region: ssoRegion });
- let ssoResp;
- try {
- ssoResp = await sso.send(new import_client_sso.GetRoleCredentialsCommand({
- accountId: ssoAccountId,
- roleName: ssoRoleName,
- accessToken
- }));
- } catch (e) {
- throw import_property_provider.CredentialsProviderError.from(e, SHOULD_FAIL_CREDENTIAL_CHAIN);
+ };
+ var import_middleware_endpoint2 = require_dist_cjs49();
+ var import_middleware_serde2 = require_dist_cjs5();
+ var import_smithy_client5 = require_dist_cjs22();
+ var import_EndpointParameters2 = require_EndpointParameters();
+ var AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {
+ static {
+ __name(this, "AssumeRoleWithWebIdentityCommand");
}
- const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration } = {} } = ssoResp;
- const credentialScope = (_a = ssoResp == null ? undefined : ssoResp.roleCredentials) == null ? undefined : _a.credentialScope;
- if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
- throw new import_property_provider.CredentialsProviderError("SSO returns an invalid temporary credential.", SHOULD_FAIL_CREDENTIAL_CHAIN);
+ };
+ var import_STSClient = require_STSClient();
+ var commands = {
+ AssumeRoleCommand,
+ AssumeRoleWithWebIdentityCommand
+ };
+ var STS = class extends import_STSClient.STSClient {
+ static {
+ __name(this, "STS");
}
- return { accessKeyId, secretAccessKey, sessionToken, expiration: new Date(expiration), credentialScope };
- }, "resolveSSOCredentials");
- var validateSsoProfile = __name((profile) => {
- const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
- if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
- throw new import_property_provider.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
-Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false);
+ };
+ (0, import_smithy_client6.createAggregatedClient)(commands, STS);
+ var import_EndpointParameters3 = require_EndpointParameters();
+ var import_client = require_client();
+ var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
+ var getAccountIdFromAssumedRoleUser = __name((assumedRoleUser) => {
+ if (typeof assumedRoleUser?.Arn === "string") {
+ const arnComponents = assumedRoleUser.Arn.split(":");
+ if (arnComponents.length > 4 && arnComponents[4] !== "") {
+ return arnComponents[4];
+ }
}
- return profile;
- }, "validateSsoProfile");
- var fromSSO = __name((init = {}) => async () => {
- const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, ssoSession } = init;
- const profileName = (0, import_shared_ini_file_loader.getProfileName)(init);
- if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
- const profile = profiles[profileName];
- if (!profile) {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`);
+ return;
+ }, "getAccountIdFromAssumedRoleUser");
+ var resolveRegion = __name(async (_region, _parentRegion, credentialProviderLogger) => {
+ const region = typeof _region === "function" ? await _region() : _region;
+ const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
+ credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`);
+ return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
+ }, "resolveRegion");
+ var getDefaultRoleAssumer = __name((stsOptions, STSClient3) => {
+ let stsClient;
+ let closureSourceCreds;
+ return async (sourceCreds, params) => {
+ closureSourceCreds = sourceCreds;
+ if (!stsClient) {
+ const {
+ logger: logger4 = stsOptions?.parentClientConfig?.logger,
+ region,
+ requestHandler = stsOptions?.parentClientConfig?.requestHandler,
+ credentialProviderLogger
+ } = stsOptions;
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
+ const isCompatibleRequestHandler = !isH2(requestHandler);
+ stsClient = new STSClient3({
+ profile: stsOptions?.parentClientConfig?.profile,
+ credentialDefaultProvider: __name(() => async () => closureSourceCreds, "credentialDefaultProvider"),
+ region: resolvedRegion,
+ requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
+ logger: logger4
+ });
}
- if (!isSsoProfile(profile)) {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`);
+ const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));
+ if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
+ throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
}
- if (profile == null ? undefined : profile.sso_session) {
- const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);
- const session = ssoSessions[profile.sso_session];
- const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
- if (ssoRegion && ssoRegion !== session.sso_region) {
- throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false);
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
+ const credentials = {
+ accessKeyId: Credentials2.AccessKeyId,
+ secretAccessKey: Credentials2.SecretAccessKey,
+ sessionToken: Credentials2.SessionToken,
+ expiration: Credentials2.Expiration,
+ ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
+ ...accountId && { accountId }
+ };
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
+ return credentials;
+ };
+ }, "getDefaultRoleAssumer");
+ var getDefaultRoleAssumerWithWebIdentity = __name((stsOptions, STSClient3) => {
+ let stsClient;
+ return async (params) => {
+ if (!stsClient) {
+ const {
+ logger: logger4 = stsOptions?.parentClientConfig?.logger,
+ region,
+ requestHandler = stsOptions?.parentClientConfig?.requestHandler,
+ credentialProviderLogger
+ } = stsOptions;
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
+ const isCompatibleRequestHandler = !isH2(requestHandler);
+ stsClient = new STSClient3({
+ profile: stsOptions?.parentClientConfig?.profile,
+ region: resolvedRegion,
+ requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
+ logger: logger4
+ });
+ }
+ const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
+ if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {
+ throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
+ }
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);
+ const credentials = {
+ accessKeyId: Credentials2.AccessKeyId,
+ secretAccessKey: Credentials2.SecretAccessKey,
+ sessionToken: Credentials2.SessionToken,
+ expiration: Credentials2.Expiration,
+ ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },
+ ...accountId && { accountId }
+ };
+ if (accountId) {
+ (0, import_client.setCredentialFeature)(credentials, "RESOLVED_ACCOUNT_ID", "T");
+ }
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
+ return credentials;
+ };
+ }, "getDefaultRoleAssumerWithWebIdentity");
+ var isH2 = __name((requestHandler) => {
+ return requestHandler?.metadata?.handlerProtocol === "h2";
+ }, "isH2");
+ var import_STSClient2 = require_STSClient();
+ var getCustomizableStsClientCtor = __name((baseCtor, customizations) => {
+ if (!customizations)
+ return baseCtor;
+ else
+ return class CustomizableSTSClient extends baseCtor {
+ static {
+ __name(this, "CustomizableSTSClient");
}
- if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
- throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false);
+ constructor(config) {
+ super(config);
+ for (const customization of customizations) {
+ this.middlewareStack.use(customization);
+ }
}
- profile.sso_region = session.sso_region;
- profile.sso_start_url = session.sso_start_url;
- }
- const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(profile);
- return resolveSSOCredentials({
- ssoStartUrl: sso_start_url,
- ssoSession: sso_session,
- ssoAccountId: sso_account_id,
- ssoRegion: sso_region,
- ssoRoleName: sso_role_name,
- ssoClient,
- profile: profileName
- });
- } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
- throw new import_property_provider.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"');
- } else {
- return resolveSSOCredentials({
- ssoStartUrl,
- ssoSession,
- ssoAccountId,
- ssoRegion,
- ssoRoleName,
- ssoClient,
- profile: profileName
- });
- }
- }, "fromSSO");
+ };
+ }, "getCustomizableStsClientCtor");
+ var getDefaultRoleAssumer2 = __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer");
+ var getDefaultRoleAssumerWithWebIdentity2 = __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity");
+ var decorateDefaultCredentialProvider = __name((provider) => (input) => provider({
+ roleAssumer: getDefaultRoleAssumer2(input),
+ roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
+ ...input
+ }), "decorateDefaultCredentialProvider");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver
-var require_dist_cjs55 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/e
+var require_dist_cjs61 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -20280,16 +25045,17 @@ var require_dist_cjs55 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
+ var index_exports = {};
+ __export2(index_exports, {
fromProcess: () => fromProcess
});
- module.exports = __toCommonJS(src_exports);
- var import_shared_ini_file_loader = require_dist_cjs36();
- var import_property_provider = require_dist_cjs25();
+ module.exports = __toCommonJS(index_exports);
+ var import_property_provider = require_dist_cjs18();
+ var import_shared_ini_file_loader = require_dist_cjs47();
var import_child_process = __require("child_process");
var import_util = __require("util");
- var getValidatedProcessCredentials = __name((profileName, data) => {
+ var import_client = require_client();
+ var getValidatedProcessCredentials = __name((profileName, data, profiles) => {
if (data.Version !== 1) {
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
}
@@ -20303,629 +25069,198 @@ var require_dist_cjs55 = __commonJS((exports, module) => {
throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
}
}
- return {
+ let accountId = data.AccountId;
+ if (!accountId && profiles?.[profileName]?.aws_account_id) {
+ accountId = profiles[profileName].aws_account_id;
+ }
+ const credentials = {
accessKeyId: data.AccessKeyId,
secretAccessKey: data.SecretAccessKey,
...data.SessionToken && { sessionToken: data.SessionToken },
...data.Expiration && { expiration: new Date(data.Expiration) },
- ...data.CredentialScope && { credentialScope: data.CredentialScope }
+ ...data.CredentialScope && { credentialScope: data.CredentialScope },
+ ...accountId && { accountId }
};
+ (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROCESS", "w");
+ return credentials;
}, "getValidatedProcessCredentials");
- var resolveProcessCredentials = __name(async (profileName, profiles) => {
+ var resolveProcessCredentials = __name(async (profileName, profiles, logger4) => {
const profile = profiles[profileName];
if (profiles[profileName]) {
const credentialProcess = profile["credential_process"];
if (credentialProcess !== undefined) {
- const execPromise = (0, import_util.promisify)(import_child_process.exec);
+ const execPromise = (0, import_util.promisify)(import_shared_ini_file_loader.externalDataInterceptor?.getTokenRecord?.().exec ?? import_child_process.exec);
try {
const { stdout } = await execPromise(credentialProcess);
let data;
try {
data = JSON.parse(stdout.trim());
- } catch {
- throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
- }
- return getValidatedProcessCredentials(profileName, data);
- } catch (error) {
- throw new import_property_provider.CredentialsProviderError(error.message);
- }
- } else {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`);
- }
- } else {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`);
- }
- }, "resolveProcessCredentials");
- var fromProcess = __name((init = {}) => async () => {
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
- return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)(init), profiles);
- }, "fromProcess");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.j
-var require_fromWebToken = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.fromWebToken = undefined;
- var property_provider_1 = require_dist_cjs25();
- var fromWebToken2 = (init) => () => {
- const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity } = init;
- if (!roleAssumerWithWebIdentity) {
- throw new property_provider_1.CredentialsProviderError(`Role Arn '${roleArn}' needs to be assumed with web identity,` + ` but no role assumption callback was provided.`, false);
- }
- return roleAssumerWithWebIdentity({
- RoleArn: roleArn,
- RoleSessionName: roleSessionName !== null && roleSessionName !== undefined ? roleSessionName : `aws-sdk-js-session-${Date.now()}`,
- WebIdentityToken: webIdentityToken,
- ProviderId: providerId,
- PolicyArns: policyArns,
- Policy: policy,
- DurationSeconds: durationSeconds
- });
- };
- exports.fromWebToken = fromWebToken2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.js
-var require_fromTokenFile = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.fromTokenFile = undefined;
- var property_provider_1 = require_dist_cjs25();
- var fs_1 = __require("fs");
- var fromWebToken_1 = require_fromWebToken();
- var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
- var ENV_ROLE_ARN = "AWS_ROLE_ARN";
- var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
- var fromTokenFile2 = (init = {}) => async () => {
- var _a, _b, _c;
- const webIdentityTokenFile = (_a = init === null || init === undefined ? undefined : init.webIdentityTokenFile) !== null && _a !== undefined ? _a : process.env[ENV_TOKEN_FILE];
- const roleArn = (_b = init === null || init === undefined ? undefined : init.roleArn) !== null && _b !== undefined ? _b : process.env[ENV_ROLE_ARN];
- const roleSessionName = (_c = init === null || init === undefined ? undefined : init.roleSessionName) !== null && _c !== undefined ? _c : process.env[ENV_ROLE_SESSION_NAME];
- if (!webIdentityTokenFile || !roleArn) {
- throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified");
- }
- return (0, fromWebToken_1.fromWebToken)({
- ...init,
- webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
- roleArn,
- roleSessionName
- })();
- };
- exports.fromTokenFile = fromTokenFile2;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsno
-var require_dist_cjs56 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- module.exports = __toCommonJS(src_exports);
- __reExport(src_exports, require_fromTokenFile(), module.exports);
- __reExport(src_exports, require_fromWebToken(), module.exports);
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jsso
-var require_dist_cjs57 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fromIni: () => fromIni
- });
- module.exports = __toCommonJS(src_exports);
- var import_shared_ini_file_loader = require_dist_cjs36();
- var import_credential_provider_env = require_dist_cjs46();
- var import_credential_provider_imds = require_dist_cjs45();
- var import_property_provider = require_dist_cjs25();
- var resolveCredentialSource = __name((credentialSource, profileName) => {
- const sourceProvidersMap = {
- EcsContainer: import_credential_provider_imds.fromContainerMetadata,
- Ec2InstanceMetadata: import_credential_provider_imds.fromInstanceMetadata,
- Environment: import_credential_provider_env.fromEnv
- };
- if (credentialSource in sourceProvidersMap) {
- return sourceProvidersMap[credentialSource]();
- } else {
- throw new import_property_provider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`);
- }
- }, "resolveCredentialSource");
- var isAssumeRoleProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg) || isAssumeRoleWithProviderProfile(arg)), "isAssumeRoleProfile");
- var isAssumeRoleWithSourceProfile = __name((arg) => typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined", "isAssumeRoleWithSourceProfile");
- var isAssumeRoleWithProviderProfile = __name((arg) => typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined", "isAssumeRoleWithProviderProfile");
- var resolveAssumeRoleCredentials = __name(async (profileName, profiles, options, visitedProfiles = {}) => {
- const data = profiles[profileName];
- if (!options.roleAssumer) {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} requires a role to be assumed, but no role assumption callback was provided.`, false);
- }
- const { source_profile } = data;
- if (source_profile && source_profile in visitedProfiles) {
- throw new import_property_provider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), false);
- }
- const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
- ...visitedProfiles,
- [source_profile]: true
- }) : resolveCredentialSource(data.credential_source, profileName)();
- const params = {
- RoleArn: data.role_arn,
- RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`,
- ExternalId: data.external_id,
- DurationSeconds: parseInt(data.duration_seconds || "3600", 10)
- };
- const { mfa_serial } = data;
- if (mfa_serial) {
- if (!options.mfaCodeProvider) {
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, false);
- }
- params.SerialNumber = mfa_serial;
- params.TokenCode = await options.mfaCodeProvider(mfa_serial);
- }
- const sourceCreds = await sourceCredsProvider;
- return options.roleAssumer(sourceCreds, params);
- }, "resolveAssumeRoleCredentials");
- var import_credential_provider_process = require_dist_cjs55();
- var isProcessProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
- var resolveProcessCredentials = __name(async (options, profile) => (0, import_credential_provider_process.fromProcess)({
- ...options,
- profile
- })(), "resolveProcessCredentials");
- var import_credential_provider_sso = require_dist_cjs54();
- var resolveSsoCredentials = __name((data) => {
- const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = (0, import_credential_provider_sso.validateSsoProfile)(data);
- return (0, import_credential_provider_sso.fromSSO)({
- ssoStartUrl: sso_start_url,
- ssoAccountId: sso_account_id,
- ssoSession: sso_session,
- ssoRegion: sso_region,
- ssoRoleName: sso_role_name
- })();
- }, "resolveSsoCredentials");
- var isStaticCredsProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1, "isStaticCredsProfile");
- var resolveStaticCredentials = __name((profile) => Promise.resolve({
- accessKeyId: profile.aws_access_key_id,
- secretAccessKey: profile.aws_secret_access_key,
- sessionToken: profile.aws_session_token,
- credentialScope: profile.aws_credential_scope
- }), "resolveStaticCredentials");
- var import_credential_provider_web_identity = require_dist_cjs56();
- var isWebIdentityProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
- var resolveWebIdentityCredentials = __name(async (profile, options) => (0, import_credential_provider_web_identity.fromTokenFile)({
- webIdentityTokenFile: profile.web_identity_token_file,
- roleArn: profile.role_arn,
- roleSessionName: profile.role_session_name,
- roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity
- })(), "resolveWebIdentityCredentials");
- var resolveProfileData = __name(async (profileName, profiles, options, visitedProfiles = {}) => {
- const data = profiles[profileName];
- if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
- return resolveStaticCredentials(data);
- }
- if (isAssumeRoleProfile(data)) {
- return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
- }
- if (isStaticCredsProfile(data)) {
- return resolveStaticCredentials(data);
- }
- if (isWebIdentityProfile(data)) {
- return resolveWebIdentityCredentials(data, options);
- }
- if (isProcessProfile(data)) {
- return resolveProcessCredentials(options, profileName);
- }
- if ((0, import_credential_provider_sso.isSsoProfile)(data)) {
- return resolveSsoCredentials(data);
- }
- throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found or parsed in shared credentials file.`);
- }, "resolveProfileData");
- var fromIni = __name((init = {}) => async () => {
- const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
- return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)(init), profiles, init);
- }, "fromIni");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssol
-var require_dist_cjs58 = __commonJS((exports, module) => {
- var __create2 = Object.create;
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __getProtoOf2 = Object.getPrototypeOf;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod));
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,
- credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,
- defaultProvider: () => defaultProvider
- });
- module.exports = __toCommonJS(src_exports);
- var import_shared_ini_file_loader = require_dist_cjs36();
- var import_property_provider = require_dist_cjs25();
- var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
- var remoteProvider = __name(async (init) => {
- const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs45()));
- if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
- return fromContainerMetadata(init);
- }
- if (process.env[ENV_IMDS_DISABLED]) {
- return async () => {
- throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled");
- };
- }
- return fromInstanceMetadata(init);
- }, "remoteProvider");
- var defaultProvider = __name((init = {}) => (0, import_property_provider.memoize)((0, import_property_provider.chain)(...init.profile || process.env[import_shared_ini_file_loader.ENV_PROFILE] ? [] : [
- async () => {
- const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs46()));
- return fromEnv()();
- }
- ], async () => {
- const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs54()));
- return fromSSO(init)();
- }, async () => {
- const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs57()));
- return fromIni(init)();
- }, async () => {
- const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs55()));
- return fromProcess(init)();
- }, async () => {
- const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs56()));
- return fromTokenFile2(init)();
- }, async () => {
- return (await remoteProvider(init))();
- }, async () => {
- throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", false);
- }), credentialsTreatedAsExpired, credentialsWillNeedRefresh), "defaultProvider");
- var credentialsWillNeedRefresh = __name((credentials) => (credentials == null ? undefined : credentials.expiration) !== undefined, "credentialsWillNeedRefresh");
- var credentialsTreatedAsExpired = __name((credentials) => (credentials == null ? undefined : credentials.expiration) !== undefined && credentials.expiration.getTime() - Date.now() < 300000, "credentialsTreatedAsExpired");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_ruleset2 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.ruleSet = undefined;
- var F = "required";
- var G = "type";
- var H = "fn";
- var I = "argv";
- var J = "ref";
- var a = false;
- var b = true;
- var c = "booleanEquals";
- var d = "stringEquals";
- var e = "sigv4";
- var f = "sts";
- var g = "us-east-1";
- var h = "endpoint";
- var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
- var j = "tree";
- var k = "error";
- var l = "getAttr";
- var m = { [F]: false, [G]: "String" };
- var n = { [F]: true, default: false, [G]: "Boolean" };
- var o = { [J]: "Endpoint" };
- var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
- var q = { [J]: "Region" };
- var r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" };
- var s = { [J]: "UseFIPS" };
- var t = { [J]: "UseDualStack" };
- var u = { url: "https://sts.amazonaws.com", properties: { authSchemes: [{ name: e, signingName: f, signingRegion: g }] }, headers: {} };
- var v = {};
- var w = { conditions: [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h };
- var x = { [H]: c, [I]: [s, true] };
- var y = { [H]: c, [I]: [t, true] };
- var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
- var A = { [J]: "PartitionResult" };
- var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
- var C = [{ [H]: "isSet", [I]: [o] }];
- var D = [x];
- var E = [y];
- var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
- exports.ruleSet = _data;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.js
-var require_endpointResolver2 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.defaultEndpointResolver = undefined;
- var util_endpoints_1 = require_dist_cjs27();
- var ruleset_1 = require_ruleset2();
- var defaultEndpointResolver = (endpointParams, context = {}) => {
- return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
- endpointParams,
- logger: context.logger
- });
- };
- exports.defaultEndpointResolver = defaultEndpointResolver;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolv
-var require_runtimeConfig_shared2 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getRuntimeConfig = undefined;
- var core_1 = require_dist_cjs44();
- var core_2 = require_dist_cjs43();
- var smithy_client_1 = require_dist_cjs16();
- var url_parser_1 = require_dist_cjs39();
- var util_base64_1 = require_dist_cjs10();
- var util_utf8_1 = require_dist_cjs11();
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
- var endpointResolver_1 = require_endpointResolver2();
- var getRuntimeConfig = (config) => {
- return {
- apiVersion: "2011-06-15",
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
- disableHostPrefix: config?.disableHostPrefix ?? false,
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
- extensions: config?.extensions ?? [],
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
- httpAuthSchemes: config?.httpAuthSchemes ?? [
- {
- schemeId: "aws.auth#sigv4",
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
- signer: new core_1.AwsSdkSigV4Signer
- },
- {
- schemeId: "smithy.api#noAuth",
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
- signer: new core_2.NoAuthSigner
- }
- ],
- logger: config?.logger ?? new smithy_client_1.NoOpLogger,
- serviceId: config?.serviceId ?? "STS",
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
- };
- };
- exports.getRuntimeConfig = getRuntimeConfig;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset
-var require_runtimeConfig2 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getRuntimeConfig = undefined;
- var tslib_1 = require_tslib2();
- var package_json_1 = tslib_1.__importDefault(require_package3());
- var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers();
- var core_1 = require_dist_cjs44();
- var credential_provider_node_1 = require_dist_cjs58();
- var util_user_agent_node_1 = require_dist_cjs47();
- var config_resolver_1 = require_dist_cjs30();
- var core_2 = require_dist_cjs43();
- var hash_node_1 = require_dist_cjs48();
- var middleware_retry_1 = require_dist_cjs35();
- var node_config_provider_1 = require_dist_cjs37();
- var node_http_handler_1 = require_dist_cjs14();
- var util_body_length_node_1 = require_dist_cjs49();
- var util_retry_1 = require_dist_cjs34();
- var runtimeConfig_shared_1 = require_runtimeConfig_shared2();
- var smithy_client_1 = require_dist_cjs16();
- var util_defaults_mode_node_1 = require_dist_cjs50();
- var smithy_client_2 = require_dist_cjs16();
- var getRuntimeConfig = (config) => {
- (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
- return {
- ...clientSharedValues,
- ...config,
- runtime: "node",
- defaultsMode,
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
- credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
- httpAuthSchemes: config?.httpAuthSchemes ?? [
- {
- schemeId: "aws.auth#sigv4",
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider)(idProps?.__config || {})()),
- signer: new core_1.AwsSdkSigV4Signer
- },
- {
- schemeId: "smithy.api#noAuth",
- identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
- signer: new core_2.NoAuthSigner
- }
- ],
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
- requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
- }),
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
- };
- };
- exports.getRuntimeConfig = getRuntimeConfig;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.js
-var require_httpAuthExtensionConfiguration = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = undefined;
- var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
- let _credentials = runtimeConfig.credentials;
- return {
- setHttpAuthScheme(httpAuthScheme) {
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
- if (index === -1) {
- _httpAuthSchemes.push(httpAuthScheme);
- } else {
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
- }
- },
- httpAuthSchemes() {
- return _httpAuthSchemes;
- },
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
- },
- httpAuthSchemeProvider() {
- return _httpAuthSchemeProvider;
- },
- setCredentials(credentials) {
- _credentials = credentials;
- },
- credentials() {
- return _credentials;
+ } catch {
+ throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
+ }
+ return getValidatedProcessCredentials(profileName, data, profiles);
+ } catch (error) {
+ throw new import_property_provider.CredentialsProviderError(error.message, { logger: logger4 });
+ }
+ } else {
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger: logger4 });
}
- };
- };
- exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
- var resolveHttpAuthRuntimeConfig = (config) => {
- return {
- httpAuthSchemes: config.httpAuthSchemes(),
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
- credentials: config.credentials()
- };
- };
- exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
+ } else {
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
+ logger: logger4
+ });
+ }
+ }, "resolveProcessCredentials");
+ var fromProcess = __name((init = {}) => async ({ callerClientConfig } = {}) => {
+ init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
+ return resolveProcessCredentials((0, import_shared_ini_file_loader.getProfileName)({
+ profile: init.profile ?? callerClientConfig?.profile
+ }), profiles, init.logger);
+ }, "fromProcess");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jss
-var require_runtimeExtensions = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.resolveRuntimeExtensions = undefined;
- var region_config_resolver_1 = require_dist_cjs51();
- var protocol_http_1 = require_dist_cjs2();
- var smithy_client_1 = require_dist_cjs16();
- var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration();
- var asPartial = (t) => t;
- var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
- const extensionConfiguration = {
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig))
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rule
+var require_fromWebToken = __commonJS((exports) => {
+ var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
+ if (k2 === undefined)
+ k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() {
+ return m[k];
+ } };
+ }
+ Object.defineProperty(o, k2, desc);
+ } : function(o, m, k, k2) {
+ if (k2 === undefined)
+ k2 = k;
+ o[k2] = m[k];
+ });
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+ } : function(o, v) {
+ o["default"] = v;
+ });
+ var __importStar = exports && exports.__importStar || function() {
+ var ownKeys = function(o) {
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
+ var ar = [];
+ for (var k in o2)
+ if (Object.prototype.hasOwnProperty.call(o2, k))
+ ar[ar.length] = k;
+ return ar;
+ };
+ return ownKeys(o);
};
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
- return {
- ...runtimeConfig,
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
- ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration)
+ return function(mod) {
+ if (mod && mod.__esModule)
+ return mod;
+ var result = {};
+ if (mod != null) {
+ for (var k = ownKeys(mod), i = 0;i < k.length; i++)
+ if (k[i] !== "default")
+ __createBinding(result, mod, k[i]);
+ }
+ __setModuleDefault(result, mod);
+ return result;
};
+ }();
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.fromWebToken = undefined;
+ var fromWebToken2 = (init) => async (awsIdentityProperties) => {
+ init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
+ const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
+ let { roleAssumerWithWebIdentity } = init;
+ if (!roleAssumerWithWebIdentity) {
+ const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require_sts()));
+ roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
+ ...init.clientConfig,
+ credentialProviderLogger: init.logger,
+ parentClientConfig: {
+ ...awsIdentityProperties?.callerClientConfig,
+ ...init.parentClientConfig
+ }
+ }, init.clientPlugins);
+ }
+ return roleAssumerWithWebIdentity({
+ RoleArn: roleArn,
+ RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,
+ WebIdentityToken: webIdentityToken,
+ ProviderId: providerId,
+ PolicyArns: policyArns,
+ Policy: policy,
+ DurationSeconds: durationSeconds
+ });
};
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
+ exports.fromWebToken = fromWebToken2;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var require_STSClient = __commonJS((exports) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoint/rules
+var require_fromTokenFile = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- exports.STSClient = exports.__Client = undefined;
- var middleware_host_header_1 = require_dist_cjs4();
- var middleware_logger_1 = require_dist_cjs5();
- var middleware_recursion_detection_1 = require_dist_cjs6();
- var middleware_user_agent_1 = require_dist_cjs29();
- var config_resolver_1 = require_dist_cjs30();
- var core_1 = require_dist_cjs43();
- var middleware_content_length_1 = require_dist_cjs32();
- var middleware_endpoint_1 = require_dist_cjs41();
- var middleware_retry_1 = require_dist_cjs35();
- var smithy_client_1 = require_dist_cjs16();
- Object.defineProperty(exports, "__Client", { enumerable: true, get: function() {
- return smithy_client_1.Client;
- } });
- var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
- var EndpointParameters_1 = require_EndpointParameters();
- var runtimeConfig_1 = require_runtimeConfig2();
- var runtimeExtensions_1 = require_runtimeExtensions();
-
- class STSClient2 extends smithy_client_1.Client {
- constructor(...[configuration]) {
- const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
- const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
- const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
- const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
- const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
- const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
- const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);
- const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
- const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
- super(_config_8);
- this.config = _config_8;
- this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
- this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
- this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
- this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
- this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
- this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
- this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
- httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
- identityProviderConfigProvider: this.getIdentityProviderConfigProvider()
- }));
- this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
- }
- destroy() {
- super.destroy();
+ exports.fromTokenFile = undefined;
+ var client_1 = require_client();
+ var property_provider_1 = require_dist_cjs18();
+ var shared_ini_file_loader_1 = require_dist_cjs47();
+ var fs_1 = __require("fs");
+ var fromWebToken_1 = require_fromWebToken();
+ var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
+ var ENV_ROLE_ARN = "AWS_ROLE_ARN";
+ var ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME";
+ var fromTokenFile2 = (init = {}) => async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
+ const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
+ const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
+ const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
+ if (!webIdentityTokenFile || !roleArn) {
+ throw new property_provider_1.CredentialsProviderError("Web identity configuration not specified", {
+ logger: init.logger
+ });
}
- getDefaultHttpAuthSchemeParametersProvider() {
- return httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider;
+ const credentials = await (0, fromWebToken_1.fromWebToken)({
+ ...init,
+ webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
+ roleArn,
+ roleSessionName
+ })();
+ if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
+ (0, client_1.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
}
- getIdentityProviderConfigProvider() {
- return async (config) => new core_1.DefaultIdentityProviderConfig({
- "aws.auth#sigv4": config.credentials
- });
+ return credentials;
+ };
+ exports.fromTokenFile = fromTokenFile2;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endpoi
+var require_dist_cjs62 = __commonJS((exports, module) => {
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
- }
- exports.STSClient = STSClient2;
+ return to;
+ };
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ module.exports = __toCommonJS(index_exports);
+ __reExport(index_exports, require_fromTokenFile(), module.exports);
+ __reExport(index_exports, require_fromWebToken(), module.exports);
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_dist_cjs59 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
+var require_dist_cjs63 = __commonJS((exports, module) => {
+ var __create2 = Object.create;
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __getProtoOf2 = Object.getPrototypeOf;
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
var __export2 = (target, all) => {
@@ -20940,191 +25275,312 @@ var require_dist_cjs59 = __commonJS((exports, module) => {
}
return to;
};
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod));
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,
- ClientInputEndpointParameters: () => import_EndpointParameters7.ClientInputEndpointParameters,
- DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,
- GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,
- GetCallerIdentityCommand: () => GetCallerIdentityCommand,
- GetFederationTokenCommand: () => GetFederationTokenCommand,
- GetSessionTokenCommand: () => GetSessionTokenCommand,
- RuntimeExtension: () => import_runtimeExtensions.RuntimeExtension,
- STS: () => STS,
- STSServiceException: () => import_STSServiceException.STSServiceException,
- decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,
- getDefaultRoleAssumer: () => getDefaultRoleAssumer,
- getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity
+ var index_exports = {};
+ __export2(index_exports, {
+ fromIni: () => fromIni
});
- module.exports = __toCommonJS(src_exports);
- __reExport(src_exports, require_STSClient(), module.exports);
- var import_AssumeRoleCommand = require_AssumeRoleCommand();
- var import_middleware_endpoint = require_dist_cjs41();
- var import_middleware_serde = require_dist_cjs40();
- var import_smithy_client = require_dist_cjs16();
- var import_types = require_dist_cjs();
- var import_EndpointParameters = require_EndpointParameters();
- var import_models_0 = require_models_0();
- var import_Aws_query = require_Aws_query();
- var _AssumeRoleWithSAMLCommand = class _AssumeRoleWithSAMLCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithSAML", {}).n("STSClient", "AssumeRoleWithSAMLCommand").f(import_models_0.AssumeRoleWithSAMLRequestFilterSensitiveLog, import_models_0.AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(import_Aws_query.se_AssumeRoleWithSAMLCommand).de(import_Aws_query.de_AssumeRoleWithSAMLCommand).build() {
- };
- __name(_AssumeRoleWithSAMLCommand, "AssumeRoleWithSAMLCommand");
- var AssumeRoleWithSAMLCommand = _AssumeRoleWithSAMLCommand;
- var import_AssumeRoleWithWebIdentityCommand = require_AssumeRoleWithWebIdentityCommand();
- var import_EndpointParameters2 = require_EndpointParameters();
- var import_Aws_query2 = require_Aws_query();
- var _DecodeAuthorizationMessageCommand = class _DecodeAuthorizationMessageCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters2.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "DecodeAuthorizationMessage", {}).n("STSClient", "DecodeAuthorizationMessageCommand").f(undefined, undefined).ser(import_Aws_query2.se_DecodeAuthorizationMessageCommand).de(import_Aws_query2.de_DecodeAuthorizationMessageCommand).build() {
+ module.exports = __toCommonJS(index_exports);
+ var import_shared_ini_file_loader = require_dist_cjs47();
+ var import_client = require_client();
+ var import_property_provider = require_dist_cjs18();
+ var resolveCredentialSource = __name((credentialSource, profileName, logger4) => {
+ const sourceProvidersMap = {
+ EcsContainer: __name(async (options) => {
+ const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs52()));
+ const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs51()));
+ logger4?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
+ return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
+ }, "EcsContainer"),
+ Ec2InstanceMetadata: __name(async (options) => {
+ logger4?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
+ const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs51()));
+ return async () => fromInstanceMetadata(options)().then(setNamedProvider);
+ }, "Ec2InstanceMetadata"),
+ Environment: __name(async (options) => {
+ logger4?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
+ const { fromEnv } = await Promise.resolve().then(() => __toESM2(require_dist_cjs50()));
+ return async () => fromEnv(options)().then(setNamedProvider);
+ }, "Environment")
+ };
+ if (credentialSource in sourceProvidersMap) {
+ return sourceProvidersMap[credentialSource];
+ } else {
+ throw new import_property_provider.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger: logger4 });
+ }
+ }, "resolveCredentialSource");
+ var setNamedProvider = __name((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p"), "setNamedProvider");
+ var isAssumeRoleProfile = __name((arg, { profile = "default", logger: logger4 } = {}) => {
+ return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger: logger4 }) || isCredentialSourceProfile(arg, { profile, logger: logger4 }));
+ }, "isAssumeRoleProfile");
+ var isAssumeRoleWithSourceProfile = __name((arg, { profile, logger: logger4 }) => {
+ const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
+ if (withSourceProfile) {
+ logger4?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
+ }
+ return withSourceProfile;
+ }, "isAssumeRoleWithSourceProfile");
+ var isCredentialSourceProfile = __name((arg, { profile, logger: logger4 }) => {
+ const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
+ if (withProviderProfile) {
+ logger4?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
+ }
+ return withProviderProfile;
+ }, "isCredentialSourceProfile");
+ var resolveAssumeRoleCredentials = __name(async (profileName, profiles, options, visitedProfiles = {}) => {
+ options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
+ const profileData = profiles[profileName];
+ const { source_profile, region } = profileData;
+ if (!options.roleAssumer) {
+ const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM2(require_sts()));
+ options.roleAssumer = getDefaultRoleAssumer({
+ ...options.clientConfig,
+ credentialProviderLogger: options.logger,
+ parentClientConfig: {
+ ...options?.parentClientConfig,
+ region: region ?? options?.parentClientConfig?.region
+ }
+ }, options.clientPlugins);
+ }
+ if (source_profile && source_profile in visitedProfiles) {
+ throw new import_property_provider.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
+ }
+ options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
+ const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, {
+ ...visitedProfiles,
+ [source_profile]: true
+ }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
+ if (isCredentialSourceWithoutRoleArn(profileData)) {
+ return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
+ } else {
+ const params = {
+ RoleArn: profileData.role_arn,
+ RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
+ ExternalId: profileData.external_id,
+ DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
+ };
+ const { mfa_serial } = profileData;
+ if (mfa_serial) {
+ if (!options.mfaCodeProvider) {
+ throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
+ }
+ params.SerialNumber = mfa_serial;
+ params.TokenCode = await options.mfaCodeProvider(mfa_serial);
+ }
+ const sourceCreds = await sourceCredsProvider;
+ return options.roleAssumer(sourceCreds, params).then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
+ }
+ }, "resolveAssumeRoleCredentials");
+ var isCredentialSourceWithoutRoleArn = __name((section) => {
+ return !section.role_arn && !!section.credential_source;
+ }, "isCredentialSourceWithoutRoleArn");
+ var isProcessProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", "isProcessProfile");
+ var resolveProcessCredentials = __name(async (options, profile) => Promise.resolve().then(() => __toESM2(require_dist_cjs61())).then(({ fromProcess }) => fromProcess({
+ ...options,
+ profile
+ })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))), "resolveProcessCredentials");
+ var resolveSsoCredentials = __name(async (profile, profileData, options = {}) => {
+ const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs60()));
+ return fromSSO({
+ profile,
+ logger: options.logger,
+ parentClientConfig: options.parentClientConfig,
+ clientConfig: options.clientConfig
+ })().then((creds) => {
+ if (profileData.sso_session) {
+ return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO", "r");
+ } else {
+ return (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
+ }
+ });
+ }, "resolveSsoCredentials");
+ var isSsoProfile = __name((arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"), "isSsoProfile");
+ var isStaticCredsProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, "isStaticCredsProfile");
+ var resolveStaticCredentials = __name(async (profile, options) => {
+ options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
+ const credentials = {
+ accessKeyId: profile.aws_access_key_id,
+ secretAccessKey: profile.aws_secret_access_key,
+ sessionToken: profile.aws_session_token,
+ ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
+ ...profile.aws_account_id && { accountId: profile.aws_account_id }
+ };
+ return (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_PROFILE", "n");
+ }, "resolveStaticCredentials");
+ var isWebIdentityProfile = __name((arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, "isWebIdentityProfile");
+ var resolveWebIdentityCredentials = __name(async (profile, options) => Promise.resolve().then(() => __toESM2(require_dist_cjs62())).then(({ fromTokenFile: fromTokenFile2 }) => fromTokenFile2({
+ webIdentityTokenFile: profile.web_identity_token_file,
+ roleArn: profile.role_arn,
+ roleSessionName: profile.role_session_name,
+ roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
+ logger: options.logger,
+ parentClientConfig: options.parentClientConfig
+ })().then((creds) => (0, import_client.setCredentialFeature)(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))), "resolveWebIdentityCredentials");
+ var resolveProfileData = __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
+ const data = profiles[profileName];
+ if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
+ return resolveStaticCredentials(data, options);
+ }
+ if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
+ return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);
+ }
+ if (isStaticCredsProfile(data)) {
+ return resolveStaticCredentials(data, options);
+ }
+ if (isWebIdentityProfile(data)) {
+ return resolveWebIdentityCredentials(data, options);
+ }
+ if (isProcessProfile(data)) {
+ return resolveProcessCredentials(options, profileName);
+ }
+ if (isSsoProfile(data)) {
+ return await resolveSsoCredentials(profileName, data, options);
+ }
+ throw new import_property_provider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
+ }, "resolveProfileData");
+ var fromIni = __name((_init = {}) => async ({ callerClientConfig } = {}) => {
+ const init = {
+ ..._init,
+ parentClientConfig: {
+ ...callerClientConfig,
+ ..._init.parentClientConfig
+ }
+ };
+ init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
+ const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);
+ return resolveProfileData((0, import_shared_ini_file_loader.getProfileName)({
+ profile: _init.profile ?? callerClientConfig?.profile
+ }), profiles, init);
+ }, "fromIni");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_dist_cjs64 = __commonJS((exports, module) => {
+ var __create2 = Object.create;
+ var __defProp2 = Object.defineProperty;
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
+ var __getProtoOf2 = Object.getPrototypeOf;
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
+ var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
+ var __export2 = (target, all) => {
+ for (var name in all)
+ __defProp2(target, name, { get: all[name], enumerable: true });
};
- __name(_DecodeAuthorizationMessageCommand, "DecodeAuthorizationMessageCommand");
- var DecodeAuthorizationMessageCommand = _DecodeAuthorizationMessageCommand;
- var import_EndpointParameters3 = require_EndpointParameters();
- var import_Aws_query3 = require_Aws_query();
- var _GetAccessKeyInfoCommand = class _GetAccessKeyInfoCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters3.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "GetAccessKeyInfo", {}).n("STSClient", "GetAccessKeyInfoCommand").f(undefined, undefined).ser(import_Aws_query3.se_GetAccessKeyInfoCommand).de(import_Aws_query3.de_GetAccessKeyInfoCommand).build() {
- };
- __name(_GetAccessKeyInfoCommand, "GetAccessKeyInfoCommand");
- var GetAccessKeyInfoCommand = _GetAccessKeyInfoCommand;
- var import_EndpointParameters4 = require_EndpointParameters();
- var import_Aws_query4 = require_Aws_query();
- var _GetCallerIdentityCommand = class _GetCallerIdentityCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters4.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "GetCallerIdentity", {}).n("STSClient", "GetCallerIdentityCommand").f(undefined, undefined).ser(import_Aws_query4.se_GetCallerIdentityCommand).de(import_Aws_query4.de_GetCallerIdentityCommand).build() {
- };
- __name(_GetCallerIdentityCommand, "GetCallerIdentityCommand");
- var GetCallerIdentityCommand = _GetCallerIdentityCommand;
- var import_EndpointParameters5 = require_EndpointParameters();
- var import_models_02 = require_models_0();
- var import_Aws_query5 = require_Aws_query();
- var _GetFederationTokenCommand = class _GetFederationTokenCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters5.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "GetFederationToken", {}).n("STSClient", "GetFederationTokenCommand").f(undefined, import_models_02.GetFederationTokenResponseFilterSensitiveLog).ser(import_Aws_query5.se_GetFederationTokenCommand).de(import_Aws_query5.de_GetFederationTokenCommand).build() {
- };
- __name(_GetFederationTokenCommand, "GetFederationTokenCommand");
- var GetFederationTokenCommand = _GetFederationTokenCommand;
- var import_EndpointParameters6 = require_EndpointParameters();
- var import_models_03 = require_models_0();
- var import_Aws_query6 = require_Aws_query();
- var _GetSessionTokenCommand = class _GetSessionTokenCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...import_EndpointParameters6.commonParams
- }).m(function(Command, cs, config, o) {
- return [
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
- ];
- }).s("AWSSecurityTokenServiceV20110615", "GetSessionToken", {}).n("STSClient", "GetSessionTokenCommand").f(undefined, import_models_03.GetSessionTokenResponseFilterSensitiveLog).ser(import_Aws_query6.se_GetSessionTokenCommand).de(import_Aws_query6.de_GetSessionTokenCommand).build() {
+ var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames2(from))
+ if (!__hasOwnProp2.call(to, key) && key !== except)
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
};
- __name(_GetSessionTokenCommand, "GetSessionTokenCommand");
- var GetSessionTokenCommand = _GetSessionTokenCommand;
- var import_STSClient = require_STSClient();
- var commands = {
- AssumeRoleCommand: import_AssumeRoleCommand.AssumeRoleCommand,
- AssumeRoleWithSAMLCommand,
- AssumeRoleWithWebIdentityCommand: import_AssumeRoleWithWebIdentityCommand.AssumeRoleWithWebIdentityCommand,
- DecodeAuthorizationMessageCommand,
- GetAccessKeyInfoCommand,
- GetCallerIdentityCommand,
- GetFederationTokenCommand,
- GetSessionTokenCommand
- };
- var _STS = class _STS2 extends import_STSClient.STSClient {
- };
- __name(_STS, "STS");
- var STS = _STS;
- (0, import_smithy_client.createAggregatedClient)(commands, STS);
- var import_EndpointParameters7 = require_EndpointParameters();
- var import_runtimeExtensions = require_runtimeExtensions();
- var commands_exports = {};
- __export2(commands_exports, {
- AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,
- DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,
- GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,
- GetCallerIdentityCommand: () => GetCallerIdentityCommand,
- GetFederationTokenCommand: () => GetFederationTokenCommand,
- GetSessionTokenCommand: () => GetSessionTokenCommand
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod));
+ var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
+ var index_exports = {};
+ __export2(index_exports, {
+ credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,
+ credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,
+ defaultProvider: () => defaultProvider
});
- __reExport(commands_exports, require_AssumeRoleCommand());
- __reExport(commands_exports, require_AssumeRoleWithWebIdentityCommand());
- __reExport(src_exports, commands_exports, module.exports);
- var models_exports = {};
- __reExport(models_exports, require_models_0());
- __reExport(src_exports, models_exports, module.exports);
- var import_util_endpoints = require_dist_cjs28();
- var import_defaultStsRoleAssumers = require_defaultStsRoleAssumers();
- var import_STSClient2 = require_STSClient();
- var getCustomizableStsClientCtor = __name((baseCtor, customizations) => {
- var _a;
- if (!customizations)
- return baseCtor;
- else
- return _a = class extends baseCtor {
- constructor(config) {
- super(config);
- for (const customization of customizations) {
- this.middlewareStack.use(customization);
- }
- }
- }, __name(_a, "CustomizableSTSClient"), _a;
- }, "getCustomizableStsClientCtor");
- var getDefaultRoleAssumer = __name((stsOptions = {}, stsPlugins) => (0, import_defaultStsRoleAssumers.getDefaultRoleAssumer)(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumer");
- var getDefaultRoleAssumerWithWebIdentity = __name((stsOptions = {}, stsPlugins) => (0, import_defaultStsRoleAssumers.getDefaultRoleAssumerWithWebIdentity)(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), "getDefaultRoleAssumerWithWebIdentity");
- var decorateDefaultCredentialProvider = __name((provider) => (input) => provider({
- roleAssumer: getDefaultRoleAssumer(input),
- roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
- ...input
- }), "decorateDefaultCredentialProvider");
- var import_STSServiceException = require_STSServiceException();
+ module.exports = __toCommonJS(index_exports);
+ var import_credential_provider_env = require_dist_cjs50();
+ var import_shared_ini_file_loader = require_dist_cjs47();
+ var import_property_provider = require_dist_cjs18();
+ var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
+ var remoteProvider = __name(async (init) => {
+ const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM2(require_dist_cjs51()));
+ if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {
+ init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
+ const { fromHttp } = await Promise.resolve().then(() => __toESM2(require_dist_cjs52()));
+ return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));
+ }
+ if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
+ return async () => {
+ throw new import_property_provider.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
+ };
+ }
+ init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
+ return fromInstanceMetadata(init);
+ }, "remoteProvider");
+ var multipleCredentialSourceWarningEmitted = false;
+ var defaultProvider = __name((init = {}) => (0, import_property_provider.memoize)((0, import_property_provider.chain)(async () => {
+ const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];
+ if (profile) {
+ const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];
+ if (envStaticCredentialsAreSet) {
+ if (!multipleCredentialSourceWarningEmitted) {
+ const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn;
+ warnFn(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
+ Multiple credential sources detected:
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
+ This SDK will proceed with the AWS_PROFILE value.
+
+ However, a future version may change this behavior to prefer the ENV static credentials.
+ Please ensure that your environment only sets either the AWS_PROFILE or the
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
+`);
+ multipleCredentialSourceWarningEmitted = true;
+ }
+ }
+ throw new import_property_provider.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
+ logger: init.logger,
+ tryNextLink: true
+ });
+ }
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");
+ return (0, import_credential_provider_env.fromEnv)(init)();
+ }, async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
+ const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
+ if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
+ throw new import_property_provider.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
+ }
+ const { fromSSO } = await Promise.resolve().then(() => __toESM2(require_dist_cjs60()));
+ return fromSSO(init)();
+ }, async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");
+ const { fromIni } = await Promise.resolve().then(() => __toESM2(require_dist_cjs63()));
+ return fromIni(init)();
+ }, async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");
+ const { fromProcess } = await Promise.resolve().then(() => __toESM2(require_dist_cjs61()));
+ return fromProcess(init)();
+ }, async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");
+ const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => __toESM2(require_dist_cjs62()));
+ return fromTokenFile2(init)();
+ }, async () => {
+ init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");
+ return (await remoteProvider(init))();
+ }, async () => {
+ throw new import_property_provider.CredentialsProviderError("Could not load credentials from any providers", {
+ tryNextLink: false,
+ logger: init.logger
+ });
+ }), credentialsTreatedAsExpired, credentialsWillNeedRefresh), "defaultProvider");
+ var credentialsWillNeedRefresh = __name((credentials) => credentials?.expiration !== undefined, "credentialsWillNeedRefresh");
+ var credentialsTreatedAsExpired = __name((credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, "credentialsTreatedAsExpired");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolve
-var require_dist_cjs60 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/
+var require_dist_cjs65 = __commonJS((exports, module) => {
var resolveBucketEndpointConfig = function(input) {
const {
bucketEndpoint = false,
forcePathStyle = false,
useAccelerateEndpoint = false,
- useArnRegion = false,
+ useArnRegion,
disableMultiregionAccessPoints = false
} = input;
- return {
- ...input,
+ return Object.assign(input, {
bucketEndpoint,
forcePathStyle,
useAccelerateEndpoint,
useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion),
disableMultiregionAccessPoints: typeof disableMultiregionAccessPoints === "function" ? disableMultiregionAccessPoints : () => Promise.resolve(disableMultiregionAccessPoints)
- };
+ });
};
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -21144,8 +25600,8 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
+ var index_exports = {};
+ __export2(index_exports, {
NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS,
NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME,
NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME: () => NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME,
@@ -21167,23 +25623,23 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
validatePartition: () => validatePartition,
validateRegion: () => validateRegion
});
- module.exports = __toCommonJS(src_exports);
- var import_util_config_provider = require_dist_cjs22();
+ module.exports = __toCommonJS(index_exports);
+ var import_util_config_provider = require_dist_cjs32();
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS";
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points";
var NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, import_util_config_provider.SelectorType.ENV),
- configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, import_util_config_provider.SelectorType.CONFIG),
+ environmentVariableSelector: __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
+ configFileSelector: __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
default: false
};
var NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION";
var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
var NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
- environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider.SelectorType.ENV),
- configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider.SelectorType.CONFIG),
- default: false
+ environmentVariableSelector: __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
+ configFileSelector: __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
+ default: undefined
};
- var import_util_arn_parser = require_dist_cjs23();
+ var import_util_arn_parser = require_dist_cjs33();
var import_protocol_http = require_dist_cjs2();
var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
@@ -21232,33 +25688,19 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
}
}, "validatePartition");
var validateRegion = __name((region, options) => {
- if (region === "") {
- throw new Error("ARN region is empty");
- }
- if (options.useFipsEndpoint) {
- if (!options.allowFipsRegion) {
- throw new Error("FIPS region is not supported");
- } else if (!isEqualRegions(region, options.clientRegion)) {
- throw new Error(`Client FIPS region ${options.clientRegion} doesn't match region ${region} in ARN`);
- }
- }
- if (!options.useArnRegion && !isEqualRegions(region, options.clientRegion || "") && !isEqualRegions(region, options.clientSigningRegion || "")) {
- throw new Error(`Region in ARN is incompatible, got ${region} but expected ${options.clientRegion}`);
- }
}, "validateRegion");
var validateRegionalClient = __name((region) => {
if (["s3-external-1", "aws-global"].includes(region)) {
throw new Error(`Client region ${region} is not regional`);
}
}, "validateRegionalClient");
- var isEqualRegions = __name((regionA, regionB) => regionA === regionB, "isEqualRegions");
var validateAccountId = __name((accountId) => {
if (!/[0-9]{12}/.exec(accountId)) {
throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'");
}
}, "validateAccountId");
var validateDNSHostLabel = __name((label, options = { tlsCompatible: true }) => {
- if (label.length >= 64 || !/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(label) || /(\d+\.){3}\d+/.test(label) || /[.-]{2}/.test(label) || (options == null ? undefined : options.tlsCompatible) && DOT_PATTERN.test(label)) {
+ if (label.length >= 64 || !/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/.test(label) || /(\d+\.){3}\d+/.test(label) || /[.-]{2}/.test(label) || options?.tlsCompatible && DOT_PATTERN.test(label)) {
throw new Error(`Invalid DNS label ${label}`);
}
}, "validateDNSHostLabel");
@@ -21289,8 +25731,6 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
}
}, "getArnResources");
var validateNoDualstack = __name((dualstackEndpoint) => {
- if (dualstackEndpoint)
- throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.");
}, "validateNoDualstack");
var validateNoFIPS = __name((useFipsEndpoint) => {
if (useFipsEndpoint)
@@ -21378,14 +25818,6 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
}) => {
const { accountId, region, service } = bucketName;
validateRegionalClient(clientRegion);
- validateRegion(region, {
- useArnRegion,
- clientRegion,
- clientSigningRegion,
- allowFipsRegion: true,
- useFipsEndpoint: fipsEndpoint
- });
- validateNoDualstack(dualstackEndpoint);
const DNSHostLabel = `${accesspointName}-${accountId}`;
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
const endpointRegion = useArnRegion ? region : clientRegion;
@@ -21408,7 +25840,6 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");
}
validateMrapAlias(mrapAlias);
- validateNoDualstack(dualstackEndpoint);
return {
bucketEndpoint: true,
hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`,
@@ -21429,14 +25860,12 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
hostnameSuffix
}) => {
validateRegionalClient(clientRegion);
- validateRegion(bucketName.region, { useArnRegion, clientRegion, clientSigningRegion, useFipsEndpoint: fipsEndpoint });
const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`;
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion;
validateOutpostService(bucketName.service);
validateDNSHostLabel(outpostId, { tlsCompatible });
- validateNoDualstack(dualstackEndpoint);
validateNoFIPS(fipsEndpoint);
const hostnamePrefix = `${DNSHostLabel}.${outpostId}`;
return {
@@ -21459,13 +25888,6 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
hostnameSuffix
}) => {
validateRegionalClient(clientRegion);
- validateRegion(bucketName.region, {
- useArnRegion,
- clientRegion,
- clientSigningRegion,
- allowFipsRegion: true,
- useFipsEndpoint: fipsEndpoint
- });
const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`;
validateDNSHostLabel(hostnamePrefix, { tlsCompatible });
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
@@ -21544,1617 +25966,824 @@ var require_dist_cjs60 = __commonJS((exports, module) => {
}
}
}
- return next({ ...args, request });
- }, "bucketEndpointMiddleware");
- var bucketEndpointMiddlewareOptions = {
- tags: ["BUCKET_ENDPOINT"],
- name: "bucketEndpointMiddleware",
- relation: "before",
- toMiddleware: "hostHeaderMiddleware",
- override: true
- };
- var getBucketEndpointPlugin = __name((options) => ({
- applyToStack: (clientStack) => {
- clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
- }
- }), "getBucketEndpointPlugin");
- __name(resolveBucketEndpointConfig, "resolveBucketEndpointConfig");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolve
-var require_dist_cjs61 = __commonJS((exports, module) => {
- var getChunkedStream = function(source) {
- let currentMessageTotalLength = 0;
- let currentMessagePendingLength = 0;
- let currentMessage = null;
- let messageLengthBuffer = null;
- const allocateMessage = __name((size) => {
- if (typeof size !== "number") {
- throw new Error("Attempted to allocate an event message where size was not a number: " + size);
- }
- currentMessageTotalLength = size;
- currentMessagePendingLength = 4;
- currentMessage = new Uint8Array(size);
- const currentMessageView = new DataView(currentMessage.buffer);
- currentMessageView.setUint32(0, size, false);
- }, "allocateMessage");
- const iterator = __name(async function* () {
- const sourceIterator = source[Symbol.asyncIterator]();
- while (true) {
- const { value, done } = await sourceIterator.next();
- if (done) {
- if (!currentMessageTotalLength) {
- return;
- } else if (currentMessageTotalLength === currentMessagePendingLength) {
- yield currentMessage;
- } else {
- throw new Error("Truncated event message received.");
- }
- return;
- }
- const chunkLength = value.length;
- let currentOffset = 0;
- while (currentOffset < chunkLength) {
- if (!currentMessage) {
- const bytesRemaining = chunkLength - currentOffset;
- if (!messageLengthBuffer) {
- messageLengthBuffer = new Uint8Array(4);
- }
- const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);
- messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);
- currentMessagePendingLength += numBytesForTotal;
- currentOffset += numBytesForTotal;
- if (currentMessagePendingLength < 4) {
- break;
- }
- allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));
- messageLengthBuffer = null;
- }
- const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);
- currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);
- currentMessagePendingLength += numBytesToWrite;
- currentOffset += numBytesToWrite;
- if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {
- yield currentMessage;
- currentMessage = null;
- currentMessageTotalLength = 0;
- currentMessagePendingLength = 0;
- }
- }
- }
- }, "iterator");
- return {
- [Symbol.asyncIterator]: iterator
- };
- };
- var getMessageUnmarshaller = function(deserializer, toUtf8) {
- return async function(message) {
- const { value: messageType } = message.headers[":message-type"];
- if (messageType === "error") {
- const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError");
- unmodeledError.name = message.headers[":error-code"].value;
- throw unmodeledError;
- } else if (messageType === "exception") {
- const code = message.headers[":exception-type"].value;
- const exception = { [code]: message };
- const deserializedException = await deserializer(exception);
- if (deserializedException.$unknown) {
- const error = new Error(toUtf8(message.body));
- error.name = code;
- throw error;
- }
- throw deserializedException[code];
- } else if (messageType === "event") {
- const event = {
- [message.headers[":event-type"].value]: message
- };
- const deserialized = await deserializer(event);
- if (deserialized.$unknown)
- return;
- return deserialized;
- } else {
- throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`);
- }
- };
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- EventStreamMarshaller: () => EventStreamMarshaller,
- eventStreamSerdeProvider: () => eventStreamSerdeProvider
- });
- module.exports = __toCommonJS(src_exports);
- var import_eventstream_codec = require_dist_cjs19();
- __name(getChunkedStream, "getChunkedStream");
- __name(getMessageUnmarshaller, "getMessageUnmarshaller");
- var _EventStreamMarshaller = class _EventStreamMarshaller2 {
- constructor({ utf8Encoder, utf8Decoder }) {
- this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(utf8Encoder, utf8Decoder);
- this.utfEncoder = utf8Encoder;
- }
- deserialize(body, deserializer) {
- const inputStream = getChunkedStream(body);
- return new import_eventstream_codec.SmithyMessageDecoderStream({
- messageStream: new import_eventstream_codec.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),
- deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder)
- });
- }
- serialize(inputStream, serializer) {
- return new import_eventstream_codec.MessageEncoderStream({
- messageStream: new import_eventstream_codec.SmithyMessageEncoderStream({ inputStream, serializer }),
- encoder: this.eventStreamCodec,
- includeEndFrame: true
- });
- }
- };
- __name(_EventStreamMarshaller, "EventStreamMarshaller");
- var EventStreamMarshaller = _EventStreamMarshaller;
- var eventStreamSerdeProvider = __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.js
-var require_dist_cjs62 = __commonJS((exports, module) => {
- async function* readabletoIterable(readStream) {
- let streamEnded = false;
- let generationEnded = false;
- const records = new Array;
- readStream.on("error", (err) => {
- if (!streamEnded) {
- streamEnded = true;
- }
- if (err) {
- throw err;
- }
- });
- readStream.on("data", (data) => {
- records.push(data);
- });
- readStream.on("end", () => {
- streamEnded = true;
- });
- while (!generationEnded) {
- const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));
- if (value) {
- yield value;
- }
- generationEnded = streamEnded && records.length === 0;
- }
- }
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- EventStreamMarshaller: () => EventStreamMarshaller,
- eventStreamSerdeProvider: () => eventStreamSerdeProvider
- });
- module.exports = __toCommonJS(src_exports);
- var import_eventstream_serde_universal = require_dist_cjs61();
- var import_stream = __require("stream");
- __name(readabletoIterable, "readabletoIterable");
- var _EventStreamMarshaller = class _EventStreamMarshaller2 {
- constructor({ utf8Encoder, utf8Decoder }) {
- this.universalMarshaller = new import_eventstream_serde_universal.EventStreamMarshaller({
- utf8Decoder,
- utf8Encoder
- });
- }
- deserialize(body, deserializer) {
- const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body);
- return this.universalMarshaller.deserialize(bodyIterable, deserializer);
- }
- serialize(input, serializer) {
- return import_stream.Readable.from(this.universalMarshaller.serialize(input, serializer));
- }
+ return next({ ...args, request });
+ }, "bucketEndpointMiddleware");
+ var bucketEndpointMiddlewareOptions = {
+ tags: ["BUCKET_ENDPOINT"],
+ name: "bucketEndpointMiddleware",
+ relation: "before",
+ toMiddleware: "hostHeaderMiddleware",
+ override: true
};
- __name(_EventStreamMarshaller, "EventStreamMarshaller");
- var EventStreamMarshaller = _EventStreamMarshaller;
- var eventStreamSerdeProvider = __name((options) => new EventStreamMarshaller(options), "eventStreamSerdeProvider");
+ var getBucketEndpointPlugin = __name((options) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.addRelativeTo(bucketEndpointMiddleware(options), bucketEndpointMiddlewareOptions);
+ }, "applyToStack")
+ }), "getBucketEndpointPlugin");
+ __name(resolveBucketEndpointConfig, "resolveBucketEndpointConfig");
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs63 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
- }
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- fileStreamHasher: () => fileStreamHasher,
- readableStreamHasher: () => readableStreamHasher
- });
- module.exports = __toCommonJS(src_exports);
- var import_fs = __require("fs");
- var import_util_utf8 = require_dist_cjs11();
- var import_stream = __require("stream");
- var _HashCalculator = class _HashCalculator2 extends import_stream.Writable {
- constructor(hash, options) {
- super(options);
- this.hash = hash;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
+var require_dist_cjs66 = __commonJS((exports) => {
+ var negate = function(bytes) {
+ for (let i = 0;i < 8; i++) {
+ bytes[i] ^= 255;
}
- _write(chunk, encoding, callback) {
- try {
- this.hash.update((0, import_util_utf8.toUint8Array)(chunk));
- } catch (err) {
- return callback(err);
- }
- callback();
+ for (let i = 7;i > -1; i--) {
+ bytes[i]++;
+ if (bytes[i] !== 0)
+ break;
}
};
- __name(_HashCalculator, "HashCalculator");
- var HashCalculator = _HashCalculator;
- var fileStreamHasher = __name((hashCtor, fileStream) => new Promise((resolve, reject) => {
- if (!isReadStream(fileStream)) {
- reject(new Error("Unable to calculate hash for non-file streams."));
- return;
+ var splitMessage = function({ byteLength, byteOffset, buffer }) {
+ if (byteLength < MINIMUM_MESSAGE_LENGTH) {
+ throw new Error("Provided message too short to accommodate event stream message overhead");
}
- const fileStreamTee = (0, import_fs.createReadStream)(fileStream.path, {
- start: fileStream.start,
- end: fileStream.end
- });
- const hash = new hashCtor;
- const hashCalculator = new HashCalculator(hash);
- fileStreamTee.pipe(hashCalculator);
- fileStreamTee.on("error", (err) => {
- hashCalculator.end();
- reject(err);
- });
- hashCalculator.on("error", reject);
- hashCalculator.on("finish", function() {
- hash.digest().then(resolve).catch(reject);
- });
- }), "fileStreamHasher");
- var isReadStream = __name((stream) => typeof stream.path === "string", "isReadStream");
- var readableStreamHasher = __name((hashCtor, readableStream) => {
- if (readableStream.readableFlowing !== null) {
- throw new Error("Unable to calculate hash for flowing readable stream");
+ const view = new DataView(buffer, byteOffset, byteLength);
+ const messageLength = view.getUint32(0, false);
+ if (byteLength !== messageLength) {
+ throw new Error("Reported message length does not match received message length");
}
- const hash = new hashCtor;
- const hashCalculator = new HashCalculator(hash);
- readableStream.pipe(hashCalculator);
- return new Promise((resolve, reject) => {
- readableStream.on("error", (err) => {
- hashCalculator.end();
- reject(err);
- });
- hashCalculator.on("error", reject);
- hashCalculator.on("finish", () => {
- hash.digest().then(resolve).catch(reject);
- });
- });
- }, "readableStreamHasher");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolv
-var require_dist_cjs64 = __commonJS((exports, module) => {
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
+ const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
+ const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
+ const checksummer = new crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
+ if (expectedPreludeChecksum !== checksummer.digest()) {
+ throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- SignatureV4MultiRegion: () => SignatureV4MultiRegion,
- signatureV4CrtContainer: () => signatureV4CrtContainer
- });
- module.exports = __toCommonJS(src_exports);
- var import_middleware_sdk_s3 = require_dist_cjs24();
- var signatureV4CrtContainer = {
- CrtSignerV4: null
+ checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));
+ if (expectedMessageChecksum !== checksummer.digest()) {
+ throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);
+ }
+ return {
+ headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
+ body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH))
+ };
};
- var _SignatureV4MultiRegion = class _SignatureV4MultiRegion2 {
- constructor(options) {
- this.sigv4Signer = new import_middleware_sdk_s3.SignatureV4S3Express(options);
- this.signerOptions = options;
+ var crc32 = require_main3();
+ var utilHexEncoding = require_dist_cjs14();
+
+ class Int64 {
+ bytes;
+ constructor(bytes) {
+ this.bytes = bytes;
+ if (bytes.byteLength !== 8) {
+ throw new Error("Int64 buffers must be exactly 8 bytes");
+ }
}
- async sign(requestToSign, options = {}) {
- if (options.signingRegion === "*") {
- if (this.signerOptions.runtime !== "node")
- throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
- return this.getSigv4aSigner().sign(requestToSign, options);
+ static fromNumber(number) {
+ if (number > 9223372036854776000 || number < -9223372036854776000) {
+ throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
}
- return this.sigv4Signer.sign(requestToSign, options);
+ const bytes = new Uint8Array(8);
+ for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
+ bytes[i] = remaining;
+ }
+ if (number < 0) {
+ negate(bytes);
+ }
+ return new Int64(bytes);
}
- async signWithCredentials(requestToSign, credentials, options = {}) {
- if (options.signingRegion === "*") {
- if (this.signerOptions.runtime !== "node")
- throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
- return this.getSigv4aSigner().signWithCredentials(requestToSign, credentials, options);
+ valueOf() {
+ const bytes = this.bytes.slice(0);
+ const negative = bytes[0] & 128;
+ if (negative) {
+ negate(bytes);
}
- return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options);
+ return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1);
}
- async presign(originalRequest, options = {}) {
- if (options.signingRegion === "*") {
- if (this.signerOptions.runtime !== "node")
- throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");
- return this.getSigv4aSigner().presign(originalRequest, options);
+ toString() {
+ return String(this.valueOf());
+ }
+ }
+
+ class HeaderMarshaller {
+ toUtf8;
+ fromUtf8;
+ constructor(toUtf8, fromUtf8) {
+ this.toUtf8 = toUtf8;
+ this.fromUtf8 = fromUtf8;
+ }
+ format(headers) {
+ const chunks = [];
+ for (const headerName of Object.keys(headers)) {
+ const bytes = this.fromUtf8(headerName);
+ chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
}
- return this.sigv4Signer.presign(originalRequest, options);
+ const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
+ let position = 0;
+ for (const chunk of chunks) {
+ out.set(chunk, position);
+ position += chunk.byteLength;
+ }
+ return out;
}
- async presignWithCredentials(originalRequest, credentials, options = {}) {
- if (options.signingRegion === "*") {
- throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");
+ formatHeaderValue(header) {
+ switch (header.type) {
+ case "boolean":
+ return Uint8Array.from([header.value ? 0 : 1]);
+ case "byte":
+ return Uint8Array.from([2, header.value]);
+ case "short":
+ const shortView = new DataView(new ArrayBuffer(3));
+ shortView.setUint8(0, 3);
+ shortView.setInt16(1, header.value, false);
+ return new Uint8Array(shortView.buffer);
+ case "integer":
+ const intView = new DataView(new ArrayBuffer(5));
+ intView.setUint8(0, 4);
+ intView.setInt32(1, header.value, false);
+ return new Uint8Array(intView.buffer);
+ case "long":
+ const longBytes = new Uint8Array(9);
+ longBytes[0] = 5;
+ longBytes.set(header.value.bytes, 1);
+ return longBytes;
+ case "binary":
+ const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
+ binView.setUint8(0, 6);
+ binView.setUint16(1, header.value.byteLength, false);
+ const binBytes = new Uint8Array(binView.buffer);
+ binBytes.set(header.value, 3);
+ return binBytes;
+ case "string":
+ const utf8Bytes = this.fromUtf8(header.value);
+ const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
+ strView.setUint8(0, 7);
+ strView.setUint16(1, utf8Bytes.byteLength, false);
+ const strBytes = new Uint8Array(strView.buffer);
+ strBytes.set(utf8Bytes, 3);
+ return strBytes;
+ case "timestamp":
+ const tsBytes = new Uint8Array(9);
+ tsBytes[0] = 8;
+ tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
+ return tsBytes;
+ case "uuid":
+ if (!UUID_PATTERN.test(header.value)) {
+ throw new Error(`Invalid UUID received: ${header.value}`);
+ }
+ const uuidBytes = new Uint8Array(17);
+ uuidBytes[0] = 9;
+ uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1);
+ return uuidBytes;
}
- return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options);
}
- getSigv4aSigner() {
- if (!this.sigv4aSigner) {
- let CrtSignerV4 = null;
- try {
- CrtSignerV4 = signatureV4CrtContainer.CrtSignerV4;
- if (typeof CrtSignerV4 !== "function")
- throw new Error;
- } catch (e) {
- e.message = `${e.message}
-Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
-You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";].
-For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`;
- throw e;
+ parse(headers) {
+ const out = {};
+ let position = 0;
+ while (position < headers.byteLength) {
+ const nameLength = headers.getUint8(position++);
+ const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
+ position += nameLength;
+ switch (headers.getUint8(position++)) {
+ case 0:
+ out[name] = {
+ type: BOOLEAN_TAG,
+ value: true
+ };
+ break;
+ case 1:
+ out[name] = {
+ type: BOOLEAN_TAG,
+ value: false
+ };
+ break;
+ case 2:
+ out[name] = {
+ type: BYTE_TAG,
+ value: headers.getInt8(position++)
+ };
+ break;
+ case 3:
+ out[name] = {
+ type: SHORT_TAG,
+ value: headers.getInt16(position, false)
+ };
+ position += 2;
+ break;
+ case 4:
+ out[name] = {
+ type: INT_TAG,
+ value: headers.getInt32(position, false)
+ };
+ position += 4;
+ break;
+ case 5:
+ out[name] = {
+ type: LONG_TAG,
+ value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
+ };
+ position += 8;
+ break;
+ case 6:
+ const binaryLength = headers.getUint16(position, false);
+ position += 2;
+ out[name] = {
+ type: BINARY_TAG,
+ value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)
+ };
+ position += binaryLength;
+ break;
+ case 7:
+ const stringLength = headers.getUint16(position, false);
+ position += 2;
+ out[name] = {
+ type: STRING_TAG,
+ value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))
+ };
+ position += stringLength;
+ break;
+ case 8:
+ out[name] = {
+ type: TIMESTAMP_TAG,
+ value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
+ };
+ position += 8;
+ break;
+ case 9:
+ const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
+ position += 16;
+ out[name] = {
+ type: UUID_TAG,
+ value: `${utilHexEncoding.toHex(uuidBytes.subarray(0, 4))}-${utilHexEncoding.toHex(uuidBytes.subarray(4, 6))}-${utilHexEncoding.toHex(uuidBytes.subarray(6, 8))}-${utilHexEncoding.toHex(uuidBytes.subarray(8, 10))}-${utilHexEncoding.toHex(uuidBytes.subarray(10))}`
+ };
+ break;
+ default:
+ throw new Error(`Unrecognized header type tag`);
}
- this.sigv4aSigner = new CrtSignerV4({
- ...this.signerOptions,
- signingAlgorithm: 1
- });
}
- return this.sigv4aSigner;
+ return out;
}
- };
- __name(_SignatureV4MultiRegion, "SignatureV4MultiRegion");
- var SignatureV4MultiRegion = _SignatureV4MultiRegion;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.j
-var require_ruleset3 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.ruleSet = undefined;
- var cc = "required";
- var cd = "type";
- var ce = "conditions";
- var cf = "fn";
- var cg = "argv";
- var ch = "ref";
- var ci = "assign";
- var cj = "url";
- var ck = "properties";
- var cl = "backend";
- var cm = "authSchemes";
- var cn = "disableDoubleEncoding";
- var co = "signingName";
- var cp = "signingRegion";
- var cq = "headers";
- var a = false;
- var b = true;
- var c = "isSet";
- var d = "booleanEquals";
- var e = "error";
- var f = "aws.partition";
- var g = "stringEquals";
- var h = "getAttr";
- var i = "name";
- var j = "substring";
- var k = "bucketSuffix";
- var l = "parseURL";
- var m = "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}";
- var n = "endpoint";
- var o = "tree";
- var p = "aws.isVirtualHostableS3Bucket";
- var q = "{url#scheme}://{Bucket}.{url#authority}{url#path}";
- var r = "not";
- var s = "{url#scheme}://{url#authority}{url#path}";
- var t = "hardwareType";
- var u = "regionPrefix";
- var v = "bucketAliasSuffix";
- var w = "outpostId";
- var x = "isValidHostLabel";
- var y = "s3-outposts";
- var z = "s3";
- var A = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}";
- var B = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}";
- var C = "https://{Bucket}.s3.{partitionResult#dnsSuffix}";
- var D = "aws.parseArn";
- var E = "bucketArn";
- var F = "arnType";
- var G = "";
- var H = "s3-object-lambda";
- var I = "accesspoint";
- var J = "accessPointName";
- var K = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}";
- var L = "mrapPartition";
- var M = "outpostType";
- var N = "arnPrefix";
- var O = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}";
- var P = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}";
- var Q = "https://s3.{partitionResult#dnsSuffix}";
- var R = { [cc]: false, [cd]: "String" };
- var S = { [cc]: true, default: false, [cd]: "Boolean" };
- var T = { [cc]: false, [cd]: "Boolean" };
- var U = { [cf]: d, [cg]: [{ [ch]: "Accelerate" }, true] };
- var V = { [cf]: d, [cg]: [{ [ch]: "UseFIPS" }, true] };
- var W = { [cf]: d, [cg]: [{ [ch]: "UseDualStack" }, true] };
- var X = { [cf]: c, [cg]: [{ [ch]: "Endpoint" }] };
- var Y = { [cf]: f, [cg]: [{ [ch]: "Region" }], [ci]: "partitionResult" };
- var Z = { [cf]: g, [cg]: [{ [cf]: h, [cg]: [{ [ch]: "partitionResult" }, i] }, "aws-cn"] };
- var aa = { [cf]: c, [cg]: [{ [ch]: "Bucket" }] };
- var ab = { [ch]: "Bucket" };
- var ac = { [cf]: l, [cg]: [{ [ch]: "Endpoint" }], [ci]: "url" };
- var ad = { [cf]: d, [cg]: [{ [cf]: h, [cg]: [{ [ch]: "url" }, "isIp"] }, true] };
- var ae = { [ch]: "url" };
- var af = { [cf]: "uriEncode", [cg]: [ab], [ci]: "uri_encoded_bucket" };
- var ag = { [cl]: "S3Express", [cm]: [{ [cn]: true, [i]: "sigv4", [co]: "s3express", [cp]: "{Region}" }] };
- var ah = {};
- var ai = { [cf]: p, [cg]: [ab, false] };
- var aj = { [e]: "S3Express bucket name is not a valid virtual hostable name.", [cd]: e };
- var ak = { [cl]: "S3Express", [cm]: [{ [cn]: true, [i]: "sigv4-s3express", [co]: "s3express", [cp]: "{Region}" }] };
- var al = { [cf]: c, [cg]: [{ [ch]: "UseS3ExpressControlEndpoint" }] };
- var am = { [cf]: d, [cg]: [{ [ch]: "UseS3ExpressControlEndpoint" }, true] };
- var an = { [cf]: r, [cg]: [X] };
- var ao = { [e]: "Unrecognized S3Express bucket name format.", [cd]: e };
- var ap = { [cf]: r, [cg]: [aa] };
- var aq = { [ch]: t };
- var ar = { [ce]: [an], [e]: "Expected a endpoint to be specified but no endpoint was found", [cd]: e };
- var as = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: y, [cp]: "{Region}" }] };
- var at = { [cf]: d, [cg]: [{ [ch]: "ForcePathStyle" }, false] };
- var au = { [ch]: "ForcePathStyle" };
- var av = { [cf]: d, [cg]: [{ [ch]: "Accelerate" }, false] };
- var aw = { [cf]: g, [cg]: [{ [ch]: "Region" }, "aws-global"] };
- var ax = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "us-east-1" }] };
- var ay = { [cf]: r, [cg]: [aw] };
- var az = { [cf]: d, [cg]: [{ [ch]: "UseGlobalEndpoint" }, true] };
- var aA = { [cj]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{Region}" }] }, [cq]: {} };
- var aB = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{Region}" }] };
- var aC = { [cf]: d, [cg]: [{ [ch]: "UseGlobalEndpoint" }, false] };
- var aD = { [cf]: d, [cg]: [{ [ch]: "UseDualStack" }, false] };
- var aE = { [cj]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var aF = { [cf]: d, [cg]: [{ [ch]: "UseFIPS" }, false] };
- var aG = { [cj]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var aH = { [cj]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var aI = { [cf]: d, [cg]: [{ [cf]: h, [cg]: [ae, "isIp"] }, false] };
- var aJ = { [cj]: A, [ck]: aB, [cq]: {} };
- var aK = { [cj]: q, [ck]: aB, [cq]: {} };
- var aL = { [n]: aK, [cd]: n };
- var aM = { [cj]: B, [ck]: aB, [cq]: {} };
- var aN = { [cj]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var aO = { [e]: "Invalid region: region was not a valid DNS name.", [cd]: e };
- var aP = { [ch]: E };
- var aQ = { [ch]: F };
- var aR = { [cf]: h, [cg]: [aP, "service"] };
- var aS = { [ch]: J };
- var aT = { [ce]: [W], [e]: "S3 Object Lambda does not support Dual-stack", [cd]: e };
- var aU = { [ce]: [U], [e]: "S3 Object Lambda does not support S3 Accelerate", [cd]: e };
- var aV = { [ce]: [{ [cf]: c, [cg]: [{ [ch]: "DisableAccessPoints" }] }, { [cf]: d, [cg]: [{ [ch]: "DisableAccessPoints" }, true] }], [e]: "Access points are not supported for this operation", [cd]: e };
- var aW = { [ce]: [{ [cf]: c, [cg]: [{ [ch]: "UseArnRegion" }] }, { [cf]: d, [cg]: [{ [ch]: "UseArnRegion" }, false] }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, "{Region}"] }] }], [e]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [cd]: e };
- var aX = { [cf]: h, [cg]: [{ [ch]: "bucketPartition" }, i] };
- var aY = { [cf]: h, [cg]: [aP, "accountId"] };
- var aZ = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: H, [cp]: "{bucketArn#region}" }] };
- var ba = { [e]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [cd]: e };
- var bb = { [e]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [cd]: e };
- var bc = { [e]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [cd]: e };
- var bd = { [e]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [cd]: e };
- var be = { [e]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [cd]: e };
- var bf = { [e]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [cd]: e };
- var bg = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{bucketArn#region}" }] };
- var bh = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: y, [cp]: "{bucketArn#region}" }] };
- var bi = { [cf]: D, [cg]: [ab] };
- var bj = { [cj]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} };
- var bk = { [cj]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} };
- var bl = { [cj]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} };
- var bm = { [cj]: O, [ck]: aB, [cq]: {} };
- var bn = { [cj]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} };
- var bo = { [ch]: "UseObjectLambdaEndpoint" };
- var bp = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: H, [cp]: "{Region}" }] };
- var bq = { [cj]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var br = { [cj]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var bs = { [cj]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var bt = { [cj]: s, [ck]: aB, [cq]: {} };
- var bu = { [cj]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} };
- var bv = [{ [ch]: "Region" }];
- var bw = [{ [ch]: "Endpoint" }];
- var bx = [ab];
- var by = [W];
- var bz = [U];
- var bA = [X, ac];
- var bB = [{ [cf]: c, [cg]: [{ [ch]: "DisableS3ExpressSessionAuth" }] }, { [cf]: d, [cg]: [{ [ch]: "DisableS3ExpressSessionAuth" }, true] }];
- var bC = [ad];
- var bD = [af];
- var bE = [ai];
- var bF = [V];
- var bG = [{ [cf]: j, [cg]: [ab, 6, 14, true], [ci]: "s3expressAvailabilityZoneId" }, { [cf]: j, [cg]: [ab, 14, 16, true], [ci]: "s3expressAvailabilityZoneDelim" }, { [cf]: g, [cg]: [{ [ch]: "s3expressAvailabilityZoneDelim" }, "--"] }];
- var bH = [{ [ce]: [V], [n]: { [cj]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ag, [cq]: {} }, [cd]: n }, { [n]: { [cj]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ag, [cq]: {} }, [cd]: n }];
- var bI = [{ [cf]: j, [cg]: [ab, 6, 15, true], [ci]: "s3expressAvailabilityZoneId" }, { [cf]: j, [cg]: [ab, 15, 17, true], [ci]: "s3expressAvailabilityZoneDelim" }, { [cf]: g, [cg]: [{ [ch]: "s3expressAvailabilityZoneDelim" }, "--"] }];
- var bJ = [{ [ce]: [V], [n]: { [cj]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ak, [cq]: {} }, [cd]: n }, { [n]: { [cj]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ak, [cq]: {} }, [cd]: n }];
- var bK = [aa];
- var bL = [{ [cf]: x, [cg]: [{ [ch]: w }, false] }];
- var bM = [{ [cf]: g, [cg]: [{ [ch]: u }, "beta"] }];
- var bN = [Y];
- var bO = [{ [cf]: x, [cg]: [{ [ch]: "Region" }, false] }];
- var bP = [{ [cf]: g, [cg]: [{ [ch]: "Region" }, "us-east-1"] }];
- var bQ = [{ [cf]: g, [cg]: [aQ, I] }];
- var bR = [{ [cf]: h, [cg]: [aP, "resourceId[1]"], [ci]: J }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [aS, G] }] }];
- var bS = [aP, "resourceId[1]"];
- var bT = [{ [cf]: r, [cg]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, G] }] }];
- var bU = [{ [cf]: r, [cg]: [{ [cf]: c, [cg]: [{ [cf]: h, [cg]: [aP, "resourceId[2]"] }] }] }];
- var bV = [aP, "resourceId[2]"];
- var bW = [{ [cf]: f, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }], [ci]: "bucketPartition" }];
- var bX = [{ [cf]: g, [cg]: [aX, { [cf]: h, [cg]: [{ [ch]: "partitionResult" }, i] }] }];
- var bY = [{ [cf]: x, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, true] }];
- var bZ = [{ [cf]: x, [cg]: [aY, false] }];
- var ca = [{ [cf]: x, [cg]: [aS, false] }];
- var cb = [{ [cf]: x, [cg]: [{ [ch]: "Region" }, true] }];
- var _data = { version: "1.0", parameters: { Bucket: R, Region: R, UseFIPS: S, UseDualStack: S, Endpoint: R, ForcePathStyle: S, Accelerate: S, UseGlobalEndpoint: S, UseObjectLambdaEndpoint: T, Key: R, Prefix: R, DisableAccessPoints: T, DisableMultiRegionAccessPoints: S, UseArnRegion: T, UseS3ExpressControlEndpoint: T, DisableS3ExpressSessionAuth: T }, rules: [{ [ce]: [{ [cf]: c, [cg]: bv }], rules: [{ [ce]: [U, V], error: "Accelerate cannot be used with FIPS", [cd]: e }, { [ce]: [W, X], error: "Cannot set dual-stack in combination with a custom endpoint.", [cd]: e }, { [ce]: [X, V], error: "A custom endpoint cannot be combined with FIPS", [cd]: e }, { [ce]: [X, U], error: "A custom endpoint cannot be combined with S3 Accelerate", [cd]: e }, { [ce]: [V, Y, Z], error: "Partition does not support FIPS", [cd]: e }, { [ce]: [aa, { [cf]: j, [cg]: [ab, 0, 6, b], [ci]: k }, { [cf]: g, [cg]: [{ [ch]: k }, "--x-s3"] }], rules: [{ [ce]: by, error: "S3Express does not support Dual-stack.", [cd]: e }, { [ce]: bz, error: "S3Express does not support S3 Accelerate.", [cd]: e }, { [ce]: bA, rules: [{ [ce]: bB, rules: [{ [ce]: bC, rules: [{ [ce]: bD, rules: [{ endpoint: { [cj]: m, [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ endpoint: { [cj]: q, [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }, aj], [cd]: o }, { [ce]: bC, rules: [{ [ce]: bD, rules: [{ endpoint: { [cj]: m, [ck]: ak, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ endpoint: { [cj]: q, [ck]: ak, [cq]: ah }, [cd]: n }], [cd]: o }, aj], [cd]: o }, { [ce]: [al, am], rules: [{ [ce]: [af, an], rules: [{ [ce]: bF, endpoint: { [cj]: "https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}", [ck]: ag, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}", [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ [ce]: bB, rules: [{ [ce]: bG, rules: bH, [cd]: o }, { [ce]: bI, rules: bH, [cd]: o }, ao], [cd]: o }, { [ce]: bG, rules: bJ, [cd]: o }, { [ce]: bI, rules: bJ, [cd]: o }, ao], [cd]: o }, aj], [cd]: o }, { [ce]: [ap, al, am], rules: [{ [ce]: bA, endpoint: { [cj]: s, [ck]: ag, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://s3express-control-fips.{Region}.amazonaws.com", [ck]: ag, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3express-control.{Region}.amazonaws.com", [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }, { [ce]: [aa, { [cf]: j, [cg]: [ab, 49, 50, b], [ci]: t }, { [cf]: j, [cg]: [ab, 8, 12, b], [ci]: u }, { [cf]: j, [cg]: [ab, 0, 7, b], [ci]: v }, { [cf]: j, [cg]: [ab, 32, 49, b], [ci]: w }, { [cf]: f, [cg]: bv, [ci]: "regionPartition" }, { [cf]: g, [cg]: [{ [ch]: v }, "--op-s3"] }], rules: [{ [ce]: bL, rules: [{ [ce]: [{ [cf]: g, [cg]: [aq, "e"] }], rules: [{ [ce]: bM, rules: [ar, { [ce]: bA, endpoint: { [cj]: "https://{Bucket}.ec2.{url#authority}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { endpoint: { [cj]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { [ce]: [{ [cf]: g, [cg]: [aq, "o"] }], rules: [{ [ce]: bM, rules: [ar, { [ce]: bA, endpoint: { [cj]: "https://{Bucket}.op-{outpostId}.{url#authority}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { endpoint: { [cj]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", [cd]: e }], [cd]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [cd]: e }], [cd]: o }, { [ce]: bK, rules: [{ [ce]: [X, { [cf]: r, [cg]: [{ [cf]: c, [cg]: [{ [cf]: l, [cg]: bw }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [cd]: e }, { [ce]: [at, ai], rules: [{ [ce]: bN, rules: [{ [ce]: bO, rules: [{ [ce]: [U, Z], error: "S3 Accelerate cannot be used in this region", [cd]: e }, { [ce]: [W, V, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, V, av, an, ay, az], rules: [{ endpoint: aA, [cd]: n }], [cd]: o }, { [ce]: [W, V, av, an, ay, aC], endpoint: aA, [cd]: n }, { [ce]: [aD, V, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, V, av, an, ay, az], rules: [{ endpoint: aE, [cd]: n }], [cd]: o }, { [ce]: [aD, V, av, an, ay, aC], endpoint: aE, [cd]: n }, { [ce]: [W, aF, U, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, aF, U, an, ay, az], rules: [{ endpoint: aG, [cd]: n }], [cd]: o }, { [ce]: [W, aF, U, an, ay, aC], endpoint: aG, [cd]: n }, { [ce]: [W, aF, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, aF, av, an, ay, az], rules: [{ endpoint: aH, [cd]: n }], [cd]: o }, { [ce]: [W, aF, av, an, ay, aC], endpoint: aH, [cd]: n }, { [ce]: [aD, aF, av, X, ac, ad, aw], endpoint: { [cj]: A, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, X, ac, aI, aw], endpoint: { [cj]: q, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, X, ac, ad, ay, az], rules: [{ [ce]: bP, endpoint: aJ, [cd]: n }, { endpoint: aJ, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, av, X, ac, aI, ay, az], rules: [{ [ce]: bP, endpoint: aK, [cd]: n }, aL], [cd]: o }, { [ce]: [aD, aF, av, X, ac, ad, ay, aC], endpoint: aJ, [cd]: n }, { [ce]: [aD, aF, av, X, ac, aI, ay, aC], endpoint: aK, [cd]: n }, { [ce]: [aD, aF, U, an, aw], endpoint: { [cj]: B, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, U, an, ay, az], rules: [{ [ce]: bP, endpoint: aM, [cd]: n }, { endpoint: aM, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, U, an, ay, aC], endpoint: aM, [cd]: n }, { [ce]: [aD, aF, av, an, aw], endpoint: { [cj]: C, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, an, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: C, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: aN, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, av, an, ay, aC], endpoint: aN, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [X, ac, { [cf]: g, [cg]: [{ [cf]: h, [cg]: [ae, "scheme"] }, "http"] }, { [cf]: p, [cg]: [ab, b] }, at, aF, aD, av], rules: [{ [ce]: bN, rules: [{ [ce]: bO, rules: [aL], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [at, { [cf]: D, [cg]: bx, [ci]: E }], rules: [{ [ce]: [{ [cf]: h, [cg]: [aP, "resourceId[0]"], [ci]: F }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [aQ, G] }] }], rules: [{ [ce]: [{ [cf]: g, [cg]: [aR, H] }], rules: [{ [ce]: bQ, rules: [{ [ce]: bR, rules: [aT, aU, { [ce]: bT, rules: [aV, { [ce]: bU, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: bX, rules: [{ [ce]: bY, rules: [{ [ce]: [{ [cf]: g, [cg]: [aY, G] }], error: "Invalid ARN: Missing account id", [cd]: e }, { [ce]: bZ, rules: [{ [ce]: ca, rules: [{ [ce]: bA, endpoint: { [cj]: K, [ck]: aZ, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: aZ, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: aZ, [cq]: ah }, [cd]: n }], [cd]: o }, ba], [cd]: o }, bb], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, be], [cd]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [cd]: e }], [cd]: o }, bf], [cd]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [cd]: e }], [cd]: o }, { [ce]: bQ, rules: [{ [ce]: bR, rules: [{ [ce]: bT, rules: [{ [ce]: bQ, rules: [{ [ce]: bT, rules: [aV, { [ce]: bU, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: [{ [cf]: g, [cg]: [aX, "{partitionResult#name}"] }], rules: [{ [ce]: bY, rules: [{ [ce]: [{ [cf]: g, [cg]: [aR, z] }], rules: [{ [ce]: bZ, rules: [{ [ce]: ca, rules: [{ [ce]: bz, error: "Access Points do not support S3 Accelerate", [cd]: e }, { [ce]: [V, W], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [V, aD], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, W], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, X, ac], endpoint: { [cj]: K, [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }], [cd]: o }, ba], [cd]: o }, bb], [cd]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [cd]: e }], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, be], [cd]: o }], [cd]: o }], [cd]: o }, { [ce]: [{ [cf]: x, [cg]: [aS, b] }], rules: [{ [ce]: by, error: "S3 MRAP does not support dual-stack", [cd]: e }, { [ce]: bF, error: "S3 MRAP does not support FIPS", [cd]: e }, { [ce]: bz, error: "S3 MRAP does not support S3 Accelerate", [cd]: e }, { [ce]: [{ [cf]: d, [cg]: [{ [ch]: "DisableMultiRegionAccessPoints" }, b] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [cd]: e }, { [ce]: [{ [cf]: f, [cg]: bv, [ci]: L }], rules: [{ [ce]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [{ [ch]: L }, i] }, { [cf]: h, [cg]: [aP, "partition"] }] }], rules: [{ endpoint: { [cj]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [ck]: { [cm]: [{ [cn]: b, name: "sigv4a", [co]: z, signingRegionSet: ["*"] }] }, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [cd]: e }], [cd]: o }], [cd]: o }, { error: "Invalid Access Point Name", [cd]: e }], [cd]: o }, bf], [cd]: o }, { [ce]: [{ [cf]: g, [cg]: [aR, y] }], rules: [{ [ce]: by, error: "S3 Outposts does not support Dual-stack", [cd]: e }, { [ce]: bF, error: "S3 Outposts does not support FIPS", [cd]: e }, { [ce]: bz, error: "S3 Outposts does not support S3 Accelerate", [cd]: e }, { [ce]: [{ [cf]: c, [cg]: [{ [cf]: h, [cg]: [aP, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [cd]: e }, { [ce]: [{ [cf]: h, [cg]: bS, [ci]: w }], rules: [{ [ce]: bL, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: bX, rules: [{ [ce]: bY, rules: [{ [ce]: bZ, rules: [{ [ce]: [{ [cf]: h, [cg]: bV, [ci]: M }], rules: [{ [ce]: [{ [cf]: h, [cg]: [aP, "resourceId[3]"], [ci]: J }], rules: [{ [ce]: [{ [cf]: g, [cg]: [{ [ch]: M }, I] }], rules: [{ [ce]: bA, endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [ck]: bh, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bh, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [cd]: e }], [cd]: o }, { error: "Invalid ARN: expected an access point name", [cd]: e }], [cd]: o }, { error: "Invalid ARN: Expected a 4-component resource", [cd]: e }], [cd]: o }, bb], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [cd]: e }], [cd]: o }, { error: "Invalid ARN: The Outpost Id was not set", [cd]: e }], [cd]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [cd]: e }], [cd]: o }, { error: "Invalid ARN: No ARN type specified", [cd]: e }], [cd]: o }, { [ce]: [{ [cf]: j, [cg]: [ab, 0, 4, a], [ci]: N }, { [cf]: g, [cg]: [{ [ch]: N }, "arn:"] }, { [cf]: r, [cg]: [{ [cf]: c, [cg]: [bi] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [cd]: e }, { [ce]: [{ [cf]: d, [cg]: [au, b] }, bi], error: "Path-style addressing cannot be used with ARN buckets", [cd]: e }, { [ce]: bD, rules: [{ [ce]: bN, rules: [{ [ce]: [av], rules: [{ [ce]: [W, an, V, aw], endpoint: { [cj]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, an, V, ay, az], rules: [{ endpoint: bj, [cd]: n }], [cd]: o }, { [ce]: [W, an, V, ay, aC], endpoint: bj, [cd]: n }, { [ce]: [aD, an, V, aw], endpoint: { [cj]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, an, V, ay, az], rules: [{ endpoint: bk, [cd]: n }], [cd]: o }, { [ce]: [aD, an, V, ay, aC], endpoint: bk, [cd]: n }, { [ce]: [W, an, aF, aw], endpoint: { [cj]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, an, aF, ay, az], rules: [{ endpoint: bl, [cd]: n }], [cd]: o }, { [ce]: [W, an, aF, ay, aC], endpoint: bl, [cd]: n }, { [ce]: [aD, X, ac, aF, aw], endpoint: { [cj]: O, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, X, ac, aF, ay, az], rules: [{ [ce]: bP, endpoint: bm, [cd]: n }, { endpoint: bm, [cd]: n }], [cd]: o }, { [ce]: [aD, X, ac, aF, ay, aC], endpoint: bm, [cd]: n }, { [ce]: [aD, an, aF, aw], endpoint: { [cj]: P, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, an, aF, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: P, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: bn, [cd]: n }], [cd]: o }, { [ce]: [aD, an, aF, ay, aC], endpoint: bn, [cd]: n }], [cd]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [cd]: e }], [cd]: o }], [cd]: o }], [cd]: o }, { [ce]: [{ [cf]: c, [cg]: [bo] }, { [cf]: d, [cg]: [bo, b] }], rules: [{ [ce]: bN, rules: [{ [ce]: cb, rules: [aT, aU, { [ce]: bA, endpoint: { [cj]: s, [ck]: bp, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: bp, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [ck]: bp, [cq]: ah }, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [ap], rules: [{ [ce]: bN, rules: [{ [ce]: cb, rules: [{ [ce]: [V, W, an, aw], endpoint: { [cj]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [V, W, an, ay, az], rules: [{ endpoint: bq, [cd]: n }], [cd]: o }, { [ce]: [V, W, an, ay, aC], endpoint: bq, [cd]: n }, { [ce]: [V, aD, an, aw], endpoint: { [cj]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [V, aD, an, ay, az], rules: [{ endpoint: br, [cd]: n }], [cd]: o }, { [ce]: [V, aD, an, ay, aC], endpoint: br, [cd]: n }, { [ce]: [aF, W, an, aw], endpoint: { [cj]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, W, an, ay, az], rules: [{ endpoint: bs, [cd]: n }], [cd]: o }, { [ce]: [aF, W, an, ay, aC], endpoint: bs, [cd]: n }, { [ce]: [aF, aD, X, ac, aw], endpoint: { [cj]: s, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, X, ac, ay, az], rules: [{ [ce]: bP, endpoint: bt, [cd]: n }, { endpoint: bt, [cd]: n }], [cd]: o }, { [ce]: [aF, aD, X, ac, ay, aC], endpoint: bt, [cd]: n }, { [ce]: [aF, aD, an, aw], endpoint: { [cj]: Q, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, an, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: Q, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: bu, [cd]: n }], [cd]: o }, { [ce]: [aF, aD, an, ay, aC], endpoint: bu, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }], [cd]: o }, { error: "A region must be set when sending requests to S3.", [cd]: e }] };
- exports.ruleSet = _data;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.j
-var require_endpointResolver3 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.defaultEndpointResolver = undefined;
- var util_endpoints_1 = require_dist_cjs27();
- var ruleset_1 = require_ruleset3();
- var defaultEndpointResolver = (endpointParams, context = {}) => {
- return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
- endpointParams,
- logger: context.logger
- });
- };
- exports.defaultEndpointResolver = defaultEndpointResolver;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssol
-var require_runtimeConfig_shared3 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getRuntimeConfig = undefined;
- var signature_v4_multi_region_1 = require_dist_cjs64();
- var smithy_client_1 = require_dist_cjs16();
- var url_parser_1 = require_dist_cjs39();
- var util_base64_1 = require_dist_cjs10();
- var util_stream_1 = require_dist_cjs15();
- var util_utf8_1 = require_dist_cjs11();
- var endpointResolver_1 = require_endpointResolver3();
- var getRuntimeConfig = (config) => {
- return {
- apiVersion: "2006-03-01",
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
- disableHostPrefix: config?.disableHostPrefix ?? false,
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
- extensions: config?.extensions ?? [],
- getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? util_stream_1.getAwsChunkedEncodingStream,
- logger: config?.logger ?? new smithy_client_1.NoOpLogger,
- sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin,
- serviceId: config?.serviceId ?? "S3",
- signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
- signingEscapePath: config?.signingEscapePath ?? false,
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
- useArnRegion: config?.useArnRegion ?? false,
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
- };
- };
- exports.getRuntimeConfig = getRuntimeConfig;
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rulese
-var require_runtimeConfig3 = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.getRuntimeConfig = undefined;
- var tslib_1 = require_tslib2();
- var package_json_1 = tslib_1.__importDefault(require_package2());
- var client_sts_1 = require_dist_cjs59();
- var core_1 = require_dist_cjs44();
- var credential_provider_node_1 = require_dist_cjs58();
- var middleware_bucket_endpoint_1 = require_dist_cjs60();
- var middleware_sdk_s3_1 = require_dist_cjs24();
- var util_user_agent_node_1 = require_dist_cjs47();
- var config_resolver_1 = require_dist_cjs30();
- var eventstream_serde_node_1 = require_dist_cjs62();
- var hash_node_1 = require_dist_cjs48();
- var hash_stream_node_1 = require_dist_cjs63();
- var middleware_retry_1 = require_dist_cjs35();
- var node_config_provider_1 = require_dist_cjs37();
- var node_http_handler_1 = require_dist_cjs14();
- var util_body_length_node_1 = require_dist_cjs49();
- var util_retry_1 = require_dist_cjs34();
- var runtimeConfig_shared_1 = require_runtimeConfig_shared3();
- var smithy_client_1 = require_dist_cjs16();
- var util_defaults_mode_node_1 = require_dist_cjs50();
- var smithy_client_2 = require_dist_cjs16();
- var getRuntimeConfig = (config) => {
- (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
- const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
- const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
- const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
- (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
- return {
- ...clientSharedValues,
- ...config,
- runtime: "node",
- defaultsMode,
- bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
- credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
- disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? (0, node_config_provider_1.loadConfig)(middleware_sdk_s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS),
- eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider,
- maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
- md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"),
- region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
- requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
- retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
- default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
- }),
- sha1: config?.sha1 ?? hash_node_1.Hash.bind(null, "sha1"),
- sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
- streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
- streamHasher: config?.streamHasher ?? hash_stream_node_1.readableStreamHasher,
- useArnRegion: config?.useArnRegion ?? (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS),
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
- useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)
- };
- };
- exports.getRuntimeConfig = getRuntimeConfig;
-});
+ }
+ var BOOLEAN_TAG = "boolean";
+ var BYTE_TAG = "byte";
+ var SHORT_TAG = "short";
+ var INT_TAG = "integer";
+ var LONG_TAG = "long";
+ var BINARY_TAG = "binary";
+ var STRING_TAG = "string";
+ var TIMESTAMP_TAG = "timestamp";
+ var UUID_TAG = "uuid";
+ var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
+ var PRELUDE_MEMBER_LENGTH = 4;
+ var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
+ var CHECKSUM_LENGTH = 4;
+ var MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rule
-var require_dist_cjs65 = __commonJS((exports, module) => {
- var ssecMiddleware = function(options) {
- return (next) => async (args) => {
- const input = { ...args.input };
- const properties = [
- {
- target: "SSECustomerKey",
- hash: "SSECustomerKeyMD5"
+ class EventStreamCodec {
+ headerMarshaller;
+ messageBuffer;
+ isEndOfStream;
+ constructor(toUtf8, fromUtf8) {
+ this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);
+ this.messageBuffer = [];
+ this.isEndOfStream = false;
+ }
+ feed(message) {
+ this.messageBuffer.push(this.decode(message));
+ }
+ endOfStream() {
+ this.isEndOfStream = true;
+ }
+ getMessage() {
+ const message = this.messageBuffer.pop();
+ const isEndOfStream = this.isEndOfStream;
+ return {
+ getMessage() {
+ return message;
},
- {
- target: "CopySourceSSECustomerKey",
- hash: "CopySourceSSECustomerKeyMD5"
+ isEndOfStream() {
+ return isEndOfStream;
}
- ];
- for (const prop of properties) {
- const value = input[prop.target];
- if (value) {
- let valueForHash;
- if (typeof value === "string") {
- const isBase64Encoded = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value);
- if (isBase64Encoded) {
- valueForHash = options.base64Decoder(value);
- } else {
- valueForHash = options.utf8Decoder(value);
- input[prop.target] = options.base64Encoder(valueForHash);
- }
- } else {
- valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value);
- input[prop.target] = options.base64Encoder(valueForHash);
- }
- const hash = new options.md5;
- hash.update(valueForHash);
- input[prop.hash] = options.base64Encoder(await hash.digest());
+ };
+ }
+ getAvailableMessages() {
+ const messages = this.messageBuffer;
+ this.messageBuffer = [];
+ const isEndOfStream = this.isEndOfStream;
+ return {
+ getMessages() {
+ return messages;
+ },
+ isEndOfStream() {
+ return isEndOfStream;
}
- }
- return next({
- ...args,
- input
- });
- };
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ };
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getSsecPlugin: () => getSsecPlugin,
- ssecMiddleware: () => ssecMiddleware,
- ssecMiddlewareOptions: () => ssecMiddlewareOptions
- });
- module.exports = __toCommonJS(src_exports);
- __name(ssecMiddleware, "ssecMiddleware");
- var ssecMiddlewareOptions = {
- name: "ssecMiddleware",
- step: "initialize",
- tags: ["SSE"],
- override: true
- };
- var getSsecPlugin = __name((config) => ({
- applyToStack: (clientStack) => {
- clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);
+ encode({ headers: rawHeaders, body }) {
+ const headers = this.headerMarshaller.format(rawHeaders);
+ const length = headers.byteLength + body.byteLength + 16;
+ const out = new Uint8Array(length);
+ const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
+ const checksum = new crc32.Crc32;
+ view.setUint32(0, length, false);
+ view.setUint32(4, headers.byteLength, false);
+ view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false);
+ out.set(headers, 12);
+ out.set(body, headers.byteLength + 12);
+ view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false);
+ return out;
}
- }), "getSsecPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.js
-var require_dist_cjs66 = __commonJS((exports, module) => {
- var locationConstraintMiddleware = function(options) {
- return (next) => async (args) => {
- const { CreateBucketConfiguration } = args.input;
- const region = await options.region();
- if (!(CreateBucketConfiguration == null ? undefined : CreateBucketConfiguration.LocationConstraint) && !(CreateBucketConfiguration == null ? undefined : CreateBucketConfiguration.Location)) {
- args = {
- ...args,
- input: {
- ...args.input,
- CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region }
- }
- };
- }
- return next(args);
- };
- };
- var __defProp2 = Object.defineProperty;
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
- var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
- var __export2 = (target, all) => {
- for (var name in all)
- __defProp2(target, name, { get: all[name], enumerable: true });
- };
- var __copyProps = (to, from, except, desc) => {
- if (from && typeof from === "object" || typeof from === "function") {
- for (let key of __getOwnPropNames2(from))
- if (!__hasOwnProp2.call(to, key) && key !== except)
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ decode(message) {
+ const { headers, body } = splitMessage(message);
+ return { headers: this.headerMarshaller.parse(headers), body };
}
- return to;
- };
- var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- getLocationConstraintPlugin: () => getLocationConstraintPlugin,
- locationConstraintMiddleware: () => locationConstraintMiddleware,
- locationConstraintMiddlewareOptions: () => locationConstraintMiddlewareOptions
- });
- module.exports = __toCommonJS(src_exports);
- __name(locationConstraintMiddleware, "locationConstraintMiddleware");
- var locationConstraintMiddlewareOptions = {
- step: "initialize",
- tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
- name: "locationConstraintMiddleware",
- override: true
- };
- var getLocationConstraintPlugin = __name((config) => ({
- applyToStack: (clientStack) => {
- clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
+ formatHeaders(rawHeaders) {
+ return this.headerMarshaller.format(rawHeaders);
}
- }), "getLocationConstraintPlugin");
-});
+ }
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.
-var require_tslib3 = __commonJS((exports, module) => {
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted.
-
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- ***************************************************************************** */
- var __extends;
- var __assign;
- var __rest;
- var __decorate;
- var __param;
- var __metadata;
- var __awaiter;
- var __generator;
- var __exportStar;
- var __values;
- var __read;
- var __spread;
- var __spreadArrays;
- var __await;
- var __asyncGenerator;
- var __asyncDelegator;
- var __asyncValues;
- var __makeTemplateObject;
- var __importStar;
- var __importDefault;
- var __classPrivateFieldGet;
- var __classPrivateFieldSet;
- var __createBinding;
- (function(factory) {
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
- if (typeof define === "function" && define.amd) {
- define("tslib", ["exports"], function(exports2) {
- factory(createExporter(root, createExporter(exports2)));
- });
- } else if (typeof module === "object" && typeof exports === "object") {
- factory(createExporter(root, createExporter(exports)));
- } else {
- factory(createExporter(root));
+ class MessageDecoderStream {
+ options;
+ constructor(options) {
+ this.options = options;
}
- function createExporter(exports2, previous) {
- if (exports2 !== root) {
- if (typeof Object.create === "function") {
- Object.defineProperty(exports2, "__esModule", { value: true });
- } else {
- exports2.__esModule = true;
- }
+ [Symbol.asyncIterator]() {
+ return this.asyncIterator();
+ }
+ async* asyncIterator() {
+ for await (const bytes of this.options.inputStream) {
+ const decoded = this.options.decoder.decode(bytes);
+ yield decoded;
}
- return function(id, v) {
- return exports2[id] = previous ? previous(id, v) : v;
- };
}
- })(function(exporter) {
- var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
- d.__proto__ = b;
- } || function(d, b) {
- for (var p in b)
- if (b.hasOwnProperty(p))
- d[p] = b[p];
- };
- __extends = function(d, b) {
- extendStatics(d, b);
- function __() {
- this.constructor = d;
+ }
+
+ class MessageEncoderStream {
+ options;
+ constructor(options) {
+ this.options = options;
+ }
+ [Symbol.asyncIterator]() {
+ return this.asyncIterator();
+ }
+ async* asyncIterator() {
+ for await (const msg of this.options.messageStream) {
+ const encoded = this.options.encoder.encode(msg);
+ yield encoded;
}
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
- };
- __assign = Object.assign || function(t) {
- for (var s, i = 1, n = arguments.length;i < n; i++) {
- s = arguments[i];
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p))
- t[p] = s[p];
+ if (this.options.includeEndFrame) {
+ yield new Uint8Array(0);
}
- return t;
- };
- __rest = function(s, e) {
- var t = {};
- for (var p in s)
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
- t[p[i]] = s[p[i]];
- }
- return t;
- };
- __decorate = function(decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
- r = Reflect.decorate(decorators, target, key, desc);
- else
- for (var i = decorators.length - 1;i >= 0; i--)
- if (d = decorators[i])
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- __param = function(paramIndex, decorator) {
- return function(target, key) {
- decorator(target, key, paramIndex);
- };
- };
- __metadata = function(metadataKey, metadataValue) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
- return Reflect.metadata(metadataKey, metadataValue);
- };
- __awaiter = function(thisArg, _arguments, P, generator) {
- function adopt(value) {
- return value instanceof P ? value : new P(function(resolve) {
- resolve(value);
- });
+ }
+ }
+
+ class SmithyMessageDecoderStream {
+ options;
+ constructor(options) {
+ this.options = options;
+ }
+ [Symbol.asyncIterator]() {
+ return this.asyncIterator();
+ }
+ async* asyncIterator() {
+ for await (const message of this.options.messageStream) {
+ const deserialized = await this.options.deserializer(message);
+ if (deserialized === undefined)
+ continue;
+ yield deserialized;
}
- return new (P || (P = Promise))(function(resolve, reject) {
- function fulfilled(value) {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- }
- function rejected(value) {
- try {
- step(generator["throw"](value));
- } catch (e) {
- reject(e);
- }
- }
- function step(result) {
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
- }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- __generator = function(thisArg, body) {
- var _ = { label: 0, sent: function() {
- if (t[0] & 1)
- throw t[1];
- return t[1];
- }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
- return this;
- }), g;
- function verb(n) {
- return function(v) {
- return step([n, v]);
- };
+ }
+ }
+
+ class SmithyMessageEncoderStream {
+ options;
+ constructor(options) {
+ this.options = options;
+ }
+ [Symbol.asyncIterator]() {
+ return this.asyncIterator();
+ }
+ async* asyncIterator() {
+ for await (const chunk of this.options.inputStream) {
+ const payloadBuf = this.options.serializer(chunk);
+ yield payloadBuf;
}
- function step(op) {
- if (f)
- throw new TypeError("Generator is already executing.");
- while (_)
- try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
- return t;
- if (y = 0, t)
- op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0:
- case 1:
- t = op;
- break;
- case 4:
- _.label++;
- return { value: op[1], done: false };
- case 5:
- _.label++;
- y = op[1];
- op = [0];
- continue;
- case 7:
- op = _.ops.pop();
- _.trys.pop();
- continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
- _ = 0;
- continue;
- }
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
- _.label = op[1];
- break;
- }
- if (op[0] === 6 && _.label < t[1]) {
- _.label = t[1];
- t = op;
- break;
- }
- if (t && _.label < t[2]) {
- _.label = t[2];
- _.ops.push(op);
- break;
- }
- if (t[2])
- _.ops.pop();
- _.trys.pop();
- continue;
- }
- op = body.call(thisArg, _);
- } catch (e) {
- op = [6, e];
- y = 0;
- } finally {
- f = t = 0;
- }
- if (op[0] & 5)
- throw op[1];
- return { value: op[0] ? op[1] : undefined, done: true };
+ }
+ }
+ exports.EventStreamCodec = EventStreamCodec;
+ exports.HeaderMarshaller = HeaderMarshaller;
+ exports.Int64 = Int64;
+ exports.MessageDecoderStream = MessageDecoderStream;
+ exports.MessageEncoderStream = MessageEncoderStream;
+ exports.SmithyMessageDecoderStream = SmithyMessageDecoderStream;
+ exports.SmithyMessageEncoderStream = SmithyMessageEncoderStream;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/
+var require_dist_cjs67 = __commonJS((exports) => {
+ var getChunkedStream = function(source) {
+ let currentMessageTotalLength = 0;
+ let currentMessagePendingLength = 0;
+ let currentMessage = null;
+ let messageLengthBuffer = null;
+ const allocateMessage = (size) => {
+ if (typeof size !== "number") {
+ throw new Error("Attempted to allocate an event message where size was not a number: " + size);
}
+ currentMessageTotalLength = size;
+ currentMessagePendingLength = 4;
+ currentMessage = new Uint8Array(size);
+ const currentMessageView = new DataView(currentMessage.buffer);
+ currentMessageView.setUint32(0, size, false);
};
- __createBinding = function(o, m, k, k2) {
- if (k2 === undefined)
- k2 = k;
- o[k2] = m[k];
- };
- __exportStar = function(m, exports2) {
- for (var p in m)
- if (p !== "default" && !exports2.hasOwnProperty(p))
- exports2[p] = m[p];
- };
- __values = function(o) {
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
- if (m)
- return m.call(o);
- if (o && typeof o.length === "number")
- return {
- next: function() {
- if (o && i >= o.length)
- o = undefined;
- return { value: o && o[i++], done: !o };
+ const iterator = async function* () {
+ const sourceIterator = source[Symbol.asyncIterator]();
+ while (true) {
+ const { value, done } = await sourceIterator.next();
+ if (done) {
+ if (!currentMessageTotalLength) {
+ return;
+ } else if (currentMessageTotalLength === currentMessagePendingLength) {
+ yield currentMessage;
+ } else {
+ throw new Error("Truncated event message received.");
+ }
+ return;
+ }
+ const chunkLength = value.length;
+ let currentOffset = 0;
+ while (currentOffset < chunkLength) {
+ if (!currentMessage) {
+ const bytesRemaining = chunkLength - currentOffset;
+ if (!messageLengthBuffer) {
+ messageLengthBuffer = new Uint8Array(4);
+ }
+ const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);
+ messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);
+ currentMessagePendingLength += numBytesForTotal;
+ currentOffset += numBytesForTotal;
+ if (currentMessagePendingLength < 4) {
+ break;
+ }
+ allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));
+ messageLengthBuffer = null;
+ }
+ const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);
+ currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);
+ currentMessagePendingLength += numBytesToWrite;
+ currentOffset += numBytesToWrite;
+ if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {
+ yield currentMessage;
+ currentMessage = null;
+ currentMessageTotalLength = 0;
+ currentMessagePendingLength = 0;
}
- };
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
- };
- __read = function(o, n) {
- var m = typeof Symbol === "function" && o[Symbol.iterator];
- if (!m)
- return o;
- var i = m.call(o), r, ar = [], e;
- try {
- while ((n === undefined || n-- > 0) && !(r = i.next()).done)
- ar.push(r.value);
- } catch (error) {
- e = { error };
- } finally {
- try {
- if (r && !r.done && (m = i["return"]))
- m.call(i);
- } finally {
- if (e)
- throw e.error;
- }
- }
- return ar;
- };
- __spread = function() {
- for (var ar = [], i = 0;i < arguments.length; i++)
- ar = ar.concat(__read(arguments[i]));
- return ar;
- };
- __spreadArrays = function() {
- for (var s = 0, i = 0, il = arguments.length;i < il; i++)
- s += arguments[i].length;
- for (var r = Array(s), k = 0, i = 0;i < il; i++)
- for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
- r[k] = a[j];
- return r;
- };
- __await = function(v) {
- return this instanceof __await ? (this.v = v, this) : new __await(v);
- };
- __asyncGenerator = function(thisArg, _arguments, generator) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i;
- function verb(n) {
- if (g[n])
- i[n] = function(v) {
- return new Promise(function(a, b) {
- q.push([n, v, a, b]) > 1 || resume(n, v);
- });
- };
- }
- function resume(n, v) {
- try {
- step(g[n](v));
- } catch (e) {
- settle(q[0][3], e);
}
}
- function step(r) {
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
- }
- function fulfill(value) {
- resume("next", value);
- }
- function reject(value) {
- resume("throw", value);
- }
- function settle(f, v) {
- if (f(v), q.shift(), q.length)
- resume(q[0][0], q[0][1]);
- }
- };
- __asyncDelegator = function(o) {
- var i, p;
- return i = {}, verb("next"), verb("throw", function(e) {
- throw e;
- }), verb("return"), i[Symbol.iterator] = function() {
- return this;
- }, i;
- function verb(n, f) {
- i[n] = o[n] ? function(v) {
- return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
- } : f;
- }
- };
- __asyncValues = function(o) {
- if (!Symbol.asyncIterator)
- throw new TypeError("Symbol.asyncIterator is not defined.");
- var m = o[Symbol.asyncIterator], i;
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
- return this;
- }, i);
- function verb(n) {
- i[n] = o[n] && function(v) {
- return new Promise(function(resolve, reject) {
- v = o[n](v), settle(resolve, reject, v.done, v.value);
- });
- };
- }
- function settle(resolve, reject, d, v) {
- Promise.resolve(v).then(function(v2) {
- resolve({ value: v2, done: d });
- }, reject);
- }
- };
- __makeTemplateObject = function(cooked, raw) {
- if (Object.defineProperty) {
- Object.defineProperty(cooked, "raw", { value: raw });
- } else {
- cooked.raw = raw;
- }
- return cooked;
- };
- __importStar = function(mod) {
- if (mod && mod.__esModule)
- return mod;
- var result = {};
- if (mod != null) {
- for (var k in mod)
- if (Object.hasOwnProperty.call(mod, k))
- result[k] = mod[k];
- }
- result["default"] = mod;
- return result;
- };
- __importDefault = function(mod) {
- return mod && mod.__esModule ? mod : { default: mod };
};
- __classPrivateFieldGet = function(receiver, privateMap) {
- if (!privateMap.has(receiver)) {
- throw new TypeError("attempted to get private field on non-instance");
- }
- return privateMap.get(receiver);
+ return {
+ [Symbol.asyncIterator]: iterator
};
- __classPrivateFieldSet = function(receiver, privateMap, value) {
- if (!privateMap.has(receiver)) {
- throw new TypeError("attempted to set private field on non-instance");
+ };
+ var getMessageUnmarshaller = function(deserializer, toUtf8) {
+ return async function(message) {
+ const { value: messageType } = message.headers[":message-type"];
+ if (messageType === "error") {
+ const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError");
+ unmodeledError.name = message.headers[":error-code"].value;
+ throw unmodeledError;
+ } else if (messageType === "exception") {
+ const code = message.headers[":exception-type"].value;
+ const exception = { [code]: message };
+ const deserializedException = await deserializer(exception);
+ if (deserializedException.$unknown) {
+ const error = new Error(toUtf8(message.body));
+ error.name = code;
+ throw error;
+ }
+ throw deserializedException[code];
+ } else if (messageType === "event") {
+ const event = {
+ [message.headers[":event-type"].value]: message
+ };
+ const deserialized = await deserializer(event);
+ if (deserialized.$unknown)
+ return;
+ return deserialized;
+ } else {
+ throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`);
}
- privateMap.set(receiver, value);
- return value;
};
- exporter("__extends", __extends);
- exporter("__assign", __assign);
- exporter("__rest", __rest);
- exporter("__decorate", __decorate);
- exporter("__param", __param);
- exporter("__metadata", __metadata);
- exporter("__awaiter", __awaiter);
- exporter("__generator", __generator);
- exporter("__exportStar", __exportStar);
- exporter("__createBinding", __createBinding);
- exporter("__values", __values);
- exporter("__read", __read);
- exporter("__spread", __spread);
- exporter("__spreadArrays", __spreadArrays);
- exporter("__await", __await);
- exporter("__asyncGenerator", __asyncGenerator);
- exporter("__asyncDelegator", __asyncDelegator);
- exporter("__asyncValues", __asyncValues);
- exporter("__makeTemplateObject", __makeTemplateObject);
- exporter("__importStar", __importStar);
- exporter("__importDefault", __importDefault);
- exporter("__classPrivateFieldGet", __classPrivateFieldGet);
- exporter("__classPrivateFieldSet", __classPrivateFieldSet);
- });
+ };
+ var eventstreamCodec = require_dist_cjs66();
+
+ class EventStreamMarshaller {
+ eventStreamCodec;
+ utfEncoder;
+ constructor({ utf8Encoder, utf8Decoder }) {
+ this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(utf8Encoder, utf8Decoder);
+ this.utfEncoder = utf8Encoder;
+ }
+ deserialize(body, deserializer) {
+ const inputStream = getChunkedStream(body);
+ return new eventstreamCodec.SmithyMessageDecoderStream({
+ messageStream: new eventstreamCodec.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),
+ deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder)
+ });
+ }
+ serialize(inputStream, serializer) {
+ return new eventstreamCodec.MessageEncoderStream({
+ messageStream: new eventstreamCodec.SmithyMessageEncoderStream({ inputStream, serializer }),
+ encoder: this.eventStreamCodec,
+ includeEndFrame: true
+ });
+ }
+ }
+ var eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);
+ exports.EventStreamMarshaller = EventStreamMarshaller;
+ exports.eventStreamSerdeProvider = eventStreamSerdeProvider;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/
-var require_aws_crc32c = __commonJS((exports) => {
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.AwsCrc32c = undefined;
- var tslib_1 = require_tslib3();
- var util_1 = require_build();
- var index_1 = require_build3();
- var AwsCrc32c = function() {
- function AwsCrc32c2() {
- this.crc32c = new index_1.Crc32c;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+var require_dist_cjs68 = __commonJS((exports) => {
+ async function* readabletoIterable(readStream) {
+ let streamEnded = false;
+ let generationEnded = false;
+ const records = new Array;
+ readStream.on("error", (err) => {
+ if (!streamEnded) {
+ streamEnded = true;
+ }
+ if (err) {
+ throw err;
+ }
+ });
+ readStream.on("data", (data) => {
+ records.push(data);
+ });
+ readStream.on("end", () => {
+ streamEnded = true;
+ });
+ while (!generationEnded) {
+ const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));
+ if (value) {
+ yield value;
+ }
+ generationEnded = streamEnded && records.length === 0;
}
- AwsCrc32c2.prototype.update = function(toHash) {
- if ((0, util_1.isEmptyData)(toHash))
- return;
- this.crc32c.update((0, util_1.convertToBuffer)(toHash));
- };
- AwsCrc32c2.prototype.digest = function() {
- return tslib_1.__awaiter(this, undefined, undefined, function() {
- return tslib_1.__generator(this, function(_a) {
- return [2, (0, util_1.numToUint8)(this.crc32c.digest())];
- });
+ }
+ var eventstreamSerdeUniversal = require_dist_cjs67();
+ var stream = __require("stream");
+
+ class EventStreamMarshaller {
+ universalMarshaller;
+ constructor({ utf8Encoder, utf8Decoder }) {
+ this.universalMarshaller = new eventstreamSerdeUniversal.EventStreamMarshaller({
+ utf8Decoder,
+ utf8Encoder
});
- };
- AwsCrc32c2.prototype.reset = function() {
- this.crc32c = new index_1.Crc32c;
- };
- return AwsCrc32c2;
- }();
- exports.AwsCrc32c = AwsCrc32c;
+ }
+ deserialize(body, deserializer) {
+ const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body);
+ return this.universalMarshaller.deserialize(bodyIterable, deserializer);
+ }
+ serialize(input, serializer) {
+ return stream.Readable.from(this.universalMarshaller.serialize(input, serializer));
+ }
+ }
+ var eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);
+ exports.EventStreamMarshaller = EventStreamMarshaller;
+ exports.eventStreamSerdeProvider = eventStreamSerdeProvider;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endp
-var require_build3 = __commonJS((exports) => {
- var crc32c = function(data) {
- return new Crc32c().update(data).digest();
- };
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.AwsCrc32c = exports.Crc32c = exports.crc32c = undefined;
- var tslib_1 = require_tslib3();
- var util_1 = require_build();
- exports.crc32c = crc32c;
- var Crc32c = function() {
- function Crc32c2() {
- this.checksum = 4294967295;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs69 = __commonJS((exports) => {
+ var fs = __require("fs");
+ var utilUtf8 = require_dist_cjs8();
+ var stream = __require("stream");
+
+ class HashCalculator extends stream.Writable {
+ hash;
+ constructor(hash, options) {
+ super(options);
+ this.hash = hash;
}
- Crc32c2.prototype.update = function(data) {
- var e_1, _a;
+ _write(chunk, encoding, callback) {
try {
- for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
- var byte = data_1_1.value;
- this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
- }
- } catch (e_1_1) {
- e_1 = { error: e_1_1 };
- } finally {
- try {
- if (data_1_1 && !data_1_1.done && (_a = data_1.return))
- _a.call(data_1);
- } finally {
- if (e_1)
- throw e_1.error;
- }
+ this.hash.update(utilUtf8.toUint8Array(chunk));
+ } catch (err) {
+ return callback(err);
}
- return this;
- };
- Crc32c2.prototype.digest = function() {
- return (this.checksum ^ 4294967295) >>> 0;
- };
- return Crc32c2;
- }();
- exports.Crc32c = Crc32c;
- var a_lookupTable = [
- 0,
- 4067132163,
- 3778769143,
- 324072436,
- 3348797215,
- 904991772,
- 648144872,
- 3570033899,
- 2329499855,
- 2024987596,
- 1809983544,
- 2575936315,
- 1296289744,
- 3207089363,
- 2893594407,
- 1578318884,
- 274646895,
- 3795141740,
- 4049975192,
- 51262619,
- 3619967088,
- 632279923,
- 922689671,
- 3298075524,
- 2592579488,
- 1760304291,
- 2075979607,
- 2312596564,
- 1562183871,
- 2943781820,
- 3156637768,
- 1313733451,
- 549293790,
- 3537243613,
- 3246849577,
- 871202090,
- 3878099393,
- 357341890,
- 102525238,
- 4101499445,
- 2858735121,
- 1477399826,
- 1264559846,
- 3107202533,
- 1845379342,
- 2677391885,
- 2361733625,
- 2125378298,
- 820201905,
- 3263744690,
- 3520608582,
- 598981189,
- 4151959214,
- 85089709,
- 373468761,
- 3827903834,
- 3124367742,
- 1213305469,
- 1526817161,
- 2842354314,
- 2107672161,
- 2412447074,
- 2627466902,
- 1861252501,
- 1098587580,
- 3004210879,
- 2688576843,
- 1378610760,
- 2262928035,
- 1955203488,
- 1742404180,
- 2511436119,
- 3416409459,
- 969524848,
- 714683780,
- 3639785095,
- 205050476,
- 4266873199,
- 3976438427,
- 526918040,
- 1361435347,
- 2739821008,
- 2954799652,
- 1114974503,
- 2529119692,
- 1691668175,
- 2005155131,
- 2247081528,
- 3690758684,
- 697762079,
- 986182379,
- 3366744552,
- 476452099,
- 3993867776,
- 4250756596,
- 255256311,
- 1640403810,
- 2477592673,
- 2164122517,
- 1922457750,
- 2791048317,
- 1412925310,
- 1197962378,
- 3037525897,
- 3944729517,
- 427051182,
- 170179418,
- 4165941337,
- 746937522,
- 3740196785,
- 3451792453,
- 1070968646,
- 1905808397,
- 2213795598,
- 2426610938,
- 1657317369,
- 3053634322,
- 1147748369,
- 1463399397,
- 2773627110,
- 4215344322,
- 153784257,
- 444234805,
- 3893493558,
- 1021025245,
- 3467647198,
- 3722505002,
- 797665321,
- 2197175160,
- 1889384571,
- 1674398607,
- 2443626636,
- 1164749927,
- 3070701412,
- 2757221520,
- 1446797203,
- 137323447,
- 4198817972,
- 3910406976,
- 461344835,
- 3484808360,
- 1037989803,
- 781091935,
- 3705997148,
- 2460548119,
- 1623424788,
- 1939049696,
- 2180517859,
- 1429367560,
- 2807687179,
- 3020495871,
- 1180866812,
- 410100952,
- 3927582683,
- 4182430767,
- 186734380,
- 3756733383,
- 763408580,
- 1053836080,
- 3434856499,
- 2722870694,
- 1344288421,
- 1131464017,
- 2971354706,
- 1708204729,
- 2545590714,
- 2229949006,
- 1988219213,
- 680717673,
- 3673779818,
- 3383336350,
- 1002577565,
- 4010310262,
- 493091189,
- 238226049,
- 4233660802,
- 2987750089,
- 1082061258,
- 1395524158,
- 2705686845,
- 1972364758,
- 2279892693,
- 2494862625,
- 1725896226,
- 952904198,
- 3399985413,
- 3656866545,
- 731699698,
- 4283874585,
- 222117402,
- 510512622,
- 3959836397,
- 3280807620,
- 837199303,
- 582374963,
- 3504198960,
- 68661723,
- 4135334616,
- 3844915500,
- 390545967,
- 1230274059,
- 3141532936,
- 2825850620,
- 1510247935,
- 2395924756,
- 2091215383,
- 1878366691,
- 2644384480,
- 3553878443,
- 565732008,
- 854102364,
- 3229815391,
- 340358836,
- 3861050807,
- 4117890627,
- 119113024,
- 1493875044,
- 2875275879,
- 3090270611,
- 1247431312,
- 2660249211,
- 1828433272,
- 2141937292,
- 2378227087,
- 3811616794,
- 291187481,
- 34330861,
- 4032846830,
- 615137029,
- 3603020806,
- 3314634738,
- 939183345,
- 1776939221,
- 2609017814,
- 2295496738,
- 2058945313,
- 2926798794,
- 1545135305,
- 1330124605,
- 3173225534,
- 4084100981,
- 17165430,
- 307568514,
- 3762199681,
- 888469610,
- 3332340585,
- 3587147933,
- 665062302,
- 2042050490,
- 2346497209,
- 2559330125,
- 1793573966,
- 3190661285,
- 1279665062,
- 1595330642,
- 2910671697
- ];
- var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookupTable);
- var aws_crc32c_1 = require_aws_crc32c();
- Object.defineProperty(exports, "AwsCrc32c", { enumerable: true, get: function() {
- return aws_crc32c_1.AwsCrc32c;
- } });
+ callback();
+ }
+ }
+ var fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject) => {
+ if (!isReadStream(fileStream)) {
+ reject(new Error("Unable to calculate hash for non-file streams."));
+ return;
+ }
+ const fileStreamTee = fs.createReadStream(fileStream.path, {
+ start: fileStream.start,
+ end: fileStream.end
+ });
+ const hash = new hashCtor;
+ const hashCalculator = new HashCalculator(hash);
+ fileStreamTee.pipe(hashCalculator);
+ fileStreamTee.on("error", (err) => {
+ hashCalculator.end();
+ reject(err);
+ });
+ hashCalculator.on("error", reject);
+ hashCalculator.on("finish", function() {
+ hash.digest().then(resolve).catch(reject);
+ });
+ });
+ var isReadStream = (stream2) => typeof stream2.path === "string";
+ var readableStreamHasher = (hashCtor, readableStream) => {
+ if (readableStream.readableFlowing !== null) {
+ throw new Error("Unable to calculate hash for flowing readable stream");
+ }
+ const hash = new hashCtor;
+ const hashCalculator = new HashCalculator(hash);
+ readableStream.pipe(hashCalculator);
+ return new Promise((resolve, reject) => {
+ readableStream.on("error", (err) => {
+ hashCalculator.end();
+ reject(err);
+ });
+ hashCalculator.on("error", reject);
+ hashCalculator.on("finish", () => {
+ hash.digest().then(resolve).catch(reject);
+ });
+ });
+ };
+ exports.fileStreamHasher = fileStreamHasher;
+ exports.readableStreamHasher = readableStreamHasher;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oid
+var require_runtimeConfig_shared4 = __commonJS((exports) => {
+ Object.defineProperty(exports, "__esModule", { value: true });
+ exports.getRuntimeConfig = undefined;
+ var core_1 = require_dist_cjs24();
+ var signature_v4_multi_region_1 = require_dist_cjs46();
+ var smithy_client_1 = require_dist_cjs22();
+ var url_parser_1 = require_dist_cjs37();
+ var util_base64_1 = require_dist_cjs9();
+ var util_stream_1 = require_dist_cjs15();
+ var util_utf8_1 = require_dist_cjs8();
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
+ var endpointResolver_1 = require_endpointResolver();
+ var getRuntimeConfig = (config) => {
+ return {
+ apiVersion: "2006-03-01",
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
+ disableHostPrefix: config?.disableHostPrefix ?? false,
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
+ extensions: config?.extensions ?? [],
+ getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? util_stream_1.getAwsChunkedEncodingStream,
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultS3HttpAuthSchemeProvider,
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
+ {
+ schemeId: "aws.auth#sigv4",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
+ signer: new core_1.AwsSdkSigV4Signer
+ },
+ {
+ schemeId: "aws.auth#sigv4a",
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
+ signer: new core_1.AwsSdkSigV4ASigner
+ }
+ ],
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger,
+ sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin,
+ serviceId: config?.serviceId ?? "S3",
+ signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
+ signingEscapePath: config?.signingEscapePath ?? false,
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
+ useArnRegion: config?.useArnRegion ?? undefined,
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
+ };
+ };
+ exports.getRuntimeConfig = getRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.jsnode.js.jsjsd.jss-on-buffer.js
-var require_create_read_stream_on_buffer = __commonJS((exports) => {
- var createReadStreamOnBuffer = function(buffer) {
- const stream = new stream_1.Transform;
- stream.push(buffer);
- stream.push(null);
- return stream;
- };
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/
+var require_runtimeConfig4 = __commonJS((exports) => {
Object.defineProperty(exports, "__esModule", { value: true });
- exports.createReadStreamOnBuffer = undefined;
- var stream_1 = __require("stream");
- exports.createReadStreamOnBuffer = createReadStreamOnBuffer;
+ exports.getRuntimeConfig = undefined;
+ var tslib_1 = require_tslib();
+ var package_json_1 = tslib_1.__importDefault(require_package2());
+ var core_1 = require_dist_cjs24();
+ var credential_provider_node_1 = require_dist_cjs64();
+ var middleware_bucket_endpoint_1 = require_dist_cjs65();
+ var middleware_flexible_checksums_1 = require_dist_cjs28();
+ var middleware_sdk_s3_1 = require_dist_cjs34();
+ var util_user_agent_node_1 = require_dist_cjs53();
+ var config_resolver_1 = require_dist_cjs40();
+ var eventstream_serde_node_1 = require_dist_cjs68();
+ var hash_node_1 = require_dist_cjs54();
+ var hash_stream_node_1 = require_dist_cjs69();
+ var middleware_retry_1 = require_dist_cjs45();
+ var node_config_provider_1 = require_dist_cjs48();
+ var node_http_handler_1 = require_dist_cjs12();
+ var util_body_length_node_1 = require_dist_cjs55();
+ var util_retry_1 = require_dist_cjs44();
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared4();
+ var smithy_client_1 = require_dist_cjs22();
+ var util_defaults_mode_node_1 = require_dist_cjs56();
+ var smithy_client_2 = require_dist_cjs22();
+ var getRuntimeConfig = (config) => {
+ (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
+ const loaderConfig = {
+ profile: config?.profile,
+ logger: clientSharedValues.logger
+ };
+ return {
+ ...clientSharedValues,
+ ...config,
+ runtime: "node",
+ defaultsMode,
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
+ disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? (0, node_config_provider_1.loadConfig)(middleware_sdk_s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig),
+ eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider,
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
+ md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"),
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
+ requestChecksumCalculation: config?.requestChecksumCalculation ?? (0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig),
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
+ responseChecksumValidation: config?.responseChecksumValidation ?? (0, node_config_provider_1.loadConfig)(middleware_flexible_checksums_1.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig),
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
+ }, config),
+ sha1: config?.sha1 ?? hash_node_1.Hash.bind(null, "sha1"),
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
+ streamHasher: config?.streamHasher ?? hash_stream_node_1.readableStreamHasher,
+ useArnRegion: config?.useArnRegion ?? (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
+ };
+ };
+ exports.getRuntimeConfig = getRuntimeConfig;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jssolver.j
-var require_dist_cjs67 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodule
+var require_dist_cjs70 = __commonJS((exports, module) => {
+ var ssecMiddleware = function(options) {
+ return (next) => async (args) => {
+ const input = { ...args.input };
+ const properties = [
+ {
+ target: "SSECustomerKey",
+ hash: "SSECustomerKeyMD5"
+ },
+ {
+ target: "CopySourceSSECustomerKey",
+ hash: "CopySourceSSECustomerKeyMD5"
+ }
+ ];
+ for (const prop of properties) {
+ const value = input[prop.target];
+ if (value) {
+ let valueForHash;
+ if (typeof value === "string") {
+ if (isValidBase64EncodedSSECustomerKey(value, options)) {
+ valueForHash = options.base64Decoder(value);
+ } else {
+ valueForHash = options.utf8Decoder(value);
+ input[prop.target] = options.base64Encoder(valueForHash);
+ }
+ } else {
+ valueForHash = ArrayBuffer.isView(value) ? new Uint8Array(value.buffer, value.byteOffset, value.byteLength) : new Uint8Array(value);
+ input[prop.target] = options.base64Encoder(valueForHash);
+ }
+ const hash = new options.md5;
+ hash.update(valueForHash);
+ input[prop.hash] = options.base64Encoder(await hash.digest());
+ }
+ }
+ return next({
+ ...args,
+ input
+ });
+ };
+ };
+ var isValidBase64EncodedSSECustomerKey = function(str, options) {
+ const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
+ if (!base64Regex.test(str))
+ return false;
+ try {
+ const decodedBytes = options.base64Decoder(str);
+ return decodedBytes.length === 32;
+ } catch {
+ return false;
+ }
+ };
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -23173,238 +26802,47 @@ var require_dist_cjs67 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- ChecksumAlgorithm: () => ChecksumAlgorithm,
- ChecksumLocation: () => ChecksumLocation,
- DEFAULT_CHECKSUM_ALGORITHM: () => DEFAULT_CHECKSUM_ALGORITHM,
- S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM: () => S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM,
- flexibleChecksumsMiddleware: () => flexibleChecksumsMiddleware,
- flexibleChecksumsMiddlewareOptions: () => flexibleChecksumsMiddlewareOptions,
- getFlexibleChecksumsPlugin: () => getFlexibleChecksumsPlugin
+ var index_exports = {};
+ __export2(index_exports, {
+ getSsecPlugin: () => getSsecPlugin,
+ isValidBase64EncodedSSECustomerKey: () => isValidBase64EncodedSSECustomerKey,
+ ssecMiddleware: () => ssecMiddleware,
+ ssecMiddlewareOptions: () => ssecMiddlewareOptions
});
- module.exports = __toCommonJS(src_exports);
- var ChecksumAlgorithm = ((ChecksumAlgorithm3) => {
- ChecksumAlgorithm3["MD5"] = "MD5";
- ChecksumAlgorithm3["CRC32"] = "CRC32";
- ChecksumAlgorithm3["CRC32C"] = "CRC32C";
- ChecksumAlgorithm3["SHA1"] = "SHA1";
- ChecksumAlgorithm3["SHA256"] = "SHA256";
- return ChecksumAlgorithm3;
- })(ChecksumAlgorithm || {});
- var ChecksumLocation = ((ChecksumLocation2) => {
- ChecksumLocation2["HEADER"] = "header";
- ChecksumLocation2["TRAILER"] = "trailer";
- return ChecksumLocation2;
- })(ChecksumLocation || {});
- var DEFAULT_CHECKSUM_ALGORITHM = "MD5";
- var S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM = "CRC32";
- var import_protocol_http = require_dist_cjs2();
- var CLIENT_SUPPORTED_ALGORITHMS = [
- "CRC32",
- "CRC32C",
- "SHA1",
- "SHA256"
- ];
- var PRIORITY_ORDER_ALGORITHMS = [
- "CRC32",
- "CRC32C",
- "SHA1",
- "SHA256"
- ];
- var getChecksumAlgorithmForRequest = __name((input, { requestChecksumRequired, requestAlgorithmMember }, isS3Express) => {
- const defaultAlgorithm = isS3Express ? S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM : DEFAULT_CHECKSUM_ALGORITHM;
- if (!requestAlgorithmMember || !input[requestAlgorithmMember]) {
- return requestChecksumRequired ? defaultAlgorithm : undefined;
- }
- const checksumAlgorithm = input[requestAlgorithmMember];
- if (!CLIENT_SUPPORTED_ALGORITHMS.includes(checksumAlgorithm)) {
- throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.`);
- }
- return checksumAlgorithm;
- }, "getChecksumAlgorithmForRequest");
- var getChecksumLocationName = __name((algorithm) => algorithm === "MD5" ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`, "getChecksumLocationName");
- var hasHeader = __name((header, headers) => {
- const soughtHeader = header.toLowerCase();
- for (const headerName of Object.keys(headers)) {
- if (soughtHeader === headerName.toLowerCase()) {
- return true;
- }
- }
- return false;
- }, "hasHeader");
- var import_is_array_buffer = require_dist_cjs8();
- var isStreaming = __name((body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !(0, import_is_array_buffer.isArrayBuffer)(body), "isStreaming");
- var import_crc32 = require_build2();
- var import_crc32c = require_build3();
- var selectChecksumAlgorithmFunction = __name((checksumAlgorithm, config) => ({
- ["MD5"]: config.md5,
- ["CRC32"]: import_crc32.AwsCrc32,
- ["CRC32C"]: import_crc32c.AwsCrc32c,
- ["SHA1"]: config.sha1,
- ["SHA256"]: config.sha256
- })[checksumAlgorithm], "selectChecksumAlgorithmFunction");
- var import_util_utf8 = require_dist_cjs11();
- var stringHasher = __name((checksumAlgorithmFn, body) => {
- const hash = new checksumAlgorithmFn;
- hash.update((0, import_util_utf8.toUint8Array)(body || ""));
- return hash.digest();
- }, "stringHasher");
- var flexibleChecksumsMiddlewareOptions = {
- name: "flexibleChecksumsMiddleware",
- step: "build",
- tags: ["BODY_CHECKSUM"],
+ module.exports = __toCommonJS(index_exports);
+ __name(ssecMiddleware, "ssecMiddleware");
+ var ssecMiddlewareOptions = {
+ name: "ssecMiddleware",
+ step: "initialize",
+ tags: ["SSE"],
override: true
};
- var flexibleChecksumsMiddleware = __name((config, middlewareConfig) => (next, context) => async (args) => {
- if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
- return next(args);
- }
- const { request } = args;
- const { body: requestBody, headers } = request;
- const { base64Encoder, streamHasher } = config;
- const { input, requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;
- const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {
- requestChecksumRequired,
- requestAlgorithmMember
- }, !!context.isS3ExpressBucket);
- let updatedBody = requestBody;
- let updatedHeaders = headers;
- if (checksumAlgorithm) {
- const checksumLocationName = getChecksumLocationName(checksumAlgorithm);
- const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);
- if (isStreaming(requestBody)) {
- const { getAwsChunkedEncodingStream: getAwsChunkedEncodingStream2, bodyLengthChecker } = config;
- updatedBody = getAwsChunkedEncodingStream2(requestBody, {
- base64Encoder,
- bodyLengthChecker,
- checksumLocationName,
- checksumAlgorithmFn,
- streamHasher
- });
- updatedHeaders = {
- ...headers,
- "content-encoding": headers["content-encoding"] ? `${headers["content-encoding"]},aws-chunked` : "aws-chunked",
- "transfer-encoding": "chunked",
- "x-amz-decoded-content-length": headers["content-length"],
- "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
- "x-amz-trailer": checksumLocationName
- };
- delete updatedHeaders["content-length"];
- } else if (!hasHeader(checksumLocationName, headers)) {
- const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);
- updatedHeaders = {
- ...headers,
- [checksumLocationName]: base64Encoder(rawChecksum)
+ var getSsecPlugin = __name((config) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);
+ }, "applyToStack")
+ }), "getSsecPlugin");
+ __name(isValidBase64EncodedSSECustomerKey, "isValidBase64EncodedSSECustomerKey");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/endp
+var require_dist_cjs71 = __commonJS((exports, module) => {
+ var locationConstraintMiddleware = function(options) {
+ return (next) => async (args) => {
+ const { CreateBucketConfiguration } = args.input;
+ const region = await options.region();
+ if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
+ args = {
+ ...args,
+ input: {
+ ...args.input,
+ CreateBucketConfiguration: region === "us-east-1" ? undefined : { LocationConstraint: region }
+ }
};
}
- }
- const result = await next({
- ...args,
- request: {
- ...request,
- headers: updatedHeaders,
- body: updatedBody
- }
- });
- return result;
- }, "flexibleChecksumsMiddleware");
- var getChecksumAlgorithmListForResponse = __name((responseAlgorithms = []) => {
- const validChecksumAlgorithms = [];
- for (const algorithm of PRIORITY_ORDER_ALGORITHMS) {
- if (!responseAlgorithms.includes(algorithm) || !CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)) {
- continue;
- }
- validChecksumAlgorithms.push(algorithm);
- }
- return validChecksumAlgorithms;
- }, "getChecksumAlgorithmListForResponse");
- var isChecksumWithPartNumber = __name((checksum) => {
- const lastHyphenIndex = checksum.lastIndexOf("-");
- if (lastHyphenIndex !== -1) {
- const numberPart = checksum.slice(lastHyphenIndex + 1);
- if (!numberPart.startsWith("0")) {
- const number = parseInt(numberPart, 10);
- if (!isNaN(number) && number >= 1 && number <= 1e4) {
- return true;
- }
- }
- }
- return false;
- }, "isChecksumWithPartNumber");
- var import_create_read_stream_on_buffer = require_create_read_stream_on_buffer();
- var getChecksum = __name(async (body, { streamHasher, checksumAlgorithmFn, base64Encoder }) => {
- const digest = isStreaming(body) ? streamHasher(checksumAlgorithmFn, body) : stringHasher(checksumAlgorithmFn, body);
- return base64Encoder(await digest);
- }, "getChecksum");
- var validateChecksumFromResponse = __name(async (response, { config, responseAlgorithms }) => {
- const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);
- const { body: responseBody, headers: responseHeaders } = response;
- for (const algorithm of checksumAlgorithms) {
- const responseHeader = getChecksumLocationName(algorithm);
- const checksumFromResponse = responseHeaders[responseHeader];
- if (checksumFromResponse) {
- const checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);
- const { streamHasher, base64Encoder } = config;
- const checksum = await getChecksum(responseBody, { streamHasher, checksumAlgorithmFn, base64Encoder });
- if (checksum === checksumFromResponse) {
- break;
- }
- throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}" in response header "${responseHeader}".`);
- }
- }
- }, "validateChecksumFromResponse");
- var flexibleChecksumsResponseMiddlewareOptions = {
- name: "flexibleChecksumsResponseMiddleware",
- toMiddleware: "deserializerMiddleware",
- relation: "after",
- tags: ["BODY_CHECKSUM"],
- override: true
- };
- var flexibleChecksumsResponseMiddleware = __name((config, middlewareConfig) => (next, context) => async (args) => {
- if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
return next(args);
- }
- const input = args.input;
- const result = await next(args);
- const response = result.response;
- let collectedStream = undefined;
- const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;
- if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") {
- const { clientName, commandName } = context;
- const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && commandName === "GetObjectCommand" && getChecksumAlgorithmListForResponse(responseAlgorithms).every((algorithm) => {
- const responseHeader = getChecksumLocationName(algorithm);
- const checksumFromResponse = response.headers[responseHeader];
- return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);
- });
- if (isS3WholeObjectMultipartGetResponseChecksum) {
- return result;
- }
- const isStreamingBody = isStreaming(response.body);
- if (isStreamingBody) {
- collectedStream = await config.streamCollector(response.body);
- response.body = (0, import_create_read_stream_on_buffer.createReadStreamOnBuffer)(collectedStream);
- }
- await validateChecksumFromResponse(result.response, {
- config,
- responseAlgorithms
- });
- if (isStreamingBody && collectedStream) {
- response.body = (0, import_create_read_stream_on_buffer.createReadStreamOnBuffer)(collectedStream);
- }
- }
- return result;
- }, "flexibleChecksumsResponseMiddleware");
- var getFlexibleChecksumsPlugin = __name((config, middlewareConfig) => ({
- applyToStack: (clientStack) => {
- clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);
- clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);
- }
- }), "getFlexibleChecksumsPlugin");
-});
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var require_dist_cjs68 = __commonJS((exports, module) => {
+ };
+ };
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -23423,118 +26861,185 @@ var require_dist_cjs68 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
- WaiterState: () => WaiterState,
- checkExceptions: () => checkExceptions,
- createWaiter: () => createWaiter,
- waiterServiceDefaults: () => waiterServiceDefaults
+ var index_exports = {};
+ __export2(index_exports, {
+ getLocationConstraintPlugin: () => getLocationConstraintPlugin,
+ locationConstraintMiddleware: () => locationConstraintMiddleware,
+ locationConstraintMiddlewareOptions: () => locationConstraintMiddlewareOptions
});
- module.exports = __toCommonJS(src_exports);
- var sleep = __name((seconds) => {
+ module.exports = __toCommonJS(index_exports);
+ __name(locationConstraintMiddleware, "locationConstraintMiddleware");
+ var locationConstraintMiddlewareOptions = {
+ step: "initialize",
+ tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
+ name: "locationConstraintMiddleware",
+ override: true
+ };
+ var getLocationConstraintPlugin = __name((config) => ({
+ applyToStack: __name((clientStack) => {
+ clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
+ }, "applyToStack")
+ }), "getLocationConstraintPlugin");
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var require_dist_cjs72 = __commonJS((exports) => {
+ var sleep = (seconds) => {
return new Promise((resolve) => setTimeout(resolve, seconds * 1000));
- }, "sleep");
+ };
var waiterServiceDefaults = {
minDelay: 2,
maxDelay: 120
};
- var WaiterState = ((WaiterState2) => {
- WaiterState2["ABORTED"] = "ABORTED";
- WaiterState2["FAILURE"] = "FAILURE";
- WaiterState2["SUCCESS"] = "SUCCESS";
- WaiterState2["RETRY"] = "RETRY";
- WaiterState2["TIMEOUT"] = "TIMEOUT";
- return WaiterState2;
- })(WaiterState || {});
- var checkExceptions = __name((result) => {
- if (result.state === "ABORTED") {
+ exports.WaiterState = undefined;
+ (function(WaiterState) {
+ WaiterState["ABORTED"] = "ABORTED";
+ WaiterState["FAILURE"] = "FAILURE";
+ WaiterState["SUCCESS"] = "SUCCESS";
+ WaiterState["RETRY"] = "RETRY";
+ WaiterState["TIMEOUT"] = "TIMEOUT";
+ })(exports.WaiterState || (exports.WaiterState = {}));
+ var checkExceptions = (result) => {
+ if (result.state === exports.WaiterState.ABORTED) {
const abortError = new Error(`${JSON.stringify({
...result,
reason: "Request was aborted"
})}`);
abortError.name = "AbortError";
throw abortError;
- } else if (result.state === "TIMEOUT") {
+ } else if (result.state === exports.WaiterState.TIMEOUT) {
const timeoutError = new Error(`${JSON.stringify({
...result,
reason: "Waiter has timed out"
})}`);
timeoutError.name = "TimeoutError";
throw timeoutError;
- } else if (result.state !== "SUCCESS") {
- throw new Error(`${JSON.stringify({ result })}`);
+ } else if (result.state !== exports.WaiterState.SUCCESS) {
+ throw new Error(`${JSON.stringify(result)}`);
}
return result;
- }, "checkExceptions");
- var exponentialBackoffWithJitter = __name((minDelay, maxDelay, attemptCeiling, attempt) => {
+ };
+ var exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => {
if (attempt > attemptCeiling)
return maxDelay;
const delay = minDelay * 2 ** (attempt - 1);
return randomInRange(minDelay, delay);
- }, "exponentialBackoffWithJitter");
- var randomInRange = __name((min, max) => min + Math.random() * (max - min), "randomInRange");
- var runPolling = __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
- var _a;
+ };
+ var randomInRange = (min, max) => min + Math.random() * (max - min);
+ var runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {
+ const observedResponses = {};
const { state, reason } = await acceptorChecks(client, input);
- if (state !== "RETRY") {
- return { state, reason };
+ if (reason) {
+ const message = createMessageFromResponse(reason);
+ observedResponses[message] |= 0;
+ observedResponses[message] += 1;
+ }
+ if (state !== exports.WaiterState.RETRY) {
+ return { state, reason, observedResponses };
}
let currentAttempt = 1;
const waitUntil = Date.now() + maxWaitTime * 1000;
const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;
while (true) {
- if (((_a = abortController == null ? undefined : abortController.signal) == null ? undefined : _a.aborted) || (abortSignal == null ? undefined : abortSignal.aborted)) {
- return { state: "ABORTED" };
+ if (abortController?.signal?.aborted || abortSignal?.aborted) {
+ const message = "AbortController signal aborted.";
+ observedResponses[message] |= 0;
+ observedResponses[message] += 1;
+ return { state: exports.WaiterState.ABORTED, observedResponses };
}
const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);
if (Date.now() + delay * 1000 > waitUntil) {
- return { state: "TIMEOUT" };
+ return { state: exports.WaiterState.TIMEOUT, observedResponses };
}
await sleep(delay);
const { state: state2, reason: reason2 } = await acceptorChecks(client, input);
- if (state2 !== "RETRY") {
- return { state: state2, reason: reason2 };
+ if (reason2) {
+ const message = createMessageFromResponse(reason2);
+ observedResponses[message] |= 0;
+ observedResponses[message] += 1;
+ }
+ if (state2 !== exports.WaiterState.RETRY) {
+ return { state: state2, reason: reason2, observedResponses };
}
currentAttempt += 1;
}
- }, "runPolling");
- var validateWaiterOptions = __name((options) => {
- if (options.maxWaitTime < 1) {
+ };
+ var createMessageFromResponse = (reason) => {
+ if (reason?.$responseBodyText) {
+ return `Deserialization error for body: ${reason.$responseBodyText}`;
+ }
+ if (reason?.$metadata?.httpStatusCode) {
+ if (reason.$response || reason.message) {
+ return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? "Unknown"}: ${reason.message}`;
+ }
+ return `${reason.$metadata.httpStatusCode}: OK`;
+ }
+ return String(reason?.message ?? JSON.stringify(reason) ?? "Unknown");
+ };
+ var validateWaiterOptions = (options) => {
+ if (options.maxWaitTime <= 0) {
throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
- } else if (options.minDelay < 1) {
+ } else if (options.minDelay <= 0) {
throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
- } else if (options.maxDelay < 1) {
+ } else if (options.maxDelay <= 0) {
throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
} else if (options.maxWaitTime <= options.minDelay) {
throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
} else if (options.maxDelay < options.minDelay) {
throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`);
}
- }, "validateWaiterOptions");
- var abortTimeout = __name(async (abortSignal) => {
- return new Promise((resolve) => {
- abortSignal.onabort = () => resolve({ state: "ABORTED" });
+ };
+ var abortTimeout = (abortSignal) => {
+ let onAbort;
+ const promise = new Promise((resolve) => {
+ onAbort = () => resolve({ state: exports.WaiterState.ABORTED });
+ if (typeof abortSignal.addEventListener === "function") {
+ abortSignal.addEventListener("abort", onAbort);
+ } else {
+ abortSignal.onabort = onAbort;
+ }
});
- }, "abortTimeout");
- var createWaiter = __name(async (options, input, acceptorChecks) => {
+ return {
+ clearListener() {
+ if (typeof abortSignal.removeEventListener === "function") {
+ abortSignal.removeEventListener("abort", onAbort);
+ }
+ },
+ aborted: promise
+ };
+ };
+ var createWaiter = async (options, input, acceptorChecks) => {
const params = {
...waiterServiceDefaults,
...options
};
validateWaiterOptions(params);
const exitConditions = [runPolling(params, input, acceptorChecks)];
- if (options.abortController) {
- exitConditions.push(abortTimeout(options.abortController.signal));
- }
+ const finalize = [];
if (options.abortSignal) {
- exitConditions.push(abortTimeout(options.abortSignal));
+ const { aborted, clearListener } = abortTimeout(options.abortSignal);
+ finalize.push(clearListener);
+ exitConditions.push(aborted);
}
- return Promise.race(exitConditions);
- }, "createWaiter");
+ if (options.abortController?.signal) {
+ const { aborted, clearListener } = abortTimeout(options.abortController.signal);
+ finalize.push(clearListener);
+ exitConditions.push(aborted);
+ }
+ return Promise.race(exitConditions).then((result) => {
+ for (const fn of finalize) {
+ fn();
+ }
+ return result;
+ });
+ };
+ exports.checkExceptions = checkExceptions;
+ exports.createWaiter = createWaiter;
+ exports.waiterServiceDefaults = waiterServiceDefaults;
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var require_dist_cjs69 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
+var require_dist_cjs73 = __commonJS((exports, module) => {
var __defProp2 = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames2 = Object.getOwnPropertyNames;
@@ -23553,8 +27058,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
- var src_exports = {};
- __export2(src_exports, {
+ var index_exports = {};
+ __export2(index_exports, {
AbortMultipartUploadCommand: () => AbortMultipartUploadCommand,
AnalyticsFilter: () => AnalyticsFilter,
AnalyticsS3ExportFileFormat: () => AnalyticsS3ExportFileFormat,
@@ -23569,6 +27074,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
BucketVersioningStatus: () => BucketVersioningStatus,
ChecksumAlgorithm: () => ChecksumAlgorithm,
ChecksumMode: () => ChecksumMode,
+ ChecksumType: () => ChecksumType,
CompleteMultipartUploadCommand: () => CompleteMultipartUploadCommand,
CompleteMultipartUploadOutputFilterSensitiveLog: () => CompleteMultipartUploadOutputFilterSensitiveLog,
CompleteMultipartUploadRequestFilterSensitiveLog: () => CompleteMultipartUploadRequestFilterSensitiveLog,
@@ -23577,11 +27083,14 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
CopyObjectOutputFilterSensitiveLog: () => CopyObjectOutputFilterSensitiveLog,
CopyObjectRequestFilterSensitiveLog: () => CopyObjectRequestFilterSensitiveLog,
CreateBucketCommand: () => CreateBucketCommand,
+ CreateBucketMetadataConfigurationCommand: () => CreateBucketMetadataConfigurationCommand,
+ CreateBucketMetadataTableConfigurationCommand: () => CreateBucketMetadataTableConfigurationCommand,
CreateMultipartUploadCommand: () => CreateMultipartUploadCommand,
CreateMultipartUploadOutputFilterSensitiveLog: () => CreateMultipartUploadOutputFilterSensitiveLog,
CreateMultipartUploadRequestFilterSensitiveLog: () => CreateMultipartUploadRequestFilterSensitiveLog,
CreateSessionCommand: () => CreateSessionCommand,
CreateSessionOutputFilterSensitiveLog: () => CreateSessionOutputFilterSensitiveLog,
+ CreateSessionRequestFilterSensitiveLog: () => CreateSessionRequestFilterSensitiveLog,
DataRedundancy: () => DataRedundancy,
DeleteBucketAnalyticsConfigurationCommand: () => DeleteBucketAnalyticsConfigurationCommand,
DeleteBucketCommand: () => DeleteBucketCommand,
@@ -23590,6 +27099,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
DeleteBucketIntelligentTieringConfigurationCommand: () => DeleteBucketIntelligentTieringConfigurationCommand,
DeleteBucketInventoryConfigurationCommand: () => DeleteBucketInventoryConfigurationCommand,
DeleteBucketLifecycleCommand: () => DeleteBucketLifecycleCommand,
+ DeleteBucketMetadataConfigurationCommand: () => DeleteBucketMetadataConfigurationCommand,
+ DeleteBucketMetadataTableConfigurationCommand: () => DeleteBucketMetadataTableConfigurationCommand,
DeleteBucketMetricsConfigurationCommand: () => DeleteBucketMetricsConfigurationCommand,
DeleteBucketOwnershipControlsCommand: () => DeleteBucketOwnershipControlsCommand,
DeleteBucketPolicyCommand: () => DeleteBucketPolicyCommand,
@@ -23603,8 +27114,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
DeletePublicAccessBlockCommand: () => DeletePublicAccessBlockCommand,
EncodingType: () => EncodingType,
EncryptionFilterSensitiveLog: () => EncryptionFilterSensitiveLog,
+ EncryptionTypeMismatch: () => EncryptionTypeMismatch,
Event: () => Event,
ExistingObjectReplicationStatus: () => ExistingObjectReplicationStatus,
+ ExpirationState: () => ExpirationState,
ExpirationStatus: () => ExpirationStatus,
ExpressionType: () => ExpressionType,
FileHeaderInfo: () => FileHeaderInfo,
@@ -23621,6 +27134,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
GetBucketLifecycleConfigurationCommand: () => GetBucketLifecycleConfigurationCommand,
GetBucketLocationCommand: () => GetBucketLocationCommand,
GetBucketLoggingCommand: () => GetBucketLoggingCommand,
+ GetBucketMetadataConfigurationCommand: () => GetBucketMetadataConfigurationCommand,
+ GetBucketMetadataTableConfigurationCommand: () => GetBucketMetadataTableConfigurationCommand,
GetBucketMetricsConfigurationCommand: () => GetBucketMetricsConfigurationCommand,
GetBucketNotificationConfigurationCommand: () => GetBucketNotificationConfigurationCommand,
GetBucketOwnershipControlsCommand: () => GetBucketOwnershipControlsCommand,
@@ -23648,10 +27163,14 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
HeadObjectCommand: () => HeadObjectCommand,
HeadObjectOutputFilterSensitiveLog: () => HeadObjectOutputFilterSensitiveLog,
HeadObjectRequestFilterSensitiveLog: () => HeadObjectRequestFilterSensitiveLog,
+ IdempotencyParameterMismatch: () => IdempotencyParameterMismatch,
IntelligentTieringAccessTier: () => IntelligentTieringAccessTier,
IntelligentTieringStatus: () => IntelligentTieringStatus,
InvalidObjectState: () => InvalidObjectState,
+ InvalidRequest: () => InvalidRequest,
+ InvalidWriteOffset: () => InvalidWriteOffset,
InventoryConfigurationFilterSensitiveLog: () => InventoryConfigurationFilterSensitiveLog,
+ InventoryConfigurationState: () => InventoryConfigurationState,
InventoryDestinationFilterSensitiveLog: () => InventoryDestinationFilterSensitiveLog,
InventoryEncryptionFilterSensitiveLog: () => InventoryEncryptionFilterSensitiveLog,
InventoryFormat: () => InventoryFormat,
@@ -23660,7 +27179,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
InventoryOptionalField: () => InventoryOptionalField,
InventoryS3BucketDestinationFilterSensitiveLog: () => InventoryS3BucketDestinationFilterSensitiveLog,
JSONType: () => JSONType,
- LifecycleRuleFilter: () => LifecycleRuleFilter,
ListBucketAnalyticsConfigurationsCommand: () => ListBucketAnalyticsConfigurationsCommand,
ListBucketIntelligentTieringConfigurationsCommand: () => ListBucketIntelligentTieringConfigurationsCommand,
ListBucketInventoryConfigurationsCommand: () => ListBucketInventoryConfigurationsCommand,
@@ -23732,8 +27250,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
PutObjectTaggingCommand: () => PutObjectTaggingCommand,
PutPublicAccessBlockCommand: () => PutPublicAccessBlockCommand,
QuoteFields: () => QuoteFields,
+ RenameObjectCommand: () => RenameObjectCommand,
ReplicaModificationsStatus: () => ReplicaModificationsStatus,
- ReplicationRuleFilter: () => ReplicationRuleFilter,
ReplicationRuleStatus: () => ReplicationRuleStatus,
ReplicationStatus: () => ReplicationStatus,
ReplicationTimeStatus: () => ReplicationTimeStatus,
@@ -23747,6 +27265,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
S3Client: () => S3Client,
S3LocationFilterSensitiveLog: () => S3LocationFilterSensitiveLog,
S3ServiceException: () => S3ServiceException,
+ S3TablesBucketType: () => S3TablesBucketType,
SSEKMSFilterSensitiveLog: () => SSEKMSFilterSensitiveLog,
SelectObjectContentCommand: () => SelectObjectContentCommand,
SelectObjectContentEventStream: () => SelectObjectContentEventStream,
@@ -23762,10 +27281,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
SseKmsEncryptedObjectsStatus: () => SseKmsEncryptedObjectsStatus,
StorageClass: () => StorageClass,
StorageClassAnalysisSchemaVersion: () => StorageClassAnalysisSchemaVersion,
+ TableSseAlgorithm: () => TableSseAlgorithm,
TaggingDirective: () => TaggingDirective,
Tier: () => Tier,
+ TooManyParts: () => TooManyParts,
+ TransitionDefaultMinimumObjectSize: () => TransitionDefaultMinimumObjectSize,
TransitionStorageClass: () => TransitionStorageClass,
Type: () => Type,
+ UpdateBucketMetadataInventoryTableConfigurationCommand: () => UpdateBucketMetadataInventoryTableConfigurationCommand,
+ UpdateBucketMetadataJournalTableConfigurationCommand: () => UpdateBucketMetadataJournalTableConfigurationCommand,
UploadPartCommand: () => UploadPartCommand,
UploadPartCopyCommand: () => UploadPartCopyCommand,
UploadPartCopyOutputFilterSensitiveLog: () => UploadPartCopyOutputFilterSensitiveLog,
@@ -23775,6 +27299,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
WriteGetObjectResponseCommand: () => WriteGetObjectResponseCommand,
WriteGetObjectResponseRequestFilterSensitiveLog: () => WriteGetObjectResponseRequestFilterSensitiveLog,
__Client: () => import_smithy_client.Client,
+ paginateListBuckets: () => paginateListBuckets,
paginateListDirectoryBuckets: () => paginateListDirectoryBuckets,
paginateListObjectsV2: () => paginateListObjectsV2,
paginateListParts: () => paginateListParts,
@@ -23787,24 +27312,25 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
waitUntilObjectExists: () => waitUntilObjectExists,
waitUntilObjectNotExists: () => waitUntilObjectNotExists
});
- module.exports = __toCommonJS(src_exports);
+ module.exports = __toCommonJS(index_exports);
var import_middleware_expect_continue = require_dist_cjs3();
- var import_middleware_host_header = require_dist_cjs4();
- var import_middleware_logger = require_dist_cjs5();
- var import_middleware_recursion_detection = require_dist_cjs6();
- var import_middleware_sdk_s3 = require_dist_cjs24();
- var import_middleware_signing = require_dist_cjs26();
- var import_middleware_user_agent = require_dist_cjs29();
- var import_config_resolver = require_dist_cjs30();
- var import_eventstream_serde_config_resolver = require_dist_cjs31();
- var import_middleware_content_length = require_dist_cjs32();
- var import_middleware_retry = require_dist_cjs35();
- var import_middleware_endpoint = require_dist_cjs41();
- var import_middleware_serde = require_dist_cjs40();
- var import_types = require_dist_cjs();
+ var import_middleware_flexible_checksums = require_dist_cjs28();
+ var import_middleware_host_header = require_dist_cjs29();
+ var import_middleware_logger = require_dist_cjs30();
+ var import_middleware_recursion_detection = require_dist_cjs31();
+ var import_middleware_sdk_s32 = require_dist_cjs34();
+ var import_middleware_user_agent = require_dist_cjs39();
+ var import_config_resolver = require_dist_cjs40();
+ var import_core3 = require_dist_cjs17();
+ var import_eventstream_serde_config_resolver = require_dist_cjs41();
+ var import_middleware_content_length = require_dist_cjs42();
+ var import_middleware_retry = require_dist_cjs45();
+ var import_httpAuthSchemeProvider = require_httpAuthSchemeProvider();
+ var import_middleware_sdk_s3 = require_dist_cjs34();
+ var import_middleware_endpoint = require_dist_cjs49();
+ var import_middleware_serde = require_dist_cjs5();
var resolveClientEndpointParameters = __name((options) => {
- return {
- ...options,
+ return Object.assign(options, {
useFipsEndpoint: options.useFipsEndpoint ?? false,
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
forcePathStyle: options.forcePathStyle ?? false,
@@ -23812,7 +27338,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false,
defaultSigningName: "s3"
- };
+ });
}, "resolveClientEndpointParameters");
var commonParams = {
ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" },
@@ -23826,35 +27352,37 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
};
- var import_smithy_client = require_dist_cjs16();
- var _S3ServiceException = class _S3ServiceException2 extends import_smithy_client.ServiceException {
+ var import_smithy_client = require_dist_cjs22();
+ var S3ServiceException = class _S3ServiceException extends import_smithy_client.ServiceException {
+ static {
+ __name(this, "S3ServiceException");
+ }
constructor(options) {
super(options);
- Object.setPrototypeOf(this, _S3ServiceException2.prototype);
+ Object.setPrototypeOf(this, _S3ServiceException.prototype);
}
};
- __name(_S3ServiceException, "S3ServiceException");
- var S3ServiceException = _S3ServiceException;
var RequestCharged = {
requester: "requester"
};
var RequestPayer = {
requester: "requester"
};
- var _NoSuchUpload = class _NoSuchUpload2 extends S3ServiceException {
+ var NoSuchUpload = class _NoSuchUpload extends S3ServiceException {
+ static {
+ __name(this, "NoSuchUpload");
+ }
+ name = "NoSuchUpload";
+ $fault = "client";
constructor(opts) {
super({
name: "NoSuchUpload",
$fault: "client",
...opts
});
- this.name = "NoSuchUpload";
- this.$fault = "client";
- Object.setPrototypeOf(this, _NoSuchUpload2.prototype);
+ Object.setPrototypeOf(this, _NoSuchUpload.prototype);
}
};
- __name(_NoSuchUpload, "NoSuchUpload");
- var NoSuchUpload = _NoSuchUpload;
var BucketAccelerateStatus = {
Enabled: "Enabled",
Suspended: "Suspended"
@@ -23874,8 +27402,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var OwnerOverride = {
Destination: "Destination"
};
+ var ChecksumType = {
+ COMPOSITE: "COMPOSITE",
+ FULL_OBJECT: "FULL_OBJECT"
+ };
var ServerSideEncryption = {
AES256: "AES256",
+ aws_fsx: "aws:fsx",
aws_kms: "aws:kms",
aws_kms_dsse: "aws:kms:dsse"
};
@@ -23891,6 +27424,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var ChecksumAlgorithm = {
CRC32: "CRC32",
CRC32C: "CRC32C",
+ CRC64NVME: "CRC64NVME",
SHA1: "SHA1",
SHA256: "SHA256"
};
@@ -23909,6 +27443,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var StorageClass = {
DEEP_ARCHIVE: "DEEP_ARCHIVE",
EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
+ FSX_OPENZFS: "FSX_OPENZFS",
GLACIER: "GLACIER",
GLACIER_IR: "GLACIER_IR",
INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
@@ -23923,48 +27458,51 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
COPY: "COPY",
REPLACE: "REPLACE"
};
- var _ObjectNotInActiveTierError = class _ObjectNotInActiveTierError2 extends S3ServiceException {
+ var ObjectNotInActiveTierError = class _ObjectNotInActiveTierError extends S3ServiceException {
+ static {
+ __name(this, "ObjectNotInActiveTierError");
+ }
+ name = "ObjectNotInActiveTierError";
+ $fault = "client";
constructor(opts) {
super({
name: "ObjectNotInActiveTierError",
$fault: "client",
...opts
});
- this.name = "ObjectNotInActiveTierError";
- this.$fault = "client";
- Object.setPrototypeOf(this, _ObjectNotInActiveTierError2.prototype);
+ Object.setPrototypeOf(this, _ObjectNotInActiveTierError.prototype);
}
};
- __name(_ObjectNotInActiveTierError, "ObjectNotInActiveTierError");
- var ObjectNotInActiveTierError = _ObjectNotInActiveTierError;
- var _BucketAlreadyExists = class _BucketAlreadyExists2 extends S3ServiceException {
+ var BucketAlreadyExists = class _BucketAlreadyExists extends S3ServiceException {
+ static {
+ __name(this, "BucketAlreadyExists");
+ }
+ name = "BucketAlreadyExists";
+ $fault = "client";
constructor(opts) {
super({
name: "BucketAlreadyExists",
$fault: "client",
...opts
});
- this.name = "BucketAlreadyExists";
- this.$fault = "client";
- Object.setPrototypeOf(this, _BucketAlreadyExists2.prototype);
+ Object.setPrototypeOf(this, _BucketAlreadyExists.prototype);
}
};
- __name(_BucketAlreadyExists, "BucketAlreadyExists");
- var BucketAlreadyExists = _BucketAlreadyExists;
- var _BucketAlreadyOwnedByYou = class _BucketAlreadyOwnedByYou2 extends S3ServiceException {
+ var BucketAlreadyOwnedByYou = class _BucketAlreadyOwnedByYou extends S3ServiceException {
+ static {
+ __name(this, "BucketAlreadyOwnedByYou");
+ }
+ name = "BucketAlreadyOwnedByYou";
+ $fault = "client";
constructor(opts) {
super({
name: "BucketAlreadyOwnedByYou",
$fault: "client",
...opts
});
- this.name = "BucketAlreadyOwnedByYou";
- this.$fault = "client";
- Object.setPrototypeOf(this, _BucketAlreadyOwnedByYou2.prototype);
+ Object.setPrototypeOf(this, _BucketAlreadyOwnedByYou.prototype);
}
};
- __name(_BucketAlreadyOwnedByYou, "BucketAlreadyOwnedByYou");
- var BucketAlreadyOwnedByYou = _BucketAlreadyOwnedByYou;
var BucketCannedACL = {
authenticated_read: "authenticated-read",
private: "private",
@@ -23972,13 +27510,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
public_read_write: "public-read-write"
};
var DataRedundancy = {
- SingleAvailabilityZone: "SingleAvailabilityZone"
+ SingleAvailabilityZone: "SingleAvailabilityZone",
+ SingleLocalZone: "SingleLocalZone"
};
var BucketType = {
Directory: "Directory"
};
var LocationType = {
- AvailabilityZone: "AvailabilityZone"
+ AvailabilityZone: "AvailabilityZone",
+ LocalZone: "LocalZone"
};
var BucketLocationConstraint = {
EU: "EU",
@@ -23992,16 +27532,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
ap_southeast_1: "ap-southeast-1",
ap_southeast_2: "ap-southeast-2",
ap_southeast_3: "ap-southeast-3",
+ ap_southeast_4: "ap-southeast-4",
+ ap_southeast_5: "ap-southeast-5",
ca_central_1: "ca-central-1",
cn_north_1: "cn-north-1",
cn_northwest_1: "cn-northwest-1",
eu_central_1: "eu-central-1",
+ eu_central_2: "eu-central-2",
eu_north_1: "eu-north-1",
eu_south_1: "eu-south-1",
eu_south_2: "eu-south-2",
eu_west_1: "eu-west-1",
eu_west_2: "eu-west-2",
eu_west_3: "eu-west-3",
+ il_central_1: "il-central-1",
+ me_central_1: "me-central-1",
me_south_1: "me-south-1",
sa_east_1: "sa-east-1",
us_east_2: "us-east-2",
@@ -24015,24 +27560,37 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
BucketOwnerPreferred: "BucketOwnerPreferred",
ObjectWriter: "ObjectWriter"
};
+ var InventoryConfigurationState = {
+ DISABLED: "DISABLED",
+ ENABLED: "ENABLED"
+ };
+ var TableSseAlgorithm = {
+ AES256: "AES256",
+ aws_kms: "aws:kms"
+ };
+ var ExpirationState = {
+ DISABLED: "DISABLED",
+ ENABLED: "ENABLED"
+ };
var SessionMode = {
ReadOnly: "ReadOnly",
ReadWrite: "ReadWrite"
};
- var _NoSuchBucket = class _NoSuchBucket2 extends S3ServiceException {
+ var NoSuchBucket = class _NoSuchBucket extends S3ServiceException {
+ static {
+ __name(this, "NoSuchBucket");
+ }
+ name = "NoSuchBucket";
+ $fault = "client";
constructor(opts) {
super({
name: "NoSuchBucket",
$fault: "client",
...opts
});
- this.name = "NoSuchBucket";
- this.$fault = "client";
- Object.setPrototypeOf(this, _NoSuchBucket2.prototype);
+ Object.setPrototypeOf(this, _NoSuchBucket.prototype);
}
};
- __name(_NoSuchBucket, "NoSuchBucket");
- var NoSuchBucket = _NoSuchBucket;
var AnalyticsFilter;
((AnalyticsFilter2) => {
AnalyticsFilter2.visit = __name((value, visitor) => {
@@ -24089,22 +27647,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
Daily: "Daily",
Weekly: "Weekly"
};
- var LifecycleRuleFilter;
- ((LifecycleRuleFilter2) => {
- LifecycleRuleFilter2.visit = __name((value, visitor) => {
- if (value.Prefix !== undefined)
- return visitor.Prefix(value.Prefix);
- if (value.Tag !== undefined)
- return visitor.Tag(value.Tag);
- if (value.ObjectSizeGreaterThan !== undefined)
- return visitor.ObjectSizeGreaterThan(value.ObjectSizeGreaterThan);
- if (value.ObjectSizeLessThan !== undefined)
- return visitor.ObjectSizeLessThan(value.ObjectSizeLessThan);
- if (value.And !== undefined)
- return visitor.And(value.And);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }, "visit");
- })(LifecycleRuleFilter || (LifecycleRuleFilter = {}));
var TransitionStorageClass = {
DEEP_ARCHIVE: "DEEP_ARCHIVE",
GLACIER: "GLACIER",
@@ -24117,6 +27659,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
Disabled: "Disabled",
Enabled: "Enabled"
};
+ var TransitionDefaultMinimumObjectSize = {
+ all_storage_classes_128K: "all_storage_classes_128K",
+ varies_by_storage_class: "varies_by_storage_class"
+ };
var BucketLogsPermission = {
FULL_CONTROL: "FULL_CONTROL",
READ: "READ",
@@ -24126,6 +27672,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
DeliveryTime: "DeliveryTime",
EventTime: "EventTime"
};
+ var S3TablesBucketType = {
+ aws: "aws",
+ customer: "customer"
+ };
var MetricsFilter;
((MetricsFilter2) => {
MetricsFilter2.visit = __name((value, visitor) => {
@@ -24189,18 +27739,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
Disabled: "Disabled",
Enabled: "Enabled"
};
- var ReplicationRuleFilter;
- ((ReplicationRuleFilter2) => {
- ReplicationRuleFilter2.visit = __name((value, visitor) => {
- if (value.Prefix !== undefined)
- return visitor.Prefix(value.Prefix);
- if (value.Tag !== undefined)
- return visitor.Tag(value.Tag);
- if (value.And !== undefined)
- return visitor.And(value.And);
- return visitor._(value.$unknown[0], value.$unknown[1]);
- }, "visit");
- })(ReplicationRuleFilter || (ReplicationRuleFilter = {}));
var ReplicaModificationsStatus = {
Disabled: "Disabled",
Enabled: "Enabled"
@@ -24239,36 +27777,40 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var ChecksumMode = {
ENABLED: "ENABLED"
};
- var _InvalidObjectState = class _InvalidObjectState2 extends S3ServiceException {
+ var InvalidObjectState = class _InvalidObjectState extends S3ServiceException {
+ static {
+ __name(this, "InvalidObjectState");
+ }
+ name = "InvalidObjectState";
+ $fault = "client";
+ StorageClass;
+ AccessTier;
constructor(opts) {
super({
name: "InvalidObjectState",
$fault: "client",
...opts
});
- this.name = "InvalidObjectState";
- this.$fault = "client";
- Object.setPrototypeOf(this, _InvalidObjectState2.prototype);
+ Object.setPrototypeOf(this, _InvalidObjectState.prototype);
this.StorageClass = opts.StorageClass;
this.AccessTier = opts.AccessTier;
}
};
- __name(_InvalidObjectState, "InvalidObjectState");
- var InvalidObjectState = _InvalidObjectState;
- var _NoSuchKey = class _NoSuchKey2 extends S3ServiceException {
+ var NoSuchKey = class _NoSuchKey extends S3ServiceException {
+ static {
+ __name(this, "NoSuchKey");
+ }
+ name = "NoSuchKey";
+ $fault = "client";
constructor(opts) {
super({
name: "NoSuchKey",
$fault: "client",
...opts
});
- this.name = "NoSuchKey";
- this.$fault = "client";
- Object.setPrototypeOf(this, _NoSuchKey2.prototype);
+ Object.setPrototypeOf(this, _NoSuchKey.prototype);
}
};
- __name(_NoSuchKey, "NoSuchKey");
- var NoSuchKey = _NoSuchKey;
var ObjectAttributes = {
CHECKSUM: "Checksum",
ETAG: "ETag",
@@ -24283,20 +27825,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
COMPLIANCE: "COMPLIANCE",
GOVERNANCE: "GOVERNANCE"
};
- var _NotFound = class _NotFound2 extends S3ServiceException {
+ var NotFound = class _NotFound extends S3ServiceException {
+ static {
+ __name(this, "NotFound");
+ }
+ name = "NotFound";
+ $fault = "client";
constructor(opts) {
super({
name: "NotFound",
$fault: "client",
...opts
});
- this.name = "NotFound";
- this.$fault = "client";
- Object.setPrototypeOf(this, _NotFound2.prototype);
+ Object.setPrototypeOf(this, _NotFound.prototype);
}
};
- __name(_NotFound, "NotFound");
- var NotFound = _NotFound;
var ArchiveStatus = {
ARCHIVE_ACCESS: "ARCHIVE_ACCESS",
DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS"
@@ -24304,25 +27847,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var EncodingType = {
url: "url"
};
- var ObjectStorageClass = {
- DEEP_ARCHIVE: "DEEP_ARCHIVE",
- EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
- GLACIER: "GLACIER",
- GLACIER_IR: "GLACIER_IR",
- INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
- ONEZONE_IA: "ONEZONE_IA",
- OUTPOSTS: "OUTPOSTS",
- REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
- SNOW: "SNOW",
- STANDARD: "STANDARD",
- STANDARD_IA: "STANDARD_IA"
- };
- var OptionalObjectAttributes = {
- RESTORE_STATUS: "RestoreStatus"
- };
- var ObjectVersionStorageClass = {
- STANDARD: "STANDARD"
- };
var CompleteMultipartUploadOutputFilterSensitiveLog = __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
@@ -24361,8 +27885,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}), "SessionCredentialsFilterSensitiveLog");
var CreateSessionOutputFilterSensitiveLog = __name((obj) => ({
...obj,
+ ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
+ ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING },
...obj.Credentials && { Credentials: SessionCredentialsFilterSensitiveLog(obj.Credentials) }
}), "CreateSessionOutputFilterSensitiveLog");
+ var CreateSessionRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
+ ...obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: import_smithy_client.SENSITIVE_STRING }
+ }), "CreateSessionRequestFilterSensitiveLog");
var ServerSideEncryptionByDefaultFilterSensitiveLog = __name((obj) => ({
...obj,
...obj.KMSMasterKeyID && { KMSMasterKeyID: import_smithy_client.SENSITIVE_STRING }
@@ -24440,44 +27971,125 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
InventoryConfigurationList: obj.InventoryConfigurationList.map((item) => InventoryConfigurationFilterSensitiveLog(item))
}
}), "ListBucketInventoryConfigurationsOutputFilterSensitiveLog");
- var ListPartsRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
- }), "ListPartsRequestFilterSensitiveLog");
- var PutBucketEncryptionRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.ServerSideEncryptionConfiguration && {
- ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog(obj.ServerSideEncryptionConfiguration)
- }
- }), "PutBucketEncryptionRequestFilterSensitiveLog");
- var PutBucketInventoryConfigurationRequestFilterSensitiveLog = __name((obj) => ({
- ...obj,
- ...obj.InventoryConfiguration && {
- InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration)
- }
- }), "PutBucketInventoryConfigurationRequestFilterSensitiveLog");
- var import_xml_builder = require_dist_cjs42();
- var import_core = require_dist_cjs43();
+ var import_core = require_dist_cjs24();
+ var import_xml_builder = require_dist_cjs23();
+ var import_core2 = require_dist_cjs17();
var import_protocol_http = require_dist_cjs2();
- var import_fast_xml_parser = require_fxp();
+ var import_uuid = require_dist_cjs16();
+ var ObjectStorageClass = {
+ DEEP_ARCHIVE: "DEEP_ARCHIVE",
+ EXPRESS_ONEZONE: "EXPRESS_ONEZONE",
+ FSX_OPENZFS: "FSX_OPENZFS",
+ GLACIER: "GLACIER",
+ GLACIER_IR: "GLACIER_IR",
+ INTELLIGENT_TIERING: "INTELLIGENT_TIERING",
+ ONEZONE_IA: "ONEZONE_IA",
+ OUTPOSTS: "OUTPOSTS",
+ REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY",
+ SNOW: "SNOW",
+ STANDARD: "STANDARD",
+ STANDARD_IA: "STANDARD_IA"
+ };
+ var OptionalObjectAttributes = {
+ RESTORE_STATUS: "RestoreStatus"
+ };
+ var ObjectVersionStorageClass = {
+ STANDARD: "STANDARD"
+ };
var MFADelete = {
Disabled: "Disabled",
Enabled: "Enabled"
};
- var _ObjectAlreadyInActiveTierError = class _ObjectAlreadyInActiveTierError2 extends S3ServiceException {
+ var EncryptionTypeMismatch = class _EncryptionTypeMismatch extends S3ServiceException {
+ static {
+ __name(this, "EncryptionTypeMismatch");
+ }
+ name = "EncryptionTypeMismatch";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "EncryptionTypeMismatch",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _EncryptionTypeMismatch.prototype);
+ }
+ };
+ var InvalidRequest = class _InvalidRequest extends S3ServiceException {
+ static {
+ __name(this, "InvalidRequest");
+ }
+ name = "InvalidRequest";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "InvalidRequest",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InvalidRequest.prototype);
+ }
+ };
+ var InvalidWriteOffset = class _InvalidWriteOffset extends S3ServiceException {
+ static {
+ __name(this, "InvalidWriteOffset");
+ }
+ name = "InvalidWriteOffset";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "InvalidWriteOffset",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _InvalidWriteOffset.prototype);
+ }
+ };
+ var TooManyParts = class _TooManyParts extends S3ServiceException {
+ static {
+ __name(this, "TooManyParts");
+ }
+ name = "TooManyParts";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "TooManyParts",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _TooManyParts.prototype);
+ }
+ };
+ var IdempotencyParameterMismatch = class _IdempotencyParameterMismatch extends S3ServiceException {
+ static {
+ __name(this, "IdempotencyParameterMismatch");
+ }
+ name = "IdempotencyParameterMismatch";
+ $fault = "client";
+ constructor(opts) {
+ super({
+ name: "IdempotencyParameterMismatch",
+ $fault: "client",
+ ...opts
+ });
+ Object.setPrototypeOf(this, _IdempotencyParameterMismatch.prototype);
+ }
+ };
+ var ObjectAlreadyInActiveTierError = class _ObjectAlreadyInActiveTierError extends S3ServiceException {
+ static {
+ __name(this, "ObjectAlreadyInActiveTierError");
+ }
+ name = "ObjectAlreadyInActiveTierError";
+ $fault = "client";
constructor(opts) {
super({
name: "ObjectAlreadyInActiveTierError",
$fault: "client",
...opts
});
- this.name = "ObjectAlreadyInActiveTierError";
- this.$fault = "client";
- Object.setPrototypeOf(this, _ObjectAlreadyInActiveTierError2.prototype);
+ Object.setPrototypeOf(this, _ObjectAlreadyInActiveTierError.prototype);
}
};
- __name(_ObjectAlreadyInActiveTierError, "ObjectAlreadyInActiveTierError");
- var ObjectAlreadyInActiveTierError = _ObjectAlreadyInActiveTierError;
var Tier = {
Bulk: "Bulk",
Expedited: "Expedited",
@@ -24523,6 +28135,22 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return visitor._(value.$unknown[0], value.$unknown[1]);
}, "visit");
})(SelectObjectContentEventStream || (SelectObjectContentEventStream = {}));
+ var ListPartsRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.SSECustomerKey && { SSECustomerKey: import_smithy_client.SENSITIVE_STRING }
+ }), "ListPartsRequestFilterSensitiveLog");
+ var PutBucketEncryptionRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.ServerSideEncryptionConfiguration && {
+ ServerSideEncryptionConfiguration: ServerSideEncryptionConfigurationFilterSensitiveLog(obj.ServerSideEncryptionConfiguration)
+ }
+ }), "PutBucketEncryptionRequestFilterSensitiveLog");
+ var PutBucketInventoryConfigurationRequestFilterSensitiveLog = __name((obj) => ({
+ ...obj,
+ ...obj.InventoryConfiguration && {
+ InventoryConfiguration: InventoryConfigurationFilterSensitiveLog(obj.InventoryConfiguration)
+ }
+ }), "PutBucketInventoryConfigurationRequestFilterSensitiveLog");
var PutObjectOutputFilterSensitiveLog = __name((obj) => ({
...obj,
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING },
@@ -24598,10 +28226,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
...obj.SSEKMSKeyId && { SSEKMSKeyId: import_smithy_client.SENSITIVE_STRING }
}), "WriteGetObjectResponseRequestFilterSensitiveLog");
var se_AbortMultipartUploadCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
- [_xaebo]: input[_EBO]
+ [_xaebo]: input[_EBO],
+ [_xaimit]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMIT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMIT]).toString()]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -24615,15 +28244,20 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_AbortMultipartUploadCommand");
var se_CompleteMultipartUploadCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
+ [_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
+ [_xact]: input[_CT],
+ [_xamos]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MOS]), () => input[_MOS].toString()],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
+ [_im]: input[_IM],
+ [_inm]: input[_INM],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD]
@@ -24632,7 +28266,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
- [_xi]: [, "CompleteMultipartUpload"],
[_uI]: [, (0, import_smithy_client.expectNonNull)(input[_UI], `UploadId`)]
});
let body;
@@ -24648,21 +28281,25 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_CompleteMultipartUploadCommand");
var se_CopyObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
+ acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
+ return acc;
+ }, {}),
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_xaca]: input[_CA],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
- [_ct]: input[_CT],
+ [_ct]: input[_CTo],
[_xacs__]: input[_CS],
[_xacsim]: input[_CSIM],
- [_xacsims]: [() => isSerializableHeaderValue(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
+ [_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
[_xacsinm]: input[_CSINM],
- [_xacsius]: [() => isSerializableHeaderValue(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
- [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
+ [_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
+ [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
@@ -24677,24 +28314,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
- [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()],
+ [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xacssseca]: input[_CSSSECA],
[_xacssseck]: input[_CSSSECK],
[_xacssseckm]: input[_CSSSECKMD],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
- [_xaolrud]: [
- () => isSerializableHeaderValue(input[_OLRUD]),
- () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString()
- ],
+ [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
[_xaebo]: input[_EBO],
- [_xasebo]: input[_ESBO],
- ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
- acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
- return acc;
- }, {})
+ [_xasebo]: input[_ESBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -24707,8 +28337,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_CopyObjectCommand");
var se_CreateBucketCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_xagfc]: input[_GFC],
@@ -24716,7 +28346,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xagra]: input[_GRACP],
[_xagw]: input[_GW],
[_xagwa]: input[_GWACP],
- [_xabole]: [() => isSerializableHeaderValue(input[_OLEFB]), () => input[_OLEFB].toString()],
+ [_xabole]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLEFB]), () => input[_OLEFB].toString()],
[_xaoo]: input[_OO]
});
b.bp("/");
@@ -24732,16 +28362,68 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.m("PUT").h(headers).b(body);
return b.build();
}, "se_CreateBucketCommand");
+ var se_CreateBucketMetadataConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ "content-type": "application/xml",
+ [_cm]: input[_CMD],
+ [_xasca]: input[_CA],
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mC]: [, ""]
+ });
+ let body;
+ let contents;
+ if (input.MetadataConfiguration !== undefined) {
+ contents = se_MetadataConfiguration(input.MetadataConfiguration, context);
+ body = _ve;
+ contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
+ body += contents.toString();
+ }
+ b.m("POST").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_CreateBucketMetadataConfigurationCommand");
+ var se_CreateBucketMetadataTableConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ "content-type": "application/xml",
+ [_cm]: input[_CMD],
+ [_xasca]: input[_CA],
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mT]: [, ""]
+ });
+ let body;
+ let contents;
+ if (input.MetadataTableConfiguration !== undefined) {
+ contents = se_MetadataTableConfiguration(input.MetadataTableConfiguration, context);
+ body = _ve;
+ contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
+ body += contents.toString();
+ }
+ b.m("POST").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_CreateBucketMetadataTableConfigurationCommand");
var se_CreateMultipartUploadCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
+ acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
+ return acc;
+ }, {}),
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
- [_ct]: input[_CT],
- [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
+ [_ct]: input[_CTo],
+ [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
@@ -24754,37 +28436,34 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
- [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()],
+ [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
- [_xaolrud]: [
- () => isSerializableHeaderValue(input[_OLRUD]),
- () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString()
- ],
+ [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
[_xaebo]: input[_EBO],
[_xaca]: input[_CA],
- ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
- acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
- return acc;
- }, {})
+ [_xact]: input[_CT]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
- [_u]: [, ""],
- [_xi]: [, "CreateMultipartUpload"]
+ [_u]: [, ""]
});
let body;
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_CreateMultipartUploadCommand");
var se_CreateSessionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xacsm]: input[_SM]
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xacsm]: input[_SM],
+ [_xasse]: input[_SSE],
+ [_xasseakki]: input[_SSEKMSKI],
+ [_xassec]: input[_SSEKMSEC],
+ [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -24796,8 +28475,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_CreateSessionCommand");
var se_DeleteBucketCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24807,8 +28486,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketCommand");
var se_DeleteBucketAnalyticsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24822,8 +28501,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketAnalyticsConfigurationCommand");
var se_DeleteBucketCorsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24836,8 +28515,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketCorsCommand");
var se_DeleteBucketEncryptionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24850,8 +28529,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketEncryptionCommand");
var se_DeleteBucketIntelligentTieringConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = {};
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
@@ -24863,8 +28544,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketIntelligentTieringConfigurationCommand");
var se_DeleteBucketInventoryConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24878,8 +28559,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketInventoryConfigurationCommand");
var se_DeleteBucketLifecycleCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24891,9 +28572,37 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.m("DELETE").h(headers).q(query).b(body);
return b.build();
}, "se_DeleteBucketLifecycleCommand");
+ var se_DeleteBucketMetadataConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mC]: [, ""]
+ });
+ let body;
+ b.m("DELETE").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_DeleteBucketMetadataConfigurationCommand");
+ var se_DeleteBucketMetadataTableConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mT]: [, ""]
+ });
+ let body;
+ b.m("DELETE").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_DeleteBucketMetadataTableConfigurationCommand");
var se_DeleteBucketMetricsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24907,8 +28616,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketMetricsConfigurationCommand");
var se_DeleteBucketOwnershipControlsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24921,8 +28630,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketOwnershipControlsCommand");
var se_DeleteBucketPolicyCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24935,8 +28644,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketPolicyCommand");
var se_DeleteBucketReplicationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24949,8 +28658,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketReplicationCommand");
var se_DeleteBucketTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24963,8 +28672,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketTaggingCommand");
var se_DeleteBucketWebsiteCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -24977,12 +28686,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteBucketWebsiteCommand");
var se_DeleteObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xam]: input[_MFA],
[_xarp]: input[_RP],
- [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()],
- [_xaebo]: input[_EBO]
+ [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
+ [_xaebo]: input[_EBO],
+ [_im]: input[_IM],
+ [_xaimlmt]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMLMT]), () => (0, import_smithy_client.dateToUtcString)(input[_IMLMT]).toString()],
+ [_xaims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMS]), () => input[_IMS].toString()]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -24996,20 +28708,19 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteObjectCommand");
var se_DeleteObjectsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xam]: input[_MFA],
[_xarp]: input[_RP],
- [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()],
+ [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
[_xaebo]: input[_EBO],
[_xasca]: input[_CA]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
- [_d]: [, ""],
- [_xi]: [, "DeleteObjects"]
+ [_d]: [, ""]
});
let body;
let contents;
@@ -25023,8 +28734,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteObjectsCommand");
var se_DeleteObjectTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
@@ -25039,8 +28750,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeleteObjectTaggingCommand");
var se_DeletePublicAccessBlockCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25053,8 +28764,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_DeletePublicAccessBlockCommand");
var se_GetBucketAccelerateConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
@@ -25068,8 +28779,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketAccelerateConfigurationCommand");
var se_GetBucketAclCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25082,8 +28793,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketAclCommand");
var se_GetBucketAnalyticsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25098,8 +28809,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketAnalyticsConfigurationCommand");
var se_GetBucketCorsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25112,8 +28823,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketCorsCommand");
var se_GetBucketEncryptionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25126,8 +28837,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketEncryptionCommand");
var se_GetBucketIntelligentTieringConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = {};
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
@@ -25140,8 +28853,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketIntelligentTieringConfigurationCommand");
var se_GetBucketInventoryConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25156,8 +28869,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketInventoryConfigurationCommand");
var se_GetBucketLifecycleConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25170,8 +28883,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketLifecycleConfigurationCommand");
var se_GetBucketLocationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25184,8 +28897,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketLocationCommand");
var se_GetBucketLoggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25197,9 +28910,37 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_GetBucketLoggingCommand");
+ var se_GetBucketMetadataConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mC]: [, ""]
+ });
+ let body;
+ b.m("GET").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_GetBucketMetadataConfigurationCommand");
+ var se_GetBucketMetadataTableConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mT]: [, ""]
+ });
+ let body;
+ b.m("GET").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_GetBucketMetadataTableConfigurationCommand");
var se_GetBucketMetricsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25214,8 +28955,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketMetricsConfigurationCommand");
var se_GetBucketNotificationConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25228,8 +28969,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketNotificationConfigurationCommand");
var se_GetBucketOwnershipControlsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25242,8 +28983,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketOwnershipControlsCommand");
var se_GetBucketPolicyCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25256,8 +28997,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketPolicyCommand");
var se_GetBucketPolicyStatusCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25270,8 +29011,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketPolicyStatusCommand");
var se_GetBucketReplicationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25284,8 +29025,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketReplicationCommand");
var se_GetBucketRequestPaymentCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25298,8 +29039,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketRequestPaymentCommand");
var se_GetBucketTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25312,8 +29053,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketTaggingCommand");
var se_GetBucketVersioningCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25326,8 +29067,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketVersioningCommand");
var se_GetBucketWebsiteCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25340,12 +29081,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetBucketWebsiteCommand");
var se_GetObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_im]: input[_IM],
- [_ims]: [() => isSerializableHeaderValue(input[_IMS]), () => (0, import_smithy_client.dateToUtcString)(input[_IMS]).toString()],
+ [_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()],
[_inm]: input[_INM],
- [_ius]: [() => isSerializableHeaderValue(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
+ [_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
[_ra]: input[_R],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
@@ -25373,8 +29114,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectCommand");
var se_GetObjectAclCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
@@ -25390,19 +29131,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectAclCommand");
var se_GetObjectAttributesCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_xamp]: [() => isSerializableHeaderValue(input[_MP]), () => input[_MP].toString()],
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xamp]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MP]), () => input[_MP].toString()],
[_xapnm]: input[_PNM],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
[_xasseckm]: input[_SSECKMD],
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
- [_xaoa]: [
- () => isSerializableHeaderValue(input[_OA]),
- () => (input[_OA] || []).map((_entry) => _entry).join(", ")
- ]
+ [_xaoa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OA]), () => (input[_OA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -25416,8 +29154,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectAttributesCommand");
var se_GetObjectLegalHoldCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
@@ -25433,8 +29171,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectLegalHoldCommand");
var se_GetObjectLockConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25447,8 +29185,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectLockConfigurationCommand");
var se_GetObjectRetentionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
@@ -25464,8 +29202,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectRetentionCommand");
var se_GetObjectTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
@@ -25481,8 +29219,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectTaggingCommand");
var se_GetObjectTorrentCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO]
});
@@ -25497,8 +29235,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetObjectTorrentCommand");
var se_GetPublicAccessBlockCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25511,8 +29249,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_GetPublicAccessBlockCommand");
var se_HeadBucketCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25522,12 +29260,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_HeadBucketCommand");
var se_HeadObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_im]: input[_IM],
- [_ims]: [() => isSerializableHeaderValue(input[_IMS]), () => (0, import_smithy_client.dateToUtcString)(input[_IMS]).toString()],
+ [_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IMSf]), () => (0, import_smithy_client.dateToUtcString)(input[_IMSf]).toString()],
[_inm]: input[_INM],
- [_ius]: [() => isSerializableHeaderValue(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
+ [_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_IUS]), () => (0, import_smithy_client.dateToUtcString)(input[_IUS]).toString()],
[_ra]: input[_R],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
@@ -25540,6 +29278,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
+ [_rcc]: [, input[_RCC]],
+ [_rcd]: [, input[_RCD]],
+ [_rce]: [, input[_RCE]],
+ [_rcl]: [, input[_RCL]],
+ [_rct]: [, input[_RCT]],
+ [_re]: [() => input.ResponseExpires !== undefined, () => (0, import_smithy_client.dateToUtcString)(input[_RE]).toString()],
[_vI]: [, input[_VI]],
[_pN]: [() => input.PartNumber !== undefined, () => input[_PN].toString()]
});
@@ -25548,8 +29292,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_HeadObjectCommand");
var se_ListBucketAnalyticsConfigurationsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25557,29 +29301,31 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
const query = (0, import_smithy_client.map)({
[_a]: [, ""],
[_xi]: [, "ListBucketAnalyticsConfigurations"],
- [_ct_]: [, input[_CTo]]
+ [_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketAnalyticsConfigurationsCommand");
var se_ListBucketIntelligentTieringConfigurationsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = {};
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xaebo]: input[_EBO]
+ });
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
[_it]: [, ""],
[_xi]: [, "ListBucketIntelligentTieringConfigurations"],
- [_ct_]: [, input[_CTo]]
+ [_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketIntelligentTieringConfigurationsCommand");
var se_ListBucketInventoryConfigurationsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25587,15 +29333,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
const query = (0, import_smithy_client.map)({
[_in]: [, ""],
[_xi]: [, "ListBucketInventoryConfigurations"],
- [_ct_]: [, input[_CTo]]
+ [_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketInventoryConfigurationsCommand");
var se_ListBucketMetricsConfigurationsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -25603,33 +29349,34 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
const query = (0, import_smithy_client.map)({
[_m]: [, ""],
[_xi]: [, "ListBucketMetricsConfigurations"],
- [_ct_]: [, input[_CTo]]
+ [_ct_]: [, input[_CTon]]
});
let body;
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketMetricsConfigurationsCommand");
var se_ListBucketsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = {
- "content-type": "application/xml"
- };
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = {};
b.bp("/");
const query = (0, import_smithy_client.map)({
- [_xi]: [, "ListBuckets"]
+ [_xi]: [, "ListBuckets"],
+ [_mb]: [() => input.MaxBuckets !== undefined, () => input[_MB].toString()],
+ [_ct_]: [, input[_CTon]],
+ [_pr]: [, input[_P]],
+ [_br]: [, input[_BR]]
});
let body;
- body = "";
b.m("GET").h(headers).q(query).b(body);
return b.build();
}, "se_ListBucketsCommand");
var se_ListDirectoryBucketsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
+ const b = (0, import_core2.requestBuilder)(input, context);
const headers = {};
b.bp("/");
const query = (0, import_smithy_client.map)({
[_xi]: [, "ListDirectoryBuckets"],
- [_ct_]: [, input[_CTo]],
+ [_ct_]: [, input[_CTon]],
[_mdb]: [() => input.MaxDirectoryBuckets !== undefined, () => input[_MDB].toString()]
});
let body;
@@ -25637,8 +29384,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListDirectoryBucketsCommand");
var se_ListMultipartUploadsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP]
});
@@ -25658,14 +29405,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListMultipartUploadsCommand");
var se_ListObjectsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
- [_xaooa]: [
- () => isSerializableHeaderValue(input[_OOA]),
- () => (input[_OOA] || []).map((_entry) => _entry).join(", ")
- ]
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -25681,14 +29425,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListObjectsCommand");
var se_ListObjectsV2Command = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
- [_xaooa]: [
- () => isSerializableHeaderValue(input[_OOA]),
- () => (input[_OOA] || []).map((_entry) => _entry).join(", ")
- ]
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -25698,7 +29439,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_et]: [, input[_ET]],
[_mk]: [() => input.MaxKeys !== undefined, () => input[_MK].toString()],
[_pr]: [, input[_P]],
- [_ct_]: [, input[_CTo]],
+ [_ct_]: [, input[_CTon]],
[_fo]: [() => input.FetchOwner !== undefined, () => input[_FO].toString()],
[_sa]: [, input[_SA]]
});
@@ -25707,14 +29448,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListObjectsV2Command");
var se_ListObjectVersionsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xaebo]: input[_EBO],
[_xarp]: input[_RP],
- [_xaooa]: [
- () => isSerializableHeaderValue(input[_OOA]),
- () => (input[_OOA] || []).map((_entry) => _entry).join(", ")
- ]
+ [_xaooa]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OOA]), () => (input[_OOA] || []).map(import_smithy_client.quoteHeader).join(", ")]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -25732,8 +29470,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListObjectVersionsCommand");
var se_ListPartsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xarp]: input[_RP],
[_xaebo]: input[_EBO],
[_xasseca]: input[_SSECA],
@@ -25754,8 +29492,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_ListPartsCommand");
var se_PutBucketAccelerateConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO],
[_xasca]: input[_CA]
@@ -25777,8 +29515,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketAccelerateConfigurationCommand");
var se_PutBucketAclCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_cm]: input[_CMD],
@@ -25807,8 +29545,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketAclCommand");
var se_PutBucketAnalyticsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
@@ -25830,8 +29568,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketAnalyticsConfigurationCommand");
var se_PutBucketCorsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -25854,8 +29592,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketCorsCommand");
var se_PutBucketEncryptionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -25878,10 +29616,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketEncryptionCommand");
var se_PutBucketIntelligentTieringConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = {
- "content-type": "application/xml"
- };
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ "content-type": "application/xml",
+ [_xaebo]: input[_EBO]
+ });
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
const query = (0, import_smithy_client.map)({
@@ -25900,8 +29639,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketIntelligentTieringConfigurationCommand");
var se_PutBucketInventoryConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
@@ -25923,11 +29662,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketInventoryConfigurationCommand");
var se_PutBucketLifecycleConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xasca]: input[_CA],
- [_xaebo]: input[_EBO]
+ [_xaebo]: input[_EBO],
+ [_xatdmos]: input[_TDMOS]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -25947,8 +29687,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketLifecycleConfigurationCommand");
var se_PutBucketLoggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -25971,8 +29711,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketLoggingCommand");
var se_PutBucketMetricsConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO]
});
@@ -25994,11 +29734,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketMetricsConfigurationCommand");
var se_PutBucketNotificationConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaebo]: input[_EBO],
- [_xasdv]: [() => isSerializableHeaderValue(input[_SDV]), () => input[_SDV].toString()]
+ [_xasdv]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SDV]), () => input[_SDV].toString()]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -26017,11 +29757,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketNotificationConfigurationCommand");
var se_PutBucketOwnershipControlsCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
- [_xaebo]: input[_EBO]
+ [_xaebo]: input[_EBO],
+ [_xasca]: input[_CA]
});
b.bp("/");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -26040,12 +29781,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketOwnershipControlsCommand");
var se_PutBucketPolicyCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "text/plain",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
- [_xacrsba]: [() => isSerializableHeaderValue(input[_CRSBA]), () => input[_CRSBA].toString()],
+ [_xacrsba]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CRSBA]), () => input[_CRSBA].toString()],
[_xaebo]: input[_EBO]
});
b.bp("/");
@@ -26063,8 +29804,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketPolicyCommand");
var se_PutBucketReplicationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26088,8 +29829,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketReplicationCommand");
var se_PutBucketRequestPaymentCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26112,8 +29853,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketRequestPaymentCommand");
var se_PutBucketTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26136,8 +29877,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketTaggingCommand");
var se_PutBucketVersioningCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26161,8 +29902,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketVersioningCommand");
var se_PutBucketWebsiteCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26185,26 +29926,34 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutBucketWebsiteCommand");
var se_PutObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
- [_ct]: input[_CT] || "application/octet-stream",
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
+ acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
+ return acc;
+ }, {}),
+ [_ct]: input[_CTo] || "application/octet-stream",
[_xaa]: input[_ACL],
[_cc]: input[_CC],
[_cd]: input[_CD],
[_ce]: input[_CE],
[_cl]: input[_CL],
- [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()],
+ [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
+ [_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
- [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
+ [_e]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
+ [_im]: input[_IM],
+ [_inm]: input[_INM],
[_xagfc]: input[_GFC],
[_xagr]: input[_GR],
[_xagra]: input[_GRACP],
[_xagwa]: input[_GWACP],
+ [_xawob]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_WOB]), () => input[_WOB].toString()],
[_xasse]: input[_SSE],
[_xasc]: input[_SC],
[_xawrl]: input[_WRL],
@@ -26213,20 +29962,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xasseckm]: input[_SSECKMD],
[_xasseakki]: input[_SSEKMSKI],
[_xassec]: input[_SSEKMSEC],
- [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()],
+ [_xassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()],
[_xarp]: input[_RP],
[_xat]: input[_T],
[_xaolm]: input[_OLM],
- [_xaolrud]: [
- () => isSerializableHeaderValue(input[_OLRUD]),
- () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString()
- ],
+ [_xaolrud]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]), () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()],
[_xaollh]: input[_OLLHS],
- [_xaebo]: input[_EBO],
- ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
- acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
- return acc;
- }, {})
+ [_xaebo]: input[_EBO]
});
b.bp("/{Key+}");
b.p("Bucket", () => input.Bucket, "{Bucket}", false);
@@ -26244,8 +29986,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectCommand");
var se_PutObjectAclCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xaa]: input[_ACL],
[_cm]: input[_CMD],
@@ -26277,8 +30019,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectAclCommand");
var se_PutObjectLegalHoldCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_cm]: input[_CMD],
@@ -26305,8 +30047,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectLegalHoldCommand");
var se_PutObjectLockConfigurationCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_xabolt]: input[_To],
@@ -26331,11 +30073,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectLockConfigurationCommand");
var se_PutObjectRetentionCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
- [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()],
+ [_xabgr]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BGR]), () => input[_BGR].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xaebo]: input[_EBO]
@@ -26360,8 +30102,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectRetentionCommand");
var se_PutObjectTaggingCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26387,8 +30129,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_PutObjectTaggingCommand");
var se_PutPublicAccessBlockCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_cm]: input[_CMD],
[_xasca]: input[_CA],
@@ -26410,9 +30152,33 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.m("PUT").h(headers).q(query).b(body);
return b.build();
}, "se_PutPublicAccessBlockCommand");
+ var se_RenameObjectCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ [_xars]: input[_RS],
+ [_im]: input[_DIM],
+ [_inm]: input[_DINM],
+ [_ims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_DIMS]).toString()],
+ [_ius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_DIUS]).toString()],
+ [_xarsim]: input[_SIM],
+ [_xarsinm]: input[_SINM],
+ [_xarsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_SIMS]).toString()],
+ [_xarsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_SIUS]).toString()],
+ [_xact_]: input[_CTl] ?? (0, import_uuid.v4)()
+ });
+ b.bp("/{Key+}");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ b.p("Key", () => input.Key, "{Key+}", true);
+ const query = (0, import_smithy_client.map)({
+ [_rO]: [, ""]
+ });
+ let body;
+ b.m("PUT").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_RenameObjectCommand");
var se_RestoreObjectCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xarp]: input[_RP],
[_xasca]: input[_CA],
@@ -26423,7 +30189,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_res]: [, ""],
- [_xi]: [, "RestoreObject"],
[_vI]: [, input[_VI]]
});
let body;
@@ -26438,8 +30203,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_RestoreObjectCommand");
var se_SelectObjectContentCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/xml",
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
@@ -26451,8 +30216,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.p("Key", () => input.Key, "{Key+}", true);
const query = (0, import_smithy_client.map)({
[_se]: [, ""],
- [_st]: [, "2"],
- [_xi]: [, "SelectObjectContent"]
+ [_st]: [, "2"]
});
let body;
body = _ve;
@@ -26476,15 +30240,66 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
b.m("POST").h(headers).q(query).b(body);
return b.build();
}, "se_SelectObjectContentCommand");
+ var se_UpdateBucketMetadataInventoryTableConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ "content-type": "application/xml",
+ [_cm]: input[_CMD],
+ [_xasca]: input[_CA],
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mIT]: [, ""]
+ });
+ let body;
+ let contents;
+ if (input.InventoryTableConfiguration !== undefined) {
+ contents = se_InventoryTableConfigurationUpdates(input.InventoryTableConfiguration, context);
+ contents = contents.n("InventoryTableConfiguration");
+ body = _ve;
+ contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
+ body += contents.toString();
+ }
+ b.m("PUT").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_UpdateBucketMetadataInventoryTableConfigurationCommand");
+ var se_UpdateBucketMetadataJournalTableConfigurationCommand = __name(async (input, context) => {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
+ "content-type": "application/xml",
+ [_cm]: input[_CMD],
+ [_xasca]: input[_CA],
+ [_xaebo]: input[_EBO]
+ });
+ b.bp("/");
+ b.p("Bucket", () => input.Bucket, "{Bucket}", false);
+ const query = (0, import_smithy_client.map)({
+ [_mJT]: [, ""]
+ });
+ let body;
+ let contents;
+ if (input.JournalTableConfiguration !== undefined) {
+ contents = se_JournalTableConfigurationUpdates(input.JournalTableConfiguration, context);
+ contents = contents.n("JournalTableConfiguration");
+ body = _ve;
+ contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/");
+ body += contents.toString();
+ }
+ b.m("PUT").h(headers).q(query).b(body);
+ return b.build();
+ }, "se_UpdateBucketMetadataJournalTableConfigurationCommand");
var se_UploadPartCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"content-type": "application/octet-stream",
- [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()],
+ [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_cm]: input[_CMD],
[_xasca]: input[_CA],
[_xacc]: input[_CCRC],
[_xacc_]: input[_CCRCC],
+ [_xacc__]: input[_CCRCNVME],
[_xacs]: input[_CSHA],
[_xacs_]: input[_CSHAh],
[_xasseca]: input[_SSECA],
@@ -26511,13 +30326,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_UploadPartCommand");
var se_UploadPartCopyCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
[_xacs__]: input[_CS],
[_xacsim]: input[_CSIM],
- [_xacsims]: [() => isSerializableHeaderValue(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
+ [_xacsims]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIMS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIMS]).toString()],
[_xacsinm]: input[_CSINM],
- [_xacsius]: [() => isSerializableHeaderValue(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
+ [_xacsius]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CSIUS]), () => (0, import_smithy_client.dateToUtcString)(input[_CSIUS]).toString()],
[_xacsr]: input[_CSR],
[_xasseca]: input[_SSECA],
[_xasseck]: input[_SSECK],
@@ -26542,13 +30357,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return b.build();
}, "se_UploadPartCopyCommand");
var se_WriteGetObjectResponseCommand = __name(async (input, context) => {
- const b = (0, import_core.requestBuilder)(input, context);
- const headers = (0, import_smithy_client.map)({}, isSerializableHeaderValue, {
+ const b = (0, import_core2.requestBuilder)(input, context);
+ const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
"x-amz-content-sha256": "UNSIGNED-PAYLOAD",
+ ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
+ acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
+ return acc;
+ }, {}),
"content-type": "application/octet-stream",
[_xarr]: input[_RR],
[_xart]: input[_RT],
- [_xafs]: [() => isSerializableHeaderValue(input[_SCt]), () => input[_SCt].toString()],
+ [_xafs]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_SCt]), () => input[_SCt].toString()],
[_xafec]: input[_EC],
[_xafem]: input[_EM],
[_xafhar]: input[_AR],
@@ -26556,27 +30375,28 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xafhcd]: input[_CD],
[_xafhce]: input[_CE],
[_xafhcl]: input[_CL],
- [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()],
+ [_cl_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_CLo]), () => input[_CLo].toString()],
[_xafhcr]: input[_CR],
- [_xafhct]: input[_CT],
+ [_xafhct]: input[_CTo],
[_xafhxacc]: input[_CCRC],
[_xafhxacc_]: input[_CCRCC],
+ [_xafhxacc__]: input[_CCRCNVME],
[_xafhxacs]: input[_CSHA],
[_xafhxacs_]: input[_CSHAh],
- [_xafhxadm]: [() => isSerializableHeaderValue(input[_DM]), () => input[_DM].toString()],
+ [_xafhxadm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_DM]), () => input[_DM].toString()],
[_xafhe]: input[_ETa],
- [_xafhe_]: [() => isSerializableHeaderValue(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
+ [_xafhe_]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_E]), () => (0, import_smithy_client.dateToUtcString)(input[_E]).toString()],
[_xafhxae]: input[_Exp],
- [_xafhlm]: [() => isSerializableHeaderValue(input[_LM]), () => (0, import_smithy_client.dateToUtcString)(input[_LM]).toString()],
- [_xafhxamm]: [() => isSerializableHeaderValue(input[_MM]), () => input[_MM].toString()],
+ [_xafhlm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_LM]), () => (0, import_smithy_client.dateToUtcString)(input[_LM]).toString()],
+ [_xafhxamm]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_MM]), () => input[_MM].toString()],
[_xafhxaolm]: input[_OLM],
[_xafhxaollh]: input[_OLLHS],
[_xafhxaolrud]: [
- () => isSerializableHeaderValue(input[_OLRUD]),
- () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString()
+ () => (0, import_smithy_client.isSerializableHeaderValue)(input[_OLRUD]),
+ () => (0, import_smithy_client.serializeDateTime)(input[_OLRUD]).toString()
],
- [_xafhxampc]: [() => isSerializableHeaderValue(input[_PC]), () => input[_PC].toString()],
- [_xafhxars]: input[_RS],
+ [_xafhxampc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_PC]), () => input[_PC].toString()],
+ [_xafhxars]: input[_RSe],
[_xafhxarc]: input[_RC],
[_xafhxar]: input[_Re],
[_xafhxasse]: input[_SSE],
@@ -26584,18 +30404,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_xafhxasseakki]: input[_SSEKMSKI],
[_xafhxasseckm]: input[_SSECKMD],
[_xafhxasc]: input[_SC],
- [_xafhxatc]: [() => isSerializableHeaderValue(input[_TC]), () => input[_TC].toString()],
+ [_xafhxatc]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_TC]), () => input[_TC].toString()],
[_xafhxavi]: input[_VI],
- [_xafhxassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()],
- ...input.Metadata !== undefined && Object.keys(input.Metadata).reduce((acc, suffix) => {
- acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix];
- return acc;
- }, {})
+ [_xafhxassebke]: [() => (0, import_smithy_client.isSerializableHeaderValue)(input[_BKE]), () => input[_BKE].toString()]
});
b.bp("/WriteGetObjectResponse");
- const query = (0, import_smithy_client.map)({
- [_xi]: [, "WriteGetObjectResponse"]
- });
let body;
let contents;
if (input.Body !== undefined) {
@@ -26614,12 +30427,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
}
b.hn(resolvedHostname);
- b.m("POST").h(headers).q(query).b(body);
+ b.m("POST").h(headers).b(body);
return b.build();
}, "se_WriteGetObjectResponseCommand");
var de_AbortMultipartUploadCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_AbortMultipartUploadCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -26628,28 +30441,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_AbortMultipartUploadCommand");
- var de_AbortMultipartUploadCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchUpload":
- case "com.amazonaws.s3#NoSuchUpload":
- throw await de_NoSuchUploadRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_AbortMultipartUploadCommandError");
var de_CompleteMultipartUploadCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CompleteMultipartUploadCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -26660,7 +30454,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
@@ -26670,12 +30464,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (data[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(data[_CCRCC]);
}
+ if (data[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(data[_CCRCNVME]);
+ }
if (data[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(data[_CSHA]);
}
if (data[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(data[_CSHAh]);
}
+ if (data[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]);
+ }
if (data[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(data[_ETa]);
}
@@ -26687,22 +30487,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_CompleteMultipartUploadCommand");
- var de_CompleteMultipartUploadCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_CompleteMultipartUploadCommandError");
var de_CopyObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CopyObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -26717,65 +30504,45 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.CopyObjectResult = de_CopyObjectResult(data, context);
return contents;
}, "de_CopyObjectCommand");
- var de_CopyObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "ObjectNotInActiveTierError":
- case "com.amazonaws.s3#ObjectNotInActiveTierError":
- throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_CopyObjectCommandError");
var de_CreateBucketCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CreateBucketCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
- [_L]: [, output.headers[_lo]]
+ [_L]: [, output.headers[_lo]],
+ [_BA]: [, output.headers[_xaba]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_CreateBucketCommand");
- var de_CreateBucketCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "BucketAlreadyExists":
- case "com.amazonaws.s3#BucketAlreadyExists":
- throw await de_BucketAlreadyExistsRes(parsedOutput, context);
- case "BucketAlreadyOwnedByYou":
- case "com.amazonaws.s3#BucketAlreadyOwnedByYou":
- throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
+ var de_CreateBucketMetadataConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
}
- }, "de_CreateBucketCommandError");
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_CreateBucketMetadataConfigurationCommand");
+ var de_CreateBucketMetadataTableConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_CreateBucketMetadataTableConfigurationCommand");
var de_CreateMultipartUploadCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CreateMultipartUploadCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -26791,9 +30558,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]],
- [_CA]: [, output.headers[_xaca]]
+ [_CA]: [, output.headers[_xaca]],
+ [_CT]: [, output.headers[_xact]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
@@ -26805,54 +30573,26 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_CreateMultipartUploadCommand");
- var de_CreateMultipartUploadCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_CreateMultipartUploadCommandError");
var de_CreateSessionCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_CreateSessionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ $metadata: deserializeMetadata(output),
+ [_SSE]: [, output.headers[_xasse]],
+ [_SSEKMSKI]: [, output.headers[_xasseakki]],
+ [_SSEKMSEC]: [, output.headers[_xassec]],
+ [_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_C] != null) {
contents[_C] = de_SessionCredentials(data[_C], context);
}
return contents;
}, "de_CreateSessionCommand");
- var de_CreateSessionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchBucket":
- case "com.amazonaws.s3#NoSuchBucket":
- throw await de_NoSuchBucketRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_CreateSessionCommandError");
var de_DeleteBucketCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26860,22 +30600,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketCommand");
- var de_DeleteBucketCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketCommandError");
var de_DeleteBucketAnalyticsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketAnalyticsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26883,22 +30610,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketAnalyticsConfigurationCommand");
- var de_DeleteBucketAnalyticsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketAnalyticsConfigurationCommandError");
var de_DeleteBucketCorsCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketCorsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26906,22 +30620,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketCorsCommand");
- var de_DeleteBucketCorsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketCorsCommandError");
var de_DeleteBucketEncryptionCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketEncryptionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26929,22 +30630,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketEncryptionCommand");
- var de_DeleteBucketEncryptionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketEncryptionCommandError");
var de_DeleteBucketIntelligentTieringConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketIntelligentTieringConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26952,22 +30640,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketIntelligentTieringConfigurationCommand");
- var de_DeleteBucketIntelligentTieringConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketIntelligentTieringConfigurationCommandError");
var de_DeleteBucketInventoryConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketInventoryConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26975,22 +30650,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketInventoryConfigurationCommand");
- var de_DeleteBucketInventoryConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketInventoryConfigurationCommandError");
var de_DeleteBucketLifecycleCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketLifecycleCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -26998,22 +30660,29 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketLifecycleCommand");
- var de_DeleteBucketLifecycleCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketLifecycleCommandError");
+ var de_DeleteBucketMetadataConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_DeleteBucketMetadataConfigurationCommand");
+ var de_DeleteBucketMetadataTableConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_DeleteBucketMetadataTableConfigurationCommand");
var de_DeleteBucketMetricsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketMetricsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27021,22 +30690,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketMetricsConfigurationCommand");
- var de_DeleteBucketMetricsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketMetricsConfigurationCommandError");
var de_DeleteBucketOwnershipControlsCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketOwnershipControlsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27044,22 +30700,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketOwnershipControlsCommand");
- var de_DeleteBucketOwnershipControlsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketOwnershipControlsCommandError");
var de_DeleteBucketPolicyCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketPolicyCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27067,22 +30710,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketPolicyCommand");
- var de_DeleteBucketPolicyCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketPolicyCommandError");
var de_DeleteBucketReplicationCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketReplicationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27090,22 +30720,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketReplicationCommand");
- var de_DeleteBucketReplicationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketReplicationCommandError");
var de_DeleteBucketTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27113,22 +30730,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketTaggingCommand");
- var de_DeleteBucketTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketTaggingCommandError");
var de_DeleteBucketWebsiteCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteBucketWebsiteCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27136,22 +30740,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteBucketWebsiteCommand");
- var de_DeleteBucketWebsiteCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteBucketWebsiteCommandError");
var de_DeleteObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -27162,56 +30753,30 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteObjectCommand");
- var de_DeleteObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteObjectCommandError");
var de_DeleteObjectsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_DeleteObjectsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.Deleted === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.Deleted).trim() === "") {
contents[_De] = [];
} else if (data[_De] != null) {
contents[_De] = de_DeletedObjects((0, import_smithy_client.getArrayIfSingleItem)(data[_De]), context);
}
- if (data.Error === "") {
+ if (String(data.Error).trim() === "") {
contents[_Err] = [];
} else if (data[_Er] != null) {
contents[_Err] = de_Errors((0, import_smithy_client.getArrayIfSingleItem)(data[_Er]), context);
}
return contents;
}, "de_DeleteObjectsCommand");
- var de_DeleteObjectsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteObjectsCommandError");
var de_DeleteObjectTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeleteObjectTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -27220,22 +30785,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeleteObjectTaggingCommand");
- var de_DeleteObjectTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeleteObjectTaggingCommandError");
var de_DeletePublicAccessBlockCommand = __name(async (output, context) => {
if (output.statusCode !== 204 && output.statusCode >= 300) {
- return de_DeletePublicAccessBlockCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27243,55 +30795,29 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_DeletePublicAccessBlockCommand");
- var de_DeletePublicAccessBlockCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_DeletePublicAccessBlockCommandError");
var de_GetBucketAccelerateConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketAccelerateConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(data[_S]);
}
return contents;
}, "de_GetBucketAccelerateConfigurationCommand");
- var de_GetBucketAccelerateConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketAccelerateConfigurationCommandError");
var de_GetBucketAclCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketAclCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.AccessControlList === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.AccessControlList).trim() === "") {
contents[_Gr] = [];
} else if (data[_ACLc] != null && data[_ACLc][_G] != null) {
contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context);
@@ -27301,315 +30827,182 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_GetBucketAclCommand");
- var de_GetBucketAclCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketAclCommandError");
var de_GetBucketAnalyticsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketAnalyticsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.AnalyticsConfiguration = de_AnalyticsConfiguration(data, context);
return contents;
}, "de_GetBucketAnalyticsConfigurationCommand");
- var de_GetBucketAnalyticsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketAnalyticsConfigurationCommandError");
var de_GetBucketCorsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketCorsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.CORSRule === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.CORSRule).trim() === "") {
contents[_CORSRu] = [];
} else if (data[_CORSR] != null) {
contents[_CORSRu] = de_CORSRules((0, import_smithy_client.getArrayIfSingleItem)(data[_CORSR]), context);
}
return contents;
}, "de_GetBucketCorsCommand");
- var de_GetBucketCorsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketCorsCommandError");
var de_GetBucketEncryptionCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketEncryptionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ServerSideEncryptionConfiguration = de_ServerSideEncryptionConfiguration(data, context);
return contents;
}, "de_GetBucketEncryptionCommand");
- var de_GetBucketEncryptionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketEncryptionCommandError");
var de_GetBucketIntelligentTieringConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketIntelligentTieringConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.IntelligentTieringConfiguration = de_IntelligentTieringConfiguration(data, context);
return contents;
}, "de_GetBucketIntelligentTieringConfigurationCommand");
- var de_GetBucketIntelligentTieringConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketIntelligentTieringConfigurationCommandError");
var de_GetBucketInventoryConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketInventoryConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.InventoryConfiguration = de_InventoryConfiguration(data, context);
return contents;
}, "de_GetBucketInventoryConfigurationCommand");
- var de_GetBucketInventoryConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketInventoryConfigurationCommandError");
var de_GetBucketLifecycleConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketLifecycleConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ $metadata: deserializeMetadata(output),
+ [_TDMOS]: [, output.headers[_xatdmos]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.Rule === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.Rule).trim() === "") {
contents[_Rul] = [];
} else if (data[_Ru] != null) {
contents[_Rul] = de_LifecycleRules((0, import_smithy_client.getArrayIfSingleItem)(data[_Ru]), context);
}
return contents;
}, "de_GetBucketLifecycleConfigurationCommand");
- var de_GetBucketLifecycleConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketLifecycleConfigurationCommandError");
var de_GetBucketLocationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketLocationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_LC] != null) {
contents[_LC] = (0, import_smithy_client.expectString)(data[_LC]);
}
return contents;
}, "de_GetBucketLocationCommand");
- var de_GetBucketLocationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketLocationCommandError");
var de_GetBucketLoggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketLoggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_LE] != null) {
contents[_LE] = de_LoggingEnabled(data[_LE], context);
}
return contents;
}, "de_GetBucketLoggingCommand");
- var de_GetBucketLoggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketLoggingCommandError");
+ var de_GetBucketMetadataConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
+ contents.GetBucketMetadataConfigurationResult = de_GetBucketMetadataConfigurationResult(data, context);
+ return contents;
+ }, "de_GetBucketMetadataConfigurationCommand");
+ var de_GetBucketMetadataTableConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
+ contents.GetBucketMetadataTableConfigurationResult = de_GetBucketMetadataTableConfigurationResult(data, context);
+ return contents;
+ }, "de_GetBucketMetadataTableConfigurationCommand");
var de_GetBucketMetricsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketMetricsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.MetricsConfiguration = de_MetricsConfiguration(data, context);
return contents;
}, "de_GetBucketMetricsConfigurationCommand");
- var de_GetBucketMetricsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketMetricsConfigurationCommandError");
var de_GetBucketNotificationConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketNotificationConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_EBC] != null) {
contents[_EBC] = de_EventBridgeConfiguration(data[_EBC], context);
}
- if (data.CloudFunctionConfiguration === "") {
+ if (String(data.CloudFunctionConfiguration).trim() === "") {
contents[_LFC] = [];
} else if (data[_CFC] != null) {
contents[_LFC] = de_LambdaFunctionConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_CFC]), context);
}
- if (data.QueueConfiguration === "") {
+ if (String(data.QueueConfiguration).trim() === "") {
contents[_QCu] = [];
} else if (data[_QC] != null) {
contents[_QCu] = de_QueueConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_QC]), context);
}
- if (data.TopicConfiguration === "") {
+ if (String(data.TopicConfiguration).trim() === "") {
contents[_TCop] = [];
} else if (data[_TCo] != null) {
contents[_TCop] = de_TopicConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_TCo]), context);
}
return contents;
}, "de_GetBucketNotificationConfigurationCommand");
- var de_GetBucketNotificationConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketNotificationConfigurationCommandError");
var de_GetBucketOwnershipControlsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketOwnershipControlsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.OwnershipControls = de_OwnershipControls(data, context);
return contents;
}, "de_GetBucketOwnershipControlsCommand");
- var de_GetBucketOwnershipControlsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketOwnershipControlsCommandError");
var de_GetBucketPolicyCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketPolicyCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -27618,129 +31011,64 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
contents.Policy = (0, import_smithy_client.expectString)(data);
return contents;
}, "de_GetBucketPolicyCommand");
- var de_GetBucketPolicyCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketPolicyCommandError");
var de_GetBucketPolicyStatusCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketPolicyStatusCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.PolicyStatus = de_PolicyStatus(data, context);
return contents;
}, "de_GetBucketPolicyStatusCommand");
- var de_GetBucketPolicyStatusCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketPolicyStatusCommandError");
var de_GetBucketReplicationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketReplicationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ReplicationConfiguration = de_ReplicationConfiguration(data, context);
return contents;
}, "de_GetBucketReplicationCommand");
- var de_GetBucketReplicationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketReplicationCommandError");
var de_GetBucketRequestPaymentCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketRequestPaymentCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_Pa] != null) {
contents[_Pa] = (0, import_smithy_client.expectString)(data[_Pa]);
}
return contents;
}, "de_GetBucketRequestPaymentCommand");
- var de_GetBucketRequestPaymentCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketRequestPaymentCommandError");
var de_GetBucketTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.TagSet === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.TagSet).trim() === "") {
contents[_TS] = [];
} else if (data[_TS] != null && data[_TS][_Ta] != null) {
contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context);
}
return contents;
}, "de_GetBucketTaggingCommand");
- var de_GetBucketTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketTaggingCommandError");
var de_GetBucketVersioningCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketVersioningCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_MDf] != null) {
contents[_MFAD] = (0, import_smithy_client.expectString)(data[_MDf]);
}
@@ -27749,27 +31077,14 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_GetBucketVersioningCommand");
- var de_GetBucketVersioningCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketVersioningCommandError");
var de_GetBucketWebsiteCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetBucketWebsiteCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_ED] != null) {
contents[_ED] = de_ErrorDocument(data[_ED], context);
}
@@ -27779,29 +31094,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (data[_RART] != null) {
contents[_RART] = de_RedirectAllRequestsTo(data[_RART], context);
}
- if (data.RoutingRules === "") {
+ if (String(data.RoutingRules).trim() === "") {
contents[_RRo] = [];
} else if (data[_RRo] != null && data[_RRo][_RRou] != null) {
contents[_RRo] = de_RoutingRules((0, import_smithy_client.getArrayIfSingleItem)(data[_RRo][_RRou]), context);
}
return contents;
}, "de_GetBucketWebsiteCommand");
- var de_GetBucketWebsiteCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetBucketWebsiteCommandError");
var de_GetObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -27814,8 +31116,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
+ [_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
+ [_CT]: [, output.headers[_xact]],
[_MM]: [() => output.headers[_xamm] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])],
[_VI]: [, output.headers[_xavi]],
[_CC]: [, output.headers[_cc]],
@@ -27823,7 +31127,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_CE]: [, output.headers[_ce]],
[_CL]: [, output.headers[_cl]],
[_CR]: [, output.headers[_cr]],
- [_CT]: [, output.headers[_ct]],
+ [_CTo]: [, output.headers[_ct]],
[_E]: [() => output.headers[_e] !== undefined, () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))],
[_ES]: [, output.headers[_ex]],
[_WRL]: [, output.headers[_xawrl]],
@@ -27834,7 +31138,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_SC]: [, output.headers[_xasc]],
[_RC]: [, output.headers[_xarc]],
- [_RS]: [, output.headers[_xars]],
+ [_RSe]: [, output.headers[_xars_]],
[_PC]: [() => output.headers[_xampc] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])],
[_TC]: [() => output.headers[_xatc] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xatc])],
[_OLM]: [, output.headers[_xaolm]],
@@ -27856,38 +31160,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
contents.Body = data;
return contents;
}, "de_GetObjectCommand");
- var de_GetObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "InvalidObjectState":
- case "com.amazonaws.s3#InvalidObjectState":
- throw await de_InvalidObjectStateRes(parsedOutput, context);
- case "NoSuchKey":
- case "com.amazonaws.s3#NoSuchKey":
- throw await de_NoSuchKeyRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_GetObjectCommandError");
var de_GetObjectAclCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectAclCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.AccessControlList === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.AccessControlList).trim() === "") {
contents[_Gr] = [];
} else if (data[_ACLc] != null && data[_ACLc][_G] != null) {
contents[_Gr] = de_Grants((0, import_smithy_client.getArrayIfSingleItem)(data[_ACLc][_G]), context);
@@ -27897,28 +31179,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_GetObjectAclCommand");
- var de_GetObjectAclCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchKey":
- case "com.amazonaws.s3#NoSuchKey":
- throw await de_NoSuchKeyRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_GetObjectAclCommandError");
var de_GetObjectAttributesCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectAttributesCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -27927,7 +31190,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_VI]: [, output.headers[_xavi]],
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_Ch] != null) {
contents[_Ch] = de_Checksum(data[_Ch], context);
}
@@ -27945,129 +31208,58 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_GetObjectAttributesCommand");
- var de_GetObjectAttributesCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchKey":
- case "com.amazonaws.s3#NoSuchKey":
- throw await de_NoSuchKeyRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_GetObjectAttributesCommandError");
var de_GetObjectLegalHoldCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectLegalHoldCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.LegalHold = de_ObjectLockLegalHold(data, context);
return contents;
}, "de_GetObjectLegalHoldCommand");
- var de_GetObjectLegalHoldCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetObjectLegalHoldCommandError");
var de_GetObjectLockConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectLockConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.ObjectLockConfiguration = de_ObjectLockConfiguration(data, context);
return contents;
}, "de_GetObjectLockConfigurationCommand");
- var de_GetObjectLockConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetObjectLockConfigurationCommandError");
var de_GetObjectRetentionCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectRetentionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.Retention = de_ObjectLockRetention(data, context);
return contents;
}, "de_GetObjectRetentionCommand");
- var de_GetObjectRetentionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetObjectRetentionCommandError");
var de_GetObjectTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_VI]: [, output.headers[_xavi]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.TagSet === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.TagSet).trim() === "") {
contents[_TS] = [];
} else if (data[_TS] != null && data[_TS][_Ta] != null) {
contents[_TS] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(data[_TS][_Ta]), context);
}
return contents;
}, "de_GetObjectTaggingCommand");
- var de_GetObjectTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetObjectTaggingCommandError");
var de_GetObjectTorrentCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetObjectTorrentCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -28078,49 +31270,24 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
contents.Body = data;
return contents;
}, "de_GetObjectTorrentCommand");
- var de_GetObjectTorrentCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetObjectTorrentCommandError");
var de_GetPublicAccessBlockCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_GetPublicAccessBlockCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.PublicAccessBlockConfiguration = de_PublicAccessBlockConfiguration(data, context);
return contents;
}, "de_GetPublicAccessBlockCommand");
- var de_GetPublicAccessBlockCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_GetPublicAccessBlockCommandError");
var de_HeadBucketCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_HeadBucketCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
+ [_BA]: [, output.headers[_xaba]],
[_BLT]: [, output.headers[_xablt]],
[_BLN]: [, output.headers[_xabln]],
[_BR]: [, output.headers[_xabr]],
@@ -28129,28 +31296,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_HeadBucketCommand");
- var de_HeadBucketCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NotFound":
- case "com.amazonaws.s3#NotFound":
- throw await de_NotFoundRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_HeadBucketCommandError");
var de_HeadObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_HeadObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -28163,8 +31311,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_CLo]: [() => output.headers[_cl_] !== undefined, () => (0, import_smithy_client.strictParseLong)(output.headers[_cl_])],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
+ [_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
+ [_CT]: [, output.headers[_xact]],
[_ETa]: [, output.headers[_eta]],
[_MM]: [() => output.headers[_xamm] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xamm])],
[_VI]: [, output.headers[_xavi]],
@@ -28172,7 +31322,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_CD]: [, output.headers[_cd]],
[_CE]: [, output.headers[_ce]],
[_CL]: [, output.headers[_cl]],
- [_CT]: [, output.headers[_ct]],
+ [_CTo]: [, output.headers[_ct]],
+ [_CR]: [, output.headers[_cr]],
[_E]: [() => output.headers[_e] !== undefined, () => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc7231DateTime)(output.headers[_e]))],
[_ES]: [, output.headers[_ex]],
[_WRL]: [, output.headers[_xawrl]],
@@ -28183,8 +31334,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_SC]: [, output.headers[_xasc]],
[_RC]: [, output.headers[_xarc]],
- [_RS]: [, output.headers[_xars]],
+ [_RSe]: [, output.headers[_xars_]],
[_PC]: [() => output.headers[_xampc] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xampc])],
+ [_TC]: [() => output.headers[_xatc] !== undefined, () => (0, import_smithy_client.strictParseInt32)(output.headers[_xatc])],
[_OLM]: [, output.headers[_xaolm]],
[_OLRUD]: [
() => output.headers[_xaolrud] !== undefined,
@@ -28202,40 +31354,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_HeadObjectCommand");
- var de_HeadObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NotFound":
- case "com.amazonaws.s3#NotFound":
- throw await de_NotFoundRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_HeadObjectCommandError");
var de_ListBucketAnalyticsConfigurationsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListBucketAnalyticsConfigurationsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.AnalyticsConfiguration === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.AnalyticsConfiguration).trim() === "") {
contents[_ACLn] = [];
} else if (data[_AC] != null) {
contents[_ACLn] = de_AnalyticsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_AC]), context);
}
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
@@ -28245,31 +31378,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListBucketAnalyticsConfigurationsCommand");
- var de_ListBucketAnalyticsConfigurationsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListBucketAnalyticsConfigurationsCommandError");
var de_ListBucketIntelligentTieringConfigurationsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListBucketIntelligentTieringConfigurationsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
- if (data.IntelligentTieringConfiguration === "") {
+ if (String(data.IntelligentTieringConfiguration).trim() === "") {
contents[_ITCL] = [];
} else if (data[_ITC] != null) {
contents[_ITCL] = de_IntelligentTieringConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_ITC]), context);
@@ -28282,31 +31402,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListBucketIntelligentTieringConfigurationsCommand");
- var de_ListBucketIntelligentTieringConfigurationsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListBucketIntelligentTieringConfigurationsCommandError");
var de_ListBucketInventoryConfigurationsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListBucketInventoryConfigurationsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
- if (data.InventoryConfiguration === "") {
+ if (String(data.InventoryConfiguration).trim() === "") {
contents[_ICL] = [];
} else if (data[_IC] != null) {
contents[_ICL] = de_InventoryConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_IC]), context);
@@ -28319,34 +31426,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListBucketInventoryConfigurationsCommand");
- var de_ListBucketInventoryConfigurationsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListBucketInventoryConfigurationsCommandError");
var de_ListBucketMetricsConfigurationsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListBucketMetricsConfigurationsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(data[_IT]);
}
- if (data.MetricsConfiguration === "") {
+ if (String(data.MetricsConfiguration).trim() === "") {
contents[_MCL] = [];
} else if (data[_MC] != null) {
contents[_MCL] = de_MetricsConfigurationList((0, import_smithy_client.getArrayIfSingleItem)(data[_MC]), context);
@@ -28356,94 +31450,61 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListBucketMetricsConfigurationsCommand");
- var de_ListBucketMetricsConfigurationsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListBucketMetricsConfigurationsCommandError");
var de_ListBucketsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListBucketsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.Buckets === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.Buckets).trim() === "") {
contents[_Bu] = [];
} else if (data[_Bu] != null && data[_Bu][_B] != null) {
contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context);
}
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
+ }
if (data[_O] != null) {
contents[_O] = de_Owner(data[_O], context);
}
+ if (data[_P] != null) {
+ contents[_P] = (0, import_smithy_client.expectString)(data[_P]);
+ }
return contents;
}, "de_ListBucketsCommand");
- var de_ListBucketsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListBucketsCommandError");
var de_ListDirectoryBucketsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListDirectoryBucketsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.Buckets === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.Buckets).trim() === "") {
contents[_Bu] = [];
} else if (data[_Bu] != null && data[_Bu][_B] != null) {
contents[_Bu] = de_Buckets((0, import_smithy_client.getArrayIfSingleItem)(data[_Bu][_B]), context);
}
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
return contents;
}, "de_ListDirectoryBucketsCommand");
- var de_ListDirectoryBucketsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListDirectoryBucketsCommandError");
var de_ListMultipartUploadsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListMultipartUploadsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
- if (data.CommonPrefixes === "") {
+ if (String(data.CommonPrefixes).trim() === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
@@ -28475,41 +31536,28 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (data[_UIM] != null) {
contents[_UIM] = (0, import_smithy_client.expectString)(data[_UIM]);
}
- if (data.Upload === "") {
+ if (String(data.Upload).trim() === "") {
contents[_Up] = [];
} else if (data[_U] != null) {
contents[_Up] = de_MultipartUploadList((0, import_smithy_client.getArrayIfSingleItem)(data[_U]), context);
}
return contents;
}, "de_ListMultipartUploadsCommand");
- var de_ListMultipartUploadsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListMultipartUploadsCommandError");
var de_ListObjectsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListObjectsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.CommonPrefixes === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.CommonPrefixes).trim() === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
- if (data.Contents === "") {
+ if (String(data.Contents).trim() === "") {
contents[_Co] = [];
} else if (data[_Co] != null) {
contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context);
@@ -28540,46 +31588,27 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListObjectsCommand");
- var de_ListObjectsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchBucket":
- case "com.amazonaws.s3#NoSuchBucket":
- throw await de_NoSuchBucketRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_ListObjectsCommandError");
var de_ListObjectsV2Command = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListObjectsV2CommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.CommonPrefixes === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.CommonPrefixes).trim() === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
- if (data.Contents === "") {
+ if (String(data.Contents).trim() === "") {
contents[_Co] = [];
} else if (data[_Co] != null) {
contents[_Co] = de_ObjectList((0, import_smithy_client.getArrayIfSingleItem)(data[_Co]), context);
}
- if (data[_CTo] != null) {
- contents[_CTo] = (0, import_smithy_client.expectString)(data[_CTo]);
+ if (data[_CTon] != null) {
+ contents[_CTon] = (0, import_smithy_client.expectString)(data[_CTon]);
}
if (data[_D] != null) {
contents[_D] = (0, import_smithy_client.expectString)(data[_D]);
@@ -28610,40 +31639,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListObjectsV2Command");
- var de_ListObjectsV2CommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchBucket":
- case "com.amazonaws.s3#NoSuchBucket":
- throw await de_NoSuchBucketRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_ListObjectsV2CommandError");
var de_ListObjectVersionsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListObjectVersionsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
- if (data.CommonPrefixes === "") {
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
+ if (String(data.CommonPrefixes).trim() === "") {
contents[_CP] = [];
} else if (data[_CP] != null) {
contents[_CP] = de_CommonPrefixList((0, import_smithy_client.getArrayIfSingleItem)(data[_CP]), context);
}
- if (data.DeleteMarker === "") {
+ if (String(data.DeleteMarker).trim() === "") {
contents[_DMe] = [];
} else if (data[_DM] != null) {
contents[_DMe] = de_DeleteMarkers((0, import_smithy_client.getArrayIfSingleItem)(data[_DM]), context);
@@ -28678,29 +31688,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (data[_VIM] != null) {
contents[_VIM] = (0, import_smithy_client.expectString)(data[_VIM]);
}
- if (data.Version === "") {
+ if (String(data.Version).trim() === "") {
contents[_Ve] = [];
} else if (data[_V] != null) {
contents[_Ve] = de_ObjectVersionList((0, import_smithy_client.getArrayIfSingleItem)(data[_V]), context);
}
return contents;
}, "de_ListObjectVersionsCommand");
- var de_ListObjectVersionsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListObjectVersionsCommandError");
var de_ListPartsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_ListPartsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -28711,13 +31708,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_ARI]: [, output.headers[_xaari]],
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context)), "body");
if (data[_B] != null) {
contents[_B] = (0, import_smithy_client.expectString)(data[_B]);
}
if (data[_CA] != null) {
contents[_CA] = (0, import_smithy_client.expectString)(data[_CA]);
}
+ if (data[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(data[_CT]);
+ }
if (data[_In] != null) {
contents[_In] = de_Initiator(data[_In], context);
}
@@ -28739,7 +31739,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (data[_PNM] != null) {
contents[_PNM] = (0, import_smithy_client.expectString)(data[_PNM]);
}
- if (data.Part === "") {
+ if (String(data.Part).trim() === "") {
contents[_Part] = [];
} else if (data[_Par] != null) {
contents[_Part] = de_Parts((0, import_smithy_client.getArrayIfSingleItem)(data[_Par]), context);
@@ -28752,22 +31752,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_ListPartsCommand");
- var de_ListPartsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_ListPartsCommandError");
var de_PutBucketAccelerateConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketAccelerateConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28775,22 +31762,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAccelerateConfigurationCommand");
- var de_PutBucketAccelerateConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketAccelerateConfigurationCommandError");
var de_PutBucketAclCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketAclCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28798,22 +31772,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAclCommand");
- var de_PutBucketAclCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketAclCommandError");
var de_PutBucketAnalyticsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketAnalyticsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28821,22 +31782,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketAnalyticsConfigurationCommand");
- var de_PutBucketAnalyticsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketAnalyticsConfigurationCommandError");
var de_PutBucketCorsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketCorsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28844,22 +31792,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketCorsCommand");
- var de_PutBucketCorsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketCorsCommandError");
var de_PutBucketEncryptionCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketEncryptionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28867,22 +31802,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketEncryptionCommand");
- var de_PutBucketEncryptionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketEncryptionCommandError");
var de_PutBucketIntelligentTieringConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketIntelligentTieringConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28890,22 +31812,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketIntelligentTieringConfigurationCommand");
- var de_PutBucketIntelligentTieringConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketIntelligentTieringConfigurationCommandError");
var de_PutBucketInventoryConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketInventoryConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28913,45 +31822,20 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketInventoryConfigurationCommand");
- var de_PutBucketInventoryConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketInventoryConfigurationCommandError");
var de_PutBucketLifecycleConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketLifecycleConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
- $metadata: deserializeMetadata(output)
+ $metadata: deserializeMetadata(output),
+ [_TDMOS]: [, output.headers[_xatdmos]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketLifecycleConfigurationCommand");
- var de_PutBucketLifecycleConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketLifecycleConfigurationCommandError");
var de_PutBucketLoggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketLoggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28959,22 +31843,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketLoggingCommand");
- var de_PutBucketLoggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketLoggingCommandError");
var de_PutBucketMetricsConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketMetricsConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -28982,22 +31853,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketMetricsConfigurationCommand");
- var de_PutBucketMetricsConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketMetricsConfigurationCommandError");
var de_PutBucketNotificationConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketNotificationConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29005,22 +31863,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketNotificationConfigurationCommand");
- var de_PutBucketNotificationConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketNotificationConfigurationCommandError");
var de_PutBucketOwnershipControlsCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketOwnershipControlsCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29028,22 +31873,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketOwnershipControlsCommand");
- var de_PutBucketOwnershipControlsCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketOwnershipControlsCommandError");
var de_PutBucketPolicyCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketPolicyCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29051,22 +31883,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketPolicyCommand");
- var de_PutBucketPolicyCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketPolicyCommandError");
var de_PutBucketReplicationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketReplicationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29074,22 +31893,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketReplicationCommand");
- var de_PutBucketReplicationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketReplicationCommandError");
var de_PutBucketRequestPaymentCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketRequestPaymentCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29097,22 +31903,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketRequestPaymentCommand");
- var de_PutBucketRequestPaymentCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketRequestPaymentCommandError");
var de_PutBucketTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29120,22 +31913,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketTaggingCommand");
- var de_PutBucketTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketTaggingCommandError");
var de_PutBucketVersioningCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketVersioningCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29143,22 +31923,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketVersioningCommand");
- var de_PutBucketVersioningCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketVersioningCommandError");
var de_PutBucketWebsiteCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutBucketWebsiteCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29166,22 +31933,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutBucketWebsiteCommand");
- var de_PutBucketWebsiteCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutBucketWebsiteCommandError");
var de_PutObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29189,8 +31943,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
+ [_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
+ [_CT]: [, output.headers[_xact]],
[_SSE]: [, output.headers[_xasse]],
[_VI]: [, output.headers[_xavi]],
[_SSECA]: [, output.headers[_xasseca]],
@@ -29198,27 +31954,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_SSEKMSKI]: [, output.headers[_xasseakki]],
[_SSEKMSEC]: [, output.headers[_xassec]],
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
+ [_Si]: [() => output.headers[_xaos] !== undefined, () => (0, import_smithy_client.strictParseLong)(output.headers[_xaos])],
[_RC]: [, output.headers[_xarc]]
});
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectCommand");
- var de_PutObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutObjectCommandError");
var de_PutObjectAclCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectAclCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29227,28 +31971,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectAclCommand");
- var de_PutObjectAclCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "NoSuchKey":
- case "com.amazonaws.s3#NoSuchKey":
- throw await de_NoSuchKeyRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_PutObjectAclCommandError");
var de_PutObjectLegalHoldCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectLegalHoldCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29257,22 +31982,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectLegalHoldCommand");
- var de_PutObjectLegalHoldCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutObjectLegalHoldCommandError");
var de_PutObjectLockConfigurationCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectLockConfigurationCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29281,22 +31993,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectLockConfigurationCommand");
- var de_PutObjectLockConfigurationCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutObjectLockConfigurationCommandError");
var de_PutObjectRetentionCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectRetentionCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29305,22 +32004,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectRetentionCommand");
- var de_PutObjectRetentionCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutObjectRetentionCommandError");
var de_PutObjectTaggingCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutObjectTaggingCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29329,22 +32015,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutObjectTaggingCommand");
- var de_PutObjectTaggingCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutObjectTaggingCommandError");
var de_PutPublicAccessBlockCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_PutPublicAccessBlockCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29352,22 +32025,19 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_PutPublicAccessBlockCommand");
- var de_PutPublicAccessBlockCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_PutPublicAccessBlockCommandError");
+ var de_RenameObjectCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_RenameObjectCommand");
var de_RestoreObjectCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_RestoreObjectCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29377,28 +32047,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_RestoreObjectCommand");
- var de_RestoreObjectCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- switch (errorCode) {
- case "ObjectAlreadyInActiveTierError":
- case "com.amazonaws.s3#ObjectAlreadyInActiveTierError":
- throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context);
- default:
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }
- }, "de_RestoreObjectCommandError");
var de_SelectObjectContentCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_SelectObjectContentCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29407,22 +32058,29 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
contents.Payload = de_SelectObjectContentEventStream(data, context);
return contents;
}, "de_SelectObjectContentCommand");
- var de_SelectObjectContentCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_SelectObjectContentCommandError");
+ var de_UpdateBucketMetadataInventoryTableConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_UpdateBucketMetadataInventoryTableConfigurationCommand");
+ var de_UpdateBucketMetadataJournalTableConfigurationCommand = __name(async (output, context) => {
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
+ return de_CommandError(output, context);
+ }
+ const contents = (0, import_smithy_client.map)({
+ $metadata: deserializeMetadata(output)
+ });
+ await (0, import_smithy_client.collectBody)(output.body, context);
+ return contents;
+ }, "de_UpdateBucketMetadataJournalTableConfigurationCommand");
var de_UploadPartCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_UploadPartCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29430,6 +32088,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_ETa]: [, output.headers[_eta]],
[_CCRC]: [, output.headers[_xacc]],
[_CCRCC]: [, output.headers[_xacc_]],
+ [_CCRCNVME]: [, output.headers[_xacc__]],
[_CSHA]: [, output.headers[_xacs]],
[_CSHAh]: [, output.headers[_xacs_]],
[_SSECA]: [, output.headers[_xasseca]],
@@ -29441,22 +32100,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_UploadPartCommand");
- var de_UploadPartCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_UploadPartCommandError");
var de_UploadPartCopyCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_UploadPartCopyCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output),
@@ -29468,26 +32114,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
[_BKE]: [() => output.headers[_xassebke] !== undefined, () => (0, import_smithy_client.parseBoolean)(output.headers[_xassebke])],
[_RC]: [, output.headers[_xarc]]
});
- const data = (0, import_smithy_client.expectObject)(await parseBody(output.body, context));
+ const data = (0, import_smithy_client.expectObject)(await (0, import_core.parseXmlBody)(output.body, context));
contents.CopyPartResult = de_CopyPartResult(data, context);
return contents;
}, "de_UploadPartCopyCommand");
- var de_UploadPartCopyCommandError = __name(async (output, context) => {
- const parsedOutput = {
- ...output,
- body: await parseErrorBody(output.body, context)
- };
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_UploadPartCopyCommandError");
var de_WriteGetObjectResponseCommand = __name(async (output, context) => {
if (output.statusCode !== 200 && output.statusCode >= 300) {
- return de_WriteGetObjectResponseCommandError(output, context);
+ return de_CommandError(output, context);
}
const contents = (0, import_smithy_client.map)({
$metadata: deserializeMetadata(output)
@@ -29495,19 +32128,64 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
await (0, import_smithy_client.collectBody)(output.body, context);
return contents;
}, "de_WriteGetObjectResponseCommand");
- var de_WriteGetObjectResponseCommandError = __name(async (output, context) => {
+ var de_CommandError = __name(async (output, context) => {
const parsedOutput = {
...output,
- body: await parseErrorBody(output.body, context)
+ body: await (0, import_core.parseXmlErrorBody)(output.body, context)
};
- const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
- const parsedBody = parsedOutput.body;
- return throwDefaultError({
- output,
- parsedBody,
- errorCode
- });
- }, "de_WriteGetObjectResponseCommandError");
+ const errorCode = (0, import_core.loadRestXmlErrorCode)(output, parsedOutput.body);
+ switch (errorCode) {
+ case "NoSuchUpload":
+ case "com.amazonaws.s3#NoSuchUpload":
+ throw await de_NoSuchUploadRes(parsedOutput, context);
+ case "ObjectNotInActiveTierError":
+ case "com.amazonaws.s3#ObjectNotInActiveTierError":
+ throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context);
+ case "BucketAlreadyExists":
+ case "com.amazonaws.s3#BucketAlreadyExists":
+ throw await de_BucketAlreadyExistsRes(parsedOutput, context);
+ case "BucketAlreadyOwnedByYou":
+ case "com.amazonaws.s3#BucketAlreadyOwnedByYou":
+ throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context);
+ case "NoSuchBucket":
+ case "com.amazonaws.s3#NoSuchBucket":
+ throw await de_NoSuchBucketRes(parsedOutput, context);
+ case "InvalidObjectState":
+ case "com.amazonaws.s3#InvalidObjectState":
+ throw await de_InvalidObjectStateRes(parsedOutput, context);
+ case "NoSuchKey":
+ case "com.amazonaws.s3#NoSuchKey":
+ throw await de_NoSuchKeyRes(parsedOutput, context);
+ case "NotFound":
+ case "com.amazonaws.s3#NotFound":
+ throw await de_NotFoundRes(parsedOutput, context);
+ case "EncryptionTypeMismatch":
+ case "com.amazonaws.s3#EncryptionTypeMismatch":
+ throw await de_EncryptionTypeMismatchRes(parsedOutput, context);
+ case "InvalidRequest":
+ case "com.amazonaws.s3#InvalidRequest":
+ throw await de_InvalidRequestRes(parsedOutput, context);
+ case "InvalidWriteOffset":
+ case "com.amazonaws.s3#InvalidWriteOffset":
+ throw await de_InvalidWriteOffsetRes(parsedOutput, context);
+ case "TooManyParts":
+ case "com.amazonaws.s3#TooManyParts":
+ throw await de_TooManyPartsRes(parsedOutput, context);
+ case "IdempotencyParameterMismatch":
+ case "com.amazonaws.s3#IdempotencyParameterMismatch":
+ throw await de_IdempotencyParameterMismatchRes(parsedOutput, context);
+ case "ObjectAlreadyInActiveTierError":
+ case "com.amazonaws.s3#ObjectAlreadyInActiveTierError":
+ throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context);
+ default:
+ const parsedBody = parsedOutput.body;
+ return throwDefaultError({
+ output,
+ parsedBody,
+ errorCode
+ });
+ }
+ }, "de_CommandError");
var throwDefaultError = (0, import_smithy_client.withBaseException)(S3ServiceException);
var de_BucketAlreadyExistsRes = __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
@@ -29527,6 +32205,24 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_BucketAlreadyOwnedByYouRes");
+ var de_EncryptionTypeMismatchRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const exception = new EncryptionTypeMismatch({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_EncryptionTypeMismatchRes");
+ var de_IdempotencyParameterMismatchRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const exception = new IdempotencyParameterMismatch({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_IdempotencyParameterMismatchRes");
var de_InvalidObjectStateRes = __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
@@ -29542,6 +32238,24 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_InvalidObjectStateRes");
+ var de_InvalidRequestRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const exception = new InvalidRequest({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidRequestRes");
+ var de_InvalidWriteOffsetRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const exception = new InvalidWriteOffset({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_InvalidWriteOffsetRes");
var de_NoSuchBucketRes = __name(async (parsedOutput, context) => {
const contents = (0, import_smithy_client.map)({});
const data = parsedOutput.body;
@@ -29596,6 +32310,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
});
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
}, "de_ObjectNotInActiveTierErrorRes");
+ var de_TooManyPartsRes = __name(async (parsedOutput, context) => {
+ const contents = (0, import_smithy_client.map)({});
+ const data = parsedOutput.body;
+ const exception = new TooManyParts({
+ $metadata: deserializeMetadata(parsedOutput),
+ ...contents
+ });
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
+ }, "de_TooManyPartsRes");
var de_SelectObjectContentEventStream = __name((output, context) => {
return context.eventStreamMarshaller.deserialize(output, async (event) => {
if (event["Records"] != null) {
@@ -29623,24 +32346,24 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
End: await de_EndEvent_event(event["End"], context)
};
}
- return { $unknown: output };
+ return { $unknown: event };
});
}, "de_SelectObjectContentEventStream");
var de_ContinuationEvent_event = __name(async (output, context) => {
const contents = {};
- const data = await parseBody(output.body, context);
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
Object.assign(contents, de_ContinuationEvent(data, context));
return contents;
}, "de_ContinuationEvent_event");
var de_EndEvent_event = __name(async (output, context) => {
const contents = {};
- const data = await parseBody(output.body, context);
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
Object.assign(contents, de_EndEvent(data, context));
return contents;
}, "de_EndEvent_event");
var de_ProgressEvent_event = __name(async (output, context) => {
const contents = {};
- const data = await parseBody(output.body, context);
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
contents.Details = de_Progress(data, context);
return contents;
}, "de_ProgressEvent_event");
@@ -29651,7 +32374,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "de_RecordsEvent_event");
var de_StatsEvent_event = __name(async (output, context) => {
const contents = {};
- const data = await parseBody(output.body, context);
+ const data = await (0, import_core.parseXmlBody)(output.body, context);
contents.Details = de_Stats(data, context);
return contents;
}, "de_StatsEvent_event");
@@ -29731,27 +32454,27 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var se_AnalyticsFilter = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_AF);
AnalyticsFilter.visit(input, {
- Prefix: (value) => {
+ Prefix: __name((value) => {
if (input[_P] != null) {
bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
}
- },
- Tag: (value) => {
+ }, "Prefix"),
+ Tag: __name((value) => {
if (input[_Ta] != null) {
bn.c(se_Tag(value, context).n(_Ta));
}
- },
- And: (value) => {
+ }, "Tag"),
+ And: __name((value) => {
if (input[_A] != null) {
bn.c(se_AnalyticsAndOperator(value, context).n(_A));
}
- },
- _: (name, value) => {
+ }, "And"),
+ _: __name((name, value) => {
if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
throw new Error("Unable to serialize unknown union members in XML.");
}
bn.c(new import_xml_builder.XmlNode(name).c(value));
- }
+ }, "_")
});
return bn;
}, "se_AnalyticsFilter");
@@ -29799,6 +32522,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
bn.cc(input, _ETa);
bn.cc(input, _CCRC);
bn.cc(input, _CCRCC);
+ bn.cc(input, _CCRCNVME);
bn.cc(input, _CSHA);
bn.cc(input, _CSHAh);
if (input[_PN] != null) {
@@ -29852,6 +32576,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (input[_B] != null) {
bn.c(se_BucketInfo(input[_B], context).n(_B));
}
+ bn.lc(input, "Tags", "Tags", () => se_TagSet(input[_Tag], context));
return bn;
}, "se_CreateBucketConfiguration");
var se_CSVInput = __name((input, context) => {
@@ -30142,6 +32867,43 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return bn;
}, "se_InventorySchedule");
+ var se_InventoryTableConfiguration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_ITCn);
+ if (input[_CSo] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_ICS, input[_CSo]).n(_CSo));
+ }
+ if (input[_ECn] != null) {
+ bn.c(se_MetadataTableEncryptionConfiguration(input[_ECn], context).n(_ECn));
+ }
+ return bn;
+ }, "se_InventoryTableConfiguration");
+ var se_InventoryTableConfigurationUpdates = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_ITCU);
+ if (input[_CSo] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_ICS, input[_CSo]).n(_CSo));
+ }
+ if (input[_ECn] != null) {
+ bn.c(se_MetadataTableEncryptionConfiguration(input[_ECn], context).n(_ECn));
+ }
+ return bn;
+ }, "se_InventoryTableConfigurationUpdates");
+ var se_JournalTableConfiguration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_JTC);
+ if (input[_REe] != null) {
+ bn.c(se_RecordExpiration(input[_REe], context).n(_REe));
+ }
+ if (input[_ECn] != null) {
+ bn.c(se_MetadataTableEncryptionConfiguration(input[_ECn], context).n(_ECn));
+ }
+ return bn;
+ }, "se_JournalTableConfiguration");
+ var se_JournalTableConfigurationUpdates = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_JTCU);
+ if (input[_REe] != null) {
+ bn.c(se_RecordExpiration(input[_REe], context).n(_REe));
+ }
+ return bn;
+ }, "se_JournalTableConfigurationUpdates");
var se_JSONInput = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_JSONI);
if (input[_Ty] != null) {
@@ -30177,7 +32939,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var se_LifecycleExpiration = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LEi);
if (input[_Dat] != null) {
- bn.c(import_xml_builder.XmlNode.of(_Dat, (input[_Dat].toISOString().split(".")[0] + "Z").toString()).n(_Dat));
+ bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat));
}
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
@@ -30224,39 +32986,19 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "se_LifecycleRuleAndOperator");
var se_LifecycleRuleFilter = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_LRF);
- LifecycleRuleFilter.visit(input, {
- Prefix: (value) => {
- if (input[_P] != null) {
- bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
- }
- },
- Tag: (value) => {
- if (input[_Ta] != null) {
- bn.c(se_Tag(value, context).n(_Ta));
- }
- },
- ObjectSizeGreaterThan: (value) => {
- if (input[_OSGT] != null) {
- bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(value)).n(_OSGT));
- }
- },
- ObjectSizeLessThan: (value) => {
- if (input[_OSLT] != null) {
- bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(value)).n(_OSLT));
- }
- },
- And: (value) => {
- if (input[_A] != null) {
- bn.c(se_LifecycleRuleAndOperator(value, context).n(_A));
- }
- },
- _: (name, value) => {
- if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
- throw new Error("Unable to serialize unknown union members in XML.");
- }
- bn.c(new import_xml_builder.XmlNode(name).c(value));
- }
- });
+ bn.cc(input, _P);
+ if (input[_Ta] != null) {
+ bn.c(se_Tag(input[_Ta], context).n(_Ta));
+ }
+ if (input[_OSGT] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT));
+ }
+ if (input[_OSLT] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT));
+ }
+ if (input[_A] != null) {
+ bn.c(se_LifecycleRuleAndOperator(input[_A], context).n(_A));
+ }
return bn;
}, "se_LifecycleRuleFilter");
var se_LifecycleRules = __name((input, context) => {
@@ -30285,6 +33027,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return bn;
}, "se_LoggingEnabled");
+ var se_MetadataConfiguration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_MCe);
+ if (input[_JTC] != null) {
+ bn.c(se_JournalTableConfiguration(input[_JTC], context).n(_JTC));
+ }
+ if (input[_ITCn] != null) {
+ bn.c(se_InventoryTableConfiguration(input[_ITCn], context).n(_ITCn));
+ }
+ return bn;
+ }, "se_MetadataConfiguration");
var se_MetadataEntry = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_ME);
if (input[_N] != null) {
@@ -30295,6 +33047,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return bn;
}, "se_MetadataEntry");
+ var se_MetadataTableConfiguration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_MTC);
+ if (input[_STD] != null) {
+ bn.c(se_S3TablesDestination(input[_STD], context).n(_STD));
+ }
+ return bn;
+ }, "se_MetadataTableConfiguration");
+ var se_MetadataTableEncryptionConfiguration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_MTEC);
+ if (input[_SAs] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_TSA, input[_SAs]).n(_SAs));
+ }
+ bn.cc(input, _KKA);
+ return bn;
+ }, "se_MetadataTableEncryptionConfiguration");
var se_Metrics = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Me);
if (input[_S] != null) {
@@ -30325,32 +33092,32 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var se_MetricsFilter = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_MF);
MetricsFilter.visit(input, {
- Prefix: (value) => {
+ Prefix: __name((value) => {
if (input[_P] != null) {
bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
}
- },
- Tag: (value) => {
+ }, "Prefix"),
+ Tag: __name((value) => {
if (input[_Ta] != null) {
bn.c(se_Tag(value, context).n(_Ta));
}
- },
- AccessPointArn: (value) => {
+ }, "Tag"),
+ AccessPointArn: __name((value) => {
if (input[_APAc] != null) {
bn.c(import_xml_builder.XmlNode.of(_APAc, value).n(_APAc));
}
- },
- And: (value) => {
+ }, "AccessPointArn"),
+ And: __name((value) => {
if (input[_A] != null) {
bn.c(se_MetricsAndOperator(value, context).n(_A));
}
- },
- _: (name, value) => {
+ }, "And"),
+ _: __name((name, value) => {
if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
throw new Error("Unable to serialize unknown union members in XML.");
}
bn.c(new import_xml_builder.XmlNode(name).c(value));
- }
+ }, "_")
});
return bn;
}, "se_MetricsFilter");
@@ -30408,6 +33175,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (input[_VI] != null) {
bn.c(import_xml_builder.XmlNode.of(_OVI, input[_VI]).n(_VI));
}
+ bn.cc(input, _ETa);
+ if (input[_LMT] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_LMT, (0, import_smithy_client.dateToUtcString)(input[_LMT]).toString()).n(_LMT));
+ }
+ if (input[_Si] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_Si, String(input[_Si])).n(_Si));
+ }
return bn;
}, "se_ObjectIdentifier");
var se_ObjectIdentifierList = __name((input, context) => {
@@ -30437,7 +33211,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
bn.c(import_xml_builder.XmlNode.of(_OLRM, input[_Mo]).n(_Mo));
}
if (input[_RUD] != null) {
- bn.c(import_xml_builder.XmlNode.of(_Dat, (input[_RUD].toISOString().split(".")[0] + "Z").toString()).n(_RUD));
+ bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_RUD]).toString()).n(_RUD));
}
return bn;
}, "se_ObjectLockRetention");
@@ -30532,6 +33306,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return n.n(_me);
});
}, "se_QueueConfigurationList");
+ var se_RecordExpiration = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_REe);
+ if (input[_Exp] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_ESxp, input[_Exp]).n(_Exp));
+ }
+ if (input[_Da] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_RED, String(input[_Da])).n(_Da));
+ }
+ return bn;
+ }, "se_RecordExpiration");
var se_Redirect = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Red);
bn.cc(input, _HN);
@@ -30595,29 +33379,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "se_ReplicationRuleAndOperator");
var se_ReplicationRuleFilter = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_RRF);
- ReplicationRuleFilter.visit(input, {
- Prefix: (value) => {
- if (input[_P] != null) {
- bn.c(import_xml_builder.XmlNode.of(_P, value).n(_P));
- }
- },
- Tag: (value) => {
- if (input[_Ta] != null) {
- bn.c(se_Tag(value, context).n(_Ta));
- }
- },
- And: (value) => {
- if (input[_A] != null) {
- bn.c(se_ReplicationRuleAndOperator(value, context).n(_A));
- }
- },
- _: (name, value) => {
- if (!(value instanceof import_xml_builder.XmlNode || value instanceof import_xml_builder.XmlText)) {
- throw new Error("Unable to serialize unknown union members in XML.");
- }
- bn.c(new import_xml_builder.XmlNode(name).c(value));
- }
- });
+ bn.cc(input, _P);
+ if (input[_Ta] != null) {
+ bn.c(se_Tag(input[_Ta], context).n(_Ta));
+ }
+ if (input[_A] != null) {
+ bn.c(se_ReplicationRuleAndOperator(input[_A], context).n(_A));
+ }
return bn;
}, "se_ReplicationRuleFilter");
var se_ReplicationRules = __name((input, context) => {
@@ -30717,6 +33485,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
bn.cc(input, _SC);
return bn;
}, "se_S3Location");
+ var se_S3TablesDestination = __name((input, context) => {
+ const bn = new import_xml_builder.XmlNode(_STD);
+ if (input[_TBA] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_STBA, input[_TBA]).n(_TBA));
+ }
+ if (input[_TN] != null) {
+ bn.c(import_xml_builder.XmlNode.of(_STN, input[_TN]).n(_TN));
+ }
+ return bn;
+ }, "se_S3TablesDestination");
var se_ScanRange = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_SR);
if (input[_St] != null) {
@@ -30905,7 +33683,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var se_Transition = __name((input, context) => {
const bn = new import_xml_builder.XmlNode(_Tra);
if (input[_Dat] != null) {
- bn.c(import_xml_builder.XmlNode.of(_Dat, (input[_Dat].toISOString().split(".")[0] + "Z").toString()).n(_Dat));
+ bn.c(import_xml_builder.XmlNode.of(_Dat, (0, import_smithy_client.serializeDateTime)(input[_Dat]).toString()).n(_Dat));
}
if (input[_Da] != null) {
bn.c(import_xml_builder.XmlNode.of(_Da, String(input[_Da])).n(_Da));
@@ -30985,7 +33763,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Tag === "") {
+ if (String(output.Tag).trim() === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
@@ -30997,7 +33775,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
- if (output.Filter === "") {
+ if (String(output.Filter).trim() === "") {
} else if (output[_F] != null) {
contents[_F] = de_AnalyticsFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
}
@@ -31060,6 +33838,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CDr] != null) {
contents[_CDr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CDr]));
}
+ if (output[_BR] != null) {
+ contents[_BR] = (0, import_smithy_client.expectString)(output[_BR]);
+ }
+ if (output[_BA] != null) {
+ contents[_BA] = (0, import_smithy_client.expectString)(output[_BA]);
+ }
return contents;
}, "de_Bucket");
var de_Buckets = __name((output, context) => {
@@ -31075,12 +33859,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
+ if (output[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
+ }
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
if (output[_CSHAh] != null) {
contents[_CSHAh] = (0, import_smithy_client.expectString)(output[_CSHAh]);
}
+ if (output[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
+ }
return contents;
}, "de_Checksum");
var de_ChecksumAlgorithmList = __name((output, context) => {
@@ -31122,12 +33912,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_LM] != null) {
contents[_LM] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LM]));
}
+ if (output[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
+ }
if (output[_CCRC] != null) {
contents[_CCRC] = (0, import_smithy_client.expectString)(output[_CCRC]);
}
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
+ if (output[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
+ }
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
@@ -31150,6 +33946,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
+ if (output[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
+ }
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
@@ -31163,22 +33962,22 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_ID_] != null) {
contents[_ID_] = (0, import_smithy_client.expectString)(output[_ID_]);
}
- if (output.AllowedHeader === "") {
+ if (String(output.AllowedHeader).trim() === "") {
contents[_AHl] = [];
} else if (output[_AH] != null) {
contents[_AHl] = de_AllowedHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_AH]), context);
}
- if (output.AllowedMethod === "") {
+ if (String(output.AllowedMethod).trim() === "") {
contents[_AMl] = [];
} else if (output[_AM] != null) {
contents[_AMl] = de_AllowedMethods((0, import_smithy_client.getArrayIfSingleItem)(output[_AM]), context);
}
- if (output.AllowedOrigin === "") {
+ if (String(output.AllowedOrigin).trim() === "") {
contents[_AOl] = [];
} else if (output[_AO] != null) {
contents[_AOl] = de_AllowedOrigins((0, import_smithy_client.getArrayIfSingleItem)(output[_AO]), context);
}
- if (output.ExposeHeader === "") {
+ if (String(output.ExposeHeader).trim() === "") {
contents[_EH] = [];
} else if (output[_EHx] != null) {
contents[_EH] = de_ExposeHeaders((0, import_smithy_client.getArrayIfSingleItem)(output[_EHx]), context);
@@ -31283,6 +34082,19 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_Destination");
+ var de_DestinationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_TBT] != null) {
+ contents[_TBT] = (0, import_smithy_client.expectString)(output[_TBT]);
+ }
+ if (output[_TBA] != null) {
+ contents[_TBA] = (0, import_smithy_client.expectString)(output[_TBA]);
+ }
+ if (output[_TNa] != null) {
+ contents[_TNa] = (0, import_smithy_client.expectString)(output[_TNa]);
+ }
+ return contents;
+ }, "de_DestinationResult");
var de_EncryptionConfiguration = __name((output, context) => {
const contents = {};
if (output[_RKKID] != null) {
@@ -31310,6 +34122,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de__Error");
+ var de_ErrorDetails = __name((output, context) => {
+ const contents = {};
+ if (output[_EC] != null) {
+ contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]);
+ }
+ if (output[_EM] != null) {
+ contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]);
+ }
+ return contents;
+ }, "de_ErrorDetails");
var de_ErrorDocument = __name((output, context) => {
const contents = {};
if (output[_K] != null) {
@@ -31358,6 +34180,26 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return de_FilterRule(entry, context);
});
}, "de_FilterRuleList");
+ var de_GetBucketMetadataConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_MCR] != null) {
+ contents[_MCR] = de_MetadataConfigurationResult(output[_MCR], context);
+ }
+ return contents;
+ }, "de_GetBucketMetadataConfigurationResult");
+ var de_GetBucketMetadataTableConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_MTCR] != null) {
+ contents[_MTCR] = de_MetadataTableConfigurationResult(output[_MTCR], context);
+ }
+ if (output[_S] != null) {
+ contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
+ }
+ if (output[_Er] != null) {
+ contents[_Er] = de_ErrorDetails(output[_Er], context);
+ }
+ return contents;
+ }, "de_GetBucketMetadataTableConfigurationResult");
var de_GetObjectAttributesParts = __name((output, context) => {
const contents = {};
if (output[_PC] != null) {
@@ -31375,7 +34217,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_IT] != null) {
contents[_IT] = (0, import_smithy_client.parseBoolean)(output[_IT]);
}
- if (output.Part === "") {
+ if (String(output.Part).trim() === "") {
contents[_Part] = [];
} else if (output[_Par] != null) {
contents[_Part] = de_PartsList((0, import_smithy_client.getArrayIfSingleItem)(output[_Par]), context);
@@ -31438,7 +34280,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Tag === "") {
+ if (String(output.Tag).trim() === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
@@ -31456,7 +34298,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
- if (output.Tiering === "") {
+ if (String(output.Tiering).trim() === "") {
contents[_Tie] = [];
} else if (output[_Tier] != null) {
contents[_Tie] = de_TieringList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tier]), context);
@@ -31498,7 +34340,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_IOV] != null) {
contents[_IOV] = (0, import_smithy_client.expectString)(output[_IOV]);
}
- if (output.OptionalFields === "") {
+ if (String(output.OptionalFields).trim() === "") {
contents[_OF] = [];
} else if (output[_OF] != null && output[_OF][_Fi] != null) {
contents[_OF] = de_InventoryOptionalFields((0, import_smithy_client.getArrayIfSingleItem)(output[_OF][_Fi]), context);
@@ -31568,6 +34410,44 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_InventorySchedule");
+ var de_InventoryTableConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_CSo] != null) {
+ contents[_CSo] = (0, import_smithy_client.expectString)(output[_CSo]);
+ }
+ if (output[_TSa] != null) {
+ contents[_TSa] = (0, import_smithy_client.expectString)(output[_TSa]);
+ }
+ if (output[_Er] != null) {
+ contents[_Er] = de_ErrorDetails(output[_Er], context);
+ }
+ if (output[_TN] != null) {
+ contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
+ }
+ if (output[_TAa] != null) {
+ contents[_TAa] = (0, import_smithy_client.expectString)(output[_TAa]);
+ }
+ return contents;
+ }, "de_InventoryTableConfigurationResult");
+ var de_JournalTableConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_TSa] != null) {
+ contents[_TSa] = (0, import_smithy_client.expectString)(output[_TSa]);
+ }
+ if (output[_Er] != null) {
+ contents[_Er] = de_ErrorDetails(output[_Er], context);
+ }
+ if (output[_TN] != null) {
+ contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
+ }
+ if (output[_TAa] != null) {
+ contents[_TAa] = (0, import_smithy_client.expectString)(output[_TAa]);
+ }
+ if (output[_REe] != null) {
+ contents[_REe] = de_RecordExpiration(output[_REe], context);
+ }
+ return contents;
+ }, "de_JournalTableConfigurationResult");
var de_LambdaFunctionConfiguration = __name((output, context) => {
const contents = {};
if (output[_I] != null) {
@@ -31576,7 +34456,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CF] != null) {
contents[_LFA] = (0, import_smithy_client.expectString)(output[_CF]);
}
- if (output.Event === "") {
+ if (String(output.Event).trim() === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
@@ -31615,19 +34495,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Filter === "") {
- } else if (output[_F] != null) {
- contents[_F] = de_LifecycleRuleFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
+ if (output[_F] != null) {
+ contents[_F] = de_LifecycleRuleFilter(output[_F], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
}
- if (output.Transition === "") {
+ if (String(output.Transition).trim() === "") {
contents[_Tr] = [];
} else if (output[_Tra] != null) {
contents[_Tr] = de_TransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Tra]), context);
}
- if (output.NoncurrentVersionTransition === "") {
+ if (String(output.NoncurrentVersionTransition).trim() === "") {
contents[_NVT] = [];
} else if (output[_NVTo] != null) {
contents[_NVT] = de_NoncurrentVersionTransitionList((0, import_smithy_client.getArrayIfSingleItem)(output[_NVTo]), context);
@@ -31645,7 +34524,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Tag === "") {
+ if (String(output.Tag).trim() === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
@@ -31659,32 +34538,23 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return contents;
}, "de_LifecycleRuleAndOperator");
var de_LifecycleRuleFilter = __name((output, context) => {
+ const contents = {};
if (output[_P] != null) {
- return {
- Prefix: (0, import_smithy_client.expectString)(output[_P])
- };
+ contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_Ta] != null) {
- return {
- Tag: de_Tag(output[_Ta], context)
- };
+ contents[_Ta] = de_Tag(output[_Ta], context);
}
if (output[_OSGT] != null) {
- return {
- ObjectSizeGreaterThan: (0, import_smithy_client.strictParseLong)(output[_OSGT])
- };
+ contents[_OSGT] = (0, import_smithy_client.strictParseLong)(output[_OSGT]);
}
if (output[_OSLT] != null) {
- return {
- ObjectSizeLessThan: (0, import_smithy_client.strictParseLong)(output[_OSLT])
- };
+ contents[_OSLT] = (0, import_smithy_client.strictParseLong)(output[_OSLT]);
}
if (output[_A] != null) {
- return {
- And: de_LifecycleRuleAndOperator(output[_A], context)
- };
+ contents[_A] = de_LifecycleRuleAndOperator(output[_A], context);
}
- return { $unknown: Object.entries(output)[0] };
+ return contents;
}, "de_LifecycleRuleFilter");
var de_LifecycleRules = __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
@@ -31696,7 +34566,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_TB] != null) {
contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);
}
- if (output.TargetGrants === "") {
+ if (String(output.TargetGrants).trim() === "") {
contents[_TG] = [];
} else if (output[_TG] != null && output[_TG][_G] != null) {
contents[_TG] = de_TargetGrants((0, import_smithy_client.getArrayIfSingleItem)(output[_TG][_G]), context);
@@ -31709,6 +34579,26 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}
return contents;
}, "de_LoggingEnabled");
+ var de_MetadataConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_DRes] != null) {
+ contents[_DRes] = de_DestinationResult(output[_DRes], context);
+ }
+ if (output[_JTCR] != null) {
+ contents[_JTCR] = de_JournalTableConfigurationResult(output[_JTCR], context);
+ }
+ if (output[_ITCR] != null) {
+ contents[_ITCR] = de_InventoryTableConfigurationResult(output[_ITCR], context);
+ }
+ return contents;
+ }, "de_MetadataConfigurationResult");
+ var de_MetadataTableConfigurationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_STDR] != null) {
+ contents[_STDR] = de_S3TablesDestinationResult(output[_STDR], context);
+ }
+ return contents;
+ }, "de_MetadataTableConfigurationResult");
var de_Metrics = __name((output, context) => {
const contents = {};
if (output[_S] != null) {
@@ -31724,7 +34614,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Tag === "") {
+ if (String(output.Tag).trim() === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
@@ -31739,7 +34629,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_I] != null) {
contents[_I] = (0, import_smithy_client.expectString)(output[_I]);
}
- if (output.Filter === "") {
+ if (String(output.Filter).trim() === "") {
} else if (output[_F] != null) {
contents[_F] = de_MetricsFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
}
@@ -31796,6 +34686,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CA] != null) {
contents[_CA] = (0, import_smithy_client.expectString)(output[_CA]);
}
+ if (output[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
+ }
return contents;
}, "de_MultipartUpload");
var de_MultipartUploadList = __name((output, context) => {
@@ -31849,11 +34742,14 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
- if (output.ChecksumAlgorithm === "") {
+ if (String(output.ChecksumAlgorithm).trim() === "") {
contents[_CA] = [];
} else if (output[_CA] != null) {
contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context);
}
+ if (output[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
+ }
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
@@ -31863,8 +34759,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
- if (output[_RSe] != null) {
- contents[_RSe] = de_RestoreStatus(output[_RSe], context);
+ if (output[_RSes] != null) {
+ contents[_RSes] = de_RestoreStatus(output[_RSes], context);
}
return contents;
}, "de__Object");
@@ -31921,6 +34817,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
+ if (output[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
+ }
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
@@ -31934,11 +34833,14 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_ETa] != null) {
contents[_ETa] = (0, import_smithy_client.expectString)(output[_ETa]);
}
- if (output.ChecksumAlgorithm === "") {
+ if (String(output.ChecksumAlgorithm).trim() === "") {
contents[_CA] = [];
} else if (output[_CA] != null) {
contents[_CA] = de_ChecksumAlgorithmList((0, import_smithy_client.getArrayIfSingleItem)(output[_CA]), context);
}
+ if (output[_CT] != null) {
+ contents[_CT] = (0, import_smithy_client.expectString)(output[_CT]);
+ }
if (output[_Si] != null) {
contents[_Si] = (0, import_smithy_client.strictParseLong)(output[_Si]);
}
@@ -31960,8 +34862,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_O] != null) {
contents[_O] = de_Owner(output[_O], context);
}
- if (output[_RSe] != null) {
- contents[_RSe] = de_RestoreStatus(output[_RSe], context);
+ if (output[_RSes] != null) {
+ contents[_RSes] = de_RestoreStatus(output[_RSes], context);
}
return contents;
}, "de_ObjectVersion");
@@ -31982,7 +34884,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "de_Owner");
var de_OwnershipControls = __name((output, context) => {
const contents = {};
- if (output.Rule === "") {
+ if (String(output.Rule).trim() === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_OwnershipControlsRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
@@ -32021,6 +34923,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_CCRCC] != null) {
contents[_CCRCC] = (0, import_smithy_client.expectString)(output[_CCRCC]);
}
+ if (output[_CCRCNVME] != null) {
+ contents[_CCRCNVME] = (0, import_smithy_client.expectString)(output[_CCRCNVME]);
+ }
if (output[_CSHA] != null) {
contents[_CSHA] = (0, import_smithy_client.expectString)(output[_CSHA]);
}
@@ -32090,7 +34995,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_Qu] != null) {
contents[_QA] = (0, import_smithy_client.expectString)(output[_Qu]);
}
- if (output.Event === "") {
+ if (String(output.Event).trim() === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
@@ -32105,6 +35010,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return de_QueueConfiguration(entry, context);
});
}, "de_QueueConfigurationList");
+ var de_RecordExpiration = __name((output, context) => {
+ const contents = {};
+ if (output[_Exp] != null) {
+ contents[_Exp] = (0, import_smithy_client.expectString)(output[_Exp]);
+ }
+ if (output[_Da] != null) {
+ contents[_Da] = (0, import_smithy_client.strictParseInt32)(output[_Da]);
+ }
+ return contents;
+ }, "de_RecordExpiration");
var de_Redirect = __name((output, context) => {
const contents = {};
if (output[_HN] != null) {
@@ -32146,7 +35061,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_Ro] != null) {
contents[_Ro] = (0, import_smithy_client.expectString)(output[_Ro]);
}
- if (output.Rule === "") {
+ if (String(output.Rule).trim() === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_ReplicationRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
@@ -32164,9 +35079,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Filter === "") {
- } else if (output[_F] != null) {
- contents[_F] = de_ReplicationRuleFilter((0, import_smithy_client.expectUnion)(output[_F]), context);
+ if (output[_F] != null) {
+ contents[_F] = de_ReplicationRuleFilter(output[_F], context);
}
if (output[_S] != null) {
contents[_S] = (0, import_smithy_client.expectString)(output[_S]);
@@ -32190,7 +35104,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_P] != null) {
contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
- if (output.Tag === "") {
+ if (String(output.Tag).trim() === "") {
contents[_Tag] = [];
} else if (output[_Ta] != null) {
contents[_Tag] = de_TagSet((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta]), context);
@@ -32198,22 +35112,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return contents;
}, "de_ReplicationRuleAndOperator");
var de_ReplicationRuleFilter = __name((output, context) => {
+ const contents = {};
if (output[_P] != null) {
- return {
- Prefix: (0, import_smithy_client.expectString)(output[_P])
- };
+ contents[_P] = (0, import_smithy_client.expectString)(output[_P]);
}
if (output[_Ta] != null) {
- return {
- Tag: de_Tag(output[_Ta], context)
- };
+ contents[_Ta] = de_Tag(output[_Ta], context);
}
if (output[_A] != null) {
- return {
- And: de_ReplicationRuleAndOperator(output[_A], context)
- };
+ contents[_A] = de_ReplicationRuleAndOperator(output[_A], context);
}
- return { $unknown: Object.entries(output)[0] };
+ return contents;
}, "de_ReplicationRuleFilter");
var de_ReplicationRules = __name((output, context) => {
return (output || []).filter((e) => e != null).map((entry) => {
@@ -32242,8 +35151,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_IRIP] != null) {
contents[_IRIP] = (0, import_smithy_client.parseBoolean)(output[_IRIP]);
}
- if (output[_RED] != null) {
- contents[_RED] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_RED]));
+ if (output[_REDe] != null) {
+ contents[_REDe] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_REDe]));
}
return contents;
}, "de_RestoreStatus");
@@ -32264,13 +35173,29 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "de_RoutingRules");
var de_S3KeyFilter = __name((output, context) => {
const contents = {};
- if (output.FilterRule === "") {
+ if (String(output.FilterRule).trim() === "") {
contents[_FRi] = [];
} else if (output[_FR] != null) {
contents[_FRi] = de_FilterRuleList((0, import_smithy_client.getArrayIfSingleItem)(output[_FR]), context);
}
return contents;
}, "de_S3KeyFilter");
+ var de_S3TablesDestinationResult = __name((output, context) => {
+ const contents = {};
+ if (output[_TBA] != null) {
+ contents[_TBA] = (0, import_smithy_client.expectString)(output[_TBA]);
+ }
+ if (output[_TN] != null) {
+ contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);
+ }
+ if (output[_TAa] != null) {
+ contents[_TAa] = (0, import_smithy_client.expectString)(output[_TAa]);
+ }
+ if (output[_TNa] != null) {
+ contents[_TNa] = (0, import_smithy_client.expectString)(output[_TNa]);
+ }
+ return contents;
+ }, "de_S3TablesDestinationResult");
var de_ServerSideEncryptionByDefault = __name((output, context) => {
const contents = {};
if (output[_SSEA] != null) {
@@ -32283,7 +35208,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
}, "de_ServerSideEncryptionByDefault");
var de_ServerSideEncryptionConfiguration = __name((output, context) => {
const contents = {};
- if (output.Rule === "") {
+ if (String(output.Rule).trim() === "") {
contents[_Rul] = [];
} else if (output[_Ru] != null) {
contents[_Rul] = de_ServerSideEncryptionRules((0, import_smithy_client.getArrayIfSingleItem)(output[_Ru]), context);
@@ -32446,7 +35371,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
if (output[_Top] != null) {
contents[_TA] = (0, import_smithy_client.expectString)(output[_Top]);
}
- if (output.Event === "") {
+ if (String(output.Event).trim() === "") {
contents[_Eve] = [];
} else if (output[_Ev] != null) {
contents[_Eve] = de_EventList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ev]), context);
@@ -32486,7 +35411,6 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
cfId: output.headers["x-amz-cf-id"]
}), "deserializeMetadata");
var collectBodyString = __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
- var isSerializableHeaderValue = __name((value) => value !== undefined && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0), "isSerializableHeaderValue");
var _A = "And";
var _AAO = "AnalyticsAndOperator";
var _AC = "AnalyticsConfiguration";
@@ -32521,6 +35445,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _AT = "AccessTier";
var _Ac = "Account";
var _B = "Bucket";
+ var _BA = "BucketArn";
var _BAI = "BucketAccountId";
var _BAS = "BucketAccelerateStatus";
var _BGR = "BypassGovernanceRetention";
@@ -32549,6 +35474,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _CC = "CacheControl";
var _CCRC = "ChecksumCRC32";
var _CCRCC = "ChecksumCRC32C";
+ var _CCRCNVME = "ChecksumCRC64NVME";
var _CD = "ContentDisposition";
var _CDr = "CreationDate";
var _CE = "ContentEncoding";
@@ -32581,9 +35507,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _CSVI = "CopySourceVersionId";
var _CSVIn = "CSVInput";
var _CSVO = "CSVOutput";
- var _CT = "ContentType";
- var _CTo = "ContinuationToken";
+ var _CSo = "ConfigurationState";
+ var _CT = "ChecksumType";
+ var _CTl = "ClientToken";
+ var _CTo = "ContentType";
var _CTom = "CompressionType";
+ var _CTon = "ContinuationToken";
var _Ch = "Checksum";
var _Co = "Contents";
var _Cod = "Code";
@@ -32592,6 +35521,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _D = "Delimiter";
var _DAI = "DaysAfterInitiation";
var _DE = "DataExport";
+ var _DIM = "DestinationIfMatch";
+ var _DIMS = "DestinationIfModifiedSince";
+ var _DINM = "DestinationIfNoneMatch";
+ var _DIUS = "DestinationIfUnmodifiedSince";
var _DM = "DeleteMarker";
var _DMR = "DeleteMarkerReplication";
var _DMRS = "DeleteMarkerReplicationStatus";
@@ -32600,6 +35533,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _DN = "DisplayName";
var _DR = "DataRedundancy";
var _DRe = "DefaultRetention";
+ var _DRes = "DestinationResult";
var _Da = "Days";
var _Dat = "Date";
var _De = "Deleted";
@@ -32623,6 +35557,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _ES = "ExpiresString";
var _ESBO = "ExpectedSourceBucketOwner";
var _ESx = "ExpirationStatus";
+ var _ESxp = "ExpirationState";
var _ET = "EncodingType";
var _ETa = "ETag";
var _ETn = "EncryptionType";
@@ -32663,6 +35598,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _I = "Id";
var _IC = "InventoryConfiguration";
var _ICL = "InventoryConfigurationList";
+ var _ICS = "InventoryConfigurationState";
var _ID = "IndexDocument";
var _ID_ = "ID";
var _IDn = "InventoryDestination";
@@ -32675,7 +35611,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _IIOV = "InventoryIncludedObjectVersions";
var _IL = "IsLatest";
var _IM = "IfMatch";
- var _IMS = "IfModifiedSince";
+ var _IMIT = "IfMatchInitiatedTime";
+ var _IMLMT = "IfMatchLastModifiedTime";
+ var _IMS = "IfMatchSize";
+ var _IMSf = "IfModifiedSince";
var _INM = "IfNoneMatch";
var _IOF = "InventoryOptionalField";
var _IOV = "IncludedObjectVersions";
@@ -32690,6 +35629,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _ITAT = "IntelligentTieringAccessTier";
var _ITC = "IntelligentTieringConfiguration";
var _ITCL = "IntelligentTieringConfigurationList";
+ var _ITCR = "InventoryTableConfigurationResult";
+ var _ITCU = "InventoryTableConfigurationUpdates";
+ var _ITCn = "InventoryTableConfiguration";
var _ITD = "IntelligentTieringDays";
var _ITF = "IntelligentTieringFilter";
var _ITI = "IntelligentTieringId";
@@ -32701,9 +35643,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _JSONI = "JSONInput";
var _JSONO = "JSONOutput";
var _JSONT = "JSONType";
+ var _JTC = "JournalTableConfiguration";
+ var _JTCR = "JournalTableConfigurationResult";
+ var _JTCU = "JournalTableConfigurationUpdates";
var _K = "Key";
var _KC = "KeyCount";
var _KI = "KeyId";
+ var _KKA = "KmsKeyArn";
var _KM = "KeyMarker";
var _KMSC = "KMSContext";
var _KMSKI = "KMSKeyId";
@@ -32718,6 +35664,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _LFCa = "LambdaFunctionConfiguration";
var _LI = "LocationInfo";
var _LM = "LastModified";
+ var _LMT = "LastModifiedTime";
var _LNAS = "LocationNameAsString";
var _LP = "LocationPrefix";
var _LR = "LifecycleRule";
@@ -32727,8 +35674,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _M = "Marker";
var _MAO = "MetricsAndOperator";
var _MAS = "MaxAgeSeconds";
+ var _MB = "MaxBuckets";
var _MC = "MetricsConfiguration";
var _MCL = "MetricsConfigurationList";
+ var _MCR = "MetadataConfigurationResult";
+ var _MCe = "MetadataConfiguration";
var _MD = "MetadataDirective";
var _MDB = "MaxDirectoryBuckets";
var _MDf = "MfaDelete";
@@ -32740,8 +35690,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _MK = "MaxKeys";
var _MKe = "MetadataKey";
var _MM = "MissingMeta";
+ var _MOS = "MpuObjectSize";
var _MP = "MaxParts";
var _MS = "MetricsStatus";
+ var _MTC = "MetadataTableConfiguration";
+ var _MTCR = "MetadataTableConfigurationResult";
+ var _MTEC = "MetadataTableEncryptionConfiguration";
var _MU = "MaxUploads";
var _MV = "MetadataValue";
var _Me = "Metrics";
@@ -32829,7 +35783,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _RCe = "ReplicationConfiguration";
var _RD = "RecordDelimiter";
var _RE = "ResponseExpires";
- var _RED = "RestoreExpiryDate";
+ var _RED = "RecordExpirationDays";
+ var _REDe = "RestoreExpiryDate";
+ var _REe = "RecordExpiration";
var _RKKID = "ReplicaKmsKeyID";
var _RKPW = "ReplaceKeyPrefixWith";
var _RKW = "ReplaceKeyWith";
@@ -32849,8 +35805,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _RRes = "RestoreRequest";
var _RRo = "RoutingRules";
var _RRou = "RoutingRule";
- var _RS = "ReplicationStatus";
- var _RSe = "RestoreStatus";
+ var _RS = "RenameSource";
+ var _RSe = "ReplicationStatus";
+ var _RSes = "RestoreStatus";
var _RT = "RequestToken";
var _RTS = "ReplicationTimeStatus";
var _RTV = "ReplicationTimeValue";
@@ -32864,6 +35821,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _S = "Status";
var _SA = "StartAfter";
var _SAK = "SecretAccessKey";
+ var _SAs = "SseAlgorithm";
var _SBD = "S3BucketDestination";
var _SC = "StorageClass";
var _SCA = "StorageClassAnalysis";
@@ -32871,6 +35829,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _SCASV = "StorageClassAnalysisSchemaVersion";
var _SCt = "StatusCode";
var _SDV = "SkipDestinationValidation";
+ var _SIM = "SourceIfMatch";
+ var _SIMS = "SourceIfModifiedSince";
+ var _SINM = "SourceIfNoneMatch";
+ var _SIUS = "SourceIfUnmodifiedSince";
var _SK = "SSE-KMS";
var _SKEO = "SseKmsEncryptedObjects";
var _SKEOS = "SseKmsEncryptedObjectsStatus";
@@ -32897,6 +35859,10 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _SSER = "ServerSideEncryptionRule";
var _SSES = "SSES3";
var _ST = "SessionToken";
+ var _STBA = "S3TablesBucketArn";
+ var _STD = "S3TablesDestination";
+ var _STDR = "S3TablesDestinationResult";
+ var _STN = "S3TablesName";
var _S_ = "S3";
var _Sc = "Schedule";
var _Se = "Setting";
@@ -32905,18 +35871,26 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _Su = "Suffix";
var _T = "Tagging";
var _TA = "TopicArn";
+ var _TAa = "TableArn";
var _TB = "TargetBucket";
+ var _TBA = "TableBucketArn";
+ var _TBT = "TableBucketType";
var _TC = "TagCount";
var _TCo = "TopicConfiguration";
var _TCop = "TopicConfigurations";
var _TD = "TaggingDirective";
+ var _TDMOS = "TransitionDefaultMinimumObjectSize";
var _TG = "TargetGrants";
var _TGa = "TargetGrant";
+ var _TN = "TableName";
+ var _TNa = "TableNamespace";
var _TOKF = "TargetObjectKeyFormat";
var _TP = "TargetPrefix";
var _TPC = "TotalPartsCount";
var _TS = "TagSet";
+ var _TSA = "TableSseAlgorithm";
var _TSC = "TransitionStorageClass";
+ var _TSa = "TableStatus";
var _Ta = "Tag";
var _Tag = "Tags";
var _Ti = "Tier";
@@ -32942,6 +35916,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _Va = "Value";
var _Ve = "Versions";
var _WC = "WebsiteConfiguration";
+ var _WOB = "WriteOffsetBytes";
var _WRL = "WebsiteRedirectLocation";
var _Y = "Years";
var _a = "analytics";
@@ -32949,6 +35924,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _acl = "acl";
var _ar = "accept-ranges";
var _at = "attributes";
+ var _br = "bucket-region";
var _c = "cors";
var _cc = "cache-control";
var _cd = "content-disposition";
@@ -32982,7 +35958,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _log = "logging";
var _lt = "list-type";
var _m = "metrics";
+ var _mC = "metadataConfiguration";
+ var _mIT = "metadataInventoryTable";
+ var _mJT = "metadataJournalTable";
+ var _mT = "metadataTable";
var _ma = "marker";
+ var _mb = "max-buckets";
var _mdb = "max-directory-buckets";
var _me = "member";
var _mk = "max-keys";
@@ -32998,6 +35979,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _pnm = "part-number-marker";
var _pr = "prefix";
var _r = "replication";
+ var _rO = "renameObject";
var _rP = "requestPayment";
var _ra = "range";
var _rcc = "response-cache-control";
@@ -33029,6 +36011,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xaapa = "x-amz-access-point-alias";
var _xaari = "x-amz-abort-rule-id";
var _xaas = "x-amz-archive-status";
+ var _xaba = "x-amz-bucket-arn";
var _xabgr = "x-amz-bypass-governance-retention";
var _xabln = "x-amz-bucket-location-name";
var _xablt = "x-amz-bucket-location-type";
@@ -33038,6 +36021,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xaca = "x-amz-checksum-algorithm";
var _xacc = "x-amz-checksum-crc32";
var _xacc_ = "x-amz-checksum-crc32c";
+ var _xacc__ = "x-amz-checksum-crc64nvme";
var _xacm = "x-amz-checksum-mode";
var _xacrsba = "x-amz-confirm-remove-self-bucket-access";
var _xacs = "x-amz-checksum-sha1";
@@ -33053,6 +36037,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key";
var _xacssseckm = "x-amz-copy-source-server-side-encryption-customer-key-md5";
var _xacsvi = "x-amz-copy-source-version-id";
+ var _xact = "x-amz-checksum-type";
+ var _xact_ = "x-amz-client-token";
var _xadm = "x-amz-delete-marker";
var _xae = "x-amz-expiration";
var _xaebo = "x-amz-expected-bucket-owner";
@@ -33070,6 +36056,7 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xafhlm = "x-amz-fwd-header-last-modified";
var _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32";
var _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c";
+ var _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme";
var _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1";
var _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256";
var _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker";
@@ -33096,9 +36083,13 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xagra = "x-amz-grant-read-acp";
var _xagw = "x-amz-grant-write";
var _xagwa = "x-amz-grant-write-acp";
+ var _xaimit = "x-amz-if-match-initiated-time";
+ var _xaimlmt = "x-amz-if-match-last-modified-time";
+ var _xaims = "x-amz-if-match-size";
var _xam = "x-amz-mfa";
var _xamd = "x-amz-metadata-directive";
var _xamm = "x-amz-missing-meta";
+ var _xamos = "x-amz-mp-object-size";
var _xamp = "x-amz-max-parts";
var _xampc = "x-amz-mp-parts-count";
var _xaoa = "x-amz-object-attributes";
@@ -33107,13 +36098,19 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xaolrud = "x-amz-object-lock-retain-until-date";
var _xaoo = "x-amz-object-ownership";
var _xaooa = "x-amz-optional-object-attributes";
+ var _xaos = "x-amz-object-size";
var _xapnm = "x-amz-part-number-marker";
var _xar = "x-amz-restore";
var _xarc = "x-amz-request-charged";
var _xarop = "x-amz-restore-output-path";
var _xarp = "x-amz-request-payer";
var _xarr = "x-amz-request-route";
- var _xars = "x-amz-replication-status";
+ var _xars = "x-amz-rename-source";
+ var _xars_ = "x-amz-replication-status";
+ var _xarsim = "x-amz-rename-source-if-match";
+ var _xarsims = "x-amz-rename-source-if-modified-since";
+ var _xarsinm = "x-amz-rename-source-if-none-match";
+ var _xarsius = "x-amz-rename-source-if-unmodified-since";
var _xart = "x-amz-request-token";
var _xasc = "x-amz-storage-class";
var _xasca = "x-amz-sdk-checksum-algorithm";
@@ -33129,128 +36126,134 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
var _xat = "x-amz-tagging";
var _xatc = "x-amz-tagging-count";
var _xatd = "x-amz-tagging-directive";
+ var _xatdmos = "x-amz-transition-default-minimum-object-size";
var _xavi = "x-amz-version-id";
+ var _xawob = "x-amz-write-offset-bytes";
var _xawrl = "x-amz-website-redirect-location";
var _xi = "x-id";
- var parseBody = __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
- if (encoded.length) {
- const parser = new import_fast_xml_parser.XMLParser({
- attributeNamePrefix: "",
- htmlEntities: true,
- ignoreAttributes: false,
- ignoreDeclaration: true,
- parseTagValue: false,
- trimValues: false,
- tagValueProcessor: (_, val2) => val2.trim() === "" && val2.includes("\n") ? "" : undefined
- });
- parser.addEntity("#xD", "\r");
- parser.addEntity("#10", "\n");
- const parsedObj = parser.parse(encoded);
- const textNodeName = "#text";
- const key = Object.keys(parsedObj)[0];
- const parsedObjToReturn = parsedObj[key];
- if (parsedObjToReturn[textNodeName]) {
- parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
- delete parsedObjToReturn[textNodeName];
- }
- return (0, import_smithy_client.getValueFromTextNode)(parsedObjToReturn);
- }
- return {};
- }), "parseBody");
- var parseErrorBody = __name(async (errorBody, context) => {
- const value = await parseBody(errorBody, context);
- if (value.Error) {
- value.Error.message = value.Error.message ?? value.Error.Message;
- }
- return value;
- }, "parseErrorBody");
- var loadRestXmlErrorCode = __name((output, data) => {
- if ((data == null ? undefined : data.Code) !== undefined) {
- return data.Code;
- }
- if (output.statusCode == 404) {
- return "NotFound";
- }
- }, "loadRestXmlErrorCode");
- var _CreateSessionCommand = class _CreateSessionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var CreateSessionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s3.getThrow200ExceptionsPlugin)(config)
];
- }).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").f(undefined, CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build() {
+ }).s("AmazonS3", "CreateSession", {}).n("S3Client", "CreateSessionCommand").f(CreateSessionRequestFilterSensitiveLog, CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build() {
+ static {
+ __name(this, "CreateSessionCommand");
+ }
};
- __name(_CreateSessionCommand, "CreateSessionCommand");
- var CreateSessionCommand = _CreateSessionCommand;
- var import_runtimeConfig = require_runtimeConfig3();
- var import_region_config_resolver = require_dist_cjs51();
- var asPartial = __name((t) => t, "asPartial");
- var resolveRuntimeExtensions = __name((runtimeConfig, extensions) => {
- const extensionConfiguration = {
- ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
- ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
+ var import_runtimeConfig = require_runtimeConfig4();
+ var import_region_config_resolver = require_dist_cjs57();
+ var getHttpAuthExtensionConfiguration = __name((runtimeConfig) => {
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
+ let _credentials = runtimeConfig.credentials;
+ return {
+ setHttpAuthScheme(httpAuthScheme) {
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
+ if (index === -1) {
+ _httpAuthSchemes.push(httpAuthScheme);
+ } else {
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
+ }
+ },
+ httpAuthSchemes() {
+ return _httpAuthSchemes;
+ },
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
+ },
+ httpAuthSchemeProvider() {
+ return _httpAuthSchemeProvider;
+ },
+ setCredentials(credentials) {
+ _credentials = credentials;
+ },
+ credentials() {
+ return _credentials;
+ }
};
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ }, "getHttpAuthExtensionConfiguration");
+ var resolveHttpAuthRuntimeConfig = __name((config) => {
return {
- ...runtimeConfig,
- ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
- ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
- ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
+ httpAuthSchemes: config.httpAuthSchemes(),
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
+ credentials: config.credentials()
};
+ }, "resolveHttpAuthRuntimeConfig");
+ var resolveRuntimeExtensions = __name((runtimeConfig, extensions) => {
+ const extensionConfiguration = Object.assign((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig), (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
+ return Object.assign(runtimeConfig, (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
}, "resolveRuntimeExtensions");
- var _S3Client = class _S3Client2 extends import_smithy_client.Client {
+ var S3Client = class extends import_smithy_client.Client {
+ static {
+ __name(this, "S3Client");
+ }
+ config;
constructor(...[configuration]) {
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
+ super(_config_0);
+ this.initConfig = _config_0;
const _config_1 = resolveClientEndpointParameters(_config_0);
- const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
- const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
+ const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
+ const _config_3 = (0, import_middleware_flexible_checksums.resolveFlexibleChecksumsConfig)(_config_2);
const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
- const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
- const _config_7 = (0, import_middleware_sdk_s3.resolveS3Config)(_config_6, { session: [() => this, CreateSessionCommand] });
- const _config_8 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_7);
- const _config_9 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_8);
- const _config_10 = resolveRuntimeExtensions(_config_9, (configuration == null ? undefined : configuration.extensions) || []);
- super(_config_10);
- this.config = _config_10;
+ const _config_5 = (0, import_config_resolver.resolveRegionConfig)(_config_4);
+ const _config_6 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_5);
+ const _config_7 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_6);
+ const _config_8 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_7);
+ const _config_9 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_8);
+ const _config_10 = (0, import_middleware_sdk_s32.resolveS3Config)(_config_9, { session: [() => this, CreateSessionCommand] });
+ const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
+ this.config = _config_11;
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_sdk_s3.getValidateBucketNamePlugin)(this.config));
+ this.middlewareStack.use((0, import_core3.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
+ httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultS3HttpAuthSchemeParametersProvider,
+ identityProviderConfigProvider: __name(async (config) => new import_core3.DefaultIdentityProviderConfig({
+ "aws.auth#sigv4": config.credentials,
+ "aws.auth#sigv4a": config.credentials
+ }), "identityProviderConfigProvider")
+ }));
+ this.middlewareStack.use((0, import_core3.getHttpSigningPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_sdk_s32.getValidateBucketNamePlugin)(this.config));
this.middlewareStack.use((0, import_middleware_expect_continue.getAddExpectContinuePlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_sdk_s3.getRegionRedirectMiddlewarePlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_sdk_s3.getS3ExpressPlugin)(this.config));
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_sdk_s32.getRegionRedirectMiddlewarePlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressPlugin)(this.config));
+ this.middlewareStack.use((0, import_middleware_sdk_s32.getS3ExpressHttpSigningPlugin)(this.config));
}
destroy() {
super.destroy();
}
};
- __name(_S3Client, "S3Client");
- var S3Client = _S3Client;
- var _AbortMultipartUploadCommand = class _AbortMultipartUploadCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s33 = require_dist_cjs34();
+ var AbortMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s33.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "AbortMultipartUpload", {}).n("S3Client", "AbortMultipartUploadCommand").f(undefined, undefined).ser(se_AbortMultipartUploadCommand).de(de_AbortMultipartUploadCommand).build() {
+ static {
+ __name(this, "AbortMultipartUploadCommand");
+ }
};
- __name(_AbortMultipartUploadCommand, "AbortMultipartUploadCommand");
- var AbortMultipartUploadCommand = _AbortMultipartUploadCommand;
- var import_middleware_sdk_s32 = require_dist_cjs24();
- var import_middleware_ssec = require_dist_cjs65();
- var _CompleteMultipartUploadCommand = class _CompleteMultipartUploadCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s34 = require_dist_cjs34();
+ var import_middleware_ssec = require_dist_cjs70();
+ var CompleteMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -33258,31 +36261,36 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_sdk_s32.getThrow200ExceptionsPlugin)(config),
+ (0, import_middleware_sdk_s34.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CompleteMultipartUpload", {}).n("S3Client", "CompleteMultipartUploadCommand").f(CompleteMultipartUploadRequestFilterSensitiveLog, CompleteMultipartUploadOutputFilterSensitiveLog).ser(se_CompleteMultipartUploadCommand).de(de_CompleteMultipartUploadCommand).build() {
+ static {
+ __name(this, "CompleteMultipartUploadCommand");
+ }
};
- __name(_CompleteMultipartUploadCommand, "CompleteMultipartUploadCommand");
- var CompleteMultipartUploadCommand = _CompleteMultipartUploadCommand;
- var import_middleware_sdk_s33 = require_dist_cjs24();
- var _CopyObjectCommand = class _CopyObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s35 = require_dist_cjs34();
+ var CopyObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
- Bucket: { type: "contextParams", name: "Bucket" }
+ Bucket: { type: "contextParams", name: "Bucket" },
+ Key: { type: "contextParams", name: "Key" },
+ CopySource: { type: "contextParams", name: "CopySource" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_sdk_s33.getThrow200ExceptionsPlugin)(config),
+ (0, import_middleware_sdk_s35.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CopyObject", {}).n("S3Client", "CopyObjectCommand").f(CopyObjectRequestFilterSensitiveLog, CopyObjectOutputFilterSensitiveLog).ser(se_CopyObjectCommand).de(de_CopyObjectCommand).build() {
+ static {
+ __name(this, "CopyObjectCommand");
+ }
};
- __name(_CopyObjectCommand, "CopyObjectCommand");
- var CopyObjectCommand = _CopyObjectCommand;
- var import_middleware_location_constraint = require_dist_cjs66();
- var _CreateBucketCommand = class _CreateBucketCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_location_constraint = require_dist_cjs71();
+ var import_middleware_sdk_s36 = require_dist_cjs34();
+ var CreateBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
DisableAccessPoints: { type: "staticContextParams", value: true },
@@ -33291,13 +36299,52 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s36.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_location_constraint.getLocationConstraintPlugin)(config)
];
}).s("AmazonS3", "CreateBucket", {}).n("S3Client", "CreateBucketCommand").f(undefined, undefined).ser(se_CreateBucketCommand).de(de_CreateBucketCommand).build() {
+ static {
+ __name(this, "CreateBucketCommand");
+ }
};
- __name(_CreateBucketCommand, "CreateBucketCommand");
- var CreateBucketCommand = _CreateBucketCommand;
- var _CreateMultipartUploadCommand = class _CreateMultipartUploadCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var CreateBucketMetadataConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
+ requestChecksumRequired: true
+ })
+ ];
+ }).s("AmazonS3", "CreateBucketMetadataConfiguration", {}).n("S3Client", "CreateBucketMetadataConfigurationCommand").f(undefined, undefined).ser(se_CreateBucketMetadataConfigurationCommand).de(de_CreateBucketMetadataConfigurationCommand).build() {
+ static {
+ __name(this, "CreateBucketMetadataConfigurationCommand");
+ }
+ };
+ var CreateBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
+ requestChecksumRequired: true
+ })
+ ];
+ }).s("AmazonS3", "CreateBucketMetadataTableConfiguration", {}).n("S3Client", "CreateBucketMetadataTableConfigurationCommand").f(undefined, undefined).ser(se_CreateBucketMetadataTableConfigurationCommand).de(de_CreateBucketMetadataTableConfigurationCommand).build() {
+ static {
+ __name(this, "CreateBucketMetadataTableConfigurationCommand");
+ }
+ };
+ var import_middleware_sdk_s37 = require_dist_cjs34();
+ var CreateMultipartUploadCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -33305,13 +36352,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s37.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "CreateMultipartUpload", {}).n("S3Client", "CreateMultipartUploadCommand").f(CreateMultipartUploadRequestFilterSensitiveLog, CreateMultipartUploadOutputFilterSensitiveLog).ser(se_CreateMultipartUploadCommand).de(de_CreateMultipartUploadCommand).build() {
+ static {
+ __name(this, "CreateMultipartUploadCommand");
+ }
};
- __name(_CreateMultipartUploadCommand, "CreateMultipartUploadCommand");
- var CreateMultipartUploadCommand = _CreateMultipartUploadCommand;
- var _DeleteBucketAnalyticsConfigurationCommand = class _DeleteBucketAnalyticsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33321,10 +36370,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketAnalyticsConfiguration", {}).n("S3Client", "DeleteBucketAnalyticsConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketAnalyticsConfigurationCommand).de(de_DeleteBucketAnalyticsConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketAnalyticsConfigurationCommand");
+ }
};
- __name(_DeleteBucketAnalyticsConfigurationCommand, "DeleteBucketAnalyticsConfigurationCommand");
- var DeleteBucketAnalyticsConfigurationCommand = _DeleteBucketAnalyticsConfigurationCommand;
- var _DeleteBucketCommand = class _DeleteBucketCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33334,10 +36384,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucket", {}).n("S3Client", "DeleteBucketCommand").f(undefined, undefined).ser(se_DeleteBucketCommand).de(de_DeleteBucketCommand).build() {
+ static {
+ __name(this, "DeleteBucketCommand");
+ }
};
- __name(_DeleteBucketCommand, "DeleteBucketCommand");
- var DeleteBucketCommand = _DeleteBucketCommand;
- var _DeleteBucketCorsCommand = class _DeleteBucketCorsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33347,10 +36398,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketCors", {}).n("S3Client", "DeleteBucketCorsCommand").f(undefined, undefined).ser(se_DeleteBucketCorsCommand).de(de_DeleteBucketCorsCommand).build() {
+ static {
+ __name(this, "DeleteBucketCorsCommand");
+ }
};
- __name(_DeleteBucketCorsCommand, "DeleteBucketCorsCommand");
- var DeleteBucketCorsCommand = _DeleteBucketCorsCommand;
- var _DeleteBucketEncryptionCommand = class _DeleteBucketEncryptionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33360,10 +36412,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketEncryption", {}).n("S3Client", "DeleteBucketEncryptionCommand").f(undefined, undefined).ser(se_DeleteBucketEncryptionCommand).de(de_DeleteBucketEncryptionCommand).build() {
+ static {
+ __name(this, "DeleteBucketEncryptionCommand");
+ }
};
- __name(_DeleteBucketEncryptionCommand, "DeleteBucketEncryptionCommand");
- var DeleteBucketEncryptionCommand = _DeleteBucketEncryptionCommand;
- var _DeleteBucketIntelligentTieringConfigurationCommand = class _DeleteBucketIntelligentTieringConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33373,10 +36426,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketIntelligentTieringConfiguration", {}).n("S3Client", "DeleteBucketIntelligentTieringConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketIntelligentTieringConfigurationCommand).de(de_DeleteBucketIntelligentTieringConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketIntelligentTieringConfigurationCommand");
+ }
};
- __name(_DeleteBucketIntelligentTieringConfigurationCommand, "DeleteBucketIntelligentTieringConfigurationCommand");
- var DeleteBucketIntelligentTieringConfigurationCommand = _DeleteBucketIntelligentTieringConfigurationCommand;
- var _DeleteBucketInventoryConfigurationCommand = class _DeleteBucketInventoryConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33386,10 +36440,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketInventoryConfiguration", {}).n("S3Client", "DeleteBucketInventoryConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketInventoryConfigurationCommand).de(de_DeleteBucketInventoryConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketInventoryConfigurationCommand");
+ }
};
- __name(_DeleteBucketInventoryConfigurationCommand, "DeleteBucketInventoryConfigurationCommand");
- var DeleteBucketInventoryConfigurationCommand = _DeleteBucketInventoryConfigurationCommand;
- var _DeleteBucketLifecycleCommand = class _DeleteBucketLifecycleCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketLifecycleCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33399,10 +36454,39 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketLifecycle", {}).n("S3Client", "DeleteBucketLifecycleCommand").f(undefined, undefined).ser(se_DeleteBucketLifecycleCommand).de(de_DeleteBucketLifecycleCommand).build() {
+ static {
+ __name(this, "DeleteBucketLifecycleCommand");
+ }
};
- __name(_DeleteBucketLifecycleCommand, "DeleteBucketLifecycleCommand");
- var DeleteBucketLifecycleCommand = _DeleteBucketLifecycleCommand;
- var _DeleteBucketMetricsConfigurationCommand = class _DeleteBucketMetricsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketMetadataConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("AmazonS3", "DeleteBucketMetadataConfiguration", {}).n("S3Client", "DeleteBucketMetadataConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketMetadataConfigurationCommand).de(de_DeleteBucketMetadataConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketMetadataConfigurationCommand");
+ }
+ };
+ var DeleteBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ ];
+ }).s("AmazonS3", "DeleteBucketMetadataTableConfiguration", {}).n("S3Client", "DeleteBucketMetadataTableConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketMetadataTableConfigurationCommand).de(de_DeleteBucketMetadataTableConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketMetadataTableConfigurationCommand");
+ }
+ };
+ var DeleteBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33412,10 +36496,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketMetricsConfiguration", {}).n("S3Client", "DeleteBucketMetricsConfigurationCommand").f(undefined, undefined).ser(se_DeleteBucketMetricsConfigurationCommand).de(de_DeleteBucketMetricsConfigurationCommand).build() {
+ static {
+ __name(this, "DeleteBucketMetricsConfigurationCommand");
+ }
};
- __name(_DeleteBucketMetricsConfigurationCommand, "DeleteBucketMetricsConfigurationCommand");
- var DeleteBucketMetricsConfigurationCommand = _DeleteBucketMetricsConfigurationCommand;
- var _DeleteBucketOwnershipControlsCommand = class _DeleteBucketOwnershipControlsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33425,10 +36510,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketOwnershipControls", {}).n("S3Client", "DeleteBucketOwnershipControlsCommand").f(undefined, undefined).ser(se_DeleteBucketOwnershipControlsCommand).de(de_DeleteBucketOwnershipControlsCommand).build() {
+ static {
+ __name(this, "DeleteBucketOwnershipControlsCommand");
+ }
};
- __name(_DeleteBucketOwnershipControlsCommand, "DeleteBucketOwnershipControlsCommand");
- var DeleteBucketOwnershipControlsCommand = _DeleteBucketOwnershipControlsCommand;
- var _DeleteBucketPolicyCommand = class _DeleteBucketPolicyCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33438,10 +36524,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketPolicy", {}).n("S3Client", "DeleteBucketPolicyCommand").f(undefined, undefined).ser(se_DeleteBucketPolicyCommand).de(de_DeleteBucketPolicyCommand).build() {
+ static {
+ __name(this, "DeleteBucketPolicyCommand");
+ }
};
- __name(_DeleteBucketPolicyCommand, "DeleteBucketPolicyCommand");
- var DeleteBucketPolicyCommand = _DeleteBucketPolicyCommand;
- var _DeleteBucketReplicationCommand = class _DeleteBucketReplicationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33451,10 +36538,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketReplication", {}).n("S3Client", "DeleteBucketReplicationCommand").f(undefined, undefined).ser(se_DeleteBucketReplicationCommand).de(de_DeleteBucketReplicationCommand).build() {
+ static {
+ __name(this, "DeleteBucketReplicationCommand");
+ }
};
- __name(_DeleteBucketReplicationCommand, "DeleteBucketReplicationCommand");
- var DeleteBucketReplicationCommand = _DeleteBucketReplicationCommand;
- var _DeleteBucketTaggingCommand = class _DeleteBucketTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33464,10 +36552,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketTagging", {}).n("S3Client", "DeleteBucketTaggingCommand").f(undefined, undefined).ser(se_DeleteBucketTaggingCommand).de(de_DeleteBucketTaggingCommand).build() {
+ static {
+ __name(this, "DeleteBucketTaggingCommand");
+ }
};
- __name(_DeleteBucketTaggingCommand, "DeleteBucketTaggingCommand");
- var DeleteBucketTaggingCommand = _DeleteBucketTaggingCommand;
- var _DeleteBucketWebsiteCommand = class _DeleteBucketWebsiteCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeleteBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33477,24 +36566,28 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeleteBucketWebsite", {}).n("S3Client", "DeleteBucketWebsiteCommand").f(undefined, undefined).ser(se_DeleteBucketWebsiteCommand).de(de_DeleteBucketWebsiteCommand).build() {
+ static {
+ __name(this, "DeleteBucketWebsiteCommand");
+ }
};
- __name(_DeleteBucketWebsiteCommand, "DeleteBucketWebsiteCommand");
- var DeleteBucketWebsiteCommand = _DeleteBucketWebsiteCommand;
- var _DeleteObjectCommand = class _DeleteObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s38 = require_dist_cjs34();
+ var DeleteObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s38.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObject", {}).n("S3Client", "DeleteObjectCommand").f(undefined, undefined).ser(se_DeleteObjectCommand).de(de_DeleteObjectCommand).build() {
+ static {
+ __name(this, "DeleteObjectCommand");
+ }
};
- __name(_DeleteObjectCommand, "DeleteObjectCommand");
- var DeleteObjectCommand = _DeleteObjectCommand;
- var import_middleware_flexible_checksums = require_dist_cjs67();
- var _DeleteObjectsCommand = class _DeleteObjectsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s39 = require_dist_cjs34();
+ var DeleteObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -33502,28 +36595,32 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s39.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObjects", {}).n("S3Client", "DeleteObjectsCommand").f(undefined, undefined).ser(se_DeleteObjectsCommand).de(de_DeleteObjectsCommand).build() {
+ static {
+ __name(this, "DeleteObjectsCommand");
+ }
};
- __name(_DeleteObjectsCommand, "DeleteObjectsCommand");
- var DeleteObjectsCommand = _DeleteObjectsCommand;
- var _DeleteObjectTaggingCommand = class _DeleteObjectTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s310 = require_dist_cjs34();
+ var DeleteObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s310.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "DeleteObjectTagging", {}).n("S3Client", "DeleteObjectTaggingCommand").f(undefined, undefined).ser(se_DeleteObjectTaggingCommand).de(de_DeleteObjectTaggingCommand).build() {
+ static {
+ __name(this, "DeleteObjectTaggingCommand");
+ }
};
- __name(_DeleteObjectTaggingCommand, "DeleteObjectTaggingCommand");
- var DeleteObjectTaggingCommand = _DeleteObjectTaggingCommand;
- var _DeletePublicAccessBlockCommand = class _DeletePublicAccessBlockCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var DeletePublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -33533,297 +36630,396 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "DeletePublicAccessBlock", {}).n("S3Client", "DeletePublicAccessBlockCommand").f(undefined, undefined).ser(se_DeletePublicAccessBlockCommand).de(de_DeletePublicAccessBlockCommand).build() {
+ static {
+ __name(this, "DeletePublicAccessBlockCommand");
+ }
};
- __name(_DeletePublicAccessBlockCommand, "DeletePublicAccessBlockCommand");
- var DeletePublicAccessBlockCommand = _DeletePublicAccessBlockCommand;
- var _GetBucketAccelerateConfigurationCommand = class _GetBucketAccelerateConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s311 = require_dist_cjs34();
+ var GetBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s311.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAccelerateConfiguration", {}).n("S3Client", "GetBucketAccelerateConfigurationCommand").f(undefined, undefined).ser(se_GetBucketAccelerateConfigurationCommand).de(de_GetBucketAccelerateConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketAccelerateConfigurationCommand");
+ }
};
- __name(_GetBucketAccelerateConfigurationCommand, "GetBucketAccelerateConfigurationCommand");
- var GetBucketAccelerateConfigurationCommand = _GetBucketAccelerateConfigurationCommand;
- var _GetBucketAclCommand = class _GetBucketAclCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s312 = require_dist_cjs34();
+ var GetBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s312.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAcl", {}).n("S3Client", "GetBucketAclCommand").f(undefined, undefined).ser(se_GetBucketAclCommand).de(de_GetBucketAclCommand).build() {
+ static {
+ __name(this, "GetBucketAclCommand");
+ }
};
- __name(_GetBucketAclCommand, "GetBucketAclCommand");
- var GetBucketAclCommand = _GetBucketAclCommand;
- var _GetBucketAnalyticsConfigurationCommand = class _GetBucketAnalyticsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s313 = require_dist_cjs34();
+ var GetBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s313.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketAnalyticsConfiguration", {}).n("S3Client", "GetBucketAnalyticsConfigurationCommand").f(undefined, undefined).ser(se_GetBucketAnalyticsConfigurationCommand).de(de_GetBucketAnalyticsConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketAnalyticsConfigurationCommand");
+ }
};
- __name(_GetBucketAnalyticsConfigurationCommand, "GetBucketAnalyticsConfigurationCommand");
- var GetBucketAnalyticsConfigurationCommand = _GetBucketAnalyticsConfigurationCommand;
- var _GetBucketCorsCommand = class _GetBucketCorsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s314 = require_dist_cjs34();
+ var GetBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s314.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketCors", {}).n("S3Client", "GetBucketCorsCommand").f(undefined, undefined).ser(se_GetBucketCorsCommand).de(de_GetBucketCorsCommand).build() {
+ static {
+ __name(this, "GetBucketCorsCommand");
+ }
};
- __name(_GetBucketCorsCommand, "GetBucketCorsCommand");
- var GetBucketCorsCommand = _GetBucketCorsCommand;
- var _GetBucketEncryptionCommand = class _GetBucketEncryptionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s315 = require_dist_cjs34();
+ var GetBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s315.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketEncryption", {}).n("S3Client", "GetBucketEncryptionCommand").f(undefined, GetBucketEncryptionOutputFilterSensitiveLog).ser(se_GetBucketEncryptionCommand).de(de_GetBucketEncryptionCommand).build() {
+ static {
+ __name(this, "GetBucketEncryptionCommand");
+ }
};
- __name(_GetBucketEncryptionCommand, "GetBucketEncryptionCommand");
- var GetBucketEncryptionCommand = _GetBucketEncryptionCommand;
- var _GetBucketIntelligentTieringConfigurationCommand = class _GetBucketIntelligentTieringConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s316 = require_dist_cjs34();
+ var GetBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s316.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketIntelligentTieringConfiguration", {}).n("S3Client", "GetBucketIntelligentTieringConfigurationCommand").f(undefined, undefined).ser(se_GetBucketIntelligentTieringConfigurationCommand).de(de_GetBucketIntelligentTieringConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketIntelligentTieringConfigurationCommand");
+ }
};
- __name(_GetBucketIntelligentTieringConfigurationCommand, "GetBucketIntelligentTieringConfigurationCommand");
- var GetBucketIntelligentTieringConfigurationCommand = _GetBucketIntelligentTieringConfigurationCommand;
- var _GetBucketInventoryConfigurationCommand = class _GetBucketInventoryConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s317 = require_dist_cjs34();
+ var GetBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s317.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketInventoryConfiguration", {}).n("S3Client", "GetBucketInventoryConfigurationCommand").f(undefined, GetBucketInventoryConfigurationOutputFilterSensitiveLog).ser(se_GetBucketInventoryConfigurationCommand).de(de_GetBucketInventoryConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketInventoryConfigurationCommand");
+ }
};
- __name(_GetBucketInventoryConfigurationCommand, "GetBucketInventoryConfigurationCommand");
- var GetBucketInventoryConfigurationCommand = _GetBucketInventoryConfigurationCommand;
- var _GetBucketLifecycleConfigurationCommand = class _GetBucketLifecycleConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s318 = require_dist_cjs34();
+ var GetBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s318.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLifecycleConfiguration", {}).n("S3Client", "GetBucketLifecycleConfigurationCommand").f(undefined, undefined).ser(se_GetBucketLifecycleConfigurationCommand).de(de_GetBucketLifecycleConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketLifecycleConfigurationCommand");
+ }
};
- __name(_GetBucketLifecycleConfigurationCommand, "GetBucketLifecycleConfigurationCommand");
- var GetBucketLifecycleConfigurationCommand = _GetBucketLifecycleConfigurationCommand;
- var _GetBucketLocationCommand = class _GetBucketLocationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s319 = require_dist_cjs34();
+ var GetBucketLocationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s319.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLocation", {}).n("S3Client", "GetBucketLocationCommand").f(undefined, undefined).ser(se_GetBucketLocationCommand).de(de_GetBucketLocationCommand).build() {
+ static {
+ __name(this, "GetBucketLocationCommand");
+ }
};
- __name(_GetBucketLocationCommand, "GetBucketLocationCommand");
- var GetBucketLocationCommand = _GetBucketLocationCommand;
- var _GetBucketLoggingCommand = class _GetBucketLoggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s320 = require_dist_cjs34();
+ var GetBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s320.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketLogging", {}).n("S3Client", "GetBucketLoggingCommand").f(undefined, undefined).ser(se_GetBucketLoggingCommand).de(de_GetBucketLoggingCommand).build() {
+ static {
+ __name(this, "GetBucketLoggingCommand");
+ }
};
- __name(_GetBucketLoggingCommand, "GetBucketLoggingCommand");
- var GetBucketLoggingCommand = _GetBucketLoggingCommand;
- var _GetBucketMetricsConfigurationCommand = class _GetBucketMetricsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s321 = require_dist_cjs34();
+ var GetBucketMetadataConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s321.getThrow200ExceptionsPlugin)(config)
+ ];
+ }).s("AmazonS3", "GetBucketMetadataConfiguration", {}).n("S3Client", "GetBucketMetadataConfigurationCommand").f(undefined, undefined).ser(se_GetBucketMetadataConfigurationCommand).de(de_GetBucketMetadataConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketMetadataConfigurationCommand");
+ }
+ };
+ var import_middleware_sdk_s322 = require_dist_cjs34();
+ var GetBucketMetadataTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s322.getThrow200ExceptionsPlugin)(config)
+ ];
+ }).s("AmazonS3", "GetBucketMetadataTableConfiguration", {}).n("S3Client", "GetBucketMetadataTableConfigurationCommand").f(undefined, undefined).ser(se_GetBucketMetadataTableConfigurationCommand).de(de_GetBucketMetadataTableConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketMetadataTableConfigurationCommand");
+ }
+ };
+ var import_middleware_sdk_s323 = require_dist_cjs34();
+ var GetBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s323.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketMetricsConfiguration", {}).n("S3Client", "GetBucketMetricsConfigurationCommand").f(undefined, undefined).ser(se_GetBucketMetricsConfigurationCommand).de(de_GetBucketMetricsConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketMetricsConfigurationCommand");
+ }
};
- __name(_GetBucketMetricsConfigurationCommand, "GetBucketMetricsConfigurationCommand");
- var GetBucketMetricsConfigurationCommand = _GetBucketMetricsConfigurationCommand;
- var _GetBucketNotificationConfigurationCommand = class _GetBucketNotificationConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s324 = require_dist_cjs34();
+ var GetBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s324.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketNotificationConfiguration", {}).n("S3Client", "GetBucketNotificationConfigurationCommand").f(undefined, undefined).ser(se_GetBucketNotificationConfigurationCommand).de(de_GetBucketNotificationConfigurationCommand).build() {
+ static {
+ __name(this, "GetBucketNotificationConfigurationCommand");
+ }
};
- __name(_GetBucketNotificationConfigurationCommand, "GetBucketNotificationConfigurationCommand");
- var GetBucketNotificationConfigurationCommand = _GetBucketNotificationConfigurationCommand;
- var _GetBucketOwnershipControlsCommand = class _GetBucketOwnershipControlsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s325 = require_dist_cjs34();
+ var GetBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s325.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketOwnershipControls", {}).n("S3Client", "GetBucketOwnershipControlsCommand").f(undefined, undefined).ser(se_GetBucketOwnershipControlsCommand).de(de_GetBucketOwnershipControlsCommand).build() {
+ static {
+ __name(this, "GetBucketOwnershipControlsCommand");
+ }
};
- __name(_GetBucketOwnershipControlsCommand, "GetBucketOwnershipControlsCommand");
- var GetBucketOwnershipControlsCommand = _GetBucketOwnershipControlsCommand;
- var _GetBucketPolicyCommand = class _GetBucketPolicyCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s326 = require_dist_cjs34();
+ var GetBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s326.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketPolicy", {}).n("S3Client", "GetBucketPolicyCommand").f(undefined, undefined).ser(se_GetBucketPolicyCommand).de(de_GetBucketPolicyCommand).build() {
+ static {
+ __name(this, "GetBucketPolicyCommand");
+ }
};
- __name(_GetBucketPolicyCommand, "GetBucketPolicyCommand");
- var GetBucketPolicyCommand = _GetBucketPolicyCommand;
- var _GetBucketPolicyStatusCommand = class _GetBucketPolicyStatusCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s327 = require_dist_cjs34();
+ var GetBucketPolicyStatusCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s327.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketPolicyStatus", {}).n("S3Client", "GetBucketPolicyStatusCommand").f(undefined, undefined).ser(se_GetBucketPolicyStatusCommand).de(de_GetBucketPolicyStatusCommand).build() {
+ static {
+ __name(this, "GetBucketPolicyStatusCommand");
+ }
};
- __name(_GetBucketPolicyStatusCommand, "GetBucketPolicyStatusCommand");
- var GetBucketPolicyStatusCommand = _GetBucketPolicyStatusCommand;
- var _GetBucketReplicationCommand = class _GetBucketReplicationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s328 = require_dist_cjs34();
+ var GetBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s328.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketReplication", {}).n("S3Client", "GetBucketReplicationCommand").f(undefined, undefined).ser(se_GetBucketReplicationCommand).de(de_GetBucketReplicationCommand).build() {
+ static {
+ __name(this, "GetBucketReplicationCommand");
+ }
};
- __name(_GetBucketReplicationCommand, "GetBucketReplicationCommand");
- var GetBucketReplicationCommand = _GetBucketReplicationCommand;
- var _GetBucketRequestPaymentCommand = class _GetBucketRequestPaymentCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s329 = require_dist_cjs34();
+ var GetBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s329.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketRequestPayment", {}).n("S3Client", "GetBucketRequestPaymentCommand").f(undefined, undefined).ser(se_GetBucketRequestPaymentCommand).de(de_GetBucketRequestPaymentCommand).build() {
+ static {
+ __name(this, "GetBucketRequestPaymentCommand");
+ }
};
- __name(_GetBucketRequestPaymentCommand, "GetBucketRequestPaymentCommand");
- var GetBucketRequestPaymentCommand = _GetBucketRequestPaymentCommand;
- var _GetBucketTaggingCommand = class _GetBucketTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s330 = require_dist_cjs34();
+ var GetBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s330.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketTagging", {}).n("S3Client", "GetBucketTaggingCommand").f(undefined, undefined).ser(se_GetBucketTaggingCommand).de(de_GetBucketTaggingCommand).build() {
+ static {
+ __name(this, "GetBucketTaggingCommand");
+ }
};
- __name(_GetBucketTaggingCommand, "GetBucketTaggingCommand");
- var GetBucketTaggingCommand = _GetBucketTaggingCommand;
- var _GetBucketVersioningCommand = class _GetBucketVersioningCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s331 = require_dist_cjs34();
+ var GetBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s331.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketVersioning", {}).n("S3Client", "GetBucketVersioningCommand").f(undefined, undefined).ser(se_GetBucketVersioningCommand).de(de_GetBucketVersioningCommand).build() {
+ static {
+ __name(this, "GetBucketVersioningCommand");
+ }
};
- __name(_GetBucketVersioningCommand, "GetBucketVersioningCommand");
- var GetBucketVersioningCommand = _GetBucketVersioningCommand;
- var _GetBucketWebsiteCommand = class _GetBucketWebsiteCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s332 = require_dist_cjs34();
+ var GetBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s332.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetBucketWebsite", {}).n("S3Client", "GetBucketWebsiteCommand").f(undefined, undefined).ser(se_GetBucketWebsiteCommand).de(de_GetBucketWebsiteCommand).build() {
+ static {
+ __name(this, "GetBucketWebsiteCommand");
+ }
};
- __name(_GetBucketWebsiteCommand, "GetBucketWebsiteCommand");
- var GetBucketWebsiteCommand = _GetBucketWebsiteCommand;
- var _GetObjectAclCommand = class _GetObjectAclCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s333 = require_dist_cjs34();
+ var GetObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s333.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectAcl", {}).n("S3Client", "GetObjectAclCommand").f(undefined, undefined).ser(se_GetObjectAclCommand).de(de_GetObjectAclCommand).build() {
+ static {
+ __name(this, "GetObjectAclCommand");
+ }
};
- __name(_GetObjectAclCommand, "GetObjectAclCommand");
- var GetObjectAclCommand = _GetObjectAclCommand;
- var _GetObjectAttributesCommand = class _GetObjectAttributesCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s334 = require_dist_cjs34();
+ var GetObjectAttributesCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s334.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "GetObjectAttributes", {}).n("S3Client", "GetObjectAttributesCommand").f(GetObjectAttributesRequestFilterSensitiveLog, undefined).ser(se_GetObjectAttributesCommand).de(de_GetObjectAttributesCommand).build() {
+ static {
+ __name(this, "GetObjectAttributesCommand");
+ }
};
- __name(_GetObjectAttributesCommand, "GetObjectAttributesCommand");
- var GetObjectAttributesCommand = _GetObjectAttributesCommand;
- var import_middleware_sdk_s34 = require_dist_cjs24();
- var _GetObjectCommand = class _GetObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s335 = require_dist_cjs34();
+ var GetObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -33831,68 +37027,80 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_ssec.getSsecPlugin)(config),
- (0, import_middleware_sdk_s34.getS3ExpiresMiddlewarePlugin)(config),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
requestChecksumRequired: false,
requestValidationModeMember: "ChecksumMode",
- responseAlgorithms: ["CRC32", "CRC32C", "SHA256", "SHA1"]
- })
+ responseAlgorithms: ["CRC64NVME", "CRC32", "CRC32C", "SHA256", "SHA1"]
+ }),
+ (0, import_middleware_ssec.getSsecPlugin)(config),
+ (0, import_middleware_sdk_s335.getS3ExpiresMiddlewarePlugin)(config)
];
}).s("AmazonS3", "GetObject", {}).n("S3Client", "GetObjectCommand").f(GetObjectRequestFilterSensitiveLog, GetObjectOutputFilterSensitiveLog).ser(se_GetObjectCommand).de(de_GetObjectCommand).build() {
+ static {
+ __name(this, "GetObjectCommand");
+ }
};
- __name(_GetObjectCommand, "GetObjectCommand");
- var GetObjectCommand = _GetObjectCommand;
- var _GetObjectLegalHoldCommand = class _GetObjectLegalHoldCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s336 = require_dist_cjs34();
+ var GetObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s336.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectLegalHold", {}).n("S3Client", "GetObjectLegalHoldCommand").f(undefined, undefined).ser(se_GetObjectLegalHoldCommand).de(de_GetObjectLegalHoldCommand).build() {
+ static {
+ __name(this, "GetObjectLegalHoldCommand");
+ }
};
- __name(_GetObjectLegalHoldCommand, "GetObjectLegalHoldCommand");
- var GetObjectLegalHoldCommand = _GetObjectLegalHoldCommand;
- var _GetObjectLockConfigurationCommand = class _GetObjectLockConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s337 = require_dist_cjs34();
+ var GetObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s337.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectLockConfiguration", {}).n("S3Client", "GetObjectLockConfigurationCommand").f(undefined, undefined).ser(se_GetObjectLockConfigurationCommand).de(de_GetObjectLockConfigurationCommand).build() {
+ static {
+ __name(this, "GetObjectLockConfigurationCommand");
+ }
};
- __name(_GetObjectLockConfigurationCommand, "GetObjectLockConfigurationCommand");
- var GetObjectLockConfigurationCommand = _GetObjectLockConfigurationCommand;
- var _GetObjectRetentionCommand = class _GetObjectRetentionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s338 = require_dist_cjs34();
+ var GetObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s338.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectRetention", {}).n("S3Client", "GetObjectRetentionCommand").f(undefined, undefined).ser(se_GetObjectRetentionCommand).de(de_GetObjectRetentionCommand).build() {
+ static {
+ __name(this, "GetObjectRetentionCommand");
+ }
};
- __name(_GetObjectRetentionCommand, "GetObjectRetentionCommand");
- var GetObjectRetentionCommand = _GetObjectRetentionCommand;
- var _GetObjectTaggingCommand = class _GetObjectTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s339 = require_dist_cjs34();
+ var GetObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s339.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetObjectTagging", {}).n("S3Client", "GetObjectTaggingCommand").f(undefined, undefined).ser(se_GetObjectTaggingCommand).de(de_GetObjectTaggingCommand).build() {
+ static {
+ __name(this, "GetObjectTaggingCommand");
+ }
};
- __name(_GetObjectTaggingCommand, "GetObjectTaggingCommand");
- var GetObjectTaggingCommand = _GetObjectTaggingCommand;
- var _GetObjectTorrentCommand = class _GetObjectTorrentCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var GetObjectTorrentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -33901,36 +37109,43 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "GetObjectTorrent", {}).n("S3Client", "GetObjectTorrentCommand").f(undefined, GetObjectTorrentOutputFilterSensitiveLog).ser(se_GetObjectTorrentCommand).de(de_GetObjectTorrentCommand).build() {
+ static {
+ __name(this, "GetObjectTorrentCommand");
+ }
};
- __name(_GetObjectTorrentCommand, "GetObjectTorrentCommand");
- var GetObjectTorrentCommand = _GetObjectTorrentCommand;
- var _GetPublicAccessBlockCommand = class _GetPublicAccessBlockCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s340 = require_dist_cjs34();
+ var GetPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s340.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "GetPublicAccessBlock", {}).n("S3Client", "GetPublicAccessBlockCommand").f(undefined, undefined).ser(se_GetPublicAccessBlockCommand).de(de_GetPublicAccessBlockCommand).build() {
+ static {
+ __name(this, "GetPublicAccessBlockCommand");
+ }
};
- __name(_GetPublicAccessBlockCommand, "GetPublicAccessBlockCommand");
- var GetPublicAccessBlockCommand = _GetPublicAccessBlockCommand;
- var _HeadBucketCommand = class _HeadBucketCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s341 = require_dist_cjs34();
+ var HeadBucketCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s341.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "HeadBucket", {}).n("S3Client", "HeadBucketCommand").f(undefined, undefined).ser(se_HeadBucketCommand).de(de_HeadBucketCommand).build() {
+ static {
+ __name(this, "HeadBucketCommand");
+ }
};
- __name(_HeadBucketCommand, "HeadBucketCommand");
- var HeadBucketCommand = _HeadBucketCommand;
- var import_middleware_sdk_s35 = require_dist_cjs24();
- var _HeadObjectCommand = class _HeadObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s342 = require_dist_cjs34();
+ var HeadObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -33938,140 +37153,171 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s342.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config),
- (0, import_middleware_sdk_s35.getS3ExpiresMiddlewarePlugin)(config)
+ (0, import_middleware_sdk_s342.getS3ExpiresMiddlewarePlugin)(config)
];
}).s("AmazonS3", "HeadObject", {}).n("S3Client", "HeadObjectCommand").f(HeadObjectRequestFilterSensitiveLog, HeadObjectOutputFilterSensitiveLog).ser(se_HeadObjectCommand).de(de_HeadObjectCommand).build() {
+ static {
+ __name(this, "HeadObjectCommand");
+ }
};
- __name(_HeadObjectCommand, "HeadObjectCommand");
- var HeadObjectCommand = _HeadObjectCommand;
- var _ListBucketAnalyticsConfigurationsCommand = class _ListBucketAnalyticsConfigurationsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s343 = require_dist_cjs34();
+ var ListBucketAnalyticsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s343.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketAnalyticsConfigurations", {}).n("S3Client", "ListBucketAnalyticsConfigurationsCommand").f(undefined, undefined).ser(se_ListBucketAnalyticsConfigurationsCommand).de(de_ListBucketAnalyticsConfigurationsCommand).build() {
+ static {
+ __name(this, "ListBucketAnalyticsConfigurationsCommand");
+ }
};
- __name(_ListBucketAnalyticsConfigurationsCommand, "ListBucketAnalyticsConfigurationsCommand");
- var ListBucketAnalyticsConfigurationsCommand = _ListBucketAnalyticsConfigurationsCommand;
- var _ListBucketIntelligentTieringConfigurationsCommand = class _ListBucketIntelligentTieringConfigurationsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s344 = require_dist_cjs34();
+ var ListBucketIntelligentTieringConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s344.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketIntelligentTieringConfigurations", {}).n("S3Client", "ListBucketIntelligentTieringConfigurationsCommand").f(undefined, undefined).ser(se_ListBucketIntelligentTieringConfigurationsCommand).de(de_ListBucketIntelligentTieringConfigurationsCommand).build() {
+ static {
+ __name(this, "ListBucketIntelligentTieringConfigurationsCommand");
+ }
};
- __name(_ListBucketIntelligentTieringConfigurationsCommand, "ListBucketIntelligentTieringConfigurationsCommand");
- var ListBucketIntelligentTieringConfigurationsCommand = _ListBucketIntelligentTieringConfigurationsCommand;
- var _ListBucketInventoryConfigurationsCommand = class _ListBucketInventoryConfigurationsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s345 = require_dist_cjs34();
+ var ListBucketInventoryConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s345.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketInventoryConfigurations", {}).n("S3Client", "ListBucketInventoryConfigurationsCommand").f(undefined, ListBucketInventoryConfigurationsOutputFilterSensitiveLog).ser(se_ListBucketInventoryConfigurationsCommand).de(de_ListBucketInventoryConfigurationsCommand).build() {
+ static {
+ __name(this, "ListBucketInventoryConfigurationsCommand");
+ }
};
- __name(_ListBucketInventoryConfigurationsCommand, "ListBucketInventoryConfigurationsCommand");
- var ListBucketInventoryConfigurationsCommand = _ListBucketInventoryConfigurationsCommand;
- var _ListBucketMetricsConfigurationsCommand = class _ListBucketMetricsConfigurationsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s346 = require_dist_cjs34();
+ var ListBucketMetricsConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s346.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBucketMetricsConfigurations", {}).n("S3Client", "ListBucketMetricsConfigurationsCommand").f(undefined, undefined).ser(se_ListBucketMetricsConfigurationsCommand).de(de_ListBucketMetricsConfigurationsCommand).build() {
+ static {
+ __name(this, "ListBucketMetricsConfigurationsCommand");
+ }
};
- __name(_ListBucketMetricsConfigurationsCommand, "ListBucketMetricsConfigurationsCommand");
- var ListBucketMetricsConfigurationsCommand = _ListBucketMetricsConfigurationsCommand;
- var _ListBucketsCommand = class _ListBucketsCommand2 extends import_smithy_client.Command.classBuilder().ep({
- ...commonParams
- }).m(function(Command, cs, config, o) {
+ var import_middleware_sdk_s347 = require_dist_cjs34();
+ var ListBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s347.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListBuckets", {}).n("S3Client", "ListBucketsCommand").f(undefined, undefined).ser(se_ListBucketsCommand).de(de_ListBucketsCommand).build() {
+ static {
+ __name(this, "ListBucketsCommand");
+ }
};
- __name(_ListBucketsCommand, "ListBucketsCommand");
- var ListBucketsCommand = _ListBucketsCommand;
- var _ListDirectoryBucketsCommand = class _ListDirectoryBucketsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s348 = require_dist_cjs34();
+ var ListDirectoryBucketsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s348.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListDirectoryBuckets", {}).n("S3Client", "ListDirectoryBucketsCommand").f(undefined, undefined).ser(se_ListDirectoryBucketsCommand).de(de_ListDirectoryBucketsCommand).build() {
+ static {
+ __name(this, "ListDirectoryBucketsCommand");
+ }
};
- __name(_ListDirectoryBucketsCommand, "ListDirectoryBucketsCommand");
- var ListDirectoryBucketsCommand = _ListDirectoryBucketsCommand;
- var _ListMultipartUploadsCommand = class _ListMultipartUploadsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s349 = require_dist_cjs34();
+ var ListMultipartUploadsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s349.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListMultipartUploads", {}).n("S3Client", "ListMultipartUploadsCommand").f(undefined, undefined).ser(se_ListMultipartUploadsCommand).de(de_ListMultipartUploadsCommand).build() {
+ static {
+ __name(this, "ListMultipartUploadsCommand");
+ }
};
- __name(_ListMultipartUploadsCommand, "ListMultipartUploadsCommand");
- var ListMultipartUploadsCommand = _ListMultipartUploadsCommand;
- var _ListObjectsCommand = class _ListObjectsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s350 = require_dist_cjs34();
+ var ListObjectsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s350.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjects", {}).n("S3Client", "ListObjectsCommand").f(undefined, undefined).ser(se_ListObjectsCommand).de(de_ListObjectsCommand).build() {
+ static {
+ __name(this, "ListObjectsCommand");
+ }
};
- __name(_ListObjectsCommand, "ListObjectsCommand");
- var ListObjectsCommand = _ListObjectsCommand;
- var _ListObjectsV2Command = class _ListObjectsV2Command2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s351 = require_dist_cjs34();
+ var ListObjectsV2Command = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s351.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjectsV2", {}).n("S3Client", "ListObjectsV2Command").f(undefined, undefined).ser(se_ListObjectsV2Command).de(de_ListObjectsV2Command).build() {
+ static {
+ __name(this, "ListObjectsV2Command");
+ }
};
- __name(_ListObjectsV2Command, "ListObjectsV2Command");
- var ListObjectsV2Command = _ListObjectsV2Command;
- var _ListObjectVersionsCommand = class _ListObjectVersionsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s352 = require_dist_cjs34();
+ var ListObjectVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Prefix: { type: "contextParams", name: "Prefix" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s352.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "ListObjectVersions", {}).n("S3Client", "ListObjectVersionsCommand").f(undefined, undefined).ser(se_ListObjectVersionsCommand).de(de_ListObjectVersionsCommand).build() {
+ static {
+ __name(this, "ListObjectVersionsCommand");
+ }
};
- __name(_ListObjectVersionsCommand, "ListObjectVersionsCommand");
- var ListObjectVersionsCommand = _ListObjectVersionsCommand;
- var _ListPartsCommand = class _ListPartsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s353 = require_dist_cjs34();
+ var ListPartsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -34079,13 +37325,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s353.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "ListParts", {}).n("S3Client", "ListPartsCommand").f(ListPartsRequestFilterSensitiveLog, undefined).ser(se_ListPartsCommand).de(de_ListPartsCommand).build() {
+ static {
+ __name(this, "ListPartsCommand");
+ }
};
- __name(_ListPartsCommand, "ListPartsCommand");
- var ListPartsCommand = _ListPartsCommand;
- var _PutBucketAccelerateConfigurationCommand = class _PutBucketAccelerateConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketAccelerateConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34094,16 +37342,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
})
];
}).s("AmazonS3", "PutBucketAccelerateConfiguration", {}).n("S3Client", "PutBucketAccelerateConfigurationCommand").f(undefined, undefined).ser(se_PutBucketAccelerateConfigurationCommand).de(de_PutBucketAccelerateConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketAccelerateConfigurationCommand");
+ }
};
- __name(_PutBucketAccelerateConfigurationCommand, "PutBucketAccelerateConfigurationCommand");
- var PutBucketAccelerateConfigurationCommand = _PutBucketAccelerateConfigurationCommand;
- var _PutBucketAclCommand = class _PutBucketAclCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34112,16 +37360,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketAcl", {}).n("S3Client", "PutBucketAclCommand").f(undefined, undefined).ser(se_PutBucketAclCommand).de(de_PutBucketAclCommand).build() {
+ static {
+ __name(this, "PutBucketAclCommand");
+ }
};
- __name(_PutBucketAclCommand, "PutBucketAclCommand");
- var PutBucketAclCommand = _PutBucketAclCommand;
- var _PutBucketAnalyticsConfigurationCommand = class _PutBucketAnalyticsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketAnalyticsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34131,10 +37379,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketAnalyticsConfiguration", {}).n("S3Client", "PutBucketAnalyticsConfigurationCommand").f(undefined, undefined).ser(se_PutBucketAnalyticsConfigurationCommand).de(de_PutBucketAnalyticsConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketAnalyticsConfigurationCommand");
+ }
};
- __name(_PutBucketAnalyticsConfigurationCommand, "PutBucketAnalyticsConfigurationCommand");
- var PutBucketAnalyticsConfigurationCommand = _PutBucketAnalyticsConfigurationCommand;
- var _PutBucketCorsCommand = class _PutBucketCorsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketCorsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34143,16 +37392,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketCors", {}).n("S3Client", "PutBucketCorsCommand").f(undefined, undefined).ser(se_PutBucketCorsCommand).de(de_PutBucketCorsCommand).build() {
+ static {
+ __name(this, "PutBucketCorsCommand");
+ }
};
- __name(_PutBucketCorsCommand, "PutBucketCorsCommand");
- var PutBucketCorsCommand = _PutBucketCorsCommand;
- var _PutBucketEncryptionCommand = class _PutBucketEncryptionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketEncryptionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34161,16 +37410,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketEncryption", {}).n("S3Client", "PutBucketEncryptionCommand").f(PutBucketEncryptionRequestFilterSensitiveLog, undefined).ser(se_PutBucketEncryptionCommand).de(de_PutBucketEncryptionCommand).build() {
+ static {
+ __name(this, "PutBucketEncryptionCommand");
+ }
};
- __name(_PutBucketEncryptionCommand, "PutBucketEncryptionCommand");
- var PutBucketEncryptionCommand = _PutBucketEncryptionCommand;
- var _PutBucketIntelligentTieringConfigurationCommand = class _PutBucketIntelligentTieringConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketIntelligentTieringConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34180,10 +37429,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketIntelligentTieringConfiguration", {}).n("S3Client", "PutBucketIntelligentTieringConfigurationCommand").f(undefined, undefined).ser(se_PutBucketIntelligentTieringConfigurationCommand).de(de_PutBucketIntelligentTieringConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketIntelligentTieringConfigurationCommand");
+ }
};
- __name(_PutBucketIntelligentTieringConfigurationCommand, "PutBucketIntelligentTieringConfigurationCommand");
- var PutBucketIntelligentTieringConfigurationCommand = _PutBucketIntelligentTieringConfigurationCommand;
- var _PutBucketInventoryConfigurationCommand = class _PutBucketInventoryConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketInventoryConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34193,10 +37443,12 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketInventoryConfiguration", {}).n("S3Client", "PutBucketInventoryConfigurationCommand").f(PutBucketInventoryConfigurationRequestFilterSensitiveLog, undefined).ser(se_PutBucketInventoryConfigurationCommand).de(de_PutBucketInventoryConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketInventoryConfigurationCommand");
+ }
};
- __name(_PutBucketInventoryConfigurationCommand, "PutBucketInventoryConfigurationCommand");
- var PutBucketInventoryConfigurationCommand = _PutBucketInventoryConfigurationCommand;
- var _PutBucketLifecycleConfigurationCommand = class _PutBucketLifecycleConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s354 = require_dist_cjs34();
+ var PutBucketLifecycleConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34205,16 +37457,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s354.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutBucketLifecycleConfiguration", {}).n("S3Client", "PutBucketLifecycleConfigurationCommand").f(undefined, undefined).ser(se_PutBucketLifecycleConfigurationCommand).de(de_PutBucketLifecycleConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketLifecycleConfigurationCommand");
+ }
};
- __name(_PutBucketLifecycleConfigurationCommand, "PutBucketLifecycleConfigurationCommand");
- var PutBucketLifecycleConfigurationCommand = _PutBucketLifecycleConfigurationCommand;
- var _PutBucketLoggingCommand = class _PutBucketLoggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketLoggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34223,16 +37476,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketLogging", {}).n("S3Client", "PutBucketLoggingCommand").f(undefined, undefined).ser(se_PutBucketLoggingCommand).de(de_PutBucketLoggingCommand).build() {
+ static {
+ __name(this, "PutBucketLoggingCommand");
+ }
};
- __name(_PutBucketLoggingCommand, "PutBucketLoggingCommand");
- var PutBucketLoggingCommand = _PutBucketLoggingCommand;
- var _PutBucketMetricsConfigurationCommand = class _PutBucketMetricsConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketMetricsConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34242,10 +37495,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketMetricsConfiguration", {}).n("S3Client", "PutBucketMetricsConfigurationCommand").f(undefined, undefined).ser(se_PutBucketMetricsConfigurationCommand).de(de_PutBucketMetricsConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketMetricsConfigurationCommand");
+ }
};
- __name(_PutBucketMetricsConfigurationCommand, "PutBucketMetricsConfigurationCommand");
- var PutBucketMetricsConfigurationCommand = _PutBucketMetricsConfigurationCommand;
- var _PutBucketNotificationConfigurationCommand = class _PutBucketNotificationConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketNotificationConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34255,10 +37509,11 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "PutBucketNotificationConfiguration", {}).n("S3Client", "PutBucketNotificationConfigurationCommand").f(undefined, undefined).ser(se_PutBucketNotificationConfigurationCommand).de(de_PutBucketNotificationConfigurationCommand).build() {
+ static {
+ __name(this, "PutBucketNotificationConfigurationCommand");
+ }
};
- __name(_PutBucketNotificationConfigurationCommand, "PutBucketNotificationConfigurationCommand");
- var PutBucketNotificationConfigurationCommand = _PutBucketNotificationConfigurationCommand;
- var _PutBucketOwnershipControlsCommand = class _PutBucketOwnershipControlsCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketOwnershipControlsCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34266,13 +37521,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, { input: this.input, requestChecksumRequired: true })
+ (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
+ requestChecksumRequired: true
+ })
];
}).s("AmazonS3", "PutBucketOwnershipControls", {}).n("S3Client", "PutBucketOwnershipControlsCommand").f(undefined, undefined).ser(se_PutBucketOwnershipControlsCommand).de(de_PutBucketOwnershipControlsCommand).build() {
+ static {
+ __name(this, "PutBucketOwnershipControlsCommand");
+ }
};
- __name(_PutBucketOwnershipControlsCommand, "PutBucketOwnershipControlsCommand");
- var PutBucketOwnershipControlsCommand = _PutBucketOwnershipControlsCommand;
- var _PutBucketPolicyCommand = class _PutBucketPolicyCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34281,16 +37540,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketPolicy", {}).n("S3Client", "PutBucketPolicyCommand").f(undefined, undefined).ser(se_PutBucketPolicyCommand).de(de_PutBucketPolicyCommand).build() {
+ static {
+ __name(this, "PutBucketPolicyCommand");
+ }
};
- __name(_PutBucketPolicyCommand, "PutBucketPolicyCommand");
- var PutBucketPolicyCommand = _PutBucketPolicyCommand;
- var _PutBucketReplicationCommand = class _PutBucketReplicationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketReplicationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34299,16 +37558,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketReplication", {}).n("S3Client", "PutBucketReplicationCommand").f(undefined, undefined).ser(se_PutBucketReplicationCommand).de(de_PutBucketReplicationCommand).build() {
+ static {
+ __name(this, "PutBucketReplicationCommand");
+ }
};
- __name(_PutBucketReplicationCommand, "PutBucketReplicationCommand");
- var PutBucketReplicationCommand = _PutBucketReplicationCommand;
- var _PutBucketRequestPaymentCommand = class _PutBucketRequestPaymentCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketRequestPaymentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34317,16 +37576,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketRequestPayment", {}).n("S3Client", "PutBucketRequestPaymentCommand").f(undefined, undefined).ser(se_PutBucketRequestPaymentCommand).de(de_PutBucketRequestPaymentCommand).build() {
+ static {
+ __name(this, "PutBucketRequestPaymentCommand");
+ }
};
- __name(_PutBucketRequestPaymentCommand, "PutBucketRequestPaymentCommand");
- var PutBucketRequestPaymentCommand = _PutBucketRequestPaymentCommand;
- var _PutBucketTaggingCommand = class _PutBucketTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34335,16 +37594,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketTagging", {}).n("S3Client", "PutBucketTaggingCommand").f(undefined, undefined).ser(se_PutBucketTaggingCommand).de(de_PutBucketTaggingCommand).build() {
+ static {
+ __name(this, "PutBucketTaggingCommand");
+ }
};
- __name(_PutBucketTaggingCommand, "PutBucketTaggingCommand");
- var PutBucketTaggingCommand = _PutBucketTaggingCommand;
- var _PutBucketVersioningCommand = class _PutBucketVersioningCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketVersioningCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34353,16 +37612,16 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketVersioning", {}).n("S3Client", "PutBucketVersioningCommand").f(undefined, undefined).ser(se_PutBucketVersioningCommand).de(de_PutBucketVersioningCommand).build() {
+ static {
+ __name(this, "PutBucketVersioningCommand");
+ }
};
- __name(_PutBucketVersioningCommand, "PutBucketVersioningCommand");
- var PutBucketVersioningCommand = _PutBucketVersioningCommand;
- var _PutBucketWebsiteCommand = class _PutBucketWebsiteCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutBucketWebsiteCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34371,16 +37630,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutBucketWebsite", {}).n("S3Client", "PutBucketWebsiteCommand").f(undefined, undefined).ser(se_PutBucketWebsiteCommand).de(de_PutBucketWebsiteCommand).build() {
+ static {
+ __name(this, "PutBucketWebsiteCommand");
+ }
};
- __name(_PutBucketWebsiteCommand, "PutBucketWebsiteCommand");
- var PutBucketWebsiteCommand = _PutBucketWebsiteCommand;
- var _PutObjectAclCommand = class _PutObjectAclCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s355 = require_dist_cjs34();
+ var PutObjectAclCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -34389,17 +37649,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s355.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectAcl", {}).n("S3Client", "PutObjectAclCommand").f(undefined, undefined).ser(se_PutObjectAclCommand).de(de_PutObjectAclCommand).build() {
+ static {
+ __name(this, "PutObjectAclCommand");
+ }
};
- __name(_PutObjectAclCommand, "PutObjectAclCommand");
- var PutObjectAclCommand = _PutObjectAclCommand;
- var import_middleware_sdk_s36 = require_dist_cjs24();
- var _PutObjectCommand = class _PutObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s356 = require_dist_cjs34();
+ var PutObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -34407,19 +37668,21 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_sdk_s36.getCheckContentLengthHeaderPlugin)(config),
- (0, import_middleware_ssec.getSsecPlugin)(config),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
- })
+ }),
+ (0, import_middleware_sdk_s356.getCheckContentLengthHeaderPlugin)(config),
+ (0, import_middleware_sdk_s356.getThrow200ExceptionsPlugin)(config),
+ (0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "PutObject", {}).n("S3Client", "PutObjectCommand").f(PutObjectRequestFilterSensitiveLog, PutObjectOutputFilterSensitiveLog).ser(se_PutObjectCommand).de(de_PutObjectCommand).build() {
+ static {
+ __name(this, "PutObjectCommand");
+ }
};
- __name(_PutObjectCommand, "PutObjectCommand");
- var PutObjectCommand = _PutObjectCommand;
- var _PutObjectLegalHoldCommand = class _PutObjectLegalHoldCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s357 = require_dist_cjs34();
+ var PutObjectLegalHoldCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -34427,16 +37690,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s357.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectLegalHold", {}).n("S3Client", "PutObjectLegalHoldCommand").f(undefined, undefined).ser(se_PutObjectLegalHoldCommand).de(de_PutObjectLegalHoldCommand).build() {
+ static {
+ __name(this, "PutObjectLegalHoldCommand");
+ }
};
- __name(_PutObjectLegalHoldCommand, "PutObjectLegalHoldCommand");
- var PutObjectLegalHoldCommand = _PutObjectLegalHoldCommand;
- var _PutObjectLockConfigurationCommand = class _PutObjectLockConfigurationCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s358 = require_dist_cjs34();
+ var PutObjectLockConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -34444,16 +37709,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s358.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectLockConfiguration", {}).n("S3Client", "PutObjectLockConfigurationCommand").f(undefined, undefined).ser(se_PutObjectLockConfigurationCommand).de(de_PutObjectLockConfigurationCommand).build() {
+ static {
+ __name(this, "PutObjectLockConfigurationCommand");
+ }
};
- __name(_PutObjectLockConfigurationCommand, "PutObjectLockConfigurationCommand");
- var PutObjectLockConfigurationCommand = _PutObjectLockConfigurationCommand;
- var _PutObjectRetentionCommand = class _PutObjectRetentionCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s359 = require_dist_cjs34();
+ var PutObjectRetentionCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -34461,16 +37728,18 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s359.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectRetention", {}).n("S3Client", "PutObjectRetentionCommand").f(undefined, undefined).ser(se_PutObjectRetentionCommand).de(de_PutObjectRetentionCommand).build() {
+ static {
+ __name(this, "PutObjectRetentionCommand");
+ }
};
- __name(_PutObjectRetentionCommand, "PutObjectRetentionCommand");
- var PutObjectRetentionCommand = _PutObjectRetentionCommand;
- var _PutObjectTaggingCommand = class _PutObjectTaggingCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s360 = require_dist_cjs34();
+ var PutObjectTaggingCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -34478,16 +37747,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
- })
+ }),
+ (0, import_middleware_sdk_s360.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "PutObjectTagging", {}).n("S3Client", "PutObjectTaggingCommand").f(undefined, undefined).ser(se_PutObjectTaggingCommand).de(de_PutObjectTaggingCommand).build() {
+ static {
+ __name(this, "PutObjectTaggingCommand");
+ }
};
- __name(_PutObjectTaggingCommand, "PutObjectTaggingCommand");
- var PutObjectTaggingCommand = _PutObjectTaggingCommand;
- var _PutPublicAccessBlockCommand = class _PutPublicAccessBlockCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var PutPublicAccessBlockCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34496,16 +37766,33 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: true
})
];
}).s("AmazonS3", "PutPublicAccessBlock", {}).n("S3Client", "PutPublicAccessBlockCommand").f(undefined, undefined).ser(se_PutPublicAccessBlockCommand).de(de_PutPublicAccessBlockCommand).build() {
+ static {
+ __name(this, "PutPublicAccessBlockCommand");
+ }
+ };
+ var import_middleware_sdk_s361 = require_dist_cjs34();
+ var RenameObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ Bucket: { type: "contextParams", name: "Bucket" },
+ Key: { type: "contextParams", name: "Key" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s361.getThrow200ExceptionsPlugin)(config)
+ ];
+ }).s("AmazonS3", "RenameObject", {}).n("S3Client", "RenameObjectCommand").f(undefined, undefined).ser(se_RenameObjectCommand).de(de_RenameObjectCommand).build() {
+ static {
+ __name(this, "RenameObjectCommand");
+ }
};
- __name(_PutPublicAccessBlockCommand, "PutPublicAccessBlockCommand");
- var PutPublicAccessBlockCommand = _PutPublicAccessBlockCommand;
- var _RestoreObjectCommand = class _RestoreObjectCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s362 = require_dist_cjs34();
+ var RestoreObjectCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
@@ -34513,22 +37800,25 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
- })
+ }),
+ (0, import_middleware_sdk_s362.getThrow200ExceptionsPlugin)(config)
];
}).s("AmazonS3", "RestoreObject", {}).n("S3Client", "RestoreObjectCommand").f(RestoreObjectRequestFilterSensitiveLog, undefined).ser(se_RestoreObjectCommand).de(de_RestoreObjectCommand).build() {
+ static {
+ __name(this, "RestoreObjectCommand");
+ }
};
- __name(_RestoreObjectCommand, "RestoreObjectCommand");
- var RestoreObjectCommand = _RestoreObjectCommand;
- var _SelectObjectContentCommand = class _SelectObjectContentCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s363 = require_dist_cjs34();
+ var SelectObjectContentCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" }
}).m(function(Command, cs, config, o) {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_sdk_s363.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "SelectObjectContent", {
@@ -34536,10 +37826,48 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
output: true
}
}).n("S3Client", "SelectObjectContentCommand").f(SelectObjectContentRequestFilterSensitiveLog, SelectObjectContentOutputFilterSensitiveLog).ser(se_SelectObjectContentCommand).de(de_SelectObjectContentCommand).build() {
+ static {
+ __name(this, "SelectObjectContentCommand");
+ }
+ };
+ var UpdateBucketMetadataInventoryTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
+ requestChecksumRequired: true
+ })
+ ];
+ }).s("AmazonS3", "UpdateBucketMetadataInventoryTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataInventoryTableConfigurationCommand").f(undefined, undefined).ser(se_UpdateBucketMetadataInventoryTableConfigurationCommand).de(de_UpdateBucketMetadataInventoryTableConfigurationCommand).build() {
+ static {
+ __name(this, "UpdateBucketMetadataInventoryTableConfigurationCommand");
+ }
};
- __name(_SelectObjectContentCommand, "SelectObjectContentCommand");
- var SelectObjectContentCommand = _SelectObjectContentCommand;
- var _UploadPartCommand = class _UploadPartCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var UpdateBucketMetadataJournalTableConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep({
+ ...commonParams,
+ UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true },
+ Bucket: { type: "contextParams", name: "Bucket" }
+ }).m(function(Command, cs, config, o) {
+ return [
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
+ (0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
+ requestChecksumRequired: true
+ })
+ ];
+ }).s("AmazonS3", "UpdateBucketMetadataJournalTableConfiguration", {}).n("S3Client", "UpdateBucketMetadataJournalTableConfigurationCommand").f(undefined, undefined).ser(se_UpdateBucketMetadataJournalTableConfigurationCommand).de(de_UpdateBucketMetadataJournalTableConfigurationCommand).build() {
+ static {
+ __name(this, "UpdateBucketMetadataJournalTableConfigurationCommand");
+ }
+ };
+ var import_middleware_sdk_s364 = require_dist_cjs34();
+ var UploadPartCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
Bucket: { type: "contextParams", name: "Bucket" },
Key: { type: "contextParams", name: "Key" }
@@ -34547,19 +37875,20 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_ssec.getSsecPlugin)(config),
(0, import_middleware_flexible_checksums.getFlexibleChecksumsPlugin)(config, {
- input: this.input,
- requestAlgorithmMember: "ChecksumAlgorithm",
+ requestAlgorithmMember: { httpHeader: "x-amz-sdk-checksum-algorithm", name: "ChecksumAlgorithm" },
requestChecksumRequired: false
- })
+ }),
+ (0, import_middleware_sdk_s364.getThrow200ExceptionsPlugin)(config),
+ (0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "UploadPart", {}).n("S3Client", "UploadPartCommand").f(UploadPartRequestFilterSensitiveLog, UploadPartOutputFilterSensitiveLog).ser(se_UploadPartCommand).de(de_UploadPartCommand).build() {
+ static {
+ __name(this, "UploadPartCommand");
+ }
};
- __name(_UploadPartCommand, "UploadPartCommand");
- var UploadPartCommand = _UploadPartCommand;
- var import_middleware_sdk_s37 = require_dist_cjs24();
- var _UploadPartCopyCommand = class _UploadPartCopyCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var import_middleware_sdk_s365 = require_dist_cjs34();
+ var UploadPartCopyCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true },
Bucket: { type: "contextParams", name: "Bucket" }
@@ -34567,14 +37896,15 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
return [
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
- (0, import_middleware_sdk_s37.getThrow200ExceptionsPlugin)(config),
+ (0, import_middleware_sdk_s365.getThrow200ExceptionsPlugin)(config),
(0, import_middleware_ssec.getSsecPlugin)(config)
];
}).s("AmazonS3", "UploadPartCopy", {}).n("S3Client", "UploadPartCopyCommand").f(UploadPartCopyRequestFilterSensitiveLog, UploadPartCopyOutputFilterSensitiveLog).ser(se_UploadPartCopyCommand).de(de_UploadPartCopyCommand).build() {
+ static {
+ __name(this, "UploadPartCopyCommand");
+ }
};
- __name(_UploadPartCopyCommand, "UploadPartCopyCommand");
- var UploadPartCopyCommand = _UploadPartCopyCommand;
- var _WriteGetObjectResponseCommand = class _WriteGetObjectResponseCommand2 extends import_smithy_client.Command.classBuilder().ep({
+ var WriteGetObjectResponseCommand = class extends import_smithy_client.Command.classBuilder().ep({
...commonParams,
UseObjectLambdaEndpoint: { type: "staticContextParams", value: true }
}).m(function(Command, cs, config, o) {
@@ -34583,14 +37913,17 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
];
}).s("AmazonS3", "WriteGetObjectResponse", {}).n("S3Client", "WriteGetObjectResponseCommand").f(WriteGetObjectResponseRequestFilterSensitiveLog, undefined).ser(se_WriteGetObjectResponseCommand).de(de_WriteGetObjectResponseCommand).build() {
+ static {
+ __name(this, "WriteGetObjectResponseCommand");
+ }
};
- __name(_WriteGetObjectResponseCommand, "WriteGetObjectResponseCommand");
- var WriteGetObjectResponseCommand = _WriteGetObjectResponseCommand;
var commands = {
AbortMultipartUploadCommand,
CompleteMultipartUploadCommand,
CopyObjectCommand,
CreateBucketCommand,
+ CreateBucketMetadataConfigurationCommand,
+ CreateBucketMetadataTableConfigurationCommand,
CreateMultipartUploadCommand,
CreateSessionCommand,
DeleteBucketCommand,
@@ -34600,6 +37933,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
DeleteBucketIntelligentTieringConfigurationCommand,
DeleteBucketInventoryConfigurationCommand,
DeleteBucketLifecycleCommand,
+ DeleteBucketMetadataConfigurationCommand,
+ DeleteBucketMetadataTableConfigurationCommand,
DeleteBucketMetricsConfigurationCommand,
DeleteBucketOwnershipControlsCommand,
DeleteBucketPolicyCommand,
@@ -34620,6 +37955,8 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
GetBucketLifecycleConfigurationCommand,
GetBucketLocationCommand,
GetBucketLoggingCommand,
+ GetBucketMetadataConfigurationCommand,
+ GetBucketMetadataTableConfigurationCommand,
GetBucketMetricsConfigurationCommand,
GetBucketNotificationConfigurationCommand,
GetBucketOwnershipControlsCommand,
@@ -34677,21 +38014,30 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
PutObjectRetentionCommand,
PutObjectTaggingCommand,
PutPublicAccessBlockCommand,
+ RenameObjectCommand,
RestoreObjectCommand,
SelectObjectContentCommand,
+ UpdateBucketMetadataInventoryTableConfigurationCommand,
+ UpdateBucketMetadataJournalTableConfigurationCommand,
UploadPartCommand,
UploadPartCopyCommand,
WriteGetObjectResponseCommand
};
- var _S3 = class _S32 extends S3Client {
+ var S3 = class extends S3Client {
+ static {
+ __name(this, "S3");
+ }
};
- __name(_S3, "S3");
- var S3 = _S3;
(0, import_smithy_client.createAggregatedClient)(commands, S3);
- var paginateListDirectoryBuckets = (0, import_core.createPaginator)(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
- var paginateListObjectsV2 = (0, import_core.createPaginator)(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
- var paginateListParts = (0, import_core.createPaginator)(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
- var import_util_waiter = require_dist_cjs68();
+ var import_core4 = require_dist_cjs17();
+ var paginateListBuckets = (0, import_core4.createPaginator)(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets");
+ var import_core5 = require_dist_cjs17();
+ var paginateListDirectoryBuckets = (0, import_core5.createPaginator)(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
+ var import_core6 = require_dist_cjs17();
+ var paginateListObjectsV2 = (0, import_core6.createPaginator)(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
+ var import_core7 = require_dist_cjs17();
+ var paginateListParts = (0, import_core7.createPaginator)(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
+ var import_util_waiter = require_dist_cjs72();
var checkState = __name(async (client, input) => {
let reason;
try {
@@ -34782,10 +38128,9 @@ var require_dist_cjs69 = __commonJS((exports, module) => {
const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);
return (0, import_util_waiter.checkExceptions)(result);
}, "waitUntilObjectNotExists");
- var import_util_endpoints = require_dist_cjs28();
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
var require_delayed_stream = __commonJS((exports, module) => {
var DelayedStream = function() {
this.source = null;
@@ -34874,7 +38219,7 @@ var require_delayed_stream = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submo
var require_combined_stream = __commonJS((exports, module) => {
var CombinedStream = function() {
this.writable = false;
@@ -35043,7 +38388,7 @@ var require_combined_stream = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client
+// node_modules/@aws-sdk/nested
var require_db = __commonJS((exports, module) => {
module.exports = {
"application/1d-interleaved-parityfec": {
@@ -43566,7 +46911,7 @@ var require_db = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-
+// node_modules/@aws-sdk/nested-
var require_mime_db = __commonJS((exports, module) => {
/*!
* mime-db
@@ -43577,7 +46922,7 @@ var require_mime_db = __commonJS((exports, module) => {
module.exports = require_db();
});
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var require_mime_types = __commonJS((exports) => {
var charset = function(type) {
if (!type || typeof type !== "string") {
@@ -43671,7 +47016,7 @@ var require_mime_types = __commonJS((exports) => {
populateMaps(exports.extensions, exports.types);
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_defer = __commonJS((exports, module) => {
var defer = function(fn) {
var nextTick = typeof setImmediate == "function" ? setImmediate : typeof process == "object" && typeof process.nextTick == "function" ? process.nextTick : null;
@@ -43684,7 +47029,7 @@ var require_defer = __commonJS((exports, module) => {
module.exports = defer;
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_async = __commonJS((exports, module) => {
var async = function(callback) {
var isAsync = false;
@@ -43705,7 +47050,7 @@ var require_async = __commonJS((exports, module) => {
module.exports = async;
});
-// node_modules/@aws-sdk/client-sso/d
+// node_modules/@aws-sdk/nested-clien
var require_abort = __commonJS((exports, module) => {
var abort = function(state) {
Object.keys(state.jobs).forEach(clean.bind(state));
@@ -43719,11 +47064,11 @@ var require_abort = __commonJS((exports, module) => {
module.exports = abort;
});
-// node_modules/@aws-sdk/client-sso/dis
+// node_modules/@aws-sdk/nested-clients
var require_iterate = __commonJS((exports, module) => {
- var iterate = function(list, iterator, state, callback) {
+ var iterate = function(list, iterator2, state, callback) {
var key = state["keyedList"] ? state["keyedList"][state.index] : state.index;
- state.jobs[key] = runJob(iterator, key, list[key], function(error, output) {
+ state.jobs[key] = runJob(iterator2, key, list[key], function(error, output) {
if (!(key in state.jobs)) {
return;
}
@@ -43736,12 +47081,12 @@ var require_iterate = __commonJS((exports, module) => {
callback(error, state.results);
});
};
- var runJob = function(iterator, key, item, callback) {
+ var runJob = function(iterator2, key, item, callback) {
var aborter;
- if (iterator.length == 2) {
- aborter = iterator(item, async(callback));
+ if (iterator2.length == 2) {
+ aborter = iterator2(item, async(callback));
} else {
- aborter = iterator(item, key, async(callback));
+ aborter = iterator2(item, key, async(callback));
}
return aborter;
};
@@ -43750,8 +47095,8 @@ var require_iterate = __commonJS((exports, module) => {
module.exports = iterate;
});
-// node_modules/@aws-sdk/client-sso/d
-var require_state2 = __commonJS((exports, module) => {
+// node_modules/@aws-sdk/nested-clien
+var require_state = __commonJS((exports, module) => {
var state = function(list, sortMethod) {
var isNamedList = !Array.isArray(list), initState = {
index: 0,
@@ -43770,7 +47115,7 @@ var require_state2 = __commonJS((exports, module) => {
module.exports = state;
});
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
var require_terminator = __commonJS((exports, module) => {
var terminator = function(callback) {
if (!Object.keys(this.jobs).length) {
@@ -43785,12 +47130,12 @@ var require_terminator = __commonJS((exports, module) => {
module.exports = terminator;
});
-// node_modules/@aws-sdk/client-sso/
+// node_modules/@aws-sdk/nested-clie
var require_parallel = __commonJS((exports, module) => {
- var parallel = function(list, iterator, callback) {
+ var parallel = function(list, iterator2, callback) {
var state = initState(list);
while (state.index < (state["keyedList"] || list).length) {
- iterate(list, iterator, state, function(error, result) {
+ iterate(list, iterator2, state, function(error, result) {
if (error) {
callback(error, result);
return;
@@ -43805,23 +47150,23 @@ var require_parallel = __commonJS((exports, module) => {
return terminator.bind(state, callback);
};
var iterate = require_iterate();
- var initState = require_state2();
+ var initState = require_state();
var terminator = require_terminator();
module.exports = parallel;
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
var require_serialOrdered = __commonJS((exports, module) => {
- var serialOrdered = function(list, iterator, sortMethod, callback) {
+ var serialOrdered = function(list, iterator2, sortMethod, callback) {
var state = initState(list, sortMethod);
- iterate(list, iterator, state, function iteratorHandler(error, result) {
+ iterate(list, iterator2, state, function iteratorHandler(error, result) {
if (error) {
callback(error, result);
return;
}
state.index++;
if (state.index < (state["keyedList"] || list).length) {
- iterate(list, iterator, state, iteratorHandler);
+ iterate(list, iterator2, state, iteratorHandler);
return;
}
callback(null, state.results);
@@ -43835,23 +47180,23 @@ var require_serialOrdered = __commonJS((exports, module) => {
return -1 * ascending(a, b);
};
var iterate = require_iterate();
- var initState = require_state2();
+ var initState = require_state();
var terminator = require_terminator();
module.exports = serialOrdered;
module.exports.ascending = ascending;
module.exports.descending = descending;
});
-// node_modules/@aws-sdk/client-ss
+// node_modules/@aws-sdk/nested-cl
var require_serial = __commonJS((exports, module) => {
- var serial = function(list, iterator, callback) {
- return serialOrdered(list, iterator, null, callback);
+ var serial = function(list, iterator2, callback) {
+ return serialOrdered(list, iterator2, null, callback);
};
var serialOrdered = require_serialOrdered();
module.exports = serial;
});
-// node_modules/@aws-sdk/client-s
+// node_modules/@aws-sdk/nested-c
var require_asynckit = __commonJS((exports, module) => {
module.exports = {
parallel: require_parallel(),
@@ -43860,7 +47205,727 @@ var require_asynckit = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/
+var require_es_object_atoms = __commonJS((exports, module) => {
+ module.exports = Object;
+});
+
+// node_modules/@aws-sdk/nested-cl
+var require_es_errors = __commonJS((exports, module) => {
+ module.exports = Error;
+});
+
+// node_modules/@aws-sdk/nested-c
+var require_eval = __commonJS((exports, module) => {
+ module.exports = EvalError;
+});
+
+// node_modules/@aws-sdk/nested-cl
+var require_range = __commonJS((exports, module) => {
+ module.exports = RangeError;
+});
+
+// node_modules/@aws-sdk/nested-
+var require_ref = __commonJS((exports, module) => {
+ module.exports = ReferenceError;
+});
+
+// node_modules/@aws-sdk/nested-cli
+var require_syntax = __commonJS((exports, module) => {
+ module.exports = SyntaxError;
+});
+
+// node_modules/@aws-sdk/nested-c
+var require_type = __commonJS((exports, module) => {
+ module.exports = TypeError;
+});
+
+// node_modules/@aws-sdk/nested-
+var require_uri = __commonJS((exports, module) => {
+ module.exports = URIError;
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_abs = __commonJS((exports, module) => {
+ module.exports = Math.abs;
+});
+
+// node_modules/@aws-sdk/nested-clients/
+var require_floor = __commonJS((exports, module) => {
+ module.exports = Math.floor;
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_max = __commonJS((exports, module) => {
+ module.exports = Math.max;
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_min = __commonJS((exports, module) => {
+ module.exports = Math.min;
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_pow = __commonJS((exports, module) => {
+ module.exports = Math.pow;
+});
+
+// node_modules/@aws-sdk/nested-clients/
+var require_round = __commonJS((exports, module) => {
+ module.exports = Math.round;
+});
+
+// node_modules/@aws-sdk/nested-clients/
+var require_isNaN = __commonJS((exports, module) => {
+ module.exports = Number.isNaN || function isNaN(a) {
+ return a !== a;
+ };
+});
+
+// node_modules/@aws-sdk/nested-clients
+var require_sign = __commonJS((exports, module) => {
+ var $isNaN = require_isNaN();
+ module.exports = function sign(number) {
+ if ($isNaN(number) || number === 0) {
+ return number;
+ }
+ return number < 0 ? -1 : 1;
+ };
+});
+
+// node_modules/@aws-sdk/nes
+var require_gOPD = __commonJS((exports, module) => {
+ module.exports = Object.getOwnPropertyDescriptor;
+});
+
+// node_modules/@aws-sdk/nest
+var require_gopd = __commonJS((exports, module) => {
+ var $gOPD = require_gOPD();
+ if ($gOPD) {
+ try {
+ $gOPD([], "length");
+ } catch (e) {
+ $gOPD = null;
+ }
+ }
+ module.exports = $gOPD;
+});
+
+// node_modules/@aws-sdk/nested-clients/dis
+var require_es_define_property = __commonJS((exports, module) => {
+ var $defineProperty = Object.defineProperty || false;
+ if ($defineProperty) {
+ try {
+ $defineProperty({}, "a", { value: 1 });
+ } catch (e) {
+ $defineProperty = false;
+ }
+ }
+ module.exports = $defineProperty;
+});
+
+// node_modules/@aws-sdk/nested-clie
+var require_shams = __commonJS((exports, module) => {
+ module.exports = function hasSymbols() {
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
+ return false;
+ }
+ if (typeof Symbol.iterator === "symbol") {
+ return true;
+ }
+ var obj = {};
+ var sym = Symbol("test");
+ var symObj = Object(sym);
+ if (typeof sym === "string") {
+ return false;
+ }
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
+ return false;
+ }
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
+ return false;
+ }
+ var symVal = 42;
+ obj[sym] = symVal;
+ for (var _ in obj) {
+ return false;
+ }
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
+ return false;
+ }
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
+ return false;
+ }
+ var syms = Object.getOwnPropertySymbols(obj);
+ if (syms.length !== 1 || syms[0] !== sym) {
+ return false;
+ }
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
+ return false;
+ }
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
+ return false;
+ }
+ }
+ return true;
+ };
+});
+
+// node_modules/@aws-sdk/nested-clie
+var require_has_symbols = __commonJS((exports, module) => {
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
+ var hasSymbolSham = require_shams();
+ module.exports = function hasNativeSymbols() {
+ if (typeof origSymbol !== "function") {
+ return false;
+ }
+ if (typeof Symbol !== "function") {
+ return false;
+ }
+ if (typeof origSymbol("foo") !== "symbol") {
+ return false;
+ }
+ if (typeof Symbol("bar") !== "symbol") {
+ return false;
+ }
+ return hasSymbolSham();
+ };
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
+var require_Reflect_getPrototypeOf = __commonJS((exports, module) => {
+ module.exports = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
+var require_Object_getPrototypeOf = __commonJS((exports, module) => {
+ var $Object = require_es_object_atoms();
+ module.exports = $Object.getPrototypeOf || null;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cj
+var require_implementation = __commonJS((exports, module) => {
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
+ var toStr = Object.prototype.toString;
+ var max = Math.max;
+ var funcType = "[object Function]";
+ var concatty = function concatty(a, b) {
+ var arr = [];
+ for (var i = 0;i < a.length; i += 1) {
+ arr[i] = a[i];
+ }
+ for (var j = 0;j < b.length; j += 1) {
+ arr[j + a.length] = b[j];
+ }
+ return arr;
+ };
+ var slicy = function slicy(arrLike, offset) {
+ var arr = [];
+ for (var i = offset || 0, j = 0;i < arrLike.length; i += 1, j += 1) {
+ arr[j] = arrLike[i];
+ }
+ return arr;
+ };
+ var joiny = function(arr, joiner) {
+ var str = "";
+ for (var i = 0;i < arr.length; i += 1) {
+ str += arr[i];
+ if (i + 1 < arr.length) {
+ str += joiner;
+ }
+ }
+ return str;
+ };
+ module.exports = function bind(that) {
+ var target = this;
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
+ throw new TypeError(ERROR_MESSAGE + target);
+ }
+ var args = slicy(arguments, 1);
+ var bound;
+ var binder = function() {
+ if (this instanceof bound) {
+ var result = target.apply(this, concatty(args, arguments));
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+ }
+ return target.apply(that, concatty(args, arguments));
+ };
+ var boundLength = max(0, target.length - args.length);
+ var boundArgs = [];
+ for (var i = 0;i < boundLength; i++) {
+ boundArgs[i] = "$" + i;
+ }
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
+ if (target.prototype) {
+ var Empty = function Empty() {
+ };
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty;
+ Empty.prototype = null;
+ }
+ return bound;
+ };
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_function_bind = __commonJS((exports, module) => {
+ var implementation = require_implementation();
+ module.exports = Function.prototype.bind || implementation;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submod
+var require_functionCall = __commonJS((exports, module) => {
+ module.exports = Function.prototype.call;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodu
+var require_functionApply = __commonJS((exports, module) => {
+ module.exports = Function.prototype.apply;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submod
+var require_reflectApply = __commonJS((exports, module) => {
+ module.exports = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submo
+var require_actualApply = __commonJS((exports, module) => {
+ var bind3 = require_function_bind();
+ var $apply = require_functionApply();
+ var $call = require_functionCall();
+ var $reflectApply = require_reflectApply();
+ module.exports = $reflectApply || bind3.call($call, $apply);
+});
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs
+var require_call_bind_apply_helpers = __commonJS((exports, module) => {
+ var bind3 = require_function_bind();
+ var $TypeError = require_type();
+ var $call = require_functionCall();
+ var $actualApply = require_actualApply();
+ module.exports = function callBindBasic(args) {
+ if (args.length < 1 || typeof args[0] !== "function") {
+ throw new $TypeError("a function is required");
+ }
+ return $actualApply(bind3, $call, args);
+ };
+});
+
+// node_modules/@aws-sdk/nested-cli
+var require_get = __commonJS((exports, module) => {
+ var callBind = require_call_bind_apply_helpers();
+ var gOPD = require_gopd();
+ var hasProtoAccessor;
+ try {
+ hasProtoAccessor = [].__proto__ === Array.prototype;
+ } catch (e) {
+ if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
+ throw e;
+ }
+ }
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, "__proto__");
+ var $Object = Object;
+ var $getPrototypeOf = $Object.getPrototypeOf;
+ module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? function getDunder(value) {
+ return $getPrototypeOf(value == null ? value : $Object(value));
+ } : false;
+});
+
+// node_modules/@aws-sdk/nested-cl
+var require_get_proto = __commonJS((exports, module) => {
+ var reflectGetProto = require_Reflect_getPrototypeOf();
+ var originalGetProto = require_Object_getPrototypeOf();
+ var getDunderProto = require_get();
+ module.exports = reflectGetProto ? function getProto(O) {
+ return reflectGetProto(O);
+ } : originalGetProto ? function getProto(O) {
+ if (!O || typeof O !== "object" && typeof O !== "function") {
+ throw new TypeError("getProto: not an object");
+ }
+ return originalGetProto(O);
+ } : getDunderProto ? function getProto(O) {
+ return getDunderProto(O);
+ } : null;
+});
+
+// node_modules/@aws-sdk/nested
+var require_hasown = __commonJS((exports, module) => {
+ var call = Function.prototype.call;
+ var $hasOwn = Object.prototype.hasOwnProperty;
+ var bind3 = require_function_bind();
+ module.exports = bind3.call(call, $hasOwn);
+});
+
+// node_modules/@aws-sdk/nested-client
+var require_get_intrinsic = __commonJS((exports, module) => {
+ var undefined2;
+ var $Object = require_es_object_atoms();
+ var $Error = require_es_errors();
+ var $EvalError = require_eval();
+ var $RangeError = require_range();
+ var $ReferenceError = require_ref();
+ var $SyntaxError = require_syntax();
+ var $TypeError = require_type();
+ var $URIError = require_uri();
+ var abs = require_abs();
+ var floor = require_floor();
+ var max = require_max();
+ var min = require_min();
+ var pow = require_pow();
+ var round = require_round();
+ var sign = require_sign();
+ var $Function = Function;
+ var getEvalledConstructor = function(expressionSyntax) {
+ try {
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
+ } catch (e) {
+ }
+ };
+ var $gOPD = require_gopd();
+ var $defineProperty = require_es_define_property();
+ var throwTypeError = function() {
+ throw new $TypeError;
+ };
+ var ThrowTypeError = $gOPD ? function() {
+ try {
+ arguments.callee;
+ return throwTypeError;
+ } catch (calleeThrows) {
+ try {
+ return $gOPD(arguments, "callee").get;
+ } catch (gOPDthrows) {
+ return throwTypeError;
+ }
+ }
+ }() : throwTypeError;
+ var hasSymbols = require_has_symbols()();
+ var getProto = require_get_proto();
+ var $ObjectGPO = require_Object_getPrototypeOf();
+ var $ReflectGPO = require_Reflect_getPrototypeOf();
+ var $apply = require_functionApply();
+ var $call = require_functionCall();
+ var needsEval = {};
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
+ var INTRINSICS = {
+ __proto__: null,
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
+ "%Array%": Array,
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
+ "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
+ "%AsyncFromSyncIteratorPrototype%": undefined2,
+ "%AsyncFunction%": needsEval,
+ "%AsyncGenerator%": needsEval,
+ "%AsyncGeneratorFunction%": needsEval,
+ "%AsyncIteratorPrototype%": needsEval,
+ "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
+ "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
+ "%Boolean%": Boolean,
+ "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
+ "%Date%": Date,
+ "%decodeURI%": decodeURI,
+ "%decodeURIComponent%": decodeURIComponent,
+ "%encodeURI%": encodeURI,
+ "%encodeURIComponent%": encodeURIComponent,
+ "%Error%": $Error,
+ "%eval%": eval,
+ "%EvalError%": $EvalError,
+ "%Float16Array%": typeof Float16Array === "undefined" ? undefined2 : Float16Array,
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
+ "%Function%": $Function,
+ "%GeneratorFunction%": needsEval,
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
+ "%isFinite%": isFinite,
+ "%isNaN%": isNaN,
+ "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
+ "%JSON%": typeof JSON === "object" ? JSON : undefined2,
+ "%Map%": typeof Map === "undefined" ? undefined2 : Map,
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto(new Map()[Symbol.iterator]()),
+ "%Math%": Math,
+ "%Number%": Number,
+ "%Object%": $Object,
+ "%Object.getOwnPropertyDescriptor%": $gOPD,
+ "%parseFloat%": parseFloat,
+ "%parseInt%": parseInt,
+ "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
+ "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
+ "%RangeError%": $RangeError,
+ "%ReferenceError%": $ReferenceError,
+ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
+ "%RegExp%": RegExp,
+ "%Set%": typeof Set === "undefined" ? undefined2 : Set,
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto(new Set()[Symbol.iterator]()),
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
+ "%String%": String,
+ "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
+ "%Symbol%": hasSymbols ? Symbol : undefined2,
+ "%SyntaxError%": $SyntaxError,
+ "%ThrowTypeError%": ThrowTypeError,
+ "%TypedArray%": TypedArray,
+ "%TypeError%": $TypeError,
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
+ "%URIError%": $URIError,
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet,
+ "%Function.prototype.call%": $call,
+ "%Function.prototype.apply%": $apply,
+ "%Object.defineProperty%": $defineProperty,
+ "%Object.getPrototypeOf%": $ObjectGPO,
+ "%Math.abs%": abs,
+ "%Math.floor%": floor,
+ "%Math.max%": max,
+ "%Math.min%": min,
+ "%Math.pow%": pow,
+ "%Math.round%": round,
+ "%Math.sign%": sign,
+ "%Reflect.getPrototypeOf%": $ReflectGPO
+ };
+ if (getProto) {
+ try {
+ null.error;
+ } catch (e) {
+ errorProto = getProto(getProto(e));
+ INTRINSICS["%Error.prototype%"] = errorProto;
+ }
+ }
+ var errorProto;
+ var doEval = function doEval(name) {
+ var value;
+ if (name === "%AsyncFunction%") {
+ value = getEvalledConstructor("async function () {}");
+ } else if (name === "%GeneratorFunction%") {
+ value = getEvalledConstructor("function* () {}");
+ } else if (name === "%AsyncGeneratorFunction%") {
+ value = getEvalledConstructor("async function* () {}");
+ } else if (name === "%AsyncGenerator%") {
+ var fn = doEval("%AsyncGeneratorFunction%");
+ if (fn) {
+ value = fn.prototype;
+ }
+ } else if (name === "%AsyncIteratorPrototype%") {
+ var gen = doEval("%AsyncGenerator%");
+ if (gen && getProto) {
+ value = getProto(gen.prototype);
+ }
+ }
+ INTRINSICS[name] = value;
+ return value;
+ };
+ var LEGACY_ALIASES = {
+ __proto__: null,
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
+ "%ArrayPrototype%": ["Array", "prototype"],
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
+ "%BooleanPrototype%": ["Boolean", "prototype"],
+ "%DataViewPrototype%": ["DataView", "prototype"],
+ "%DatePrototype%": ["Date", "prototype"],
+ "%ErrorPrototype%": ["Error", "prototype"],
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
+ "%FunctionPrototype%": ["Function", "prototype"],
+ "%Generator%": ["GeneratorFunction", "prototype"],
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
+ "%JSONParse%": ["JSON", "parse"],
+ "%JSONStringify%": ["JSON", "stringify"],
+ "%MapPrototype%": ["Map", "prototype"],
+ "%NumberPrototype%": ["Number", "prototype"],
+ "%ObjectPrototype%": ["Object", "prototype"],
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
+ "%PromisePrototype%": ["Promise", "prototype"],
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
+ "%Promise_all%": ["Promise", "all"],
+ "%Promise_reject%": ["Promise", "reject"],
+ "%Promise_resolve%": ["Promise", "resolve"],
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
+ "%RegExpPrototype%": ["RegExp", "prototype"],
+ "%SetPrototype%": ["Set", "prototype"],
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
+ "%StringPrototype%": ["String", "prototype"],
+ "%SymbolPrototype%": ["Symbol", "prototype"],
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
+ "%URIErrorPrototype%": ["URIError", "prototype"],
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
+ };
+ var bind3 = require_function_bind();
+ var hasOwn = require_hasown();
+ var $concat = bind3.call($call, Array.prototype.concat);
+ var $spliceApply = bind3.call($apply, Array.prototype.splice);
+ var $replace = bind3.call($call, String.prototype.replace);
+ var $strSlice = bind3.call($call, String.prototype.slice);
+ var $exec = bind3.call($call, RegExp.prototype.exec);
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
+ var reEscapeChar = /\\(\\)?/g;
+ var stringToPath = function stringToPath(string) {
+ var first = $strSlice(string, 0, 1);
+ var last = $strSlice(string, -1);
+ if (first === "%" && last !== "%") {
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
+ } else if (last === "%" && first !== "%") {
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
+ }
+ var result = [];
+ $replace(string, rePropName, function(match, number, quote, subString) {
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
+ });
+ return result;
+ };
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
+ var intrinsicName = name;
+ var alias;
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
+ alias = LEGACY_ALIASES[intrinsicName];
+ intrinsicName = "%" + alias[0] + "%";
+ }
+ if (hasOwn(INTRINSICS, intrinsicName)) {
+ var value = INTRINSICS[intrinsicName];
+ if (value === needsEval) {
+ value = doEval(intrinsicName);
+ }
+ if (typeof value === "undefined" && !allowMissing) {
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
+ }
+ return {
+ alias,
+ name: intrinsicName,
+ value
+ };
+ }
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
+ };
+ module.exports = function GetIntrinsic(name, allowMissing) {
+ if (typeof name !== "string" || name.length === 0) {
+ throw new $TypeError("intrinsic name must be a non-empty string");
+ }
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
+ throw new $TypeError('"allowMissing" argument must be a boolean');
+ }
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
+ }
+ var parts = stringToPath(name);
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
+ var intrinsicRealName = intrinsic.name;
+ var value = intrinsic.value;
+ var skipFurtherCaching = false;
+ var alias = intrinsic.alias;
+ if (alias) {
+ intrinsicBaseName = alias[0];
+ $spliceApply(parts, $concat([0, 1], alias));
+ }
+ for (var i = 1, isOwn = true;i < parts.length; i += 1) {
+ var part = parts[i];
+ var first = $strSlice(part, 0, 1);
+ var last = $strSlice(part, -1);
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
+ throw new $SyntaxError("property names with quotes must have matching quotes");
+ }
+ if (part === "constructor" || !isOwn) {
+ skipFurtherCaching = true;
+ }
+ intrinsicBaseName += "." + part;
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
+ value = INTRINSICS[intrinsicRealName];
+ } else if (value != null) {
+ if (!(part in value)) {
+ if (!allowMissing) {
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
+ }
+ return;
+ }
+ if ($gOPD && i + 1 >= parts.length) {
+ var desc = $gOPD(value, part);
+ isOwn = !!desc;
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
+ value = desc.get;
+ } else {
+ value = value[part];
+ }
+ } else {
+ isOwn = hasOwn(value, part);
+ value = value[part];
+ }
+ if (isOwn && !skipFurtherCaching) {
+ INTRINSICS[intrinsicRealName] = value;
+ }
+ }
+ }
+ return value;
+ };
+});
+
+// node_modules/@aws-sdk/nested-clients/
+var require_shams2 = __commonJS((exports, module) => {
+ var hasSymbols = require_shams();
+ module.exports = function hasToStringTagShams() {
+ return hasSymbols() && !!Symbol.toStringTag;
+ };
+});
+
+// node_modules/@aws-sdk/nested-clients/dis
+var require_es_set_tostringtag = __commonJS((exports, module) => {
+ var GetIntrinsic = require_get_intrinsic();
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
+ var hasToStringTag = require_shams2()();
+ var hasOwn = require_hasown();
+ var $TypeError = require_type();
+ var toStringTag2 = hasToStringTag ? Symbol.toStringTag : null;
+ module.exports = function setToStringTag(object, value) {
+ var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
+ var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
+ if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") {
+ throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
+ }
+ if (toStringTag2 && (overrideIfSet || !hasOwn(object, toStringTag2))) {
+ if ($defineProperty) {
+ $defineProperty(object, toStringTag2, {
+ configurable: !nonConfigurable,
+ enumerable: false,
+ value,
+ writable: false
+ });
+ } else {
+ object[toStringTag2] = value;
+ }
+ }
+ };
+});
+
+// node_modules/@aws-sdk/nested-clients/d
var require_populate = __commonJS((exports, module) => {
module.exports = function(dst, src) {
Object.keys(src).forEach(function(prop) {
@@ -43870,7 +47935,7 @@ var require_populate = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
var require_form_data = __commonJS((exports, module) => {
var FormData2 = function(options) {
if (!(this instanceof FormData2)) {
@@ -43893,23 +47958,25 @@ var require_form_data = __commonJS((exports, module) => {
var parseUrl = __require("url").parse;
var fs = __require("fs");
var Stream = __require("stream").Stream;
+ var crypto2 = __require("crypto");
var mime = require_mime_types();
var asynckit = require_asynckit();
+ var setToStringTag = require_es_set_tostringtag();
+ var hasOwn = require_hasown();
var populate = require_populate();
- module.exports = FormData2;
util.inherits(FormData2, CombinedStream);
FormData2.LINE_BREAK = "\r\n";
FormData2.DEFAULT_CONTENT_TYPE = "application/octet-stream";
FormData2.prototype.append = function(field, value, options) {
options = options || {};
- if (typeof options == "string") {
+ if (typeof options === "string") {
options = { filename: options };
}
var append = CombinedStream.prototype.append.bind(this);
- if (typeof value == "number") {
- value = "" + value;
+ if (typeof value === "number" || value == null) {
+ value = String(value);
}
- if (util.isArray(value)) {
+ if (Array.isArray(value)) {
this._error(new Error("Arrays are not supported."));
return;
}
@@ -43923,7 +47990,7 @@ var require_form_data = __commonJS((exports, module) => {
FormData2.prototype._trackLength = function(header, value, options) {
var valueLength = 0;
if (options.knownLength != null) {
- valueLength += +options.knownLength;
+ valueLength += Number(options.knownLength);
} else if (Buffer.isBuffer(value)) {
valueLength = value.length;
} else if (typeof value === "string") {
@@ -43931,7 +47998,7 @@ var require_form_data = __commonJS((exports, module) => {
}
this._valueLength += valueLength;
this._overheadLength += Buffer.byteLength(header) + FormData2.LINE_BREAK.length;
- if (!value || !value.path && !(value.readable && value.hasOwnProperty("httpVersion")) && !(value instanceof Stream)) {
+ if (!value || !value.path && !(value.readable && hasOwn(value, "httpVersion")) && !(value instanceof Stream)) {
return;
}
if (!options.knownLength) {
@@ -43939,26 +48006,25 @@ var require_form_data = __commonJS((exports, module) => {
}
};
FormData2.prototype._lengthRetriever = function(value, callback) {
- if (value.hasOwnProperty("fd")) {
+ if (hasOwn(value, "fd")) {
if (value.end != null && value.end != Infinity && value.start != null) {
callback(null, value.end + 1 - (value.start ? value.start : 0));
} else {
fs.stat(value.path, function(err, stat) {
- var fileSize;
if (err) {
callback(err);
return;
}
- fileSize = stat.size - (value.start ? value.start : 0);
+ var fileSize = stat.size - (value.start ? value.start : 0);
callback(null, fileSize);
});
}
- } else if (value.hasOwnProperty("httpVersion")) {
- callback(null, +value.headers["content-length"]);
- } else if (value.hasOwnProperty("httpModule")) {
+ } else if (hasOwn(value, "httpVersion")) {
+ callback(null, Number(value.headers["content-length"]));
+ } else if (hasOwn(value, "httpModule")) {
value.on("response", function(response) {
value.pause();
- callback(null, +response.headers["content-length"]);
+ callback(null, Number(response.headers["content-length"]));
});
value.resume();
} else {
@@ -43966,7 +48032,7 @@ var require_form_data = __commonJS((exports, module) => {
}
};
FormData2.prototype._multiPartHeader = function(field, value, options) {
- if (typeof options.header == "string") {
+ if (typeof options.header === "string") {
return options.header;
}
var contentDisposition = this._getContentDisposition(value, options);
@@ -43976,55 +48042,54 @@ var require_form_data = __commonJS((exports, module) => {
"Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
"Content-Type": [].concat(contentType || [])
};
- if (typeof options.header == "object") {
+ if (typeof options.header === "object") {
populate(headers, options.header);
}
var header;
for (var prop in headers) {
- if (!headers.hasOwnProperty(prop))
- continue;
- header = headers[prop];
- if (header == null) {
- continue;
- }
- if (!Array.isArray(header)) {
- header = [header];
- }
- if (header.length) {
- contents += prop + ": " + header.join("; ") + FormData2.LINE_BREAK;
+ if (hasOwn(headers, prop)) {
+ header = headers[prop];
+ if (header == null) {
+ continue;
+ }
+ if (!Array.isArray(header)) {
+ header = [header];
+ }
+ if (header.length) {
+ contents += prop + ": " + header.join("; ") + FormData2.LINE_BREAK;
+ }
}
}
return "--" + this.getBoundary() + FormData2.LINE_BREAK + contents + FormData2.LINE_BREAK;
};
FormData2.prototype._getContentDisposition = function(value, options) {
- var filename, contentDisposition;
+ var filename;
if (typeof options.filepath === "string") {
filename = path.normalize(options.filepath).replace(/\\/g, "/");
- } else if (options.filename || value.name || value.path) {
- filename = path.basename(options.filename || value.name || value.path);
- } else if (value.readable && value.hasOwnProperty("httpVersion")) {
+ } else if (options.filename || value && (value.name || value.path)) {
+ filename = path.basename(options.filename || value && (value.name || value.path));
+ } else if (value && value.readable && hasOwn(value, "httpVersion")) {
filename = path.basename(value.client._httpMessage.path || "");
}
if (filename) {
- contentDisposition = 'filename="' + filename + '"';
+ return 'filename="' + filename + '"';
}
- return contentDisposition;
};
FormData2.prototype._getContentType = function(value, options) {
var contentType = options.contentType;
- if (!contentType && value.name) {
+ if (!contentType && value && value.name) {
contentType = mime.lookup(value.name);
}
- if (!contentType && value.path) {
+ if (!contentType && value && value.path) {
contentType = mime.lookup(value.path);
}
- if (!contentType && value.readable && value.hasOwnProperty("httpVersion")) {
+ if (!contentType && value && value.readable && hasOwn(value, "httpVersion")) {
contentType = value.headers["content-type"];
}
if (!contentType && (options.filepath || options.filename)) {
contentType = mime.lookup(options.filepath || options.filename);
}
- if (!contentType && typeof value == "object") {
+ if (!contentType && value && typeof value === "object") {
contentType = FormData2.DEFAULT_CONTENT_TYPE;
}
return contentType;
@@ -44048,13 +48113,16 @@ var require_form_data = __commonJS((exports, module) => {
"content-type": "multipart/form-data; boundary=" + this.getBoundary()
};
for (header in userHeaders) {
- if (userHeaders.hasOwnProperty(header)) {
+ if (hasOwn(userHeaders, header)) {
formHeaders[header.toLowerCase()] = userHeaders[header];
}
}
return formHeaders;
};
FormData2.prototype.setBoundary = function(boundary) {
+ if (typeof boundary !== "string") {
+ throw new TypeError("FormData boundary must be a string");
+ }
this._boundary = boundary;
};
FormData2.prototype.getBoundary = function() {
@@ -44081,11 +48149,7 @@ var require_form_data = __commonJS((exports, module) => {
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
};
FormData2.prototype._generateBoundary = function() {
- var boundary = "--------------------------";
- for (var i = 0;i < 24; i++) {
- boundary += Math.floor(Math.random() * 10).toString(16);
- }
- this._boundary = boundary;
+ this._boundary = "--------------------------" + crypto2.randomBytes(12).toString("hex");
};
FormData2.prototype.getLengthSync = function() {
var knownLength = this._overheadLength + this._valueLength;
@@ -44125,8 +48189,10 @@ var require_form_data = __commonJS((exports, module) => {
});
};
FormData2.prototype.submit = function(params, cb) {
- var request, options, defaults = { method: "post" };
- if (typeof params == "string") {
+ var request;
+ var options;
+ var defaults = { method: "post" };
+ if (typeof params === "string") {
params = parseUrl(params);
options = populate({
port: params.port,
@@ -44137,11 +48203,11 @@ var require_form_data = __commonJS((exports, module) => {
} else {
options = populate(params, defaults);
if (!options.port) {
- options.port = options.protocol == "https:" ? 443 : 80;
+ options.port = options.protocol === "https:" ? 443 : 80;
}
}
options.headers = this.getHeaders(params.headers);
- if (options.protocol == "https:") {
+ if (options.protocol === "https:") {
request = https.request(options);
} else {
request = http.request(options);
@@ -44179,9 +48245,78 @@ var require_form_data = __commonJS((exports, module) => {
FormData2.prototype.toString = function() {
return "[object FormData]";
};
+ setToStringTag(FormData2, "FormData");
+ module.exports = FormData2;
});
-// node_modules/@aws-sdk/cl
+// node_modules/@aws-sdk/nested-clients
+var require_proxy_from_env = __commonJS((exports) => {
+ var getProxyForUrl = function(url2) {
+ var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
+ var proto = parsedUrl.protocol;
+ var hostname = parsedUrl.host;
+ var port = parsedUrl.port;
+ if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
+ return "";
+ }
+ proto = proto.split(":", 1)[0];
+ hostname = hostname.replace(/:\d*$/, "");
+ port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
+ if (!shouldProxy(hostname, port)) {
+ return "";
+ }
+ var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
+ if (proxy && proxy.indexOf("://") === -1) {
+ proxy = proto + "://" + proxy;
+ }
+ return proxy;
+ };
+ var shouldProxy = function(hostname, port) {
+ var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
+ if (!NO_PROXY) {
+ return true;
+ }
+ if (NO_PROXY === "*") {
+ return false;
+ }
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
+ if (!proxy) {
+ return true;
+ }
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
+ if (parsedProxyPort && parsedProxyPort !== port) {
+ return true;
+ }
+ if (!/^[.*]/.test(parsedProxyHostname)) {
+ return hostname !== parsedProxyHostname;
+ }
+ if (parsedProxyHostname.charAt(0) === "*") {
+ parsedProxyHostname = parsedProxyHostname.slice(1);
+ }
+ return !stringEndsWith.call(hostname, parsedProxyHostname);
+ });
+ };
+ var getEnv = function(key) {
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
+ };
+ var parseUrl = __require("url").parse;
+ var DEFAULT_PORTS = {
+ ftp: 21,
+ gopher: 70,
+ http: 80,
+ https: 443,
+ ws: 80,
+ wss: 443
+ };
+ var stringEndsWith = String.prototype.endsWith || function(s) {
+ return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
+ };
+ exports.getProxyForUrl = getProxyForUrl;
+});
+
+// node_modules/@aws-sdk/ne
var require_ms = __commonJS((exports, module) => {
var parse = function(str) {
str = String(str);
@@ -44279,19 +48414,19 @@ var require_ms = __commonJS((exports, module) => {
var d = h * 24;
var w = d * 7;
var y = d * 365.25;
- module.exports = function(val2, options) {
+ module.exports = function(val, options) {
options = options || {};
- var type = typeof val2;
- if (type === "string" && val2.length > 0) {
- return parse(val2);
- } else if (type === "number" && isFinite(val2)) {
- return options.long ? fmtLong(val2) : fmtShort(val2);
+ var type = typeof val;
+ if (type === "string" && val.length > 0) {
+ return parse(val);
+ } else if (type === "number" && isFinite(val)) {
+ return options.long ? fmtLong(val) : fmtShort(val);
}
- throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val2));
+ throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
};
});
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var require_common = __commonJS((exports, module) => {
var setup = function(env) {
createDebug.debug = createDebug;
@@ -44345,8 +48480,8 @@ var require_common = __commonJS((exports, module) => {
index++;
const formatter = createDebug.formatters[format];
if (typeof formatter === "function") {
- const val2 = args[index];
- match = formatter.call(self2, val2);
+ const val = args[index];
+ match = formatter.call(self2, val);
args.splice(index, 1);
index--;
}
@@ -44393,55 +48528,69 @@ var require_common = __commonJS((exports, module) => {
createDebug.namespaces = namespaces;
createDebug.names = [];
createDebug.skips = [];
- let i;
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
- const len = split.length;
- for (i = 0;i < len; i++) {
- if (!split[i]) {
- continue;
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
+ for (const ns of split) {
+ if (ns[0] === "-") {
+ createDebug.skips.push(ns.slice(1));
+ } else {
+ createDebug.names.push(ns);
}
- namespaces = split[i].replace(/\*/g, ".*?");
- if (namespaces[0] === "-") {
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
+ }
+ }
+ function matchesTemplate(search, template) {
+ let searchIndex = 0;
+ let templateIndex = 0;
+ let starIndex = -1;
+ let matchIndex = 0;
+ while (searchIndex < search.length) {
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
+ if (template[templateIndex] === "*") {
+ starIndex = templateIndex;
+ matchIndex = searchIndex;
+ templateIndex++;
+ } else {
+ searchIndex++;
+ templateIndex++;
+ }
+ } else if (starIndex !== -1) {
+ templateIndex = starIndex + 1;
+ matchIndex++;
+ searchIndex = matchIndex;
} else {
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
+ return false;
}
}
+ while (templateIndex < template.length && template[templateIndex] === "*") {
+ templateIndex++;
+ }
+ return templateIndex === template.length;
}
function disable() {
const namespaces = [
- ...createDebug.names.map(toNamespace),
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
+ ...createDebug.names,
+ ...createDebug.skips.map((namespace) => "-" + namespace)
].join(",");
createDebug.enable("");
return namespaces;
}
function enabled(name) {
- if (name[name.length - 1] === "*") {
- return true;
- }
- let i;
- let len;
- for (i = 0, len = createDebug.skips.length;i < len; i++) {
- if (createDebug.skips[i].test(name)) {
+ for (const skip of createDebug.skips) {
+ if (matchesTemplate(name, skip)) {
return false;
}
}
- for (i = 0, len = createDebug.names.length;i < len; i++) {
- if (createDebug.names[i].test(name)) {
+ for (const ns of createDebug.names) {
+ if (matchesTemplate(name, ns)) {
return true;
}
}
return false;
}
- function toNamespace(regexp) {
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
- }
- function coerce(val2) {
- if (val2 instanceof Error) {
- return val2.stack || val2.message;
+ function coerce(val) {
+ if (val instanceof Error) {
+ return val.stack || val.message;
}
- return val2;
+ return val;
}
function destroy() {
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
@@ -44452,7 +48601,7 @@ var require_common = __commonJS((exports, module) => {
module.exports = setup;
});
-// node_modules/@aws-sdk/client-sso/
+// node_modules/@aws-sdk/nested-clie
var require_browser = __commonJS((exports, module) => {
var useColors = function() {
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
@@ -44461,7 +48610,8 @@ var require_browser = __commonJS((exports, module) => {
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
}
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+ let m;
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
};
var formatArgs = function(args) {
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + exports.humanize(this.diff);
@@ -44496,7 +48646,7 @@ var require_browser = __commonJS((exports, module) => {
var load = function() {
let r;
try {
- r = exports.storage.getItem("debug");
+ r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
} catch (error) {
}
if (!r && typeof process !== "undefined" && "env" in process) {
@@ -44615,7 +48765,7 @@ var require_browser = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-s
+// node_modules/@aws-sdk/nested-c
var require_has_flag = __commonJS((exports, module) => {
module.exports = (flag, argv = process.argv) => {
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
@@ -44625,7 +48775,7 @@ var require_has_flag = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dis
+// node_modules/@aws-sdk/nested-clients
var require_supports_color = __commonJS((exports, module) => {
var translateLevel = function(level) {
if (level === 0) {
@@ -44724,7 +48874,7 @@ var require_supports_color = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-s
+// node_modules/@aws-sdk/nested-c
var require_node = __commonJS((exports, module) => {
var useColors = function() {
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
@@ -44748,7 +48898,7 @@ var require_node = __commonJS((exports, module) => {
return new Date().toISOString() + " ";
};
var log = function(...args) {
- return process.stderr.write(util.format(...args) + "\n");
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n");
};
var save = function(namespaces) {
if (namespaces) {
@@ -44868,17 +49018,17 @@ var require_node = __commonJS((exports, module) => {
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
- let val2 = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val2)) {
- val2 = true;
- } else if (/^(no|off|false|disabled)$/i.test(val2)) {
- val2 = false;
- } else if (val2 === "null") {
- val2 = null;
+ let val = process.env[key];
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === "null") {
+ val = null;
} else {
- val2 = Number(val2);
+ val = Number(val);
}
- obj[prop] = val2;
+ obj[prop] = val;
return obj;
}, {});
module.exports = require_common()(exports);
@@ -44893,7 +49043,7 @@ var require_node = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-ss
+// node_modules/@aws-sdk/nested-cl
var require_src = __commonJS((exports, module) => {
if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) {
module.exports = require_browser();
@@ -44902,7 +49052,7 @@ var require_src = __commonJS((exports, module) => {
}
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
var require_debug = __commonJS((exports, module) => {
var debug;
module.exports = function() {
@@ -44920,7 +49070,7 @@ var require_debug = __commonJS((exports, module) => {
};
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
var require_follow_redirects = __commonJS((exports, module) => {
var RedirectableRequest = function(options, responseCallback) {
Writable.call(this);
@@ -44959,7 +49109,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
if (isURL(input)) {
input = spreadUrlObject(input);
} else if (isString2(input)) {
- input = spreadUrlObject(parseUrl2(input));
+ input = spreadUrlObject(parseUrl(input));
} else {
callback = options;
options = validateUrl(input);
@@ -44995,7 +49145,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
};
var noop2 = function() {
};
- var parseUrl2 = function(input) {
+ var parseUrl = function(input) {
var parsed;
if (useNativeURL) {
parsed = new URL2(input);
@@ -45008,7 +49158,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
return parsed;
};
var resolveUrl = function(relative, base) {
- return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
+ return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative));
};
var validateUrl = function(input) {
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -45045,7 +49195,9 @@ var require_follow_redirects = __commonJS((exports, module) => {
};
var createErrorType = function(code, message, baseClass) {
function CustomError(properties) {
- Error.captureStackTrace(this, this.constructor);
+ if (isFunction2(Error.captureStackTrace)) {
+ Error.captureStackTrace(this, this.constructor);
+ }
Object.assign(this, properties || {});
this.code = code;
this.message = this.cause ? message + ": " + this.cause.message : message;
@@ -45094,9 +49246,17 @@ var require_follow_redirects = __commonJS((exports, module) => {
var Writable = __require("stream").Writable;
var assert = __require("assert");
var debug = require_debug();
+ (function detectUnsupportedEnvironment() {
+ var looksLikeNode = typeof process !== "undefined";
+ var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
+ var looksLikeV8 = isFunction2(Error.captureStackTrace);
+ if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
+ console.warn("The follow-redirects package should be excluded from browser builds.");
+ }
+ })();
var useNativeURL = false;
try {
- assert(new URL2);
+ assert(new URL2(""));
} catch (error) {
useNativeURL = error.code === "ERR_INVALID_URL";
}
@@ -45349,7 +49509,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
removeMatchingHeaders(/^content-/i, this._options.headers);
}
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
- var currentUrlParts = parseUrl2(this._currentUrl);
+ var currentUrlParts = parseUrl(this._currentUrl);
var currentHost = currentHostHeader || currentUrlParts.host;
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
var redirectUrl = resolveUrl(location, currentUrl);
@@ -45378,7 +49538,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
module.exports.wrap = wrap;
});
-// node_modules/@aws-sdk/client-
+// node_modules/@aws-sdk/nested-
var exports_task_parameters = {};
__export(exports_task_parameters, {
PORT: () => {
@@ -45425,7 +49585,7 @@ var logger = import_pino.default({
level: (label) => ({ level: label })
}
});
-// node_modules/@aws-sdk/c
+// node_modules/@aws-sdk/n
var ImageTypes;
(function(ImageTypes2) {
ImageTypes2["avif"] = "avif";
@@ -45451,7 +49611,7 @@ var ImageTypes;
ImageTypes2["v"] = "v";
ImageTypes2["webp"] = "webp";
})(ImageTypes || (ImageTypes = {}));
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
import sharp from "sharp";
var optimiseImage = async (image, imageType, width, quality, format) => {
if (imageType === ImageTypes.svg || imageType === ImageTypes["svg+xml"]) {
@@ -45488,7 +49648,7 @@ var optimiseImage = async (image, imageType, width, quality, format) => {
imageType: format
};
};
-// node_modules/@aws-sdk/clie
+// node_modules/@aws-sdk/nest
var detectImageFormat = (buffer, fallbackContentType) => {
if ([255, 216, 255].every((b, i) => buffer[i] === b)) {
return ImageTypes.jpeg;
@@ -45516,7 +49676,7 @@ var detectImageFormat = (buffer, fallbackContentType) => {
}
return;
};
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var exports_image_request = {};
__export(exports_image_request, {
handle: () => {
@@ -45535,7 +49695,7 @@ __export(exports_s3, {
}
}
});
-var client_s3 = __toESM(require_dist_cjs69(), 1);
+var client_s3 = __toESM(require_dist_cjs73(), 1);
var s3Client = new client_s3.S3Client({
region: exports_task_parameters.AWS_REGION
});
@@ -45552,7 +49712,7 @@ var get = async (imageKey) => {
return null;
});
};
-// node_modules/@aws-sdk/client
+// node_modules/@aws-sdk/nested
var exports_external = {};
__export(exports_external, {
get: () => {
@@ -45562,23 +49722,23 @@ __export(exports_external, {
}
});
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
};
}
-// node_modules/@aws-sdk/client-ss
-var isBuffer = function(val2) {
- return val2 !== null && !isUndefined(val2) && val2.constructor !== null && !isUndefined(val2.constructor) && isFunction(val2.constructor.isBuffer) && val2.constructor.isBuffer(val2);
+// node_modules/@aws-sdk/nested-cl
+var isBuffer = function(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
};
-var isArrayBufferView = function(val2) {
+var isArrayBufferView = function(val) {
let result;
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
- result = ArrayBuffer.isView(val2);
+ result = ArrayBuffer.isView(val);
} else {
- result = val2 && val2.buffer && isArrayBuffer(val2.buffer);
+ result = val && val.buffer && isArrayBuffer(val.buffer);
}
return result;
};
@@ -45596,6 +49756,9 @@ var forEach = function(obj, fn, { allOwnKeys = false } = {}) {
fn.call(null, obj[i], i, obj);
}
} else {
+ if (isBuffer(obj)) {
+ return;
+ }
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const len = keys.length;
let key;
@@ -45606,6 +49769,9 @@ var forEach = function(obj, fn, { allOwnKeys = false } = {}) {
}
};
var findKey = function(obj, key) {
+ if (isBuffer(obj)) {
+ return null;
+ }
key = key.toLowerCase();
const keys = Object.keys(obj);
let i = keys.length;
@@ -45619,18 +49785,18 @@ var findKey = function(obj, key) {
return null;
};
var merge = function() {
- const { caseless } = isContextDefined(this) && this || {};
+ const { caseless, skipUndefined } = isContextDefined(this) && this || {};
const result = {};
- const assignValue = (val2, key) => {
+ const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
- if (isPlainObject(result[targetKey]) && isPlainObject(val2)) {
- result[targetKey] = merge(result[targetKey], val2);
- } else if (isPlainObject(val2)) {
- result[targetKey] = merge({}, val2);
- } else if (isArray(val2)) {
- result[targetKey] = val2.slice();
- } else {
- result[targetKey] = val2;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else if (!skipUndefined || !isUndefined(val)) {
+ result[targetKey] = val;
}
};
for (let i = 0, l = arguments.length;i < l; i++) {
@@ -45639,10 +49805,11 @@ var merge = function() {
return result;
};
var isSpecCompliantForm = function(thing) {
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
+ return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
};
var { toString } = Object.prototype;
var { getPrototypeOf } = Object;
+var { iterator, toStringTag } = Symbol;
var kindOf = ((cache) => (thing) => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -45660,18 +49827,28 @@ var isFunction = typeOfTest("function");
var isNumber = typeOfTest("number");
var isObject = (thing) => thing !== null && typeof thing === "object";
var isBoolean = (thing) => thing === true || thing === false;
-var isPlainObject = (val2) => {
- if (kindOf(val2) !== "object") {
+var isPlainObject = (val) => {
+ if (kindOf(val) !== "object") {
+ return false;
+ }
+ const prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
+};
+var isEmptyObject = (val) => {
+ if (!isObject(val) || isBuffer(val)) {
+ return false;
+ }
+ try {
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
+ } catch (e) {
return false;
}
- const prototype = getPrototypeOf(val2);
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val2) && !(Symbol.iterator in val2);
};
var isDate = kindOfTest("Date");
var isFile = kindOfTest("File");
var isBlob = kindOfTest("Blob");
var isFileList = kindOfTest("FileList");
-var isStream = (val2) => isObject(val2) && isFunction(val2.pipe);
+var isStream = (val) => isObject(val) && isFunction(val.pipe);
var isFormData = (thing) => {
let kind;
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
@@ -45686,11 +49863,11 @@ var _global = (() => {
})();
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
- forEach(b, (val2, key) => {
- if (thisArg && isFunction(val2)) {
- a[key] = bind(val2, thisArg);
+ forEach(b, (val, key) => {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
} else {
- a[key] = val2;
+ a[key] = val;
}
}, { allOwnKeys });
return a;
@@ -45760,10 +49937,10 @@ var isTypedArray = ((TypedArray) => {
};
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
var forEachEntry = (obj, fn) => {
- const generator = obj && obj[Symbol.iterator];
- const iterator = generator.call(obj);
+ const generator = obj && obj[iterator];
+ const _iterator = generator.call(obj);
let result;
- while ((result = iterator.next()) && !result.done) {
+ while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -45830,21 +50007,6 @@ var noop = () => {
var toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
-var ALPHA = "abcdefghijklmnopqrstuvwxyz";
-var DIGIT = "0123456789";
-var ALPHABET = {
- DIGIT,
- ALPHA,
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
-};
-var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
- let str = "";
- const { length } = alphabet;
- while (size--) {
- str += alphabet[Math.random() * length | 0];
- }
- return str;
-};
var toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
@@ -45852,6 +50014,9 @@ var toJSONObject = (obj) => {
if (stack.indexOf(source) >= 0) {
return;
}
+ if (isBuffer(source)) {
+ return source;
+ }
if (!("toJSON" in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
@@ -45869,6 +50034,24 @@ var toJSONObject = (obj) => {
};
var isAsyncFn = kindOfTest("AsyncFunction");
var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
+var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+ return postMessageSupported ? ((token, callbacks) => {
+ _global.addEventListener("message", ({ source, data }) => {
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+ return (cb) => {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ };
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
+})(typeof setImmediate === "function", isFunction(_global.postMessage));
+var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
+var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
var utils_default = {
isArray,
isArrayBuffer,
@@ -45880,6 +50063,7 @@ var utils_default = {
isBoolean,
isObject,
isPlainObject,
+ isEmptyObject,
isReadableStream,
isRequest,
isResponse,
@@ -45919,15 +50103,16 @@ var utils_default = {
findKey,
global: _global,
isContextDefined,
- ALPHABET,
- generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
- isThenable
+ isThenable,
+ setImmediate: _setImmediate,
+ asap,
+ isIterable
};
-// node_modules/@aws-sdk/client-sso/dist-cjs
+// node_modules/@aws-sdk/nested-clients/dist
var AxiosError = function(message, code, config, request, response) {
Error.call(this);
if (Error.captureStackTrace) {
@@ -45940,7 +50125,10 @@ var AxiosError = function(message, code, config, request, response) {
code && (this.code = code);
config && (this.config = config);
request && (this.request = request);
- response && (this.response = response);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
};
utils_default.inherits(AxiosError, Error, {
toJSON: function toJSON() {
@@ -45955,7 +50143,7 @@ utils_default.inherits(AxiosError, Error, {
stack: this.stack,
config: utils_default.toJSONObject(this.config),
code: this.code,
- status: this.response && this.response.status ? this.response.status : null
+ status: this.status
};
}
});
@@ -45986,19 +50174,23 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
}, (prop) => {
return prop !== "isAxiosError";
});
- AxiosError.call(axiosError, error.message, code, config, request, response);
- axiosError.cause = error;
- axiosError.name = error.name;
+ const msg = error && error.message ? error.message : "Error";
+ const errCode = code == null && error ? error.code : code;
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
+ if (error && axiosError.cause == null) {
+ Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
+ }
+ axiosError.name = error && error.name || "Error";
customProps && Object.assign(axiosError, customProps);
return axiosError;
};
var AxiosError_default = AxiosError;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rules
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules
var import_form_data = __toESM(require_form_data(), 1);
var FormData_default = import_form_data.default;
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
var isVisitable = function(thing) {
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
};
@@ -46043,6 +50235,9 @@ var toFormData = function(obj, formData, options) {
if (utils_default.isDate(value)) {
return value.toISOString();
}
+ if (utils_default.isBoolean(value)) {
+ return value.toString();
+ }
if (!useBlob && utils_default.isBlob(value)) {
throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
}
@@ -46103,7 +50298,7 @@ var predicates = utils_default.toFlatObject(utils_default, {}, null, function fi
});
var toFormData_default = toFormData;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
var encode = function(str) {
const charMap = {
"!": "%21",
@@ -46136,15 +50331,20 @@ prototype2.toString = function toString2(encoder) {
};
var AxiosURLSearchParams_default = AxiosURLSearchParams;
-// node_modules/@aws-sdk/client-sso/dist-cjs/
-var encode2 = function(val2) {
- return encodeURIComponent(val2).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
+// node_modules/@aws-sdk/nested-clients/dist-
+var encode2 = function(val) {
+ return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
};
function buildURL(url, params, options) {
if (!params) {
return url;
}
const _encode = options && options.encode || encode2;
+ if (utils_default.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
const serializeFn = options && options.serialize;
let serializedParams;
if (serializeFn) {
@@ -46162,7 +50362,7 @@ function buildURL(url, params, options) {
return url;
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
class InterceptorManager {
constructor() {
this.handlers = [];
@@ -46196,18 +50396,38 @@ class InterceptorManager {
}
var InterceptorManager_default = InterceptorManager;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpo
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
var transitional_default = {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.jsso
+// node_modules/@aws-sdk/nested-clients/dist-cjs
+import crypto2 from "crypto";
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oi
import url from "url";
var URLSearchParams_default = url.URLSearchParams;
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs
+var ALPHA = "abcdefghijklmnopqrstuvwxyz";
+var DIGIT = "0123456789";
+var ALPHABET = {
+ DIGIT,
+ ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+};
+var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
+ let str = "";
+ const { length } = alphabet;
+ const randomValues = new Uint32Array(size);
+ crypto2.randomFillSync(randomValues);
+ for (let i = 0;i < size; i++) {
+ str += alphabet[randomValues[i] % length];
+ }
+ return str;
+};
var node_default = {
isNode: true,
classes: {
@@ -46215,10 +50435,12 @@ var node_default = {
FormData: FormData_default,
Blob: typeof Blob !== "undefined" && Blob || null
},
+ ALPHABET,
+ generateString,
protocols: ["http", "https", "file", "data"]
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpo
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
var exports_utils = {};
__export(exports_utils, {
origin: () => {
@@ -46226,6 +50448,11 @@ __export(exports_utils, {
return origin;
}
},
+ navigator: () => {
+ {
+ return _navigator;
+ }
+ },
hasStandardBrowserWebWorkerEnv: () => {
{
return hasStandardBrowserWebWorkerEnv;
@@ -46243,34 +50470,34 @@ __export(exports_utils, {
}
});
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
-var hasStandardBrowserEnv = ((product) => {
- return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
-})(typeof navigator !== "undefined" && navigator.product);
+var _navigator = typeof navigator === "object" && navigator || undefined;
+var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
var hasStandardBrowserWebWorkerEnv = (() => {
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
})();
var origin = hasBrowserEnv && window.location.href || "http://localhost";
-// node_modules/@aws-sdk/client-sso/dist-cj
+// node_modules/@aws-sdk/nested-clients/dis
var platform_default = {
...exports_utils,
...node_default
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
function toURLEncodedForm(data, options) {
- return toFormData_default(data, new platform_default.classes.URLSearchParams, Object.assign({
+ return toFormData_default(data, new platform_default.classes.URLSearchParams, {
visitor: function(value, key, path, helpers) {
if (platform_default.isNode && utils_default.isBuffer(value)) {
this.append(key, value.toString("base64"));
return false;
}
return helpers.defaultVisitor.apply(this, arguments);
- }
- }, options));
+ },
+ ...options
+ });
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoi
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
var parsePropPath = function(name) {
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
return match[0] === "[]" ? "" : match[1] || match[0];
@@ -46324,7 +50551,7 @@ var formDataToJSON = function(formData) {
};
var formDataToJSON_default = formDataToJSON;
-// node_modules/@aws-sdk/client-sso/dist-cj
+// node_modules/@aws-sdk/nested-clients/dis
var stringifySafely = function(rawValue, parser, encoder) {
if (utils_default.isString(rawValue)) {
try {
@@ -46389,7 +50616,7 @@ var defaults = {
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
const strictJSONParsing = !silentJSONParsing && JSONRequested;
try {
- return JSON.parse(data);
+ return JSON.parse(data, this.parseReviver);
} catch (e) {
if (strictJSONParsing) {
if (e.name === "SyntaxError") {
@@ -46425,7 +50652,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method
});
var defaults_default = defaults;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endp
+// node_modules/@aws-sdk/nested-clients/dist-cjs/
var ignoreDuplicateOf = utils_default.toObjectSet([
"age",
"authorization",
@@ -46448,29 +50675,29 @@ var ignoreDuplicateOf = utils_default.toObjectSet([
var parseHeaders_default = (rawHeaders) => {
const parsed = {};
let key;
- let val2;
+ let val;
let i;
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
i = line.indexOf(":");
key = line.substring(0, i).trim().toLowerCase();
- val2 = line.substring(i + 1).trim();
+ val = line.substring(i + 1).trim();
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
return;
}
if (key === "set-cookie") {
if (parsed[key]) {
- parsed[key].push(val2);
+ parsed[key].push(val);
} else {
- parsed[key] = [val2];
+ parsed[key] = [val];
}
} else {
- parsed[key] = parsed[key] ? parsed[key] + ", " + val2 : val2;
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
}
});
return parsed;
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/e
+// node_modules/@aws-sdk/nested-clients/dist-c
var normalizeHeader = function(header) {
return header && String(header).trim().toLowerCase();
};
@@ -46545,10 +50772,15 @@ class AxiosHeaders {
setHeaders(header, valueOrRewrite);
} else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders_default(header), valueOrRewrite);
- } else if (utils_default.isHeaders(header)) {
- for (const [key, value] of header.entries()) {
- setHeader(value, key, rewrite);
+ } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
+ let obj = {}, dest, key;
+ for (const entry of header) {
+ if (!utils_default.isArray(entry)) {
+ throw TypeError("Object iterator must return a key-value pair");
+ }
+ obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
}
+ setHeaders(obj, valueOrRewrite);
} else {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
@@ -46652,6 +50884,9 @@ class AxiosHeaders {
toString() {
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
}
+ getSetCookie() {
+ return this.get("set-cookie") || [];
+ }
get [Symbol.toStringTag]() {
return "AxiosHeaders";
}
@@ -46693,7 +50928,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
utils_default.freezeMethods(AxiosHeaders);
var AxiosHeaders_default = AxiosHeaders;
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
function transformData(fns, response) {
const config = this || defaults_default;
const context = response || config;
@@ -46706,12 +50941,12 @@ function transformData(fns, response) {
return data;
}
-// node_modules/@aws-sdk/client-sso/dist-cjs
+// node_modules/@aws-sdk/nested-clients/dist
function isCancel(value) {
return !!(value && value.__CANCEL__);
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endp
+// node_modules/@aws-sdk/nested-clients/dist-cjs/
var CanceledError = function(message, config, request) {
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
this.name = "CanceledError";
@@ -46721,7 +50956,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
});
var CanceledError_default = CanceledError;
-// node_modules/@aws-sdk/client-sso/dist
+// node_modules/@aws-sdk/nested-clients/
function settle(resolve, reject, response) {
const validateStatus2 = response.config.validateStatus;
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -46731,106 +50966,43 @@ function settle(resolve, reject, response) {
}
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpo
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
function isAbsoluteURL(url2) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs
function combineURLs(baseURL, relativeURL) {
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
-function buildFullPath(baseURL, requestedURL) {
- if (baseURL && !isAbsoluteURL(requestedURL)) {
+// node_modules/@aws-sdk/nested-clients/dist-cj
+function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
}
-// node_modules/@aws-sdk/client-sso/dis
-var getProxyForUrl = function(url2) {
- var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
- var proto = parsedUrl.protocol;
- var hostname = parsedUrl.host;
- var port = parsedUrl.port;
- if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
- return "";
- }
- proto = proto.split(":", 1)[0];
- hostname = hostname.replace(/:\d*$/, "");
- port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
- if (!shouldProxy(hostname, port)) {
- return "";
- }
- var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
- if (proxy && proxy.indexOf("://") === -1) {
- proxy = proto + "://" + proxy;
- }
- return proxy;
-};
-var shouldProxy = function(hostname, port) {
- var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
- if (!NO_PROXY) {
- return true;
- }
- if (NO_PROXY === "*") {
- return false;
- }
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
- if (!proxy) {
- return true;
- }
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
- if (parsedProxyPort && parsedProxyPort !== port) {
- return true;
- }
- if (!/^[.*]/.test(parsedProxyHostname)) {
- return hostname !== parsedProxyHostname;
- }
- if (parsedProxyHostname.charAt(0) === "*") {
- parsedProxyHostname = parsedProxyHostname.slice(1);
- }
- return !stringEndsWith.call(hostname, parsedProxyHostname);
- });
-};
-var getEnv = function(key) {
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
-};
-var parseUrl = __require("url").parse;
-var DEFAULT_PORTS = {
- ftp: 21,
- gopher: 70,
- http: 80,
- https: 443,
- ws: 80,
- wss: 443
-};
-var stringEndsWith = String.prototype.endsWith || function(s) {
- return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
-};
-var $getProxyForUrl = getProxyForUrl;
-
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
+var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
import http from "http";
import https from "https";
-import util from "util";
+import util2 from "util";
import zlib from "zlib";
-// node_modules/@aws-sdk/client-sso/d
-var VERSION = "1.7.2";
+// node_modules/@aws-sdk/nested-clien
+var VERSION = "1.12.2";
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpo
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
function parseProtocol(url2) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
return match && match[1] || "";
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
function fromDataURI(uri, asBlob, options) {
const _Blob = options && options.Blob || platform_default.classes.Blob;
@@ -46859,76 +51031,11 @@ function fromDataURI(uri, asBlob, options) {
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
}
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
import stream3 from "stream";
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
import stream from "stream";
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/
-var throttle = function(fn, freq) {
- let timestamp = 0;
- const threshold = 1000 / freq;
- let timer = null;
- return function throttled() {
- const force = this === true;
- const now = Date.now();
- if (force || now - timestamp > threshold) {
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- timestamp = now;
- return fn.apply(null, arguments);
- }
- if (!timer) {
- timer = setTimeout(() => {
- timer = null;
- timestamp = Date.now();
- return fn.apply(null, arguments);
- }, threshold - (now - timestamp));
- }
- };
-};
-var throttle_default = throttle;
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
-var speedometer = function(samplesCount, min) {
- samplesCount = samplesCount || 10;
- const bytes = new Array(samplesCount);
- const timestamps = new Array(samplesCount);
- let head = 0;
- let tail = 0;
- let firstSampleTS;
- min = min !== undefined ? min : 1000;
- return function push(chunkLength) {
- const now = Date.now();
- const startedAt = timestamps[tail];
- if (!firstSampleTS) {
- firstSampleTS = now;
- }
- bytes[head] = chunkLength;
- timestamps[head] = now;
- let i = tail;
- let bytesCount = 0;
- while (i !== head) {
- bytesCount += bytes[i++];
- i = i % samplesCount;
- }
- head = (head + 1) % samplesCount;
- if (head === tail) {
- tail = (tail + 1) % samplesCount;
- }
- if (now - firstSampleTS < min) {
- return;
- }
- const passed = startedAt && now - startedAt;
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
- };
-};
-var speedometer_default = speedometer;
-
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
var kInternals = Symbol("internals");
class AxiosTransformStream extends stream.Transform {
@@ -46946,11 +51053,8 @@ class AxiosTransformStream extends stream.Transform {
super({
readableHighWaterMark: options.chunkSize
});
- const self2 = this;
const internals = this[kInternals] = {
- length: options.length,
timeWindow: options.timeWindow,
- ticksRate: options.ticksRate,
chunkSize: options.chunkSize,
maxRate: options.maxRate,
minChunkSize: options.minChunkSize,
@@ -46961,7 +51065,6 @@ class AxiosTransformStream extends stream.Transform {
bytes: 0,
onReadCallback: null
};
- const _speedometer = speedometer_default(internals.ticksRate * options.samplesCount, internals.timeWindow);
this.on("newListener", (event) => {
if (event === "progress") {
if (!internals.isCaptured) {
@@ -46969,32 +51072,6 @@ class AxiosTransformStream extends stream.Transform {
}
}
});
- let bytesNotified = 0;
- internals.updateProgress = throttle_default(function throttledHandler() {
- const totalBytes = internals.length;
- const bytesTransferred = internals.bytesSeen;
- const progressBytes = bytesTransferred - bytesNotified;
- if (!progressBytes || self2.destroyed)
- return;
- const rate = _speedometer(progressBytes);
- bytesNotified = bytesTransferred;
- process.nextTick(() => {
- self2.emit("progress", {
- loaded: bytesTransferred,
- total: totalBytes,
- progress: totalBytes ? bytesTransferred / totalBytes : undefined,
- bytes: progressBytes,
- rate: rate ? rate : undefined,
- estimated: rate && totalBytes && bytesTransferred <= totalBytes ? (totalBytes - bytesTransferred) / rate : undefined,
- lengthComputable: totalBytes != null
- });
- });
- }, internals.ticksRate);
- const onFinish = () => {
- internals.updateProgress.call(true);
- };
- this.once("end", onFinish);
- this.once("error", onFinish);
}
_read(size) {
const internals = this[kInternals];
@@ -47004,7 +51081,6 @@ class AxiosTransformStream extends stream.Transform {
return super._read(size);
}
_transform(chunk, encoding, callback) {
- const self2 = this;
const internals = this[kInternals];
const maxRate = internals.maxRate;
const readableHighWaterMark = this.readableHighWaterMark;
@@ -47012,14 +51088,12 @@ class AxiosTransformStream extends stream.Transform {
const divider = 1000 / timeWindow;
const bytesThreshold = maxRate / divider;
const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
- function pushChunk(_chunk, _callback) {
+ const pushChunk = (_chunk, _callback) => {
const bytes = Buffer.byteLength(_chunk);
internals.bytesSeen += bytes;
internals.bytes += bytes;
- if (internals.isCaptured) {
- internals.updateProgress();
- }
- if (self2.push(_chunk)) {
+ internals.isCaptured && this.emit("progress", internals.bytesSeen);
+ if (this.push(_chunk)) {
process.nextTick(_callback);
} else {
internals.onReadCallback = () => {
@@ -47027,7 +51101,7 @@ class AxiosTransformStream extends stream.Transform {
process.nextTick(_callback);
};
}
- }
+ };
const transformChunk = (_chunk, _callback) => {
const chunkSize = Buffer.byteLength(_chunk);
let chunkRemainder = null;
@@ -47073,21 +51147,17 @@ class AxiosTransformStream extends stream.Transform {
}
});
}
- setLength(length) {
- this[kInternals].length = +length;
- return this;
- }
}
var AxiosTransformStream_default = AxiosTransformStream;
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/di
import {EventEmitter} from "events";
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-import {TextEncoder as TextEncoder2} from "util";
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+import util from "util";
import {Readable} from "stream";
-// node_modules/@aws-sdk/client-sso/dist-cjs/
+// node_modules/@aws-sdk/nested-clients/dist-
var { asyncIterator } = Symbol;
var readBlob = async function* (blob) {
if (blob.stream) {
@@ -47102,9 +51172,9 @@ var readBlob = async function* (blob) {
};
var readBlob_default = readBlob;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint
-var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
-var textEncoder = new TextEncoder2;
+// node_modules/@aws-sdk/nested-clients/dist-cjs/subm
+var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
+var textEncoder = typeof TextEncoder === "function" ? new TextEncoder : new util.TextEncoder;
var CRLF = "\r\n";
var CRLF_BYTES = textEncoder.encode(CRLF);
var CRLF_BYTES_COUNT = 2;
@@ -47147,7 +51217,7 @@ var formDataToStream = (form, headersHandler, options) => {
const {
tag = "form-data-boundary",
size = 25,
- boundary = tag + "-" + utils_default.generateString(size, BOUNDARY_ALPHABET)
+ boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
} = options || {};
if (!utils_default.isFormData(form)) {
throw TypeError("FormData instance required");
@@ -47156,7 +51226,7 @@ var formDataToStream = (form, headersHandler, options) => {
throw Error("boundary must be 10-70 characters long");
}
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
- const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF + CRLF);
+ const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
let contentLength = footerBytes.byteLength;
const parts = Array.from(form.entries()).map(([name, value]) => {
const part = new FormDataPart(name, value);
@@ -47182,7 +51252,7 @@ var formDataToStream = (form, headersHandler, options) => {
};
var formDataToStream_default = formDataToStream;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/ruleset.
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/ss
import stream2 from "stream";
class ZlibHeaderTransformStream extends stream2.Transform {
@@ -47205,7 +51275,7 @@ class ZlibHeaderTransformStream extends stream2.Transform {
}
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs
var callbackify = (fn, reducer) => {
return utils_default.isAsyncFn(fn) ? function(...args) {
const cb = args.pop();
@@ -47220,7 +51290,165 @@ var callbackify = (fn, reducer) => {
};
var callbackify_default = callbackify;
-// node_modules/@aws-sdk/client-sso/dist-c
+// node_modules/@aws-sdk/nested-clients/dist-cjs
+var speedometer = function(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+ min = min !== undefined ? min : 1000;
+ return function push(chunkLength) {
+ const now = Date.now();
+ const startedAt = timestamps[tail];
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+ let i = tail;
+ let bytesCount = 0;
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+ head = (head + 1) % samplesCount;
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+ if (now - firstSampleTS < min) {
+ return;
+ }
+ const passed = startedAt && now - startedAt;
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+};
+var speedometer_default = speedometer;
+
+// node_modules/@aws-sdk/nested-clients/dist-
+var throttle = function(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1000 / freq;
+ let lastArgs;
+ let timer;
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn(...args);
+ };
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if (passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ }
+ };
+ const flush = () => lastArgs && invoke(lastArgs);
+ return [throttled, flush];
+};
+var throttle_default = throttle;
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodul
+var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer_default(50, 250);
+ return throttle_default((e) => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : undefined;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+ bytesNotified = loaded;
+ const data = {
+ loaded,
+ total,
+ progress: total ? loaded / total : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? "download" : "upload"]: true
+ };
+ listener(data);
+ }, freq);
+};
+var progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+};
+var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
+
+// node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-
+function estimateDataURLDecodedBytes(url2) {
+ if (!url2 || typeof url2 !== "string")
+ return 0;
+ if (!url2.startsWith("data:"))
+ return 0;
+ const comma = url2.indexOf(",");
+ if (comma < 0)
+ return 0;
+ const meta = url2.slice(5, comma);
+ const body = url2.slice(comma + 1);
+ const isBase64 = /;base64/i.test(meta);
+ if (isBase64) {
+ let effectiveLen = body.length;
+ const len = body.length;
+ for (let i = 0;i < len; i++) {
+ if (body.charCodeAt(i) === 37 && i + 2 < len) {
+ const a = body.charCodeAt(i + 1);
+ const b = body.charCodeAt(i + 2);
+ const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
+ if (isHex) {
+ effectiveLen -= 2;
+ i += 2;
+ }
+ }
+ }
+ let pad = 0;
+ let idx = len - 1;
+ const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && body.charCodeAt(j - 1) === 51 && (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
+ if (idx >= 0) {
+ if (body.charCodeAt(idx) === 61) {
+ pad++;
+ idx--;
+ } else if (tailIsPct3D(idx)) {
+ pad++;
+ idx -= 3;
+ }
+ }
+ if (pad === 1 && idx >= 0) {
+ if (body.charCodeAt(idx) === 61) {
+ pad++;
+ } else if (tailIsPct3D(idx)) {
+ pad++;
+ }
+ }
+ const groups = Math.floor(effectiveLen / 4);
+ const bytes = groups * 3 - (pad || 0);
+ return bytes > 0 ? bytes : 0;
+ }
+ return Buffer.byteLength(body, "utf8");
+}
+
+// node_modules/@aws-sdk/nested-clients/di
var dispatchBeforeRedirect = function(options, responseDetails) {
if (options.beforeRedirects.proxy) {
options.beforeRedirects.proxy(options);
@@ -47232,7 +51460,7 @@ var dispatchBeforeRedirect = function(options, responseDetails) {
var setProxy = function(options, configProxy, location) {
let proxy = configProxy;
if (!proxy && proxy !== false) {
- const proxyUrl = $getProxyForUrl(location);
+ const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
if (proxyUrl) {
proxy = new URL(proxyUrl);
}
@@ -47276,6 +51504,10 @@ var isHttps = /https:?/;
var supportedProtocols = platform_default.protocols.map((protocol) => {
return protocol + ":";
});
+var flushOnFinish = (stream4, [throttled, flush]) => {
+ stream4.on("end", flush).on("error", flush);
+ return throttled;
+};
var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
var wrapAsync = (asyncExecutor) => {
return new Promise((resolve, reject) => {
@@ -47355,10 +51587,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
config.signal.aborted ? abort() : config.signal.addEventListener("abort", abort);
}
}
- const fullPath = buildFullPath(config.baseURL, config.url);
- const parsed = new URL(fullPath, "http://localhost");
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
+ const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : undefined);
const protocol = parsed.protocol || supportedProtocols[0];
if (protocol === "data:") {
+ if (config.maxContentLength > -1) {
+ const dataUrl = String(config.url || fullPath || "");
+ const estimated = estimateDataURLDecodedBytes(dataUrl);
+ if (estimated > config.maxContentLength) {
+ return reject(new AxiosError_default("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config));
+ }
+ }
let convertedData;
if (method !== "GET") {
return settle(resolve, reject, {
@@ -47396,8 +51635,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
}
const headers = AxiosHeaders_default.from(config.headers).normalize();
headers.set("User-Agent", "axios/" + VERSION, false);
- const onDownloadProgress = config.onDownloadProgress;
- const onUploadProgress = config.onUploadProgress;
+ const { onUploadProgress, onDownloadProgress } = config;
const maxRate = config.maxRate;
let maxUploadRate = undefined;
let maxDownloadRate = undefined;
@@ -47413,12 +51651,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
headers.set(data2.getHeaders());
if (!headers.hasContentLength()) {
try {
- const knownLength = await util.promisify(data2.getLength).call(data2);
+ const knownLength = await util2.promisify(data2.getLength).call(data2);
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
} catch (e) {
}
}
- } else if (utils_default.isBlob(data2)) {
+ } else if (utils_default.isBlob(data2) || utils_default.isFile(data2)) {
data2.size && headers.setContentType(data2.type || "application/octet-stream");
headers.setContentLength(data2.size || 0);
data2 = stream3.Readable.from(readBlob_default(data2));
@@ -47448,14 +51686,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
data2 = stream3.Readable.from(data2, { objectMode: false });
}
data2 = stream3.pipeline([data2, new AxiosTransformStream_default({
- length: contentLength,
maxRate: utils_default.toFiniteNumber(maxUploadRate)
})], utils_default.noop);
- onUploadProgress && data2.on("progress", (progress) => {
- onUploadProgress(Object.assign(progress, {
- upload: true
- }));
- });
+ onUploadProgress && data2.on("progress", flushOnFinish(data2, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
}
let auth = undefined;
if (config.auth) {
@@ -47495,7 +51728,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
if (config.socketPath) {
options.socketPath = config.socketPath;
} else {
- options.hostname = parsed.hostname;
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
options.port = parsed.port;
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
}
@@ -47528,16 +51761,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
return;
const streams = [res];
const responseLength = +res.headers["content-length"];
- if (onDownloadProgress) {
+ if (onDownloadProgress || maxDownloadRate) {
const transformStream = new AxiosTransformStream_default({
- length: utils_default.toFiniteNumber(responseLength),
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
});
- onDownloadProgress && transformStream.on("progress", (progress) => {
- onDownloadProgress(Object.assign(progress, {
- download: true
- }));
- });
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
streams.push(transformStream);
}
let responseStream = res;
@@ -47597,7 +51825,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
if (rejected) {
return;
}
- const err = new AxiosError_default("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest);
+ const err = new AxiosError_default("stream has been aborted", AxiosError_default.ERR_BAD_RESPONSE, config, lastRequest);
responseStream.destroy(err);
reject(err);
});
@@ -47679,67 +51907,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
});
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoint/rul
-var progressEventReducer_default = (listener, isDownloadStream, freq = 3) => {
- let bytesNotified = 0;
- const _speedometer = speedometer_default(50, 250);
- return throttle_default((e) => {
- const loaded = e.loaded;
- const total = e.lengthComputable ? e.total : undefined;
- const progressBytes = loaded - bytesNotified;
- const rate = _speedometer(progressBytes);
- const inRange = loaded <= total;
- bytesNotified = loaded;
- const data2 = {
- loaded,
- total,
- progress: total ? loaded / total : undefined,
- bytes: progressBytes,
- rate: rate ? rate : undefined,
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
- event: e,
- lengthComputable: total != null
- };
- data2[isDownloadStream ? "download" : "upload"] = true;
- listener(data2);
- }, freq);
-};
+// node_modules/@aws-sdk/nested-clients/dist-cjs/sub
+var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin2, isMSIE) => (url2) => {
+ url2 = new URL(url2, platform_default.origin);
+ return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
+})(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoin
-var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() {
- const msie = /(msie|trident)/i.test(navigator.userAgent);
- const urlParsingNode = document.createElement("a");
- let originURL;
- function resolveURL(url2) {
- let href = url2;
- if (msie) {
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
- urlParsingNode.setAttribute("href", href);
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
- };
- }
- originURL = resolveURL(window.location.href);
- return function isURLSameOrigin(requestURL) {
- const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
- };
-}() : function nonStandardBrowserEnv() {
- return function isURLSameOrigin() {
- return true;
- };
-}();
-
-// node_modules/@aws-sdk/client-sso/dist-cjs
+// node_modules/@aws-sdk/nested-clients/dist
var cookies_default = platform_default.hasStandardBrowserEnv ? {
write(name, value, expires, path, domain, secure) {
const cookie = [name + "=" + encodeURIComponent(value)];
@@ -47766,12 +51940,12 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
}
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/
+// node_modules/@aws-sdk/nested-clients/dist-
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
function mergeConfig(config1, config2) {
config2 = config2 || {};
const config = {};
- function getMergedValue(target, source, caseless) {
+ function getMergedValue(target, source, prop, caseless) {
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
return utils_default.merge.call({ caseless }, target, source);
} else if (utils_default.isPlainObject(source)) {
@@ -47781,11 +51955,11 @@ function mergeConfig(config1, config2) {
}
return source;
}
- function mergeDeepProperties(a, b, caseless) {
+ function mergeDeepProperties(a, b, prop, caseless) {
if (!utils_default.isUndefined(b)) {
- return getMergedValue(a, b, caseless);
+ return getMergedValue(a, b, prop, caseless);
} else if (!utils_default.isUndefined(a)) {
- return getMergedValue(undefined, a, caseless);
+ return getMergedValue(undefined, a, prop, caseless);
}
}
function valueFromConfig2(a, b) {
@@ -47836,9 +52010,9 @@ function mergeConfig(config1, config2) {
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
- utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge2 = mergeMap[prop] || mergeDeepProperties;
const configValue = merge2(config1[prop], config2[prop], prop);
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
@@ -47846,22 +52020,26 @@ function mergeConfig(config1, config2) {
return config;
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpo
+// node_modules/@aws-sdk/nested-clients/dist-cjs/s
var resolveConfig_default = (config) => {
const newConfig = mergeConfig({}, config);
let { data: data2, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
newConfig.headers = headers = AxiosHeaders_default.from(headers);
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
if (auth) {
headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")));
}
- let contentType;
if (utils_default.isFormData(data2)) {
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
headers.setContentType(undefined);
- } else if ((contentType = headers.getContentType()) !== false) {
- const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
- headers.setContentType([type || "multipart/form-data", ...tokens].join("; "));
+ } else if (utils_default.isFunction(data2.getHeaders)) {
+ const formHeaders = data2.getHeaders();
+ const allowedHeaders = ["content-type", "content-length"];
+ Object.entries(formHeaders).forEach(([key, val]) => {
+ if (allowedHeaders.includes(key.toLowerCase())) {
+ headers.set(key, val);
+ }
+ });
}
}
if (platform_default.hasStandardBrowserEnv) {
@@ -47876,22 +52054,22 @@ var resolveConfig_default = (config) => {
return newConfig;
};
-// node_modules/@aws-sdk/client-sso/dist-
+// node_modules/@aws-sdk/nested-clients/d
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
var xhr_default = isXHRAdapterSupported && function(config) {
return new Promise(function dispatchXhrRequest(resolve, reject) {
const _config = resolveConfig_default(config);
let requestData = _config.data;
const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
- let { responseType } = _config;
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
function done() {
- if (_config.cancelToken) {
- _config.cancelToken.unsubscribe(onCanceled);
- }
- if (_config.signal) {
- _config.signal.removeEventListener("abort", onCanceled);
- }
+ flushUpload && flushUpload();
+ flushDownload && flushDownload();
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+ _config.signal && _config.signal.removeEventListener("abort", onCanceled);
}
let request = new XMLHttpRequest;
request.open(_config.method.toUpperCase(), _config.url, true);
@@ -47936,11 +52114,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
if (!request) {
return;
}
- reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, _config, request));
+ reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config, request));
request = null;
};
- request.onerror = function handleError() {
- reject(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, _config, request));
+ request.onerror = function handleError(event) {
+ const msg = event && event.message ? event.message : "Network Error";
+ const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config, request);
+ err.event = event || null;
+ reject(err);
request = null;
};
request.ontimeout = function handleTimeout() {
@@ -47949,13 +52130,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
if (_config.timeoutErrorMessage) {
timeoutErrorMessage = _config.timeoutErrorMessage;
}
- reject(new AxiosError_default(timeoutErrorMessage, transitional4.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, _config, request));
+ reject(new AxiosError_default(timeoutErrorMessage, transitional4.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, config, request));
request = null;
};
requestData === undefined && requestHeaders.setContentType(null);
if ("setRequestHeader" in request) {
- utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val2, key) {
- request.setRequestHeader(key, val2);
+ utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
});
}
if (!utils_default.isUndefined(_config.withCredentials)) {
@@ -47964,11 +52145,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
if (responseType && responseType !== "json") {
request.responseType = _config.responseType;
}
- if (typeof _config.onDownloadProgress === "function") {
- request.addEventListener("progress", progressEventReducer_default(_config.onDownloadProgress, true));
+ if (onDownloadProgress) {
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
+ request.addEventListener("progress", downloadThrottled);
}
- if (typeof _config.onUploadProgress === "function" && request.upload) {
- request.upload.addEventListener("progress", progressEventReducer_default(_config.onUploadProgress));
+ if (onUploadProgress && request.upload) {
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
+ request.upload.addEventListener("progress", uploadThrottled);
+ request.upload.addEventListener("loadend", flushUpload);
}
if (_config.cancelToken || _config.signal) {
onCanceled = (cancel) => {
@@ -47993,42 +52177,43 @@ var xhr_default = isXHRAdapterSupported && function(config) {
});
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoi
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
var composeSignals = (signals, timeout) => {
- let controller = new AbortController;
- let aborted;
- const onabort = function(cancel) {
- if (!aborted) {
- aborted = true;
- unsubscribe();
- const err = cancel instanceof Error ? cancel : this.reason;
- controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
- }
- };
- let timer = timeout && setTimeout(() => {
- onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
- }, timeout);
- const unsubscribe = () => {
- if (signals) {
- timer && clearTimeout(timer);
+ const { length } = signals = signals ? signals.filter(Boolean) : [];
+ if (timeout || length) {
+ let controller = new AbortController;
+ let aborted;
+ const onabort = function(reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
+ }
+ };
+ let timer = timeout && setTimeout(() => {
timer = null;
- signals.forEach((signal2) => {
- signal2 && (signal2.removeEventListener ? signal2.removeEventListener("abort", onabort) : signal2.unsubscribe(onabort));
- });
- signals = null;
- }
- };
- signals.forEach((signal2) => signal2 && signal2.addEventListener && signal2.addEventListener("abort", onabort));
- const { signal } = controller;
- signal.unsubscribe = unsubscribe;
- return [signal, () => {
- timer && clearTimeout(timer);
- timer = null;
- }];
+ onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
+ }, timeout);
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach((signal2) => {
+ signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
+ });
+ signals = null;
+ }
+ };
+ signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
+ const { signal } = controller;
+ signal.unsubscribe = () => utils_default.asap(unsubscribe);
+ return signal;
+ }
};
var composeSignals_default = composeSignals;
-// node_modules/@aws-sdk/client-sso/dist-cjs/end
+// node_modules/@aws-sdk/nested-clients/dist-cjs
var streamChunk = function* (chunk, chunkSize) {
let len = chunk.byteLength;
if (!chunkSize || len < chunkSize) {
@@ -48043,193 +52228,272 @@ var streamChunk = function* (chunk, chunkSize) {
pos = end;
}
};
-var readBytes = async function* (iterable, chunkSize, encode3) {
- for await (const chunk of iterable) {
- yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : await encode3(String(chunk)), chunkSize);
+var readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) {
+ yield* streamChunk(chunk, chunkSize);
+ }
+};
+var readStream = async function* (stream4) {
+ if (stream4[Symbol.asyncIterator]) {
+ yield* stream4;
+ return;
+ }
+ const reader = stream4.getReader();
+ try {
+ for (;; ) {
+ const { done, value } = await reader.read();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ } finally {
+ await reader.cancel();
}
};
-var trackStream = (stream4, chunkSize, onProgress, onFinish, encode3) => {
- const iterator = readBytes(stream4, chunkSize, encode3);
+var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
+ const iterator2 = readBytes(stream4, chunkSize);
let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ };
return new ReadableStream({
- type: "bytes",
async pull(controller) {
- const { done, value } = await iterator.next();
- if (done) {
- controller.close();
- onFinish();
- return;
+ try {
+ const { done: done2, value } = await iterator2.next();
+ if (done2) {
+ _onFinish();
+ controller.close();
+ return;
+ }
+ let len = value.byteLength;
+ if (onProgress) {
+ let loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
}
- let len = value.byteLength;
- onProgress && onProgress(bytes += len);
- controller.enqueue(new Uint8Array(value));
},
cancel(reason) {
- onFinish(reason);
- return iterator.return();
+ _onFinish(reason);
+ return iterator2.return();
}
}, {
highWaterMark: 2
});
};
-// node_modules/@aws-sdk/client-sso/dist-cj
-var fetchProgressDecorator = (total, fn) => {
- const lengthComputable = total != null;
- return (loaded) => setTimeout(() => fn({
- lengthComputable,
- total,
- loaded
- }));
-};
-var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
-var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
-var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
-var supportsRequestStream = isReadableStreamSupported && (() => {
- let duplexAccessed = false;
- const hasContentType = new Request(platform_default.origin, {
- body: new ReadableStream,
- method: "POST",
- get duplex() {
- duplexAccessed = true;
- return "half";
- }
- }).headers.has("Content-Type");
- return duplexAccessed && !hasContentType;
-})();
+// node_modules/@aws-sdk/nested-clients/dis
var DEFAULT_CHUNK_SIZE = 64 * 1024;
-var supportsResponseStream = isReadableStreamSupported && !!(() => {
+var { isFunction: isFunction2 } = utils_default;
+var globalFetchAPI = (({ Request: Request2, Response }) => ({
+ Request: Request2,
+ Response
+}))(utils_default.global);
+var {
+ ReadableStream: ReadableStream2,
+ TextEncoder: TextEncoder2
+} = utils_default.global;
+var test = (fn, ...args) => {
try {
- return utils_default.isReadableStream(new Response("").body);
- } catch (err) {
+ return !!fn(...args);
+ } catch (e) {
+ return false;
}
-})();
-var resolvers = {
- stream: supportsResponseStream && ((res) => res.body)
};
-isFetchSupported && ((res) => {
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
- !resolvers[type] && (resolvers[type] = utils_default.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
- throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
- });
- });
-})(new Response);
-var getBodyLength = async (body) => {
- if (body == null) {
- return 0;
- }
- if (utils_default.isBlob(body)) {
- return body.size;
- }
- if (utils_default.isSpecCompliantForm(body)) {
- return (await new Request(body).arrayBuffer()).byteLength;
- }
- if (utils_default.isArrayBufferView(body)) {
- return body.byteLength;
- }
- if (utils_default.isURLSearchParams(body)) {
- body = body + "";
- }
- if (utils_default.isString(body)) {
- return (await encodeText(body)).byteLength;
+var factory = (env) => {
+ env = utils_default.merge.call({
+ skipUndefined: true
+ }, globalFetchAPI, env);
+ const { fetch: envFetch, Request: Request2, Response } = env;
+ const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
+ const isRequestSupported = isFunction2(Request2);
+ const isResponseSupported = isFunction2(Response);
+ if (!isFetchSupported) {
+ return false;
}
-};
-var resolveBodyLength = async (headers, body) => {
- const length = utils_default.toFiniteNumber(headers.getContentLength());
- return length == null ? getBodyLength(body) : length;
-};
-var fetch_default = isFetchSupported && (async (config) => {
- let {
- url: url2,
- method,
- data: data2,
- signal,
- cancelToken,
- timeout,
- onDownloadProgress,
- onUploadProgress,
- responseType,
- headers,
- withCredentials = "same-origin",
- fetchOptions
- } = resolveConfig_default(config);
- responseType = responseType ? (responseType + "").toLowerCase() : "text";
- let [composedSignal, stopTimeout] = signal || cancelToken || timeout ? composeSignals_default([signal, cancelToken], timeout) : [];
- let finished, request;
- const onFinish = () => {
- !finished && setTimeout(() => {
- composedSignal && composedSignal.unsubscribe();
- });
- finished = true;
- };
- let requestContentLength;
- try {
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data2)) !== 0) {
- let _request = new Request(url2, {
- method: "POST",
- body: data2,
- duplex: "half"
- });
- let contentTypeHeader;
- if (utils_default.isFormData(data2) && (contentTypeHeader = _request.headers.get("content-type"))) {
- headers.setContentType(contentTypeHeader);
- }
- if (_request.body) {
- data2 = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(requestContentLength, progressEventReducer_default(onUploadProgress)), null, encodeText);
- }
- }
- if (!utils_default.isString(withCredentials)) {
- withCredentials = withCredentials ? "cors" : "omit";
- }
- request = new Request(url2, {
- ...fetchOptions,
- signal: composedSignal,
- method: method.toUpperCase(),
- headers: headers.normalize().toJSON(),
- body: data2,
- duplex: "half",
- withCredentials
- });
- let response = await fetch(request);
- const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
- const options = {};
- ["status", "statusText", "headers"].forEach((prop) => {
- options[prop] = response[prop];
- });
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
- response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(responseContentLength, progressEventReducer_default(onDownloadProgress, true)), isStreamResponse && onFinish, encodeText), options);
- }
- responseType = responseType || "text";
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
- !isStreamResponse && onFinish();
- stopTimeout && stopTimeout();
- return await new Promise((resolve, reject) => {
- settle(resolve, reject, {
- data: responseData,
- headers: AxiosHeaders_default.from(response.headers),
- status: response.status,
- statusText: response.statusText,
- config,
- request
+ const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2);
+ const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder2) : async (str) => new Uint8Array(await new Request2(str).arrayBuffer()));
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+ const hasContentType = new Request2(platform_default.origin, {
+ body: new ReadableStream2,
+ method: "POST",
+ get duplex() {
+ duplexAccessed = true;
+ return "half";
+ }
+ }).headers.has("Content-Type");
+ return duplexAccessed && !hasContentType;
+ });
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
+ const resolvers = {
+ stream: supportsResponseStream && ((res) => res.body)
+ };
+ isFetchSupported && (() => {
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
+ !resolvers[type] && (resolvers[type] = (res, config) => {
+ let method = res && res[type];
+ if (method) {
+ return method.call(res);
+ }
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
});
});
- } catch (err) {
- onFinish();
- if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
- throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), {
- cause: err.cause || err
+ })();
+ const getBodyLength = async (body) => {
+ if (body == null) {
+ return 0;
+ }
+ if (utils_default.isBlob(body)) {
+ return body.size;
+ }
+ if (utils_default.isSpecCompliantForm(body)) {
+ const _request = new Request2(platform_default.origin, {
+ method: "POST",
+ body
+ });
+ return (await _request.arrayBuffer()).byteLength;
+ }
+ if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) {
+ return body.byteLength;
+ }
+ if (utils_default.isURLSearchParams(body)) {
+ body = body + "";
+ }
+ if (utils_default.isString(body)) {
+ return (await encodeText(body)).byteLength;
+ }
+ };
+ const resolveBodyLength = async (headers, body) => {
+ const length = utils_default.toFiniteNumber(headers.getContentLength());
+ return length == null ? getBodyLength(body) : length;
+ };
+ return async (config) => {
+ let {
+ url: url2,
+ method,
+ data: data2,
+ signal,
+ cancelToken,
+ timeout,
+ onDownloadProgress,
+ onUploadProgress,
+ responseType,
+ headers,
+ withCredentials = "same-origin",
+ fetchOptions
+ } = resolveConfig_default(config);
+ let _fetch = envFetch || fetch;
+ responseType = responseType ? (responseType + "").toLowerCase() : "text";
+ let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+ let request = null;
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+ let requestContentLength;
+ try {
+ if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data2)) !== 0) {
+ let _request = new Request2(url2, {
+ method: "POST",
+ body: data2,
+ duplex: "half"
+ });
+ let contentTypeHeader;
+ if (utils_default.isFormData(data2) && (contentTypeHeader = _request.headers.get("content-type"))) {
+ headers.setContentType(contentTypeHeader);
+ }
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
+ data2 = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ }
+ if (!utils_default.isString(withCredentials)) {
+ withCredentials = withCredentials ? "include" : "omit";
+ }
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request2.prototype;
+ const resolvedOptions = {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data2,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ };
+ request = isRequestSupported && new Request2(url2, resolvedOptions);
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
+ const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
+ const options = {};
+ ["status", "statusText", "headers"].forEach((prop) => {
+ options[prop] = response[prop];
+ });
+ const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }), options);
+ }
+ responseType = responseType || "text";
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
+ !isStreamResponse && unsubscribe && unsubscribe();
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders_default.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ });
});
+ } catch (err) {
+ unsubscribe && unsubscribe();
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
+ throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), {
+ cause: err.cause || err
+ });
+ }
+ throw AxiosError_default.from(err, err && err.code, config, request);
}
- throw AxiosError_default.from(err, err && err.code, config, request);
+ };
+};
+var seedCache = new Map;
+var getFetch = (config) => {
+ let env = config ? config.env : {};
+ const { fetch: fetch2, Request: Request2, Response } = env;
+ const seeds = [
+ Request2,
+ Response,
+ fetch2
+ ];
+ let len = seeds.length, i = len, seed, target, map = seedCache;
+ while (i--) {
+ seed = seeds[i];
+ target = map.get(seed);
+ target === undefined && map.set(seed, target = i ? new Map : factory(env));
+ map = target;
}
-});
+ return target;
+};
+var adapter = getFetch();
-// node_modules/@aws-sdk/client-sso/dist-cjs/e
+// node_modules/@aws-sdk/nested-clients/dist-c
var knownAdapters = {
http: http_default,
xhr: xhr_default,
- fetch: fetch_default
+ fetch: {
+ get: getFetch
+ }
};
utils_default.forEach(knownAdapters, (fn, value) => {
if (fn) {
@@ -48241,40 +52505,40 @@ utils_default.forEach(knownAdapters, (fn, value) => {
}
});
var renderReason = (reason) => `- ${reason}`;
-var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
+var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false;
var adapters_default = {
- getAdapter: (adapters) => {
+ getAdapter: (adapters, config) => {
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
const { length } = adapters;
let nameOrAdapter;
- let adapter;
+ let adapter2;
const rejectedReasons = {};
for (let i = 0;i < length; i++) {
nameOrAdapter = adapters[i];
let id;
- adapter = nameOrAdapter;
+ adapter2 = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
- if (adapter === undefined) {
+ adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+ if (adapter2 === undefined) {
throw new AxiosError_default(`Unknown adapter '${id}'`);
}
}
- if (adapter) {
+ if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config)))) {
break;
}
- rejectedReasons[id || "#" + i] = adapter;
+ rejectedReasons[id || "#" + i] = adapter2;
}
- if (!adapter) {
+ if (!adapter2) {
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
throw new AxiosError_default(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
}
- return adapter;
+ return adapter2;
},
adapters: knownAdapters
};
-// node_modules/@aws-sdk/client-sso/dist-cjs/endp
+// node_modules/@aws-sdk/nested-clients/dist-cjs/
var throwIfCancellationRequested = function(config) {
if (config.cancelToken) {
config.cancelToken.throwIfRequested();
@@ -48290,8 +52554,8 @@ function dispatchRequest(config) {
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
config.headers.setContentType("application/x-www-form-urlencoded", false);
}
- const adapter = adapters_default.getAdapter(config.adapter || defaults_default.adapter);
- return adapter(config).then(function onAdapterResolution(response) {
+ const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
+ return adapter2(config).then(function onAdapterResolution(response) {
throwIfCancellationRequested(config);
response.data = transformData.call(config, config.transformResponse, response);
response.headers = AxiosHeaders_default.from(response.headers);
@@ -48308,7 +52572,7 @@ function dispatchRequest(config) {
});
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/e
+// node_modules/@aws-sdk/nested-clients/dist-c
var assertOptions = function(options, schema, allowUnknown) {
if (typeof options !== "object") {
throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
@@ -48353,17 +52617,23 @@ validators.transitional = function transitional4(validator, version, message) {
return validator ? validator(value, opt, opts) : true;
};
};
+validators.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ };
+};
var validator_default = {
assertOptions,
validators
};
-// node_modules/@aws-sdk/client-sso/dis
+// node_modules/@aws-sdk/nested-clients
var validators2 = validator_default.validators;
class Axios {
constructor(instanceConfig) {
- this.defaults = instanceConfig;
+ this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager_default,
response: new InterceptorManager_default
@@ -48374,8 +52644,8 @@ class Axios {
return await this._request(configOrUrl, config);
} catch (err) {
if (err instanceof Error) {
- let dummy;
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error;
+ let dummy = {};
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
try {
if (!err.stack) {
@@ -48417,6 +52687,16 @@ class Axios {
}, true);
}
}
+ if (config.allowAbsoluteUrls !== undefined) {
+ } else if (this.defaults.allowAbsoluteUrls !== undefined) {
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
+ } else {
+ config.allowAbsoluteUrls = true;
+ }
+ validator_default.assertOptions(config, {
+ baseUrl: validators2.spelling("baseURL"),
+ withXsrfToken: validators2.spelling("withXSRFToken")
+ }, true);
config.method = (config.method || this.defaults.method || "get").toLowerCase();
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
@@ -48441,8 +52721,8 @@ class Axios {
let len;
if (!synchronousRequestInterceptors) {
const chain = [dispatchRequest.bind(this), undefined];
- chain.unshift.apply(chain, requestInterceptorChain);
- chain.push.apply(chain, responseInterceptorChain);
+ chain.unshift(...requestInterceptorChain);
+ chain.push(...responseInterceptorChain);
len = chain.length;
promise = Promise.resolve(config);
while (i < len) {
@@ -48452,7 +52732,6 @@ class Axios {
}
len = requestInterceptorChain.length;
let newConfig = config;
- i = 0;
while (i < len) {
const onFulfilled = requestInterceptorChain[i++];
const onRejected = requestInterceptorChain[i++];
@@ -48477,7 +52756,7 @@ class Axios {
}
getUri(config) {
config = mergeConfig(this.defaults, config);
- const fullPath = buildFullPath(config.baseURL, config.url);
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
@@ -48508,7 +52787,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(m
});
var Axios_default = Axios;
-// node_modules/@aws-sdk/client-sso/dist-cjs/en
+// node_modules/@aws-sdk/nested-clients/dist-cj
class CancelToken {
constructor(executor) {
if (typeof executor !== "function") {
@@ -48572,6 +52851,15 @@ class CancelToken {
this._listeners.splice(index, 1);
}
}
+ toAbortSignal() {
+ const controller = new AbortController;
+ const abort = (err) => {
+ controller.abort(err);
+ };
+ this.subscribe(abort);
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+ return controller.signal;
+ }
static source() {
let cancel;
const token = new CancelToken(function executor(c) {
@@ -48585,19 +52873,19 @@ class CancelToken {
}
var CancelToken_default = CancelToken;
-// node_modules/@aws-sdk/client-sso/dist-cj
+// node_modules/@aws-sdk/nested-clients/dis
function spread(callback) {
return function wrap(arr) {
return callback.apply(null, arr);
};
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endp
+// node_modules/@aws-sdk/nested-clients/dist-cjs/
function isAxiosError(payload) {
return utils_default.isObject(payload) && payload.isAxiosError === true;
}
-// node_modules/@aws-sdk/client-sso/dist-cjs/endpoi
+// node_modules/@aws-sdk/nested-clients/dist-cjs/su
var HttpStatusCode = {
Continue: 100,
SwitchingProtocols: 101,
@@ -48668,7 +52956,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
});
var HttpStatusCode_default = HttpStatusCode;
-// node_modules/@aws-sdk/client-ss
+// node_modules/@aws-sdk/nested-cl
var createInstance = function(defaultConfig) {
const context = new Axios_default(defaultConfig);
const instance = bind(Axios_default.prototype.request, context);
@@ -48701,7 +52989,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
axios.default = axios;
var axios_default = axios;
-// node_modules/@aws-sdk/client
+// node_modules/@aws-sdk/nested
var getFromExternal = exports_task_parameters.GET_FROM_EXTERNAL === "true";
var baseExternalUrl = exports_task_parameters.BASE_EXTERNAL_URL;
var axiosInstance;
@@ -48806,7 +53094,7 @@ var getOptimisedImageFromExternal = async (imagePath, width, quality, format) =>
};
};
-// node_modules/@aws-sdk/client-sso
+// node_modules/@aws-sdk/nested-cli
var bestAcceptedFormat = (acceptHeader) => {
if (acceptHeader === undefined) {
logger.info({