@blocklet/constant 1.16.6-beta-4562aa60 → 1.16.6-beta-eaa4d39d

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.
Files changed (2) hide show
  1. package/index.js +17 -0
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -152,6 +152,17 @@ const RESTORE_PROGRESS_STATUS = {
152
152
  completed: 60,
153
153
  };
154
154
 
155
+ const CHAIN_PROP_MAP = {
156
+ BLOCKLET_APP_CHAIN_HOST: 'CHAIN_HOST',
157
+ BLOCKLET_APP_CHAIN_ID: 'CHAIN_ID',
158
+ BLOCKLET_APP_CHAIN_TYPE: 'CHAIN_TYPE',
159
+ };
160
+
161
+ const CHAIN_PROP_MAP_REVERSE = Object.keys(CHAIN_PROP_MAP).reduce((acc, key) => {
162
+ acc[CHAIN_PROP_MAP[key]] = key;
163
+ return acc;
164
+ }, {});
165
+
155
166
  module.exports = Object.freeze({
156
167
  BlockletStatus,
157
168
  fromBlockletStatus,
@@ -232,6 +243,9 @@ module.exports = Object.freeze({
232
243
  BLOCKLET_APP_SPACE_ENDPOINT: 'BLOCKLET_APP_SPACE_ENDPOINT',
233
244
  // 保存 did spaces 的地址
234
245
  BLOCKLET_APP_SPACES_URL: 'BLOCKLET_APP_SPACES_URL',
246
+ BLOCKLET_APP_CHAIN_HOST: 'BLOCKLET_APP_CHAIN_HOST',
247
+ BLOCKLET_APP_CHAIN_TYPE: 'BLOCKLET_APP_CHAIN_TYPE',
248
+ BLOCKLET_APP_CHAIN_ID: 'BLOCKLET_APP_CHAIN_ID',
235
249
 
236
250
  // Component Key
237
251
  COMPONENT_ACCESS_WHO: 'COMPONENT_ACCESS_WHO',
@@ -248,5 +262,8 @@ module.exports = Object.freeze({
248
262
  CHAIN_HOST: ['host', 'none'],
249
263
  },
250
264
 
265
+ CHAIN_PROP_MAP,
266
+ CHAIN_PROP_MAP_REVERSE,
267
+
251
268
  RESTORE_PROGRESS_STATUS,
252
269
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.6-beta-4562aa60",
6
+ "version": "1.16.6-beta-eaa4d39d",
7
7
  "description": "Blocklet constants",
8
8
  "main": "index.js",
9
9
  "files": [
@@ -20,5 +20,5 @@
20
20
  "devDependencies": {
21
21
  "jest": "^27.5.1"
22
22
  },
23
- "gitHead": "e49856099ffc3c16eda77480a7ad93b2e9760764"
23
+ "gitHead": "0d2ab99f67109e989f8182fc70bc3ee9fa430585"
24
24
  }