@rxap/plugin-utilities 20.0.1 → 20.0.2-dev.1
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
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [20.0.2-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@20.0.2-dev.0...@rxap/plugin-utilities@20.0.2-dev.1) (2025-02-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
9
|
+
|
|
10
|
+
## [20.0.2-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@20.0.1...@rxap/plugin-utilities@20.0.2-dev.0) (2025-02-17)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
13
|
+
|
|
6
14
|
## [20.0.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@20.0.1-dev.12...@rxap/plugin-utilities@20.0.1) (2025-02-13)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @rxap/plugin-utilities
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Provides utility functions for Nx plugins, such as retrieving project dependencies, determining output paths, and interacting with package.json files. It simplifies common tasks within Nx executors and generators. This package helps streamline plugin development by offering pre-built functionalities for project analysis and manipulation.
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@rxap/plugin-utilities)
|
|
4
4
|
[](https://commitizen.github.io/cz-cli/)
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
- [Installation](#installation)
|
|
11
11
|
- [Generators](#generators)
|
|
12
|
+
- [init](#init)
|
|
12
13
|
|
|
13
14
|
# Installation
|
|
14
15
|
|
|
@@ -26,12 +27,5 @@ yarn nx g @rxap/plugin-utilities:init
|
|
|
26
27
|
> Initialize the package in the workspace
|
|
27
28
|
|
|
28
29
|
```bash
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## init
|
|
33
|
-
> Initialize the package in the workspace
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
yarn nx g @rxap/plugin-utilities:init
|
|
30
|
+
nx g @rxap/plugin-utilities:init
|
|
37
31
|
```
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "20.0.1",
|
|
2
|
+
"version": "20.0.2-dev.1",
|
|
3
3
|
"name": "@rxap/plugin-utilities",
|
|
4
4
|
"description": "Provides utility functions for Nx plugins, such as retrieving project dependencies, determining output paths, and interacting with package.json files. It simplifies common tasks within Nx executors and generators. This package helps streamline plugin development by offering pre-built functionalities for project analysis and manipulation.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "20.4.2",
|
|
8
8
|
"@rxap/node-utilities": "^1.3.8",
|
|
9
|
-
"@rxap/workspace-utilities": "^19.6.
|
|
9
|
+
"@rxap/workspace-utilities": "^19.6.2-dev.0",
|
|
10
10
|
"tslib": "2.6.2"
|
|
11
11
|
},
|
|
12
12
|
"author": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"schematics": "./generators.json",
|
|
40
40
|
"type": "commonjs",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "0b022b6165e06718ce3edf73ae1d5375f0ff3413",
|
|
42
42
|
"types": "./src/index.d.ts",
|
|
43
43
|
"main": "./src/index.js"
|
|
44
44
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
export declare function readFileFromProjectRoot(context: ExecutorContext, fileName: string, requiredOrDefaultContent?: string | true): string;
|
|
3
3
|
export declare function writeFileToProjectRoot(context: ExecutorContext, fileName: string, content: string): void;
|
|
4
|
+
export declare function hasFileInProjectRoot(context: ExecutorContext, fileName: string): boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readFileFromProjectRoot = readFileFromProjectRoot;
|
|
4
4
|
exports.writeFileToProjectRoot = writeFileToProjectRoot;
|
|
5
|
+
exports.hasFileInProjectRoot = hasFileInProjectRoot;
|
|
5
6
|
const fs_1 = require("fs");
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const project_1 = require("./project");
|
|
@@ -21,4 +22,9 @@ function writeFileToProjectRoot(context, fileName, content) {
|
|
|
21
22
|
const filePath = (0, path_1.join)(context.root, projectRoot, fileName);
|
|
22
23
|
(0, fs_1.writeFileSync)(filePath, content);
|
|
23
24
|
}
|
|
25
|
+
function hasFileInProjectRoot(context, fileName) {
|
|
26
|
+
const projectRoot = (0, project_1.GetProjectRoot)(context);
|
|
27
|
+
const filePath = (0, path_1.join)(context.root, projectRoot, fileName);
|
|
28
|
+
return (0, fs_1.existsSync)((0, path_1.join)(projectRoot, filePath));
|
|
29
|
+
}
|
|
24
30
|
//# sourceMappingURL=project-root-files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-root-files.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-root-files.ts"],"names":[],"mappings":";;AASA,0DAcC;AAED,wDAIC;
|
|
1
|
+
{"version":3,"file":"project-root-files.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-root-files.ts"],"names":[],"mappings":";;AASA,0DAcC;AAED,wDAIC;AAED,oDAIC;AAlCD,2BAIY;AACZ,+BAA4B;AAC5B,uCAA2C;AAE3C,SAAgB,uBAAuB,CACrC,OAAwB,EACxB,QAAgB,EAChB,2BAA0C,EAAE;IAE5C,MAAM,WAAW,GAAG,IAAA,wBAAc,EAAC,OAAO,CAA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