@junando/core 0.10.1 → 0.11.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/dist/index.d.ts +829 -577
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1877 -9909
- package/dist/index.js.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/shared/metrics/index.d.ts +29 -0
- package/dist/shared/metrics/index.d.ts.map +1 -0
- package/dist/shared/metrics/index.js +131 -0
- package/dist/shared/metrics/index.js.map +1 -0
- package/package.json +12 -11
- package/dist/chunk-3OJNTHWB.js +0 -225
- package/dist/chunk-5LNMHOUT.js +0 -229
- package/dist/chunk-72FU6SG6.js +0 -236
- package/dist/chunk-7SYJ764U.js +0 -579
- package/dist/chunk-AZU6S4RC.js +0 -11
- package/dist/chunk-BGPI5BQ5.js +0 -27
- package/dist/chunk-DKQSWD3S.js +0 -46
- package/dist/chunk-H4ND7Z4R.js +0 -504
- package/dist/chunk-HVICRLMN.js +0 -742
- package/dist/chunk-ID7PWYSN.js +0 -12
- package/dist/chunk-KU245W3C.js +0 -16
- package/dist/chunk-L67CO4EG.js +0 -1038
- package/dist/chunk-MLKGABMK.js +0 -9
- package/dist/chunk-MQ4JUE6V.js +0 -447
- package/dist/chunk-N5AJP37P.js +0 -385
- package/dist/chunk-SIDCDO4Q.js +0 -1315
- package/dist/chunk-TDZF3WAT.js +0 -3824
- package/dist/chunk-VMBT3R2K.js +0 -0
- package/dist/chunk-WWHXKECU.js +0 -100
- package/dist/chunk-ZKH7AMP3.js +0 -42
- package/dist/chunk-ZOU3QHNL.js +0 -28
- package/dist/dist-es-CBFEDVZZ.js +0 -493
- package/dist/dist-es-ROXOWRKX.js +0 -22
- package/dist/dist-es-S3QCFNII.js +0 -327
- package/dist/dist-es-SQCUDQ4Y.js +0 -90
- package/dist/dist-es-UWOSB3KA.js +0 -72
- package/dist/dist-es-VXERFT35.js +0 -172
- package/dist/dist-es-Y44CAW7E.js +0 -385
- package/dist/event-streams-2IMLK3TK.js +0 -252
- package/dist/event-streams-NLZW3NHF.js +0 -1376
- package/dist/loadSso-T6VCDGCZ.js +0 -558
- package/dist/signin-BC6ZNJCV.js +0 -653
- package/dist/sso-oidc-PTS5E3NX.js +0 -793
- package/dist/sts-JSJ57UXB.js +0 -6108
package/dist/chunk-HVICRLMN.js
DELETED
|
@@ -1,742 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LazyJsonString,
|
|
3
|
-
NormalizedSchema,
|
|
4
|
-
NumericValue,
|
|
5
|
-
SerdeContextConfig,
|
|
6
|
-
UnionSerde,
|
|
7
|
-
determineTimestampFormat,
|
|
8
|
-
v4
|
|
9
|
-
} from "./chunk-TDZF3WAT.js";
|
|
10
|
-
import {
|
|
11
|
-
fromBase64,
|
|
12
|
-
toBase64
|
|
13
|
-
} from "./chunk-H4ND7Z4R.js";
|
|
14
|
-
import {
|
|
15
|
-
toUtf8
|
|
16
|
-
} from "./chunk-ZKH7AMP3.js";
|
|
17
|
-
import {
|
|
18
|
-
collectBody
|
|
19
|
-
} from "./chunk-5LNMHOUT.js";
|
|
20
|
-
|
|
21
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js
|
|
22
|
-
var collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));
|
|
23
|
-
|
|
24
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
|
|
25
|
-
var parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
26
|
-
if (encoded.length) {
|
|
27
|
-
try {
|
|
28
|
-
return JSON.parse(encoded);
|
|
29
|
-
} catch (e) {
|
|
30
|
-
if (e?.name === "SyntaxError") {
|
|
31
|
-
Object.defineProperty(e, "$responseBodyText", {
|
|
32
|
-
value: encoded
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
throw e;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return {};
|
|
39
|
-
});
|
|
40
|
-
var findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
41
|
-
var sanitizeErrorCode = (rawValue) => {
|
|
42
|
-
let cleanValue = rawValue;
|
|
43
|
-
if (typeof cleanValue === "number") {
|
|
44
|
-
cleanValue = cleanValue.toString();
|
|
45
|
-
}
|
|
46
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
47
|
-
cleanValue = cleanValue.split(",")[0];
|
|
48
|
-
}
|
|
49
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
50
|
-
cleanValue = cleanValue.split(":")[0];
|
|
51
|
-
}
|
|
52
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
53
|
-
cleanValue = cleanValue.split("#")[1];
|
|
54
|
-
}
|
|
55
|
-
return cleanValue;
|
|
56
|
-
};
|
|
57
|
-
var loadRestJsonErrorCode = (output, data) => {
|
|
58
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
59
|
-
if (headerKey !== void 0) {
|
|
60
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
61
|
-
}
|
|
62
|
-
if (data && typeof data === "object") {
|
|
63
|
-
const codeKey = findKey(data, "code");
|
|
64
|
-
if (codeKey && data[codeKey] !== void 0) {
|
|
65
|
-
return sanitizeErrorCode(data[codeKey]);
|
|
66
|
-
}
|
|
67
|
-
if (data["__type"] !== void 0) {
|
|
68
|
-
return sanitizeErrorCode(data["__type"]);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
// ../../node_modules/.pnpm/@smithy+core@3.23.17/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js
|
|
74
|
-
var expectNumber = (value) => {
|
|
75
|
-
if (value === null || value === void 0) {
|
|
76
|
-
return void 0;
|
|
77
|
-
}
|
|
78
|
-
if (typeof value === "string") {
|
|
79
|
-
const parsed = parseFloat(value);
|
|
80
|
-
if (!Number.isNaN(parsed)) {
|
|
81
|
-
if (String(parsed) !== String(value)) {
|
|
82
|
-
logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
|
|
83
|
-
}
|
|
84
|
-
return parsed;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
if (typeof value === "number") {
|
|
88
|
-
return value;
|
|
89
|
-
}
|
|
90
|
-
throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
|
|
91
|
-
};
|
|
92
|
-
var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
|
|
93
|
-
var expectFloat32 = (value) => {
|
|
94
|
-
const expected = expectNumber(value);
|
|
95
|
-
if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
|
|
96
|
-
if (Math.abs(expected) > MAX_FLOAT) {
|
|
97
|
-
throw new TypeError(`Expected 32-bit float, got ${value}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return expected;
|
|
101
|
-
};
|
|
102
|
-
var expectLong = (value) => {
|
|
103
|
-
if (value === null || value === void 0) {
|
|
104
|
-
return void 0;
|
|
105
|
-
}
|
|
106
|
-
if (Number.isInteger(value) && !Number.isNaN(value)) {
|
|
107
|
-
return value;
|
|
108
|
-
}
|
|
109
|
-
throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
|
|
110
|
-
};
|
|
111
|
-
var expectShort = (value) => expectSizedInt(value, 16);
|
|
112
|
-
var expectByte = (value) => expectSizedInt(value, 8);
|
|
113
|
-
var expectSizedInt = (value, size) => {
|
|
114
|
-
const expected = expectLong(value);
|
|
115
|
-
if (expected !== void 0 && castInt(expected, size) !== expected) {
|
|
116
|
-
throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
|
|
117
|
-
}
|
|
118
|
-
return expected;
|
|
119
|
-
};
|
|
120
|
-
var castInt = (value, size) => {
|
|
121
|
-
switch (size) {
|
|
122
|
-
case 32:
|
|
123
|
-
return Int32Array.of(value)[0];
|
|
124
|
-
case 16:
|
|
125
|
-
return Int16Array.of(value)[0];
|
|
126
|
-
case 8:
|
|
127
|
-
return Int8Array.of(value)[0];
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
var strictParseDouble = (value) => {
|
|
131
|
-
if (typeof value == "string") {
|
|
132
|
-
return expectNumber(parseNumber(value));
|
|
133
|
-
}
|
|
134
|
-
return expectNumber(value);
|
|
135
|
-
};
|
|
136
|
-
var strictParseFloat32 = (value) => {
|
|
137
|
-
if (typeof value == "string") {
|
|
138
|
-
return expectFloat32(parseNumber(value));
|
|
139
|
-
}
|
|
140
|
-
return expectFloat32(value);
|
|
141
|
-
};
|
|
142
|
-
var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
|
|
143
|
-
var parseNumber = (value) => {
|
|
144
|
-
const matches = value.match(NUMBER_REGEX);
|
|
145
|
-
if (matches === null || matches[0].length !== value.length) {
|
|
146
|
-
throw new TypeError(`Expected real number, got implicit NaN`);
|
|
147
|
-
}
|
|
148
|
-
return parseFloat(value);
|
|
149
|
-
};
|
|
150
|
-
var strictParseShort = (value) => {
|
|
151
|
-
if (typeof value === "string") {
|
|
152
|
-
return expectShort(parseNumber(value));
|
|
153
|
-
}
|
|
154
|
-
return expectShort(value);
|
|
155
|
-
};
|
|
156
|
-
var strictParseByte = (value) => {
|
|
157
|
-
if (typeof value === "string") {
|
|
158
|
-
return expectByte(parseNumber(value));
|
|
159
|
-
}
|
|
160
|
-
return expectByte(value);
|
|
161
|
-
};
|
|
162
|
-
var stackTraceWarning = (message) => {
|
|
163
|
-
return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
|
|
164
|
-
};
|
|
165
|
-
var logger = {
|
|
166
|
-
warn: console.warn
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
// ../../node_modules/.pnpm/@smithy+core@3.23.17/node_modules/@smithy/core/dist-es/submodules/serde/date-utils.js
|
|
170
|
-
var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
171
|
-
var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
172
|
-
function dateToUtcString(date) {
|
|
173
|
-
const year = date.getUTCFullYear();
|
|
174
|
-
const month = date.getUTCMonth();
|
|
175
|
-
const dayOfWeek = date.getUTCDay();
|
|
176
|
-
const dayOfMonthInt = date.getUTCDate();
|
|
177
|
-
const hoursInt = date.getUTCHours();
|
|
178
|
-
const minutesInt = date.getUTCMinutes();
|
|
179
|
-
const secondsInt = date.getUTCSeconds();
|
|
180
|
-
const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
|
|
181
|
-
const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
|
|
182
|
-
const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
|
|
183
|
-
const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
|
|
184
|
-
return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
|
|
185
|
-
}
|
|
186
|
-
var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
|
|
187
|
-
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])$/);
|
|
188
|
-
var parseRfc3339DateTimeWithOffset = (value) => {
|
|
189
|
-
if (value === null || value === void 0) {
|
|
190
|
-
return void 0;
|
|
191
|
-
}
|
|
192
|
-
if (typeof value !== "string") {
|
|
193
|
-
throw new TypeError("RFC-3339 date-times must be expressed as strings");
|
|
194
|
-
}
|
|
195
|
-
const match = RFC3339_WITH_OFFSET.exec(value);
|
|
196
|
-
if (!match) {
|
|
197
|
-
throw new TypeError("Invalid RFC-3339 date-time value");
|
|
198
|
-
}
|
|
199
|
-
const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
|
|
200
|
-
const year = strictParseShort(stripLeadingZeroes(yearStr));
|
|
201
|
-
const month = parseDateValue(monthStr, "month", 1, 12);
|
|
202
|
-
const day = parseDateValue(dayStr, "day", 1, 31);
|
|
203
|
-
const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
|
|
204
|
-
if (offsetStr.toUpperCase() != "Z") {
|
|
205
|
-
date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));
|
|
206
|
-
}
|
|
207
|
-
return date;
|
|
208
|
-
};
|
|
209
|
-
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$/);
|
|
210
|
-
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$/);
|
|
211
|
-
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})$/);
|
|
212
|
-
var parseRfc7231DateTime = (value) => {
|
|
213
|
-
if (value === null || value === void 0) {
|
|
214
|
-
return void 0;
|
|
215
|
-
}
|
|
216
|
-
if (typeof value !== "string") {
|
|
217
|
-
throw new TypeError("RFC-7231 date-times must be expressed as strings");
|
|
218
|
-
}
|
|
219
|
-
let match = IMF_FIXDATE.exec(value);
|
|
220
|
-
if (match) {
|
|
221
|
-
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
|
|
222
|
-
return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
|
|
223
|
-
}
|
|
224
|
-
match = RFC_850_DATE.exec(value);
|
|
225
|
-
if (match) {
|
|
226
|
-
const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
|
|
227
|
-
return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
|
|
228
|
-
hours,
|
|
229
|
-
minutes,
|
|
230
|
-
seconds,
|
|
231
|
-
fractionalMilliseconds
|
|
232
|
-
}));
|
|
233
|
-
}
|
|
234
|
-
match = ASC_TIME.exec(value);
|
|
235
|
-
if (match) {
|
|
236
|
-
const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
|
|
237
|
-
return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
|
|
238
|
-
}
|
|
239
|
-
throw new TypeError("Invalid RFC-7231 date-time value");
|
|
240
|
-
};
|
|
241
|
-
var parseEpochTimestamp = (value) => {
|
|
242
|
-
if (value === null || value === void 0) {
|
|
243
|
-
return void 0;
|
|
244
|
-
}
|
|
245
|
-
let valueAsDouble;
|
|
246
|
-
if (typeof value === "number") {
|
|
247
|
-
valueAsDouble = value;
|
|
248
|
-
} else if (typeof value === "string") {
|
|
249
|
-
valueAsDouble = strictParseDouble(value);
|
|
250
|
-
} else if (typeof value === "object" && value.tag === 1) {
|
|
251
|
-
valueAsDouble = value.value;
|
|
252
|
-
} else {
|
|
253
|
-
throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
|
|
254
|
-
}
|
|
255
|
-
if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
|
|
256
|
-
throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
|
|
257
|
-
}
|
|
258
|
-
return new Date(Math.round(valueAsDouble * 1e3));
|
|
259
|
-
};
|
|
260
|
-
var buildDate = (year, month, day, time) => {
|
|
261
|
-
const adjustedMonth = month - 1;
|
|
262
|
-
validateDayOfMonth(year, adjustedMonth, day);
|
|
263
|
-
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)));
|
|
264
|
-
};
|
|
265
|
-
var parseTwoDigitYear = (value) => {
|
|
266
|
-
const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
|
|
267
|
-
const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
|
|
268
|
-
if (valueInThisCentury < thisYear) {
|
|
269
|
-
return valueInThisCentury + 100;
|
|
270
|
-
}
|
|
271
|
-
return valueInThisCentury;
|
|
272
|
-
};
|
|
273
|
-
var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
|
|
274
|
-
var adjustRfc850Year = (input) => {
|
|
275
|
-
if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
|
|
276
|
-
return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
|
|
277
|
-
}
|
|
278
|
-
return input;
|
|
279
|
-
};
|
|
280
|
-
var parseMonthByShortName = (value) => {
|
|
281
|
-
const monthIdx = MONTHS.indexOf(value);
|
|
282
|
-
if (monthIdx < 0) {
|
|
283
|
-
throw new TypeError(`Invalid month: ${value}`);
|
|
284
|
-
}
|
|
285
|
-
return monthIdx + 1;
|
|
286
|
-
};
|
|
287
|
-
var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
288
|
-
var validateDayOfMonth = (year, month, day) => {
|
|
289
|
-
let maxDays = DAYS_IN_MONTH[month];
|
|
290
|
-
if (month === 1 && isLeapYear(year)) {
|
|
291
|
-
maxDays = 29;
|
|
292
|
-
}
|
|
293
|
-
if (day > maxDays) {
|
|
294
|
-
throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
var isLeapYear = (year) => {
|
|
298
|
-
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
299
|
-
};
|
|
300
|
-
var parseDateValue = (value, type, lower, upper) => {
|
|
301
|
-
const dateVal = strictParseByte(stripLeadingZeroes(value));
|
|
302
|
-
if (dateVal < lower || dateVal > upper) {
|
|
303
|
-
throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
|
|
304
|
-
}
|
|
305
|
-
return dateVal;
|
|
306
|
-
};
|
|
307
|
-
var parseMilliseconds = (value) => {
|
|
308
|
-
if (value === null || value === void 0) {
|
|
309
|
-
return 0;
|
|
310
|
-
}
|
|
311
|
-
return strictParseFloat32("0." + value) * 1e3;
|
|
312
|
-
};
|
|
313
|
-
var parseOffsetToMilliseconds = (value) => {
|
|
314
|
-
const directionStr = value[0];
|
|
315
|
-
let direction = 1;
|
|
316
|
-
if (directionStr == "+") {
|
|
317
|
-
direction = 1;
|
|
318
|
-
} else if (directionStr == "-") {
|
|
319
|
-
direction = -1;
|
|
320
|
-
} else {
|
|
321
|
-
throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
|
|
322
|
-
}
|
|
323
|
-
const hour = Number(value.substring(1, 3));
|
|
324
|
-
const minute = Number(value.substring(4, 6));
|
|
325
|
-
return direction * (hour * 60 + minute) * 60 * 1e3;
|
|
326
|
-
};
|
|
327
|
-
var stripLeadingZeroes = (value) => {
|
|
328
|
-
let idx = 0;
|
|
329
|
-
while (idx < value.length - 1 && value.charAt(idx) === "0") {
|
|
330
|
-
idx++;
|
|
331
|
-
}
|
|
332
|
-
if (idx === 0) {
|
|
333
|
-
return value;
|
|
334
|
-
}
|
|
335
|
-
return value.slice(idx);
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
339
|
-
function jsonReviver(key, value, context) {
|
|
340
|
-
if (context?.source) {
|
|
341
|
-
const numericString = context.source;
|
|
342
|
-
if (typeof value === "number") {
|
|
343
|
-
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
|
|
344
|
-
const isFractional = numericString.includes(".");
|
|
345
|
-
if (isFractional) {
|
|
346
|
-
return new NumericValue(numericString, "bigDecimal");
|
|
347
|
-
} else {
|
|
348
|
-
return BigInt(numericString);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
return value;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js
|
|
357
|
-
var JsonShapeDeserializer = class extends SerdeContextConfig {
|
|
358
|
-
settings;
|
|
359
|
-
constructor(settings) {
|
|
360
|
-
super();
|
|
361
|
-
this.settings = settings;
|
|
362
|
-
}
|
|
363
|
-
async read(schema, data) {
|
|
364
|
-
return this._read(schema, typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext));
|
|
365
|
-
}
|
|
366
|
-
readObject(schema, data) {
|
|
367
|
-
return this._read(schema, data);
|
|
368
|
-
}
|
|
369
|
-
_read(schema, value) {
|
|
370
|
-
const isObject = value !== null && typeof value === "object";
|
|
371
|
-
const ns = NormalizedSchema.of(schema);
|
|
372
|
-
if (isObject) {
|
|
373
|
-
if (ns.isStructSchema()) {
|
|
374
|
-
const record = value;
|
|
375
|
-
const union = ns.isUnionSchema();
|
|
376
|
-
const out = {};
|
|
377
|
-
let nameMap = void 0;
|
|
378
|
-
const { jsonName } = this.settings;
|
|
379
|
-
if (jsonName) {
|
|
380
|
-
nameMap = {};
|
|
381
|
-
}
|
|
382
|
-
let unionSerde;
|
|
383
|
-
if (union) {
|
|
384
|
-
unionSerde = new UnionSerde(record, out);
|
|
385
|
-
}
|
|
386
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
387
|
-
let fromKey = memberName;
|
|
388
|
-
if (jsonName) {
|
|
389
|
-
fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
|
|
390
|
-
nameMap[fromKey] = memberName;
|
|
391
|
-
}
|
|
392
|
-
if (union) {
|
|
393
|
-
unionSerde.mark(fromKey);
|
|
394
|
-
}
|
|
395
|
-
if (record[fromKey] != null) {
|
|
396
|
-
out[memberName] = this._read(memberSchema, record[fromKey]);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
if (union) {
|
|
400
|
-
unionSerde.writeUnknown();
|
|
401
|
-
} else if (typeof record.__type === "string") {
|
|
402
|
-
for (const k in record) {
|
|
403
|
-
const v = record[k];
|
|
404
|
-
const t = jsonName ? nameMap[k] ?? k : k;
|
|
405
|
-
if (!(t in out)) {
|
|
406
|
-
out[t] = v;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
return out;
|
|
411
|
-
}
|
|
412
|
-
if (Array.isArray(value) && ns.isListSchema()) {
|
|
413
|
-
const listMember = ns.getValueSchema();
|
|
414
|
-
const out = [];
|
|
415
|
-
for (const item of value) {
|
|
416
|
-
out.push(this._read(listMember, item));
|
|
417
|
-
}
|
|
418
|
-
return out;
|
|
419
|
-
}
|
|
420
|
-
if (ns.isMapSchema()) {
|
|
421
|
-
const mapMember = ns.getValueSchema();
|
|
422
|
-
const out = {};
|
|
423
|
-
for (const _k in value) {
|
|
424
|
-
out[_k] = this._read(mapMember, value[_k]);
|
|
425
|
-
}
|
|
426
|
-
return out;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
if (ns.isBlobSchema() && typeof value === "string") {
|
|
430
|
-
return fromBase64(value);
|
|
431
|
-
}
|
|
432
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
433
|
-
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
|
|
434
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
435
|
-
if (isJson) {
|
|
436
|
-
return LazyJsonString.from(value);
|
|
437
|
-
}
|
|
438
|
-
return value;
|
|
439
|
-
}
|
|
440
|
-
if (ns.isTimestampSchema() && value != null) {
|
|
441
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
442
|
-
switch (format) {
|
|
443
|
-
case 5:
|
|
444
|
-
return parseRfc3339DateTimeWithOffset(value);
|
|
445
|
-
case 6:
|
|
446
|
-
return parseRfc7231DateTime(value);
|
|
447
|
-
case 7:
|
|
448
|
-
return parseEpochTimestamp(value);
|
|
449
|
-
default:
|
|
450
|
-
console.warn("Missing timestamp format, parsing value with Date constructor:", value);
|
|
451
|
-
return new Date(value);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
|
|
455
|
-
return BigInt(value);
|
|
456
|
-
}
|
|
457
|
-
if (ns.isBigDecimalSchema() && value != void 0) {
|
|
458
|
-
if (value instanceof NumericValue) {
|
|
459
|
-
return value;
|
|
460
|
-
}
|
|
461
|
-
const untyped = value;
|
|
462
|
-
if (untyped.type === "bigDecimal" && "string" in untyped) {
|
|
463
|
-
return new NumericValue(untyped.string, untyped.type);
|
|
464
|
-
}
|
|
465
|
-
return new NumericValue(String(value), "bigDecimal");
|
|
466
|
-
}
|
|
467
|
-
if (ns.isNumericSchema() && typeof value === "string") {
|
|
468
|
-
switch (value) {
|
|
469
|
-
case "Infinity":
|
|
470
|
-
return Infinity;
|
|
471
|
-
case "-Infinity":
|
|
472
|
-
return -Infinity;
|
|
473
|
-
case "NaN":
|
|
474
|
-
return NaN;
|
|
475
|
-
}
|
|
476
|
-
return value;
|
|
477
|
-
}
|
|
478
|
-
if (ns.isDocumentSchema()) {
|
|
479
|
-
if (isObject) {
|
|
480
|
-
const out = Array.isArray(value) ? [] : {};
|
|
481
|
-
for (const k in value) {
|
|
482
|
-
const v = value[k];
|
|
483
|
-
if (v instanceof NumericValue) {
|
|
484
|
-
out[k] = v;
|
|
485
|
-
} else {
|
|
486
|
-
out[k] = this._read(ns, v);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return out;
|
|
490
|
-
} else {
|
|
491
|
-
return structuredClone(value);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
return value;
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
|
|
498
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js
|
|
499
|
-
var NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
|
|
500
|
-
var JsonReplacer = class {
|
|
501
|
-
values = /* @__PURE__ */ new Map();
|
|
502
|
-
counter = 0;
|
|
503
|
-
stage = 0;
|
|
504
|
-
createReplacer() {
|
|
505
|
-
if (this.stage === 1) {
|
|
506
|
-
throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
|
|
507
|
-
}
|
|
508
|
-
if (this.stage === 2) {
|
|
509
|
-
throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
|
|
510
|
-
}
|
|
511
|
-
this.stage = 1;
|
|
512
|
-
return (key, value) => {
|
|
513
|
-
if (value instanceof NumericValue) {
|
|
514
|
-
const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
|
|
515
|
-
this.values.set(`"${v}"`, value.string);
|
|
516
|
-
return v;
|
|
517
|
-
}
|
|
518
|
-
if (typeof value === "bigint") {
|
|
519
|
-
const s = value.toString();
|
|
520
|
-
const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
|
|
521
|
-
this.values.set(`"${v}"`, s);
|
|
522
|
-
return v;
|
|
523
|
-
}
|
|
524
|
-
return value;
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
replaceInJson(json) {
|
|
528
|
-
if (this.stage === 0) {
|
|
529
|
-
throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
|
|
530
|
-
}
|
|
531
|
-
if (this.stage === 2) {
|
|
532
|
-
throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
|
|
533
|
-
}
|
|
534
|
-
this.stage = 2;
|
|
535
|
-
if (this.counter === 0) {
|
|
536
|
-
return json;
|
|
537
|
-
}
|
|
538
|
-
for (const [key, value] of this.values) {
|
|
539
|
-
json = json.replace(key, value);
|
|
540
|
-
}
|
|
541
|
-
return json;
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js
|
|
546
|
-
var JsonShapeSerializer = class extends SerdeContextConfig {
|
|
547
|
-
settings;
|
|
548
|
-
buffer;
|
|
549
|
-
useReplacer = false;
|
|
550
|
-
rootSchema;
|
|
551
|
-
constructor(settings) {
|
|
552
|
-
super();
|
|
553
|
-
this.settings = settings;
|
|
554
|
-
}
|
|
555
|
-
write(schema, value) {
|
|
556
|
-
this.rootSchema = NormalizedSchema.of(schema);
|
|
557
|
-
this.buffer = this._write(this.rootSchema, value);
|
|
558
|
-
}
|
|
559
|
-
flush() {
|
|
560
|
-
const { rootSchema, useReplacer } = this;
|
|
561
|
-
this.rootSchema = void 0;
|
|
562
|
-
this.useReplacer = false;
|
|
563
|
-
if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
|
|
564
|
-
if (!useReplacer) {
|
|
565
|
-
return JSON.stringify(this.buffer);
|
|
566
|
-
}
|
|
567
|
-
const replacer = new JsonReplacer();
|
|
568
|
-
return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
|
|
569
|
-
}
|
|
570
|
-
return this.buffer;
|
|
571
|
-
}
|
|
572
|
-
writeDiscriminatedDocument(schema, value) {
|
|
573
|
-
this.write(schema, value);
|
|
574
|
-
if (typeof this.buffer === "object") {
|
|
575
|
-
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
_write(schema, value, container) {
|
|
579
|
-
const isObject = value !== null && typeof value === "object";
|
|
580
|
-
const ns = NormalizedSchema.of(schema);
|
|
581
|
-
if (isObject) {
|
|
582
|
-
if (ns.isStructSchema()) {
|
|
583
|
-
const record = value;
|
|
584
|
-
const out = {};
|
|
585
|
-
const { jsonName } = this.settings;
|
|
586
|
-
let nameMap = void 0;
|
|
587
|
-
if (jsonName) {
|
|
588
|
-
nameMap = {};
|
|
589
|
-
}
|
|
590
|
-
let outCount = 0;
|
|
591
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
592
|
-
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
|
593
|
-
if (serializableValue !== void 0) {
|
|
594
|
-
let targetKey = memberName;
|
|
595
|
-
if (jsonName) {
|
|
596
|
-
targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;
|
|
597
|
-
nameMap[memberName] = targetKey;
|
|
598
|
-
}
|
|
599
|
-
out[targetKey] = serializableValue;
|
|
600
|
-
outCount++;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
if (ns.isUnionSchema() && outCount === 0) {
|
|
604
|
-
const { $unknown } = record;
|
|
605
|
-
if (Array.isArray($unknown)) {
|
|
606
|
-
const [k, v] = $unknown;
|
|
607
|
-
out[k] = this._write(15, v);
|
|
608
|
-
}
|
|
609
|
-
} else if (typeof record.__type === "string") {
|
|
610
|
-
for (const k in record) {
|
|
611
|
-
const v = record[k];
|
|
612
|
-
const targetKey = jsonName ? nameMap[k] ?? k : k;
|
|
613
|
-
if (!(targetKey in out)) {
|
|
614
|
-
out[targetKey] = this._write(15, v);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return out;
|
|
619
|
-
}
|
|
620
|
-
if (Array.isArray(value) && ns.isListSchema()) {
|
|
621
|
-
const listMember = ns.getValueSchema();
|
|
622
|
-
const out = [];
|
|
623
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
624
|
-
for (const item of value) {
|
|
625
|
-
if (sparse || item != null) {
|
|
626
|
-
out.push(this._write(listMember, item));
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return out;
|
|
630
|
-
}
|
|
631
|
-
if (ns.isMapSchema()) {
|
|
632
|
-
const mapMember = ns.getValueSchema();
|
|
633
|
-
const out = {};
|
|
634
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
635
|
-
for (const _k in value) {
|
|
636
|
-
const _v = value[_k];
|
|
637
|
-
if (sparse || _v != null) {
|
|
638
|
-
out[_k] = this._write(mapMember, _v);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
return out;
|
|
642
|
-
}
|
|
643
|
-
if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
|
|
644
|
-
if (ns === this.rootSchema) {
|
|
645
|
-
return value;
|
|
646
|
-
}
|
|
647
|
-
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
648
|
-
}
|
|
649
|
-
if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
|
|
650
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
651
|
-
switch (format) {
|
|
652
|
-
case 5:
|
|
653
|
-
return value.toISOString().replace(".000Z", "Z");
|
|
654
|
-
case 6:
|
|
655
|
-
return dateToUtcString(value);
|
|
656
|
-
case 7:
|
|
657
|
-
return value.getTime() / 1e3;
|
|
658
|
-
default:
|
|
659
|
-
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
660
|
-
return value.getTime() / 1e3;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
if (value instanceof NumericValue) {
|
|
664
|
-
this.useReplacer = true;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
if (value === null && container?.isStructSchema()) {
|
|
668
|
-
return void 0;
|
|
669
|
-
}
|
|
670
|
-
if (ns.isStringSchema()) {
|
|
671
|
-
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
|
|
672
|
-
return v4();
|
|
673
|
-
}
|
|
674
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
675
|
-
if (value != null && mediaType) {
|
|
676
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
677
|
-
if (isJson) {
|
|
678
|
-
return LazyJsonString.from(value);
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return value;
|
|
682
|
-
}
|
|
683
|
-
if (typeof value === "number" && ns.isNumericSchema()) {
|
|
684
|
-
if (Math.abs(value) === Infinity || isNaN(value)) {
|
|
685
|
-
return String(value);
|
|
686
|
-
}
|
|
687
|
-
return value;
|
|
688
|
-
}
|
|
689
|
-
if (typeof value === "string" && ns.isBlobSchema()) {
|
|
690
|
-
if (ns === this.rootSchema) {
|
|
691
|
-
return value;
|
|
692
|
-
}
|
|
693
|
-
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
694
|
-
}
|
|
695
|
-
if (typeof value === "bigint") {
|
|
696
|
-
this.useReplacer = true;
|
|
697
|
-
}
|
|
698
|
-
if (ns.isDocumentSchema()) {
|
|
699
|
-
if (isObject) {
|
|
700
|
-
const out = Array.isArray(value) ? [] : {};
|
|
701
|
-
for (const k in value) {
|
|
702
|
-
const v = value[k];
|
|
703
|
-
if (v instanceof NumericValue) {
|
|
704
|
-
this.useReplacer = true;
|
|
705
|
-
out[k] = v;
|
|
706
|
-
} else {
|
|
707
|
-
out[k] = this._write(ns, v);
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
return out;
|
|
711
|
-
} else {
|
|
712
|
-
return structuredClone(value);
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
return value;
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
// ../../node_modules/.pnpm/@aws-sdk+core@3.974.8/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonCodec.js
|
|
720
|
-
var JsonCodec = class extends SerdeContextConfig {
|
|
721
|
-
settings;
|
|
722
|
-
constructor(settings) {
|
|
723
|
-
super();
|
|
724
|
-
this.settings = settings;
|
|
725
|
-
}
|
|
726
|
-
createSerializer() {
|
|
727
|
-
const serializer = new JsonShapeSerializer(this.settings);
|
|
728
|
-
serializer.setSerdeContext(this.serdeContext);
|
|
729
|
-
return serializer;
|
|
730
|
-
}
|
|
731
|
-
createDeserializer() {
|
|
732
|
-
const deserializer = new JsonShapeDeserializer(this.settings);
|
|
733
|
-
deserializer.setSerdeContext(this.serdeContext);
|
|
734
|
-
return deserializer;
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
export {
|
|
739
|
-
dateToUtcString,
|
|
740
|
-
loadRestJsonErrorCode,
|
|
741
|
-
JsonCodec
|
|
742
|
-
};
|