diff --git a/bin/cli.ts b/bin/cli.ts index fda3ca5..4dd8418 100644 --- a/bin/cli.ts +++ b/bin/cli.ts @@ -3,7 +3,7 @@ import { program, Option } from 'commander'; import log from 'loglevel'; import packageJson from '../package.json'; import BuilderProvider from './builders/BuilderProvider'; -import { DEFAULT_PAKE_OPTIONS as DEFAULT } from './defaults'; +import { DEFAULT_PAKE_OPTIONS as DEFAULT, DEFAULT_PAKE_OPTIONS } from './defaults'; import { checkUpdateTips } from './helpers/updater'; import handleInputOptions from './options/index'; @@ -28,31 +28,23 @@ program .option('--height ', 'Window height', validateNumberInput, DEFAULT.height) .option('--use-local-file', 'Use local file packaging', DEFAULT.useLocalFile) .option('--fullscreen', 'Start in full screen', DEFAULT.fullscreen) - .option('--hide-title-bar', 'Only for Mac, hide title bar', DEFAULT.hideTitleBar) - .option('--activation-shortcut ', 'Shortcut key to active App', DEFAULT.activationShortcut) + .option('--hide-title-bar', 'For Mac, hide title bar', DEFAULT.hideTitleBar) + .option('--multi-arch', 'For Mac, both Intel and M1', DEFAULT.multiArch) .option('--inject ', 'Injection of .js or .css files', DEFAULT.inject) - .option('--proxy-url ', "Proxy URL for all network requests", DEFAULT.proxyUrl) .option('--debug', 'Debug build and more output', DEFAULT.debug) - .option('--multi-arch', 'Only for Mac, supports both Intel and M1', DEFAULT.multiArch) + .addOption(new Option('--proxy-url ', 'Proxy URL for all network requests').default(DEFAULT_PAKE_OPTIONS.proxyUrl).hideHelp()) .addOption(new Option('--user-agent ', 'Custom user agent').default(DEFAULT.userAgent).hideHelp()) - .addOption( - new Option('--targets ', 'Only for Linux, option "deb" or "appimage"').default(DEFAULT.targets).hideHelp(), - ) + .addOption(new Option('--targets ', 'For Linux, option "deb" or "appimage"').default(DEFAULT.targets).hideHelp()) .addOption(new Option('--app-version ', 'App version, the same as package.json version').default(DEFAULT.appVersion).hideHelp()) .addOption(new Option('--always-on-top', 'Always on the top level').default(DEFAULT.alwaysOnTop).hideHelp()) .addOption(new Option('--dark-mode', 'Force Mac app to use dark mode').default(DEFAULT.darkMode).hideHelp()) + .addOption(new Option('--disabled-web-shortcuts', 'Disabled webPage shortcuts').default(DEFAULT.disabledWebShortcuts).hideHelp()) .addOption( - new Option('--disabled-web-shortcuts', 'Disabled webPage shortcuts') - .default(DEFAULT.disabledWebShortcuts) - .hideHelp(), + new Option('--activation-shortcut ', 'Shortcut key to active App').default(DEFAULT_PAKE_OPTIONS.activationShortcut).hideHelp(), ) .addOption(new Option('--show-system-tray', 'Show system tray in app').default(DEFAULT.showSystemTray).hideHelp()) - .addOption( - new Option('--system-tray-icon ', 'Custom system tray icon').default(DEFAULT.systemTrayIcon).hideHelp(), - ) - .addOption( - new Option('--installer-language ', 'Installer language').default(DEFAULT.installerLanguage).hideHelp(), - ) + .addOption(new Option('--system-tray-icon ', 'Custom system tray icon').default(DEFAULT.systemTrayIcon).hideHelp()) + .addOption(new Option('--installer-language ', 'Installer language').default(DEFAULT.installerLanguage).hideHelp()) .version(packageJson.version, '-v, --version', 'Output the current version') .action(async (url: string, options: PakeCliOptions) => { await checkUpdateTips(); diff --git a/dist/cli.js b/dist/cli.js index d192c6e..75805e9 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -610,7 +610,7 @@ class BaseBuilder { const tauriTargetPathExists = await fsExtra.pathExists(tauriTargetPath); if (!IS_MAC && !tauriTargetPathExists) { logger.warn('✼ The first use requires installing system dependencies.'); - logger.warn('✼ See more in https://tauri.app/guides/getting-started/prerequisites.'); + logger.warn('✼ See more in https://tauri.app/start/prerequisites/.'); } if (!checkRustInstalled()) { const res = await prompts({ @@ -967,20 +967,18 @@ program .option('--height ', 'Window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height) .option('--use-local-file', 'Use local file packaging', DEFAULT_PAKE_OPTIONS.useLocalFile) .option('--fullscreen', 'Start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen) - .option('--hide-title-bar', 'Only for Mac, hide title bar', DEFAULT_PAKE_OPTIONS.hideTitleBar) - .option('--activation-shortcut ', 'Shortcut key to active App', DEFAULT_PAKE_OPTIONS.activationShortcut) + .option('--hide-title-bar', 'For Mac, hide title bar', DEFAULT_PAKE_OPTIONS.hideTitleBar) + .option('--multi-arch', 'For Mac, both Intel and M1', DEFAULT_PAKE_OPTIONS.multiArch) .option('--inject ', 'Injection of .js or .css files', DEFAULT_PAKE_OPTIONS.inject) - .option('--proxy-url ', "Proxy URL for all network requests", DEFAULT_PAKE_OPTIONS.proxyUrl) .option('--debug', 'Debug build and more output', DEFAULT_PAKE_OPTIONS.debug) - .option('--multi-arch', 'Only for Mac, supports both Intel and M1', DEFAULT_PAKE_OPTIONS.multiArch) + .addOption(new Option('--proxy-url ', 'Proxy URL for all network requests').default(DEFAULT_PAKE_OPTIONS.proxyUrl).hideHelp()) .addOption(new Option('--user-agent ', 'Custom user agent').default(DEFAULT_PAKE_OPTIONS.userAgent).hideHelp()) - .addOption(new Option('--targets ', 'Only for Linux, option "deb" or "appimage"').default(DEFAULT_PAKE_OPTIONS.targets).hideHelp()) + .addOption(new Option('--targets ', 'For Linux, option "deb" or "appimage"').default(DEFAULT_PAKE_OPTIONS.targets).hideHelp()) .addOption(new Option('--app-version ', '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') - .default(DEFAULT_PAKE_OPTIONS.disabledWebShortcuts) - .hideHelp()) + .addOption(new Option('--disabled-web-shortcuts', 'Disabled webPage shortcuts').default(DEFAULT_PAKE_OPTIONS.disabledWebShortcuts).hideHelp()) + .addOption(new Option('--activation-shortcut ', 'Shortcut key to active App').default(DEFAULT_PAKE_OPTIONS.activationShortcut).hideHelp()) .addOption(new Option('--show-system-tray', 'Show system tray in app').default(DEFAULT_PAKE_OPTIONS.showSystemTray).hideHelp()) .addOption(new Option('--system-tray-icon ', 'Custom system tray icon').default(DEFAULT_PAKE_OPTIONS.systemTrayIcon).hideHelp()) .addOption(new Option('--installer-language ', 'Installer language').default(DEFAULT_PAKE_OPTIONS.installerLanguage).hideHelp())