@angular-devkit/architect 0.1701.1 → 0.1702.0-next.0
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 +2 -2
- package/src/api.d.ts +3 -2
- package/src/api.js +7 -6
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/architect",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1702.0-next.0",
|
|
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": "17.
|
|
9
|
+
"@angular-devkit/core": "17.2.0-next.0",
|
|
10
10
|
"rxjs": "7.8.1"
|
|
11
11
|
},
|
|
12
12
|
"builders": "./builders/builders.json",
|
package/src/api.d.ts
CHANGED
|
@@ -249,9 +249,10 @@ export type BuilderInfo = json.JsonObject & {
|
|
|
249
249
|
*/
|
|
250
250
|
export declare function targetStringFromTarget({ project, target, configuration }: Target): string;
|
|
251
251
|
/**
|
|
252
|
-
* Return a Target tuple from a string.
|
|
252
|
+
* Return a Target tuple from a specifier string.
|
|
253
|
+
* Supports abbreviated target specifiers (examples: `::`, `::development`, or `:build:production`).
|
|
253
254
|
*/
|
|
254
|
-
export declare function targetFromTargetString(
|
|
255
|
+
export declare function targetFromTargetString(specifier: string, abbreviatedProjectName?: string, abbreviatedTargetName?: string): Target;
|
|
255
256
|
/**
|
|
256
257
|
* Schedule a target, and forget about its run. This will return an observable of outputs, that
|
|
257
258
|
* as a teardown will stop the target from running. This means that the Run object this returns
|
package/src/api.js
CHANGED
|
@@ -51,16 +51,17 @@ function targetStringFromTarget({ project, target, configuration }) {
|
|
|
51
51
|
}
|
|
52
52
|
exports.targetStringFromTarget = targetStringFromTarget;
|
|
53
53
|
/**
|
|
54
|
-
* Return a Target tuple from a string.
|
|
54
|
+
* Return a Target tuple from a specifier string.
|
|
55
|
+
* Supports abbreviated target specifiers (examples: `::`, `::development`, or `:build:production`).
|
|
55
56
|
*/
|
|
56
|
-
function targetFromTargetString(
|
|
57
|
-
const tuple =
|
|
57
|
+
function targetFromTargetString(specifier, abbreviatedProjectName, abbreviatedTargetName) {
|
|
58
|
+
const tuple = specifier.split(':', 3);
|
|
58
59
|
if (tuple.length < 2) {
|
|
59
|
-
throw new Error('Invalid target string: ' + JSON.stringify(
|
|
60
|
+
throw new Error('Invalid target string: ' + JSON.stringify(specifier));
|
|
60
61
|
}
|
|
61
62
|
return {
|
|
62
|
-
project: tuple[0],
|
|
63
|
-
target: tuple[1],
|
|
63
|
+
project: tuple[0] || abbreviatedProjectName || '',
|
|
64
|
+
target: tuple[1] || abbreviatedTargetName || '',
|
|
64
65
|
...(tuple[2] !== undefined && { configuration: tuple[2] }),
|
|
65
66
|
};
|
|
66
67
|
}
|