@haus-tech/haus-workflow 0.22.0 → 0.22.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/CHANGELOG.md +2 -0
- package/dist/cli.js +35 -35
- package/library/catalog/manifest.json +1 -1
- package/library/catalog/validation-rules.json +0 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -108,9 +108,7 @@ var validation_rules_default = {
|
|
|
108
108
|
"defi",
|
|
109
109
|
"trading"
|
|
110
110
|
],
|
|
111
|
-
bannedAgentPhrases: ["autonomous", "swarm", "delegate", "orchestrat", "marketplace"],
|
|
112
111
|
requiredSkillFrontmatter: ["description"],
|
|
113
|
-
requiredAgentSections: ["## Use when", "## Do not use when", "## Verification"],
|
|
114
112
|
riskyInstallPatterns: [
|
|
115
113
|
{ source: "\\bnpx\\s+-y\\b", flags: "i" },
|
|
116
114
|
{ source: "\\bnpx\\s+--yes\\b", flags: "i" },
|
|
@@ -176,10 +174,7 @@ var validation_rules_default = {
|
|
|
176
174
|
"oidc",
|
|
177
175
|
"azure-ad",
|
|
178
176
|
"bankid",
|
|
179
|
-
"myid",
|
|
180
|
-
"cgi",
|
|
181
177
|
"crypto",
|
|
182
|
-
"collection2",
|
|
183
178
|
"postgresql",
|
|
184
179
|
"mariadb",
|
|
185
180
|
"mssql",
|
|
@@ -190,7 +185,6 @@ var validation_rules_default = {
|
|
|
190
185
|
"testing-library",
|
|
191
186
|
"phpunit",
|
|
192
187
|
"storybook",
|
|
193
|
-
"wisest",
|
|
194
188
|
"vitest",
|
|
195
189
|
"jest",
|
|
196
190
|
"redis",
|
|
@@ -219,7 +213,6 @@ var validation_rules_default = {
|
|
|
219
213
|
"missing-eslint",
|
|
220
214
|
"docker",
|
|
221
215
|
"pm2",
|
|
222
|
-
"deployer-php",
|
|
223
216
|
"stripe",
|
|
224
217
|
"qliro",
|
|
225
218
|
"supabase",
|
|
@@ -240,9 +233,7 @@ var validation_rules_default = {
|
|
|
240
233
|
// src/catalog/validation-rules.ts
|
|
241
234
|
var toRegExp = (r) => new RegExp(r.source, r.flags);
|
|
242
235
|
var FORBIDDEN_TAGS = validation_rules_default.forbiddenTags;
|
|
243
|
-
var BANNED_AGENT_PHRASES = validation_rules_default.bannedAgentPhrases;
|
|
244
236
|
var REQUIRED_SKILL_FRONTMATTER = validation_rules_default.requiredSkillFrontmatter;
|
|
245
|
-
var REQUIRED_AGENT_SECTIONS = validation_rules_default.requiredAgentSections;
|
|
246
237
|
var RISKY_INSTALL_PATTERNS = validation_rules_default.riskyInstallPatterns.map(toRegExp);
|
|
247
238
|
var ALLOWED_NPX_PATTERN = toRegExp(validation_rules_default.allowedNpxPattern);
|
|
248
239
|
var ANY_NPX_PATTERN = toRegExp(validation_rules_default.anyNpxPattern);
|
|
@@ -334,12 +325,6 @@ function validateCatalogItem(item, content2) {
|
|
|
334
325
|
return { ok: false, reason: `${label}: disallowed npx at line ${i + 1}` };
|
|
335
326
|
}
|
|
336
327
|
}
|
|
337
|
-
const lower = content2.toLowerCase();
|
|
338
|
-
for (const phrase of BANNED_AGENT_PHRASES) {
|
|
339
|
-
if (lower.includes(phrase)) {
|
|
340
|
-
return { ok: false, reason: `${label}: banned phrase "${phrase}"` };
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
328
|
const tagFailures = auditForbiddenTagsInText(content2, label);
|
|
344
329
|
if (tagFailures.length > 0) {
|
|
345
330
|
return { ok: false, reason: tagFailures[0] };
|
|
@@ -2396,10 +2381,26 @@ function detectPackageManager(root, packageManagerField) {
|
|
|
2396
2381
|
var dep = (value) => ({ kind: "dep", value });
|
|
2397
2382
|
var depPrefix = (value) => ({ kind: "depPrefix", value });
|
|
2398
2383
|
var depAbsent = (value) => ({ kind: "depAbsent", value });
|
|
2399
|
-
var fileEndsWith = (value) => ({
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2384
|
+
var fileEndsWith = (value) => ({
|
|
2385
|
+
kind: "file",
|
|
2386
|
+
value,
|
|
2387
|
+
mode: "endsWith"
|
|
2388
|
+
});
|
|
2389
|
+
var fileIncludes = (value) => ({
|
|
2390
|
+
kind: "file",
|
|
2391
|
+
value,
|
|
2392
|
+
mode: "includes"
|
|
2393
|
+
});
|
|
2394
|
+
var fileEquals = (value) => ({
|
|
2395
|
+
kind: "file",
|
|
2396
|
+
value,
|
|
2397
|
+
mode: "equals"
|
|
2398
|
+
});
|
|
2399
|
+
var fileStartsWith = (value) => ({
|
|
2400
|
+
kind: "file",
|
|
2401
|
+
value,
|
|
2402
|
+
mode: "startsWith"
|
|
2403
|
+
});
|
|
2403
2404
|
var content = (value) => ({ kind: "content", value });
|
|
2404
2405
|
var STACK_BUCKETS = [
|
|
2405
2406
|
"backend",
|
|
@@ -2466,7 +2467,10 @@ var STACK_RULES = [
|
|
|
2466
2467
|
{ stack: ["frontend", "vue"], any: [dep("vue")] },
|
|
2467
2468
|
{ stack: ["frontend", "vite8"], any: [dep("vite")] },
|
|
2468
2469
|
{ stack: ["frontend", "react-router-v7"], all: [dep("react-router"), dep("@react-router/node")] },
|
|
2469
|
-
{
|
|
2470
|
+
{
|
|
2471
|
+
stack: ["frontend", "tailwindcss"],
|
|
2472
|
+
any: [dep("tailwindcss"), fileIncludes("tailwind.config.")]
|
|
2473
|
+
},
|
|
2470
2474
|
{
|
|
2471
2475
|
stack: ["frontend", "shadcn"],
|
|
2472
2476
|
all: [fileEndsWith("components.json"), dep("class-variance-authority")]
|
|
@@ -2479,10 +2483,12 @@ var STACK_RULES = [
|
|
|
2479
2483
|
{ stack: ["frontend", "react-native"], any: [dep("react-native")] },
|
|
2480
2484
|
{ stack: ["tooling", "i18next"], any: [dep("i18next"), dep("react-i18next")] },
|
|
2481
2485
|
{ stack: ["tooling", "bullmq"], any: [dep("bullmq")] },
|
|
2482
|
-
{
|
|
2486
|
+
{
|
|
2487
|
+
stack: ["tooling", "docker"],
|
|
2488
|
+
any: [fileEquals("Dockerfile"), fileStartsWith("docker-compose")]
|
|
2489
|
+
},
|
|
2483
2490
|
{ stack: ["tooling", "pm2"], any: [dep("pm2"), fileIncludes("ecosystem.config")] },
|
|
2484
2491
|
{ stack: ["tooling", "sentry"], any: [depPrefix("@sentry/")] },
|
|
2485
|
-
{ stack: ["tooling", "deployer-php"], any: [dep("deployer/deployer")] },
|
|
2486
2492
|
{ stack: ["tooling", "missing-prettier"], any: [depAbsent("prettier")] },
|
|
2487
2493
|
{ stack: ["tooling", "missing-eslint"], any: [depAbsent("eslint")] },
|
|
2488
2494
|
{
|
|
@@ -2499,7 +2505,10 @@ var STACK_RULES = [
|
|
|
2499
2505
|
{ stack: ["backend", "nestjs"], any: [content("NestFactory")] },
|
|
2500
2506
|
{ stack: ["backend", "vendure3"], any: [content("@VendurePlugin")] },
|
|
2501
2507
|
{ stack: ["backend", "graphql"], any: [dep("graphql"), dep("@nestjs/graphql")] },
|
|
2502
|
-
{
|
|
2508
|
+
{
|
|
2509
|
+
stack: ["backend", "graphql"],
|
|
2510
|
+
any: [fileEndsWith(".graphql"), fileEndsWith("schema.graphql")]
|
|
2511
|
+
},
|
|
2503
2512
|
{ stack: ["backend", "laravel"], any: [dep("laravel/framework")] },
|
|
2504
2513
|
{ stack: ["backend", "laravel"], any: [fileIncludes("app/Providers/"), fileIncludes("routes/")] },
|
|
2505
2514
|
{ stack: ["backend", "wordpress"], any: [fileEndsWith("wp-config.php"), dep("roots/wordpress")] },
|
|
@@ -4485,18 +4494,9 @@ function auditShippedFiles(manifestDir, items) {
|
|
|
4485
4494
|
continue;
|
|
4486
4495
|
}
|
|
4487
4496
|
const text = fs19.readFileSync(absPath, "utf8");
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
}
|
|
4492
|
-
const lower = text.toLowerCase();
|
|
4493
|
-
for (const phrase of BANNED_AGENT_PHRASES) {
|
|
4494
|
-
if (lower.includes(phrase))
|
|
4495
|
-
failures.push(`${item.id}: agent file contains disallowed phrase "${phrase}"`);
|
|
4496
|
-
}
|
|
4497
|
-
failures.push(
|
|
4498
|
-
...auditForbiddenTagsInText(text, `${item.id}: ${path27.relative(manifestDir, absPath)}`)
|
|
4499
|
-
);
|
|
4497
|
+
const rel = path27.relative(manifestDir, absPath);
|
|
4498
|
+
failures.push(...checkRequiredFrontmatter(text, `${item.id}: ${rel}`));
|
|
4499
|
+
failures.push(...auditForbiddenTagsInText(text, `${item.id}: ${rel}`));
|
|
4500
4500
|
} else if (item.type === "template") {
|
|
4501
4501
|
if (!fs19.existsSync(absPath)) {
|
|
4502
4502
|
failures.push(`${item.id}: missing template file ${item.path}`);
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
"defi",
|
|
17
17
|
"trading"
|
|
18
18
|
],
|
|
19
|
-
"bannedAgentPhrases": ["autonomous", "swarm", "delegate", "orchestrat", "marketplace"],
|
|
20
19
|
"requiredSkillFrontmatter": ["description"],
|
|
21
|
-
"requiredAgentSections": ["## Use when", "## Do not use when", "## Verification"],
|
|
22
20
|
"riskyInstallPatterns": [
|
|
23
21
|
{ "source": "\\bnpx\\s+-y\\b", "flags": "i" },
|
|
24
22
|
{ "source": "\\bnpx\\s+--yes\\b", "flags": "i" },
|
|
@@ -84,10 +82,7 @@
|
|
|
84
82
|
"oidc",
|
|
85
83
|
"azure-ad",
|
|
86
84
|
"bankid",
|
|
87
|
-
"myid",
|
|
88
|
-
"cgi",
|
|
89
85
|
"crypto",
|
|
90
|
-
"collection2",
|
|
91
86
|
"postgresql",
|
|
92
87
|
"mariadb",
|
|
93
88
|
"mssql",
|
|
@@ -98,7 +93,6 @@
|
|
|
98
93
|
"testing-library",
|
|
99
94
|
"phpunit",
|
|
100
95
|
"storybook",
|
|
101
|
-
"wisest",
|
|
102
96
|
"vitest",
|
|
103
97
|
"jest",
|
|
104
98
|
"redis",
|
|
@@ -127,7 +121,6 @@
|
|
|
127
121
|
"missing-eslint",
|
|
128
122
|
"docker",
|
|
129
123
|
"pm2",
|
|
130
|
-
"deployer-php",
|
|
131
124
|
"stripe",
|
|
132
125
|
"qliro",
|
|
133
126
|
"supabase",
|