@tauri-apps/cli 1.0.5 → 1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## \[1.1.1]
4
+
5
+ - Fix wrong cli metadata that caused new projects (created through `tauri init`) fail to build
6
+ - [db26aaf2](https://www.github.com/tauri-apps/tauri/commit/db26aaf2b44ce5335c9223c571ef2b2175e0cd6d) fix: fix wrong cli metadata ([#5214](https://www.github.com/tauri-apps/tauri/pull/5214)) on 2022-09-16
7
+
8
+ ## \[1.1.0]
9
+
10
+ - Allow adding `build > beforeBundleCommand` in tauri.conf.json to run a shell command before the bundling phase.
11
+ - [57ab9847](https://www.github.com/tauri-apps/tauri/commit/57ab9847eb2d8c9a5da584b873b7c072e9ee26bf) feat(cli): add `beforeBundleCommand`, closes [#4879](https://www.github.com/tauri-apps/tauri/pull/4879) ([#4893](https://www.github.com/tauri-apps/tauri/pull/4893)) on 2022-08-09
12
+ - Change `before_dev_command` and `before_build_command` config value to allow configuring the current working directory.
13
+ - [d6f7d3cf](https://www.github.com/tauri-apps/tauri/commit/d6f7d3cfe8a7ec8d68c8341016c4e0a3103da587) Add cwd option to `before` commands, add wait option to dev [#4740](https://www.github.com/tauri-apps/tauri/pull/4740) [#3551](https://www.github.com/tauri-apps/tauri/pull/3551) ([#4834](https://www.github.com/tauri-apps/tauri/pull/4834)) on 2022-08-02
14
+ - Allow configuring the `before_dev_command` to force the CLI to wait for the command to finish before proceeding.
15
+ - [d6f7d3cf](https://www.github.com/tauri-apps/tauri/commit/d6f7d3cfe8a7ec8d68c8341016c4e0a3103da587) Add cwd option to `before` commands, add wait option to dev [#4740](https://www.github.com/tauri-apps/tauri/pull/4740) [#3551](https://www.github.com/tauri-apps/tauri/pull/3551) ([#4834](https://www.github.com/tauri-apps/tauri/pull/4834)) on 2022-08-02
16
+ - Check if the default build target is set in the Cargo configuration.
17
+ - [436f3d8d](https://www.github.com/tauri-apps/tauri/commit/436f3d8d66727f5b64165522f0b55f4ab54bd1ae) feat(cli): load Cargo configuration to check default build target ([#4990](https://www.github.com/tauri-apps/tauri/pull/4990)) on 2022-08-21
18
+ - Use `cargo metadata` to detect the workspace root and target directory.
19
+ - [fea70eff](https://www.github.com/tauri-apps/tauri/commit/fea70effad219c0794d919f8834fa1a1ffd204c7) refactor(cli): Use `cargo metadata` to detect the workspace root and target directory, closes [#4632](https://www.github.com/tauri-apps/tauri/pull/4632), [#4928](https://www.github.com/tauri-apps/tauri/pull/4928). ([#4932](https://www.github.com/tauri-apps/tauri/pull/4932)) on 2022-08-21
20
+ - Prompt for `beforeDevCommand` and `beforeBuildCommand` in `tauri init`.
21
+ - [6d4945c9](https://www.github.com/tauri-apps/tauri/commit/6d4945c9f06cd1f7018e1c48686ba682aae817df) feat(cli): prompt for before\*Command, closes [#4691](https://www.github.com/tauri-apps/tauri/pull/4691) ([#4721](https://www.github.com/tauri-apps/tauri/pull/4721)) on 2022-07-25
22
+ - Added support to configuration files in TOML format (Tauri.toml file).
23
+ - [ae83d008](https://www.github.com/tauri-apps/tauri/commit/ae83d008f9e1b89bfc8dddaca42aa5c1fbc36f6d) feat: add support to TOML config file `Tauri.toml`, closes [#4806](https://www.github.com/tauri-apps/tauri/pull/4806) ([#4813](https://www.github.com/tauri-apps/tauri/pull/4813)) on 2022-08-02
24
+ - Automatically use any `.taurignore` file as ignore rules for dev watcher and app path finder.
25
+ - [596fa08d](https://www.github.com/tauri-apps/tauri/commit/596fa08d48e371c7bd29e1ef799119ac8fca0d0b) feat(cli): automatically use `.taurignore`, ref [#4617](https://www.github.com/tauri-apps/tauri/pull/4617) ([#4623](https://www.github.com/tauri-apps/tauri/pull/4623)) on 2022-07-28
26
+ - Enable WiX FIPS compliance when the `TAURI_FIPS_COMPLIANT` environment variable is set to `true`.
27
+ - [d88b9de7](https://www.github.com/tauri-apps/tauri/commit/d88b9de7aaeaaa2e42e4795dbc2b8642b5ae7a50) feat(core): add `fips_compliant` wix config option, closes [#4541](https://www.github.com/tauri-apps/tauri/pull/4541) ([#4843](https://www.github.com/tauri-apps/tauri/pull/4843)) on 2022-08-04
28
+ - Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected.
29
+ - [47fab680](https://www.github.com/tauri-apps/tauri/commit/47fab6809a1e23b3b9a84695e2d91ff0826ba79a) fix(cli): dev watcher incorrectly killing process on multiple file write ([#4684](https://www.github.com/tauri-apps/tauri/pull/4684)) on 2022-07-25
30
+ - Add `libc` field to Node packages.
31
+ - [f7d2dfc7](https://www.github.com/tauri-apps/tauri/commit/f7d2dfc7a6d086dd1a218d6c1492b3fef8a64f03) chore: add libc field to node packages ([#4856](https://www.github.com/tauri-apps/tauri/pull/4856)) on 2022-08-04
32
+ - Set the `MACOSX_DEPLOYMENT_TARGET` environment variable with the configuration `minimum_system_version` value.
33
+ - [fa23310f](https://www.github.com/tauri-apps/tauri/commit/fa23310f23cb9e6a02ec2524f1ef394a5b42990e) fix(cli): set MACOSX_DEPLOYMENT_TARGET env var, closes [#4704](https://www.github.com/tauri-apps/tauri/pull/4704) ([#4842](https://www.github.com/tauri-apps/tauri/pull/4842)) on 2022-08-02
34
+ - Added `--no-watch` argument to the `dev` command to disable the file watcher.
35
+ - [0983d7ce](https://www.github.com/tauri-apps/tauri/commit/0983d7ce7f24ab43f9ae7b5e1177ff244d8885a8) feat(cli): add `--no-watch` argument to the dev command, closes [#4617](https://www.github.com/tauri-apps/tauri/pull/4617) ([#4793](https://www.github.com/tauri-apps/tauri/pull/4793)) on 2022-07-29
36
+ - Validate updater signature matches configured public key.
37
+ - [b2a8930b](https://www.github.com/tauri-apps/tauri/commit/b2a8930b3c4b72c50ce72e73575f42c9cbe91bad) feat(cli): validate updater private key when signing ([#4754](https://www.github.com/tauri-apps/tauri/pull/4754)) on 2022-07-25
38
+
3
39
  ## \[1.0.5]
4
40
 
5
41
  - Correctly fill the architecture when building Debian packages targeting ARM64 (aarch64).
@@ -41,7 +77,7 @@
41
77
  This only works with recent versions of `libappindicator-sys` (including https://github.com/tauri-apps/libappindicator-rs/pull/38),
42
78
  so a `cargo update` may be necessary if you create `.deb` bundles and use the tray feature.
43
79
  - [0e6edeb1](https://www.github.com/tauri-apps/tauri/commit/0e6edeb14f379af1e02a7cebb4e3a5c9e87ebf7f) fix(cli): Don't add `pkg-config` to `deb` ([#4508](https://www.github.com/tauri-apps/tauri/pull/4508)) on 2022-06-29
44
- - AppImage bundling will now prefer bundling correctly named appincidator library (including `.1` version suffix). With a symlink for compatibility with the old naming.
80
+ - AppImage bundling will now prefer bundling correctly named appindicator library (including `.1` version suffix). With a symlink for compatibility with the old naming.
45
81
  - [bf45ca1d](https://www.github.com/tauri-apps/tauri/commit/bf45ca1df6691c05bdf72c5716cc01e89a7791d4) fix(cli,bundler): prefer AppImage libraries with ABI version ([#4505](https://www.github.com/tauri-apps/tauri/pull/4505)) on 2022-06-29
46
82
  - Improve error message when `cargo` is not installed.
47
83
  - [e0e5f772](https://www.github.com/tauri-apps/tauri/commit/e0e5f772430f6349ec99ba891e601331e376e3c7) feat(cli): improve `cargo not found` error message, closes [#4428](https://www.github.com/tauri-apps/tauri/pull/4428) ([#4430](https://www.github.com/tauri-apps/tauri/pull/4430)) on 2022-06-21
package/Cargo.toml CHANGED
@@ -8,8 +8,8 @@ crate-type = ["cdylib"]
8
8
 
9
9
  [dependencies]
10
10
  # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
11
- napi = { version = "2.6", default-features = false, features = ["napi4"] }
12
- napi-derive = "2.6"
11
+ napi = { version = "2.9", default-features = false, features = ["napi4"] }
12
+ napi-derive = "2.9"
13
13
  tauri-cli = { path = ".." }
14
14
  log = "0.4.17"
15
15
 
package/README.md CHANGED
@@ -1,16 +1,14 @@
1
1
  # @tauri-apps/cli
2
2
  <img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" height="128" width="128">
3
3
 
4
- [![status](https://img.shields.io/badge/Status-Beta-green.svg)](https://github.com/tauri-apps/tauri)
5
- [![Chat Server](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/SpmNs4S)
6
- [![devto](https://img.shields.io/badge/blog-dev.to-black.svg)](https://dev.to/tauri)
7
-
8
- ![](https://img.shields.io/github/workflow/status/tauri-apps/tauri/test%20library?label=test%20library
9
- )
10
- [![devto](https://img.shields.io/badge/documentation-site-purple.svg)](https://tauri.app)
11
-
4
+ [![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri/tree/dev)
5
+ [![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-green.svg)](https://opencollective.com/tauri)
6
+ [![test library](https://img.shields.io/github/workflow/status/tauri-apps/tauri/test%20library?label=test%20library)](https://github.com/tauri-apps/tauri/actions?query=workflow%3A%22test+library%22)
7
+ [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri?ref=badge_shield)
8
+ [![Chat Server](https://img.shields.io/badge/chat-discord-7289da.svg)](https://discord.gg/SpmNs4S)
9
+ [![website](https://img.shields.io/badge/website-tauri.app-purple.svg)](https://tauri.app)
12
10
  [![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
13
- [![support](https://img.shields.io/badge/sponsor-Opencollective-blue.svg)](https://opencollective.com/tauri)
11
+ [![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri)
14
12
 
15
13
  | Component | Version |
16
14
  | --------- | ------------------------------------------- |
package/build.rs CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
1
+ // Copyright 2019-2022 Tauri Programme within The Commons Conservancy
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-License-Identifier: MIT
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/cli",
3
- "version": "1.0.5",
3
+ "version": "1.1.1",
4
4
  "description": "Command line interface for building Tauri apps",
5
5
  "funding": {
6
6
  "type": "opencollective",
@@ -37,11 +37,11 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@napi-rs/cli": "2.10.1",
40
+ "@napi-rs/cli": "2.11.4",
41
41
  "cross-env": "7.0.3",
42
42
  "cross-spawn": "7.0.3",
43
43
  "fs-extra": "10.1.0",
44
- "jest": "28.1.2",
44
+ "jest": "28.1.3",
45
45
  "jest-transform-toml": "1.0.0",
46
46
  "prettier": "2.7.1"
47
47
  },
@@ -55,7 +55,7 @@
55
55
  "artifacts": "napi artifacts",
56
56
  "build:release": "cross-env TARGET=node napi build --platform --release",
57
57
  "build": "cross-env TARGET=node napi build --platform",
58
- "prepublishOnly": "napi prepublish -t npm",
58
+ "prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID",
59
59
  "prepack": "cp ../schema.json .",
60
60
  "test": "jest --runInBand --forceExit --no-cache",
61
61
  "version": "napi version",
@@ -64,14 +64,14 @@
64
64
  "format:check": "prettier --check ./package.json ./tauri.js"
65
65
  },
66
66
  "optionalDependencies": {
67
- "@tauri-apps/cli-win32-x64-msvc": "1.0.5",
68
- "@tauri-apps/cli-darwin-x64": "1.0.5",
69
- "@tauri-apps/cli-linux-x64-gnu": "1.0.5",
70
- "@tauri-apps/cli-darwin-arm64": "1.0.5",
71
- "@tauri-apps/cli-linux-arm64-gnu": "1.0.5",
72
- "@tauri-apps/cli-linux-arm64-musl": "1.0.5",
73
- "@tauri-apps/cli-linux-arm-gnueabihf": "1.0.5",
74
- "@tauri-apps/cli-linux-x64-musl": "1.0.5",
75
- "@tauri-apps/cli-win32-ia32-msvc": "1.0.5"
67
+ "@tauri-apps/cli-win32-x64-msvc": "1.1.1",
68
+ "@tauri-apps/cli-darwin-x64": "1.1.1",
69
+ "@tauri-apps/cli-linux-x64-gnu": "1.1.1",
70
+ "@tauri-apps/cli-darwin-arm64": "1.1.1",
71
+ "@tauri-apps/cli-linux-arm64-gnu": "1.1.1",
72
+ "@tauri-apps/cli-linux-arm64-musl": "1.1.1",
73
+ "@tauri-apps/cli-linux-arm-gnueabihf": "1.1.1",
74
+ "@tauri-apps/cli-linux-x64-musl": "1.1.1",
75
+ "@tauri-apps/cli-win32-ia32-msvc": "1.1.1"
76
76
  }
77
77
  }
package/schema.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "Config",
4
- "description": "The tauri.conf.json is a file generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## Platform-Specific Configuration\n\nIn addition to the JSON defined on the `tauri.conf.json` file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, and `tauri.macos.conf.json` and merges it with the main `tauri.conf.json` configuration.\n\n## Configuration Structure\n\n`tauri.conf.json` is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"allowlist\": { \"all\": true }, \"bundle\": {}, \"security\": { \"csp\": null }, \"updater\": { \"active\": false }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```",
4
+ "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.\n\nThe configuration file is generated by the [`tauri init`](https://tauri.app/v1/api/cli#init) command that lives in your Tauri application source directory (src-tauri).\n\nOnce generated, you may modify it at will to customize your Tauri application.\n\n## File Formats\n\nBy default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\nTauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively. The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`. The TOML file name is `Tauri.toml`.\n\n## Platform-Specific Configuration\n\nIn addition to the default configuration file, Tauri can read a platform-specific configuration from `tauri.linux.conf.json`, `tauri.windows.conf.json`, and `tauri.macos.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml` and `Tauri.macos.toml` if the `Tauri.toml` format is used), which gets merged with the main configuration object.\n\n## Configuration Structure\n\nThe configuration is composed of the following objects:\n\n- [`package`](#packageconfig): Package settings - [`tauri`](#tauriconfig): The Tauri config - [`build`](#buildconfig): The build configuration - [`plugins`](#pluginconfig): The plugins config\n\n```json title=\"Example tauri.config.json file\" { \"build\": { \"beforeBuildCommand\": \"\", \"beforeDevCommand\": \"\", \"devPath\": \"../dist\", \"distDir\": \"../dist\" }, \"package\": { \"productName\": \"tauri-app\", \"version\": \"0.1.0\" }, \"tauri\": { \"allowlist\": { \"all\": true }, \"bundle\": {}, \"security\": { \"csp\": null }, \"updater\": { \"active\": false }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "$schema": {
@@ -45,6 +45,7 @@
45
45
  "all": false,
46
46
  "copyFile": false,
47
47
  "createDir": false,
48
+ "exists": false,
48
49
  "readDir": false,
49
50
  "readFile": false,
50
51
  "removeDir": false,
@@ -99,6 +100,10 @@
99
100
  "print": false,
100
101
  "requestUserAttention": false,
101
102
  "setAlwaysOnTop": false,
103
+ "setCursorGrab": false,
104
+ "setCursorIcon": false,
105
+ "setCursorPosition": false,
106
+ "setCursorVisible": false,
102
107
  "setDecorations": false,
103
108
  "setFocus": false,
104
109
  "setFullscreen": false,
@@ -205,7 +210,7 @@
205
210
  ]
206
211
  },
207
212
  "version": {
208
- "description": "App version. It is a semver version number or a path to a `package.json` file contaning the `version` field.",
213
+ "description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field.",
209
214
  "default": null,
210
215
  "type": [
211
216
  "string",
@@ -306,6 +311,7 @@
306
311
  "all": false,
307
312
  "copyFile": false,
308
313
  "createDir": false,
314
+ "exists": false,
309
315
  "readDir": false,
310
316
  "readFile": false,
311
317
  "removeDir": false,
@@ -360,6 +366,10 @@
360
366
  "print": false,
361
367
  "requestUserAttention": false,
362
368
  "setAlwaysOnTop": false,
369
+ "setCursorGrab": false,
370
+ "setCursorIcon": false,
371
+ "setCursorPosition": false,
372
+ "setCursorVisible": false,
363
373
  "setDecorations": false,
364
374
  "setFocus": false,
365
375
  "setFullscreen": false,
@@ -587,7 +597,7 @@
587
597
  "type": "boolean"
588
598
  },
589
599
  "transparent": {
590
- "description": "Whether the window is transparent or not.\n\nNote that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri.conf.json > tauri > macOSPrivateApi`. WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`.",
600
+ "description": "Whether the window is transparent or not.\n\nNote that on `macOS` this requires the `macos-private-api` feature flag, enabled under `tauri > macOSPrivateApi`. WARNING: Using private APIs on `macOS` prevents your application from being accepted to the `App Store`.",
591
601
  "default": false,
592
602
  "type": "boolean"
593
603
  },
@@ -1498,6 +1508,7 @@
1498
1508
  "all": false,
1499
1509
  "copyFile": false,
1500
1510
  "createDir": false,
1511
+ "exists": false,
1501
1512
  "readDir": false,
1502
1513
  "readFile": false,
1503
1514
  "removeDir": false,
@@ -1525,6 +1536,10 @@
1525
1536
  "print": false,
1526
1537
  "requestUserAttention": false,
1527
1538
  "setAlwaysOnTop": false,
1539
+ "setCursorGrab": false,
1540
+ "setCursorIcon": false,
1541
+ "setCursorPosition": false,
1542
+ "setCursorVisible": false,
1528
1543
  "setDecorations": false,
1529
1544
  "setFocus": false,
1530
1545
  "setFullscreen": false,
@@ -1735,6 +1750,11 @@
1735
1750
  "description": "Rename file from local filesystem.",
1736
1751
  "default": false,
1737
1752
  "type": "boolean"
1753
+ },
1754
+ "exists": {
1755
+ "description": "Check if path exists on the local filesystem.",
1756
+ "default": false,
1757
+ "type": "boolean"
1738
1758
  }
1739
1759
  },
1740
1760
  "additionalProperties": false
@@ -1892,6 +1912,26 @@
1892
1912
  "default": false,
1893
1913
  "type": "boolean"
1894
1914
  },
1915
+ "setCursorGrab": {
1916
+ "description": "Allows grabbing the cursor.",
1917
+ "default": false,
1918
+ "type": "boolean"
1919
+ },
1920
+ "setCursorVisible": {
1921
+ "description": "Allows setting the cursor visibility.",
1922
+ "default": false,
1923
+ "type": "boolean"
1924
+ },
1925
+ "setCursorIcon": {
1926
+ "description": "Allows changing the cursor icon.",
1927
+ "default": false,
1928
+ "type": "boolean"
1929
+ },
1930
+ "setCursorPosition": {
1931
+ "description": "Allows setting the cursor position.",
1932
+ "default": false,
1933
+ "type": "boolean"
1934
+ },
1895
1935
  "startDragging": {
1896
1936
  "description": "Allows start dragging on the window.",
1897
1937
  "default": false,
@@ -2402,7 +2442,7 @@
2402
2442
  ],
2403
2443
  "properties": {
2404
2444
  "iconPath": {
2405
- "description": "Path to the icon to use on the system tray.\n\nIt is forced to be a `.png` file on Linux and macOS, and a `.ico` file on Windows.",
2445
+ "description": "Path to the default icon to use on the system tray.",
2406
2446
  "type": "string"
2407
2447
  },
2408
2448
  "iconAsTemplate": {
@@ -2449,16 +2489,35 @@
2449
2489
  },
2450
2490
  "beforeDevCommand": {
2451
2491
  "description": "A shell command to run before `tauri dev` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.",
2452
- "type": [
2453
- "string",
2454
- "null"
2492
+ "anyOf": [
2493
+ {
2494
+ "$ref": "#/definitions/BeforeDevCommand"
2495
+ },
2496
+ {
2497
+ "type": "null"
2498
+ }
2455
2499
  ]
2456
2500
  },
2457
2501
  "beforeBuildCommand": {
2458
2502
  "description": "A shell command to run before `tauri build` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.",
2459
- "type": [
2460
- "string",
2461
- "null"
2503
+ "anyOf": [
2504
+ {
2505
+ "$ref": "#/definitions/HookCommand"
2506
+ },
2507
+ {
2508
+ "type": "null"
2509
+ }
2510
+ ]
2511
+ },
2512
+ "beforeBundleCommand": {
2513
+ "description": "A shell command to run before the bundling phase in `tauri build` kicks in.\n\nThe TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.",
2514
+ "anyOf": [
2515
+ {
2516
+ "$ref": "#/definitions/HookCommand"
2517
+ },
2518
+ {
2519
+ "type": "null"
2520
+ }
2462
2521
  ]
2463
2522
  },
2464
2523
  "features": {
@@ -2499,6 +2558,69 @@
2499
2558
  }
2500
2559
  ]
2501
2560
  },
2561
+ "BeforeDevCommand": {
2562
+ "description": "Describes the shell command to run before `tauri dev`.",
2563
+ "anyOf": [
2564
+ {
2565
+ "description": "Run the given script with the default options.",
2566
+ "type": "string"
2567
+ },
2568
+ {
2569
+ "description": "Run the given script with custom options.",
2570
+ "type": "object",
2571
+ "required": [
2572
+ "script"
2573
+ ],
2574
+ "properties": {
2575
+ "script": {
2576
+ "description": "The script to execute.",
2577
+ "type": "string"
2578
+ },
2579
+ "cwd": {
2580
+ "description": "The current working directory.",
2581
+ "type": [
2582
+ "string",
2583
+ "null"
2584
+ ]
2585
+ },
2586
+ "wait": {
2587
+ "description": "Whether `tauri dev` should wait for the command to finish or not. Defaults to `false`.",
2588
+ "default": false,
2589
+ "type": "boolean"
2590
+ }
2591
+ }
2592
+ }
2593
+ ]
2594
+ },
2595
+ "HookCommand": {
2596
+ "description": "Describes a shell command to be executed when a CLI hook is triggered.",
2597
+ "anyOf": [
2598
+ {
2599
+ "description": "Run the given script with the default options.",
2600
+ "type": "string"
2601
+ },
2602
+ {
2603
+ "description": "Run the given script with custom options.",
2604
+ "type": "object",
2605
+ "required": [
2606
+ "script"
2607
+ ],
2608
+ "properties": {
2609
+ "script": {
2610
+ "description": "The script to execute.",
2611
+ "type": "string"
2612
+ },
2613
+ "cwd": {
2614
+ "description": "The current working directory.",
2615
+ "type": [
2616
+ "string",
2617
+ "null"
2618
+ ]
2619
+ }
2620
+ }
2621
+ }
2622
+ ]
2623
+ },
2502
2624
  "PluginConfig": {
2503
2625
  "description": "The plugin configs holds a HashMap mapping a plugin name to its configuration object.",
2504
2626
  "type": "object",
package/src/lib.rs CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2021 Tauri Programme within The Commons Conservancy
1
+ // Copyright 2019-2022 Tauri Programme within The Commons Conservancy
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-License-Identifier: MIT
4
4