tauri-plugin-serialplugin-api 2.18.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.
- package/LICENSE.spdx +20 -0
- package/README.md +1678 -0
- package/dist-js/auto-reconnect-manager.d.ts +69 -0
- package/dist-js/index.cjs +1114 -0
- package/dist-js/index.d.ts +372 -0
- package/dist-js/index.js +1112 -0
- package/dist-js/listener-manager.d.ts +34 -0
- package/package.json +55 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { UnlistenFn } from '@tauri-apps/api/event';
|
|
2
|
+
export declare class ListenerManager {
|
|
3
|
+
private listeners;
|
|
4
|
+
private listenerIdCounter;
|
|
5
|
+
add(type: 'data' | 'disconnect', unlisten: UnlistenFn): UnlistenFn;
|
|
6
|
+
set(id: string, listener: {
|
|
7
|
+
unlisten: UnlistenFn;
|
|
8
|
+
type: 'data' | 'disconnect';
|
|
9
|
+
}): UnlistenFn;
|
|
10
|
+
delete(id: string): void;
|
|
11
|
+
entries(): MapIterator<[string, {
|
|
12
|
+
unlisten: UnlistenFn;
|
|
13
|
+
type: "data" | "disconnect";
|
|
14
|
+
}]>;
|
|
15
|
+
filterByType(type: 'data' | 'disconnect'): [string, {
|
|
16
|
+
unlisten: UnlistenFn;
|
|
17
|
+
type: "data" | "disconnect";
|
|
18
|
+
}][];
|
|
19
|
+
all(): [string, {
|
|
20
|
+
unlisten: UnlistenFn;
|
|
21
|
+
type: "data" | "disconnect";
|
|
22
|
+
}][];
|
|
23
|
+
clear(): void;
|
|
24
|
+
getInfo(): {
|
|
25
|
+
total: number;
|
|
26
|
+
data: number;
|
|
27
|
+
disconnect: number;
|
|
28
|
+
ids: string[];
|
|
29
|
+
};
|
|
30
|
+
get(id: string): {
|
|
31
|
+
unlisten: UnlistenFn;
|
|
32
|
+
type: "data" | "disconnect";
|
|
33
|
+
} | undefined;
|
|
34
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tauri-plugin-serialplugin-api",
|
|
3
|
+
"version": "2.18.0",
|
|
4
|
+
"license": "MIT or APACHE-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"types": "./dist-js/index.d.ts",
|
|
7
|
+
"main": "./dist-js/index.cjs",
|
|
8
|
+
"module": "./dist-js/index.js",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/s00d/tauri-plugin-serialplugin.git"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
"types": "./dist-js/index.d.ts",
|
|
15
|
+
"import": "./dist-js/index.js",
|
|
16
|
+
"require": "./dist-js/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist-js",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@tauri-apps/api": ">=2.0.0-beta.6"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@rollup/plugin-node-resolve": "15.3.1",
|
|
28
|
+
"@rollup/plugin-terser": "0.4.4",
|
|
29
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
30
|
+
"@types/jest": "^29.5.12",
|
|
31
|
+
"@types/node": "^20.17.22",
|
|
32
|
+
"jest": "^29.7.0",
|
|
33
|
+
"jest-environment-jsdom": "^30.0.2",
|
|
34
|
+
"jest-junit": "^16.0.0",
|
|
35
|
+
"jsdom": "^26.1.0",
|
|
36
|
+
"rollup": "4.34.9",
|
|
37
|
+
"standard-version": "^9.5.0",
|
|
38
|
+
"ts-jest": "^29.1.2",
|
|
39
|
+
"tslib": "^2.8.1",
|
|
40
|
+
"typescript": "5.6.3"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "rollup -c",
|
|
44
|
+
"tauri": "tauri",
|
|
45
|
+
"dev": "vite dev",
|
|
46
|
+
"preview": "vite preview",
|
|
47
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
48
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
49
|
+
"release": "standard-version",
|
|
50
|
+
"release:publish": "pnpm publish && cargo publish",
|
|
51
|
+
"playground": "pnpm --dir examples/serialport-test run tauri dev",
|
|
52
|
+
"test": "jest --config jest.config.js",
|
|
53
|
+
"test:watch": "jest --config jest.config.js --watch"
|
|
54
|
+
}
|
|
55
|
+
}
|