@specdest/devkit 0.1.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/catalog/README.md +11 -0
- package/catalog/modules/backend-convex/manifest.json +14 -0
- package/catalog/modules/backend-convex-expo/manifest.json +11 -0
- package/catalog/modules/backend-supabase/manifest.json +15 -0
- package/catalog/modules/backend-supabase-expo/manifest.json +11 -0
- package/catalog/modules/checker-runtime/config.ts +24 -0
- package/catalog/modules/checker-runtime/fs.ts +47 -0
- package/catalog/modules/checker-runtime/manifest.json +23 -0
- package/catalog/modules/devflow/.agents/skills/devflow/SKILL.md +33 -0
- package/catalog/modules/devflow/.devflow.json +10 -0
- package/catalog/modules/devflow/manifest.json +35 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/SKILL.md +85 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/activeScenario.mjs +130 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/checkLocalEnvironment.mjs +7 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/completeActiveScenario.mjs +36 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/createActiveScenario.mjs +143 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/localEnvironment.mjs +43 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/prompt.mjs +25 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/runActiveScenario.mjs +66 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/runAuthoringScenario.mjs +146 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/seed.mjs +56 -0
- package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/seedActiveScenario.mjs +6 -0
- package/catalog/modules/e2e-playwright/docs/e2e-playwright/README.md +103 -0
- package/catalog/modules/e2e-playwright/manifest.json +206 -0
- package/catalog/modules/e2e-playwright/playwright.e2e.config.ts +39 -0
- package/catalog/modules/e2e-playwright/tests/e2e/support/e2ePlaywrightFlow.ts +107 -0
- package/catalog/modules/e2e-playwright/tests/e2e/support/fixtures.ts +27 -0
- package/catalog/modules/local-log/AGENTS.local-log.md +13 -0
- package/catalog/modules/local-log/docs/features/local-logging/README.md +70 -0
- package/catalog/modules/local-log/manifest.json +39 -0
- package/catalog/modules/local-log/tmp/logs/.gitignore +2 -0
- package/catalog/modules/local-log/tools/local-log/README.md +47 -0
- package/catalog/modules/local-log/tools/local-log/local-log.mjs +241 -0
- package/catalog/modules/stack-common-vite/manifest.json +16 -0
- package/catalog/modules/stack-expo-convex/manifest.json +31 -0
- package/catalog/modules/stack-expo-supabase/manifest.json +44 -0
- package/catalog/modules/stack-vite-convex/manifest.json +32 -0
- package/catalog/modules/stack-vite-supabase/manifest.json +45 -0
- package/catalog/rules/abac-permissions-convex/SKILL.md +17 -0
- package/catalog/rules/abac-permissions-convex/check.ts +86 -0
- package/catalog/rules/abac-permissions-convex/manifest.json +35 -0
- package/catalog/rules/abac-permissions-supabase/SKILL.md +17 -0
- package/catalog/rules/abac-permissions-supabase/check.ts +86 -0
- package/catalog/rules/abac-permissions-supabase/manifest.json +35 -0
- package/catalog/rules/convex-multi-presentation/SKILL.md +48 -0
- package/catalog/rules/convex-multi-presentation/boundary-test-baseline.json +3 -0
- package/catalog/rules/convex-multi-presentation/check.ts +271 -0
- package/catalog/rules/convex-multi-presentation/manifest.json +45 -0
- package/catalog/rules/convex-multi-presentation/policy.ts +261 -0
- package/catalog/rules/design-rules/SKILL.md +12 -0
- package/catalog/rules/design-rules/check.ts +83 -0
- package/catalog/rules/design-rules/config.json +5 -0
- package/catalog/rules/design-rules/manifest.json +40 -0
- package/catalog/rules/e2e-test-rules/SKILL.md +46 -0
- package/catalog/rules/e2e-test-rules/check.ts +144 -0
- package/catalog/rules/e2e-test-rules/config.json +32 -0
- package/catalog/rules/e2e-test-rules/manifest.json +40 -0
- package/catalog/rules/error-handling-rules/SKILL.md +21 -0
- package/catalog/rules/error-handling-rules/check.ts +72 -0
- package/catalog/rules/error-handling-rules/manifest.json +35 -0
- package/catalog/rules/layers-and-contracts/SKILL.md +36 -0
- package/catalog/rules/layers-and-contracts/check.ts +265 -0
- package/catalog/rules/layers-and-contracts/manifest.json +35 -0
- package/catalog/rules/layers-and-contracts-convex/SKILL.md +49 -0
- package/catalog/rules/layers-and-contracts-convex/check.ts +288 -0
- package/catalog/rules/layers-and-contracts-convex/manifest.json +40 -0
- package/catalog/rules/layers-and-contracts-convex/policy.ts +68 -0
- package/catalog/rules/layers-and-contracts-supabase/SKILL.md +52 -0
- package/catalog/rules/layers-and-contracts-supabase/check.ts +370 -0
- package/catalog/rules/layers-and-contracts-supabase/manifest.json +40 -0
- package/catalog/rules/layers-and-contracts-supabase/policy.ts +68 -0
- package/catalog/rules/module-size-rules/SKILL.md +5 -0
- package/catalog/rules/module-size-rules/check.ts +143 -0
- package/catalog/rules/module-size-rules/config.json +6 -0
- package/catalog/rules/module-size-rules/manifest.json +40 -0
- package/catalog/rules/module-size-rules-convex/SKILL.md +5 -0
- package/catalog/rules/module-size-rules-convex/check.ts +145 -0
- package/catalog/rules/module-size-rules-convex/config.json +6 -0
- package/catalog/rules/module-size-rules-convex/manifest.json +40 -0
- package/catalog/rules/module-size-rules-supabase/SKILL.md +5 -0
- package/catalog/rules/module-size-rules-supabase/check.ts +145 -0
- package/catalog/rules/module-size-rules-supabase/config.json +12 -0
- package/catalog/rules/module-size-rules-supabase/manifest.json +40 -0
- package/catalog/rules/mutation-command-rules/SKILL.md +15 -0
- package/catalog/rules/mutation-command-rules/check.ts +29 -0
- package/catalog/rules/mutation-command-rules/config.json +19 -0
- package/catalog/rules/mutation-command-rules/manifest.json +40 -0
- package/catalog/rules/nearby-contracts/SKILL.md +18 -0
- package/catalog/rules/nearby-contracts/check.ts +137 -0
- package/catalog/rules/nearby-contracts/config.json +10 -0
- package/catalog/rules/nearby-contracts/manifest.json +40 -0
- package/catalog/rules/no-raw-click-buttons/SKILL.md +5 -0
- package/catalog/rules/no-raw-click-buttons/check.ts +36 -0
- package/catalog/rules/no-raw-click-buttons/manifest.json +35 -0
- package/catalog/rules/public-api-export-barrels/SKILL.md +45 -0
- package/catalog/rules/public-api-export-barrels/check.ts +72 -0
- package/catalog/rules/public-api-export-barrels/config.json +4 -0
- package/catalog/rules/public-api-export-barrels/manifest.json +40 -0
- package/catalog/rules/route-tree-fresh/SKILL.md +16 -0
- package/catalog/rules/route-tree-fresh/check.ts +64 -0
- package/catalog/rules/route-tree-fresh/manifest.json +35 -0
- package/catalog/rules/strict-typescript/SKILL.md +3 -0
- package/catalog/rules/strict-typescript/check.ts +111 -0
- package/catalog/rules/strict-typescript/manifest.json +35 -0
- package/catalog/rules/supabase-contracts/SKILL.md +3 -0
- package/catalog/rules/supabase-contracts/check.ts +171 -0
- package/catalog/rules/supabase-contracts/manifest.json +35 -0
- package/catalog/rules/supabase-declarative-schema/SKILL.md +30 -0
- package/catalog/rules/supabase-declarative-schema/check.ts +261 -0
- package/catalog/rules/supabase-declarative-schema/config.json +8 -0
- package/catalog/rules/supabase-declarative-schema/manifest.json +40 -0
- package/catalog/rules/tanstack-form-rules/SKILL.md +11 -0
- package/catalog/rules/tanstack-form-rules/check.ts +57 -0
- package/catalog/rules/tanstack-form-rules/manifest.json +35 -0
- package/catalog/rules/unit-test-rules/SKILL.md +55 -0
- package/catalog/rules/unit-test-rules/check.ts +131 -0
- package/catalog/rules/unit-test-rules/config.json +22 -0
- package/catalog/rules/unit-test-rules/manifest.json +40 -0
- package/catalog/rules/unit-test-rules-convex/SKILL.md +41 -0
- package/catalog/rules/unit-test-rules-convex/check.ts +417 -0
- package/catalog/rules/unit-test-rules-convex/manifest.json +35 -0
- package/catalog/rules/unit-test-rules-supabase/SKILL.md +40 -0
- package/catalog/rules/unit-test-rules-supabase/check.ts +491 -0
- package/catalog/rules/unit-test-rules-supabase/manifest.json +35 -0
- package/catalog/rules/workstation-controller-rules/SKILL.md +22 -0
- package/catalog/rules/workstation-controller-rules/check.ts +107 -0
- package/catalog/rules/workstation-controller-rules/manifest.json +35 -0
- package/package.json +22 -0
- package/src/catalog-snapshot.js +39 -0
- package/src/catalog.js +117 -0
- package/src/cli.js +11 -0
- package/src/index.js +30 -0
- package/src/installer-primitives.js +198 -0
- package/src/project-operations.js +126 -0
- package/src/setup-requirements.js +82 -0
- package/src/shared-file.js +131 -0
- package/src/sync-core.js +276 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "stack-vite-supabase",
|
|
3
|
+
"kind": "module",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"requires": [
|
|
6
|
+
"backend-supabase",
|
|
7
|
+
"stack-common-vite"
|
|
8
|
+
],
|
|
9
|
+
"setupRequirements": [
|
|
10
|
+
{
|
|
11
|
+
"kind": "env",
|
|
12
|
+
"name": "VITE_SUPABASE_URL",
|
|
13
|
+
"required": true,
|
|
14
|
+
"exampleFile": ".env.example",
|
|
15
|
+
"description": "Required runtime configuration for stack-vite-supabase."
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "env",
|
|
19
|
+
"name": "VITE_SUPABASE_ANON_KEY",
|
|
20
|
+
"required": true,
|
|
21
|
+
"exampleFile": ".env.example",
|
|
22
|
+
"description": "Required runtime configuration for stack-vite-supabase."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"artifacts": [
|
|
26
|
+
{
|
|
27
|
+
"kind": "shared-key-value",
|
|
28
|
+
"path": ".env.example",
|
|
29
|
+
"key": "VITE_SUPABASE_URL",
|
|
30
|
+
"value": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"kind": "shared-key-value",
|
|
34
|
+
"path": ".env.example",
|
|
35
|
+
"key": "VITE_SUPABASE_ANON_KEY",
|
|
36
|
+
"value": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"kind": "shared-line",
|
|
40
|
+
"path": ".gitignore",
|
|
41
|
+
"line": "!.env.example"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"obsolete": []
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ABAC permissions
|
|
2
|
+
|
|
3
|
+
Authorization data lives in Convex auth session and permission state only. Do not copy authorization metadata into `profile documents` or any other public table.
|
|
4
|
+
|
|
5
|
+
Use permission attributes, not roles, for authorization. Do not add a `role` column to `profile documents`, and do not add RBAC helpers such as `current_app_role()`.
|
|
6
|
+
|
|
7
|
+
Standard shape:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"permissions": {
|
|
12
|
+
"profiles": ["self", "manager", "full"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A resource-level `full` permission is a wildcard for that resource. Add project-specific resources only inside the target project, not in this boilerplate template.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// oxlint-disable no-console no-await-in-loop no-useless-concat no-useless-escape
|
|
2
|
+
const violations: string[] = [];
|
|
3
|
+
const authorityColumn = "ro" + "le";
|
|
4
|
+
const metadataKey = "app_" + "metadata";
|
|
5
|
+
const rawMetadataKey = "raw_app_" + "meta_data";
|
|
6
|
+
const targetMetadataKey = "target_app_" + "metadata";
|
|
7
|
+
|
|
8
|
+
async function* walk(dir: string): AsyncGenerator<string> {
|
|
9
|
+
try {
|
|
10
|
+
for await (const entry of Deno.readDir(dir)) {
|
|
11
|
+
const path = `${dir}/${entry.name}`;
|
|
12
|
+
if (entry.isDirectory) yield* walk(path);
|
|
13
|
+
if (entry.isFile && /\.(ts|tsx|sql|mjs|js)$/.test(entry.name)) yield path;
|
|
14
|
+
}
|
|
15
|
+
} catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isIgnored(file: string): boolean {
|
|
21
|
+
return (
|
|
22
|
+
file.includes("node_modules") ||
|
|
23
|
+
file.includes(".git/") ||
|
|
24
|
+
file.includes(".agents/skills/abac-permissions/") ||
|
|
25
|
+
file.includes("/tests/") ||
|
|
26
|
+
file.endsWith(".test.ts") ||
|
|
27
|
+
file.endsWith(".test.tsx") ||
|
|
28
|
+
file.endsWith(".test.sql") ||
|
|
29
|
+
file.endsWith("routeTree.gen.ts")
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function statements(text: string): string[] {
|
|
34
|
+
return text.toLowerCase().split(";");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writesRoleMetadata(text: string): boolean {
|
|
38
|
+
const pattern = new RegExp(
|
|
39
|
+
`(${metadataKey}|${rawMetadataKey}|${targetMetadataKey})[\\s\\S]{0,160}['\"]${authorityColumn}['\"]`,
|
|
40
|
+
);
|
|
41
|
+
return pattern.test(text);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function readsRoleMetadata(text: string): boolean {
|
|
45
|
+
const pattern = new RegExp(
|
|
46
|
+
`auth\\.jwt\\(\\)\\s*->\\s*'${metadataKey}'\\s*->>?\\s*'${authorityColumn}'`,
|
|
47
|
+
);
|
|
48
|
+
return pattern.test(text);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
for await (const file of walk(".")) {
|
|
52
|
+
if (isIgnored(file)) continue;
|
|
53
|
+
const text = await Deno.readTextFile(file);
|
|
54
|
+
const lower = text.toLowerCase();
|
|
55
|
+
|
|
56
|
+
const profileTableStatement = statements(text).find((statement) =>
|
|
57
|
+
/create\s+table[\s\S]*public\.profiles/.test(statement),
|
|
58
|
+
);
|
|
59
|
+
if (profileTableStatement?.includes(metadataKey)) {
|
|
60
|
+
violations.push(`${file}: profiles persistence must not store app metadata`);
|
|
61
|
+
}
|
|
62
|
+
if (profileTableStatement?.includes("permissions")) {
|
|
63
|
+
violations.push(`${file}: profiles persistence must not store permissions`);
|
|
64
|
+
}
|
|
65
|
+
if (new RegExp(`\\b${authorityColumn}\\s+text\\b`).test(profileTableStatement ?? "")) {
|
|
66
|
+
violations.push(
|
|
67
|
+
`${file}: profiles persistence must not store authorization role; use ABAC permissions`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (/\bcurrent_app_role\b/.test(lower)) {
|
|
72
|
+
violations.push(`${file}: RBAC helper current_app_role is forbidden; use ABAC permissions`);
|
|
73
|
+
}
|
|
74
|
+
if (readsRoleMetadata(lower)) {
|
|
75
|
+
violations.push(`${file}: role metadata must not be read for authorization`);
|
|
76
|
+
}
|
|
77
|
+
if (writesRoleMetadata(lower)) {
|
|
78
|
+
violations.push(`${file}: role metadata must not be written to app metadata`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (violations.length) {
|
|
83
|
+
console.error(violations.join("\n"));
|
|
84
|
+
Deno.exit(1);
|
|
85
|
+
}
|
|
86
|
+
console.log("abac-permissions ok");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "abac-permissions-convex",
|
|
3
|
+
"kind": "rule",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"requires": [
|
|
6
|
+
"checker-runtime"
|
|
7
|
+
],
|
|
8
|
+
"artifacts": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "managed-file",
|
|
11
|
+
"path": ".agents/skills/abac-permissions/SKILL.md",
|
|
12
|
+
"source": "SKILL.md"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "managed-file",
|
|
16
|
+
"path": ".agents/skills/abac-permissions/check.ts",
|
|
17
|
+
"source": "check.ts"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"kind": "shared-markdown-section",
|
|
21
|
+
"path": "AGENTS.md",
|
|
22
|
+
"heading": "## Specdest backend rule: abac-permissions",
|
|
23
|
+
"body": "Use `.agents/skills/abac-permissions/SKILL.md` for this backend-specific rule. Run `deno run --allow-read .agents/skills/abac-permissions/check.ts` before handoff."
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"obsolete": [],
|
|
27
|
+
"check": {
|
|
28
|
+
"command": [
|
|
29
|
+
"deno",
|
|
30
|
+
"run",
|
|
31
|
+
"--allow-read",
|
|
32
|
+
".agents/skills/abac-permissions/check.ts"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ABAC permissions
|
|
2
|
+
|
|
3
|
+
Authorization data lives in Supabase Auth app metadata / JWT only. Do not copy authorization metadata into `public.profiles` or any other public table.
|
|
4
|
+
|
|
5
|
+
Use permission attributes, not roles, for authorization. Do not add a `role` column to `public.profiles`, and do not add RBAC helpers such as `current_app_role()`.
|
|
6
|
+
|
|
7
|
+
Standard shape:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"permissions": {
|
|
12
|
+
"profiles": ["self", "manager", "full"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A resource-level `full` permission is a wildcard for that resource. Add project-specific resources only inside the target project, not in this boilerplate template.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// oxlint-disable no-console no-await-in-loop no-useless-concat no-useless-escape
|
|
2
|
+
const violations: string[] = [];
|
|
3
|
+
const authorityColumn = "ro" + "le";
|
|
4
|
+
const metadataKey = "app_" + "metadata";
|
|
5
|
+
const rawMetadataKey = "raw_app_" + "meta_data";
|
|
6
|
+
const targetMetadataKey = "target_app_" + "metadata";
|
|
7
|
+
|
|
8
|
+
async function* walk(dir: string): AsyncGenerator<string> {
|
|
9
|
+
try {
|
|
10
|
+
for await (const entry of Deno.readDir(dir)) {
|
|
11
|
+
const path = `${dir}/${entry.name}`;
|
|
12
|
+
if (entry.isDirectory) yield* walk(path);
|
|
13
|
+
if (entry.isFile && /\.(ts|tsx|sql|mjs|js)$/.test(entry.name)) yield path;
|
|
14
|
+
}
|
|
15
|
+
} catch {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function isIgnored(file: string): boolean {
|
|
21
|
+
return (
|
|
22
|
+
file.includes("node_modules") ||
|
|
23
|
+
file.includes(".git/") ||
|
|
24
|
+
file.includes(".agents/skills/abac-permissions/") ||
|
|
25
|
+
file.includes("/tests/") ||
|
|
26
|
+
file.endsWith(".test.ts") ||
|
|
27
|
+
file.endsWith(".test.tsx") ||
|
|
28
|
+
file.endsWith(".test.sql") ||
|
|
29
|
+
file.endsWith("routeTree.gen.ts")
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function statements(text: string): string[] {
|
|
34
|
+
return text.toLowerCase().split(";");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writesRoleMetadata(text: string): boolean {
|
|
38
|
+
const pattern = new RegExp(
|
|
39
|
+
`(${metadataKey}|${rawMetadataKey}|${targetMetadataKey})[\\s\\S]{0,160}['\"]${authorityColumn}['\"]`,
|
|
40
|
+
);
|
|
41
|
+
return pattern.test(text);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function readsRoleMetadata(text: string): boolean {
|
|
45
|
+
const pattern = new RegExp(
|
|
46
|
+
`auth\\.jwt\\(\\)\\s*->\\s*'${metadataKey}'\\s*->>?\\s*'${authorityColumn}'`,
|
|
47
|
+
);
|
|
48
|
+
return pattern.test(text);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
for await (const file of walk(".")) {
|
|
52
|
+
if (isIgnored(file)) continue;
|
|
53
|
+
const text = await Deno.readTextFile(file);
|
|
54
|
+
const lower = text.toLowerCase();
|
|
55
|
+
|
|
56
|
+
const profileTableStatement = statements(text).find((statement) =>
|
|
57
|
+
/create\s+table[\s\S]*public\.profiles/.test(statement),
|
|
58
|
+
);
|
|
59
|
+
if (profileTableStatement?.includes(metadataKey)) {
|
|
60
|
+
violations.push(`${file}: profiles persistence must not store app metadata`);
|
|
61
|
+
}
|
|
62
|
+
if (profileTableStatement?.includes("permissions")) {
|
|
63
|
+
violations.push(`${file}: profiles persistence must not store permissions`);
|
|
64
|
+
}
|
|
65
|
+
if (new RegExp(`\\b${authorityColumn}\\s+text\\b`).test(profileTableStatement ?? "")) {
|
|
66
|
+
violations.push(
|
|
67
|
+
`${file}: profiles persistence must not store authorization role; use ABAC permissions`,
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (/\bcurrent_app_role\b/.test(lower)) {
|
|
72
|
+
violations.push(`${file}: RBAC helper current_app_role is forbidden; use ABAC permissions`);
|
|
73
|
+
}
|
|
74
|
+
if (readsRoleMetadata(lower)) {
|
|
75
|
+
violations.push(`${file}: role metadata must not be read for authorization`);
|
|
76
|
+
}
|
|
77
|
+
if (writesRoleMetadata(lower)) {
|
|
78
|
+
violations.push(`${file}: role metadata must not be written to app metadata`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (violations.length) {
|
|
83
|
+
console.error(violations.join("\n"));
|
|
84
|
+
Deno.exit(1);
|
|
85
|
+
}
|
|
86
|
+
console.log("abac-permissions ok");
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "abac-permissions-supabase",
|
|
3
|
+
"kind": "rule",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"requires": [
|
|
6
|
+
"checker-runtime"
|
|
7
|
+
],
|
|
8
|
+
"artifacts": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "managed-file",
|
|
11
|
+
"path": ".agents/skills/abac-permissions/SKILL.md",
|
|
12
|
+
"source": "SKILL.md"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "managed-file",
|
|
16
|
+
"path": ".agents/skills/abac-permissions/check.ts",
|
|
17
|
+
"source": "check.ts"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"kind": "shared-markdown-section",
|
|
21
|
+
"path": "AGENTS.md",
|
|
22
|
+
"heading": "## Specdest backend rule: abac-permissions",
|
|
23
|
+
"body": "Use `.agents/skills/abac-permissions/SKILL.md` for this backend-specific rule. Run `deno run --allow-read .agents/skills/abac-permissions/check.ts` before handoff."
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"obsolete": [],
|
|
27
|
+
"check": {
|
|
28
|
+
"command": [
|
|
29
|
+
"deno",
|
|
30
|
+
"run",
|
|
31
|
+
"--allow-read",
|
|
32
|
+
".agents/skills/abac-permissions/check.ts"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Convex multi-presentation architecture
|
|
2
|
+
|
|
3
|
+
Base uses one Convex backend for every presentation adapter.
|
|
4
|
+
|
|
5
|
+
Required dependency flow:
|
|
6
|
+
|
|
7
|
+
`Web / CLI / Zora / MCP -> Convex public API -> Application -> Domain/DAL or Integrations`
|
|
8
|
+
|
|
9
|
+
Rules:
|
|
10
|
+
|
|
11
|
+
- Presentation adapters contain transport, interaction, rendering, and presentation mapping only. Business rules belong in the backend.
|
|
12
|
+
- Base has exactly one MCP presentation: the Convex-hosted `/mcp` endpoint. Do not add a controller-hosted Base Todo MCP server, stdio adapter, or second Base MCP transport.
|
|
13
|
+
- Web React may use `useQuery`, `useMutation`, and `useAction` only in route-local data hooks. CLI, Zora, and MCP use a Convex client adapter against the same public API.
|
|
14
|
+
- Presentation code must never import Convex backend application, domain, DAL, or provider integration modules directly.
|
|
15
|
+
- Root `convex/*.ts` public function modules are transport adapters. They validate `args` and `returns` and delegate to application use cases.
|
|
16
|
+
- Public Convex handlers must not query `ctx.db`, call external providers, or contain reusable business rules.
|
|
17
|
+
- `convex/application/**` owns use-case orchestration. Boundary façade modules own the reusable input/output contracts and focused use-case tests. Implementation-only splits belong under `convex/application/**/internal/`; they inherit the façade boundary and must never be imported directly by public API modules. Application code may depend on domain, DAL persistence, and provider interfaces in `convex/integrations/**`, never presentation or raw Convex DB primitives directly.
|
|
18
|
+
- `convex/domain/**` owns pure business rules and must not depend on Convex runtime, DB, network, application, DAL, or integrations.
|
|
19
|
+
- `convex/dal/**` is persistence only: it owns Convex DB persistence, DB primitives must not escape it, and it must never proxy/re-export network providers.
|
|
20
|
+
- `convex/integrations/**` owns external providers such as GitHub, Google Calendar, Notion, and Todoist. Application use cases call these adapters directly; provider payloads must be mapped into application models before crossing the public API.
|
|
21
|
+
- Dependency direction is one way. No upward imports and no layer skipping.
|
|
22
|
+
|
|
23
|
+
## Contracts
|
|
24
|
+
|
|
25
|
+
- Convex `v` validators are canonical for Convex-native API and application contracts.
|
|
26
|
+
- Every public `query`, `mutation`, or `action` must declare both `args` and `returns`.
|
|
27
|
+
- Application boundary values use reusable `v` validators and `Infer<typeof validator>` types. Do not hand-write duplicate boundary object types.
|
|
28
|
+
- Do not maintain equivalent Zod and Convex schemas or add automatic `v <-> Zod` converters.
|
|
29
|
+
- Zod is reserved for non-Convex untrusted data: external HTTP/provider payloads, environment/config input, and presentation forms when appropriate.
|
|
30
|
+
- External provider payloads are Zod-validated, then explicitly mapped as values into internal application models.
|
|
31
|
+
- Provider-specific payload types must not leak into application or domain code.
|
|
32
|
+
- Small internal helpers and implementation splits under an `internal/` directory do not need standalone runtime contract files; their boundary façade remains responsible for contracts and focused tests.
|
|
33
|
+
- `convex/schema.ts` may compose schema fragments from `convex/schema/**`; those fragments are Convex framework plumbing, not application/DAL boundaries.
|
|
34
|
+
|
|
35
|
+
## Testing and enforcement
|
|
36
|
+
|
|
37
|
+
- Application use cases must be independently unit-testable with only immediate DAL/domain dependencies mocked.
|
|
38
|
+
- Domain rules must have pure unit tests.
|
|
39
|
+
- DAL and provider adapters need focused boundary/contract tests.
|
|
40
|
+
- Public Convex functions need boundary tests executed through `convex-test` for accepted args, rejected invalid args, and validated returns. Export-only smoke tests do not satisfy this rule.
|
|
41
|
+
- Public-output mappers must explicitly construct their DTO; identity mappers are forbidden because structural typing can otherwise leak persistence-only fields.
|
|
42
|
+
- Existing boundary-test migration debt is tracked in `boundary-test-baseline.json`; the baseline may only shrink and new weak boundary tests are rejected.
|
|
43
|
+
- Architecture enforcement has no inline suppression mechanism. Existing migration debt, when unavoidable, is tracked only in the explicit architecture baseline and new debt is rejected.
|
|
44
|
+
- `nps lint.convexArchitecture` is mandatory in the normal lint gate.
|
|
45
|
+
- `nps typecheck.convex` must typecheck the Convex backend independently.
|
|
46
|
+
- Oxc must lint frontend, backend, architecture rules, tests, and scripts.
|
|
47
|
+
|
|
48
|
+
- Base has exactly one MCP presentation: the Convex-hosted `/mcp` endpoint. Do not add or restore a controller-hosted Todo MCP server or tunnel. The external ChatGPT connector label may be `base_mcp`; treat that as a client-side name only, not a separate architecture path.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
// oxlint-disable no-console no-await-in-loop
|
|
2
|
+
import {
|
|
3
|
+
backendExternalImportViolation,
|
|
4
|
+
boundaryTestQualityViolations,
|
|
5
|
+
backendImportViolation,
|
|
6
|
+
backendLayer,
|
|
7
|
+
forbiddenRuntimeViolations,
|
|
8
|
+
frontendBackendImportViolation,
|
|
9
|
+
identityOutputMapperViolations,
|
|
10
|
+
importSpecs,
|
|
11
|
+
isConvexFrameworkPlumbing,
|
|
12
|
+
isInternalBackendImplementation,
|
|
13
|
+
normalizePath,
|
|
14
|
+
publicApiLogicViolations,
|
|
15
|
+
publicFunctionContractViolations,
|
|
16
|
+
publicConvexFunctions,
|
|
17
|
+
schemaTechnologyViolations,
|
|
18
|
+
} from "./policy.ts";
|
|
19
|
+
|
|
20
|
+
const decoder = new TextDecoder();
|
|
21
|
+
const findings: string[] = [];
|
|
22
|
+
const forbiddenBaseMcpPaths = [
|
|
23
|
+
"scripts/backend/todo-mcp-server.ts",
|
|
24
|
+
"scripts/backend/todo-mcp-protocol.ts",
|
|
25
|
+
"scripts/backend/todo-mcp-client.ts",
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
async function exists(path: string): Promise<boolean> {
|
|
29
|
+
try {
|
|
30
|
+
await Deno.stat(path);
|
|
31
|
+
return true;
|
|
32
|
+
} catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function* walk(dir: string): AsyncGenerator<string> {
|
|
38
|
+
try {
|
|
39
|
+
for await (const entry of Deno.readDir(dir)) {
|
|
40
|
+
const path = `${dir}/${entry.name}`;
|
|
41
|
+
if (entry.isDirectory && entry.name !== "_generated") yield* walk(path);
|
|
42
|
+
if (entry.isFile && /\.(ts|tsx)$/u.test(entry.name)) yield normalizePath(path);
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function productionFile(file: string): boolean {
|
|
50
|
+
return /\.(ts|tsx)$/u.test(file) && !/\.(test|stories|mock)\.(ts|tsx)$/u.test(file);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function add(file: string, message: string): void {
|
|
54
|
+
findings.push(`${file}: ${message}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function requireSibling(file: string, suffix: string, reason: string): Promise<void> {
|
|
58
|
+
const sibling = file.replace(/\.tsx?$/u, suffix);
|
|
59
|
+
if (!(await exists(sibling))) add(file, `${reason}: missing ${sibling}`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function verifyContractFile(path: string, technology: "convex" | "zod"): Promise<void> {
|
|
63
|
+
if (!(await exists(path))) return;
|
|
64
|
+
const source = decoder.decode(await Deno.readFile(path));
|
|
65
|
+
if (technology === "convex") {
|
|
66
|
+
if (!/from\s+["']convex\/values["']/u.test(source) || !/\bv\./u.test(source)) {
|
|
67
|
+
add(path, "Convex contract must define a v validator");
|
|
68
|
+
}
|
|
69
|
+
if (!/\bInfer\s*</u.test(source))
|
|
70
|
+
add(path, "Convex boundary type must derive with Infer<typeof validator>");
|
|
71
|
+
if (/from\s+["']zod["']/u.test(source))
|
|
72
|
+
add(path, "Convex contract must not duplicate itself in Zod");
|
|
73
|
+
} else {
|
|
74
|
+
if (!/from\s+["']zod["']/u.test(source) || !/\bz\./u.test(source))
|
|
75
|
+
add(path, "external provider contract must use Zod");
|
|
76
|
+
if (!/\bz\.infer\s*</u.test(source))
|
|
77
|
+
add(path, "external provider boundary type must derive with z.infer");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function verifyBackendBoundaryFiles(file: string): Promise<void> {
|
|
82
|
+
const layer = backendLayer(file);
|
|
83
|
+
if (!layer || !productionFile(file)) return;
|
|
84
|
+
if (isInternalBackendImplementation(file)) return;
|
|
85
|
+
if (/\.(input|output)(?:\.schema)?\.ts$/u.test(file)) return;
|
|
86
|
+
if (layer === "application" || layer === "dal") {
|
|
87
|
+
await requireSibling(file, ".input.ts", `${layer} operations require an input contract`);
|
|
88
|
+
await requireSibling(file, ".output.ts", `${layer} operations require an output contract`);
|
|
89
|
+
await requireSibling(file, ".test.ts", `${layer} operations require a focused unit test`);
|
|
90
|
+
await verifyContractFile(file.replace(/\.ts$/u, ".input.ts"), "convex");
|
|
91
|
+
await verifyContractFile(file.replace(/\.ts$/u, ".output.ts"), "convex");
|
|
92
|
+
}
|
|
93
|
+
if (layer === "domain")
|
|
94
|
+
await requireSibling(file, ".test.ts", "domain rules require pure unit tests");
|
|
95
|
+
if (layer === "integration") {
|
|
96
|
+
const source = decoder.decode(await Deno.readFile(file));
|
|
97
|
+
await requireSibling(file, ".input.schema.ts", "provider adapters require Zod input contracts");
|
|
98
|
+
await requireSibling(
|
|
99
|
+
file,
|
|
100
|
+
".output.schema.ts",
|
|
101
|
+
"provider adapters require Zod output contracts",
|
|
102
|
+
);
|
|
103
|
+
await requireSibling(file, ".test.ts", "provider adapters require focused contract tests");
|
|
104
|
+
await verifyContractFile(file.replace(/\.ts$/u, ".input.schema.ts"), "zod");
|
|
105
|
+
await verifyContractFile(file.replace(/\.ts$/u, ".output.schema.ts"), "zod");
|
|
106
|
+
if (!/from\s+["'][^"']+\.input\.schema["']/u.test(source))
|
|
107
|
+
add(file, "provider adapter must import its input Zod contract");
|
|
108
|
+
if (!/from\s+["'][^"']+\.output\.schema["']/u.test(source))
|
|
109
|
+
add(file, "provider adapter must import its output Zod contract");
|
|
110
|
+
if (!/\w+InputSchema\.(?:parse|safeParse)\s*\(/u.test(source))
|
|
111
|
+
add(file, "provider adapter must execute its input Zod contract");
|
|
112
|
+
if (!/\w+OutputSchema\.(?:parse|safeParse)\s*\(/u.test(source))
|
|
113
|
+
add(file, "provider adapter must execute its output Zod contract on external data");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
for await (const file of walk("src")) {
|
|
118
|
+
if (!productionFile(file)) continue;
|
|
119
|
+
const source = decoder.decode(await Deno.readFile(file));
|
|
120
|
+
for (const spec of importSpecs(source)) {
|
|
121
|
+
const violation = frontendBackendImportViolation(file, spec);
|
|
122
|
+
if (violation) add(file, violation);
|
|
123
|
+
}
|
|
124
|
+
const importsConvexHooks =
|
|
125
|
+
/from\s+["']convex\/react["']/u.test(source) &&
|
|
126
|
+
/\buse(?:Query|Mutation|Action)\b/u.test(source);
|
|
127
|
+
const allowedHookOwner =
|
|
128
|
+
file.includes("/-components/data-hooks/") ||
|
|
129
|
+
file === "src/main.tsx" ||
|
|
130
|
+
file.startsWith("src/integrations/convex/");
|
|
131
|
+
if (importsConvexHooks && !allowedHookOwner)
|
|
132
|
+
add(file, "Convex React query/mutation/action hooks belong only in web data-hooks");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
for await (const file of walk("convex")) {
|
|
136
|
+
if (!productionFile(file) || isConvexFrameworkPlumbing(file)) continue;
|
|
137
|
+
const source = decoder.decode(await Deno.readFile(file));
|
|
138
|
+
const layer = backendLayer(file);
|
|
139
|
+
if (layer) {
|
|
140
|
+
for (const spec of importSpecs(source)) {
|
|
141
|
+
const violation = backendImportViolation(file, spec);
|
|
142
|
+
if (violation) add(file, violation);
|
|
143
|
+
const externalViolation = backendExternalImportViolation(file, spec);
|
|
144
|
+
if (externalViolation) add(file, externalViolation);
|
|
145
|
+
}
|
|
146
|
+
for (const violation of forbiddenRuntimeViolations(file, source)) add(file, violation);
|
|
147
|
+
for (const violation of schemaTechnologyViolations(file, source)) add(file, violation);
|
|
148
|
+
if (layer === "application")
|
|
149
|
+
for (const violation of identityOutputMapperViolations(source)) add(file, violation);
|
|
150
|
+
await verifyBackendBoundaryFiles(file);
|
|
151
|
+
}
|
|
152
|
+
if (!layer)
|
|
153
|
+
add(
|
|
154
|
+
file,
|
|
155
|
+
"unclassified Convex backend module; move code into application/domain/dal/integrations or a public API module",
|
|
156
|
+
);
|
|
157
|
+
if (layer === "api") {
|
|
158
|
+
const functions = publicConvexFunctions(source);
|
|
159
|
+
for (const violation of publicFunctionContractViolations(source)) add(file, violation);
|
|
160
|
+
for (const violation of publicApiLogicViolations(source)) add(file, violation);
|
|
161
|
+
if (
|
|
162
|
+
functions.length > 0 &&
|
|
163
|
+
!importSpecs(source).some((spec) => spec.includes("/application/"))
|
|
164
|
+
) {
|
|
165
|
+
add(file, "public Convex API modules must delegate to convex/application use cases");
|
|
166
|
+
}
|
|
167
|
+
if (functions.length > 0) {
|
|
168
|
+
await requireSibling(
|
|
169
|
+
file,
|
|
170
|
+
".boundary.test.ts",
|
|
171
|
+
"public Convex API modules require boundary tests",
|
|
172
|
+
);
|
|
173
|
+
const boundaryFile = file.replace(/\.ts$/u, ".boundary.test.ts");
|
|
174
|
+
if (await exists(boundaryFile)) {
|
|
175
|
+
const boundarySource = decoder.decode(await Deno.readFile(boundaryFile));
|
|
176
|
+
for (const violation of boundaryTestQualityViolations(boundarySource))
|
|
177
|
+
add(boundaryFile, violation);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
for (const root of ["src", "convex"]) {
|
|
184
|
+
for await (const file of walk(root)) {
|
|
185
|
+
if (!productionFile(file)) continue;
|
|
186
|
+
const source = decoder.decode(await Deno.readFile(file));
|
|
187
|
+
if (/\b(?:zodToConvex|convexToZod|zodToV|vToZod)\b/u.test(source)) {
|
|
188
|
+
add(file, "schema converters are forbidden; validate then explicitly map values");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
for (const path of forbiddenBaseMcpPaths) {
|
|
194
|
+
if (await exists(path))
|
|
195
|
+
add(path, "Base MCP must be hosted only at Convex /mcp; duplicate local MCP path is forbidden");
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const boundaryDebtPath = ".agents/skills/convex-multi-presentation/boundary-test-baseline.json";
|
|
199
|
+
const boundaryDebtCeiling = 44;
|
|
200
|
+
let boundaryDebt = new Set<string>();
|
|
201
|
+
let boundaryDebtHasDuplicates = false;
|
|
202
|
+
if (await exists(boundaryDebtPath)) {
|
|
203
|
+
const parsed = JSON.parse(decoder.decode(await Deno.readFile(boundaryDebtPath))) as {
|
|
204
|
+
readonly findings?: readonly string[];
|
|
205
|
+
};
|
|
206
|
+
const debtFindings = parsed.findings ?? [];
|
|
207
|
+
boundaryDebt = new Set(debtFindings);
|
|
208
|
+
boundaryDebtHasDuplicates = boundaryDebt.size !== debtFindings.length;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const baselinePath = ".agents/skills/convex-multi-presentation/legacy-baseline.json";
|
|
212
|
+
const strict = Deno.args.includes("--strict");
|
|
213
|
+
const legacyBaselineCeiling = 87;
|
|
214
|
+
let baseline = new Set<string>();
|
|
215
|
+
let baselineHasDuplicates = false;
|
|
216
|
+
if (!strict && (await exists(baselinePath))) {
|
|
217
|
+
const parsed = JSON.parse(decoder.decode(await Deno.readFile(baselinePath))) as {
|
|
218
|
+
readonly findings?: readonly string[];
|
|
219
|
+
};
|
|
220
|
+
const baselineFindings = parsed.findings ?? [];
|
|
221
|
+
baseline = new Set(baselineFindings);
|
|
222
|
+
baselineHasDuplicates = baseline.size !== baselineFindings.length;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const uniqueFindings = [...new Set(findings)].toSorted();
|
|
226
|
+
const newFindings = strict
|
|
227
|
+
? uniqueFindings
|
|
228
|
+
: uniqueFindings.filter((finding) => !baseline.has(finding) && !boundaryDebt.has(finding));
|
|
229
|
+
const staleBaseline = strict
|
|
230
|
+
? []
|
|
231
|
+
: [...baseline].filter((finding) => !uniqueFindings.includes(finding)).toSorted();
|
|
232
|
+
const staleBoundaryDebt = strict
|
|
233
|
+
? []
|
|
234
|
+
: [...boundaryDebt].filter((finding) => !uniqueFindings.includes(finding)).toSorted();
|
|
235
|
+
const baselineGrew = !strict && baseline.size > legacyBaselineCeiling;
|
|
236
|
+
const boundaryDebtGrew = !strict && boundaryDebt.size > boundaryDebtCeiling;
|
|
237
|
+
|
|
238
|
+
if (baselineGrew)
|
|
239
|
+
console.error(
|
|
240
|
+
`legacy convex architecture baseline may not grow beyond ${legacyBaselineCeiling}; found ${baseline.size}`,
|
|
241
|
+
);
|
|
242
|
+
if (baselineHasDuplicates)
|
|
243
|
+
console.error("legacy convex architecture baseline contains duplicate findings");
|
|
244
|
+
if (boundaryDebtGrew)
|
|
245
|
+
console.error(
|
|
246
|
+
`boundary-test baseline may not grow beyond ${boundaryDebtCeiling}; found ${boundaryDebt.size}`,
|
|
247
|
+
);
|
|
248
|
+
if (boundaryDebtHasDuplicates) console.error("boundary-test baseline contains duplicate findings");
|
|
249
|
+
if (staleBaseline.length)
|
|
250
|
+
console.error(
|
|
251
|
+
"stale convex architecture baseline entries must be removed:\n" + staleBaseline.join("\n"),
|
|
252
|
+
);
|
|
253
|
+
if (staleBoundaryDebt.length)
|
|
254
|
+
console.error(
|
|
255
|
+
"stale boundary-test baseline entries must be removed:\n" + staleBoundaryDebt.join("\n"),
|
|
256
|
+
);
|
|
257
|
+
if (newFindings.length) console.error(newFindings.join("\n"));
|
|
258
|
+
if (
|
|
259
|
+
baselineGrew ||
|
|
260
|
+
baselineHasDuplicates ||
|
|
261
|
+
staleBaseline.length ||
|
|
262
|
+
staleBoundaryDebt.length ||
|
|
263
|
+
newFindings.length
|
|
264
|
+
)
|
|
265
|
+
Deno.exit(1);
|
|
266
|
+
|
|
267
|
+
if (baseline.size)
|
|
268
|
+
console.log(
|
|
269
|
+
`convex-multi-presentation ok (${baseline.size} tracked legacy findings; --strict reports all)`,
|
|
270
|
+
);
|
|
271
|
+
else console.log("convex-multi-presentation ok");
|