@rxap/plugin-library 16.0.0-dev.3 → 16.0.0-dev.6

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.
Files changed (126) hide show
  1. package/CHANGELOG.md +56 -185
  2. package/README.md +80 -127
  3. package/executors.json +24 -0
  4. package/generators.json +24 -0
  5. package/package.json +58 -40
  6. package/src/executors/readme/executor.d.ts +5 -0
  7. package/src/executors/readme/executor.js +143 -0
  8. package/src/executors/readme/executor.js.map +1 -0
  9. package/src/executors/readme/schema.d.ts +1 -0
  10. package/src/{builders/update-package-group → executors/readme}/schema.json +2 -3
  11. package/src/executors/run-generator/executor.d.ts +5 -0
  12. package/src/executors/run-generator/executor.js +46 -0
  13. package/src/executors/run-generator/executor.js.map +1 -0
  14. package/src/executors/run-generator/schema.d.ts +6 -0
  15. package/src/executors/run-generator/schema.json +27 -0
  16. package/src/executors/update-dependencies/executor.d.ts +5 -0
  17. package/src/executors/update-dependencies/executor.js +32 -0
  18. package/src/executors/update-dependencies/executor.js.map +1 -0
  19. package/src/executors/update-dependencies/schema.d.ts +1 -0
  20. package/src/executors/update-dependencies/schema.json +9 -0
  21. package/src/executors/update-package-group/executor.d.ts +5 -0
  22. package/src/executors/update-package-group/executor.js +45 -0
  23. package/src/executors/update-package-group/executor.js.map +1 -0
  24. package/src/executors/update-package-group/schema.d.ts +1 -0
  25. package/src/executors/update-package-group/schema.json +9 -0
  26. package/src/generators/fix-dependencies/generator.d.ts +27 -0
  27. package/src/generators/fix-dependencies/generator.js +547 -0
  28. package/src/generators/fix-dependencies/generator.js.map +1 -0
  29. package/src/generators/fix-dependencies/schema.d.ts +8 -0
  30. package/src/generators/fix-dependencies/schema.json +31 -0
  31. package/src/generators/index-export/generator.d.ts +4 -0
  32. package/src/generators/index-export/generator.js +52 -0
  33. package/src/generators/index-export/generator.js.map +1 -0
  34. package/src/generators/index-export/schema.d.ts +3 -0
  35. package/src/generators/index-export/schema.json +16 -0
  36. package/src/generators/init/files/README.md.handlebars +115 -0
  37. package/src/generators/init/generator.d.ts +4 -0
  38. package/src/generators/init/generator.js +261 -0
  39. package/src/generators/init/generator.js.map +1 -0
  40. package/src/generators/init/schema.d.ts +3 -0
  41. package/src/generators/init/schema.json +16 -0
  42. package/src/generators/schematic/files/schematic/__fileName__/index.ts.template +8 -0
  43. package/src/generators/schematic/files/schematic/__fileName__/schema.d.ts.template +3 -0
  44. package/src/generators/schematic/files/schematic/__fileName__/schema.json.template +18 -0
  45. package/src/generators/schematic/generator.d.ts +6 -0
  46. package/src/generators/schematic/generator.js +137 -0
  47. package/src/generators/schematic/generator.js.map +1 -0
  48. package/src/generators/schematic/schema.d.ts +6 -0
  49. package/src/generators/schematic/schema.json +43 -0
  50. package/src/index.d.ts +0 -1
  51. package/src/index.js +0 -2
  52. package/src/index.js.map +1 -1
  53. package/LICENSE +0 -630
  54. package/builders.json +0 -20
  55. package/collection.json +0 -32
  56. package/migration.json +0 -4
  57. package/src/builders/build-schematics/builder.d.ts +0 -13
  58. package/src/builders/build-schematics/builder.js +0 -84
  59. package/src/builders/build-schematics/builder.js.map +0 -1
  60. package/src/builders/build-schematics/schema.json +0 -78
  61. package/src/builders/update-package-group/builder.d.ts +0 -19
  62. package/src/builders/update-package-group/builder.js +0 -89
  63. package/src/builders/update-package-group/builder.js.map +0 -1
  64. package/src/builders/update-package-group/read-file.d.ts +0 -7
  65. package/src/builders/update-package-group/read-file.js +0 -11
  66. package/src/builders/update-package-group/read-file.js.map +0 -1
  67. package/src/builders/update-package-group/write-file.d.ts +0 -5
  68. package/src/builders/update-package-group/write-file.js +0 -11
  69. package/src/builders/update-package-group/write-file.js.map +0 -1
  70. package/src/builders/update-peer-dependencies/builder.d.ts +0 -40
  71. package/src/builders/update-peer-dependencies/builder.js +0 -293
  72. package/src/builders/update-peer-dependencies/builder.js.map +0 -1
  73. package/src/builders/update-peer-dependencies/schema.json +0 -33
  74. package/src/builders/utils/assets.d.ts +0 -14
  75. package/src/builders/utils/assets.js +0 -54
  76. package/src/builders/utils/assets.js.map +0 -1
  77. package/src/builders/utils/compile-typescript-files.d.ts +0 -13
  78. package/src/builders/utils/compile-typescript-files.js +0 -56
  79. package/src/builders/utils/compile-typescript-files.js.map +0 -1
  80. package/src/builders/utils/equals.d.ts +0 -1
  81. package/src/builders/utils/equals.js +0 -200
  82. package/src/builders/utils/equals.js.map +0 -1
  83. package/src/builders/utils/unique.d.ts +0 -1
  84. package/src/builders/utils/unique.js +0 -8
  85. package/src/builders/utils/unique.js.map +0 -1
  86. package/src/schematics/config/index.d.ts +0 -3
  87. package/src/schematics/config/index.js +0 -17
  88. package/src/schematics/config/index.js.map +0 -1
  89. package/src/schematics/config/schema.json +0 -50
  90. package/src/schematics/config-schematics/coerce-builders-json.d.ts +0 -2
  91. package/src/schematics/config-schematics/coerce-builders-json.js +0 -23
  92. package/src/schematics/config-schematics/coerce-builders-json.js.map +0 -1
  93. package/src/schematics/config-schematics/coerce-builders.d.ts +0 -1
  94. package/src/schematics/config-schematics/coerce-builders.js +0 -11
  95. package/src/schematics/config-schematics/coerce-builders.js.map +0 -1
  96. package/src/schematics/config-schematics/coerce-collection-json.d.ts +0 -2
  97. package/src/schematics/config-schematics/coerce-collection-json.js +0 -23
  98. package/src/schematics/config-schematics/coerce-collection-json.js.map +0 -1
  99. package/src/schematics/config-schematics/coerce-migration-json.d.ts +0 -2
  100. package/src/schematics/config-schematics/coerce-migration-json.js +0 -23
  101. package/src/schematics/config-schematics/coerce-migration-json.js.map +0 -1
  102. package/src/schematics/config-schematics/coerce-ng-update.d.ts +0 -1
  103. package/src/schematics/config-schematics/coerce-ng-update.js +0 -21
  104. package/src/schematics/config-schematics/coerce-ng-update.js.map +0 -1
  105. package/src/schematics/config-schematics/coerce-schematics.d.ts +0 -1
  106. package/src/schematics/config-schematics/coerce-schematics.js +0 -11
  107. package/src/schematics/config-schematics/coerce-schematics.js.map +0 -1
  108. package/src/schematics/config-schematics/index.d.ts +0 -3
  109. package/src/schematics/config-schematics/index.js +0 -82
  110. package/src/schematics/config-schematics/index.js.map +0 -1
  111. package/src/schematics/config-schematics/init-src-files.d.ts +0 -2
  112. package/src/schematics/config-schematics/init-src-files.js +0 -16
  113. package/src/schematics/config-schematics/init-src-files.js.map +0 -1
  114. package/src/schematics/config-schematics/schema.json +0 -47
  115. package/src/schematics/config-update-package-group/index.d.ts +0 -3
  116. package/src/schematics/config-update-package-group/index.js +0 -21
  117. package/src/schematics/config-update-package-group/index.js.map +0 -1
  118. package/src/schematics/config-update-package-group/schema.json +0 -21
  119. package/src/schematics/config-update-peer-dependencies/index.d.ts +0 -3
  120. package/src/schematics/config-update-peer-dependencies/index.js +0 -26
  121. package/src/schematics/config-update-peer-dependencies/index.js.map +0 -1
  122. package/src/schematics/config-update-peer-dependencies/schema.json +0 -28
  123. package/src/schematics/ng-add/index.d.ts +0 -3
  124. package/src/schematics/ng-add/index.js +0 -21
  125. package/src/schematics/ng-add/index.js.map +0 -1
  126. package/src/schematics/ng-add/schema.json +0 -17
