@clearlydev/nx-archweave 0.3.2 → 0.4.0
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/README.md +1 -1
- package/dist/bin/review-verdict.js +8 -249
- package/dist/eslint/index.js +28 -321
- package/dist/generators/_chunks/chunk-2WSX5YNB.js +274 -0
- package/dist/generators/_chunks/chunk-34V6HAJT.js +55 -0
- package/dist/generators/_chunks/chunk-3A6RZUCZ.js +114 -0
- package/dist/generators/_chunks/chunk-47T7NOPP.js +30 -0
- package/dist/generators/_chunks/chunk-4FJ7CLEU.js +189 -0
- package/dist/generators/_chunks/chunk-5MI3O4VZ.js +99 -0
- package/dist/generators/_chunks/chunk-6ZTIUBB2.js +139 -0
- package/dist/generators/_chunks/chunk-AIJCJ7JK.js +203 -0
- package/dist/generators/_chunks/chunk-ALSXKTLM.js +1098 -0
- package/dist/generators/_chunks/chunk-AQHV7DJS.js +656 -0
- package/dist/generators/_chunks/chunk-C2VVUWBA.js +386 -0
- package/dist/generators/_chunks/chunk-EXYZLL7A.js +234 -0
- package/dist/generators/_chunks/chunk-FQHFT5IH.js +50 -0
- package/dist/generators/_chunks/chunk-H222FPLK.js +80 -0
- package/dist/generators/_chunks/chunk-IIDOBI42.js +616 -0
- package/dist/generators/_chunks/chunk-L2RZ2LBO.js +132 -0
- package/dist/generators/_chunks/chunk-MQNQJOWA.js +217 -0
- package/dist/generators/_chunks/chunk-QQNDYJTR.js +243 -0
- package/dist/generators/_chunks/chunk-SFXU6IUS.js +0 -0
- package/dist/generators/_chunks/chunk-SNBIVIMI.js +89 -0
- package/dist/generators/_chunks/chunk-TUN34LAQ.js +8 -0
- package/dist/generators/_chunks/chunk-TXAQ2GJC.js +20 -0
- package/dist/generators/_chunks/chunk-U6LAFHSF.js +49 -0
- package/dist/generators/_chunks/chunk-URV6FLUH.js +73 -0
- package/dist/generators/_chunks/chunk-YNMLB4DL.js +25 -0
- package/dist/generators/_chunks/chunk-YY2UESLM.js +282 -0
- package/dist/generators/add-agent-rules/generator.js +11 -842
- package/dist/generators/add-backend/generator.js +11 -906
- package/dist/generators/add-fsd-lite/generator.js +12 -801
- package/dist/generators/add-github-templates/generator.js +13 -116
- package/dist/generators/add-integration/generator.js +15 -743
- package/dist/generators/add-review/generator.js +12 -1231
- package/dist/generators/allow-builds/generator.js +7 -71
- package/dist/generators/doctor/generator.js +106 -2044
- package/dist/generators/entity/generator.js +15 -604
- package/dist/generators/feature/generator.js +15 -604
- package/dist/generators/init/generator.js +68 -3376
- package/dist/generators/install-integration/generator.js +35 -871
- package/dist/generators/page/generator.js +15 -604
- package/dist/generators/record-integration/generator.js +12 -778
- package/dist/generators/shared/generator.js +15 -604
- package/dist/generators/widget/generator.js +15 -604
- package/dist/index.js +5 -663
- package/package.json +1 -1
|
@@ -1,77 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
spawnableCommand
|
|
3
|
+
} from "../_chunks/chunk-34V6HAJT.js";
|
|
4
|
+
import {
|
|
5
|
+
detectWorkspacePackageManager
|
|
6
|
+
} from "../_chunks/chunk-FQHFT5IH.js";
|
|
7
|
+
|
|
1
8
|
// src/generators/allow-builds/generator.ts
|
|
2
9
|
import { spawnSync } from "node:child_process";
|
|
3
10
|
|
|
4
|
-
// ../shared/dist/lib/spawnable-command.js
|
|
5
|
-
import { statSync } from "node:fs";
|
|
6
|
-
import { win32 } from "node:path";
|
|
7
|
-
function isFile(path) {
|
|
8
|
-
try {
|
|
9
|
-
return statSync(path).isFile();
|
|
10
|
-
} catch {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
var DEFAULT_ENV = { platform: process.platform, env: process.env, isFile };
|
|
15
|
-
function envValue(env, name) {
|
|
16
|
-
const key = Object.keys(env).find((candidate) => candidate.toUpperCase() === name);
|
|
17
|
-
return key === void 0 ? void 0 : env[key];
|
|
18
|
-
}
|
|
19
|
-
function resolveWindowsCommand(command, environment) {
|
|
20
|
-
const exts = (envValue(environment.env, "PATHEXT") ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
|
|
21
|
-
const candidates = (base) => win32.extname(base) !== "" ? [base] : exts.map((ext) => base + ext);
|
|
22
|
-
if (win32.isAbsolute(command) || /[\\/]/.test(command)) {
|
|
23
|
-
return candidates(command).find(environment.isFile);
|
|
24
|
-
}
|
|
25
|
-
const dirs = (envValue(environment.env, "PATH") ?? "").split(";").filter(Boolean);
|
|
26
|
-
for (const dir of dirs) {
|
|
27
|
-
const found = candidates(win32.join(dir, command)).find(environment.isFile);
|
|
28
|
-
if (found !== void 0)
|
|
29
|
-
return found;
|
|
30
|
-
}
|
|
31
|
-
return void 0;
|
|
32
|
-
}
|
|
33
|
-
var META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
34
|
-
var BIN_SHIM = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
|
|
35
|
-
function escapeCmdArgument(arg, doubleEscape = false) {
|
|
36
|
-
let quoted = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
37
|
-
quoted = quoted.replace(/(\\*)$/, "$1$1");
|
|
38
|
-
const escaped = `"${quoted}"`.replace(META_CHARS, "^$1");
|
|
39
|
-
return doubleEscape ? escaped.replace(META_CHARS, "^$1") : escaped;
|
|
40
|
-
}
|
|
41
|
-
function spawnableCommand(command, args, environment = DEFAULT_ENV) {
|
|
42
|
-
if (environment.platform !== "win32")
|
|
43
|
-
return { command, args: [...args] };
|
|
44
|
-
const resolved = resolveWindowsCommand(command, environment);
|
|
45
|
-
if (resolved === void 0 || !/\.(cmd|bat)$/i.test(resolved))
|
|
46
|
-
return { command, args: [...args] };
|
|
47
|
-
const doubleEscape = BIN_SHIM.test(resolved);
|
|
48
|
-
const line = [resolved.replace(META_CHARS, "^$1"), ...args.map((arg) => escapeCmdArgument(arg, doubleEscape))].join(" ");
|
|
49
|
-
return {
|
|
50
|
-
command: envValue(environment.env, "COMSPEC") ?? "cmd.exe",
|
|
51
|
-
args: ["/d", "/s", "/c", `"${line}"`],
|
|
52
|
-
windowsVerbatimArguments: true
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// ../template-engine/dist/environment/package-manager.js
|
|
57
|
-
var LOCKFILES = [
|
|
58
|
-
["yarn", ["yarn.lock"]],
|
|
59
|
-
["bun", ["bun.lock", "bun.lockb"]],
|
|
60
|
-
["npm", ["package-lock.json"]]
|
|
61
|
-
];
|
|
62
|
-
function detectWorkspacePackageManager(exists, read = () => void 0) {
|
|
63
|
-
if (exists("pnpm-lock.yaml") || exists("pnpm-workspace.yaml"))
|
|
64
|
-
return "pnpm";
|
|
65
|
-
const found = LOCKFILES.filter(([, files]) => files.some((file) => exists(file))).map(([pm]) => pm);
|
|
66
|
-
if (found.length <= 1)
|
|
67
|
-
return found[0] ?? null;
|
|
68
|
-
const declared = /"packageManager"\s*:\s*"(npm|yarn|bun)@/.exec(read("package.json") ?? "")?.[1];
|
|
69
|
-
const named = found.find((pm) => pm === declared);
|
|
70
|
-
if (named)
|
|
71
|
-
return named;
|
|
72
|
-
return found.includes("npm") ? "npm" : found[0];
|
|
73
|
-
}
|
|
74
|
-
|
|
75
11
|
// ../template-engine/dist/pnpm/allow-builds.js
|
|
76
12
|
var PENDING_PLACEHOLDER = "set this to true or false";
|
|
77
13
|
function isPlainPackageName(name) {
|