@o3r/schematics 8.2.0-alpha.3 → 8.2.0-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -4
- package/src/utility/index.d.ts +1 -0
- package/src/utility/index.d.ts.map +1 -1
- package/src/utility/index.js +1 -0
- package/src/utility/index.js.map +1 -1
- package/src/utility/monorepo.d.ts +17 -0
- package/src/utility/monorepo.d.ts.map +1 -0
- package/src/utility/monorepo.js +30 -0
- package/src/utility/monorepo.js.map +1 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/schematics",
|
3
|
-
"version": "8.2.0-alpha.
|
3
|
+
"version": "8.2.0-alpha.4",
|
4
4
|
"description": "Schematics module of the Otter framework",
|
5
5
|
"main": "./src/index.js",
|
6
6
|
"keywords": [
|
@@ -28,7 +28,7 @@
|
|
28
28
|
}
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@o3r/dev-tools": "^8.2.0-alpha.
|
31
|
+
"@o3r/dev-tools": "^8.2.0-alpha.4",
|
32
32
|
"comment-json": "^4.1.0",
|
33
33
|
"globby": "^11.1.0",
|
34
34
|
"minimatch": "^6.1.6",
|
@@ -51,8 +51,8 @@
|
|
51
51
|
"@nrwl/jest": "~15.8.0",
|
52
52
|
"@nrwl/js": "~15.8.0",
|
53
53
|
"@nrwl/linter": "~15.8.0",
|
54
|
-
"@o3r/build-helpers": "^8.2.0-alpha.
|
55
|
-
"@o3r/eslint-plugin": "^8.2.0-alpha.
|
54
|
+
"@o3r/build-helpers": "^8.2.0-alpha.4",
|
55
|
+
"@o3r/eslint-plugin": "^8.2.0-alpha.4",
|
56
56
|
"@schematics/angular": "~15.2.0",
|
57
57
|
"@types/jest": "~28.1.2",
|
58
58
|
"@types/node": "^17.0.45",
|
package/src/utility/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
package/src/utility/index.js
CHANGED
@@ -13,4 +13,5 @@ tslib_1.__exportStar(require("./sub-entry"), exports);
|
|
13
13
|
tslib_1.__exportStar(require("./template-property.helper"), exports);
|
14
14
|
tslib_1.__exportStar(require("./matching-peers"), exports);
|
15
15
|
tslib_1.__exportStar(require("./package-version"), exports);
|
16
|
+
tslib_1.__exportStar(require("./monorepo"), exports);
|
16
17
|
//# sourceMappingURL=index.js.map
|
package/src/utility/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,yDAA+B;AAC/B,sDAA4B;AAC5B,uDAA6B;AAC7B,sDAA4B;AAC5B,oDAA0B;AAC1B,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,qEAA2C;AAC3C,2DAAiC;AACjC,4DAAkC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,yDAA+B;AAC/B,sDAA4B;AAC5B,uDAA6B;AAC7B,sDAA4B;AAC5B,oDAA0B;AAC1B,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,qEAA2C;AAC3C,2DAAiC;AACjC,4DAAkC;AAClC,qDAA2B"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { Tree } from '@angular-devkit/schematics';
|
2
|
+
/**
|
3
|
+
* Find the relative path to a configuration file at the monorepo root
|
4
|
+
*
|
5
|
+
* @param tree
|
6
|
+
* @param files List of files to look for, the first of the list will used
|
7
|
+
* @param originPath Path from where to calculate the relative path
|
8
|
+
* @returns
|
9
|
+
*/
|
10
|
+
export declare function findConfigFileRelativePath(tree: Tree, files: string[], originPath: string): string;
|
11
|
+
/**
|
12
|
+
* Determine if we are in an Nx Monorepo context
|
13
|
+
*
|
14
|
+
* @param tree
|
15
|
+
*/
|
16
|
+
export declare function isNxContext(tree: Tree): boolean;
|
17
|
+
//# sourceMappingURL=monorepo.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"monorepo.d.ts","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,UAOzF;AACD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,WAErC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.isNxContext = exports.findConfigFileRelativePath = void 0;
|
4
|
+
const path = require("node:path");
|
5
|
+
/**
|
6
|
+
* Find the relative path to a configuration file at the monorepo root
|
7
|
+
*
|
8
|
+
* @param tree
|
9
|
+
* @param files List of files to look for, the first of the list will used
|
10
|
+
* @param originPath Path from where to calculate the relative path
|
11
|
+
* @returns
|
12
|
+
*/
|
13
|
+
function findConfigFileRelativePath(tree, files, originPath) {
|
14
|
+
const foundFile = files.find((file) => tree.exists(`/${file}`));
|
15
|
+
if (foundFile === undefined) {
|
16
|
+
return '';
|
17
|
+
}
|
18
|
+
return path.posix.relative(originPath, `/${foundFile}`);
|
19
|
+
}
|
20
|
+
exports.findConfigFileRelativePath = findConfigFileRelativePath;
|
21
|
+
/**
|
22
|
+
* Determine if we are in an Nx Monorepo context
|
23
|
+
*
|
24
|
+
* @param tree
|
25
|
+
*/
|
26
|
+
function isNxContext(tree) {
|
27
|
+
return tree.exists('/nx.json');
|
28
|
+
}
|
29
|
+
exports.isNxContext = isNxContext;
|
30
|
+
//# sourceMappingURL=monorepo.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"monorepo.js","sourceRoot":"","sources":["../../../src/utility/monorepo.ts"],"names":[],"mappings":";;;AACA,kCAAkC;AAElC;;;;;;;GAOG;AACH,SAAgB,0BAA0B,CAAC,IAAU,EAAE,KAAe,EAAE,UAAkB;IACxF,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IAChE,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO,EAAE,CAAC;KACX;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,SAAS,EAAE,CAAC,CAAC;AAC1D,CAAC;AAPD,gEAOC;AACD;;;;GAIG;AACH,SAAgB,WAAW,CAAC,IAAU;IACpC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACjC,CAAC;AAFD,kCAEC"}
|