pake-cli 2.1.7 → 2.1.9
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/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -159,7 +159,7 @@ In addition, double-click the title bar to switch to full-screen mode. For Mac u
|
|
|
159
159
|
|
|
160
160
|

|
|
161
161
|
|
|
162
|
-
**Pake provides a command line tool, making the flow of package customization quicker and easier. See [documentation](./bin/
|
|
162
|
+
**Pake provides a command line tool, making the flow of package customization quicker and easier. See [documentation](./bin/README.md) for more information.**
|
|
163
163
|
|
|
164
164
|
```bash
|
|
165
165
|
# Install with npm
|
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.9";
|
|
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"
|
|
@@ -205,7 +205,7 @@ var tauri$2 = {
|
|
|
205
205
|
"png/weread_256.ico",
|
|
206
206
|
"png/weread_32.ico"
|
|
207
207
|
],
|
|
208
|
-
identifier: "com.
|
|
208
|
+
identifier: "com.pake.weread",
|
|
209
209
|
active: true,
|
|
210
210
|
category: "DeveloperTool",
|
|
211
211
|
copyright: "",
|
|
@@ -241,7 +241,7 @@ var tauri$1 = {
|
|
|
241
241
|
icon: [
|
|
242
242
|
"icons/weread.icns"
|
|
243
243
|
],
|
|
244
|
-
identifier: "com.
|
|
244
|
+
identifier: "com.pake.weread",
|
|
245
245
|
active: true,
|
|
246
246
|
category: "DeveloperTool",
|
|
247
247
|
copyright: "",
|
|
@@ -273,7 +273,7 @@ var tauri = {
|
|
|
273
273
|
icon: [
|
|
274
274
|
"png/weread_512.png"
|
|
275
275
|
],
|
|
276
|
-
identifier: "com.
|
|
276
|
+
identifier: "com.pake.weread",
|
|
277
277
|
active: true,
|
|
278
278
|
category: "DeveloperTool",
|
|
279
279
|
copyright: "",
|
|
@@ -283,7 +283,7 @@ var tauri = {
|
|
|
283
283
|
"wget"
|
|
284
284
|
],
|
|
285
285
|
files: {
|
|
286
|
-
"/usr/share/applications/com-
|
|
286
|
+
"/usr/share/applications/com-pake-weread.desktop": "assets/com-pake-weread.desktop"
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
289
|
externalBin: [
|
|
@@ -323,7 +323,7 @@ let tauriConfig = {
|
|
|
323
323
|
// Generates an identifier based on the given URL.
|
|
324
324
|
function getIdentifier(url) {
|
|
325
325
|
const postFixHash = crypto.createHash('md5').update(url).digest('hex').substring(0, 6);
|
|
326
|
-
return `pake
|
|
326
|
+
return `com.pake.${postFixHash}`;
|
|
327
327
|
}
|
|
328
328
|
async function promptText(message, initial) {
|
|
329
329
|
const response = await prompts({
|
|
@@ -613,9 +613,12 @@ class BaseBuilder {
|
|
|
613
613
|
this.options = options;
|
|
614
614
|
}
|
|
615
615
|
async prepare() {
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
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) {
|
|
620
|
+
logger.warn('✼ The first use requires installing system dependencies.');
|
|
621
|
+
logger.warn('✼ See more in https://tauri.app/v1/guides/getting-started/prerequisites.');
|
|
619
622
|
}
|
|
620
623
|
if (!checkRustInstalled()) {
|
|
621
624
|
const res = await prompts({
|
|
@@ -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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[Desktop Entry]
|
|
2
2
|
Encoding=UTF-8
|
|
3
3
|
Categories=Office
|
|
4
|
-
Exec=com-
|
|
5
|
-
Icon=com-
|
|
6
|
-
Name=com-
|
|
4
|
+
Exec=com-pake-weread
|
|
5
|
+
Icon=com-pake-weread
|
|
6
|
+
Name=com-pake-weread
|
|
7
7
|
Name[zh_CN]=微信阅读
|
|
8
8
|
StartupNotify=true
|
|
9
9
|
Terminal=false
|
|
10
|
-
Type=Application
|
|
10
|
+
Type=Application
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"tauri": {
|
|
3
3
|
"bundle": {
|
|
4
4
|
"icon": ["png/weread_512.png"],
|
|
5
|
-
"identifier": "com.
|
|
5
|
+
"identifier": "com.pake.weread",
|
|
6
6
|
"active": true,
|
|
7
7
|
"category": "DeveloperTool",
|
|
8
8
|
"copyright": "",
|
|
9
9
|
"deb": {
|
|
10
10
|
"depends": ["curl", "wget"],
|
|
11
11
|
"files": {
|
|
12
|
-
"/usr/share/applications/com-
|
|
12
|
+
"/usr/share/applications/com-pake-weread.desktop": "assets/com-pake-weread.desktop"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"externalBin": [],
|