omnicrawl-cli 0.1.69 → 0.1.71

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
@@ -1,63 +1,75 @@
1
- # omnicrawl-cli
2
-
3
- OmniCrawl 启动器:按 `platform-arch` 选包node_modules的内核二进制,把 stdio 转交给它。
4
- 它不做协议转换——宿主直接与内核进程对话(协议见 `rust/docs/protocol-v1.md`)。
5
-
6
- ## 分发形态
7
-
8
- | npm 包 | 内容 |
9
- | --- | --- |
10
- | `omnicrawl-cli` | JS 启动器(`bin/omnicrawl.mjs`) |
11
- | `@omnicrawl/cli-linux-x64` | 内核二进制(Linux x64,musl 静态) |
12
- | `@omnicrawl/cli-linux-arm64-musl` | 内核二进制(Linux arm64,嵌入式目标) |
13
- | `@omnicrawl/cli-win32-x64` | 内核二进制(Windows x64) |
14
-
15
- **平台分包、`os`/`cpu` 与平台依赖只出现在发布产物里**(`dist/npm/`)。仓库内的 `packages/cli*/package.json`
16
- 刻意不带 `os`/`cpu`、也不声明平台分包依赖:npm 安装时会校验工作区成员的 `os`/`cpu`,带上就直接
17
- `notsup` 失败。发布产物由 `scripts/prepare.mjs` 生成。
18
-
19
- ## 本地开发
20
-
21
- ```bash
22
- cargo build --release -p omnicrawl-cli # 产物:rust/target/release/omnicrawl[.exe]
23
- node packages/cli/scripts/prepare.mjs # 暂存发布产物(缺的平台只警告)
24
- npm test -w omnicrawl-cli # e2e:真二进制 + 协议 v1
25
- OMNICRAWL_BINARY=/path/to/omnicrawl node packages/cli/bin/omnicrawl.mjs --version
26
- ```
27
-
28
- 工作区里 `@omnicrawl/cli-*` 都是 workspace 成员,启动器靠 `createRequire` 解析到它们;
29
- `OMNICRAWL_BINARY` 是直接指定二进制的逃生口(e2e 用的就是它)。e2e 需要 `rust/target/release`
30
- 里有产物,否则跳过并打印构建命令。
31
-
32
- ## 发布
33
-
34
- 1. 交叉编译三个平台(Linux 走 musl 静态,嵌入式目标优先):
35
-
36
- ```bash
37
- cargo build --release -p omnicrawl-cli --target x86_64-pc-windows-msvc
38
- cargo build --release -p omnicrawl-cli --target x86_64-unknown-linux-musl
39
- cargo build --release -p omnicrawl-cli --target aarch64-unknown-linux-musl
40
- ```
41
-
42
- 2. 门槛检查(缺任何平台会失败并列出缺失平台):
43
-
44
- ```bash
45
- node packages/cli/scripts/prepare.mjs --require-all
46
- ```
47
-
48
- 3. 按顺序发布暂存产物:平台包在前,启动器在后(启动器的 `optionalDependencies` 是精确版本,顺序反了会装不到):
49
-
50
- ```bash
51
- npm publish dist/npm/cli-linux-x64
52
- npm publish dist/npm/cli-linux-arm64-musl
53
- npm publish dist/npm/cli-win32-x64
54
- npm publish dist/npm/cli
55
- ```
56
-
57
- 脚本跑完会把这几行命令直接打出来。
58
-
59
- 4. 版本reproducibility:四个包同版本;平台包只装二进制,升级它们就是换内核。
60
-
61
- ## 发布前自检
62
-
63
- `cargo test --workspace`、`npm test --workspaces`,以及 `prepare --require-all` 门槛。
1
+ # omnicrawl-cli
2
+
3
+ OmniCrawl 启动器:按 `platform-arch` 选包node_modules的内核二进制,把 stdio 转交给它。
4
+ 它不做协议转换——宿主直接与内核进程对话(协议见 `rust/docs/protocol-v1.md`)。
5
+
6
+ ## 分发形态
7
+
8
+ | npm 包 | 内容 |
9
+ | --- | --- |
10
+ | `omnicrawl-cli` | JS 启动器(`bin/omnicrawl.mjs`) |
11
+ | `@omnicrawl/cli-linux-x64` | 内核二进制(Linux x64,musl 静态) |
12
+ | `@omnicrawl/cli-linux-arm-musl` | 内核二进制(Linux armv7,musl 静态,嵌入式目标) |
13
+ | `@omnicrawl/cli-linux-arm64-musl` | 内核二进制(Linux arm64,嵌入式目标) |
14
+ | `@omnicrawl/cli-win32-x64` | 内核二进制(Windows x64) |
15
+
16
+ **平台分包、`os`/`cpu` 与平台依赖只出现在发布产物里**(`dist/npm/`)。仓库内的 `packages/cli*/package.json`
17
+ 刻意不带 `os`/`cpu`、也不声明平台分包依赖:npm 安装时会校验工作区成员的 `os`/`cpu`,带上就直接
18
+ `notsup` 失败。发布产物由 `scripts/prepare.mjs` 生成。
19
+
20
+ ## 本地开发
21
+
22
+ ```bash
23
+ cargo build --release -p omnicrawl-cli # 产物:rust/target/release/omnicrawl[.exe]
24
+ node packages/cli/scripts/prepare.mjs # 暂存发布产物(缺的平台只警告)
25
+ npm test -w omnicrawl-cli # e2e:真二进制 + 协议 v1
26
+ OMNICRAWL_BINARY=/path/to/omnicrawl node packages/cli/bin/omnicrawl.mjs --version
27
+ ```
28
+
29
+ 工作区里 `@omnicrawl/cli-*` 都是 workspace 成员,启动器靠 `createRequire` 解析到它们;
30
+ `OMNICRAWL_BINARY` 是直接指定二进制的逃生口(e2e 用的就是它)。e2e 需要 `rust/target/release`
31
+ 里有产物,否则跳过并打印构建命令。
32
+
33
+ ## 发布
34
+
35
+ 手动发布前先 `npm login`(CI 走 Trusted Publishing,无需登录与 token)。
36
+
37
+ 1. 交叉编译各平台(Linux musl 静态,嵌入式目标优先):
38
+
39
+ ```bash
40
+ cargo build --release -p omnicrawl-cli --target x86_64-pc-windows-msvc
41
+ cargo build --release -p omnicrawl-cli --target x86_64-unknown-linux-musl
42
+ cargo build --release -p omnicrawl-cli --target aarch64-unknown-linux-musl
43
+ cargo build --release -p omnicrawl-cli --target armv7-unknown-linux-musleabihf
44
+ ```
45
+
46
+ 非 Linux 宿主没有 musl 链接器,Linux 目标改用 `cargo zigbuild`(需 `zig` 与
47
+ `rustup target add <triple>`):
48
+
49
+ ```bash
50
+ cargo zigbuild --release -p omnicrawl-cli --target armv7-unknown-linux-musleabihf
51
+ ```
52
+
53
+ 2. 门槛检查(缺任何平台会失败并列出缺失平台):
54
+
55
+ ```bash
56
+ node packages/cli/scripts/prepare.mjs --require-all
57
+ ```
58
+
59
+ 3. 按顺序发布暂存产物:平台包在前,启动器在后(启动器的 `optionalDependencies` 是精确版本,顺序反了会装不到):
60
+
61
+ ```bash
62
+ npm publish dist/npm/cli-linux-x64
63
+ npm publish dist/npm/cli-linux-arm-musl
64
+ npm publish dist/npm/cli-linux-arm64-musl
65
+ npm publish dist/npm/cli-win32-x64
66
+ npm publish dist/npm/cli
67
+ ```
68
+
69
+ 脚本跑完会把这几行命令直接打出来。
70
+
71
+ 4. 版本reproducibility:平台分包与启动器同版本;平台包只装二进制,升级它们就是换内核。
72
+
73
+ ## 发布前自检
74
+
75
+ `cargo test --workspace`、`npm test --workspaces`,以及 `prepare --require-all` 门槛。
package/bin/omnicrawl.mjs CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  // OmniCrawl 启动器:按 platform/arch 选出内核二进制并转交 stdio。
3
3
  //
