ddd-ts-kit 0.83.2 → 0.83.4

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.fr.md +2 -1
  3. package/README.md +1 -0
  4. package/dist/affected/format-selection.d.ts +2 -0
  5. package/dist/affected/format-selection.d.ts.map +1 -1
  6. package/dist/affected/format-selection.js +1 -1
  7. package/dist/affected/format-selection.js.map +1 -1
  8. package/dist/affected/run-affected.d.ts +18 -0
  9. package/dist/affected/run-affected.d.ts.map +1 -0
  10. package/dist/affected/run-affected.js +35 -0
  11. package/dist/affected/run-affected.js.map +1 -0
  12. package/dist/check/authz/scoped-permission.d.ts +15 -0
  13. package/dist/check/authz/scoped-permission.d.ts.map +1 -0
  14. package/dist/check/authz/scoped-permission.js +39 -0
  15. package/dist/check/authz/scoped-permission.js.map +1 -0
  16. package/dist/check/authz/signed-in-grant-sources.d.ts +22 -0
  17. package/dist/check/authz/signed-in-grant-sources.d.ts.map +1 -0
  18. package/dist/check/authz/signed-in-grant-sources.js +63 -0
  19. package/dist/check/authz/signed-in-grant-sources.js.map +1 -0
  20. package/dist/check/authz/signed-in-grants.d.ts +5 -0
  21. package/dist/check/authz/signed-in-grants.d.ts.map +1 -0
  22. package/dist/check/authz/signed-in-grants.js +6 -0
  23. package/dist/check/authz/signed-in-grants.js.map +1 -0
  24. package/dist/check/catalogue/architecture-rules.d.ts.map +1 -1
  25. package/dist/check/catalogue/architecture-rules.js +2 -0
  26. package/dist/check/catalogue/architecture-rules.js.map +1 -1
  27. package/dist/check/catalogue/default-severities.d.ts.map +1 -1
  28. package/dist/check/catalogue/default-severities.js +1 -0
  29. package/dist/check/catalogue/default-severities.js.map +1 -1
  30. package/dist/check/explain/authz-docs.d.ts.map +1 -1
  31. package/dist/check/explain/authz-docs.js +13 -0
  32. package/dist/check/explain/authz-docs.js.map +1 -1
  33. package/dist/check/fixtures/authz-scope-narrows-fixtures.d.ts +3 -0
  34. package/dist/check/fixtures/authz-scope-narrows-fixtures.d.ts.map +1 -0
  35. package/dist/check/fixtures/authz-scope-narrows-fixtures.js +111 -0
  36. package/dist/check/fixtures/authz-scope-narrows-fixtures.js.map +1 -0
  37. package/dist/check/fixtures/fixtures.d.ts.map +1 -1
  38. package/dist/check/fixtures/fixtures.js +2 -0
  39. package/dist/check/fixtures/fixtures.js.map +1 -1
  40. package/dist/check/rules/authz-granted.d.ts.map +1 -1
  41. package/dist/check/rules/authz-granted.js +4 -4
  42. package/dist/check/rules/authz-granted.js.map +1 -1
  43. package/dist/check/rules/authz-scope-narrows.d.ts +12 -0
  44. package/dist/check/rules/authz-scope-narrows.d.ts.map +1 -0
  45. package/dist/check/rules/authz-scope-narrows.js +73 -0
  46. package/dist/check/rules/authz-scope-narrows.js.map +1 -0
  47. package/dist/commands/affected.d.ts +3 -1
  48. package/dist/commands/affected.d.ts.map +1 -1
  49. package/dist/commands/affected.js +12 -2
  50. package/dist/commands/affected.js.map +1 -1
  51. package/dist/generate/errors/refusal-code.d.ts +1 -1
  52. package/dist/generate/errors/refusal-code.d.ts.map +1 -1
  53. package/dist/generate/errors/refusal-code.js +8 -1
  54. package/dist/generate/errors/refusal-code.js.map +1 -1
  55. package/dist/help/notes.d.ts +1 -1
  56. package/dist/help/notes.d.ts.map +1 -1
  57. package/dist/help/notes.js +4 -1
  58. package/dist/help/notes.js.map +1 -1
  59. package/dist/help/usage.d.ts +1 -1
  60. package/dist/help/usage.d.ts.map +1 -1
  61. package/dist/help/usage.js +1 -0
  62. package/dist/help/usage.js.map +1 -1
  63. package/dist/init/manifest/versions.js +24 -24
  64. package/dist/slice/format-slice-verification.js +6 -2
  65. package/dist/slice/format-slice-verification.js.map +1 -1
  66. package/dist/version.d.ts +1 -1
  67. package/dist/version.js +1 -1
  68. package/package.json +2 -2
  69. package/templates/init/jest.config.js.tpl +2 -0
  70. package/templates/pipeline/lefthook.yml +3 -1
  71. package/templates/pipeline/package-scripts.json +1 -1
  72. package/templates/pipeline/vitest.config.ts.tpl +3 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authz-scope-narrows-fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/authz-scope-narrows-fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;AAC7D,MAAM,WAAW,GAAG,GAAG,OAAO,mDAAmD,CAAC;AAClF,MAAM,SAAS,GAAG,uCAAuC,CAAC;AAC1D,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAE5D,MAAM,QAAQ,GAAG,MAAM,CACrB,uDAAuD,EACvD,EAAE,EACF,kEAAkE,EAClE,wDAAwD,EACxD,sDAAsD,EACtD,KAAK,CACN,CAAC;AAEF,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC,MAAM,CAAC,MAAM,4BAA4B,GAAuB;IAC9D;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,qDAAqD;QAC3D,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,SAAS,CAAC,uCAAuC,CAAC;KAC1D;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,0EAA0E;QAChF,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;KAC5G;IACD;QACE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,2CAA2C;QACjD,MAAM,EAAE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,UAAU,GAAG,sCAAsC,EAAE,GAAc,EAAE;IACrG,OAAO,MAAM,CACX,iDAAiD,EACjD,2GAA2G,EAC3G,6HAA6H,EAC7H,EAAE,EACF,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAC7C,sCAAsC,EACtC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,EAClD,mDAAmD,EACnD,EAAE,EACF,iEAAiE,EACjE,6CAA6C,UAAU,eAAe,EACtE,KAAK,EACL,GAAG,CACJ,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA6CtC,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA8CtC,CAAC"}
@@ -4,6 +4,7 @@ import { AUTHZ_DECLARED_FIXTURES } from './authz-declared-fixtures.js';
4
4
  import { AUTHZ_FIXTURES } from './authz-fixtures.js';
5
5
  import { AUTHZ_GRANTED_FIXTURES } from './authz-granted-fixtures.js';
6
6
  import { AUTHZ_POLICY_FIXTURES } from './authz-policy-fixtures.js';
7
+ import { AUTHZ_SCOPE_NARROWS_FIXTURES } from './authz-scope-narrows-fixtures.js';
7
8
  import { CLEAN_FIXTURES } from './clean-fixtures.js';
8
9
  import { COMPOSITION_FIXTURES } from './composition-fixtures.js';
9
10
  import { CONFIG_FIXTURES } from './config-fixtures.js';
