vite-plugin-blocklet 0.6.2 → 0.6.3

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 CHANGED
@@ -103,11 +103,12 @@ function createConfigPlugin() {
103
103
  try {
104
104
  const blockletYamlPath = './blocklet.yml';
105
105
  const blockletYaml = YAML__default["default"].parse(fs__default["default"].readFileSync(blockletYamlPath, 'utf8'));
106
- const { name } = blockletYaml;
107
- if (name) {
108
- const did = toBlockletDid(name);
106
+ let { name, did } = blockletYaml;
107
+ if (!did && name) {
108
+ did = toBlockletDid(name);
109
+ }
110
+ if (did) {
109
111
  const base = `/.blocklet/proxy/${did}/`;
110
-
111
112
  return {
112
113
  base,
113
114
  };
package/libs/config.js CHANGED
@@ -48,11 +48,12 @@ export default function createConfigPlugin() {
48
48
  try {
49
49
  const blockletYamlPath = './blocklet.yml';
50
50
  const blockletYaml = YAML.parse(fs.readFileSync(blockletYamlPath, 'utf8'));
51
- const { name } = blockletYaml;
52
- if (name) {
53
- const did = toBlockletDid(name);
51
+ let { name, did } = blockletYaml;
52
+ if (!did && name) {
53
+ did = toBlockletDid(name);
54
+ }
55
+ if (did) {
54
56
  const base = `/.blocklet/proxy/${did}/`;
55
-
56
57
  return {
57
58
  base,
58
59
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-plugin-blocklet",
3
3
  "type": "module",
4
- "version": "0.6.2",
4
+ "version": "0.6.3",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -27,9 +27,9 @@
27
27
  "rollup": "^2.79.1"
28
28
  },
29
29
  "dependencies": {
30
- "@arcblock/did": "^1.18.75",
31
- "@ocap/mcrypto": "^1.18.75",
32
- "@ocap/util": "^1.18.75",
30
+ "@arcblock/did": "^1.18.78",
31
+ "@ocap/mcrypto": "^1.18.78",
32
+ "@ocap/util": "^1.18.78",
33
33
  "get-port": "^5.1.1",
34
34
  "mri": "^1.2.0",
35
35
  "semver": "^7.5.0",