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 <[email protected]>
  • Loading branch information
2 people authored and tauri-bot committed Nov 15, 2023
1 parent 1416969 commit 942aa06
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 114 deletions.
51 changes: 51 additions & 0 deletions dist-js/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'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
/**
* Read and write to the system clipboard.
*
* @module
*/
/**
* Writes plain text to the clipboard.
* @example
* ```typescript
* import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';
* await writeText('Tauri is awesome!');
* assert(await readText(), 'Tauri is awesome!');
* ```
*
* @returns A promise indicating the success or failure of the operation.
*
* @since 2.0.0
*/
async function writeText(text, opts) {
return primitives.invoke("plugin:clipboard|write", {
data: {
plainText: {
label: opts?.label,
text,
},
},
});
}
/**
* Gets the clipboard content as plain text.
* @example
* ```typescript
* import { readText } from '@tauri-apps/plugin-clipboard-manager';
* const clipboardText = await readText();
* ```
* @since 2.0.0
*/
async function readText() {
const kind = await primitives.invoke("plugin:clipboard|read");
return kind.plainText.text;
}

exports.readText = readText;
exports.writeText = writeText;
3 changes: 1 addition & 2 deletions dist-js/index.mjs → dist-js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function writeText(text, opts) {
return invoke("plugin:clipboard|write", {
data: {
plainText: {
label: opts === null || opts === void 0 ? void 0 : opts.label,
label: opts?.label,
text,
},
},
Expand All @@ -46,4 +46,3 @@ async function readText() {
}

export { readText, writeText };
//# sourceMappingURL=index.mjs.map
88 changes: 0 additions & 88 deletions dist-js/index.min.js

This file was deleted.

1 change: 0 additions & 1 deletion dist-js/index.min.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist-js/index.mjs.map

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/tslib

This file was deleted.

11 changes: 2 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,19 @@
"Tauri Programme within The Commons Conservancy"
],
"type": "module",
"browser": "dist-js/index.min.js",
"module": "dist-js/index.mjs",
"types": "dist-js/index.d.ts",
"exports": {
"import": "./dist-js/index.mjs",
"types": "./dist-js/index.d.ts",
"browser": "./dist-js/index.min.js"
"import": "./dist-js/index.js",
"require": "./dist-js/index.cjs"
},
"scripts": {
"build": "rollup -c"
},
"files": [
"dist-js",
"!dist-js/**/*.map",
"README.md",
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.2"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"
}
Expand Down
7 changes: 7 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

import { createConfig } from "../../shared/rollup.config.js";

export default createConfig();
11 changes: 0 additions & 11 deletions rollup.config.mjs

This file was deleted.

2 changes: 1 addition & 1 deletion src/api-iife.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 942aa06

Please sign in to comment.