@tauri-apps/cli 2.0.0-alpha.7 → 2.0.0-alpha.9

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/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 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`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.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 } ] } } ```",
4
+ "description": "The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler and define a system tray.\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`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json` (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.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\": { \"bundle\": {}, \"security\": { \"csp\": null }, \"windows\": [ { \"fullscreen\": false, \"height\": 600, \"resizable\": true, \"title\": \"Tauri App\", \"width\": 800 } ] } } ```",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "$schema": {
@@ -26,109 +26,6 @@
26
26
  "tauri": {
27
27
  "description": "The Tauri configuration.",
28
28
  "default": {
29
- "allowlist": {
30
- "all": false,
31
- "app": {
32
- "all": false,
33
- "hide": false,
34
- "show": false
35
- },
36
- "clipboard": {
37
- "all": false,
38
- "readText": false,
39
- "writeText": false
40
- },
41
- "dialog": {
42
- "all": false,
43
- "ask": false,
44
- "confirm": false,
45
- "message": false,
46
- "open": false,
47
- "save": false
48
- },
49
- "fs": {
50
- "all": false,
51
- "copyFile": false,
52
- "createDir": false,
53
- "exists": false,
54
- "readDir": false,
55
- "readFile": false,
56
- "removeDir": false,
57
- "removeFile": false,
58
- "renameFile": false,
59
- "scope": [],
60
- "writeFile": false
61
- },
62
- "globalShortcut": {
63
- "all": false
64
- },
65
- "http": {
66
- "all": false,
67
- "request": false,
68
- "scope": []
69
- },
70
- "notification": {
71
- "all": false
72
- },
73
- "os": {
74
- "all": false
75
- },
76
- "path": {
77
- "all": false
78
- },
79
- "process": {
80
- "all": false,
81
- "exit": false,
82
- "relaunch": false,
83
- "relaunchDangerousAllowSymlinkMacos": false
84
- },
85
- "protocol": {
86
- "all": false,
87
- "asset": false,
88
- "assetScope": []
89
- },
90
- "shell": {
91
- "all": false,
92
- "execute": false,
93
- "open": false,
94
- "scope": [],
95
- "sidecar": false
96
- },
97
- "window": {
98
- "all": false,
99
- "center": false,
100
- "close": false,
101
- "create": false,
102
- "hide": false,
103
- "maximize": false,
104
- "minimize": false,
105
- "print": false,
106
- "requestUserAttention": false,
107
- "setAlwaysOnTop": false,
108
- "setContentProtected": false,
109
- "setCursorGrab": false,
110
- "setCursorIcon": false,
111
- "setCursorPosition": false,
112
- "setCursorVisible": false,
113
- "setDecorations": false,
114
- "setFocus": false,
115
- "setFullscreen": false,
116
- "setIcon": false,
117
- "setIgnoreCursorEvents": false,
118
- "setMaxSize": false,
119
- "setMinSize": false,
120
- "setPosition": false,
121
- "setResizable": false,
122
- "setShadow": false,
123
- "setSize": false,
124
- "setSkipTaskbar": false,
125
- "setTitle": false,
126
- "show": false,
127
- "startDragging": false,
128
- "unmaximize": false,
129
- "unminimize": false
130
- }
131
- },
132
29
  "bundle": {
133
30
  "active": false,
134
31
  "android": {
@@ -147,6 +44,13 @@
147
44
  "minimumSystemVersion": "10.13"
148
45
  },
149
46
  "targets": "all",
47
+ "updater": {
48
+ "active": false,
49
+ "pubkey": "",
50
+ "windows": {
51
+ "installMode": "passive"
52
+ }
53
+ },
150
54
  "windows": {
151
55
  "allowDowngrades": true,
152
56
  "certificateThumbprint": null,
@@ -167,18 +71,14 @@
167
71
  "use": "brownfield"
168
72
  },
169
73
  "security": {
74
+ "assetProtocol": {
75
+ "enable": false,
76
+ "scope": []
77
+ },
170
78
  "dangerousDisableAssetCspModification": false,
79
+ "dangerousRemoteDomainIpcAccess": [],
171
80
  "freezePrototype": false
172
81
  },
173
- "updater": {
174
- "active": false,
175
- "dialog": true,
176
- "pubkey": "",
177
- "windows": {
178
- "installMode": "passive",
179
- "installerArgs": []
180
- }
181
- },
182
82
  "windows": []
183
83
  },
184
84
  "allOf": [
@@ -258,17 +158,6 @@
258
158
  "$ref": "#/definitions/WindowConfig"
259
159
  }
260
160
  },
261
- "cli": {
262
- "description": "The CLI configuration.",
263
- "anyOf": [
264
- {
265
- "$ref": "#/definitions/CliConfig"
266
- },
267
- {
268
- "type": "null"
269
- }
270
- ]
271
- },
272
161
  "bundle": {
273
162
  "description": "The bundler configuration.",
274
163
  "default": {
@@ -289,6 +178,13 @@
289
178
  "minimumSystemVersion": "10.13"
290
179
  },
291
180
  "targets": "all",
181
+ "updater": {
182
+ "active": false,
183
+ "pubkey": "",
184
+ "windows": {
185
+ "installMode": "passive"
186
+ }
187
+ },
292
188
  "windows": {
293
189
  "allowDowngrades": true,
294
190
  "certificateThumbprint": null,
@@ -310,121 +206,15 @@
310
206
  }
311
207
  ]
312
208
  },
313
- "allowlist": {
314
- "description": "The allowlist configuration.",
315
- "default": {
316
- "all": false,
317
- "app": {
318
- "all": false,
319
- "hide": false,
320
- "show": false
321
- },
322
- "clipboard": {
323
- "all": false,
324
- "readText": false,
325
- "writeText": false
326
- },
327
- "dialog": {
328
- "all": false,
329
- "ask": false,
330
- "confirm": false,
331
- "message": false,
332
- "open": false,
333
- "save": false
334
- },
335
- "fs": {
336
- "all": false,
337
- "copyFile": false,
338
- "createDir": false,
339
- "exists": false,
340
- "readDir": false,
341
- "readFile": false,
342
- "removeDir": false,
343
- "removeFile": false,
344
- "renameFile": false,
345
- "scope": [],
346
- "writeFile": false
347
- },
348
- "globalShortcut": {
349
- "all": false
350
- },
351
- "http": {
352
- "all": false,
353
- "request": false,
354
- "scope": []
355
- },
356
- "notification": {
357
- "all": false
358
- },
359
- "os": {
360
- "all": false
361
- },
362
- "path": {
363
- "all": false
364
- },
365
- "process": {
366
- "all": false,
367
- "exit": false,
368
- "relaunch": false,
369
- "relaunchDangerousAllowSymlinkMacos": false
370
- },
371
- "protocol": {
372
- "all": false,
373
- "asset": false,
374
- "assetScope": []
375
- },
376
- "shell": {
377
- "all": false,
378
- "execute": false,
379
- "open": false,
380
- "scope": [],
381
- "sidecar": false
382
- },
383
- "window": {
384
- "all": false,
385
- "center": false,
386
- "close": false,
387
- "create": false,
388
- "hide": false,
389
- "maximize": false,
390
- "minimize": false,
391
- "print": false,
392
- "requestUserAttention": false,
393
- "setAlwaysOnTop": false,
394
- "setContentProtected": false,
395
- "setCursorGrab": false,
396
- "setCursorIcon": false,
397
- "setCursorPosition": false,
398
- "setCursorVisible": false,
399
- "setDecorations": false,
400
- "setFocus": false,
401
- "setFullscreen": false,
402
- "setIcon": false,
403
- "setIgnoreCursorEvents": false,
404
- "setMaxSize": false,
405
- "setMinSize": false,
406
- "setPosition": false,
407
- "setResizable": false,
408
- "setShadow": false,
409
- "setSize": false,
410
- "setSkipTaskbar": false,
411
- "setTitle": false,
412
- "show": false,
413
- "startDragging": false,
414
- "unmaximize": false,
415
- "unminimize": false
416
- }
417
- },
418
- "allOf": [
419
- {
420
- "$ref": "#/definitions/AllowlistConfig"
421
- }
422
- ]
423
- },
424
209
  "security": {
425
210
  "description": "Security configuration.",
426
211
  "default": {
212
+ "assetProtocol": {
213
+ "enable": false,
214
+ "scope": []
215
+ },
427
216
  "dangerousDisableAssetCspModification": false,
217
+ "dangerousRemoteDomainIpcAccess": [],
428
218
  "freezePrototype": false
429
219
  },
430
220
  "allOf": [
@@ -433,23 +223,6 @@
433
223
  }
434
224
  ]
435
225
  },
