@arcforges/api-client 1.0.0-ci.101.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.
@@ -0,0 +1,327 @@
1
+ export function isPackageInventory(value) { return check0(value); }
2
+ /** The schema's declared UTF-8 document bound in bytes. */
3
+ export const packageInventoryJsonMaxBytes = 4194304;
4
+ /** Parses one strict PackageInventory document; refusal kinds match the C# codec. */
5
+ export function tryParsePackageInventoryJson(input) {
6
+ const parsed = strictJson(input, 4194304);
7
+ if (!parsed.ok)
8
+ return parsed;
9
+ return isPackageInventory(parsed.value) ? { ok: true, value: parsed.value } : { ok: false, failure: "invalid" };
10
+ }
11
+ /** Parses one strict PackageInventory document or throws an error carrying the refusal kind. */
12
+ export function parsePackageInventoryJson(input) {
13
+ const result = tryParsePackageInventoryJson(input);
14
+ if (!result.ok)
15
+ throw Object.assign(new Error(`PackageInventory JSON refused: ${result.failure}.`), { failure: result.failure });
16
+ return result.value;
17
+ }
18
+ /** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
19
+ export function serializePackageInventoryJson(value) {
20
+ const bytes = new TextEncoder().encode(JSON.stringify(orderPackageInventory(value)));
21
+ const result = tryParsePackageInventoryJson(bytes);
22
+ if (!result.ok)
23
+ throw Object.assign(new Error(`PackageInventory JSON refused: ${result.failure}.`), { failure: result.failure });
24
+ return bytes;
25
+ }
26
+ function orderInventoryFile(value) {
27
+ const out = {};
28
+ out["path"] = value["path"];
29
+ out["size"] = value["size"];
30
+ out["sha256"] = value["sha256"];
31
+ return out;
32
+ }
33
+ function orderPackageInventory(value) {
34
+ const out = {};
35
+ out["schemaVersion"] = value["schemaVersion"];
36
+ out["files"] = value["files"].map(item => orderInventoryFile(item));
37
+ return out;
38
+ }
39
+ function check0(value) {
40
+ if (typeof value !== 'object' || value === null || Array.isArray(value))
41
+ return false;
42
+ const object = value;
43
+ for (const key of Object.keys(object)) {
44
+ switch (key) {
45
+ case "schemaVersion":
46
+ if (!check1(object[key]))
47
+ return false;
48
+ break;
49
+ case "files":
50
+ if (!check2(object[key]))
51
+ return false;
52
+ break;
53
+ default: return false;
54
+ }
55
+ }
56
+ if (!Object.prototype.hasOwnProperty.call(object, "schemaVersion"))
57
+ return false;
58
+ if (!Object.prototype.hasOwnProperty.call(object, "files"))
59
+ return false;
60
+ if (!inventoryRules(value))
61
+ return false;
62
+ if (!inventoryRules(value))
63
+ return false;
64
+ return true;
65
+ }
66
+ function check1(value) {
67
+ if (typeof value !== 'string' || !validText(value))
68
+ return false;
69
+ if (value !== "inventory.v1")
70
+ return false;
71
+ return true;
72
+ }
73
+ function check2(value) {
74
+ if (!Array.isArray(value))
75
+ return false;
76
+ if (value.length < 1)
77
+ return false;
78
+ if (value.length > 10000)
79
+ return false;
80
+ if (!value.every(item => check3(item)))
81
+ return false;
82
+ return true;
83
+ }
84
+ function check3(value) {
85
+ if (typeof value !== 'object' || value === null || Array.isArray(value))
86
+ return false;
87
+ const object = value;
88
+ for (const key of Object.keys(object)) {
89
+ switch (key) {
90
+ case "path":
91
+ if (!check4(object[key]))
92
+ return false;
93
+ break;
94
+ case "size":
95
+ if (!check5(object[key]))
96
+ return false;
97
+ break;
98
+ case "sha256":
99
+ if (!check6(object[key]))
100
+ return false;
101
+ break;
102
+ default: return false;
103
+ }
104
+ }
105
+ if (!Object.prototype.hasOwnProperty.call(object, "path"))
106
+ return false;
107
+ if (!Object.prototype.hasOwnProperty.call(object, "size"))
108
+ return false;
109
+ if (!Object.prototype.hasOwnProperty.call(object, "sha256"))
110
+ return false;
111
+ return true;
112
+ }
113
+ function check4(value) {
114
+ if (typeof value !== 'string' || !validText(value))
115
+ return false;
116
+ if ((new RegExp("^[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+)*$", 'u')).exec(value)?.[0] !== value)
117
+ return false;
118
+ return true;
119
+ }
120
+ function check5(value) {
121
+ if (typeof value !== 'string' || !validText(value))
122
+ return false;
123
+ if ([...value].length > 20)
124
+ return false;
125
+ if ((new RegExp("^(0|[1-9][0-9]*)$", 'u')).exec(value)?.[0] !== value)
126
+ return false;
127
+ if (BigInt(value) > 18446744073709551615n)
128
+ return false;
129
+ return true;
130
+ }
131
+ function check6(value) {
132
+ if (typeof value !== 'string' || !validText(value))
133
+ return false;
134
+ if ((new RegExp("^[0-9a-f]{64}$", 'u')).exec(value)?.[0] !== value)
135
+ return false;
136
+ return true;
137
+ }
138
+ /** Strict UTF-8 JSON: no BOM, comments, trailing commas or duplicate properties; depth <= 32; integer lexemes only. */
139
+ function strictJson(input, maxBytes) {
140
+ let text;
141
+ if (typeof input === "string") {
142
+ if (!validText(input))
143
+ return { ok: false, failure: "malformed" };
144
+ if (new TextEncoder().encode(input).byteLength > maxBytes)
145
+ return { ok: false, failure: "tooLarge" };
146
+ text = input;
147
+ }
148
+ else {
149
+ if (input.byteLength > maxBytes)
150
+ return { ok: false, failure: "tooLarge" };
151
+ try {
152
+ text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(input);
153
+ }
154
+ catch {
155
+ return { ok: false, failure: "malformed" };
156
+ }
157
+ }
158
+ try {
159
+ return { ok: true, value: new StrictJsonReader(text).document() };
160
+ }
161
+ catch {
162
+ return { ok: false, failure: "malformed" };
163
+ }
164
+ }
165
+ class StrictJsonReader {
166
+ text;
167
+ index = 0;
168
+ constructor(text) {
169
+ this.text = text;
170
+ }
171
+ document() {
172
+ this.space();
173
+ const value = this.value(0);
174
+ this.space();
175
+ if (this.index !== this.text.length)
176
+ throw new SyntaxError("Trailing JSON content");
177
+ return value;
178
+ }
179
+ value(depth) {
180
+ switch (this.text[this.index]) {
181
+ case "{": return this.object(depth + 1);
182
+ case "[": return this.array(depth + 1);
183
+ case '"': return this.string();
184
+ case "t": return this.literal("true", true);
185
+ case "f": return this.literal("false", false);
186
+ case "n": return this.literal("null", null);
187
+ default: return this.number();
188
+ }
189
+ }
190
+ object(depth) {
191
+ if (depth > 32)
192
+ throw new SyntaxError("JSON depth exceeded");
193
+ this.index++;
194
+ const out = {};
195
+ const keys = new Set();
196
+ this.space();
197
+ if (this.text[this.index] === "}") {
198
+ this.index++;
199
+ return out;
200
+ }
201
+ for (;;) {
202
+ this.space();
203
+ if (this.text[this.index] !== '"')
204
+ throw new SyntaxError("Expected property name");
205
+ const key = this.string();
206
+ if (keys.has(key))
207
+ throw new SyntaxError("Duplicate JSON property");
208
+ keys.add(key);
209
+ this.space();
210
+ if (this.text[this.index++] !== ":")
211
+ throw new SyntaxError("Expected colon");
212
+ this.space();
213
+ // defineProperty keeps names such as __proto__ as ordinary own properties.
214
+ Object.defineProperty(out, key, { value: this.value(depth), enumerable: true, writable: true, configurable: true });
215
+ this.space();
216
+ const next = this.text[this.index++];
217
+ if (next === "}")
218
+ return out;
219
+ if (next !== ",")
220
+ throw new SyntaxError("Expected comma");
221
+ }
222
+ }
223
+ array(depth) {
224
+ if (depth > 32)
225
+ throw new SyntaxError("JSON depth exceeded");
226
+ this.index++;
227
+ const out = [];
228
+ this.space();
229
+ if (this.text[this.index] === "]") {
230
+ this.index++;
231
+ return out;
232
+ }
233
+ for (;;) {
234
+ this.space();
235
+ out.push(this.value(depth));
236
+ this.space();
237
+ const next = this.text[this.index++];
238
+ if (next === "]")
239
+ return out;
240
+ if (next !== ",")
241
+ throw new SyntaxError("Expected comma");
242
+ }
243
+ }
244
+ string() {
245
+ this.index++;
246
+ let out = "";
247
+ for (;;) {
248
+ const c = this.text[this.index++];
249
+ if (c === undefined)
250
+ throw new SyntaxError("Unterminated string");
251
+ if (c === '"')
252
+ break;
253
+ if (c < " ")
254
+ throw new SyntaxError("Unescaped control character");
255
+ if (c !== "\\") {
256
+ out += c;
257
+ continue;
258
+ }
259
+ const e = this.text[this.index++];
260
+ const simple = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" };
261
+ if (e !== undefined && e in simple) {
262
+ out += simple[e];
263
+ continue;
264
+ }
265
+ if (e !== "u" || !/^[0-9a-fA-F]{4}$/.test(this.text.slice(this.index, this.index + 4)))
266
+ throw new SyntaxError("Invalid escape");
267
+ out += String.fromCharCode(parseInt(this.text.slice(this.index, this.index + 4), 16));
268
+ this.index += 4;
269
+ }
270
+ if (!validText(out))
271
+ throw new SyntaxError("Lone surrogate escape");
272
+ return out;
273
+ }
274
+ number() {
275
+ const match = /-?(?:0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/y;
276
+ match.lastIndex = this.index;
277
+ const found = match.exec(this.text);
278
+ if (found === null)
279
+ throw new SyntaxError("Invalid JSON value");
280
+ this.index = match.lastIndex;
281
+ // Selected schemas have no fractional numbers; fraction/exponent lexemes never satisfy an integer.
282
+ return found[1] !== undefined || found[2] !== undefined ? Number.NaN : Number(found[0]);
283
+ }
284
+ literal(word, value) {
285
+ if (this.text.slice(this.index, this.index + word.length) !== word)
286
+ throw new SyntaxError("Invalid JSON literal");
287
+ this.index += word.length;
288
+ return value;
289
+ }
290
+ space() {
291
+ while (this.text[this.index] === " " || this.text[this.index] === "\t" || this.text[this.index] === "\n" || this.text[this.index] === "\r")
292
+ this.index++;
293
+ }
294
+ }
295
+ function validText(value) {
296
+ for (const scalar of value) {
297
+ const point = scalar.codePointAt(0);
298
+ if (point >= 0xd800 && point <= 0xdfff)
299
+ return false;
300
+ }
301
+ return true;
302
+ }
303
+ function inventoryRules(value) {
304
+ const files = value.files;
305
+ const seen = new Set();
306
+ let previous;
307
+ let total = 0n;
308
+ for (const file of files) {
309
+ const path = file.path;
310
+ const folded = path.toUpperCase();
311
+ if (path.length === 0 || folded === 'INVENTORY.JSON' || folded === 'SIGNATURE.JSON' || seen.has(folded) || (previous !== undefined && previous >= path))
312
+ return false;
313
+ for (const segment of path.split('/')) {
314
+ if (!/^[A-Za-z0-9_.-]+$/.test(segment) || segment === '.' || segment === '..' || segment.endsWith('.') || /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.|$)/i.test(segment))
315
+ return false;
316
+ }
317
+ const size = BigInt(file.size);
318
+ if (size > 134217728n)
319
+ return false;
320
+ total += size;
321
+ if (total > 1073741824n)
322
+ return false;
323
+ seen.add(folded);
324
+ previous = path;
325
+ }
326
+ return files.some(file => file.path === 'manifest.json');
327
+ }
@@ -0,0 +1,21 @@
1
+ export interface PartReceipt {
2
+ partNumber: number;
3
+ size: string;
4
+ sha256: string;
5
+ etag: string;
6
+ }
7
+ export declare function isPartReceipt(value: unknown): value is PartReceipt;
8
+ /** The schema's declared UTF-8 document bound in bytes. */
9
+ export declare const partReceiptJsonMaxBytes = 65536;
10
+ /** Parses one strict PartReceipt document; refusal kinds match the C# codec. */
11
+ export declare function tryParsePartReceiptJson(input: Uint8Array | string): {
12
+ ok: true;
13
+ value: PartReceipt;
14
+ } | {
15
+ ok: false;
16
+ failure: "tooLarge" | "malformed" | "invalid";
17
+ };
18
+ /** Parses one strict PartReceipt document or throws an error carrying the refusal kind. */
19
+ export declare function parsePartReceiptJson(input: Uint8Array | string): PartReceipt;
20
+ /** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
21
+ export declare function serializePartReceiptJson(value: PartReceipt): Uint8Array;
@@ -0,0 +1,290 @@
1
+ export function isPartReceipt(value) { return check0(value); }
2
+ /** The schema's declared UTF-8 document bound in bytes. */
3
+ export const partReceiptJsonMaxBytes = 65536;
4
+ /** Parses one strict PartReceipt document; refusal kinds match the C# codec. */
5
+ export function tryParsePartReceiptJson(input) {
6
+ const parsed = strictJson(input, 65536);
7
+ if (!parsed.ok)
8
+ return parsed;
9
+ return isPartReceipt(parsed.value) ? { ok: true, value: parsed.value } : { ok: false, failure: "invalid" };
10
+ }
11
+ /** Parses one strict PartReceipt document or throws an error carrying the refusal kind. */
12
+ export function parsePartReceiptJson(input) {
13
+ const result = tryParsePartReceiptJson(input);
14
+ if (!result.ok)
15
+ throw Object.assign(new Error(`PartReceipt JSON refused: ${result.failure}.`), { failure: result.failure });
16
+ return result.value;
17
+ }
18
+ /** Writes compact UTF-8 in schema property order and refuses output the schema rejects. */
19
+ export function serializePartReceiptJson(value) {
20
+ const bytes = new TextEncoder().encode(JSON.stringify(orderPartReceipt(value)));
21
+ const result = tryParsePartReceiptJson(bytes);
22
+ if (!result.ok)
23
+ throw Object.assign(new Error(`PartReceipt JSON refused: ${result.failure}.`), { failure: result.failure });
24
+ return bytes;
25
+ }
26
+ function orderPartReceipt(value) {
27
+ const out = {};
28
+ out["partNumber"] = value["partNumber"];
29
+ out["size"] = value["size"];
30
+ out["sha256"] = value["sha256"];
31
+ out["etag"] = value["etag"];
32
+ return out;
33
+ }
34
+ function check0(value) {
35
+ if (typeof value !== 'object' || value === null || Array.isArray(value))
36
+ return false;
37
+ const object = value;
38
+ for (const key of Object.keys(object)) {
39
+ switch (key) {
40
+ case "partNumber":
41
+ if (!check1(object[key]))
42
+ return false;
43
+ break;
44
+ case "size":
45
+ if (!check2(object[key]))
46
+ return false;
47
+ break;
48
+ case "sha256":
49
+ if (!check3(object[key]))
50
+ return false;
51
+ break;
52
+ case "etag":
53
+ if (!check4(object[key]))
54
+ return false;
55
+ break;
56
+ default: return false;
57
+ }
58
+ }
59
+ if (!Object.prototype.hasOwnProperty.call(object, "partNumber"))
60
+ return false;
61
+ if (!Object.prototype.hasOwnProperty.call(object, "size"))
62
+ return false;
63
+ if (!Object.prototype.hasOwnProperty.call(object, "sha256"))
64
+ return false;
65
+ if (!Object.prototype.hasOwnProperty.call(object, "etag"))
66
+ return false;
67
+ return true;
68
+ }
69
+ function check1(value) {
70
+ if (typeof value !== 'number' || !Number.isSafeInteger(value))
71
+ return false;
72
+ if (value < 0)
73
+ return false;
74
+ if (value > 4294967295)
75
+ return false;
76
+ return true;
77
+ }
78
+ function check2(value) {
79
+ if (typeof value !== 'string' || !validText(value))
80
+ return false;
81
+ if ([...value].length > 20)
82
+ return false;
83
+ if ((new RegExp("^(0|[1-9][0-9]*)$", 'u')).exec(value)?.[0] !== value)
84
+ return false;
85
+ if (BigInt(value) > 18446744073709551615n)
86
+ return false;
87
+ return true;
88
+ }
89
+ function check3(value) {
90
+ if (typeof value !== 'string' || !validText(value))
91
+ return false;
92
+ if ((new RegExp("^[0-9a-f]{64}$", 'u')).exec(value)?.[0] !== value)
93
+ return false;
94
+ return true;
95
+ }
96
+ function check4(value) {
97
+ if (typeof value !== 'string' || !validText(value))
98
+ return false;
99
+ return true;
100
+ }
101
+ /** Strict UTF-8 JSON: no BOM, comments, trailing commas or duplicate properties; depth <= 32; integer lexemes only. */
102
+ function strictJson(input, maxBytes) {
103
+ let text;
104
+ if (typeof input === "string") {
105
+ if (!validText(input))
106
+ return { ok: false, failure: "malformed" };
107
+ if (new TextEncoder().encode(input).byteLength > maxBytes)
108
+ return { ok: false, failure: "tooLarge" };
109
+ text = input;
110
+ }
111
+ else {
112
+ if (input.byteLength > maxBytes)
113
+ return { ok: false, failure: "tooLarge" };
114
+ try {
115
+ text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(input);
116
+ }
117
+ catch {
118
+ return { ok: false, failure: "malformed" };
119
+ }
120
+ }
121
+ try {
122
+ return { ok: true, value: new StrictJsonReader(text).document() };
123
+ }
124
+ catch {
125
+ return { ok: false, failure: "malformed" };
126
+ }
127
+ }
128
+ class StrictJsonReader {
129
+ text;
130
+ index = 0;
131
+ constructor(text) {
132
+ this.text = text;
133
+ }
134
+ document() {
135
+ this.space();
136
+ const value = this.value(0);
137
+ this.space();
138
+ if (this.index !== this.text.length)
139
+ throw new SyntaxError("Trailing JSON content");
140
+ return value;
141
+ }
142
+ value(depth) {
143
+ switch (this.text[this.index]) {
144
+ case "{": return this.object(depth + 1);
145
+ case "[": return this.array(depth + 1);
146
+ case '"': return this.string();
147
+ case "t": return this.literal("true", true);
148
+ case "f": return this.literal("false", false);
149
+ case "n": return this.literal("null", null);
150
+ default: return this.number();
151
+ }
152
+ }
153
+ object(depth) {
154
+ if (depth > 32)
155
+ throw new SyntaxError("JSON depth exceeded");
156
+ this.index++;
157
+ const out = {};
158
+ const keys = new Set();
159
+ this.space();
160
+ if (this.text[this.index] === "}") {
161
+ this.index++;
162
+ return out;
163
+ }
164
+ for (;;) {
165
+ this.space();
166
+ if (this.text[this.index] !== '"')
167
+ throw new SyntaxError("Expected property name");
168
+ const key = this.string();
169
+ if (keys.has(key))
170
+ throw new SyntaxError("Duplicate JSON property");
171
+ keys.add(key);
172
+ this.space();
173
+ if (this.text[this.index++] !== ":")
174
+ throw new SyntaxError("Expected colon");
175
+ this.space();
176
+ // defineProperty keeps names such as __proto__ as ordinary own properties.
177
+ Object.defineProperty(out, key, { value: this.value(depth), enumerable: true, writable: true, configurable: true });
178
+ this.space();
179
+ const next = this.text[this.index++];
180
+ if (next === "}")
181
+ return out;
182
+ if (next !== ",")
183
+ throw new SyntaxError("Expected comma");
184
+ }
185
+ }
186
+ array(depth) {
187
+ if (depth > 32)
188
+ throw new SyntaxError("JSON depth exceeded");
189
+ this.index++;
190
+ const out = [];
191
+ this.space();
192
+ if (this.text[this.index] === "]") {
193
+ this.index++;
194
+ return out;
195
+ }
196
+ for (;;) {
197
+ this.space();
198
+ out.push(this.value(depth));
199
+ this.space();
200
+ const next = this.text[this.index++];
201
+ if (next === "]")
202
+ return out;
203
+ if (next !== ",")
204
+ throw new SyntaxError("Expected comma");
205
+ }
206
+ }
207
+ string() {
208
+ this.index++;
209
+ let out = "";
210
+ for (;;) {
211
+ const c = this.text[this.index++];
212
+ if (c === undefined)
213
+ throw new SyntaxError("Unterminated string");
214
+ if (c === '"')
215
+ break;
216
+ if (c < " ")
217
+ throw new SyntaxError("Unescaped control character");
218
+ if (c !== "\\") {
219
+ out += c;
220
+ continue;
221
+ }
222
+ const e = this.text[this.index++];
223
+ const simple = { '"': '"', "\\": "\\", "/": "/", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" };
224
+ if (e !== undefined && e in simple) {
225
+ out += simple[e];
226
+ continue;
227
+ }
228
+ if (e !== "u" || !/^[0-9a-fA-F]{4}$/.test(this.text.slice(this.index, this.index + 4)))
229
+ throw new SyntaxError("Invalid escape");
230
+ out += String.fromCharCode(parseInt(this.text.slice(this.index, this.index + 4), 16));
231
+ this.index += 4;
232
+ }
233
+ if (!validText(out))
234
+ throw new SyntaxError("Lone surrogate escape");
235
+ return out;
236
+ }
237
+ number() {
238
+ const match = /-?(?:0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/y;
239
+ match.lastIndex = this.index;
240
+ const found = match.exec(this.text);
241
+ if (found === null)
242
+ throw new SyntaxError("Invalid JSON value");
243
+ this.index = match.lastIndex;
244
+ // Selected schemas have no fractional numbers; fraction/exponent lexemes never satisfy an integer.
245
+ return found[1] !== undefined || found[2] !== undefined ? Number.NaN : Number(found[0]);
246
+ }
247
+ literal(word, value) {
248
+ if (this.text.slice(this.index, this.index + word.length) !== word)
249
+ throw new SyntaxError("Invalid JSON literal");
250
+ this.index += word.length;
251
+ return value;
252
+ }
253
+ space() {
254
+ while (this.text[this.index] === " " || this.text[this.index] === "\t" || this.text[this.index] === "\n" || this.text[this.index] === "\r")
255
+ this.index++;
256
+ }
257
+ }
258
+ function validText(value) {
259
+ for (const scalar of value) {
260
+ const point = scalar.codePointAt(0);
261
+ if (point >= 0xd800 && point <= 0xdfff)
262
+ return false;
263
+ }
264
+ return true;
265
+ }
266
+ function inventoryRules(value) {
267
+ const files = value.files;
268
+ const seen = new Set();
269
+ let previous;
270
+ let total = 0n;
271
+ for (const file of files) {
272
+ const path = file.path;
273
+ const folded = path.toUpperCase();
274
+ if (path.length === 0 || folded === 'INVENTORY.JSON' || folded === 'SIGNATURE.JSON' || seen.has(folded) || (previous !== undefined && previous >= path))
275
+ return false;
276
+ for (const segment of path.split('/')) {
277
+ if (!/^[A-Za-z0-9_.-]+$/.test(segment) || segment === '.' || segment === '..' || segment.endsWith('.') || /^(CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\.|$)/i.test(segment))
278
+ return false;
279
+ }
280
+ const size = BigInt(file.size);
281
+ if (size > 134217728n)
282
+ return false;
283
+ total += size;
284
+ if (total > 1073741824n)
285
+ return false;
286
+ seen.add(folded);
287
+ previous = path;
288
+ }
289
+ return files.some(file => file.path === 'manifest.json');
290
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@arcforges/api-client",
3
+ "version": "1.0.0-ci.101.1",
4
+ "description": "ArcForges public gRPC-Web client entry point; initial Hello World example.",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "sideEffects": false,
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/ArcForges/Contracts.git",
11
+ "directory": "src/public/ts/api-client"
12
+ },
13
+ "homepage": "https://github.com/ArcForges/Contracts#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/ArcForges/Contracts/issues"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ },
22
+ "./build-identity": "./build-identity.json"
23
+ },
24
+ "files": [
25
+ "LICENSE",
26
+ "NOTICE",
27
+ "README.md",
28
+ "build-identity.json",
29
+ "contracts.binpb",
30
+ "dist",
31
+ "sbom.cdx.json",
32
+ "schemas",
33
+ "source.json"
34
+ ],
35
+ "dependencies": {
36
+ "@arcforges/proto": "1.0.0-ci.101.1",
37
+ "@bufbuild/protobuf": "2.15.0",
38
+ "@connectrpc/connect": "2.2.0",
39
+ "@connectrpc/connect-web": "2.2.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public",
43
+ "registry": "https://registry.npmjs.org/"
44
+ },
45
+ "arcforges": {
46
+ "licenceBoundary": "Apache",
47
+ "contractAccess": "public"
48
+ }
49
+ }