@squiz/db-lib 1.39.1-alpha.0 → 1.39.1-alpha.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,34 +4,34 @@
4
4
  3 timing npm:load:whichnode Completed in 1ms
5
5
  4 timing config:load:defaults Completed in 2ms
6
6
  5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
7
- 6 timing config:load:builtin Completed in 1ms
8
- 7 timing config:load:cli Completed in 3ms
9
- 8 timing config:load:env Completed in 2ms
7
+ 6 timing config:load:builtin Completed in 0ms
8
+ 7 timing config:load:cli Completed in 2ms
9
+ 8 timing config:load:env Completed in 1ms
10
10
  9 info found workspace root at /builds/developer-experience/cmp
11
- 10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 1ms
12
- 11 timing config:load:project Completed in 25ms
11
+ 10 timing config:load:file:/builds/developer-experience/cmp/.npmrc Completed in 0ms
12
+ 11 timing config:load:project Completed in 24ms
13
13
  12 timing config:load:file:/root/.npmrc Completed in 1ms
14
14
  13 timing config:load:user Completed in 1ms
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
- 17 timing config:load Completed in 35ms
19
- 18 timing npm:load:configload Completed in 35ms
20
- 19 timing npm:load:mkdirpcache Completed in 1ms
21
- 20 timing npm:load:mkdirplogs Completed in 0ms
18
+ 17 timing config:load Completed in 34ms
19
+ 18 timing npm:load:configload Completed in 34ms
20
+ 19 timing npm:load:mkdirpcache Completed in 0ms
21
+ 20 timing npm:load:mkdirplogs Completed in 1ms
22
22
  21 verbose title npm run compile
23
23
  22 verbose argv "run" "compile" "--"
24
- 23 timing npm:load:setTitle Completed in 2ms
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 5ms
27
- 26 verbose logfile logs-max:10 dir:/builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-21T21_57_21_670Z-
28
- 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-21T21_57_21_670Z-debug-0.log
29
- 28 timing npm:load:logFile Completed in 4ms
30
- 29 timing npm:load:timers Completed in 0ms
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-06-22T07_22_10_175Z-
28
+ 27 verbose logfile /builds/developer-experience/cmp/packages/db-lib/.npm/_logs/2023-06-22T07_22_10_175Z-debug-0.log
29
+ 28 timing npm:load:logFile Completed in 3ms
30
+ 29 timing npm:load:timers Completed in 1ms
31
31
  30 timing npm:load:configScope Completed in 0ms
32
- 31 timing npm:load Completed in 49ms
32
+ 31 timing npm:load Completed in 48ms
33
33
  32 silly logfile done cleaning log files
34
- 33 timing command:run Completed in 3354ms
34
+ 33 timing command:run Completed in 3435ms
35
35
  34 verbose exit 0
36
- 35 timing npm Completed in 3417ms
36
+ 35 timing npm Completed in 3494ms
37
37
  36 info ok
package/lib/index.js CHANGED
@@ -49662,6 +49662,14 @@ var require_v1 = __commonJS({
49662
49662
  }
49663
49663
  });
49664
49664
 
49665
+ // ../dx-json-schema-lib/lib/manifest/v1/JobV1.js
49666
+ var require_JobV1 = __commonJS({
49667
+ "../dx-json-schema-lib/lib/manifest/v1/JobV1.js"(exports2) {
49668
+ "use strict";
49669
+ Object.defineProperty(exports2, "__esModule", { value: true });
49670
+ }
49671
+ });
49672
+
49665
49673
  // ../dx-json-schema-lib/lib/manifest/v1/manifestModels.js
