@xcodekit/xcode-wasm 0.6.0 → 0.6.2

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/xcode_bg.wasm CHANGED
Binary file
package/node-wrapper.js DELETED
@@ -1,35 +0,0 @@
1
- /**
2
- * Node.js wrapper for @xcodekit/xcode-wasm/node.
3
- *
4
- * Usage:
5
- * const { XcodeProject, parse, build } = require("@xcodekit/xcode-wasm/node");
6
- */
7
-
8
- const { readFileSync, writeFileSync } = require("fs");
9
- const wasm = require("./xcode");
10
-
11
- class XcodeProject extends wasm.XcodeProject {
12
- #filePath = null;
13
-
14
- static open(filePath) {
15
- const content = readFileSync(filePath, "utf8");
16
- const project = new XcodeProject(content);
17
- project.#filePath = filePath;
18
- return project;
19
- }
20
-
21
- static fromString(content) {
22
- return new XcodeProject(content);
23
- }
24
-
25
- get filePath() {
26
- return this.#filePath;
27
- }
28
-
29
- save() {
30
- if (!this.#filePath) throw new Error("No file path set — use open() or save(path)");
31
- writeFileSync(this.#filePath, this.toBuild());
32
- }
33
- }
34
-
35
- module.exports = { ...wasm, XcodeProject };