@squiz/db-lib 1.34.1-alpha.2 → 1.34.1-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,37 +1,37 @@
1
1
  0 verbose cli /usr/local/bin/node /usr/local/bin/npm
2
2
  1 info using npm@9.5.0
3
3
  2 info using node@v18.15.0
4
- 3 timing npm:load:whichnode Completed in 2ms
4
+ 3 timing npm:load:whichnode Completed in 1ms
5
5
  4 timing config:load:defaults Completed in 2ms
6
- 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
7
- 6 timing config:load:builtin Completed in 1ms
6
+ 5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
7
+ 6 timing config:load:builtin Completed in 0ms
8
8
  7 timing config:load:cli Completed in 2ms
9
9
  8 timing config:load:env Completed in 1ms
10
10
  9 info found workspace root at /builds/developer-experience/cmp
11
11
  10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
12
12
  11 timing config:load:project Completed in 20ms
13
- 12 timing config:load:file:/root/.npmrc Completed in 1ms
14
- 13 timing config:load:user Completed in 1ms
13
+ 12 timing config:load:file:/root/.npmrc Completed in 0ms
14
+ 13 timing config:load:user Completed in 2ms
15
15
  14 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
16
16
  15 timing config:load:global Completed in 0ms
17
17
  16 timing config:load:setEnvs Completed in 1ms
18
18
  17 timing config:load Completed in 29ms
19
- 18 timing npm:load:configload Completed in 29ms
20
- 19 timing npm:load:mkdirpcache Completed in 0ms
21
- 20 timing npm:load:mkdirplogs Completed in 1ms
19
+ 18 timing npm:load:configload Completed in 30ms
20
+ 19 timing npm:load:mkdirpcache Completed in 1ms
21
+ 20 timing npm:load:mkdirplogs Completed in 0ms
22
22
  21 verbose title npm run compile
23
23
  22 verbose argv "run" "compile" "--"
24
24
  23 timing npm:load:setTitle Completed in 1ms
25
25
  24 timing config:load:flatten Completed in 4ms
26
- 25 timing npm:load:display Completed in 6ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-05-18T22_22_33_825Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-05-18T22_22_33_825Z-debug-0.log
29
- 28 timing npm:load:logFile Completed in 4ms
26
+ 25 timing npm:load:display Completed in 5ms
27
+ 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-05-23T01_37_07_641Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-05-23T01_37_07_641Z-debug-0.log
29
+ 28 timing npm:load:logFile Completed in 3ms
30
30
  29 timing npm:load:timers Completed in 0ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
32
  31 timing npm:load Completed in 43ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 3334ms
34
+ 33 timing command:run Completed in 3283ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 3388ms
36
+ 35 timing npm Completed in 3339ms
37
37
  36 info ok
package/lib/index.js CHANGED
@@ -54286,6 +54286,139 @@ var require_Draft_07 = __commonJS({
54286
54286
  }
54287
54287
  });
54288
54288
 
54289
+ // ../dx-json-schema-lib/lib/pageContents/v1/pageContents.json
54290
+ var require_pageContents = __commonJS({
54291
+ "../dx-json-schema-lib/lib/pageContents/v1/pageContents.json"(exports2, module2) {
54292
+ module2.exports = {
54293
+ $schema: "http://json-schema.org/draft-07/schema#",
54294
+ type: "object",
54295
+ properties: {
54296
+ rule: {
54297
+ $ref: "#/definitions/rule"
54298
+ },
54299
+ containers: {
54300
+ type: "array",
54301
+ items: {
54302
+ type: "object",
54303
+ properties: {
54304
+ layout: {
54305
+ $ref: "#/definitions/layout"
54306
+ },
54307
+ rule: {
54308
+ $ref: "#/definitions/rule"
54309
+ },
54310
+ items: {
54311
+ $ref: "#/definitions/items"
54312
+ }
54313
+ }
54314
+ },
54315
+ additionalProperties: false
54316
+ }
54317
+ },
54318
+ required: ["containers"],
54319
+ definitions: {
54320
+ rule: {
54321
+ type: "object",
54322
+ properties: {
54323
+ type: {
54324
+ type: "string",
54325
+ enum: ["language", "segment", "split"]
54326
+ },
54327
+ values: {
54328
+ type: "array",
54329
+ items: {
54330
+ type: "string"
54331
+ }
54332
+ }
54333
+ },
54334
+ required: ["type", "values"]
54335
+ },
54336
+ layout: {
54337
+ type: "object",
54338
+ properties: {
54339
+ name: {
54340
+ type: "string"
54341
+ },
54342
+ type: {
54343
+ type: "string",
54344
+ enum: ["inline", "external-reference"]
54345
+ },
54346
+ value: {
54347
+ type: "string"
54348
+ }
54349
+ },
54350
+ required: ["name", "type", "value"]
54351
+ },
54352
+ items: {
54353
+ type: "array",
54354
+ items: {
54355
+ properties: {
54356
+ rule: {
54357
+ $ref: "#/definitions/rule"
54358
+ },
54359
+ type: {
54360
+ type: "string",
54361
+ enum: ["component", "rich-text"]
54362
+ },
54363
+ component: {
54364
+ type: "string"
54365
+ },
54366
+ "layout-area": {
54367
+ type: "number"
54368
+ },
54369
+ content: {
54370
+ oneOf: [
54371
+ {
54372
+ type: "object",
54373
+ patternProperties: {
54374
+ "^.*$": {
54375
+ oneOf: [
54376
+ {
54377
+ type: "object",
54378
+ properties: {
54379
+ html: {
54380
+ type: "array",
54381
+ items: {
54382
+ type: "object",
54383
+ properties: {
54384
+ tag: {
54385
+ type: "string"
54386
+ },
54387
+ content: {
54388
+ type: "string"
54389
+ }
54390
+ }
54391
+ }
54392
+ }
54393
+ },
54394
+ description: "NOTE : This is a temp object, will be a reference to FT schema",
54395
+ additionalProperties: false
54396
+ },
54397
+ {
54398
+ type: "string",
54399
+ additionalProperties: {
54400
+ type: "string"
54401
+ }
54402
+ }
54403
+ ]
54404
+ }
54405
+ }
54406
+ },
54407
+ {
54408
+ type: "string"
54409
+ }
54410
+ ]
54411
+ }
54412
+ },
54413
+ required: ["type", "content", "layout_area"]
54414
+ }
54415
+ }
54416
+ },
54417
+ additionalProperties: false
54418
+ };
54419
+ }
54420
+ });
54421
+
54289
54422
  // ../dx-json-schema-lib/lib/errors/SchemaValidationError.js
