Эх сурвалжийг харах

chore: rename `config-schema` to `tauri-config-schema` (#6250)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Amr Bashir 2 жил өмнө
parent
commit
6ff801e27d
32 өөрчлөгдсөн 63 нэмэгдсэн , 65 устгасан
  1. 3 3
      .changes/config.json
  2. 4 4
      .github/workflows/check-generated-files.yml
  3. 1 1
      .prettierignore
  4. 7 5
      .scripts/covector/package-latest-version.js
  5. 3 3
      Cargo.toml
  6. 0 13
      core/config-schema/Cargo.toml
  7. 15 0
      core/tauri-config-schema/Cargo.toml
  8. 0 0
      core/tauri-config-schema/build.rs
  9. 0 0
      core/tauri-config-schema/schema.json
  10. 0 0
      core/tauri-config-schema/src/main.rs
  11. 1 1
      core/tauri/test/fixture/src-tauri/tauri.conf.json
  12. 1 1
      core/tests/app-updater/tauri.conf.json
  13. 1 1
      examples/api/src-tauri/tauri.conf.json
  14. 1 1
      examples/commands/tauri.conf.json
  15. 1 1
      examples/helloworld/tauri.conf.json
  16. 1 1
      examples/isolation/tauri.conf.json
  17. 1 1
      examples/multiwindow/tauri.conf.json
  18. 1 1
      examples/navigation/tauri.conf.json
  19. 1 1
      examples/parent-window/tauri.conf.json
  20. 1 1
      examples/resources/src-tauri/tauri.conf.json
  21. 1 1
      examples/sidecar/src-tauri/tauri.conf.json
  22. 1 1
      examples/splashscreen/tauri.conf.json
  23. 1 1
      examples/state/tauri.conf.json
  24. 1 1
      examples/streaming/tauri.conf.json
  25. 1 1
      examples/tauri-dynamic-lib/src-tauri/tauri.conf.json
  26. 1 1
      examples/updater/src-tauri/tauri.conf.json
  27. 8 10
      examples/workspace/index.html
  28. 2 6
      examples/workspace/src-tauri/tauri.conf.json
  29. 1 1
      tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json
  30. 1 1
      tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json
  31. 1 1
      tooling/bench/tests/helloworld/src-tauri/tauri.conf.json
  32. 1 1
      tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json

+ 3 - 3
.changes/config.json

@@ -211,7 +211,7 @@
       "dependencies": ["tauri-codegen", "tauri-utils"],
       "postversion": [
         "node ../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
-        "cargo build --manifest-path ../config-schema/Cargo.toml"
+        "cargo build --manifest-path ../tauri-config-schema/Cargo.toml"
       ],
       "assets": [
         {
@@ -238,7 +238,7 @@
       "dependencies": ["cli.rs"],
       "postversion": [
         "node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
-        "cargo build --manifest-path ../../../core/config-schema/Cargo.toml"
+        "cargo build --manifest-path ../../../core/tauri-config-schema/Cargo.toml"
       ],
       "prepublish": [],
       "publish": [],
@@ -250,7 +250,7 @@
       "dependencies": ["tauri-bundler", "tauri-utils"],
       "postversion": [
         "cargo check",
-        "cargo build --manifest-path ../../core/config-schema/Cargo.toml"
+        "cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
       ],
       "assets": [
         {

+ 4 - 4
.github/workflows/check-generated-files.yml

@@ -12,7 +12,7 @@ on:
       - 'core/tauri/scripts/bundle.global.js'
       - 'core/tauri-utils/src/config.rs'
       - 'tooling/cli/schema.json'
-      - 'core/config-schema/schema.json'
+      - 'core/tauri-config-schema/schema.json'
   push:
     branches:
       - dev
@@ -22,7 +22,7 @@ on:
       - 'core/tauri/scripts/bundle.global.js'
       - 'core/tauri-utils/src/config.rs'
       - 'tooling/cli/schema.json'
-      - 'core/config-schema/schema.json'
+      - 'core/tauri-config-schema/schema.json'
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
@@ -47,7 +47,7 @@ jobs:
             schema:
               - 'core/tauri-utils/src/config.rs'
               - 'tooling/cli/schema.json'
-              - 'core/config-schema/schema.json'
+              - 'core/tauri-config-schema/schema.json'
 
   check-api:
     runs-on: ubuntu-latest
@@ -90,7 +90,7 @@ jobs:
         uses: actions-rs/cargo@v1
         with:
           command: build
-          args: --manifest-path ./core/config-schema/Cargo.toml
+          args: --manifest-path ./core/tauri-config-schema/Cargo.toml
 
       - name: check schema
         run: ./.scripts/ci/has-diff.sh

+ 1 - 1
.prettierignore

@@ -10,4 +10,4 @@ dist
 /tooling/cli/node
 /tooling/cli/schema.json
 /tooling/api/docs/js-api.json
-/core/config-schema/schema.json
+/core/tauri-config-schema/schema.json

+ 7 - 5
.scripts/covector/package-latest-version.js

@@ -19,10 +19,10 @@ let url = null
 switch (kind) {
   case 'cargo':
     url = `https://crates.io/api/v1/crates/${packageName}`
-    break;
+    break
   case 'npm':
     url = `https://registry.npmjs.org/${packageName}`
-    break;
+    break
   default:
     throw new Error('unexpected kind ' + kind)
 }
@@ -30,7 +30,7 @@ switch (kind) {
 const options = {
   headers: {
     'Content-Type': 'application/json',
-    'Accept': 'application/json',
+    Accept: 'application/json',
     'User-Agent': 'tauri (https://github.com/tauri-apps/tauri)'
   }
 }
@@ -44,10 +44,12 @@ https.get(url, options, (response) => {
   response.on('end', function () {
     const data = JSON.parse(chunks.join(''))
     if (kind === 'cargo') {
-      const versions = data.versions.filter(v => v.num.startsWith(target))
+      const versions = data.versions.filter((v) => v.num.startsWith(target))
       console.log(versions.length ? versions[0].num : '0.0.0')
     } else if (kind === 'npm') {
-      const versions = Object.keys(data.versions).filter(v => v.startsWith(target))
+      const versions = Object.keys(data.versions).filter((v) =>
+        v.startsWith(target)
+      )
       console.log(versions[versions.length - 1] || '0.0.0')
     }
   })

+ 3 - 3
Cargo.toml

@@ -8,11 +8,11 @@ members = [
   "core/tauri-utils",
   "core/tauri-build",
   "core/tauri-codegen",
-  "core/config-schema",
+  "core/tauri-config-schema",
 
   # integration tests
   "core/tests/restart",
-  "core/tests/app-updater"
+  "core/tests/app-updater",
 ]
 
 exclude = [
@@ -22,7 +22,7 @@ exclude = [
   "examples/resources/src-tauri",
   "examples/sidecar/src-tauri",
   "examples/web/core",
-  "examples/workspace"
+  "examples/workspace",
 ]
 
 # default to small, optimized workspace release binaries

+ 0 - 13
core/config-schema/Cargo.toml

@@ -1,13 +0,0 @@
-[package]
-name = "config-schema"
-version = "0.0.0"
-edition = "2021"
-publish = false
-
-[build-dependencies]
-tauri-utils = { version = "1.0.0", features = [ "schema" ], path = "../tauri-utils" }
-schemars = { version = "0.8", features = [ "url", "preserve_order" ] }
-serde = { version = "1.0", features = [ "derive" ] }
-serde_json = "1.0"
-serde_with = "1.12"
-url = { version = "2.3", features = [ "serde" ] }

+ 15 - 0
core/tauri-config-schema/Cargo.toml

@@ -0,0 +1,15 @@
+[package]
+name = "tauri-tauri-config-schema"
+version = "0.0.0"
+edition = "2021"
+publish = false
+
+[build-dependencies]
+tauri-utils = { version = "1.0.0", features = [
+  "schema",
+], path = "../tauri-utils" }
+schemars = { version = "0.8", features = ["url", "preserve_order"] }
+serde = { version = "1.0", features = ["derive"] }
+serde_json = "1.0"
+serde_with = "1.12"
+url = { version = "2.3", features = ["serde"] }

+ 0 - 0
core/config-schema/build.rs → core/tauri-config-schema/build.rs


+ 0 - 0
core/config-schema/schema.json → core/tauri-config-schema/schema.json


+ 0 - 0
core/config-schema/src/main.rs → core/tauri-config-schema/src/main.rs


+ 1 - 1
core/tauri/test/fixture/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../../../core/config-schema/schema.json",
+  "$schema": "../../../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "../dist",
     "devPath": "http://localhost:4000"

+ 1 - 1
core/tests/app-updater/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": [],
     "devPath": []

+ 1 - 1
examples/api/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "../dist",
     "devPath": "http://localhost:5173",

+ 1 - 1
examples/commands/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/helloworld/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/isolation/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "package": {
     "productName": "Isolation",
     "version": "0.1.0"

+ 1 - 1
examples/multiwindow/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/navigation/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "public",
     "devPath": "public",

+ 1 - 1
examples/parent-window/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/resources/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["../index.html"],
     "devPath": ["../index.html"],

+ 1 - 1
examples/sidecar/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["../index.html"],
     "devPath": ["../index.html"],

+ 1 - 1
examples/splashscreen/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "dist",
     "devPath": "dist",

+ 1 - 1
examples/state/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/streaming/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../core/config-schema/schema.json",
+  "$schema": "../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["index.html"],
     "devPath": ["index.html"],

+ 1 - 1
examples/tauri-dynamic-lib/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["src/index.html"],
     "devPath": ["src/index.html"],

+ 1 - 1
examples/updater/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../core/config-schema/schema.json",
+  "$schema": "../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": ["../index.html"],
     "devPath": ["../index.html"],

+ 8 - 10
examples/workspace/index.html

@@ -1,13 +1,11 @@
 <!DOCTYPE html>
 <html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  </head>
 
-<head>
-  <meta charset="UTF-8" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-</head>
-
-<body>
-  <h1>Workspace Example!</h1>
-</body>
-
-</html>
+  <body>
+    <h1>Workspace Example!</h1>
+  </body>
+</html>

+ 2 - 6
examples/workspace/src-tauri/tauri.conf.json

@@ -1,11 +1,7 @@
 {
   "build": {
-    "distDir": [
-      "../index.html"
-    ],
-    "devPath": [
-      "../index.html"
-    ]
+    "distDir": ["../index.html"],
+    "devPath": ["../index.html"]
   },
   "package": {
     "productName": "workspace"

+ 1 - 1
tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../../../core/config-schema/schema.json",
+  "$schema": "../../../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "../public",
     "devPath": "../public",

+ 1 - 1
tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../../../core/config-schema/schema.json",
+  "$schema": "../../../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "../public",
     "devPath": "../public",

+ 1 - 1
tooling/bench/tests/helloworld/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../../../core/config-schema/schema.json",
+  "$schema": "../../../../../core/tauri-config-schema/schema.json",
   "build": {
     "distDir": "../public",
     "devPath": "../public",

+ 1 - 1
tooling/cli/node/test/jest/fixtures/app/src-tauri/tauri.conf.json

@@ -1,5 +1,5 @@
 {
-  "$schema": "../../../../../../../../core/config-schema/schema.json",
+  "$schema": "../../../../../../../../core/tauri-config-schema/schema.json",
   "build": {
     "devPath": "../dist",
     "distDir": "../dist",