@blocklet/meta 1.6.20 → 1.6.21

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/lib/constants.js CHANGED
@@ -173,7 +173,7 @@ module.exports = Object.freeze({
173
173
 
174
174
  BLOCKLET_DEFAULT_VERSION: '1.0.0',
175
175
 
176
- BLOCKLET_LATEST_SPEC_VERSION: '1.2.2',
176
+ BLOCKLET_LATEST_SPEC_VERSION: '1.2.3',
177
177
  BLOCKLET_LATEST_REQUIREMENT_SERVER: '>=1.6.2',
178
178
  BLOCKLET_LATEST_REQUIREMENT_ABTNODE: '>=1.5.15', // Deprecated
179
179
 
package/lib/schema.js CHANGED
@@ -140,7 +140,7 @@ const statsSchema = Joi.object({
140
140
  const childrenSchema = Joi.object({
141
141
  name: Joi.string().min(1).required(),
142
142
  resolved: Joi.alternatives().try(Joi.string().uri(), Joi.string()).required(),
143
- mountPoints: Joi.array()
143
+ mountPoints: Joi.array() // deprecated
144
144
  .items(
145
145
  Joi.object({
146
146
  root: Joi.object({
@@ -155,6 +155,14 @@ const childrenSchema = Joi.object({
155
155
  )
156
156
  .optional()
157
157
  .default([]),
158
+ mountPoint: Joi.string().trim().min(1), // added in 1.2.3
159
+ services: Joi.array().items(serviceSchema).unique('name'), // added in 1.2.3
160
+ }).custom((value) => {
161
+ if (!value.mountPoint && (!value.mountPoints || !value.mountPoints.length)) {
162
+ throw new Error('mountPoint is required');
163
+ }
164
+
165
+ return value;
158
166
  });
159
167
 
160
168
  const signatureSchema = Joi.object({
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.20",
6
+ "version": "1.6.21",
7
7
  "description": "Library to parse/validate/fix blocklet meta",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -43,5 +43,5 @@
43
43
  "devDependencies": {
44
44
  "jest": "^27.4.5"
45
45
  },
46
- "gitHead": "e695a9fa4e2cbf7fcef554be3309090c37919d94"
46
+ "gitHead": "864ae21711c119948475057a1f634fd7d16ae91a"
47
47
  }