54290
54423
  var require_SchemaValidationError = __commonJS({
54291
54424
  "../dx-json-schema-lib/lib/errors/SchemaValidationError.js"(exports2) {
@@ -56407,7 +56540,7 @@ var require_JsonValidationService = __commonJS({
56407
56540
  return mod && mod.__esModule ? mod : { "default": mod };
56408
56541
  };
56409
56542
  Object.defineProperty(exports2, "__esModule", { value: true });
56410
- exports2.JsonValidationService = exports2.JSONSchemaService = exports2.ManifestV1MetaSchema = exports2.RenderInputMetaSchema = exports2.ComponentInputMetaSchema = exports2.RenderInputSchema = exports2.ComponentInputSchema = void 0;
56543
+ exports2.JsonValidationService = exports2.JSONSchemaService = exports2.ManifestV1MetaSchema = exports2.PageContentsMetaSchema = exports2.RenderInputMetaSchema = exports2.ComponentInputMetaSchema = exports2.RenderInputSchema = exports2.ComponentInputSchema = void 0;
56411
56544
  var json_query_1 = __importDefault2(require_jsonQuery());
56412
56545
  var DxComponentInputSchema_json_1 = __importDefault2(require_DxComponentInputSchema());
56413
56546
  var DxComponentIcons_json_1 = __importDefault2(require_DxComponentIcons());
@@ -56415,6 +56548,7 @@ var require_JsonValidationService = __commonJS({
56415
56548
  var MatrixAssetSchema_json_1 = __importDefault2(require_MatrixAssetSchema());
56416
56549
  var Draft_07_json_1 = __importDefault2(require_Draft_07());
56417
56550
  var formattedText_json_1 = __importDefault2(require_formattedText2());
56551
+ var pageContents_json_1 = __importDefault2(require_pageContents());
56418
56552
  var v1_json_1 = __importDefault2(require_v12());
56419
56553
  var SchemaValidationError_1 = require_SchemaValidationError();
56420
56554
  var json_schema_library_1 = require_jsonSchemaLibrary();
@@ -56539,6 +56673,7 @@ var require_JsonValidationService = __commonJS({
56539
56673
  exports2.RenderInputMetaSchema = {
56540
56674
  root: Draft_07_json_1.default
56541
56675
  };
56676
+ exports2.PageContentsMetaSchema = new json_schema_library_1.Draft07(pageContents_json_1.default, defaultConfig);
56542
56677
  exports2.ManifestV1MetaSchema = {
56543
56678
  root: v1_json_1.default,
56544
56679
  remotes: {
@@ -56650,6 +56785,9 @@ ${potentialResolutionErrors.join("\n")}`);
56650
56785
  const errors = exports2.RenderInputSchema.validate(inputValue, inputSchema);
56651
56786
  return processValidationResult(errors);
56652
56787
  }
56788
+ validatePageContents(pageContents) {
56789
+ return processValidationResult(exports2.PageContentsMetaSchema.validate(pageContents));
56790
+ }
56653
56791
  };
56654
56792
  exports2.JsonValidationService = JsonValidationService;
56655
56793
  function processValidationResult(errors) {
@@ -57079,9 +57217,11 @@ var require_lib5 = __commonJS({
57079
57217
  __createBinding2(exports3, m, p);
57080
57218
  };
57081
57219
  Object.defineProperty(exports2, "__esModule", { value: true });
57082
- exports2.SUB_SCHEMAS = exports2.FORMATTED_TEXT_SCHEMAS = exports2.FORMATTED_TEXT_MODELS = exports2.MANIFEST_SCHEMAS = exports2.MANIFEST_MODELS = void 0;
57220
+ exports2.SUB_SCHEMAS = exports2.FORMATTED_TEXT_SCHEMAS = exports2.FORMATTED_TEXT_MODELS = exports2.PAGE_CONTENT_SCHEMAS = exports2.PAGE_CONTENTS_MODELS = exports2.MANIFEST_SCHEMAS = exports2.MANIFEST_MODELS = void 0;
57083
57221
  exports2.MANIFEST_MODELS = __importStar2(require_manifestModels());
57084
57222
  exports2.MANIFEST_SCHEMAS = __importStar2(require_manifestSchemas());
57223
+ exports2.PAGE_CONTENTS_MODELS = __importStar2(require_manifestModels());
57224
+ exports2.PAGE_CONTENT_SCHEMAS = __importStar2(require_manifestSchemas());
57085
57225
  exports2.FORMATTED_TEXT_MODELS = __importStar2(require_formattedTextModels());
57086
57226
  exports2.FORMATTED_TEXT_SCHEMAS = __importStar2(require_formattedTextSchemas());
57087
57227
  __exportStar2(require_resolveFormattedTextNodes(), exports2);