Skip to content

Commit 09376af

Browse files
authored
refactor(core): remove cli feature (#6704)
1 parent 34b8f33 commit 09376af

File tree

28 files changed

+172
-1436
lines changed

28 files changed

+172
-1436
lines changed

.changes/move-cli.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"api": patch
3+
"tauri": patch
4+
"tauri-utils": patch
5+
---
6+
7+
Moved the `cli` feature to its own plugin in the plugins-workspace repository.

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The code for the bundler is located in `[Tauri repo root]/tooling/bundler`, and
7171

7272
### Developing Tauri Core and Related Components (Rust API, Macros, Codegen, and Utils)
7373

74-
The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all", "cli" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project.
74+
The code for Tauri Core is located in `[Tauri repo root]/core/tauri`, and the Rust API, Macros, and Utils are in `[Tauri repo root]/core/tauri-(api/macros/utils)`. The easiest way to test your changes is to use the `[Tauri repo root]/examples/helloworld` app. It automatically rebuilds and uses your local copy of the Tauri core packages. Just run `yarn tauri build` or `yarn tauri dev` in the helloworld app directory after making changes to test them out. To use your local changes in another project, edit its `src-tauri/Cargo.toml` file so that the `tauri` key looks like `tauri = { path = "PATH", features = [ "api-all" ] }`, where `PATH` is the relative path to `[Tauri repo root]/core/tauri`. Then, your local copy of the Tauri core packages will be rebuilt and used whenever you build that project.
7575

7676
#### Building the documentation locally
7777

.github/workflows/lint-fmt-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
clippy:
5151
- { args: '', key: 'empty' }
5252
- {
53-
args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart',
53+
args: '--features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,windows7-compat,http-multipart',
5454
key: 'all'
5555
}
5656
- { args: '--features custom-protocol', key: 'custom-protocol' }

.github/workflows/test-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
key: api-all
7777
}
7878
- {
79-
args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,cli,updater,system-tray,windows7-compat,http-multipart,
79+
args: --features compression,wry,linux-protocol-headers,isolation,custom-protocol,api-all,updater,system-tray,windows7-compat,http-multipart,
8080
key: all
8181
}
8282

core/config-schema/schema.json

Lines changed: 0 additions & 257 deletions
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,6 @@
258258
"$ref": "#/definitions/WindowConfig"
259259
}
260260
},
261-
"cli": {
262-
"description": "The CLI configuration.",
263-
"anyOf": [
264-
{
265-
"$ref": "#/definitions/CliConfig"
266-
},
267-
{
268-
"type": "null"
269-
}
270-
]
271-
},
272261
"bundle": {
273262
"description": "The bundler configuration.",
274263
"default": {
@@ -778,252 +767,6 @@
778767
}
779768
]
780769
},
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-
},
1027770
"BundleConfig": {
1028771
"description": "Configuration for tauri-bundler.\n\nSee more: https://tauri.app/v1/api/config#bundleconfig",
1029772
"type": "object",

0 commit comments

Comments
 (0)