Merge remote-tracking branch 'origin/dev' into fix/persisted-scope-memory-leak

pull/328/head
FabianLars 2 years ago
commit 761a2faa0f
No known key found for this signature in database
GPG Key ID: 3B12BC1DEBF61125

@ -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 '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
"dryRunCommand": true,
"pipe": true
},
{
"command": "cargo publish",
"dryRunCommand": "cargo publish --dry-run",
"pipe": true
},
{
"command": "echo '```\n\n</details>\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": ""
}
}
}

@ -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).

@ -60,6 +60,9 @@ fi
# : > "$BUILD_BASE/changes.diff" # : > "$BUILD_BASE/changes.diff"
# Collect tags of current commit
readarray -t COMMIT_TAGS < <(git tag --points-at HEAD)
EXIT=0 EXIT=0
while read -r PLUGIN_NAME; do while read -r PLUGIN_NAME; do
printf "\n\n\e[7m Mirror: %s \e[0m\n" "$PLUGIN_NAME" 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" # echo "$BUILD_BASE/changes.diff"
# git show --pretty= --src-prefix="a/$PLUGIN_NAME/" --dst-prefix="b/$PLUGIN_NAME/" >> "$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)" 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" echo "Completed $PLUGIN_NAME"
else else
echo "::error::Commit of ${PLUGIN_NAME} failed" echo "::error::Commit of ${PLUGIN_NAME} failed"

@ -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"

@ -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 }}

@ -15,6 +15,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Cache pnpm modules - name: Cache pnpm modules
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -22,15 +26,19 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: | restore-keys: |
${{ runner.os }}- ${{ runner.os }}-
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v2
with: with:
version: 7.x.x version: 7.x.x
run_install: true run_install: true
- name: Build packages - name: Build packages
run: pnpm build run: pnpm build
- name: Sync - name: Sync
run: .github/sync-to-mirrors.sh run: .github/sync-to-mirrors.sh
env: env:

24
Cargo.lock generated

@ -4284,7 +4284,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-authenticator" name = "tauri-plugin-authenticator"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"authenticator", "authenticator",
"base64 0.21.0", "base64 0.21.0",
@ -4303,7 +4303,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-autostart" name = "tauri-plugin-autostart"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"auto-launch", "auto-launch",
"log", "log",
@ -4315,7 +4315,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-fs-extra" name = "tauri-plugin-fs-extra"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -4326,7 +4326,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-fs-watch" name = "tauri-plugin-fs-watch"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"log", "log",
"notify", "notify",
@ -4352,7 +4352,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-log" name = "tauri-plugin-log"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"byte-unit", "byte-unit",
"fern", "fern",
@ -4379,7 +4379,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-positioner" name = "tauri-plugin-positioner"
version = "0.2.7" version = "1.0.4"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -4391,7 +4391,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-single-instance" name = "tauri-plugin-single-instance"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -4404,7 +4404,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-sql" name = "tauri-plugin-sql"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"log", "log",
@ -4419,7 +4419,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-store" name = "tauri-plugin-store"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"log", "log",
"serde", "serde",
@ -4430,7 +4430,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-stronghold" name = "tauri-plugin-stronghold"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"hex", "hex",
"iota-crypto 0.17.0", "iota-crypto 0.17.0",
@ -4447,7 +4447,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-upload" name = "tauri-plugin-upload"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"log", "log",
@ -4463,7 +4463,7 @@ dependencies = [
[[package]] [[package]]
name = "tauri-plugin-websocket" name = "tauri-plugin-websocket"
version = "0.1.0" version = "0.0.0"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"log", "log",

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-authenticator" name = "tauri-plugin-authenticator"
version = "0.1.0" version = "0.0.0"
description = "Use hardware security-keys in your Tauri App." description = "Use hardware security-keys in your Tauri App."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-autostart" name = "tauri-plugin-autostart"
version = "0.1.0" version = "0.0.0"
description = "Automatically launch your application at startup." description = "Automatically launch your application at startup."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-fs-extra" name = "tauri-plugin-fs-extra"
version = "0.1.0" version = "0.0.0"
description = "Additional file system methods not included in the core API." description = "Additional file system methods not included in the core API."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-fs-watch" name = "tauri-plugin-fs-watch"
version = "0.1.0" version = "0.0.0"
description = "Watch files and directories for changes." description = "Watch files and directories for changes."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-log" name = "tauri-plugin-log"
version = "0.1.0" version = "0.0.0"
description = "Configurable logging for your Tauri app." description = "Configurable logging for your Tauri app."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-positioner" name = "tauri-plugin-positioner"
version = "0.2.7" version = "1.0.4"
description = "Position your windows at well-known locations." description = "Position your windows at well-known locations."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
{ {
"name": "tauri-plugin-positioner-api", "name": "tauri-plugin-positioner-api",
"version": "0.0.0", "version": "0.2.7",
"description": "Position your windows at well-known locations.", "description": "Position your windows at well-known locations.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-single-instance" name = "tauri-plugin-single-instance"
version = "0.1.0" version = "0.0.0"
description = "Ensure a single instance of your tauri app is running." description = "Ensure a single instance of your tauri app is running."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-sql" name = "tauri-plugin-sql"
version = "0.1.0" version = "0.0.0"
description = "Interface with SQL databases." description = "Interface with SQL databases."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-store" name = "tauri-plugin-store"
version = "0.1.0" version = "0.0.0"
description = "Simple, persistent key-value store." description = "Simple, persistent key-value store."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-stronghold" name = "tauri-plugin-stronghold"
version = "0.1.0" version = "0.0.0"
description = "Store secrets and keys using the IOTA Stronghold encrypted database." description = "Store secrets and keys using the IOTA Stronghold encrypted database."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-upload" name = "tauri-plugin-upload"
version = "0.1.0" version = "0.0.0"
description = "Upload files from disk to a remote server over HTTP." description = "Upload files from disk to a remote server over HTTP."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true

@ -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( async function download(
url: string, url: string,
filePath: string, filePath: string,

@ -62,9 +62,7 @@ async fn download<R: Runtime>(
} }
let response = request.send().await?; let response = request.send().await?;
let total = response.content_length().ok_or_else(|| { let total = response.content_length().unwrap_or(0);
Error::ContentLength(format!("Failed to get content length from '{url}'"))
})?;
let mut file = File::create(file_path).await?; let mut file = File::create(file_path).await?;
let mut stream = response.bytes_stream(); let mut stream = response.bytes_stream();

@ -1,6 +1,6 @@
[package] [package]
name = "tauri-plugin-websocket" name = "tauri-plugin-websocket"
version = "0.1.0" version = "0.0.0"
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true edition.workspace = true

@ -15,14 +15,14 @@ export enum StateFlags {
* Save the state of all open windows to disk. * Save the state of all open windows to disk.
*/ */
async function saveWindowState(flags: StateFlags) { 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. * Restore the state for the specified window from disk.
*/ */
async function restoreState(label: WindowLabel, flags: StateFlags) { async function restoreState(label: WindowLabel, flags: StateFlags) {
invoke("plugin:window-state|js_restore_state", { label, flags }); invoke("plugin:window-state|restore_state", { label, flags });
} }
/** /**

@ -1,6 +1,6 @@
{ {
"name": "tauri-plugin-window-state-api", "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.", "description": "Save window positions and sizes and restore them when the app is reopened.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [

Loading…
Cancel
Save