commit
395229e110
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"dialog": patch:feat
|
|
||||||
---
|
|
||||||
|
|
||||||
Implement `save` API on Android.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"dialog": "patch"
|
|
||||||
---
|
|
||||||
|
|
||||||
Mark `FileResponse` as `non_exhaustive`.
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
"dialog": patch
|
|
||||||
"dialog-js": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
The `open` function now returns a string representing either the file path or URI instead of an object.
|
|
||||||
To read the file data, use the `fs` APIs.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"http-js": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fixed an issue with abort signal not aborting the fetch request.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"updater": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fixes the updater not preserving AppImage file permissions.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"fs": patch:enhance
|
|
||||||
---
|
|
||||||
|
|
||||||
The `scope-*-recursive` permissions now also allow reading the contents of the directory.
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
"geolocation": major
|
|
||||||
"geolocation-js": major
|
|
||||||
---
|
|
||||||
|
|
||||||
Initial release.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"global-shortcut": "patch"
|
|
||||||
---
|
|
||||||
|
|
||||||
Updated `global-hotkey` crate dependency to `0.6`
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
"haptics": major
|
|
||||||
"haptics-js": major
|
|
||||||
---
|
|
||||||
|
|
||||||
Initial release.
|
|
@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
barcode-scanner: patch
|
|
||||||
clipboard-manager: patch
|
|
||||||
deep-link: patch
|
|
||||||
global-shortcut: patch
|
|
||||||
window-state: patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Fixed an issue that caused multi-word IIFE names to not be formatted correctly. For example the `barcode-scanner` was defined as `window.__TAURI_PLUGIN_CLIPBOARDMANAGER__` instead of `window.__TAURI_PLUGIN_CLIPBOARD_MANAGER__`.
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"tag": "rc",
|
|
||||||
"changes": [
|
|
||||||
".changes/android-dialog-save.md",
|
|
||||||
".changes/fix-http-plugin-abort.md",
|
|
||||||
".changes/fix-linux-updater-permission-error.md",
|
|
||||||
".changes/geolocation-release.md",
|
|
||||||
".changes/haptics-release.md",
|
|
||||||
".changes/iife-varname-spacing.md",
|
|
||||||
".changes/rc.md",
|
|
||||||
".changes/remove-target-sdk.md",
|
|
||||||
".changes/shell-open-regex-match-string.md",
|
|
||||||
".changes/shell-regex-match-string.md",
|
|
||||||
".changes/swift-build-older-versions.md",
|
|
||||||
".changes/update-fs-api-docs.md",
|
|
||||||
".changes/update-tauri-rc-3.md"
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
"authenticator": patch
|
|
||||||
"autostart": patch
|
|
||||||
"barcode-scanner": patch
|
|
||||||
"biometric": patch
|
|
||||||
"cli": patch
|
|
||||||
"clipboard-manager": patch
|
|
||||||
"deep-link": patch
|
|
||||||
"dialog": patch
|
|
||||||
"fs": patch
|
|
||||||
"global-shortcut": patch
|
|
||||||
"http": patch
|
|
||||||
"localhost": patch
|
|
||||||
"log-plugin": patch
|
|
||||||
"nfc": patch
|
|
||||||
"notification": patch
|
|
||||||
"os": patch
|
|
||||||
"persisted-scope": patch
|
|
||||||
"positioner": patch
|
|
||||||
"process": patch
|
|
||||||
"shell": patch
|
|
||||||
"single-instance": patch
|
|
||||||
"sql": patch
|
|
||||||
"store": patch
|
|
||||||
"stronghold": patch
|
|
||||||
"updater": patch
|
|
||||||
"upload": patch
|
|
||||||
"websocket": patch
|
|
||||||
"window-state": patch
|
|
||||||
"authenticator-js": patch
|
|
||||||
"autostart-js": patch
|
|
||||||
"barcode-scanner-js": patch
|
|
||||||
"biometric-js": patch
|
|
||||||
"cli-js": patch
|
|
||||||
"clipboard-manager-js": patch
|
|
||||||
"deep-link-js": patch
|
|
||||||
"dialog-js": patch
|
|
||||||
"fs-js": patch
|
|
||||||
"global-shortcut-js": patch
|
|
||||||
"http-js": patch
|
|
||||||
"log-js": patch
|
|
||||||
"nfc-js": patch
|
|
||||||
"notification-js": patch
|
|
||||||
"os-js": patch
|
|
||||||
"positioner-js": patch
|
|
||||||
"process-js": patch
|
|
||||||
"shell-js": patch
|
|
||||||
"sql-js": patch
|
|
||||||
"store-js": patch
|
|
||||||
"stronghold-js": patch
|
|
||||||
"updater-js": patch
|
|
||||||
"upload-js": patch
|
|
||||||
"websocket-js": patch
|
|
||||||
"window-state-js": patch
|
|
||||||
"haptics": patch
|
|
||||||
"haptics-js": patch
|
|
||||||
"geolocation": patch
|
|
||||||
"geolocation-js": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Update to tauri RC.
|
|
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
"barcode-scanner": patch:changes
|
|
||||||
"biometric": patch:changes
|
|
||||||
"clipboard-manager": patch:changes
|
|
||||||
"deep-link": patch:changes
|
|
||||||
"dialog": patch:changes
|
|
||||||
"geolocation": patch:changes
|
|
||||||
"haptics": patch:changes
|
|
||||||
"nfc": patch:changes
|
|
||||||
"notification": patch:changes
|
|
||||||
"shell": patch:changes
|
|
||||||
"store": patch:changes
|
|
||||||
---
|
|
||||||
|
|
||||||
Remove targetSdk from build.kts files as it is deprecated and will be removed from DSL v9.0
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"fs": patch:feat
|
|
||||||
---
|
|
||||||
|
|
||||||
Resolve `content://` path URIs on Android.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"shell": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Change the `open` scope validator regex to match on the entire string.
|
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
"shell": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Change the `execute` scope argument validator regex to match on the entire string by default.
|
|
||||||
If this behavior is not desired check the `raw` boolean configuration option that is available along the `validator` string.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"single-instance": "patch"
|
|
||||||
---
|
|
||||||
|
|
||||||
Updated `windows-sys` crate to `0.59`
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"store": patch:breaking
|
|
||||||
---
|
|
||||||
|
|
||||||
Implement mobile support in Rust directly. This changes the store directories, invalidating all previously generated stores.
|
|
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
"barcode-scanner": patch
|
|
||||||
"biometric": patch
|
|
||||||
"clipboard-manager": patch
|
|
||||||
"dialog": patch
|
|
||||||
"geolocation": patch
|
|
||||||
"haptics": patch
|
|
||||||
"log-plugin": patch
|
|
||||||
"nfc": patch
|
|
||||||
"notification": patch
|
|
||||||
"shell": patch
|
|
||||||
"store": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Explicitly set a minimum macOS version for the Swift package.
|
|
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"fs-js": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Update documentation.
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
"geolocation": patch
|
|
||||||
"deep-link": patch
|
|
||||||
"updater": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
Update to tauri 2.0.0-rc.3.
|
|
@ -0,0 +1,44 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: check change files
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.changes/*.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: check change files end with .md
|
||||||
|
run: |
|
||||||
|
for file in .changes/*
|
||||||
|
do
|
||||||
|
if [[ ! "$file" =~ \.(md|json)$ ]]; then
|
||||||
|
echo ".changes directory should only contain files that end with .md"
|
||||||
|
echo "found an invalid file in .changes directory:"
|
||||||
|
echo "$file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
list-files: shell
|
||||||
|
filters: |
|
||||||
|
changes:
|
||||||
|
- added|modified: '.changes/*.md'
|
||||||
|
|
||||||
|
- name: check
|
||||||
|
run: node ./.scripts/ci/check-change-files.js ${{ steps.filter.outputs.changes_files }}
|
||||||
|
if: ${{ steps.filter.outputs.changes == 'true' }}
|
@ -0,0 +1,59 @@
|
|||||||
|
# Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
name: check formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rustfmt:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: install Rust stable and rustfmt
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: run cargo fmt
|
||||||
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
prettier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Cache pnpm modules
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.pnpm-store
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.x.x
|
||||||
|
run_install: true
|
||||||
|
- run: pnpm format:check
|
||||||
|
|
||||||
|
taplo:
|
||||||
|
name: taplo (.toml files)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: install taplo-cli
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: taplo-cli
|
||||||
|
|
||||||
|
- run: taplo fmt --check --diff
|
@ -1,8 +1,58 @@
|
|||||||
target
|
# dependency directories
|
||||||
node_modules
|
node_modules/
|
||||||
dist-js
|
target/
|
||||||
dist
|
|
||||||
|
# Optional npm and yarn cache directory
|
||||||
|
.npm/
|
||||||
|
.yarn/
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
|
||||||
|
# .vscode workspace settings file
|
||||||
|
.vscode/settings.json
|
||||||
|
|
||||||
|
# npm, yarn and bun lock files
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
bun.lockb
|
||||||
|
|
||||||
|
# rust compiled folders
|
||||||
|
target/
|
||||||
|
|
||||||
|
# compiled plugins
|
||||||
|
dist-js/
|
||||||
|
|
||||||
|
# plugins .tauri directory
|
||||||
|
/plugins/*/.tauri
|
||||||
|
|
||||||
|
# examples
|
||||||
|
examples/*/dist
|
||||||
|
plugins/*/examples/*/dist
|
||||||
|
examples/*/src-tauri/gen/schemas
|
||||||
|
plugins/*/examples/*/src-tauri/gen/schemas
|
||||||
|
|
||||||
|
# logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# miscellaneous
|
||||||
|
/.vs
|
||||||
|
.DS_Store
|
||||||
|
.Thumbs.db
|
||||||
|
*.sublime*
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
debug.log
|
||||||
.gradle
|
TODO.md
|
||||||
**/capabilities/schemas
|
|
@ -1,12 +1,27 @@
|
|||||||
target
|
/.changes
|
||||||
node_modules
|
/.vscode
|
||||||
dist
|
|
||||||
dist-js
|
# dependcies and artifacts directories
|
||||||
|
node_modules/
|
||||||
|
target/
|
||||||
|
dist-js/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# lock files
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
Cargo.lock
|
|
||||||
.build
|
# examples gen directory
|
||||||
build
|
examples/*/src-tauri/gen/
|
||||||
|
plugins/*/examples/*/src-tauri/gen/
|
||||||
|
|
||||||
|
# autogenerated files
|
||||||
|
**/autogenerated/**/*.md
|
||||||
api-iife.js
|
api-iife.js
|
||||||
init-iife.js
|
init-iife.js
|
||||||
intermediates/
|
CHANGELOG.md
|
||||||
*schema.json
|
*schema.json
|
||||||
|
|
||||||
|
# mobile build
|
||||||
|
**/ios/.build
|
||||||
|
**/.tauri
|
||||||
|
plugins/*/android/build
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"singleQuote": true,
|
||||||
|
"semi": false,
|
||||||
|
"trailingComma": "none"
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
import { readFileSync, readdirSync } from 'fs'
|
||||||
|
import { join } from 'path'
|
||||||
|
|
||||||
|
/* const ignorePackages = [
|
||||||
|
'api-example',
|
||||||
|
'api-example-js',
|
||||||
|
'deep-link-example',
|
||||||
|
'deep-link-example-js'
|
||||||
|
] */
|
||||||
|
|
||||||
|
const rsOnly = ['localhost', 'persisted-scope', 'single-instance']
|
||||||
|
|
||||||
|
function checkChangeFiles(changeFiles) {
|
||||||
|
let code = 0
|
||||||
|
|
||||||
|
for (const file of changeFiles) {
|
||||||
|
const content = readFileSync(file, 'utf8')
|
||||||
|
const [frontMatter] = /^---[\s\S.]*---\n/i.exec(content)
|
||||||
|
const packages = frontMatter
|
||||||
|
.split('\n')
|
||||||
|
.filter((l) => !(l === '---' || !l))
|
||||||
|
.map((l) => l.replace(/('|")/g, '').split(':'))
|
||||||
|
|
||||||
|
const rsPackages = Object.fromEntries(
|
||||||
|
packages
|
||||||
|
.filter((v) => !v[0].endsWith('-js'))
|
||||||
|
.map((v) => [v[0], v[1].trim()])
|
||||||
|
)
|
||||||
|
const jsPackages = Object.fromEntries(
|
||||||
|
packages
|
||||||
|
.filter((v) => v[0].endsWith('-js'))
|
||||||
|
.map((v) => [v[0].slice(0, -3), v[1].trim()])
|
||||||
|
)
|
||||||
|
|
||||||
|
for (const pkg in rsPackages) {
|
||||||
|
if (rsOnly.includes(pkg)) continue
|
||||||
|
|
||||||
|
if (!jsPackages[pkg]) {
|
||||||
|
console.error(
|
||||||
|
`Missing "${rsPackages[pkg]}" bump for JS package "${pkg}-js" in ${file}.`
|
||||||
|
)
|
||||||
|
code = 1
|
||||||
|
} else if (rsPackages[pkg] != jsPackages[pkg]) {
|
||||||
|
console.error(
|
||||||
|
`"${pkg}" and "${pkg}-js" have different version bumps in ${file}.`
|
||||||
|
)
|
||||||
|
code = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const pkg in jsPackages) {
|
||||||
|
if (!rsPackages[pkg]) {
|
||||||
|
console.error(
|
||||||
|
`Missing "${jsPackages[pkg]}" bump for Rust package "${pkg}" in ${file}.`
|
||||||
|
)
|
||||||
|
code = 1
|
||||||
|
} else if (rsPackages[pkg] != jsPackages[pkg]) {
|
||||||
|
console.error(
|
||||||
|
`"${pkg}" and "${pkg}-js" have different version bumps in ${file}.`
|
||||||
|
)
|
||||||
|
code = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
process.exit(code)
|
||||||
|
}
|
||||||
|
|
||||||
|
const [_bin, _script, ...files] = process.argv
|
||||||
|
|
||||||
|
if (files.length > 0) {
|
||||||
|
checkChangeFiles(
|
||||||
|
files.filter((f) => f.toLowerCase() !== '.changes/readme.md')
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
const changeFiles = readdirSync('.changes')
|
||||||
|
.filter((f) => f.endsWith('.md') && f.toLowerCase() !== 'readme.md')
|
||||||
|
.map((p) => join('.changes', p))
|
||||||
|
checkChangeFiles(changeFiles)
|
||||||
|
}
|
@ -0,0 +1 @@
|
|||||||
|
plugins/*/permissions/autogenerated/
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"rust-lang.rust-analyzer",
|
||||||
|
"EditorConfig.EditorConfig",
|
||||||
|
"esbenp.prettier-vscode",
|
||||||
|
"tamasfe.even-better-toml"
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
|||||||
/node_modules/
|
|
||||||
/.vscode/
|
|
||||||
.DS_Store
|
|
||||||
.cargo
|
|
@ -1,40 +1,44 @@
|
|||||||
{
|
{
|
||||||
"name": "svelte-app",
|
"name": "api",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.0-rc.1",
|
"version": "2.0.9",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --clearScreen false",
|
"dev": "vite --clearScreen false",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"serve": "vite preview"
|
"serve": "vite preview",
|
||||||
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "2.0.0-rc.1",
|
"@tauri-apps/api": "2.2.0",
|
||||||
"@tauri-apps/plugin-barcode-scanner": "2.0.0-rc.0",
|
"@tauri-apps/plugin-barcode-scanner": "^2.2.0",
|
||||||
"@tauri-apps/plugin-biometric": "2.0.0-rc.0",
|
"@tauri-apps/plugin-biometric": "^2.2.0",
|
||||||
"@tauri-apps/plugin-cli": "2.0.0-rc.0",
|
"@tauri-apps/plugin-cli": "^2.2.0",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "2.0.0-rc.0",
|
"@tauri-apps/plugin-clipboard-manager": "^2.2.0",
|
||||||
"@tauri-apps/plugin-dialog": "2.0.0-rc.0",
|
"@tauri-apps/plugin-dialog": "^2.2.0",
|
||||||
"@tauri-apps/plugin-fs": "2.0.0-rc.1",
|
"@tauri-apps/plugin-fs": "^2.2.0",
|
||||||
"@tauri-apps/plugin-global-shortcut": "2.0.0-rc.0",
|
"@tauri-apps/plugin-geolocation": "^2.2.0",
|
||||||
"@tauri-apps/plugin-http": "2.0.0-rc.1",
|
"@tauri-apps/plugin-global-shortcut": "^2.2.0",
|
||||||
"@tauri-apps/plugin-nfc": "2.0.0-rc.0",
|
"@tauri-apps/plugin-opener": "^2.2.0",
|
||||||
"@tauri-apps/plugin-notification": "2.0.0-rc.0",
|
"@tauri-apps/plugin-haptics": "^2.2.0",
|
||||||
"@tauri-apps/plugin-os": "2.0.0-rc.0",
|
"@tauri-apps/plugin-http": "^2.2.0",
|
||||||
"@tauri-apps/plugin-process": "2.0.0-rc.0",
|
"@tauri-apps/plugin-nfc": "^2.2.0",
|
||||||
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
|
"@tauri-apps/plugin-notification": "^2.2.0",
|
||||||
"@tauri-apps/plugin-store": "2.0.0-rc.0",
|
"@tauri-apps/plugin-os": "^2.2.0",
|
||||||
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
|
"@tauri-apps/plugin-process": "^2.2.0",
|
||||||
"@zerodevx/svelte-json-view": "1.0.9"
|
"@tauri-apps/plugin-shell": "^2.2.0",
|
||||||
|
"@tauri-apps/plugin-store": "^2.2.0",
|
||||||
|
"@tauri-apps/plugin-updater": "^2.2.0",
|
||||||
|
"@zerodevx/svelte-json-view": "1.0.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify-json/codicon": "^1.1.37",
|
"@iconify-json/codicon": "^1.2.6",
|
||||||
"@iconify-json/ph": "^1.1.8",
|
"@iconify-json/ph": "^1.2.1",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
"@sveltejs/vite-plugin-svelte": "^5.0.1",
|
||||||
"@tauri-apps/cli": "2.0.0-rc.6",
|
"@tauri-apps/cli": "2.2.4",
|
||||||
"@unocss/extractor-svelte": "^0.62.0",
|
"@unocss/extractor-svelte": "^65.0.0",
|
||||||
"svelte": "^4.2.8",
|
"svelte": "^5.10.0",
|
||||||
"unocss": "^0.62.0",
|
"unocss": "^65.0.0",
|
||||||
"vite": "^5.0.13"
|
"vite": "^6.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Request camera access for WebRTC</string>
|
<string>Request camera access for WebRTC</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>Request microphone access for WebRTC</string>
|
<string>Request microphone access for WebRTC</string>
|
||||||
</dict>
|
<key>NSFaceIDUsageDescription</key>
|
||||||
|
<string>Authenticate with biometrics</string>
|
||||||
|
<key>NFCReaderUsageDescription</key>
|
||||||
|
<string>Read and write to NFC tags for testing</string>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.9.10" />
|
<option name="version" value="1.9.25" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -1,6 +1,6 @@
|
|||||||
#Tue May 10 19:22:52 CST 2022
|
#Tue May 10 19:22:52 CST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -1,89 +1,89 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
|
|||||||
|
<script>
|
||||||
|
import {
|
||||||
|
checkPermissions,
|
||||||
|
requestPermissions,
|
||||||
|
getCurrentPosition
|
||||||
|
} from '@tauri-apps/plugin-geolocation'
|
||||||
|
|
||||||
|
export let onMessage
|
||||||
|
|
||||||
|
async function getPosition() {
|
||||||
|
let permissions = await checkPermissions()
|
||||||
|
if (
|
||||||
|
permissions.location === 'prompt' ||
|
||||||
|
permissions.location === 'prompt-with-rationale'
|
||||||
|
) {
|
||||||
|
permissions = await requestPermissions(['location'])
|
||||||
|
}
|
||||||
|
|
||||||
|
if (permissions.location === 'granted') {
|
||||||
|
getCurrentPosition().then(onMessage).catch(onMessage)
|
||||||
|
} else {
|
||||||
|
onMessage('permission denied')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button class="btn" id="cli-matches" on:click={getPosition}>
|
||||||
|
Get Position
|
||||||
|
</button>
|
@ -0,0 +1,46 @@
|
|||||||
|
<script>
|
||||||
|
import {
|
||||||
|
vibrate,
|
||||||
|
impactFeedback,
|
||||||
|
notificationFeedback,
|
||||||
|
selectionFeedback
|
||||||
|
} from '@tauri-apps/plugin-haptics'
|
||||||
|
|
||||||
|
export let onMessage
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
on:click={() => vibrate(300).then(onMessage).catch(onMessage)}
|
||||||
|
>vibrate short</button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
on:click={() => vibrate(1500).then(onMessage).catch(onMessage)}
|
||||||
|
>vibrate long</button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
on:click={() => impactFeedback('medium').then(onMessage).catch(onMessage)}
|
||||||
|
>impact medium</button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
on:click={() =>
|
||||||
|
notificationFeedback('warning').then(onMessage).catch(onMessage)}
|
||||||
|
>notification warning</button
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn"
|
||||||
|
on:click={() => selectionFeedback().then(onMessage).catch(onMessage)}
|
||||||
|
>selection</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Depending on your device settings for haptic feedback some of the buttons may
|
||||||
|
not work.
|
||||||
|
</p>
|
@ -0,0 +1,66 @@
|
|||||||
|
<script>
|
||||||
|
import * as opener from '@tauri-apps/plugin-opener'
|
||||||
|
|
||||||
|
export let onMessage
|
||||||
|
|
||||||
|
let url = ''
|
||||||
|
let urlProgram = ''
|
||||||
|
function openUrl() {
|
||||||
|
opener.openUrl(url, urlProgram ? urlProgram : undefined).catch(onMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
let pathProgram = ''
|
||||||
|
function openPath() {
|
||||||
|
opener
|
||||||
|
.openPath(path, pathProgram ? pathProgram : undefined)
|
||||||
|
.catch(onMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
let revealPath = ''
|
||||||
|
function revealItemInDir() {
|
||||||
|
opener.revealItemInDir(revealPath).catch(onMessage)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-2">
|
||||||
|
<form
|
||||||
|
class="flex flex-row gap-2 items-center"
|
||||||
|
on:submit|preventDefault={openUrl}
|
||||||
|
>
|
||||||
|
<button class="btn" type="submit">Open URL</button>
|
||||||
|
<input
|
||||||
|
class="input grow"
|
||||||
|
placeholder="Type the URL to open..."
|
||||||
|
bind:value={url}
|
||||||
|
/>
|
||||||
|
<span> with </span>
|
||||||
|
<input class="input" bind:value={urlProgram} />
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form
|
||||||
|
class="flex flex-row gap-2 items-center"
|
||||||
|
on:submit|preventDefault={openPath}
|
||||||
|
>
|
||||||
|
<button class="btn" type="submit">Open Path</button>
|
||||||
|
<input
|
||||||
|
class="input grow"
|
||||||
|
placeholder="Type the path to open..."
|
||||||
|
bind:value={path}
|
||||||
|
/>
|
||||||
|
<span> with </span>
|
||||||
|
<input class="input" bind:value={pathProgram} />
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form
|
||||||
|
class="flex flex-row gap-2 items-center"
|
||||||
|
on:submit|preventDefault={revealItemInDir}
|
||||||
|
>
|
||||||
|
<button class="btn" type="submit">Reveal</button>
|
||||||
|
<input
|
||||||
|
class="input grow"
|
||||||
|
placeholder="Type the path to reveal..."
|
||||||
|
bind:value={revealPath}
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
</div>
|
@ -1 +0,0 @@
|
|||||||
node_modules
|
|
@ -1,88 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## \[2.0.0-rc.0]
|
|
||||||
|
|
||||||
- [`9887d1`](https://github.com/tauri-apps/plugins-workspace/commit/9887d14bd0e971c4c0f5c1188fc4005d3fc2e29e) Update to tauri RC.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.8]
|
|
||||||
|
|
||||||
- [`99d6ac0f`](https://github.com/tauri-apps/plugins-workspace/commit/99d6ac0f9506a6a4a1aa59c728157190a7441af6) ([#1606](https://github.com/tauri-apps/plugins-workspace/pull/1606) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) The JS packages now specify the *minimum* `@tauri-apps/api` version instead of a single exact version.
|
|
||||||
- [`6de87966`](https://github.com/tauri-apps/plugins-workspace/commit/6de87966ecc00ad9d91c25be452f1f46bd2b7e1f) ([#1597](https://github.com/tauri-apps/plugins-workspace/pull/1597) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Update to tauri beta.25.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.7]
|
|
||||||
|
|
||||||
- [`22a17980`](https://github.com/tauri-apps/plugins-workspace/commit/22a17980ff4f6f8c40adb1b8f4ffc6dae2fe7e30) ([#1537](https://github.com/tauri-apps/plugins-workspace/pull/1537) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Update to tauri beta.24.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.6]
|
|
||||||
|
|
||||||
- [`76daee7a`](https://github.com/tauri-apps/plugins-workspace/commit/76daee7aafece34de3092c86e531cf9eb1138989) ([#1512](https://github.com/tauri-apps/plugins-workspace/pull/1512) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Update to tauri beta.23.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.5]
|
|
||||||
|
|
||||||
- [`9013854f`](https://github.com/tauri-apps/plugins-workspace/commit/9013854f42a49a230b9dbb9d02774765528a923f)([#1382](https://github.com/tauri-apps/plugins-workspace/pull/1382)) Update to tauri beta.22.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.4]
|
|
||||||
|
|
||||||
- [`430bd6f4`](https://github.com/tauri-apps/plugins-workspace/commit/430bd6f4f379bee5d232ae6b098ae131db7f178a)([#1363](https://github.com/tauri-apps/plugins-workspace/pull/1363)) Update to tauri beta.20.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.3]
|
|
||||||
|
|
||||||
- [`bd1ed590`](https://github.com/tauri-apps/plugins-workspace/commit/bd1ed5903ffcce5500310dac1e59e8c67674ef1e)([#1237](https://github.com/tauri-apps/plugins-workspace/pull/1237)) Update to tauri beta.17.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.4]
|
|
||||||
|
|
||||||
- [`7e2fcc5`](https://github.com/tauri-apps/plugins-workspace/commit/7e2fcc5e74df7c3c718e40f75bfb0eafc7d69d8d)([#1146](https://github.com/tauri-apps/plugins-workspace/pull/1146)) Update dependencies to align with tauri 2.0.0-beta.14.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.3]
|
|
||||||
|
|
||||||
- [`a04ea2f`](https://github.com/tauri-apps/plugins-workspace/commit/a04ea2f38294d5a3987578283badc8eec87a7752)([#1071](https://github.com/tauri-apps/plugins-workspace/pull/1071)) The global API script is now only added to the binary when the `withGlobalTauri` config is true.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.2]
|
|
||||||
|
|
||||||
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.1]
|
|
||||||
|
|
||||||
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
|
|
||||||
|
|
||||||
## \[2.0.0-beta.0]
|
|
||||||
|
|
||||||
- [`d198c01`](https://github.com/tauri-apps/plugins-workspace/commit/d198c014863ee260cb0de88a14b7fc4356ef7474)([#862](https://github.com/tauri-apps/plugins-workspace/pull/862)) Update to tauri beta.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.5]
|
|
||||||
|
|
||||||
- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.13.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.4]
|
|
||||||
|
|
||||||
- [`387c2f9`](https://github.com/tauri-apps/plugins-workspace/commit/387c2f9e0ce4c75c07ffa3fd76391a25b58f5daf)([#802](https://github.com/tauri-apps/plugins-workspace/pull/802)) Update to @tauri-apps/api v2.0.0-alpha.12.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.3]
|
|
||||||
|
|
||||||
- [`e438e0a`](https://github.com/tauri-apps/plugins-workspace/commit/e438e0a62d4b430a5159f05f13ecd397dd891a0d)([#676](https://github.com/tauri-apps/plugins-workspace/pull/676)) Update to @tauri-apps/api v2.0.0-alpha.11.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.2]
|
|
||||||
|
|
||||||
- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update to @tauri-apps/api v2.0.0-alpha.9.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.2]
|
|
||||||
|
|
||||||
- [`4e2cef9`](https://github.com/tauri-apps/plugins-workspace/commit/4e2cef9b702bbbb9cf4ee17de50791cb21f1b2a4)([#593](https://github.com/tauri-apps/plugins-workspace/pull/593)) Update to alpha.12.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.1]
|
|
||||||
|
|
||||||
- [`d74fc0a`](https://github.com/tauri-apps/plugins-workspace/commit/d74fc0a097996e90a37be8f57d50b7d1f6ca616f)([#555](https://github.com/tauri-apps/plugins-workspace/pull/555)) Update to alpha.11.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
|
||||||
|
|
||||||
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
||||||
te to alpha.11.
|
|
||||||
|
|
||||||
## \[2.0.0-alpha.0]
|
|
||||||
|
|
||||||
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
||||||
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
||||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
||||||
\-workspace/pull/371)) First v2 alpha release!
|
|
||||||
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
||||||
com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
|
|
@ -1,41 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "tauri-plugin-authenticator"
|
|
||||||
version = "2.0.0-rc.0"
|
|
||||||
description = "Use hardware security-keys in your Tauri App."
|
|
||||||
authors = { workspace = true }
|
|
||||||
license = { workspace = true }
|
|
||||||
edition = { workspace = true }
|
|
||||||
rust-version = { workspace = true }
|
|
||||||
repository = { workspace = true }
|
|
||||||
links = "tauri-plugin-authenticator"
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
|
||||||
rustc-args = [ "--cfg", "docsrs" ]
|
|
||||||
rustdoc-args = [ "--cfg", "docsrs" ]
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
tauri-plugin = { workspace = true, features = [ "build" ] }
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
serde = { workspace = true }
|
|
||||||
serde_json = { workspace = true }
|
|
||||||
tauri = { workspace = true }
|
|
||||||
log = { workspace = true }
|
|
||||||
thiserror = { workspace = true }
|
|
||||||
|
|
||||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
|
||||||
authenticator = "0.3.1"
|
|
||||||
once_cell = "1"
|
|
||||||
sha2 = "0.10"
|
|
||||||
base64 = "0.22"
|
|
||||||
chrono = "0.4"
|
|
||||||
bytes = "1"
|
|
||||||
byteorder = "1"
|
|
||||||
openssl = "0.10"
|
|
||||||
|
|
||||||
[target."cfg(target_os = \"windows\")".dependencies]
|
|
||||||
winapi-util = "=0.1.6"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
rand = "0.8"
|
|
||||||
rusty-fork = "0.3"
|
|
@ -1,143 +0,0 @@
|
|||||||

|
|
||||||
|
|
||||||
Use hardware security-keys in your Tauri App.
|
|
||||||
|
|
||||||
- Supported platforms: Windows, Linux, FreeBSD, NetBSD, OpenBSD, and macOS.
|
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
_This plugin requires a Rust version of at least **1.75**_
|
|
||||||
|
|
||||||
There are three general methods of installation that we can recommend.
|
|
||||||
|
|
||||||
1. Use crates.io and npm (easiest and requires you to trust that our publishing pipeline worked)
|
|
||||||
2. Pull sources directly from Github using git tags / revision hashes (most secure)
|
|
||||||
3. Git submodule install this repo in your tauri project and then use the file protocol to ingest the source (most secure, but inconvenient to use)
|
|
||||||
|
|
||||||
Install the authenticator plugin by adding the following lines to your `Cargo.toml` file:
|
|
||||||
|
|
||||||
`src-tauri/Cargo.toml`
|
|
||||||
|
|
||||||
```toml
|
|
||||||
# you can add the dependencies on the `[dependencies]` section if you do not target mobile
|
|
||||||
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
|
|
||||||
tauri-plugin-authenticator = "2.0.0-rc"
|
|
||||||
# alternatively with Git:
|
|
||||||
tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
|
||||||
```
|
|
||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
|
||||||
|
|
||||||
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pnpm add @tauri-apps/plugin-authenticator
|
|
||||||
# or
|
|
||||||
npm add @tauri-apps/plugin-authenticator
|
|
||||||
# or
|
|
||||||
yarn add @tauri-apps/plugin-authenticator
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively with Git:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
|
|
||||||
# or
|
|
||||||
npm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
|
|
||||||
# or
|
|
||||||
yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
First, you need to register the authenticator plugin with Tauri:
|
|
||||||
|
|
||||||
`src-tauri/src/main.rs`
|
|
||||||
|
|
||||||
```rust
|
|
||||||
fn main() {
|
|
||||||
tauri::Builder::default()
|
|
||||||
.setup(|app| {
|
|
||||||
#[cfg(desktop)]
|
|
||||||
app.handle().plugin(tauri_plugin_authenticator::init())?;
|
|
||||||
Ok(())
|
|
||||||
})
|
|
||||||
.run(tauri::generate_context!())
|
|
||||||
.expect("error while running tauri application");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Afterwards, all the plugin's APIs are available through the JavaScript guest bindings:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
import { Authenticator } from "@tauri-apps/plugin-authenticator";
|
|
||||||
|
|
||||||
const auth = new Authenticator();
|
|
||||||
auth.init(); // initialize transports
|
|
||||||
|
|
||||||
// generate a 32-bytes long random challenge
|
|
||||||
const arr = new Uint32Array(32);
|
|
||||||
window.crypto.getRandomValues(arr);
|
|
||||||
const b64 = btoa(String.fromCharCode.apply(null, arr));
|
|
||||||
// web-safe base64
|
|
||||||
const challenge = b64.replace(/\+/g, "-").replace(/\//g, "_");
|
|
||||||
|
|
||||||
const domain = "https://tauri.app";
|
|
||||||
|
|
||||||
// attempt to register with the security key
|
|
||||||
const json = await auth.register(challenge, domain);
|
|
||||||
const registerResult = JSON.parse(json);
|
|
||||||
|
|
||||||
// verify the registration was successful
|
|
||||||
const r2 = await auth.verifyRegistration(
|
|
||||||
challenge,
|
|
||||||
app,
|
|
||||||
registerResult.registerData,
|
|
||||||
registerResult.clientData,
|
|
||||||
);
|
|
||||||
const j2 = JSON.parse(r2);
|
|
||||||
|
|
||||||
// sign some data
|
|
||||||
const json = await auth.sign(challenge, app, keyHandle);
|
|
||||||
const signData = JSON.parse(json);
|
|
||||||
|
|
||||||
// verify the signature again
|
|
||||||
const counter = await auth.verifySignature(
|
|
||||||
challenge,
|
|
||||||
app,
|
|
||||||
signData.signData,
|
|
||||||
clientData,
|
|
||||||
keyHandle,
|
|
||||||
pubkey,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (counter && counter > 0) {
|
|
||||||
console.log("SUCCESS!");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
|
|
||||||
|
|
||||||
## Partners
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td align="center" valign="middle">
|
|
||||||
<a href="https://crabnebula.dev" target="_blank">
|
|
||||||
<img src="https://github.com/tauri-apps/plugins-workspace/raw/v2/.github/sponsors/crabnebula.svg" alt="CrabNebula" width="283">
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
For the complete list of sponsors please visit our [website](https://tauri.app#sponsors) and [Open Collective](https://opencollective.com/tauri).
|
|
||||||
|
|
||||||
## License
|
|
||||||
|
|
||||||
Code: (c) 2015 - Present - The Tauri Programme within The Commons Conservancy.
|
|
||||||
|
|
||||||
MIT or MIT/Apache 2.0 where applicable.
|
|
@ -1 +0,0 @@
|
|||||||
if("__TAURI__"in window){var __TAURI_PLUGIN_AUTHENTICATOR__=function(t){"use strict";async function i(t,i={},a){return window.__TAURI_INTERNALS__.invoke(t,i,a)}"function"==typeof SuppressedError&&SuppressedError;return t.Authenticator=class{async init(){await i("plugin:authenticator|init_auth")}async register(t,a){return await i("plugin:authenticator|register",{timeout:1e4,challenge:t,application:a})}async verifyRegistration(t,a,e,n){return await i("plugin:authenticator|verify_registration",{challenge:t,application:a,registerData:e,clientData:n})}async sign(t,a,e){return await i("plugin:authenticator|sign",{timeout:1e4,challenge:t,application:a,keyHandle:e})}async verifySignature(t,a,e,n,r,u){return await i("plugin:authenticator|verify_signature",{challenge:t,application:a,signData:e,clientData:n,keyHandle:r,pubkey:u})}},t}({});Object.defineProperty(window.__TAURI__,"authenticator",{value:__TAURI_PLUGIN_AUTHENTICATOR__})}
|
|
Before Width: | Height: | Size: 44 KiB |
@ -1,17 +0,0 @@
|
|||||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
// SPDX-License-Identifier: MIT
|
|
||||||
|
|
||||||
const COMMANDS: &[&str] = &[
|
|
||||||
"init_auth",
|
|
||||||
"register",
|
|
||||||
"verify_registration",
|
|
||||||
"sign",
|
|
||||||
"verify_signature",
|
|
||||||
];
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
tauri_plugin::Builder::new(COMMANDS)
|
|
||||||
.global_api_script_path("./api-iife.js")
|
|
||||||
.build();
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue