@eventmodelers/cli 1.0.52 → 1.0.53
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventmodelers/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.53",
|
|
4
4
|
"description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, Cratis, OpenCQRS, UmaDB, Kurrent, or modeling-only)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,15 +14,38 @@ const ALLOWED_EXCEPTIONS = [
|
|
|
14
14
|
|
|
15
15
|
const MIGRATION_PATTERN = /^migrations\/V\d+__.*\.sql$/;
|
|
16
16
|
|
|
17
|
+
// Captures the {context}/{slice} segment so files from two different slices
|
|
18
|
+
// in one commit can be told apart — SLICE_PATTERN alone only proves a path is
|
|
19
|
+
// *inside some* slice folder, not which one.
|
|
20
|
+
const SLICE_KEY_PATTERN = /^src\/slices\/([^/]+\/[^/]+)\//;
|
|
21
|
+
|
|
17
22
|
module.exports = {
|
|
18
23
|
name: 'slice-scope',
|
|
19
24
|
run(ctx) {
|
|
20
25
|
const violations = [];
|
|
26
|
+
|
|
27
|
+
const sliceKeys = new Set();
|
|
28
|
+
for (const { path: p } of ctx.changes) {
|
|
29
|
+
const m = p.match(SLICE_KEY_PATTERN);
|
|
30
|
+
if (m) sliceKeys.add(m[1]);
|
|
31
|
+
}
|
|
32
|
+
const primarySlice = [...sliceKeys].sort()[0] || null;
|
|
33
|
+
|
|
21
34
|
for (const { path: p } of ctx.changes) {
|
|
22
|
-
if (ctx.SLICE_PATTERN.test(p)) continue;
|
|
23
35
|
if (MIGRATION_PATTERN.test(p)) continue;
|
|
24
36
|
if (ALLOWED_EXCEPTIONS.some((r) => r.test(p))) continue;
|
|
25
|
-
|
|
37
|
+
|
|
38
|
+
const m = p.match(SLICE_KEY_PATTERN);
|
|
39
|
+
if (!m) {
|
|
40
|
+
violations.push({ path: p, reason: 'outside src/slices/{context}/{slice}/ and not a documented exception' });
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (m[1] !== primarySlice) {
|
|
44
|
+
violations.push({
|
|
45
|
+
path: p,
|
|
46
|
+
reason: `touches slice "${m[1]}" but this commit's scope is "${primarySlice}" — split into separate commits`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
26
49
|
}
|
|
27
50
|
return violations;
|
|
28
51
|
},
|
|
@@ -18,16 +18,39 @@ const ALLOWED_EXCEPTIONS = [
|
|
|
18
18
|
|
|
19
19
|
const MIGRATION_PATTERN = /^supabase\/migrations\/V\d+__.*\.sql$/;
|
|
20
20
|
|
|
21
|
+
// Captures the {context}/{slice} segment so files from two different slices
|
|
22
|
+
// in one commit can be told apart — SLICE_PATTERN alone only proves a path is
|
|
23
|
+
// *inside some* slice folder, not which one.
|
|
24
|
+
const SLICE_KEY_PATTERN = /^src\/slices\/([^/]+\/[^/]+)\//;
|
|
25
|
+
|
|
21
26
|
module.exports = {
|
|
22
27
|
name: 'slice-scope',
|
|
23
28
|
run(ctx) {
|
|
24
29
|
const violations = [];
|
|
30
|
+
|
|
31
|
+
const sliceKeys = new Set();
|
|
32
|
+
for (const { path: p } of ctx.changes) {
|
|
33
|
+
const m = p.match(SLICE_KEY_PATTERN);
|
|
34
|
+
if (m) sliceKeys.add(m[1]);
|
|
35
|
+
}
|
|
36
|
+
const primarySlice = [...sliceKeys].sort()[0] || null;
|
|
37
|
+
|
|
25
38
|
for (const { path: p } of ctx.changes) {
|
|
26
|
-
if (ctx.SLICE_PATTERN.test(p)) continue;
|
|
27
39
|
if (WEBHOOK_FUNCTION_PATTERN.test(p)) continue;
|
|
28
40
|
if (MIGRATION_PATTERN.test(p)) continue;
|
|
29
41
|
if (ALLOWED_EXCEPTIONS.some((r) => r.test(p))) continue;
|
|
30
|
-
|
|
42
|
+
|
|
43
|
+
const m = p.match(SLICE_KEY_PATTERN);
|
|
44
|
+
if (!m) {
|
|
45
|
+
violations.push({ path: p, reason: 'outside src/slices/{context}/{slice}/ and not a documented exception' });
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
if (m[1] !== primarySlice) {
|
|
49
|
+
violations.push({
|
|
50
|
+
path: p,
|
|
51
|
+
reason: `touches slice "${m[1]}" but this commit's scope is "${primarySlice}" — split into separate commits`,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
31
54
|
}
|
|
32
55
|
return violations;
|
|
33
56
|
},
|