@ddd-ts-kit/eslint-plugin 0.1.1 → 0.3.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/README.md +6 -1
- package/dist/project/config.d.ts +6 -0
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/is-judged.d.ts +5 -0
- package/dist/project/is-judged.d.ts.map +1 -0
- package/dist/project/is-judged.js +7 -0
- package/dist/project/is-judged.js.map +1 -0
- package/dist/project/parse-config.d.ts.map +1 -1
- package/dist/project/parse-config.js +6 -0
- package/dist/project/parse-config.js.map +1 -1
- package/dist/project/resolve-import.d.ts.map +1 -1
- package/dist/project/resolve-import.js +4 -1
- package/dist/project/resolve-import.js.map +1 -1
- package/dist/project/specifier-suffix.d.ts +6 -0
- package/dist/project/specifier-suffix.d.ts.map +1 -0
- package/dist/project/specifier-suffix.js +8 -0
- package/dist/project/specifier-suffix.js.map +1 -0
- package/dist/project/to-alias.d.ts +3 -2
- package/dist/project/to-alias.d.ts.map +1 -1
- package/dist/project/to-alias.js +4 -3
- package/dist/project/to-alias.js.map +1 -1
- package/dist/rules/clean-one-export-per-file.js +7 -3
- package/dist/rules/clean-one-export-per-file.js.map +1 -1
- package/dist/rules/declarations-constructor-injection.d.ts +5 -0
- package/dist/rules/declarations-constructor-injection.d.ts.map +1 -0
- package/dist/rules/declarations-constructor-injection.js +80 -0
- package/dist/rules/declarations-constructor-injection.js.map +1 -0
- package/dist/rules/domain-no-generic-error.js +1 -1
- package/dist/rules/domain-no-generic-error.js.map +1 -1
- package/dist/rules/errors-constructor-not-public.d.ts +2 -0
- package/dist/rules/errors-constructor-not-public.d.ts.map +1 -0
- package/dist/rules/errors-constructor-not-public.js +41 -0
- package/dist/rules/errors-constructor-not-public.js.map +1 -0
- package/dist/rules/errors-factory-name.d.ts +4 -0
- package/dist/rules/errors-factory-name.d.ts.map +1 -0
- package/dist/rules/errors-factory-name.js +88 -0
- package/dist/rules/errors-factory-name.js.map +1 -0
- package/dist/rules/errors-through-factory.d.ts +2 -0
- package/dist/rules/errors-through-factory.d.ts.map +1 -0
- package/dist/rules/errors-through-factory.js +39 -0
- package/dist/rules/errors-through-factory.js.map +1 -0
- package/dist/rules/imports-alias-only.d.ts.map +1 -1
- package/dist/rules/imports-alias-only.js +7 -9
- package/dist/rules/imports-alias-only.js.map +1 -1
- package/dist/rules/imports-extension.d.ts +5 -0
- package/dist/rules/imports-extension.d.ts.map +1 -0
- package/dist/rules/imports-extension.js +45 -0
- package/dist/rules/imports-extension.js.map +1 -0
- package/dist/rules/ports-no-concrete-dependency.d.ts +3 -1
- package/dist/rules/ports-no-concrete-dependency.d.ts.map +1 -1
- package/dist/rules/ports-no-concrete-dependency.js +51 -3
- package/dist/rules/ports-no-concrete-dependency.js.map +1 -1
- package/dist/rules/rules.d.ts.map +1 -1
- package/dist/rules/rules.js +10 -0
- package/dist/rules/rules.js.map +1 -1
- package/dist/support/declarations/declared-roles.d.ts.map +1 -1
- package/dist/support/declarations/declared-roles.js +1 -0
- package/dist/support/declarations/declared-roles.js.map +1 -1
- package/dist/support/errors/constant-case.d.ts +3 -0
- package/dist/support/errors/constant-case.d.ts.map +1 -0
- package/dist/support/errors/constant-case.js +6 -0
- package/dist/support/errors/constant-case.js.map +1 -0
- package/dist/support/errors/is-error-class.d.ts +4 -0
- package/dist/support/errors/is-error-class.d.ts.map +1 -0
- package/dist/support/errors/is-error-class.js +6 -0
- package/dist/support/errors/is-error-class.js.map +1 -0
- package/dist/support/errors/is-error-file.d.ts +4 -0
- package/dist/support/errors/is-error-file.d.ts.map +1 -0
- package/dist/support/errors/is-error-file.js +10 -0
- package/dist/support/errors/is-error-file.js.map +1 -0
- package/dist/support/injection/language-types.d.ts +3 -0
- package/dist/support/injection/language-types.d.ts.map +1 -0
- package/dist/support/injection/language-types.js +20 -0
- package/dist/support/injection/language-types.js.map +1 -0
- package/dist/support/injection/not-classes.d.ts +4 -0
- package/dist/support/injection/not-classes.d.ts.map +1 -0
- package/dist/support/injection/not-classes.js +20 -0
- package/dist/support/injection/not-classes.js.map +1 -0
- package/dist/support/injection/parameter-reading.d.ts +9 -0
- package/dist/support/injection/parameter-reading.d.ts.map +1 -0
- package/dist/support/injection/parameter-reading.js +2 -0
- package/dist/support/injection/parameter-reading.js.map +1 -0
- package/dist/support/injection/read-parameter.d.ts +9 -0
- package/dist/support/injection/read-parameter.d.ts.map +1 -0
- package/dist/support/injection/read-parameter.js +41 -0
- package/dist/support/injection/read-parameter.js.map +1 -0
- package/dist/support/injection/written-name.d.ts +4 -0
- package/dist/support/injection/written-name.d.ts.map +1 -0
- package/dist/support/injection/written-name.js +13 -0
- package/dist/support/injection/written-name.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/rules/clean-one-export-per-file.md +1 -1
- package/docs/rules/context-declared-relationship.md +2 -2
- package/docs/rules/context-extractable.md +3 -3
- package/docs/rules/context-published-language-is-a-contract.md +1 -1
- package/docs/rules/context-published-language-only.md +2 -2
- package/docs/rules/declarations-constructor-injection.md +89 -0
- package/docs/rules/declarations-role-declared.md +15 -9
- package/docs/rules/domain-events-transactional-before-commit.md +1 -1
- package/docs/rules/errors-constructor-not-public.md +53 -0
- package/docs/rules/errors-factory-name.md +50 -0
- package/docs/rules/errors-through-factory.md +45 -0
- package/docs/rules/imports-alias-only.md +10 -9
- package/docs/rules/imports-extension.md +83 -0
- package/docs/rules/layer-application-inward.md +3 -3
- package/docs/rules/layer-domain-purity.md +3 -3
- package/docs/rules/layer-infrastructure-no-presentation.md +2 -2
- package/docs/rules/layer-presentation-no-infrastructure.md +2 -2
- package/docs/rules/ports-no-concrete-dependency.md +4 -3
- package/docs/rules/test-no-mocks.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-factory-name.js","sourceRoot":"","sources":["../../src/rules/errors-factory-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0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AAE,EAAE,EAAE,CAAC,CAAC;QAErG,OAAO;IACT,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IACzG,CAAC;AACH,CAAC;AAED,2GAA2G;AAC3G,SAAS,aAAa,CAAC,EAAE,IAAI,EAAE,OAAO,EAAW;IAC/C,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;IAE5D,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,IAAI,OAAO,EAAE,EAAE,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-through-factory.d.ts","sourceRoot":"","sources":["../../src/rules/errors-through-factory.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB,uKAkC/B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
+
import { defineRule } from '../support/rule/define-rule.js';
|
|
3
|
+
const ERRORS_DIRECTORY = /(^|\/)domain\/errors\//;
|
|
4
|
+
export const errorsThroughFactory = defineRule({
|
|
5
|
+
id: 'errors/through-factory',
|
|
6
|
+
type: 'problem',
|
|
7
|
+
recommended: 'error',
|
|
8
|
+
description: 'Under "stack.refusals": "factories", a domain error is built by a static factory of its concept class: no `new` of a class of domain/errors/ outside that class.',
|
|
9
|
+
messages: {
|
|
10
|
+
constructed: '`new {{name}}(...)` builds a refusal outside its error class, with whatever code and message the caller writes. Call the static factory named after the refusal, `throw <Concept>Error.<refusal>(...)`, and add it when it is missing: `ddd-ts-kit generate error {{context}} <Concept> <refusal>`.',
|
|
11
|
+
},
|
|
12
|
+
create({ file, report }) {
|
|
13
|
+
const { location } = file;
|
|
14
|
+
if (file.config.stack.refusals !== 'factories' || location.area !== 'context') {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
const errors = new Set();
|
|
18
|
+
return {
|
|
19
|
+
ImportDeclaration(node) {
|
|
20
|
+
if (ERRORS_DIRECTORY.test(node.source.value)) {
|
|
21
|
+
for (const name of importedNames(node)) {
|
|
22
|
+
errors.add(name);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
NewExpression(node) {
|
|
27
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier && errors.has(node.callee.name)) {
|
|
28
|
+
report({ node, messageId: 'constructed', data: { name: node.callee.name, context: location.context } });
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
function importedNames(node) {
|
|
35
|
+
return node.specifiers
|
|
36
|
+
.filter((specifier) => specifier.type === AST_NODE_TYPES.ImportSpecifier)
|
|
37
|
+
.map((specifier) => specifier.local.name);
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=errors-through-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-through-factory.js","sourceRoot":"","sources":["../../src/rules/errors-through-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD,MAAM,CA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CAAC,UAAU;SACnB,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,eAAe,CAAC;SACxE,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports-alias-only.d.ts","sourceRoot":"","sources":["../../src/rules/imports-alias-only.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"imports-alias-only.d.ts","sourceRoot":"","sources":["../../src/rules/imports-alias-only.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAUnE,KAAK,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAKpD,eAAO,MAAM,gBAAgB,2FA8B3B,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { aliasRoots } from '../project/alias-roots.js';
|
|
3
|
+
import { isJudged } from '../project/is-judged.js';
|
|
4
|
+
import { specifierSuffix } from '../project/specifier-suffix.js';
|
|
3
5
|
import { toAlias } from '../project/to-alias.js';
|
|
4
6
|
import { importListener } from '../support/imports/import-listener.js';
|
|
5
7
|
import { defineRule } from '../support/rule/define-rule.js';
|
|
6
8
|
const RELATIVE = /^\.{1,2}(?:\/|$)/;
|
|
7
9
|
const DOT_SEGMENT = /\/\.{1,2}(?:\/|$)/;
|
|
8
|
-
/** Written by a tool and never linted as project code. */
|
|
9
|
-
const BUILD_PRODUCTS = ['generated'];
|
|
10
10
|
export const importsAliasOnly = defineRule({
|
|
11
11
|
id: 'imports/alias-only',
|
|
12
12
|
type: 'suggestion',
|
|
@@ -24,19 +24,17 @@ export const importsAliasOnly = defineRule({
|
|
|
24
24
|
return {};
|
|
25
25
|
}
|
|
26
26
|
return importListener(file, ({ node, specifier }) => {
|
|
27
|
-
const finding = RELATIVE.test(specifier) ? relative(
|
|
27
|
+
const finding = RELATIVE.test(specifier) ? relative(file, specifier) : dotSegment(roots, specifier);
|
|
28
28
|
if (finding !== undefined) {
|
|
29
29
|
report({ node, ...finding, ...fixOf(node, finding) });
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function relative(roots, file, specifier) {
|
|
39
|
-
const alias = toAlias(roots, path.posix.join(path.posix.dirname(file.path), specifier));
|
|
34
|
+
function relative(file, specifier) {
|
|
35
|
+
const roots = aliasRoots(file.config);
|
|
36
|
+
const suffix = specifierSuffix(file.config.importExtension);
|
|
37
|
+
const alias = toAlias(roots, path.posix.join(path.posix.dirname(file.path), specifier), suffix);
|
|
40
38
|
if (alias !== undefined) {
|
|
41
39
|
return { messageId: 'relative', data: { specifier, alias } };
|
|
42
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports-alias-only.js","sourceRoot":"","sources":["../../src/rules/imports-alias-only.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"imports-alias-only.js","sourceRoot":"","sources":["../../src/rules/imports-alias-only.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC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AM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IAE5B,IAAI,SAAS,KAAK,UAAU,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;AACnG,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
type MessageId = 'unexpected' | 'missing';
|
|
3
|
+
export declare const importsExtension: TSESLint.RuleModule<MessageId, [], import("../index.js").RuleDocs, TSESLint.RuleListener>;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=imports-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports-extension.d.ts","sourceRoot":"","sources":["../../src/rules/imports-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAY,MAAM,0BAA0B,CAAC;AAOnE,KAAK,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAM1C,eAAO,MAAM,gBAAgB,2FA6B3B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { aliasRoots } from '../project/alias-roots.js';
|
|
2
|
+
import { isJudged } from '../project/is-judged.js';
|
|
3
|
+
import { specifierSuffix } from '../project/specifier-suffix.js';
|
|
4
|
+
import { importListener } from '../support/imports/import-listener.js';
|
|
5
|
+
import { defineRule } from '../support/rule/define-rule.js';
|
|
6
|
+
/** The extensions a module of the project or the file emitted for it can bear. */
|
|
7
|
+
const EXTENSION = /\.(?:[cm]?js|[cm]?ts)$/;
|
|
8
|
+
const EMITTED = /\.[cm]?js$/;
|
|
9
|
+
export const importsExtension = defineRule({
|
|
10
|
+
id: 'imports/extension',
|
|
11
|
+
type: 'suggestion',
|
|
12
|
+
recommended: 'error',
|
|
13
|
+
fixable: 'code',
|
|
14
|
+
description: 'An import of a file of the project ends as "importExtension" says: with no extension under `none`, with `.js` under `js`.',
|
|
15
|
+
messages: {
|
|
16
|
+
unexpected: '"{{specifier}}" ends with "{{extension}}" although "importExtension" is "none". Write \'{{expected}}\': the compiler and every tool that reads the sources resolve the file without its extension, and the build writes the ".js" Node needs into the compiled output.',
|
|
17
|
+
missing: '"{{specifier}}" does not end with ".js" although "importExtension" is "js". Write \'{{expected}}\', the name of the file the compiler emits: the compiler resolves as Node does and refuses any other spelling.',
|
|
18
|
+
},
|
|
19
|
+
create({ file, report }) {
|
|
20
|
+
const roots = aliasRoots(file.config);
|
|
21
|
+
const suffix = specifierSuffix(file.config.importExtension);
|
|
22
|
+
if (!isJudged(roots, file)) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
return importListener(file, ({ node, specifier }) => {
|
|
26
|
+
const finding = roots.some(({ prefix }) => specifier.startsWith(prefix)) ? judged(specifier, suffix) : undefined;
|
|
27
|
+
if (finding !== undefined) {
|
|
28
|
+
report({ node, ...finding, fix: fixOf(node, finding.data.expected) });
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
function judged(specifier, suffix) {
|
|
34
|
+
const extension = EXTENSION.exec(specifier)?.[0] ?? '';
|
|
35
|
+
const expected = `${specifier.slice(0, specifier.length - extension.length)}${suffix}`;
|
|
36
|
+
if (suffix === '') {
|
|
37
|
+
return extension === '' ? undefined : { messageId: 'unexpected', data: { specifier, extension, expected } };
|
|
38
|
+
}
|
|
39
|
+
return EMITTED.test(specifier) ? undefined : { messageId: 'missing', data: { specifier, extension, expected } };
|
|
40
|
+
}
|
|
41
|
+
/** The specifier rewritten in place, between the quotes it was written with. */
|
|
42
|
+
function fixOf(node, expected) {
|
|
43
|
+
return (fixer) => fixer.replaceTextRange([node.range[0] + 1, node.range[1] - 1], expected);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=imports-extension.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports-extension.js","sourceRoot":"","sources":["../../src/rules/imports-extension.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,kFAAkF;AAClF,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAC3C,MAAM,OAAO,GAAG,YAAY,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAY;IACpD,EAAE,EAAE,mBAAmB;IACvB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,MAAM;IACf,WAAW,EACT,2HAA2H;IAC7H,QAAQ,EAAE;QACR,UAAU,EACR,wQAAwQ;QAC1Q,OAAO,EACL,iNAAiN;KACpN;IACD,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;QACrB,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QAE5D,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;YAC3B,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,OAAO,cAAc,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;YAClD,MAAM,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,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type MessageId = 'concrete' | 'typed';
|
|
2
|
+
export declare const portsNoConcreteDependency: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageId, [], import("../index.js").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
3
|
+
export {};
|
|
2
4
|
//# sourceMappingURL=ports-no-concrete-dependency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ports-no-concrete-dependency.d.ts","sourceRoot":"","sources":["../../src/rules/ports-no-concrete-dependency.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ports-no-concrete-dependency.d.ts","sourceRoot":"","sources":["../../src/rules/ports-no-concrete-dependency.ts"],"names":[],"mappings":"AAcA,KAAK,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEtC,eAAO,MAAM,yBAAyB,mKAqCpC,CAAC"}
|
|
@@ -1,24 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
+
import { constructorOf } from '../support/classes/constructor-of.js';
|
|
3
|
+
import { ACCESS_DECORATORS } from '../support/declarations/access-decorators.js';
|
|
4
|
+
import { declarationReader } from '../support/declarations/declaration-reader.js';
|
|
5
|
+
import { declaredRoleOf } from '../support/declarations/declared-role-of.js';
|
|
6
|
+
import { isDeclaredStyle } from '../support/declarations/is-declared-style.js';
|
|
2
7
|
import { dependencyListListener } from '../support/ports/dependency-list-listener.js';
|
|
3
8
|
import { importedBindings } from '../support/ports/imported-bindings.js';
|
|
9
|
+
import { defineRule } from '../support/rule/define-rule.js';
|
|
4
10
|
export const portsNoConcreteDependency = defineRule({
|
|
5
11
|
id: 'ports/no-concrete-dependency',
|
|
6
12
|
type: 'problem',
|
|
7
13
|
recommended: 'error',
|
|
8
|
-
description: 'A dependency
|
|
14
|
+
description: 'A dependency is named by its port, never by the class that implements one: nothing imported from infrastructure/ or from test/fakes/ in a dependency list, nor as the type of a constructor parameter of a declared class.',
|
|
9
15
|
messages: {
|
|
10
16
|
concrete: '{{name}} is named in a dependency list but comes from {{where}}: a list names ports, never what implements them. Name the port (the abstract class of domain/repositories or application/ports that {{name}} implements) and let the declaration of the adapter, the module file or a `fake(Port, ..)` of the test say which class stands behind it.',
|
|
17
|
+
typed: '{{name}} types a constructor parameter of a declared class but comes from {{where}}: a parameter is typed by a port, never by what implements it. Type it by the port (the abstract class of domain/repositories or application/ports that {{name}} implements): the adapter, or a `fake(Port, ..)` of the test, is bound to that port at the composition root.',
|
|
11
18
|
},
|
|
12
19
|
create({ file, sourceCode, report }) {
|
|
13
20
|
const imported = importedBindings(file, sourceCode.ast);
|
|
14
|
-
|
|
21
|
+
const lists = dependencyListListener(sourceCode.ast, (dependency) => {
|
|
15
22
|
const where = concretePlace(imported.get(dependency.name)?.target);
|
|
16
23
|
if (where !== undefined) {
|
|
17
24
|
report({ node: dependency, messageId: 'concrete', data: { name: dependency.name, where } });
|
|
18
25
|
}
|
|
19
26
|
});
|
|
27
|
+
const judgeClass = signatureJudge(file, sourceCode.ast, { imported, report });
|
|
28
|
+
return {
|
|
29
|
+
...lists,
|
|
30
|
+
ClassDeclaration(node) {
|
|
31
|
+
lists.ClassDeclaration?.(node);
|
|
32
|
+
judgeClass(node);
|
|
33
|
+
},
|
|
34
|
+
ClassExpression(node) {
|
|
35
|
+
lists.ClassExpression?.(node);
|
|
36
|
+
judgeClass(node);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
20
39
|
},
|
|
21
40
|
});
|
|
41
|
+
/** A declared class that lists nothing states its dependencies in its constructor: its parameter types are the list. */
|
|
42
|
+
function signatureJudge(file, program, { imported, report }) {
|
|
43
|
+
if (file.isTest || !isDeclaredStyle(file) || declaredRoleOf(file) === undefined) {
|
|
44
|
+
return () => undefined;
|
|
45
|
+
}
|
|
46
|
+
const declarationsOf = declarationReader(program);
|
|
47
|
+
return (node) => {
|
|
48
|
+
const [declaration] = declarationsOf(node).filter(({ name }) => !ACCESS_DECORATORS.has(name));
|
|
49
|
+
if (declaration === undefined || declaration.arguments.at(-1)?.type === AST_NODE_TYPES.ArrayExpression) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
for (const type of parameterTypes(constructorOf(node.body))) {
|
|
53
|
+
const where = concretePlace(imported.get(type.name)?.target);
|
|
54
|
+
if (where !== undefined) {
|
|
55
|
+
report({ node: type, messageId: 'typed', data: { name: type.name, where } });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
/** The class name each parameter of a constructor is typed by, when it is typed by one. */
|
|
61
|
+
function parameterTypes(written) {
|
|
62
|
+
return (written?.value.params ?? []).flatMap((node) => {
|
|
63
|
+
const parameter = node.type === AST_NODE_TYPES.TSParameterProperty ? node.parameter : node;
|
|
64
|
+
const type = parameter.type === AST_NODE_TYPES.Identifier ? parameter.typeAnnotation?.typeAnnotation : undefined;
|
|
65
|
+
return type?.type === AST_NODE_TYPES.TSTypeReference && type.typeName.type === AST_NODE_TYPES.Identifier
|
|
66
|
+
? [type.typeName]
|
|
67
|
+
: [];
|
|
68
|
+
});
|
|
69
|
+
}
|
|
22
70
|
function concretePlace(target) {
|
|
23
71
|
if (target?.kind !== 'file' || target.location.area !== 'context') {
|
|
24
72
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ports-no-concrete-dependency.js","sourceRoot":"","sources":["../../src/rules/ports-no-concrete-dependency.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ports-no-concrete-dependency.js","sour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,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC;IAE1C,IAAI,KAAK,KAAK,gBAAgB,EAAE,CAAC;QAC/B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,OAAO,KAAK,KAAK,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAC;AA8GlE,+HAA+H;AAC/H,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnD,CAAC"}
|
package/dist/rules/rules.js
CHANGED
|
@@ -17,17 +17,22 @@ import { cleanOneExportPerFile } from './clean-one-export-per-file.js';
|
|
|
17
17
|
import { cleanStepdown } from './clean-stepdown.js';
|
|
18
18
|
import { contextExtractable } from './context-extractable.js';
|
|
19
19
|
import { contextDeclaredRelationship, contextPublishedLanguageIsAContract, contextPublishedLanguageOnly, } from './context-boundaries.js';
|
|
20
|
+
import { declarationsConstructorInjection } from './declarations-constructor-injection.js';
|
|
20
21
|
import { declarationsRoleDeclared } from './declarations-role-declared.js';
|
|
21
22
|
import { domainAggregateEncapsulation } from './domain-aggregate-encapsulation.js';
|
|
22
23
|
import { domainEventsDispatchedOnSave } from './domain-events-dispatched-on-save.js';
|
|
23
24
|
import { domainEventsTransactionalBeforeCommit } from './domain-events-transactional-before-commit.js';
|
|
24
25
|
import { domainNoGenericError } from './domain-no-generic-error.js';
|
|
26
|
+
import { errorsConstructorNotPublic } from './errors-constructor-not-public.js';
|
|
27
|
+
import { errorsFactoryName } from './errors-factory-name.js';
|
|
28
|
+
import { errorsThroughFactory } from './errors-through-factory.js';
|
|
25
29
|
import { domainValueObjectImmutability } from './domain-value-object-immutability.js';
|
|
26
30
|
import { eventsConsumerIdempotent } from './events-consumer-idempotent.js';
|
|
27
31
|
import { eventsNameFormat } from './events-name-format.js';
|
|
28
32
|
import { eventsOutboxRequired } from './events-outbox-required.js';
|
|
29
33
|
import { governanceRecordedDeviation } from './governance-recorded-deviation.js';
|
|
30
34
|
import { importsAliasOnly } from './imports-alias-only.js';
|
|
35
|
+
import { importsExtension } from './imports-extension.js';
|
|
31
36
|
import { layerApplicationInward } from './layer-application-inward.js';
|
|
32
37
|
import { layerDomainPurity } from './layer-domain-purity.js';
|
|
33
38
|
import { layerInfrastructureNoPresentation, layerPresentationNoInfrastructure } from './layer-sideways.js';
|
|
@@ -66,6 +71,9 @@ const ALL = [
|
|
|
66
71
|
domainAggregateEncapsulation,
|
|
67
72
|
domainValueObjectImmutability,
|
|
68
73
|
domainNoGenericError,
|
|
74
|
+
errorsThroughFactory,
|
|
75
|
+
errorsConstructorNotPublic,
|
|
76
|
+
errorsFactoryName,
|
|
69
77
|
applicationHandlerShape,
|
|
70
78
|
applicationCommandQuerySeparation,
|
|
71
79
|
domainEventsDispatchedOnSave,
|
|
@@ -83,6 +91,7 @@ const ALL = [
|
|
|
83
91
|
standardNoParallelInterface,
|
|
84
92
|
governanceRecordedDeviation,
|
|
85
93
|
declarationsRoleDeclared,
|
|
94
|
+
declarationsConstructorInjection,
|
|
86
95
|
portsAbstractClass,
|
|
87
96
|
portsImplementsNeverExtends,
|
|
88
97
|
portsNoTokenConstant,
|
|
@@ -91,6 +100,7 @@ const ALL = [
|
|
|
91
100
|
schedulingJobTriggersUseCase,
|
|
92
101
|
schedulingJobName,
|
|
93
102
|
importsAliasOnly,
|
|
103
|
+
importsExtension,
|
|
94
104
|
];
|
|
95
105
|
/** Keyed by ESLint name: the id of docs/ARCHITECTURE.md with its slash replaced by a dash, or the name of a companion rule. */
|
|
96
106
|
export const rules = Object.fromEntries(ALL.map((rule) => [docsOf(rule).name, rule]));
|
package/dist/rules/rules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/rules/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,aAAa,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CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-roles.d.ts","sourceRoot":"","sources":["../../../src/support/declarations/declared-roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,uFAAuF;AACvF,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,
|
|
1
|
+
{"version":3,"file":"declared-roles.d.ts","sourceRoot":"","sources":["../../../src/support/declarations/declared-roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,uFAAuF;AACvF,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAkBjD,CAAC"}
|
|
@@ -13,6 +13,7 @@ export const DECLARED_ROLES = [
|
|
|
13
13
|
{ suffix: 'publisher', folders: ['application/integration/publishers'], decorators: ['DomainEventHandler'] },
|
|
14
14
|
{ suffix: 'policy', folders: ['application/authorization'], decorators: ['Policy'] },
|
|
15
15
|
{ suffix: 'job', folders: ['application/scheduling'], decorators: ['Scheduled'] },
|
|
16
|
+
{ suffix: 'projection', folders: ['application/projections'], decorators: ['Projection'] },
|
|
16
17
|
{ suffix: 'repository', folders: ['infrastructure/persistence'], decorators: ['Repository'] },
|
|
17
18
|
{ suffix: 'gateway', folders: ['infrastructure'], decorators: ['Gateway'] },
|
|
18
19
|
{ suffix: 'adapter', folders: ['infrastructure'], decorators: ['Adapter'] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-roles.js","sourceRoot":"","sources":["../../../src/support/declarations/declared-roles.ts"],"names":[],"mappings":"AAEA,uFAAuF;AACvF,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,sBAAsB,CAAC,EAAE,UAAU,EAA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C,WAAW,CAAC,EAAE;IACjF,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,yBAAyB,CAAC,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,EAAE;IAC1F,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,4BAA4B,CAAC,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,EAAE;IAC7F,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE;IAC3E,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE;CAC5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant-case.d.ts","sourceRoot":"","sources":["../../../src/support/errors/constant-case.ts"],"names":[],"mappings":"AAEA,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant-case.js","sourceRoot":"","sources":["../../../src/support/errors/constant-case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,0DAA0D;AAC1D,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ClassNode } from '../classes/class-name.js';
|
|
2
|
+
/** A class of an error file that extends something: `ConceptError`, `DomainError`, or a base of the project. */
|
|
3
|
+
export declare function isErrorClass(node: ClassNode): boolean;
|
|
4
|
+
//# sourceMappingURL=is-error-class.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-error-class.d.ts","sourceRoot":"","sources":["../../../src/support/errors/is-error-class.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,gHAAgH;AAChH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
+
/** A class of an error file that extends something: `ConceptError`, `DomainError`, or a base of the project. */
|
|
3
|
+
export function isErrorClass(node) {
|
|
4
|
+
return node.superClass?.type === AST_NODE_TYPES.Identifier;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=is-error-class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-error-class.js","sourceRoot":"","sources":["../../../src/support/errors/is-error-class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,gHAAgH;AAChH,MAAM,UAAU,YAAY,CAAC,IAAe;IAC1C,OAAO,IAAI,CAAC,UAAU,EAAE,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LintedFile } from '../../project/linted-file.js';
|
|
2
|
+
/** A production file of `domain/errors/` of a context, in a project that builds its refusals through factories. */
|
|
3
|
+
export declare function isErrorFile(file: LintedFile): boolean;
|
|
4
|
+
//# sourceMappingURL=is-error-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-error-file.d.ts","sourceRoot":"","sources":["../../../src/support/errors/is-error-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,mHAAmH;AACnH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAUrD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** A production file of `domain/errors/` of a context, in a project that builds its refusals through factories. */
|
|
2
|
+
export function isErrorFile(file) {
|
|
3
|
+
const { location } = file;
|
|
4
|
+
return (file.config.stack.refusals === 'factories' &&
|
|
5
|
+
location.area === 'context' &&
|
|
6
|
+
location.layer === 'domain' &&
|
|
7
|
+
location.inside[0] === 'errors' &&
|
|
8
|
+
!file.isTest);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=is-error-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-error-file.js","sourceRoot":"","sources":["../../../src/support/errors/is-error-file.ts"],"names":[],"mappings":"AAEA,mHAAmH;AACnH,MAAM,UAAU,WAAW,CAAC,IAAgB;IAC1C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE1B,OAAO,CACL,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,KAAK,WAAW;QAC1C,QAAQ,CAAC,IAAI,KAAK,SAAS;QAC3B,QAAQ,CAAC,KAAK,KAAK,QAAQ;QAC3B,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC/B,CAAC,IAAI,CAAC,MAAM,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-types.d.ts","sourceRoot":"","sources":["../../../src/support/injection/language-types.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAiB7C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Types of the language and of its standard library: they exist for every program, so they name no dependency of one. */
|
|
2
|
+
export const LANGUAGE_TYPES = new Set([
|
|
3
|
+
'Date',
|
|
4
|
+
'Map',
|
|
5
|
+
'Set',
|
|
6
|
+
'Array',
|
|
7
|
+
'ReadonlyArray',
|
|
8
|
+
'Record',
|
|
9
|
+
'Promise',
|
|
10
|
+
'Function',
|
|
11
|
+
'RegExp',
|
|
12
|
+
'Error',
|
|
13
|
+
'URL',
|
|
14
|
+
'Buffer',
|
|
15
|
+
'Partial',
|
|
16
|
+
'Readonly',
|
|
17
|
+
'Pick',
|
|
18
|
+
'Omit',
|
|
19
|
+
]);
|
|
20
|
+
//# sourceMappingURL=language-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-types.js","sourceRoot":"","sources":["../../../src/support/injection/language-types.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,MAAM,CAAC,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACzD,MAAM;IACN,KAAK;IACL,KAAK;IACL,OAAO;IACP,eAAe;IACf,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,OAAO;IACP,KAAK;IACL,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,MAAM;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type TSESTree } from '@typescript-eslint/utils';
|
|
2
|
+
/** The names a program declares at its top level as an interface, a type alias or an enum, with what each is. */
|
|
3
|
+
export declare function notClasses(program: TSESTree.Program): ReadonlyMap<string, string>;
|
|
4
|
+
//# sourceMappingURL=not-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-classes.d.ts","sourceRoot":"","sources":["../../../src/support/injection/not-classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQzE,iHAAiH;AACjH,wBAAgB,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAejF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
+
const KINDS = {
|
|
3
|
+
[AST_NODE_TYPES.TSInterfaceDeclaration]: 'an interface',
|
|
4
|
+
[AST_NODE_TYPES.TSTypeAliasDeclaration]: 'a type alias',
|
|
5
|
+
[AST_NODE_TYPES.TSEnumDeclaration]: 'an enum',
|
|
6
|
+
};
|
|
7
|
+
/** The names a program declares at its top level as an interface, a type alias or an enum, with what each is. */
|
|
8
|
+
export function notClasses(program) {
|
|
9
|
+
const declared = program.body.flatMap((statement) => {
|
|
10
|
+
const declaration = statement.type === AST_NODE_TYPES.ExportNamedDeclaration && statement.declaration !== null
|
|
11
|
+
? statement.declaration
|
|
12
|
+
: statement;
|
|
13
|
+
const what = KINDS[declaration.type];
|
|
14
|
+
return what !== undefined && 'id' in declaration && declaration.id?.type === AST_NODE_TYPES.Identifier
|
|
15
|
+
? [[declaration.id.name, what]]
|
|
16
|
+
: [];
|
|
17
|
+
});
|
|
18
|
+
return new Map(declared);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=not-classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-classes.js","sourceRoot":"","sources":["../../../src/support/injection/not-classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AAEzE,MAAM,KAAK,GAAsD;IAC/D,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,cAAc;IACvD,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,cAAc;IACvD,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,SAAS;CAC9C,CAAC;AAEF,iHAAiH;AACjH,MAAM,UAAU,UAAU,CAAC,OAAyB;IAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,EAAsB,EAAE;QACtE,MAAM,WAAW,GACf,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,IAAI,SAAS,CAAC,WAAW,KAAK,IAAI;YACxF,CAAC,CAAC,SAAS,CAAC,WAAW;YACvB,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAErC,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,IAAI,WAAW,IAAI,WAAW,CAAC,EAAE,EAAE,IAAI,KAAK,cAAc,CAAC,UAAU;YACpG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC,CAAC,EAAE,CAAC;IACT,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** What a constructor parameter says of a dependency: the class that types it, or why it names none. */
|
|
2
|
+
export type ParameterReading = {
|
|
3
|
+
readonly token: string;
|
|
4
|
+
readonly flaw?: undefined;
|
|
5
|
+
} | {
|
|
6
|
+
readonly flaw: string;
|
|
7
|
+
readonly token?: undefined;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=parameter-reading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-reading.d.ts","sourceRoot":"","sources":["../../../src/support/injection/parameter-reading.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameter-reading.js","sourceRoot":"","sources":["../../../src/support/injection/parameter-reading.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TSESTree } from '@typescript-eslint/utils';
|
|
2
|
+
import type { ParameterReading } from './parameter-reading.js';
|
|
3
|
+
/**
|
|
4
|
+
* Reads one constructor parameter of a declared class. `notClasses` are the names the file
|
|
5
|
+
* declares as an interface, a type alias or an enum: what another file declares is read by
|
|
6
|
+
* `ddd-ts-kit check`, which sees the project.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readParameter(node: TSESTree.Parameter, notClasses: ReadonlyMap<string, string>): ParameterReading;
|
|
9
|
+
//# sourceMappingURL=read-parameter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-parameter.d.ts","sourceRoot":"","sources":["../../../src/support/injection/read-parameter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,gBAAgB,CAoBjH"}
|