@abtnode/core 1.16.29-beta-87e06e1c → 1.16.29-beta-2eaf40bc

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.
@@ -1503,6 +1503,16 @@ const validateAppConfig = async (config, states) => {
1503
1503
  }
1504
1504
  }
1505
1505
 
1506
+ if (x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL) {
1507
+ if (isEmpty(x.value)) {
1508
+ throw new Error(`${x.key} can not be empty`);
1509
+ }
1510
+
1511
+ if (!isUrl(x.value)) {
1512
+ throw new Error(`${x.key}(${x.value}) is not a valid URL`);
1513
+ }
1514
+ }
1515
+
1506
1516
  if (x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME) {
1507
1517
  x.value = await titleSchema.validateAsync(x.value);
1508
1518
  }
@@ -1545,7 +1555,7 @@ const validateAppConfig = async (config, states) => {
1545
1555
  if (x.key === BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT) {
1546
1556
  // @note: value 置空以表删除
1547
1557
  if (x.value && !isUrl(x.value)) {
1548
- throw new Error(`${x.key}(${x.value}) is not a valid http address`);
1558
+ throw new Error(`${x.key}(${x.value}) is not a valid URL`);
1549
1559
  }
1550
1560
  }
1551
1561
 
@@ -1555,7 +1565,7 @@ const validateAppConfig = async (config, states) => {
1555
1565
  }
1556
1566
 
1557
1567
  if (!isUrl(x.value)) {
1558
- throw new Error(`${x.key}(${x.value}) is not a valid http address`);
1568
+ throw new Error(`${x.key}(${x.value}) is not a valid URL`);
1559
1569
  }
1560
1570
  }
1561
1571
 
@@ -1565,7 +1575,7 @@ const validateAppConfig = async (config, states) => {
1565
1575
  }
1566
1576
 
1567
1577
  if (!isUrl(x.value)) {
1568
- throw new Error(`${x.key}(${x.value}) is not a valid http address`);
1578
+ throw new Error(`${x.key}(${x.value}) is not a valid URL`);
1569
1579
  }
1570
1580
  }
1571
1581
  };
@@ -173,7 +173,7 @@ const consumeLauncherSession = async ({ params, blocklet }) => {
173
173
  }
174
174
  };
175
175
 
176
- const setupAppOwner = async (node, sessionId) => {
176
+ const setupAppOwner = async (node, sessionId, justCreate = false) => {
177
177
  const session = await node.getSession({ id: sessionId });
178
178
  if (!session) {
179
179
  throw new Error(`Blocklet setup session not found in server: ${sessionId}`);
@@ -292,7 +292,11 @@ const setupAppOwner = async (node, sessionId) => {
292
292
  expiresIn: '1d',
293
293
  });
294
294
 
295
- await node.setBlockletOwner({ did: appDid, owner: { did: ownerDid, pk: ownerPk } });
295
+ if (justCreate) {
296
+ await node.setBlockletInitialized({ did: appDid, owner: { did: ownerDid, pk: ownerPk } });
297
+ } else {
298
+ await node.setBlockletOwner({ did: appDid, owner: { did: ownerDid, pk: ownerPk } });
299
+ }
296
300
 
297
301
  return {
298
302
  session,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.29-beta-87e06e1c",
6
+ "version": "1.16.29-beta-2eaf40bc",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,19 +19,19 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "Apache-2.0",
21
21
  "dependencies": {
22
- "@abtnode/analytics": "1.16.29-beta-87e06e1c",
23
- "@abtnode/auth": "1.16.29-beta-87e06e1c",
24
- "@abtnode/certificate-manager": "1.16.29-beta-87e06e1c",
25
- "@abtnode/constant": "1.16.29-beta-87e06e1c",
26
- "@abtnode/cron": "1.16.29-beta-87e06e1c",
27
- "@abtnode/logger": "1.16.29-beta-87e06e1c",
28
- "@abtnode/models": "1.16.29-beta-87e06e1c",
29
- "@abtnode/queue": "1.16.29-beta-87e06e1c",
30
- "@abtnode/rbac": "1.16.29-beta-87e06e1c",
31
- "@abtnode/router-provider": "1.16.29-beta-87e06e1c",
32
- "@abtnode/static-server": "1.16.29-beta-87e06e1c",
33
- "@abtnode/timemachine": "1.16.29-beta-87e06e1c",
34
- "@abtnode/util": "1.16.29-beta-87e06e1c",
22
+ "@abtnode/analytics": "1.16.29-beta-2eaf40bc",
23
+ "@abtnode/auth": "1.16.29-beta-2eaf40bc",
24
+ "@abtnode/certificate-manager": "1.16.29-beta-2eaf40bc",
25
+ "@abtnode/constant": "1.16.29-beta-2eaf40bc",
26
+ "@abtnode/cron": "1.16.29-beta-2eaf40bc",
27
+ "@abtnode/logger": "1.16.29-beta-2eaf40bc",
28
+ "@abtnode/models": "1.16.29-beta-2eaf40bc",
29
+ "@abtnode/queue": "1.16.29-beta-2eaf40bc",
30
+ "@abtnode/rbac": "1.16.29-beta-2eaf40bc",
31
+ "@abtnode/router-provider": "1.16.29-beta-2eaf40bc",
32
+ "@abtnode/static-server": "1.16.29-beta-2eaf40bc",
33
+ "@abtnode/timemachine": "1.16.29-beta-2eaf40bc",
34
+ "@abtnode/util": "1.16.29-beta-2eaf40bc",
35
35
  "@arcblock/did": "1.18.126",
36
36
  "@arcblock/did-auth": "1.18.126",
37
37
  "@arcblock/did-ext": "^1.18.126",
@@ -42,12 +42,12 @@
42
42
  "@arcblock/pm2-events": "^0.0.5",
43
43
  "@arcblock/validator": "^1.18.126",
44
44
  "@arcblock/vc": "1.18.126",
45
- "@blocklet/constant": "1.16.29-beta-87e06e1c",
46
- "@blocklet/env": "1.16.29-beta-87e06e1c",
47
- "@blocklet/meta": "1.16.29-beta-87e06e1c",
48
- "@blocklet/resolver": "1.16.29-beta-87e06e1c",
49
- "@blocklet/sdk": "1.16.29-beta-87e06e1c",
50
- "@blocklet/store": "1.16.29-beta-87e06e1c",
45
+ "@blocklet/constant": "1.16.29-beta-2eaf40bc",
46
+ "@blocklet/env": "1.16.29-beta-2eaf40bc",
47
+ "@blocklet/meta": "1.16.29-beta-2eaf40bc",
48
+ "@blocklet/resolver": "1.16.29-beta-2eaf40bc",
49
+ "@blocklet/sdk": "1.16.29-beta-2eaf40bc",
50
+ "@blocklet/store": "1.16.29-beta-2eaf40bc",
51
51
  "@did-space/client": "^0.5.4",
52
52
  "@fidm/x509": "^1.2.1",
53
53
  "@ocap/mcrypto": "1.18.126",
@@ -103,5 +103,5 @@
103
103
  "jest": "^29.7.0",
104
104
  "unzipper": "^0.10.11"
105
105
  },
106
- "gitHead": "e6a32801bc392566448d4df00c2ae68717f39822"
106
+ "gitHead": "d723d07ca8914468fc1b53af23aa53dc343e0a8c"
107
107
  }