@conformetry/nx 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +922 -0
- package/dist/bootstrap.utilities-EhWhm5J3.js +61 -0
- package/dist/plugin-context.utilities-CuP36-vK.js +973 -0
- package/dist/src/executors/validate/executor.d.ts +31 -0
- package/dist/src/executors/validate/executor.js +22 -0
- package/dist/src/generators/sync/generator.d.ts +26 -0
- package/dist/src/generators/sync/generator.js +21 -0
- package/dist/src/index.d.ts +1094 -0
- package/dist/src/index.js +28 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/main.js +5 -0
- package/executors.json +10 -0
- package/generators.json +10 -0
- package/package.json +85 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { _ as e, d as t, g as n, i as r, n as i, t as a } from "./plugin-context.utilities-CuP36-vK.js";
|
|
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
|
+
import m from "node:path";
|
|
4
|
+
//#region packages/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts
|
|
5
|
+
async function h(t) {
|
|
6
|
+
let s = await a(), c = await i(), l = await r(), u = await s.emitPlugin({
|
|
7
|
+
configurationPath: c.resolveConfigurationPath({
|
|
8
|
+
exists: (e) => o(m.resolve(t, e)),
|
|
9
|
+
nxConfiguration: y(t)
|
|
10
|
+
}),
|
|
11
|
+
outputPath: n,
|
|
12
|
+
packageName: e,
|
|
13
|
+
projects: l.listWorkspaceProjects(t)
|
|
14
|
+
});
|
|
15
|
+
return b({
|
|
16
|
+
files: u,
|
|
17
|
+
workspaceRoot: t
|
|
18
|
+
}), v(t), u;
|
|
19
|
+
}
|
|
20
|
+
async function g(e) {
|
|
21
|
+
try {
|
|
22
|
+
let t = await h(e);
|
|
23
|
+
console.info(`👔 Emitted the conformetry generator plugin to ${n}`, { count: t.length });
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.warn("👔 Skipped emitting the conformetry generator plugin"), console.warn(e instanceof Error ? e.message : e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function _(e) {
|
|
29
|
+
try {
|
|
30
|
+
return u(e.linkPath) === u(e.outputPath);
|
|
31
|
+
} catch {
|
|
32
|
+
return !o(e.linkPath);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function v(t) {
|
|
36
|
+
let r = m.resolve(t, "node_modules", e), i = m.resolve(t, n);
|
|
37
|
+
if (c(m.dirname(r), { recursive: !0 }), s(r, { throwIfNoEntry: !1 }) !== void 0 && !_({
|
|
38
|
+
linkPath: r,
|
|
39
|
+
outputPath: i
|
|
40
|
+
})) throw Error(`node_modules/${e} is an installed package, not a link to ${n}. Rename the emitted plugin via the sync generator's packageName option.`);
|
|
41
|
+
d(r, {
|
|
42
|
+
force: !0,
|
|
43
|
+
recursive: !0
|
|
44
|
+
}), f(m.relative(m.dirname(r), i), r, "dir");
|
|
45
|
+
}
|
|
46
|
+
function y(e) {
|
|
47
|
+
let n = m.resolve(e, t);
|
|
48
|
+
if (o(n)) return JSON.parse(l(n, "utf8"));
|
|
49
|
+
}
|
|
50
|
+
function b(e) {
|
|
51
|
+
d(m.resolve(e.workspaceRoot, n, "src"), {
|
|
52
|
+
force: !0,
|
|
53
|
+
recursive: !0
|
|
54
|
+
});
|
|
55
|
+
for (let t of e.files) {
|
|
56
|
+
let n = m.resolve(e.workspaceRoot, t.filePath);
|
|
57
|
+
c(m.dirname(n), { recursive: !0 }), p(n, t.content, "utf8");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { g as n, h as t };
|