@rxap/plugin-utilities 16.1.0-dev.11 → 16.1.0-dev.13

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,21 @@
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.13](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.12...@rxap/plugin-utilities@16.1.0-dev.13) (2023-09-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ - ensure deterministic package json file ([c1a9971](https://gitlab.com/rxap/packages/commit/c1a9971349bf01630b709bb8c46bd0397088f871))
11
+ - support output path guess from project root ([1757fdf](https://gitlab.com/rxap/packages/commit/1757fdf6e3f00fafa90d17e3ca24bf3cc711b33e))
12
+
13
+ ### Features
14
+
15
+ - add CleanupPackageJson function ([0b5c0ce](https://gitlab.com/rxap/packages/commit/0b5c0cee7d080b9948953dc856af20e2516cf024))
16
+
17
+ # [16.1.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.11...@rxap/plugin-utilities@16.1.0-dev.12) (2023-09-07)
18
+
19
+ **Note:** Version bump only for package @rxap/plugin-utilities
20
+
6
21
  # [16.1.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.10...@rxap/plugin-utilities@16.1.0-dev.11) (2023-09-03)
7
22
 
8
23
  **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.9 @rxap/node-utilities@^1.1.0-dev.6 @rxap/workspace-utilities@^0.1.0-dev.10
20
+ yarn add tslib@2.6.2
21
21
  ```
package/package.json CHANGED
@@ -1,59 +1,63 @@
1
1
  {
2
+ "version": "16.1.0-dev.13",
2
3
  "name": "@rxap/plugin-utilities",
3
- "version": "16.1.0-dev.11",
4
- "type": "commonjs",
5
- "publishConfig": {
6
- "access": "public",
7
- "directory": "../../../dist/packages/plugin/utilities"
8
- },
9
- "keywords": [
10
- "rxap",
11
- "packages",
12
- "plugin",
13
- "utilities",
14
- "plugin-utilities"
15
- ],
16
- "homepage": "https:/gitlab.com/rxap/packages/packages/plugin/utilities",
17
- "bugs": {
18
- "url": "https://gitlab.com/rxap/packages/-/issues",
19
- "email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
20
- },
21
4
  "license": "GPL-3.0-or-later",
22
- "repository": {
23
- "type": "git",
24
- "url": "https://gitlab.com/rxap/packages.git",
25
- "directory": "packages/plugin/utilities"
5
+ "dependencies": {
6
+ "ignore": "^5.2.4",
7
+ "process": "0.11.10",
8
+ "semver": "^7.3.5",
9
+ "tslib": "2.6.2"
10
+ },
11
+ "peerDependencies": {
12
+ "tslib": "2.6.2",
13
+ "@rxap/generator-utilities": "1.1.0-dev.12",
14
+ "@rxap/node-utilities": "1.1.0-dev.8",
15
+ "@rxap/utilities": "16.0.0-dev.17",
16
+ "@rxap/workspace-utilities": "0.1.0-dev.12"
26
17
  },
27
18
  "author": {
28
19
  "name": "Merzough Münker",
29
20
  "email": "mmuenker@digitaix.com"
30
21
  },
31
- "peerDependencies": {
32
- "@nx/devkit": "^16.5.0",
33
- "@rxap/generator-utilities": "^1.1.0-dev.9",
34
- "@rxap/node-utilities": "^1.1.0-dev.6",
35
- "@rxap/workspace-utilities": "^0.1.0-dev.10",
36
- "@rxap/utilities": "16.0.0-dev.15"
37
- },
38
- "dependencies": {
39
- "tslib": "2.6.2"
22
+ "bugs": {
23
+ "url": "https://gitlab.com/rxap/packages/-/issues",
24
+ "email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
40
25
  },
26
+ "homepage": "https:/gitlab.com/rxap/packages/packages/plugin/utilities",
27
+ "keywords": [
28
+ "packages",
29
+ "plugin",
30
+ "plugin-utilities",
31
+ "rxap",
32
+ "utilities"
33
+ ],
41
34
  "nx-migrations": {
42
35
  "packageGroup": [
43
36
  {
44
37
  "package": "@rxap/generator-utilities",
45
- "version": "1.1.0-dev.9"
38
+ "version": "1.1.0-dev.11"
46
39
  },
47
40
  {
48
41
  "package": "@rxap/node-utilities",
49
- "version": "1.1.0-dev.6"
42
+ "version": "1.1.0-dev.7"
50
43
  },
51
44
  {
52
45
  "package": "@rxap/workspace-utilities",
53
- "version": "0.1.0-dev.10"
46
+ "version": "0.1.0-dev.11"
54
47
  }
55
48
  ]
56
49
  },
57
- "gitHead": "b6e1ecbccc89aae6de3dc72b0206374dbaa44e69",
58
- "main": "./src/index.js"
50
+ "publishConfig": {
51
+ "access": "public",
52
+ "directory": "../../../dist/packages/plugin/utilities"
53
+ },
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "https://gitlab.com/rxap/packages.git",
57
+ "directory": "packages/plugin/utilities"
58
+ },
59
+ "type": "commonjs",
60
+ "gitHead": "6679f090af3b55900bfeb02de0ed8f1febfdbb8b",
61
+ "main": "./src/index.js",
62
+ "types": "./src/index.d.ts"
59
63
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GuessOutputPath = void 0;
4
+ const path_1 = require("path");
4
5
  const get_target_configuration_name_list_1 = require("./get-target-configuration-name-list");
6
+ const project_1 = require("./project");
5
7
  const project_target_1 = require("./project-target");
6
8
  function GuessOutputPath(context, projectName = context.projectName) {
7
9
  if (!projectName) {
@@ -11,21 +13,28 @@ function GuessOutputPath(context, projectName = context.projectName) {
11
13
  if (!buildTarget) {
12
14
  throw new Error(`Could not find target 'build' for project '${projectName}'`);
13
15
  }
16
+ const projectRoot = (0, project_1.GetProjectRoot)(context, projectName);
14
17
  let outputPath = (0, get_target_configuration_name_list_1.GetTargetOptions)(buildTarget, context.configurationName)['outputPath'];
15
18
  if (!outputPath) {
16
- console.warn('Could not find outputPath in build target options.');
17
19
  if (buildTarget.outputs && buildTarget.outputs.length) {
18
20
  const [output] = buildTarget.outputs;
19
- outputPath = output;
21
+ if (output.match(/\.[a-zA-Z]+$/)) {
22
+ outputPath = (0, path_1.dirname)(output);
23
+ }
24
+ else {
25
+ outputPath = output;
26
+ }
20
27
  }
21
28
  else {
22
- throw new Error('Could not find outputPath in build target options and target outputs are not defined.');
29
+ outputPath = (0, path_1.join)('dist', projectRoot);
23
30
  }
24
31
  }
25
32
  if (typeof outputPath !== 'string') {
26
33
  throw new Error(`The outputPath is not a string. Found: ${outputPath}`);
27
34
  }
28
- return outputPath;
35
+ return outputPath
36
+ .replace(/\{projectRoot}/, projectRoot)
37
+ .replace(/\{workspaceRoot}\//, '');
29
38
  }
30
39
  exports.GuessOutputPath = GuessOutputPath;
31
40
  //# sourceMappingURL=guess-output-path.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;AACA,6FAAwE;AACxE,qDAAoD;AAGpD,SAAgB,eAAe,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW;IAEzF,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;KAC9G;IAED,MAAM,WAAW,GAAG,IAAA,iCAAgB,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAEpE,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,8CAA+C,WAAY,GAAG,CAAC,CAAC;KACjF;IAED,IAAI,UAAU,GAAG,IAAA,qDAAgB,EAAC,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC;IAExF,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;QACnE,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE;YACrD,MAAM,CAAE,MAAM,CAAE,GAAG,WAAW,CAAC,OAAO,CAAC;YACvC,UAAU,GAAG,MAAM,CAAC;SACrB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;SAC1G;KACF;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA2C,UAAW,EAAE,CAAC,CAAC;KAC3E;IAED,OAAO,UAAU,CAAC;AAEpB,CAAC;AA9BD,0CA8BC"}
1
+ {"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;AACA,+BAGc;AACd,6FAAwE;AACxE,uCAA2C;AAC3C,qDAAoD;AAGpD,SAAgB,eAAe,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW;IAEzF,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;KAC9G;IAED,MAAM,WAAW,GAAG,IAAA,iCAAgB,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAEpE,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,IAAI,UAAU,GAAG,IAAA,qDAAgB,EAAC,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC;IAExF,IAAI,CAAC,UAAU,EAAE;QACf,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE;YACrD,MAAM,CAAE,MAAM,CAAE,GAAG,WAAW,CAAC,OAAO,CAAC;YACvC,IAAI,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;gBAChC,UAAU,GAAG,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC;aAC9B;iBAAM;gBACL,UAAU,GAAG,MAAM,CAAC;aACrB;SACF;aAAM;YACL,UAAU,GAAG,IAAA,WAAI,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACxC;KACF;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA2C,UAAW,EAAE,CAAC,CAAC;KAC3E;IAED,OAAO,UAAU;SACd,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC;SACtC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAEvC,CAAC;AArCD,0CAqCC"}
@@ -10,4 +10,4 @@ export interface ProjectPackageJson extends PackageJson {
10
10
  }[];
11
11
  }
12
12
  export declare function readPackageJsonForProject(context: ExecutorContext, projectName?: string | undefined): ProjectPackageJson;
13
- export declare function writePackageJsonFormProject<T = ProjectPackageJson>(context: ExecutorContext, content: T, projectName?: string | undefined): void;
13
+ export declare function writePackageJsonFormProject<T extends ProjectPackageJson = ProjectPackageJson>(context: ExecutorContext, content: T, projectName?: string | undefined): void;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.writePackageJsonFormProject = exports.readPackageJsonForProject = void 0;
4
4
  const node_utilities_1 = require("@rxap/node-utilities");
5
+ const workspace_utilities_1 = require("@rxap/workspace-utilities");
5
6
  const path_1 = require("path");
6
7
  const project_1 = require("./project");
7
8
  function readPackageJsonForProject(context, projectName = context.projectName) {
@@ -11,7 +12,7 @@ function readPackageJsonForProject(context, projectName = context.projectName) {
11
12
  exports.readPackageJsonForProject = readPackageJsonForProject;
12
13
  function writePackageJsonFormProject(context, content, projectName = context.projectName) {
13
14
  const packageJsonPath = (0, path_1.join)(context.root, (0, project_1.GetProjectRoot)(context, projectName), 'package.json');
14
- (0, node_utilities_1.writeJsonFile)(packageJsonPath, content);
15
+ (0, node_utilities_1.writeJsonFile)(packageJsonPath, (0, workspace_utilities_1.CleanupPackageJsonFile)(content));
15
16
  }
16
17
  exports.writePackageJsonFormProject = writePackageJsonFormProject;
17
18
  //# sourceMappingURL=project-package-json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-package-json.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-package-json.ts"],"names":[],"mappings":";;;AACA,yDAG8B;AAE9B,+BAA4B;AAC5B,uCAA2C;AAM3C,SAAgB,yBAAyB,CACvC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,OAAO,IAAA,yBAAQ,EAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAND,8DAMC;AAED,SAAgB,2BAA2B,CACzC,OAAwB,EACxB,OAAU,EACV,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,IAAA,8BAAa,EAAI,eAAe,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAPD,kEAOC"}
1
+ {"version":3,"file":"project-package-json.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-package-json.ts"],"names":[],"mappings":";;;AACA,yDAG8B;AAC9B,mEAGmC;AACnC,+BAA4B;AAC5B,uCAA2C;AAM3C,SAAgB,yBAAyB,CACvC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,OAAO,IAAA,yBAAQ,EAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAND,8DAMC;AAED,SAAgB,2BAA2B,CACzC,OAAwB,EACxB,OAAU,EACV,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,IAAA,8BAAa,EAAI,eAAe,EAAE,IAAA,4CAAsB,EAAC,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC;AAPD,kEAOC"}
@@ -7,7 +7,7 @@ function GetProjectTarget(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) {
10
- throw new Error(`The target configuration for target '${targetName}' not found!`);
10
+ throw new Error(`The target configuration for target '${targetName}' in project '${projectName}' not found!`);
11
11
  }
12
12
  return targetConfiguration;
13
13
  }
@@ -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,WAAmB,EAAE,UAAkB;IAChG,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,cAAc,CAAC,CAAC;KACrF;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAVD,4CAUC;AAED,SAAgB,uBAAuB,CACrC,OAAwB,EACxB,WAAmB,EACnB,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"}
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,WAAmB,EAAE,UAAkB;IAChG,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,WAAmB,EACnB,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"}