436
- "updater": {
437
- "description": "The updater configuration.",
438
- "default": {
439
- "active": false,
440
- "dialog": true,
441
- "pubkey": "",
442
- "windows": {
443
- "installMode": "passive",
444
- "installerArgs": []
445
- }
446
- },
447
- "allOf": [
448
- {
449
- "$ref": "#/definitions/UpdaterConfig"
450
- }
451
- ]
452
- },
453
226
  "systemTray": {
454
227
  "description": "Configuration for app system tray.",
455
228
  "anyOf": [
@@ -713,7 +486,7 @@
713
486
  },
714
487
  "shadow": {
715
488
  "description": "Whether or not the window has shadow.\n\n## Platform-specific\n\n- **Windows:** - `false` has no effect on decorated window, shadow are always ON. - `true` will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners. - **Linux:** Unsupported.",
716
- "default": false,
489
+ "default": true,
717
490
  "type": "boolean"
718
491
  }
719
492
  },
@@ -778,252 +551,6 @@
778
551
  }
779
552
  ]
780
553
  },
781
- "CliConfig": {
782
- "description": "describes a CLI configuration\n\nSee more: https://tauri.app/v1/api/config#cliconfig",
783
- "type": "object",
784
- "properties": {
785
- "description": {
786
- "description": "Command description which will be shown on the help information.",
787
- "type": [
788
- "string",
789
- "null"
790
- ]
791
- },
792
- "longDescription": {
793
- "description": "Command long description which will be shown on the help information.",
794
- "type": [
795
- "string",
796
- "null"
797
- ]
798
- },
799
- "beforeHelp": {
800
- "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.",
801
- "type": [
802
- "string",
803
- "null"
804
- ]
805
- },
806
- "afterHelp": {
807
- "description": "Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.",
808
- "type": [
809
- "string",
810
- "null"
811
- ]
812
- },
813
- "args": {
814
- "description": "List of arguments for the command",
815
- "type": [
816
- "array",
817
- "null"
818
- ],
819
- "items": {
820
- "$ref": "#/definitions/CliArg"
821
- }
822
- },
823
- "subcommands": {
824
- "description": "List of subcommands of this command",
825
- "type": [
826
- "object",
827
- "null"
828
- ],
829
- "additionalProperties": {
830
- "$ref": "#/definitions/CliConfig"
831
- }
832
- }
833
- },
834
- "additionalProperties": false
835
- },
836
- "CliArg": {
837
- "description": "A CLI argument definition.",
838
- "type": "object",
839
- "required": [
840
- "name"
841
- ],
842
- "properties": {
843
- "short": {
844
- "description": "The short version of the argument, without the preceding -.\n\nNOTE: Any leading `-` characters will be stripped, and only the first non-character will be used as the short version.",
845
- "type": [
846
- "string",
847
- "null"
848
- ],
849
- "maxLength": 1,
850
- "minLength": 1
851
- },
852
- "name": {
853
- "description": "The unique argument name",
854
- "type": "string"
855
- },
856
- "description": {
857
- "description": "The argument description which will be shown on the help information. Typically, this is a short (one line) description of the arg.",
858
- "type": [
859
- "string",
860
- "null"
861
- ]
862
- },
863
- "longDescription": {
864
- "description": "The argument long description which will be shown on the help information. Typically this a more detailed (multi-line) message that describes the argument.",
865
- "type": [
866
- "string",
867
- "null"
868
- ]
869
- },
870
- "takesValue": {
871
- "description": "Specifies that the argument takes a value at run time.\n\nNOTE: values for arguments may be specified in any of the following methods - Using a space such as -o value or --option value - Using an equals and no space such as -o=value or --option=value - Use a short and no space such as -ovalue",
872
- "default": false,
873
- "type": "boolean"
874
- },
875
- "multiple": {
876
- "description": "Specifies that the argument may have an unknown number of multiple values. Without any other settings, this argument may appear only once.\n\nFor example, --opt val1 val2 is allowed, but --opt val1 val2 --opt val3 is not.\n\nNOTE: Setting this requires `takes_value` to be set to true.",
877
- "default": false,
878
- "type": "boolean"
879
- },
880
- "multipleOccurrences": {
881
- "description": "Specifies that the argument may appear more than once. For flags, this results in the number of occurrences of the flag being recorded. For example -ddd or -d -d -d would count as three occurrences. For options or arguments that take a value, this does not affect how many values they can accept. (i.e. only one at a time is allowed)\n\nFor example, --opt val1 --opt val2 is allowed, but --opt val1 val2 is not.",
882
- "default": false,
883
- "type": "boolean"
884
- },
885
- "numberOfValues": {
886
- "description": "Specifies how many values are required to satisfy this argument. For example, if you had a `-f <file>` argument where you wanted exactly 3 'files' you would set `number_of_values = 3`, and this argument wouldn't be satisfied unless the user provided 3 and only 3 values.\n\n**NOTE:** Does *not* require `multiple_occurrences = true` to be set. Setting `multiple_occurrences = true` would allow `-f <file> <file> <file> -f <file> <file> <file>` where as *not* setting it would only allow one occurrence of this argument.\n\n**NOTE:** implicitly sets `takes_value = true` and `multiple_values = true`.",
887
- "type": [
888
- "integer",
889
- "null"
890
- ],
891
- "format": "uint",
892
- "minimum": 0.0
893
- },
894
- "possibleValues": {
895
- "description": "Specifies a list of possible values for this argument. At runtime, the CLI verifies that only one of the specified values was used, or fails with an error message.",
896
- "type": [
897
- "array",
898
- "null"
899
- ],
900
- "items": {
901
- "type": "string"
902
- }
903
- },
904
- "minValues": {
905
- "description": "Specifies the minimum number of values for this argument. For example, if you had a -f `<file>` argument where you wanted at least 2 'files', you would set `minValues: 2`, and this argument would be satisfied if the user provided, 2 or more values.",
906
- "type": [
907
- "integer",
908
- "null"
909
- ],
910
- "format": "uint",
911
- "minimum": 0.0
912
- },
913
- "maxValues": {
914
- "description": "Specifies the maximum number of values are for this argument. For example, if you had a -f `<file>` argument where you wanted up to 3 'files', you would set .max_values(3), and this argument would be satisfied if the user provided, 1, 2, or 3 values.",
915
- "type": [
916
- "integer",
917
- "null"
918
- ],
919
- "format": "uint",
920
- "minimum": 0.0
921
- },
922
- "required": {
923
- "description": "Sets whether or not the argument is required by default.\n\n- Required by default means it is required, when no other conflicting rules have been evaluated - Conflicting rules take precedence over being required.",
924
- "default": false,
925
- "type": "boolean"
926
- },
927
- "requiredUnlessPresent": {
928
- "description": "Sets an arg that override this arg's required setting i.e. this arg will be required unless this other argument is present.",
929
- "type": [
930
- "string",
931
- "null"
932
- ]
933
- },
934
- "requiredUnlessPresentAll": {
935
- "description": "Sets args that override this arg's required setting i.e. this arg will be required unless all these other arguments are present.",
936
- "type": [
937
- "array",
938
- "null"
939
- ],
940
- "items": {
941
- "type": "string"
942
- }
943
- },
944
- "requiredUnlessPresentAny": {
945
- "description": "Sets args that override this arg's required setting i.e. this arg will be required unless at least one of these other arguments are present.",
946
- "type": [
947
- "array",
948
- "null"
949
- ],
950
- "items": {
951
- "type": "string"
952
- }
953
- },
954
- "conflictsWith": {
955
- "description": "Sets a conflicting argument by name i.e. when using this argument, the following argument can't be present and vice versa.",
956
- "type": [
957
- "string",
958
- "null"
959
- ]
960
- },
961
- "conflictsWithAll": {
962
- "description": "The same as conflictsWith but allows specifying multiple two-way conflicts per argument.",
963
- "type": [
964
- "array",
965
- "null"
966
- ],
967
- "items": {
968
- "type": "string"
969
- }
970
- },
971
- "requires": {
972
- "description": "Tets an argument by name that is required when this one is present i.e. when using this argument, the following argument must be present.",
973
- "type": [
974
- "string",
975
- "null"
976
- ]
977
- },
978
- "requiresAll": {
979
- "description": "Sts multiple arguments by names that are required when this one is present i.e. when using this argument, the following arguments must be present.",
980
- "type": [
981
- "array",
982
- "null"
983
- ],
984
- "items": {
985
- "type": "string"
986
- }
987
- },
988
- "requiresIf": {
989
- "description": "Allows a conditional requirement with the signature [arg, value] the requirement will only become valid if `arg`'s value equals `${value}`.",
990
- "type": [
991
- "array",
992
- "null"
993
- ],
994
- "items": {
995
- "type": "string"
996
- }
997
- },
998
- "requiredIfEq": {
999
- "description": "Allows specifying that an argument is required conditionally with the signature [arg, value] the requirement will only become valid if the `arg`'s value equals `${value}`.",
1000
- "type": [
1001
- "array",
1002
- "null"
1003
- ],
1004
- "items": {
1005
- "type": "string"
1006
- }
1007
- },
1008
- "requireEquals": {
1009
- "description": "Requires that options use the --option=val syntax i.e. an equals between the option and associated value.",
1010
- "type": [
1011
- "boolean",
1012
- "null"
1013
- ]
1014
- },
1015
- "index": {
1016
- "description": "The positional argument index, starting at 1.\n\nThe index refers to position according to other positional argument. It does not define position in the argument list as a whole. When utilized with multiple=true, only the last positional argument may be defined as multiple (i.e. the one with the highest index).",
1017
- "type": [
1018
- "integer",
1019
- "null"
1020
- ],
1021
- "format": "uint",
1022
- "minimum": 1.0
1023
- }
1024
- },
1025
- "additionalProperties": false
1026
- },
1027
554
  "BundleConfig": {
1028
555
  "description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig",
1029
556
  "type": "object",
@@ -1186,15 +713,30 @@
1186
713
  "$ref": "#/definitions/AndroidConfig"
1187
714
  }
