Merge remote-tracking branch 'origin/dev' into auth/builder

pull/50/head
FabianLars 3 years ago
commit 30e0454ec9
No known key found for this signature in database
GPG Key ID: 3B12BC1DEBF61125

@ -93,12 +93,12 @@ while read -r PLUGIN_NAME; do
echo "Failed to find a branch to branch from, just creating an empty one." echo "Failed to find a branch to branch from, just creating an empty one."
FORCE_COMMIT=--allow-empty FORCE_COMMIT=--allow-empty
fi fi
git add -Af git add -A
echo "::endgroup::" echo "::endgroup::"
if [[ -n "$FORCE_COMMIT" || -n "$(git status --porcelain)" ]]; then if [[ -n "$FORCE_COMMIT" || -n "$(git status --porcelain)" ]]; then
echo "Committing to $PLUGIN_NAME" echo "Committing to $PLUGIN_NAME"
if git commit --quiet $FORCE_COMMIT --author="${COMMIT_ORIGINAL_AUTHOR}" -m "${COMMIT_MESSAGE}" && if git commit $FORCE_COMMIT --author="${COMMIT_ORIGINAL_AUTHOR}" -m "${COMMIT_MESSAGE}" &&
{ [[ -z "$CI" ]] || git push origin "$BRANCH"; } # Only do the actual push from the GitHub Action { [[ -z "$CI" ]] || git push origin "$BRANCH"; } # Only do the actual push from the GitHub Action
then then
# echo "$BUILD_BASE/changes.diff" # echo "$BUILD_BASE/changes.diff"

@ -6,14 +6,14 @@ on:
- dev - dev
paths: paths:
- ".github/workflows/lint-rust.yml" - ".github/workflows/lint-rust.yml"
- "plugins/src/**" - "plugins/*/src/**"
- "**/Cargo.toml" - "**/Cargo.toml"
pull_request: pull_request:
branches: branches:
- dev - dev
paths: paths:
- ".github/workflows/lint-rust.yml" - ".github/workflows/lint-rust.yml"
- "plugins/src/**" - "plugins/*/src/**"
- "**/Cargo.toml" - "**/Cargo.toml"
concurrency: concurrency:
@ -28,42 +28,30 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install webkit2gtk
- name: install webkit2gtk and libudev for [authenticator]
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 sudo apt-get install -y webkit2gtk-4.0 libudev-dev
- name: install libudev for [authenticator]
run: |
sudo apt-get install -y libudev-dev
- name: Install clippy with stable toolchain - name: Install clippy with stable toolchain
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@stable
with: with:
profile: minimal
toolchain: stable
override: true
components: clippy components: clippy
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/clippy-check@v1 - uses: Swatinem/rust-cache@v2
with:
token: ${{ secrets.GITHUB_TOKEN }} - name: clippy
args: --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features -- -D warnings run: cargo clippy --workspace --exclude 'tauri-plugin-sql' --all-targets --all-features -- -D warnings
name: clippy
- uses: actions-rs/clippy-check@v1 - name: clippy sql:sqlite
with: run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features sqlite -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --package 'tauri-plugin-sql' --all-targets --features sqlite -- -D warnings - name: clippy sql:mysql
name: clippy sql:sqlite run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features mysql -- -D warnings
- uses: actions-rs/clippy-check@v1
with: - name: clippy sql:postgres
token: ${{ secrets.GITHUB_TOKEN }} run: cargo clippy --package 'tauri-plugin-sql' --all-targets --features postgres -- -D warnings
args: --workspace --package 'tauri-plugin-sql' --all-targets --features mysql -- -D warnings
name: clippy sql:mysql
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --package 'tauri-plugin-sql' --all-targets --features postgres -- -D warnings
name: clippy sql:postgres
fmt: fmt:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -72,14 +60,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install rustfmt with nightly toolchain - name: Install rustfmt with nightly toolchain
uses: actions-rs/toolchain@v1 uses: dtolnay/rust-toolchain@nightly
with: with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt components: rustfmt
- uses: actions-rs/cargo@v1
with: - name: Check formatting
command: fmt run: cargo fmt --all -- --check
args: --all -- --check

