@rxap/plugin-utilities 16.1.0-dev.20 → 16.1.0-dev.22
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/package.json +9 -9
- package/src/lib/guess-output-path.d.ts +2 -1
- package/src/lib/guess-output-path.js +22 -3
- package/src/lib/guess-output-path.js.map +1 -1
- package/src/lib/project-target.d.ts +2 -2
- package/src/lib/project-target.js +2 -2
- package/src/lib/project-target.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.1.0-dev.22](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.21...@rxap/plugin-utilities@16.1.0-dev.22) (2023-10-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- use default values for project name ([31dc7f1](https://gitlab.com/rxap/packages/commit/31dc7f167c871053461cf24e507e3c88ffb96580))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- add function GuessOutputPathFromTargetString ([d63890d](https://gitlab.com/rxap/packages/commit/d63890d51a6befac589b90a887ca1d57676b3062))
|
|
15
|
+
|
|
16
|
+
# [16.1.0-dev.21](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.20...@rxap/plugin-utilities@16.1.0-dev.21) (2023-10-11)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
19
|
+
|
|
6
20
|
# [16.1.0-dev.20](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.19...@rxap/plugin-utilities@16.1.0-dev.20) (2023-10-11)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @rxap/plugin-utilities
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/plugin-utilities
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0-dev.19 @rxap/node-utilities@^1.1.0-dev.
|
|
20
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0-dev.19 @rxap/node-utilities@^1.1.0-dev.15 @rxap/workspace-utilities@^0.1.0-dev.23 tslib@2.6.2
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.1.0-dev.
|
|
2
|
+
"version": "16.1.0-dev.22",
|
|
3
3
|
"name": "@rxap/plugin-utilities",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"ignore": "
|
|
6
|
+
"ignore": "5.2.4",
|
|
7
7
|
"process": "0.11.10",
|
|
8
|
-
"semver": "
|
|
8
|
+
"semver": "7.5.3",
|
|
9
9
|
"tslib": "2.6.2"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"@nx/devkit": "^16.5.0",
|
|
13
13
|
"@rxap/generator-utilities": "^1.1.0-dev.19",
|
|
14
|
-
"@rxap/node-utilities": "^1.1.0-dev.
|
|
15
|
-
"@rxap/workspace-utilities": "^0.1.0-dev.
|
|
14
|
+
"@rxap/node-utilities": "^1.1.0-dev.15",
|
|
15
|
+
"@rxap/workspace-utilities": "^0.1.0-dev.23",
|
|
16
16
|
"tslib": "2.6.2",
|
|
17
|
-
"@rxap/utilities": "16.0.0-dev.
|
|
17
|
+
"@rxap/utilities": "16.0.0-dev.23"
|
|
18
18
|
},
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Merzough Münker",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"package": "@rxap/node-utilities",
|
|
43
|
-
"version": "1.1.0-dev.
|
|
43
|
+
"version": "1.1.0-dev.15"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"package": "@rxap/workspace-utilities",
|
|
47
|
-
"version": "0.1.0-dev.
|
|
47
|
+
"version": "0.1.0-dev.23"
|
|
48
48
|
}
|
|
49
49
|
]
|
|
50
50
|
},
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"directory": "packages/plugin/utilities"
|
|
59
59
|
},
|
|
60
60
|
"type": "commonjs",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "68411f5a5ebbd4f29fa2316a7c9f04250cbd5d97",
|
|
62
62
|
"main": "./src/index.js",
|
|
63
63
|
"types": "./src/index.d.ts"
|
|
64
64
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ExecutorContext, TargetConfiguration } from '@nx/devkit';
|
|
2
|
-
export declare function GuessOutputPathFromContext(context: ExecutorContext, projectName?: string | undefined, configurationName?: string | undefined): string;
|
|
2
|
+
export declare function GuessOutputPathFromContext(context: ExecutorContext, projectName?: string | undefined, configurationName?: string | undefined, targetName?: string): string;
|
|
3
|
+
export declare function GuessOutputPathFromTargetString(context: ExecutorContext, targetString?: string): string;
|
|
3
4
|
export declare function GuessOutputPath(projectRoot: string, buildTarget: TargetConfiguration, configurationName?: string): string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GuessOutputPath = exports.GuessOutputPathFromContext = void 0;
|
|
3
|
+
exports.GuessOutputPath = exports.GuessOutputPathFromTargetString = exports.GuessOutputPathFromContext = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const get_target_configuration_name_list_1 = require("./get-target-configuration-name-list");
|
|
6
6
|
const project_1 = require("./project");
|
|
7
7
|
const project_target_1 = require("./project-target");
|
|
8
|
-
function GuessOutputPathFromContext(context, projectName = context.projectName, configurationName = context.configurationName) {
|
|
8
|
+
function GuessOutputPathFromContext(context, projectName = context.projectName, configurationName = context.configurationName, targetName = 'build') {
|
|
9
9
|
if (!projectName) {
|
|
10
10
|
throw new Error('The projectName is undefined. Ensure the projectName is passed into the executor context.');
|
|
11
11
|
}
|
|
12
|
-
const buildTarget = (0, project_target_1.GetProjectTarget)(context, projectName,
|
|
12
|
+
const buildTarget = (0, project_target_1.GetProjectTarget)(context, projectName, targetName);
|
|
13
13
|
if (!buildTarget) {
|
|
14
14
|
throw new Error(`Could not find target 'build' for project '${projectName}'`);
|
|
15
15
|
}
|
|
@@ -17,6 +17,25 @@ function GuessOutputPathFromContext(context, projectName = context.projectName,
|
|
|
17
17
|
return GuessOutputPath(projectRoot, buildTarget, configurationName);
|
|
18
18
|
}
|
|
19
19
|
exports.GuessOutputPathFromContext = GuessOutputPathFromContext;
|
|
20
|
+
function GuessOutputPathFromTargetString(context, targetString) {
|
|
21
|
+
let configurationName = context.configurationName;
|
|
22
|
+
let targetName = 'build';
|
|
23
|
+
let projectName = context.projectName;
|
|
24
|
+
if (targetString) {
|
|
25
|
+
const [name, target, configuration] = targetString.split(':');
|
|
26
|
+
if (!name) {
|
|
27
|
+
throw new Error(`Could not extract the project name from the build target '${targetString}'`);
|
|
28
|
+
}
|
|
29
|
+
if (!target) {
|
|
30
|
+
throw new Error(`Could not extract the target name from the build target '${targetString}'`);
|
|
31
|
+
}
|
|
32
|
+
projectName = name;
|
|
33
|
+
targetName = target;
|
|
34
|
+
configurationName = configuration;
|
|
35
|
+
}
|
|
36
|
+
return GuessOutputPathFromContext(context, projectName, configurationName, targetName);
|
|
37
|
+
}
|
|
38
|
+
exports.GuessOutputPathFromTargetString = GuessOutputPathFromTargetString;
|
|
20
39
|
function GuessOutputPath(projectRoot, buildTarget, configurationName) {
|
|
21
40
|
let outputPath = (0, get_target_configuration_name_list_1.GetTargetOptions)(buildTarget, configurationName)['outputPath'];
|
|
22
41
|
if (!outputPath) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;AAIA,+BAGc;AACd,6FAAwE;AACxE,uCAA2C;AAC3C,qDAAoD;AAGpD,SAAgB,0BAA0B,CACxC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW,EACjC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;AAIA,+BAGc;AACd,6FAAwE;AACxE,uCAA2C;AAC3C,qDAAoD;AAGpD,SAAgB,0BAA0B,CACxC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW,EACjC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,EAC7C,UAAU,GAAG,OAAO;IAGpB,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;KAC9G;IAED,MAAM,WAAW,GAAG,IAAA,iCAAgB,EAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAEvE,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,8CAA+C,WAAY,GAAG,CAAC,CAAC;KACjF;IAED,MAAM,WAAW,GAAG,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAEzD,OAAO,eAAe,CAAC,WAAW,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC;AAEtE,CAAC;AArBD,gEAqBC;AAED,SAAgB,+BAA+B,CAC7C,OAAwB,EACxB,YAAqB;IAErB,IAAI,iBAAiB,GAAuB,OAAO,CAAC,iBAAiB,CAAC;IACtE,IAAI,UAAU,GAAG,OAAO,CAAC;IACzB,IAAI,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;I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AAC,gBAAgB,EAAE,WAAW,CAAC;SACtC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAEvC,CAAC;AAzBD,0CAyBC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
-
export declare function GetProjectTarget(context: ExecutorContext, projectName: string, targetName: string): import("@nx/devkit").TargetConfiguration<any>;
|
|
3
|
-
export declare function GetProjectTargetOptions(context: ExecutorContext, projectName: string, targetName: string, configurationName?: string | undefined): Record<string, unknown>;
|
|
2
|
+
export declare function GetProjectTarget(context: ExecutorContext, projectName: string | undefined, targetName: string): import("@nx/devkit").TargetConfiguration<any>;
|
|
3
|
+
export declare function GetProjectTargetOptions(context: ExecutorContext, projectName: string | undefined, targetName: string, configurationName?: string | undefined): Record<string, unknown>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetProjectTargetOptions = exports.GetProjectTarget = void 0;
|
|
4
4
|
const get_target_configuration_name_list_1 = require("./get-target-configuration-name-list");
|
|
5
5
|
const project_1 = require("./project");
|
|
6
|
-
function GetProjectTarget(context, projectName, targetName) {
|
|
6
|
+
function GetProjectTarget(context, projectName = context.projectName, targetName) {
|
|
7
7
|
const projectConfiguration = (0, project_1.GetProjectConfiguration)(context, projectName);
|
|
8
8
|
const targetConfiguration = projectConfiguration.targets ? projectConfiguration.targets[targetName] : undefined;
|
|
9
9
|
if (!targetConfiguration) {
|
|
@@ -12,7 +12,7 @@ function GetProjectTarget(context, projectName, targetName) {
|
|
|
12
12
|
return targetConfiguration;
|
|
13
13
|
}
|
|
14
14
|
exports.GetProjectTarget = GetProjectTarget;
|
|
15
|
-
function GetProjectTargetOptions(context, projectName, targetName, configurationName = context.configurationName) {
|
|
15
|
+
function GetProjectTargetOptions(context, projectName = context.projectName, targetName, configurationName = context.configurationName) {
|
|
16
16
|
const target = GetProjectTarget(context, projectName, targetName);
|
|
17
17
|
return (0, get_target_configuration_name_list_1.GetTargetOptions)(target, configurationName);
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-target.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-target.ts"],"names":[],"mappings":";;;AACA,6FAAwE;AACxE,uCAAoD;AAEpD,SAAgB,gBAAgB,CAAC,OAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"project-target.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-target.ts"],"names":[],"mappings":";;;AACA,6FAAwE;AACxE,uCAAoD;AAEpD,SAAgB,gBAAgB,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,UAAkB;IAC9G,MAAM,oBAAoB,GAAG,IAAA,iCAAuB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAE3E,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhH,IAAI,CAAC,mBAAmB,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAyC,UAAW,iBAAkB,WAAY,cAAc,CAAC,CAAC;KACnH;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAVD,4CAUC;AAED,SAAgB,uBAAuB,CACrC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW,EACjC,UAAkB,EAClB,iBAAiB,GAAG,OAAO,CAAC,iBAAiB;IAE7C,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAClE,OAAO,IAAA,qDAAgB,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACrD,CAAC;AARD,0DAQC"}
|