@yufengtadian/freedom-cli 1.12.0 → 1.12.1

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,19 +1,6 @@
1
- ---
2
- AIGC:
3
- Label: "1"
4
- ContentProducer: 001191440300708461136T1XGW3
5
- ProduceID: 84e692d233baf4c4ebb909c06f044dd3_2d74bd4d9c4911f184de525400f8a581
6
- ReservedCode1: xo2+Pdj5CsKT7YjGd4Rry/qknv3mVecOBHAw6HqFk7EuALvKYsLlY/JCDoqw3oHEfX+sRjzs+lLZfypsJxbkr73mtQrkuHrqQIZ8f4A7vIr7hTO5V+aMiCz29hrSmbNXeI0q5SXfE/orzUoL63JrdZc1HpZGj82RLwzxXZA/d59gHWK/oYb4EXzirS8=
7
- ContentPropagator: 001191440300708461136T1XGW3
8
- PropagateID: 84e692d233baf4c4ebb909c06f044dd3_2d74bd4d9c4911f184de525400f8a581
9
- ReservedCode2: xo2+Pdj5CsKT7YjGd4Rry/qknv3mVecOBHAw6HqFk7EuALvKYsLlY/JCDoqw3oHEfX+sRjzs+lLZfypsJxbkr73mtQrkuHrqQIZ8f4A7vIr7hTO5V+aMiCz29hrSmbNXeI0q5SXfE/orzUoL63JrdZc1HpZGj82RLwzxXZA/d59gHWK/oYb4EXzirS8=
10
- ---
11
-
12
-
13
-
14
1
  # freedom-cli
15
2
 
16
- Freedom 桌面壳打包工具:把你的 Web 前端一键打包成跨平台桌面应用(v1.12.0)。
3
+ Freedom 桌面壳打包工具:把你的 Web 前端一键打包成跨平台桌面应用(v1.12.1)。
17
4
 
18
5
  基于自研 Freedom WebView 壳层(对标 Wails / Tauri):前端完全自由、后端可任意语言、渲染复用系统 WebView(Windows WebView2 / macOS WKWebView / Linux WebKitGTK),产物为单个可执行文件 + resources 目录,前端页面内存加载,不占本地端口。
19
6
 
@@ -200,5 +187,4 @@ export default {
200
187
  ## License
201
188
 
202
189
  MIT
203
- *(内容由AI生成,仅供参考)*
204
- *(内容由AI生成,仅供参考)*
190
+
package/lib/build.js CHANGED
@@ -57,7 +57,7 @@ function parsePlatforms(raw) {
57
57
  if (!raw) return [nativePlatform()];
58
58
  const v = String(raw).toLowerCase();
59
59
  if (v === 'all') return ALL_PLATFORMS;
60
- const keyMap = { win: 'win-x64', mac: 'darwin-x64', linux: 'linux-x64' };
60
+ const keyMap = { win: 'win-x64', mac: 'darwin-arm64', linux: 'linux-x64' };
61
61
  if (keyMap[v]) return [keyMap[v]];
62
62
  if (ALL_PLATFORMS.includes(v)) return [v];
63
63
  throw new Error(
package/lib/cli.js CHANGED
@@ -33,7 +33,7 @@ freedom - Freedom 桌面壳打包工具 v${VERSION}
33
33
  freedom help 显示本帮助
34
34
  freedom version 显示版本
35
35
 
36
- 平台(<p>/<plat>):win-x64 / darwin-x64 / darwin-arm64 / linux-x64 / linux-arm64,
36
+ 平台(<p>/<plat>):win-x64 / darwin-arm64 / linux-x64 / linux-arm64,
37
37
  快捷别名:win / mac / linux / all。
38
38
 
39
39
  macOS 产物说明:
@@ -197,7 +197,7 @@ async function runShell(rest) {
197
197
  case 'download': {
198
198
  const plat = rest[1];
199
199
  if (!plat) {
200
- console.error('[freedom] 用法:freedom shell download <win-x64|darwin-x64|darwin-arm64|linux-x64|linux-arm64>');
200
+ console.error('[freedom] 用法:freedom shell download <win-x64|darwin-arm64|linux-x64|linux-arm64>');
201
201
  return 1;
202
202
  }
203
203
  const dest = await downloadShell(plat);
@@ -207,7 +207,7 @@ async function runShell(rest) {
207
207
  case 'build': {
208
208
  const plat = rest[1];
209
209
  if (!plat) {
210
- console.error('[freedom] 用法:freedom shell build <win-x64|darwin-x64|darwin-arm64|linux-x64|linux-arm64>');
210
+ console.error('[freedom] 用法:freedom shell build <win-x64|darwin-arm64|linux-x64|linux-arm64>');
211
211
  return 1;
212
212
  }
213
213
  const dest = buildShell(plat);
@@ -235,7 +235,7 @@ async function runDmg(rest) {
235
235
  ? (platArg.includes('=') ? platArg.split('=')[1] : rest[rest.indexOf(platArg) + 1])
236
236
  : nativePlatform();
237
237
  if (!plat || !plat.startsWith('darwin')) {
238
- console.error('[freedom] dmg 仅支持 macOS 平台(darwin-x64 / darwin-arm64)。');
238
+ console.error('[freedom] dmg 仅支持 macOS 平台(darwin-arm64)。');
239
239
  return 1;
240
240
  }
241
241
 
package/lib/utils.js CHANGED
@@ -28,11 +28,10 @@ function shellDir() {
28
28
  // 平台矩阵:key -> { exe 文件名(壳二进制名) }
29
29
  // 通用壳为三平台预编译二进制,应用内容通过 exe 同目录 resources/ 外部加载,
30
30
  // 因此同一壳可复用于任意应用,打包时无需任何语言工具链。
31
- const ALL_PLATFORMS = ['win-x64', 'darwin-x64', 'darwin-arm64', 'linux-x64', 'linux-arm64'];
31
+ const ALL_PLATFORMS = ['win-x64', 'darwin-arm64', 'linux-x64', 'linux-arm64'];
32
32
 
33
33
  const SHELL_EXE_NAME = {
34
34
  'win-x64': 'freedom-shell.exe',
35
- 'darwin-x64': 'freedom-shell',
36
35
  'darwin-arm64': 'freedom-shell',
37
36
  'linux-x64': 'freedom-shell',
38
37
  'linux-arm64': 'freedom-shell',
@@ -57,7 +56,12 @@ function nativePlatform() {
57
56
  const plat = process.platform;
58
57
  const arch = process.arch;
59
58
  if (plat === 'win32') return 'win-x64';
60
- if (plat === 'darwin') return arch === 'arm64' ? 'darwin-arm64' : 'darwin-x64';
59
+ if (plat === 'darwin') {
60
+ if (arch !== 'arm64') {
61
+ throw new Error('已不支持 Intel Mac(darwin-x64):请改用 Apple Silicon Mac 构建 darwin-arm64,或直接使用 darwin-arm64 产物。');
62
+ }
63
+ return 'darwin-arm64';
64
+ }
61
65
  if (plat === 'linux') return arch === 'arm64' ? 'linux-arm64' : 'linux-x64';
62
66
  return `${plat}-${arch}`;
63
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yufengtadian/freedom-cli",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Freedom WebView desktop shell packaging tool - no Go toolchain required, one command packs three-platform desktop apps",
5
5
  "keywords": [
6
6
  "desktop",