fix: fix prettier warning

pull/2724/head
Nikita Kuznetsov 2 months ago
parent c1ed5e959c
commit 4bbe1aa57d
No known key found for this signature in database
GPG Key ID: 837B23C64C3799E9

@ -22,7 +22,7 @@
## \[2.0.0-beta.8] ## \[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. - [`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. - [`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] ## \[2.0.0-beta.7]

@ -1 +1,180 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_STRONGHOLD__=function(t){"use strict";async function e(t,e={},r){return window.__TAURI_INTERNALS__.invoke(t,e,r)}"function"==typeof SuppressedError&&SuppressedError;class r{constructor(t,e){this.type=t,this.payload=e}static generic(t,e){return new r("Generic",{vault:t,record:e})}static counter(t,e){return new r("Counter",{vault:t,counter:e})}}class n{constructor(t){this.procedureArgs=t}async generateSLIP10Seed(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Generate",payload:{output:t,sizeBytes:r}}}).then((t=>Uint8Array.from(t)))}async deriveSLIP10(t,r,n,a){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"SLIP10Derive",payload:{chain:t,input:{type:r,payload:n},output:a}}}).then((t=>Uint8Array.from(t)))}async recoverBIP39(t,r,n){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Recover",payload:{mnemonic:t,passphrase:n,output:r}}}).then((t=>Uint8Array.from(t)))}async generateBIP39(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"BIP39Generate",payload:{output:t,passphrase:r}}}).then((t=>Uint8Array.from(t)))}async getEd25519PublicKey(t){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"PublicKey",payload:{type:"Ed25519",privateKey:t}}}).then((t=>Uint8Array.from(t)))}async signEd25519(t,r){return await e("plugin:stronghold|execute_procedure",{...this.procedureArgs,procedure:{type:"Ed25519Sign",payload:{privateKey:t,msg:r}}}).then((t=>Uint8Array.from(t)))}}class a{constructor(t,e){this.path=t,this.name=e}getVault(t){return new o(this.path,this.name,t)}getStore(){return new s(this.path,this.name)}}class s{constructor(t,e){this.path=t,this.client=e}async get(t){return await e("plugin:stronghold|get_store_record",{snapshotPath:this.path,client:this.client,key:t}).then((t=>t&&Uint8Array.from(t)))}async insert(t,r,n){await e("plugin:stronghold|save_store_record",{snapshotPath:this.path,client:this.client,key:t,value:r,lifetime:n})}async remove(t){return await e("plugin:stronghold|remove_store_record",{snapshotPath:this.path,client:this.client,key:t}).then((t=>t&&Uint8Array.from(t)))}}class o extends n{constructor(t,e,r){super({snapshotPath:t,client:e,vault:r}),this.path=t,this.client=e,this.name=r}async insert(t,r){await e("plugin:stronghold|save_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t,secret:r})}async remove(t){await e("plugin:stronghold|remove_secret",{snapshotPath:this.path,client:this.client,vault:this.name,recordPath:t.payload.record})}}class i{constructor(t){this.path=t}static async load(t,r){return await e("plugin:stronghold|initialize",{snapshotPath:t,password:r}).then((()=>new i(t)))}async unload(){await e("plugin:stronghold|destroy",{snapshotPath:this.path})}async loadClient(t){return await e("plugin:stronghold|load_client",{snapshotPath:this.path,client:t}).then((()=>new a(this.path,t)))}async createClient(t){return await e("plugin:stronghold|create_client",{snapshotPath:this.path,client:t}).then((()=>new a(this.path,t)))}async save(){await e("plugin:stronghold|save",{snapshotPath:this.path})}}return t.Client=a,t.Location=r,t.Store=s,t.Stronghold=i,t.Vault=o,t}({});Object.defineProperty(window.__TAURI__,"stronghold",{value:__TAURI_PLUGIN_STRONGHOLD__})} if ('__TAURI__' in window) {
var __TAURI_PLUGIN_STRONGHOLD__ = (function (t) {
'use strict'
async function e(t, e = {}, r) {
return window.__TAURI_INTERNALS__.invoke(t, e, r)
}
'function' == typeof SuppressedError && SuppressedError
class r {
constructor(t, e) {
;(this.type = t), (this.payload = e)
}
static generic(t, e) {
return new r('Generic', { vault: t, record: e })
}
static counter(t, e) {
return new r('Counter', { vault: t, counter: e })
}
}
class n {
constructor(t) {
this.procedureArgs = t
}
async generateSLIP10Seed(t, r) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: {
type: 'SLIP10Generate',
payload: { output: t, sizeBytes: r }
}
}).then((t) => Uint8Array.from(t))
}
async deriveSLIP10(t, r, n, a) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: {
type: 'SLIP10Derive',
payload: { chain: t, input: { type: r, payload: n }, output: a }
}
}).then((t) => Uint8Array.from(t))
}
async recoverBIP39(t, r, n) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: {
type: 'BIP39Recover',
payload: { mnemonic: t, passphrase: n, output: r }
}
}).then((t) => Uint8Array.from(t))
}
async generateBIP39(t, r) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: {
type: 'BIP39Generate',
payload: { output: t, passphrase: r }
}
}).then((t) => Uint8Array.from(t))
}
async getEd25519PublicKey(t) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: {
type: 'PublicKey',
payload: { type: 'Ed25519', privateKey: t }
}
}).then((t) => Uint8Array.from(t))
}
async signEd25519(t, r) {
return await e('plugin:stronghold|execute_procedure', {
...this.procedureArgs,
procedure: { type: 'Ed25519Sign', payload: { privateKey: t, msg: r } }
}).then((t) => Uint8Array.from(t))
}
}
class a {
constructor(t, e) {
;(this.path = t), (this.name = e)
}
getVault(t) {
return new o(this.path, this.name, t)
}
getStore() {
return new s(this.path, this.name)
}
}
class s {
constructor(t, e) {
;(this.path = t), (this.client = e)
}
async get(t) {
return await e('plugin:stronghold|get_store_record', {
snapshotPath: this.path,
client: this.client,
key: t
}).then((t) => t && Uint8Array.from(t))
}
async insert(t, r, n) {
await e('plugin:stronghold|save_store_record', {
snapshotPath: this.path,
client: this.client,
key: t,
value: r,
lifetime: n
})
}
async remove(t) {
return await e('plugin:stronghold|remove_store_record', {
snapshotPath: this.path,
client: this.client,
key: t
}).then((t) => t && Uint8Array.from(t))
}
}
class o extends n {
constructor(t, e, r) {
super({ snapshotPath: t, client: e, vault: r }),
(this.path = t),
(this.client = e),
(this.name = r)
}
async insert(t, r) {
await e('plugin:stronghold|save_secret', {
snapshotPath: this.path,
client: this.client,
vault: this.name,
recordPath: t,
secret: r
})
}
async remove(t) {
await e('plugin:stronghold|remove_secret', {
snapshotPath: this.path,
client: this.client,
vault: this.name,
recordPath: t.payload.record
})
}
}
class i {
constructor(t) {
this.path = t
}
static async load(t, r) {
return await e('plugin:stronghold|initialize', {
snapshotPath: t,
password: r
}).then(() => new i(t))
}
async unload() {
await e('plugin:stronghold|destroy', { snapshotPath: this.path })
}
async loadClient(t) {
return await e('plugin:stronghold|load_client', {
snapshotPath: this.path,
client: t
}).then(() => new a(this.path, t))
}
async createClient(t) {
return await e('plugin:stronghold|create_client', {
snapshotPath: this.path,
client: t
}).then(() => new a(this.path, t))
}
async save() {
await e('plugin:stronghold|save', { snapshotPath: this.path })
}
}
return (
(t.Client = a),
(t.Location = r),
(t.Store = s),
(t.Stronghold = i),
(t.Vault = o),
t
)
})({})
Object.defineProperty(window.__TAURI__, 'stronghold', {
value: __TAURI_PLUGIN_STRONGHOLD__
})
}

