@jr2804/livesync-cli 1.0.0-cli → 1.0.16-cli.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -3
- package/dist/AwsRestJsonProtocol-BPmCQzXa.cjs +391 -0
- package/dist/CredentialsProviderError-DQ_v7TCm.cjs +45 -0
- package/dist/XmlShapeDeserializer-B1_gcW92.cjs +2097 -0
- package/dist/chain-D9g13I5f.cjs +21 -0
- package/dist/common-B3KclSP_.cjs +375 -0
- package/dist/configLoader-Cur07c2S.cjs +149 -0
- package/dist/date-utils-Dr5LXq4_.cjs +338 -0
- package/dist/dist-es-BU2b9jKG.cjs +274 -0
- package/dist/dist-es-CaaxKLO9.cjs +52 -0
- package/dist/dist-es-D7nIauPC.cjs +60 -0
- package/dist/dist-es-DhxfSNMj.cjs +128 -0
- package/dist/dist-es-FcX9AtZC.cjs +433 -0
- package/dist/dist-es-vq3O1QUl.cjs +331 -0
- package/dist/{index.browser-DZqJcWQp.cjs → event-streams-DmrxQXpO.cjs} +3 -3
- package/dist/extensions-DkDzTVCO.cjs +4823 -0
- package/dist/externalDataInterceptor-D7DaIG7M.cjs +24 -0
- package/dist/getSSOTokenFromFile-D0KPH2qZ.cjs +36 -0
- package/dist/httpRequest-C7Ex2WeE.cjs +59 -0
- package/dist/index.cjs +5949 -1556
- package/dist/loadSharedConfigFiles-CqEQHuLW.cjs +117 -0
- package/dist/loadSso-Dn78jIWR.cjs +639 -0
- package/dist/package-BC7A0_n0.cjs +158 -0
- package/dist/parseKnownFiles-DLeTaAhg.cjs +21 -0
- package/dist/readFile-B3ey_wDD.cjs +46 -0
- package/dist/sdk-stream-mixin-YBLWtp6l.cjs +146 -0
- package/dist/{index.browser-DbH0tIYi.cjs → serde-DtADB-gG.cjs} +178 -310
- package/dist/setCredentialFeature-qcUbSyqa.cjs +13 -0
- package/dist/signin-DHnd2WFx.cjs +715 -0
- package/dist/sso-oidc-B4fkm2gn.cjs +901 -0
- package/dist/stream-collector-jwXXBEUn.cjs +584 -0
- package/dist/sts-C9aqjeec.cjs +1531 -0
- package/package.json +8 -5
|
@@ -1,66 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
let totalByteLength = input.length / 4 * 3;
|
|
12
|
-
if (input.slice(-2) === "==") totalByteLength -= 2;
|
|
13
|
-
else if (input.slice(-1) === "=") totalByteLength--;
|
|
14
|
-
const out = new ArrayBuffer(totalByteLength);
|
|
15
|
-
const dataView = new DataView(out);
|
|
16
|
-
for (let i = 0; i < input.length; i += 4) {
|
|
17
|
-
let bits = 0;
|
|
18
|
-
let bitLength = 0;
|
|
19
|
-
for (let j = i, limit = i + 3; j <= limit; j++) if (input[j] !== "=") {
|
|
20
|
-
if (!(input[j] in alphabetByEncoding)) throw new TypeError(`Invalid character ${input[j]} in base64 string.`);
|
|
21
|
-
bits |= alphabetByEncoding[input[j]] << (limit - j) * 6;
|
|
22
|
-
bitLength += 6;
|
|
23
|
-
} else bits >>= 6;
|
|
24
|
-
const chunkOffset = i / 4 * 3;
|
|
25
|
-
bits >>= bitLength % 8;
|
|
26
|
-
const byteLength = Math.floor(bitLength / 8);
|
|
27
|
-
for (let k = 0; k < byteLength; k++) {
|
|
28
|
-
const offset = (byteLength - k - 1) * 8;
|
|
29
|
-
dataView.setUint8(chunkOffset + k, (bits & 255 << offset) >> offset);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return new Uint8Array(out);
|
|
1
|
+
const require_date_utils = require("./date-utils-Dr5LXq4_.cjs");
|
|
2
|
+
let node_crypto = require("node:crypto");
|
|
3
|
+
let node_stream = require("node:stream");
|
|
4
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.js
|
|
5
|
+
var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
6
|
+
var fromBase64$1 = (input) => {
|
|
7
|
+
if (input.length * 3 % 4 !== 0) throw new TypeError(`Incorrect padding on base64 string.`);
|
|
8
|
+
if (!BASE64_REGEX.exec(input)) throw new TypeError(`Invalid base64 string.`);
|
|
9
|
+
const buffer = require_date_utils.fromString(input, "base64");
|
|
10
|
+
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
33
11
|
};
|
|
34
12
|
//#endregion
|
|
35
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-
|
|
36
|
-
var
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js
|
|
39
|
-
function toBase64(_input) {
|
|
13
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.js
|
|
14
|
+
var toBase64$1 = (_input) => {
|
|
40
15
|
let input;
|
|
41
|
-
if (typeof _input === "string") input = fromUtf8(_input);
|
|
16
|
+
if (typeof _input === "string") input = require_date_utils.fromUtf8(_input);
|
|
42
17
|
else input = _input;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
let str = "";
|
|
47
|
-
for (let i = 0; i < input.length; i += 3) {
|
|
48
|
-
let bits = 0;
|
|
49
|
-
let bitLength = 0;
|
|
50
|
-
for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {
|
|
51
|
-
bits |= input[j] << (limit - j - 1) * 8;
|
|
52
|
-
bitLength += 8;
|
|
53
|
-
}
|
|
54
|
-
const bitClusterCount = Math.ceil(bitLength / 6);
|
|
55
|
-
bits <<= bitClusterCount * 6 - bitLength;
|
|
56
|
-
for (let k = 1; k <= bitClusterCount; k++) {
|
|
57
|
-
const offset = (bitClusterCount - k) * 6;
|
|
58
|
-
str += alphabetByValue[(bits & 63 << offset) >> offset];
|
|
59
|
-
}
|
|
60
|
-
str += "==".slice(0, 4 - bitClusterCount);
|
|
61
|
-
}
|
|
62
|
-
return str;
|
|
63
|
-
}
|
|
18
|
+
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.");
|
|
19
|
+
return require_date_utils.fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
|
|
20
|
+
};
|
|
64
21
|
//#endregion
|
|
65
22
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/blob/Uint8ArrayBlobAdapter.js
|
|
66
23
|
function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
|
|
@@ -83,13 +40,6 @@ function bindUint8ArrayBlobAdapter(toUtf8, fromUtf8, toBase64, fromBase64) {
|
|
|
83
40
|
};
|
|
84
41
|
}
|
|
85
42
|
//#endregion
|
|
86
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js
|
|
87
|
-
var toUtf8 = (input) => {
|
|
88
|
-
if (typeof input === "string") return input;
|
|
89
|
-
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.");
|
|
90
|
-
return new TextDecoder("utf-8").decode(input);
|
|
91
|
-
};
|
|
92
|
-
//#endregion
|
|
93
43
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/uuid/v4.js
|
|
94
44
|
var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
95
45
|
function bindV4(getRandomValues) {
|
|
@@ -103,204 +53,6 @@ function bindV4(getRandomValues) {
|
|
|
103
53
|
};
|
|
104
54
|
}
|
|
105
55
|
//#endregion
|
|
106
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
|
|
107
|
-
var expectNumber = (value) => {
|
|
108
|
-
if (value === null || value === void 0) return;
|
|
109
|
-
if (typeof value === "string") {
|
|
110
|
-
const parsed = parseFloat(value);
|
|
111
|
-
if (!Number.isNaN(parsed)) {
|
|
112
|
-
if (String(parsed) !== String(value)) logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
|
|
113
|
-
return parsed;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (typeof value === "number") return value;
|
|
117
|
-
throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
|
|
118
|
-
};
|
|
119
|
-
var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
|
|
120
|
-
var expectFloat32 = (value) => {
|
|
121
|
-
const expected = expectNumber(value);
|
|
122
|
-
if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
|
|
123
|
-
if (Math.abs(expected) > MAX_FLOAT) throw new TypeError(`Expected 32-bit float, got ${value}`);
|
|
124
|
-
}
|
|
125
|
-
return expected;
|
|
126
|
-
};
|
|
127
|
-
var expectLong = (value) => {
|
|
128
|
-
if (value === null || value === void 0) return;
|
|
129
|
-
if (Number.isInteger(value) && !Number.isNaN(value)) return value;
|
|
130
|
-
throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
|
|
131
|
-
};
|
|
132
|
-
var expectShort = (value) => expectSizedInt(value, 16);
|
|
133
|
-
var expectByte = (value) => expectSizedInt(value, 8);
|
|
134
|
-
var expectSizedInt = (value, size) => {
|
|
135
|
-
const expected = expectLong(value);
|
|
136
|
-
if (expected !== void 0 && castInt(expected, size) !== expected) throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
|
|
137
|
-
return expected;
|
|
138
|
-
};
|
|
139
|
-
var castInt = (value, size) => {
|
|
140
|
-
switch (size) {
|
|
141
|
-
case 32: return Int32Array.of(value)[0];
|
|
142
|
-
case 16: return Int16Array.of(value)[0];
|
|
143
|
-
case 8: return Int8Array.of(value)[0];
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
var strictParseFloat32 = (value) => {
|
|
147
|
-
if (typeof value == "string") return expectFloat32(parseNumber(value));
|
|
148
|
-
return expectFloat32(value);
|
|
149
|
-
};
|
|
150
|
-
var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
|
|
151
|
-
var parseNumber = (value) => {
|
|
152
|
-
const matches = value.match(NUMBER_REGEX);
|
|
153
|
-
if (matches === null || matches[0].length !== value.length) throw new TypeError(`Expected real number, got implicit NaN`);
|
|
154
|
-
return parseFloat(value);
|
|
155
|
-
};
|
|
156
|
-
var strictParseShort = (value) => {
|
|
157
|
-
if (typeof value === "string") return expectShort(parseNumber(value));
|
|
158
|
-
return expectShort(value);
|
|
159
|
-
};
|
|
160
|
-
var strictParseByte = (value) => {
|
|
161
|
-
if (typeof value === "string") return expectByte(parseNumber(value));
|
|
162
|
-
return expectByte(value);
|
|
163
|
-
};
|
|
164
|
-
var stackTraceWarning = (message) => {
|
|
165
|
-
return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
|
|
166
|
-
};
|
|
167
|
-
var logger = { warn: console.warn };
|
|
168
|
-
//#endregion
|
|
169
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
|
|
170
|
-
var DAYS = [
|
|
171
|
-
"Sun",
|
|
172
|
-
"Mon",
|
|
173
|
-
"Tue",
|
|
174
|
-
"Wed",
|
|
175
|
-
"Thu",
|
|
176
|
-
"Fri",
|
|
177
|
-
"Sat"
|
|
178
|
-
];
|
|
179
|
-
var MONTHS = [
|
|
180
|
-
"Jan",
|
|
181
|
-
"Feb",
|
|
182
|
-
"Mar",
|
|
183
|
-
"Apr",
|
|
184
|
-
"May",
|
|
185
|
-
"Jun",
|
|
186
|
-
"Jul",
|
|
187
|
-
"Aug",
|
|
188
|
-
"Sep",
|
|
189
|
-
"Oct",
|
|
190
|
-
"Nov",
|
|
191
|
-
"Dec"
|
|
192
|
-
];
|
|
193
|
-
function dateToUtcString(date) {
|
|
194
|
-
const year = date.getUTCFullYear();
|
|
195
|
-
const month = date.getUTCMonth();
|
|
196
|
-
const dayOfWeek = date.getUTCDay();
|
|
197
|
-
const dayOfMonthInt = date.getUTCDate();
|
|
198
|
-
const hoursInt = date.getUTCHours();
|
|
199
|
-
const minutesInt = date.getUTCMinutes();
|
|
200
|
-
const secondsInt = date.getUTCSeconds();
|
|
201
|
-
const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
|
|
202
|
-
const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
|
|
203
|
-
const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
|
|
204
|
-
const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
|
|
205
|
-
return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
|
|
206
|
-
}
|
|
207
|
-
var IMF_FIXDATE$1 = /* @__PURE__ */ 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$/);
|
|
208
|
-
var RFC_850_DATE$1 = /* @__PURE__ */ 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$/);
|
|
209
|
-
var ASC_TIME$1 = /* @__PURE__ */ 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})$/);
|
|
210
|
-
var parseRfc7231DateTime = (value) => {
|
|
211
|
-
if (value === null || value === void 0) return;
|
|
212
|
-
if (typeof value !== "string") throw new TypeError("RFC-7231 date-times must be expressed as strings");
|
|
213
|
-
let match = IMF_FIXDATE$1.exec(value);
|
|
214
|
-
if (match) {
|
|
215
|
-
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
|
|
216
|
-
return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
|
|
217
|
-
hours,
|
|
218
|
-
minutes,
|
|
219
|
-
seconds,
|
|
220
|
-
fractionalMilliseconds
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
match = RFC_850_DATE$1.exec(value);
|
|
224
|
-
if (match) {
|
|
225
|
-
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
|
|
226
|
-
return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
|
|
227
|
-
hours,
|
|
228
|
-
minutes,
|
|
229
|
-
seconds,
|
|
230
|
-
fractionalMilliseconds
|
|
231
|
-
}));
|
|
232
|
-
}
|
|
233
|
-
match = ASC_TIME$1.exec(value);
|
|
234
|
-
if (match) {
|
|
235
|
-
const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
|
|
236
|
-
return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), {
|
|
237
|
-
hours,
|
|
238
|
-
minutes,
|
|
239
|
-
seconds,
|
|
240
|
-
fractionalMilliseconds
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
throw new TypeError("Invalid RFC-7231 date-time value");
|
|
244
|
-
};
|
|
245
|
-
var buildDate = (year, month, day, time) => {
|
|
246
|
-
const adjustedMonth = month - 1;
|
|
247
|
-
validateDayOfMonth(year, adjustedMonth, day);
|
|
248
|
-
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)));
|
|
249
|
-
};
|
|
250
|
-
var parseTwoDigitYear = (value) => {
|
|
251
|
-
const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
|
|
252
|
-
const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
|
|
253
|
-
if (valueInThisCentury < thisYear) return valueInThisCentury + 100;
|
|
254
|
-
return valueInThisCentury;
|
|
255
|
-
};
|
|
256
|
-
var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
|
|
257
|
-
var adjustRfc850Year = (input) => {
|
|
258
|
-
if (input.getTime() - (/* @__PURE__ */ 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()));
|
|
259
|
-
return input;
|
|
260
|
-
};
|
|
261
|
-
var parseMonthByShortName = (value) => {
|
|
262
|
-
const monthIdx = MONTHS.indexOf(value);
|
|
263
|
-
if (monthIdx < 0) throw new TypeError(`Invalid month: ${value}`);
|
|
264
|
-
return monthIdx + 1;
|
|
265
|
-
};
|
|
266
|
-
var DAYS_IN_MONTH = [
|
|
267
|
-
31,
|
|
268
|
-
28,
|
|
269
|
-
31,
|
|
270
|
-
30,
|
|
271
|
-
31,
|
|
272
|
-
30,
|
|
273
|
-
31,
|
|
274
|
-
31,
|
|
275
|
-
30,
|
|
276
|
-
31,
|
|
277
|
-
30,
|
|
278
|
-
31
|
|
279
|
-
];
|
|
280
|
-
var validateDayOfMonth = (year, month, day) => {
|
|
281
|
-
let maxDays = DAYS_IN_MONTH[month];
|
|
282
|
-
if (month === 1 && isLeapYear(year)) maxDays = 29;
|
|
283
|
-
if (day > maxDays) throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
|
|
284
|
-
};
|
|
285
|
-
var isLeapYear = (year) => {
|
|
286
|
-
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
287
|
-
};
|
|
288
|
-
var parseDateValue = (value, type, lower, upper) => {
|
|
289
|
-
const dateVal = strictParseByte(stripLeadingZeroes(value));
|
|
290
|
-
if (dateVal < lower || dateVal > upper) throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
|
|
291
|
-
return dateVal;
|
|
292
|
-
};
|
|
293
|
-
var parseMilliseconds = (value) => {
|
|
294
|
-
if (value === null || value === void 0) return 0;
|
|
295
|
-
return strictParseFloat32("0." + value) * 1e3;
|
|
296
|
-
};
|
|
297
|
-
var stripLeadingZeroes = (value) => {
|
|
298
|
-
let idx = 0;
|
|
299
|
-
while (idx < value.length - 1 && value.charAt(idx) === "0") idx++;
|
|
300
|
-
if (idx === 0) return value;
|
|
301
|
-
return value.slice(idx);
|
|
302
|
-
};
|
|
303
|
-
//#endregion
|
|
304
56
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/lazy-json.js
|
|
305
57
|
var LazyJsonString = function LazyJsonString(val) {
|
|
306
58
|
return Object.assign(new String(val), {
|
|
@@ -508,21 +260,89 @@ function toHex(bytes) {
|
|
|
508
260
|
return out;
|
|
509
261
|
}
|
|
510
262
|
//#endregion
|
|
511
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.
|
|
263
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js
|
|
512
264
|
var toUint8Array = (data) => {
|
|
513
|
-
if (typeof data === "string") return fromUtf8(data);
|
|
265
|
+
if (typeof data === "string") return require_date_utils.fromUtf8(data);
|
|
514
266
|
if (ArrayBuffer.isView(data)) return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
515
267
|
return new Uint8Array(data);
|
|
516
268
|
};
|
|
517
269
|
//#endregion
|
|
518
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/is-array-buffer/is-array-buffer.js
|
|
519
|
-
var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
|
|
520
|
-
//#endregion
|
|
521
270
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-type-check.js
|
|
522
271
|
var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
|
|
523
272
|
//#endregion
|
|
273
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/fromUtf8.browser.js
|
|
274
|
+
var fromUtf8 = (input) => new TextEncoder().encode(input);
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/constants-for-browser.js
|
|
277
|
+
var chars = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;
|
|
278
|
+
var alphabetByEncoding = Object.entries(chars).reduce((acc, [i, c]) => {
|
|
279
|
+
acc[c] = Number(i);
|
|
280
|
+
return acc;
|
|
281
|
+
}, {});
|
|
282
|
+
var alphabetByValue = chars.split("");
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/toBase64.browser.js
|
|
285
|
+
function toBase64(_input) {
|
|
286
|
+
let input;
|
|
287
|
+
if (typeof _input === "string") input = fromUtf8(_input);
|
|
288
|
+
else input = _input;
|
|
289
|
+
const isArrayLike = typeof input === "object" && typeof input.length === "number";
|
|
290
|
+
const isUint8Array = typeof input === "object" && typeof input.byteOffset === "number" && typeof input.byteLength === "number";
|
|
291
|
+
if (!isArrayLike && !isUint8Array) throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
|
|
292
|
+
let str = "";
|
|
293
|
+
for (let i = 0; i < input.length; i += 3) {
|
|
294
|
+
let bits = 0;
|
|
295
|
+
let bitLength = 0;
|
|
296
|
+
for (let j = i, limit = Math.min(i + 3, input.length); j < limit; j++) {
|
|
297
|
+
bits |= input[j] << (limit - j - 1) * 8;
|
|
298
|
+
bitLength += 8;
|
|
299
|
+
}
|
|
300
|
+
const bitClusterCount = Math.ceil(bitLength / 6);
|
|
301
|
+
bits <<= bitClusterCount * 6 - bitLength;
|
|
302
|
+
for (let k = 1; k <= bitClusterCount; k++) {
|
|
303
|
+
const offset = (bitClusterCount - k) * 6;
|
|
304
|
+
str += alphabetByValue[(bits & 63 << offset) >> offset];
|
|
305
|
+
}
|
|
306
|
+
str += "==".slice(0, 4 - bitClusterCount);
|
|
307
|
+
}
|
|
308
|
+
return str;
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUtf8.browser.js
|
|
312
|
+
var toUtf8 = (input) => {
|
|
313
|
+
if (typeof input === "string") return input;
|
|
314
|
+
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.");
|
|
315
|
+
return new TextDecoder("utf-8").decode(input);
|
|
316
|
+
};
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-base64/fromBase64.browser.js
|
|
319
|
+
var fromBase64 = (input) => {
|
|
320
|
+
let totalByteLength = input.length / 4 * 3;
|
|
321
|
+
if (input.slice(-2) === "==") totalByteLength -= 2;
|
|
322
|
+
else if (input.slice(-1) === "=") totalByteLength--;
|
|
323
|
+
const out = new ArrayBuffer(totalByteLength);
|
|
324
|
+
const dataView = new DataView(out);
|
|
325
|
+
for (let i = 0; i < input.length; i += 4) {
|
|
326
|
+
let bits = 0;
|
|
327
|
+
let bitLength = 0;
|
|
328
|
+
for (let j = i, limit = i + 3; j <= limit; j++) if (input[j] !== "=") {
|
|
329
|
+
if (!(input[j] in alphabetByEncoding)) throw new TypeError(`Invalid character ${input[j]} in base64 string.`);
|
|
330
|
+
bits |= alphabetByEncoding[input[j]] << (limit - j) * 6;
|
|
331
|
+
bitLength += 6;
|
|
332
|
+
} else bits >>= 6;
|
|
333
|
+
const chunkOffset = i / 4 * 3;
|
|
334
|
+
bits >>= bitLength % 8;
|
|
335
|
+
const byteLength = Math.floor(bitLength / 8);
|
|
336
|
+
for (let k = 0; k < byteLength; k++) {
|
|
337
|
+
const offset = (byteLength - k - 1) * 8;
|
|
338
|
+
dataView.setUint8(chunkOffset + k, (bits & 255 << offset) >> offset);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return new Uint8Array(out);
|
|
342
|
+
};
|
|
343
|
+
//#endregion
|
|
524
344
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js
|
|
525
|
-
var streamCollector = async (stream) => {
|
|
345
|
+
var streamCollector$1 = async (stream) => {
|
|
526
346
|
if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
|
|
527
347
|
if (Blob.prototype.arrayBuffer !== void 0) return new Uint8Array(await stream.arrayBuffer());
|
|
528
348
|
return collectBlob(stream);
|
|
@@ -571,17 +391,17 @@ function readToBase64(blob) {
|
|
|
571
391
|
}
|
|
572
392
|
//#endregion
|
|
573
393
|
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.browser.js
|
|
574
|
-
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
|
|
575
|
-
var sdkStreamMixin = (stream) => {
|
|
394
|
+
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1 = "The stream has already been transformed.";
|
|
395
|
+
var sdkStreamMixin$1 = (stream) => {
|
|
576
396
|
if (!isBlobInstance(stream) && !isReadableStream(stream)) {
|
|
577
397
|
const name = stream?.__proto__?.constructor?.name || stream;
|
|
578
398
|
throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
|
|
579
399
|
}
|
|
580
400
|
let transformed = false;
|
|
581
401
|
const transformToByteArray = async () => {
|
|
582
|
-
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
402
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
|
|
583
403
|
transformed = true;
|
|
584
|
-
return await streamCollector(stream);
|
|
404
|
+
return await streamCollector$1(stream);
|
|
585
405
|
};
|
|
586
406
|
const blobToWebStream = (blob) => {
|
|
587
407
|
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");
|
|
@@ -598,7 +418,7 @@ var sdkStreamMixin = (stream) => {
|
|
|
598
418
|
else throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
|
|
599
419
|
},
|
|
600
420
|
transformToWebStream: () => {
|
|
601
|
-
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
421
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED$1);
|
|
602
422
|
transformed = true;
|
|
603
423
|
if (isBlobInstance(stream)) return blobToWebStream(stream);
|
|
604
424
|
else if (isReadableStream(stream)) return stream;
|
|
@@ -608,9 +428,87 @@ var sdkStreamMixin = (stream) => {
|
|
|
608
428
|
};
|
|
609
429
|
var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
|
|
610
430
|
//#endregion
|
|
611
|
-
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/
|
|
612
|
-
var
|
|
613
|
-
|
|
431
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js
|
|
432
|
+
var Collector = class extends node_stream.Writable {
|
|
433
|
+
bufferedBytes = [];
|
|
434
|
+
_write(chunk, encoding, callback) {
|
|
435
|
+
this.bufferedBytes.push(chunk);
|
|
436
|
+
callback();
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
|
|
440
|
+
async function collectReadableStream(stream) {
|
|
441
|
+
const chunks = [];
|
|
442
|
+
const reader = stream.getReader();
|
|
443
|
+
let isDone = false;
|
|
444
|
+
let length = 0;
|
|
445
|
+
while (!isDone) {
|
|
446
|
+
const { done, value } = await reader.read();
|
|
447
|
+
if (value) {
|
|
448
|
+
chunks.push(value);
|
|
449
|
+
length += value.length;
|
|
450
|
+
}
|
|
451
|
+
isDone = done;
|
|
452
|
+
}
|
|
453
|
+
const collected = new Uint8Array(length);
|
|
454
|
+
let offset = 0;
|
|
455
|
+
for (const chunk of chunks) {
|
|
456
|
+
collected.set(chunk, offset);
|
|
457
|
+
offset += chunk.length;
|
|
458
|
+
}
|
|
459
|
+
return collected;
|
|
460
|
+
}
|
|
461
|
+
var streamCollector = (stream) => {
|
|
462
|
+
if (isReadableStreamInstance(stream)) return collectReadableStream(stream);
|
|
463
|
+
return new Promise((resolve, reject) => {
|
|
464
|
+
const collector = new Collector();
|
|
465
|
+
stream.pipe(collector);
|
|
466
|
+
stream.on("error", (err) => {
|
|
467
|
+
collector.end();
|
|
468
|
+
reject(err);
|
|
469
|
+
});
|
|
470
|
+
collector.on("error", reject);
|
|
471
|
+
collector.on("finish", function() {
|
|
472
|
+
resolve(new Uint8Array(Buffer.concat(this.bufferedBytes)));
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
};
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/util-stream/sdk-stream-mixin.js
|
|
478
|
+
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
|
|
479
|
+
var sdkStreamMixin = (stream) => {
|
|
480
|
+
if (!(stream instanceof node_stream.Readable)) try {
|
|
481
|
+
return sdkStreamMixin$1(stream);
|
|
482
|
+
} catch (e) {
|
|
483
|
+
const name = stream?.__proto__?.constructor?.name || stream;
|
|
484
|
+
throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
|
|
485
|
+
}
|
|
486
|
+
let transformed = false;
|
|
487
|
+
const transformToByteArray = async () => {
|
|
488
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
489
|
+
transformed = true;
|
|
490
|
+
return await streamCollector(stream);
|
|
491
|
+
};
|
|
492
|
+
return Object.assign(stream, {
|
|
493
|
+
transformToByteArray,
|
|
494
|
+
transformToString: async (encoding) => {
|
|
495
|
+
const buf = await transformToByteArray();
|
|
496
|
+
if (encoding === void 0 || Buffer.isEncoding(encoding)) return require_date_utils.fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
|
|
497
|
+
else return new TextDecoder(encoding).decode(buf);
|
|
498
|
+
},
|
|
499
|
+
transformToWebStream: () => {
|
|
500
|
+
if (transformed) throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
501
|
+
if (stream.readableFlowing !== null) throw new Error("The stream has been consumed by other callbacks.");
|
|
502
|
+
if (typeof node_stream.Readable.toWeb !== "function") throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
|
|
503
|
+
transformed = true;
|
|
504
|
+
return node_stream.Readable.toWeb(stream);
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
};
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/serde/index.js
|
|
510
|
+
var Uint8ArrayBlobAdapter = class extends bindUint8ArrayBlobAdapter(require_date_utils.toUtf8, require_date_utils.fromUtf8, toBase64$1, fromBase64$1) {};
|
|
511
|
+
var _getRandomValues = node_crypto.getRandomValues;
|
|
614
512
|
var generateIdempotencyToken = bindV4(_getRandomValues);
|
|
615
513
|
//#endregion
|
|
616
514
|
Object.defineProperty(exports, "LazyJsonString", {
|
|
@@ -649,22 +547,10 @@ Object.defineProperty(exports, "_parseRfc7231DateTime", {
|
|
|
649
547
|
return _parseRfc7231DateTime;
|
|
650
548
|
}
|
|
651
549
|
});
|
|
652
|
-
Object.defineProperty(exports, "dateToUtcString", {
|
|
653
|
-
enumerable: true,
|
|
654
|
-
get: function() {
|
|
655
|
-
return dateToUtcString;
|
|
656
|
-
}
|
|
657
|
-
});
|
|
658
550
|
Object.defineProperty(exports, "fromBase64", {
|
|
659
551
|
enumerable: true,
|
|
660
552
|
get: function() {
|
|
661
|
-
return fromBase64;
|
|
662
|
-
}
|
|
663
|
-
});
|
|
664
|
-
Object.defineProperty(exports, "fromUtf8", {
|
|
665
|
-
enumerable: true,
|
|
666
|
-
get: function() {
|
|
667
|
-
return fromUtf8;
|
|
553
|
+
return fromBase64$1;
|
|
668
554
|
}
|
|
669
555
|
});
|
|
670
556
|
Object.defineProperty(exports, "generateIdempotencyToken", {
|
|
@@ -673,18 +559,6 @@ Object.defineProperty(exports, "generateIdempotencyToken", {
|
|
|
673
559
|
return generateIdempotencyToken;
|
|
674
560
|
}
|
|
675
561
|
});
|
|
676
|
-
Object.defineProperty(exports, "isArrayBuffer", {
|
|
677
|
-
enumerable: true,
|
|
678
|
-
get: function() {
|
|
679
|
-
return isArrayBuffer;
|
|
680
|
-
}
|
|
681
|
-
});
|
|
682
|
-
Object.defineProperty(exports, "parseRfc7231DateTime", {
|
|
683
|
-
enumerable: true,
|
|
684
|
-
get: function() {
|
|
685
|
-
return parseRfc7231DateTime;
|
|
686
|
-
}
|
|
687
|
-
});
|
|
688
562
|
Object.defineProperty(exports, "quoteHeader", {
|
|
689
563
|
enumerable: true,
|
|
690
564
|
get: function() {
|
|
@@ -712,7 +586,7 @@ Object.defineProperty(exports, "splitHeader", {
|
|
|
712
586
|
Object.defineProperty(exports, "toBase64", {
|
|
713
587
|
enumerable: true,
|
|
714
588
|
get: function() {
|
|
715
|
-
return toBase64;
|
|
589
|
+
return toBase64$1;
|
|
716
590
|
}
|
|
717
591
|
});
|
|
718
592
|
Object.defineProperty(exports, "toUint8Array", {
|
|
@@ -721,9 +595,3 @@ Object.defineProperty(exports, "toUint8Array", {
|
|
|
721
595
|
return toUint8Array;
|
|
722
596
|
}
|
|
723
597
|
});
|
|
724
|
-
Object.defineProperty(exports, "toUtf8", {
|
|
725
|
-
enumerable: true,
|
|
726
|
-
get: function() {
|
|
727
|
-
return toUtf8;
|
|
728
|
-
}
|
|
729
|
-
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setCredentialFeature.js
|
|
2
|
+
function setCredentialFeature(credentials, feature, value) {
|
|
3
|
+
if (!credentials.$source) credentials.$source = {};
|
|
4
|
+
credentials.$source[feature] = value;
|
|
5
|
+
return credentials;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
Object.defineProperty(exports, "setCredentialFeature", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return setCredentialFeature;
|
|
12
|
+
}
|
|
13
|
+
});
|