49666
49674
  var require_manifestModels = __commonJS({
49667
49675
  "../dx-json-schema-lib/lib/manifest/v1/manifestModels.js"(exports2) {
@@ -49699,8 +49707,9 @@ var require_manifestModels = __commonJS({
49699
49707
  return result;
49700
49708
  };
49701
49709
  Object.defineProperty(exports2, "__esModule", { value: true });
49702
- exports2.v1 = void 0;
49710
+ exports2.JobV1 = exports2.v1 = void 0;
49703
49711
  exports2.v1 = __importStar2(require_v1());
49712
+ exports2.JobV1 = __importStar2(require_JobV1());
49704
49713
  }
49705
49714
  });
49706
49715
 
@@ -49713,15 +49722,28 @@ var require_v12 = __commonJS({
49713
49722
  title: "ComponentManifest",
49714
49723
  additionalProperties: false,
49715
49724
  properties: {
49716
- $schema: { type: "string", description: "the manifest schema version" },
49725
+ $schema: {
49726
+ type: "string",
49727
+ description: "the manifest schema version"
49728
+ },
49717
49729
  namespace: {
49718
49730
  type: "string",
49719
49731
  description: "Namespace of the component",
49720
49732
  $ref: "#/definitions/name-pattern"
49721
49733
  },
49722
- name: { type: "string", description: "Name of the component", $ref: "#/definitions/name-pattern" },
49723
- displayName: { type: "string", description: "Display name of the component" },
49724
- description: { type: "string", description: "Description of the component" },
49734
+ name: {
49735
+ type: "string",
49736
+ description: "Name of the component",
49737
+ $ref: "#/definitions/name-pattern"
49738
+ },
49739
+ displayName: {
49740
+ type: "string",
49741
+ description: "Display name of the component"
49742
+ },
49743
+ description: {
49744
+ type: "string",
49745
+ description: "Description of the component"
49746
+ },
49725
49747
  mainFunction: {
49726
49748
  type: "string",
49727
49749
  description: "Name of the main function to be executed at the root of the access url"
@@ -49793,7 +49815,9 @@ var require_v12 = __commonJS({
49793
49815
  additionalProperties: false,
49794
49816
  description: "The HtmlResponse type is for returning html content. The response out of the function must be a string. This response object also includes references to resources (staticFiles) the component needs to execute correctly. It is up to the integrating system to respect this.",
49795
49817
  properties: {
49796
- responseType: { const: "html" },
49818
+ responseType: {
49819
+ const: "html"
49820
+ },
49797
49821
  staticFiles: {
49798
49822
  type: "array",
49799
49823
  description: "A list of static resources that are required for the component to execute correctly",
@@ -49960,8 +49984,12 @@ var require_v12 = __commonJS({
49960
49984
  type: "object",
49961
49985
  additionalProperties: false,
49962
49986
  properties: {
49963
- responseType: { const: "json" },
49964
- definition: { $ref: "http://json-schema.org/draft-07/schema#" },
49987
+ responseType: {
49988
+ const: "json"
49989
+ },
49990
+ definition: {
49991
+ $ref: "http://json-schema.org/draft-07/schema#"
49992
+ },
49965
49993
  headers: {
49966
49994
  title: "ResponseHeaders",
49967
49995
  type: "object",
@@ -50147,6 +50175,100 @@ var require_v12 = __commonJS({
50147
50175
  }
50148
50176
  });
50149
50177
 
50178
+ // ../dx-json-schema-lib/lib/manifest/v1/JobV1.json
50179
+ var require_JobV12 = __commonJS({
50180
+ "../dx-json-schema-lib/lib/manifest/v1/JobV1.json"(exports2, module2) {
50181
+ module2.exports = {
50182
+ $schema: "http://json-schema.org/draft-07/schema#",
50183
+ type: "object",
50184
+ title: "JobManifest",
50185
+ additionalProperties: false,
50186
+ properties: {
50187
+ $schema: {
50188
+ type: "string",
50189
+ description: "the manifest schema version"
50190
+ },
50191
+ name: {
50192
+ type: "string",
50193
+ description: "Name of the job",
50194
+ $ref: "#/definitions/name-pattern"
50195
+ },
50196
+ displayName: {
50197
+ type: "string",
50198
+ description: "Display name of the job"
50199
+ },
50200
+ description: {
50201
+ type: "string",
50202
+ description: "Description of the job"
50203
+ },
50204
+ mainFunction: {
50205
+ type: "string",
50206
+ description: "Name of the main function to be executed at the root of the access url"
50207
+ },
50208
+ version: {
50209
+ type: "string",
50210
+ description: "Semver version number",
50211
+ minLength: 5,
50212
+ maxLength: 14,
50213
+ pattern: "^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$"
50214
+ },
50215
+ timeout: {
50216
+ type: "number",
50217
+ description: "Timeout in seconds before a job is stopped (min 5s, max 8h)",
50218
+ minimum: 5,
50219
+ maximum: 28800
50220
+ },
50221
+ concurrency: {
50222
+ type: "number",
50223
+ description: "The number of these jobs that can be run at once",
50224
+ minimum: 1
50225
+ },
50226
+ functions: {
50227
+ type: "array",
50228
+ minItems: 0,
50229
+ items: {
50230
+ title: "JobFunction",
50231
+ description: "Job function definition, this object provides the runtime with input validation and what to execute",
50232
+ type: "object",
50233
+ properties: {
50234
+ name: {
50235
+ type: "string",
50236
+ $ref: "#/definitions/name-pattern",
50237
+ description: "Function name"
50238
+ },
50239
+ entry: {
50240
+ type: "string",
50241
+ description: "File path to the javascript file to execute. The file path must be relative to the manifest file and cannot be in a folder above the manifest file."
50242
+ },
50243
+ input: {
50244
+ $ref: "DxComponentInputSchema.json"
50245
+ }
50246
+ },
50247
+ required: ["name", "entry", "input"]
50248
+ }
50249
+ }
50250
+ },
50251
+ required: [
50252
+ "name",
50253
+ "displayName",
50254
+ "description",
50255
+ "version",
50256
+ "functions",
50257
+ "$schema",
50258
+ "mainFunction",
50259
+ "concurrency",
50260
+ "timeout"
50261
+ ],
50262
+ definitions: {
50263
+ "name-pattern": {
50264
+ type: "string",
50265
+ pattern: "^[a-z][a-z0-9_\\-]+$"
50266
+ }
50267
+ }
50268
+ };
50269
+ }
50270
+ });
50271
+
50150
50272
  // ../dx-json-schema-lib/lib/manifest/v1/manifestSchemas.js
50151
50273
  var require_manifestSchemas = __commonJS({
50152
50274
  "../dx-json-schema-lib/lib/manifest/v1/manifestSchemas.js"(exports2) {
@@ -50155,9 +50277,11 @@ var require_manifestSchemas = __commonJS({
50155
50277
  return mod && mod.__esModule ? mod : { "default": mod };
50156
50278
  };
50157
50279
  Object.defineProperty(exports2, "__esModule", { value: true });
50158
- exports2.v1 = void 0;
50280
+ exports2.JobV1 = exports2.v1 = void 0;
50159
50281
  var v1_json_1 = __importDefault2(require_v12());
50160
50282
  exports2.v1 = v1_json_1.default;
50283
+ var JobV1_json_1 = __importDefault2(require_JobV12());
50284
+ exports2.JobV1 = JobV1_json_1.default;
50161
50285
  }
50162
50286
  });
50163
50287
 
@@ -56558,6 +56682,7 @@ var require_JsonValidationService = __commonJS({
56558
56682
  var formattedText_json_1 = __importDefault2(require_formattedText2());
56559
56683
  var pageContents_json_1 = __importDefault2(require_pageContents());
56560
56684
  var v1_json_1 = __importDefault2(require_v12());
56685
+ var JobV1_json_1 = __importDefault2(require_JobV12());
56561
56686
  var SchemaValidationError_1 = require_SchemaValidationError();
56562
56687
  var json_schema_library_1 = require_jsonSchemaLibrary();
56563
56688
  var json_schema_library_2 = require_jsonSchemaLibrary();
@@ -56672,6 +56797,8 @@ var require_JsonValidationService = __commonJS({
56672
56797
  v1Schema.addRemoteSchema("/MatrixAssetSchema.json", MatrixAssetSchema_json_1.default);
56673
56798
  v1Schema.addRemoteSchema("http://json-schema.org/draft-07/schema", Draft_07_json_1.default);
56674
56799
  v1Schema.addRemoteSchema("http://json-schema.org/draft-07/schema#", Draft_07_json_1.default);
56800
+ var jobV1Schema = new json_schema_library_1.Draft07(JobV1_json_1.default, defaultConfig);
56801
+ jobV1Schema.addRemoteSchema("/DxComponentInputSchema.json", exports2.ComponentInputSchema.getSchema());
56675
56802
  exports2.ComponentInputMetaSchema = {
56676
56803
  root: DxComponentInputSchema_json_1.default,
56677
56804
  remotes: {
@@ -56776,6 +56903,10 @@ ${potentialResolutionErrors.join("\n")}`);
56776
56903
  const validationResult = v1Schema.validate(manifest);
56777
56904
  return processValidationResult(validationResult);
56778
56905
  }
56906
+ case "JobV1": {
56907
+ const validationResult = jobV1Schema.validate(manifest);
56908
+ return processValidationResult(validationResult);
56909
+ }
56779
56910
  default:
56780
56911
  throw new SchemaValidationError_1.SchemaValidationError("Invalid manifest version");
56781
56912
  }