@angular-devkit/architect 0.1900.0-next.1 → 0.1900.0-next.10
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/LICENSE +5 -5
- package/package.json +3 -3
- package/src/architect.js +2 -4
- package/src/options.d.ts +12 -0
- package/src/options.js +29 -0
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
copies or substantial portions of the Software.
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
SOFTWARE.
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/architect",
|
|
3
|
-
"version": "0.1900.0-next.
|
|
3
|
+
"version": "0.1900.0-next.10",
|
|
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": "19.0.0-next.
|
|
9
|
+
"@angular-devkit/core": "19.0.0-next.10",
|
|
10
10
|
"rxjs": "7.8.1"
|
|
11
11
|
},
|
|
12
12
|
"builders": "./builders/builders.json",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"devkit",
|
|
18
18
|
"sdk"
|
|
19
19
|
],
|
|
20
|
-
"packageManager": "yarn@4.
|
|
20
|
+
"packageManager": "yarn@4.5.0",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
23
|
"url": "https://github.com/angular/angular-cli.git"
|
package/src/architect.js
CHANGED
|
@@ -12,6 +12,7 @@ const core_1 = require("@angular-devkit/core");
|
|
|
12
12
|
const rxjs_1 = require("rxjs");
|
|
13
13
|
const api_1 = require("./api");
|
|
14
14
|
const jobs_1 = require("./jobs");
|
|
15
|
+
const options_1 = require("./options");
|
|
15
16
|
const schedule_by_name_1 = require("./schedule-by-name");
|
|
16
17
|
const inputSchema = require('./input-schema.json');
|
|
17
18
|
const outputSchema = require('./output-schema.json');
|
|
@@ -28,10 +29,7 @@ function _createJobHandlerFromBuilderInfo(info, target, host, registry, baseOpti
|
|
|
28
29
|
const inboundBusWithInputValidation = context.inboundBus.pipe((0, rxjs_1.concatMap)(async (message) => {
|
|
29
30
|
if (message.kind === jobs_1.JobInboundMessageKind.Input) {
|
|
30
31
|
const v = message.value;
|
|
31
|
-
const options =
|
|
32
|
-
...baseOptions,
|
|
33
|
-
...v.options,
|
|
34
|
-
};
|
|
32
|
+
const options = (0, options_1.mergeOptions)(baseOptions, v.options);
|
|
35
33
|
// Validate v against the options schema.
|
|
36
34
|
const validation = await registry.compile(info.optionSchema);
|
|
37
35
|
const validationResult = await validation(options);
|
package/src/options.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { json } from '@angular-devkit/core';
|
|
9
|
+
import { BuilderInput } from './api';
|
|
10
|
+
type OverrideOptions = BuilderInput['options'];
|
|
11
|
+
export declare function mergeOptions(baseOptions: json.JsonObject, overrideOptions: OverrideOptions): json.JsonObject;
|
|
12
|
+
export {};
|
package/src/options.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.mergeOptions = mergeOptions;
|
|
11
|
+
const core_1 = require("@angular-devkit/core");
|
|
12
|
+
function mergeOptions(baseOptions, overrideOptions) {
|
|
13
|
+
if (!overrideOptions) {
|
|
14
|
+
return { ...baseOptions };
|
|
15
|
+
}
|
|
16
|
+
const options = {
|
|
17
|
+
...baseOptions,
|
|
18
|
+
...overrideOptions,
|
|
19
|
+
};
|
|
20
|
+
// For object-object overrides, we merge one layer deep.
|
|
21
|
+
for (const key of Object.keys(overrideOptions)) {
|
|
22
|
+
const override = overrideOptions[key];
|
|
23
|
+
const base = baseOptions[key];
|
|
24
|
+
if (core_1.json.isJsonObject(base) && core_1.json.isJsonObject(override)) {
|
|
25
|
+
options[key] = { ...base, ...override };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return options;
|
|
29
|
+
}
|