From e6ebf03abd6382f436c64d78a739d13c9d1741b2 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Wed, 15 Nov 2023 13:00:04 +0000 Subject: [PATCH] fix(updater): Use escaped installer path to start the nsis updater (#727) Port of v1 change: https://github.com/tauri-apps/tauri/pull/7956 Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/6877612128 Co-authored-by: amrbashir --- dist-js/index.cjs | 42 +++++++++++++++++ dist-js/{index.mjs => index.js} | 1 - dist-js/index.min.js | 80 --------------------------------- dist-js/index.min.js.map | 1 - dist-js/index.mjs.map | 1 - package.json | 11 +---- rollup.config.js | 7 +++ rollup.config.mjs | 11 ----- src/api-iife.js | 2 +- 9 files changed, 52 insertions(+), 104 deletions(-) create mode 100644 dist-js/index.cjs rename dist-js/{index.mjs => index.js} (97%) delete mode 100644 dist-js/index.min.js delete mode 100644 dist-js/index.min.js.map delete mode 100644 dist-js/index.mjs.map create mode 100644 rollup.config.js delete mode 100644 rollup.config.mjs diff --git a/dist-js/index.cjs b/dist-js/index.cjs new file mode 100644 index 0000000..b621cc6 --- /dev/null +++ b/dist-js/index.cjs @@ -0,0 +1,42 @@ +'use strict'; + +var primitives = require('@tauri-apps/api/primitives'); + +// Copyright 2021 Jonas Kruckenberg +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT +/** + * Well known window positions. + */ +exports.Position = void 0; +(function (Position) { + Position[Position["TopLeft"] = 0] = "TopLeft"; + Position[Position["TopRight"] = 1] = "TopRight"; + Position[Position["BottomLeft"] = 2] = "BottomLeft"; + Position[Position["BottomRight"] = 3] = "BottomRight"; + Position[Position["TopCenter"] = 4] = "TopCenter"; + Position[Position["BottomCenter"] = 5] = "BottomCenter"; + Position[Position["LeftCenter"] = 6] = "LeftCenter"; + Position[Position["RightCenter"] = 7] = "RightCenter"; + Position[Position["Center"] = 8] = "Center"; + Position[Position["TrayLeft"] = 9] = "TrayLeft"; + Position[Position["TrayBottomLeft"] = 10] = "TrayBottomLeft"; + Position[Position["TrayRight"] = 11] = "TrayRight"; + Position[Position["TrayBottomRight"] = 12] = "TrayBottomRight"; + Position[Position["TrayCenter"] = 13] = "TrayCenter"; + Position[Position["TrayBottomCenter"] = 14] = "TrayBottomCenter"; +})(exports.Position || (exports.Position = {})); +/** + * Moves the `Window` to the given {@link Position} using `WindowExt.move_window()` + * All positions are relative to the **current** screen. + * + * @param to The {@link Position} to move to. + */ +async function moveWindow(to) { + await primitives.invoke("plugin:positioner|move_window", { + position: to, + }); +} + +exports.moveWindow = moveWindow; diff --git a/dist-js/index.mjs b/dist-js/index.js similarity index 97% rename from dist-js/index.mjs rename to dist-js/index.js index 58b071a..3bda7d8 100644 --- a/dist-js/index.mjs +++ b/dist-js/index.js @@ -38,4 +38,3 @@ async function moveWindow(to) { } export { Position, moveWindow }; -//# sourceMappingURL=index.mjs.map diff --git a/dist-js/index.min.js b/dist-js/index.min.js deleted file mode 100644 index 063c522..0000000 --- a/dist-js/index.min.js +++ /dev/null @@ -1,80 +0,0 @@ -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -/** - * Sends a message to the backend. - * @example - * ```typescript - * import { invoke } from '@tauri-apps/api/primitives'; - * await invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' }); - * ``` - * - * @param cmd The command name. - * @param args The optional arguments to pass to the command. - * @param options The request options. - * @return A promise resolving or rejecting to the backend response. - * - * @since 1.0.0 - */ -async function invoke(cmd, args = {}, options) { - return window.__TAURI_INTERNALS__.invoke(cmd, args, options); -} - -// Copyright 2021 Jonas Kruckenberg -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT -/** - * Well known window positions. - */ -var Position; -(function (Position) { - Position[Position["TopLeft"] = 0] = "TopLeft"; - Position[Position["TopRight"] = 1] = "TopRight"; - Position[Position["BottomLeft"] = 2] = "BottomLeft"; - Position[Position["BottomRight"] = 3] = "BottomRight"; - Position[Position["TopCenter"] = 4] = "TopCenter"; - Position[Position["BottomCenter"] = 5] = "BottomCenter"; - Position[Position["LeftCenter"] = 6] = "LeftCenter"; - Position[Position["RightCenter"] = 7] = "RightCenter"; - Position[Position["Center"] = 8] = "Center"; - Position[Position["TrayLeft"] = 9] = "TrayLeft"; - Position[Position["TrayBottomLeft"] = 10] = "TrayBottomLeft"; - Position[Position["TrayRight"] = 11] = "TrayRight"; - Position[Position["TrayBottomRight"] = 12] = "TrayBottomRight"; - Position[Position["TrayCenter"] = 13] = "TrayCenter"; - Position[Position["TrayBottomCenter"] = 14] = "TrayBottomCenter"; -})(Position || (Position = {})); -/** - * Moves the `Window` to the given {@link Position} using `WindowExt.move_window()` - * All positions are relative to the **current** screen. - * - * @param to The {@link Position} to move to. - */ -async function moveWindow(to) { - await invoke("plugin:positioner|move_window", { - position: to, - }); -} - -export { Position, moveWindow }; -//# sourceMappingURL=index.min.js.map diff --git a/dist-js/index.min.js.map b/dist-js/index.min.js.map deleted file mode 100644 index 4eba14e..0000000 --- a/dist-js/index.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.min.js","sources":["../../../node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.11/node_modules/@tauri-apps/api/external/tslib/tslib.es6.js","../../../node_modules/.pnpm/@tauri-apps+api@2.0.0-alpha.11/node_modules/@tauri-apps/api/primitives.js","../guest-js/index.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nfunction __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nexport { __classPrivateFieldGet, __classPrivateFieldSet };\n","import { __classPrivateFieldGet, __classPrivateFieldSet } from './external/tslib/tslib.es6.js';\n\n// Copyright 2019-2023 Tauri Programme within The Commons Conservancy\n// SPDX-License-Identifier: Apache-2.0\n// SPDX-License-Identifier: MIT\nvar _Channel_onmessage;\n/**\n * Invoke your custom commands.\n *\n * This package is also accessible with `window.__TAURI__.tauri` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.\n * @module\n */\n/**\n * Transforms a callback function to a string identifier that can be passed to the backend.\n * The backend uses the identifier to `eval()` the callback.\n *\n * @return A unique identifier associated with the callback function.\n *\n * @since 1.0.0\n */\nfunction transformCallback(callback, once = false) {\n return window.__TAURI_INTERNALS__.transformCallback(callback, once);\n}\nclass Channel {\n constructor() {\n // @ts-expect-error field used by the IPC serializer\n this.__TAURI_CHANNEL_MARKER__ = true;\n _Channel_onmessage.set(this, () => {\n // no-op\n });\n this.id = transformCallback((response) => {\n __classPrivateFieldGet(this, _Channel_onmessage, \"f\").call(this, response);\n });\n }\n set onmessage(handler) {\n __classPrivateFieldSet(this, _Channel_onmessage, handler, \"f\");\n }\n get onmessage() {\n return __classPrivateFieldGet(this, _Channel_onmessage, \"f\");\n }\n toJSON() {\n return `__CHANNEL__:${this.id}`;\n }\n}\n_Channel_onmessage = new WeakMap();\nclass PluginListener {\n constructor(plugin, event, channelId) {\n this.plugin = plugin;\n this.event = event;\n this.channelId = channelId;\n }\n async unregister() {\n return invoke(`plugin:${this.plugin}|remove_listener`, {\n event: this.event,\n channelId: this.channelId\n });\n }\n}\n/**\n * Adds a listener to a plugin event.\n *\n * @returns The listener object to stop listening to the events.\n *\n * @since 2.0.0\n */\nasync function addPluginListener(plugin, event, cb) {\n const handler = new Channel();\n handler.onmessage = cb;\n return invoke(`plugin:${plugin}|register_listener`, { event, handler }).then(() => new PluginListener(plugin, event, handler.id));\n}\n/**\n * Sends a message to the backend.\n * @example\n * ```typescript\n * import { invoke } from '@tauri-apps/api/primitives';\n * await invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n * ```\n *\n * @param cmd The command name.\n * @param args The optional arguments to pass to the command.\n * @param options The request options.\n * @return A promise resolving or rejecting to the backend response.\n *\n * @since 1.0.0\n */\nasync function invoke(cmd, args = {}, options) {\n return window.__TAURI_INTERNALS__.invoke(cmd, args, options);\n}\n/**\n * Convert a device file path to an URL that can be loaded by the webview.\n * Note that `asset:` and `http://asset.localhost` must be added to [`tauri.security.csp`](https://tauri.app/v1/api/config/#securityconfig.csp) in `tauri.conf.json`.\n * Example CSP value: `\"csp\": \"default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost\"` to use the asset protocol on image sources.\n *\n * Additionally, `asset` must be added to [`tauri.allowlist.protocol`](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\n * in `tauri.conf.json` and its access scope must be defined on the `assetScope` array on the same `protocol` object.\n *\n * @param filePath The file path.\n * @param protocol The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol.\n * @example\n * ```typescript\n * import { appDataDir, join } from '@tauri-apps/api/path';\n * import { convertFileSrc } from '@tauri-apps/api/primitives';\n * const appDataDirPath = await appDataDir();\n * const filePath = await join(appDataDirPath, 'assets/video.mp4');\n * const assetUrl = convertFileSrc(filePath);\n *\n * const video = document.getElementById('my-video');\n * const source = document.createElement('source');\n * source.type = 'video/mp4';\n * source.src = assetUrl;\n * video.appendChild(source);\n * video.load();\n * ```\n *\n * @return the URL that can be used as source on the webview.\n *\n * @since 1.0.0\n */\nfunction convertFileSrc(filePath, protocol = 'asset') {\n return window.__TAURI_INTERNALS__.convertFileSrc(filePath, protocol);\n}\n\nexport { Channel, PluginListener, addPluginListener, convertFileSrc, invoke, transformCallback };\n",null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AACA,OAAO,eAAe,KAAK,UAAU,GAAG,eAAe,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE;AAChG,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,CAAC,IAAI,GAAG,iBAAiB,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,UAAU,GAAG,UAAU,EAAE,CAAC,CAAC;AACrF,CAAC;;ACqCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,OAAO,EAAE;AAC/C,IAAI,OAAO,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AACjE;;ACvFA;AACA;AACA;AACA;AAIA;;AAEG;IACS,SAgBX;AAhBD,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,QAAA,CAAA,QAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY,CAAA;AACZ,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,QAAA,CAAA,QAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,QAAA,CAAA,QAAA,CAAA,gBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,gBAAc,CAAA;AACd,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,EAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,QAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAe,CAAA;AACf,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,EAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,kBAAgB,CAAA;AAClB,CAAC,EAhBW,QAAQ,KAAR,QAAQ,GAgBnB,EAAA,CAAA,CAAA,CAAA;AAED;;;;;AAKG;AACI,eAAe,UAAU,CAAC,EAAY,EAAA;IAC3C,MAAM,MAAM,CAAC,+BAA+B,EAAE;AAC5C,QAAA,QAAQ,EAAE,EAAE;AACb,KAAA,CAAC,CAAC;AACL;;;;","x_google_ignoreList":[0,1]} \ No newline at end of file diff --git a/dist-js/index.mjs.map b/dist-js/index.mjs.map deleted file mode 100644 index d1780a1..0000000 --- a/dist-js/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["../guest-js/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AAIA;;AAEG;IACS,SAgBX;AAhBD,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,QAAA,CAAA,QAAA,CAAA,cAAA,CAAA,GAAA,CAAA,CAAA,GAAA,cAAY,CAAA;AACZ,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAW,CAAA;AACX,IAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,QAAA,CAAA,QAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,QAAA,CAAA,QAAA,CAAA,gBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,gBAAc,CAAA;AACd,IAAA,QAAA,CAAA,QAAA,CAAA,WAAA,CAAA,GAAA,EAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,QAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAe,CAAA;AACf,IAAA,QAAA,CAAA,QAAA,CAAA,YAAA,CAAA,GAAA,EAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,QAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,kBAAgB,CAAA;AAClB,CAAC,EAhBW,QAAQ,KAAR,QAAQ,GAgBnB,EAAA,CAAA,CAAA,CAAA;AAED;;;;;AAKG;AACI,eAAe,UAAU,CAAC,EAAY,EAAA;IAC3C,MAAM,MAAM,CAAC,+BAA+B,EAAE;AAC5C,QAAA,QAAQ,EAAE,EAAE;AACb,KAAA,CAAC,CAAC;AACL;;;;"} \ No newline at end of file diff --git a/package.json b/package.json index 6bee2fb..1894cc8 100644 --- a/package.json +++ b/package.json @@ -7,26 +7,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" } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..977dfac --- /dev/null +++ b/rollup.config.js @@ -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(); diff --git a/rollup.config.mjs b/rollup.config.mjs deleted file mode 100644 index 99a3dd3..0000000 --- a/rollup.config.mjs +++ /dev/null @@ -1,11 +0,0 @@ -import { readFileSync } from "fs"; - -import { createConfig } from "../../shared/rollup.config.mjs"; - -export default createConfig({ - input: "guest-js/index.ts", - pkg: JSON.parse( - readFileSync(new URL("./package.json", import.meta.url), "utf8"), - ), - external: [/^@tauri-apps\/api/], -}); diff --git a/src/api-iife.js b/src/api-iife.js index fad6fc2..d0c8ba6 100644 --- a/src/api-iife.js +++ b/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_POSITIONER__=function(t){"use strict";var o;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(o=t.Position||(t.Position={}))[o.TopLeft=0]="TopLeft",o[o.TopRight=1]="TopRight",o[o.BottomLeft=2]="BottomLeft",o[o.BottomRight=3]="BottomRight",o[o.TopCenter=4]="TopCenter",o[o.BottomCenter=5]="BottomCenter",o[o.LeftCenter=6]="LeftCenter",o[o.RightCenter=7]="RightCenter",o[o.Center=8]="Center",o[o.TrayLeft=9]="TrayLeft",o[o.TrayBottomLeft=10]="TrayBottomLeft",o[o.TrayRight=11]="TrayRight",o[o.TrayBottomRight=12]="TrayBottomRight",o[o.TrayCenter=13]="TrayCenter",o[o.TrayBottomCenter=14]="TrayBottomCenter",t.moveWindow=async function(t){await async function(t,o={},e){return window.__TAURI_INTERNALS__.invoke(t,o,e)}("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_POSITIONER__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_POSITIONER__=function(t){"use strict";var o;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(o=t.Position||(t.Position={}))[o.TopLeft=0]="TopLeft",o[o.TopRight=1]="TopRight",o[o.BottomLeft=2]="BottomLeft",o[o.BottomRight=3]="BottomRight",o[o.TopCenter=4]="TopCenter",o[o.BottomCenter=5]="BottomCenter",o[o.LeftCenter=6]="LeftCenter",o[o.RightCenter=7]="RightCenter",o[o.Center=8]="Center",o[o.TrayLeft=9]="TrayLeft",o[o.TrayBottomLeft=10]="TrayBottomLeft",o[o.TrayRight=11]="TrayRight",o[o.TrayBottomRight=12]="TrayBottomRight",o[o.TrayCenter=13]="TrayCenter",o[o.TrayBottomCenter=14]="TrayBottomCenter",t.moveWindow=async function(t){await async function(t,o={},e){return window.__TAURI_INTERNALS__.invoke(t,o,e)}("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_PLUGIN_POSITIONER__})}