@webda/async 1.6.0-beta.3 → 2.0.0-beta.2

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/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAyB;AACzB,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6DAA2C;AAC3C,oDAAkC;AAClC,yDAAuC"}
package/lib/models.d.ts CHANGED
@@ -23,6 +23,7 @@ export interface Job {
23
23
  }
24
24
  /**
25
25
  * Define here a model that can be used along with Store service
26
+ * @WebdaModel
26
27
  */
27
28
  export default class AsyncAction extends CoreModel {
28
29
  /**
@@ -56,7 +57,7 @@ export default class AsyncAction extends CoreModel {
56
57
  /**
57
58
  *
58
59
  */
59
- arguments: any[];
60
+ arguments?: any[];
60
61
  /**
61
62
  * Current logs
62
63
  */
package/lib/models.js CHANGED
@@ -4,6 +4,7 @@ exports.AsyncAction = exports.WebdaAsyncAction = void 0;
4
4
  const core_1 = require("@webda/core");
5
5
  /**
6
6
  * Define here a model that can be used along with Store service
7
+ * @WebdaModel
7
8
  */
8
9
  class AsyncAction extends core_1.CoreModel {
9
10
  }
package/lib/models.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AAyBxC;;GAEG;AACH,MAAqB,WAAY,SAAQ,gBAAS;CAuDjD;AAvDD,8BAuDC;AAgBQ,kCAAW;AAdpB;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;CAShD;AATD,4CASC"}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":";;;AAAA,sCAAwC;AAyBxC;;;GAGG;AACH,MAAqB,WAAY,SAAQ,gBAAS;CAuDjD;AAvDD,8BAuDC;AAgBQ,kCAAW;AAdpB;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;CAShD;AATD,4CASC"}
@@ -1,4 +1,4 @@
1
- import { Service, ServiceParameters, Queue, Store, RequestFilter, Context } from "@webda/core";
1
+ import { CloudBinary, Context, Queue, RequestFilter, Service, ServiceParameters, Store } from "@webda/core";
2
2
  import { AsyncAction, AsyncActionQueueItem } from "../models";
3
3
  import { Runner } from "./runner";
4
4
  /**
@@ -19,6 +19,18 @@ export declare class AsyncJobServiceParameters extends ServiceParameters {
19
19
  * @default AsyncActions
20
20
  */
21
21
  store: string;
22
+ /**
23
+ * If we want to expose a way to upload/download binary for the job
24
+ *
25
+ * It will expose a /download and /upload additional url
26
+ */
27
+ binaryStore?: string;
28
+ /**
29
+ * If set runner will be called without queue
30
+ *
31
+ * @default false
32
+ */
33
+ localLaunch?: boolean;
22
34
  /**
23
35
  * Queue to post execution to
24
36
  * @default AsyncActionsQueue
@@ -47,6 +59,8 @@ export declare class AsyncJobServiceParameters extends ServiceParameters {
47
59
  }
48
60
  /**
49
61
  * AsyncService allows you to launch jobs and report status
62
+ *
63
+ * @WebdaModda
50
64
  */
51
65
  export default class AsyncJobService<T extends AsyncJobServiceParameters = AsyncJobServiceParameters> extends Service<T> implements RequestFilter {
52
66
  /**
@@ -65,6 +79,10 @@ export default class AsyncJobService<T extends AsyncJobServiceParameters = Async
65
79
  * HMAC Algorithm used for simple auth
66
80
  */
67
81
  static HMAC_ALGO: string;
82
+ /**
83
+ * If we want job to be able to upload/download
84
+ */
85
+ protected binaryStore: CloudBinary;
68
86
  /**
69
87
  * @inheritdoc
70
88
  */
@@ -77,6 +95,12 @@ export default class AsyncJobService<T extends AsyncJobServiceParameters = Async
77
95
  * Allow job status report url
78
96
  */
79
97
  checkRequest(context: Context): Promise<boolean>;
98
+ /**
99
+ *
100
+ * @param context
101
+ * @param action
102
+ */
103
+ verifyJobRequest<K extends AsyncAction = AsyncAction>(context: Context): Promise<K>;
80
104
  /**
81
105
  * Status hook for job report
82
106
  *
@@ -114,13 +138,5 @@ export default class AsyncJobService<T extends AsyncJobServiceParameters = Async
114
138
  * Wrap async job and call the job status hook
115
139
  */
116
140
  runWebdaAsyncAction(jobInfo?: JobInfo): Promise<void>;
117
- /**
118
- * @inheritdoc
119
- */
120
- static getModda(): {
121
- uuid: string;
122
- label: string;
123
- description: string;
124
- };
125
141
  }
126
142
  export { AsyncJobService };
@@ -11,10 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AsyncJobService = exports.AsyncJobServiceParameters = void 0;
13
13
  const core_1 = require("@webda/core");
14
+ const axios_1 = require("axios");
15
+ const crypto = require("crypto");
14
16
  const uuid_1 = require("uuid");
15
17
  const runner_1 = require("./runner");
16
- const crypto = require("crypto");
17
- const axios_1 = require("axios");
18
18
  /**
19
19
  * @inheritdoc
20
20
  */
