diff --git a/.changes/config.json b/.changes/config.json
new file mode 100644
index 00000000..d0b39cf0
--- /dev/null
+++ b/.changes/config.json
@@ -0,0 +1,171 @@
+{
+ "gitSiteUrl": "https://github.com/tauri-apps/plugins-workspace/",
+ "pkgManagers": {
+ "javascript": {
+ "version": true,
+ "getPublishedVersion": "pnpm view ${ pkgFile.pkg.name } version",
+ "publish": ["pnpm build", "pnpm publish --access public --no-git-checks"]
+ },
+ "rust": {
+ "version": true,
+ "getPublishedVersion": "cargo search ${ pkgFile.pkg.package.name } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -",
+ "publish": [
+ {
+ "command": "cargo package --no-verify",
+ "dryRunCommand": true
+ },
+ {
+ "command": "echo '\nCargo Publish
\n\n```'",
+ "dryRunCommand": true,
+ "pipe": true
+ },
+ {
+ "command": "cargo publish",
+ "dryRunCommand": "cargo publish --dry-run",
+ "pipe": true
+ },
+ {
+ "command": "echo '```\n\n \n'",
+ "dryRunCommand": true,
+ "pipe": true
+ }
+ ]
+ }
+ },
+ "packages": {
+ "authenticator": {
+ "path": "./plugins/authenticator",
+ "manager": ""
+ },
+ "authenticator-js": {
+ "path": "./plugins/authenticator",
+ "manager": ""
+ },
+
+ "autostart": {
+ "path": "./plugins/autostart",
+ "manager": ""
+ },
+ "autostart-js": {
+ "path": "./plugins/autostart",
+ "manager": ""
+ },
+
+ "fs-extra": {
+ "path": "./plugins/fs-extra",
+ "manager": ""
+ },
+ "fs-extra-js": {
+ "path": "./plugins/fs-extra",
+ "manager": ""
+ },
+
+ "fs-watch": {
+ "path": "./plugins/fs-watch",
+ "manager": ""
+ },
+ "fs-watch-js": {
+ "path": "./plugins/fs-watch",
+ "manager": ""
+ },
+
+ "localhost": {
+ "path": "./plugins/localhost",
+ "manager": "rust"
+ },
+ "localhost-js": {
+ "path": "./plugins/localhost",
+ "manager": ""
+ },
+
+ "log": {
+ "path": "./plugins/log",
+ "manager": ""
+ },
+ "log-js": {
+ "path": "./plugins/log",
+ "manager": ""
+ },
+
+ "persisted-scope": {
+ "path": "./plugins/persisted-scope",
+ "manager": "rust"
+ },
+ "persisted-scope-js": {
+ "path": "./plugins/persisted-scope",
+ "manager": ""
+ },
+
+ "positioner": {
+ "path": "./plugins/positioner",
+ "manager": "rust"
+ },
+ "positioner-js": {
+ "path": "./plugins/positioner",
+ "manager": ""
+ },
+
+ "single-instance": {
+ "path": "./plugins/single-instance",
+ "manager": ""
+ },
+ "single-instance-js": {
+ "path": "./plugins/single-instance",
+ "manager": ""
+ },
+
+ "sql": {
+ "path": "./plugins/sql",
+ "manager": ""
+ },
+ "sql-js": {
+ "path": "./plugins/sql",
+ "manager": ""
+ },
+
+ "store": {
+ "path": "./plugins/store",
+ "manager": ""
+ },
+ "store-js": {
+ "path": "./plugins/store",
+ "manager": ""
+ },
+
+ "stronghold": {
+ "path": "./plugins/stronghold",
+ "manager": ""
+ },
+ "stronghold-js": {
+ "path": "./plugins/stronghold",
+ "manager": ""
+ },
+
+ "upload": {
+ "path": "./plugins/upload",
+ "manager": ""
+ },
+ "upload-js": {
+ "path": "./plugins/upload",
+ "manager": ""
+ },
+
+ "websocket": {
+ "path": "./plugins/websocket",
+ "manager": ""
+ },
+ "websocket-js": {
+ "path": "./plugins/websocket",
+ "manager": ""
+ },
+
+ "window-state": {
+ "path": "./plugins/window-state",
+ "manager": "rust"
+ },
+ "window-state-js": {
+ "path": "./plugins/window-state",
+ "manager": ""
+ }
+ }
+}
diff --git a/.changes/readme.md b/.changes/readme.md
new file mode 100644
index 00000000..002f4643
--- /dev/null
+++ b/.changes/readme.md
@@ -0,0 +1,30 @@
+# Changes
+
+##### via https://github.com/jbolda/covector
+
+As you create PRs and make changes that require a version bump, please add a new markdown file in this folder. You do not note the version _number_, but rather the type of bump that you expect: major, minor, or patch. The filename is not important, as long as it is a `.md`, but we recommend that it represents the overall change for organizational purposes.
+
+When you select the version bump required, you do _not_ need to consider dependencies. Only note the package with the actual change, and any packages that depend on that package will be bumped automatically in the process.
+
+Use the following format:
+
+```md
+---
+"package-a": patch
+"package-b": minor
+---
+
+Change summary goes here
+```
+
+Summaries do not have a specific character limit, but are text only. These summaries are used within the (future implementation of) changelogs. They will give context to the change and also point back to the original PR if more details and context are needed.
+
+Changes will be designated as a `major`, `minor` or `patch` as further described in [semver](https://semver.org/).
+
+Given a version number MAJOR.MINOR.PATCH, increment the:
+
+- MAJOR version when you make incompatible API changes,
+- MINOR version when you add functionality in a backwards compatible manner, and
+- PATCH version when you make backwards compatible bug fixes.
+
+Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format, but will be discussed prior to usage (as extra steps will be necessary in consideration of merging and publishing).
diff --git a/.github/sync-to-mirrors.sh b/.github/sync-to-mirrors.sh
index 77252e0c..ab4405a7 100755
--- a/.github/sync-to-mirrors.sh
+++ b/.github/sync-to-mirrors.sh
@@ -60,6 +60,9 @@ fi
# : > "$BUILD_BASE/changes.diff"
+# Collect tags of current commit
+readarray -t COMMIT_TAGS < <(git tag --points-at HEAD)
+
EXIT=0
while read -r PLUGIN_NAME; do
printf "\n\n\e[7m Mirror: %s \e[0m\n" "$PLUGIN_NAME"
@@ -106,6 +109,17 @@ while read -r PLUGIN_NAME; do
# echo "$BUILD_BASE/changes.diff"
# git show --pretty= --src-prefix="a/$PLUGIN_NAME/" --dst-prefix="b/$PLUGIN_NAME/" >> "$BUILD_BASE/changes.diff"
echo "https://github.com/tauri-apps/tauri-plugin-$PLUGIN_NAME/commit/$(git rev-parse HEAD)"
+
+ # Add new tags
+ for FULL_TAG in "${COMMIT_TAGS[@]}"; do
+ if [[ "$FULL_TAG" =~ ^"tauri-plugin-$PLUGIN_NAME-" ]]; then
+ TAG_NAME="${FULL_TAG#"tauri-plugin-$PLUGIN_NAME-"}"
+ echo "Creating tag $TAG_NAME"
+ git tag "${TAG_NAME}" -m "${GIT_CLI_COMMIT_MESSAGE}"
+ git push origin "${TAG_NAME}"
+ fi
+ done
+
echo "Completed $PLUGIN_NAME"
else
echo "::error::Commit of ${PLUGIN_NAME} failed"
diff --git a/.github/workflows/covector-status.yml b/.github/workflows/covector-status.yml
new file mode 100644
index 00000000..cb5a344a
--- /dev/null
+++ b/.github/workflows/covector-status.yml
@@ -0,0 +1,16 @@
+name: covector status
+on: [pull_request]
+
+jobs:
+ covector:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # required for use of git history
+ - name: covector status
+ uses: jbolda/covector/packages/action@covector-v0.8
+ id: covector
+ with:
+ command: "status"
diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml
new file mode 100644
index 00000000..14057c07
--- /dev/null
+++ b/.github/workflows/covector-version-or-publish.yml
@@ -0,0 +1,59 @@
+name: version or publish
+
+on:
+ push:
+ branches:
+ - dev
+
+jobs:
+ version-or-publish:
+ runs-on: ubuntu-latest
+ timeout-minutes: 65
+ outputs:
+ change: ${{ steps.covector.outputs.change }}
+ commandRan: ${{ steps.covector.outputs.commandRan }}
+ successfulPublish: ${{ steps.covector.outputs.successfulPublish }}
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # required for use of git history
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: "lts/*"
+ registry-url: "https://registry.npmjs.org"
+
+ - uses: pnpm/action-setup@v2
+ with:
+ version: 7.x.x
+ run_install: true
+
+ - name: cargo login
+ run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
+
+ - name: git config
+ run: |
+ git config --global user.name "${{ github.event.pusher.name }}"
+ git config --global user.email "${{ github.event.pusher.email }}"
+
+ - name: covector version or publish (publish when no change files present)
+ uses: jbolda/covector/packages/action@covector-v0.8
+ id: covector
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ command: "version-or-publish"
+ createRelease: true
+
+ - name: Create Pull Request With Versions Bumped
+ id: cpr
+ uses: tauri-apps/create-pull-request@v3
+ if: steps.covector.outputs.commandRan == 'version'
+ with:
+ title: "Publish New Versions"
+ commit-message: "publish new versions"
+ labels: "version updates"
+ branch: "release"
+ body: ${{ steps.covector.outputs.change }}
diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml
index eeb90499..3e4e85f3 100644
--- a/.github/workflows/sync.yml
+++ b/.github/workflows/sync.yml
@@ -15,6 +15,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
+
+ - name: Fetch git tags
+ run: git fetch origin 'refs/tags/*:refs/tags/*'
+
- name: Cache pnpm modules
uses: actions/cache@v3
with:
@@ -22,15 +26,19 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
+
- uses: actions/setup-node@v3
with:
node-version: 18
+
- uses: pnpm/action-setup@v2
with:
version: 7.x.x
run_install: true
+
- name: Build packages
run: pnpm build
+
- name: Sync
run: .github/sync-to-mirrors.sh
env:
diff --git a/Cargo.lock b/Cargo.lock
index f6ed0c31..fe5c76bc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4284,7 +4284,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-authenticator"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"authenticator",
"base64 0.21.0",
@@ -4303,7 +4303,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-autostart"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"auto-launch",
"log",
@@ -4315,7 +4315,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs-extra"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"log",
"serde",
@@ -4326,7 +4326,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs-watch"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"log",
"notify",
@@ -4352,7 +4352,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-log"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"byte-unit",
"fern",
@@ -4379,7 +4379,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-positioner"
-version = "0.2.7"
+version = "1.0.4"
dependencies = [
"log",
"serde",
@@ -4391,7 +4391,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-single-instance"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"log",
"serde",
@@ -4404,7 +4404,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-sql"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"futures-core",
"log",
@@ -4419,7 +4419,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-store"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"log",
"serde",
@@ -4430,7 +4430,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-stronghold"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"hex",
"iota-crypto 0.17.0",
@@ -4447,7 +4447,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-upload"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"futures-util",
"log",
@@ -4463,7 +4463,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-websocket"
-version = "0.1.0"
+version = "0.0.0"
dependencies = [
"futures-util",
"log",
diff --git a/plugins/authenticator/Cargo.toml b/plugins/authenticator/Cargo.toml
index 042927ad..007e63f4 100644
--- a/plugins/authenticator/Cargo.toml
+++ b/plugins/authenticator/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-authenticator"
-version = "0.1.0"
+version = "0.0.0"
description = "Use hardware security-keys in your Tauri App."
authors.workspace = true
license.workspace = true
diff --git a/plugins/autostart/Cargo.toml b/plugins/autostart/Cargo.toml
index dc42168d..8d0abc50 100644
--- a/plugins/autostart/Cargo.toml
+++ b/plugins/autostart/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
-version = "0.1.0"
+version = "0.0.0"
description = "Automatically launch your application at startup."
authors.workspace = true
license.workspace = true
diff --git a/plugins/fs-extra/Cargo.toml b/plugins/fs-extra/Cargo.toml
index 79b0e7ce..3904ec59 100644
--- a/plugins/fs-extra/Cargo.toml
+++ b/plugins/fs-extra/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs-extra"
-version = "0.1.0"
+version = "0.0.0"
description = "Additional file system methods not included in the core API."
authors.workspace = true
license.workspace = true
diff --git a/plugins/fs-watch/Cargo.toml b/plugins/fs-watch/Cargo.toml
index f939dd2b..8431bae0 100644
--- a/plugins/fs-watch/Cargo.toml
+++ b/plugins/fs-watch/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs-watch"
-version = "0.1.0"
+version = "0.0.0"
description = "Watch files and directories for changes."
authors.workspace = true
license.workspace = true
diff --git a/plugins/log/Cargo.toml b/plugins/log/Cargo.toml
index 94ad25f0..dfa72341 100644
--- a/plugins/log/Cargo.toml
+++ b/plugins/log/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-log"
-version = "0.1.0"
+version = "0.0.0"
description = "Configurable logging for your Tauri app."
authors.workspace = true
license.workspace = true
diff --git a/plugins/positioner/Cargo.toml b/plugins/positioner/Cargo.toml
index 08155a5d..dcab86c9 100644
--- a/plugins/positioner/Cargo.toml
+++ b/plugins/positioner/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-positioner"
-version = "0.2.7"
+version = "1.0.4"
description = "Position your windows at well-known locations."
authors.workspace = true
license.workspace = true
diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json
index 0ccdb528..83acb56f 100644
--- a/plugins/positioner/package.json
+++ b/plugins/positioner/package.json
@@ -1,6 +1,6 @@
{
"name": "tauri-plugin-positioner-api",
- "version": "0.0.0",
+ "version": "0.2.7",
"description": "Position your windows at well-known locations.",
"license": "MIT or APACHE-2.0",
"authors": [
diff --git a/plugins/single-instance/Cargo.toml b/plugins/single-instance/Cargo.toml
index dbff7677..be46f3aa 100644
--- a/plugins/single-instance/Cargo.toml
+++ b/plugins/single-instance/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-single-instance"
-version = "0.1.0"
+version = "0.0.0"
description = "Ensure a single instance of your tauri app is running."
authors.workspace = true
license.workspace = true
diff --git a/plugins/sql/Cargo.toml b/plugins/sql/Cargo.toml
index 502cd12c..91a839ac 100644
--- a/plugins/sql/Cargo.toml
+++ b/plugins/sql/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-sql"
-version = "0.1.0"
+version = "0.0.0"
description = "Interface with SQL databases."
authors.workspace = true
license.workspace = true
diff --git a/plugins/store/Cargo.toml b/plugins/store/Cargo.toml
index 9fd091fc..626dbebc 100644
--- a/plugins/store/Cargo.toml
+++ b/plugins/store/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-store"
-version = "0.1.0"
+version = "0.0.0"
description = "Simple, persistent key-value store."
authors.workspace = true
license.workspace = true
diff --git a/plugins/stronghold/Cargo.toml b/plugins/stronghold/Cargo.toml
index 8d3d72d2..fb3ac3b8 100644
--- a/plugins/stronghold/Cargo.toml
+++ b/plugins/stronghold/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-stronghold"
-version = "0.1.0"
+version = "0.0.0"
description = "Store secrets and keys using the IOTA Stronghold encrypted database."
authors.workspace = true
license.workspace = true
diff --git a/plugins/upload/Cargo.toml b/plugins/upload/Cargo.toml
index 985645d6..49abc6d4 100644
--- a/plugins/upload/Cargo.toml
+++ b/plugins/upload/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-upload"
-version = "0.1.0"
+version = "0.0.0"
description = "Upload files from disk to a remote server over HTTP."
authors.workspace = true
license.workspace = true
diff --git a/plugins/upload/guest-js/index.ts b/plugins/upload/guest-js/index.ts
index d2eced4e..26bc93b4 100644
--- a/plugins/upload/guest-js/index.ts
+++ b/plugins/upload/guest-js/index.ts
@@ -51,6 +51,10 @@ async function upload(
});
}
+/// Download file from given url.
+///
+/// Note that `filePath` currently must include the file name.
+/// Furthermore the progress events will report a total length of 0 if the server did not sent a `Content-Length` header or if the file is compressed.
async function download(
url: string,
filePath: string,
diff --git a/plugins/upload/src/lib.rs b/plugins/upload/src/lib.rs
index 21154e89..c4a0d8c7 100644
--- a/plugins/upload/src/lib.rs
+++ b/plugins/upload/src/lib.rs
@@ -62,9 +62,7 @@ async fn download(
}
let response = request.send().await?;
- let total = response.content_length().ok_or_else(|| {
- Error::ContentLength(format!("Failed to get content length from '{url}'"))
- })?;
+ let total = response.content_length().unwrap_or(0);
let mut file = File::create(file_path).await?;
let mut stream = response.bytes_stream();
diff --git a/plugins/websocket/Cargo.toml b/plugins/websocket/Cargo.toml
index 38c1dc8b..37eafb5d 100644
--- a/plugins/websocket/Cargo.toml
+++ b/plugins/websocket/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-websocket"
-version = "0.1.0"
+version = "0.0.0"
authors.workspace = true
license.workspace = true
edition.workspace = true
diff --git a/plugins/window-state/guest-js/index.ts b/plugins/window-state/guest-js/index.ts
index d3e0828e..11ead0f4 100644
--- a/plugins/window-state/guest-js/index.ts
+++ b/plugins/window-state/guest-js/index.ts
@@ -15,14 +15,14 @@ export enum StateFlags {
* Save the state of all open windows to disk.
*/
async function saveWindowState(flags: StateFlags) {
- invoke("plugin:window-state|js_save_window_state", { flags });
+ invoke("plugin:window-state|save_window_state", { flags });
}
/**
* Restore the state for the specified window from disk.
*/
async function restoreState(label: WindowLabel, flags: StateFlags) {
- invoke("plugin:window-state|js_restore_state", { label, flags });
+ invoke("plugin:window-state|restore_state", { label, flags });
}
/**
diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json
index db80c491..f7938586 100644
--- a/plugins/window-state/package.json
+++ b/plugins/window-state/package.json
@@ -1,6 +1,6 @@
{
"name": "tauri-plugin-window-state-api",
- "version": "0.1.0",
+ "version": "0.0.0",
"description": "Save window positions and sizes and restore them when the app is reopened.",
"license": "MIT or APACHE-2.0",
"authors": [