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.
- package/dist/cli.js +13 -7
- 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.
|
|
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
|
-
|
|
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
|
|
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