@evomap/evolver-adapter-public 2.0.44 → 2.0.46
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/dist/auth/legacyShim.js +4 -1
- package/dist/connect.js +0 -2
- package/package.json +3 -3
package/dist/auth/legacyShim.js
CHANGED
|
@@ -28,7 +28,10 @@ export class LegacyAuthShim {
|
|
|
28
28
|
this.onRotate = onRotate;
|
|
29
29
|
this.onVersionUpdate = onVersionUpdate;
|
|
30
30
|
this.onDiverged = onDiverged;
|
|
31
|
-
|
|
31
|
+
// An absent secret is the enrollment state, not an error: a node with no credential yet, and one whose
|
|
32
|
+
// secret notifyNodeSecretDiverged just dropped, both hello unauthenticated so the hub can mint one.
|
|
33
|
+
// Rejecting it here would fence off the re-acquisition this class is written to perform.
|
|
34
|
+
if (nodeSecret !== undefined && !isNodeSecret(nodeSecret))
|
|
32
35
|
throw new Error('node_secret 必须是 64-hex');
|
|
33
36
|
this.nodeSecretVersion = parseNodeSecretVersion(initialNodeSecretVersion);
|
|
34
37
|
}
|
package/dist/connect.js
CHANGED
|
@@ -14,8 +14,6 @@ export function connectPublicHub(opts) {
|
|
|
14
14
|
let auth;
|
|
15
15
|
switch (opts.authMode) {
|
|
16
16
|
case 'legacy':
|
|
17
|
-
if (!opts.nodeSecret)
|
|
18
|
-
throw new Error('legacy 模式需 nodeSecret');
|
|
19
17
|
auth = new LegacyAuthShim(opts.nodeSecret, opts.onNodeSecretRotated, opts.nodeSecretVersion, opts.onNodeSecretVersionUpdated, opts.onNodeSecretDiverged);
|
|
20
18
|
break;
|
|
21
19
|
case 'keypair':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver-adapter-public",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.46",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@evomap/atp-sdk": "^0.1.0",
|
|
20
|
-
"@evomap/evolver-core": "2.0.
|
|
21
|
-
"undici": "^6.
|
|
20
|
+
"@evomap/evolver-core": "2.0.46",
|
|
21
|
+
"undici": "^6.29.1"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
24
|
"@napi-rs/keyring": "^1.1.6"
|