@isdk/tool-electron 1.0.0

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.
@@ -0,0 +1,55 @@
1
+ [**@isdk/tool-electron**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/tool-electron](../globals.md) / ServerPubSubIpcMain
6
+
7
+ # Type Alias: ServerPubSubIpcMain
8
+
9
+ > **ServerPubSubIpcMain** = `object`
10
+
11
+ Defined in: [tool-electron/src/types.ts:53](https://github.com/isdk/ai-tool-electron.js/blob/7342c9cf7d483faaa9613fa3cacb08c7e4c19c6f/src/types.ts#L53)
12
+
13
+ Main-side Pub/Sub bridge.
14
+ Injected into import('./pubsub/electron-server').ElectronServerPubSubTransport
15
+ to register `ipcMain.on` listeners and clean them up via a custom object.
16
+
17
+ ## Methods
18
+
19
+ ### on()
20
+
21
+ > **on**(`channel`, `listener`): `void`
22
+
23
+ Defined in: [tool-electron/src/types.ts:54](https://github.com/isdk/ai-tool-electron.js/blob/7342c9cf7d483faaa9613fa3cacb08c7e4c19c6f/src/types.ts#L54)
24
+
25
+ #### Parameters
26
+
27
+ ##### channel
28
+
29
+ `string`
30
+
31
+ ##### listener
32
+
33
+ (...`args`) => `void`
34
+
35
+ #### Returns
36
+
37
+ `void`
38
+
39
+ ***
40
+
41
+ ### removeAllListeners()
42
+
43
+ > **removeAllListeners**(`channel?`): `void`
44
+
45
+ Defined in: [tool-electron/src/types.ts:55](https://github.com/isdk/ai-tool-electron.js/blob/7342c9cf7d483faaa9613fa3cacb08c7e4c19c6f/src/types.ts#L55)
46
+
47
+ #### Parameters
48
+
49
+ ##### channel?
50
+
51
+ `string`
52
+
53
+ #### Returns
54
+
55
+ `void`
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@isdk/tool-electron",
3
+ "version": "1.0.0",
4
+ "author": "Riceball LEE <snowyu.lee@gmail.com>",
5
+ "homepage": "https://github.com/isdk/tool-electron.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git://github.com/isdk/tool-electron.js.git"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.mjs",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "require": "./dist/index.js",
16
+ "import": "./dist/index.mjs"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "@isdk/common-error": "^*",
21
+ "@isdk/tool-event": "1.0.0",
22
+ "@isdk/tool-func": "1.0.0",
23
+ "@isdk/tool-rpc": "1.0.0"
24
+ },
25
+ "peerDependencies": {
26
+ "electron": "*"
27
+ },
28
+ "devDependencies": {
29
+ "@antfu/eslint-config": "^4.10.1",
30
+ "@huggingface/hub": "^0.15.2",
31
+ "@isdk/util": "^*",
32
+ "@types/better-sqlite3": "^7.6.13",
33
+ "@types/jest": "^29.5.14",
34
+ "@types/node": "^26.1.0",
35
+ "@typescript-eslint/eslint-plugin": "~8.41.0",
36
+ "electron": "^37.4.0",
37
+ "eslint": "^9.34.0",
38
+ "eslint-config-prettier": "^10.1.8",
39
+ "eslint-plugin-tsdoc": "^0.4.0",
40
+ "playwright": "^1.61.1",
41
+ "prettier": "^3.6.2",
42
+ "terser": "^5.44.0",
43
+ "tsup": "^8.5.0",
44
+ "tsx": "^4.20.5",
45
+ "typedoc": "^0.28.16",
46
+ "typedoc-plugin-markdown": "^4.8.1",
47
+ "typescript": "~5.7.3",
48
+ "vite": "^7.1.4",
49
+ "vitest": "^3.2.4",
50
+ "vitest-fetch-mock": "^0.4.5"
51
+ },
52
+ "files": [
53
+ "docs",
54
+ "dist"
55
+ ],
56
+ "keywords": [
57
+ "ipc",
58
+ "node",
59
+ "client",
60
+ "server",
61
+ "net"
62
+ ],
63
+ "maintainers": [
64
+ "Riceball LEE <snowyu.lee@gmail.com>"
65
+ ],
66
+ "engines": {
67
+ "node": ">=20.11.1"
68
+ },
69
+ "types": "./dist/index.d.ts",
70
+ "scripts": {
71
+ "build-fast": "tsup",
72
+ "build": "pnpm run build-fast --dts-resolve --dts && pnpm run doc:md",
73
+ "clean": "rm -fr web docs dist",
74
+ "doc": "typedoc --plugin none --out web",
75
+ "doc:md": "typedoc --plugin typedoc-plugin-markdown --out docs",
76
+ "style": "pnpm run format -c && pnpm run lint",
77
+ "style:fix": "pnpm run format:fix && npm run lint:fix",
78
+ "format": "prettier \"**/*.{ts,tsx,js,jsx,css,scss,sass,less,md}\"",
79
+ "format:fix": "pnpm run format --write",
80
+ "lint": "eslint .",
81
+ "lint:fix": "pnpm run lint --fix",
82
+ "test": "vitest run",
83
+ "test:integration": "pnpm run build-fast && vitest run --config vite.integration.config.mjs",
84
+ "test:all": "pnpm run build-fast && vitest run && vitest run --config vite.integration.config.mjs",
85
+ "release": "pnpm run clean && pnpm run build && git add -f docs && git ci -m 'docs: update API docs' && pnpm dlx commit-and-tag-version -s",
86
+ "release.alpha": "pnpm run release -- --prerelease alpha"
87
+ }
88
+ }