vite-plugin-blocklet 0.14.0 → 0.14.1
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/index.cjs +2 -4
- package/libs/utils.js +1 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var vite = require('vite');
|
|
|
5
5
|
var semver = require('semver');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var YAML = require('yaml');
|
|
8
|
-
var
|
|
8
|
+
var mcrypto = require('@ocap/mcrypto');
|
|
9
9
|
var util = require('@ocap/util');
|
|
10
10
|
var did = require('@arcblock/did');
|
|
11
11
|
var fs = require('fs');
|
|
@@ -20,15 +20,13 @@ var getPort = require('get-port');
|
|
|
20
20
|
var mri = require('mri');
|
|
21
21
|
var httpProxyMiddleware = require('http-proxy-middleware');
|
|
22
22
|
|
|
23
|
-
const { types } = Mcrypto;
|
|
24
|
-
|
|
25
23
|
function toBlockletDid(name) {
|
|
26
24
|
if (did.isValid(name)) {
|
|
27
25
|
return name;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
const pk = util.toHex(Buffer.from(typeof name === 'string' ? name.trim() : name));
|
|
31
|
-
return did.fromPublicKey(pk, { role: types.RoleType.ROLE_ANY });
|
|
29
|
+
return did.fromPublicKey(pk, { role: mcrypto.types.RoleType.ROLE_ANY });
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
async function getBlockletYAML() {
|
package/libs/utils.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
2
|
import YAML from 'yaml';
|
|
3
|
-
import
|
|
3
|
+
import { types } from '@ocap/mcrypto';
|
|
4
4
|
import { toHex } from '@ocap/util';
|
|
5
5
|
import { fromPublicKey, isValid } from '@arcblock/did';
|
|
6
6
|
|
|
7
|
-
const { types } = Mcrypto;
|
|
8
|
-
|
|
9
7
|
export function toBlockletDid(name) {
|
|
10
8
|
if (isValid(name)) {
|
|
11
9
|
return name;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-blocklet",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.14.
|
|
4
|
+
"version": "0.14.1",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"rollup": "^4.34.8"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@arcblock/did": "^1.
|
|
34
|
-
"@ocap/mcrypto": "^1.
|
|
35
|
-
"@ocap/util": "^1.
|
|
33
|
+
"@arcblock/did": "^1.28.0",
|
|
34
|
+
"@ocap/mcrypto": "^1.28.0",
|
|
35
|
+
"@ocap/util": "^1.28.0",
|
|
36
36
|
"get-port": "^5.1.1",
|
|
37
37
|
"http-proxy-middleware": "^3.0.3",
|
|
38
38
|
"ismobilejs": "^1.1.1",
|