dphelper 3.1.6 → 3.2.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/dphelper.umd.js +19 -30
- package/index.js +18 -28
- package/package.json +33 -41
- package/tools/security/interface.d.ts +4 -0
- package/tools/sync/interface.d.ts +2 -2
- package/types/dphelper.d.ts +6 -2
package/package.json
CHANGED
|
@@ -1,41 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dphelper",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
3
|
+
"version": "3.2.0",
|
|
4
|
+
"license": "MIT",
|
|
6
5
|
"browser": "./dist/dphelper.umd.js",
|
|
7
6
|
"description": "dphelper devtools for developers",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"types": "./types/dphelper.d.ts",
|
|
10
|
-
"typings": "./types/*",
|
|
11
|
-
"copyright": "Dario Passariello",
|
|
12
7
|
"homepage": "https://a51.gitbook.io/dphelper",
|
|
13
|
-
"
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./index.js",
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"typings": "./types/*",
|
|
14
12
|
"engines": {
|
|
15
13
|
"node": ">=18.0.0"
|
|
16
14
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"url": "https://github.com/passariello/",
|
|
20
|
-
"email": "dariopassariello@gmail.com"
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/a51-dev/a51.dphelper.public.git"
|
|
25
|
-
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/a51-dev/a51.dphelper.public/issues"
|
|
28
|
-
},
|
|
29
|
-
"contributors": [
|
|
30
|
-
{
|
|
31
|
-
"name": "Dario Passariello",
|
|
32
|
-
"email": "dariopassariello@gmail.com",
|
|
33
|
-
"url": "https://dario.passariello.ca/"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "Valeria Cala Scaglitta",
|
|
37
|
-
"email": "valeriacalascaglitta@gmail.com"
|
|
38
|
-
}
|
|
15
|
+
"files": [
|
|
16
|
+
"**/*"
|
|
39
17
|
],
|
|
40
18
|
"keywords": [
|
|
41
19
|
"dphelper",
|
|
@@ -61,22 +39,36 @@
|
|
|
61
39
|
"idb",
|
|
62
40
|
"devtool"
|
|
63
41
|
],
|
|
42
|
+
"copyright": "Dario Passariello",
|
|
43
|
+
"author": "Dario Passariello <dariopassariello@gmail.com>",
|
|
44
|
+
"contributors": [
|
|
45
|
+
{
|
|
46
|
+
"name": "Dario Passariello",
|
|
47
|
+
"email": "dariopassariello@gmail.com",
|
|
48
|
+
"url": "https://dario.passariello.ca/"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "Valeria Cala Scaglitta",
|
|
52
|
+
"email": "valeriacalascaglitta@gmail.com"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
64
55
|
"funding": [
|
|
65
56
|
{
|
|
66
57
|
"type": "patreon",
|
|
67
58
|
"url": "https://www.patreon.com/passariello"
|
|
68
59
|
}
|
|
69
60
|
],
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/a51-dev/a51.dphelper.public.git"
|
|
64
|
+
},
|
|
65
|
+
"bugs": {
|
|
66
|
+
"url": "https://github.com/a51-dev/a51.dphelper.public/issues"
|
|
67
|
+
},
|
|
68
|
+
"support": {
|
|
69
|
+
"name": "Dario Passariello",
|
|
70
|
+
"url": "https://github.com/passariello/",
|
|
71
|
+
"email": "dariopassariello@gmail.com"
|
|
80
72
|
},
|
|
81
73
|
"scripts": {
|
|
82
74
|
"build": "rimraf dist && npm run generate-imports && node esbuild.config.mjs && node node_modules/typescript/bin/tsc -p tsconfig.json --emitDeclarationOnly && node scripts/patch-dist.mjs",
|
|
@@ -92,7 +84,7 @@
|
|
|
92
84
|
"crypto-js": "4.2.0",
|
|
93
85
|
"@jest/globals": "^30.2.0",
|
|
94
86
|
"@types/crypto-js": "4.2.2",
|
|
95
|
-
"@types/node": "^25.3.
|
|
87
|
+
"@types/node": "^25.3.3",
|
|
96
88
|
"esbuild": "0.27.3",
|
|
97
89
|
"esbuild-node-externals": "1.20.1",
|
|
98
90
|
"esbuild-plugin-alias": "0.2.1",
|
|
@@ -9,4 +9,8 @@ interface SecurityTool {
|
|
|
9
9
|
deCrypt: (u: string, p: string, mode?: string) => string
|
|
10
10
|
AES_KeyGen: (passKey?: string) => string
|
|
11
11
|
SHA256_Hex: (passKey: string) => string
|
|
12
|
+
ulid: () => string
|
|
13
|
+
fingerprint: () => string
|
|
14
|
+
saveEncrypted: (key: string, value: string, secret: string) => void
|
|
15
|
+
getEncrypted: (key: string, secret: string) => string | null
|
|
12
16
|
}
|
|
@@ -4,9 +4,9 @@ interface SyncTool {
|
|
|
4
4
|
*/
|
|
5
5
|
tab: (channelName: string, callback: (data: any) => void) => { post: (data: any) => void, close: () => void }
|
|
6
6
|
/**
|
|
7
|
-
* Create a Proxy object linked to localStorage for auto-sync.
|
|
7
|
+
* Create a Proxy object linked to localStorage for auto-sync with optional encryption.
|
|
8
8
|
*/
|
|
9
|
-
storageProxy: <T extends object>(key: string, initialValue: T) => T
|
|
9
|
+
storageProxy: <T extends object>(key: string, initialValue: T, secret?: string) => T
|
|
10
10
|
/**
|
|
11
11
|
* Low-latency cross-tab event bus.
|
|
12
12
|
*/
|
package/types/dphelper.d.ts
CHANGED
|
@@ -381,6 +381,10 @@ declare global {
|
|
|
381
381
|
deCrypt: (u: string, p: string, mode?: string) => string
|
|
382
382
|
AES_KeyGen: (passKey?: string) => string
|
|
383
383
|
SHA256_Hex: (passKey: string) => string
|
|
384
|
+
ulid: () => string
|
|
385
|
+
fingerprint: () => string
|
|
386
|
+
saveEncrypted: (key: string, value: string, secret: string) => void
|
|
387
|
+
getEncrypted: (key: string, secret: string) => string | null
|
|
384
388
|
}
|
|
385
389
|
|
|
386
390
|
// --- shortcut ---
|
|
@@ -436,9 +440,9 @@ declare global {
|
|
|
436
440
|
*/
|
|
437
441
|
tab: (channelName: string, callback: (data: any) => void) => { post: (data: any) => void, close: () => void }
|
|
438
442
|
/**
|
|
439
|
-
* Create a Proxy object linked to localStorage for auto-sync.
|
|
443
|
+
* Create a Proxy object linked to localStorage for auto-sync with optional encryption.
|
|
440
444
|
*/
|
|
441
|
-
storageProxy: <T extends object>(key: string, initialValue: T) => T
|
|
445
|
+
storageProxy: <T extends object>(key: string, initialValue: T, secret?: string) => T
|
|
442
446
|
/**
|
|
443
447
|
* Low-latency cross-tab event bus.
|
|
444
448
|
*/
|