@angular-devkit/architect 0.2000.0-rc.3 → 0.2000.0-rc.4

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/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@angular-devkit/architect",
3
- "version": "0.2000.0-rc.3",
3
+ "version": "0.2000.0-rc.4",
4
4
  "description": "Angular Build Facade",
5
5
  "experimental": true,
6
6
  "main": "src/index.js",
7
7
  "typings": "src/index.d.ts",
8
8
  "dependencies": {
9
- "@angular-devkit/core": "20.0.0-rc.3",
9
+ "@angular-devkit/core": "20.0.0-rc.4",
10
10
  "rxjs": "7.8.2"
11
11
  },
12
12
  "builders": "./builders/builders.json",
package/src/architect.js CHANGED
@@ -14,14 +14,12 @@ const api_1 = require("./api");
14
14
  const jobs_1 = require("./jobs");
15
15
  const options_1 = require("./options");
16
16
  const schedule_by_name_1 = require("./schedule-by-name");
17
- const inputSchema = require('./input-schema.json');
18
- const outputSchema = require('./output-schema.json');
19
17
  function _createJobHandlerFromBuilderInfo(info, target, host, registry, baseOptions) {
20
18
  const jobDescription = {
21
19
  name: target ? `{${(0, api_1.targetStringFromTarget)(target)}}` : info.builderName,
22
- argument: { type: 'object' },
23
- input: inputSchema,
24
- output: outputSchema,
20
+ argument: true,
21
+ input: true,
22
+ output: true,
25
23
  info,
26
24
  };
27
25
  function handler(argument, context) {
@@ -179,8 +177,6 @@ function _getTargetOptionsFactory(host) {
179
177
  });
180
178
  }, {
181
179
  name: '..getTargetOptions',
182
- output: { type: 'object' },
183
- argument: inputSchema.properties.target,
184
180
  });
185
181
  }
186
182
  function _getProjectMetadataFactory(host) {
@@ -193,10 +189,6 @@ function _getProjectMetadataFactory(host) {
193
189
  });
194
190
  }, {
195
191
  name: '..getProjectMetadata',
196
- output: { type: 'object' },
197
- argument: {
198
- oneOf: [{ type: 'string' }, inputSchema.properties.target],
199
- },
200
192
  });
201
193
  }
202
194
  function _getBuilderNameForTargetFactory(host) {
@@ -208,8 +200,6 @@ function _getBuilderNameForTargetFactory(host) {
208
200
  return builderName;
209
201
  }, {
210
202
  name: '..getBuilderNameForTarget',
211
- output: { type: 'string' },
212
- argument: inputSchema.properties.target,
213
203
  });
214
204
  }
215
205
  function _validateOptionsFactory(host, registry) {
@@ -227,11 +217,6 @@ function _validateOptionsFactory(host, registry) {
227
217
  return data;
228
218
  }, {
229
219
  name: '..validateOptions',
230
- output: { type: 'object' },
231
- argument: {
232
- type: 'array',
233
- items: [{ type: 'string' }, { type: 'object' }],
234
- },
235
220
  });
236
221
  }
237
222
  class Architect {
@@ -104,11 +104,18 @@ class SimpleScheduler {
104
104
  output: handler.jobDescription.output || true,
105
105
  channels: handler.jobDescription.channels || {},
106
106
  };
107
+ const noopValidator = noopSchemaValidator();
107
108
  const handlerWithExtra = Object.assign(handler.bind(undefined), {
108
109
  jobDescription: description,
109
- argumentV: this._schemaRegistry.compile(description.argument),
110
- inputV: this._schemaRegistry.compile(description.input),
111
- outputV: this._schemaRegistry.compile(description.output),
110
+ argumentV: description.argument === true
111
+ ? noopValidator
112
+ : this._schemaRegistry.compile(description.argument),
113
+ inputV: description.input === true
114
+ ? noopValidator
115
+ : this._schemaRegistry.compile(description.input),
116
+ outputV: description.output === true
117
+ ? noopValidator
118
+ : this._schemaRegistry.compile(description.output),
112
119
  });
113
120
  this._internalJobDescriptionMap.set(name, handlerWithExtra);
114
121
  return (0, rxjs_1.of)(handlerWithExtra);
@@ -379,3 +386,9 @@ class SimpleScheduler {
379
386
  }
380
387
  }
381
388
  exports.SimpleScheduler = SimpleScheduler;
389
+ async function noopSchemaValidator() {
390
+ return async (data) => ({
391
+ data,
392
+ success: true,
393
+ });
394
+ }