@ -264,7 +264,9 @@ class ProcedureExecutor {
* *
* @since 2.1.0 * @since 2.1.0
*/ */
async getSecp256k1EcdsaPublicKey(privateKeyLocation: Location): Promise<Uint8Array> { async getSecp256k1EcdsaPublicKey(
privateKeyLocation: Location
): Promise<Uint8Array> {
return await invoke<number[]>('plugin:stronghold|execute_procedure', { return await invoke<number[]>('plugin:stronghold|execute_procedure', {
...this.procedureArgs, ...this.procedureArgs,
procedure: { procedure: {
@ -284,7 +286,9 @@ class ProcedureExecutor {
* *
* @since 2.1.0 * @since 2.1.0
*/ */
async getSecp256k1EcdsaEvmAddress(privateKeyLocation: Location): Promise<Uint8Array> { async getSecp256k1EcdsaEvmAddress(
privateKeyLocation: Location
): Promise<Uint8Array> {
return await invoke<number[]>('plugin:stronghold|execute_procedure', { return await invoke<number[]>('plugin:stronghold|execute_procedure', {
...this.procedureArgs, ...this.procedureArgs,
procedure: { procedure: {

@ -7,8 +7,6 @@ operations are available from the stronghold plugin.
All non-destructive operations are enabled by default. All non-destructive operations are enabled by default.
#### This default permission set includes the following: #### This default permission set includes the following:
- `allow-create-client` - `allow-create-client`
@ -28,7 +26,6 @@ All non-destructive operations are enabled by default.
<th>Description</th> <th>Description</th>
</tr> </tr>
<tr> <tr>
<td> <td>

@ -35,25 +35,17 @@
"DefaultPermission": { "DefaultPermission": {
"description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.", "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
"type": "object", "type": "object",
"required": [ "required": ["permissions"],
"permissions"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
"type": [ "type": ["integer", "null"],
"integer",
"null"
],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1.0
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does. Tauri convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
"type": [ "type": ["string", "null"]
"string",
"null"
]
}, },
"permissions": { "permissions": {
"description": "All permissions this set contains.", "description": "All permissions this set contains.",
@ -67,11 +59,7 @@
"PermissionSet": { "PermissionSet": {
"description": "A set of direct permissions grouped together under a new name.", "description": "A set of direct permissions grouped together under a new name.",
"type": "object", "type": "object",
"required": [ "required": ["description", "identifier", "permissions"],
"description",
"identifier",
"permissions"
],
"properties": { "properties": {
"identifier": { "identifier": {
"description": "A unique identifier for the permission.", "description": "A unique identifier for the permission.",
@ -93,16 +81,11 @@
"Permission": { "Permission": {
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.", "description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
"type": "object", "type": "object",
"required": [ "required": ["identifier"],
"identifier"
],
"properties": { "properties": {
"version": { "version": {
"description": "The version of the permission.", "description": "The version of the permission.",
"type": [ "type": ["integer", "null"],
"integer",
"null"
],
"format": "uint64", "format": "uint64",
"minimum": 1.0 "minimum": 1.0
}, },
@ -112,10 +95,7 @@
}, },
"description": { "description": {
"description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.", "description": "Human-readable description of what the permission does. Tauri internal convention is to use `<h4>` headings in markdown content for Tauri documentation generation purposes.",
"type": [ "type": ["string", "null"]
"string",
"null"
]
}, },
"commands": { "commands": {
"description": "Allowed or denied commands when using this permission.", "description": "Allowed or denied commands when using this permission.",
@ -139,10 +119,7 @@
}, },
"platforms": { "platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.", "description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"type": [ "type": ["array", "null"],
"array",
"null"
],
"items": { "items": {
"$ref": "#/definitions/Target" "$ref": "#/definitions/Target"
} }
@ -177,20 +154,14 @@
"properties": { "properties": {
"allow": { "allow": {
"description": "Data that defines what is allowed by the scope.", "description": "Data that defines what is allowed by the scope.",
"type": [ "type": ["array", "null"],
"array",
"null"
],
"items": { "items": {
"$ref": "#/definitions/Value" "$ref": "#/definitions/Value"
} }
}, },
"deny": { "deny": {
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.", "description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
"type": [ "type": ["array", "null"],
"array",
"null"
],
"items": { "items": {
"$ref": "#/definitions/Value" "$ref": "#/definitions/Value"
} }
@ -257,37 +228,27 @@
{ {
"description": "MacOS.", "description": "MacOS.",
"type": "string", "type": "string",
"enum": [ "enum": ["macOS"]
"macOS"
]
}, },
{ {
"description": "Windows.", "description": "Windows.",
"type": "string", "type": "string",
"enum": [ "enum": ["windows"]
"windows"
]
}, },
{ {
"description": "Linux.", "description": "Linux.",
"type": "string", "type": "string",
"enum": [ "enum": ["linux"]
"linux"
]
}, },
{ {
"description": "Android.", "description": "Android.",
"type": "string", "type": "string",
"enum": [ "enum": ["android"]
"android"
]
}, },
{ {
"description": "iOS.", "description": "iOS.",
"type": "string", "type": "string",
"enum": [ "enum": ["iOS"]
"iOS"
]
} }
] ]
}, },

Loading…
Cancel
Save