@@ -53,6 +54,7 @@ export const FIXTURES = [
53
54
  ...AUTHZ_FIXTURES,
54
55
  ...AUTHZ_POLICY_FIXTURES,
55
56
  ...AUTHZ_GRANTED_FIXTURES,
57
+ ...AUTHZ_SCOPE_NARROWS_FIXTURES,
56
58
  ...CLEAN_FIXTURES,
57
59
  ...COMPOSITION_FIXTURES,
58
60
  ...CONFIG_FIXTURES,
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/check/fixtures/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAA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1C,GAAG,uBAAuB;IAC1B,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,4BAA4B;IAC/B,GAAG,cAAc;IACjB,GAAG,oBAAoB;IACvB,GAAG,eAAe;IAClB,GAAG,8BAA8B;IACjC,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,uBAAuB;IAC1B,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;IACpB,GAAG,mBAAmB;IACtB,GAAG,uBAAuB;IAC1B,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,kBAAkB;IACrB,GAAG,eAAe;IAClB,GAAG,sBAAsB;IACzB,GAAG,eAAe;IAClB,GAAG,oBAAoB;IACvB,GAAG,cAAc;IACjB,GAAG,eAAe;IAClB,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,aAAa;IAChB,GAAG,0BAA0B;IAC7B,GAAG,uBAAuB;CAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"authz-granted.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-granted.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,IAoB1B,CAAC"}
1
+ {"version":3,"file":"authz-granted.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-granted.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAK7C;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,IAoB1B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { isGranted } from '../authz/is-granted.js';
2
2
  import { permissionSets } from '../authz/permission-sets.js';
3
+ import { signedInGrants } from '../authz/signed-in-grants.js';
3
4
  import { reporter } from '../support/reporter.js';
4
5
  import { toViolations } from '../support/to-violations.js';
5
6
  /**
@@ -28,10 +29,9 @@ export const authzGranted = {
28
29
  };
29
30
  /** The roles of the platform, and what every signed-in person holds when a context preset wrote it. */
30
31
  function grantFiles(project) {
31
- const auth = `${project.config.platformDir}/auth`;
32
- const at = (name) => project.files.find((file) => file.path === `${auth}/${name}`);
33
- const signedIn = at('signed-in-grants.ts');
34
- return { roles: at('roles.ts'), signedIn: signedIn === undefined ? [] : [signedIn] };
32
+ const roles = project.files.find((file) => file.path === `${project.config.platformDir}/auth/roles.ts`);
33
+ const signedIn = signedInGrants(project);
34
+ return { roles, signedIn: signedIn === undefined ? [] : [signedIn] };
35
35
  }
36
36
  function ungranted(file, grants) {
37
37
  return permissionSets(file).flatMap((declared) => declared.keys
@@ -1 +1 @@
1
- {"version":3,"file":"authz-granted.js","sourceRoot":"","sources":["../../../src/check/rules/authz-granted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAK7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,eAAe;IACnB,WAAW,EACT,gLAAgL;IAClL,KAAK,EAAE,SAAS;IAChB,GAAG,CAAC,OAAO;QACT,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC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,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;SACtF,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI;QACJ,OAAO,EAAE,GAAG,QAAQ,CAAC,OAAO,IAAI,KAAK,uEAAuE;QAC5G,GAAG,EAAE,SAAS,QAAQ,CAAC,GAAG,KAAK,KAAK,mCAAmC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,2BAA2B,mCAAmC,QAAQ,CAAC,GAAG,KAAK,KAAK,oIAAoI;KACnT,CAAC,CAAC,CACN,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Rule } from '../model/rule.js';
2
+ /**
3
+ * A search narrows by the scope of a permission the model decides. Every signed-in person holds
4
+ * the grants of `SignedInGrantsAuthorizer` whatever the model, and it lists them `all` before it
5
+ * asks the model: a handler that asks `Access.scope` about one of them reads every element for
6
+ * every person who signed in. Judged: the second argument of a `.scope(` call in a context, the
7
+ * entry of a permission set written in place or held in a constant or a field of the file, against
8
+ * the grants file of the platform and the grants given to every `new SignedInGrantsAuthorizer`.
9
+ * What it cannot read is said, never taken as safe: grants built by a call, a permission handed in.
10
+ */
11
+ export declare const authzScopeNarrows: Rule;
12
+ //# sourceMappingURL=authz-scope-narrows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authz-scope-narrows.d.ts","sourceRoot":"","sources":["../../../src/check/rules/authz-scope-narrows.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAY7C;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,IA4B/B,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { isGranted } from '../authz/is-granted.js';
2
+ import { permissionSets } from '../authz/permission-sets.js';
3
+ import { scopedPermission } from '../authz/scoped-permission.js';
4
+ import { signedInGrantSources } from '../authz/signed-in-grant-sources.js';
5
+ import { reporter } from '../support/reporter.js';
6
+ import { toViolations } from '../support/to-violations.js';
7
+ import { callArguments } from '../text/call-arguments.js';
8
+ /** `<receiver>.scope(`, the opening parenthesis last. */
9
+ const SCOPE_CALL = /([\w$.]*)\.scope\s*\(/g;
10
+ /** The port `Access` as a handler holds it: `this.access`, `access`. */
11
+ const ACCESS = /(?:^|\.)access$/i;
12
+ /**
13
+ * A search narrows by the scope of a permission the model decides. Every signed-in person holds
14
+ * the grants of `SignedInGrantsAuthorizer` whatever the model, and it lists them `all` before it
15
+ * asks the model: a handler that asks `Access.scope` about one of them reads every element for
16
+ * every person who signed in. Judged: the second argument of a `.scope(` call in a context, the
17
+ * entry of a permission set written in place or held in a constant or a field of the file, against
18
+ * the grants file of the platform and the grants given to every `new SignedInGrantsAuthorizer`.
19
+ * What it cannot read is said, never taken as safe: grants built by a call, a permission handed in.
20
+ */
21
+ export const authzScopeNarrows = {
22
+ id: 'authz/scope-narrows',
23
+ description: 'A search narrows by the scope of a permission the model decides, never by one every signed-in person holds: that scope is always all.',
24
+ scope: 'project',
25
+ run(project) {
26
+ const sources = signedInGrantSources(project);
27
+ if (sources.lists.length === 0 && sources.unread.length === 0) {
28
+ return [];
29
+ }
30
+ const sets = project.files.filter((file) => file.location.area === 'context').flatMap(permissionSets);
31
+ const report = reporter(project, this.id);
32
+ return [
33
+ ...sources.unread.map(({ file, line }) => report({ file: file.path, line }, 'The grants of this SignedInGrantsAuthorizer are neither an array literal nor a constant declared as one: the checker cannot tell which searches they widen to all.', `Write them in ${project.config.platformDir}/auth/signed-in-grants.ts, \`export const signedInGrants: readonly Grant[] = [...]\`, and pass \`grants: signedInGrants\`.`)),
34
+ ...project.files
35
+ .filter((file) => !file.isTest && file.location.area === 'context')
36
+ .flatMap((file) => toViolations(report, file.path, widenedScopes(file, { sources, sets }))),
37
+ ];
38
+ },
39
+ };
40
+ function widenedScopes(file, { sources, sets }) {
41
+ const { code } = file.scan;
42
+ return [...code.matchAll(SCOPE_CALL)].flatMap((call) => {
43
+ const argument = callArguments(code, call.index + call[0].length - 1)[1];
44
+ const permission = argument === undefined ? undefined : scopedPermission(file, argument, sets);
45
+ const line = file.scan.lineAt(call.index);
46
+ if (permission === undefined) {
47
+ return argument === undefined || !ACCESS.test(call[1] ?? '') ? [] : [unreadPermission(line, argument.code)];
48
+ }
49
+ const { set, key } = permission;
50
+ if (!sources.lists.some((list) => isGranted(list, set, key) || grantsEverything(list))) {
51
+ return [];
52
+ }
53
+ return [
54
+ {
55
+ line,
56
+ message: `${set.context}:${key} is held by every signed-in person: its scope is always all, so every person who signed in reads every element.`,
57
+ fix: `Leave ${set.set}['${key}'] out of what every signed-in person holds (the wildcard '${set.context}:*' holds it too: name the other permissions instead) and let the model decide it: under relationships, the requirement names an enclosing resource (the context, or the tenant) and Access.scope answers the ids of the elements. When every signed-in person may indeed read every element, the scope says nothing: the reader is handed everything.`,
58
+ },
59
+ ];
60
+ });
61
+ }
62
+ function unreadPermission(line, argument) {
63
+ return {
64
+ line,
65
+ message: `The permission this search narrows by, \`${argument}\`, is not one the checker can read: it cannot tell whether every signed-in person holds it, in which case the scope would be all.`,
66
+ fix: "Name it in the call as the entry of its set, `billingPermissions['invoice.read']`, or in a constant or a field of this file initialised with one.",
67
+ };
68
+ }
69
+ /** The bare `*`: every permission of every context. */
70
+ function grantsEverything(list) {
71
+ return list.strings.some(({ value }) => value === '*');
72
+ }
73
+ //# sourceMappingURL=authz-scope-narrows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authz-scope-narrows.js","sourceRoot":"","sources":["../../../src/check/rules/authz-scope-narrows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAsB,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,M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AC;QAC9G,CAAC;QAED,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACvF,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO;YACL;gBACE,IAAI;gBACJ,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,iHAAiH;gBAC/I,GAAG,EAAE,SAAS,GAAG,CAAC,GAAG,KAAK,GAAG,8DAA8D,GAAG,CAAC,OAAO,wVAAwV;aAC/b;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY,EAAE,QAAgB;IACtD,OAAO;QACL,IAAI;QACJ,OAAO,EAAE,4CAA4C,QAAQ,oIAAoI;QACjM,GAAG,EAAE,mJAAmJ;KACzJ,CAAC;AACJ,CAAC;AAED,uDAAuD;AACvD,SAAS,gBAAgB,CAAC,IAAU;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,GAAG,CAAC,CAAC;AACzD,CAAC"}
@@ -2,7 +2,9 @@ import type { Command } from './command.js';
2
2
  /**
3
3
  * `affected`: what a pull request has to run, read from the context map and the paths that
4
4
  * differ between two commits. Without `--base` everything is selected, which is what the
5
- * default branch runs; so is it whenever git cannot give the difference.
5
+ * default branch runs; so is it whenever git cannot give the difference. `--run <script>` runs
6
+ * that script of the project on the selection, as the pipeline does: the pre-push hook of a
7
+ * project tests the contexts its branch reaches, not every context.
6
8
  */
7
9
  export declare const affectedCommand: Command;
8
10
  //# sourceMappingURL=affected.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"affected.d.ts","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,OAkB7B,CAAC"}
1
+ {"version":3,"file":"affected.d.ts","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,OA0B7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { changedPaths } from '../affected/changed-paths.js';
2
2
  import { everything } from '../affected/everything.js';
3
3
  import { formatSelection } from '../affected/format-selection.js';
4
+ import { runAffected } from '../affected/run-affected.js';
4
5
  import { selectAffected } from '../affected/select-affected.js';
5
6
  import { CliError } from '../cli-error.js';
6
7
  import { readConfig } from '../config/index.js';
@@ -9,20 +10,29 @@ const FORMATS = ['text', 'json', 'github', 'env'];
9
10
  /**
10
11
  * `affected`: what a pull request has to run, read from the context map and the paths that
11
12
  * differ between two commits. Without `--base` everything is selected, which is what the
12
- * default branch runs; so is it whenever git cannot give the difference.
13
+ * default branch runs; so is it whenever git cannot give the difference. `--run <script>` runs
14
+ * that script of the project on the selection, as the pipeline does: the pre-push hook of a
15
+ * project tests the contexts its branch reaches, not every context.
13
16
  */
14
17
  export const affectedCommand = (argv, io) => {
15
18
  const args = Arguments.parse(argv, {
16
19
  base: { type: 'string' },
17
20
  head: { type: 'string' },
18
21
  format: { type: 'string' },
22
+ run: { type: 'string' },
19
23
  });
20
24
  const format = args.json ? 'json' : (args.text('format') ?? 'text');
21
25
  if (!FORMATS.includes(format)) {
22
26
  throw new CliError(`Unknown value "${format}" for --format.`, `Use one of: ${FORMATS.join(', ')}.`);
23
27
  }
24
28
  const root = args.projectRoot;
25
- io.out(formatSelection(selectionFor(root, readConfig(root).config, args), format));
29
+ const { config } = readConfig(root);
30
+ const selection = selectionFor(root, config, args);
31
+ const script = args.text('run');
32
+ if (script !== undefined) {
33
+ return runAffected({ root, manager: config.stack.packageManager, selection, script }, io);
34
+ }
35
+ io.out(formatSelection(selection, format));
26
36
  return 0;
27
37
  };
28
38
  function selectionFor(root, config, args) {
@@ -1 +1 @@
1
- {"version":3,"file":"affected.js","sourceRoot":"","sources":["../../src/commands/affected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAe,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAY,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE;IACnD,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE;QACjC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC;IAEpE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,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CAAC,CAAC;IAEhC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAE3C,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,SAAS,YAAY,CAAC,IAAY,EAAE,MAAc,EAAE,IAAe;IACjE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/B,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,CAAC;IAEtE,OAAO,OAAO,KAAK,SAAS;QAC1B,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,sCAAsC,IAAI,EAAE,CAAC;QAClE,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Name } from '../../naming/index.js';
1
+ import { type Name } from '../../naming/index.js';
2
2
  interface Naming {
3
3
  readonly concept: Name;
4
4
  readonly refusal: Name;
@@ -1 +1 @@
1
- {"version":3,"file":"refusal-code.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/refusal-code.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAElD,UAAU,MAAM;IACd,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAgB3F"}
1
+ {"version":3,"file":"refusal-code.d.ts","sourceRoot":"","sources":["../../../src/generate/errors/refusal-code.ts"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE1D,UAAU,MAAM;IACd,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAgB3F"}
@@ -1,5 +1,6 @@
1
1
  import { KIT_ERROR_CODES } from '../../check/errors/kit-error-codes.js';
2
2
  import { CliError } from '../../cli-error.js';
3
+ import { toName } from '../../naming/index.js';
3
4
  /**
4
5
  * The code a factory sets: its name in constant case, with the name of the concept before it
5
6
  * when the name alone is one word or a code of the kit (`AppointmentError.notFound` sets
@@ -12,8 +13,14 @@ export function refusalCode({ concept, refusal }, asked) {
12
13
  return alone.includes('_') && !KIT_ERROR_CODES.includes(alone) ? alone : `${concept.constant}_${alone}`;
13
14
  }
14
15
  if (!accepted.includes(asked)) {
15
- throw new CliError(`The code "${asked}" does not say what ${concept.pascal}Error.${refusal.camel} says.`, `Use one of: ${accepted.join(', ')}; or name the refusal after the code (rule errors/factory-name).`);
16
+ throw new CliError(`The code "${asked}" does not say what ${concept.pascal}Error.${refusal.camel} says.`, `Use one of: ${accepted.join(', ')}; or name the refusal after the code${namedAfter(concept, asked)} (rule errors/factory-name).`);
16
17
  }
17
18
  return asked;
18
19
  }
20
+ /** The refusal a code says, the concept around it left out: `NIGHTS_NOT_APPLICABLE` of `Stay` is `nightsNotApplicable`. */
21
+ function namedAfter(concept, code) {
22
+ const said = code.replace(new RegExp(`^${concept.constant}_|_${concept.constant}$`), '');
23
+ const refusal = toName(said).camel;
24
+ return refusal === '' ? '' : `: ${concept.pascal} ${refusal}`;
25
+ }
19
26
  //# sourceMappingURL=refusal-code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"refusal-code.js","sourceRoot":"","sources":["../../../src/generate/errors/refusal-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAU,EAAE,KAAyB;IACjF,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,EAAE,EAAE,GAAG,KAAK,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,EAAE,CAAC;IAC1G,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,QAAQ,CAChB,aAAa,KAAK,uBAAuB,OAAO,CAAC,MAAM,SAAS,OAAO,CAAC,KAAK,QAAQ,EACrF,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,kEAAkE,CACrG,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version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QAAQ,MAAM,OAAO,CAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;IAEnC,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,EAAE,CAAC;AAChE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  /** What a line of the usage cannot say about a command or a flag. */
2
- export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name or a lockfile changed since the install\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), the merge order and what runs before each merge (merge-trunk\n --to-land); a cycle, a dependency on an unknown id or a row without owner is reported\n alone, and exits 1\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. Reads only: exits 0 when it can close, 1\n listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Report; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an\n end-to-end spec, a working migration, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), generated regions of CONTEXT.md and the context map (trunk side), conflicts\n inside generated registries (lines of both sides), slices.md row by row (the furthest\n status), the stored-events lock by key, the lockfile (trunk side, installed again when\n the branch changed package.json); the rest is left in a merge in progress git\n understands, with what each side did (exit 1). Then, or on --continue: the drizzle\n migrations of both sides replayed, on --to-land the working migrations renamed (knex,\n Prisma, TypeORM; stop when both sides change one table), decision records renumbered,\n regenerate, verify-merge on the uncommitted result (an error stops; --accept-lost records\n a Lost-Accepted: trailer), and the commit of the merge's paths only, with the trailers\n Merge-Base:, Trunk: and Landed:; any other changed path blocks it. --dry-run previews,\n --abort undoes; refused (exit 2) on a dirty tree, another operation in progress, no\n committer known to git, an unknown trunk, or a git older than 2.40 with a base git\n would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do";
2
+ export declare const NOTES = " affected what a pull request has to run: the contexts a change set reaches through the context\n map (a changed context and the contexts downstream of it), as filters for the test\n runner and the linter; everything when a shared path changed or without --base;\n --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,\n --passWithNoTests on a partial run) and nothing when nothing that runs changed:\n the pre-push hook tests the contexts its branch reaches\n build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files\n into relative paths, so that plain node runs the output (tsconfig.build.json by default)\n drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal\n fails and names the fix when drizzle-kit would ask whether a column or table is renamed,\n where drizzle-kit alone writes nothing and exits 0; then formats the snapshot and the\n journal it wrote with the Biome or Prettier of the format script, and warns when the\n SQL changes a primary key in an order that fails on PostgreSQL (exit code unchanged);\n --replay, after merging the trunk into a branch when both added migrations: when the\n history forks from --base <ref> (origin/main by default), deletes the migrations of the\n branch the base does not have, with their snapshots and journal entries, then generates\n each again on top, in order, under its name (working- dropped outside a worker's\n worktree, a custom one keeping its SQL); when it does not fork, only renames them;\n refused while the journal holds conflict markers, when two of them change the schema,\n or when drizzle-kit now writes a generated one otherwise (edited by hand), the folder\n then put back as it was\n error-factories moves the refusals of a project to one class per refusal (--to named, the default), from\n one class per error or from the factories of one error class per concept: --plan writes\n error-factories.plan.json, where each refusal is given a class (the PascalCase of its\n code, which it keeps) and a factory (for<Concept>), both editable; --apply follows it\n (codes.ts per context, one class file per refusal, specs, every usage, the concept\n classes left empty, \"stack.refusals\" in the config) and lists what it cannot rewrite\n (a bare <Concept>Error.is(error), CodeOf<typeof <Concept>Error>); --to factories moves\n one class per error to static factories on one error class per concept instead\n value-objects moves the value objects of a project from a Result to factories that return the value or\n throw: every create returning Result<T, E> returns T, err(..) is thrown, unwrap(..) of\n them goes, specs assert expectRefusal(() => ..), \"stack.valueObjects\" becomes throwing\n controllers moves the function routes of a project, or of one context, to controller classes: each\n <name>.route.ts becomes <resource>/<name>/<name>.controller.ts behind the route group of\n its resource, its schema files and its spec follow; a context is turned whole or not at all\n doctor what an upgrade left to do: the scripts, the packages of the kit (at the ranges of this\n version) and the agent permissions this version writes that the project lacks or writes\n otherwise, and the git hooks (the lefthook: line of lefthook.yml, the pre-commit hook of\n lefthook in this clone); init adds what is missing, hooks:install the hook; then what\n this checkout lacks to run the project, read without network: the running Node against\n engines.node and .nvmrc, node_modules installed since the lockfile last changed, each\n package of the kit installed at the version of this CLI, the submodules initialised;\n each with its fix; --strict exits 1 while something is missing or the checkout cannot\n run the project, never for a hook this clone has not installed, a Node .nvmrc does not\n name or a lockfile changed since the install\n lint the ESLint of the project (lint and ci:lint run it): fails on an error, and on a warning\n as on an error, but on one of a rule of the kit in transition, a new rule that becomes an\n error in the version it names, whose warnings are listed apart; --format and --fix as ESLint\n describe one context as facts: use cases, routes, events, ports, policies, gateways, dependencies\n status the next step of docs/architecture/plan.md, the slices of docs/architecture/slices.md by\n status and by owner, each row not done ready on the trunk (its dependencies done), ready\n on a branch (the others briefed to a worker with commits ahead of its base) or waiting\n (with the ids it waits for), a row that landed with a worker's branch but is not marked done,\n and the TODO(domain), TODO(platform), it.todo and TODO(review) left in each context, and\n each story or milestone whose rows are all done while markers of its own keep it open (see\n story-check, whose git blame it runs on those markers only); --workers shows instead each\n worktree holding .ddd-ts-kit/worker.json (branch, context, rows, base, commits ahead and\n files changed counted from where its branch landed on the base when it was squash-merged\n there (else from the merge base), commits behind, the commit it landed as, what merge-trunk\n would leave conflicted now, dependencies not installed, its report), a state line (rows\n committed, the row under way, files uncommitted, markers, last verify-slice, and the\n worker-scope --resume command of a stopped one), then the contexts and the files more than\n one worker holds\n sdk the typed client of each document of the contract, a workspace package under\n clients/<document> without runtime dependency: typed errors keyed by the error codes,\n credentials per security scheme; records \"sdk\" in the config the first time, wires the\n scripts (docs:generate regenerates it, docs:check compares it, ci:build builds it);\n --check writes nothing and exits 1 while a client differs from its contract\n todo those markers as file:line, in the project or in one context\n plan-waves the rows of slices.md not done, of the project or of one context, in waves (wave 1: every\n dependency done; wave n: the others in earlier waves), each wave cut into batches of one\n owner, one or two rows on one aggregate, with the worker-scope command that briefs each,\n the batches of a wave likely to touch the same files (same aggregate in Start with, or\n unknown when it names none), the merge order and what runs before each merge (merge-trunk\n --to-land); a cycle, a dependency on an unknown id or a row without owner is reported\n alone, and exits 1\n story-check whether a story or a milestone can close, <code> being the start of the ids of its rows\n (M1 for M1.01, M1.02: the id without its last .<number>): every row of it done in\n slices.md (the others listed with their status), and no marker of its own left\n (TODO(domain), TODO(platform), it.todo, TODO(review)). A marker is attributed to\n rows: those its text names (#M1.03 or M1.03, word-bounded), else those of the commit\n that wrote its line (git blame, once per file; its Slice: trailer, else the row ids\n its message names), else, not committed, those of .ddd-ts-kit/worker.json in a\n worker's worktree. It is the story's own when it belongs to one of its rows,\n wherever it is; a marker of a context of its rows that belongs to no row is its own\n when no other open story has a row in that context, and is listed without blocking\n otherwise (settle it or name its row in it); a marker of other stories' rows does not\n block. --strict: every marker of its contexts blocks. Each blocker comes with why it\n is its own, its file:line and its fix: handle it, or dismiss it by a decision record\n (generate adr), then delete the marker. Reads only: exits 0 when it can close, 1\n listing what keeps it open, 2 on a code no row carries or without slices.md\n acceptance the acceptance scenarios of each story (test/acceptance/<story>.acceptance.spec.ts) against\n its rows in slices.md and the criteria of docs/architecture/stories/<story>.md: the rows and\n criteria each scenario names (#US5.02 AC1 in its title), the scenarios left to write\n (it.todo), those wrapped in pending(...) of @ddd-ts-kit/testing/e2e until their code is\n built, and what is inconsistent (no row, an unknown row or criterion, a scenario skipped,\n a pending one whose rows are done, a locked one changed while its criteria were not);\n --gate written: every slice row and criterion has a written scenario, none is left to\n write, the acceptance is locked (before the code of the story); --gate passing: none is\n pending either (before the story closes); exits 1 while a gate is not met, or, without\n one, on an inconsistency. Never runs a test. --lock writes\n test/acceptance/<story>.acceptance.lock.json, the fingerprint of each criterion and of\n each scenario (pending(...), layout and comments aside), refused while a scenario is\n left to write, or while a criterion changed, or a locked scenario changed while its\n criteria did not, without a verdict \"amend\" of the acceptance-judge agent on that very\n version (test/acceptance/verdicts/*.md, lines Story:, Subject:, Fingerprint:,\n Verdict:, Reason:); a refusal wins; the verdicts become amendments of the lock,\n listed for the owner to validate\n worker-scope a git worktree on the branch build/<context> (by default .worktrees/<context>, see worktree),\n cut from --base <ref> (by default the current branch, refused from a worker's worktree), its\n .ddd-ts-kit/worker.json, and the briefing of the worker of that context; --rows <id,...>\n briefs those rows of slices.md only, with their rules, the documents of their design and\n the names that design cites the base does not have (see cited), and by default the first\n batch plan-waves cuts for the context (one or two rows on one aggregate), a note naming the\n next; a worktree it creates gets the clean install of the package manager (npm ci), its\n time in the notes, unless --no-install; an existing worktree or branch that does not\n contain the base is refused, with the merge-trunk that brings it in\n --here worker-scope in the worktree of a story (.ddd-ts-kit/story.json): writes the scope of the\n next agent in place, its base the base of the story, and prints its briefing; no\n worktree, branch or install of its own; the agents of a story run one after the other\n story-scope the worktree of one story, .worktrees/<story> on story/<story> cut from --base (by default\n origin/main from the trunk, else the current branch, refused from the worktree of a\n story), its .ddd-ts-kit/story.json and\n its clean install; an existing one is kept and the story resumes there; refused when the\n story is open in another worktree; names the other open stories and the contexts their\n rows change\n worktree the worktree of any other piece of work, .worktrees/<name> on work/<name> cut from --base\n (by default origin/main from the trunk, else the current branch), and its clean install\n unless --no-install; an existing one is kept; .worktrees/ lies in the main checkout,\n whichever worktree it runs from, ignored by git and by the tools of the project; while\n the .gitignore of a project started before does not hold it (init adds it), a worktree\n opens next to the project, ../<project>-<name>; in a project whose config says\n \"worktrees\": \"required\" (what init writes), the guard of the plugin refuses the code of\n a context in the main checkout of the trunk, and in a worktree of .worktrees/ without\n its own node_modules\n story where a story stands, phase by phase: its specification and criteria\n (docs/architecture/stories/<story>.md), its rows in slices.md, a design review section\n per row not done (docs/architecture/reviews/<story>.md, ## #<id>), its acceptance written\n and locked, its rows done, its acceptance passing, its trunk merged in, its ## Report; and\n the next step; in the worktree of a story, the story is its own; --gate build exits 1\n until the first four are met (the code may start: the guard of the plugin opens the\n contexts), --gate close until all are\n stories the stories open in the worktrees of the repository and where two of them meet: the\n contexts the rows of both name, the files both worktrees change (committed or not), what\n merging the branch of one into the other leaves to a person and what merge-trunk settles\n (git merge-tree, nothing written); how far each is behind its base; from the worktree of a\n story, the stories it meets; the guard of the plugin says it at session start and on a\n write to a file another story changes\n --resume worker-scope reads where the stopped worker of the context stands (its rows by their\n Slice: trailer, the files of the row under way, the markers, its last verify-slice, its\n report, its agent as the guard recorded it) and prints the message that resumes its agent\n (SendMessage) or the briefing of a new one; creates and rewrites nothing; --fresh asks for\n a new agent whatever the last one did; several worktrees of the context need --worktree\n verify-slice closes a slice before its commit, in one run: the regenerate script, check on the files\n changed since --since (new ones included), the test script for the context; then the\n changed files past 300 of the 350 lines, the paths of the slice to stage (its context, an\n end-to-end spec, a working migration, the derived files git tracks) and every other\n changed path, left out and never to stage with it; the merges since --since, as\n verify-merge checks them, reported without failing the slice in this version (a later\n minor version fails it); exits 1 while a step fails; then the names the slice removes\n that the design of a row not done still cites (never a failure); in the worktree of a\n worker, the commit command with the trailer Slice: <row>, and\n .ddd-ts-kit/verification.json for the conductor\n cited the names the design of rows not done cites as code (paths, classes, Class.member) that\n the code does not have: those the history of --base removed (with the commit and the\n successor), the places the canonical tree refuses, and a name never there whose close\n name of the same part arrived after the line was written; planned names stay silent.\n The design of a row: its cells and rule lines in slices.md, a section of a document of\n docs/architecture whose heading names it, a document that names it or that its rule\n line links to. Default: every row not done, of the context when given, at the current\n branch. --removed-since <ref>: the names a change removes, from the merge base to the\n working tree, that such a design cites. Reads only, exits 0\n verify-merge what the merges of a branch lost, read from git only: every merge commit since --since\n (by default the base of .ddd-ts-kit/worker.json, then origin/HEAD, then origin/main) and\n the merge in progress (its result: the index and the working tree), or one <commit>; a\n squash commit takes --theirs <head of the branch it took in>. Errors: a line one side\n added or both kept missing from the result (whitespace, a line laid out again, a move\n to another file and imports merged into one statement aside), a file neither side\n deleted gone from the result, a row of slices.md done on one side and no longer done or\n gone, a test title or a spec file of one side gone, a migration of one side whose\n description (name without number and working-) the result lacks, a conflict marker;\n warnings: a line one side removed brought back, a line one side wrote where the other\n changed the same lines or deleted the file (the merge chose), a line the merge replaced\n by lines of its own. Derived files, files a tool says it wrote, migrations, lockfiles\n and slices.md are left out of the lines. The base is --base, else the Merge-Base:\n trailer of the merge, else git merge-base; entries of a Lost-Accepted: <file:line>,...\n trailer are listed and never fail, nor what a later commit restored; silent and exit 0\n without a merge, exit 1 on an error; --warn prints the same and exits 0, as the\n pre-push hook of init runs it in this version (a later minor version blocks the push)\n merge-trunk brings the trunk (--trunk, by default origin/HEAD then origin/main, never fetched) into the\n branch as one merge commit computed from the branch's own diff: from the newest commit of\n the branch the trunk holds (--since; else the commit whose patch, derived files,\n migrations, slices.md, plan.md and lockfiles left out, is one commit of the trunk, on this\n branch or a branch it shares commits with; else the base recorded for the worker when its\n lines are on the trunk; else git merge-base). Settles derived files and drizzle-kit meta\n (trunk side), generated regions of CONTEXT.md and the context map (trunk side), conflicts\n inside generated registries (lines of both sides), slices.md row by row (the furthest\n status), the stored-events lock by key, the lockfile (trunk side, installed again when\n the branch changed package.json); the rest is left in a merge in progress git\n understands, with what each side did (exit 1). Then, or on --continue: the drizzle\n migrations of both sides replayed, on --to-land the working migrations renamed (knex,\n Prisma, TypeORM; stop when both sides change one table), decision records renumbered,\n regenerate, verify-merge on the uncommitted result (an error stops; --accept-lost records\n a Lost-Accepted: trailer), and the commit of the merge's paths only, with the trailers\n Merge-Base:, Trunk: and Landed:; any other changed path blocks it. --dry-run previews,\n --abort undoes; refused (exit 2) on a dirty tree, another operation in progress, no\n committer known to git, an unknown trunk, or a git older than 2.40 with a base git\n would not compute\n --commit-size the files and lines about to be committed against \"commit\" in the config (20 files and\n 600 lines by default, generated files not counted); --staged reads the index only;\n advisory, --strict exits 1 when over\n --explain check follows the violations with the reason of each rule they report, once per rule, as\n explain gives it without its examples (\"explanations\" in JSON); with github and gitlab, each\n annotation carries the reason of its rule, a pull request showing an annotation on its own\n --stored-events docs records the shape of each version of the stored events in stored-events.lock.json,\n never rewriting a recorded one but one recorded by 0.82.0 or earlier, recorded again as\n the kit reads it now: run it once the shape of a version is the one to store; docs --check\n fails while a declared version is not recorded, or recorded by 0.82.0 or earlier\n --sdk init records \"sdk\" in the config and generates the clients with the project\n --local-only generate refuses, and writes nothing, when the kind would write outside its context;\n \"generate --help --json\" says which kinds do";
3
3
  //# sourceMappingURL=notes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,kzrBAyN8C,CAAC"}
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,KAAK,wksBA4N8C,CAAC"}
@@ -1,7 +1,10 @@
1
1
  /** What a line of the usage cannot say about a command or a flag. */
2
2
  export const NOTES = ` affected what a pull request has to run: the contexts a change set reaches through the context
3
3
  map (a changed context and the contexts downstream of it), as filters for the test
4
- runner and the linter; everything when a shared path changed or without --base
4
+ runner and the linter; everything when a shared path changed or without --base;
5
+ --run <script> runs that script of the project on them (DDD_TS_KIT_AFFECTED set,
6
+ --passWithNoTests on a partial run) and nothing when nothing that runs changed:
7
+ the pre-push hook tests the contexts its branch reaches
5
8
  build-aliases after the compiler: rewrites the import aliases left in the emitted .js and .d.ts files
6
9
  into relative paths, so that plain node runs the output (tsconfig.build.json by default)
7
10
  drizzle-generate the db:generate of a Drizzle project: drizzle-kit generate --name, which without a terminal
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEAyN2C,CAAC"}
1
+ {"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/help/notes.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gEA4N2C,CAAC"}
@@ -1,3 +1,3 @@
1
1
  /** Every command of the CLI and its flags, as `--help` prints them and docs/guides/commands.md shows them. */
2
- export declare const USAGE = "Usage\n ddd-ts-kit init [--http express|fastify|hono|nest|none]\n [--validation zod|class-validator|typebox|standard-schema|none]\n [--di tsyringe|nest|manual] [--tests vitest|jest]\n [--orm drizzle|knex|prisma|typeorm|custom|none] [--database postgres|mysql|sqlite|none]\n [--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]\n [--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]\n [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]\n [--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--http-cache none|varnish]\n [--storage local|s3|none]\n [--audit on|off]\n [--errors none|sentry] [--logger stdout|pino|winston] [--style declared|explicit] [--assembly barrel|discovery]\n [--dependencies signature|listed] [--refusals named|factories|classes]\n [--routes controllers|functions] [--representations negotiated|json] [--forms on|off]\n [--value-objects throwing|result] [--literals named|free] [--values classes|free] [--tenancy none|shared-table] [--queue database|redis|memory]\n [--schemas shared|per-route]\n [--package-manager npm|pnpm] [--allow-no-outbox \"<reason>\"] [--import-alias '$<name>/']\n [--import-extension none|js] [--sdk]\n [--context <name>:<core|supporting|generic>]... [--preset identity]... [--dry-run] [--force]\n ddd-ts-kit generate <kind> ... [--term \"<Term>=<meaning>\"]... [--allow-name] [--local-only] [--dry-run] [--force] (alias: g)\n ddd-ts-kit generate --help --json\n ddd-ts-kit list [--context <name>]\n ddd-ts-kit describe <context>\n ddd-ts-kit status [--workers]\n ddd-ts-kit doctor [--strict]\n ddd-ts-kit todo [<context>]\n ddd-ts-kit plan-waves [<context>]\n ddd-ts-kit story-check <code> [--strict]\n ddd-ts-kit acceptance [<story>] [--gate written|passing] [--lock]\n ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <path>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>] [--fresh]\n ddd-ts-kit worker-scope <context> --here [--rows <id,...>] [--base <ref>] [--dry-run]\n ddd-ts-kit story-scope <story> [--base <ref>] [--worktree <path>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit story [<story>] [--gate build|close]\n ddd-ts-kit stories\n ddd-ts-kit worktree <name> [--base <ref>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit verify-slice <context> --since <git-ref>\n ddd-ts-kit cited [<context>] [--rows <id,...>] [--base <ref>] [--removed-since <ref>]\n ddd-ts-kit verify-merge [<commit>] [--since <git-ref>] [--theirs <git-ref>] [--base <commit>] [--warn]\n ddd-ts-kit merge-trunk [--trunk <git-ref>] [--since <commit>] [--to-land] [--dry-run]\n ddd-ts-kit merge-trunk --continue [--accept-lost] | --abort\n ddd-ts-kit docs [--check] [--stored-events]\n ddd-ts-kit sdk [--check] [--dry-run]\n ddd-ts-kit depcruise-config [--check|--write]\n ddd-ts-kit build-aliases [--project <tsconfig>]\n ddd-ts-kit drizzle-generate --name <what-it-does> [--custom]\n ddd-ts-kit drizzle-generate --replay [--base <git-ref>]\n ddd-ts-kit error-factories --plan | --apply [--to named|factories] [--dry-run]\n ddd-ts-kit controllers [<context>] [--dry-run]\n ddd-ts-kit value-objects [--dry-run]\n ddd-ts-kit affected [--base <git-ref>] [--head <git-ref>] [--format text|json|github|env]\n ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab] [--changed-since <git-ref>] [--explain] [--self]\n ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]\n ddd-ts-kit check --commit-size [--staged] [--strict]\n ddd-ts-kit check-file <path>\n ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]\n ddd-ts-kit rules\n ddd-ts-kit explain <rule-id>\n\nEvery command accepts --json (machine-readable output) and --cwd <dir> (project root).";
2
+ export declare const USAGE = "Usage\n ddd-ts-kit init [--http express|fastify|hono|nest|none]\n [--validation zod|class-validator|typebox|standard-schema|none]\n [--di tsyringe|nest|manual] [--tests vitest|jest]\n [--orm drizzle|knex|prisma|typeorm|custom|none] [--database postgres|mysql|sqlite|none]\n [--events in-memory|outbox] [--docs-ui swagger|scalar|redoc|none]\n [--ci github|gitlab|both|none] [--ci-extras <extra>,...|none]\n [--authn jwt|keycloak|none] [--authz rbac|abac|rebac|custom]\n [--broker none|rabbitmq|kafka|nats|redis|custom] [--cache none|redis] [--http-cache none|varnish]\n [--storage local|s3|none]\n [--audit on|off]\n [--errors none|sentry] [--logger stdout|pino|winston] [--style declared|explicit] [--assembly barrel|discovery]\n [--dependencies signature|listed] [--refusals named|factories|classes]\n [--routes controllers|functions] [--representations negotiated|json] [--forms on|off]\n [--value-objects throwing|result] [--literals named|free] [--values classes|free] [--tenancy none|shared-table] [--queue database|redis|memory]\n [--schemas shared|per-route]\n [--package-manager npm|pnpm] [--allow-no-outbox \"<reason>\"] [--import-alias '$<name>/']\n [--import-extension none|js] [--sdk]\n [--context <name>:<core|supporting|generic>]... [--preset identity]... [--dry-run] [--force]\n ddd-ts-kit generate <kind> ... [--term \"<Term>=<meaning>\"]... [--allow-name] [--local-only] [--dry-run] [--force] (alias: g)\n ddd-ts-kit generate --help --json\n ddd-ts-kit list [--context <name>]\n ddd-ts-kit describe <context>\n ddd-ts-kit status [--workers]\n ddd-ts-kit doctor [--strict]\n ddd-ts-kit todo [<context>]\n ddd-ts-kit plan-waves [<context>]\n ddd-ts-kit story-check <code> [--strict]\n ddd-ts-kit acceptance [<story>] [--gate written|passing] [--lock]\n ddd-ts-kit worker-scope <context> [--base <ref>] [--rows <id,...>] [--worktree <path>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit worker-scope <context> --resume [--worktree <path> | --branch <name>] [--fresh]\n ddd-ts-kit worker-scope <context> --here [--rows <id,...>] [--base <ref>] [--dry-run]\n ddd-ts-kit story-scope <story> [--base <ref>] [--worktree <path>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit story [<story>] [--gate build|close]\n ddd-ts-kit stories\n ddd-ts-kit worktree <name> [--base <ref>] [--branch <name>] [--no-install] [--dry-run]\n ddd-ts-kit verify-slice <context> --since <git-ref>\n ddd-ts-kit cited [<context>] [--rows <id,...>] [--base <ref>] [--removed-since <ref>]\n ddd-ts-kit verify-merge [<commit>] [--since <git-ref>] [--theirs <git-ref>] [--base <commit>] [--warn]\n ddd-ts-kit merge-trunk [--trunk <git-ref>] [--since <commit>] [--to-land] [--dry-run]\n ddd-ts-kit merge-trunk --continue [--accept-lost] | --abort\n ddd-ts-kit docs [--check] [--stored-events]\n ddd-ts-kit sdk [--check] [--dry-run]\n ddd-ts-kit depcruise-config [--check|--write]\n ddd-ts-kit build-aliases [--project <tsconfig>]\n ddd-ts-kit drizzle-generate --name <what-it-does> [--custom]\n ddd-ts-kit drizzle-generate --replay [--base <git-ref>]\n ddd-ts-kit error-factories --plan | --apply [--to named|factories] [--dry-run]\n ddd-ts-kit controllers [<context>] [--dry-run]\n ddd-ts-kit value-objects [--dry-run]\n ddd-ts-kit affected [--base <git-ref>] [--head <git-ref>] [--format text|json|github|env]\n ddd-ts-kit affected --base <git-ref> --run <script>\n ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab] [--changed-since <git-ref>] [--explain] [--self]\n ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]\n ddd-ts-kit check --commit-size [--staged] [--strict]\n ddd-ts-kit check-file <path>\n ddd-ts-kit lint [paths...] [--format <eslint formatter>] [--fix]\n ddd-ts-kit rules\n ddd-ts-kit explain <rule-id>\n\nEvery command accepts --json (machine-readable output) and --cwd <dir> (project root).";
3
3
  //# sourceMappingURL=usage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,eAAO,MAAM,KAAK,mkIA2DqE,CAAC"}
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,eAAO,MAAM,KAAK,0nIA4DqE,CAAC"}
@@ -50,6 +50,7 @@ export const USAGE = `Usage
50
50
  ddd-ts-kit controllers [<context>] [--dry-run]
51
51
  ddd-ts-kit value-objects [--dry-run]
52
52
  ddd-ts-kit affected [--base <git-ref>] [--head <git-ref>] [--format text|json|github|env]
53
+ ddd-ts-kit affected --base <git-ref> --run <script>
53
54
  ddd-ts-kit check [paths...] [--rule <id>]... [--format text|json|github|gitlab] [--changed-since <git-ref>] [--explain] [--self]
54
55
  ddd-ts-kit check --clean-only <dir>... [--rule <id>]... [--format text|json|github]
55
56
  ddd-ts-kit check --commit-size [--staged] [--strict]
@@ -1 +1 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFA2DkE,CAAC"}
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/help/usage.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFA4DkE,CAAC"}
@@ -1,35 +1,35 @@
1
1
  /** Ranges written to the generated package.json; bumped together with the kit. */
2
2
  export const VERSIONS = {
3
- '@ddd-ts-kit/kernel': '^0.83.2',
4
- '@ddd-ts-kit/validation': '^0.83.2',
5
- '@ddd-ts-kit/http': '^0.83.2',
6
- '@ddd-ts-kit/tracing': '^0.83.2',
7
- '@ddd-ts-kit/di': '^0.83.2',
8
- '@ddd-ts-kit/events': '^0.83.2',
9
- '@ddd-ts-kit/testing': '^0.83.2',
10
- '@ddd-ts-kit/drizzle': '^0.83.2',
11
- '@ddd-ts-kit/knex': '^0.83.2',
12
- '@ddd-ts-kit/prisma': '^0.83.2',
13
- '@ddd-ts-kit/typeorm': '^0.83.2',
14
- '@ddd-ts-kit/auth': '^0.83.2',
15
- '@ddd-ts-kit/rabbitmq': '^0.83.2',
16
- '@ddd-ts-kit/aspects': '^0.83.2',
17
- '@ddd-ts-kit/audit': '^0.83.2',
18
- '@ddd-ts-kit/redis': '^0.83.2',
19
- '@ddd-ts-kit/kafka': '^0.83.2',
20
- '@ddd-ts-kit/nats': '^0.83.2',
21
- '@ddd-ts-kit/scheduling': '^0.83.2',
22
- '@ddd-ts-kit/sentry': '^0.83.2',
23
- '@ddd-ts-kit/s3': '^0.83.2',
3
+ '@ddd-ts-kit/kernel': '^0.83.4',
4
+ '@ddd-ts-kit/validation': '^0.83.4',
5
+ '@ddd-ts-kit/http': '^0.83.4',
6
+ '@ddd-ts-kit/tracing': '^0.83.4',
7
+ '@ddd-ts-kit/di': '^0.83.4',
8
+ '@ddd-ts-kit/events': '^0.83.4',
9
+ '@ddd-ts-kit/testing': '^0.83.4',
10
+ '@ddd-ts-kit/drizzle': '^0.83.4',
11
+ '@ddd-ts-kit/knex': '^0.83.4',
12
+ '@ddd-ts-kit/prisma': '^0.83.4',
13
+ '@ddd-ts-kit/typeorm': '^0.83.4',
14
+ '@ddd-ts-kit/auth': '^0.83.4',
15
+ '@ddd-ts-kit/rabbitmq': '^0.83.4',
16
+ '@ddd-ts-kit/aspects': '^0.83.4',
17
+ '@ddd-ts-kit/audit': '^0.83.4',
18
+ '@ddd-ts-kit/redis': '^0.83.4',
19
+ '@ddd-ts-kit/kafka': '^0.83.4',
20
+ '@ddd-ts-kit/nats': '^0.83.4',
21
+ '@ddd-ts-kit/scheduling': '^0.83.4',
22
+ '@ddd-ts-kit/sentry': '^0.83.4',
23
+ '@ddd-ts-kit/s3': '^0.83.4',
24
24
  '@aws-sdk/client-s3': '^3.1150.0',
25
25
  '@aws-sdk/lib-storage': '^3.1150.0',
26
26
  '@aws-sdk/s3-request-presigner': '^3.1150.0',
27
27
  busboy: '^1.6.0',
28
28
  '@sentry/node': '^11.6.0',
29
- '@ddd-ts-kit/pino': '^0.83.2',
29
+ '@ddd-ts-kit/pino': '^0.83.4',
30
30
  pino: '^10.4.0',
31
31
  'pino-pretty': '^13.2.0',
32
- '@ddd-ts-kit/winston': '^0.83.2',
32
+ '@ddd-ts-kit/winston': '^0.83.4',
33
33
  winston: '^3.19.0',
34
34
  '@confluentinc/kafka-javascript': '^1.11.0',
35
35
  '@nats-io/jetstream': '^3.4.0',
@@ -37,7 +37,7 @@ export const VERSIONS = {
37
37
  ioredis: '^6.0.0',
38
38
  jose: '^6.0.0',
39
39
  amqplib: '^2.2.0',
40
- 'ddd-ts-kit': '^0.83.2',
40
+ 'ddd-ts-kit': '^0.83.4',
41
41
  tsx: '^4.23.15',
42
42
  vitest: '^5.0.3',
43
43
  zod: '^4.6.5',
@@ -46,12 +46,16 @@ function nearTheLimitLines({ nearTheLimit }) {
46
46
  ...nearTheLimit.map(({ file, lines }) => ` ${file} (${lines})`),
47
47
  ];
48
48
  }
49
- function nextLines({ ok, toStage, context, commit }) {
49
+ function nextLines({ ok, toStage, leftOut, context, commit }) {
50
50
  if (!ok) {
51
51
  return ['next: fix the causes above, then run verify-slice again'];
52
52
  }
53
53
  if (toStage.length === 0) {
54
- return ['next: nothing to commit'];
54
+ return leftOut.length === 0
55
+ ? ['next: nothing to commit']
56
+ : [
57
+ `next: nothing of the slice of ${context} to commit; every change is left out below, outside the slice: a shared file is the conductor's, a file of another context its worker's`,
58
+ ];
55
59
  }
56
60
  const staged = toStage.map((file) => ` ${file}`);
57
61
  return commit === undefined
@@ -1 +1 @@
1
- {"version":3,"file":"format-slice-verification.js","sourceRoot":"","sources":["../../src/slice/format-slice-verification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAIrF,MAAM,iBAAiB,GACrB,yJAAyJ,CAAC;AAE5J,kHAAkH;AAClH,MAAM,UAAU,uBAAuB,CAAC,YAA+B;IACrE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC;IAC/C,MAAM,O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