craft-native 0.0.446 → 0.0.449

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/dist/cli.js CHANGED
@@ -3228,7 +3228,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3228
3228
  `);
3229
3229
  }
3230
3230
  // package.json
3231
- var version = "0.0.446";
3231
+ var version = "0.0.449";
3232
3232
 
3233
3233
  // bin/cli.ts
3234
3234
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -376,7 +376,7 @@ function craftBinaryNotFoundMessage(triedPath) {
376
376
  `);
377
377
  }
378
378
  // package.json
379
- var version = "0.0.446";
379
+ var version = "0.0.449";
380
380
 
381
381
  // src/sdk-version.ts
382
382
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -117,7 +117,7 @@ function craftBinaryNotFoundMessage(triedPath) {
117
117
  `);
118
118
  }
119
119
  // package.json
120
- var version = "0.0.446";
120
+ var version = "0.0.449";
121
121
 
122
122
  // src/sdk-version.ts
123
123
  var SDK_VERSION = version;
@@ -43,9 +43,9 @@ import process from "process";
43
43
  var macosToolchain = {
44
44
  zig: "0.18.0-dev.252+86dc5ce25",
45
45
  sources: {
46
- "zig-js": { repository: "zig-utils/zig-js", revision: "95d835edcbad55a7456cff76a9bb7ef6cdf265fc", paths: ["src", "include", "tests", "tools", "docs", "bench", "conformance"] },
46
+ "zig-js": { repository: "zig-utils/zig-js", revision: "58885b7dad974d15b4eb410dc617da64d8c29550", paths: ["src", "include", "tests", "tools", "docs", "bench", "conformance"] },
47
47
  "zig-regex": { repository: "zig-utils/zig-regex", revision: "fdd9c2e333ea6ac2fd06d080d939ef7f11d61b1b", paths: ["src"] },
48
- "zig-gc": { repository: "zig-utils/zig-gc", revision: "73c802e05768a729614e9c4296abb118aa06faf9", paths: ["src"] }
48
+ "zig-gc": { repository: "zig-utils/zig-gc", revision: "9bdb139cb4c6cdaa37b6fa2abebcf549cfe43762", paths: ["src"] }
49
49
  }
50
50
  };
51
51
  var defaultRun = async (args, cwd) => {
@@ -9,7 +9,7 @@ export declare const macosToolchain: {
9
9
  readonly sources: {
10
10
  readonly 'zig-js': {
11
11
  readonly repository: 'zig-utils/zig-js';
12
- readonly revision: '95d835edcbad55a7456cff76a9bb7ef6cdf265fc';
12
+ readonly revision: '58885b7dad974d15b4eb410dc617da64d8c29550';
13
13
  readonly paths: readonly ['src', 'include', 'tests', 'tools', 'docs', 'bench', 'conformance'];
14
14
  };
15
15
  readonly 'zig-regex': {
@@ -19,7 +19,7 @@ export declare const macosToolchain: {
19
19
  };
20
20
  readonly 'zig-gc': {
21
21
  readonly repository: 'zig-utils/zig-gc';
22
- readonly revision: '73c802e05768a729614e9c4296abb118aa06faf9';
22
+ readonly revision: '9bdb139cb4c6cdaa37b6fa2abebcf549cfe43762';
23
23
  readonly paths: readonly ['src'];
24
24
  };
25
25
  };
@@ -173,6 +173,12 @@ final class CraftMacRuntime {
173
173
  defer { JSGlobalContextRelease(created) }
174
174
  let context = ZigJSContext(jsGlobalContextRef: created)!
175
175
  self.context = context
176
+ // The bundle's parsed tree is kept between launches, in the app's own caches (entries are trusted,
177
+ // so never a shared folder): a screen's next start skips parsing its bundle.
178
+ if let caches = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first {
179
+ let directory = caches.appendingPathComponent(Bundle.main.bundleIdentifier ?? "dev.craft.native", isDirectory: true).appendingPathComponent("zig-js-scripts", isDirectory: true)
180
+ _ = ZJSContextSetScriptCacheDirectory(created, directory.path)
181
+ }
176
182
  context.exceptionHandler = { [weak self] _, value in
177
183
  let message = value?.objectForKeyedSubscript("message")?.toString() ?? "Native script failed"
178
184
  let stack = value?.objectForKeyedSubscript("stack")?.toString() ?? ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.446",
3
+ "version": "0.0.449",
4
4
  "type": "module",
5
5
  "description": "Build desktop apps with web languages - TypeScript SDK for Craft",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",