pake-cli 3.10.0 โ†’ 3.10.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 CHANGED
@@ -22,7 +22,7 @@ import * as psl from 'psl';
22
22
  import { InvalidArgumentError, program as program$1, Option } from 'commander';
23
23
 
24
24
  var name = "pake-cli";
25
- var version = "3.10.0";
25
+ var version = "3.10.1";
26
26
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚";
27
27
  var engines = {
28
28
  node: ">=18.0.0"
@@ -962,6 +962,27 @@ class BaseBuilder {
962
962
  const binaryPath = this.getRawBinaryPath(name);
963
963
  logger.success('โœ” Raw binary located in', path.resolve(binaryPath));
964
964
  }
965
+ if (IS_MAC && fileType === 'app' && this.options.install) {
966
+ await this.installAppToApplications(distPath, name);
967
+ }
968
+ }
969
+ async installAppToApplications(appBundlePath, appName) {
970
+ try {
971
+ logger.info(`- Installing ${appName} to /Applications...`);
972
+ const appBundleName = path.basename(appBundlePath);
973
+ const appDest = path.join('/Applications', appBundleName);
974
+ if (await fsExtra.pathExists(appDest)) {
975
+ await fsExtra.remove(appDest);
976
+ }
977
+ await fsExtra.copy(appBundlePath, appDest);
978
+ await fsExtra.remove(appBundlePath);
979
+ logger.success(`โœ” ${appBundleName.replace(/\.app$/, '')} installed to /Applications`);
980
+ logger.success('โœ” Local app bundle removed');
981
+ }
982
+ catch (error) {
983
+ logger.error(`โœ• Failed to install ${appName}: ${error}`);
984
+ logger.info(` The app bundle is still available at: ${appBundlePath}`);
985
+ }
965
986
  }
