@bghitcode/bghitapp 1.1.5 → 1.1.7
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 +37 -93
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import { InvalidArgumentError, program as program$1, Option } from 'commander';
|
|
|
20
20
|
import fs$1 from 'fs';
|
|
21
21
|
|
|
22
22
|
var name = "@bghitcode/bghitapp";
|
|
23
|
-
var version = "1.1.
|
|
23
|
+
var version = "1.1.7";
|
|
24
24
|
var description = "🤱🏻 Turn any webpage into a desktop app with one command — by BghitCode.";
|
|
25
25
|
var engines = {
|
|
26
26
|
node: ">=18.0.0"
|
|
@@ -2788,7 +2788,7 @@ function getCliProgram() {
|
|
|
2788
2788
|
.showHelpAfterError()
|
|
2789
2789
|
.argument('[url]', 'The web URL you want to package', validateUrlInput)
|
|
2790
2790
|
.option('--name <string>', 'Application name')
|
|
2791
|
-
.addOption(new Option('--identifier <string>', 'Application identifier / bundle ID')
|
|
2791
|
+
.addOption(new Option('--identifier <string>', 'Application identifier / bundle ID'))
|
|
2792
2792
|
.option('--icon <string>', 'Application icon', DEFAULT_BGHITAPP_OPTIONS.icon)
|
|
2793
2793
|
.option('--width <number>', 'Window width', validateNumberInput, DEFAULT_BGHITAPP_OPTIONS.width)
|
|
2794
2794
|
.option('--height <number>', 'Window height', validateNumberInput, DEFAULT_BGHITAPP_OPTIONS.height)
|
|
@@ -2808,37 +2808,25 @@ function getCliProgram() {
|
|
|
2808
2808
|
return previous ? [...previous, ...files] : files;
|
|
2809
2809
|
}, DEFAULT_BGHITAPP_OPTIONS.inject)
|
|
2810
2810
|
.option('--debug', 'Debug build and more output', DEFAULT_BGHITAPP_OPTIONS.debug)
|
|
2811
|
-
.addOption(new Option('--proxy-url <url>', 'Proxy URL for all network requests (http://, https://, socks5://)')
|
|
2812
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.proxyUrl)
|
|
2813
|
-
.hideHelp())
|
|
2811
|
+
.addOption(new Option('--proxy-url <url>', 'Proxy URL for all network requests (http://, https://, socks5://)').default(DEFAULT_BGHITAPP_OPTIONS.proxyUrl))
|
|
2814
2812
|
.addOption(new Option('--user-agent <string>', 'Custom user agent')
|
|
2815
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.userAgent)
|
|
2816
|
-
.hideHelp())
|
|
2813
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.userAgent))
|
|
2817
2814
|
.addOption(new Option('--targets <string>', 'Build target format for your system').default(DEFAULT_BGHITAPP_OPTIONS.targets))
|
|
2818
|
-
.addOption(new Option('--app-version <string>', 'App version, the same as package.json version')
|
|
2819
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.appVersion)
|
|
2820
|
-
.hideHelp())
|
|
2815
|
+
.addOption(new Option('--app-version <string>', 'App version, the same as package.json version').default(DEFAULT_BGHITAPP_OPTIONS.appVersion))
|
|
2821
2816
|
.addOption(new Option('--always-on-top', 'Always on the top level')
|
|
2822
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.alwaysOnTop)
|
|
2823
|
-
.hideHelp())
|
|
2817
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.alwaysOnTop))
|
|
2824
2818
|
.addOption(new Option('--maximize', 'Start window maximized')
|
|
2825
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.maximize)
|
|
2826
|
-
.hideHelp())
|
|
2819
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.maximize))
|
|
2827
2820
|
.addOption(new Option('--dark-mode', 'Force Mac app to use dark mode')
|
|
2828
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.darkMode)
|
|
2829
|
-
.hideHelp())
|
|
2821
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.darkMode))
|
|
2830
2822
|
.addOption(new Option('--disabled-web-shortcuts', 'Disabled webPage shortcuts')
|
|
2831
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.disabledWebShortcuts)
|
|
2832
|
-
.hideHelp())
|
|
2823
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.disabledWebShortcuts))
|
|
2833
2824
|
.addOption(new Option('--activation-shortcut <string>', 'Shortcut key to active App')
|
|
2834
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.activationShortcut)
|
|
2835
|
-
.hideHelp())
|
|
2825
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.activationShortcut))
|
|
2836
2826
|
.addOption(new Option('--show-system-tray', 'Show system tray in app')
|
|
2837
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.showSystemTray)
|
|
2838
|
-
.hideHelp())
|
|
2827
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.showSystemTray))
|
|
2839
2828
|
.addOption(new Option('--system-tray-icon <string>', 'Custom system tray icon')
|
|
2840
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.systemTrayIcon)
|
|
2841
|
-
.hideHelp())
|
|
2829
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.systemTrayIcon))
|
|
2842
2830
|
.addOption(new Option('--hide-on-close [boolean]', 'Hide window on close instead of exiting (default: true for macOS, false for others)')
|
|
2843
2831
|
.default(DEFAULT_BGHITAPP_OPTIONS.hideOnClose)
|
|
2844
2832
|
.argParser((value) => {
|
|
@@ -2849,42 +2837,26 @@ function getCliProgram() {
|
|
|
2849
2837
|
if (value === 'false')
|
|
2850
2838
|
return false;
|
|
2851
2839
|
throw new Error('--hide-on-close must be true or false');
|
|
2852
|
-
})
|
|
2853
|
-
.
|
|
2854
|
-
.addOption(new Option('--title <string>', 'Window title').hideHelp())
|
|
2840
|
+
}))
|
|
2841
|
+
.addOption(new Option('--title <string>', 'Window title'))
|
|
2855
2842
|
.addOption(new Option('--incognito', 'Launch app in incognito/private mode')
|
|
2856
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.incognito)
|
|
2857
|
-
.hideHelp())
|
|
2843
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.incognito))
|
|
2858
2844
|
.addOption(new Option('--wasm', 'Enable WebAssembly support (Flutter Web, etc.)')
|
|
2859
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.wasm)
|
|
2860
|
-
.hideHelp())
|
|
2845
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.wasm))
|
|
2861
2846
|
.addOption(new Option('--enable-drag-drop', 'Enable drag and drop functionality')
|
|
2862
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.enableDragDrop)
|
|
2863
|
-
.hideHelp())
|
|
2847
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.enableDragDrop))
|
|
2864
2848
|
.addOption(new Option('--keep-binary', 'Keep raw binary file alongside installer')
|
|
2865
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.keepBinary)
|
|
2866
|
-
.hideHelp())
|
|
2849
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.keepBinary))
|
|
2867
2850
|
.addOption(new Option('--multi-instance', 'Allow multiple app instances')
|
|
2868
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.multiInstance)
|
|
2869
|
-
.
|
|
2870
|
-
.addOption(new Option('--multi-window', 'Allow opening multiple windows within one app instance')
|
|
2871
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.multiWindow)
|
|
2872
|
-
.hideHelp())
|
|
2851
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.multiInstance))
|
|
2852
|
+
.addOption(new Option('--multi-window', 'Allow opening multiple windows within one app instance').default(DEFAULT_BGHITAPP_OPTIONS.multiWindow))
|
|
2873
2853
|
.addOption(new Option('--start-to-tray', 'Start app minimized to tray')
|
|
2874
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.startToTray)
|
|
2875
|
-
.
|
|
2876
|
-
.addOption(new Option('--
|
|
2877
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.
|
|
2878
|
-
.hideHelp())
|
|
2879
|
-
.addOption(new Option('--internal-url-regex <string>', 'Regex pattern to match URLs that should be considered internal')
|
|
2880
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.internalUrlRegex)
|
|
2881
|
-
.hideHelp())
|
|
2882
|
-
.addOption(new Option('--enable-find', 'Enable in-page Find UI with Cmd/Ctrl+F/G shortcuts')
|
|
2883
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.enableFind)
|
|
2884
|
-
.hideHelp())
|
|
2854
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.startToTray))
|
|
2855
|
+
.addOption(new Option('--force-internal-navigation', 'Keep every link inside the BghitApp window instead of opening external handlers').default(DEFAULT_BGHITAPP_OPTIONS.forceInternalNavigation))
|
|
2856
|
+
.addOption(new Option('--internal-url-regex <string>', 'Regex pattern to match URLs that should be considered internal').default(DEFAULT_BGHITAPP_OPTIONS.internalUrlRegex))
|
|
2857
|
+
.addOption(new Option('--enable-find', 'Enable in-page Find UI with Cmd/Ctrl+F/G shortcuts').default(DEFAULT_BGHITAPP_OPTIONS.enableFind))
|
|
2885
2858
|
.addOption(new Option('--installer-language <string>', 'Installer language')
|
|
2886
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.installerLanguage)
|
|
2887
|
-
.hideHelp())
|
|
2859
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.installerLanguage))
|
|
2888
2860
|
.addOption(new Option('--zoom <number>', 'Initial page zoom level (50-200)')
|
|
2889
2861
|
.default(DEFAULT_BGHITAPP_OPTIONS.zoom)
|
|
2890
2862
|
.argParser((value) => {
|
|
@@ -2893,54 +2865,26 @@ function getCliProgram() {
|
|
|
2893
2865
|
throw new Error('--zoom must be a number between 50 and 200');
|
|
2894
2866
|
}
|
|
2895
2867
|
return zoom;
|
|
2896
|
-
})
|
|
2897
|
-
.hideHelp())
|
|
2868
|
+
}))
|
|
2898
2869
|
.addOption(new Option('--min-width <number>', 'Minimum window width')
|
|
2899
2870
|
.default(DEFAULT_BGHITAPP_OPTIONS.minWidth)
|
|
2900
|
-
.argParser(validateNumberInput)
|
|
2901
|
-
.hideHelp())
|
|
2871
|
+
.argParser(validateNumberInput))
|
|
2902
2872
|
.addOption(new Option('--min-height <number>', 'Minimum window height')
|
|
2903
2873
|
.default(DEFAULT_BGHITAPP_OPTIONS.minHeight)
|
|
2904
|
-
.argParser(validateNumberInput)
|
|
2905
|
-
.
|
|
2906
|
-
.addOption(new Option('--
|
|
2907
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.
|
|
2908
|
-
.
|
|
2909
|
-
.addOption(new Option('--iterative-build', 'Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging')
|
|
2910
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.iterativeBuild)
|
|
2911
|
-
.hideHelp())
|
|
2912
|
-
.addOption(new Option('--new-window', 'Allow sites to open new windows (for auth flows, tabs, branches)')
|
|
2913
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.newWindow)
|
|
2914
|
-
.hideHelp())
|
|
2915
|
-
.addOption(new Option('--install', 'Auto-install app to /Applications (macOS) after build and remove local bundle')
|
|
2916
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.install)
|
|
2917
|
-
.hideHelp())
|
|
2874
|
+
.argParser(validateNumberInput))
|
|
2875
|
+
.addOption(new Option('--ignore-certificate-errors', 'Ignore certificate errors (for self-signed certificates)').default(DEFAULT_BGHITAPP_OPTIONS.ignoreCertificateErrors))
|
|
2876
|
+
.addOption(new Option('--iterative-build', 'Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging').default(DEFAULT_BGHITAPP_OPTIONS.iterativeBuild))
|
|
2877
|
+
.addOption(new Option('--new-window', 'Allow sites to open new windows (for auth flows, tabs, branches)').default(DEFAULT_BGHITAPP_OPTIONS.newWindow))
|
|
2878
|
+
.addOption(new Option('--install', 'Auto-install app to /Applications (macOS) after build and remove local bundle').default(DEFAULT_BGHITAPP_OPTIONS.install))
|
|
2918
2879
|
.addOption(new Option('--camera', 'Request camera permission on macOS')
|
|
2919
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.camera)
|
|
2920
|
-
.hideHelp())
|
|
2880
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.camera))
|
|
2921
2881
|
.addOption(new Option('--microphone', 'Request microphone permission on macOS')
|
|
2922
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.microphone)
|
|
2923
|
-
.
|
|
2924
|
-
.addOption(new Option('--splash
|
|
2925
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.splash))
|
|
2926
|
-
.addOption(new Option('--auto-splash', 'Auto-fetch og:image from target URL for splash')
|
|
2927
|
-
.default(DEFAULT_BGHITAPP_OPTIONS.autoSplash))
|
|
2882
|
+
.default(DEFAULT_BGHITAPP_OPTIONS.microphone))
|
|
2883
|
+
.addOption(new Option('--splash <path_or_url>', 'Splash screen image (local path or URL)').default(DEFAULT_BGHITAPP_OPTIONS.splash))
|
|
2884
|
+
.addOption(new Option('--auto-splash', 'Auto-fetch og:image from target URL for splash').default(DEFAULT_BGHITAPP_OPTIONS.autoSplash))
|
|
2928
2885
|
.addOption(new Option('--offline', 'Enable offline fallback page')
|
|
2929
2886
|
.default(DEFAULT_BGHITAPP_OPTIONS.offline))
|
|
2930
|
-
.version(packageJson.version, '-v, --version')
|
|
2931
|
-
.configureHelp({
|
|
2932
|
-
sortSubcommands: true,
|
|
2933
|
-
optionTerm: (option) => {
|
|
2934
|
-
if (option.flags === '-v, --version' || option.flags === '-h, --help')
|
|
2935
|
-
return '';
|
|
2936
|
-
return option.flags;
|
|
2937
|
-
},
|
|
2938
|
-
optionDescription: (option) => {
|
|
2939
|
-
if (option.flags === '-v, --version' || option.flags === '-h, --help')
|
|
2940
|
-
return '';
|
|
2941
|
-
return option.description;
|
|
2942
|
-
},
|
|
2943
|
-
});
|
|
2887
|
+
.version(packageJson.version, '-v, --version');
|
|
2944
2888
|
}
|
|
2945
2889
|
|
|
2946
2890
|
const program = getCliProgram();
|