pake-cli 3.1.0 → 3.1.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/dist/cli.js +16 -8
- package/package.json +1 -1
- package/src-tauri/Cargo.lock +219 -207
- package/src-tauri/Cargo.toml +3 -3
- package/src-tauri/gen/schemas/acl-manifests.json +1 -1
- package/src-tauri/gen/schemas/desktop-schema.json +50 -0
- package/src-tauri/gen/schemas/macOS-schema.json +50 -0
- package/src-tauri/src/lib.rs +4 -1
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import * as psl from 'psl';
|
|
|
20
20
|
import isUrl from 'is-url';
|
|
21
21
|
|
|
22
22
|
var name = "pake-cli";
|
|
23
|
-
var version$1 = "3.1.
|
|
23
|
+
var version$1 = "3.1.1";
|
|
24
24
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
|
25
25
|
var engines = {
|
|
26
26
|
node: ">=16.0.0"
|
|
@@ -486,9 +486,9 @@ async function mergeConfig(url, options, tauriConf) {
|
|
|
486
486
|
// Processing targets are currently only open to Linux.
|
|
487
487
|
if (platform === 'linux') {
|
|
488
488
|
delete tauriConf.bundle.linux.deb.files;
|
|
489
|
-
const validTargets = ['
|
|
489
|
+
const validTargets = ['deb', 'appimage', 'rpm'];
|
|
490
490
|
if (validTargets.includes(options.targets)) {
|
|
491
|
-
tauriConf.bundle.targets =
|
|
491
|
+
tauriConf.bundle.targets = [options.targets];
|
|
492
492
|
}
|
|
493
493
|
else {
|
|
494
494
|
logger.warn(`✼ The target must be one of ${validTargets.join(', ')}, the default 'deb' will be used.`);
|
|
@@ -728,15 +728,23 @@ class LinuxBuilder extends BaseBuilder {
|
|
|
728
728
|
super(options);
|
|
729
729
|
}
|
|
730
730
|
getFileName() {
|
|
731
|
-
const { name } = this.options;
|
|
732
|
-
const
|
|
733
|
-
|
|
731
|
+
const { name, targets } = this.options;
|
|
732
|
+
const version = tauriConfig.version;
|
|
733
|
+
let arch = process.arch === 'x64' ? 'amd64' : process.arch;
|
|
734
|
+
if (arch === 'arm64' && (targets === 'rpm' || targets === 'appimage')) {
|
|
735
|
+
arch = 'aarch64';
|
|
736
|
+
}
|
|
737
|
+
// The RPM format uses different separators and version number formats
|
|
738
|
+
if (targets === 'rpm') {
|
|
739
|
+
return `${name}-${version}-1.${arch}`;
|
|
740
|
+
}
|
|
741
|
+
return `${name}_${version}_${arch}`;
|
|
734
742
|
}
|
|
735
743
|
// Customize it, considering that there are all targets.
|
|
736
744
|
async build(url) {
|
|
737
|
-
const targetTypes = ['deb', 'appimage'];
|
|
745
|
+
const targetTypes = ['deb', 'appimage', 'rpm'];
|
|
738
746
|
for (const target of targetTypes) {
|
|
739
|
-
if (this.options.targets === target
|
|
747
|
+
if (this.options.targets === target) {
|
|
740
748
|
await this.buildAndCopy(url, target);
|
|
741
749
|
}
|
|
742
750
|
}
|