@alienplatform/sdk 1.11.1 → 1.12.0
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/.turbo/turbo-build.log +18 -44
- package/dist/bearerTokenAuthenticationPolicy.js +40 -40
- package/dist/{serde.js → checksum.js} +1103 -469
- package/dist/dist-cjs.js +15256 -1
- package/dist/dist.js +36 -23
- package/dist/es5.js +107 -11
- package/dist/esm.js +4803 -4946
- package/dist/esm2.js +298 -236
- package/dist/event-streams.js +571 -4
- package/dist/generated/artifact_registry.d.ts +14 -14
- package/dist/generated/artifact_registry.d.ts.map +1 -1
- package/dist/generated/build.d.ts +6 -6
- package/dist/generated/build.d.ts.map +1 -1
- package/dist/generated/container.d.ts +6 -6
- package/dist/generated/container.d.ts.map +1 -1
- package/dist/generated/control.d.ts +8 -8
- package/dist/generated/control.d.ts.map +1 -1
- package/dist/generated/kv.d.ts +10 -10
- package/dist/generated/kv.d.ts.map +1 -1
- package/dist/generated/queue.d.ts +6 -6
- package/dist/generated/queue.d.ts.map +1 -1
- package/dist/generated/service_account.d.ts +4 -4
- package/dist/generated/service_account.d.ts.map +1 -1
- package/dist/generated/storage.d.ts +28 -28
- package/dist/generated/storage.d.ts.map +1 -1
- package/dist/generated/vault.d.ts +6 -6
- package/dist/generated/vault.d.ts.map +1 -1
- package/dist/generated/wait_until.d.ts +8 -8
- package/dist/generated/wait_until.d.ts.map +1 -1
- package/dist/generated/worker.d.ts +4 -4
- package/dist/generated/worker.d.ts.map +1 -1
- package/dist/index.js +311 -278
- package/dist/open.js +2 -1
- package/dist/rolldown-runtime.js +9 -2
- package/dist/src.js +10240 -10043
- package/dist/src2.js +15 -13
- package/package.json +4 -4
- package/src/generated/artifact_registry.ts +125 -35
- package/src/generated/build.ts +67 -19
- package/src/generated/container.ts +28 -10
- package/src/generated/control.ts +130 -34
- package/src/generated/google/protobuf/duration.ts +1 -1
- package/src/generated/google/protobuf/timestamp.ts +1 -1
- package/src/generated/kv.ts +53 -21
- package/src/generated/queue.ts +37 -13
- package/src/generated/service_account.ts +64 -16
- package/src/generated/storage.ts +189 -61
- package/src/generated/vault.ts +37 -13
- package/src/generated/wait_until.ts +68 -20
- package/src/generated/worker.ts +29 -11
- package/dist/client.js +0 -2376
- package/dist/dist-cjs2.js +0 -718
- package/dist/dist-cjs3.js +0 -2486
- package/dist/dist-cjs4.js +0 -171
- package/dist/dist-cjs5.js +0 -429
- package/dist/dist-cjs6.js +0 -60
- package/dist/dist-cjs7.js +0 -978
- package/dist/dist-cjs8.js +0 -86
- package/dist/dist-cjs9.js +0 -319
- package/dist/package.js +0 -4
- package/dist/protocols.js +0 -954
- package/dist/protocols2.js +0 -5565
- package/dist/signin.js +0 -723
- package/dist/sso-oidc.js +0 -940
- package/dist/sts.js +0 -1329
- package/dist/tslib.es6.js +0 -543
package/dist/event-streams.js
CHANGED
|
@@ -1,6 +1,564 @@
|
|
|
1
1
|
import { n as __esmMin } from "./rolldown-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { Pt as fromUtf8, a as Crc32Node, at as fromHex, jt as toUtf8, l as init_serde, n as init_checksum, st as toHex } from "./checksum.js";
|
|
3
|
+
import { Readable } from "node:stream";
|
|
4
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js
|
|
5
|
+
function negate(bytes) {
|
|
6
|
+
for (let i = 0; i < 8; i++) bytes[i] ^= 255;
|
|
7
|
+
for (let i = 7; i > -1; i--) {
|
|
8
|
+
bytes[i]++;
|
|
9
|
+
if (bytes[i] !== 0) break;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var Int64;
|
|
13
|
+
var init_Int64 = __esmMin((() => {
|
|
14
|
+
init_serde();
|
|
15
|
+
Int64 = class Int64 {
|
|
16
|
+
bytes;
|
|
17
|
+
constructor(bytes) {
|
|
18
|
+
this.bytes = bytes;
|
|
19
|
+
if (bytes.byteLength !== 8) throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
20
|
+
}
|
|
21
|
+
static fromNumber(number) {
|
|
22
|
+
if (number > 0x8000000000000000 || number < -0x8000000000000000) throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
23
|
+
const bytes = /* @__PURE__ */ new Uint8Array(8);
|
|
24
|
+
for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) bytes[i] = remaining;
|
|
25
|
+
if (number < 0) negate(bytes);
|
|
26
|
+
return new Int64(bytes);
|
|
27
|
+
}
|
|
28
|
+
valueOf() {
|
|
29
|
+
const bytes = this.bytes.slice(0);
|
|
30
|
+
const negative = bytes[0] & 128;
|
|
31
|
+
if (negative) negate(bytes);
|
|
32
|
+
return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
|
|
33
|
+
}
|
|
34
|
+
toString() {
|
|
35
|
+
return String(this.valueOf());
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}));
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js
|
|
41
|
+
var HeaderMarshaller, HEADER_VALUE_TYPE, BOOLEAN_TAG, BYTE_TAG, SHORT_TAG, INT_TAG, LONG_TAG, BINARY_TAG, STRING_TAG, TIMESTAMP_TAG, UUID_TAG, UUID_PATTERN;
|
|
42
|
+
var init_HeaderMarshaller = __esmMin((() => {
|
|
43
|
+
init_serde();
|
|
44
|
+
init_Int64();
|
|
45
|
+
HeaderMarshaller = class {
|
|
46
|
+
toUtf8;
|
|
47
|
+
fromUtf8;
|
|
48
|
+
constructor(toUtf8, fromUtf8) {
|
|
49
|
+
this.toUtf8 = toUtf8;
|
|
50
|
+
this.fromUtf8 = fromUtf8;
|
|
51
|
+
}
|
|
52
|
+
format(headers) {
|
|
53
|
+
const chunks = [];
|
|
54
|
+
for (const headerName of Object.keys(headers)) {
|
|
55
|
+
const bytes = this.fromUtf8(headerName);
|
|
56
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
57
|
+
}
|
|
58
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
59
|
+
let position = 0;
|
|
60
|
+
for (const chunk of chunks) {
|
|
61
|
+
out.set(chunk, position);
|
|
62
|
+
position += chunk.byteLength;
|
|
63
|
+
}
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
formatHeaderValue(header) {
|
|
67
|
+
switch (header.type) {
|
|
68
|
+
case "boolean": return Uint8Array.from([header.value ? 0 : 1]);
|
|
69
|
+
case "byte": return Uint8Array.from([2, header.value]);
|
|
70
|
+
case "short":
|
|
71
|
+
const shortView = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(3));
|
|
72
|
+
shortView.setUint8(0, 3);
|
|
73
|
+
shortView.setInt16(1, header.value, false);
|
|
74
|
+
return new Uint8Array(shortView.buffer);
|
|
75
|
+
case "integer":
|
|
76
|
+
const intView = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(5));
|
|
77
|
+
intView.setUint8(0, 4);
|
|
78
|
+
intView.setInt32(1, header.value, false);
|
|
79
|
+
return new Uint8Array(intView.buffer);
|
|
80
|
+
case "long":
|
|
81
|
+
const longBytes = /* @__PURE__ */ new Uint8Array(9);
|
|
82
|
+
longBytes[0] = 5;
|
|
83
|
+
longBytes.set(header.value.bytes, 1);
|
|
84
|
+
return longBytes;
|
|
85
|
+
case "binary":
|
|
86
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
87
|
+
binView.setUint8(0, 6);
|
|
88
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
89
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
90
|
+
binBytes.set(header.value, 3);
|
|
91
|
+
return binBytes;
|
|
92
|
+
case "string":
|
|
93
|
+
const utf8Bytes = this.fromUtf8(header.value);
|
|
94
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
95
|
+
strView.setUint8(0, 7);
|
|
96
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
97
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
98
|
+
strBytes.set(utf8Bytes, 3);
|
|
99
|
+
return strBytes;
|
|
100
|
+
case "timestamp":
|
|
101
|
+
const tsBytes = /* @__PURE__ */ new Uint8Array(9);
|
|
102
|
+
tsBytes[0] = 8;
|
|
103
|
+
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
104
|
+
return tsBytes;
|
|
105
|
+
case "uuid":
|
|
106
|
+
if (!UUID_PATTERN.test(header.value)) throw new Error(`Invalid UUID received: ${header.value}`);
|
|
107
|
+
const uuidBytes = /* @__PURE__ */ new Uint8Array(17);
|
|
108
|
+
uuidBytes[0] = 9;
|
|
109
|
+
uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
|
|
110
|
+
return uuidBytes;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
parse(headers) {
|
|
114
|
+
const out = {};
|
|
115
|
+
let position = 0;
|
|
116
|
+
while (position < headers.byteLength) {
|
|
117
|
+
const nameLength = headers.getUint8(position++);
|
|
118
|
+
const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
|
|
119
|
+
position += nameLength;
|
|
120
|
+
switch (headers.getUint8(position++)) {
|
|
121
|
+
case 0:
|
|
122
|
+
out[name] = {
|
|
123
|
+
type: BOOLEAN_TAG,
|
|
124
|
+
value: true
|
|
125
|
+
};
|
|
126
|
+
break;
|
|
127
|
+
case 1:
|
|
128
|
+
out[name] = {
|
|
129
|
+
type: BOOLEAN_TAG,
|
|
130
|
+
value: false
|
|
131
|
+
};
|
|
132
|
+
break;
|
|
133
|
+
case 2:
|
|
134
|
+
out[name] = {
|
|
135
|
+
type: BYTE_TAG,
|
|
136
|
+
value: headers.getInt8(position++)
|
|
137
|
+
};
|
|
138
|
+
break;
|
|
139
|
+
case 3:
|
|
140
|
+
out[name] = {
|
|
141
|
+
type: SHORT_TAG,
|
|
142
|
+
value: headers.getInt16(position, false)
|
|
143
|
+
};
|
|
144
|
+
position += 2;
|
|
145
|
+
break;
|
|
146
|
+
case 4:
|
|
147
|
+
out[name] = {
|
|
148
|
+
type: INT_TAG,
|
|
149
|
+
value: headers.getInt32(position, false)
|
|
150
|
+
};
|
|
151
|
+
position += 4;
|
|
152
|
+
break;
|
|
153
|
+
case 5:
|
|
154
|
+
out[name] = {
|
|
155
|
+
type: LONG_TAG,
|
|
156
|
+
value: new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
|
|
157
|
+
};
|
|
158
|
+
position += 8;
|
|
159
|
+
break;
|
|
160
|
+
case 6:
|
|
161
|
+
const binaryLength = headers.getUint16(position, false);
|
|
162
|
+
position += 2;
|
|
163
|
+
out[name] = {
|
|
164
|
+
type: BINARY_TAG,
|
|
165
|
+
value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)
|
|
166
|
+
};
|
|
167
|
+
position += binaryLength;
|
|
168
|
+
break;
|
|
169
|
+
case 7:
|
|
170
|
+
const stringLength = headers.getUint16(position, false);
|
|
171
|
+
position += 2;
|
|
172
|
+
out[name] = {
|
|
173
|
+
type: STRING_TAG,
|
|
174
|
+
value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))
|
|
175
|
+
};
|
|
176
|
+
position += stringLength;
|
|
177
|
+
break;
|
|
178
|
+
case 8:
|
|
179
|
+
out[name] = {
|
|
180
|
+
type: TIMESTAMP_TAG,
|
|
181
|
+
value: new Date(new Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
|
|
182
|
+
};
|
|
183
|
+
position += 8;
|
|
184
|
+
break;
|
|
185
|
+
case 9:
|
|
186
|
+
const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
|
|
187
|
+
position += 16;
|
|
188
|
+
out[name] = {
|
|
189
|
+
type: UUID_TAG,
|
|
190
|
+
value: `${toHex(uuidBytes.subarray(0, 4))}-${toHex(uuidBytes.subarray(4, 6))}-${toHex(uuidBytes.subarray(6, 8))}-${toHex(uuidBytes.subarray(8, 10))}-${toHex(uuidBytes.subarray(10))}`
|
|
191
|
+
};
|
|
192
|
+
break;
|
|
193
|
+
default: throw new Error(`Unrecognized header type tag`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return out;
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
(function(HEADER_VALUE_TYPE) {
|
|
200
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue";
|
|
201
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse";
|
|
202
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte";
|
|
203
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short";
|
|
204
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer";
|
|
205
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long";
|
|
206
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray";
|
|
207
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string";
|
|
208
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp";
|
|
209
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid";
|
|
210
|
+
})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
|
|
211
|
+
BOOLEAN_TAG = "boolean";
|
|
212
|
+
BYTE_TAG = "byte";
|
|
213
|
+
SHORT_TAG = "short";
|
|
214
|
+
INT_TAG = "integer";
|
|
215
|
+
LONG_TAG = "long";
|
|
216
|
+
BINARY_TAG = "binary";
|
|
217
|
+
STRING_TAG = "string";
|
|
218
|
+
TIMESTAMP_TAG = "timestamp";
|
|
219
|
+
UUID_TAG = "uuid";
|
|
220
|
+
UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
221
|
+
}));
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js
|
|
224
|
+
function splitMessage({ byteLength, byteOffset, buffer }) {
|
|
225
|
+
if (byteLength < MINIMUM_MESSAGE_LENGTH) throw new Error("Provided message too short to accommodate event stream message overhead");
|
|
226
|
+
const view = new DataView(buffer, byteOffset, byteLength);
|
|
227
|
+
const messageLength = view.getUint32(0, false);
|
|
228
|
+
if (byteLength !== messageLength) throw new Error("Reported message length does not match received message length");
|
|
229
|
+
const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
|
|
230
|
+
const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
|
|
231
|
+
const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
|
|
232
|
+
const checksummer = new Crc32Node();
|
|
233
|
+
checksummer.update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
|
|
234
|
+
if (expectedPreludeChecksum !== checksummer.digestSync()) throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digestSync()})`);
|
|
235
|
+
checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - 12));
|
|
236
|
+
if (expectedMessageChecksum !== checksummer.digestSync()) throw new Error(`The message checksum (${checksummer.digestSync()}) did not match the expected value of ${expectedMessageChecksum}`);
|
|
237
|
+
return {
|
|
238
|
+
headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
|
|
239
|
+
body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - 16)
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
var PRELUDE_MEMBER_LENGTH, PRELUDE_LENGTH, CHECKSUM_LENGTH, MINIMUM_MESSAGE_LENGTH;
|
|
243
|
+
var init_splitMessage = __esmMin((() => {
|
|
244
|
+
init_checksum();
|
|
245
|
+
PRELUDE_MEMBER_LENGTH = 4;
|
|
246
|
+
PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
|
|
247
|
+
CHECKSUM_LENGTH = 4;
|
|
248
|
+
MINIMUM_MESSAGE_LENGTH = 16;
|
|
249
|
+
}));
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js
|
|
252
|
+
var EventStreamCodec;
|
|
253
|
+
var init_EventStreamCodec = __esmMin((() => {
|
|
254
|
+
init_checksum();
|
|
255
|
+
init_HeaderMarshaller();
|
|
256
|
+
init_splitMessage();
|
|
257
|
+
EventStreamCodec = class {
|
|
258
|
+
headerMarshaller;
|
|
259
|
+
messageBuffer;
|
|
260
|
+
isEndOfStream;
|
|
261
|
+
constructor(toUtf8, fromUtf8) {
|
|
262
|
+
this.headerMarshaller = new HeaderMarshaller(toUtf8, fromUtf8);
|
|
263
|
+
this.messageBuffer = [];
|
|
264
|
+
this.isEndOfStream = false;
|
|
265
|
+
}
|
|
266
|
+
feed(message) {
|
|
267
|
+
this.messageBuffer.push(this.decode(message));
|
|
268
|
+
}
|
|
269
|
+
endOfStream() {
|
|
270
|
+
this.isEndOfStream = true;
|
|
271
|
+
}
|
|
272
|
+
getMessage() {
|
|
273
|
+
const message = this.messageBuffer.pop();
|
|
274
|
+
const isEndOfStream = this.isEndOfStream;
|
|
275
|
+
return {
|
|
276
|
+
getMessage() {
|
|
277
|
+
return message;
|
|
278
|
+
},
|
|
279
|
+
isEndOfStream() {
|
|
280
|
+
return isEndOfStream;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
getAvailableMessages() {
|
|
285
|
+
const messages = this.messageBuffer;
|
|
286
|
+
this.messageBuffer = [];
|
|
287
|
+
const isEndOfStream = this.isEndOfStream;
|
|
288
|
+
return {
|
|
289
|
+
getMessages() {
|
|
290
|
+
return messages;
|
|
291
|
+
},
|
|
292
|
+
isEndOfStream() {
|
|
293
|
+
return isEndOfStream;
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
encode({ headers: rawHeaders, body }) {
|
|
298
|
+
const headers = this.headerMarshaller.format(rawHeaders);
|
|
299
|
+
const length = headers.byteLength + body.byteLength + 16;
|
|
300
|
+
const out = new Uint8Array(length);
|
|
301
|
+
const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
|
|
302
|
+
const checksum = new Crc32Node();
|
|
303
|
+
view.setUint32(0, length, false);
|
|
304
|
+
view.setUint32(4, headers.byteLength, false);
|
|
305
|
+
checksum.update(out.subarray(0, 8));
|
|
306
|
+
view.setUint32(8, checksum.digestSync(), false);
|
|
307
|
+
out.set(headers, 12);
|
|
308
|
+
out.set(body, headers.byteLength + 12);
|
|
309
|
+
checksum.update(out.subarray(8, length - 4));
|
|
310
|
+
view.setUint32(length - 4, checksum.digestSync(), false);
|
|
311
|
+
return out;
|
|
312
|
+
}
|
|
313
|
+
decode(message) {
|
|
314
|
+
const { headers, body } = splitMessage(message);
|
|
315
|
+
return {
|
|
316
|
+
headers: this.headerMarshaller.parse(headers),
|
|
317
|
+
body
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
formatHeaders(rawHeaders) {
|
|
321
|
+
return this.headerMarshaller.format(rawHeaders);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
}));
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js
|
|
327
|
+
var MessageDecoderStream;
|
|
328
|
+
var init_MessageDecoderStream = __esmMin((() => {
|
|
329
|
+
MessageDecoderStream = class {
|
|
330
|
+
options;
|
|
331
|
+
constructor(options) {
|
|
332
|
+
this.options = options;
|
|
333
|
+
}
|
|
334
|
+
[Symbol.asyncIterator]() {
|
|
335
|
+
return this.asyncIterator();
|
|
336
|
+
}
|
|
337
|
+
async *asyncIterator() {
|
|
338
|
+
for await (const bytes of this.options.inputStream) yield this.options.decoder.decode(bytes);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}));
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js
|
|
344
|
+
var MessageEncoderStream;
|
|
345
|
+
var init_MessageEncoderStream = __esmMin((() => {
|
|
346
|
+
MessageEncoderStream = class {
|
|
347
|
+
options;
|
|
348
|
+
constructor(options) {
|
|
349
|
+
this.options = options;
|
|
350
|
+
}
|
|
351
|
+
[Symbol.asyncIterator]() {
|
|
352
|
+
return this.asyncIterator();
|
|
353
|
+
}
|
|
354
|
+
async *asyncIterator() {
|
|
355
|
+
for await (const msg of this.options.messageStream) yield this.options.encoder.encode(msg);
|
|
356
|
+
if (this.options.includeEndFrame) yield /* @__PURE__ */ new Uint8Array(0);
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
}));
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js
|
|
362
|
+
var SmithyMessageDecoderStream;
|
|
363
|
+
var init_SmithyMessageDecoderStream = __esmMin((() => {
|
|
364
|
+
SmithyMessageDecoderStream = class {
|
|
365
|
+
options;
|
|
366
|
+
constructor(options) {
|
|
367
|
+
this.options = options;
|
|
368
|
+
}
|
|
369
|
+
[Symbol.asyncIterator]() {
|
|
370
|
+
return this.asyncIterator();
|
|
371
|
+
}
|
|
372
|
+
async *asyncIterator() {
|
|
373
|
+
for await (const message of this.options.messageStream) {
|
|
374
|
+
const deserialized = await this.options.deserializer(message);
|
|
375
|
+
if (deserialized === void 0) continue;
|
|
376
|
+
yield deserialized;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
}));
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js
|
|
383
|
+
var SmithyMessageEncoderStream;
|
|
384
|
+
var init_SmithyMessageEncoderStream = __esmMin((() => {
|
|
385
|
+
SmithyMessageEncoderStream = class {
|
|
386
|
+
options;
|
|
387
|
+
constructor(options) {
|
|
388
|
+
this.options = options;
|
|
389
|
+
}
|
|
390
|
+
[Symbol.asyncIterator]() {
|
|
391
|
+
return this.asyncIterator();
|
|
392
|
+
}
|
|
393
|
+
async *asyncIterator() {
|
|
394
|
+
for await (const chunk of this.options.inputStream) yield this.options.serializer(chunk);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
}));
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js
|
|
400
|
+
function getChunkedStream(source) {
|
|
401
|
+
let currentMessageTotalLength = 0;
|
|
402
|
+
let currentMessagePendingLength = 0;
|
|
403
|
+
let currentMessage = null;
|
|
404
|
+
let messageLengthBuffer = null;
|
|
405
|
+
const allocateMessage = (size) => {
|
|
406
|
+
if (typeof size !== "number") throw new Error("Attempted to allocate an event message where size was not a number: " + size);
|
|
407
|
+
currentMessageTotalLength = size;
|
|
408
|
+
currentMessagePendingLength = 4;
|
|
409
|
+
currentMessage = new Uint8Array(size);
|
|
410
|
+
new DataView(currentMessage.buffer).setUint32(0, size, false);
|
|
411
|
+
};
|
|
412
|
+
const iterator = async function* () {
|
|
413
|
+
const sourceIterator = source[Symbol.asyncIterator]();
|
|
414
|
+
while (true) {
|
|
415
|
+
const { value, done } = await sourceIterator.next();
|
|
416
|
+
if (done) {
|
|
417
|
+
if (!currentMessageTotalLength) return;
|
|
418
|
+
else if (currentMessageTotalLength === currentMessagePendingLength) yield currentMessage;
|
|
419
|
+
else throw new Error("Truncated event message received.");
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
422
|
+
const chunkLength = value.length;
|
|
423
|
+
let currentOffset = 0;
|
|
424
|
+
while (currentOffset < chunkLength) {
|
|
425
|
+
if (!currentMessage) {
|
|
426
|
+
const bytesRemaining = chunkLength - currentOffset;
|
|
427
|
+
if (!messageLengthBuffer) messageLengthBuffer = /* @__PURE__ */ new Uint8Array(4);
|
|
428
|
+
const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);
|
|
429
|
+
messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);
|
|
430
|
+
currentMessagePendingLength += numBytesForTotal;
|
|
431
|
+
currentOffset += numBytesForTotal;
|
|
432
|
+
if (currentMessagePendingLength < 4) break;
|
|
433
|
+
allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));
|
|
434
|
+
messageLengthBuffer = null;
|
|
435
|
+
}
|
|
436
|
+
const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);
|
|
437
|
+
currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);
|
|
438
|
+
currentMessagePendingLength += numBytesToWrite;
|
|
439
|
+
currentOffset += numBytesToWrite;
|
|
440
|
+
if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {
|
|
441
|
+
yield currentMessage;
|
|
442
|
+
currentMessage = null;
|
|
443
|
+
currentMessageTotalLength = 0;
|
|
444
|
+
currentMessagePendingLength = 0;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
return { [Symbol.asyncIterator]: iterator };
|
|
450
|
+
}
|
|
451
|
+
var init_getChunkedStream = __esmMin((() => {}));
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js
|
|
454
|
+
function getMessageUnmarshaller(deserializer, toUtf8) {
|
|
455
|
+
return async function(message) {
|
|
456
|
+
const { value: messageType } = message.headers[":message-type"];
|
|
457
|
+
if (messageType === "error") {
|
|
458
|
+
const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError");
|
|
459
|
+
unmodeledError.name = message.headers[":error-code"].value;
|
|
460
|
+
throw unmodeledError;
|
|
461
|
+
} else if (messageType === "exception") {
|
|
462
|
+
const code = message.headers[":exception-type"].value;
|
|
463
|
+
const deserializedException = await deserializer({ [code]: message });
|
|
464
|
+
if (deserializedException.$unknown) {
|
|
465
|
+
const error = new Error(toUtf8(message.body));
|
|
466
|
+
error.name = code;
|
|
467
|
+
throw error;
|
|
468
|
+
}
|
|
469
|
+
throw deserializedException[code];
|
|
470
|
+
} else if (messageType === "event") {
|
|
471
|
+
const deserialized = await deserializer({ [message.headers[":event-type"].value]: message });
|
|
472
|
+
if (deserialized.$unknown) return;
|
|
473
|
+
return deserialized;
|
|
474
|
+
} else throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`);
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
var init_getUnmarshalledStream = __esmMin((() => {}));
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js
|
|
480
|
+
var EventStreamMarshaller$1;
|
|
481
|
+
var init_EventStreamMarshaller$1 = __esmMin((() => {
|
|
482
|
+
init_EventStreamCodec();
|
|
483
|
+
init_MessageDecoderStream();
|
|
484
|
+
init_MessageEncoderStream();
|
|
485
|
+
init_SmithyMessageDecoderStream();
|
|
486
|
+
init_SmithyMessageEncoderStream();
|
|
487
|
+
init_getChunkedStream();
|
|
488
|
+
init_getUnmarshalledStream();
|
|
489
|
+
EventStreamMarshaller$1 = class {
|
|
490
|
+
eventStreamCodec;
|
|
491
|
+
utfEncoder;
|
|
492
|
+
constructor({ utf8Encoder, utf8Decoder }) {
|
|
493
|
+
this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);
|
|
494
|
+
this.utfEncoder = utf8Encoder;
|
|
495
|
+
}
|
|
496
|
+
deserialize(body, deserializer) {
|
|
497
|
+
return new SmithyMessageDecoderStream({
|
|
498
|
+
messageStream: new MessageDecoderStream({
|
|
499
|
+
inputStream: getChunkedStream(body),
|
|
500
|
+
decoder: this.eventStreamCodec
|
|
501
|
+
}),
|
|
502
|
+
deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder)
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
serialize(inputStream, serializer) {
|
|
506
|
+
return new MessageEncoderStream({
|
|
507
|
+
messageStream: new SmithyMessageEncoderStream({
|
|
508
|
+
inputStream,
|
|
509
|
+
serializer
|
|
510
|
+
}),
|
|
511
|
+
encoder: this.eventStreamCodec,
|
|
512
|
+
includeEndFrame: true
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
}));
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
|
|
519
|
+
async function* readableToIterable(readStream) {
|
|
520
|
+
let streamEnded = false;
|
|
521
|
+
let generationEnded = false;
|
|
522
|
+
const records = new Array();
|
|
523
|
+
readStream.on("error", (err) => {
|
|
524
|
+
if (!streamEnded) streamEnded = true;
|
|
525
|
+
if (err) throw err;
|
|
526
|
+
});
|
|
527
|
+
readStream.on("data", (data) => {
|
|
528
|
+
records.push(data);
|
|
529
|
+
});
|
|
530
|
+
readStream.on("end", () => {
|
|
531
|
+
streamEnded = true;
|
|
532
|
+
});
|
|
533
|
+
while (!generationEnded) {
|
|
534
|
+
const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));
|
|
535
|
+
if (value) yield value;
|
|
536
|
+
generationEnded = streamEnded && records.length === 0;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
var EventStreamMarshaller, eventStreamSerdeProvider;
|
|
540
|
+
var init_EventStreamMarshaller = __esmMin((() => {
|
|
541
|
+
init_EventStreamMarshaller$1();
|
|
542
|
+
EventStreamMarshaller = class {
|
|
543
|
+
universalMarshaller;
|
|
544
|
+
constructor({ utf8Encoder, utf8Decoder }) {
|
|
545
|
+
this.universalMarshaller = new EventStreamMarshaller$1({
|
|
546
|
+
utf8Decoder,
|
|
547
|
+
utf8Encoder
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
deserialize(body, deserializer) {
|
|
551
|
+
const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readableToIterable(body);
|
|
552
|
+
return this.universalMarshaller.deserialize(bodyIterable, deserializer);
|
|
553
|
+
}
|
|
554
|
+
serialize(input, serializer) {
|
|
555
|
+
return Readable.from(this.universalMarshaller.serialize(input, serializer));
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);
|
|
559
|
+
}));
|
|
560
|
+
//#endregion
|
|
561
|
+
//#region ../../node_modules/.pnpm/@smithy+core@3.29.1/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js
|
|
4
562
|
var EventStreamSerde;
|
|
5
563
|
var init_EventStreamSerde = __esmMin((() => {
|
|
6
564
|
init_serde();
|
|
@@ -186,7 +744,7 @@ var init_EventStreamSerde = __esmMin((() => {
|
|
|
186
744
|
} else if (eventSchema.isUnitSchema()) serializer.write(eventSchema, {});
|
|
187
745
|
else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");
|
|
188
746
|
}
|
|
189
|
-
const messageSerialization = serializer.flush() ?? new Uint8Array();
|
|
747
|
+
const messageSerialization = serializer.flush() ?? /* @__PURE__ */ new Uint8Array();
|
|
190
748
|
return {
|
|
191
749
|
body: typeof messageSerialization === "string" ? (this.serdeContext?.utf8Decoder ?? fromUtf8)(messageSerialization) : messageSerialization,
|
|
192
750
|
eventType,
|
|
@@ -198,6 +756,15 @@ var init_EventStreamSerde = __esmMin((() => {
|
|
|
198
756
|
}));
|
|
199
757
|
//#endregion
|
|
200
758
|
__esmMin((() => {
|
|
759
|
+
init_EventStreamCodec();
|
|
760
|
+
init_HeaderMarshaller();
|
|
761
|
+
init_Int64();
|
|
762
|
+
init_MessageDecoderStream();
|
|
763
|
+
init_MessageEncoderStream();
|
|
764
|
+
init_SmithyMessageDecoderStream();
|
|
765
|
+
init_SmithyMessageEncoderStream();
|
|
766
|
+
init_EventStreamMarshaller();
|
|
767
|
+
init_EventStreamMarshaller$1();
|
|
201
768
|
init_EventStreamSerde();
|
|
202
769
|
}))();
|
|
203
|
-
export { EventStreamSerde };
|
|
770
|
+
export { EventStreamSerde, eventStreamSerdeProvider };
|
|
@@ -192,63 +192,63 @@ export declare const ArtifactRegistryServiceDefinition: {
|
|
|
192
192
|
/** Create a repository within the artifact registry */
|
|
193
193
|
readonly createRepository: {
|
|
194
194
|
readonly name: "CreateRepository";
|
|
195
|
-
readonly requestType:
|
|
195
|
+
readonly requestType: typeof CreateRepositoryRequest;
|
|
196
196
|
readonly requestStream: false;
|
|
197
|
-
readonly responseType:
|
|
197
|
+
readonly responseType: typeof CreateRepositoryResponse;
|
|
198
198
|
readonly responseStream: false;
|
|
199
199
|
readonly options: {};
|
|
200
200
|
};
|
|
201
201
|
/** Get repository details including name, URI, and creation time */
|
|
202
202
|
readonly getRepository: {
|
|
203
203
|
readonly name: "GetRepository";
|
|
204
|
-
readonly requestType:
|
|
204
|
+
readonly requestType: typeof GetRepositoryRequest;
|
|
205
205
|
readonly requestStream: false;
|
|
206
|
-
readonly responseType:
|
|
206
|
+
readonly responseType: typeof GetRepositoryResponse;
|
|
207
207
|
readonly responseStream: false;
|
|
208
208
|
readonly options: {};
|
|
209
209
|
};
|
|
210
210
|
/** Add cross-account access permissions for a repository */
|
|
211
211
|
readonly addCrossAccountAccess: {
|
|
212
212
|
readonly name: "AddCrossAccountAccess";
|
|
213
|
-
readonly requestType:
|
|
213
|
+
readonly requestType: typeof AddCrossAccountAccessRequest;
|
|
214
214
|
readonly requestStream: false;
|
|
215
|
-
readonly responseType:
|
|
215
|
+
readonly responseType: typeof AddCrossAccountAccessResponse;
|
|
216
216
|
readonly responseStream: false;
|
|
217
217
|
readonly options: {};
|
|
218
218
|
};
|
|
219
219
|
/** Remove cross-account access permissions for a repository */
|
|
220
220
|
readonly removeCrossAccountAccess: {
|
|
221
221
|
readonly name: "RemoveCrossAccountAccess";
|
|
222
|
-
readonly requestType:
|
|
222
|
+
readonly requestType: typeof RemoveCrossAccountAccessRequest;
|
|
223
223
|
readonly requestStream: false;
|
|
224
|
-
readonly responseType:
|
|
224
|
+
readonly responseType: typeof RemoveCrossAccountAccessResponse;
|
|
225
225
|
readonly responseStream: false;
|
|
226
226
|
readonly options: {};
|
|
227
227
|
};
|
|
228
228
|
/** Get the current cross-account access permissions for a repository */
|
|
229
229
|
readonly getCrossAccountAccess: {
|
|
230
230
|
readonly name: "GetCrossAccountAccess";
|
|
231
|
-
readonly requestType:
|
|
231
|
+
readonly requestType: typeof GetCrossAccountAccessRequest;
|
|
232
232
|
readonly requestStream: false;
|
|
233
|
-
readonly responseType:
|
|
233
|
+
readonly responseType: typeof GetCrossAccountAccessResponse;
|
|
234
234
|
readonly responseStream: false;
|
|
235
235
|
readonly options: {};
|
|
236
236
|
};
|
|
237
237
|
/** Generate credentials for accessing a repository */
|
|
238
238
|
readonly generateCredentials: {
|
|
239
239
|
readonly name: "GenerateCredentials";
|
|
240
|
-
readonly requestType:
|
|
240
|
+
readonly requestType: typeof GenerateCredentialsRequest;
|
|
241
241
|
readonly requestStream: false;
|
|
242
|
-
readonly responseType:
|
|
242
|
+
readonly responseType: typeof GenerateCredentialsResponse;
|
|
243
243
|
readonly responseStream: false;
|
|
244
244
|
readonly options: {};
|
|
245
245
|
};
|
|
246
246
|
/** Delete a repository and all contained images */
|
|
247
247
|
readonly deleteRepository: {
|
|
248
248
|
readonly name: "DeleteRepository";
|
|
249
|
-
readonly requestType:
|
|
249
|
+
readonly requestType: typeof DeleteRepositoryRequest;
|
|
250
250
|
readonly requestStream: false;
|
|
251
|
-
readonly responseType:
|
|
251
|
+
readonly responseType: typeof DeleteRepositoryResponse;
|
|
252
252
|
readonly responseStream: false;
|
|
253
253
|
readonly options: {};
|
|
254
254
|
};
|