monorise 1.1.0-dev.2 → 1.1.0-dev.3
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/base/index.d.ts +53 -1
- package/dist/base/index.js +49 -1
- package/dist/base/index.js.map +1 -1
- package/dist/core/index.d.ts +3 -53
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/react/{chunk-DTRWUIDH.js → chunk-BIXAYYE4.js} +35 -5
- package/dist/react/{chunk-DTRWUIDH.js.map → chunk-BIXAYYE4.js.map} +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +143 -10403
- package/dist/react/index.js.map +1 -1
- package/dist/react/websocket-7MZ3ENOC.js +9 -0
- package/package.json +2 -2
- package/dist/react/chunk-2QOYO3GF.js +0 -182
- package/dist/react/chunk-2QOYO3GF.js.map +0 -1
- package/dist/react/chunk-4WSYM746.js +0 -383
- package/dist/react/chunk-4WSYM746.js.map +0 -1
- package/dist/react/chunk-5XIRNUBL.js +0 -43
- package/dist/react/chunk-5XIRNUBL.js.map +0 -1
- package/dist/react/chunk-7JDOKZGQ.js +0 -172
- package/dist/react/chunk-7JDOKZGQ.js.map +0 -1
- package/dist/react/chunk-A5TI2FW3.js +0 -13
- package/dist/react/chunk-A5TI2FW3.js.map +0 -1
- package/dist/react/chunk-BJXCFDMF.js +0 -15
- package/dist/react/chunk-BJXCFDMF.js.map +0 -1
- package/dist/react/chunk-BUTF5RJU.js +0 -29
- package/dist/react/chunk-BUTF5RJU.js.map +0 -1
- package/dist/react/chunk-GFVCNWVT.js +0 -54
- package/dist/react/chunk-GFVCNWVT.js.map +0 -1
- package/dist/react/chunk-JT5EZZSL.js +0 -489
- package/dist/react/chunk-JT5EZZSL.js.map +0 -1
- package/dist/react/chunk-KJX5LOMN.js +0 -43
- package/dist/react/chunk-KJX5LOMN.js.map +0 -1
- package/dist/react/chunk-KLXK4V6G.js +0 -65
- package/dist/react/chunk-KLXK4V6G.js.map +0 -1
- package/dist/react/chunk-LJLMKEKI.js +0 -245
- package/dist/react/chunk-LJLMKEKI.js.map +0 -1
- package/dist/react/chunk-MIXAYX55.js +0 -147
- package/dist/react/chunk-RPNCWADG.js +0 -248
- package/dist/react/chunk-RPNCWADG.js.map +0 -1
- package/dist/react/chunk-S6RDMHHH.js +0 -47
- package/dist/react/chunk-S6RDMHHH.js.map +0 -1
- package/dist/react/chunk-U6RIOMF4.js +0 -893
- package/dist/react/chunk-U6RIOMF4.js.map +0 -1
- package/dist/react/chunk-WCRLJFBW.js +0 -5568
- package/dist/react/chunk-WCRLJFBW.js.map +0 -1
- package/dist/react/chunk-YF6S7S36.js +0 -588
- package/dist/react/chunk-YF6S7S36.js.map +0 -1
- package/dist/react/dist-es-5WYA7CWK.js +0 -379
- package/dist/react/dist-es-5WYA7CWK.js.map +0 -1
- package/dist/react/dist-es-CR5AOOCO.js +0 -333
- package/dist/react/dist-es-CR5AOOCO.js.map +0 -1
- package/dist/react/dist-es-KZ3GLAJI.js +0 -494
- package/dist/react/dist-es-KZ3GLAJI.js.map +0 -1
- package/dist/react/dist-es-R4TRTT45.js +0 -22
- package/dist/react/dist-es-R4TRTT45.js.map +0 -1
- package/dist/react/dist-es-SKDPAJEW.js +0 -169
- package/dist/react/dist-es-SKDPAJEW.js.map +0 -1
- package/dist/react/dist-es-TOHBZNTZ.js +0 -71
- package/dist/react/dist-es-TOHBZNTZ.js.map +0 -1
- package/dist/react/dist-es-XNAC47MK.js +0 -90
- package/dist/react/dist-es-XNAC47MK.js.map +0 -1
- package/dist/react/event-streams-WAZW4P3K.js +0 -277
- package/dist/react/event-streams-WAZW4P3K.js.map +0 -1
- package/dist/react/loadSso-KXVD6CBM.js +0 -556
- package/dist/react/loadSso-KXVD6CBM.js.map +0 -1
- package/dist/react/service.config-I7RKP6FE.js +0 -14
- package/dist/react/service.config-I7RKP6FE.js.map +0 -1
- package/dist/react/signin-SEY3FDQ5.js +0 -653
- package/dist/react/signin-SEY3FDQ5.js.map +0 -1
- package/dist/react/sso-oidc-REODVHH5.js +0 -786
- package/dist/react/sso-oidc-REODVHH5.js.map +0 -1
- package/dist/react/sts-I3M4QP37.js +0 -3948
- package/dist/react/sts-I3M4QP37.js.map +0 -1
- package/dist/react/websocket-OSLLJSNO.js +0 -10
- package/dist/react/websocket-OSLLJSNO.js.map +0 -1
- /package/dist/react/{chunk-MIXAYX55.js.map → websocket-7MZ3ENOC.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monorise",
|
|
3
|
-
"version": "1.1.0-dev.
|
|
3
|
+
"version": "1.1.0-dev.3",
|
|
4
4
|
"description": "Monorise - A unified package for all Monorise functionality",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"hono": "^4.7.10",
|
|
100
100
|
"react": "^19",
|
|
101
101
|
"react-dom": "^19",
|
|
102
|
-
"sst": "4.7.3"
|
|
102
|
+
"sst": "^4.7.3"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@types/aws-lambda": "^8.10.147",
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fromBase64,
|
|
3
|
-
streamCollector,
|
|
4
|
-
toBase64,
|
|
5
|
-
toHex
|
|
6
|
-
} from "./chunk-U6RIOMF4.js";
|
|
7
|
-
import {
|
|
8
|
-
fromArrayBuffer,
|
|
9
|
-
toUtf8
|
|
10
|
-
} from "./chunk-KJX5LOMN.js";
|
|
11
|
-
|
|
12
|
-
// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js
|
|
13
|
-
import { Readable } from "stream";
|
|
14
|
-
|
|
15
|
-
// ../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js
|
|
16
|
-
var streamCollector2 = async (stream) => {
|
|
17
|
-
var _a;
|
|
18
|
-
if (typeof Blob === "function" && stream instanceof Blob || ((_a = stream.constructor) == null ? void 0 : _a.name) === "Blob") {
|
|
19
|
-
if (Blob.prototype.arrayBuffer !== void 0) {
|
|
20
|
-
return new Uint8Array(await stream.arrayBuffer());
|
|
21
|
-
}
|
|
22
|
-
return collectBlob(stream);
|
|
23
|
-
}
|
|
24
|
-
return collectStream(stream);
|
|
25
|
-
};
|
|
26
|
-
async function collectBlob(blob) {
|
|
27
|
-
const base64 = await readToBase64(blob);
|
|
28
|
-
const arrayBuffer = fromBase64(base64);
|
|
29
|
-
return new Uint8Array(arrayBuffer);
|
|
30
|
-
}
|
|
31
|
-
async function collectStream(stream) {
|
|
32
|
-
const chunks = [];
|
|
33
|
-
const reader = stream.getReader();
|
|
34
|
-
let isDone = false;
|
|
35
|
-
let length = 0;
|
|
36
|
-
while (!isDone) {
|
|
37
|
-
const { done, value } = await reader.read();
|
|
38
|
-
if (value) {
|
|
39
|
-
chunks.push(value);
|
|
40
|
-
length += value.length;
|
|
41
|
-
}
|
|
42
|
-
isDone = done;
|
|
43
|
-
}
|
|
44
|
-
const collected = new Uint8Array(length);
|
|
45
|
-
let offset = 0;
|
|
46
|
-
for (const chunk of chunks) {
|
|
47
|
-
collected.set(chunk, offset);
|
|
48
|
-
offset += chunk.length;
|
|
49
|
-
}
|
|
50
|
-
return collected;
|
|
51
|
-
}
|
|
52
|
-
function readToBase64(blob) {
|
|
53
|
-
return new Promise((resolve, reject) => {
|
|
54
|
-
const reader = new FileReader();
|
|
55
|
-
reader.onloadend = () => {
|
|
56
|
-
var _a;
|
|
57
|
-
if (reader.readyState !== 2) {
|
|
58
|
-
return reject(new Error("Reader aborted too early"));
|
|
59
|
-
}
|
|
60
|
-
const result = (_a = reader.result) != null ? _a : "";
|
|
61
|
-
const commaIndex = result.indexOf(",");
|
|
62
|
-
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
63
|
-
resolve(result.substring(dataOffset));
|
|
64
|
-
};
|
|
65
|
-
reader.onabort = () => reject(new Error("Read aborted"));
|
|
66
|
-
reader.onerror = () => reject(reader.error);
|
|
67
|
-
reader.readAsDataURL(blob);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// ../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js
|
|
72
|
-
var isReadableStream = (stream) => {
|
|
73
|
-
var _a;
|
|
74
|
-
return typeof ReadableStream === "function" && (((_a = stream == null ? void 0 : stream.constructor) == null ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js
|
|
78
|
-
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
|
|
79
|
-
var sdkStreamMixin = (stream) => {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
if (!isBlobInstance(stream) && !isReadableStream(stream)) {
|
|
82
|
-
const name = ((_b = (_a = stream == null ? void 0 : stream.__proto__) == null ? void 0 : _a.constructor) == null ? void 0 : _b.name) || stream;
|
|
83
|
-
throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
|
|
84
|
-
}
|
|
85
|
-
let transformed = false;
|
|
86
|
-
const transformToByteArray = async () => {
|
|
87
|
-
if (transformed) {
|
|
88
|
-
throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
89
|
-
}
|
|
90
|
-
transformed = true;
|
|
91
|
-
return await streamCollector2(stream);
|
|
92
|
-
};
|
|
93
|
-
const blobToWebStream = (blob) => {
|
|
94
|
-
if (typeof blob.stream !== "function") {
|
|
95
|
-
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");
|
|
96
|
-
}
|
|
97
|
-
return blob.stream();
|
|
98
|
-
};
|
|
99
|
-
return Object.assign(stream, {
|
|
100
|
-
transformToByteArray,
|
|
101
|
-
transformToString: async (encoding) => {
|
|
102
|
-
const buf = await transformToByteArray();
|
|
103
|
-
if (encoding === "base64") {
|
|
104
|
-
return toBase64(buf);
|
|
105
|
-
} else if (encoding === "hex") {
|
|
106
|
-
return toHex(buf);
|
|
107
|
-
} else if (encoding === void 0 || encoding === "utf8" || encoding === "utf-8") {
|
|
108
|
-
return toUtf8(buf);
|
|
109
|
-
} else if (typeof TextDecoder === "function") {
|
|
110
|
-
return new TextDecoder(encoding).decode(buf);
|
|
111
|
-
} else {
|
|
112
|
-
throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
transformToWebStream: () => {
|
|
116
|
-
if (transformed) {
|
|
117
|
-
throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
|
|
118
|
-
}
|
|
119
|
-
transformed = true;
|
|
120
|
-
if (isBlobInstance(stream)) {
|
|
121
|
-
return blobToWebStream(stream);
|
|
122
|
-
} else if (isReadableStream(stream)) {
|
|
123
|
-
return stream;
|
|
124
|
-
} else {
|
|
125
|
-
throw new Error(`Cannot transform payload to web stream, got ${stream}`);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
|
|
131
|
-
|
|
132
|
-
// ../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js
|
|
133
|
-
var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2 = "The stream has already been transformed.";
|
|
134
|
-
var sdkStreamMixin2 = (stream) => {
|
|
135
|
-
var _a, _b;
|
|
136
|
-
if (!(stream instanceof Readable)) {
|
|
137
|
-
try {
|
|
138
|
-
return sdkStreamMixin(stream);
|
|
139
|
-
} catch (e) {
|
|
140
|
-
const name = ((_b = (_a = stream == null ? void 0 : stream.__proto__) == null ? void 0 : _a.constructor) == null ? void 0 : _b.name) || stream;
|
|
141
|
-
throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
let transformed = false;
|
|
145
|
-
const transformToByteArray = async () => {
|
|
146
|
-
if (transformed) {
|
|
147
|
-
throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
|
|
148
|
-
}
|
|
149
|
-
transformed = true;
|
|
150
|
-
return await streamCollector(stream);
|
|
151
|
-
};
|
|
152
|
-
return Object.assign(stream, {
|
|
153
|
-
transformToByteArray,
|
|
154
|
-
transformToString: async (encoding) => {
|
|
155
|
-
const buf = await transformToByteArray();
|
|
156
|
-
if (encoding === void 0 || Buffer.isEncoding(encoding)) {
|
|
157
|
-
return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
|
|
158
|
-
} else {
|
|
159
|
-
const decoder = new TextDecoder(encoding);
|
|
160
|
-
return decoder.decode(buf);
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
transformToWebStream: () => {
|
|
164
|
-
if (transformed) {
|
|
165
|
-
throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED2);
|
|
166
|
-
}
|
|
167
|
-
if (stream.readableFlowing !== null) {
|
|
168
|
-
throw new Error("The stream has been consumed by other callbacks.");
|
|
169
|
-
}
|
|
170
|
-
if (typeof Readable.toWeb !== "function") {
|
|
171
|
-
throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
|
|
172
|
-
}
|
|
173
|
-
transformed = true;
|
|
174
|
-
return Readable.toWeb(stream);
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export {
|
|
180
|
-
sdkStreamMixin2 as sdkStreamMixin
|
|
181
|
-
};
|
|
182
|
-
//# sourceMappingURL=chunk-2QOYO3GF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js","../../../node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js","../../../node_modules/@smithy/util-stream/dist-es/stream-type-check.js","../../../node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.browser.js"],"sourcesContent":["import { streamCollector } from \"@smithy/node-http-handler\";\nimport { fromArrayBuffer } from \"@smithy/util-buffer-from\";\nimport { Readable } from \"stream\";\nimport { sdkStreamMixin as sdkStreamMixinReadableStream } from \"./sdk-stream-mixin.browser\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!(stream instanceof Readable)) {\n try {\n return sdkStreamMixinReadableStream(stream);\n }\n catch (e) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return fromArrayBuffer(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please ensure a polyfill is available.\");\n }\n transformed = true;\n return Readable.toWeb(stream);\n },\n });\n};\n","import { fromBase64 } from \"@smithy/util-base64\";\nexport const streamCollector = async (stream) => {\n if ((typeof Blob === \"function\" && stream instanceof Blob) || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== undefined) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n};\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = fromBase64(base64);\n return new Uint8Array(arrayBuffer);\n}\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = (reader.result ?? \"\");\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n","export const isReadableStream = (stream) => typeof ReadableStream === \"function\" &&\n (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);\nexport const isBlob = (blob) => {\n return typeof Blob === \"function\" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);\n};\n","import { streamCollector } from \"@smithy/fetch-http-handler\";\nimport { toBase64 } from \"@smithy/util-base64\";\nimport { toHex } from \"@smithy/util-hex-encoding\";\nimport { toUtf8 } from \"@smithy/util-utf8\";\nimport { isReadableStream } from \"./stream-type-check\";\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nexport const sdkStreamMixin = (stream) => {\n if (!isBlobInstance(stream) && !isReadableStream(stream)) {\n const name = stream?.__proto__?.constructor?.name || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await streamCollector(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return toBase64(buf);\n }\n else if (encoding === \"hex\") {\n return toHex(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return toUtf8(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if (isReadableStream(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,gBAAgB;;;ACDlB,IAAMA,mBAAkB,OAAO,WAAW;AADjD;AAEI,MAAK,OAAO,SAAS,cAAc,kBAAkB,UAAS,YAAO,gBAAP,mBAAoB,UAAS,QAAQ;AAC/F,QAAI,KAAK,UAAU,gBAAgB,QAAW;AAC1C,aAAO,IAAI,WAAW,MAAM,OAAO,YAAY,CAAC;AAAA,IACpD;AACA,WAAO,YAAY,MAAM;AAAA,EAC7B;AACA,SAAO,cAAc,MAAM;AAC/B;AACA,eAAe,Y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ACJ,CAAC;AACL;","names":["streamCollector","streamCollector","ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED","sdkStreamMixin"]}
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
LazyJsonString,
|
|
3
|
-
NormalizedSchema,
|
|
4
|
-
NumericValue,
|
|
5
|
-
SerdeContext,
|
|
6
|
-
determineTimestampFormat
|
|
7
|
-
} from "./chunk-WCRLJFBW.js";
|
|
8
|
-
import {
|
|
9
|
-
fromBase64
|
|
10
|
-
} from "./chunk-U6RIOMF4.js";
|
|
11
|
-
import {
|
|
12
|
-
toUtf8
|
|
13
|
-
} from "./chunk-KJX5LOMN.js";
|
|
14
|
-
import {
|
|
15
|
-
__publicField
|
|
16
|
-
} from "./chunk-MIXAYX55.js";
|
|
17
|
-
|
|
18
|
-
// ../../node_modules/@aws-sdk/nested-clients/package.json
|
|
19
|
-
var package_default = {
|
|
20
|
-
name: "@aws-sdk/nested-clients",
|
|
21
|
-
version: "3.997.1",
|
|
22
|
-
description: "Nested clients for AWS SDK packages.",
|
|
23
|
-
main: "./dist-cjs/index.js",
|
|
24
|
-
module: "./dist-es/index.js",
|
|
25
|
-
types: "./dist-types/index.d.ts",
|
|
26
|
-
scripts: {
|
|
27
|
-
build: "yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
28
|
-
"build:cjs": "node ../../scripts/compilation/inline nested-clients",
|
|
29
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
30
|
-
"build:include:deps": 'yarn g:turbo run build -F="$npm_package_name"',
|
|
31
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
32
|
-
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
33
|
-
clean: "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
|
34
|
-
lint: "node ../../scripts/validation/submodules-linter.js --pkg nested-clients",
|
|
35
|
-
test: "yarn g:vitest run",
|
|
36
|
-
"test:watch": "yarn g:vitest watch"
|
|
37
|
-
},
|
|
38
|
-
engines: {
|
|
39
|
-
node: ">=20.0.0"
|
|
40
|
-
},
|
|
41
|
-
sideEffects: false,
|
|
42
|
-
author: {
|
|
43
|
-
name: "AWS SDK for JavaScript Team",
|
|
44
|
-
url: "https://aws.amazon.com/javascript/"
|
|
45
|
-
},
|
|
46
|
-
license: "Apache-2.0",
|
|
47
|
-
dependencies: {
|
|
48
|
-
"@aws-crypto/sha256-browser": "5.2.0",
|
|
49
|
-
"@aws-crypto/sha256-js": "5.2.0",
|
|
50
|
-
"@aws-sdk/core": "^3.974.3",
|
|
51
|
-
"@aws-sdk/middleware-host-header": "^3.972.10",
|
|
52
|
-
"@aws-sdk/middleware-logger": "^3.972.10",
|
|
53
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.11",
|
|
54
|
-
"@aws-sdk/middleware-user-agent": "^3.972.33",
|
|
55
|
-
"@aws-sdk/region-config-resolver": "^3.972.13",
|
|
56
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.20",
|
|
57
|
-
"@aws-sdk/types": "^3.973.8",
|
|
58
|
-
"@aws-sdk/util-endpoints": "^3.996.8",
|
|
59
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.10",
|
|
60
|
-
"@aws-sdk/util-user-agent-node": "^3.973.19",
|
|
61
|
-
"@smithy/config-resolver": "^4.4.17",
|
|
62
|
-
"@smithy/core": "^3.23.16",
|
|
63
|
-
"@smithy/fetch-http-handler": "^5.3.17",
|
|
64
|
-
"@smithy/hash-node": "^4.2.14",
|
|
65
|
-
"@smithy/invalid-dependency": "^4.2.14",
|
|
66
|
-
"@smithy/middleware-content-length": "^4.2.14",
|
|
67
|
-
"@smithy/middleware-endpoint": "^4.4.31",
|
|
68
|
-
"@smithy/middleware-retry": "^4.5.4",
|
|
69
|
-
"@smithy/middleware-serde": "^4.2.19",
|
|
70
|
-
"@smithy/middleware-stack": "^4.2.14",
|
|
71
|
-
"@smithy/node-config-provider": "^4.3.14",
|
|
72
|
-
"@smithy/node-http-handler": "^4.6.0",
|
|
73
|
-
"@smithy/protocol-http": "^5.3.14",
|
|
74
|
-
"@smithy/smithy-client": "^4.12.12",
|
|
75
|
-
"@smithy/types": "^4.14.1",
|
|
76
|
-
"@smithy/url-parser": "^4.2.14",
|
|
77
|
-
"@smithy/util-base64": "^4.3.2",
|
|
78
|
-
"@smithy/util-body-length-browser": "^4.2.2",
|
|
79
|
-
"@smithy/util-body-length-node": "^4.2.3",
|
|
80
|
-
"@smithy/util-defaults-mode-browser": "^4.3.48",
|
|
81
|
-
"@smithy/util-defaults-mode-node": "^4.2.53",
|
|
82
|
-
"@smithy/util-endpoints": "^3.4.2",
|
|
83
|
-
"@smithy/util-middleware": "^4.2.14",
|
|
84
|
-
"@smithy/util-retry": "^4.3.3",
|
|
85
|
-
"@smithy/util-utf8": "^4.2.2",
|
|
86
|
-
tslib: "^2.6.2"
|
|
87
|
-
},
|
|
88
|
-
devDependencies: {
|
|
89
|
-
concurrently: "7.0.0",
|
|
90
|
-
"downlevel-dts": "0.10.1",
|
|
91
|
-
premove: "4.0.0",
|
|
92
|
-
typescript: "~5.8.3"
|
|
93
|
-
},
|
|
94
|
-
typesVersions: {
|
|
95
|
-
"<4.5": {
|
|
96
|
-
"dist-types/*": [
|
|
97
|
-
"dist-types/ts3.4/*"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
files: [
|
|
102
|
-
"./cognito-identity.d.ts",
|
|
103
|
-
"./cognito-identity.js",
|
|
104
|
-
"./signin.d.ts",
|
|
105
|
-
"./signin.js",
|
|
106
|
-
"./sso-oidc.d.ts",
|
|
107
|
-
"./sso-oidc.js",
|
|
108
|
-
"./sso.d.ts",
|
|
109
|
-
"./sso.js",
|
|
110
|
-
"./sts.d.ts",
|
|
111
|
-
"./sts.js",
|
|
112
|
-
"dist-*/**"
|
|
113
|
-
],
|
|
114
|
-
browser: {
|
|
115
|
-
"./dist-es/submodules/cognito-identity/runtimeConfig": "./dist-es/submodules/cognito-identity/runtimeConfig.browser",
|
|
116
|
-
"./dist-es/submodules/signin/runtimeConfig": "./dist-es/submodules/signin/runtimeConfig.browser",
|
|
117
|
-
"./dist-es/submodules/sso-oidc/runtimeConfig": "./dist-es/submodules/sso-oidc/runtimeConfig.browser",
|
|
118
|
-
"./dist-es/submodules/sso/runtimeConfig": "./dist-es/submodules/sso/runtimeConfig.browser",
|
|
119
|
-
"./dist-es/submodules/sts/runtimeConfig": "./dist-es/submodules/sts/runtimeConfig.browser"
|
|
120
|
-
},
|
|
121
|
-
"react-native": {},
|
|
122
|
-
homepage: "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",
|
|
123
|
-
repository: {
|
|
124
|
-
type: "git",
|
|
125
|
-
url: "https://github.com/aws/aws-sdk-js-v3.git",
|
|
126
|
-
directory: "packages/nested-clients"
|
|
127
|
-
},
|
|
128
|
-
exports: {
|
|
129
|
-
"./package.json": "./package.json",
|
|
130
|
-
"./sso-oidc": {
|
|
131
|
-
types: "./dist-types/submodules/sso-oidc/index.d.ts",
|
|
132
|
-
module: "./dist-es/submodules/sso-oidc/index.js",
|
|
133
|
-
node: "./dist-cjs/submodules/sso-oidc/index.js",
|
|
134
|
-
import: "./dist-es/submodules/sso-oidc/index.js",
|
|
135
|
-
require: "./dist-cjs/submodules/sso-oidc/index.js"
|
|
136
|
-
},
|
|
137
|
-
"./sts": {
|
|
138
|
-
types: "./dist-types/submodules/sts/index.d.ts",
|
|
139
|
-
module: "./dist-es/submodules/sts/index.js",
|
|
140
|
-
node: "./dist-cjs/submodules/sts/index.js",
|
|
141
|
-
import: "./dist-es/submodules/sts/index.js",
|
|
142
|
-
require: "./dist-cjs/submodules/sts/index.js"
|
|
143
|
-
},
|
|
144
|
-
"./signin": {
|
|
145
|
-
types: "./dist-types/submodules/signin/index.d.ts",
|
|
146
|
-
module: "./dist-es/submodules/signin/index.js",
|
|
147
|
-
node: "./dist-cjs/submodules/signin/index.js",
|
|
148
|
-
import: "./dist-es/submodules/signin/index.js",
|
|
149
|
-
require: "./dist-cjs/submodules/signin/index.js"
|
|
150
|
-
},
|
|
151
|
-
"./cognito-identity": {
|
|
152
|
-
types: "./dist-types/submodules/cognito-identity/index.d.ts",
|
|
153
|
-
module: "./dist-es/submodules/cognito-identity/index.js",
|
|
154
|
-
node: "./dist-cjs/submodules/cognito-identity/index.js",
|
|
155
|
-
import: "./dist-es/submodules/cognito-identity/index.js",
|
|
156
|
-
require: "./dist-cjs/submodules/cognito-identity/index.js"
|
|
157
|
-
},
|
|
158
|
-
"./sso": {
|
|
159
|
-
types: "./dist-types/submodules/sso/index.d.ts",
|
|
160
|
-
module: "./dist-es/submodules/sso/index.js",
|
|
161
|
-
node: "./dist-cjs/submodules/sso/index.js",
|
|
162
|
-
import: "./dist-es/submodules/sso/index.js",
|
|
163
|
-
require: "./dist-cjs/submodules/sso/index.js"
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
// ../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js
|
|
169
|
-
function extendedEncodeURIComponent(str) {
|
|
170
|
-
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
|
|
171
|
-
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// ../../node_modules/@smithy/core/dist-es/submodules/serde/split-header.js
|
|
176
|
-
var splitHeader = (value) => {
|
|
177
|
-
const z = value.length;
|
|
178
|
-
const values = [];
|
|
179
|
-
let withinQuotes = false;
|
|
180
|
-
let prevChar = void 0;
|
|
181
|
-
let anchor = 0;
|
|
182
|
-
for (let i = 0; i < z; ++i) {
|
|
183
|
-
const char = value[i];
|
|
184
|
-
switch (char) {
|
|
185
|
-
case `"`:
|
|
186
|
-
if (prevChar !== "\\") {
|
|
187
|
-
withinQuotes = !withinQuotes;
|
|
188
|
-
}
|
|
189
|
-
break;
|
|
190
|
-
case ",":
|
|
191
|
-
if (!withinQuotes) {
|
|
192
|
-
values.push(value.slice(anchor, i));
|
|
193
|
-
anchor = i + 1;
|
|
194
|
-
}
|
|
195
|
-
break;
|
|
196
|
-
default:
|
|
197
|
-
}
|
|
198
|
-
prevChar = char;
|
|
199
|
-
}
|
|
200
|
-
values.push(value.slice(anchor));
|
|
201
|
-
return values.map((v) => {
|
|
202
|
-
v = v.trim();
|
|
203
|
-
const z2 = v.length;
|
|
204
|
-
if (z2 < 2) {
|
|
205
|
-
return v;
|
|
206
|
-
}
|
|
207
|
-
if (v[0] === `"` && v[z2 - 1] === `"`) {
|
|
208
|
-
v = v.slice(1, z2 - 1);
|
|
209
|
-
}
|
|
210
|
-
return v.replace(/\\"/g, '"');
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// ../../node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js
|
|
215
|
-
var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
|
|
216
|
-
var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
|
|
217
|
-
var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
|
|
218
|
-
var date = `(\\d?\\d)`;
|
|
219
|
-
var year = `(\\d{4})`;
|
|
220
|
-
var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
|
|
221
|
-
var IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
|
|
222
|
-
var RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
|
|
223
|
-
var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
|
|
224
|
-
var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
225
|
-
var _parseEpochTimestamp = (value) => {
|
|
226
|
-
if (value == null) {
|
|
227
|
-
return void 0;
|
|
228
|
-
}
|
|
229
|
-
let num = NaN;
|
|
230
|
-
if (typeof value === "number") {
|
|
231
|
-
num = value;
|
|
232
|
-
} else if (typeof value === "string") {
|
|
233
|
-
if (!/^-?\d*\.?\d+$/.test(value)) {
|
|
234
|
-
throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
|
|
235
|
-
}
|
|
236
|
-
num = Number.parseFloat(value);
|
|
237
|
-
} else if (typeof value === "object" && value.tag === 1) {
|
|
238
|
-
num = value.value;
|
|
239
|
-
}
|
|
240
|
-
if (isNaN(num) || Math.abs(num) === Infinity) {
|
|
241
|
-
throw new TypeError("Epoch timestamps must be valid finite numbers.");
|
|
242
|
-
}
|
|
243
|
-
return new Date(Math.round(num * 1e3));
|
|
244
|
-
};
|
|
245
|
-
var _parseRfc3339DateTimeWithOffset = (value) => {
|
|
246
|
-
if (value == null) {
|
|
247
|
-
return void 0;
|
|
248
|
-
}
|
|
249
|
-
if (typeof value !== "string") {
|
|
250
|
-
throw new TypeError("RFC3339 timestamps must be strings");
|
|
251
|
-
}
|
|
252
|
-
const matches = RFC3339_WITH_OFFSET.exec(value);
|
|
253
|
-
if (!matches) {
|
|
254
|
-
throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
|
|
255
|
-
}
|
|
256
|
-
const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
|
|
257
|
-
range(monthStr, 1, 12);
|
|
258
|
-
range(dayStr, 1, 31);
|
|
259
|
-
range(hours, 0, 23);
|
|
260
|
-
range(minutes, 0, 59);
|
|
261
|
-
range(seconds, 0, 60);
|
|
262
|
-
const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1e3) : 0));
|
|
263
|
-
date2.setUTCFullYear(Number(yearStr));
|
|
264
|
-
if (offsetStr.toUpperCase() != "Z") {
|
|
265
|
-
const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [void 0, "+", 0, 0];
|
|
266
|
-
const scalar = sign === "-" ? 1 : -1;
|
|
267
|
-
date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1e3 + Number(offsetM) * 60 * 1e3));
|
|
268
|
-
}
|
|
269
|
-
return date2;
|
|
270
|
-
};
|
|
271
|
-
var _parseRfc7231DateTime = (value) => {
|
|
272
|
-
if (value == null) {
|
|
273
|
-
return void 0;
|
|
274
|
-
}
|
|
275
|
-
if (typeof value !== "string") {
|
|
276
|
-
throw new TypeError("RFC7231 timestamps must be strings.");
|
|
277
|
-
}
|
|
278
|
-
let day;
|
|
279
|
-
let month;
|
|
280
|
-
let year2;
|
|
281
|
-
let hour;
|
|
282
|
-
let minute;
|
|
283
|
-
let second;
|
|
284
|
-
let fraction;
|
|
285
|
-
let matches;
|
|
286
|
-
if (matches = IMF_FIXDATE.exec(value)) {
|
|
287
|
-
[, day, month, year2, hour, minute, second, fraction] = matches;
|
|
288
|
-
} else if (matches = RFC_850_DATE.exec(value)) {
|
|
289
|
-
[, day, month, year2, hour, minute, second, fraction] = matches;
|
|
290
|
-
year2 = (Number(year2) + 1900).toString();
|
|
291
|
-
} else if (matches = ASC_TIME.exec(value)) {
|
|
292
|
-
[, month, day, hour, minute, second, fraction, year2] = matches;
|
|
293
|
-
}
|
|
294
|
-
if (year2 && second) {
|
|
295
|
-
const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1e3) : 0);
|
|
296
|
-
range(day, 1, 31);
|
|
297
|
-
range(hour, 0, 23);
|
|
298
|
-
range(minute, 0, 59);
|
|
299
|
-
range(second, 0, 60);
|
|
300
|
-
const date2 = new Date(timestamp);
|
|
301
|
-
date2.setUTCFullYear(Number(year2));
|
|
302
|
-
return date2;
|
|
303
|
-
}
|
|
304
|
-
throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
|
|
305
|
-
};
|
|
306
|
-
function range(v, min, max) {
|
|
307
|
-
const _v = Number(v);
|
|
308
|
-
if (_v < min || _v > max) {
|
|
309
|
-
throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// ../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
|
|
314
|
-
var FromStringShapeDeserializer = class extends SerdeContext {
|
|
315
|
-
constructor(settings) {
|
|
316
|
-
super();
|
|
317
|
-
__publicField(this, "settings");
|
|
318
|
-
this.settings = settings;
|
|
319
|
-
}
|
|
320
|
-
read(_schema, data) {
|
|
321
|
-
var _a, _b;
|
|
322
|
-
const ns = NormalizedSchema.of(_schema);
|
|
323
|
-
if (ns.isListSchema()) {
|
|
324
|
-
return splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
|
|
325
|
-
}
|
|
326
|
-
if (ns.isBlobSchema()) {
|
|
327
|
-
return ((_b = (_a = this.serdeContext) == null ? void 0 : _a.base64Decoder) != null ? _b : fromBase64)(data);
|
|
328
|
-
}
|
|
329
|
-
if (ns.isTimestampSchema()) {
|
|
330
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
331
|
-
switch (format) {
|
|
332
|
-
case 5:
|
|
333
|
-
return _parseRfc3339DateTimeWithOffset(data);
|
|
334
|
-
case 6:
|
|
335
|
-
return _parseRfc7231DateTime(data);
|
|
336
|
-
case 7:
|
|
337
|
-
return _parseEpochTimestamp(data);
|
|
338
|
-
default:
|
|
339
|
-
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
340
|
-
return new Date(data);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if (ns.isStringSchema()) {
|
|
344
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
345
|
-
let intermediateValue = data;
|
|
346
|
-
if (mediaType) {
|
|
347
|
-
if (ns.getMergedTraits().httpHeader) {
|
|
348
|
-
intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
349
|
-
}
|
|
350
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
351
|
-
if (isJson) {
|
|
352
|
-
intermediateValue = LazyJsonString.from(intermediateValue);
|
|
353
|
-
}
|
|
354
|
-
return intermediateValue;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
if (ns.isNumericSchema()) {
|
|
358
|
-
return Number(data);
|
|
359
|
-
}
|
|
360
|
-
if (ns.isBigIntegerSchema()) {
|
|
361
|
-
return BigInt(data);
|
|
362
|
-
}
|
|
363
|
-
if (ns.isBigDecimalSchema()) {
|
|
364
|
-
return new NumericValue(data, "bigDecimal");
|
|
365
|
-
}
|
|
366
|
-
if (ns.isBooleanSchema()) {
|
|
367
|
-
return String(data).toLowerCase() === "true";
|
|
368
|
-
}
|
|
369
|
-
return data;
|
|
370
|
-
}
|
|
371
|
-
base64ToUtf8(base64String) {
|
|
372
|
-
var _a, _b, _c, _d;
|
|
373
|
-
return ((_b = (_a = this.serdeContext) == null ? void 0 : _a.utf8Encoder) != null ? _b : toUtf8)(((_d = (_c = this.serdeContext) == null ? void 0 : _c.base64Decoder) != null ? _d : fromBase64)(base64String));
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
export {
|
|
378
|
-
extendedEncodeURIComponent,
|
|
379
|
-
splitHeader,
|
|
380
|
-
FromStringShapeDeserializer,
|
|
381
|
-
package_default
|
|
382
|
-
};
|
|
383
|
-
//# sourceMappingURL=chunk-4WSYM746.js.map
|