Merge branch 'tauri-apps:v1' into no_record

pull/129/head
Ludea 2 years ago committed by GitHub
commit a094c6aaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
"stronghold-js": patch
---
Change the argument name of the `Stronghold.remove` from `location` to `recordPath` to match the Stronghold command argument

@ -0,0 +1,5 @@
---
"stronghold-js": minor
---
Added `Stronghold.load` and removed its constructor.

@ -0,0 +1 @@
auto-install-peers=true

8
Cargo.lock generated

@ -2009,9 +2009,9 @@ dependencies = [
[[package]]
name = "iota-crypto"
version = "0.19.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67d2bc02591d8a0427a8650204c259d0cad04d6cde0b6a4683906dc0b6dd3887"
checksum = "0180a2a7939b4b0ae68e651bbec130b27fd5882ef552df5bb55e0320e78bacbc"
dependencies = [
"autocfg",
]
@ -4392,7 +4392,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-persisted-scope"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"aho-corasick 1.0.1",
"bincode",
@ -4459,7 +4459,7 @@ name = "tauri-plugin-stronghold"
version = "0.0.0"
dependencies = [
"hex",
"iota-crypto 0.19.0",
"iota-crypto 0.20.0",
"iota_stronghold",
"log",
"rand 0.8.5",

@ -17,7 +17,7 @@
"@typescript-eslint/parser": "^5.58.0",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^34.0.1",
"eslint-config-standard-with-typescript": "^35.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.1.1",
@ -27,6 +27,6 @@
"typescript": "^5.0.4"
},
"engines": {
"pnpm": ">=7.24.2"
"pnpm": ">=7.33.0"
}
}

@ -28,11 +28,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-authenticator
pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-authenticator
npm add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-authenticator
yarn add https://github.com/tauri-apps/tauri-plugin-authenticator#v1
```
## Usage

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-autostart
pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-autostart
npm add https://github.com/tauri-apps/tauri-plugin-autostart#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-autostart
yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v1
```
## Usage

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-fs-extra
pnpm add https://github.com/tauri-apps/tauri-plugin-fs-extra#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-fs-extra
npm add https://github.com/tauri-apps/tauri-plugin-fs-extra#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-fs-extra
yarn add https://github.com/tauri-apps/tauri-plugin-fs-extra#v1
```
## Usage

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-fs-watch
pnpm add https://github.com/tauri-apps/tauri-plugin-fs-watch#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-fs-watch
npm add https://github.com/tauri-apps/tauri-plugin-fs-watch#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch
yarn add https://github.com/tauri-apps/tauri-plugin-fs-watch#v1
```
## Usage

