@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/node-wrapper.mjs +34 -4
- package/package.json +5 -8
- package/xcode.d.ts +66 -0
- package/xcode.js +1209 -6
- package/xcode_bg.wasm +0 -0
- package/node-wrapper.js +0 -35
- package/xcode_bg.js +0 -1113
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 };
|