@opensip-cli/checks-universal 0.1.9 → 0.1.11
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 +4 -2
- package/dist/__tests__/all-checks-execute.test.d.ts.map +1 -1
- package/dist/__tests__/all-checks-execute.test.js +0 -1
- package/dist/__tests__/all-checks-execute.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-10.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-10.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-10.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-11.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-11.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-11.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-12.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-12.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-12.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-2.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-2.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-2.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-3.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-3.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-3.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-4.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-4.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-4.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-5.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-5.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-5.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-6.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-6.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-6.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-7.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-7.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-7.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-8.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-8.test.js +2 -3
- package/dist/__tests__/behavior-fixtures-8.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures-9.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures-9.test.js +0 -1
- package/dist/__tests__/behavior-fixtures-9.test.js.map +1 -1
- package/dist/__tests__/behavior-fixtures.test.d.ts.map +1 -1
- package/dist/__tests__/behavior-fixtures.test.js +10 -9
- package/dist/__tests__/behavior-fixtures.test.js.map +1 -1
- package/dist/__tests__/file-length-limit.test.js +12 -1
- package/dist/__tests__/file-length-limit.test.js.map +1 -1
- package/dist/checks/architecture/__tests__/tool-identity-single-source.test.d.ts +2 -0
- package/dist/checks/architecture/__tests__/tool-identity-single-source.test.d.ts.map +1 -0
- package/dist/checks/architecture/__tests__/tool-identity-single-source.test.js +61 -0
- package/dist/checks/architecture/__tests__/tool-identity-single-source.test.js.map +1 -0
- package/dist/checks/architecture/docker-best-practices-analyze.d.ts +7 -0
- package/dist/checks/architecture/docker-best-practices-analyze.d.ts.map +1 -0
- package/dist/checks/architecture/docker-best-practices-analyze.js +301 -0
- package/dist/checks/architecture/docker-best-practices-analyze.js.map +1 -0
- package/dist/checks/architecture/docker-best-practices-patterns.d.ts +50 -0
- package/dist/checks/architecture/docker-best-practices-patterns.d.ts.map +1 -0
- package/dist/checks/architecture/docker-best-practices-patterns.js +51 -0
- package/dist/checks/architecture/docker-best-practices-patterns.js.map +1 -0
- package/dist/checks/architecture/docker-best-practices.d.ts.map +1 -1
- package/dist/checks/architecture/docker-best-practices.js +1 -367
- package/dist/checks/architecture/docker-best-practices.js.map +1 -1
- package/dist/checks/architecture/docker-ignore-validation.d.ts.map +1 -1
- package/dist/checks/architecture/docker-ignore-validation.js +0 -1
- package/dist/checks/architecture/docker-ignore-validation.js.map +1 -1
- package/dist/checks/architecture/docker-version-sync.d.ts.map +1 -1
- package/dist/checks/architecture/docker-version-sync.js +0 -1
- package/dist/checks/architecture/docker-version-sync.js.map +1 -1
- package/dist/checks/architecture/heavy-import-detection.d.ts.map +1 -1
- package/dist/checks/architecture/heavy-import-detection.js +1 -0
- package/dist/checks/architecture/heavy-import-detection.js.map +1 -1
- package/dist/checks/architecture/index.d.ts +1 -0
- package/dist/checks/architecture/index.d.ts.map +1 -1
- package/dist/checks/architecture/index.js +1 -0
- package/dist/checks/architecture/index.js.map +1 -1
- package/dist/checks/architecture/modules/empty-package-detection.d.ts.map +1 -1
- package/dist/checks/architecture/modules/empty-package-detection.js +0 -1
- package/dist/checks/architecture/modules/empty-package-detection.js.map +1 -1
- package/dist/checks/architecture/modules/interface-implementation-consistency-constants.d.ts +16 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-constants.d.ts.map +1 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-constants.js +182 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-constants.js.map +1 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-parse.d.ts +23 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-parse.d.ts.map +1 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-parse.js +235 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency-parse.js.map +1 -0
- package/dist/checks/architecture/modules/interface-implementation-consistency.d.ts.map +1 -1
- package/dist/checks/architecture/modules/interface-implementation-consistency.js +4 -462
- package/dist/checks/architecture/modules/interface-implementation-consistency.js.map +1 -1
- package/dist/checks/architecture/node-version-consistency.d.ts.map +1 -1
- package/dist/checks/architecture/node-version-consistency.js +0 -2
- package/dist/checks/architecture/node-version-consistency.js.map +1 -1
- package/dist/checks/architecture/stale-build-artifacts.d.ts.map +1 -1
- package/dist/checks/architecture/stale-build-artifacts.js +0 -1
- package/dist/checks/architecture/stale-build-artifacts.js.map +1 -1
- package/dist/checks/architecture/tool-has-manifest.d.ts.map +1 -1
- package/dist/checks/architecture/tool-has-manifest.js +0 -1
- package/dist/checks/architecture/tool-has-manifest.js.map +1 -1
- package/dist/checks/architecture/tool-identity-single-source.d.ts +23 -0
- package/dist/checks/architecture/tool-identity-single-source.d.ts.map +1 -0
- package/dist/checks/architecture/tool-identity-single-source.js +126 -0
- package/dist/checks/architecture/tool-identity-single-source.js.map +1 -0
- package/dist/checks/documentation/_public-api-graph.d.ts +3 -26
- package/dist/checks/documentation/_public-api-graph.d.ts.map +1 -1
- package/dist/checks/documentation/_public-api-graph.js +3 -300
- package/dist/checks/documentation/_public-api-graph.js.map +1 -1
- package/dist/checks/documentation/directive-audit.d.ts.map +1 -1
- package/dist/checks/documentation/directive-audit.js +0 -1
- package/dist/checks/documentation/directive-audit.js.map +1 -1
- package/dist/checks/file-length-limit.d.ts +7 -0
- package/dist/checks/file-length-limit.d.ts.map +1 -1
- package/dist/checks/file-length-limit.js +14 -2
- package/dist/checks/file-length-limit.js.map +1 -1
- package/dist/checks/quality/code-structure/dead-code.d.ts.map +1 -1
- package/dist/checks/quality/code-structure/dead-code.js +0 -1
- package/dist/checks/quality/code-structure/dead-code.js.map +1 -1
- package/dist/checks/quality/dependency-version-consistency.d.ts.map +1 -1
- package/dist/checks/quality/dependency-version-consistency.js +0 -2
- package/dist/checks/quality/dependency-version-consistency.js.map +1 -1
- package/dist/checks/quality/frontend/navigation-typing.d.ts.map +1 -1
- package/dist/checks/quality/frontend/navigation-typing.js +0 -1
- package/dist/checks/quality/frontend/navigation-typing.js.map +1 -1
- package/dist/checks/quality/index.d.ts +1 -0
- package/dist/checks/quality/index.d.ts.map +1 -1
- package/dist/checks/quality/index.js +1 -0
- package/dist/checks/quality/index.js.map +1 -1
- package/dist/checks/quality/linting/eslint-justifications.d.ts.map +1 -1
- package/dist/checks/quality/linting/eslint-justifications.js +0 -1
- package/dist/checks/quality/linting/eslint-justifications.js.map +1 -1
- package/dist/checks/quality/no-raw-regex-on-code.d.ts.map +1 -1
- package/dist/checks/quality/no-raw-regex-on-code.js +2 -3
- package/dist/checks/quality/no-raw-regex-on-code.js.map +1 -1
- package/dist/checks/quality/patterns/__tests__/performance-anti-patterns-fp.test.d.ts +5 -0
- package/dist/checks/quality/patterns/__tests__/performance-anti-patterns-fp.test.d.ts.map +1 -0
- package/dist/checks/quality/patterns/__tests__/performance-anti-patterns-fp.test.js +66 -0
- package/dist/checks/quality/patterns/__tests__/performance-anti-patterns-fp.test.js.map +1 -0
- package/dist/checks/quality/patterns/performance-anti-patterns.d.ts +3 -0
- package/dist/checks/quality/patterns/performance-anti-patterns.d.ts.map +1 -1
- package/dist/checks/quality/patterns/performance-anti-patterns.js +47 -30
- package/dist/checks/quality/patterns/performance-anti-patterns.js.map +1 -1
- package/dist/checks/quality/yagni-ignore-hygiene.d.ts +10 -0
- package/dist/checks/quality/yagni-ignore-hygiene.d.ts.map +1 -0
- package/dist/checks/quality/yagni-ignore-hygiene.js +87 -0
- package/dist/checks/quality/yagni-ignore-hygiene.js.map +1 -0
- package/dist/checks/quality/yagni-ignore-hygiene.test.d.ts +5 -0
- package/dist/checks/quality/yagni-ignore-hygiene.test.d.ts.map +1 -0
- package/dist/checks/quality/yagni-ignore-hygiene.test.js +37 -0
- package/dist/checks/quality/yagni-ignore-hygiene.test.js.map +1 -0
- package/dist/checks/resilience/batch-operation-limits.d.ts +13 -0
- package/dist/checks/resilience/batch-operation-limits.d.ts.map +1 -0
- package/dist/checks/resilience/batch-operation-limits.js +160 -0
- package/dist/checks/resilience/batch-operation-limits.js.map +1 -0
- package/dist/checks/resilience/batch-operations.d.ts +2 -21
- package/dist/checks/resilience/batch-operations.d.ts.map +1 -1
- package/dist/checks/resilience/batch-operations.js +2 -420
- package/dist/checks/resilience/batch-operations.js.map +1 -1
- package/dist/checks/resilience/dangerous-config-defaults.d.ts.map +1 -1
- package/dist/checks/resilience/dangerous-config-defaults.js +0 -1
- package/dist/checks/resilience/dangerous-config-defaults.js.map +1 -1
- package/dist/checks/resilience/exit-code-correctness.d.ts.map +1 -1
- package/dist/checks/resilience/exit-code-correctness.js +0 -1
- package/dist/checks/resilience/exit-code-correctness.js.map +1 -1
- package/dist/checks/resilience/no-process-exit-in-finally.d.ts.map +1 -1
- package/dist/checks/resilience/no-process-exit-in-finally.js +0 -1
- package/dist/checks/resilience/no-process-exit-in-finally.js.map +1 -1
- package/dist/checks/resilience/readline-cleanup.d.ts.map +1 -1
- package/dist/checks/resilience/readline-cleanup.js +0 -1
- package/dist/checks/resilience/readline-cleanup.js.map +1 -1
- package/dist/checks/resilience/reentrancy-guard.d.ts.map +1 -1
- package/dist/checks/resilience/reentrancy-guard.js +0 -1
- package/dist/checks/resilience/reentrancy-guard.js.map +1 -1
- package/dist/checks/resilience/service-patterns.d.ts.map +1 -1
- package/dist/checks/resilience/service-patterns.js +0 -1
- package/dist/checks/resilience/service-patterns.js.map +1 -1
- package/dist/checks/resilience/unbounded-memory.d.ts +13 -0
- package/dist/checks/resilience/unbounded-memory.d.ts.map +1 -0
- package/dist/checks/resilience/unbounded-memory.js +229 -0
- package/dist/checks/resilience/unbounded-memory.js.map +1 -0
- package/dist/checks/security/csp-headers.d.ts.map +1 -1
- package/dist/checks/security/csp-headers.js +0 -1
- package/dist/checks/security/csp-headers.js.map +1 -1
- package/dist/checks/security/hasura-production-config.d.ts.map +1 -1
- package/dist/checks/security/hasura-production-config.js +0 -1
- package/dist/checks/security/hasura-production-config.js.map +1 -1
- package/dist/checks/security/jwt-validation.d.ts.map +1 -1
- package/dist/checks/security/jwt-validation.js +0 -2
- package/dist/checks/security/jwt-validation.js.map +1 -1
- package/dist/checks/security/package-supply-chain-policy.d.ts.map +1 -1
- package/dist/checks/security/package-supply-chain-policy.js +9 -15
- package/dist/checks/security/package-supply-chain-policy.js.map +1 -1
- package/dist/checks/security/semgrep-scan.d.ts.map +1 -1
- package/dist/checks/security/semgrep-scan.js +0 -1
- package/dist/checks/security/semgrep-scan.js.map +1 -1
- package/dist/checks/security/use-centralized-crypto.d.ts.map +1 -1
- package/dist/checks/security/use-centralized-crypto.js +2 -3
- package/dist/checks/security/use-centralized-crypto.js.map +1 -1
- package/dist/checks/testing/test-convention-consistency.d.ts.map +1 -1
- package/dist/checks/testing/test-convention-consistency.js +0 -1
- package/dist/checks/testing/test-convention-consistency.js.map +1 -1
- package/dist/checks/testing/test-file-pairing.js +3 -6
- package/dist/checks/testing/test-file-pairing.js.map +1 -1
- package/dist/display/architecture.d.ts.map +1 -1
- package/dist/display/architecture.js +1 -0
- package/dist/display/architecture.js.map +1 -1
- package/dist/display/quality.d.ts.map +1 -1
- package/dist/display/quality.js +1 -0
- package/dist/display/quality.js.map +1 -1
- package/dist/display/types.d.ts.map +1 -1
- package/dist/display/types.js +0 -1
- package/dist/display/types.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-identity-single-source.d.ts","sourceRoot":"","sources":["../../../src/checks/architecture/tool-identity-single-source.ts"],"names":[],"mappings":"AAMA,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3F,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACvD;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAC3C;AAsHD,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,MAAM,GACf,cAAc,EAAE,CAIlB;AAED,wBAAsB,+BAA+B,CACnD,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,cAAc,EAAE,CAAC,CAa3B;AAED,eAAO,MAAM,wBAAwB,sCASnC,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview First-party tool packages must declare a single `identity` block
|
|
3
|
+
* in package.json#opensipTools that matches the normalized runtime surface.
|
|
4
|
+
*/
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import { defineCheck } from '@opensip-cli/fitness';
|
|
7
|
+
function isJsonObject(value) {
|
|
8
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
9
|
+
}
|
|
10
|
+
function checkIdentity(block, push) {
|
|
11
|
+
const identity = block.identity;
|
|
12
|
+
if (!isJsonObject(identity)) {
|
|
13
|
+
push('identity', 'must declare opensipTools.identity { name, aliases?, layoutKey? }');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (typeof identity.name !== 'string' || identity.name === '') {
|
|
17
|
+
push('identity.name', 'must be a non-empty string (canonical CLI + config namespace)');
|
|
18
|
+
}
|
|
19
|
+
if (block.id !== identity.name) {
|
|
20
|
+
push('id', `must equal identity.name (got id=${JSON.stringify(block.id)}, identity.name=${JSON.stringify(identity.name)})`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function findPrimaryCommand(commands) {
|
|
24
|
+
for (const entry of commands) {
|
|
25
|
+
if (!isJsonObject(entry))
|
|
26
|
+
continue;
|
|
27
|
+
const cmd = entry;
|
|
28
|
+
if (cmd.parent === undefined)
|
|
29
|
+
return cmd;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
function checkPrimaryCommandName(primary, identityName, push) {
|
|
34
|
+
if (primary.name === identityName)
|
|
35
|
+
return;
|
|
36
|
+
push('commands', `primary command name must be identity.name (${JSON.stringify(identityName)}), got ${JSON.stringify(primary.name)}`);
|
|
37
|
+
}
|
|
38
|
+
function checkPrimaryCommandAliases(primary, identity, push) {
|
|
39
|
+
const expectedAliases = Array.isArray(identity.aliases) ? identity.aliases : [];
|
|
40
|
+
const declaredAliases = Array.isArray(primary.aliases) ? primary.aliases : [];
|
|
41
|
+
if (JSON.stringify(declaredAliases) === JSON.stringify(expectedAliases))
|
|
42
|
+
return;
|
|
43
|
+
push('commands', 'primary command aliases must equal identity.aliases exactly');
|
|
44
|
+
}
|
|
45
|
+
function layoutKeyForIdentity(identity, identityName) {
|
|
46
|
+
return typeof identity.layoutKey === 'string' && identity.layoutKey !== ''
|
|
47
|
+
? identity.layoutKey
|
|
48
|
+
: identityName;
|
|
49
|
+
}
|
|
50
|
+
function checkPluginLayoutDomain(block, layoutKey, push) {
|
|
51
|
+
const pluginDomain = block.pluginLayout?.domain;
|
|
52
|
+
if (pluginDomain === undefined || pluginDomain === layoutKey)
|
|
53
|
+
return;
|
|
54
|
+
push('pluginLayout.domain', `must equal identity.layoutKey ?? identity.name (${JSON.stringify(layoutKey)})`);
|
|
55
|
+
}
|
|
56
|
+
function checkManifestCommands(block, push) {
|
|
57
|
+
const identity = block.identity;
|
|
58
|
+
if (!isJsonObject(identity))
|
|
59
|
+
return;
|
|
60
|
+
const identityName = identity.name;
|
|
61
|
+
if (typeof identityName !== 'string')
|
|
62
|
+
return;
|
|
63
|
+
const commands = block.commands;
|
|
64
|
+
if (!Array.isArray(commands))
|
|
65
|
+
return;
|
|
66
|
+
const primary = findPrimaryCommand(commands);
|
|
67
|
+
if (primary === undefined) {
|
|
68
|
+
push('commands', 'must declare exactly one flat primary command matching identity.name');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
checkPrimaryCommandName(primary, identityName, push);
|
|
72
|
+
checkPrimaryCommandAliases(primary, identity, push);
|
|
73
|
+
checkPluginLayoutDomain(block, layoutKeyForIdentity(identity, identityName), push);
|
|
74
|
+
}
|
|
75
|
+
function checkManifestBlock(block, filePath) {
|
|
76
|
+
const violations = [];
|
|
77
|
+
const relPath = path.relative(process.cwd(), filePath);
|
|
78
|
+
const push = (field, message) => {
|
|
79
|
+
violations.push({
|
|
80
|
+
line: 1,
|
|
81
|
+
filePath,
|
|
82
|
+
message: `${relPath}: opensipTools.${field} — ${message}`,
|
|
83
|
+
severity: 'error',
|
|
84
|
+
suggestion: 'Declare tool identity once: opensipTools.identity { name, aliases?, layoutKey? }; ' +
|
|
85
|
+
'id must equal identity.name; primary command name/aliases and pluginLayout.domain must derive from it.',
|
|
86
|
+
type: `identity-${field.replaceAll('.', '-')}`,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
if (block.kind !== 'tool')
|
|
90
|
+
return violations;
|
|
91
|
+
checkIdentity(block, push);
|
|
92
|
+
checkManifestCommands(block, push);
|
|
93
|
+
return violations;
|
|
94
|
+
}
|
|
95
|
+
export function analyzeToolIdentitySingleSource(pkg, filePath) {
|
|
96
|
+
const block = pkg.opensipTools;
|
|
97
|
+
if (!isJsonObject(block) || block.kind !== 'tool')
|
|
98
|
+
return [];
|
|
99
|
+
return checkManifestBlock(block, filePath);
|
|
100
|
+
}
|
|
101
|
+
export async function analyzeAllToolIdentityManifests(files) {
|
|
102
|
+
const violations = [];
|
|
103
|
+
for (const filePath of files.paths) {
|
|
104
|
+
if (path.basename(filePath) !== 'package.json')
|
|
105
|
+
continue;
|
|
106
|
+
let pkg;
|
|
107
|
+
try {
|
|
108
|
+
pkg = JSON.parse(await files.read(filePath));
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
violations.push(...analyzeToolIdentitySingleSource(pkg, filePath));
|
|
114
|
+
}
|
|
115
|
+
return violations;
|
|
116
|
+
}
|
|
117
|
+
export const toolIdentitySingleSource = defineCheck({
|
|
118
|
+
id: 'c8f3e1a2-9b4d-4e6f-a1c0-2d8e7f9a3b5c',
|
|
119
|
+
slug: 'tool-identity-single-source',
|
|
120
|
+
description: 'Tool packages declare opensipTools.identity once; manifest id, primary command, aliases, and pluginLayout.domain must match the normalized runtime surface',
|
|
121
|
+
scope: { languages: ['typescript'], concerns: ['config'] },
|
|
122
|
+
tags: ['architecture'],
|
|
123
|
+
contentFilter: 'raw',
|
|
124
|
+
analyzeAll: analyzeAllToolIdentityManifests,
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=tool-identity-single-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-identity-single-source.js","sourceRoot":"","sources":["../../../src/checks/architecture/tool-identity-single-source.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AA0B3F,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAID,SAAS,aAAa,CAAC,KAAwB,EAAE,IAAmB;IAClE,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,IAAI,CAAC,UAAU,EAAE,mEAAmE,CAAC,CAAC;QACtF,OAAO;IACT,CAAC;IACD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;QAC9D,IAAI,CAAC,eAAe,EAAE,+DAA+D,CAAC,CAAC;IACzF,CAAC;IACD,IAAI,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/B,I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C,KAAK,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,cAAc;YAAE,SAAS;QACzD,IAAI,GAAgB,CAAC;QACrB,IAAI,CAAC;YACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAgB,CAAC;QAC9D,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,UAAU,CAAC,IAAI,CAAC,GAAG,+BAA+B,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,CAAC;IAClD,EAAE,EAAE,sCAAsC;IAC1C,IAAI,EAAE,6BAA6B;IACnC,WAAW,EACT,4JAA4J;IAC9J,KAAK,EAAE,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE;IAC1D,IAAI,EAAE,CAAC,cAAc,CAAC;IACtB,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,+BAA+B;CAC5C,CAAC,CAAC"}
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview
|
|
2
|
+
* @fileoverview Re-export shim — implementation lives in @opensip-cli/core.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `package.json#exports` entry barrels via `export ... from` re-exports.
|
|
6
|
-
*
|
|
7
|
-
* Why re-exports only (not plain `import`): a file imported by a public
|
|
8
|
-
* file is internal to that file — its exports are not part of the
|
|
9
|
-
* package's published surface. Only `export ... from './foo.js'`
|
|
10
|
-
* re-makes `./foo.ts`'s exports visible to consumers.
|
|
11
|
-
*
|
|
12
|
-
* Used by `public-api-jsdoc` to scope JSDoc requirements to the actual
|
|
13
|
-
* npm-published API surface, not every `export` in every internal file.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Reset all memoized state. Intended for tests.
|
|
17
|
-
*/
|
|
18
|
-
export declare function _resetPublicApiGraphCache(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Determine whether `filePath` is part of the package's public API
|
|
21
|
-
* surface — i.e., reachable from the package's `exports` entries via
|
|
22
|
-
* `export ... from` re-export chains.
|
|
23
|
-
*
|
|
24
|
-
* Returns `true` if reachable; `false` if not. Returns `true` (open
|
|
25
|
-
* fail) when the package surface cannot be determined (no
|
|
26
|
-
* package.json, no `exports`, etc.) so the check degrades to its
|
|
27
|
-
* historical broad behavior rather than silently passing.
|
|
4
|
+
* Keeps `_resetPublicApiGraphCache` on this path for existing tests.
|
|
28
5
|
*/
|
|
29
|
-
export
|
|
6
|
+
export { _resetPublicApiGraphCache, isInPublicApiSurface } from '@opensip-cli/core';
|
|
30
7
|
//# sourceMappingURL=_public-api-graph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_public-api-graph.d.ts","sourceRoot":"","sources":["../../../src/checks/documentation/_public-api-graph.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_public-api-graph.d.ts","sourceRoot":"","sources":["../../../src/checks/documentation/_public-api-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,304 +1,7 @@
|
|
|
1
|
-
// @fitness-ignore-file unbounded-memory -- reads small text files (package.json, src/index.ts barrels) for public-API surface computation; per-file memory bounded by standard config/barrel shape.
|
|
2
1
|
/**
|
|
3
|
-
* @fileoverview
|
|
2
|
+
* @fileoverview Re-export shim — implementation lives in @opensip-cli/core.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
* `package.json#exports` entry barrels via `export ... from` re-exports.
|
|
7
|
-
*
|
|
8
|
-
* Why re-exports only (not plain `import`): a file imported by a public
|
|
9
|
-
* file is internal to that file — its exports are not part of the
|
|
10
|
-
* package's published surface. Only `export ... from './foo.js'`
|
|
11
|
-
* re-makes `./foo.ts`'s exports visible to consumers.
|
|
12
|
-
*
|
|
13
|
-
* Used by `public-api-jsdoc` to scope JSDoc requirements to the actual
|
|
14
|
-
* npm-published API surface, not every `export` in every internal file.
|
|
15
|
-
*/
|
|
16
|
-
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
17
|
-
import { dirname, isAbsolute, join, resolve, sep } from 'node:path';
|
|
18
|
-
const surfaceCache = new Map();
|
|
19
|
-
// Match `export { x }` / `export type { x }` / `export *` /
|
|
20
|
-
// `export * as ns` followed by `from '...'`. Split into two simpler
|
|
21
|
-
// alternatives to keep regex-complexity below the lint threshold and
|
|
22
|
-
// avoid catastrophic backtracking on pathological `{...}` blocks.
|
|
23
|
-
// Both patterns are anchored to line boundaries (gm) and use bounded
|
|
24
|
-
// character classes — no nested quantifiers — so they run in linear
|
|
25
|
-
// time over input.
|
|
26
|
-
/* eslint-disable sonarjs/slow-regex -- both patterns are linear: anchored to line start with `^` under the gm flag, and use negated character classes (`[^}\n]*`, `[^'"]+`) rather than nested quantifiers, so they cannot backtrack catastrophically */
|
|
27
|
-
const RE_EXPORT_NAMED_FROM = /^\s*export\s+(?:type\s+)?\{[^}\n]*\}\s+from\s+['"]([^'"]+)['"]/gm;
|
|
28
|
-
const RE_EXPORT_STAR_FROM = /^\s*export\s+\*(?:\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/gm;
|
|
29
|
-
/* eslint-enable sonarjs/slow-regex */
|
|
30
|
-
/**
|
|
31
|
-
* Reset all memoized state. Intended for tests.
|
|
32
|
-
*/
|
|
33
|
-
export function _resetPublicApiGraphCache() {
|
|
34
|
-
surfaceCache.clear();
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Walk upward from `filePath` to find the nearest `package.json`.
|
|
38
|
-
* Returns the package root directory (the directory containing
|
|
39
|
-
* `package.json`), or `undefined` if none found before the filesystem
|
|
40
|
-
* root.
|
|
41
|
-
*/
|
|
42
|
-
function findPackageRoot(filePath) {
|
|
43
|
-
let dir = dirname(filePath);
|
|
44
|
-
// Bound the walk to avoid pathological loops on weird mounts.
|
|
45
|
-
for (let i = 0; i < 64; i++) {
|
|
46
|
-
const candidate = join(dir, 'package.json');
|
|
47
|
-
if (existsSync(candidate))
|
|
48
|
-
return dir;
|
|
49
|
-
const parent = dirname(dir);
|
|
50
|
-
if (parent === dir)
|
|
51
|
-
return undefined;
|
|
52
|
-
dir = parent;
|
|
53
|
-
}
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Determine whether `filePath` is part of the package's public API
|
|
58
|
-
* surface — i.e., reachable from the package's `exports` entries via
|
|
59
|
-
* `export ... from` re-export chains.
|
|
60
|
-
*
|
|
61
|
-
* Returns `true` if reachable; `false` if not. Returns `true` (open
|
|
62
|
-
* fail) when the package surface cannot be determined (no
|
|
63
|
-
* package.json, no `exports`, etc.) so the check degrades to its
|
|
64
|
-
* historical broad behavior rather than silently passing.
|
|
65
|
-
*/
|
|
66
|
-
export function isInPublicApiSurface(filePath) {
|
|
67
|
-
const surface = getPackagePublicSurface(filePath);
|
|
68
|
-
if (!surface)
|
|
69
|
-
return true;
|
|
70
|
-
return surface.publicFiles.has(filePath);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Compute (and memoize) the public-API surface for the package
|
|
74
|
-
* containing `filePath`.
|
|
75
|
-
*/
|
|
76
|
-
function getPackagePublicSurface(filePath) {
|
|
77
|
-
const packageRoot = findPackageRoot(filePath);
|
|
78
|
-
if (!packageRoot)
|
|
79
|
-
return null;
|
|
80
|
-
const cached = surfaceCache.get(packageRoot);
|
|
81
|
-
if (cached !== undefined)
|
|
82
|
-
return cached;
|
|
83
|
-
const surface = computePackagePublicSurface(packageRoot);
|
|
84
|
-
surfaceCache.set(packageRoot, surface);
|
|
85
|
-
return surface;
|
|
86
|
-
}
|
|
87
|
-
function computePackagePublicSurface(packageRoot) {
|
|
88
|
-
const pkg = readPackageJson(join(packageRoot, 'package.json'));
|
|
89
|
-
if (!pkg)
|
|
90
|
-
return null;
|
|
91
|
-
if (isBinaryOnlyPackage(pkg)) {
|
|
92
|
-
return { packageRoot, publicFiles: new Set() };
|
|
93
|
-
}
|
|
94
|
-
const entryPaths = collectExportEntries(pkg, packageRoot);
|
|
95
|
-
if (entryPaths.length === 0)
|
|
96
|
-
return null;
|
|
97
|
-
const publicFiles = seedPublicFiles(entryPaths, packageRoot);
|
|
98
|
-
walkReExportGraph(publicFiles);
|
|
99
|
-
return { packageRoot, publicFiles };
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Read and parse a `package.json` file. Returns `null` if the file
|
|
103
|
-
* cannot be read or does not contain a JSON object.
|
|
104
|
-
*/
|
|
105
|
-
function readPackageJson(pkgJsonPath) {
|
|
106
|
-
let pkg;
|
|
107
|
-
try {
|
|
108
|
-
pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf8'));
|
|
109
|
-
}
|
|
110
|
-
catch {
|
|
111
|
-
// @fitness-ignore-next-line error-handling-quality -- malformed/unreadable package.json deliberately surfaces via null return; caller treats absence as "no public-API surface info available" and falls back to broad scanning.
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
if (typeof pkg !== 'object' || pkg === null)
|
|
115
|
-
return null;
|
|
116
|
-
return pkg;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* A binary-only package (CLI executable with no library exports) has
|
|
120
|
-
* no public API surface at all — every source file is internal. The
|
|
121
|
-
* caller treats this as "empty public surface" rather than "unknown
|
|
122
|
-
* surface" so the check correctly skips every file in the package.
|
|
123
|
-
*/
|
|
124
|
-
function isBinaryOnlyPackage(pkg) {
|
|
125
|
-
return (pkg.exports === undefined &&
|
|
126
|
-
pkg.main === undefined &&
|
|
127
|
-
pkg.module === undefined &&
|
|
128
|
-
pkg.bin !== undefined);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Map each package.json entry to a source file path and return the
|
|
132
|
-
* initial set seeded for the re-export BFS walk.
|
|
133
|
-
*/
|
|
134
|
-
function seedPublicFiles(entryPaths, packageRoot) {
|
|
135
|
-
const publicFiles = new Set();
|
|
136
|
-
for (const entry of entryPaths) {
|
|
137
|
-
const sourceFile = mapDistToSource(entry, packageRoot);
|
|
138
|
-
if (sourceFile)
|
|
139
|
-
publicFiles.add(sourceFile);
|
|
140
|
-
}
|
|
141
|
-
return publicFiles;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* BFS the `export ... from` re-export graph starting from the seeded
|
|
145
|
-
* `publicFiles` set, adding every reached file to the same set.
|
|
146
|
-
*/
|
|
147
|
-
function walkReExportGraph(publicFiles) {
|
|
148
|
-
const queue = [...publicFiles];
|
|
149
|
-
while (queue.length > 0) {
|
|
150
|
-
const file = queue.shift();
|
|
151
|
-
/* v8 ignore next -- queue.shift() returns undefined only when empty, which the while condition prevents */
|
|
152
|
-
if (file === undefined)
|
|
153
|
-
continue;
|
|
154
|
-
let content;
|
|
155
|
-
try {
|
|
156
|
-
content = readFileSync(file, 'utf8');
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
enqueueLocalReExports(content, dirname(file), publicFiles, queue);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Scan a file's content for relative `export ... from` re-exports and
|
|
166
|
-
* push any newly-discovered files into both `publicFiles` and `queue`.
|
|
167
|
-
*/
|
|
168
|
-
function enqueueLocalReExports(content, fileDir, publicFiles, queue) {
|
|
169
|
-
for (const regex of [RE_EXPORT_NAMED_FROM, RE_EXPORT_STAR_FROM]) {
|
|
170
|
-
for (const match of content.matchAll(regex)) {
|
|
171
|
-
const spec = match[1];
|
|
172
|
-
// Only follow relative imports — bare-package re-exports cross
|
|
173
|
-
// the package boundary and are out of scope for this package's
|
|
174
|
-
// surface.
|
|
175
|
-
if (!spec?.startsWith('.'))
|
|
176
|
-
continue;
|
|
177
|
-
const resolved = resolveLocalSpecifier(fileDir, spec);
|
|
178
|
-
if (resolved !== undefined && !publicFiles.has(resolved)) {
|
|
179
|
-
publicFiles.add(resolved);
|
|
180
|
-
queue.push(resolved);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Extract a flat list of file targets from a package.json `exports`
|
|
187
|
-
* field. Handles string, conditional, and subpath patterns. Patterns
|
|
188
|
-
* with `*` are not expanded — they are skipped (and the file falls
|
|
189
|
-
* through to the "no entries → open fail" path if no concrete entries
|
|
190
|
-
* remain).
|
|
191
|
-
*
|
|
192
|
-
* Falls back to `main` / `module` when `exports` is absent.
|
|
193
|
-
*/
|
|
194
|
-
function collectExportEntries(pkg, packageRoot) {
|
|
195
|
-
const out = [];
|
|
196
|
-
const exports_ = pkg.exports;
|
|
197
|
-
if (exports_ === undefined) {
|
|
198
|
-
for (const field of ['module', 'main']) {
|
|
199
|
-
const v = pkg[field];
|
|
200
|
-
if (typeof v === 'string')
|
|
201
|
-
out.push(resolveExportTarget(v, packageRoot));
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
collectFromExportNode(exports_, packageRoot, out);
|
|
206
|
-
}
|
|
207
|
-
return out;
|
|
208
|
-
}
|
|
209
|
-
function collectFromExportNode(node, packageRoot, out) {
|
|
210
|
-
if (typeof node === 'string') {
|
|
211
|
-
// Skip wildcard patterns — we can't enumerate them without a
|
|
212
|
-
// directory scan, and conservatively treating the whole tree as
|
|
213
|
-
// public would re-introduce the false-positive flood.
|
|
214
|
-
if (node.includes('*'))
|
|
215
|
-
return;
|
|
216
|
-
out.push(resolveExportTarget(node, packageRoot));
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (Array.isArray(node)) {
|
|
220
|
-
for (const item of node)
|
|
221
|
-
collectFromExportNode(item, packageRoot, out);
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (typeof node === 'object' && node !== null) {
|
|
225
|
-
for (const value of Object.values(node)) {
|
|
226
|
-
collectFromExportNode(value, packageRoot, out);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
function resolveExportTarget(target, packageRoot) {
|
|
231
|
-
const trimmed = target.startsWith('./') ? target.slice(2) : target;
|
|
232
|
-
return resolve(packageRoot, trimmed);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Map a built artifact path (typically `./dist/foo.js`) back to its
|
|
236
|
-
* TypeScript source path (typically `./src/foo.ts`). Returns
|
|
237
|
-
* `undefined` if no source file can be located.
|
|
238
|
-
*
|
|
239
|
-
* Honors common build layouts: `dist/` → `src/`, `dist/esm/` → `src/`,
|
|
240
|
-
* `build/` → `src/`. Also passes through already-source paths.
|
|
241
|
-
*/
|
|
242
|
-
function mapDistToSource(absPath, packageRoot) {
|
|
243
|
-
const rel = absPath.startsWith(packageRoot + sep)
|
|
244
|
-
? absPath.slice(packageRoot.length + 1)
|
|
245
|
-
: absPath;
|
|
246
|
-
const candidates = [];
|
|
247
|
-
// dist/foo.js → src/foo.ts (and .tsx)
|
|
248
|
-
const distMatch = /^(dist|build)([\\/].*)?$/.exec(rel);
|
|
249
|
-
if (distMatch) {
|
|
250
|
-
const remainder = rel.slice(distMatch[1].length);
|
|
251
|
-
const inSrc = 'src' + remainder;
|
|
252
|
-
candidates.push(inSrc);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
candidates.push(rel);
|
|
256
|
-
}
|
|
257
|
-
for (const cand of candidates) {
|
|
258
|
-
const abs = isAbsolute(cand) ? cand : join(packageRoot, cand);
|
|
259
|
-
for (const ext of ['.ts', '.tsx', '.mts', '.cts']) {
|
|
260
|
-
const swapped = abs.replace(/\.(js|mjs|cjs)$/, ext);
|
|
261
|
-
if (swapped !== abs && fileExists(swapped))
|
|
262
|
-
return swapped;
|
|
263
|
-
}
|
|
264
|
-
if (fileExists(abs))
|
|
265
|
-
return abs;
|
|
266
|
-
}
|
|
267
|
-
return undefined;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Resolve a relative module specifier to an absolute source file path.
|
|
271
|
-
* Tries the literal target plus common extension swaps (`.js` → `.ts`,
|
|
272
|
-
* `.js` → `.tsx`), and `index.ts` fallback for directory imports.
|
|
4
|
+
* Keeps `_resetPublicApiGraphCache` on this path for existing tests.
|
|
273
5
|
*/
|
|
274
|
-
|
|
275
|
-
const base = resolve(fromDir, spec);
|
|
276
|
-
const tries = [];
|
|
277
|
-
// Direct extension swap (the Node16 ESM `.js` import convention).
|
|
278
|
-
if (/\.(js|mjs|cjs)$/.test(base)) {
|
|
279
|
-
for (const ext of ['.ts', '.tsx', '.mts', '.cts']) {
|
|
280
|
-
tries.push(base.replace(/\.(js|mjs|cjs)$/, ext));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
tries.push(base);
|
|
284
|
-
for (const ext of ['.ts', '.tsx', '.mts', '.cts'])
|
|
285
|
-
tries.push(base + ext);
|
|
286
|
-
// Directory imports (`./foo` → `./foo/index.ts`)
|
|
287
|
-
for (const ext of ['.ts', '.tsx', '.mts', '.cts'])
|
|
288
|
-
tries.push(join(base, 'index' + ext));
|
|
289
|
-
for (const candidate of tries) {
|
|
290
|
-
if (fileExists(candidate))
|
|
291
|
-
return candidate;
|
|
292
|
-
}
|
|
293
|
-
return undefined;
|
|
294
|
-
}
|
|
295
|
-
function fileExists(p) {
|
|
296
|
-
try {
|
|
297
|
-
return statSync(p).isFile();
|
|
298
|
-
}
|
|
299
|
-
catch {
|
|
300
|
-
// @fitness-ignore-next-line error-handling-quality -- filesystem probe; exception → false is the function's contract (missing path or permission denied means "not a file", same as truly absent).
|
|
301
|
-
return false;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
6
|
+
export { _resetPublicApiGraphCache, isInPublicApiSurface } from '@opensip-cli/core';
|
|
304
7
|
//# sourceMappingURL=_public-api-graph.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_public-api-graph.js","sourceRoot":"","sources":["../../../src/checks/documentation/_public-api-graph.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"_public-api-graph.js","sourceRoot":"","sources":["../../../src/checks/documentation/_public-api-graph.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-audit.d.ts","sourceRoot":"","sources":["../../../src/checks/documentation/directive-audit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"directive-audit.d.ts","sourceRoot":"","sources":["../../../src/checks/documentation/directive-audit.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AAmHH;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,sCA2BzB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @fitness-ignore-file toctou-race-condition -- TOCTOU acceptable in this non-concurrent context
|
|
2
1
|
// @fitness-ignore-file semgrep-justifications -- References nosemgrep patterns for directive parsing
|
|
3
2
|
/**
|
|
4
3
|
* @fileoverview Directive Audit — surfaces suppression directives for periodic review.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-audit.js","sourceRoot":"","sources":["../../../src/checks/documentation/directive-audit.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"directive-audit.js","sourceRoot":"","sources":["../../../src/checks/documentation/directive-audit.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,WAAW,EAA0C,MAAM,sBAAsB,CAAC;AAE3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MA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isn't
|
|
7
7
|
* over-counted (configurable later if needed).
|
|
8
|
+
*
|
|
9
|
+
* Test and fixture paths are excluded — long behavior-fixture suites are
|
|
10
|
+
* intentional; modularity rules apply to production source.
|
|
8
11
|
*/
|
|
9
12
|
import { type CheckViolation } from '@opensip-cli/fitness';
|
|
10
13
|
/**
|
|
@@ -12,5 +15,9 @@ import { type CheckViolation } from '@opensip-cli/fitness';
|
|
|
12
15
|
* line-counting logic without spinning up an ExecutionContext.
|
|
13
16
|
*/
|
|
14
17
|
export declare function analyzeFileLength(content: string): CheckViolation[];
|
|
18
|
+
/**
|
|
19
|
+
* Per-file entry point: skips test/fixture paths before line counting.
|
|
20
|
+
*/
|
|
21
|
+
export declare function analyzeFileLengthForPath(content: string, filePath: string): CheckViolation[];
|
|
15
22
|
export declare const fileLengthLimit: import("@opensip-cli/fitness").Check;
|
|
16
23
|
//# sourceMappingURL=file-length-limit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-length-limit.d.ts","sourceRoot":"","sources":["../../src/checks/file-length-limit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-length-limit.d.ts","sourceRoot":"","sources":["../../src/checks/file-length-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKpF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAqBnE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAK5F;AAED,eAAO,MAAM,eAAe,sCAO1B,CAAC"}
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
* language. Counts only non-empty lines so massive whitespace-padded
|
|
6
6
|
* files don't slip through and trivial generated boilerplate isn't
|
|
7
7
|
* over-counted (configurable later if needed).
|
|
8
|
+
*
|
|
9
|
+
* Test and fixture paths are excluded — long behavior-fixture suites are
|
|
10
|
+
* intentional; modularity rules apply to production source.
|
|
8
11
|
*/
|
|
9
|
-
import { defineCheck } from '@opensip-cli/fitness';
|
|
12
|
+
import { defineCheck, isTestFile } from '@opensip-cli/fitness';
|
|
10
13
|
const SOFT_LIMIT = 400;
|
|
11
14
|
const HARD_LIMIT = 800;
|
|
12
15
|
/**
|
|
@@ -36,12 +39,21 @@ export function analyzeFileLength(content) {
|
|
|
36
39
|
}
|
|
37
40
|
return violations;
|
|
38
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Per-file entry point: skips test/fixture paths before line counting.
|
|
44
|
+
*/
|
|
45
|
+
export function analyzeFileLengthForPath(content, filePath) {
|
|
46
|
+
if (isTestFile(filePath) || filePath.includes('/__fixtures__/')) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
return analyzeFileLength(content);
|
|
50
|
+
}
|
|
39
51
|
export const fileLengthLimit = defineCheck({
|
|
40
52
|
id: 'fc8b5ec9-d020-4e76-b16f-f5f73ce9d21e',
|
|
41
53
|
slug: 'file-length-limit',
|
|
42
54
|
description: `Files longer than ${HARD_LIMIT} lines hint at insufficient module decomposition`,
|
|
43
55
|
scope: { languages: [], concerns: [] },
|
|
44
56
|
tags: ['quality', 'modularity'],
|
|
45
|
-
analyze: (content) =>
|
|
57
|
+
analyze: (content, filePath) => analyzeFileLengthForPath(content, filePath),
|
|
46
58
|
});
|
|
47
59
|
//# sourceMappingURL=file-length-limit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-length-limit.js","sourceRoot":"","sources":["../../src/checks/file-length-limit.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-length-limit.js","sourceRoot":"","sources":["../../src/checks/file-length-limit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,sBAA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1C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,qBAAqB,UAAU,kDAAkD;IAC9F,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtC,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;IAC/B,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC;CAC5E,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-code.d.ts","sourceRoot":"","sources":["../../../../src/checks/quality/code-structure/dead-code.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dead-code.d.ts","sourceRoot":"","sources":["../../../../src/checks/quality/code-structure/dead-code.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoNH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,sCA8EnB,CAAC"}
|