Skip to content

Commit

Permalink
fix(updater): Use escaped installer path to start the nsis updater (#…
Browse files Browse the repository at this point in the history
…727)

Port of v1 change: tauri-apps/tauri#7956

Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/6877612128

Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
  • Loading branch information
2 people authored and tauri-bot committed Nov 15, 2023
1 parent 137d334 commit a5c6c49
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 229 deletions.
114 changes: 114 additions & 0 deletions dist-js/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
'use strict';

var primitives = require('@tauri-apps/api/primitives');

// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
/**
* Register global shortcuts.
*
* @module
*/
/**
* Register a global shortcut.
* @example
* ```typescript
* import { register } from '@tauri-apps/plugin-global-shortcut';
* await register('CommandOrControl+Shift+C', () => {
* console.log('Shortcut triggered');
* });
* ```
*
* @param shortcut Shortcut definition, modifiers and key separated by "+" e.g. CmdOrControl+Q
* @param handler Shortcut handler callback - takes the triggered shortcut as argument
*
* @since 2.0.0
*/
async function register(shortcut, handler) {
const h = new primitives.Channel();
h.onmessage = handler;
return await primitives.invoke("plugin:globalShortcut|register", {
shortcut,
handler: h,
});
}
/**
* Register a collection of global shortcuts.
* @example
* ```typescript
* import { registerAll } from '@tauri-apps/plugin-global-shortcut';
* await registerAll(['CommandOrControl+Shift+C', 'Ctrl+Alt+F12'], (shortcut) => {
* console.log(`Shortcut ${shortcut} triggered`);
* });
* ```
*
* @param shortcuts Array of shortcut definitions, modifiers and key separated by "+" e.g. CmdOrControl+Q
* @param handler Shortcut handler callback - takes the triggered shortcut as argument
*
* @since 2.0.0
*/
async function registerAll(shortcuts, handler) {
const h = new primitives.Channel();
h.onmessage = handler;
return await primitives.invoke("plugin:globalShortcut|register_all", {
shortcuts,
handler: h,
});
}
/**
* Determines whether the given shortcut is registered by this application or not.
*
* If the shortcut is registered by another application, it will still return `false`.
*
* @example
* ```typescript
* import { isRegistered } from '@tauri-apps/plugin-global-shortcut';
* const isRegistered = await isRegistered('CommandOrControl+P');
* ```
*
* @param shortcut shortcut definition, modifiers and key separated by "+" e.g. CmdOrControl+Q
*
* @since 2.0.0
*/
async function isRegistered(shortcut) {
return await primitives.invoke("plugin:globalShortcut|is_registered", {
shortcut,
});
}
/**
* Unregister a global shortcut.
* @example
* ```typescript
* import { unregister } from '@tauri-apps/plugin-global-shortcut';
* await unregister('CmdOrControl+Space');
* ```
*
* @param shortcut shortcut definition, modifiers and key separated by "+" e.g. CmdOrControl+Q
*
* @since 2.0.0
*/
async function unregister(shortcut) {
return await primitives.invoke("plugin:globalShortcut|unregister", {
shortcut,
});
}
/**
* Unregisters all shortcuts registered by the application.
* @example
* ```typescript
* import { unregisterAll } from '@tauri-apps/plugin-global-shortcut';
* await unregisterAll();
* ```
*
* @since 2.0.0
*/
async function unregisterAll() {
return await primitives.invoke("plugin:globalShortcut|unregister_all");
}

exports.isRegistered = isRegistered;
exports.register = register;
exports.registerAll = registerAll;
exports.unregister = unregister;
exports.unregisterAll = unregisterAll;
1 change: 0 additions & 1 deletion dist-js/index.mjs → dist-js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ async function unregisterAll() {
}

export { isRegistered, register, registerAll, unregister, unregisterAll };
//# sourceMappingURL=index.mjs.map
204 changes: 0 additions & 204 deletions dist-js/index.min.js

This file was deleted.

Loading

0 comments on commit a5c6c49

Please sign in to comment.