@@ -31,6 +31,8 @@ class AsyncJobServiceParameters extends core_1.ServiceParameters {
31
31
  exports.AsyncJobServiceParameters = AsyncJobServiceParameters;
32
32
  /**
33
33
  * AsyncService allows you to launch jobs and report status
34
+ *
35
+ * @WebdaModda
34
36
  */
35
37
  class AsyncJobService extends core_1.Service {
36
38
  /**
@@ -62,7 +64,28 @@ class AsyncJobService extends core_1.Service {
62
64
  return res;
63
65
  })
64
66
  .filter(r => r !== undefined);
65
- this.addRoute(`${this.parameters.url}/status`, ["POST"], this.statusHook);
67
+ // This is internal job reporting so no need to document the api
68
+ this.addRoute(`${this.parameters.url}/status`, ["POST"], this.statusHook, {
69
+ hidden: true
70
+ });
71
+ // Add upload/download route if needed
72
+ if (this.parameters.binaryStore) {
73
+ this.binaryStore = this.getService(this.parameters.binaryStore);
74
+ // Call directly Webda addRoute as we are setting a route for another service in fact
75
+ this.getWebda().addRoute(`${this.parameters.url}/download/{store}/{uid}/{property}/{index}`, {
76
+ _method: this.binaryStore.getRedirectUrlInfo,
77
+ executor: this.parameters.binaryStore,
78
+ openapi: { hidden: true },
79
+ methods: ["GET"]
80
+ });
81
+ this.getWebda().addRoute(`${this.parameters.url}/upload/{store}/{uid}/{property}`, {
82
+ _method: this.binaryStore.httpChallenge,
83
+ executor: this.parameters.binaryStore,
84
+ openapi: { hidden: true },
85
+ methods: ["PUT"]
86
+ });
87
+ }
88
+ this.getWebda().registerRequestFilter(this);
66
89
  }
67
90
  /**
68
91
  * Allow job status report url
@@ -70,22 +93,22 @@ class AsyncJobService extends core_1.Service {
70
93
  checkRequest(context) {
71
94
  return __awaiter(this, void 0, void 0, function* () {
72
95
  const url = context.getHttpContext().getRelativeUri();
73
- // Allow status url to be called without other mechanism
74
- return (url.startsWith(this.parameters.url) &&
75
- url.endsWith("/status") &&
76
- context.getHttpContext().getHeader("X-Job-Id") !== "" &&
77
- context.getHttpContext().getHeader("X-Job-Time") !== "" &&
78
- context.getHttpContext().getHeader("X-Job-Hash") !== "");
96
+ if (url.startsWith(this.parameters.url)) {
97
+ // Allow status url to be called without other mechanism
98
+ yield this.verifyJobRequest(context);
99
+ return true;
100
+ }
101
+ return false;
79
102
  });
80
103
  }
81
104
  /**
82
- * Status hook for job report
83
105
  *
84
- * Only updates specific fields: status, errorMessage, statusDetails, results, logs (appending)
106
+ * @param context
107
+ * @param action
85
108
  */
86
- statusHook(context) {
109
+ verifyJobRequest(context) {
87
110
  return __awaiter(this, void 0, void 0, function* () {
88
- const jobId = context.getHttpContext().getHeader("X-Job-Id");
111
+ const jobId = context.getHttpContext().getUniqueHeader("X-Job-Id");
89
112
  if (!jobId) {
90
113
  this.log("TRACE", "Require Job Id");
91
114
  throw 404;
@@ -95,15 +118,28 @@ class AsyncJobService extends core_1.Service {
95
118
  this.log("TRACE", `Unknown Job Id '${jobId}'`);
96
119
  throw 404;
97
120
  }
98
- const jobTime = context.getHttpContext().getHeader("X-Job-Time");
99
- const jobHash = context.getHttpContext().getHeader("X-Job-Hash");
121
+ const jobTime = context.getHttpContext().getUniqueHeader("X-Job-Time");
122
+ const jobHash = context.getHttpContext().getUniqueHeader("X-Job-Hash");
100
123
  // Ensure hash mac is correct
101
124
  if (jobHash !== crypto.createHmac(AsyncJobService.HMAC_ALGO, action.__secretKey).update(jobTime).digest("hex")) {
102
125
  this.log("TRACE", "Invalid Job HMAC");
103
126
  throw 403;
104
127
  }
105
- const body = context.getRequestBody();
106
- action._lastJobUpdate = Number.parseInt(jobTime) || 0;
128
+ // Set the context extension
129
+ context.setExtension("asyncJob", action);
130
+ return action;
131
+ });
132
+ }
133
+ /**
134
+ * Status hook for job report
135
+ *
136
+ * Only updates specific fields: status, errorMessage, statusDetails, results, logs (appending)
137
+ */
138
+ statusHook(context) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const action = yield this.verifyJobRequest(context);
141
+ const body = yield context.getRequestBody();
142
+ action._lastJobUpdate = Number.parseInt(context.getHttpContext().getUniqueHeader("X-Job-Time")) || 0;
107
143
  if (Date.now() - action._lastJobUpdate > 60) {
108
144
  action._lastJobUpdate = Date.now();
109
145
  }
@@ -170,7 +206,7 @@ class AsyncJobService extends core_1.Service {
170
206
  const info = {
171
207
  JOB_SECRET_KEY: action.__secretKey,
172
208
  JOB_ID: action.getUuid(),
173
- JOB_HOOK: this.getWebda().getApiUrl(`${this.parameters.url}/status`),
209
+ JOB_HOOK: this.getWebda().getApiUrl(this.parameters.url),
174
210
  JOB_ORCHESTRATOR: this.getName()
175
211
  };
176
212
  yield action.update({
@@ -189,6 +225,9 @@ class AsyncJobService extends core_1.Service {
189
225
  action.type = action.constructor.name;
190
226
  action.__secretKey = (0, uuid_1.v4)();
191
227
  yield this.store.save(action);
228
+ if (this.parameters.localLaunch) {
229
+ return this.handleEvent({ uuid: action.getUuid(), __secretKey: action.__secretKey, type: action.type });
230
+ }
192
231
  return this.queue.sendMessage({ uuid: action.getUuid(), __secretKey: action.__secretKey, type: action.type });
193
232
  });
194
233
  }
@@ -271,16 +310,6 @@ class AsyncJobService extends core_1.Service {
271
310
  });
272
311
  });
273
312
  }
274
- /**
275
- * @inheritdoc
276
- */
277
- static getModda() {
278
- return {
279
- uuid: "Webda/AsyncJobService",
280
- label: "AsyncJobService",
281
- description: "Implements a full async job system"
282
- };
283
- }
284
313
  }
285
314
  exports.default = AsyncJobService;
286
315
  exports.AsyncJobService = AsyncJobService;
