cf-workers-native 0.1.2-beta.local.sha2f5e4e6956f4 → 0.1.2-beta.pr66.shac45d68b01e08

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
@@ -39,12 +39,11 @@ Each guide describes its tested versions and boundaries. Already have a separate
39
39
 
40
40
  Install the shared JavaScript package in your web project:
41
41
 
42
- The renamed package is being prepared for publication. Until it is available on
43
- npm, use the [source tarball instructions](docs/native-embedding.md#dependency-setup).
44
- After publication:
42
+ The current published Preview is the exact beta below. Pin it explicitly: npm
43
+ `latest` currently points to an older beta, and npm version `0.1.2` is not published.
45
44
 
46
45
  ```sh
47
- npm install cf-workers-native@0.1.2
46
+ npm install --save-exact cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51
48
47
  ```
49
48
 
50
49
  The mobile entry selects the host. For example, an iOS web entry starts with:
@@ -63,7 +62,7 @@ Use `workersAndroid` from `cf-workers-native/android` or `workersCapacitor` from
63
62
 
64
63
  This entry is one part of the setup: connect the existing Worker to a **separate mobile build**, then package its output with your chosen native host. The [embedding guide](docs/native-embedding.md) and [Capacitor guide](docs/integration.md) cover the complete path. For an existing native app, build the web assets in the web project or CI; the native project does not need Capacitor CLI commands or configuration.
65
64
 
66
- **0.1.2 is a Preview.** APIs may change. Android embedding currently requires WebView `MULTI_PROFILE` support and a locally built SDK artifact; a public Maven release is not yet available. Read the [native requirements](docs/native-embedding.md#dependency-setup) before integrating. Upgrading from `workers-capacitor`? Follow the [migration steps](docs/integration.md#migrating-from-the-old-npm-package).
65
+ **0.1.2 is a Preview.** APIs may change. Android embedding requires WebView `MULTI_PROFILE` support. The native Android SDK is available from Maven Central at version `0.1.2`. Read the [native requirements](docs/native-embedding.md#dependency-setup) before integrating. Upgrading from `workers-capacitor`? Follow the [migration steps](docs/integration.md#migrating-from-the-old-npm-package).
67
66
 
68
67
  ## Build with your AI assistant
69
68
 
@@ -72,7 +71,7 @@ Open your application repository and give your assistant this prompt, replacing
72
71
  ```text
73
72
  Read https://github.com/rdlabo-dev/cf-workers-native/blob/main/README.md
74
73
  and the integration guide for our target: <iOS, Android or Capacitor>.
75
- Bring this Workers application to that target using cf-workers-native@0.1.2.
74
+ Bring this Workers application to that target using cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51.
76
75
  Preserve its pages, routes, authentication and Cloudflare deployment configuration.
77
76
  For an existing native app, preserve its entry point and navigation.
78
77
  Verify the actual user flows on the target platform and report remaining limits.
@@ -4,13 +4,13 @@ import { createRequire, builtinModules } from "node:module";
4
4
  import { build } from "esbuild";
5
5
  import { compileServerWorker, } from "../server.js";
6
6
  import { permitsPath } from "../route-permissions.js";
7
- import { readVoidPlan, voidSelector, usesServerProcess } from "./plan.js";
7
+ import { readVoidPlan, voidSelector, usesServerProcess, voidRoutingStart, } from "./plan.js";
8
8
  /** Generated Void Pages builds only. Unknown generators keep the Worker boundary. */
9
9
  export async function compileVoid(entry, permissions, bindings) {
10
10
  if (basename(entry) !== "index.js" || basename(dirname(entry)) !== "ssr")
11
11
  return;
12
12
  const source = await readFile(entry, "utf8");
13
- if (!source.includes("//#region virtual:void-routes\n"))
13
+ if (voidRoutingStart(source) < 0)
14
14
  return;
15
15
  const remote = await compileServerWorker(entry, bindings, {
16
16
  execution: "network",
@@ -7,6 +7,8 @@ export interface VoidRoute {
7
7
  component?: string;
8
8
  renderMode?: "server" | "client";
9
9
  }
10
+ /** Vite 8.3.5 emits plain module comments instead of region comments. */
11
+ export declare function voidRoutingStart(source: string): number;
10
12
  /** Read only the pinned generator's literal registrations, never application source. */
11
13
  export declare function readVoidPlan(source: string): {
12
14
  routes: VoidRoute[];
@@ -61,11 +61,15 @@ export function usesServerProcess(source) {
61
61
  });
62
62
  return unsafe;
63
63
  }
64
+ /** Vite 8.3.5 emits plain module comments instead of region comments. */
65
+ export function voidRoutingStart(source) {
66
+ return source.search(/^\/\/(?:#region)? virtual:void-routes\r?$/m);
67
+ }
64
68
  /** Read only the pinned generator's literal registrations, never application source. */
65
69
  export function readVoidPlan(source) {
66
- const start = source.indexOf("//#region virtual:void-routes\n");
67
- const end = source.indexOf("//#region .void/entry.ts\n", start);
68
- if (start < 0 || end < 0)
70
+ const start = voidRoutingStart(source);
71
+ const end = source.search(/^\/\/(?:#region)? \.void\/entry\.ts\r?$/m);
72
+ if (start < 0 || end <= start)
69
73
  throw new Error("Unknown Void generated routing entry");
70
74
  const program = parseAst(source);
71
75
  const declarations = new Map();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-workers-native",
3
- "version": "0.1.2-beta.local.sha2f5e4e6956f4",
3
+ "version": "0.1.2-beta.pr66.shac45d68b01e08",
4
4
  "license": "MIT",
5
5
  "description": "Bring Cloudflare Workers apps to iOS and Android.",
6
6
  "repository": {
@@ -23,8 +23,7 @@
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public",
26
- "tag": "beta",
27
- "registry": "https://registry.npmjs.org"
26
+ "tag": "beta"
28
27
  },
29
28
  "type": "module",
30
29
  "files": [
@@ -151,6 +150,5 @@
151
150
  "android": {
152
151
  "src": "native/android"
153
152
  }
154
- },
155
- "gitHead": "2f5e4e6956f41b2904f8a6b9c81cccf35c908b9a"
153
+ }
156
154
  }