dsh-enterprise-knowledge-steward 1.0.0 → 1.0.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/README.md +25 -16
- package/lib/auth.js +6 -9
- package/package.json +3 -4
- package/vendor/sm-crypto/LICENCE_MIT +7 -0
- package/vendor/sm-crypto/node_modules/jsbn/CHANGELOG.md +16 -0
- package/vendor/sm-crypto/node_modules/jsbn/LICENSE +40 -0
- package/vendor/sm-crypto/node_modules/jsbn/README.md +173 -0
- package/vendor/sm-crypto/node_modules/jsbn/index.js +1361 -0
- package/vendor/sm-crypto/node_modules/jsbn/package.json +21 -0
- package/vendor/sm-crypto/package.json +42 -0
- package/vendor/sm-crypto/src/index.js +5 -0
- package/vendor/sm-crypto/src/sm2/asn1.js +161 -0
- package/vendor/sm-crypto/src/sm2/ec.js +332 -0
- package/vendor/sm-crypto/src/sm2/index.js +269 -0
- package/vendor/sm-crypto/src/sm2/sm3.js +170 -0
- package/vendor/sm-crypto/src/sm2/utils.js +194 -0
- package/vendor/sm-crypto/src/sm3/index.js +94 -0
- package/vendor/sm-crypto/src/sm4/index.js +359 -0
package/README.md
CHANGED
|
@@ -2,33 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
制度与知识问答、清分数据、人员任职与信访台账。
|
|
4
4
|
|
|
5
|
-
包名:`dsh-enterprise-knowledge-steward
|
|
5
|
+
包名:`dsh-enterprise-knowledge-steward`(当前 **1.0.2**)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> 1.0.2 起已内置 `sm-crypto`,安装时不再向 npm 拉取依赖,可避免桌面版解析依赖 403。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## 安装(推荐指定版本)
|
|
10
|
+
|
|
11
|
+
桌面版:设置 → 插件 → 安装框填入:
|
|
10
12
|
|
|
11
13
|
```
|
|
12
|
-
dsh-enterprise-knowledge-steward
|
|
14
|
+
dsh-enterprise-knowledge-steward@1.0.2
|
|
13
15
|
```
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
若包名不被接受,粘贴 tarball:
|
|
16
18
|
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
```
|
|
20
|
+
https://registry.npmjs.org/dsh-enterprise-knowledge-steward/-/dsh-enterprise-knowledge-steward-1.0.2.tgz
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
国内镜像:
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
dsh
|
|
25
|
+
```
|
|
26
|
+
https://registry.npmmirror.com/dsh-enterprise-knowledge-steward/-/dsh-enterprise-knowledge-steward-1.0.2.tgz
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
CLI:
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
dsh plugin --profile
|
|
31
|
+
```bash
|
|
32
|
+
dsh plugin --profile desktop add dsh-enterprise-knowledge-steward@1.0.2
|
|
33
|
+
dsh plugin --profile web add dsh-enterprise-knowledge-steward@1.0.2
|
|
34
|
+
dsh plugin --profile dsh-tui add dsh-enterprise-knowledge-steward@1.0.2
|
|
26
35
|
```
|
|
27
36
|
|
|
28
|
-
无全局 `dsh`
|
|
37
|
+
无全局 `dsh` 时:
|
|
29
38
|
|
|
30
39
|
```bash
|
|
31
|
-
npx @deepseek-ai/dsh plugin --profile desktop add dsh-enterprise-knowledge-steward
|
|
40
|
+
npx @deepseek-ai/dsh plugin --profile desktop add dsh-enterprise-knowledge-steward@1.0.2
|
|
32
41
|
```
|
|
33
42
|
|
|
34
43
|
安装后**完全退出再打开** DSH。
|
|
@@ -53,5 +62,5 @@ KMS_PASSWORD=你的密码
|
|
|
53
62
|
|
|
54
63
|
```bash
|
|
55
64
|
dsh plugin --profile desktop add ./企业知识管家-dsh-plugin
|
|
56
|
-
dsh plugin --profile desktop add ./dsh-enterprise-knowledge-steward-1.0.
|
|
57
|
-
```
|
|
65
|
+
dsh plugin --profile desktop add ./dsh-enterprise-knowledge-steward-1.0.2.tgz
|
|
66
|
+
```
|
package/lib/auth.js
CHANGED
|
@@ -22,15 +22,12 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
22
22
|
|
|
23
23
|
function loadSm2() {
|
|
24
24
|
try {
|
|
25
|
-
return require('sm-crypto').sm2
|
|
26
|
-
} catch {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
err.code = 'NO_SM_CRYPTO'
|
|
32
|
-
throw err
|
|
33
|
-
}
|
|
25
|
+
return require(path.join(PLUGIN_ROOT, 'vendor', 'sm-crypto')).sm2
|
|
26
|
+
} catch (e) {
|
|
27
|
+
const err = new Error('缺少内置 sm-crypto(vendor/sm-crypto),请重新安装插件包')
|
|
28
|
+
err.code = 'NO_SM_CRYPTO'
|
|
29
|
+
err.cause = e
|
|
30
|
+
throw err
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-enterprise-knowledge-steward",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "企业知识管家:制度问答、清分数据、人员任职与信访台账",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"index.js",
|
|
10
10
|
"cordis.patch.yml",
|
|
11
11
|
"lib",
|
|
12
|
+
"vendor",
|
|
12
13
|
".env.example",
|
|
13
14
|
"README.md"
|
|
14
15
|
],
|
|
@@ -20,9 +21,7 @@
|
|
|
20
21
|
"engines": {
|
|
21
22
|
"dsh": ">=0.1.0-rc.0"
|
|
22
23
|
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"sm-crypto": "^0.3.13"
|
|
25
|
-
},
|
|
24
|
+
"dependencies": {},
|
|
26
25
|
"peerDependencies": {
|
|
27
26
|
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.0",
|
|
28
27
|
"@deepseek-ai/cordis": "*"
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright © 2018 june01
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# v1.1.0
|
|
2
|
+
|
|
3
|
+
- Allow for es6 "default import", e.g. `import BigInteger from 'jsbn'`.
|
|
4
|
+
- Updated license file to read MIT
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# v1.0.0
|
|
8
|
+
|
|
9
|
+
- breaking change: `require('jsbn')` no longer returns `BigInteger`. Use `require('jsbn').BigInteger` instead.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# v0.1.1
|
|
14
|
+
|
|
15
|
+
- fixed backwards-incompatible change in v0.1.0 where `require('jsbn') != BigInteger`. This patch version allows for `var BigInteger = require('jsbn')` or `var BigInteger = require('jsbn').BigInteger`.
|
|
16
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Licensing
|
|
2
|
+
---------
|
|
3
|
+
|
|
4
|
+
This software is covered under the following copyright:
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Copyright (c) 2003-2005 Tom Wu
|
|
8
|
+
* All Rights Reserved.
|
|
9
|
+
*
|
|
10
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
11
|
+
* a copy of this software and associated documentation files (the
|
|
12
|
+
* "Software"), to deal in the Software without restriction, including
|
|
13
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
14
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
15
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
16
|
+
* the following conditions:
|
|
17
|
+
*
|
|
18
|
+
* The above copyright notice and this permission notice shall be
|
|
19
|
+
* included in all copies or substantial portions of the Software.
|
|
20
|
+
*
|
|
21
|
+
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
|
|
22
|
+
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
|
23
|
+
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
24
|
+
*
|
|
25
|
+
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
|
26
|
+
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
|
|
27
|
+
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF
|
|
28
|
+
* THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT
|
|
29
|
+
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
30
|
+
*
|
|
31
|
+
* In addition, the following condition applies:
|
|
32
|
+
*
|
|
33
|
+
* All redistributions must retain an intact copy of this copyright notice
|
|
34
|
+
* and disclaimer.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
Address all questions regarding this license to:
|
|
38
|
+
|
|
39
|
+
Tom Wu
|
|
40
|
+
tjw@cs.Stanford.EDU
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# jsbn: javascript big number
|
|
2
|
+
|
|
3
|
+
[Tom Wu's Original Website](http://www-cs-students.stanford.edu/~tjw/jsbn/)
|
|
4
|
+
|
|
5
|
+
I felt compelled to put this on github and publish to npm. I haven't tested every other big integer library out there, but the few that I have tested in comparison to this one have not even come close in performance. I am aware of the `bi` module on npm, however it has been modified and I wanted to publish the original without modifications. This is jsbn and jsbn2 from Tom Wu's original website above, with the module pattern applied to prevent global leaks and to allow for use with node.js on the server side.
|
|
6
|
+
|
|
7
|
+
## usage
|
|
8
|
+
|
|
9
|
+
var BigInteger = require('jsbn').BigInteger;
|
|
10
|
+
|
|
11
|
+
var bi = new BigInteger('91823918239182398123');
|
|
12
|
+
console.log(bi.bitLength()); // 67
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## API
|
|
16
|
+
|
|
17
|
+
### bi.toString()
|
|
18
|
+
|
|
19
|
+
returns the base-10 number as a string
|
|
20
|
+
|
|
21
|
+
### bi.negate()
|
|
22
|
+
|
|
23
|
+
returns a new BigInteger equal to the negation of `bi`
|
|
24
|
+
|
|
25
|
+
### bi.abs
|
|
26
|
+
|
|
27
|
+
returns new BI of absolute value
|
|
28
|
+
|
|
29
|
+
### bi.compareTo
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### bi.bitLength
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### bi.mod
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### bi.modPowInt
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### bi.clone
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### bi.intValue
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### bi.byteValue
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### bi.shortValue
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### bi.signum
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### bi.toByteArray
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### bi.equals
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### bi.min
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### bi.max
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### bi.and
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### bi.or
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### bi.xor
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### bi.andNot
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### bi.not
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### bi.shiftLeft
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### bi.shiftRight
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### bi.getLowestSetBit
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### bi.bitCount
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### bi.testBit
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### bi.setBit
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### bi.clearBit
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### bi.flipBit
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### bi.add
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### bi.subtract
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### bi.multiply
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### bi.divide
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### bi.remainder
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### bi.divideAndRemainder
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### bi.modPow
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### bi.modInverse
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### bi.pow
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### bi.gcd
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### bi.isProbablePrime
|