1188
715
  ]
1189
- }
1190
- },
1191
- "additionalProperties": false
1192
- },
1193
- "BundleTarget": {
1194
- "description": "Targets to bundle. Each value is case insensitive.",
1195
- "anyOf": [
1196
- {
1197
- "description": "Bundle all targets.",
716
+ },
717
+ "updater": {
718
+ "description": "The updater configuration.",
719
+ "default": {
720
+ "active": false,
721
+ "pubkey": "",
722
+ "windows": {
723
+ "installMode": "passive"
724
+ }
725
+ },
726
+ "allOf": [
727
+ {
728
+ "$ref": "#/definitions/UpdaterConfig"
729
+ }
730
+ ]
731
+ }
732
+ },
733
+ "additionalProperties": false
734
+ },
735
+ "BundleTarget": {
736
+ "description": "Targets to bundle. Each value is case insensitive.",
737
+ "anyOf": [
738
+ {
739
+ "description": "Bundle all targets.",
1198
740
  "enum": [
1199
741
  "all"
1200
742
  ]
@@ -1803,290 +1345,247 @@
1803
1345
  },
1804
1346
  "additionalProperties": false
1805
1347
  },
1806
- "AllowlistConfig": {
1807
- "description": "Allowlist configuration. The allowlist is a translation of the [Cargo allowlist features](https://docs.rs/tauri/latest/tauri/#cargo-allowlist-features).\n\n# Notes\n\n- Endpoints that don't have their own allowlist option are enabled by default. - There is only \"opt-in\", no \"opt-out\". Setting an option to `false` has no effect.\n\n# Examples\n\n- * [`\"app-all\": true`](https://tauri.app/v1/api/config/#appallowlistconfig.all) will make the [hide](https://tauri.app/v1/api/js/app#hide) endpoint be available regardless of whether `hide` is set to `false` or `true` in the allowlist.",
1348
+ "UpdaterConfig": {
1349
+ "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
1808
1350
  "type": "object",
1809
1351
  "properties": {
1810
- "all": {
1811
- "description": "Use this flag to enable all API features.",
1352
+ "active": {
1353
+ "description": "Whether the updater is active or not.",
1812
1354
  "default": false,
1813
1355
  "type": "boolean"
1814
1356
  },
1815
- "fs": {
1816
- "description": "File system API allowlist.",
1817
- "default": {
1818
- "all": false,
1819
- "copyFile": false,
1820
- "createDir": false,
1821
- "exists": false,
1822
- "readDir": false,
1823
- "readFile": false,
1824
- "removeDir": false,
1825
- "removeFile": false,
1826
- "renameFile": false,
1827
- "scope": [],
1828
- "writeFile": false
1829
- },
1830
- "allOf": [
1831
- {
1832
- "$ref": "#/definitions/FsAllowlistConfig"
1833
- }
1834
- ]
1357
+ "pubkey": {
1358
+ "description": "Signature public key.",
1359
+ "default": "",
1360
+ "type": "string"
1835
1361
  },
1836
- "window": {
1837
- "description": "Window API allowlist.",
1362
+ "windows": {
1363
+ "description": "The Windows configuration for the updater.",
1838
1364
  "default": {
1839
- "all": false,
1840
- "center": false,
1841
- "close": false,
1842
- "create": false,
1843
- "hide": false,
1844
- "maximize": false,
1845
- "minimize": false,
1846
- "print": false,
1847
- "requestUserAttention": false,
1848
- "setAlwaysOnTop": false,
1849
- "setContentProtected": false,
1850
- "setCursorGrab": false,
1851
- "setCursorIcon": false,
1852
- "setCursorPosition": false,
1853
- "setCursorVisible": false,
1854
- "setDecorations": false,
1855
- "setFocus": false,
1856
- "setFullscreen": false,
1857
- "setIcon": false,
1858
- "setIgnoreCursorEvents": false,
1859
- "setMaxSize": false,
1860
- "setMinSize": false,
1861
- "setPosition": false,
1862
- "setResizable": false,
1863
- "setShadow": false,
1864
- "setSize": false,
1865
- "setSkipTaskbar": false,
1866
- "setTitle": false,
1867
- "show": false,
1868
- "startDragging": false,
1869
- "unmaximize": false,
1870
- "unminimize": false
1365
+ "installMode": "passive"
1871
1366
  },
1872
1367
  "allOf": [
1873
1368
  {
1874
- "$ref": "#/definitions/WindowAllowlistConfig"
1369
+ "$ref": "#/definitions/UpdaterWindowsConfig"
1875
1370
  }
1876
1371
  ]
1877
- },
1878
- "shell": {
1879
- "description": "Shell API allowlist.",
1880
- "default": {
1881
- "all": false,
1882
- "execute": false,
1883
- "open": false,
1884
- "scope": [],
1885
- "sidecar": false
1886
- },
1372
+ }
1373
+ },
1374
+ "additionalProperties": false
1375
+ },
1376
+ "UpdaterWindowsConfig": {
1377
+ "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig",
1378
+ "type": "object",
1379
+ "properties": {
1380
+ "installMode": {
1381
+ "description": "The installation mode for the update on Windows. Defaults to `passive`.",
1382
+ "default": "passive",
1887
1383
  "allOf": [
1888
1384
  {
1889
- "$ref": "#/definitions/ShellAllowlistConfig"
1385
+ "$ref": "#/definitions/WindowsUpdateInstallMode"
1890
1386
  }
1891
1387
  ]
1892
- },
1893
- "dialog": {
1894
- "description": "Dialog API allowlist.",
1895
- "default": {
1896
- "all": false,
1897
- "ask": false,
1898
- "confirm": false,
1899
- "message": false,
1900
- "open": false,
1901
- "save": false
1902
- },
1903
- "allOf": [
1904
- {
1905
- "$ref": "#/definitions/DialogAllowlistConfig"
1906
- }
1388
+ }
1389
+ },
1390
+ "additionalProperties": false
1391
+ },
1392
+ "WindowsUpdateInstallMode": {
1393
+ "description": "Install modes for the Windows update.",
1394
+ "oneOf": [
1395
+ {
1396
+ "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.",
1397
+ "type": "string",
1398
+ "enum": [
1399
+ "basicUi"
1907
1400
  ]
1908
1401
  },
1909
- "http": {
1910
- "description": "HTTP API allowlist.",
1911
- "default": {
1912
- "all": false,
1913
- "request": false,
1914
- "scope": []
1915
- },
1916
- "allOf": [
1917
- {
1918
- "$ref": "#/definitions/HttpAllowlistConfig"
1919
- }
1402
+ {
1403
+ "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
1404
+ "type": "string",
1405
+ "enum": [
1406
+ "quiet"
1920
1407
  ]
1921
1408
  },
1922
- "notification": {
1923
- "description": "Notification API allowlist.",
1924
- "default": {
1925
- "all": false
1926
- },
1927
- "allOf": [
1928
- {
1929
- "$ref": "#/definitions/NotificationAllowlistConfig"
1930
- }
1409
+ {
1410
+ "description": "Specifies unattended mode, which means the installation only shows a progress bar.",
1411
+ "type": "string",
1412
+ "enum": [
1413
+ "passive"
1931
1414
  ]
1932
- },
1933
- "globalShortcut": {
1934
- "description": "Global shortcut API allowlist.",
1935
- "default": {
1936
- "all": false
1937
- },
1938
- "allOf": [
1415
+ }
1416
+ ]
1417
+ },
1418
+ "SecurityConfig": {
1419
+ "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig",
1420
+ "type": "object",
1421
+ "properties": {
1422
+ "csp": {
1423
+ "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
1424
+ "anyOf": [
1939
1425
  {
1940
- "$ref": "#/definitions/GlobalShortcutAllowlistConfig"
1941
- }
1942
- ]
1943
- },
1944
- "os": {
1945
- "description": "OS allowlist.",
1946
- "default": {
1947
- "all": false
1948
- },
1949
- "allOf": [
1426
+ "$ref": "#/definitions/Csp"
1427
+ },
1950
1428
  {
1951
- "$ref": "#/definitions/OsAllowlistConfig"
1429
+ "type": "null"
1952
1430
  }
1953
1431
  ]
1954
1432
  },
1955
- "path": {
1956
- "description": "Path API allowlist.",
1957
- "default": {
1958
- "all": false
1959
- },
1960
- "allOf": [
1433
+ "devCsp": {
1434
+ "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
1435
+ "anyOf": [
1961
1436
  {
1962
- "$ref": "#/definitions/PathAllowlistConfig"
1963
- }
1964
- ]
1965
- },
1966
- "protocol": {
1967
- "description": "Custom protocol allowlist.",
1968
- "default": {
1969
- "all": false,
1970
- "asset": false,
1971
- "assetScope": []
1972
- },
1973
- "allOf": [
1437
+ "$ref": "#/definitions/Csp"
1438
+ },
1974
1439
  {
1975
- "$ref": "#/definitions/ProtocolAllowlistConfig"
1440
+ "type": "null"
1976
1441
  }
1977
1442
  ]
1978
1443
  },
1979
- "process": {
1980
- "description": "Process API allowlist.",
1981
- "default": {
1982
- "all": false,
1983
- "exit": false,
1984
- "relaunch": false,
1985
- "relaunchDangerousAllowSymlinkMacos": false
1986
- },
1444
+ "freezePrototype": {
1445
+ "description": "Freeze the `Object.prototype` when using the custom protocol.",
1446
+ "default": false,
1447
+ "type": "boolean"
1448
+ },
1449
+ "dangerousDisableAssetCspModification": {
1450
+ "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.",
1451
+ "default": false,
1987
1452
  "allOf": [
1988
1453
  {
1989
- "$ref": "#/definitions/ProcessAllowlistConfig"
1454
+ "$ref": "#/definitions/DisabledCspModificationKind"
1990
1455
  }
1991
1456
  ]
1992
1457
  },
1993
- "clipboard": {
1994
- "description": "Clipboard APIs allowlist.",
1458
+ "dangerousRemoteDomainIpcAccess": {
1459
+ "description": "Allow external domains to send command to Tauri.\n\nBy default, external domains do not have access to `window.__TAURI__`, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user's device.\n\nThis configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.\n\n**WARNING:** Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.",
1460
+ "default": [],
1461
+ "type": "array",
1462
+ "items": {
1463
+ "$ref": "#/definitions/RemoteDomainAccessScope"
1464
+ }
1465
+ },
1466
+ "assetProtocol": {
1467
+ "description": "Custom protocol config.",
1995
1468
  "default": {
1996
- "all": false,
1997
- "readText": false,
1998
- "writeText": false
1469
+ "enable": false,
1470
+ "scope": []
1999
1471
  },
2000
1472
  "allOf": [
2001
1473
  {
2002
- "$ref": "#/definitions/ClipboardAllowlistConfig"
1474
+ "$ref": "#/definitions/AssetProtocolConfig"
2003
1475
  }
2004
1476
  ]
1477
+ }
1478
+ },
1479
+ "additionalProperties": false
1480
+ },
1481
+ "Csp": {
1482
+ "description": "A Content-Security-Policy definition. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
1483
+ "anyOf": [
1484
+ {
1485
+ "description": "The entire CSP policy in a single text string.",
1486
+ "type": "string"
2005
1487
  },
2006
- "app": {
2007
- "description": "App APIs allowlist.",
2008
- "default": {
2009
- "all": false,
2010
- "hide": false,
2011
- "show": false
2012
- },
2013
- "allOf": [
2014
- {
2015
- "$ref": "#/definitions/AppAllowlistConfig"
2016
- }
1488
+ {
1489
+ "description": "An object mapping a directive with its sources values as a list of strings.",
1490
+ "type": "object",
1491
+ "additionalProperties": {
1492
+ "$ref": "#/definitions/CspDirectiveSources"
1493
+ }
1494
+ }
1495
+ ]
1496
+ },
1497
+ "CspDirectiveSources": {
1498
+ "description": "A Content-Security-Policy directive source list. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources>.",
1499
+ "anyOf": [
1500
+ {
1501
+ "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.",
1502
+ "type": "string"
1503
+ },
1504
+ {
1505
+ "description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.",
1506
+ "type": "array",
1507
+ "items": {
1508
+ "type": "string"
1509
+ }
1510
+ }
1511
+ ]
1512
+ },
1513
+ "DisabledCspModificationKind": {
1514
+ "description": "The possible values for the `dangerous_disable_asset_csp_modification` config option.",
1515
+ "anyOf": [
1516
+ {
1517
+ "description": "If `true`, disables all CSP modification. `false` is the default value and it configures Tauri to control the CSP.",
1518
+ "type": "boolean"
1519
+ },
1520
+ {
1521
+ "description": "Disables the given list of CSP directives modifications.",
1522
+ "type": "array",
1523
+ "items": {
1524
+ "type": "string"
1525
+ }
1526
+ }
1527
+ ]
1528
+ },
1529
+ "RemoteDomainAccessScope": {
1530
+ "description": "External command access definition.",
1531
+ "type": "object",
1532
+ "required": [
1533
+ "domain",
1534
+ "windows"
1535
+ ],
1536
+ "properties": {
1537
+ "scheme": {
1538
+ "description": "The URL scheme to allow. By default, all schemas are allowed.",
1539
+ "type": [
1540
+ "string",
1541
+ "null"
2017
1542
  ]
1543
+ },
1544
+ "domain": {
1545
+ "description": "The domain to allow.",
1546
+ "type": "string"
1547
+ },
1548
+ "windows": {
1549
+ "description": "The list of window labels this scope applies to.",
1550
+ "type": "array",
1551
+ "items": {
1552
+ "type": "string"
1553
+ }
1554
+ },
1555
+ "plugins": {
1556
+ "description": "The list of plugins that are allowed in this scope.",
1557
+ "default": [],
1558
+ "type": "array",
1559
+ "items": {
1560
+ "type": "string"
1561
+ }
2018
1562
  }
2019
1563
  },
2020
1564
  "additionalProperties": false
2021
1565
  },
2022
- "FsAllowlistConfig": {
2023
- "description": "Allowlist for the file system APIs.\n\nSee more: https://tauri.app/v1/api/config#fsallowlistconfig",
1566
+ "AssetProtocolConfig": {
1567
+ "description": "Config for the asset custom protocol.\n\nSee more: https://tauri.app/v1/api/config#assetprotocolconfig",
2024
1568
  "type": "object",
2025
1569
  "properties": {
2026
1570
  "scope": {
2027
- "description": "The access scope for the filesystem APIs.",
1571
+ "description": "The access scope for the asset protocol.",
2028
1572
  "default": [],
2029
1573
  "allOf": [
2030
1574
  {
2031
- "$ref": "#/definitions/FsAllowlistScope"
1575
+ "$ref": "#/definitions/FsScope"
2032
1576
  }
2033
1577
  ]
2034
1578
  },
2035
- "all": {
2036
- "description": "Use this flag to enable all file system API features.",
2037
- "default": false,
2038
- "type": "boolean"
2039
- },
2040
- "readFile": {
2041
- "description": "Read file from local filesystem.",
2042
- "default": false,
2043
- "type": "boolean"
2044
- },
2045
- "writeFile": {
2046
- "description": "Write file to local filesystem.",
2047
- "default": false,
2048
- "type": "boolean"
2049
- },
2050
- "readDir": {
2051
- "description": "Read directory from local filesystem.",
2052
- "default": false,
2053
- "type": "boolean"
2054
- },
2055
- "copyFile": {
2056
- "description": "Copy file from local filesystem.",
2057
- "default": false,
2058
- "type": "boolean"
2059
- },
2060
- "createDir": {
2061
- "description": "Create directory from local filesystem.",
2062
- "default": false,
2063
- "type": "boolean"
2064
- },
2065
- "removeDir": {
2066
- "description": "Remove directory from local filesystem.",
2067
- "default": false,
2068
- "type": "boolean"
2069
- },
2070
- "removeFile": {
2071
- "description": "Remove file from local filesystem.",
2072
- "default": false,
2073
- "type": "boolean"
2074
- },
2075
- "renameFile": {
2076
- "description": "Rename file from local filesystem.",
2077
- "default": false,
2078
- "type": "boolean"
2079
- },
2080
- "exists": {
2081
- "description": "Check if path exists on the local filesystem.",
1579
+ "enable": {
1580
+ "description": "Enables the asset protocol.",
2082
1581
  "default": false,
2083
1582
  "type": "boolean"
2084
1583
  }
2085
1584
  },
2086
1585
  "additionalProperties": false
2087
1586
  },
2088
- "FsAllowlistScope": {
2089
- "description": "Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
1587
+ "FsScope": {
1588
+ "description": "Protocol scope definition. It is a list of glob patterns that restrict the API access from the webview.\n\nEach pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
2090
1589
  "anyOf": [
2091
1590
  {
2092
1591
  "description": "A list of paths that are allowed by this scope.",
@@ -2119,710 +1618,6 @@
2119
1618
  }
2120
1619
  ]
2121
1620
  },
2122
- "WindowAllowlistConfig": {
2123
- "description": "Allowlist for the window APIs.\n\nSee more: https://tauri.app/v1/api/config#windowallowlistconfig",
2124
- "type": "object",
2125
- "properties": {
2126
- "all": {
2127
- "description": "Use this flag to enable all window API features.",
2128
- "default": false,
2129
- "type": "boolean"
2130
- },
2131
- "create": {
2132
- "description": "Allows dynamic window creation.",
2133
- "default": false,
2134
- "type": "boolean"
2135
- },
2136
- "center": {
2137
- "description": "Allows centering the window.",
2138
- "default": false,
2139
- "type": "boolean"
2140
- },
2141
- "requestUserAttention": {
2142
- "description": "Allows requesting user attention on the window.",
2143
- "default": false,
2144
- "type": "boolean"
2145
- },
2146
- "setResizable": {
2147
- "description": "Allows setting the resizable flag of the window.",
2148
- "default": false,
2149
- "type": "boolean"
2150
- },
2151
- "setTitle": {
2152
- "description": "Allows changing the window title.",
2153
- "default": false,
2154
- "type": "boolean"
2155
- },
2156
- "maximize": {
2157
- "description": "Allows maximizing the window.",
2158
- "default": false,
2159
- "type": "boolean"
2160
- },
2161
- "unmaximize": {
2162
- "description": "Allows unmaximizing the window.",
2163
- "default": false,
2164
- "type": "boolean"
2165
- },
2166
- "minimize": {
2167
- "description": "Allows minimizing the window.",
2168
- "default": false,
2169
- "type": "boolean"
2170
- },
2171
- "unminimize": {
2172
- "description": "Allows unminimizing the window.",
2173
- "default": false,
2174
- "type": "boolean"
2175
- },
2176
- "show": {
2177
- "description": "Allows showing the window.",
2178
- "default": false,
2179
- "type": "boolean"
2180
- },
2181
- "hide": {
2182
- "description": "Allows hiding the window.",
2183
- "default": false,
2184
- "type": "boolean"
2185
- },
2186
- "close": {
2187
- "description": "Allows closing the window.",
2188
- "default": false,
2189
- "type": "boolean"
2190
- },
2191
- "setDecorations": {
2192
- "description": "Allows setting the decorations flag of the window.",
2193
- "default": false,
2194
- "type": "boolean"
2195
- },
2196
- "setShadow": {
2197
- "description": "Allows setting the shadow flag of the window.",
2198
- "default": false,
2199
- "type": "boolean"
2200
- },
2201
- "setAlwaysOnTop": {
2202
- "description": "Allows setting the always_on_top flag of the window.",
2203
- "default": false,
2204
- "type": "boolean"
2205
- },
2206
- "setContentProtected": {
2207
- "description": "Allows preventing the window contents from being captured by other apps.",
2208
- "default": false,
2209
- "type": "boolean"
2210
- },
2211
- "setSize": {
2212
- "description": "Allows setting the window size.",
2213
- "default": false,
2214
- "type": "boolean"
2215
- },
2216
- "setMinSize": {
2217
- "description": "Allows setting the window minimum size.",
2218
- "default": false,
2219
- "type": "boolean"
2220
- },
2221
- "setMaxSize": {
2222
- "description": "Allows setting the window maximum size.",
2223
- "default": false,
2224
- "type": "boolean"
2225
- },
2226
- "setPosition": {
2227
- "description": "Allows changing the position of the window.",
2228
- "default": false,
2229
- "type": "boolean"
2230
- },
2231
- "setFullscreen": {
2232
- "description": "Allows setting the fullscreen flag of the window.",
2233
- "default": false,
2234
- "type": "boolean"
2235
- },
2236
- "setFocus": {
2237
- "description": "Allows focusing the window.",
2238
- "default": false,
2239
- "type": "boolean"
2240
- },
2241
- "setIcon": {
2242
- "description": "Allows changing the window icon.",
2243
- "default": false,
2244
- "type": "boolean"
2245
- },
2246
- "setSkipTaskbar": {
2247
- "description": "Allows setting the skip_taskbar flag of the window.",
2248
- "default": false,
2249
- "type": "boolean"
2250
- },
2251
- "setCursorGrab": {
2252
- "description": "Allows grabbing the cursor.",
2253
- "default": false,
2254
- "type": "boolean"
2255
- },
2256
- "setCursorVisible": {
2257
- "description": "Allows setting the cursor visibility.",
2258
- "default": false,
2259
- "type": "boolean"
2260
- },
2261
- "setCursorIcon": {
2262
- "description": "Allows changing the cursor icon.",
2263
- "default": false,
2264
- "type": "boolean"
2265
- },
2266
- "setCursorPosition": {
2267
- "description": "Allows setting the cursor position.",
2268
- "default": false,
2269
- "type": "boolean"
2270
- },
2271
- "setIgnoreCursorEvents": {
2272
- "description": "Allows ignoring cursor events.",
2273
- "default": false,
2274
- "type": "boolean"
2275
- },
2276
- "startDragging": {
2277
- "description": "Allows start dragging on the window.",
2278
- "default": false,
2279
- "type": "boolean"
2280
- },
2281
- "print": {
2282
- "description": "Allows opening the system dialog to print the window content.",
2283
- "default": false,
2284
- "type": "boolean"
2285
- }
2286
- },
2287
- "additionalProperties": false
2288
- },
2289
- "ShellAllowlistConfig": {
2290
- "description": "Allowlist for the shell APIs.\n\nSee more: https://tauri.app/v1/api/config#shellallowlistconfig",
2291
- "type": "object",
2292
- "properties": {
2293
- "scope": {
2294
- "description": "Access scope for the binary execution APIs. Sidecars are automatically enabled.",
2295
- "default": [],
2296
- "allOf": [
2297
- {
2298
- "$ref": "#/definitions/ShellAllowlistScope"
2299
- }
2300
- ]
2301
- },
2302
- "all": {
2303
- "description": "Use this flag to enable all shell API features.",
2304
- "default": false,
2305
- "type": "boolean"
2306
- },
2307
- "execute": {
2308
- "description": "Enable binary execution.",
2309
- "default": false,
2310
- "type": "boolean"
2311
- },
2312
- "sidecar": {
2313
- "description": "Enable sidecar execution, allowing the JavaScript layer to spawn a sidecar command, an executable that is shipped with the application. For more information see <https://tauri.app/v1/guides/building/sidecar>.",
2314
- "default": false,
2315
- "type": "boolean"
2316
- },
2317
- "open": {
2318
- "description": "Open URL with the user's default application.",
2319
- "default": false,
2320
- "allOf": [
2321
- {
2322
- "$ref": "#/definitions/ShellAllowlistOpen"
2323
- }
2324
- ]
2325
- }
2326
- },
2327
- "additionalProperties": false
2328
- },
2329
- "ShellAllowlistScope": {
2330
- "description": "Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.",
2331
- "type": "array",
2332
- "items": {
2333
- "$ref": "#/definitions/ShellAllowedCommand"
2334
- }
2335
- },
2336
- "ShellAllowedCommand": {
2337
- "description": "A command allowed to be executed by the webview API.",
2338
- "type": "object",
2339
- "required": [
2340
- "name"
2341
- ],
2342
- "properties": {
2343
- "name": {
2344
- "description": "The name for this allowed shell command configuration.\n\nThis name will be used inside of the webview API to call this command along with any specified arguments.",
2345
- "type": "string"
2346
- },
2347
- "cmd": {
2348
- "description": "The command name. It can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
2349
- "default": "",
2350
- "type": "string"
2351
- },
2352
- "args": {
2353
- "description": "The allowed arguments for the command execution.",
2354
- "default": false,
2355
- "allOf": [
2356
- {
2357
- "$ref": "#/definitions/ShellAllowedArgs"
2358
- }
2359
- ]
2360
- },
2361
- "sidecar": {
2362
- "description": "If this command is a sidecar command.",
2363
- "default": false,
2364
- "type": "boolean"
2365
- }
2366
- }
2367
- },
2368
- "ShellAllowedArgs": {
2369
- "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.",
2370
- "anyOf": [
2371
- {
2372
- "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.",
2373
- "type": "boolean"
2374
- },
2375
- {
2376
- "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.",
2377
- "type": "array",
2378
- "items": {
2379
- "$ref": "#/definitions/ShellAllowedArg"
2380
- }
2381
- }
2382
- ]
2383
- },
2384
- "ShellAllowedArg": {
2385
- "description": "A command argument allowed to be executed by the webview API.",
2386
- "anyOf": [
2387
- {
2388
- "description": "A non-configurable argument that is passed to the command in the order it was specified.",
2389
- "type": "string"
2390
- },
2391
- {
2392
- "description": "A variable that is set while calling the command from the webview API.",
2393
- "type": "object",
2394
- "required": [
2395
- "validator"
2396
- ],
2397
- "properties": {
2398
- "validator": {
2399
- "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax",
2400
- "type": "string"
2401
- }
2402
- },
2403
- "additionalProperties": false
2404
- }
2405
- ]
2406
- },
2407
- "ShellAllowlistOpen": {
2408
- "description": "Defines the `shell > open` api scope.",
2409
- "anyOf": [
2410
- {
2411
- "description": "If the shell open API should be enabled.\n\nIf enabled, the default validation regex (`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`) is used.",
2412
- "type": "boolean"
2413
- },
2414
- {
2415
- "description": "Enable the shell open API, with a custom regex that the opened path must match against.\n\nIf using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g. `--enable-debugging`, `-i`, `/R`.",
2416
- "type": "string"
2417
- }
2418
- ]
2419
- },
2420
- "DialogAllowlistConfig": {
2421
- "description": "Allowlist for the dialog APIs.\n\nSee more: https://tauri.app/v1/api/config#dialogallowlistconfig",
2422
- "type": "object",
2423
- "properties": {
2424
- "all": {
2425
- "description": "Use this flag to enable all dialog API features.",
2426
- "default": false,
2427
- "type": "boolean"
2428
- },
2429
- "open": {
2430
- "description": "Allows the API to open a dialog window to pick files.",
2431
- "default": false,
2432
- "type": "boolean"
2433
- },
2434
- "save": {
2435
- "description": "Allows the API to open a dialog window to pick where to save files.",
2436
- "default": false,
2437
- "type": "boolean"
2438
- },
2439
- "message": {
2440
- "description": "Allows the API to show a message dialog window.",
2441
- "default": false,
2442
- "type": "boolean"
2443
- },
2444
- "ask": {
2445
- "description": "Allows the API to show a dialog window with Yes/No buttons.",
2446
- "default": false,
2447
- "type": "boolean"
2448
- },
2449
- "confirm": {
2450
- "description": "Allows the API to show a dialog window with Ok/Cancel buttons.",
2451
- "default": false,
2452
- "type": "boolean"
2453
- }
2454
- },
2455
- "additionalProperties": false
2456
- },
2457
- "HttpAllowlistConfig": {
2458
- "description": "Allowlist for the HTTP APIs.\n\nSee more: https://tauri.app/v1/api/config#httpallowlistconfig",
2459
- "type": "object",
2460
- "properties": {
2461
- "scope": {
2462
- "description": "The access scope for the HTTP APIs.",
2463
- "default": [],
2464
- "allOf": [
2465
- {
2466
- "$ref": "#/definitions/HttpAllowlistScope"
2467
- }
2468
- ]
2469
- },
2470
- "all": {
2471
- "description": "Use this flag to enable all HTTP API features.",
2472
- "default": false,
2473
- "type": "boolean"
2474
- },
2475
- "request": {
2476
- "description": "Allows making HTTP requests.",
2477
- "default": false,
2478
- "type": "boolean"
2479
- }
2480
- },
2481
- "additionalProperties": false
2482
- },
2483
- "HttpAllowlistScope": {
2484
- "description": "HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples: - \"https://**\": allows all HTTPS urls - \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path - \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
2485
- "type": "array",
2486
- "items": {
2487
- "type": "string",
2488
- "format": "uri"
2489
- }
2490
- },
2491
- "NotificationAllowlistConfig": {
2492
- "description": "Allowlist for the notification APIs.\n\nSee more: https://tauri.app/v1/api/config#notificationallowlistconfig",
2493
- "type": "object",
2494
- "properties": {
2495
- "all": {
2496
- "description": "Use this flag to enable all notification API features.",
2497
- "default": false,
2498
- "type": "boolean"
2499
- }
2500
- },
2501
- "additionalProperties": false
2502
- },
2503
- "GlobalShortcutAllowlistConfig": {
2504
- "description": "Allowlist for the global shortcut APIs.\n\nSee more: https://tauri.app/v1/api/config#globalshortcutallowlistconfig",
2505
- "type": "object",
2506
- "properties": {
2507
- "all": {
2508
- "description": "Use this flag to enable all global shortcut API features.",
2509
- "default": false,
2510
- "type": "boolean"
2511
- }
2512
- },
2513
- "additionalProperties": false
2514
- },
2515
- "OsAllowlistConfig": {
2516
- "description": "Allowlist for the OS APIs.\n\nSee more: https://tauri.app/v1/api/config#osallowlistconfig",
2517
- "type": "object",
2518
- "properties": {
2519
- "all": {
2520
- "description": "Use this flag to enable all OS API features.",
2521
- "default": false,
2522
- "type": "boolean"
2523
- }
2524
- },
2525
- "additionalProperties": false
2526
- },
2527
- "PathAllowlistConfig": {
2528
- "description": "Allowlist for the path APIs.\n\nSee more: https://tauri.app/v1/api/config#pathallowlistconfig",
2529
- "type": "object",
2530
- "properties": {
2531
- "all": {
2532
- "description": "Use this flag to enable all path API features.",
2533
- "default": false,
2534
- "type": "boolean"
2535
- }
2536
- },
2537
- "additionalProperties": false
2538
- },
2539
- "ProtocolAllowlistConfig": {
2540
- "description": "Allowlist for the custom protocols.\n\nSee more: https://tauri.app/v1/api/config#protocolallowlistconfig",
2541
- "type": "object",
2542
- "properties": {
2543
- "assetScope": {
2544
- "description": "The access scope for the asset protocol.",
2545
- "default": [],
2546
- "allOf": [
2547
- {
2548
- "$ref": "#/definitions/FsAllowlistScope"
2549
- }
2550
- ]
2551
- },
2552
- "all": {
2553
- "description": "Use this flag to enable all custom protocols.",
2554
- "default": false,
2555
- "type": "boolean"
2556
- },
2557
- "asset": {
2558
- "description": "Enables the asset protocol.",
2559
- "default": false,
2560
- "type": "boolean"
2561
- }
2562
- },
2563
- "additionalProperties": false
2564
- },
2565
- "ProcessAllowlistConfig": {
2566
- "description": "Allowlist for the process APIs.\n\nSee more: https://tauri.app/v1/api/config#processallowlistconfig",
2567
- "type": "object",
2568
- "properties": {
2569
- "all": {
2570
- "description": "Use this flag to enable all process APIs.",
2571
- "default": false,
2572
- "type": "boolean"
2573
- },
2574
- "relaunch": {
2575
- "description": "Enables the relaunch API.",
2576
- "default": false,
2577
- "type": "boolean"
2578
- },
2579
- "relaunchDangerousAllowSymlinkMacos": {
2580
- "description": "Dangerous option that allows macOS to relaunch even if the binary contains a symlink.\n\nThis is due to macOS having less symlink protection. Highly recommended to not set this flag unless you have a very specific reason too, and understand the implications of it.",
2581
- "default": false,
2582
- "type": "boolean"
2583
- },
2584
- "exit": {
2585
- "description": "Enables the exit API.",
2586
- "default": false,
2587
- "type": "boolean"
2588
- }
2589
- },
2590
- "additionalProperties": false
2591
- },
2592
- "ClipboardAllowlistConfig": {
2593
- "description": "Allowlist for the clipboard APIs.\n\nSee more: https://tauri.app/v1/api/config#clipboardallowlistconfig",
2594
- "type": "object",
2595
- "properties": {
2596
- "all": {
2597
- "description": "Use this flag to enable all clipboard APIs.",
2598
- "default": false,
2599
- "type": "boolean"
2600
- },
2601
- "writeText": {
2602
- "description": "Enables the clipboard's `writeText` API.",
2603
- "default": false,
2604
- "type": "boolean"
2605
- },
2606
- "readText": {
2607
- "description": "Enables the clipboard's `readText` API.",
2608
- "default": false,
2609
- "type": "boolean"
2610
- }
2611
- },
2612
- "additionalProperties": false
2613
- },
2614
- "AppAllowlistConfig": {
2615
- "description": "Allowlist for the app APIs.\n\nSee more: https://tauri.app/v1/api/config#appallowlistconfig",
2616
- "type": "object",
2617
- "properties": {
2618
- "all": {
2619
- "description": "Use this flag to enable all app APIs.",
2620
- "default": false,
2621
- "type": "boolean"
2622
- },
2623
- "show": {
2624
- "description": "Enables the app's `show` API.",
2625
- "default": false,
2626
- "type": "boolean"
2627
- },
2628
- "hide": {
2629
- "description": "Enables the app's `hide` API.",
2630
- "default": false,
2631
- "type": "boolean"
2632
- }
2633
- },
2634
- "additionalProperties": false
2635
- },
2636
- "SecurityConfig": {
2637
- "description": "Security configuration.\n\nSee more: https://tauri.app/v1/api/config#securityconfig",
2638
- "type": "object",
2639
- "properties": {
2640
- "csp": {
2641
- "description": "The Content Security Policy that will be injected on all HTML files on the built application. If [`dev_csp`](#SecurityConfig.devCsp) is not specified, this value is also injected on dev.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
2642
- "anyOf": [
2643
- {
2644
- "$ref": "#/definitions/Csp"
2645
- },
2646
- {
2647
- "type": "null"
2648
- }
2649
- ]
2650
- },
2651
- "devCsp": {
2652
- "description": "The Content Security Policy that will be injected on all HTML files on development.\n\nThis is a really important part of the configuration since it helps you ensure your WebView is secured. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
2653
- "anyOf": [
2654
- {
2655
- "$ref": "#/definitions/Csp"
2656
- },
2657
- {
2658
- "type": "null"
2659
- }
2660
- ]
2661
- },
2662
- "freezePrototype": {
2663
- "description": "Freeze the `Object.prototype` when using the custom protocol.",
2664
- "default": false,
2665
- "type": "boolean"
2666
- },
2667
- "dangerousDisableAssetCspModification": {
2668
- "description": "Disables the Tauri-injected CSP sources.\n\nAt compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.\n\nThis configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.\n\n**WARNING:** Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.",
2669
- "default": false,
2670
- "allOf": [
2671
- {
2672
- "$ref": "#/definitions/DisabledCspModificationKind"
2673
- }
2674
- ]
2675
- }
2676
- },
2677
- "additionalProperties": false
2678
- },
2679
- "Csp": {
2680
- "description": "A Content-Security-Policy definition. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP>.",
2681
- "anyOf": [
2682
- {
2683
- "description": "The entire CSP policy in a single text string.",
2684
- "type": "string"
2685
- },
2686
- {
2687
- "description": "An object mapping a directive with its sources values as a list of strings.",
2688
- "type": "object",
2689
- "additionalProperties": {
2690
- "$ref": "#/definitions/CspDirectiveSources"
2691
- }
2692
- }
2693
- ]
2694
- },
2695
- "CspDirectiveSources": {
2696
- "description": "A Content-Security-Policy directive source list. See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources>.",
2697
- "anyOf": [
2698
- {
2699
- "description": "An inline list of CSP sources. Same as [`Self::List`], but concatenated with a space separator.",
2700
- "type": "string"
2701
- },
2702
- {
2703
- "description": "A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.",
2704
- "type": "array",
2705
- "items": {
2706
- "type": "string"
2707
- }
2708
- }
2709
- ]
2710
- },
2711
- "DisabledCspModificationKind": {
2712
- "description": "The possible values for the `dangerous_disable_asset_csp_modification` config option.",
2713
- "anyOf": [
2714
- {
2715
- "description": "If `true`, disables all CSP modification. `false` is the default value and it configures Tauri to control the CSP.",
2716
- "type": "boolean"
2717
- },
2718
- {
2719
- "description": "Disables the given list of CSP directives modifications.",
2720
- "type": "array",
2721
- "items": {
2722
- "type": "string"
2723
- }
2724
- }
2725
- ]
2726
- },
2727
- "UpdaterConfig": {
2728
- "description": "The Updater configuration object.\n\nSee more: https://tauri.app/v1/api/config#updaterconfig",
2729
- "type": "object",
2730
- "properties": {
2731
- "active": {
2732
- "description": "Whether the updater is active or not.",
2733
- "default": false,
2734
- "type": "boolean"
2735
- },
2736
- "dialog": {
2737
- "description": "Display built-in dialog or use event system if disabled.",
2738
- "default": true,
2739
- "type": "boolean"
2740
- },
2741
- "endpoints": {
2742
- "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.",
2743
- "type": [
2744
- "array",
2745
- "null"
2746
- ],
2747
- "items": {
2748
- "$ref": "#/definitions/UpdaterEndpoint"
2749
- }
2750
- },
2751
- "pubkey": {
2752
- "description": "Signature public key.",
2753
- "default": "",
2754
- "type": "string"
2755
- },
2756
- "windows": {
2757
- "description": "The Windows configuration for the updater.",
2758
- "default": {
2759
- "installMode": "passive",
2760
- "installerArgs": []
2761
- },
2762
- "allOf": [
2763
- {
2764
- "$ref": "#/definitions/UpdaterWindowsConfig"
2765
- }
2766
- ]
2767
- }
2768
- },
2769
- "additionalProperties": false
2770
- },
2771
- "UpdaterEndpoint": {
2772
- "description": "A URL to an updater server.\n\nThe URL must use the `https` scheme on production.",
2773
- "type": "string",
2774
- "format": "uri"
2775
- },
2776
- "UpdaterWindowsConfig": {
2777
- "description": "The updater configuration for Windows.\n\nSee more: https://tauri.app/v1/api/config#updaterwindowsconfig",
2778
- "type": "object",
2779
- "properties": {
2780
- "installerArgs": {
2781
- "description": "Additional arguments given to the NSIS or WiX installer.",
2782
- "default": [],
2783
- "type": "array",
2784
- "items": {
2785
- "type": "string"
2786
- }
2787
- },
2788
- "installMode": {
2789
- "description": "The installation mode for the update on Windows. Defaults to `passive`.",
2790
- "default": "passive",
2791
- "allOf": [
2792
- {
2793
- "$ref": "#/definitions/WindowsUpdateInstallMode"
2794
- }
2795
- ]
2796
- }
2797
- },
2798
- "additionalProperties": false
2799
- },
2800
- "WindowsUpdateInstallMode": {
2801
- "description": "Install modes for the Windows update.",
2802
- "oneOf": [
2803
- {
2804
- "description": "Specifies there's a basic UI during the installation process, including a final dialog box at the end.",
2805
- "type": "string",
2806
- "enum": [
2807
- "basicUi"
2808
- ]
2809
- },
2810
- {
2811
- "description": "The quiet mode means there's no user interaction required. Requires admin privileges if the installer does (WiX).",
2812
- "type": "string",
2813
- "enum": [
2814
- "quiet"
2815
- ]
2816
- },
2817
- {
2818
- "description": "Specifies unattended mode, which means the installation only shows a progress bar.",
2819
- "type": "string",
2820
- "enum": [
2821
- "passive"
2822
- ]
2823
- }
2824
- ]
2825
- },
2826
1621
  "SystemTrayConfig": {
2827
1622
  "description": "Configuration for application system tray icon.\n\nSee more: https://tauri.app/v1/api/config#systemtrayconfig",
2828
1623
  "type": "object",