@xcodekit/xcode-wasm 0.5.2 → 0.6.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/README.md CHANGED
@@ -155,19 +155,15 @@ All `XcodeProject` methods operate in Rust/WASM — only primitive strings cross
155
155
 
156
156
  ### WASM
157
157
 
158
- The WASM build (`@xcodekit/xcode-wasm`) has the same API with minor differences:
159
-
160
- - `parse()` / `build()` work with JSON **strings** (not JS objects) — call `JSON.parse()` / `JSON.stringify()` on your side
161
- - `XcodeProject` is created with `new XcodeProject(content)` instead of factory methods
158
+ The WASM build (`@xcodekit/xcode-wasm`) has the same API — `parse()` and `build()` work with JS objects directly (via `serde-wasm-bindgen`, no JSON round-trips). The only difference is `XcodeProject` uses `new XcodeProject(content)` instead of factory methods.
162
159
 
163
160
  ```js
164
161
  // Browser / Deno / Cloudflare Workers
165
162
  import { parse, build, XcodeProject } from "@xcodekit/xcode-wasm";
166
163
 
167
- // Low-level
168
- const json = parse(text); // returns JSON string
169
- const project = JSON.parse(json);
170
- const output = build(json); // accepts JSON string
164
+ // Low-level (same API as napi)
165
+ const project = parse(text); // returns JS object
166
+ const output = build(project); // accepts JS object
171
167
 
172
168
  // High-level (same API as napi)
173
169
  const xcode = new XcodeProject(text);
package/node-wrapper.d.ts CHANGED
@@ -1,12 +1,18 @@
1
1
  /**
2
2
  * Type declarations for @xcodekit/xcode-wasm/node.
3
- * Extends the base WASM XcodeProject with filesystem methods.
4
3
  */
5
4
 
6
- export { build, parse, parseAndBuild } from "./xcode";
7
-
8
5
  import { XcodeProject as BaseXcodeProject } from "./xcode";
9
6
 
7
+ /** Parse a .pbxproj string into a JSON-compatible object. */
8
+ export declare function parse(text: string): any;
9
+
10
+ /** Serialize a JSON object back to .pbxproj format. */
11
+ export declare function build(project: object): string;
12
+
13
+ /** Parse and immediately re-serialize. Stays in WASM, zero marshalling. */
14
+ export declare function parseAndBuild(text: string): string;
15
+
10
16
  export declare class XcodeProject extends BaseXcodeProject {
11
17
  /** Open and parse a .pbxproj file from disk. */
12
18
  static open(filePath: string): XcodeProject;
@@ -19,4 +25,7 @@ export declare class XcodeProject extends BaseXcodeProject {
19
25
 
20
26
  /** Write the project back to its original file. */
21
27
  save(): void;
28
+
29
+ /** Convert the project to a JSON-compatible object. */
30
+ toJSON(): any;
22
31
  }
package/node-wrapper.js CHANGED
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * Node.js wrapper for @xcodekit/xcode-wasm/node.
3
- * Adds open() and save() methods using the filesystem.
4
3
  *
5
4
  * Usage:
6
- * const { XcodeProject } = require("@xcodekit/xcode-wasm/node");
5
+ * const { XcodeProject, parse, build } = require("@xcodekit/xcode-wasm/node");
7
6
  */
8
7
 
9
8
  const { readFileSync, writeFileSync } = require("fs");
package/node-wrapper.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * ESM wrapper for @xcodekit/xcode-wasm/node.
3
- * Adds open() and save() methods using the filesystem.
4
3
  *
5
4
  * Usage:
6
- * import { XcodeProject } from "@xcodekit/xcode-wasm/node";
5
+ * import { XcodeProject, parse, build } from "@xcodekit/xcode-wasm/node";
7
6
  */
8
7
 
9
8
  import { readFileSync, writeFileSync } from "fs";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@xcodekit/xcode-wasm",
3
3
  "type": "module",
4
4
  "description": "Parse, manipulate, and serialize Xcode .pbxproj files (WASM build)",
5
- "version": "0.5.2",
5
+ "version": "0.6.0",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "xcode_bg.wasm",
package/xcode.d.ts CHANGED
@@ -42,23 +42,23 @@ export class XcodeProject {
42
42
  */
43
43
  toBuild(): string;
44
44
  /**
45
- * Convert the project to a JSON string.
45
+ * Convert the project to a JS object.
46
46
  */
47
- toJSON(): string;
47
+ toJSON(): any;
48
48
  readonly archiveVersion: bigint;
49
49
  readonly mainGroupUuid: string | undefined;
50
50
  readonly objectVersion: bigint;
51
51
  }
52
52
 
53
53
  /**
54
- * Serialize a JSON string back to .pbxproj format.
54
+ * Serialize a JS object back to .pbxproj format.
55
55
  */
56
- export function build(json: string): string;
56
+ export function build(project: any): string;
57
57
 
58
58
  /**
59
- * Parse a .pbxproj string into a JSON string.
59
+ * Parse a .pbxproj string into a JS object.
60
60
  */
61
- export function parse(text: string): string;
61
+ export function parse(text: string): any;
62
62
 
63
63
  /**
64
64
  * Parse and immediately re-serialize a .pbxproj string.
package/xcode_bg.js CHANGED
@@ -30,7 +30,7 @@ export class XcodeProject {
30
30
  let v3;
31
31
  if (r0 !== 0) {
32
32
  v3 = getStringFromWasm0(r0, r1).slice();
33
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
33
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
34
34
  }
35
35
  return v3;
36
36
  } finally {
@@ -55,7 +55,7 @@ export class XcodeProject {
55
55
  let v3;
56
56
  if (r0 !== 0) {
57
57
  v3 = getStringFromWasm0(r0, r1).slice();
58
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
58
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
59
59
  }
60
60
  return v3;
61
61
  } finally {
@@ -80,7 +80,7 @@ export class XcodeProject {
80
80
  let v3;
81
81
  if (r0 !== 0) {
82
82
  v3 = getStringFromWasm0(r0, r1).slice();
83
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
83
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
84
84
  }
85
85
  return v3;
86
86
  } finally {
@@ -105,7 +105,7 @@ export class XcodeProject {
105
105
  let v3;
106
106
  if (r0 !== 0) {
107
107
  v3 = getStringFromWasm0(r0, r1).slice();
108
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
108
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
109
109
  }
110
110
  return v3;
111
111
  } finally {
@@ -130,7 +130,7 @@ export class XcodeProject {
130
130
  let v3;
131
131
  if (r0 !== 0) {
132
132
  v3 = getStringFromWasm0(r0, r1).slice();
133
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
133
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
134
134
  }
135
135
  return v3;
136
136
  } finally {
@@ -155,7 +155,7 @@ export class XcodeProject {
155
155
  let v3;
156
156
  if (r0 !== 0) {
157
157
  v3 = getStringFromWasm0(r0, r1).slice();
158
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
158
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
159
159
  }
160
160
  return v3;
161
161
  } finally {
@@ -190,7 +190,7 @@ export class XcodeProject {
190
190
  let v4;
191
191
  if (r0 !== 0) {
192
192
  v4 = getStringFromWasm0(r0, r1).slice();
193
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
193
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
194
194
  }
195
195
  return v4;
196
196
  } finally {
@@ -215,7 +215,7 @@ export class XcodeProject {
215
215
  let v3;
216
216
  if (r0 !== 0) {
217
217
  v3 = getStringFromWasm0(r0, r1).slice();
218
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
218
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
219
219
  }
220
220
  return v3;
221
221
  } finally {
@@ -240,7 +240,7 @@ export class XcodeProject {
240
240
  let v3;
241
241
  if (r0 !== 0) {
242
242
  v3 = getStringFromWasm0(r0, r1).slice();
243
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
243
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
244
244
  }
245
245
  return v3;
246
246
  } finally {
@@ -262,7 +262,7 @@ export class XcodeProject {
262
262
  let v2;
263
263
  if (r0 !== 0) {
264
264
  v2 = getStringFromWasm0(r0, r1).slice();
265
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
265
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
266
266
  }
267
267
  return v2;
268
268
  } finally {
@@ -282,7 +282,7 @@ export class XcodeProject {
282
282
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
283
283
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
284
284
  var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
285
- wasm.__wbindgen_export3(r0, r1 * 4, 4);
285
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
286
286
  return v2;
287
287
  } finally {
288
288
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -304,7 +304,7 @@ export class XcodeProject {
304
304
  return getStringFromWasm0(r0, r1);
305
305
  } finally {
306
306
  wasm.__wbindgen_add_to_stack_pointer(16);
307
- wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
307
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
308
308
  }
309
309
  }
310
310
  /**
@@ -325,7 +325,7 @@ export class XcodeProject {
325
325
  let v3;
326
326
  if (r0 !== 0) {
327
327
  v3 = getStringFromWasm0(r0, r1).slice();
328
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
328
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
329
329
  }
330
330
  return v3;
331
331
  } finally {
@@ -345,7 +345,7 @@ export class XcodeProject {
345
345
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
346
346
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
347
347
  var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
348
- wasm.__wbindgen_export3(r0, r1 * 4, 4);
348
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
349
349
  return v2;
350
350
  } finally {
351
351
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -361,7 +361,7 @@ export class XcodeProject {
361
361
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
362
362
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
363
363
  var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
364
- wasm.__wbindgen_export3(r0, r1 * 4, 4);
364
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
365
365
  return v1;
366
366
  } finally {
367
367
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -385,7 +385,7 @@ export class XcodeProject {
385
385
  let v3;
386
386
  if (r0 !== 0) {
387
387
  v3 = getStringFromWasm0(r0, r1).slice();
388
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
388
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
389
389
  }
390
390
  return v3;
391
391
  } finally {
@@ -407,7 +407,7 @@ export class XcodeProject {
407
407
  let v2;
408
408
  if (r0 !== 0) {
409
409
  v2 = getStringFromWasm0(r0, r1).slice();
410
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
410
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
411
411
  }
412
412
  return v2;
413
413
  } finally {
@@ -433,7 +433,7 @@ export class XcodeProject {
433
433
  return getStringFromWasm0(r0, r1);
434
434
  } finally {
435
435
  wasm.__wbindgen_add_to_stack_pointer(16);
436
- wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
436
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
437
437
  }
438
438
  }
439
439
  /**
@@ -448,7 +448,7 @@ export class XcodeProject {
448
448
  let v1;
449
449
  if (r0 !== 0) {
450
450
  v1 = getStringFromWasm0(r0, r1).slice();
451
- wasm.__wbindgen_export3(r0, r1 * 1, 1);
451
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
452
452
  }
453
453
  return v1;
454
454
  } finally {
@@ -577,80 +577,67 @@ export class XcodeProject {
577
577
  return getStringFromWasm0(r0, r1);
578
578
  } finally {
579
579
  wasm.__wbindgen_add_to_stack_pointer(16);
580
- wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
580
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
581
581
  }
582
582
  }
583
583
  /**
584
- * Convert the project to a JSON string.
585
- * @returns {string}
584
+ * Convert the project to a JS object.
585
+ * @returns {any}
586
586
  */
587
587
  toJSON() {
588
- let deferred2_0;
589
- let deferred2_1;
590
588
  try {
591
589
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
592
590
  wasm.xcodeproject_toJSON(retptr, this.__wbg_ptr);
593
591
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
594
592
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
595
593
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
596
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
597
- var ptr1 = r0;
598
- var len1 = r1;
599
- if (r3) {
600
- ptr1 = 0; len1 = 0;
601
- throw takeObject(r2);
594
+ if (r2) {
595
+ throw takeObject(r1);
602
596
  }
603
- deferred2_0 = ptr1;
604
- deferred2_1 = len1;
605
- return getStringFromWasm0(ptr1, len1);
597
+ return takeObject(r0);
606
598
  } finally {
607
599
  wasm.__wbindgen_add_to_stack_pointer(16);
608
- wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
609
600
  }
610
601
  }
611
602
  }
612
603
  if (Symbol.dispose) XcodeProject.prototype[Symbol.dispose] = XcodeProject.prototype.free;
613
604
 
614
605
  /**
615
- * Serialize a JSON string back to .pbxproj format.
616
- * @param {string} json
606
+ * Serialize a JS object back to .pbxproj format.
607
+ * @param {any} project
617
608
  * @returns {string}
618
609
  */
619
- export function build(json) {
620
- let deferred3_0;
621
- let deferred3_1;
610
+ export function build(project) {
611
+ let deferred2_0;
612
+ let deferred2_1;
622
613
  try {
623
614
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
624
- const ptr0 = passStringToWasm0(json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
625
- const len0 = WASM_VECTOR_LEN;
626
- wasm.build(retptr, ptr0, len0);
615
+ wasm.build(retptr, addHeapObject(project));
627
616
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
628
617
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
629
618
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
630
619
  var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
631
- var ptr2 = r0;
632
- var len2 = r1;
620
+ var ptr1 = r0;
621
+ var len1 = r1;
633
622
  if (r3) {
634
- ptr2 = 0; len2 = 0;
623
+ ptr1 = 0; len1 = 0;
635
624
  throw takeObject(r2);
636
625
  }
637
- deferred3_0 = ptr2;
638
- deferred3_1 = len2;
639
- return getStringFromWasm0(ptr2, len2);
626
+ deferred2_0 = ptr1;
627
+ deferred2_1 = len1;
628
+ return getStringFromWasm0(ptr1, len1);
640
629
  } finally {
641
630
  wasm.__wbindgen_add_to_stack_pointer(16);
642
- wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
631
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
643
632
  }
644
633
  }
645
634
 
646
635
  /**
647
- * Parse a .pbxproj string into a JSON string.
636
+ * Parse a .pbxproj string into a JS object.
648
637
  * @param {string} text
649
- * @returns {string}
638
+ * @returns {any}
650
639
  */
651
640
  export function parse(text) {
652
- let deferred3_0;
653
- let deferred3_1;
654
641
  try {
655
642
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
656
643
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -659,19 +646,12 @@ export function parse(text) {
659
646
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
660
647
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
661
648
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
662
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
663
- var ptr2 = r0;
664
- var len2 = r1;
665
- if (r3) {
666
- ptr2 = 0; len2 = 0;
667
- throw takeObject(r2);
649
+ if (r2) {
650
+ throw takeObject(r1);
668
651
  }
669
- deferred3_0 = ptr2;
670
- deferred3_1 = len2;
671
- return getStringFromWasm0(ptr2, len2);
652
+ return takeObject(r0);
672
653
  } finally {
673
654
  wasm.__wbindgen_add_to_stack_pointer(16);
674
- wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
675
655
  }
676
656
  }
677
657
 
@@ -703,21 +683,218 @@ export function parseAndBuild(text) {
703
683
  return getStringFromWasm0(ptr2, len2);
704
684
  } finally {
705
685
  wasm.__wbindgen_add_to_stack_pointer(16);
706
- wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
686
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
707
687
  }
708
688
  }
709
689
  export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
710
690
  const ret = Error(getStringFromWasm0(arg0, arg1));
711
691
  return addHeapObject(ret);
712
692
  }
693
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
694
+ const ret = String(getObject(arg1));
695
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
696
+ const len1 = WASM_VECTOR_LEN;
697
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
698
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
699
+ }
700
+ export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
701
+ const v = getObject(arg1);
702
+ const ret = typeof(v) === 'bigint' ? v : undefined;
703
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
704
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
705
+ }
706
+ export function __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25(arg0) {
707
+ const v = getObject(arg0);
708
+ const ret = typeof(v) === 'boolean' ? v : undefined;
709
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
710
+ }
711
+ export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
712
+ const ret = debugString(getObject(arg1));
713
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
714
+ const len1 = WASM_VECTOR_LEN;
715
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
716
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
717
+ }
718
+ export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
719
+ const ret = getObject(arg0) in getObject(arg1);
720
+ return ret;
721
+ }
722
+ export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
723
+ const ret = typeof(getObject(arg0)) === 'bigint';
724
+ return ret;
725
+ }
726
+ export function __wbg___wbindgen_is_function_0095a73b8b156f76(arg0) {
727
+ const ret = typeof(getObject(arg0)) === 'function';
728
+ return ret;
729
+ }
730
+ export function __wbg___wbindgen_is_object_5ae8e5880f2c1fbd(arg0) {
731
+ const val = getObject(arg0);
732
+ const ret = typeof(val) === 'object' && val !== null;
733
+ return ret;
734
+ }
735
+ export function __wbg___wbindgen_is_string_cd444516edc5b180(arg0) {
736
+ const ret = typeof(getObject(arg0)) === 'string';
737
+ return ret;
738
+ }
739
+ export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
740
+ const ret = getObject(arg0) === getObject(arg1);
741
+ return ret;
742
+ }
743
+ export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
744
+ const ret = getObject(arg0) == getObject(arg1);
745
+ return ret;
746
+ }
747
+ export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
748
+ const obj = getObject(arg1);
749
+ const ret = typeof(obj) === 'number' ? obj : undefined;
750
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
751
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
752
+ }
753
+ export function __wbg___wbindgen_string_get_72fb696202c56729(arg0, arg1) {
754
+ const obj = getObject(arg1);
755
+ const ret = typeof(obj) === 'string' ? obj : undefined;
756
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
757
+ var len1 = WASM_VECTOR_LEN;
758
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
759
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
760
+ }
713
761
  export function __wbg___wbindgen_throw_be289d5034ed271b(arg0, arg1) {
714
762
  throw new Error(getStringFromWasm0(arg0, arg1));
715
763
  }
716
- export function __wbindgen_cast_0000000000000001(arg0, arg1) {
764
+ export function __wbg_call_389efe28435a9388() { return handleError(function (arg0, arg1) {
765
+ const ret = getObject(arg0).call(getObject(arg1));
766
+ return addHeapObject(ret);
767
+ }, arguments); }
768
+ export function __wbg_done_57b39ecd9addfe81(arg0) {
769
+ const ret = getObject(arg0).done;
770
+ return ret;
771
+ }
772
+ export function __wbg_entries_58c7934c745daac7(arg0) {
773
+ const ret = Object.entries(getObject(arg0));
774
+ return addHeapObject(ret);
775
+ }
776
+ export function __wbg_get_9b94d73e6221f75c(arg0, arg1) {
777
+ const ret = getObject(arg0)[arg1 >>> 0];
778
+ return addHeapObject(ret);
779
+ }
780
+ export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0, arg1) {
781
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
782
+ return addHeapObject(ret);
783
+ }, arguments); }
784
+ export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
785
+ let result;
786
+ try {
787
+ result = getObject(arg0) instanceof ArrayBuffer;
788
+ } catch (_) {
789
+ result = false;
790
+ }
791
+ const ret = result;
792
+ return ret;
793
+ }
794
+ export function __wbg_instanceof_Map_53af74335dec57f4(arg0) {
795
+ let result;
796
+ try {
797
+ result = getObject(arg0) instanceof Map;
798
+ } catch (_) {
799
+ result = false;
800
+ }
801
+ const ret = result;
802
+ return ret;
803
+ }
804
+ export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
805
+ let result;
806
+ try {
807
+ result = getObject(arg0) instanceof Uint8Array;
808
+ } catch (_) {
809
+ result = false;
810
+ }
811
+ const ret = result;
812
+ return ret;
813
+ }
814
+ export function __wbg_isArray_d314bb98fcf08331(arg0) {
815
+ const ret = Array.isArray(getObject(arg0));
816
+ return ret;
817
+ }
818
+ export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
819
+ const ret = Number.isSafeInteger(getObject(arg0));
820
+ return ret;
821
+ }
822
+ export function __wbg_iterator_6ff6560ca1568e55() {
823
+ const ret = Symbol.iterator;
824
+ return addHeapObject(ret);
825
+ }
826
+ export function __wbg_length_32ed9a279acd054c(arg0) {
827
+ const ret = getObject(arg0).length;
828
+ return ret;
829
+ }
830
+ export function __wbg_length_35a7bace40f36eac(arg0) {
831
+ const ret = getObject(arg0).length;
832
+ return ret;
833
+ }
834
+ export function __wbg_new_361308b2356cecd0() {
835
+ const ret = new Object();
836
+ return addHeapObject(ret);
837
+ }
838
+ export function __wbg_new_3eb36ae241fe6f44() {
839
+ const ret = new Array();
840
+ return addHeapObject(ret);
841
+ }
842
+ export function __wbg_new_dca287b076112a51() {
843
+ const ret = new Map();
844
+ return addHeapObject(ret);
845
+ }
846
+ export function __wbg_new_dd2b680c8bf6ae29(arg0) {
847
+ const ret = new Uint8Array(getObject(arg0));
848
+ return addHeapObject(ret);
849
+ }
850
+ export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
851
+ const ret = getObject(arg0).next();
852
+ return addHeapObject(ret);
853
+ }, arguments); }
854
+ export function __wbg_next_418f80d8f5303233(arg0) {
855
+ const ret = getObject(arg0).next;
856
+ return addHeapObject(ret);
857
+ }
858
+ export function __wbg_prototypesetcall_bdcdcc5842e4d77d(arg0, arg1, arg2) {
859
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
860
+ }
861
+ export function __wbg_set_1eb0999cf5d27fc8(arg0, arg1, arg2) {
862
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
863
+ return addHeapObject(ret);
864
+ }
865
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
866
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
867
+ }
868
+ export function __wbg_set_f43e577aea94465b(arg0, arg1, arg2) {
869
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
870
+ }
871
+ export function __wbg_value_0546255b415e96c1(arg0) {
872
+ const ret = getObject(arg0).value;
873
+ return addHeapObject(ret);
874
+ }
875
+ export function __wbindgen_cast_0000000000000001(arg0) {
876
+ // Cast intrinsic for `F64 -> Externref`.
877
+ const ret = arg0;
878
+ return addHeapObject(ret);
879
+ }
880
+ export function __wbindgen_cast_0000000000000002(arg0) {
881
+ // Cast intrinsic for `I64 -> Externref`.
882
+ const ret = arg0;
883
+ return addHeapObject(ret);
884
+ }
885
+ export function __wbindgen_cast_0000000000000003(arg0, arg1) {
717
886
  // Cast intrinsic for `Ref(String) -> Externref`.
718
887
  const ret = getStringFromWasm0(arg0, arg1);
719
888
  return addHeapObject(ret);
720
889
  }
890
+ export function __wbindgen_cast_0000000000000004(arg0) {
891
+ // Cast intrinsic for `U64 -> Externref`.
892
+ const ret = BigInt.asUintN(64, arg0);
893
+ return addHeapObject(ret);
894
+ }
895
+ export function __wbindgen_object_drop_ref(arg0) {
896
+ takeObject(arg0);
897
+ }
721
898
  const XcodeProjectFinalization = (typeof FinalizationRegistry === 'undefined')
722
899
  ? { register: () => {}, unregister: () => {} }
723
900
  : new FinalizationRegistry(ptr => wasm.__wbg_xcodeproject_free(ptr >>> 0, 1));
@@ -731,6 +908,71 @@ function addHeapObject(obj) {
731
908
  return idx;
732
909
  }
733
910
 
911
+ function debugString(val) {
912
+ // primitive types
913
+ const type = typeof val;
914
+ if (type == 'number' || type == 'boolean' || val == null) {
915
+ return `${val}`;
916
+ }
917
+ if (type == 'string') {
918
+ return `"${val}"`;
919
+ }
920
+ if (type == 'symbol') {
921
+ const description = val.description;
922
+ if (description == null) {
923
+ return 'Symbol';
924
+ } else {
925
+ return `Symbol(${description})`;
926
+ }
927
+ }
928
+ if (type == 'function') {
929
+ const name = val.name;
930
+ if (typeof name == 'string' && name.length > 0) {
931
+ return `Function(${name})`;
932
+ } else {
933
+ return 'Function';
934
+ }
935
+ }
936
+ // objects
937
+ if (Array.isArray(val)) {
938
+ const length = val.length;
939
+ let debug = '[';
940
+ if (length > 0) {
941
+ debug += debugString(val[0]);
942
+ }
943
+ for(let i = 1; i < length; i++) {
944
+ debug += ', ' + debugString(val[i]);
945
+ }
946
+ debug += ']';
947
+ return debug;
948
+ }
949
+ // Test for built-in
950
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
951
+ let className;
952
+ if (builtInMatches && builtInMatches.length > 1) {
953
+ className = builtInMatches[1];
954
+ } else {
955
+ // Failed to match the standard '[object ClassName]'
956
+ return toString.call(val);
957
+ }
958
+ if (className == 'Object') {
959
+ // we're a user defined class or Object
960
+ // JSON.stringify avoids problems with cycles, and is generally much
961
+ // easier than looping through ownProperties of `val`.
962
+ try {
963
+ return 'Object(' + JSON.stringify(val) + ')';
964
+ } catch (_) {
965
+ return 'Object';
966
+ }
967
+ }
968
+ // errors
969
+ if (val instanceof Error) {
970
+ return `${val.name}: ${val.message}\n${val.stack}`;
971
+ }
972
+ // TODO we could test for more things here, like `Set`s and `Map`s.
973
+ return className;
974
+ }
975
+
734
976
  function dropObject(idx) {
735
977
  if (idx < 132) return;
736
978
  heap[idx] = heap_next;
@@ -747,6 +989,11 @@ function getArrayJsValueFromWasm0(ptr, len) {
747
989
  return result;
748
990
  }
749
991
 
992
+ function getArrayU8FromWasm0(ptr, len) {
993
+ ptr = ptr >>> 0;
994
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
995
+ }
996
+
750
997
  let cachedDataViewMemory0 = null;
751
998
  function getDataViewMemory0() {
752
999
  if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
@@ -770,6 +1017,14 @@ function getUint8ArrayMemory0() {
770
1017
 
771
1018
  function getObject(idx) { return heap[idx]; }
772
1019
 
1020
+ function handleError(f, args) {
1021
+ try {
1022
+ return f.apply(this, args);
1023
+ } catch (e) {
1024
+ wasm.__wbindgen_export3(addHeapObject(e));
1025
+ }
1026
+ }
1027
+
773
1028
  let heap = new Array(128).fill(undefined);
774
1029
  heap.push(undefined, null, true, false);
775
1030
 
package/xcode_bg.wasm CHANGED
Binary file