pake-cli 2.1.7 โ†’ 2.1.8

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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -20,7 +20,7 @@ import isUrl from 'is-url';
20
20
  import fs from 'fs';
21
21
 
22
22
  var name = "pake-cli";
23
- var version = "2.1.7";
23
+ var version = "2.1.8";
24
24
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚";
25
25
  var engines = {
26
26
  node: ">=16.0.0"
@@ -613,7 +613,10 @@ class BaseBuilder {
613
613
  this.options = options;
614
614
  }
615
615
  async prepare() {
616
- if (!IS_MAC) {
616
+ const tauriSrcPath = path.join(npmDirectory, 'src-tauri');
617
+ const tauriTargetPath = path.join(tauriSrcPath, 'target');
618
+ const tauriTargetPathExists = await fsExtra.pathExists(tauriTargetPath);
619
+ if (!IS_MAC && !tauriTargetPathExists) {
617
620
  logger.info('โœบ The first use requires installing system dependencies.');
618
621
  logger.info('โœบ See more in https://tauri.app/v1/guides/getting-started/prerequisites.');
619
622
  }
@@ -633,12 +636,12 @@ class BaseBuilder {
633
636
  }
634
637
  const isChina = await isChinaDomain('www.npmjs.com');
635
638
  const spinner = getSpinner('Installing package...');
639
+ const rustProjectDir = path.join(tauriSrcPath, '.cargo');
640
+ const projectConf = path.join(rustProjectDir, 'config');
641
+ await fsExtra.ensureDir(rustProjectDir);
636
642
  if (isChina) {
637
643
  logger.info('โœบ Located in China, using npm/rsProxy CN mirror.');
638
- const rustProjectDir = path.join(npmDirectory, 'src-tauri', '.cargo');
639
- await fsExtra.ensureDir(rustProjectDir);
640
- const projectCnConf = path.join(npmDirectory, 'src-tauri', 'rust_proxy.toml');
641
- const projectConf = path.join(rustProjectDir, 'config');
644
+ const projectCnConf = path.join(tauriSrcPath, 'rust_proxy.toml');
642
645
  await fsExtra.copy(projectCnConf, projectConf);
643
646
  await shellExec(`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com`);
644
647
  }
@@ -646,6 +649,9 @@ class BaseBuilder {
646
649
  await shellExec(`cd "${npmDirectory}" && npm install`);
647
650
  }
648
651
  spinner.succeed(chalk.green('Package installed!'));
652
+ if (!tauriTargetPathExists) {
653
+ logger.warn('โœผ The first packaging may be slow, please be patient and wait, it will be faster afterwards.');
654
+ }
649
655
  }
650
656
  async build(url) {
651
657
  await this.buildAndCopy(url, this.options.targets);
@@ -780,7 +786,7 @@ const DEFAULT_PAKE_OPTIONS = {
780
786
  };
781
787
 
782
788
  async function checkUpdateTips() {
783
- updateNotifier({ pkg: packageJson }).notify();
789
+ updateNotifier({ pkg: packageJson, updateCheckInterval: 1000 * 60 }).notify();
784
790
  }
785
791
 
786
792
  async function handleIcon(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust. ๐Ÿคฑ๐Ÿป ๅพˆ็ฎ€ๅ•็š„็”จ Rust ๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆๅพˆๅฐ็š„ๆกŒ้ข Appใ€‚",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"