@conformetry/nx 0.0.26 → 0.0.28
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 +22 -0
- package/README.md +20 -20
- package/dist/{bootstrap.utilities-BImMIPHz.js → bootstrap.utilities-CYl9__Vf.js} +13 -13
- package/dist/{plugin-context.utilities-BHfGQv2V.js → plugin-context.utilities-nggdWdJp.js} +254 -254
- package/dist/src/conformetry-nx.main.js +5 -0
- package/dist/src/executors/validate/executor.js +1 -1
- package/dist/src/generators/sync/generator.js +10 -10
- package/dist/src/index.js +6 -6
- package/package.json +6 -6
- package/dist/src/main.js +0 -5
- /package/dist/src/{main.d.ts → conformetry-nx.main.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 0.0.28 (2026-10-15)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated conformetry-configuration to 0.0.28
|
|
6
|
+
- Updated conformetry-generation to 0.0.28
|
|
7
|
+
- Updated conformetry-validation to 0.0.27
|
|
8
|
+
- Updated conformetry-output to 0.0.27
|
|
9
|
+
|
|
10
|
+
## 0.0.27 (2026-10-15)
|
|
11
|
+
|
|
12
|
+
### 🚀 Features
|
|
13
|
+
|
|
14
|
+
- **ic-suite,configuration:** ✨ name root files after their project and declare root modules ([#1588](https://github.com/organizzolini/codebase/pull/1588), [#1480](https://github.com/organizzolini/codebase/issues/1480))
|
|
15
|
+
|
|
16
|
+
### 🧱 Updated Dependencies
|
|
17
|
+
|
|
18
|
+
- Updated conformetry-configuration to 0.0.27
|
|
19
|
+
- Updated conformetry-generation to 0.0.27
|
|
20
|
+
- Updated conformetry-validation to 0.0.26
|
|
21
|
+
- Updated conformetry-output to 0.0.26
|
|
22
|
+
|
|
1
23
|
## 0.0.26 (2026-10-15)
|
|
2
24
|
|
|
3
25
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -540,6 +540,9 @@ graph LR
|
|
|
540
540
|
file_codependix_config_ts["codependix.config.ts"]
|
|
541
541
|
file_codometer_config_ts["codometer.config.ts"]
|
|
542
542
|
file_eslint_config_ts["eslint.config.ts"]
|
|
543
|
+
file_src_conformetry_nx_main_ts["src/conformetry-nx.main.ts"]
|
|
544
|
+
file_src_conformetry_nx_main_unit_test_ts["src/conformetry-nx.main.unit.test.ts"]
|
|
545
|
+
file_src_conformetry_nx_module_ts["src/conformetry-nx.module.ts"]
|
|
543
546
|
file_src_executors_validate_executor_ts["src/executors/validate/executor.ts"]
|
|
544
547
|
file_src_executors_validate_executor_types_ts["src/executors/validate/executor.types.ts"]
|
|
545
548
|
file_src_executors_validate_executor_unit_test_ts["src/executors/validate/executor.unit.test.ts"]
|
|
@@ -548,9 +551,6 @@ graph LR
|
|
|
548
551
|
file_src_generators_sync_generator_unit_test_ts["src/generators/sync/generator.unit.test.ts"]
|
|
549
552
|
file_src_index_ts["src/index.ts"]
|
|
550
553
|
file_src_index_unit_test_ts["src/index.unit.test.ts"]
|
|
551
|
-
file_src_main_module_ts["src/main.module.ts"]
|
|
552
|
-
file_src_main_ts["src/main.ts"]
|
|
553
|
-
file_src_main_unit_test_ts["src/main.unit.test.ts"]
|
|
554
554
|
file_src_modules_adapter_adapter_constants_ts["src/modules/adapter/adapter.constants.ts"]
|
|
555
555
|
file_src_modules_adapter_adapter_module_ts["src/modules/adapter/adapter.module.ts"]
|
|
556
556
|
file_src_modules_adapter_adapter_service_ts["src/modules/adapter/adapter.service.ts"]
|
|
@@ -600,6 +600,10 @@ graph LR
|
|
|
600
600
|
file_testing_setup_ts["testing/setup.ts"]
|
|
601
601
|
file_vite_config_ts["vite.config.ts"]
|
|
602
602
|
file_vitest_config_ts["vitest.config.ts"]
|
|
603
|
+
file_src_conformetry_nx_main_ts --> file_src_modules_generator_bootstrap_utilities_ts
|
|
604
|
+
file_src_conformetry_nx_main_unit_test_ts --> file_src_modules_generator_bootstrap_utilities_ts
|
|
605
|
+
file_src_conformetry_nx_module_ts --> file_src_modules_generator_generator_module_ts
|
|
606
|
+
file_src_conformetry_nx_module_ts --> file_src_modules_plugin_plugin_module_ts
|
|
603
607
|
file_src_executors_validate_executor_ts --> file_src_executors_validate_executor_types_ts
|
|
604
608
|
file_src_executors_validate_executor_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
605
609
|
file_src_executors_validate_executor_unit_test_ts --> file_src_executors_validate_executor_ts
|
|
@@ -614,10 +618,6 @@ graph LR
|
|
|
614
618
|
file_src_index_ts --> file_src_modules_plugin_plugin_constants_ts
|
|
615
619
|
file_src_index_unit_test_ts --> file_src_index_ts
|
|
616
620
|
file_src_index_unit_test_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
617
|
-
file_src_main_module_ts --> file_src_modules_generator_generator_module_ts
|
|
618
|
-
file_src_main_module_ts --> file_src_modules_plugin_plugin_module_ts
|
|
619
|
-
file_src_main_ts --> file_src_modules_generator_bootstrap_utilities_ts
|
|
620
|
-
file_src_main_unit_test_ts --> file_src_modules_generator_bootstrap_utilities_ts
|
|
621
621
|
file_src_modules_adapter_adapter_module_ts --> file_src_modules_adapter_adapter_service_ts
|
|
622
622
|
file_src_modules_adapter_adapter_service_ts --> file_src_modules_adapter_adapter_constants_ts
|
|
623
623
|
file_src_modules_adapter_adapter_service_ts --> file_src_modules_adapter_adapter_types_ts
|
|
@@ -663,7 +663,7 @@ graph LR
|
|
|
663
663
|
file_src_modules_paths_paths_service_unit_test_ts --> file_src_modules_paths_paths_module_ts
|
|
664
664
|
file_src_modules_paths_paths_service_unit_test_ts --> file_src_modules_paths_paths_service_ts
|
|
665
665
|
file_src_modules_paths_paths_service_unit_test_ts --> file_src_modules_scope_scope_service_ts
|
|
666
|
-
file_src_modules_plugin_plugin_context_utilities_ts -->
|
|
666
|
+
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_conformetry_nx_module_ts
|
|
667
667
|
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_modules_generator_generator_service_ts
|
|
668
668
|
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_modules_options_options_service_ts
|
|
669
669
|
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_modules_plugin_plugin_constants_ts
|
|
@@ -721,8 +721,8 @@ graph LR
|
|
|
721
721
|
|
|
722
722
|
### Project
|
|
723
723
|
|
|
724
|
-

|
|
725
|
+

|
|
726
726
|

|
|
727
727
|

|
|
728
728
|
|
|
@@ -753,8 +753,8 @@ graph LR
|
|
|
753
753
|

|
|
754
754
|

|
|
755
755
|

|
|
756
|
-

|
|
757
|
+

|
|
758
758
|

|
|
759
759
|
|
|
760
760
|
### Python
|
|
@@ -910,23 +910,23 @@ graph LR
|
|
|
910
910
|
### Markdown
|
|
911
911
|
|
|
912
912
|

|
|
913
|
-

|
|
914
914
|

|
|
915
|
-

|
|
916
|
+

|
|
917
917
|

|
|
918
918
|

|
|
919
919
|

|
|
920
|
-

|
|
921
|
+

|
|
922
|
+

|
|
923
923
|

|
|
924
924
|

|
|
925
925
|

|
|
926
|
-

|
|
927
927
|

|
|
928
928
|

|
|
929
|
-

|
|
930
930
|

|
|
931
931
|

|
|
932
932
|
<!-- codometer:end -->
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as e, g as t, h as n, i as r, n as i, t as a } from "./plugin-context.utilities-nggdWdJp.js";
|
|
2
2
|
import { existsSync as o, lstatSync as s, mkdirSync as c, readFileSync as l, realpathSync as u, rmSync as d, symlinkSync as f, writeFileSync as p } from "node:fs";
|
|
3
3
|
import m from "node:path";
|
|
4
4
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts
|
|
5
|
-
async function bootstrapPlugin(
|
|
5
|
+
async function bootstrapPlugin(e) {
|
|
6
6
|
let s = await a(), c = await i(), l = await r(), u = await s.emitPlugin({
|
|
7
7
|
configurationPath: c.resolveConfigurationPath({
|
|
8
|
-
exists: (
|
|
9
|
-
nxConfiguration: readNxConfiguration(
|
|
8
|
+
exists: (t) => o(m.resolve(e, t)),
|
|
9
|
+
nxConfiguration: readNxConfiguration(e)
|
|
10
10
|
}),
|
|
11
11
|
outputPath: n,
|
|
12
|
-
packageName:
|
|
13
|
-
projects: l.listWorkspaceProjects(
|
|
12
|
+
packageName: t,
|
|
13
|
+
projects: l.listWorkspaceProjects(e)
|
|
14
14
|
});
|
|
15
15
|
return writePlugin({
|
|
16
16
|
files: u,
|
|
17
|
-
workspaceRoot:
|
|
18
|
-
}), linkPlugin(
|
|
17
|
+
workspaceRoot: e
|
|
18
|
+
}), linkPlugin(e), u;
|
|
19
19
|
}
|
|
20
20
|
async function runBootstrapCli(e) {
|
|
21
21
|
try {
|
|
@@ -32,19 +32,19 @@ function leadsTo(e) {
|
|
|
32
32
|
return !o(e.linkPath);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
function linkPlugin(
|
|
36
|
-
let r = m.resolve(
|
|
35
|
+
function linkPlugin(e) {
|
|
36
|
+
let r = m.resolve(e, "node_modules", t), i = m.resolve(e, n);
|
|
37
37
|
if (c(m.dirname(r), { recursive: !0 }), s(r, { throwIfNoEntry: !1 }) !== void 0 && !leadsTo({
|
|
38
38
|
linkPath: r,
|
|
39
39
|
outputPath: i
|
|
40
|
-
})) throw Error(`node_modules/${
|
|
40
|
+
})) throw Error(`node_modules/${t} is an installed package, not a link to ${n}. Rename the emitted plugin via the sync generator's packageName option.`);
|
|
41
41
|
d(r, {
|
|
42
42
|
force: !0,
|
|
43
43
|
recursive: !0
|
|
44
44
|
}), f(m.relative(m.dirname(r), i), r, "dir");
|
|
45
45
|
}
|
|
46
|
-
function readNxConfiguration(
|
|
47
|
-
let n = m.resolve(
|
|
46
|
+
function readNxConfiguration(t) {
|
|
47
|
+
let n = m.resolve(t, e);
|
|
48
48
|
if (o(n)) return JSON.parse(l(n, "utf8"));
|
|
49
49
|
}
|
|
50
50
|
function writePlugin(e) {
|
|
@@ -1,19 +1,36 @@
|
|
|
1
|
+
import e, { existsSync as t, mkdirSync as n, readFileSync as r, readdirSync as i } from "node:fs";
|
|
2
|
+
import a from "node:path";
|
|
1
3
|
import "reflect-metadata";
|
|
2
|
-
import { NestFactory as
|
|
3
|
-
import { ConsoleLogger as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ValidationModule as y, ValidationService as b } from "@conformetry/validation";
|
|
11
|
-
import { formatFiles as te, getProjects as ne, readProjectConfiguration as x } from "@nx/devkit";
|
|
4
|
+
import { NestFactory as o } from "@nestjs/core";
|
|
5
|
+
import { ConsoleLogger as s, Global as c, Injectable as l, Module as u, Scope as ee } from "@nestjs/common";
|
|
6
|
+
import d from "pino";
|
|
7
|
+
import { ConfigurationModule as f, ConfigurationService as p, missingDirectoryError as te } from "@conformetry/configuration";
|
|
8
|
+
import { GenerationModule as m, GenerationService as h } from "@conformetry/generation";
|
|
9
|
+
import { ReportingModule as g, ReportingService as _ } from "@conformetry/output";
|
|
10
|
+
import { ValidationModule as v, ValidationService as y } from "@conformetry/validation";
|
|
11
|
+
import { formatFiles as ne, getProjects as b, readProjectConfiguration as re } from "@nx/devkit";
|
|
12
12
|
//#region \0rolldown/runtime.js
|
|
13
|
-
var
|
|
13
|
+
var ie = Object.defineProperty, __name = (e, t) => ie(e, "name", {
|
|
14
14
|
value: t,
|
|
15
15
|
configurable: !0
|
|
16
|
-
}),
|
|
16
|
+
}), x = "@conformetry/nx", S = [
|
|
17
|
+
"conformetry.config.ts",
|
|
18
|
+
"conformetry.config.mts",
|
|
19
|
+
"conformetry.config.cts",
|
|
20
|
+
"conformetry.config.js",
|
|
21
|
+
"conformetry.config.mjs",
|
|
22
|
+
"conformetry.config.cjs",
|
|
23
|
+
"conformetry.config.json",
|
|
24
|
+
"conformetry.config.jsonc",
|
|
25
|
+
"conformetry.json",
|
|
26
|
+
"conformetry.jsonc",
|
|
27
|
+
".conformetryrc.ts",
|
|
28
|
+
".conformetryrc.js",
|
|
29
|
+
".conformetryrc.json",
|
|
30
|
+
"conformetryrc.ts",
|
|
31
|
+
"conformetryrc.js",
|
|
32
|
+
"conformetryrc.json"
|
|
33
|
+
], C = "nx.json", ae = "conformetry-validate", oe = ["configurationPath", "validateTargetName"], se = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\s+/u, w = /^([A-Za-z]+)/, T = /* @__PURE__ */ new Set([
|
|
17
34
|
"built",
|
|
18
35
|
"cut",
|
|
19
36
|
"found",
|
|
@@ -31,7 +48,7 @@ var S = Object.defineProperty, __name = (e, t) => S(e, "name", {
|
|
|
31
48
|
"split",
|
|
32
49
|
"took",
|
|
33
50
|
"wrote"
|
|
34
|
-
]),
|
|
51
|
+
]), E = /* @__PURE__ */ new Set([
|
|
35
52
|
"CommandFactory",
|
|
36
53
|
"ExceptionHandler",
|
|
37
54
|
"GraphQLModule",
|
|
@@ -57,9 +74,9 @@ function __decorate(e, t, n, r) {
|
|
|
57
74
|
}
|
|
58
75
|
//#endregion
|
|
59
76
|
//#region projects/logging/src/modules/logger/logger.service.ts
|
|
60
|
-
var
|
|
77
|
+
var D, O = class LoggerService extends s {
|
|
61
78
|
static {
|
|
62
|
-
|
|
79
|
+
D = this;
|
|
63
80
|
}
|
|
64
81
|
constructor() {
|
|
65
82
|
super();
|
|
@@ -67,15 +84,15 @@ var C, w = class LoggerService extends t {
|
|
|
67
84
|
static isProduction = process.env.NODE_ENV === "production";
|
|
68
85
|
static rootLogger;
|
|
69
86
|
static writesToStandardError = !1;
|
|
70
|
-
child =
|
|
87
|
+
child = D.root;
|
|
71
88
|
static createRootLogger() {
|
|
72
89
|
let e = process.env.LOG_LEVEL ?? "info";
|
|
73
|
-
return
|
|
90
|
+
return D.isProduction ? D.writesToStandardError ? d({ level: e }, d.destination(2)) : d({ level: e }) : d({
|
|
74
91
|
level: e,
|
|
75
92
|
transport: {
|
|
76
93
|
options: {
|
|
77
94
|
colorize: !0,
|
|
78
|
-
destination:
|
|
95
|
+
destination: D.writesToStandardError ? 2 : 1,
|
|
79
96
|
ignore: "pid,hostname,emoji",
|
|
80
97
|
messageFormat: "{emoji} {msg}",
|
|
81
98
|
singleLine: !0
|
|
@@ -85,10 +102,10 @@ var C, w = class LoggerService extends t {
|
|
|
85
102
|
});
|
|
86
103
|
}
|
|
87
104
|
static logToStandardError() {
|
|
88
|
-
|
|
105
|
+
D.rootLogger === void 0 ? D.writesToStandardError = !0 : process.emitWarning("LoggerService.logToStandardError() was called after the first log line, so log lines still go to standard output and anything piping that stream will read them as data. Call it as the first statement of the application's bootstrap.");
|
|
89
106
|
}
|
|
90
107
|
assertConventionalMessage(e) {
|
|
91
|
-
if (
|
|
108
|
+
if (D.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
|
|
92
109
|
let t = this.getConventionalMessageViolation(e.parsed);
|
|
93
110
|
if (t !== void 0) throw Error(t);
|
|
94
111
|
}
|
|
@@ -99,21 +116,21 @@ var C, w = class LoggerService extends t {
|
|
|
99
116
|
}), {
|
|
100
117
|
...e.data,
|
|
101
118
|
context: e.context,
|
|
102
|
-
...
|
|
119
|
+
...D.isProduction ? {} : { emoji: e.parsed.emoji }
|
|
103
120
|
};
|
|
104
121
|
}
|
|
105
122
|
getConventionalMessageViolation(e) {
|
|
106
123
|
let t = e.emoji, n = e.text;
|
|
107
124
|
if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
|
|
108
|
-
let r =
|
|
125
|
+
let r = w.exec(n)?.[1];
|
|
109
126
|
if (r === void 0 || !this.isConventionalVerb(r)) return `Log message must begin with a verb in present progressive or past tense, got "${r ?? ""}": "${t} ${n}"`;
|
|
110
127
|
}
|
|
111
128
|
isConventionalVerb(e) {
|
|
112
129
|
let t = e.toLowerCase();
|
|
113
|
-
return t.endsWith("ing") || t.endsWith("ed") ||
|
|
130
|
+
return t.endsWith("ing") || t.endsWith("ed") || T.has(t);
|
|
114
131
|
}
|
|
115
132
|
parseMessage(e) {
|
|
116
|
-
let t = String(e), n =
|
|
133
|
+
let t = String(e), n = se.exec(t), r = n?.[1];
|
|
117
134
|
return r === void 0 ? {
|
|
118
135
|
emoji: void 0,
|
|
119
136
|
text: t
|
|
@@ -123,10 +140,10 @@ var C, w = class LoggerService extends t {
|
|
|
123
140
|
};
|
|
124
141
|
}
|
|
125
142
|
shouldSkipConventionalMessageValidation(e) {
|
|
126
|
-
return e !== void 0 &&
|
|
143
|
+
return e !== void 0 && E.has(e);
|
|
127
144
|
}
|
|
128
145
|
static get root() {
|
|
129
|
-
return
|
|
146
|
+
return D.rootLogger ??= D.createRootLogger(), D.rootLogger;
|
|
130
147
|
}
|
|
131
148
|
buildErrorLogEntry(e, t) {
|
|
132
149
|
let n = t instanceof Error ? t.stack || t.message : String(t);
|
|
@@ -136,8 +153,8 @@ var C, w = class LoggerService extends t {
|
|
|
136
153
|
};
|
|
137
154
|
}
|
|
138
155
|
createTimestampedOutputLogFilePath(e) {
|
|
139
|
-
let
|
|
140
|
-
return
|
|
156
|
+
let r = a.join(process.cwd(), "output");
|
|
157
|
+
return t(r) || n(r, { recursive: !0 }), a.join(r, `${e}-${(/* @__PURE__ */ new Date()).toISOString().replaceAll(/[:.]/g, "-")}.log`);
|
|
141
158
|
}
|
|
142
159
|
debug(e, t, n) {
|
|
143
160
|
let r = this.parseMessage(e);
|
|
@@ -170,7 +187,7 @@ var C, w = class LoggerService extends t {
|
|
|
170
187
|
this.info(e, t, n);
|
|
171
188
|
}
|
|
172
189
|
setContext(e) {
|
|
173
|
-
super.setContext(e), this.child =
|
|
190
|
+
super.setContext(e), this.child = D.root.child({ context: e });
|
|
174
191
|
}
|
|
175
192
|
verbose(e, t, n) {
|
|
176
193
|
let r = this.parseMessage(e);
|
|
@@ -189,19 +206,19 @@ var C, w = class LoggerService extends t {
|
|
|
189
206
|
}), r.text);
|
|
190
207
|
}
|
|
191
208
|
};
|
|
192
|
-
|
|
209
|
+
O = D = __decorate([l({ scope: ee.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], O);
|
|
193
210
|
//#endregion
|
|
194
211
|
//#region projects/logging/src/modules/logger/logger.module.ts
|
|
195
|
-
var
|
|
196
|
-
|
|
212
|
+
var k = class LoggerModule {};
|
|
213
|
+
k = __decorate([c(), u({
|
|
197
214
|
controllers: [],
|
|
198
|
-
exports: [
|
|
215
|
+
exports: [O],
|
|
199
216
|
imports: [],
|
|
200
|
-
providers: [
|
|
201
|
-
})],
|
|
217
|
+
providers: [O]
|
|
218
|
+
})], k);
|
|
202
219
|
//#endregion
|
|
203
220
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts
|
|
204
|
-
var
|
|
221
|
+
var A = class ScopeService {
|
|
205
222
|
configurationService;
|
|
206
223
|
constructor(e) {
|
|
207
224
|
this.configurationService = e;
|
|
@@ -216,7 +233,7 @@ var E = class ScopeService {
|
|
|
216
233
|
let t = e.group.patterns;
|
|
217
234
|
return !this.matchesProject(e) || t === void 0 || t.length === 0 ? [] : this.isProjectGroup(e.group) ? [{
|
|
218
235
|
...e.group,
|
|
219
|
-
patterns: t.map((t) =>
|
|
236
|
+
patterns: t.map((t) => a.posix.join(e.project.root, t))
|
|
220
237
|
}] : [e.group];
|
|
221
238
|
}
|
|
222
239
|
resolveScopedDirectory(e) {
|
|
@@ -233,19 +250,19 @@ var E = class ScopeService {
|
|
|
233
250
|
}))).map((e) => e.name).toSorted((e, t) => e.localeCompare(t));
|
|
234
251
|
}
|
|
235
252
|
};
|
|
236
|
-
|
|
253
|
+
A = __decorate([l(), __decorateMetadata("design:paramtypes", [p === void 0 ? Object : p])], A);
|
|
237
254
|
//#endregion
|
|
238
255
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.module.ts
|
|
239
|
-
var
|
|
240
|
-
|
|
256
|
+
var j = class ScopeModule {};
|
|
257
|
+
j = __decorate([u({
|
|
241
258
|
controllers: [],
|
|
242
|
-
exports: [
|
|
243
|
-
imports: [
|
|
244
|
-
providers: [
|
|
245
|
-
})],
|
|
259
|
+
exports: [A],
|
|
260
|
+
imports: [f],
|
|
261
|
+
providers: [A]
|
|
262
|
+
})], j);
|
|
246
263
|
//#endregion
|
|
247
264
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.constants.ts
|
|
248
|
-
var
|
|
265
|
+
var M = "project", ce = "module", le = "type", ue = "directory", N = ".conformetry/nx-generators", de = "// Generated from the conformetry configuration. Do not edit.", P = "The conformetry generator plugin is out of sync with the conformetry configuration.", F = "conformetry", fe = "node_modules/@nx/devkit/src/generators/generators-schema.json", I = class GeneratorService {
|
|
249
266
|
configurationService;
|
|
250
267
|
scopeService;
|
|
251
268
|
constructor(e, t) {
|
|
@@ -253,7 +270,7 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
253
270
|
}
|
|
254
271
|
buildGeneratorModule(e) {
|
|
255
272
|
return [
|
|
256
|
-
|
|
273
|
+
de,
|
|
257
274
|
"",
|
|
258
275
|
"import { runConformetryGenerator } from \"@conformetry/nx\";",
|
|
259
276
|
"",
|
|
@@ -283,7 +300,7 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
283
300
|
schema: `./src/schemas/${n.name}.json`
|
|
284
301
|
};
|
|
285
302
|
return this.stringify({
|
|
286
|
-
$schema:
|
|
303
|
+
$schema: a.relative(e.outputPath, fe).split(a.sep).join("/"),
|
|
287
304
|
generators: t
|
|
288
305
|
});
|
|
289
306
|
}
|
|
@@ -298,10 +315,10 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
298
315
|
});
|
|
299
316
|
}
|
|
300
317
|
buildSchemaProperties(e) {
|
|
301
|
-
let t = e.definition.inputs[
|
|
318
|
+
let t = e.definition.inputs[M];
|
|
302
319
|
return t === void 0 || e.scopedProjectNames === void 0 || e.scopedProjectNames.length === 0 ? e.definition.inputs : {
|
|
303
320
|
...e.definition.inputs,
|
|
304
|
-
[
|
|
321
|
+
[M]: {
|
|
305
322
|
...t,
|
|
306
323
|
enum: e.scopedProjectNames,
|
|
307
324
|
"x-prompt": {
|
|
@@ -331,11 +348,11 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
331
348
|
definitions: t,
|
|
332
349
|
outputPath: e.outputPath
|
|
333
350
|
}),
|
|
334
|
-
filePath:
|
|
351
|
+
filePath: a.join(e.outputPath, "generators.json")
|
|
335
352
|
},
|
|
336
353
|
...t.map((t) => ({
|
|
337
354
|
content: this.buildGeneratorModule(t),
|
|
338
|
-
filePath:
|
|
355
|
+
filePath: a.join(e.outputPath, `src/generators/${t.name}.ts`)
|
|
339
356
|
})),
|
|
340
357
|
...t.map((t) => ({
|
|
341
358
|
content: this.buildSchema({
|
|
@@ -345,7 +362,7 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
345
362
|
projects: e.projects
|
|
346
363
|
})
|
|
347
364
|
}),
|
|
348
|
-
filePath:
|
|
365
|
+
filePath: a.join(e.outputPath, `src/schemas/${t.name}.json`)
|
|
349
366
|
})),
|
|
350
367
|
{
|
|
351
368
|
content: this.stringify({
|
|
@@ -360,49 +377,49 @@ var O = "project", k = "module", se = "type", A = "directory", j = ".conformetry
|
|
|
360
377
|
type: "module",
|
|
361
378
|
version: "0.0.1"
|
|
362
379
|
}),
|
|
363
|
-
filePath:
|
|
380
|
+
filePath: a.join(e.outputPath, "package.json")
|
|
364
381
|
}
|
|
365
382
|
];
|
|
366
383
|
}
|
|
367
384
|
};
|
|
368
|
-
|
|
385
|
+
I = __decorate([l(), __decorateMetadata("design:paramtypes", [p === void 0 ? Object : p, A === void 0 ? Object : A])], I);
|
|
369
386
|
//#endregion
|
|
370
387
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.module.ts
|
|
371
|
-
var
|
|
372
|
-
|
|
388
|
+
var L = class GeneratorModule {};
|
|
389
|
+
L = __decorate([u({
|
|
373
390
|
controllers: [],
|
|
374
391
|
exports: [
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
392
|
+
f,
|
|
393
|
+
I,
|
|
394
|
+
j
|
|
378
395
|
],
|
|
379
|
-
imports: [
|
|
380
|
-
providers: [
|
|
381
|
-
})],
|
|
396
|
+
imports: [f, j],
|
|
397
|
+
providers: [I]
|
|
398
|
+
})], L);
|
|
382
399
|
//#endregion
|
|
383
400
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/adapter/adapter.constants.ts
|
|
384
|
-
var
|
|
401
|
+
var R = "utf8", z = class AdapterService {
|
|
385
402
|
constructor() {}
|
|
386
|
-
async listDirectory(
|
|
387
|
-
let
|
|
388
|
-
return
|
|
403
|
+
async listDirectory(t) {
|
|
404
|
+
let n = this.resolveTreePath(t);
|
|
405
|
+
return n === void 0 ? e.readdirSync(t.directoryPath, { withFileTypes: !0 }).map((e) => ({
|
|
389
406
|
isDirectory: e.isDirectory(),
|
|
390
407
|
name: e.name
|
|
391
|
-
})) : await Promise.resolve(
|
|
392
|
-
isDirectory: !
|
|
393
|
-
name:
|
|
408
|
+
})) : await Promise.resolve(t.tree.children(n).map((e) => ({
|
|
409
|
+
isDirectory: !t.tree.isFile([n, e].join("/")),
|
|
410
|
+
name: e
|
|
394
411
|
})));
|
|
395
412
|
}
|
|
396
|
-
async readFile(
|
|
397
|
-
let
|
|
398
|
-
directoryPath:
|
|
399
|
-
workspaceRoot:
|
|
400
|
-
}),
|
|
401
|
-
return await Promise.resolve(
|
|
413
|
+
async readFile(t) {
|
|
414
|
+
let n = this.resolveTreePath({
|
|
415
|
+
directoryPath: t.filePath,
|
|
416
|
+
workspaceRoot: t.workspaceRoot
|
|
417
|
+
}), r = n === void 0 ? null : t.tree.read(n, R);
|
|
418
|
+
return await Promise.resolve(r ?? e.readFileSync(t.filePath, "utf8"));
|
|
402
419
|
}
|
|
403
420
|
resolveTreePath(e) {
|
|
404
|
-
let t =
|
|
405
|
-
if (!(t.startsWith("..") ||
|
|
421
|
+
let t = a.relative(e.workspaceRoot, e.directoryPath);
|
|
422
|
+
if (!(t.startsWith("..") || a.isAbsolute(t))) return t.split(a.sep).join("/");
|
|
406
423
|
}
|
|
407
424
|
createAdapters(e) {
|
|
408
425
|
return {
|
|
@@ -429,35 +446,35 @@ var de = "utf8", F = class AdapterService {
|
|
|
429
446
|
}
|
|
430
447
|
},
|
|
431
448
|
formatter: { formatFiles: async () => {
|
|
432
|
-
await
|
|
449
|
+
await ne(e.tree);
|
|
433
450
|
} }
|
|
434
451
|
};
|
|
435
452
|
}
|
|
436
453
|
};
|
|
437
|
-
|
|
454
|
+
z = __decorate([l(), __decorateMetadata("design:paramtypes", [])], z);
|
|
438
455
|
//#endregion
|
|
439
456
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/adapter/adapter.module.ts
|
|
440
|
-
var
|
|
441
|
-
|
|
457
|
+
var B = class AdapterModule {};
|
|
458
|
+
B = __decorate([u({
|
|
442
459
|
controllers: [],
|
|
443
|
-
exports: [
|
|
460
|
+
exports: [z],
|
|
444
461
|
imports: [],
|
|
445
|
-
providers: [
|
|
446
|
-
})],
|
|
462
|
+
providers: [z]
|
|
463
|
+
})], B);
|
|
447
464
|
//#endregion
|
|
448
465
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts
|
|
449
|
-
var
|
|
466
|
+
var V = class InstancesService {
|
|
450
467
|
configurationService;
|
|
451
468
|
scopeService;
|
|
452
469
|
constructor(e, t) {
|
|
453
470
|
this.configurationService = e, this.scopeService = t;
|
|
454
471
|
}
|
|
455
472
|
isInsideProject(e) {
|
|
456
|
-
let t =
|
|
457
|
-
return t !== ".." && !t.startsWith(`..${
|
|
473
|
+
let t = a.relative(e.projectRootPath, a.join(e.instance.path, e.instance.nameStem));
|
|
474
|
+
return t !== ".." && !t.startsWith(`..${a.sep}`) && !a.isAbsolute(t);
|
|
458
475
|
}
|
|
459
476
|
async findProjectInstances(e) {
|
|
460
|
-
let t = await this.configurationService.loadConformetryConfiguration(e.configurationPath), n =
|
|
477
|
+
let t = await this.configurationService.loadConformetryConfiguration(e.configurationPath), n = a.resolve(e.workspaceRoot, e.project.root), r = t.flatMap((e) => e.instances).flatMap((t) => this.scopeService.resolveGroup({
|
|
461
478
|
group: t,
|
|
462
479
|
project: e.project
|
|
463
480
|
})).flatMap((t) => this.configurationService.findInstances({
|
|
@@ -480,36 +497,19 @@ var L = class InstancesService {
|
|
|
480
497
|
});
|
|
481
498
|
}
|
|
482
499
|
};
|
|
483
|
-
|
|
500
|
+
V = __decorate([l(), __decorateMetadata("design:paramtypes", [p === void 0 ? Object : p, A === void 0 ? Object : A])], V);
|
|
484
501
|
//#endregion
|
|
485
502
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.module.ts
|
|
486
|
-
var
|
|
487
|
-
|
|
503
|
+
var H = class InstancesModule {};
|
|
504
|
+
H = __decorate([u({
|
|
488
505
|
controllers: [],
|
|
489
|
-
exports: [
|
|
490
|
-
imports: [
|
|
491
|
-
providers: [
|
|
492
|
-
})],
|
|
506
|
+
exports: [V, j],
|
|
507
|
+
imports: [f, j],
|
|
508
|
+
providers: [V]
|
|
509
|
+
})], H);
|
|
493
510
|
//#endregion
|
|
494
|
-
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.
|
|
495
|
-
var
|
|
496
|
-
"conformetry.config.ts",
|
|
497
|
-
"conformetry.config.mts",
|
|
498
|
-
"conformetry.config.cts",
|
|
499
|
-
"conformetry.config.js",
|
|
500
|
-
"conformetry.config.mjs",
|
|
501
|
-
"conformetry.config.cjs",
|
|
502
|
-
"conformetry.config.json",
|
|
503
|
-
"conformetry.config.jsonc",
|
|
504
|
-
"conformetry.json",
|
|
505
|
-
"conformetry.jsonc",
|
|
506
|
-
".conformetryrc.ts",
|
|
507
|
-
".conformetryrc.js",
|
|
508
|
-
".conformetryrc.json",
|
|
509
|
-
"conformetryrc.ts",
|
|
510
|
-
"conformetryrc.js",
|
|
511
|
-
"conformetryrc.json"
|
|
512
|
-
], V = "nx.json", fe = "conformetry-validate", pe = ["configurationPath", "validateTargetName"], H = class OptionsService {
|
|
511
|
+
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts
|
|
512
|
+
var U = class OptionsService {
|
|
513
513
|
constructor() {}
|
|
514
514
|
isUnknownArray(e) {
|
|
515
515
|
return Array.isArray(e);
|
|
@@ -531,25 +531,25 @@ var z = "@conformetry/nx", B = [
|
|
|
531
531
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
532
532
|
}
|
|
533
533
|
resolveConfigurationPath(e) {
|
|
534
|
-
return this.readRegisteredConfigurationPath(e.nxConfiguration) ??
|
|
534
|
+
return this.readRegisteredConfigurationPath(e.nxConfiguration) ?? S.find((t) => e.exists(t)) ?? S[0];
|
|
535
535
|
}
|
|
536
536
|
resolveGeneratorInputs(e) {
|
|
537
537
|
if (typeof e != "object" || !e) return {};
|
|
538
538
|
let t = {};
|
|
539
|
-
for (let [n, r] of Object.entries({ ...e }))
|
|
539
|
+
for (let [n, r] of Object.entries({ ...e })) oe.includes(n) || typeof r != "string" || (t[n] = r);
|
|
540
540
|
return t;
|
|
541
541
|
}
|
|
542
542
|
resolvePluginOptions(e) {
|
|
543
543
|
if (typeof e != "object" || !e) return {
|
|
544
|
-
configurationPath:
|
|
545
|
-
validateTargetName:
|
|
544
|
+
configurationPath: S[0],
|
|
545
|
+
validateTargetName: ae
|
|
546
546
|
};
|
|
547
547
|
let t = { ...e };
|
|
548
548
|
return {
|
|
549
549
|
configurationPath: this.readString({
|
|
550
550
|
key: "configurationPath",
|
|
551
551
|
options: t
|
|
552
|
-
}) ??
|
|
552
|
+
}) ?? S[0],
|
|
553
553
|
validateTargetName: this.readString({
|
|
554
554
|
key: "validateTargetName",
|
|
555
555
|
options: t
|
|
@@ -557,19 +557,19 @@ var z = "@conformetry/nx", B = [
|
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
559
|
};
|
|
560
|
-
|
|
560
|
+
U = __decorate([l(), __decorateMetadata("design:paramtypes", [])], U);
|
|
561
561
|
//#endregion
|
|
562
562
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.module.ts
|
|
563
|
-
var
|
|
564
|
-
|
|
563
|
+
var W = class OptionsModule {};
|
|
564
|
+
W = __decorate([u({
|
|
565
565
|
controllers: [],
|
|
566
|
-
exports: [
|
|
566
|
+
exports: [U],
|
|
567
567
|
imports: [],
|
|
568
|
-
providers: [
|
|
569
|
-
})],
|
|
568
|
+
providers: [U]
|
|
569
|
+
})], W);
|
|
570
570
|
//#endregion
|
|
571
571
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts
|
|
572
|
-
var
|
|
572
|
+
var G = class PathsService {
|
|
573
573
|
instancesService;
|
|
574
574
|
configurationService;
|
|
575
575
|
scopeService;
|
|
@@ -588,20 +588,20 @@ var W = class PathsService {
|
|
|
588
588
|
let t = /* @__PURE__ */ new Map();
|
|
589
589
|
for (let n of e.instances) {
|
|
590
590
|
let r = n.path;
|
|
591
|
-
r.startsWith(e.projectRootPath +
|
|
591
|
+
r.startsWith(e.projectRootPath + a.sep) && t.set(r, (t.get(r) ?? 0) + 1);
|
|
592
592
|
}
|
|
593
593
|
return [...t.entries()].toSorted(([e, t], [n, r]) => r - t || e.localeCompare(n))[0]?.[0];
|
|
594
594
|
}
|
|
595
595
|
resolveModulePath(e) {
|
|
596
596
|
let t = e.instances.find((t) => t.nameStem === e.moduleName);
|
|
597
|
-
return t === void 0 ? void 0 :
|
|
597
|
+
return t === void 0 ? void 0 : a.join(t.path, t.nameStem);
|
|
598
598
|
}
|
|
599
599
|
resolveNewProjectPath(e) {
|
|
600
|
-
if (e.type === void 0) throw
|
|
600
|
+
if (e.type === void 0) throw te({
|
|
601
601
|
generatorName: e.generatorName,
|
|
602
602
|
hint: "Or declare a type input on the generator, so the project is placed beside the others of its type."
|
|
603
603
|
});
|
|
604
|
-
return
|
|
604
|
+
return a.resolve(e.workspaceRoot, this.resolveTypeDirectoryPath({
|
|
605
605
|
tree: e.tree,
|
|
606
606
|
type: e.type
|
|
607
607
|
}) ?? e.type);
|
|
@@ -612,22 +612,22 @@ var W = class PathsService {
|
|
|
612
612
|
return t === void 0 ? void 0 : this.scopeService.resolveScopedDirectory(t.instances);
|
|
613
613
|
}
|
|
614
614
|
resolveTypeDirectoryPath(e) {
|
|
615
|
-
for (let [, t] of
|
|
615
|
+
for (let [, t] of b(e.tree)) {
|
|
616
616
|
let [n] = t.root.split("/");
|
|
617
617
|
if (n === e.type) return n;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
async resolveGenerationPath(e) {
|
|
621
|
-
let t = e.inputs[
|
|
622
|
-
if (t !== void 0) return
|
|
623
|
-
let n = e.inputs[
|
|
621
|
+
let t = e.inputs[ue];
|
|
622
|
+
if (t !== void 0) return a.resolve(e.workspaceRoot, t);
|
|
623
|
+
let n = e.inputs[M];
|
|
624
624
|
if (n === void 0) return this.resolveNewProjectPath({
|
|
625
625
|
generatorName: e.generatorName,
|
|
626
626
|
tree: e.tree,
|
|
627
|
-
type: e.inputs[
|
|
627
|
+
type: e.inputs[le],
|
|
628
628
|
workspaceRoot: e.workspaceRoot
|
|
629
629
|
});
|
|
630
|
-
let r =
|
|
630
|
+
let r = re(e.tree, n), i = a.resolve(e.workspaceRoot, r.root), o = await this.instancesService.findProjectInstances({
|
|
631
631
|
configurationPath: e.configurationPath,
|
|
632
632
|
project: {
|
|
633
633
|
name: n,
|
|
@@ -635,54 +635,54 @@ var W = class PathsService {
|
|
|
635
635
|
tags: r.tags ?? []
|
|
636
636
|
},
|
|
637
637
|
workspaceRoot: e.workspaceRoot
|
|
638
|
-
}),
|
|
639
|
-
if (
|
|
640
|
-
instances:
|
|
641
|
-
moduleName:
|
|
638
|
+
}), s = e.inputs[ce];
|
|
639
|
+
if (s !== void 0) return this.requireModulePath({
|
|
640
|
+
instances: o,
|
|
641
|
+
moduleName: s,
|
|
642
642
|
projectName: e.inputs.project ?? ""
|
|
643
643
|
});
|
|
644
|
-
let
|
|
644
|
+
let c = await this.resolveScopedDirectory({
|
|
645
645
|
configurationPath: e.configurationPath,
|
|
646
646
|
generatorName: e.generatorName
|
|
647
647
|
});
|
|
648
|
-
return
|
|
649
|
-
instances:
|
|
648
|
+
return c === void 0 ? this.resolveModuleParentPath({
|
|
649
|
+
instances: o,
|
|
650
650
|
projectRootPath: i
|
|
651
|
-
}) ?? i :
|
|
651
|
+
}) ?? i : a.join(i, c);
|
|
652
652
|
}
|
|
653
653
|
};
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
])],
|
|
654
|
+
G = __decorate([l(), __decorateMetadata("design:paramtypes", [
|
|
655
|
+
V === void 0 ? Object : V,
|
|
656
|
+
p === void 0 ? Object : p,
|
|
657
|
+
A === void 0 ? Object : A
|
|
658
|
+
])], G);
|
|
659
659
|
//#endregion
|
|
660
660
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.module.ts
|
|
661
|
-
var
|
|
662
|
-
|
|
661
|
+
var K = class PathsModule {};
|
|
662
|
+
K = __decorate([u({
|
|
663
663
|
controllers: [],
|
|
664
664
|
exports: [
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
665
|
+
H,
|
|
666
|
+
f,
|
|
667
|
+
G,
|
|
668
|
+
j
|
|
669
669
|
],
|
|
670
670
|
imports: [
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
671
|
+
H,
|
|
672
|
+
f,
|
|
673
|
+
j
|
|
674
674
|
],
|
|
675
|
-
providers: [
|
|
676
|
-
})],
|
|
677
|
-
var
|
|
675
|
+
providers: [G]
|
|
676
|
+
})], K);
|
|
677
|
+
var pe = ".nxignore", q = class ProjectsService {
|
|
678
678
|
constructor() {}
|
|
679
679
|
isUnknownArray(e) {
|
|
680
680
|
return Array.isArray(e);
|
|
681
681
|
}
|
|
682
682
|
listProjectConfigurationFiles(e) {
|
|
683
683
|
let t = [];
|
|
684
|
-
for (let n of
|
|
685
|
-
let r =
|
|
684
|
+
for (let n of i(e.directoryPath, { withFileTypes: !0 })) {
|
|
685
|
+
let r = a.join(e.directoryPath, n.name), i = a.relative(e.workspaceRoot, r).split(a.sep).join("/");
|
|
686
686
|
n.isFile() && n.name === "project.json" ? t.push(i) : n.isDirectory() && !n.name.startsWith(".") && n.name !== "node_modules" && !e.ignoredPaths.includes(i) && t.push(...this.listProjectConfigurationFiles({
|
|
687
687
|
directoryPath: r,
|
|
688
688
|
ignoredPaths: e.ignoredPaths,
|
|
@@ -692,8 +692,8 @@ var me = ".nxignore", K = class ProjectsService {
|
|
|
692
692
|
return t;
|
|
693
693
|
}
|
|
694
694
|
readIgnoredPaths(e) {
|
|
695
|
-
let
|
|
696
|
-
return
|
|
695
|
+
let n = a.resolve(e, pe);
|
|
696
|
+
return t(n) ? r(n, "utf8").split("\n").map((e) => e.trim()).filter((e) => e !== "" && !e.startsWith("#")) : [];
|
|
697
697
|
}
|
|
698
698
|
listWorkspaceProjects(e) {
|
|
699
699
|
return this.listProjectConfigurationFiles({
|
|
@@ -706,27 +706,27 @@ var me = ".nxignore", K = class ProjectsService {
|
|
|
706
706
|
})).toSorted((e, t) => e.name.localeCompare(t.name));
|
|
707
707
|
}
|
|
708
708
|
readProjectScope(e) {
|
|
709
|
-
let t =
|
|
709
|
+
let t = a.dirname(e.projectConfigurationFile), n = JSON.parse(r(a.resolve(e.workspaceRoot, e.projectConfigurationFile), "utf8")), i = typeof n == "object" && n ? { ...n } : {}, o = this.isUnknownArray(i.tags) ? i.tags : [], s = typeof i.name == "string" ? i.name : t;
|
|
710
710
|
return {
|
|
711
|
-
name:
|
|
711
|
+
name: s,
|
|
712
712
|
root: t,
|
|
713
|
-
tags: [...
|
|
713
|
+
tags: [...o.filter((e) => typeof e == "string"), `name:${s}`]
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
716
|
};
|
|
717
|
-
|
|
717
|
+
q = __decorate([l(), __decorateMetadata("design:paramtypes", [])], q);
|
|
718
718
|
//#endregion
|
|
719
719
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/projects/projects.module.ts
|
|
720
|
-
var
|
|
721
|
-
|
|
720
|
+
var J = class ProjectsModule {};
|
|
721
|
+
J = __decorate([u({
|
|
722
722
|
controllers: [],
|
|
723
|
-
exports: [
|
|
723
|
+
exports: [q],
|
|
724
724
|
imports: [],
|
|
725
|
-
providers: [
|
|
726
|
-
})],
|
|
725
|
+
providers: [q]
|
|
726
|
+
})], J);
|
|
727
727
|
//#endregion
|
|
728
728
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.constants.ts
|
|
729
|
-
var
|
|
729
|
+
var me = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__conformetryPluginContext", X, Z = X = class PluginService {
|
|
730
730
|
adapterService;
|
|
731
731
|
instancesService;
|
|
732
732
|
configurationService;
|
|
@@ -742,42 +742,42 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
742
742
|
this.adapterService = e, this.instancesService = t, this.configurationService = n, this.generatorService = r, this.generationService = i, this.optionsService = a, this.pathsService = o, this.projectsService = s, this.reportingService = c, this.validationService = l, this.logger = u, this.logger.setContext(X.name);
|
|
743
743
|
}
|
|
744
744
|
async assertEmittedPluginCurrent(e) {
|
|
745
|
-
let
|
|
745
|
+
let n = await this.generatorService.emitPlugin({
|
|
746
746
|
configurationPath: e.configurationPath,
|
|
747
|
-
outputPath:
|
|
748
|
-
packageName:
|
|
747
|
+
outputPath: N,
|
|
748
|
+
packageName: F,
|
|
749
749
|
projects: this.projectsService.listWorkspaceProjects(e.workspaceRoot)
|
|
750
750
|
});
|
|
751
|
-
for (let
|
|
752
|
-
let
|
|
753
|
-
if ((
|
|
751
|
+
for (let i of n) {
|
|
752
|
+
let n = a.resolve(e.workspaceRoot, i.filePath);
|
|
753
|
+
if ((t(n) ? r(n, "utf8") : void 0) !== i.content) throw this.logger.warn("🚫 Rejected a stale conformetry generator plugin", void 0, { filePath: i.filePath }), Error(`${i.filePath} is out of date with ${e.configurationPath}. Run \`nx sync\` to regenerate the conformetry generator plugin.`);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
async assertPluginInSync(e) {
|
|
757
757
|
await this.assertTemplatesExist(e), await this.assertEmittedPluginCurrent(e);
|
|
758
758
|
}
|
|
759
759
|
async assertTemplatesExist(e) {
|
|
760
|
-
let
|
|
761
|
-
for (let
|
|
762
|
-
let
|
|
763
|
-
if (!
|
|
764
|
-
generator:
|
|
765
|
-
templatePath:
|
|
766
|
-
}), Error(`Generator ${
|
|
760
|
+
let n = await this.configurationService.loadConformetryConfiguration(e.configurationPath);
|
|
761
|
+
for (let r of n) {
|
|
762
|
+
let n = a.resolve(e.workspaceRoot, r.templatePath);
|
|
763
|
+
if (!t(n)) throw this.logger.warn("🚫 Rejected a generator with a missing template", void 0, {
|
|
764
|
+
generator: r.name,
|
|
765
|
+
templatePath: r.templatePath
|
|
766
|
+
}), Error(`Generator ${r.name} names a template at ${r.templatePath}, which does not exist.`);
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
readNxConfiguration(e) {
|
|
770
|
-
let
|
|
771
|
-
if (
|
|
770
|
+
let n = a.resolve(e, C);
|
|
771
|
+
if (t(n)) return JSON.parse(r(n, "utf8"));
|
|
772
772
|
}
|
|
773
773
|
resolveOptions(e) {
|
|
774
|
-
let
|
|
775
|
-
exists: (
|
|
774
|
+
let n = this.optionsService.resolveConfigurationPath({
|
|
775
|
+
exists: (n) => t(a.resolve(e.workspaceRoot, n)),
|
|
776
776
|
nxConfiguration: this.readNxConfiguration(e.workspaceRoot)
|
|
777
|
-
}),
|
|
777
|
+
}), r = typeof e.options == "object" && e.options !== null ? { ...e.options } : {};
|
|
778
778
|
return this.optionsService.resolvePluginOptions({
|
|
779
|
-
configurationPath:
|
|
780
|
-
...
|
|
779
|
+
configurationPath: n,
|
|
780
|
+
...r
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
783
|
async resolveTemplateInputs(e) {
|
|
@@ -787,7 +787,7 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
787
787
|
async resolveTemplates(e) {
|
|
788
788
|
return (await this.configurationService.loadConformetryConfiguration(e.configurationPath)).map((t) => this.configurationService.collectTemplate({
|
|
789
789
|
name: t.name,
|
|
790
|
-
templatePath:
|
|
790
|
+
templatePath: a.resolve(e.workspaceRoot, t.templatePath),
|
|
791
791
|
threshold: t.threshold
|
|
792
792
|
}));
|
|
793
793
|
}
|
|
@@ -796,7 +796,7 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
796
796
|
options: e.options,
|
|
797
797
|
workspaceRoot: e.workspaceRoot
|
|
798
798
|
}), n = await this.resolveTemplateInputs({ configurationPath: t.configurationPath }), r = /* @__PURE__ */ new Map();
|
|
799
|
-
for (let i of e.projectConfigurationFiles.filter((e) =>
|
|
799
|
+
for (let i of e.projectConfigurationFiles.filter((e) => a.basename(e) === he)) {
|
|
800
800
|
let a = this.projectsService.readProjectScope({
|
|
801
801
|
projectConfigurationFile: i,
|
|
802
802
|
workspaceRoot: e.workspaceRoot
|
|
@@ -807,11 +807,11 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
807
807
|
workspaceRoot: e.workspaceRoot
|
|
808
808
|
})).length !== 0 && r.set(a.root, { [t.validateTargetName]: {
|
|
809
809
|
cache: !0,
|
|
810
|
-
executor: `${
|
|
810
|
+
executor: `${x}:validate`,
|
|
811
811
|
inputs: [
|
|
812
812
|
"default",
|
|
813
813
|
`{workspaceRoot}/${t.configurationPath}`,
|
|
814
|
-
`{workspaceRoot}/${
|
|
814
|
+
`{workspaceRoot}/${N}/**/*`,
|
|
815
815
|
...n
|
|
816
816
|
],
|
|
817
817
|
options: {}
|
|
@@ -833,26 +833,26 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
833
833
|
let i = this.adapterService.createAdapters({
|
|
834
834
|
tree: e.tree,
|
|
835
835
|
workspaceRoot: e.workspaceRoot
|
|
836
|
-
}),
|
|
836
|
+
}), o = this.optionsService.resolveGeneratorInputs(e.options), { generatedFilePaths: s } = await this.generationService.runGenerator({
|
|
837
837
|
definition: {
|
|
838
838
|
name: r.name,
|
|
839
|
-
templateDirectoryPath:
|
|
839
|
+
templateDirectoryPath: a.resolve(e.workspaceRoot, r.templatePath)
|
|
840
840
|
},
|
|
841
841
|
filesystem: i.filesystem,
|
|
842
842
|
formatter: i.formatter,
|
|
843
|
-
inputs:
|
|
843
|
+
inputs: o,
|
|
844
844
|
instancePath: await this.pathsService.resolveGenerationPath({
|
|
845
845
|
configurationPath: t.configurationPath,
|
|
846
846
|
generatorName: e.generatorName,
|
|
847
|
-
inputs:
|
|
847
|
+
inputs: o,
|
|
848
848
|
tree: e.tree,
|
|
849
849
|
workspaceRoot: e.workspaceRoot
|
|
850
850
|
})
|
|
851
851
|
});
|
|
852
852
|
return this.logger.info("✨ Generated instance files", void 0, {
|
|
853
|
-
count:
|
|
853
|
+
count: s.length,
|
|
854
854
|
generator: e.generatorName
|
|
855
|
-
}),
|
|
855
|
+
}), s;
|
|
856
856
|
}
|
|
857
857
|
async runValidation(e) {
|
|
858
858
|
let t = this.resolveOptions({
|
|
@@ -886,64 +886,64 @@ var J = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__co
|
|
|
886
886
|
};
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
|
-
Z = X = __decorate([
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
889
|
+
Z = X = __decorate([l(), __decorateMetadata("design:paramtypes", [
|
|
890
|
+
z === void 0 ? Object : z,
|
|
891
|
+
V === void 0 ? Object : V,
|
|
892
|
+
p === void 0 ? Object : p,
|
|
893
|
+
I === void 0 ? Object : I,
|
|
894
|
+
h === void 0 ? Object : h,
|
|
895
|
+
U === void 0 ? Object : U,
|
|
896
|
+
G === void 0 ? Object : G,
|
|
897
|
+
q === void 0 ? Object : q,
|
|
898
|
+
_ === void 0 ? Object : _,
|
|
899
|
+
y === void 0 ? Object : y,
|
|
900
|
+
O === void 0 ? Object : O
|
|
901
901
|
])], Z);
|
|
902
902
|
//#endregion
|
|
903
903
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.module.ts
|
|
904
904
|
var Q = class PluginModule {};
|
|
905
|
-
Q = __decorate([
|
|
905
|
+
Q = __decorate([u({
|
|
906
906
|
controllers: [],
|
|
907
907
|
exports: [
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
908
|
+
B,
|
|
909
|
+
H,
|
|
910
|
+
f,
|
|
911
|
+
L,
|
|
912
|
+
m,
|
|
913
|
+
k,
|
|
914
|
+
W,
|
|
915
|
+
K,
|
|
916
916
|
Z,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
917
|
+
J,
|
|
918
|
+
g,
|
|
919
|
+
j,
|
|
920
|
+
v
|
|
921
921
|
],
|
|
922
922
|
imports: [
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
923
|
+
B,
|
|
924
|
+
H,
|
|
925
|
+
f,
|
|
926
|
+
L,
|
|
927
|
+
m,
|
|
928
|
+
k,
|
|
929
|
+
W,
|
|
930
|
+
K,
|
|
931
|
+
J,
|
|
932
|
+
g,
|
|
933
|
+
j,
|
|
934
|
+
v
|
|
935
935
|
],
|
|
936
936
|
providers: [Z]
|
|
937
937
|
})], Q);
|
|
938
938
|
//#endregion
|
|
939
|
-
//#region projects/ic-suite/conformetry/conformetry-nx/src/
|
|
939
|
+
//#region projects/ic-suite/conformetry/conformetry-nx/src/conformetry-nx.module.ts
|
|
940
940
|
var $ = class MainModule {};
|
|
941
|
-
$ = __decorate([
|
|
941
|
+
$ = __decorate([u({
|
|
942
942
|
controllers: [],
|
|
943
|
-
exports: [
|
|
943
|
+
exports: [L, Q],
|
|
944
944
|
imports: [
|
|
945
|
-
|
|
946
|
-
|
|
945
|
+
L,
|
|
946
|
+
k,
|
|
947
947
|
Q
|
|
948
948
|
],
|
|
949
949
|
providers: []
|
|
@@ -951,23 +951,23 @@ $ = __decorate([i({
|
|
|
951
951
|
//#endregion
|
|
952
952
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin-context.utilities.ts
|
|
953
953
|
async function resolveGeneratorService() {
|
|
954
|
-
return (await resolvePluginContext()).get(
|
|
954
|
+
return (await resolvePluginContext()).get(I);
|
|
955
955
|
}
|
|
956
956
|
async function resolveOptionsService() {
|
|
957
|
-
return (await resolvePluginContext()).get(
|
|
957
|
+
return (await resolvePluginContext()).get(U);
|
|
958
958
|
}
|
|
959
959
|
async function resolvePluginService() {
|
|
960
960
|
return (await resolvePluginContext()).get(Z);
|
|
961
961
|
}
|
|
962
962
|
async function resolveProjectsService() {
|
|
963
|
-
return (await resolvePluginContext()).get(
|
|
963
|
+
return (await resolvePluginContext()).get(q);
|
|
964
964
|
}
|
|
965
965
|
async function resolvePluginContext() {
|
|
966
|
-
let
|
|
967
|
-
return
|
|
966
|
+
let e = globalThis;
|
|
967
|
+
return e[Y] ??= o.createApplicationContext($, {
|
|
968
968
|
abortOnError: !1,
|
|
969
969
|
logger: !1
|
|
970
|
-
}), await
|
|
970
|
+
}), await e[Y];
|
|
971
971
|
}
|
|
972
972
|
//#endregion
|
|
973
|
-
export {
|
|
973
|
+
export { P as _, $ as a, C as b, me as c, H as d, V as f, F as g, N as h, resolveProjectsService as i, W as l, z as m, resolveOptionsService as n, Q as o, B as p, resolvePluginService as r, Z as s, resolveGeneratorService as t, U as u, j as v, __name as x, A as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../../plugin-context.utilities-
|
|
1
|
+
import { r as e } from "../../../plugin-context.utilities-nggdWdJp.js";
|
|
2
2
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/executors/validate/executor.ts
|
|
3
3
|
async function validateExecutor(t, n) {
|
|
4
4
|
let r = n.projectName;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as e, b as t, i as n, n as r, t as i } from "../../../plugin-context.utilities-nggdWdJp.js";
|
|
2
2
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts
|
|
3
|
-
async function syncGenerator(
|
|
4
|
-
let o = await
|
|
3
|
+
async function syncGenerator(t, a) {
|
|
4
|
+
let o = await i(), s = await r(), c = await n(), l = await o.emitPlugin({
|
|
5
5
|
configurationPath: a?.configurationPath ?? s.resolveConfigurationPath({
|
|
6
|
-
exists: (
|
|
7
|
-
nxConfiguration: readNxConfiguration(
|
|
6
|
+
exists: (e) => t.exists(e),
|
|
7
|
+
nxConfiguration: readNxConfiguration(t)
|
|
8
8
|
}),
|
|
9
9
|
outputPath: a?.outputPath ?? ".conformetry/nx-generators",
|
|
10
10
|
packageName: a?.packageName ?? "conformetry",
|
|
11
|
-
projects: c.listWorkspaceProjects(
|
|
11
|
+
projects: c.listWorkspaceProjects(t.root)
|
|
12
12
|
});
|
|
13
|
-
for (let
|
|
14
|
-
return Object.assign(() => {}, { outOfSyncMessage:
|
|
13
|
+
for (let e of l) t.write(e.filePath, e.content);
|
|
14
|
+
return Object.assign(() => {}, { outOfSyncMessage: e });
|
|
15
15
|
}
|
|
16
|
-
function readNxConfiguration(
|
|
17
|
-
let n =
|
|
16
|
+
function readNxConfiguration(e) {
|
|
17
|
+
let n = e.read(t, "utf8");
|
|
18
18
|
if (n !== null) return JSON.parse(n);
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
package/dist/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { n as p, t as m } from "../bootstrap.utilities-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, l as i, m as a, o, p as s, r as c, s as l, u, v as d, y as f } from "../plugin-context.utilities-nggdWdJp.js";
|
|
2
|
+
import { n as p, t as m } from "../bootstrap.utilities-CYl9__Vf.js";
|
|
3
3
|
import h from "node:path";
|
|
4
4
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/index.ts
|
|
5
5
|
var g = {
|
|
6
|
-
createNodes: [
|
|
7
|
-
let r = await (await
|
|
6
|
+
createNodes: [t, async (e, t, n) => {
|
|
7
|
+
let r = await (await c()).inferTargets({
|
|
8
8
|
options: t,
|
|
9
9
|
projectConfigurationFiles: e,
|
|
10
10
|
workspaceRoot: n.workspaceRoot
|
|
@@ -17,7 +17,7 @@ var g = {
|
|
|
17
17
|
name: "@conformetry/nx"
|
|
18
18
|
};
|
|
19
19
|
async function runConformetryGenerator(e) {
|
|
20
|
-
return await (await
|
|
20
|
+
return await (await c()).runGenerator({
|
|
21
21
|
generatorName: e.generatorName,
|
|
22
22
|
options: e.options ?? {},
|
|
23
23
|
tree: e.tree,
|
|
@@ -25,4 +25,4 @@ async function runConformetryGenerator(e) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
export {
|
|
28
|
+
export { s as AdapterModule, a as AdapterService, n as InstancesModule, r as InstancesService, e as MainModule, i as OptionsModule, u as OptionsService, o as PluginModule, l as PluginService, d as ScopeModule, f as ScopeService, m as bootstrapPlugin, g as default, c as resolvePluginService, p as runBootstrapCli, runConformetryGenerator };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Jimmy Paolini",
|
|
3
3
|
"bin": {
|
|
4
|
-
"conformetry-nx-bootstrap-generators": "./dist/src/main.js"
|
|
4
|
+
"conformetry-nx-bootstrap-generators": "./dist/src/conformetry-nx.main.js"
|
|
5
5
|
},
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@conformetry/configuration": "0.0.
|
|
11
|
-
"@conformetry/generation": "0.0.
|
|
12
|
-
"@conformetry/output": "0.0.
|
|
13
|
-
"@conformetry/validation": "0.0.
|
|
10
|
+
"@conformetry/configuration": "0.0.28",
|
|
11
|
+
"@conformetry/generation": "0.0.28",
|
|
12
|
+
"@conformetry/output": "0.0.27",
|
|
13
|
+
"@conformetry/validation": "0.0.27",
|
|
14
14
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
15
15
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
16
16
|
"@nx/devkit": "^23.0.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"strict": true
|
|
85
85
|
},
|
|
86
86
|
"types": "./dist/src/index.d.ts",
|
|
87
|
-
"version": "0.0.
|
|
87
|
+
"version": "0.0.28"
|
|
88
88
|
}
|
package/dist/src/main.js
DELETED
|
File without changes
|