ddd-ts-kit 0.113.1 → 0.114.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -1
- package/README.fr.md +6 -6
- package/README.md +5 -5
- package/dist/help/work-notes.d.ts.map +1 -1
- package/dist/help/work-notes.js +7 -5
- package/dist/help/work-notes.js.map +1 -1
- package/dist/init/managed-settings-note.js +1 -1
- package/dist/init/managed-settings-note.js.map +1 -1
- package/dist/init/manifest/versions.js +25 -25
- package/dist/init/run-init.js +1 -1
- package/dist/init/run-init.js.map +1 -1
- package/dist/init/write-copilot-settings.js +1 -1
- package/dist/init/write-copilot-settings.js.map +1 -1
- package/dist/issues-url.d.ts +1 -1
- package/dist/issues-url.d.ts.map +1 -1
- package/dist/issues-url.js +1 -1
- package/dist/issues-url.js.map +1 -1
- package/dist/merge/declarations/binds-the-name.d.ts +8 -0
- package/dist/merge/declarations/binds-the-name.d.ts.map +1 -0
- package/dist/merge/declarations/binds-the-name.js +40 -0
- package/dist/merge/declarations/binds-the-name.js.map +1 -0
- package/dist/merge/declarations/close-of.d.ts +3 -0
- package/dist/merge/declarations/close-of.d.ts.map +1 -0
- package/dist/merge/declarations/close-of.js +15 -0
- package/dist/merge/declarations/close-of.js.map +1 -0
- package/dist/merge/declarations/declarations-of.d.ts +2 -0
- package/dist/merge/declarations/declarations-of.d.ts.map +1 -1
- package/dist/merge/declarations/declarations-of.js +1 -1
- package/dist/merge/declarations/declarations-of.js.map +1 -1
- package/dist/merge/declarations/declares-a-member.d.ts +7 -0
- package/dist/merge/declarations/declares-a-member.d.ts.map +1 -0
- package/dist/merge/declarations/declares-a-member.js +29 -0
- package/dist/merge/declarations/declares-a-member.js.map +1 -0
- package/dist/merge/declarations/enclosing-group.d.ts +8 -0
- package/dist/merge/declarations/enclosing-group.d.ts.map +1 -0
- package/dist/merge/declarations/enclosing-group.js +16 -0
- package/dist/merge/declarations/enclosing-group.js.map +1 -0
- package/dist/merge/declarations/imports-read-as-merged.d.ts +9 -0
- package/dist/merge/declarations/imports-read-as-merged.d.ts.map +1 -0
- package/dist/merge/declarations/imports-read-as-merged.js +23 -0
- package/dist/merge/declarations/imports-read-as-merged.js.map +1 -0
- package/dist/merge/declarations/inverts-a-reference.d.ts +12 -0
- package/dist/merge/declarations/inverts-a-reference.d.ts.map +1 -0
- package/dist/merge/declarations/inverts-a-reference.js +25 -0
- package/dist/merge/declarations/inverts-a-reference.js.map +1 -0
- package/dist/merge/declarations/lead-of.d.ts +15 -0
- package/dist/merge/declarations/lead-of.d.ts.map +1 -0
- package/dist/merge/declarations/lead-of.js +19 -0
- package/dist/merge/declarations/lead-of.js.map +1 -0
- package/dist/merge/declarations/lines-of-both-sides.d.ts +10 -0
- package/dist/merge/declarations/lines-of-both-sides.d.ts.map +1 -0
- package/dist/merge/declarations/lines-of-both-sides.js +22 -0
- package/dist/merge/declarations/lines-of-both-sides.js.map +1 -0
- package/dist/merge/declarations/merge-declarations.d.ts.map +1 -1
- package/dist/merge/declarations/merge-declarations.js +1 -15
- package/dist/merge/declarations/merge-declarations.js.map +1 -1
- package/dist/merge/declarations/merged-file.d.ts +15 -0
- package/dist/merge/declarations/merged-file.d.ts.map +1 -0
- package/dist/merge/declarations/merged-file.js +55 -0
- package/dist/merge/declarations/merged-file.js.map +1 -0
- package/dist/merge/declarations/merged-lines.d.ts +5 -11
- package/dist/merge/declarations/merged-lines.d.ts.map +1 -1
- package/dist/merge/declarations/merged-lines.js +6 -39
- package/dist/merge/declarations/merged-lines.js.map +1 -1
- package/dist/merge/declarations/merged-region.d.ts +2 -1
- package/dist/merge/declarations/merged-region.d.ts.map +1 -1
- package/dist/merge/declarations/merged-region.js +60 -22
- package/dist/merge/declarations/merged-region.js.map +1 -1
- package/dist/merge/declarations/reads-a-removed.d.ts +8 -0
- package/dist/merge/declarations/reads-a-removed.d.ts.map +1 -0
- package/dist/merge/declarations/reads-a-removed.js +27 -0
- package/dist/merge/declarations/reads-a-removed.js.map +1 -0
- package/dist/merge/declarations/reads-the-name.d.ts +10 -0
- package/dist/merge/declarations/reads-the-name.d.ts.map +1 -0
- package/dist/merge/declarations/reads-the-name.js +23 -0
- package/dist/merge/declarations/reads-the-name.js.map +1 -0
- package/dist/merge/declarations/settle-declarations.d.ts +9 -5
- package/dist/merge/declarations/settle-declarations.d.ts.map +1 -1
- package/dist/merge/declarations/settle-declarations.js +39 -13
- package/dist/merge/declarations/settle-declarations.js.map +1 -1
- package/dist/merge/declarations/sides-of-region.d.ts +5 -0
- package/dist/merge/declarations/sides-of-region.d.ts.map +1 -0
- package/dist/merge/declarations/sides-of-region.js +19 -0
- package/dist/merge/declarations/sides-of-region.js.map +1 -0
- package/dist/merge/declarations/union-in-doubt.d.ts +17 -0
- package/dist/merge/declarations/union-in-doubt.d.ts.map +1 -0
- package/dist/merge/declarations/union-in-doubt.js +84 -0
- package/dist/merge/declarations/union-in-doubt.js.map +1 -0
- package/dist/merge/declarations/union-reads-as-merged.d.ts +23 -0
- package/dist/merge/declarations/union-reads-as-merged.d.ts.map +1 -0
- package/dist/merge/declarations/union-reads-as-merged.js +155 -0
- package/dist/merge/declarations/union-reads-as-merged.js.map +1 -0
- package/dist/merge/resolve-conflict.d.ts +2 -1
- package/dist/merge/resolve-conflict.d.ts.map +1 -1
- package/dist/merge/resolve-conflict.js +5 -3
- package/dist/merge/resolve-conflict.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +9 -9
- package/templates/init/AGENTS.md.tpl +1 -1
- package/templates/init/README.md.tpl +3 -3
- package/templates/pipeline/github/workflows/intent-to-spec.yml +1 -1
- package/templates/pipeline/package-scripts.json +1 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { scan } from '../../check/scan/scan.js';
|
|
2
|
+
import { declarationsOf } from './declarations-of.js';
|
|
3
|
+
import { invertsAReference } from './inverts-a-reference.js';
|
|
4
|
+
import { readsARemoved } from './reads-a-removed.js';
|
|
5
|
+
/**
|
|
6
|
+
* Reads the region the union of lines gives against the three sides merged declaration by
|
|
7
|
+
* declaration. It is `merged` when it holds, whole and once, each declaration with the comments
|
|
8
|
+
* above it: the one a side added, changed or removed while the other left it as the base holds
|
|
9
|
+
* it, the one both wrote alike, and for one both changed the lines `lineMerge` gives, those the
|
|
10
|
+
* kit keeps of that declaration merged alone; and when no declaration stands above one it reads,
|
|
11
|
+
* against the sides. It is `mixed` when it is not read with certainty, holds a declaration no
|
|
12
|
+
* side wrote, lacks one, inverts a reference, or when the two sides do not agree on a
|
|
13
|
+
* declaration: one removed it and the other changed it or started to read it, both added it
|
|
14
|
+
* differently, its lines do not merge. The order of the lines of both sides is otherwise theirs to
|
|
15
|
+
* keep, and blank lines are not compared: the lines of both sides keep one of each run.
|
|
16
|
+
*/
|
|
17
|
+
export function unionReadsAsMerged(union, written, lineMerge) {
|
|
18
|
+
const sides = { ours: bare(written.ours), base: bare(written.base), theirs: bare(written.theirs) };
|
|
19
|
+
const unread = declarationsOf(union);
|
|
20
|
+
if ([sides.ours, sides.base, sides.theirs].some(holdsAnEntry)) {
|
|
21
|
+
return 'lines';
|
|
22
|
+
}
|
|
23
|
+
const read = unread === undefined ? undefined : withSharedComments(bare(unread), sides);
|
|
24
|
+
const left = read === undefined ? undefined : leftOver(read, sides, lineMerge);
|
|
25
|
+
const mixed = read === undefined ||
|
|
26
|
+
left === undefined ||
|
|
27
|
+
!paired(left, lineMerge) ||
|
|
28
|
+
invertsAReference(read, sides) ||
|
|
29
|
+
readsARemoved(sides);
|
|
30
|
+
return mixed ? 'mixed' : 'merged';
|
|
31
|
+
}
|
|
32
|
+
/** Whether a side holds a statement that declares no name and that no `;` or `}` ends: an entry of a list. */
|
|
33
|
+
function holdsAnEntry({ declarations }) {
|
|
34
|
+
return declarations.some(({ name, ended, lines }) => name === undefined && !ended && scan(lines.join('\n')).code.trim() !== '');
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The declarations of the union, each with the comment the union kept once for two neighbours: a
|
|
38
|
+
* declaration that stands right under one whose comment a side wrote above it too, word for
|
|
39
|
+
* word, is read with that comment. The two sides each wrote one comment above the declaration
|
|
40
|
+
* each added, and the lines of both sides keep each line once.
|
|
41
|
+
*/
|
|
42
|
+
function withSharedComments(read, sides) {
|
|
43
|
+
const written = [sides.ours, sides.theirs].flatMap(({ declarations }) => declarations);
|
|
44
|
+
const declarations = read.declarations.map((declared, at) => {
|
|
45
|
+
const comment = commentOf(read.declarations[at - 1]);
|
|
46
|
+
const lines = [...comment, ...declared.lines];
|
|
47
|
+
const shared = comment.length > 0 &&
|
|
48
|
+
commentOf(declared).length === 0 &&
|
|
49
|
+
written.some((one) => one.name === declared.name && textOf(one.lines) === textOf(lines));
|
|
50
|
+
return shared
|
|
51
|
+
? { ...declared, lines, key: declared.name === undefined ? `text ${textOf(lines)}` : declared.key }
|
|
52
|
+
: declared;
|
|
53
|
+
});
|
|
54
|
+
return { ...read, declarations };
|
|
55
|
+
}
|
|
56
|
+
/** The lines of comment a declaration opens with, above its first line of code. */
|
|
57
|
+
function commentOf(declared) {
|
|
58
|
+
const lines = declared?.lines ?? [];
|
|
59
|
+
const code = scan(lines.join('\n')).code.split('\n');
|
|
60
|
+
const first = code.findIndex((line) => line.trim() !== '');
|
|
61
|
+
return lines.slice(0, Math.max(first, 0));
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What is left once each declaration is read by its key; undefined when the union holds another
|
|
65
|
+
* text than the one a key is merged into, lacks a declaration both sides hold, or when the two
|
|
66
|
+
* sides do not agree on one.
|
|
67
|
+
*/
|
|
68
|
+
function leftOver(read, sides, lineMerge) {
|
|
69
|
+
const inUnion = byKey(read);
|
|
70
|
+
const inOurs = byKey(sides.ours);
|
|
71
|
+
const inBase = byKey(sides.base);
|
|
72
|
+
const inTheirs = byKey(sides.theirs);
|
|
73
|
+
const keys = [...new Set([read, sides.ours, sides.base, sides.theirs].flatMap(keysOf))];
|
|
74
|
+
const judged = keys.map((key) => {
|
|
75
|
+
const versions = { ours: inOurs.get(key), base: inBase.get(key), theirs: inTheirs.get(key) };
|
|
76
|
+
return { ...versions, held: inUnion.get(key), expected: expectedOf(versions, lineMerge) };
|
|
77
|
+
});
|
|
78
|
+
const alone = judged.filter(({ base, expected }) => base === undefined && expected !== undefined);
|
|
79
|
+
return judged.some(isWrong)
|
|
80
|
+
? undefined
|
|
81
|
+
: {
|
|
82
|
+
held: new Set(read.declarations.map(({ lines }) => textOf(lines))),
|
|
83
|
+
extra: judged.flatMap(({ held, expected }) => (held !== undefined && expected === undefined ? [held] : [])),
|
|
84
|
+
ours: alone.flatMap(({ ours, theirs }) => (ours === undefined || theirs !== undefined ? [] : [ours])),
|
|
85
|
+
theirs: alone.flatMap(({ ours, theirs }) => (theirs === undefined || ours !== undefined ? [] : [theirs])),
|
|
86
|
+
base: judged.flatMap(({ ours, base, theirs }) => base !== undefined && ours === undefined && theirs === undefined ? [base] : []),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Whether the union surely holds a key wrong: the two sides do not agree on it, it holds another text, or lacks a declaration both sides hold. */
|
|
90
|
+
function isWrong({ ours, theirs, held, expected }) {
|
|
91
|
+
if (expected === 'unknown') {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
return held === undefined
|
|
95
|
+
? expected !== undefined && ours !== undefined && theirs !== undefined
|
|
96
|
+
: expected !== undefined && textOf(held.lines) !== textOf(expected);
|
|
97
|
+
}
|
|
98
|
+
/** How many ways of pairing three versions are tried for the statements of a region. */
|
|
99
|
+
const TRIED = 64;
|
|
100
|
+
/**
|
|
101
|
+
* Whether what the keys do not settle is statements both sides changed, each merged alone: every
|
|
102
|
+
* declaration the union holds that no side wrote, and every one a side alone wrote that the union
|
|
103
|
+
* lacks, is one of three versions whose merge the union holds, the version of a side standing
|
|
104
|
+
* nowhere else in it.
|
|
105
|
+
*/
|
|
106
|
+
function paired(left, lineMerge) {
|
|
107
|
+
const { held, extra, ours, theirs, base } = left;
|
|
108
|
+
const lacked = [...ours, ...theirs].filter(({ lines }) => !held.has(textOf(lines)));
|
|
109
|
+
const origins = [...base.map(({ lines }) => lines), []];
|
|
110
|
+
if (extra.length === 0 && lacked.length === 0) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
if (ours.length * theirs.length * origins.length > TRIED) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
const merges = ours.flatMap((mine) => theirs.flatMap((other) => mergesOf({ mine, other, origins }, left, lineMerge).map((text) => ({ mine, other, text }))));
|
|
117
|
+
return (extra.every(({ lines }) => merges.some(({ text }) => text === textOf(lines))) &&
|
|
118
|
+
lacked.every((declared) => merges.some(({ mine, other }) => mine === declared || other === declared)));
|
|
119
|
+
}
|
|
120
|
+
/** The texts the union holds that a statement of each side merges into: each of the two stands there as that text, or not at all. */
|
|
121
|
+
function mergesOf({ mine, other, origins }, { held }, lineMerge) {
|
|
122
|
+
const texts = origins.flatMap((base) => textOf(lineMerge({ ours: mine.lines, base, theirs: other.lines })) ?? []);
|
|
123
|
+
const fits = (text, { lines }) => textOf(lines) === text || !held.has(textOf(lines));
|
|
124
|
+
return texts.filter((text) => held.has(text) && fits(text, mine) && fits(text, other));
|
|
125
|
+
}
|
|
126
|
+
/** The lines a declaration is merged into, undefined when it is removed, `unknown` when the two sides do not agree on it. */
|
|
127
|
+
function expectedOf({ ours, base, theirs }, lineMerge) {
|
|
128
|
+
if (same(ours, theirs) || same(theirs, base)) {
|
|
129
|
+
return ours?.lines;
|
|
130
|
+
}
|
|
131
|
+
if (same(ours, base)) {
|
|
132
|
+
return theirs?.lines;
|
|
133
|
+
}
|
|
134
|
+
return ours === undefined || base === undefined || theirs === undefined
|
|
135
|
+
? 'unknown'
|
|
136
|
+
: (lineMerge({ ours: ours.lines, base: base.lines, theirs: theirs.lines }) ?? 'unknown');
|
|
137
|
+
}
|
|
138
|
+
function same(one, other) {
|
|
139
|
+
return textOf(one?.lines) === textOf(other?.lines);
|
|
140
|
+
}
|
|
141
|
+
function textOf(lines) {
|
|
142
|
+
return lines?.filter((line) => line.trim() !== '').join('\n');
|
|
143
|
+
}
|
|
144
|
+
/** A side whose statements that declare no name are known by their text, blank lines left out. */
|
|
145
|
+
function bare(side) {
|
|
146
|
+
const declarations = side.declarations.map((declared) => declared.name === undefined ? { ...declared, key: `text ${textOf(declared.lines)}` } : declared);
|
|
147
|
+
return { ...side, declarations };
|
|
148
|
+
}
|
|
149
|
+
function keysOf(side) {
|
|
150
|
+
return side.declarations.map(({ key }) => key);
|
|
151
|
+
}
|
|
152
|
+
function byKey(side) {
|
|
153
|
+
return new Map(side.declarations.map((declaration) => [declaration.key, declaration]));
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=union-reads-as-merged.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union-reads-as-merged.js","sourceRoot":"","sources":["../../../src/merge/declarations/union-reads-as-merged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAG7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASlD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,OAAsB,EAAE,SAAoB;IACvG,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IACnG,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAErC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,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AS,IAAI,CAAC,IAAkB;IAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CACtD,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,QAAQ,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAChG,CAAC;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,YAAY,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,IAAkB;IAChC,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,KAAK,CAAC,IAAkB;IAC/B,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -6,7 +6,8 @@ import type { Resolution } from './resolution.js';
|
|
|
6
6
|
* package.json of a client at the higher version of both sides, the slices rows and the
|
|
7
7
|
* stored-events lock merged by their keys, and inside a source or a mixed document
|
|
8
8
|
* each conflict lying in a generated region: the lines of both sides, or its declarations merged
|
|
9
|
-
* one by one where those lines would leave a table, a model or a function open
|
|
9
|
+
* one by one where those lines would leave a table, a model or a function open, or set a line of
|
|
10
|
+
* one side inside a declaration of the other. What is left is a person's: a
|
|
10
11
|
* source conflict, a declaration both sides wrote differently, a cell or a key both sides changed,
|
|
11
12
|
* a file one side deleted, bytes that are not text.
|
|
12
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAY/C
|
|
1
|
+
{"version":3,"file":"resolve-conflict.d.ts","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAY/C;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,GAAG,UAAU,CAwBvF"}
|
|
@@ -18,7 +18,8 @@ const TRUNK_SIDE = {
|
|
|
18
18
|
* package.json of a client at the higher version of both sides, the slices rows and the
|
|
19
19
|
* stored-events lock merged by their keys, and inside a source or a mixed document
|
|
20
20
|
* each conflict lying in a generated region: the lines of both sides, or its declarations merged
|
|
21
|
-
* one by one where those lines would leave a table, a model or a function open
|
|
21
|
+
* one by one where those lines would leave a table, a model or a function open, or set a line of
|
|
22
|
+
* one side inside a declaration of the other. What is left is a person's: a
|
|
22
23
|
* source conflict, a declaration both sides wrote differently, a cell or a key both sides changed,
|
|
23
24
|
* a file one side deleted, bytes that are not text.
|
|
24
25
|
*/
|
|
@@ -66,8 +67,9 @@ function byKeys(path, kind) {
|
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
69
|
* A source or a mixed document: the conflicts inside generated regions settled, the others left.
|
|
69
|
-
* In code, a region the lines of both sides would leave with a declaration open
|
|
70
|
-
*
|
|
70
|
+
* In code, a region the lines of both sides would leave with a declaration open, or with a line
|
|
71
|
+
* of one side inside a declaration of the other, is merged declaration by declaration, and what
|
|
72
|
+
* the two sides do not agree on there is left.
|
|
71
73
|
*/
|
|
72
74
|
function inRegions(path, kind, repo) {
|
|
73
75
|
const text = path.merged ?? '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-conflict.js","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAsB,cAAc,EAAgB,MAAM,mBAAmB,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,OAAO,GAAG,6CAA6C,CAAC;AAE9D,6FAA6F;AAC7F,MAAM,UAAU,GAAqD;IACnE,OAAO,EAAE,OAAO;IAChB,cAAc,EAAE,oGAAoG;IACpH,QAAQ,EAAE,sBAAsB;CACjC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"resolve-conflict.js","sourceRoot":"","sources":["../../src/merge/resolve-conflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAsB,cAAc,EAAgB,MAAM,mBAAmB,CAAC;AAErF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,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AAS,QAAQ,CAAC,QAA4B;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AACnE,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.114.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.114.1';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ddd-ts-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.114.1",
|
|
4
4
|
"description": "Bootstrap, scaffold and verify Domain-Driven Design (DDD), Clean Architecture and hexagonal TypeScript backends on Node.js: project and code generators, architecture checks, OpenAPI and AsyncAPI documents, for developers and AI coding agents (Claude Code, Codex, GitHub Copilot).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/
|
|
29
|
+
"url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
|
|
30
30
|
"directory": "packages/cli"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://
|
|
33
|
-
"bugs": "https://github.com/
|
|
32
|
+
"homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/",
|
|
33
|
+
"bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public",
|
|
36
36
|
"provenance": true
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"clean:packages": "node dist/bin.js check --clean-only ../kernel/src ../validation/src ../http/src ../tracing/src ../di/src ../events/src ../testing/src ../s3/src ../drizzle/src ../knex/src ../prisma/src ../typeorm/src ../aspects/src ../rabbitmq/src ../auth/src ../audit/src ../redis/src ../scheduling/src ../pino/src ../winston/src ../sentry/src ../kafka/src ../nats/src ../eslint-plugin/src"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@ddd-ts-kit/audit": "^0.
|
|
59
|
-
"@ddd-ts-kit/auth": "^0.
|
|
60
|
-
"@ddd-ts-kit/events": "^0.
|
|
61
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
62
|
-
"@ddd-ts-kit/opensearch": "^0.
|
|
58
|
+
"@ddd-ts-kit/audit": "^0.114.1",
|
|
59
|
+
"@ddd-ts-kit/auth": "^0.114.1",
|
|
60
|
+
"@ddd-ts-kit/events": "^0.114.1",
|
|
61
|
+
"@ddd-ts-kit/kernel": "^0.114.1",
|
|
62
|
+
"@ddd-ts-kit/opensearch": "^0.114.1",
|
|
63
63
|
"@types/pg": "^8.23.1",
|
|
64
64
|
"pg": "^8.23.1"
|
|
65
65
|
}
|
|
@@ -53,4 +53,4 @@ The compiler is the native TypeScript 7, installed as `@typescript/native`; `typ
|
|
|
53
53
|
## Workflow
|
|
54
54
|
|
|
55
55
|
Follow the recommended steps in order, the supported path (`README.md`, "Recommended steps"): discover the domain, bounded contexts, glossaries, context map, bootstrap, plan the slices, build slice by slice, quality gate, document. `npx ddd-ts-kit status` says where the project stands. When asked to skip a step, say which one and what it costs, and record it in `docs/architecture/plan.md`.
|
|
56
|
-
With the ddd-ts-kit plugin: `/ddd-ts-kit:start` for a new project or to resume one, `/ddd-ts-kit:glossary` before a new name, `/ddd-ts-kit:use-case` for a feature, `/ddd-ts-kit:document` for the contracts, `/ddd-ts-kit:quality-gate` before a pull or merge request. The plugin installs in Claude Code, Codex and the Copilot CLI from the marketplace `
|
|
56
|
+
With the ddd-ts-kit plugin: `/ddd-ts-kit:start` for a new project or to resume one, `/ddd-ts-kit:glossary` before a new name, `/ddd-ts-kit:use-case` for a feature, `/ddd-ts-kit:document` for the contracts, `/ddd-ts-kit:quality-gate` before a pull or merge request. The plugin installs in Claude Code, Codex and the Copilot CLI from the marketplace `ddd-ts-kit/ddd-ts-kit`; Codex calls a skill by its name, `$start`, `$use-case`.
|
|
@@ -242,7 +242,7 @@ in `docker-compose.yml` while developing, which creates the bucket at its first
|
|
|
242
242
|
aggregate keeps the `StoredFile` reference (key, size, media type, checksum). The command bus
|
|
243
243
|
stages a file a command carries before the transaction opens, `FileStaging` moves it to its key
|
|
244
244
|
with the commit and, every hour, purges what refused or rolled-back commands left in `staging/`. `npx ddd-ts-kit generate file-upload <context> <UseCase>` writes an
|
|
245
|
-
upload; see https://github.com/
|
|
245
|
+
upload; see https://github.com/ddd-ts-kit/ddd-ts-kit/blob/main/docs/concepts/file-storage.md.
|
|
246
246
|
{{#if files.local}}
|
|
247
247
|
|
|
248
248
|
| Variable | Says |
|
|
@@ -447,8 +447,8 @@ records them in `docs/architecture/plan.md`; `npx ddd-ts-kit status` says which
|
|
|
447
447
|
|
|
448
448
|
A step skipped costs later: boundaries drawn from the tables, a glossary written after the
|
|
449
449
|
code, a first integration made by a direct import the checker then refuses. The method, step by
|
|
450
|
-
step: https://github.com/
|
|
451
|
-
for each moment of the project: https://github.com/
|
|
450
|
+
step: https://github.com/ddd-ts-kit/ddd-ts-kit/blob/main/docs/guides/methodology.md; the command
|
|
451
|
+
for each moment of the project: https://github.com/ddd-ts-kit/ddd-ts-kit/blob/main/docs/guides/commands.md.
|
|
452
452
|
|
|
453
453
|
| Script | Does |
|
|
454
454
|
|---|---|
|
|
@@ -56,7 +56,7 @@ jobs:
|
|
|
56
56
|
npm install --global --no-audit --no-fund @anthropic-ai/claude-code@2.1.309
|
|
57
57
|
kit=$(node -p "JSON.parse(require('node:fs').readFileSync('node_modules/ddd-ts-kit/package.json', 'utf8')).version") \
|
|
58
58
|
|| { echo "::error::ddd-ts-kit is not installed in node_modules: the plugin is loaded at the tag of the kit version the project depends on."; exit 1; }
|
|
59
|
-
git clone --quiet --depth 1 --branch "v$kit" https://github.com/
|
|
59
|
+
git clone --quiet --depth 1 --branch "v$kit" https://github.com/ddd-ts-kit/ddd-ts-kit.git "$RUNNER_TEMP/ddd-ts-kit" \
|
|
60
60
|
|| { echo "::error::The kit has no tag v$kit to load the plugin from: depend on a released version of ddd-ts-kit."; exit 1; }
|
|
61
61
|
- name: One story per accepted intent, headless, to its pull request
|
|
62
62
|
if: steps.accepted.outputs.count != '0'
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@biomejs/biome": "2.6.6",
|
|
24
24
|
"@commitlint/cli": "^21.2.3",
|
|
25
25
|
"@commitlint/config-conventional": "^21.2.3",
|
|
26
|
-
"@ddd-ts-kit/eslint-plugin": "^0.
|
|
26
|
+
"@ddd-ts-kit/eslint-plugin": "^0.114.1",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
29
|
"@vitest/coverage-v8": "^5.0.3",
|