@wailsnet/plugin-file-association 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,12 @@
1
+ /**
2
+ * file-association 插件前端 API(命令前缀 `fileassociation.*`)。
3
+ * 对应后端 Wails.Net.Plugins.Fileassociation.FileAssociationPlugin 注册的命令。
4
+ */
5
+ export declare const fileAssociation: {
6
+ /** 注册指定的文件扩展名到操作系统(对应 `fileassociation.register`)。 */
7
+ register: (extension: string) => import("@wailsnet/runtime").CancellablePromise<void>;
8
+ /** 注销指定的文件扩展名(对应 `fileassociation.unregister`)。 */
9
+ unregister: (extension: string) => import("@wailsnet/runtime").CancellablePromise<void>;
10
+ /** 获取当前已注册的文件扩展名列表(对应 `fileassociation.getRegistered`)。 */
11
+ getRegistered: () => import("@wailsnet/runtime").CancellablePromise<string[]>;
12
+ };
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @wailsnet/plugin-file-association — file-association 插件前端封装。
3
+ * 命令前缀 `fileassociation.*`(M3 runtime 变薄:从 @wailsnet/runtime 迁移至此,按需安装)。
4
+ * @platform windows,linux,macos,android 全平台通用插件。
5
+ */
6
+ import { call } from "@wailsnet/runtime";
7
+ /**
8
+ * file-association 插件前端 API(命令前缀 `fileassociation.*`)。
9
+ * 对应后端 Wails.Net.Plugins.Fileassociation.FileAssociationPlugin 注册的命令。
10
+ */
11
+ export const fileAssociation = {
12
+ /** 注册指定的文件扩展名到操作系统(对应 `fileassociation.register`)。 */
13
+ register: (extension) => call("fileassociation.register", [extension]),
14
+ /** 注销指定的文件扩展名(对应 `fileassociation.unregister`)。 */
15
+ unregister: (extension) => call("fileassociation.unregister", [extension]),
16
+ /** 获取当前已注册的文件扩展名列表(对应 `fileassociation.getRegistered`)。 */
17
+ getRegistered: () => call("fileassociation.getRegistered", []),
18
+ };
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@wailsnet/plugin-file-association",
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-file-association"
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.