4
4
  // 它不做任何协议转换——宿主直接与内核进程对话,启动器只是平台分包的解析器。
@@ -10,6 +10,7 @@ import process from 'node:process'
10
10
 
11
11
  const PLATFORM_PACKAGES = {
12
12
  'linux-x64': '@omnicrawl/cli-linux-x64',
13
+ 'linux-arm': '@omnicrawl/cli-linux-arm-musl',
13
14
  'linux-arm64': '@omnicrawl/cli-linux-arm64-musl',
14
15
  'win32-x64': '@omnicrawl/cli-win32-x64',
15
16
  'win32-ia32': '@omnicrawl/cli-win32-ia32',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnicrawl-cli",
3
- "version": "0.1.69",
3
+ "version": "0.1.71",
4
4
  "description": "OmniCrawl 启动器:按平台选择内核二进制并转交 stdio",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,9 +24,10 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "optionalDependencies": {
27
- "@omnicrawl/cli-win32-x64": "0.1.69",
28
- "@omnicrawl/cli-win32-ia32": "0.1.69",
29
- "@omnicrawl/cli-linux-x64": "0.1.69",
30
- "@omnicrawl/cli-linux-arm64-musl": "0.1.69"
27
+ "@omnicrawl/cli-win32-x64": "0.1.71",
28
+ "@omnicrawl/cli-win32-ia32": "0.1.71",
29
+ "@omnicrawl/cli-linux-x64": "0.1.71",
30
+ "@omnicrawl/cli-linux-arm-musl": "0.1.71",
31
+ "@omnicrawl/cli-linux-arm64-musl": "0.1.71"
31
32
  }
32
33
  }