ddd-ts-kit 0.86.0 → 0.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.fr.md +26 -27
- package/README.md +26 -25
- package/dist/check/explain/layout-docs.js +1 -1
- package/dist/check/explain/layout-docs.js.map +1 -1
- package/dist/check/explain/tree-docs.js +2 -2
- package/dist/check/explain/tree-docs.js.map +1 -1
- package/dist/check/explain/wiring-docs.d.ts.map +1 -1
- package/dist/check/explain/wiring-docs.js +8 -7
- package/dist/check/explain/wiring-docs.js.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/authz-policy-fixtures.js +3 -3
- package/dist/check/fixtures/authz-policy-fixtures.js.map +1 -1
- package/dist/check/fixtures/constructor-injection-fixtures.js +6 -6
- package/dist/check/fixtures/constructor-injection-fixtures.js.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/declarations-fixtures.js +15 -36
- package/dist/check/fixtures/declarations-fixtures.js.map +1 -1
- package/dist/check/fixtures/declared-declarations.d.ts +4 -2
- package/dist/check/fixtures/declared-declarations.d.ts.map +1 -1
- package/dist/check/fixtures/declared-declarations.js +9 -3
- package/dist/check/fixtures/declared-declarations.js.map +1 -1
- package/dist/check/fixtures/earlier-declarations-fixtures.d.ts +4 -0
- package/dist/check/fixtures/earlier-declarations-fixtures.d.ts.map +1 -0
- package/dist/check/fixtures/earlier-declarations-fixtures.js +48 -0
- package/dist/check/fixtures/earlier-declarations-fixtures.js.map +1 -0
- package/dist/check/fixtures/fixtures.d.ts.map +1 -1
- package/dist/check/fixtures/fixtures.js +2 -0
- package/dist/check/fixtures/fixtures.js.map +1 -1
- package/dist/check/fixtures/paths.d.ts +1 -1
- package/dist/check/fixtures/paths.js +1 -1
- package/dist/check/fixtures/paths.js.map +1 -1
- package/dist/check/rules/declarations-barrel-current.js +16 -11
- package/dist/check/rules/declarations-barrel-current.js.map +1 -1
- package/dist/check/rules/naming-suffix.js +1 -1
- package/dist/check/rules/naming-suffix.js.map +1 -1
- package/dist/check/support/is-generated-context-file.d.ts +1 -1
- package/dist/check/support/is-generated-context-file.js +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +14 -9
- package/dist/commands/docs.js.map +1 -1
- package/dist/declared/barrel-file.d.ts +1 -1
- package/dist/declared/barrel-file.js +1 -1
- package/dist/declared/context-declarations.d.ts +4 -2
- package/dist/declared/context-declarations.d.ts.map +1 -1
- package/dist/declared/context-declarations.js +4 -2
- package/dist/declared/context-declarations.js.map +1 -1
- package/dist/declared/declarations-folder-of.d.ts +12 -7
- package/dist/declared/declarations-folder-of.d.ts.map +1 -1
- package/dist/declared/declarations-folder-of.js +15 -11
- package/dist/declared/declarations-folder-of.js.map +1 -1
- package/dist/declared/earlier-layout-notice.d.ts +10 -0
- package/dist/declared/earlier-layout-notice.d.ts.map +1 -0
- package/dist/declared/earlier-layout-notice.js +12 -0
- package/dist/declared/earlier-layout-notice.js.map +1 -0
- package/dist/declared/earlier-layout-of.d.ts +10 -0
- package/dist/declared/earlier-layout-of.d.ts.map +1 -0
- package/dist/declared/earlier-layout-of.js +16 -0
- package/dist/declared/earlier-layout-of.js.map +1 -0
- package/dist/declared/earlier-shape-of.d.ts +13 -0
- package/dist/declared/earlier-shape-of.d.ts.map +1 -0
- package/dist/declared/earlier-shape-of.js +35 -0
- package/dist/declared/earlier-shape-of.js.map +1 -0
- package/dist/declared/folder-declarations-file.d.ts +6 -4
- package/dist/declared/folder-declarations-file.d.ts.map +1 -1
- package/dist/declared/folder-declarations-file.js +7 -5
- package/dist/declared/folder-declarations-file.js.map +1 -1
- package/dist/declared/index.d.ts +3 -2
- package/dist/declared/index.d.ts.map +1 -1
- package/dist/declared/index.js +3 -2
- package/dist/declared/index.js.map +1 -1
- package/dist/declared/is-declarations-file.d.ts +3 -2
- package/dist/declared/is-declarations-file.d.ts.map +1 -1
- package/dist/declared/is-declarations-file.js +9 -9
- package/dist/declared/is-declarations-file.js.map +1 -1
- package/dist/declared/keeps-role-folder-files.d.ts +12 -0
- package/dist/declared/keeps-role-folder-files.d.ts.map +1 -0
- package/dist/declared/keeps-role-folder-files.js +25 -0
- package/dist/declared/keeps-role-folder-files.js.map +1 -0
- package/dist/declared/keeps-single-file.d.ts +1 -1
- package/dist/declared/keeps-single-file.js +1 -1
- package/dist/declared/render-declarations.d.ts +7 -3
- package/dist/declared/render-declarations.d.ts.map +1 -1
- package/dist/declared/render-declarations.js +5 -3
- package/dist/declared/render-declarations.js.map +1 -1
- package/dist/declared/render-folder-declarations.d.ts +2 -2
- package/dist/declared/same-files.d.ts +3 -0
- package/dist/declared/same-files.d.ts.map +1 -0
- package/dist/declared/same-files.js +5 -0
- package/dist/declared/same-files.js.map +1 -0
- package/dist/dev/refresh-declarations.d.ts.map +1 -1
- package/dist/dev/refresh-declarations.js +1 -1
- package/dist/dev/refresh-declarations.js.map +1 -1
- package/dist/docs/write-docs.d.ts +3 -3
- package/dist/docs/write-docs.d.ts.map +1 -1
- package/dist/docs/write-docs.js +3 -3
- package/dist/docs/write-docs.js.map +1 -1
- package/dist/generate/refresh-barrels.d.ts +17 -11
- package/dist/generate/refresh-barrels.d.ts.map +1 -1
- package/dist/generate/refresh-barrels.js +32 -26
- package/dist/generate/refresh-barrels.js.map +1 -1
- package/dist/generate/refresh-docs.d.ts +2 -2
- package/dist/generate/refresh-docs.d.ts.map +1 -1
- package/dist/generate/refresh-docs.js +3 -3
- package/dist/generate/refresh-docs.js.map +1 -1
- package/dist/init/manifest/versions.js +24 -24
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/templates/init/AGENTS.md.tpl +1 -1
- package/templates/init/README.md.tpl +2 -2
- package/templates/pipeline/package-scripts.json +1 -1
- package/dist/declared/single-file-notice.d.ts +0 -8
- package/dist/declared/single-file-notice.d.ts.map +0 -1
- package/dist/declared/single-file-notice.js +0 -9
- package/dist/declared/single-file-notice.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"same-files.js","sourceRoot":"","sources":["../../src/declared/same-files.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,UAAU,SAAS,CAAC,IAAiC,EAAE,KAAkC;IAC7F,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-declarations.d.ts","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"refresh-declarations.d.ts","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,MAAM,EAAE,CA4BlG"}
|
|
@@ -17,7 +17,7 @@ export function refreshDeclarations(start, tell) {
|
|
|
17
17
|
const { created, updated, deleted, notes } = ws.commit(false);
|
|
18
18
|
const rewritten = [...created, ...updated];
|
|
19
19
|
rewritten.forEach((file) => tell(`ddd-ts-kit: rewrote ${file} from the role files and their constructors`));
|
|
20
|
-
deleted.forEach((file) => tell(`ddd-ts-kit: deleted ${file}: its folder holds no declared class any more`));
|
|
20
|
+
deleted.forEach((file) => tell(`ddd-ts-kit: deleted ${file}: its folder holds no declared class any more, or the declarations of its layer replace it`));
|
|
21
21
|
notes.forEach((note) => tell(`ddd-ts-kit: ${note}`));
|
|
22
22
|
return [...rewritten, ...deleted];
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-declarations.js","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,IAA4B;IAC7E,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEtC,cAAc,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;QAE5C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9D,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;QAE3C,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,uBAAuB,IAAI,6CAA6C,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"refresh-declarations.js","sourceRoot":"","sources":["../../src/dev/refresh-declarations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE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
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Config } from '../config/index.js';
|
|
2
|
-
import { type
|
|
2
|
+
import { type EarlierDeclarations, type KeptContext } from '../generate/refresh-barrels.js';
|
|
3
3
|
import type { Workspace } from '../workspace/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Plans every generated part of the documentation: the lists of each CONTEXT.md, the block
|
|
6
6
|
* of the context map, the barrel of each declared context, the code owners once an owner is
|
|
7
7
|
* configured, and, once, the skeleton of what only people can write. The caller commits the workspace, or reads what it would change to detect drift.
|
|
8
|
-
* Answers the contexts left in
|
|
8
|
+
* Answers the contexts left in a layout of their declarations an earlier version wrote, which `earlier` keeps.
|
|
9
9
|
*/
|
|
10
|
-
export declare function writeDocs(ws: Workspace, config: Config,
|
|
10
|
+
export declare function writeDocs(ws: Workspace, config: Config, earlier?: EarlierDeclarations): KeptContext[];
|
|
11
11
|
//# sourceMappingURL=write-docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-docs.d.ts","sourceRoot":"","sources":["../../src/docs/write-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"write-docs.d.ts","sourceRoot":"","sources":["../../src/docs/write-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAkB,MAAM,6BAA6B,CAAC;AAGzG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAW9C;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAA4B,GAAG,WAAW,EAAE,CAyB7G"}
|
package/dist/docs/write-docs.js
CHANGED
|
@@ -14,9 +14,9 @@ const INTEGRATION_README = 'docs/integration/README.md';
|
|
|
14
14
|
* Plans every generated part of the documentation: the lists of each CONTEXT.md, the block
|
|
15
15
|
* of the context map, the barrel of each declared context, the code owners once an owner is
|
|
16
16
|
* configured, and, once, the skeleton of what only people can write. The caller commits the workspace, or reads what it would change to detect drift.
|
|
17
|
-
* Answers the contexts left in
|
|
17
|
+
* Answers the contexts left in a layout of their declarations an earlier version wrote, which `earlier` keeps.
|
|
18
18
|
*/
|
|
19
|
-
export function writeDocs(ws, config,
|
|
19
|
+
export function writeDocs(ws, config, earlier = 'move') {
|
|
20
20
|
const contexts = readContexts(ws, config);
|
|
21
21
|
for (const context of contexts) {
|
|
22
22
|
if (context.declared && context.onDisk) {
|
|
@@ -24,7 +24,7 @@ export function writeDocs(ws, config, singleFile = 'move') {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
writeContextMap(ws, contextMapLines(contexts));
|
|
27
|
-
const kept = refreshBarrels(ws, config,
|
|
27
|
+
const kept = refreshBarrels(ws, config, earlier);
|
|
28
28
|
writeOpenApiDocuments(ws, config);
|
|
29
29
|
writeCodeOwners(ws, config, contexts);
|
|
30
30
|
// Written by people from here on: never replaced, not even with --force.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-docs.js","sourceRoot":"","sources":["../../src/docs/write-docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"write-docs.js","sourceRoot":"","sources":["../../src/docs/write-docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAA8C,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,C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AAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,eAAe,CAAC,EAAa,EAAE,KAAwB;IAC9D,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,IAAI,YAAY,CAAC,yBAAyB,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;IAEtG,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,QAAQ,CAChB,GAAG,WAAW,2CAA2C,EACzD,gKAAgK,CACjK,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import type { Config } from '../config/index.js';
|
|
2
|
+
import { type EarlierLayout } from '../declared/index.js';
|
|
2
3
|
import type { Workspace } from '../workspace/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* Rewrites the generated files of every declared context from its tree: with a barrel, the
|
|
5
|
-
* declarations of each
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* declarations of each layer, which export its role files and register what each constructor
|
|
7
|
+
* receives, and the summary at the root of the context, deleting the declarations nothing derives
|
|
8
|
+
* any more; under discovery `<context>.dependencies.ts`, which registers the lists alone. Called
|
|
9
|
+
* at the end of every `generate` and by `docs`: these files are derived, like the documentation,
|
|
10
|
+
* and `declarations/barrel-current` reports one left behind. A context still declared as an
|
|
11
|
+
* earlier version wrote it (`earlierShapeOf`) is moved to the files of its layers, unless
|
|
12
|
+
* `earlier` is `keep`: `docs --check` and `generate --local-only` keep it in that layout, move
|
|
13
|
+
* nothing outside what they are asked, and say it instead. Answers the contexts kept so.
|
|
13
14
|
*/
|
|
14
|
-
export declare function refreshBarrels(ws: Workspace, config: Config,
|
|
15
|
-
/** What a refresh does with a context still declared
|
|
16
|
-
export type
|
|
15
|
+
export declare function refreshBarrels(ws: Workspace, config: Config, earlier?: EarlierDeclarations): KeptContext[];
|
|
16
|
+
/** What a refresh does with a context still declared as an earlier version wrote it: move it, or keep it as it is. */
|
|
17
|
+
export type EarlierDeclarations = 'move' | 'keep';
|
|
18
|
+
/** A context a refresh kept in an earlier layout of its declarations. */
|
|
19
|
+
export interface KeptContext {
|
|
20
|
+
readonly context: string;
|
|
21
|
+
readonly layout: EarlierLayout;
|
|
22
|
+
}
|
|
17
23
|
//# sourceMappingURL=refresh-barrels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-barrels.d.ts","sourceRoot":"","sources":["../../src/generate/refresh-barrels.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"refresh-barrels.d.ts","sourceRoot":"","sources":["../../src/generate/refresh-barrels.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAaL,KAAK,aAAa,EAEnB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAK9C;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,mBAA4B,GAAG,WAAW,EAAE,CAkBlH;AAED,sHAAsH;AACtH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAChC"}
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import { specifierOf } from '../alias/index.js';
|
|
2
|
-
import { barrelFile, contextDeclarations, contextInjections, dependenciesFile,
|
|
2
|
+
import { barrelFile, contextDeclarations, contextInjections, dependenciesFile, earlierLayoutNotice, earlierShapeOf, isDeclarationsFile, renderDependenciesFile, renderInjections, singleFileDeclarations, } from '../declared/index.js';
|
|
3
3
|
import { declaredModules } from '../model-modules/index.js';
|
|
4
4
|
import { filesUnder } from './files-under.js';
|
|
5
5
|
import { isDeclared } from './is-declared.js';
|
|
6
6
|
import { workspaceSources } from './workspace-sources.js';
|
|
7
7
|
/**
|
|
8
8
|
* Rewrites the generated files of every declared context from its tree: with a barrel, the
|
|
9
|
-
* declarations of each
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* declarations of each layer, which export its role files and register what each constructor
|
|
10
|
+
* receives, and the summary at the root of the context, deleting the declarations nothing derives
|
|
11
|
+
* any more; under discovery `<context>.dependencies.ts`, which registers the lists alone. Called
|
|
12
|
+
* at the end of every `generate` and by `docs`: these files are derived, like the documentation,
|
|
13
|
+
* and `declarations/barrel-current` reports one left behind. A context still declared as an
|
|
14
|
+
* earlier version wrote it (`earlierShapeOf`) is moved to the files of its layers, unless
|
|
15
|
+
* `earlier` is `keep`: `docs --check` and `generate --local-only` keep it in that layout, move
|
|
16
|
+
* nothing outside what they are asked, and say it instead. Answers the contexts kept so.
|
|
17
17
|
*/
|
|
18
|
-
export function refreshBarrels(ws, config,
|
|
18
|
+
export function refreshBarrels(ws, config, earlier = 'move') {
|
|
19
19
|
if (!isDeclared(config)) {
|
|
20
20
|
return [];
|
|
21
21
|
}
|
|
22
22
|
const sources = workspaceSources(ws, config);
|
|
23
23
|
const kept = [];
|
|
24
24
|
for (const context of ws.directories(config.contextsDir)) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
kept.push(context);
|
|
25
|
+
const layout = config.contexts[context] === undefined ? undefined : refreshContext(ws, { config, sources, context, earlier });
|
|
26
|
+
if (layout !== undefined) {
|
|
27
|
+
kept.push({ context, layout });
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
return kept;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
/** Refreshes one context, and answers the earlier layout it kept, if it kept one. */
|
|
33
|
+
function refreshContext(ws, { config, sources, context, earlier }) {
|
|
33
34
|
const directory = `${config.contextsDir}/${context}`;
|
|
34
35
|
const entries = filesUnder(ws, directory);
|
|
35
36
|
const modules = declaredModules(config, context);
|
|
36
37
|
const specifierOfFile = (file) => specifierOf(config, file);
|
|
37
38
|
if (config.stack.assembly === 'barrel') {
|
|
38
39
|
const declared = { context, directory, entries, sources, modules, specifierOf: specifierOfFile };
|
|
39
|
-
return refreshDeclarations(ws, declared,
|
|
40
|
+
return refreshDeclarations(ws, declared, earlier);
|
|
40
41
|
}
|
|
41
42
|
const injections = contextInjections(sources, { directory, entries, modules });
|
|
42
43
|
const injected = renderInjections(injections, specifierOfFile);
|
|
@@ -44,24 +45,29 @@ function refreshContext(ws, { config, sources, context, singleFile }) {
|
|
|
44
45
|
if (injected.calls.length > 0 || modules.length > 0 || ws.exists(`${directory}/${dependenciesFile(context)}`)) {
|
|
45
46
|
write(ws, `${directory}/${dependenciesFile(context)}`, renderDependenciesFile(injected, modules));
|
|
46
47
|
}
|
|
47
|
-
return
|
|
48
|
+
return undefined;
|
|
48
49
|
}
|
|
49
|
-
/**
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* The declarations of each layer and their summary, the ones nothing derives any more deleted.
|
|
52
|
+
* Asked to keep an earlier layout, a context laid out in one (`earlierShapeOf`) is declared again
|
|
53
|
+
* in it, so that a role file written there is registered as that version would register it.
|
|
54
|
+
*/
|
|
55
|
+
function refreshDeclarations(ws, declared, earlier) {
|
|
51
56
|
const { context, directory, entries, modules } = declared;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return 'kept';
|
|
56
|
-
}
|
|
57
|
-
const { files, injections } = contextDeclarations(declared);
|
|
57
|
+
const layout = earlier === 'keep' ? earlierShapeOf(declared, (entry) => ws.read(`${directory}/${entry}`)) : undefined;
|
|
58
|
+
const { files: grouped, injections } = contextDeclarations(declared, layout === 'role-folders' ? 'role-folder' : 'layer');
|
|
59
|
+
const files = layout === 'single-file' ? new Map([[barrelFile(context), singleFileDeclarations(declared)]]) : grouped;
|
|
58
60
|
noteUnread(ws, injections);
|
|
59
61
|
files.forEach((content, file) => write(ws, `${directory}/${file}`, content));
|
|
60
|
-
// The declarations of a
|
|
62
|
+
// The declarations of a layer that holds no role file any more, or of a role folder an earlier version wrote.
|
|
61
63
|
entries
|
|
62
64
|
.filter((entry) => isDeclarationsFile(context, entry, modules) && !files.has(entry))
|
|
63
65
|
.forEach((entry) => ws.delete(`${directory}/${entry}`));
|
|
64
|
-
|
|
66
|
+
if (layout !== undefined) {
|
|
67
|
+
const { message, fix } = earlierLayoutNotice(context, layout);
|
|
68
|
+
ws.note(`${message} ${fix}`);
|
|
69
|
+
}
|
|
70
|
+
return layout;
|
|
65
71
|
}
|
|
66
72
|
/** A class whose constructor cannot be read is given no list: said here, reported by `check`, refused at startup. */
|
|
67
73
|
function noteUnread(ws, injections) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-barrels.js","sourceRoot":"","sources":["../../src/generate/refresh-barrels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"refresh-barrels.js","sourceRoot":"","sources":["../../src/generate/refresh-barrels.ts"],"names":[],"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AAE,CAAC,CAAC,CAAC;IAE1D,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAE9D,EAAE,CAAC,IAAI,CAAC,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,qHAAqH;AACrH,SAAS,UAAU,CAAC,EAAa,EAAE,UAAqC;IACtE,KAAK,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,UAAU,EAAE,CAAC;QAC/D,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,EAAE,CAAC,IAAI,CAAC,GAAG,SAAS,KAAK,IAAI,uCAAuC,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACxG,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,EAAa,EAAE,IAAY,EAAE,OAAe;IACzD,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Workspace } from '../workspace/index.js';
|
|
2
|
-
import { type
|
|
2
|
+
import { type EarlierDeclarations } from './refresh-barrels.js';
|
|
3
3
|
/** Keeps what is derived from the config and the tree in step with what was just scaffolded, once the project has it. */
|
|
4
|
-
export declare function refreshDocs(ws: Workspace,
|
|
4
|
+
export declare function refreshDocs(ws: Workspace, earlier: EarlierDeclarations): void;
|
|
5
5
|
//# sourceMappingURL=refresh-docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-docs.d.ts","sourceRoot":"","sources":["../../src/generate/refresh-docs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"refresh-docs.d.ts","sourceRoot":"","sources":["../../src/generate/refresh-docs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,mBAAmB,EAAkB,MAAM,mBAAmB,CAAC;AAE7E,yHAAyH;AACzH,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAmB7E"}
|
|
@@ -5,15 +5,15 @@ import { CONTEXT_MAP } from '../docs/context-map-file.js';
|
|
|
5
5
|
import { writeDocs } from '../docs/write-docs.js';
|
|
6
6
|
import { refreshBarrels } from './refresh-barrels.js';
|
|
7
7
|
/** Keeps what is derived from the config and the tree in step with what was just scaffolded, once the project has it. */
|
|
8
|
-
export function refreshDocs(ws,
|
|
8
|
+
export function refreshDocs(ws, earlier) {
|
|
9
9
|
const config = ws.read(CONFIG_FILE);
|
|
10
10
|
if (config === undefined) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const current = parseConfig(JSON.parse(config));
|
|
14
|
-
refreshBarrels(ws, current,
|
|
14
|
+
refreshBarrels(ws, current, earlier);
|
|
15
15
|
if (ws.exists(CONTEXT_MAP)) {
|
|
16
|
-
writeDocs(ws, current,
|
|
16
|
+
writeDocs(ws, current, earlier);
|
|
17
17
|
}
|
|
18
18
|
// The import graph rules are derived from the config: a new context or upstream changes them.
|
|
19
19
|
if (ws.exists(DEPCRUISE_FILE)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-docs.js","sourceRoot":"","sources":["../../src/generate/refresh-docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"refresh-docs.js","sourceRoot":"","sources":["../../src/generate/refresh-docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAA4B,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E,yHAAyH;AACzH,MAAM,UAAU,WAAW,CAAC,EAAa,EAAE,OAA4B;IACrE,MAAM,MAAM,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEpC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEhD,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAErC,IAAI,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,8FAA8F;IAC9F,IAAI,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC;QAC9B,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,CAAC;AACH,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.
|
|
4
|
-
'@ddd-ts-kit/validation': '^0.
|
|
5
|
-
'@ddd-ts-kit/http': '^0.
|
|
6
|
-
'@ddd-ts-kit/tracing': '^0.
|
|
7
|
-
'@ddd-ts-kit/di': '^0.
|
|
8
|
-
'@ddd-ts-kit/events': '^0.
|
|
9
|
-
'@ddd-ts-kit/testing': '^0.
|
|
10
|
-
'@ddd-ts-kit/drizzle': '^0.
|
|
11
|
-
'@ddd-ts-kit/knex': '^0.
|
|
12
|
-
'@ddd-ts-kit/prisma': '^0.
|
|
13
|
-
'@ddd-ts-kit/typeorm': '^0.
|
|
14
|
-
'@ddd-ts-kit/auth': '^0.
|
|
15
|
-
'@ddd-ts-kit/rabbitmq': '^0.
|
|
16
|
-
'@ddd-ts-kit/aspects': '^0.
|
|
17
|
-
'@ddd-ts-kit/audit': '^0.
|
|
18
|
-
'@ddd-ts-kit/redis': '^0.
|
|
19
|
-
'@ddd-ts-kit/kafka': '^0.
|
|
20
|
-
'@ddd-ts-kit/nats': '^0.
|
|
21
|
-
'@ddd-ts-kit/scheduling': '^0.
|
|
22
|
-
'@ddd-ts-kit/sentry': '^0.
|
|
23
|
-
'@ddd-ts-kit/s3': '^0.
|
|
3
|
+
'@ddd-ts-kit/kernel': '^0.87.0',
|
|
4
|
+
'@ddd-ts-kit/validation': '^0.87.0',
|
|
5
|
+
'@ddd-ts-kit/http': '^0.87.0',
|
|
6
|
+
'@ddd-ts-kit/tracing': '^0.87.0',
|
|
7
|
+
'@ddd-ts-kit/di': '^0.87.0',
|
|
8
|
+
'@ddd-ts-kit/events': '^0.87.0',
|
|
9
|
+
'@ddd-ts-kit/testing': '^0.87.0',
|
|
10
|
+
'@ddd-ts-kit/drizzle': '^0.87.0',
|
|
11
|
+
'@ddd-ts-kit/knex': '^0.87.0',
|
|
12
|
+
'@ddd-ts-kit/prisma': '^0.87.0',
|
|
13
|
+
'@ddd-ts-kit/typeorm': '^0.87.0',
|
|
14
|
+
'@ddd-ts-kit/auth': '^0.87.0',
|
|
15
|
+
'@ddd-ts-kit/rabbitmq': '^0.87.0',
|
|
16
|
+
'@ddd-ts-kit/aspects': '^0.87.0',
|
|
17
|
+
'@ddd-ts-kit/audit': '^0.87.0',
|
|
18
|
+
'@ddd-ts-kit/redis': '^0.87.0',
|
|
19
|
+
'@ddd-ts-kit/kafka': '^0.87.0',
|
|
20
|
+
'@ddd-ts-kit/nats': '^0.87.0',
|
|
21
|
+
'@ddd-ts-kit/scheduling': '^0.87.0',
|
|
22
|
+
'@ddd-ts-kit/sentry': '^0.87.0',
|
|
23
|
+
'@ddd-ts-kit/s3': '^0.87.0',
|
|
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.
|
|
29
|
+
'@ddd-ts-kit/pino': '^0.87.0',
|
|
30
30
|
pino: '^10.4.0',
|
|
31
31
|
'pino-pretty': '^13.2.0',
|
|
32
|
-
'@ddd-ts-kit/winston': '^0.
|
|
32
|
+
'@ddd-ts-kit/winston': '^0.87.0',
|
|
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.
|
|
40
|
+
'ddd-ts-kit': '^0.87.0',
|
|
41
41
|
tsx: '^4.23.15',
|
|
42
42
|
vitest: '^5.0.3',
|
|
43
43
|
zod: '^4.6.5',
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.87.0";
|
|
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.87.0';
|
|
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.87.0",
|
|
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",
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"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"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ddd-ts-kit/kernel": "^0.
|
|
55
|
+
"@ddd-ts-kit/kernel": "^0.87.0"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -24,7 +24,7 @@ One file per layer in `.claude/rules/`: `domain.md` (`domain/`, the shared kerne
|
|
|
24
24
|
|
|
25
25
|
Create every file of a role with `npx ddd-ts-kit generate <kind> ... --json`, then fill the `TODO(domain)` places it lists; never write one by hand, never restructure what a generator wrote.
|
|
26
26
|
{{#if assembly.barrel}}
|
|
27
|
-
Never edit `<context>.declarations.ts` nor the `<
|
|
27
|
+
Never edit `<context>.declarations.ts` nor the `<layer>.declarations.ts` of a layer (`application/application.declarations.ts`): `generate`, `docs` and `npm run dev` rewrite them, from the role files and from the constructor signatures (each layer file registers what the constructors of its layer are injected; the one at the root re-exports them). After changing a constructor by hand, `npx ddd-ts-kit docs`.
|
|
28
28
|
{{/if}}
|
|
29
29
|
{{#if assembly.discovery}}
|
|
30
30
|
Never edit `<context>.dependencies.ts`: `generate`, `docs` and `npm run dev` rewrite it from the constructor signatures (it registers what each constructor is injected). After changing a constructor by hand, `npx ddd-ts-kit docs`.
|
|
@@ -94,8 +94,8 @@ configuration, the storage, and `composeApplication` of `{{config.platformDir}}/
|
|
|
94
94
|
{{#if style.declared}}
|
|
95
95
|
- **A context declares itself.** Each class says what it is with a decorator of
|
|
96
96
|
`@ddd-ts-kit/kernel/declarations` and is its own registration{{#if assembly.barrel}}; the composition root reads the
|
|
97
|
-
generated `<context>.declarations.ts`, which re-exports the generated declarations of each
|
|
98
|
-
(`application/
|
|
97
|
+
generated `<context>.declarations.ts`, which re-exports the generated declarations of each layer
|
|
98
|
+
(`application/application.declarations.ts`){{/if}}{{#if assembly.discovery}}; the composition root discovers the role files of
|
|
99
99
|
each context at startup (`discoverContext`), publishers and jobs included{{/if}}.
|
|
100
100
|
{{/if}}
|
|
101
101
|
{{#if broker.external}}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@biomejs/biome": "2.5.15",
|
|
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.87.0",
|
|
27
27
|
"@eslint/js": "^10.0.1",
|
|
28
28
|
"@typescript/native": "npm:typescript@~7.0.2",
|
|
29
29
|
"@vitest/coverage-v8": "5.0.3",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** What a finding, a note or a warning says of a context that `keepsSingleFile`. */
|
|
2
|
-
export interface SingleFileNotice {
|
|
3
|
-
readonly message: string;
|
|
4
|
-
readonly fix: string;
|
|
5
|
-
}
|
|
6
|
-
/** What `check`, `docs --check` and `generate --local-only` say of a context that `keepsSingleFile`. */
|
|
7
|
-
export declare function singleFileNotice(context: string): SingleFileNotice;
|
|
8
|
-
//# sourceMappingURL=single-file-notice.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"single-file-notice.d.ts","sourceRoot":"","sources":["../../src/declared/single-file-notice.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,wGAAwG;AACxG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAKlE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { barrelFile } from './barrel-file.js';
|
|
2
|
-
/** What `check`, `docs --check` and `generate --local-only` say of a context that `keepsSingleFile`. */
|
|
3
|
-
export function singleFileNotice(context) {
|
|
4
|
-
return {
|
|
5
|
-
message: `"${context}" still keeps all its declarations in ${barrelFile(context)}, the single file the generator wrote up to 0.84: it is current, so this version accepts it, and a later minor version reports it as an error.`,
|
|
6
|
-
fix: `Run \`npx ddd-ts-kit docs\` (or any \`generate\`, or \`npm run dev\`), which writes the <folder>.declarations.ts of each role folder and rewrites ${barrelFile(context)} as their summary, and commit the result.`,
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=single-file-notice.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"single-file-notice.js","sourceRoot":"","sources":["../../src/declared/single-file-notice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,wGAAwG;AACxG,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO;QACL,OAAO,EAAE,IAAI,OAAO,yCAAyC,UAAU,CAAC,OAAO,CAAC,gJAAgJ;QAChO,GAAG,EAAE,qJAAqJ,UAAU,CAAC,OAAO,CAAC,2CAA2C;KACzN,CAAC;AACJ,CAAC"}
|