✨ CLI support set app version
This commit is contained in:
10
dist/cli.js
vendored
10
dist/cli.js
vendored
@@ -20,7 +20,7 @@ import * as psl from 'psl';
|
||||
import isUrl from 'is-url';
|
||||
|
||||
var name = "pake-cli";
|
||||
var version$1 = "3.0.3";
|
||||
var version$1 = "3.1.0";
|
||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
|
||||
var engines = {
|
||||
node: ">=16.0.0"
|
||||
@@ -70,7 +70,7 @@ var dependencies = {
|
||||
"@tauri-apps/api": "^1.6.0",
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
axios: "^1.7.9",
|
||||
chalk: "^5.4.0",
|
||||
chalk: "^5.4.1",
|
||||
commander: "^11.1.0",
|
||||
"file-type": "^18.7.0",
|
||||
"fs-extra": "^11.2.0",
|
||||
@@ -426,7 +426,7 @@ async function combineFiles(files, output) {
|
||||
}
|
||||
|
||||
async function mergeConfig(url, options, tauriConf) {
|
||||
const { width, height, fullscreen, hideTitleBar, alwaysOnTop, darkMode, disabledWebShortcuts, activationShortcut, userAgent, showSystemTray, systemTrayIcon, useLocalFile, identifier, name, resizable = true, inject, proxyUrl, installerLanguage, } = options;
|
||||
const { width, height, fullscreen, hideTitleBar, alwaysOnTop, appVersion, darkMode, disabledWebShortcuts, activationShortcut, userAgent, showSystemTray, systemTrayIcon, useLocalFile, identifier, name, resizable = true, inject, proxyUrl, installerLanguage, } = options;
|
||||
const { platform } = process;
|
||||
// Set Windows parameters.
|
||||
const tauriConfWindowOptions = {
|
||||
@@ -443,6 +443,8 @@ async function mergeConfig(url, options, tauriConf) {
|
||||
Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions });
|
||||
tauriConf.productName = name;
|
||||
tauriConf.identifier = identifier;
|
||||
console.log('tauriConf appVersion>>>>>>>>>>>>>>>>>>>>>>>', appVersion);
|
||||
tauriConf.version = appVersion;
|
||||
if (platform == 'win32') {
|
||||
tauriConf.bundle.windows.wix.language[0] = installerLanguage;
|
||||
}
|
||||
@@ -773,6 +775,7 @@ const DEFAULT_PAKE_OPTIONS = {
|
||||
resizable: true,
|
||||
hideTitleBar: false,
|
||||
alwaysOnTop: false,
|
||||
appVersion: '1.0.0',
|
||||
darkMode: false,
|
||||
disabledWebShortcuts: false,
|
||||
activationShortcut: '',
|
||||
@@ -974,6 +977,7 @@ program
|
||||
.option('--multi-arch', 'Only for Mac, supports both Intel and M1', DEFAULT_PAKE_OPTIONS.multiArch)
|
||||
.addOption(new Option('--user-agent <string>', 'Custom user agent').default(DEFAULT_PAKE_OPTIONS.userAgent).hideHelp())
|
||||
.addOption(new Option('--targets <string>', 'Only for Linux, option "deb" or "appimage"').default(DEFAULT_PAKE_OPTIONS.targets).hideHelp())
|
||||
.addOption(new Option('--app-version <string>', 'App version, the same as package.json version').default(DEFAULT_PAKE_OPTIONS.appVersion).hideHelp())
|
||||
.addOption(new Option('--always-on-top', 'Always on the top level').default(DEFAULT_PAKE_OPTIONS.alwaysOnTop).hideHelp())
|
||||
.addOption(new Option('--dark-mode', 'Force Mac app to use dark mode').default(DEFAULT_PAKE_OPTIONS.darkMode).hideHelp())
|
||||
.addOption(new Option('--disabled-web-shortcuts', 'Disabled webPage shortcuts')
|
||||
|
||||
Reference in New Issue
Block a user