package/executors.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "executors": {
3
+ "update-dependencies": {
4
+ "implementation": "./src/executors/update-dependencies/executor",
5
+ "schema": "./src/executors/update-dependencies/schema.json",
6
+ "description": "Update the local dependencies in the dist package.json. Replaces the atarix with the current package version of local dependency"
7
+ },
8
+ "update-package-group": {
9
+ "implementation": "./src/executors/update-package-group/executor",
10
+ "schema": "./src/executors/update-package-group/schema.json",
11
+ "description": "Update the packageGroup array with all direct depedent projects"
12
+ },
13
+ "readme": {
14
+ "implementation": "./src/executors/readme/executor",
15
+ "schema": "./src/executors/readme/schema.json",
16
+ "description": "Readme generator for libraries."
17
+ },
18
+ "run-generator": {
19
+ "implementation": "./src/executors/run-generator/executor",
20
+ "schema": "./src/executors/run-generator/schema.json",
21
+ "description": "Executes a generator for the project"
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "generators": {
3
+ "init": {
4
+ "factory": "./src/generators/init/generator",
5
+ "schema": "./src/generators/init/schema.json",
6
+ "description": "Create and update configurations to use rxap package publish concept"
7
+ },
8
+ "fix-dependencies": {
9
+ "factory": "./src/generators/fix-dependencies/generator",
10
+ "schema": "./src/generators/fix-dependencies/schema.json",
11
+ "description": "Adds missing dependencies and removes redudant dependencies of a project"
12
+ },
13
+ "index-export": {
14
+ "factory": "./src/generators/index-export/generator",
15
+ "schema": "./src/generators/index-export/schema.json",
16
+ "description": "Generate index exports for each directory and in the src root"
17
+ },
18
+ "schematic": {
19
+ "factory": "./src/generators/schematic/generator",
20
+ "schema": "./src/generators/schematic/schema.json",
21
+ "description": "Create a Schematic for a project."
22
+ }
23
+ }
24
+ }
package/package.json CHANGED
@@ -1,52 +1,70 @@
1
1
  {
2
2
  "name": "@rxap/plugin-library",
3
- "version": "16.0.0-dev.3",
4
- "author": "Merzough Münker",
5
- "homepage": "https://gitlab.com/rxap/plugins/libs/library",
6
- "repository": "git@gitlab.com:rxap/schematics.git",
3
+ "version": "16.0.0-dev.6",
4
+ "type": "commonjs",
5
+ "executors": "./executors.json",
6
+ "generators": "./generators.json",
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "directory": "../../../dist/packages/plugin/library"
10
+ },
11
+ "nx-migrations": {
12
+ "packageGroup": [
13
+ {
14
+ "package": "@rxap/generator-ts-morph",
15
+ "version": "1.0.1-dev.1"
16
+ },
17
+ {
18
+ "package": "@rxap/generator-utilities",
19
+ "version": "1.0.1-dev.1"
20
+ },
21
+ {
22
+ "package": "@rxap/node-utilities",
23
+ "version": "1.0.1-dev.1"
24
+ },
25
+ {
26
+ "package": "@rxap/plugin-utilities",
27
+ "version": "1.0.1-dev.1"
28
+ },
29
+ {
30
+ "package": "@rxap/schematics-utilities",
31
+ "version": "16.0.0-dev.4"
32
+ }
33
+ ]
34
+ },
7
35
  "keywords": [
8
- "rxap",
9
- "plugin",
10
- "nrwl",
11
- "builder",
12
- "angular",
13
- "automation"
36
+ "rxap"
14
37
  ],
15
- "license": "GPL-3.0",
16
- "private": false,
38
+ "homepage": "https:/gitlab.com/rxap/packages/packages/plugin/library",
17
39
  "bugs": {
18
- "url": "https://gitlab.com/rxap/plugins/-/issues",
19
- "email": "incoming+rxap-plugins-27276642-issue-@incoming.gitlab.com"
40
+ "url": "https://gitlab.com/rxap/packages/-/issues",
41
+ "email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
20
42
  },
21
- "description": "A Nx/Ng plugin for build many library types.",
22
- "main": "src/index.js",
23
- "schematics": "./collection.json",
24
- "builders": "./builders.json",
25
- "ng-add": {
26
- "save": "devDependencies"
43
+ "license": "GPL-3.0-or-later",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://gitlab.com/rxap/packages.git",
47
+ "directory": "packages/plugin/library"
27
48
  },
28
- "dependencies": {
29
- "@angular-devkit/architect": "^0.1600.1",
30
- "@angular-devkit/core": "^16.0.1",
31
- "@angular-devkit/schematics": "^16.0.1",
32
- "@rxap/schematics-utilities": "^16.0.0-dev.0",
33
- "fs-extra": "9.1.0",
34
- "glob": "7.1.7",
35
- "nx": "16.2.1",
36
- "tslib": "^2.3.1",
37
- "typescript": "^5.0.4"
49
+ "author": {
50
+ "name": "Merzough Münker",
51
+ "email": "mmuenker@digitaix.com"
38
52
  },
39
- "publishConfig": {
40
- "directory": "../../dist/libs/library",
41
- "access": "public"
53
+ "dependencies": {
54
+ "handlebars": "4.7.7",
55
+ "tslib": "2.5.3"
42
56
  },
43
- "ng-update": {
44
- "migrations": "./migration.json",
45
- "packageGroup": [
46
- "@rxap/plugin-library"
47
- ]
57
+ "peerDependencies": {
58
+ "@nx/angular": "^16.5.0",
59
+ "@nx/devkit": "^16.5.0",
60
+ "@rxap/generator-ts-morph": "^1.0.1-dev.1",
61
+ "@rxap/generator-utilities": "^1.0.1-dev.1",
62
+ "@rxap/node-utilities": "^1.0.1-dev.1",
63
+ "@rxap/plugin-utilities": "^1.0.1-dev.1",
64
+ "nx": "^16.5.0",
65
+ "ts-morph": "^18.0.0"
48
66
  },
49
- "gitHead": "4d5539102ddcfc828e6d22e8a15beb42e326ca12",
50
- "peerDependencies": {},
67
+ "gitHead": "9ad96f2d4db9225ab199d03fc172efff52609d5d",
68
+ "main": "./src/index.js",
51
69
  "types": "./src/index.d.ts"
52
70
  }
@@ -0,0 +1,5 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { ReadmeExecutorSchema } from './schema';
3
+ export default function runExecutor(options: ReadmeExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Handlebars = tslib_1.__importStar(require("handlebars"));
5
+ const devkit_1 = require("@nx/devkit");
6
+ const plugin_utilities_1 = require("@rxap/plugin-utilities");
7
+ const path_1 = require("path");
8
+ function readGetStartedFile(context) {
9
+ // TODO : support GET_STARTED.md but with an fallback to GETSTARTED.md
10
+ return (0, plugin_utilities_1.readFileFromProjectRoot)(context, 'GETSTARTED.md');
11
+ }
12
+ function readGetGuidsFile(context) {
13
+ return (0, plugin_utilities_1.readFileFromProjectRoot)(context, 'GUIDES.md');
14
+ }
15
+ function getTemplate(context) {
16
+ const readmeTemplateFile = (0, plugin_utilities_1.readFileFromProjectRoot)(context, 'README.md.handlebars', true);
17
+ return Handlebars.compile(readmeTemplateFile);
18
+ }
19
+ function getSchematics(context) {
20
+ var _a;
21
+ const { schematics } = (0, plugin_utilities_1.readPackageJsonForProject)(context);
22
+ if (!schematics) {
23
+ return [];
24
+ }
25
+ const projectRoot = (0, plugin_utilities_1.GetProjectRoot)(context);
26
+ const collectionJson = (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, schematics));
27
+ const schematicList = [];
28
+ for (const [schematic, config] of Object.entries((_a = collectionJson.schematics) !== null && _a !== void 0 ? _a : {})) {
29
+ schematicList.push({
30
+ name: schematic,
31
+ description: config.description,
32
+ schema: (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, config.schema)),
33
+ });
34
+ }
35
+ return schematicList;
36
+ }
37
+ function getGenerators(context) {
38
+ var _a;
39
+ const { generators } = (0, plugin_utilities_1.readPackageJsonForProject)(context);
40
+ if (!generators) {
41
+ return [];
42
+ }
43
+ const projectRoot = (0, plugin_utilities_1.GetProjectRoot)(context);
44
+ const collectionJson = (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, generators));
45
+ const generatorList = [];
46
+ for (const [generator, config] of Object.entries((_a = collectionJson.generators) !== null && _a !== void 0 ? _a : {})) {
47
+ generatorList.push({
48
+ name: generator,
49
+ description: config.description,
50
+ schema: (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, config.schema)),
51
+ });
52
+ }
53
+ const schematicList = getSchematics(context);
54
+ return [...generatorList, ...schematicList];
55
+ }
56
+ function getBuilders(context) {
57
+ var _a;
58
+ const { builders } = (0, plugin_utilities_1.readPackageJsonForProject)(context);
59
+ if (!builders) {
60
+ return [];
61
+ }
62
+ const projectRoot = (0, plugin_utilities_1.GetProjectRoot)(context);
63
+ const buildersJson = (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, builders));
64
+ const builderList = [];
65
+ for (const [builder, config] of Object.entries((_a = buildersJson.builders) !== null && _a !== void 0 ? _a : {})) {
66
+ builderList.push({
67
+ name: builder,
68
+ description: config.description,
69
+ schema: (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, config.schema)),
70
+ });
71
+ }
72
+ return builderList;
73
+ }
74
+ function getExecutors(context) {
75
+ var _a;
76
+ const { executors } = (0, plugin_utilities_1.readPackageJsonForProject)(context);
77
+ if (!executors) {
78
+ return [];
79
+ }
80
+ const projectRoot = (0, plugin_utilities_1.GetProjectRoot)(context);
81
+ const executorsJson = (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, executors));
82
+ const executorList = [];
83
+ for (const [executor, config] of Object.entries((_a = executorsJson.executors) !== null && _a !== void 0 ? _a : {})) {
84
+ executorList.push({
85
+ name: executor,
86
+ description: config.description,
87
+ schema: (0, devkit_1.readJsonFile)((0, path_1.join)(projectRoot, config.schema)),
88
+ });
89
+ }
90
+ const builderList = getBuilders(context);
91
+ return [...executorList, ...builderList];
92
+ }
93
+ function getPeerDependencyList(context) {
94
+ var _a;
95
+ const packageJson = (0, plugin_utilities_1.readPackageJsonForProject)(context);
96
+ const peerDependencyList = [];
97
+ for (const [packageName, version] of Object.entries((_a = packageJson.peerDependencies) !== null && _a !== void 0 ? _a : {})) {
98
+ if (packageName.match(/^@rxap\//)) {
99
+ peerDependencyList.push({
100
+ name: packageName,
101
+ version,
102
+ });
103
+ }
104
+ }
105
+ return peerDependencyList;
106
+ }
107
+ Handlebars.registerHelper('hasProperties', function (record, options) {
108
+ if (Object.keys(record).length > 0) {
109
+ options.fn(this);
110
+ }
111
+ });
112
+ function runExecutor(options, context) {
113
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
114
+ const getStartedContent = readGetStartedFile(context);
115
+ const guidesContent = readGetGuidsFile(context);
116
+ const packageJson = (0, plugin_utilities_1.readPackageJsonForProject)(context);
117
+ const template = getTemplate(context);
118
+ const generatorList = getGenerators(context);
119
+ const executorsList = getExecutors(context);
120
+ const peerDependencyList = getPeerDependencyList(context);
121
+ console.log('Input for README.md template ready');
122
+ const readme = template({
123
+ packageJson,
124
+ getStartedContent,
125
+ guidesContent,
126
+ generatorList,
127
+ executorsList,
128
+ peerDependencyList,
129
+ hasPeerDependencies: peerDependencyList.length > 0,
130
+ hasGenerators: generatorList.length > 0,
131
+ hasExecutors: executorsList.length > 0,
132
+ hasInitGenerator: generatorList.find((generator) => generator.name === 'init') !== undefined,
133
+ hasConfigGenerator: generatorList.find((generator) => generator.name === 'config') !== undefined,
134
+ });
135
+ console.log('README.md generated');
136
+ (0, plugin_utilities_1.writeFileToProjectRoot)(context, 'README.md', readme);
137
+ return {
138
+ success: true,
139
+ };
140
+ });
141
+ }
142
+ exports.default = runExecutor;
143
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/readme/executor.ts"],"names":[],"mappings":";;;AAAA,+DAAyC;AACzC,uCAGoB;AACpB,6DAKgC;AAChC,+BAA4B;AAG5B,SAAS,kBAAkB,CAAC,OAAwB;IAClD,sEAAsE;IACtE,OAAO,IAAA,0CAAuB,EAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAwB;IAChD,OAAO,IAAA,0CAAuB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AAED,SAAS,WAAW,CAAC,OAAwB;IAC3C,MAAM,kBAAkB,GAAG,IAAA,0CAAuB,EAAC,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;IAE1F,OAAO,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAChD,CAAC;AAcD,SAAS,aAAa,CAAC,OAAwB;;IAC7C,MAAM,EAAE,UAAU,EAAE,GAAG,IAAA,4CAAyB,EAAC,OAAO,CAAC,CAAC;IAC1D,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,EAAE,CAAC;KACX;IACD,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,cAAc,GAAG,IAAA,qBAAY,EAAoD,IAAA,WAAI,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;IACtH,MAAM,aAAa,GAAgB,EAAE,CAAC;IACtC,KAAK,MAAM,CAAE,SAAS,EAAE,MAAM,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,MAAA,cAAc,CAAC,UAAU,mCAAI,EAAE,CAAC,EAAE;QACnF,aAAa,CAAC,IAAI,CAAC;YACjB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,MAAM,EAAE,IAAA,qBAAY,EAAC,IAAA,W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,MAAM,MAAM,GAAG,QAAQ,CAAC;YACtB,WAAW;YACX,iBAAiB;YACjB,aAAa;YACb,aAAa;YACb,aAAa;YACb,kBAAkB;YAClB,mBAAmB,EAAE,kBAAkB,CAAC,MAAM,GAAG,CAAC;YAClD,aAAa,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC;YACvC,YAAY,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC;YACtC,gBAAgB,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,MAAM,CAAC,KAAK,SAAS;YAC5F,kBAAkB,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC,KAAK,SAAS;SACjG,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAEnC,IAAA,yCAAsB,EAAC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAErD,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CAAA;AApCD,8BAoCC"}
@@ -0,0 +1 @@
1
+ export interface ReadmeExecutorSchema {} // eslint-disable-line
@@ -1,8 +1,7 @@
1
1
  {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
2
  "$schema": "http://json-schema.org/schema",
5
- "title": "Update package group builder options",
3
+ "version": 2,
4
+ "title": "Readme executor",
6
5
  "description": "",
7
6
  "type": "object",
8
7
  "properties": {},
@@ -0,0 +1,5 @@
1
+ import { RunGeneratorExecutorSchema } from './schema';
2
+ import { ExecutorContext } from '@nx/devkit';
3
+ export default function runExecutor(options: RunGeneratorExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const run_commands_impl_1 = tslib_1.__importDefault(require("nx/src/executors/run-commands/run-commands.impl"));
5
+ function buildParameters(options = {}) {
6
+ const params = [];
7
+ for (const [key, value] of Object.entries(options)) {
8
+ if (key === 'project') {
9
+ console.log('skip project option');
10
+ continue;
11
+ }
12
+ if (Array.isArray(value)) {
13
+ for (const item of value) {
14
+ params.push(`--${key}=${item}`);
15
+ }
16
+ }
17
+ else if (typeof value === 'object') {
18
+ params.push(`--${key}=${JSON.stringify(value)}`);
19
+ }
20
+ else {
21
+ params.push(`--${key}=${value}`);
22
+ }
23
+ }
24
+ return params.join(' ');
25
+ }
26
+ function runExecutor(options, context) {
27
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ console.log('Executor ran for RunGenerator', options);
29
+ let command = `nx g ${options.generator}`;
30
+ if (!options.withoutProjectArgument) {
31
+ command += ` --project ${context.projectName}`;
32
+ }
33
+ command += ` ${buildParameters(options.options)}`;
34
+ if (options.dryRun) {
35
+ command += ' --dry-run';
36
+ }
37
+ console.log('command: ', command);
38
+ return (0, run_commands_impl_1.default)({
39
+ cwd: context.root,
40
+ command,
41
+ __unparsed__: [],
42
+ }, context);
43
+ });
44
+ }
45
+ exports.default = runExecutor;
46
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/run-generator/executor.ts"],"names":[],"mappings":";;;AACA,gHAAkE;AAGlE,SAAS,eAAe,CAAC,UAAmC,EAAE;IAC5D,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KAAK,MAAM,CAAE,GAAG,EAAE,KAAK,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACpD,IAAI,GAAG,KAAK,SAAS,EAAE;YACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YACnC,SAAS;SACV;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,MAAM,CAAC,IAAI,CAAC,KAAM,GAAI,IAAK,IAAK,EAAE,CAAC,CAAC;aACrC;SACF;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpC,MAAM,CAAC,IAAI,CAAC,KAAM,GAAI,IAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAE,EAAE,CAAC,CAAC;SACtD;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,KAAM,GAAI,IAAK,KAAM,EAAE,CAAC,CAAC;SACtC;KACF;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,SAA8B,WAAW,CAAC,OAAmC,EAAE,OAAwB;;QACrG,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;QAEtD,IAAI,OAAO,GAAG,QAAS,OAAO,CAAC,SAAU,EAAE,CAAC;QAE5C,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE;YACnC,OAAO,IAAI,cAAe,OAAO,CAAC,WAAY,EAAE,CAAC;SAClD;QAED,OAAO,IAAI,IAAK,eAAe,CAAC,OAAO,CAAC,OAAO,CAAE,EAAE,CAAC;QAEpD,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,IAAI,YAAY,CAAC;SACzB;QAED,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAElC,OAAO,IAAA,2BAAG,EAAC;YACT,GAAG,EAAE,OAAO,CAAC,IAAI;YACjB,OAAO;YACP,YAAY,EAAE,EAAE;SACjB,EAAE,OAAO,CAAC,CAAC;IACd,CAAC;CAAA;AAtBD,8BAsBC"}
@@ -0,0 +1,6 @@
1
+ export interface RunGeneratorExecutorSchema {
2
+ generator: string;
3
+ options?: Record<string, unknown>;
4
+ withoutProjectArgument?: boolean;
5
+ dryRun?: boolean;
6
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "RunGenerator executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {
8
+ "generator": {
9
+ "type": "string",
10
+ "description": "Name of the generate to execute"
11
+ },
12
+ "options": {
13
+ "type": "object",
14
+ "description": "Options to pass to the generator"
15
+ },
16
+ "withoutProjectArgument": {
17
+ "type": "boolean",
18
+ "description": "If true, the project argument will not be passed to the generator"
19
+ },
20
+ "dryRun": {
21
+ "alias": "dry-run",
22
+ "type": "boolean",
23
+ "description": "If true, the generator will be executed in dry run mode"
24
+ }
25
+ },
26
+ "required": []
27
+ }
@@ -0,0 +1,5 @@
1
+ import { UpdateDependenciesExecutorSchema } from './schema';
2
+ import type { ExecutorContext } from '@nx/devkit';
3
+ export default function runExecutor(options: UpdateDependenciesExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const plugin_utilities_1 = require("@rxap/plugin-utilities");
5
+ function replaceVersionWithCurrentVersion(dependencies = {}, context) {
6
+ const directPackageDependencies = (0, plugin_utilities_1.getDirectPackageDependenciesForProject)(context);
7
+ for (const [packageName] of Object.entries(dependencies)) {
8
+ console.log(`Check if ${packageName} is a direct dependency`);
9
+ if (directPackageDependencies[packageName]) {
10
+ dependencies[packageName] = '^' + directPackageDependencies[packageName];
11
+ console.log(`Updated the version of ${packageName} to ${directPackageDependencies[packageName]}`);
12
+ }
13
+ else {
14
+ console.log(`Skip ${packageName} because it is not a direct dependency`);
15
+ }
16
+ }
17
+ }
18
+ function runExecutor(options, context) {
19
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ const packageJson = (0, plugin_utilities_1.readPackageJsonForProject)(context);
21
+ const { dependencies, peerDependencies, optionalDependencies, } = packageJson;
22
+ replaceVersionWithCurrentVersion(dependencies, context);
23
+ replaceVersionWithCurrentVersion(peerDependencies, context);
24
+ replaceVersionWithCurrentVersion(optionalDependencies, context);
25
+ (0, plugin_utilities_1.writePackageJsonFormProject)(context, packageJson);
26
+ return {
27
+ success: true,
28
+ };
29
+ });
30
+ }
31
+ exports.default = runExecutor;
32
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/update-dependencies/executor.ts"],"names":[],"mappings":";;;AAEA,6DAIgC;AAGhC,SAAS,gCAAgC,CACvC,eAAuC,EAAE,EACzC,OAAwB;IAGxB,MAAM,yBAAyB,GAAG,IAAA,yDAAsC,EAAC,OAAO,CAAC,CAAC;IAElF,KAAK,MAAM,CAAE,WAAW,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1D,OAAO,CAAC,GAAG,CAAC,YAAa,WAAY,yBAAyB,CAAC,CAAC;QAChE,IAAI,yBAAyB,CAAC,WAAW,CAAC,EAAE;YAC1C,YAAY,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,yBAAyB,CAAC,WAAW,CAAC,CAAC;YACzE,OAAO,CAAC,GAAG,CAAC,0BAA2B,WAAY,OAAQ,yBAAyB,CAAC,WAAW,CAAE,EAAE,CAAC,CAAC;SACvG;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,QAAS,WAAY,wCAAwC,CAAC,CAAC;SAC5E;KACF;AAEH,CAAC;AAED,SAA8B,WAAW,CACvC,OAAyC,EACzC,OAAwB;;QAExB,MAAM,WAAW,GAAG,IAAA,4CAAyB,EAAC,OAAO,CAAC,CAAC;QAEvD,MAAM,EACJ,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,GAAG,WAAW,CAAC;QAEhB,gCAAgC,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACxD,gCAAgC,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC5D,gCAAgC,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAEhE,IAAA,8CAA2B,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAElD,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CAAA;AArBD,8BAqBC"}
@@ -0,0 +1 @@
1
+ export interface UpdateDependenciesExecutorSchema {} // eslint-disable-line
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "UpdateDependencies executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {},
8
+ "required": []
9
+ }
@@ -0,0 +1,5 @@
1
+ import { UpdatePackageGroupExecutorSchema } from './schema';
2
+ import { ExecutorContext } from '@nx/devkit';
3
+ export default function runExecutor(options: UpdatePackageGroupExecutorSchema, context: ExecutorContext): Promise<{
4
+ success: boolean;
5
+ }>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const package_json_1 = require("nx/src/utils/package-json");
5
+ const plugin_utilities_1 = require("@rxap/plugin-utilities");
6
+ function getPackageGroup(context) {
7
+ const directPackageDependencies = (0, plugin_utilities_1.getDirectPackageDependenciesForProject)(context);
8
+ return Object.entries(directPackageDependencies)
9
+ .filter(([packageName]) => packageName.startsWith('@rxap/'))
10
+ .map(([packageName, version]) => ({
11
+ package: packageName,
12
+ version: version,
13
+ }));
14
+ }
15
+ function mergePackageGroup(original, updated) {
16
+ const normalized = (0, package_json_1.normalizePackageGroup)(original);
17
+ return [...updated, ...normalized].filter((item, index, array) => {
18
+ return array.findIndex(({ package: packageName }) => packageName === item.package) === index;
19
+ }).filter(({ package: packageName }) => packageName.startsWith('@rxap/'));
20
+ }
21
+ function runExecutor(options, context) {
22
+ var _a, _b;
23
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ const packageJson = (0, plugin_utilities_1.readPackageJsonForProject)(context);
25
+ // ensure the property "ng-migrations" exists
26
+ (_a = packageJson['nx-migrations']) !== null && _a !== void 0 ? _a : (packageJson['nx-migrations'] = {});
27
+ const { 'nx-migrations': nxMigrations } = packageJson;
28
+ if (!nxMigrations) {
29
+ console.error('INTERNAL: Could not extract the nx-migrations property from the package.json');
30
+ return { success: false };
31
+ }
32
+ if (typeof nxMigrations !== 'object') {
33
+ console.error('INTERNAL: The nx-migrations property in the package.json is not an object');
34
+ return { success: false };
35
+ }
36
+ (_b = nxMigrations.packageGroup) !== null && _b !== void 0 ? _b : (nxMigrations.packageGroup = []);
37
+ nxMigrations.packageGroup = mergePackageGroup(nxMigrations.packageGroup, getPackageGroup(context));
38
+ (0, plugin_utilities_1.writePackageJsonFormProject)(context, packageJson);
39
+ return {
40
+ success: true,
41
+ };
42
+ });
43
+ }
44
+ exports.default = runExecutor;
45
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/update-package-group/executor.ts"],"names":[],"mappings":";;;AAEA,4DAImC;AACnC,6DAIgC;AAEhC,SAAS,eAAe,CAAC,OAAwB;IAC/C,MAAM,yBAAyB,GAAG,IAAA,yDAAsC,EAAC,OAAO,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC,OAAO,CAAC,yBAAyB,CAAC;SAClC,MAAM,CAAC,CAAC,CAAE,WAAW,CAAE,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;SAC7D,GAAG,CAAC,CAAC,CAAE,WAAW,EAAE,OAAO,CAAE,EAAE,EAAE,CAAC,CAAC;QAClC,OAAO,EAAE,WAAW;QACpB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAsB,EAAE,OAA0B;IAC3E,MAAM,UAAU,GAAG,IAAA,oCAAqB,EAAC,QAAQ,CAAC,CAAC;IACnD,OAAO,CAAE,GAAG,OAAO,EAAE,GAAG,UAAU,CAAE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+1 @@
1
+ export interface UpdatePackageGroupExecutorSchema {} // eslint-disable-line
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "UpdatePackageGroup executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {},
8
+ "required": []
9
+ }
@@ -0,0 +1,27 @@
1
+ import { Tree } from '@nx/devkit';
2
+ import { FixDependenciesGeneratorSchema } from './schema';
3
+ import { ProjectPackageJson } from '@rxap/plugin-utilities';
4
+ export declare function resolveLatestPackageVersion(packageName: string): Promise<string>;
5
+ export declare function replaceLatestPackageVersionForProject(tree: Tree, projectName: string): Promise<void>;
6
+ export declare function removePackageFromDependencies(packageName: string, dependencies: Record<string, string>): void;
7
+ export declare function removeSelfReferenceFromDependencies(projectName: string, { dependencies, peerDependencies, devDependencies, optionalDependencies, }: ProjectPackageJson): void;
8
+ /**
9
+ * This generator tries to fix the dependencies in the project.json of the project
10
+ *
11
+ * 1. Load all not-test typescript files from the project
12
+ * 1.1. Find all import statements
13
+ * a. If a project with the package name exists add it to the peerDependencies with version '*'. (skip if the package is already in the dependencies)
14
+ * b. If external package add it to the peerDependencies with the version from a parent package.json or 'latest' if not found.
15
+ * 2. Load all test typescript files from the project
16
+ * 2.1. Find all import statements
17
+ * a. If a project with the package name exists add it to the devDependencies with version '*'. (skip if the package is already in the dependencies)
18
+ * - for each project that is use in the test files add it direct and indirect dependencies to the devDependencies TODO : check if that is required
19
+ * b. If external package add it to the devDependencies with the version from a parent package.json or 'latest' if not found.
20
+ *
21
+ * 3. print a report about the changes
22
+ *
23
+ * @param tree
24
+ * @param options
25
+ */
26
+ export declare function fixDependenciesGenerator(tree: Tree, options: FixDependenciesGeneratorSchema): Promise<void>;
27
+ export default fixDependenciesGenerator;