@tokamakdev/tok 0.1.1-beta.122 → 0.1.1-beta.126

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.
@@ -13,6 +13,7 @@ export function createNativeWorker(options, output, prepare) {
13
13
  const { module, ...config } = options;
14
14
  const token = process.env.TOKAMAK_SESSION_TOKEN;
15
15
  const platform = process.env.TOKAMAK_PLATFORM;
16
+ const buildDir = process.env.TOKAMAK_BUILD_DIR;
16
17
  let graph;
17
18
  const plugin = {
18
19
  name: "tokamak",
@@ -23,6 +24,10 @@ export function createNativeWorker(options, output, prepare) {
23
24
  graph.plugin.config.call(this, vite, environment);
24
25
  await prepare?.(root, graph);
25
26
  writeJson(output, "config.json", { root, config });
27
+ // tok's build directory holds the apps it builds, which Windows does not let a watcher
28
+ // open while they run. An array keeps the project's own ignored paths.
29
+ if (buildDir && vite.server?.watch !== null)
30
+ return { server: { watch: { ignored: [within(buildDir)] } } };
26
31
  },
27
32
  configEnvironment: {
28
33
  order: "post",
@@ -104,3 +109,10 @@ function writeJson(output, name, value) {
104
109
  fs.writeFileSync(`${file}.tmp`, `${JSON.stringify(value, null, 2)}\n`);
105
110
  fs.renameSync(`${file}.tmp`, file);
106
111
  }
112
+ /** Whether a file is `directory` or inside it. */
113
+ function within(directory) {
114
+ return (file) => {
115
+ const relative = path.relative(directory, file);
116
+ return relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
117
+ };
118
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokamakdev/tok",
3
- "version": "0.1.1-beta.122",
3
+ "version": "0.1.1-beta.126",
4
4
  "description": "The tokamak CLI, Vite plugin and app API: build native apps from a Cloudflare Workers codebase",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "node": ">=18"
44
44
  },
45
45
  "dependencies": {
46
- "@tokamakdev/plugin": "0.1.0-beta.122",
46
+ "@tokamakdev/plugin": "0.1.0-beta.126",
47
47
  "typescript": "5.9.3",
48
48
  "ws": "^8.22.0"
49
49
  },
@@ -75,17 +75,17 @@
75
75
  "wrangler": "4.147.0"
76
76
  },
77
77
  "optionalDependencies": {
78
- "@tokamakdev/platform-android-arm64": "0.1.1-beta.122",
79
- "@tokamakdev/platform-ios-arm64": "0.1.1-beta.122",
80
- "@tokamakdev/platform-ios-simulator-arm64": "0.1.1-beta.122",
81
- "@tokamakdev/platform-ios-simulator-x64": "0.1.1-beta.122",
82
- "@tokamakdev/platform-macos-arm64": "0.1.1-beta.122",
83
- "@tokamakdev/platform-macos-x64": "0.1.1-beta.122",
84
- "@tokamakdev/platform-windows-x64": "0.1.1-beta.122",
85
- "@tokamakdev/tok-darwin-arm64": "0.1.1-beta.122",
86
- "@tokamakdev/tok-darwin-x64": "0.1.1-beta.122",
87
- "@tokamakdev/tok-linux-x64": "0.1.1-beta.122",
88
- "@tokamakdev/tok-win32-x64": "0.1.1-beta.122"
78
+ "@tokamakdev/platform-android-arm64": "0.1.1-beta.126",
79
+ "@tokamakdev/platform-ios-arm64": "0.1.1-beta.126",
80
+ "@tokamakdev/platform-ios-simulator-arm64": "0.1.1-beta.126",
81
+ "@tokamakdev/platform-ios-simulator-x64": "0.1.1-beta.126",
82
+ "@tokamakdev/platform-macos-arm64": "0.1.1-beta.126",
83
+ "@tokamakdev/platform-macos-x64": "0.1.1-beta.126",
84
+ "@tokamakdev/platform-windows-x64": "0.1.1-beta.126",
85
+ "@tokamakdev/tok-darwin-arm64": "0.1.1-beta.126",
86
+ "@tokamakdev/tok-darwin-x64": "0.1.1-beta.126",
87
+ "@tokamakdev/tok-linux-x64": "0.1.1-beta.126",
88
+ "@tokamakdev/tok-win32-x64": "0.1.1-beta.126"
89
89
  },
90
90
  "publishConfig": {
91
91
  "access": "public"