@wailsnet/plugin-process 0.0.0-stage → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Wails.Net Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * process 插件前端 API(命令前缀 `process.*`)。
3
+ * 对应后端 Wails.Net.Plugins.Process.ProcessPlugin 注册的命令。
4
+ */
5
+ export declare const process: {
6
+ /** 退出应用进程(exitCode 为退出码)。 */
7
+ exit: (exitCode: number) => import("@wailsnet/runtime").CancellablePromise<void>;
8
+ /** 重启应用:以当前进程路径和参数启动新进程后退出当前进程。 */
9
+ restart: () => import("@wailsnet/runtime").CancellablePromise<void>;
10
+ /** 重新启动应用(与 restart 等价)。 */
11
+ relaunch: () => import("@wailsnet/runtime").CancellablePromise<void>;
12
+ /** 获取当前进程 ID。 */
13
+ getPid: () => import("@wailsnet/runtime").CancellablePromise<number>;
14
+ };
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @wailsnet/plugin-process — process 插件前端封装。
3
+ * 命令前缀 `process.*`(M3 runtime 变薄:从 @wailsnet/runtime 迁移至此,按需安装)。
4
+ * @platform windows,linux,macos,android 全平台通用插件。
5
+ */
6
+ import { call } from "@wailsnet/runtime";
7
+ /**
8
+ * process 插件前端 API(命令前缀 `process.*`)。
9
+ * 对应后端 Wails.Net.Plugins.Process.ProcessPlugin 注册的命令。
10
+ */
11
+ export const process = {
12
+ /** 退出应用进程(exitCode 为退出码)。 */
13
+ exit: (exitCode) => call("process.exit", [exitCode]),
14
+ /** 重启应用:以当前进程路径和参数启动新进程后退出当前进程。 */
15
+ restart: () => call("process.restart", []),
16
+ /** 重新启动应用(与 restart 等价)。 */
17
+ relaunch: () => call("process.relaunch", []),
18
+ /** 获取当前进程 ID。 */
19
+ getPid: () => call("process.getPid", []),
20
+ };
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@wailsnet/plugin-process",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-alpha.2",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ },
12
+ "./package.json": "./package.json"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "@wailsnet/runtime": "0.1.0-alpha.2"
19
+ },
20
+ "devDependencies": {
21
+ "typescript": "^5.9.3"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "registry": "https://registry.npmjs.org"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/lytree/Wails.Net.git",
30
+ "directory": "packages/wails-net-plugin-process"
31
+ },
32
+ "scripts": {
33
+ "build": "tsc -p tsconfig.json",
34
+ "typecheck": "tsc --noEmit"
35
+ }
6
36
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.