@@ -1 +1 @@
1
- {"version":3,"file":"asyncjobservice.js","sourceRoot":"","sources":["../../src/services/asyncjobservice.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAA+F;AAC/F,+BAAoC;AAEpC,qCAAkC;AAClC,iCAAiC;AACjC,iCAA6C;AAY7C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAiB;IA+B9D,YAAY,MAAW;;QACrB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,MAAA,IAAI,CAAC,GAAG,oCAAR,IAAI,CAAC,GAAG,GAAK,aAAa,EAAC;QAC3B,MAAA,IAAI,CAAC,KAAK,oCAAV,IAAI,CAAC,KAAK,GAAK,mBAAmB,EAAC;QACnC,MAAA,IAAI,CAAC,KAAK,oCAAV,IAAI,CAAC,KAAK,GAAK,cAAc,EAAC;QAC9B,MAAA,IAAI,CAAC,OAAO,oC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CAAC,QAAQ,EAChB;oBACE,YAAY,EAAE,GAAG,CAAC,OAAO;oBACzB,MAAM,EAAE,OAAO;iBAChB,EACD;oBACE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;iBAClC,CACF,CAAC;gBACF,OAAO;aACR;YACD,gBAAgB;YAChB,MAAM,eAAK,CAAC,IAAI,CACd,OAAO,CAAC,QAAQ,EAChB;gBACE,OAAO;gBACP,MAAM,EAAE,SAAS;aAClB,EACD;gBACE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;aAClC,CACF,CAAC;QACJ,CAAC;KAAA;;AA9TH,kCA+TC;AAEQ,0CAAe;AAhTtB;;GAEG;AACI,yBAAS,GAAW,QAAQ,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
- import { AgentInfo, Runner, RunnerParameters } from "./runner";
3
- import { AsyncAction } from "../models";
4
- import { SpawnOptions } from "child_process";
5
2
  import { ServiceParameters } from "@webda/core";
3
+ import { SpawnOptions } from "child_process";
4
+ import { AsyncAction } from "../models";
6
5
  import { JobInfo } from "./asyncjobservice";
6
+ import { AgentInfo, Runner, RunnerParameters } from "./runner";
7
7
  export declare class LocalRunnerParameters extends RunnerParameters {
8
8
  /**
9
9
  * Command to launch
@@ -34,6 +34,8 @@ export interface ProcessAction {
34
34
  }
35
35
  /**
36
36
  * Run a Job locally on the server by spawning a child process
37
+ *
38
+ * @WebdaModda
37
39
  */
38
40
  export default class LocalRunner<T extends LocalRunnerParameters = LocalRunnerParameters> extends Runner<T> {
39
41
  /**
@@ -44,12 +46,4 @@ export default class LocalRunner<T extends LocalRunnerParameters = LocalRunnerPa
44
46
  * @inheritdoc
45
47
  */
46
48
  launchAction(action: AsyncAction, info: JobInfo): Promise<ProcessAction>;
47
- /**
48
- * @inheritdoc
49
- */
50
- static getModda(): {
51
- uuid: string;
52
- label: string;
53
- description: string;
54
- };
55
49
  }
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.LocalRunnerParameters = void 0;
13
- const runner_1 = require("./runner");
14
13
  const child_process_1 = require("child_process");
14
+ const runner_1 = require("./runner");
15
15
  class LocalRunnerParameters extends runner_1.RunnerParameters {
16
16
  constructor(params) {
17
17
  var _a, _b;
@@ -24,6 +24,8 @@ class LocalRunnerParameters extends runner_1.RunnerParameters {
24
24
  exports.LocalRunnerParameters = LocalRunnerParameters;
25
25
  /**
26
26
  * Run a Job locally on the server by spawning a child process
27
+ *
28
+ * @WebdaModda
27
29
  */
28
30
  class LocalRunner extends runner_1.Runner {
29
31
  /**
@@ -38,7 +40,9 @@ class LocalRunner extends runner_1.Runner {
38
40
  launchAction(action, info) {
39
41
  return __awaiter(this, void 0, void 0, function* () {
40
42
  let envs = Object.assign(Object.assign({}, this.parameters.options.env), info);
41
- this.log("INFO", "Job", action.getUuid(), "started with", this.parameters.command, this.parameters.args);
43
+ this.log("INFO", "Job", action.getUuid(), "started with", Object.keys(envs)
44
+ .map(k => `${k}=${envs[k]}`)
45
+ .join(" "), this.parameters.command, this.parameters.args ? this.parameters.args.map(a => `'${a}'`).join(" ") : "");
42
46
  const child = (0, child_process_1.spawn)(this.parameters.command, this.parameters.args, Object.assign(Object.assign({}, this.parameters.options), { env: envs, detached: true }));
43
47
  // AutoStatus based on process info
44
48
  if (this.parameters.autoStatus) {
@@ -67,16 +71,6 @@ class LocalRunner extends runner_1.Runner {
67
71
  };
68
72
  });
69
73
  }
70
- /**
71
- * @inheritdoc
72
- */
73
- static getModda() {
74
- return {
75
- uuid: "Webda/LocalRunner",
76
- label: "Local Runner",
77
- description: "Implements a runner that launch a local program"
78
- };
79
- }
80
74
  }
81
75
  exports.default = LocalRunner;
82
76
  //# sourceMappingURL=localrunner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localrunner.js","sourceRoot":"","sources":["../../src/services/localrunner.ts"],"names":[],"m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E,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;qBAC5E;yBAAM;wBACL,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;wBACxD,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;qBAC9E;gBACH,CAAC,CAAA,CAAC,CAAC;aACJ;YAED,OAAO;gBACL,KAAK,EAAE,eAAM,CAAC,YAAY,EAAE;gBAC5B,GAAG,EAAE,KAAK,CAAC,GAAG;aACf,CAAC;QACJ,CAAC;KAAA;CACF;AA3DD,8BA2DC"}
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "@webda/async",
3
- "version": "1.6.0-beta.3",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "Async System",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
- "webda-module": "webda module --noCompile",
8
7
  "build": "tsc",
9
8
  "pretest": "npm run build",
10
9
  "test": "nyc mocha --recursive --exit --timeout=100000 -r ../../node_modules/ts-node/register src/**/*.spec.ts",
@@ -20,18 +19,18 @@
20
19
  ],
21
20
  "dependencies": {
22
21
  "@types/node": "^16.4.14",
23
- "@webda/core": "^1.6.0-beta.3",
24
- "axios": "^0.24.0"
22
+ "@webda/core": "^2.0.0-beta.2",
23
+ "axios": "^0.27.2"
25
24
  },
26
25
  "devDependencies": {
27
26
  "@istanbuljs/nyc-config-typescript": "^1.0.1",
28
27
  "@types/node": "14.0.0",
29
- "mocha": "^9.0.3",
28
+ "mocha": "^10.0.0",
30
29
  "nyc": "^15.1.0",
31
- "sinon": "^12.0.1",
30
+ "sinon": "^14.0.0",
32
31
  "source-map-support": "^0.5.19",
33
32
  "ts-node": "^10.2.0",
34
- "typescript": "~4.4.3"
33
+ "typescript": "~4.6.4"
35
34
  },
36
35
  "nyc": {
37
36
  "extends": "@istanbuljs/nyc-config-typescript",
@@ -39,7 +38,8 @@
39
38
  "reporter": [
40
39
  "html",
41
40
  "lcov",
42
- "json"
41
+ "json",
42
+ "text"
43
43
  ],
44
44
  "exclude": [
45
45
  "**/*.spec.ts"
@@ -59,5 +59,5 @@
59
59
  "webda": {
60
60
  "namespace": "Webda"
61
61
  },
62
- "gitHead": "81e1c4249e565e719784c0bbdf09f0a858416034"
62
+ "gitHead": "4928e6830cd4164166d00195ff2fef0d52bf0ba6"
63
63
  }
package/webda.module.json CHANGED
@@ -1,684 +1,10 @@
1
1
  {
2
- "services": {
3
- "Webda/AsyncJobService": "lib/services/asyncjobservice.js",
4
- "Webda/LocalRunner": "lib/services/localrunner.js"
2
+ "moddas": {
3
+ "webda/asyncjobservice": "lib/services/asyncjobservice:default",
4
+ "webda/localrunner": "lib/services/localrunner:default"
5
5
  },
6
6
  "models": {
7
- "Webda/AsyncAction": "lib/models.js"
7
+ "webda/asyncaction": "lib/models:default"
8
8
  },
9
- "deployers": {},
10
- "schemas": {
11
- "Webda/AsyncJobService": {
12
- "type": "object",
13
- "properties": {
14
- "store": {
15
- "description": "Store name to use for async actions",
16
- "default": "AsyncActions",
17
- "type": "string"
18
- },
19
- "queue": {
20
- "description": "Queue to post execution to",
21
- "default": "AsyncActionsQueue",
22
- "type": "string"
23
- },
24
- "url": {
25
- "description": "URL to expose job status report hook",
26
- "default": "/async/jobs",
27
- "type": "string"
28
- },
29
- "fallbackOnFirst": {
30
- "description": "Fallback on first runner if none match",
31
- "default": false,
32
- "type": "boolean"
33
- },
34
- "runners": {
35
- "description": "Runners to use",
36
- "type": "array",
37
- "items": {
38
- "type": "string"
39
- }
40
- },
41
- "concurrencyLimit": {
42
- "description": "Limit the maximum number of jobs running in //",
43
- "type": "number"
44
- },
45
- "type": {
46
- "description": "Type of the service",
47
- "type": "string"
48
- }
49
- },
50
- "required": [
51
- "fallbackOnFirst",
52
- "queue",
53
- "runners",
54
- "store",
55
- "type",
56
- "url"
57
- ],
58
- "$schema": "http://json-schema.org/draft-07/schema#"
59
- },
60
- "Webda/LocalRunner": {
61
- "type": "object",
62
- "properties": {
63
- "command": {
64
- "description": "Command to launch",
65
- "type": "string"
66
- },
67
- "args": {
68
- "description": "Args",
69
- "type": "array",
70
- "items": {
71
- "type": "string"
72
- }
73
- },
74
- "options": {
75
- "$ref": "#/definitions/SpawnOptions",
76
- "description": "Options\n\nBased on https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options"
77
- },
78
- "autoStatus": {
79
- "description": "Use the observability of ChildProcess to update status accordingly",
80
- "type": "boolean"
81
- },
82
- "actions": {
83
- "description": "Actions managed by the runner",
84
- "default": [],
85
- "type": "array",
86
- "items": {
87
- "type": "string"
88
- }
89
- },
90
- "type": {
91
- "description": "Type of the service",
92
- "type": "string"
93
- }
94
- },
95
- "required": [
96
- "command",
97
- "type"
98
- ],
99
- "definitions": {
100
- "SpawnOptions": {
101
- "type": "object",
102
- "properties": {
103
- "detached": {
104
- "type": "boolean"
105
- },
106
- "argv0": {
107
- "type": "string"
108
- },
109
- "stdio": {
110
- "anyOf": [
111
- {
112
- "type": "array",
113
- "items": {
114
- "anyOf": [
115
- {
116
- "$ref": "#/definitions/Stream"
117
- },
118
- {
119
- "enum": [
120
- "ignore",
121
- "inherit",
122
- "ipc",
123
- "overlapped",
124
- "pipe"
125
- ],
126
- "type": "string"
127
- },
128
- {
129
- "type": "number"
130
- }
131
- ]
132
- }
133
- },
134
- {
135
- "enum": [
136
- "ignore",
137
- "inherit",
138
- "overlapped",
139
- "pipe"
140
- ],
141
- "type": "string"
142
- }
143
- ]
144
- },
145
- "shell": {
146
- "type": [
147
- "string",
148
- "boolean"
149
- ]
150
- },
151
- "windowsVerbatimArguments": {
152
- "type": "boolean"
153
- },
154
- "windowsHide": {
155
- "default": true,
156
- "type": "boolean"
157
- },
158
- "timeout": {
159
- "default": 0,
160
- "type": "number"
161
- },
162
- "uid": {
163
- "type": "number"
164
- },
165
- "gid": {
166
- "type": "number"
167
- },
168
- "cwd": {
169
- "anyOf": [
170
- {
171
- "$ref": "#/definitions/URL"
172
- },
173
- {
174
- "type": "string"
175
- }
176
- ]
177
- },
178
- "env": {
179
- "$ref": "#/definitions/NodeJS.ProcessEnv"
180
- },
181
- "serialization": {
182
- "description": "Specify the kind of serialization used for sending messages between processes.",
183
- "default": "'json'",
184
- "enum": [
185
- "advanced",
186
- "json"
187
- ],
188
- "type": "string"
189
- },
190
- "killSignal": {
191
- "description": "The signal value to be used when the spawned process will be killed by the abort signal.",
192
- "default": "'SIGTERM'",
193
- "anyOf": [
194
- {
195
- "enum": [
196
- "SIGABRT",
197
- "SIGALRM",
198
- "SIGBREAK",
199
- "SIGBUS",
200
- "SIGCHLD",
201
- "SIGCONT",
202
- "SIGFPE",
203
- "SIGHUP",
204
- "SIGILL",
205
- "SIGINFO",
206
- "SIGINT",
207
- "SIGIO",
208
- "SIGIOT",
209
- "SIGKILL",
210
- "SIGLOST",
211
- "SIGPIPE",
212
- "SIGPOLL",
213
- "SIGPROF",
214
- "SIGPWR",
215
- "SIGQUIT",
216
- "SIGSEGV",
217
- "SIGSTKFLT",
218
- "SIGSTOP",
219
- "SIGSYS",
220
- "SIGTERM",
221
- "SIGTRAP",
222
- "SIGTSTP",
223
- "SIGTTIN",
224
- "SIGTTOU",
225
- "SIGUNUSED",
226
- "SIGURG",
227
- "SIGUSR1",
228
- "SIGUSR2",
229
- "SIGVTALRM",
230
- "SIGWINCH",
231
- "SIGXCPU",
232
- "SIGXFSZ"
233
- ],
234
- "type": "string"
235
- },
236
- {
237
- "type": "number"
238
- }
239
- ]
240
- },
241
- "signal": {
242
- "$ref": "#/definitions/AbortSignal",
243
- "description": "When provided the corresponding `AbortController` can be used to cancel an asynchronous action."
244
- }
245
- }
246
- },
247
- "Stream": {
248
- "type": "object"
249
- },
250
- "URL": {
251
- "description": "Browser-compatible `URL` class, implemented by following the WHATWG URL\nStandard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.\nThe `URL` class is also available on the global object.\n\nIn accordance with browser conventions, all properties of `URL` objects\nare implemented as getters and setters on the class prototype, rather than as\ndata properties on the object itself. Thus, unlike `legacy urlObject` s,\nusing the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still\nreturn `true`.",
252
- "type": "object",
253
- "properties": {
254
- "hash": {
255
- "description": "Gets and sets the fragment portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/foo#bar');\nconsole.log(myURL.hash);\n// Prints #bar\n\nmyURL.hash = 'baz';\nconsole.log(myURL.href);\n// Prints https://example.org/foo#baz\n```\n\nInvalid URL characters included in the value assigned to the `hash` property\nare `percent-encoded`. The selection of which characters to\npercent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
256
- "type": "string"
257
- },
258
- "host": {
259
- "description": "Gets and sets the host portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org:81/foo');\nconsole.log(myURL.host);\n// Prints example.org:81\n\nmyURL.host = 'example.com:82';\nconsole.log(myURL.href);\n// Prints https://example.com:82/foo\n```\n\nInvalid host values assigned to the `host` property are ignored.",
260
- "type": "string"
261
- },
262
- "hostname": {
263
- "description": "Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the\nport.\n\n```js\nconst myURL = new URL('https://example.org:81/foo');\nconsole.log(myURL.hostname);\n// Prints example.org\n\n// Setting the hostname does not change the port\nmyURL.hostname = 'example.com:82';\nconsole.log(myURL.href);\n// Prints https://example.com:81/foo\n\n// Use myURL.host to change the hostname and port\nmyURL.host = 'example.org:82';\nconsole.log(myURL.href);\n// Prints https://example.org:82/foo\n```\n\nInvalid host name values assigned to the `hostname` property are ignored.",
264
- "type": "string"
265
- },
266
- "href": {
267
- "description": "Gets and sets the serialized URL.\n\n```js\nconst myURL = new URL('https://example.org/foo');\nconsole.log(myURL.href);\n// Prints https://example.org/foo\n\nmyURL.href = 'https://example.com/bar';\nconsole.log(myURL.href);\n// Prints https://example.com/bar\n```\n\nGetting the value of the `href` property is equivalent to calling {@link toString}.\n\nSetting the value of this property to a new value is equivalent to creating a\nnew `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.\n\nIf the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.",
268
- "type": "string"
269
- },
270
- "origin": {
271
- "description": "Gets the read-only serialization of the URL's origin.\n\n```js\nconst myURL = new URL('https://example.org/foo/bar?baz');\nconsole.log(myURL.origin);\n// Prints https://example.org\n```\n\n```js\nconst idnURL = new URL('https://測試');\nconsole.log(idnURL.origin);\n// Prints https://xn--g6w251d\n\nconsole.log(idnURL.hostname);\n// Prints xn--g6w251d\n```",
272
- "type": "string"
273
- },
274
- "password": {
275
- "description": "Gets and sets the password portion of the URL.\n\n```js\nconst myURL = new URL('https://abc:xyz@example.com');\nconsole.log(myURL.password);\n// Prints xyz\n\nmyURL.password = '123';\nconsole.log(myURL.href);\n// Prints https://abc:123@example.com\n```\n\nInvalid URL characters included in the value assigned to the `password` property\nare `percent-encoded`. The selection of which characters to\npercent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
276
- "type": "string"
277
- },
278
- "pathname": {
279
- "description": "Gets and sets the path portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/abc/xyz?123');\nconsole.log(myURL.pathname);\n// Prints /abc/xyz\n\nmyURL.pathname = '/abcdef';\nconsole.log(myURL.href);\n// Prints https://example.org/abcdef?123\n```\n\nInvalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters\nto percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
280
- "type": "string"
281
- },
282
- "port": {
283
- "description": "Gets and sets the port portion of the URL.\n\nThe port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will\nresult in the `port` value becoming\nthe empty string (`''`).\n\nThe port value can be an empty string in which case the port depends on\nthe protocol/scheme:\n\n<omitted>\n\nUpon assigning a value to the port, the value will first be converted to a\nstring using `.toString()`.\n\nIf that string is invalid but it begins with a number, the leading number is\nassigned to `port`.\nIf the number lies outside the range denoted above, it is ignored.\n\n```js\nconst myURL = new URL('https://example.org:8888');\nconsole.log(myURL.port);\n// Prints 8888\n\n// Default ports are automatically transformed to the empty string\n// (HTTPS protocol's default port is 443)\nmyURL.port = '443';\nconsole.log(myURL.port);\n// Prints the empty string\nconsole.log(myURL.href);\n// Prints https://example.org/\n\nmyURL.port = 1234;\nconsole.log(myURL.port);\n// Prints 1234\nconsole.log(myURL.href);\n// Prints https://example.org:1234/\n\n// Completely invalid port strings are ignored\nmyURL.port = 'abcd';\nconsole.log(myURL.port);\n// Prints 1234\n\n// Leading numbers are treated as a port number\nmyURL.port = '5678abcd';\nconsole.log(myURL.port);\n// Prints 5678\n\n// Non-integers are truncated\nmyURL.port = 1234.5678;\nconsole.log(myURL.port);\n// Prints 1234\n\n// Out-of-range numbers which are not represented in scientific notation\n// will be ignored.\nmyURL.port = 1e10; // 10000000000, will be range-checked as described below\nconsole.log(myURL.port);\n// Prints 1234\n```\n\nNumbers which contain a decimal point,\nsuch as floating-point numbers or numbers in scientific notation,\nare not an exception to this rule.\nLeading numbers up to the decimal point will be set as the URL's port,\nassuming they are valid:\n\n```js\nmyURL.port = 4.567e21;\nconsole.log(myURL.port);\n// Prints 4 (because it is the leading number in the string '4.567e21')\n```",
284
- "type": "string"
285
- },
286
- "protocol": {
287
- "description": "Gets and sets the protocol portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org');\nconsole.log(myURL.protocol);\n// Prints https:\n\nmyURL.protocol = 'ftp';\nconsole.log(myURL.href);\n// Prints ftp://example.org/\n```\n\nInvalid URL protocol values assigned to the `protocol` property are ignored.",
288
- "type": "string"
289
- },
290
- "search": {
291
- "description": "Gets and sets the serialized query portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/abc?123');\nconsole.log(myURL.search);\n// Prints ?123\n\nmyURL.search = 'abc=xyz';\nconsole.log(myURL.href);\n// Prints https://example.org/abc?abc=xyz\n```\n\nAny invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which\ncharacters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
292
- "type": "string"
293
- },
294
- "searchParams": {
295
- "$ref": "#/definitions/URLSearchParams",
296
- "description": "Gets the `URLSearchParams` object representing the query parameters of the\nURL. This property is read-only but the `URLSearchParams` object it provides\ncan be used to mutate the URL instance; to replace the entirety of query\nparameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.\n\nUse care when using `.searchParams` to modify the `URL` because,\nper the WHATWG specification, the `URLSearchParams` object uses\ndifferent rules to determine which characters to percent-encode. For\ninstance, the `URL` object will not percent encode the ASCII tilde (`~`)\ncharacter, while `URLSearchParams` will always encode it:\n\n```js\nconst myUrl = new URL('https://example.org/abc?foo=~bar');\n\nconsole.log(myUrl.search); // prints ?foo=~bar\n\n// Modify the URL via searchParams...\nmyUrl.searchParams.sort();\n\nconsole.log(myUrl.search); // prints ?foo=%7Ebar\n```"
297
- },
298
- "username": {
299
- "description": "Gets and sets the username portion of the URL.\n\n```js\nconst myURL = new URL('https://abc:xyz@example.com');\nconsole.log(myURL.username);\n// Prints abc\n\nmyURL.username = '123';\nconsole.log(myURL.href);\n// Prints https://123:xyz@example.com/\n```\n\nAny invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which\ncharacters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
300
- "type": "string"
301
- }
302
- },
303
- "required": [
304
- "hash",
305
- "host",
306
- "hostname",
307
- "href",
308
- "origin",
309
- "password",
310
- "pathname",
311
- "port",
312
- "protocol",
313
- "search",
314
- "searchParams",
315
- "username"
316
- ]
317
- },
318
- "URLSearchParams": {
319
- "description": "The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the\nfour following constructors.\nThe `URLSearchParams` class is also available on the global object.\n\nThe WHATWG `URLSearchParams` interface and the `querystring` module have\nsimilar purpose, but the purpose of the `querystring` module is more\ngeneral, as it allows the customization of delimiter characters (`&#x26;` and `=`).\nOn the other hand, this API is designed purely for URL query strings.\n\n```js\nconst myURL = new URL('https://example.org/?abc=123');\nconsole.log(myURL.searchParams.get('abc'));\n// Prints 123\n\nmyURL.searchParams.append('abc', 'xyz');\nconsole.log(myURL.href);\n// Prints https://example.org/?abc=123&#x26;abc=xyz\n\nmyURL.searchParams.delete('abc');\nmyURL.searchParams.set('a', 'b');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b\n\nconst newSearchParams = new URLSearchParams(myURL.searchParams);\n// The above is equivalent to\n// const newSearchParams = new URLSearchParams(myURL.search);\n\nnewSearchParams.append('a', 'c');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b\nconsole.log(newSearchParams.toString());\n// Prints a=b&#x26;a=c\n\n// newSearchParams.toString() is implicitly called\nmyURL.search = newSearchParams;\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b&#x26;a=c\nnewSearchParams.delete('a');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b&#x26;a=c\n```",
320
- "type": "object"
321
- },
322
- "NodeJS.ProcessEnv": {
323
- "type": "object",
324
- "properties": {
325
- "TZ": {
326
- "description": "Can be used to change the default timezone at runtime",
327
- "type": "string"
328
- }
329
- }
330
- },
331
- "AbortSignal": {
332
- "type": "object",
333
- "properties": {
334
- "aborted": {
335
- "type": "boolean"
336
- },
337
- "onabort": {
338
- "type": "object"
339
- }
340
- },
341
- "required": [
342
- "aborted",
343
- "onabort"
344
- ]
345
- },
346
- "Job": {
347
- "description": "Job information",
348
- "type": "object"
349
- }
350
- },
351
- "$schema": "http://json-schema.org/draft-07/schema#"
352
- },
353
- "Webda/AsyncAction": {
354
- "description": "Define here a model that can be used along with Store service",
355
- "type": "object",
356
- "properties": {
357
- "status": {
358
- "description": "Current status",
359
- "enum": [
360
- "ERROR",
361
- "QUEUED",
362
- "RUNNING",
363
- "STARTING",
364
- "SUCCESS",
365
- "TIMEOUT"
366
- ],
367
- "type": "string"
368
- },
369
- "job": {
370
- "$ref": "#/definitions/Job",
371
- "description": "Job information"
372
- },
373
- "_lastJobUpdate": {
374
- "description": "Last time the job was updated",
375
- "type": "number"
376
- },
377
- "results": {
378
- "description": "Results from the job"
379
- },
380
- "statusDetails": {
381
- "description": "Job current status"
382
- },
383
- "type": {
384
- "type": "string"
385
- },
386
- "arguments": {
387
- "type": "array",
388
- "items": {}
389
- },
390
- "logs": {
391
- "description": "Current logs",
392
- "type": "array",
393
- "items": {
394
- "type": "string"
395
- }
396
- },
397
- "__secretKey": {
398
- "description": "Secret key to post feedback",
399
- "type": "string"
400
- },
401
- "action": {
402
- "description": "Expected action for the job\n\nIt should be a verb",
403
- "type": "string"
404
- },
405
- "_creationDate": {
406
- "description": "Creation date",
407
- "type": "string",
408
- "format": "date-time"
409
- },
410
- "_lastUpdate": {
411
- "description": "Last update date",
412
- "type": "string",
413
- "format": "date-time"
414
- }
415
- },
416
- "required": [
417
- "__secretKey",
418
- "_creationDate",
419
- "_lastJobUpdate",
420
- "_lastUpdate",
421
- "arguments",
422
- "job",
423
- "logs",
424
- "results",
425
- "status",
426
- "statusDetails",
427
- "type"
428
- ],
429
- "definitions": {
430
- "SpawnOptions": {
431
- "type": "object",
432
- "properties": {
433
- "detached": {
434
- "type": "boolean"
435
- },
436
- "argv0": {
437
- "type": "string"
438
- },
439
- "stdio": {
440
- "anyOf": [
441
- {
442
- "type": "array",
443
- "items": {
444
- "anyOf": [
445
- {
446
- "$ref": "#/definitions/Stream"
447
- },
448
- {
449
- "enum": [
450
- "ignore",
451
- "inherit",
452
- "ipc",
453
- "overlapped",
454
- "pipe"
455
- ],
456
- "type": "string"
457
- },
458
- {
459
- "type": "number"
460
- }
461
- ]
462
- }
463
- },
464
- {
465
- "enum": [
466
- "ignore",
467
- "inherit",
468
- "overlapped",
469
- "pipe"
470
- ],
471
- "type": "string"
472
- }
473
- ]
474
- },
475
- "shell": {
476
- "type": [
477
- "string",
478
- "boolean"
479
- ]
480
- },
481
- "windowsVerbatimArguments": {
482
- "type": "boolean"
483
- },
484
- "windowsHide": {
485
- "default": true,
486
- "type": "boolean"
487
- },
488
- "timeout": {
489
- "default": 0,
490
- "type": "number"
491
- },
492
- "uid": {
493
- "type": "number"
494
- },
495
- "gid": {
496
- "type": "number"
497
- },
498
- "cwd": {
499
- "anyOf": [
500
- {
501
- "$ref": "#/definitions/URL"
502
- },
503
- {
504
- "type": "string"
505
- }
506
- ]
507
- },
508
- "env": {
509
- "$ref": "#/definitions/NodeJS.ProcessEnv"
510
- },
511
- "serialization": {
512
- "description": "Specify the kind of serialization used for sending messages between processes.",
513
- "default": "'json'",
514
- "enum": [
515
- "advanced",
516
- "json"
517
- ],
518
- "type": "string"
519
- },
520
- "killSignal": {
521
- "description": "The signal value to be used when the spawned process will be killed by the abort signal.",
522
- "default": "'SIGTERM'",
523
- "anyOf": [
524
- {
525
- "enum": [
526
- "SIGABRT",
527
- "SIGALRM",
528
- "SIGBREAK",
529
- "SIGBUS",
530
- "SIGCHLD",
531
- "SIGCONT",
532
- "SIGFPE",
533
- "SIGHUP",
534
- "SIGILL",
535
- "SIGINFO",
536
- "SIGINT",
537
- "SIGIO",
538
- "SIGIOT",
539
- "SIGKILL",
540
- "SIGLOST",
541
- "SIGPIPE",
542
- "SIGPOLL",
543
- "SIGPROF",
544
- "SIGPWR",
545
- "SIGQUIT",
546
- "SIGSEGV",
547
- "SIGSTKFLT",
548
- "SIGSTOP",
549
- "SIGSYS",
550
- "SIGTERM",
551
- "SIGTRAP",
552
- "SIGTSTP",
553
- "SIGTTIN",
554
- "SIGTTOU",
555
- "SIGUNUSED",
556
- "SIGURG",
557
- "SIGUSR1",
558
- "SIGUSR2",
559
- "SIGVTALRM",
560
- "SIGWINCH",
561
- "SIGXCPU",
562
- "SIGXFSZ"
563
- ],
564
- "type": "string"
565
- },
566
- {
567
- "type": "number"
568
- }
569
- ]
570
- },
571
- "signal": {
572
- "$ref": "#/definitions/AbortSignal",
573
- "description": "When provided the corresponding `AbortController` can be used to cancel an asynchronous action."
574
- }
575
- }
576
- },
577
- "Stream": {
578
- "type": "object"
579
- },
580
- "URL": {
581
- "description": "Browser-compatible `URL` class, implemented by following the WHATWG URL\nStandard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.\nThe `URL` class is also available on the global object.\n\nIn accordance with browser conventions, all properties of `URL` objects\nare implemented as getters and setters on the class prototype, rather than as\ndata properties on the object itself. Thus, unlike `legacy urlObject` s,\nusing the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still\nreturn `true`.",
582
- "type": "object",
583
- "properties": {
584
- "hash": {
585
- "description": "Gets and sets the fragment portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/foo#bar');\nconsole.log(myURL.hash);\n// Prints #bar\n\nmyURL.hash = 'baz';\nconsole.log(myURL.href);\n// Prints https://example.org/foo#baz\n```\n\nInvalid URL characters included in the value assigned to the `hash` property\nare `percent-encoded`. The selection of which characters to\npercent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
586
- "type": "string"
587
- },
588
- "host": {
589
- "description": "Gets and sets the host portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org:81/foo');\nconsole.log(myURL.host);\n// Prints example.org:81\n\nmyURL.host = 'example.com:82';\nconsole.log(myURL.href);\n// Prints https://example.com:82/foo\n```\n\nInvalid host values assigned to the `host` property are ignored.",
590
- "type": "string"
591
- },
592
- "hostname": {
593
- "description": "Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the\nport.\n\n```js\nconst myURL = new URL('https://example.org:81/foo');\nconsole.log(myURL.hostname);\n// Prints example.org\n\n// Setting the hostname does not change the port\nmyURL.hostname = 'example.com:82';\nconsole.log(myURL.href);\n// Prints https://example.com:81/foo\n\n// Use myURL.host to change the hostname and port\nmyURL.host = 'example.org:82';\nconsole.log(myURL.href);\n// Prints https://example.org:82/foo\n```\n\nInvalid host name values assigned to the `hostname` property are ignored.",
594
- "type": "string"
595
- },
596
- "href": {
597
- "description": "Gets and sets the serialized URL.\n\n```js\nconst myURL = new URL('https://example.org/foo');\nconsole.log(myURL.href);\n// Prints https://example.org/foo\n\nmyURL.href = 'https://example.com/bar';\nconsole.log(myURL.href);\n// Prints https://example.com/bar\n```\n\nGetting the value of the `href` property is equivalent to calling {@link toString}.\n\nSetting the value of this property to a new value is equivalent to creating a\nnew `URL` object using `new URL(value)`. Each of the `URL`object's properties will be modified.\n\nIf the value assigned to the `href` property is not a valid URL, a `TypeError`will be thrown.",
598
- "type": "string"
599
- },
600
- "origin": {
601
- "description": "Gets the read-only serialization of the URL's origin.\n\n```js\nconst myURL = new URL('https://example.org/foo/bar?baz');\nconsole.log(myURL.origin);\n// Prints https://example.org\n```\n\n```js\nconst idnURL = new URL('https://測試');\nconsole.log(idnURL.origin);\n// Prints https://xn--g6w251d\n\nconsole.log(idnURL.hostname);\n// Prints xn--g6w251d\n```",
602
- "type": "string"
603
- },
604
- "password": {
605
- "description": "Gets and sets the password portion of the URL.\n\n```js\nconst myURL = new URL('https://abc:xyz@example.com');\nconsole.log(myURL.password);\n// Prints xyz\n\nmyURL.password = '123';\nconsole.log(myURL.href);\n// Prints https://abc:123@example.com\n```\n\nInvalid URL characters included in the value assigned to the `password` property\nare `percent-encoded`. The selection of which characters to\npercent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
606
- "type": "string"
607
- },
608
- "pathname": {
609
- "description": "Gets and sets the path portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/abc/xyz?123');\nconsole.log(myURL.pathname);\n// Prints /abc/xyz\n\nmyURL.pathname = '/abcdef';\nconsole.log(myURL.href);\n// Prints https://example.org/abcdef?123\n```\n\nInvalid URL characters included in the value assigned to the `pathname`property are `percent-encoded`. The selection of which characters\nto percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
610
- "type": "string"
611
- },
612
- "port": {
613
- "description": "Gets and sets the port portion of the URL.\n\nThe port value may be a number or a string containing a number in the range`0` to `65535` (inclusive). Setting the value to the default port of the`URL` objects given `protocol` will\nresult in the `port` value becoming\nthe empty string (`''`).\n\nThe port value can be an empty string in which case the port depends on\nthe protocol/scheme:\n\n<omitted>\n\nUpon assigning a value to the port, the value will first be converted to a\nstring using `.toString()`.\n\nIf that string is invalid but it begins with a number, the leading number is\nassigned to `port`.\nIf the number lies outside the range denoted above, it is ignored.\n\n```js\nconst myURL = new URL('https://example.org:8888');\nconsole.log(myURL.port);\n// Prints 8888\n\n// Default ports are automatically transformed to the empty string\n// (HTTPS protocol's default port is 443)\nmyURL.port = '443';\nconsole.log(myURL.port);\n// Prints the empty string\nconsole.log(myURL.href);\n// Prints https://example.org/\n\nmyURL.port = 1234;\nconsole.log(myURL.port);\n// Prints 1234\nconsole.log(myURL.href);\n// Prints https://example.org:1234/\n\n// Completely invalid port strings are ignored\nmyURL.port = 'abcd';\nconsole.log(myURL.port);\n// Prints 1234\n\n// Leading numbers are treated as a port number\nmyURL.port = '5678abcd';\nconsole.log(myURL.port);\n// Prints 5678\n\n// Non-integers are truncated\nmyURL.port = 1234.5678;\nconsole.log(myURL.port);\n// Prints 1234\n\n// Out-of-range numbers which are not represented in scientific notation\n// will be ignored.\nmyURL.port = 1e10; // 10000000000, will be range-checked as described below\nconsole.log(myURL.port);\n// Prints 1234\n```\n\nNumbers which contain a decimal point,\nsuch as floating-point numbers or numbers in scientific notation,\nare not an exception to this rule.\nLeading numbers up to the decimal point will be set as the URL's port,\nassuming they are valid:\n\n```js\nmyURL.port = 4.567e21;\nconsole.log(myURL.port);\n// Prints 4 (because it is the leading number in the string '4.567e21')\n```",
614
- "type": "string"
615
- },
616
- "protocol": {
617
- "description": "Gets and sets the protocol portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org');\nconsole.log(myURL.protocol);\n// Prints https:\n\nmyURL.protocol = 'ftp';\nconsole.log(myURL.href);\n// Prints ftp://example.org/\n```\n\nInvalid URL protocol values assigned to the `protocol` property are ignored.",
618
- "type": "string"
619
- },
620
- "search": {
621
- "description": "Gets and sets the serialized query portion of the URL.\n\n```js\nconst myURL = new URL('https://example.org/abc?123');\nconsole.log(myURL.search);\n// Prints ?123\n\nmyURL.search = 'abc=xyz';\nconsole.log(myURL.href);\n// Prints https://example.org/abc?abc=xyz\n```\n\nAny invalid URL characters appearing in the value assigned the `search`property will be `percent-encoded`. The selection of which\ncharacters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
622
- "type": "string"
623
- },
624
- "searchParams": {
625
- "$ref": "#/definitions/URLSearchParams",
626
- "description": "Gets the `URLSearchParams` object representing the query parameters of the\nURL. This property is read-only but the `URLSearchParams` object it provides\ncan be used to mutate the URL instance; to replace the entirety of query\nparameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.\n\nUse care when using `.searchParams` to modify the `URL` because,\nper the WHATWG specification, the `URLSearchParams` object uses\ndifferent rules to determine which characters to percent-encode. For\ninstance, the `URL` object will not percent encode the ASCII tilde (`~`)\ncharacter, while `URLSearchParams` will always encode it:\n\n```js\nconst myUrl = new URL('https://example.org/abc?foo=~bar');\n\nconsole.log(myUrl.search); // prints ?foo=~bar\n\n// Modify the URL via searchParams...\nmyUrl.searchParams.sort();\n\nconsole.log(myUrl.search); // prints ?foo=%7Ebar\n```"
627
- },
628
- "username": {
629
- "description": "Gets and sets the username portion of the URL.\n\n```js\nconst myURL = new URL('https://abc:xyz@example.com');\nconsole.log(myURL.username);\n// Prints abc\n\nmyURL.username = '123';\nconsole.log(myURL.href);\n// Prints https://123:xyz@example.com/\n```\n\nAny invalid URL characters appearing in the value assigned the `username`property will be `percent-encoded`. The selection of which\ncharacters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.",
630
- "type": "string"
631
- }
632
- },
633
- "required": [
634
- "hash",
635
- "host",
636
- "hostname",
637
- "href",
638
- "origin",
639
- "password",
640
- "pathname",
641
- "port",
642
- "protocol",
643
- "search",
644
- "searchParams",
645
- "username"
646
- ]
647
- },
648
- "URLSearchParams": {
649
- "description": "The `URLSearchParams` API provides read and write access to the query of a`URL`. The `URLSearchParams` class can also be used standalone with one of the\nfour following constructors.\nThe `URLSearchParams` class is also available on the global object.\n\nThe WHATWG `URLSearchParams` interface and the `querystring` module have\nsimilar purpose, but the purpose of the `querystring` module is more\ngeneral, as it allows the customization of delimiter characters (`&#x26;` and `=`).\nOn the other hand, this API is designed purely for URL query strings.\n\n```js\nconst myURL = new URL('https://example.org/?abc=123');\nconsole.log(myURL.searchParams.get('abc'));\n// Prints 123\n\nmyURL.searchParams.append('abc', 'xyz');\nconsole.log(myURL.href);\n// Prints https://example.org/?abc=123&#x26;abc=xyz\n\nmyURL.searchParams.delete('abc');\nmyURL.searchParams.set('a', 'b');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b\n\nconst newSearchParams = new URLSearchParams(myURL.searchParams);\n// The above is equivalent to\n// const newSearchParams = new URLSearchParams(myURL.search);\n\nnewSearchParams.append('a', 'c');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b\nconsole.log(newSearchParams.toString());\n// Prints a=b&#x26;a=c\n\n// newSearchParams.toString() is implicitly called\nmyURL.search = newSearchParams;\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b&#x26;a=c\nnewSearchParams.delete('a');\nconsole.log(myURL.href);\n// Prints https://example.org/?a=b&#x26;a=c\n```",
650
- "type": "object"
651
- },
652
- "NodeJS.ProcessEnv": {
653
- "type": "object",
654
- "properties": {
655
- "TZ": {
656
- "description": "Can be used to change the default timezone at runtime",
657
- "type": "string"
658
- }
659
- }
660
- },
661
- "AbortSignal": {
662
- "type": "object",
663
- "properties": {
664
- "aborted": {
665
- "type": "boolean"
666
- },
667
- "onabort": {
668
- "type": "object"
669
- }
670
- },
671
- "required": [
672
- "aborted",
673
- "onabort"
674
- ]
675
- },
676
- "Job": {
677
- "description": "Job information",
678
- "type": "object"
679
- }
680
- },
681
- "$schema": "http://json-schema.org/draft-07/schema#"
682
- }
683
- }
684
- }
9
+ "deployers": {}
10
+ }