pake-cli 3.7.4 → 3.7.6

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,4 +1,4 @@
1
- <h4 align="right"><strong>English</strong> | <a href="README_CN.md">简体中文</a> | <a href="README_JP.md">日本語</a></h4>
1
+ <h4 align="right"><strong>English</strong> | <a href="README_CN.md">简体中文</a></h4>
2
2
  <p align="center">
3
3
  <img src=https://gw.alipayobjects.com/zos/k/fa/logo-modified.png width=138/>
4
4
  </p>
@@ -196,7 +196,7 @@ For style customization, feature enhancement, container communication and other
196
196
  Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️
197
197
 
198
198
  <a href="https://github.com/tw93/Pake/graphs/contributors">
199
- <img src="https://raw.githubusercontent.com/tw93/Pake/main/CONTRIBUTORS.svg?sanitize=true" alt="Contributors" width="1000" />
199
+ <img src="./CONTRIBUTORS.svg?v=2" alt="Contributors" width="1000" />
200
200
  </a>
201
201
 
202
202
  ## Support
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import * as psl from 'psl';
22
22
  import { InvalidArgumentError, program as program$1, Option } from 'commander';
23
23
 
24
24
  var name = "pake-cli";
25
- var version = "3.7.4";
25
+ var version = "3.7.6";
26
26
  var description = "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。";
27
27
  var engines = {
28
28
  node: ">=18.0.0"
@@ -843,10 +843,10 @@ class BaseBuilder {
843
843
  logger.info(`✺ Located in China, using ${packageManager}/rsProxy CN mirror.`);
844
844
  const projectCnConf = path.join(tauriSrcPath, 'rust_proxy.toml');
845
845
  await fsExtra.copy(projectCnConf, projectConf);
846
- await shellExec(`cd "${npmDirectory}" && ${packageManager} install${registryOption}${peerDepsOption}`, timeout, buildEnv);
846
+ await shellExec(`cd "${npmDirectory}" && ${packageManager} install${registryOption}${peerDepsOption}`, timeout, { ...buildEnv, CI: 'true' });
847
847
  }
848
848
  else {
849
- await shellExec(`cd "${npmDirectory}" && ${packageManager} install${peerDepsOption}`, timeout, buildEnv);
849
+ await shellExec(`cd "${npmDirectory}" && ${packageManager} install${peerDepsOption}`, timeout, { ...buildEnv, CI: 'true' });
850
850
  }
851
851
  spinner.succeed(chalk.green('Package installed!'));
852
852
  }
