@did-space/template 0.2.32 → 0.2.33

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.
@@ -11,7 +11,7 @@ exports.AppBackupSchema = validator_1.Joi.object({
11
11
  userDid: validator_1.Joi.DID().required(),
12
12
  referrer: app_connected_1.AppUrlSchema,
13
13
  // 目前指向的是 server 的 did 地址
14
- nodeDid: validator_1.Joi.string().optional().allow('').default(''),
14
+ serverDid: validator_1.Joi.string().optional().allow('').default(''),
15
15
  // 本质上是始终指向最新的 appDid,目前主要是 rotate 的 blocklet 在还原的时候会用到这个参数
16
16
  signerDid: validator_1.Joi.DID().optional().allow('').default(''),
17
17
  appName: validator_1.Joi.string().optional().allow('').default(''),
@@ -30,8 +30,6 @@ exports.AppConnectedSchema = validator_1.Joi.object({
30
30
  scopes: validator_1.Joi.string().required(),
31
31
  appUrl: exports.AppUrlSchema,
32
32
  referrer: exports.AppUrlSchema,
33
- // 目前指向的是 server 的 did 地址
34
- nodeDid: validator_1.Joi.string().optional().allow('').default(''),
35
33
  createAt: validator_1.Joi.string()
36
34
  .optional()
37
35
  .default(() => new Date().toISOString()),
@@ -80,7 +80,11 @@ class AppTemplate {
80
80
  }
81
81
  set(app) {
82
82
  return __awaiter(this, void 0, void 0, function* () {
83
- const { error, value } = schema_1.AppSchema.validate(app);
83
+ // 可以容忍没有见过的属性,但是我会剔除掉它,保持干净
84
+ const { error, value } = schema_1.AppSchema.validate(app, {
85
+ allowUnknown: true,
86
+ stripUnknown: true,
87
+ });
84
88
  if (error) {
85
89
  throw new Error(error.message);
86
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/template",
3
- "version": "0.2.32",
3
+ "version": "0.2.33",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "@arcblock/jwt": "^1.18.57",
37
37
  "@arcblock/validator": "^1.18.57",
38
38
  "@blocklet/sdk": "1.8.68-beta-500af7e5",
39
- "@did-space/core": "0.2.32",
39
+ "@did-space/core": "0.2.33",
40
40
  "@ocap/mcrypto": "^1.18.57",
41
41
  "@ocap/util": "^1.18.57",
42
42
  "@ocap/wallet": "^1.18.57",
@@ -76,5 +76,5 @@
76
76
  "ts-jest": "^28.0.6",
77
77
  "typescript": "^4.9.5"
78
78
  },
79
- "gitHead": "95b1a137c2a63a0197b51c00060ef3f94c0e01a3"
79
+ "gitHead": "7c981357d323abf6b7db505f769c2126f78c4393"
80
80
  }