@ -33,5 +33,5 @@ jobs:
- name: Sync - name: Sync
run: .github/sync-to-mirrors.sh run: .github/sync-to-mirrors.sh
env: env:
BUILD_BASE: ./plugins BUILD_BASE: ${{ github.workspace }}/plugins
API_TOKEN_GITHUB: ${{ secrets.ORG_TAURI_BOT_PAT }} API_TOKEN_GITHUB: ${{ secrets.ORG_TAURI_BOT_PAT }}

@ -1,3 +1,5 @@
target target
node_modules node_modules
dist dist
pnpm-lock.yaml
Cargo.lock

@ -12,4 +12,5 @@ thiserror = "1"
[workspace.package] [workspace.package]
edition = "2021" edition = "2021"
authors = [ "Tauri Programme within The Commons Conservancy" ] authors = [ "Tauri Programme within The Commons Conservancy" ]
license = "Apache-2.0 OR MIT" license = "Apache-2.0 OR MIT"
rust-version = "1.59"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-authenticator" name = "tauri-plugin-authenticator"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Use hardware security-keys in your Tauri App."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,6 @@
![plugin-authenticator](banner.png) ![plugin-authenticator](banner.png)
Use Hardware Security-keys in your Tauri App. Use hardware security-keys in your Tauri App.
## Install ## Install

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-authenticator-api", "name": "tauri-plugin-authenticator-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Use hardware security-keys in your Tauri App.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-autostart" name = "tauri-plugin-autostart"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Automatically launch your application at startup."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-fs-extra" name = "tauri-plugin-fs-extra"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Additional file system methods not included in the core API."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,4 +1,6 @@
<!-- description --> ![tauri-plugin-fs-extra](banner.png)
Additional file system methods not included in the core API.
## Install ## Install

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-fs-extra-api", "name": "tauri-plugin-fs-extra-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Additional file system methods not included in the core API.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-fs-watch" name = "tauri-plugin-fs-watch"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Watch files and directories for changes."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,6 @@
![plugin-fs-watch](banner.png) ![plugin-fs-watch](banner.png)
Watch changes on files and directories through [notify](https://github.com/notify-rs/notify). Watch files and directories for changes using [notify](https://github.com/notify-rs/notify).
## Install ## Install

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-fs-watch-api", "name": "tauri-plugin-fs-watch-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Watch files and directories for changes.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-localhost" name = "tauri-plugin-localhost"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Expose your apps assets through a localhost server instead of the default custom protocol."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-log" name = "tauri-plugin-log"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Configurable logging for your Tauri app."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-log-api", "name": "tauri-plugin-log-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Configurable logging for your Tauri app.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1 +1,14 @@
authenticator
autostart
fs-extra
fs-watch
localhost
log
persisted-scope
positioner
sql
store
stronghold
upload
websocket websocket
window-state

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-persisted-scope" name = "tauri-plugin-persisted-scope"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Save filesystem and asset scopes and restore them when the app is reopened."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -54,13 +54,13 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
.map_err(Error::from) .map_err(Error::from)
.and_then(|scope| bincode::deserialize(&scope).map_err(Into::into)) .and_then(|scope| bincode::deserialize(&scope).map_err(Into::into))
.unwrap_or_default(); .unwrap_or_default();
for allowed in scope.allowed_paths { for allowed in &scope.allowed_paths {
// allows the path as is // allows the path as is
let _ = fs_scope.allow_file(allowed); let _ = fs_scope.allow_file(allowed);
#[cfg(feature = "protocol-asset")] #[cfg(feature = "protocol-asset")]
let _ = asset_protocol_scope.allow_file(allowed); let _ = asset_protocol_scope.allow_file(allowed);
} }
for forbidden in scope.forbidden_patterns { for forbidden in &scope.forbidden_patterns {
// forbid the path as is // forbid the path as is
let _ = fs_scope.forbid_file(forbidden); let _ = fs_scope.forbid_file(forbidden);
#[cfg(feature = "protocol-asset")] #[cfg(feature = "protocol-asset")]

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-positioner" name = "tauri-plugin-positioner"
version = "0.2.7" version = "0.2.7"
edition.workspace = true description = "Position your windows at well-known locations."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

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

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-sql" name = "tauri-plugin-sql"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Interface with SQL databases."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-sql-api", "name": "tauri-plugin-sql-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Interface with SQL databases",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-store" name = "tauri-plugin-store"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Simple, persistent key-value store."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-store-api", "name": "tauri-plugin-store-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Simple, persistent key-value store.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -244,12 +244,12 @@ async fn save<R: Runtime>(
} }
#[derive(Default)] #[derive(Default)]
pub struct PluginBuilder { pub struct Builder {
stores: HashMap<PathBuf, Store>, stores: HashMap<PathBuf, Store>,
frozen: bool, frozen: bool,
} }
impl PluginBuilder { impl Builder {
/// Registers a store with the plugin. /// Registers a store with the plugin.
/// ///
/// # Examples /// # Examples

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-stronghold" name = "tauri-plugin-stronghold"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Store secrets and keys using the IOTA Stronghold encrypted database."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-stronghold-api", "name": "tauri-plugin-stronghold-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Store secrets and keys using the IOTA Stronghold encrypted database.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-upload" name = "tauri-plugin-upload"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Upload files from disk to a remote server over HTTP."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,6 +1,6 @@
![plugin-upload](banner.png) ![plugin-upload](banner.png)
Upload files from disk to a remote server over http. Upload files from disk to a remote server over HTTP.
## Install ## Install

@ -1,6 +1,7 @@
{ {
"name": "tauri-plugin-upload-api", "name": "tauri-plugin-upload-api",
"version": "0.0.0", "version": "0.0.0",
"description": "Upload files from disk to a remote server over HTTP.",
"license": "MIT or APACHE-2.0", "license": "MIT or APACHE-2.0",
"authors": [ "authors": [
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"

@ -1,9 +1,10 @@
[package] [package]
name = "tauri-plugin-websocket" name = "tauri-plugin-websocket"
version = "0.1.0" version = "0.1.0"
edition.workspace = true
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -1,9 +1,11 @@
[package] [package]
name = "tauri-plugin-window-state" name = "tauri-plugin-window-state"
version = "0.1.0" version = "0.1.0"
edition.workspace = true description = "Save window positions and sizse and restore them when the app is reopened."
authors.workspace = true authors.workspace = true
license.workspace = true license.workspace = true
edition.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -2,8 +2,6 @@
Save window positions and sizse and restore them when the app is reopened. Save window positions and sizse and restore them when the app is reopened.
<!-- description -->
## Install ## Install
There are three general methods of installation that we can recommend. There are three general methods of installation that we can recommend.

@ -0,0 +1,4 @@
{
"extends": ["config:base"],
"enabledManagers": ["cargo", "npm"]
}

@ -1 +0,0 @@
../../../shared/tsconfig.json

@ -6,13 +6,13 @@
"Tauri Programme within The Commons Conservancy" "Tauri Programme within The Commons Conservancy"
], ],
"type": "module", "type": "module",
"browser": "dist/index.min.js", "browser": "guest-js/dist/index.min.js",
"module": "dist/index.mjs", "module": "guest-js/dist/index.mjs",
"types": "dist/index.d.ts", "types": "guest-js/dist/index.d.ts",
"exports": { "exports": {
"import": "./dist/index.mjs", "import": "./guest-js/dist/index.mjs",
"types": "./dist/index.d.ts", "types": "./guest-js/dist/index.d.ts",
"browser": "./dist/index.min.js" "browser": "./guest-js/dist/index.min.js"
}, },
"scripts": { "scripts": {
"build": "rollup -c" "build": "rollup -c"

@ -1,8 +1,9 @@
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { createConfig } from "../../../shared/rollup.config.mjs"; import { createConfig } from "../rollup.config.mjs";
export default createConfig({ export default createConfig({
input: "guest-js/index.ts",
pkg: JSON.parse( pkg: JSON.parse(
readFileSync(new URL("./package.json", import.meta.url), "utf8") readFileSync(new URL("./package.json", import.meta.url), "utf8")
), ),

@ -0,0 +1 @@
../tsconfig.json
Loading…
Cancel
Save