@omfalos/mokosh 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -179
- package/dist/cli.js +35 -32
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +35 -32
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +22 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/index.mjs.map +1 -1
- package/dist/mcp.js +25 -25
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.mjs +25 -25
- package/dist/mcp.mjs.map +1 -1
- package/dist/parse-worker.js +2 -2
- package/dist/parse-worker.js.map +1 -1
- package/dist/parse-worker.mjs +2 -2
- package/dist/parse-worker.mjs.map +1 -1
- package/package.json +11 -1
package/dist/index.d.mts
CHANGED
|
@@ -211,7 +211,12 @@ declare function loadMokoshConfig(rootDirOrPath: string, { allowJs, isExplicitPa
|
|
|
211
211
|
}): MokoshConfig;
|
|
212
212
|
/**
|
|
213
213
|
* @description Applies a `MokoshConfig` to the global registries that control classification and scanning.
|
|
214
|
-
* Call this after `loadMokoshConfig` and before `createImportMap`.
|
|
214
|
+
* Call this after `loadMokoshConfig` and before `createImportMap`. Resets those registries
|
|
215
|
+
* first, so each call fully replaces the previously active config instead of accumulating on
|
|
216
|
+
* top of it — otherwise a project's matchers/patterns/libraries would permanently leak into
|
|
217
|
+
* every later `applyConfig` call in the same process (e.g. a different root analyzed in the
|
|
218
|
+
* same long-running MCP server session), and a config narrowed or emptied on disk could never
|
|
219
|
+
* actually shrink what was registered.
|
|
215
220
|
* @param {MokoshConfig} config - The loaded config whose matchers, patterns, libraries, and thresholds are registered.
|
|
216
221
|
*/
|
|
217
222
|
declare function applyConfig(config: MokoshConfig): void;
|
|
@@ -1288,6 +1293,22 @@ declare function registerTestPattern(pattern: string): void;
|
|
|
1288
1293
|
* @param lib - An import specifier substring, e.g. `"@my-org/test-utils"`.
|
|
1289
1294
|
*/
|
|
1290
1295
|
declare function registerTestLibrary(lib: string): void;
|
|
1296
|
+
/**
|
|
1297
|
+
* @description Clears every user-registered config matcher, test pattern, and test library,
|
|
1298
|
+
* and resets the barrel threshold to its default. These registries are process-global —
|
|
1299
|
+
* not scoped per project root — so without a reset between projects, one root's
|
|
1300
|
+
* `mokosh.config.json` settings would permanently leak into every other root analyzed
|
|
1301
|
+
* afterward in the same long-running process (e.g. an MCP server session), and a config
|
|
1302
|
+
* later narrowed or emptied could never actually shrink what's registered. `applyConfig`
|
|
1303
|
+
* calls this before registering the new config's values so each call fully replaces the
|
|
1304
|
+
* active registry state rather than accumulating on top of it, matching the documented
|
|
1305
|
+
* contract that unset `MokoshConfig` fields fall back to built-in defaults.
|
|
1306
|
+
*
|
|
1307
|
+
* Not safe to call while another `applyConfig` + graph build for a different root is
|
|
1308
|
+
* still in flight — these registries have no per-root isolation, so overlapping builds
|
|
1309
|
+
* were already able to observe each other's state before this function existed.
|
|
1310
|
+
*/
|
|
1311
|
+
declare function resetClassifyRegistries(): void;
|
|
1291
1312
|
|
|
1292
1313
|
/** Parser registry: maps FileType values to parser functions and provides lookup by file type. */
|
|
1293
1314
|
|
|
@@ -1517,4 +1538,4 @@ declare function createWorkspaceGraph(rootDir: string, options?: {
|
|
|
1517
1538
|
*/
|
|
1518
1539
|
declare function getAllProjectFiles(rootDir: string, options?: ScanOptions): string[];
|
|
1519
1540
|
|
|
1520
|
-
export { type ApiSurface, type ApplyTagsFileResult, type ApplyTagsResult, CALL_EDGE_TYPES, type CachedFileTokens, CallEdge, type CalleeEntry, type CallerEntry$1 as CallerEntry, type ChangeImpactCache, type ComplexFunctionEntry, DEFAULT_CACHE_DIR, DEFAULT_DUPLICATION_TOKEN_CACHE_FILE, DEFAULT_EXTENSIONS, DEFAULT_GRAPH_CACHE_FILE, DEFAULT_IGNORE_DIRS, type DependencyGraph, type DuplicateFamily, type DuplicateGroup, type DuplicateOccurrence, type DuplicationTokenCache, EXPORT_TRACKING_TYPES, type ExportKind, type FeatureDetectionOptions, type FeatureDomain, type FeatureGraph, type FeatureGraphOptions, type FeatureInfo, FileNode, FileType, type FindComplexFunctionsOptions, type FindDuplicatesOptions, type FindDuplicatesResult, type FindRiskHotspotsOptions, type FunctionCallInfo, type GetAffectedOptions, type GetCallersOptions, Graph, type CallerEntry as GraphCallerEntry, type GraphExporter, IMPORT_SYMBOL_TYPES, ImportEdge, type LanguageCoverage, MermaidExporter, type ModuleResponsibility, type ModuleRole, type MokoshConfig, type MonorepoDetector, type MonorepoLayout, NodeCategory, type NodeMeta, type NodeQuery, type ParallelParsingOption, type PathWithSymbols, type ProposeTagsOptions, type PublicExport, type ResponsibilityGraph, type RiskHotspotEntry, type RiskHotspotsResult, type ScanOptions, type SerializedGraph, type SerializedWorkspaceGraph, type SlimNode, type SlimSerializedGraph, StructuredTag, type SymbolCaller, type SymbolImporter, type SymbolMatch, type SymbolPrecision, SymbolTraversalContext, type TestNodeIdentifier, type TraversalOptions, type TraversalVisitor, type TypeEdge, type TypeGraph, type TypeKind, type TypeNode, type TypeQueryResult, WorkspaceGraph, type WorkspacePackage, type WorkspacePackageSummary, type WorkspacePackagesSummary, applyConfig, applyTags, buildApiSurface, buildChangeImpactCache, buildFeatureGraph, buildResponsibilityGraph, buildTypeGraph, computeGraphHash, configToGraphOptions, createImportMap, createWorkspaceGraph, detectAllEntryPoints, detectEntryPoint, detectFeatures, detectMonorepo, filterGraph, findComplexFunctions, findDuplicates, findRiskHotspots, findSymbol, getAffected, getAllProjectFiles, getCallers, getDependencies, getDependents, getLanguageCoverage, getNodeMeta, hasChurnData, hasCoverageData, isChangeImpactCacheValid, loadChangeImpactCache, loadCoverageMap, loadMokoshConfig, loadTokenCacheFromDisk, parseQuery, proposeAffectedTests, proposeTags, queryCallGraph, queryChangeImpact, queryTypeGraph, registerConfigMatcher, registerMonorepoDetector, registerParser, registerTestLibrary, registerTestPattern, saveChangeImpactCache, saveTokenCacheToDisk, slimSerialize, summarizeWorkspacePackages, toMermaid };
|
|
1541
|
+
export { type ApiSurface, type ApplyTagsFileResult, type ApplyTagsResult, CALL_EDGE_TYPES, type CachedFileTokens, CallEdge, type CalleeEntry, type CallerEntry$1 as CallerEntry, type ChangeImpactCache, type ComplexFunctionEntry, DEFAULT_CACHE_DIR, DEFAULT_DUPLICATION_TOKEN_CACHE_FILE, DEFAULT_EXTENSIONS, DEFAULT_GRAPH_CACHE_FILE, DEFAULT_IGNORE_DIRS, type DependencyGraph, type DuplicateFamily, type DuplicateGroup, type DuplicateOccurrence, type DuplicationTokenCache, EXPORT_TRACKING_TYPES, type ExportKind, type FeatureDetectionOptions, type FeatureDomain, type FeatureGraph, type FeatureGraphOptions, type FeatureInfo, FileNode, FileType, type FindComplexFunctionsOptions, type FindDuplicatesOptions, type FindDuplicatesResult, type FindRiskHotspotsOptions, type FunctionCallInfo, type GetAffectedOptions, type GetCallersOptions, Graph, type CallerEntry as GraphCallerEntry, type GraphExporter, IMPORT_SYMBOL_TYPES, ImportEdge, type LanguageCoverage, MermaidExporter, type ModuleResponsibility, type ModuleRole, type MokoshConfig, type MonorepoDetector, type MonorepoLayout, NodeCategory, type NodeMeta, type NodeQuery, type ParallelParsingOption, type PathWithSymbols, type ProposeTagsOptions, type PublicExport, type ResponsibilityGraph, type RiskHotspotEntry, type RiskHotspotsResult, type ScanOptions, type SerializedGraph, type SerializedWorkspaceGraph, type SlimNode, type SlimSerializedGraph, StructuredTag, type SymbolCaller, type SymbolImporter, type SymbolMatch, type SymbolPrecision, SymbolTraversalContext, type TestNodeIdentifier, type TraversalOptions, type TraversalVisitor, type TypeEdge, type TypeGraph, type TypeKind, type TypeNode, type TypeQueryResult, WorkspaceGraph, type WorkspacePackage, type WorkspacePackageSummary, type WorkspacePackagesSummary, applyConfig, applyTags, buildApiSurface, buildChangeImpactCache, buildFeatureGraph, buildResponsibilityGraph, buildTypeGraph, computeGraphHash, configToGraphOptions, createImportMap, createWorkspaceGraph, detectAllEntryPoints, detectEntryPoint, detectFeatures, detectMonorepo, filterGraph, findComplexFunctions, findDuplicates, findRiskHotspots, findSymbol, getAffected, getAllProjectFiles, getCallers, getDependencies, getDependents, getLanguageCoverage, getNodeMeta, hasChurnData, hasCoverageData, isChangeImpactCacheValid, loadChangeImpactCache, loadCoverageMap, loadMokoshConfig, loadTokenCacheFromDisk, parseQuery, proposeAffectedTests, proposeTags, queryCallGraph, queryChangeImpact, queryTypeGraph, registerConfigMatcher, registerMonorepoDetector, registerParser, registerTestLibrary, registerTestPattern, resetClassifyRegistries, saveChangeImpactCache, saveTokenCacheToDisk, slimSerialize, summarizeWorkspacePackages, toMermaid };
|
package/dist/index.d.ts
CHANGED
|
@@ -211,7 +211,12 @@ declare function loadMokoshConfig(rootDirOrPath: string, { allowJs, isExplicitPa
|
|
|
211
211
|
}): MokoshConfig;
|
|
212
212
|
/**
|
|
213
213
|
* @description Applies a `MokoshConfig` to the global registries that control classification and scanning.
|
|
214
|
-
* Call this after `loadMokoshConfig` and before `createImportMap`.
|
|
214
|
+
* Call this after `loadMokoshConfig` and before `createImportMap`. Resets those registries
|
|
215
|
+
* first, so each call fully replaces the previously active config instead of accumulating on
|
|
216
|
+
* top of it — otherwise a project's matchers/patterns/libraries would permanently leak into
|
|
217
|
+
* every later `applyConfig` call in the same process (e.g. a different root analyzed in the
|
|
218
|
+
* same long-running MCP server session), and a config narrowed or emptied on disk could never
|
|
219
|
+
* actually shrink what was registered.
|
|
215
220
|
* @param {MokoshConfig} config - The loaded config whose matchers, patterns, libraries, and thresholds are registered.
|
|
216
221
|
*/
|
|
217
222
|
declare function applyConfig(config: MokoshConfig): void;
|
|
@@ -1288,6 +1293,22 @@ declare function registerTestPattern(pattern: string): void;
|
|
|
1288
1293
|
* @param lib - An import specifier substring, e.g. `"@my-org/test-utils"`.
|
|
1289
1294
|
*/
|
|
1290
1295
|
declare function registerTestLibrary(lib: string): void;
|
|
1296
|
+
/**
|
|
1297
|
+
* @description Clears every user-registered config matcher, test pattern, and test library,
|
|
1298
|
+
* and resets the barrel threshold to its default. These registries are process-global —
|
|
1299
|
+
* not scoped per project root — so without a reset between projects, one root's
|
|
1300
|
+
* `mokosh.config.json` settings would permanently leak into every other root analyzed
|
|
1301
|
+
* afterward in the same long-running process (e.g. an MCP server session), and a config
|
|
1302
|
+
* later narrowed or emptied could never actually shrink what's registered. `applyConfig`
|
|
1303
|
+
* calls this before registering the new config's values so each call fully replaces the
|
|
1304
|
+
* active registry state rather than accumulating on top of it, matching the documented
|
|
1305
|
+
* contract that unset `MokoshConfig` fields fall back to built-in defaults.
|
|
1306
|
+
*
|
|
1307
|
+
* Not safe to call while another `applyConfig` + graph build for a different root is
|
|
1308
|
+
* still in flight — these registries have no per-root isolation, so overlapping builds
|
|
1309
|
+
* were already able to observe each other's state before this function existed.
|
|
1310
|
+
*/
|
|
1311
|
+
declare function resetClassifyRegistries(): void;
|
|
1291
1312
|
|
|
1292
1313
|
/** Parser registry: maps FileType values to parser functions and provides lookup by file type. */
|
|
1293
1314
|
|
|
@@ -1517,4 +1538,4 @@ declare function createWorkspaceGraph(rootDir: string, options?: {
|
|
|
1517
1538
|
*/
|
|
1518
1539
|
declare function getAllProjectFiles(rootDir: string, options?: ScanOptions): string[];
|
|
1519
1540
|
|
|
1520
|
-
export { type ApiSurface, type ApplyTagsFileResult, type ApplyTagsResult, CALL_EDGE_TYPES, type CachedFileTokens, CallEdge, type CalleeEntry, type CallerEntry$1 as CallerEntry, type ChangeImpactCache, type ComplexFunctionEntry, DEFAULT_CACHE_DIR, DEFAULT_DUPLICATION_TOKEN_CACHE_FILE, DEFAULT_EXTENSIONS, DEFAULT_GRAPH_CACHE_FILE, DEFAULT_IGNORE_DIRS, type DependencyGraph, type DuplicateFamily, type DuplicateGroup, type DuplicateOccurrence, type DuplicationTokenCache, EXPORT_TRACKING_TYPES, type ExportKind, type FeatureDetectionOptions, type FeatureDomain, type FeatureGraph, type FeatureGraphOptions, type FeatureInfo, FileNode, FileType, type FindComplexFunctionsOptions, type FindDuplicatesOptions, type FindDuplicatesResult, type FindRiskHotspotsOptions, type FunctionCallInfo, type GetAffectedOptions, type GetCallersOptions, Graph, type CallerEntry as GraphCallerEntry, type GraphExporter, IMPORT_SYMBOL_TYPES, ImportEdge, type LanguageCoverage, MermaidExporter, type ModuleResponsibility, type ModuleRole, type MokoshConfig, type MonorepoDetector, type MonorepoLayout, NodeCategory, type NodeMeta, type NodeQuery, type ParallelParsingOption, type PathWithSymbols, type ProposeTagsOptions, type PublicExport, type ResponsibilityGraph, type RiskHotspotEntry, type RiskHotspotsResult, type ScanOptions, type SerializedGraph, type SerializedWorkspaceGraph, type SlimNode, type SlimSerializedGraph, StructuredTag, type SymbolCaller, type SymbolImporter, type SymbolMatch, type SymbolPrecision, SymbolTraversalContext, type TestNodeIdentifier, type TraversalOptions, type TraversalVisitor, type TypeEdge, type TypeGraph, type TypeKind, type TypeNode, type TypeQueryResult, WorkspaceGraph, type WorkspacePackage, type WorkspacePackageSummary, type WorkspacePackagesSummary, applyConfig, applyTags, buildApiSurface, buildChangeImpactCache, buildFeatureGraph, buildResponsibilityGraph, buildTypeGraph, computeGraphHash, configToGraphOptions, createImportMap, createWorkspaceGraph, detectAllEntryPoints, detectEntryPoint, detectFeatures, detectMonorepo, filterGraph, findComplexFunctions, findDuplicates, findRiskHotspots, findSymbol, getAffected, getAllProjectFiles, getCallers, getDependencies, getDependents, getLanguageCoverage, getNodeMeta, hasChurnData, hasCoverageData, isChangeImpactCacheValid, loadChangeImpactCache, loadCoverageMap, loadMokoshConfig, loadTokenCacheFromDisk, parseQuery, proposeAffectedTests, proposeTags, queryCallGraph, queryChangeImpact, queryTypeGraph, registerConfigMatcher, registerMonorepoDetector, registerParser, registerTestLibrary, registerTestPattern, saveChangeImpactCache, saveTokenCacheToDisk, slimSerialize, summarizeWorkspacePackages, toMermaid };
|
|
1541
|
+
export { type ApiSurface, type ApplyTagsFileResult, type ApplyTagsResult, CALL_EDGE_TYPES, type CachedFileTokens, CallEdge, type CalleeEntry, type CallerEntry$1 as CallerEntry, type ChangeImpactCache, type ComplexFunctionEntry, DEFAULT_CACHE_DIR, DEFAULT_DUPLICATION_TOKEN_CACHE_FILE, DEFAULT_EXTENSIONS, DEFAULT_GRAPH_CACHE_FILE, DEFAULT_IGNORE_DIRS, type DependencyGraph, type DuplicateFamily, type DuplicateGroup, type DuplicateOccurrence, type DuplicationTokenCache, EXPORT_TRACKING_TYPES, type ExportKind, type FeatureDetectionOptions, type FeatureDomain, type FeatureGraph, type FeatureGraphOptions, type FeatureInfo, FileNode, FileType, type FindComplexFunctionsOptions, type FindDuplicatesOptions, type FindDuplicatesResult, type FindRiskHotspotsOptions, type FunctionCallInfo, type GetAffectedOptions, type GetCallersOptions, Graph, type CallerEntry as GraphCallerEntry, type GraphExporter, IMPORT_SYMBOL_TYPES, ImportEdge, type LanguageCoverage, MermaidExporter, type ModuleResponsibility, type ModuleRole, type MokoshConfig, type MonorepoDetector, type MonorepoLayout, NodeCategory, type NodeMeta, type NodeQuery, type ParallelParsingOption, type PathWithSymbols, type ProposeTagsOptions, type PublicExport, type ResponsibilityGraph, type RiskHotspotEntry, type RiskHotspotsResult, type ScanOptions, type SerializedGraph, type SerializedWorkspaceGraph, type SlimNode, type SlimSerializedGraph, StructuredTag, type SymbolCaller, type SymbolImporter, type SymbolMatch, type SymbolPrecision, SymbolTraversalContext, type TestNodeIdentifier, type TraversalOptions, type TraversalVisitor, type TypeEdge, type TypeGraph, type TypeKind, type TypeNode, type TypeQueryResult, WorkspaceGraph, type WorkspacePackage, type WorkspacePackageSummary, type WorkspacePackagesSummary, applyConfig, applyTags, buildApiSurface, buildChangeImpactCache, buildFeatureGraph, buildResponsibilityGraph, buildTypeGraph, computeGraphHash, configToGraphOptions, createImportMap, createWorkspaceGraph, detectAllEntryPoints, detectEntryPoint, detectFeatures, detectMonorepo, filterGraph, findComplexFunctions, findDuplicates, findRiskHotspots, findSymbol, getAffected, getAllProjectFiles, getCallers, getDependencies, getDependents, getLanguageCoverage, getNodeMeta, hasChurnData, hasCoverageData, isChangeImpactCacheValid, loadChangeImpactCache, loadCoverageMap, loadMokoshConfig, loadTokenCacheFromDisk, parseQuery, proposeAffectedTests, proposeTags, queryCallGraph, queryChangeImpact, queryTypeGraph, registerConfigMatcher, registerMonorepoDetector, registerParser, registerTestLibrary, registerTestPattern, resetClassifyRegistries, saveChangeImpactCache, saveTokenCacheToDisk, slimSerialize, summarizeWorkspacePackages, toMermaid };
|