966
987
  getFileType(target) {
967
988
  return target;
@@ -1162,7 +1183,9 @@ class MacBuilder extends BaseBuilder {
1162
1183
  this.buildArch = validArchs.includes(options.targets || '')
1163
1184
  ? options.targets
1164
1185
  : 'auto';
1165
- if (options.iterativeBuild || process.env.PAKE_CREATE_APP === '1') {
1186
+ if (options.iterativeBuild ||
1187
+ options.install ||
1188
+ process.env.PAKE_CREATE_APP === '1') {
1166
1189
  this.buildFormat = 'app';
1167
1190
  }
1168
1191
  else {
@@ -2051,6 +2074,7 @@ const DEFAULT_PAKE_OPTIONS = {
2051
2074
  minHeight: 0,
2052
2075
  ignoreCertificateErrors: false,
2053
2076
  newWindow: false,
2077
+ install: false,
2054
2078
  };
2055
2079
 
2056
2080
  function validateNumberInput(value) {
@@ -2210,6 +2234,7 @@ ${green('|_| \\__,_|_|\\_\\___| can turn any webpage into a desktop app with
2210
2234
  .addOption(new Option('--new-window', 'Allow new window for third-party login')
2211
2235
  .default(DEFAULT_PAKE_OPTIONS.newWindow)
2212
2236
  .hideHelp())
2237
+ .option('--install', 'Auto-install app to /Applications (macOS) after build and remove local bundle', DEFAULT_PAKE_OPTIONS.install)
2213
2238
  .version(packageJson.version, '-v, --version')
2214
2239
  .configureHelp({
2215
2240
  sortSubcommands: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "3.10.0",
3
+ "version": "3.10.1",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -0,0 +1,45 @@
1
+ {
2
+ "windows": [
3
+ {
4
+ "url": "https://example.com",
5
+ "url_type": "web",
6
+ "hide_title_bar": false,
7
+ "fullscreen": false,
8
+ "width": 1200,
9
+ "height": 780,
10
+ "resizable": true,
11
+ "always_on_top": false,
12
+ "dark_mode": false,
13
+ "activation_shortcut": "",
14
+ "disabled_web_shortcuts": false,
15
+ "hide_on_close": true,
16
+ "incognito": false,
17
+ "enable_wasm": false,
18
+ "enable_drag_drop": false,
19
+ "maximize": false,
20
+ "start_to_tray": false,
21
+ "force_internal_navigation": false,
22
+ "internal_url_regex": "",
23
+ "new_window": false,
24
+ "zoom": 100,
25
+ "min_width": 0,
26
+ "min_height": 0,
27
+ "ignore_certificate_errors": false
28
+ }
29
+ ],
30
+ "user_agent": {
31
+ "macos": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15",
32
+ "linux": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
33
+ "windows": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36"
34
+ },
35
+ "system_tray": {
36
+ "macos": false,
37
+ "linux": true,
38
+ "windows": true
39
+ },
40
+ "system_tray_path": "png/icon_512.png",
41
+ "inject": [],
42
+ "proxy_url": "",
43
+ "multi_instance": false,
44
+ "multi_window": false
45
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "productName": "PakeInstallSmokeCodex",
3
+ "identifier": "com.pake.c984d0",
4
+ "version": "1.0.0",
5
+ "app": {
6
+ "withGlobalTauri": true,
7
+ "security": {
8
+ "headers": {},
9
+ "csp": null
10
+ }
11
+ },
12
+ "build": {
13
+ "frontendDist": "../dist"
14
+ },
15
+ "bundle": {
16
+ "icon": [
17
+ "icons/pakeinstallsmokecodex.icns"
18
+ ],
19
+ "active": true,
20
+ "targets": [
21
+ "app"
22
+ ],
23
+ "macOS": {
24
+ "signingIdentity": "-",
25
+ "hardenedRuntime": true,
26
+ "dmg": {
27
+ "background": "assets/macos/dmg/background.png",
28
+ "windowSize": {
29
+ "width": 680,
30
+ "height": 420
31
+ },
32
+ "appPosition": {
33
+ "x": 190,
34
+ "y": 250
35
+ },
36
+ "applicationFolderPosition": {
37
+ "x": 500,
38
+ "y": 250
39
+ }
40
+ }
41
+ },
42
+ "resources": [
43
+ "icons/pakeinstallsmokecodex.icns"
44
+ ]
45
+ },
46
+ "mainBinaryName": "pake-pakeinstallsmokecodex"
47
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "bundle": {
3
+ "icon": ["png/weekly_512.png"],
4
+ "active": true,
5
+ "linux": {
6
+ "deb": {
7
+ "depends": ["curl", "wget"]
8
+ }
9
+ },
10
+ "targets": ["deb", "appimage"]
11
+ }
12
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "bundle": {
3
+ "icon": [
4
+ "icons/pakeinstallsmokecodex.icns"
5
+ ],
6
+ "active": true,
7
+ "targets": [
8
+ "app"
9
+ ],
10
+ "macOS": {
11
+ "signingIdentity": "-",
12
+ "hardenedRuntime": true,
13
+ "dmg": {
14
+ "background": "assets/macos/dmg/background.png",
15
+ "windowSize": {
16
+ "width": 680,
17
+ "height": 420
18
+ },
19
+ "appPosition": {
20
+ "x": 190,
21
+ "y": 250
22
+ },
23
+ "applicationFolderPosition": {
24
+ "x": 500,
25
+ "y": 250
26
+ }
27
+ }
28
+ },
29
+ "resources": [
30
+ "icons/pakeinstallsmokecodex.icns"
31
+ ]
32
+ }
33
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "bundle": {
3
+ "icon": ["png/weekly_256.ico", "png/weekly_32.ico"],
4
+ "active": true,
5
+ "resources": ["png/weekly_32.ico"],
6
+ "targets": ["msi"],
7
+ "windows": {
8
+ "digestAlgorithm": "sha256",
9
+ "wix": {
10
+ "language": ["en-US"],
11
+ "template": "assets/main.wxs"
12
+ }
13
+ }
14
+ }
15
+ }
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pake"
3
- version = "3.10.0"
3
+ version = "3.10.1"
4
4
  description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust."
5
5
  authors = ["Tw93"]
6
6
  license = "MIT"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "productName": "Weekly",
3
3
  "identifier": "com.pake.weekly",
4
- "version": "3.10.0",
4
+ "version": "3.10.1",
5
5
  "app": {
6
6
  "withGlobalTauri": true,
7
7
  "trayIcon": {
@@ -1 +0,0 @@
1
- <html><body><h1>Hello Pake</h1></body></html>