@ -41,14 +41,21 @@ fn main() {
let window_url = WindowUrl::External(url);
// rewrite the config so the IPC is enabled on this URL
context.config_mut().build.dist_dir = AppUrl::Url(window_url.clone());
context.config_mut().build.dev_path = AppUrl::Url(window_url.clone());
tauri::Builder::default()
.plugin(tauri_plugin_localhost::Builder::new(port).build())
.setup(move |app| {
WindowBuilder::new(app, "main".to_string(), window_url)
.title("Localhost Example")
.build()?;
WindowBuilder::new(
app,
"main".to_string(),
if cfg!(dev) {
Default::default()
} else {
window_url
}
)
.title("Localhost Example")
.build()?;
Ok(())
})
.run(context)

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-log
pnpm add https://github.com/tauri-apps/tauri-plugin-log#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-log
npm add https://github.com/tauri-apps/tauri-plugin-log#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-log
yarn add https://github.com/tauri-apps/tauri-plugin-log#v1
```
## Usage

@ -2,9 +2,7 @@ authenticator
autostart
fs-extra
fs-watch
localhost
log
persisted-scope
positioner
sql
store

@ -40,11 +40,11 @@ yarn add tauri-plugin-positioner-api
Or through git:
```sh
pnpm add https://github.com/tauri-apps/tauri-plugin-positioner
pnpm add https://github.com/tauri-apps/tauri-plugin-positioner#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-positioner
npm add https://github.com/tauri-apps/tauri-plugin-positioner#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-positioner
yarn add https://github.com/tauri-apps/tauri-plugin-positioner#v1
```
## Usage

@ -28,11 +28,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-sql
pnpm add https://github.com/tauri-apps/tauri-plugin-sql#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-sql
npm add https://github.com/tauri-apps/tauri-plugin-sql#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-sql
yarn add https://github.com/tauri-apps/tauri-plugin-sql#v1
```
## Usage

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-store
pnpm add https://github.com/tauri-apps/tauri-plugin-store#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-store
npm add https://github.com/tauri-apps/tauri-plugin-store#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-store
yarn add https://github.com/tauri-apps/tauri-plugin-store#v1
```
## Usage

@ -16,7 +16,7 @@ tauri.workspace = true
log.workspace = true
thiserror.workspace = true
iota_stronghold = "1"
iota-crypto = "0.19"
iota-crypto = "0.20"
hex = "0.4"
zeroize = { version = "1", features = ["zeroize_derive"] }

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-stronghold
pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-stronghold
npm add https://github.com/tauri-apps/tauri-plugin-stronghold#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-stronghold
yarn add https://github.com/tauri-apps/tauri-plugin-stronghold#v1
```
## Usage

@ -385,7 +385,7 @@ export class Vault extends ProcedureExecutor {
snapshotPath: this.path,
client: this.client,
vault: this.name,
location,
recordPath: location.payload.record,
});
}
}
@ -402,21 +402,20 @@ export class Stronghold {
* @param path
* @param password
*/
constructor(path: string, password: string) {
private constructor(path: string) {
this.path = path;
void this.reload(password);
}
/**
* Force a reload of the snapshot. The password must match.
* Load the snapshot if it exists (password must match), or start a fresh stronghold instance otherwise.
* @param password
* @returns
*/
private async reload(password: string): Promise<void> {
static async load(path: string, password: string): Promise<Stronghold> {
return await invoke("plugin:stronghold|initialize", {
snapshotPath: this.path,
snapshotPath: path,
password,
});
}).then(() => new Stronghold(path));
}
/**

@ -27,11 +27,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-upload
pnpm add https://github.com/tauri-apps/tauri-plugin-upload#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-upload
npm add https://github.com/tauri-apps/tauri-plugin-upload#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-upload
yarn add https://github.com/tauri-apps/tauri-plugin-upload#v1
```
## Usage
@ -52,25 +52,25 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { upload } from 'tauri-plugin-upload-api'
import { upload } from "tauri-plugin-upload-api";
upload(
'https://example.com/file-upload',
'./path/to/my/file.txt',
(progress, total) => console.log(`Uploaded ${progress} of ${total} bytes`), // a callback that will be called with the upload progress
{ 'Content-Type': 'text/plain' } // optional headers to send with the request
)
"https://example.com/file-upload",
"./path/to/my/file.txt",
(progress, total) => console.log(`Uploaded ${progress} of ${total} bytes`), // a callback that will be called with the upload progress
{ "Content-Type": "text/plain" } // optional headers to send with the request
);
```
```javascript
import { download } from "tauri-plugin-upload-api";
download(
'https://example.com/file-download-link',
'./path/to/save/my/file.txt',
(progress, total) => console.log(`Downloaded ${progress} of ${total} bytes`), // a callback that will be called with the download progress
{ 'Content-Type': 'text/plain' } // optional headers to send with the request
)
"https://example.com/file-download-link",
"./path/to/save/my/file.txt",
(progress, total) => console.log(`Downloaded ${progress} of ${total} bytes`), // a callback that will be called with the download progress
{ "Content-Type": "text/plain" } // optional headers to send with the request
);
```
## Contributing

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-websocket
pnpm add https://github.com/tauri-apps/tauri-plugin-websocket#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-websocket
npm add https://github.com/tauri-apps/tauri-plugin-websocket#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-websocket
yarn add https://github.com/tauri-apps/tauri-plugin-websocket#v1
```
## Usage

@ -26,11 +26,11 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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 https://github.com/tauri-apps/tauri-plugin-window-state
pnpm add https://github.com/tauri-apps/tauri-plugin-window-state#v1
# or
npm add https://github.com/tauri-apps/tauri-plugin-window-state
npm add https://github.com/tauri-apps/tauri-plugin-window-state#v1
# or
yarn add https://github.com/tauri-apps/tauri-plugin-window-state
yarn add https://github.com/tauri-apps/tauri-plugin-window-state#v1
```
## Usage

@ -175,7 +175,7 @@ impl<R: Runtime> WindowExt for Window<R> {
}
if flags.contains(StateFlags::DECORATIONS) {
metadata.visible = self.is_visible()?;
metadata.decorated = self.is_decorated()?;
}
if flags.contains(StateFlags::FULLSCREEN) {

@ -1,4 +1,8 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
@ -26,8 +30,8 @@ importers:
specifier: ^8.8.0
version: 8.8.0(eslint@8.38.0)
eslint-config-standard-with-typescript:
specifier: ^34.0.1
version: 34.0.1(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4)
specifier: ^35.0.0
version: 35.0.0(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4)
eslint-plugin-import:
specifier: ^2.27.5
version: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.38.0)
@ -1307,10 +1311,10 @@ packages:
eslint: 8.38.0
dev: true
/eslint-config-standard-with-typescript@34.0.1(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4):
resolution: {integrity: sha512-J7WvZeLtd0Vr9F+v4dZbqJCLD16cbIy4U+alJMq4MiXdpipdBM3U5NkXaGUjePc4sb1ZE01U9g6VuTBpHHz1fg==}
/eslint-config-standard-with-typescript@35.0.0(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4):
resolution: {integrity: sha512-Xa7DY9GgduZyp0qmXxBF0/dB+Vm4/DgWu1lGpNLJV2d46aCaUxTKDEnkzjUWX/1O9S0a+Dhnw7A4oI0JpYzwtw==}
peerDependencies:
'@typescript-eslint/eslint-plugin': ^5.43.0
'@typescript-eslint/eslint-plugin': ^5.50.0
eslint: ^8.0.1
eslint-plugin-import: ^2.25.2
eslint-plugin-n: ^15.0.0

@ -25,6 +25,8 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> 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.
<!-- Add the branch for installations using git! -->
```sh
pnpm add <!-- plugin here -->
# or

Loading…
Cancel
Save