@@ -862,7 +862,7 @@ class BaseBuilder {
862
862
  try {
863
863
  const projectCnConf = path.join(tauriSrcPath, 'rust_proxy.toml');
864
864
  await fsExtra.copy(projectCnConf, projectConf);
865
- await shellExec(`cd "${npmDirectory}" && ${packageManager} install${registryOption}${peerDepsOption}`, timeout, buildEnv);
865
+ await shellExec(`cd "${npmDirectory}" && ${packageManager} install${registryOption}${peerDepsOption}`, timeout, { ...buildEnv, CI: 'true' });
866
866
  retrySpinner.succeed(chalk.green('Package installed with CN mirror!'));
867
867
  }
868
868
  catch (retryError) {
@@ -1276,6 +1276,7 @@ class WinBuilder extends BaseBuilder {
1276
1276
  class LinuxBuilder extends BaseBuilder {
1277
1277
  constructor(options) {
1278
1278
  super(options);
1279
+ this.currentBuildType = '';
1279
1280
  const target = options.targets || 'deb';
1280
1281
  if (target.includes('-arm64')) {
1281
1282
  this.buildFormat = target.replace('-arm64', '');
@@ -1306,7 +1307,7 @@ class LinuxBuilder extends BaseBuilder {
1306
1307
  }
1307
1308
  }
1308
1309
  }
1309
- if (targets === 'rpm') {
1310
+ if (this.currentBuildType === 'rpm') {
1310
1311
  return `${name}-${version}-1.${arch}`;
1311
1312
  }
1312
1313
  return `${name}_${version}_${arch}`;
@@ -1318,10 +1319,16 @@ class LinuxBuilder extends BaseBuilder {
1318
1319
  .map((t) => t.trim());
1319
1320
  for (const target of targetTypes) {
1320
1321
  if (requestedTargets.includes(target)) {
1322
+ this.currentBuildType = target;
1321
1323
  await this.buildAndCopy(url, target);
1322
1324
  }
1323
1325
  }
1324
1326
  }
1327
+ // Override buildAndCopy to ensure currentBuildType is synced if called directly, though the loop above handles it most of the time.
1328
+ async buildAndCopy(url, target) {
1329
+ this.currentBuildType = target;
1330
+ await super.buildAndCopy(url, target);
1331
+ }
1325
1332
  getBuildCommand(packageManager = 'pnpm') {
1326
1333
  const configPath = path.join('src-tauri', '.pake', 'tauri.conf.json');
1327
1334
  const buildTarget = this.buildArch === 'arm64'
@@ -1332,11 +1339,16 @@ class LinuxBuilder extends BaseBuilder {
1332
1339
  if (features.length > 0) {
1333
1340
  fullCommand += ` --features ${features.join(',')}`;
1334
1341
  }
1342
+ if (this.currentBuildType) {
1343
+ fullCommand += ` --bundles ${this.currentBuildType}`;
1344
+ }
1335
1345
  // Enable verbose output for AppImage builds when debugging or PAKE_VERBOSE is set.
1336
1346
  // AppImage builds often fail with minimal error messages from linuxdeploy,
1337
1347
  // so verbose mode helps diagnose issues like strip failures and missing dependencies.
1338
- if (this.options.targets === 'appimage' &&
1339
- (this.options.debug || process.env.PAKE_VERBOSE)) {
1348
+ if (this.currentBuildType === 'appimage' &&
1349
+ (this.options.targets.includes('appimage') ||
1350
+ this.options.debug ||
1351
+ process.env.PAKE_VERBOSE)) {
1340
1352
  fullCommand += ' --verbose';
1341
1353
  }
1342
1354
  return fullCommand;
@@ -1898,7 +1910,7 @@ const DEFAULT_PAKE_OPTIONS = {
1898
1910
  targets: (() => {
1899
1911
  switch (process.platform) {
1900
1912
  case 'linux':
1901
- return 'deb';
1913
+ return 'deb,appimage';
1902
1914
  case 'darwin':
1903
1915
  return 'dmg';
1904
1916
  case 'win32':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "3.7.4",
3
+ "version": "3.7.6",
4
4
  "description": "🤱🏻 Turn any webpage into a desktop app with one command. 🤱🏻 一键打包网页生成轻量桌面应用。",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -2539,7 +2539,7 @@ dependencies = [
2539
2539
 
2540
2540
  [[package]]
2541
2541
  name = "pake"
2542
- version = "3.7.3"
2542
+ version = "3.7.6"
2543
2543
  dependencies = [
2544
2544
  "serde",
2545
2545
  "serde_json",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pake"
3
- version = "3.7.3"
3
+ version = "3.7.6"
4
4
  description = "🤱🏻 Turn any webpage into a desktop app with Rust."
5
5
  authors = ["Tw93"]
6
6
  license = "MIT"
@@ -58,12 +58,16 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
58
58
  .visible(false)
59
59
  .user_agent(user_agent)
60
60
  .resizable(window_config.resizable)
61
- .fullscreen(window_config.fullscreen)
62
61
  .maximized(window_config.maximize)
63
62
  .inner_size(window_config.width, window_config.height)
64
63
  .always_on_top(window_config.always_on_top)
65
64
  .incognito(window_config.incognito);
66
65
 
66
+ #[cfg(any(target_os = "windows", target_os = "macos"))]
67
+ {
68
+ window_builder = window_builder.fullscreen(window_config.fullscreen);
69
+ }
70
+
67
71
  if window_config.min_width > 0.0 || window_config.min_height > 0.0 {
68
72
  let min_w = if window_config.min_width > 0.0 {
69
73
  window_config.min_width
@@ -99,6 +99,16 @@ pub fn run_app() {
99
99
  tauri::async_runtime::spawn(async move {
100
100
  tokio::time::sleep(tokio::time::Duration::from_millis(WINDOW_SHOW_DELAY)).await;
101
101
  window_clone.show().unwrap();
102
+
103
+ // Fixed: Linux fullscreen issue with virtual keyboard
104
+ #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
105
+ {
106
+ if init_fullscreen {
107
+ window_clone.set_fullscreen(true).unwrap();
108
+ // Ensure webview maintains focus for input after fullscreen
109
+ let _ = window_clone.set_focus();
110
+ }
111
+ }
102
112
  });
103
113
  }
104
114
 
@@ -117,6 +127,14 @@ pub fn run_app() {
117
127
  tokio::time::sleep(Duration::from_millis(900)).await;
118
128
  }
119
129
  }
130
+ #[cfg(all(not(target_os = "windows"), not(target_os = "macos")))]
131
+ {
132
+ if window.is_fullscreen().unwrap_or(false) {
133
+ window.set_fullscreen(false).unwrap();
134
+ // Restore focus after exiting fullscreen to fix input issues
135
+ let _ = window.set_focus();
136
+ }
137
+ }
120
138
  window.minimize().unwrap();
121
139
  window.hide().unwrap();
122
140
  });