driftdetect 0.9.31 → 0.9.33
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/dist/bin/drift.js +1 -1
- package/dist/bin/drift.js.map +1 -1
- package/dist/commands/approve.d.ts.map +1 -1
- package/dist/commands/approve.js +5 -4
- package/dist/commands/approve.js.map +1 -1
- package/dist/commands/audit.d.ts.map +1 -1
- package/dist/commands/audit.js +5 -3
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/boundaries.d.ts.map +1 -1
- package/dist/commands/boundaries.js +1 -1
- package/dist/commands/boundaries.js.map +1 -1
- package/dist/commands/callgraph.d.ts.map +1 -1
- package/dist/commands/callgraph.js +7 -4
- package/dist/commands/callgraph.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +11 -7
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/constants.d.ts.map +1 -1
- package/dist/commands/constants.js +1 -1
- package/dist/commands/constants.js.map +1 -1
- package/dist/commands/constraints.d.ts.map +1 -1
- package/dist/commands/constraints.js +7 -4
- package/dist/commands/constraints.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/coupling.d.ts.map +1 -1
- package/dist/commands/coupling.js +25 -14
- package/dist/commands/coupling.js.map +1 -1
- package/dist/commands/cpp.d.ts.map +1 -1
- package/dist/commands/cpp.js +3 -3
- package/dist/commands/cpp.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +1 -1
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/decisions.d.ts.map +1 -1
- package/dist/commands/decisions.js +7 -4
- package/dist/commands/decisions.js.map +1 -1
- package/dist/commands/dna/export.d.ts.map +1 -1
- package/dist/commands/dna/export.js +1 -1
- package/dist/commands/dna/export.js.map +1 -1
- package/dist/commands/dna/gene.d.ts.map +1 -1
- package/dist/commands/dna/gene.js +1 -1
- package/dist/commands/dna/gene.js.map +1 -1
- package/dist/commands/dna/index.d.ts.map +1 -1
- package/dist/commands/dna/index.js +3 -3
- package/dist/commands/dna/index.js.map +1 -1
- package/dist/commands/dna/mutations.d.ts.map +1 -1
- package/dist/commands/dna/mutations.js +17 -9
- package/dist/commands/dna/mutations.js.map +1 -1
- package/dist/commands/dna/playbook.d.ts.map +1 -1
- package/dist/commands/dna/playbook.js +1 -1
- package/dist/commands/dna/playbook.js.map +1 -1
- package/dist/commands/dna/scan.d.ts.map +1 -1
- package/dist/commands/dna/scan.js +7 -4
- package/dist/commands/dna/scan.js.map +1 -1
- package/dist/commands/dna/status.d.ts.map +1 -1
- package/dist/commands/dna/status.js +9 -5
- package/dist/commands/dna/status.js.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/env.js.map +1 -1
- package/dist/commands/error-handling.d.ts.map +1 -1
- package/dist/commands/error-handling.js +13 -7
- package/dist/commands/error-handling.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +1 -1
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/files.d.ts.map +1 -1
- package/dist/commands/files.js +1 -1
- package/dist/commands/files.js.map +1 -1
- package/dist/commands/gate.d.ts.map +1 -1
- package/dist/commands/gate.js +4 -3
- package/dist/commands/gate.js.map +1 -1
- package/dist/commands/go.d.ts.map +1 -1
- package/dist/commands/go.js +1 -1
- package/dist/commands/go.js.map +1 -1
- package/dist/commands/ignore.d.ts.map +1 -1
- package/dist/commands/ignore.js +4 -3
- package/dist/commands/ignore.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/java.d.ts.map +1 -1
- package/dist/commands/java.js +1 -1
- package/dist/commands/java.js.map +1 -1
- package/dist/commands/license.d.ts.map +1 -1
- package/dist/commands/license.js +3 -2
- package/dist/commands/license.js.map +1 -1
- package/dist/commands/migrate-storage.d.ts.map +1 -1
- package/dist/commands/migrate-storage.js +8 -6
- package/dist/commands/migrate-storage.js.map +1 -1
- package/dist/commands/next-steps.d.ts.map +1 -1
- package/dist/commands/next-steps.js +15 -9
- package/dist/commands/next-steps.js.map +1 -1
- package/dist/commands/parser.d.ts.map +1 -1
- package/dist/commands/parser.js +9 -5
- package/dist/commands/parser.js.map +1 -1
- package/dist/commands/php.d.ts.map +1 -1
- package/dist/commands/php.js +1 -1
- package/dist/commands/php.js.map +1 -1
- package/dist/commands/projects.d.ts.map +1 -1
- package/dist/commands/projects.js +16 -9
- package/dist/commands/projects.js.map +1 -1
- package/dist/commands/py.d.ts.map +1 -1
- package/dist/commands/py.js +1 -1
- package/dist/commands/py.js.map +1 -1
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/report.js +3 -3
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/rust.d.ts.map +1 -1
- package/dist/commands/rust.js +1 -1
- package/dist/commands/rust.js.map +1 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +39 -22
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/simulate.d.ts.map +1 -1
- package/dist/commands/simulate.js +1 -1
- package/dist/commands/simulate.js.map +1 -1
- package/dist/commands/skills.d.ts.map +1 -1
- package/dist/commands/skills.js +22 -14
- package/dist/commands/skills.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/telemetry.d.ts.map +1 -1
- package/dist/commands/telemetry.js +3 -3
- package/dist/commands/telemetry.js.map +1 -1
- package/dist/commands/test-topology.d.ts.map +1 -1
- package/dist/commands/test-topology.js +19 -10
- package/dist/commands/test-topology.js.map +1 -1
- package/dist/commands/trends.d.ts.map +1 -1
- package/dist/commands/trends.js +1 -1
- package/dist/commands/trends.js.map +1 -1
- package/dist/commands/troubleshoot.d.ts.map +1 -1
- package/dist/commands/troubleshoot.js +9 -5
- package/dist/commands/troubleshoot.js.map +1 -1
- package/dist/commands/ts.d.ts.map +1 -1
- package/dist/commands/ts.js +1 -1
- package/dist/commands/ts.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +23 -13
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/where.d.ts.map +1 -1
- package/dist/commands/where.js +3 -2
- package/dist/commands/where.js.map +1 -1
- package/dist/commands/wpf.d.ts.map +1 -1
- package/dist/commands/wpf.js +1 -1
- package/dist/commands/wpf.js.map +1 -1
- package/dist/commands/wrappers.d.ts.map +1 -1
- package/dist/commands/wrappers.js +4 -4
- package/dist/commands/wrappers.js.map +1 -1
- package/dist/git/hooks.js +1 -1
- package/dist/git/hooks.js.map +1 -1
- package/dist/reporters/github-reporter.js +8 -4
- package/dist/reporters/github-reporter.js.map +1 -1
- package/dist/reporters/gitlab-reporter.d.ts.map +1 -1
- package/dist/reporters/gitlab-reporter.js.map +1 -1
- package/dist/reporters/text-reporter.d.ts.map +1 -1
- package/dist/reporters/text-reporter.js.map +1 -1
- package/dist/services/boundary-scanner.d.ts.map +1 -1
- package/dist/services/boundary-scanner.js +24 -12
- package/dist/services/boundary-scanner.js.map +1 -1
- package/dist/services/contract-scanner.d.ts +1 -1
- package/dist/services/contract-scanner.d.ts.map +1 -1
- package/dist/services/contract-scanner.js +3 -2
- package/dist/services/contract-scanner.js.map +1 -1
- package/dist/services/scanner-service.d.ts.map +1 -1
- package/dist/services/scanner-service.js +90 -53
- package/dist/services/scanner-service.js.map +1 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +1 -1
- package/dist/ui/progress.js.map +1 -1
- package/dist/ui/prompts.d.ts.map +1 -1
- package/dist/ui/prompts.js.map +1 -1
- package/dist/ui/spinner.js +1 -1
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +1 -1
- package/dist/ui/table.js.map +1 -1
- package/dist/workers/detector-worker.d.ts.map +1 -1
- package/dist/workers/detector-worker.js +12 -6
- package/dist/workers/detector-worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/bin/drift.d.ts +0 -11
- package/dist/commands/approve.d.ts +0 -28
- package/dist/commands/audit.d.ts +0 -29
- package/dist/commands/boundaries.d.ts +0 -20
- package/dist/commands/callgraph.d.ts +0 -24
- package/dist/commands/check.d.ts +0 -41
- package/dist/commands/constants.d.ts +0 -35
- package/dist/commands/constraints.d.ts +0 -17
- package/dist/commands/context.d.ts +0 -19
- package/dist/commands/coupling.d.ts +0 -17
- package/dist/commands/cpp.d.ts +0 -22
- package/dist/commands/dashboard.d.ts +0 -16
- package/dist/commands/decisions.d.ts +0 -19
- package/dist/commands/dna/export.d.ts +0 -6
- package/dist/commands/dna/gene.d.ts +0 -6
- package/dist/commands/dna/index.d.ts +0 -8
- package/dist/commands/dna/mutations.d.ts +0 -6
- package/dist/commands/dna/playbook.d.ts +0 -6
- package/dist/commands/dna/scan.d.ts +0 -6
- package/dist/commands/dna/status.d.ts +0 -6
- package/dist/commands/env.d.ts +0 -23
- package/dist/commands/error-handling.d.ts +0 -15
- package/dist/commands/export.d.ts +0 -16
- package/dist/commands/files.d.ts +0 -15
- package/dist/commands/gate.d.ts +0 -33
- package/dist/commands/go.d.ts +0 -21
- package/dist/commands/ignore.d.ts +0 -20
- package/dist/commands/index.d.ts +0 -50
- package/dist/commands/index.js +0 -68
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -19
- package/dist/commands/java.d.ts +0 -15
- package/dist/commands/license.d.ts +0 -12
- package/dist/commands/migrate-storage.d.ts +0 -23
- package/dist/commands/next-steps.d.ts +0 -15
- package/dist/commands/parser.d.ts +0 -20
- package/dist/commands/php.d.ts +0 -15
- package/dist/commands/projects.d.ts +0 -17
- package/dist/commands/py.d.ts +0 -15
- package/dist/commands/report.d.ts +0 -22
- package/dist/commands/rust.d.ts +0 -21
- package/dist/commands/scan.d.ts +0 -45
- package/dist/commands/simulate.d.ts +0 -17
- package/dist/commands/skills.d.ts +0 -16
- package/dist/commands/status.d.ts +0 -20
- package/dist/commands/telemetry.d.ts +0 -9
- package/dist/commands/test-topology.d.ts +0 -15
- package/dist/commands/trends.d.ts +0 -12
- package/dist/commands/troubleshoot.d.ts +0 -14
- package/dist/commands/ts.d.ts +0 -21
- package/dist/commands/watch.d.ts +0 -13
- package/dist/commands/where.d.ts +0 -15
- package/dist/commands/wpf.d.ts +0 -21
- package/dist/commands/wrappers.d.ts +0 -16
- package/dist/git/hooks.d.ts +0 -108
- package/dist/git/index.d.ts +0 -6
- package/dist/git/index.d.ts.map +0 -1
- package/dist/git/index.js +0 -6
- package/dist/git/index.js.map +0 -1
- package/dist/git/staged-files.d.ts +0 -41
- package/dist/git/staged-files.d.ts.map +0 -1
- package/dist/git/staged-files.js +0 -118
- package/dist/git/staged-files.js.map +0 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.js +0 -24
- package/dist/index.js.map +0 -1
- package/dist/reporters/github-reporter.d.ts +0 -13
- package/dist/reporters/gitlab-reporter.d.ts +0 -16
- package/dist/reporters/index.d.ts +0 -9
- package/dist/reporters/index.js +0 -9
- package/dist/reporters/index.js.map +0 -1
- package/dist/reporters/json-reporter.d.ts +0 -13
- package/dist/reporters/json-reporter.js +0 -44
- package/dist/reporters/json-reporter.js.map +0 -1
- package/dist/reporters/text-reporter.d.ts +0 -13
- package/dist/reporters/types.d.ts +0 -42
- package/dist/reporters/types.js +0 -5
- package/dist/reporters/types.js.map +0 -1
- package/dist/services/boundary-scanner.d.ts +0 -22
- package/dist/services/pattern-service-factory.d.ts +0 -37
- package/dist/services/pattern-service-factory.js +0 -41
- package/dist/services/pattern-service-factory.js.map +0 -1
- package/dist/services/scanner-service.d.ts +0 -237
- package/dist/types/index.d.ts +0 -24
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -5
- package/dist/types/index.js.map +0 -1
- package/dist/ui/index.d.ts +0 -11
- package/dist/ui/index.js +0 -15
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/progress.d.ts +0 -115
- package/dist/ui/prompts.d.ts +0 -91
- package/dist/ui/spinner.d.ts +0 -109
- package/dist/ui/table.d.ts +0 -118
- package/dist/workers/detector-worker.d.ts +0 -125
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Projects Command - drift projects
|
|
3
|
-
*
|
|
4
|
-
* Manage multiple drift-initialized projects from a central registry.
|
|
5
|
-
* Supports listing, switching, and organizing projects.
|
|
6
|
-
*
|
|
7
|
-
* Commands:
|
|
8
|
-
* - drift projects list - List all registered projects
|
|
9
|
-
* - drift projects switch - Switch active project
|
|
10
|
-
* - drift projects add - Register a project
|
|
11
|
-
* - drift projects remove - Unregister a project
|
|
12
|
-
* - drift projects info - Show project details
|
|
13
|
-
* - drift projects cleanup - Remove invalid projects
|
|
14
|
-
*/
|
|
15
|
-
import { Command } from 'commander';
|
|
16
|
-
export declare const projectsCommand: Command;
|
|
17
|
-
//# sourceMappingURL=projects.d.ts.map
|
package/dist/commands/py.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Python Command - drift py
|
|
3
|
-
*
|
|
4
|
-
* Analyze Python projects: routes, error handling, data access, async patterns.
|
|
5
|
-
*
|
|
6
|
-
* @requirements Python Language Support
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
export interface PyOptions {
|
|
10
|
-
format?: 'text' | 'json';
|
|
11
|
-
verbose?: boolean;
|
|
12
|
-
framework?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function createPyCommand(): Command;
|
|
15
|
-
//# sourceMappingURL=py.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Report Command - drift report
|
|
3
|
-
*
|
|
4
|
-
* Generate reports in various formats.
|
|
5
|
-
*
|
|
6
|
-
* MIGRATION: Now uses IPatternService for pattern operations.
|
|
7
|
-
*
|
|
8
|
-
* @requirements 29.7
|
|
9
|
-
*/
|
|
10
|
-
import { Command } from 'commander';
|
|
11
|
-
export interface ReportOptions {
|
|
12
|
-
/** Output format */
|
|
13
|
-
format?: 'text' | 'json' | 'github' | 'gitlab';
|
|
14
|
-
/** Output file path */
|
|
15
|
-
output?: string;
|
|
16
|
-
/** Include only specific categories */
|
|
17
|
-
categories?: string[];
|
|
18
|
-
/** Enable verbose output */
|
|
19
|
-
verbose?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const reportCommand: Command;
|
|
22
|
-
//# sourceMappingURL=report.d.ts.map
|
package/dist/commands/rust.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rust Command - drift rust
|
|
3
|
-
*
|
|
4
|
-
* Analyze Rust projects: routes, error handling, traits, data access.
|
|
5
|
-
*
|
|
6
|
-
* @requirements Rust Language Support
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
export interface RustOptions {
|
|
10
|
-
/** Output format */
|
|
11
|
-
format?: 'text' | 'json';
|
|
12
|
-
/** Enable verbose output */
|
|
13
|
-
verbose?: boolean;
|
|
14
|
-
/** Filter by framework */
|
|
15
|
-
framework?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Create the Rust command
|
|
19
|
-
*/
|
|
20
|
-
export declare function createRustCommand(): Command;
|
|
21
|
-
//# sourceMappingURL=rust.d.ts.map
|
package/dist/commands/scan.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scan Command - drift scan
|
|
3
|
-
*
|
|
4
|
-
* Perform a full codebase scan to discover patterns using
|
|
5
|
-
* enterprise-grade detectors from driftdetect-detectors.
|
|
6
|
-
*
|
|
7
|
-
* @requirements 29.2
|
|
8
|
-
*/
|
|
9
|
-
import { Command } from 'commander';
|
|
10
|
-
export interface ScanCommandOptions {
|
|
11
|
-
/** Specific paths to scan */
|
|
12
|
-
paths?: string[];
|
|
13
|
-
/** Enable verbose output */
|
|
14
|
-
verbose?: boolean;
|
|
15
|
-
/** Force rescan even if cache is valid */
|
|
16
|
-
force?: boolean;
|
|
17
|
-
/** Only run critical detectors */
|
|
18
|
-
critical?: boolean;
|
|
19
|
-
/** Filter by categories */
|
|
20
|
-
categories?: string[];
|
|
21
|
-
/** Generate manifest with semantic locations */
|
|
22
|
-
manifest?: boolean;
|
|
23
|
-
/** Incremental scan (only changed files) */
|
|
24
|
-
incremental?: boolean;
|
|
25
|
-
/** Skip BE↔FE contract scanning (contracts enabled by default) */
|
|
26
|
-
contracts?: boolean;
|
|
27
|
-
/** Skip data boundary scanning (boundaries enabled by default) */
|
|
28
|
-
boundaries?: boolean;
|
|
29
|
-
/** Build test topology during scan */
|
|
30
|
-
testTopology?: boolean;
|
|
31
|
-
/** Extract constants during scan */
|
|
32
|
-
constants?: boolean;
|
|
33
|
-
/** Build call graph during scan */
|
|
34
|
-
callgraph?: boolean;
|
|
35
|
-
/** Scan a specific registered project by name */
|
|
36
|
-
project?: string;
|
|
37
|
-
/** Scan all registered projects */
|
|
38
|
-
allProjects?: boolean;
|
|
39
|
-
/** Scan timeout in seconds (default: 300 = 5 minutes) */
|
|
40
|
-
timeout?: number;
|
|
41
|
-
/** Maximum file size in bytes to scan (default: 1MB) */
|
|
42
|
-
maxFileSize?: number;
|
|
43
|
-
}
|
|
44
|
-
export declare const scanCommand: Command;
|
|
45
|
-
//# sourceMappingURL=scan.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Simulate Command - drift simulate
|
|
3
|
-
*
|
|
4
|
-
* Speculative Execution Engine: Simulates multiple implementation approaches
|
|
5
|
-
* BEFORE code generation, scoring them by friction, impact, and pattern alignment.
|
|
6
|
-
*/
|
|
7
|
-
import { Command } from 'commander';
|
|
8
|
-
export interface SimulateOptions {
|
|
9
|
-
format?: 'text' | 'json' | undefined;
|
|
10
|
-
verbose?: boolean | undefined;
|
|
11
|
-
maxApproaches?: number | undefined;
|
|
12
|
-
category?: string | undefined;
|
|
13
|
-
target?: string | undefined;
|
|
14
|
-
constraint?: string[] | undefined;
|
|
15
|
-
}
|
|
16
|
-
export declare function createSimulateCommand(): Command;
|
|
17
|
-
//# sourceMappingURL=simulate.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skills Command - drift skills
|
|
3
|
-
*
|
|
4
|
-
* Manage Agent Skills for AI-assisted development.
|
|
5
|
-
* Skills are folders of instructions, scripts, and resources that AI agents
|
|
6
|
-
* can load to perform specialized tasks.
|
|
7
|
-
*
|
|
8
|
-
* Commands:
|
|
9
|
-
* - drift skills list - List available skills
|
|
10
|
-
* - drift skills install - Install a skill to your project
|
|
11
|
-
* - drift skills info - Show skill details
|
|
12
|
-
* - drift skills search - Search skills by keyword
|
|
13
|
-
*/
|
|
14
|
-
import { Command } from 'commander';
|
|
15
|
-
export declare const skillsCommand: Command;
|
|
16
|
-
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Status Command - drift status
|
|
3
|
-
*
|
|
4
|
-
* Show current drift status including patterns and violations.
|
|
5
|
-
*
|
|
6
|
-
* MIGRATION: Now uses IPatternService for pattern operations.
|
|
7
|
-
*
|
|
8
|
-
* @requirements 29.4
|
|
9
|
-
*/
|
|
10
|
-
import { Command } from 'commander';
|
|
11
|
-
export interface StatusOptions {
|
|
12
|
-
/** Show detailed information */
|
|
13
|
-
detailed?: boolean;
|
|
14
|
-
/** Output format */
|
|
15
|
-
format?: 'text' | 'json';
|
|
16
|
-
/** Enable verbose output */
|
|
17
|
-
verbose?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const statusCommand: Command;
|
|
20
|
-
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Telemetry Command - drift telemetry
|
|
3
|
-
*
|
|
4
|
-
* Manage telemetry settings for Drift.
|
|
5
|
-
* All telemetry is opt-in and privacy-first.
|
|
6
|
-
*/
|
|
7
|
-
import { Command } from 'commander';
|
|
8
|
-
export declare const telemetryCommand: Command;
|
|
9
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Topology Command - drift test-topology
|
|
3
|
-
*
|
|
4
|
-
* Analyze test-to-code mappings, mock patterns, and test quality.
|
|
5
|
-
* Answers: "Which tests cover this code?" and "What's the minimum test set?"
|
|
6
|
-
*/
|
|
7
|
-
import { Command } from 'commander';
|
|
8
|
-
export interface TestTopologyOptions {
|
|
9
|
-
format?: 'text' | 'json';
|
|
10
|
-
verbose?: boolean;
|
|
11
|
-
limit?: number;
|
|
12
|
-
minRisk?: 'low' | 'medium' | 'high';
|
|
13
|
-
}
|
|
14
|
-
export declare function createTestTopologyCommand(): Command;
|
|
15
|
-
//# sourceMappingURL=test-topology.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Trends Command - drift trends
|
|
3
|
-
*
|
|
4
|
-
* View pattern regressions and improvements over time.
|
|
5
|
-
*/
|
|
6
|
-
import { Command } from 'commander';
|
|
7
|
-
export interface TrendsCommandOptions {
|
|
8
|
-
period?: '7d' | '30d' | '90d';
|
|
9
|
-
verbose?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const trendsCommand: Command;
|
|
12
|
-
//# sourceMappingURL=trends.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Troubleshoot Command - drift troubleshoot
|
|
3
|
-
*
|
|
4
|
-
* Diagnoses common issues and provides targeted fixes.
|
|
5
|
-
* Helps users resolve problems without searching documentation.
|
|
6
|
-
*/
|
|
7
|
-
import { Command } from 'commander';
|
|
8
|
-
export interface TroubleshootOptions {
|
|
9
|
-
format?: 'text' | 'json';
|
|
10
|
-
verbose?: boolean;
|
|
11
|
-
fix?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const troubleshootCommand: Command;
|
|
14
|
-
//# sourceMappingURL=troubleshoot.d.ts.map
|
package/dist/commands/ts.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript Command - drift ts
|
|
3
|
-
*
|
|
4
|
-
* Analyze TypeScript/JavaScript projects: routes, components, hooks, error handling, data access.
|
|
5
|
-
*
|
|
6
|
-
* @requirements TypeScript Language Support
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
export interface TsOptions {
|
|
10
|
-
/** Output format */
|
|
11
|
-
format?: 'text' | 'json';
|
|
12
|
-
/** Enable verbose output */
|
|
13
|
-
verbose?: boolean;
|
|
14
|
-
/** Filter by framework */
|
|
15
|
-
framework?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Create the TypeScript command
|
|
19
|
-
*/
|
|
20
|
-
export declare function createTsCommand(): Command;
|
|
21
|
-
//# sourceMappingURL=ts.d.ts.map
|
package/dist/commands/watch.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Drift Watch Command
|
|
3
|
-
*
|
|
4
|
-
* Real-time file watching with pattern detection and persistence.
|
|
5
|
-
* Monitors file changes, detects patterns, persists to store, and emits events.
|
|
6
|
-
*
|
|
7
|
-
* @requirements Phase 1 - Watch mode should persist patterns to store
|
|
8
|
-
* @requirements Phase 2 - Smart merge strategy for pattern updates
|
|
9
|
-
* @requirements Phase 3 - File-level tracking for incremental updates
|
|
10
|
-
*/
|
|
11
|
-
import { Command } from 'commander';
|
|
12
|
-
export declare const watchCommandDef: Command;
|
|
13
|
-
//# sourceMappingURL=watch.d.ts.map
|
package/dist/commands/where.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Where Command - Find pattern locations
|
|
3
|
-
*
|
|
4
|
-
* Quickly find where patterns are located in the codebase.
|
|
5
|
-
*
|
|
6
|
-
* MIGRATION: Now uses IPatternService for pattern operations.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* drift where auth # Find patterns matching "auth"
|
|
10
|
-
* drift where middleware # Find middleware patterns
|
|
11
|
-
* drift where --json # Output as JSON
|
|
12
|
-
*/
|
|
13
|
-
import { Command } from 'commander';
|
|
14
|
-
export declare const whereCommand: Command;
|
|
15
|
-
//# sourceMappingURL=where.d.ts.map
|
package/dist/commands/wpf.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WPF Command - drift wpf
|
|
3
|
-
*
|
|
4
|
-
* Analyze WPF applications: bindings, MVVM compliance, data flow.
|
|
5
|
-
*
|
|
6
|
-
* @requirements WPF Framework Support
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
export interface WpfOptions {
|
|
10
|
-
/** Output format */
|
|
11
|
-
format?: 'text' | 'json';
|
|
12
|
-
/** Enable verbose output */
|
|
13
|
-
verbose?: boolean;
|
|
14
|
-
/** Show only unresolved bindings */
|
|
15
|
-
unresolvedOnly?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Create the WPF command
|
|
19
|
-
*/
|
|
20
|
-
export declare function createWpfCommand(): Command;
|
|
21
|
-
//# sourceMappingURL=wpf.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Wrappers Command
|
|
3
|
-
*
|
|
4
|
-
* Detect framework wrapper patterns in the codebase.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* drift wrappers # Scan current directory
|
|
8
|
-
* drift wrappers --json # Output as JSON
|
|
9
|
-
* drift wrappers --verbose # Show detailed output
|
|
10
|
-
* drift wrappers --include-tests # Include test files
|
|
11
|
-
* drift wrappers --min-confidence 0.8 # Filter by confidence
|
|
12
|
-
*/
|
|
13
|
-
import { Command } from 'commander';
|
|
14
|
-
export declare const wrappersCommand: Command;
|
|
15
|
-
export default wrappersCommand;
|
|
16
|
-
//# sourceMappingURL=wrappers.d.ts.map
|
package/dist/git/hooks.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git Hooks - Pre-commit and pre-push hook setup
|
|
3
|
-
*
|
|
4
|
-
* Provides functionality to install and manage Git hooks for Drift integration.
|
|
5
|
-
* Supports both Husky-based and direct Git hooks installation.
|
|
6
|
-
*
|
|
7
|
-
* @requirements 37.1, 37.3
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Hook types supported by Drift
|
|
11
|
-
*/
|
|
12
|
-
export type HookType = 'pre-commit' | 'pre-push';
|
|
13
|
-
/**
|
|
14
|
-
* Result of a hook installation operation
|
|
15
|
-
*/
|
|
16
|
-
export interface HookInstallResult {
|
|
17
|
-
success: boolean;
|
|
18
|
-
hookType: HookType;
|
|
19
|
-
method: 'husky' | 'git';
|
|
20
|
-
message: string;
|
|
21
|
-
path?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Options for hook installation
|
|
25
|
-
*/
|
|
26
|
-
export interface HookInstallOptions {
|
|
27
|
-
/** Force overwrite existing hooks */
|
|
28
|
-
force?: boolean;
|
|
29
|
-
/** Use Husky if available */
|
|
30
|
-
preferHusky?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Check if Husky is installed and configured in the project
|
|
34
|
-
*
|
|
35
|
-
* @param rootDir - Root directory of the repository
|
|
36
|
-
* @returns True if Husky is available
|
|
37
|
-
*/
|
|
38
|
-
export declare function isHuskyInstalled(rootDir: string): Promise<boolean>;
|
|
39
|
-
/**
|
|
40
|
-
* Get the Git hooks directory path
|
|
41
|
-
*
|
|
42
|
-
* @param rootDir - Root directory of the repository
|
|
43
|
-
* @returns Path to the Git hooks directory
|
|
44
|
-
*/
|
|
45
|
-
export declare function getGitHooksDir(rootDir: string): Promise<string>;
|
|
46
|
-
/**
|
|
47
|
-
* Install a pre-commit hook for Drift
|
|
48
|
-
*
|
|
49
|
-
* The pre-commit hook runs `drift check --staged` to check only staged files
|
|
50
|
-
* before allowing a commit.
|
|
51
|
-
*
|
|
52
|
-
* @param rootDir - Root directory of the repository
|
|
53
|
-
* @param options - Installation options
|
|
54
|
-
* @returns Installation result
|
|
55
|
-
*
|
|
56
|
-
* @requirements 37.1
|
|
57
|
-
*/
|
|
58
|
-
export declare function installPreCommitHook(rootDir: string, options?: HookInstallOptions): Promise<HookInstallResult>;
|
|
59
|
-
/**
|
|
60
|
-
* Install a pre-push hook for Drift
|
|
61
|
-
*
|
|
62
|
-
* The pre-push hook runs `drift check` to perform a full check
|
|
63
|
-
* before allowing a push.
|
|
64
|
-
*
|
|
65
|
-
* @param rootDir - Root directory of the repository
|
|
66
|
-
* @param options - Installation options
|
|
67
|
-
* @returns Installation result
|
|
68
|
-
*
|
|
69
|
-
* @requirements 37.3
|
|
70
|
-
*/
|
|
71
|
-
export declare function installPrePushHook(rootDir: string, options?: HookInstallOptions): Promise<HookInstallResult>;
|
|
72
|
-
/**
|
|
73
|
-
* Install all Drift Git hooks (pre-commit and pre-push)
|
|
74
|
-
*
|
|
75
|
-
* @param rootDir - Root directory of the repository
|
|
76
|
-
* @param options - Installation options
|
|
77
|
-
* @returns Array of installation results
|
|
78
|
-
*
|
|
79
|
-
* @requirements 37.1, 37.3
|
|
80
|
-
*/
|
|
81
|
-
export declare function installAllHooks(rootDir: string, options?: HookInstallOptions): Promise<HookInstallResult[]>;
|
|
82
|
-
/**
|
|
83
|
-
* Uninstall a Git hook
|
|
84
|
-
*
|
|
85
|
-
* @param rootDir - Root directory of the repository
|
|
86
|
-
* @param hookType - Type of hook to uninstall
|
|
87
|
-
* @returns True if hook was removed
|
|
88
|
-
*/
|
|
89
|
-
export declare function uninstallHook(rootDir: string, hookType: HookType): Promise<boolean>;
|
|
90
|
-
/**
|
|
91
|
-
* Uninstall all Drift Git hooks
|
|
92
|
-
*
|
|
93
|
-
* @param rootDir - Root directory of the repository
|
|
94
|
-
* @returns Object with results for each hook type
|
|
95
|
-
*/
|
|
96
|
-
export declare function uninstallAllHooks(rootDir: string): Promise<Record<HookType, boolean>>;
|
|
97
|
-
/**
|
|
98
|
-
* Get the status of installed hooks
|
|
99
|
-
*
|
|
100
|
-
* @param rootDir - Root directory of the repository
|
|
101
|
-
* @returns Object with status for each hook type
|
|
102
|
-
*/
|
|
103
|
-
export declare function getHooksStatus(rootDir: string): Promise<Record<HookType, {
|
|
104
|
-
installed: boolean;
|
|
105
|
-
method?: 'husky' | 'git';
|
|
106
|
-
path?: string;
|
|
107
|
-
}>>;
|
|
108
|
-
//# sourceMappingURL=hooks.d.ts.map
|
package/dist/git/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git module exports
|
|
3
|
-
*/
|
|
4
|
-
export { getStagedFiles, getChangedFiles, getUntrackedFiles, isGitRepository, getGitRoot, } from './staged-files.js';
|
|
5
|
-
export { type HookType, type HookInstallResult, type HookInstallOptions, isHuskyInstalled, getGitHooksDir, installPreCommitHook, installPrePushHook, installAllHooks, uninstallHook, uninstallAllHooks, getHooksStatus, } from './hooks.js';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/git/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/git/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Git module exports
|
|
3
|
-
*/
|
|
4
|
-
export { getStagedFiles, getChangedFiles, getUntrackedFiles, isGitRepository, getGitRoot, } from './staged-files.js';
|
|
5
|
-
export { isHuskyInstalled, getGitHooksDir, installPreCommitHook, installPrePushHook, installAllHooks, uninstallHook, uninstallAllHooks, getHooksStatus, } from './hooks.js';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/git/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAIL,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Staged Files - Get list of staged files from Git
|
|
3
|
-
*
|
|
4
|
-
* @requirements 37.2
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Get list of staged files from Git
|
|
8
|
-
*
|
|
9
|
-
* @param rootDir - Root directory of the repository
|
|
10
|
-
* @returns Array of staged file paths (relative to rootDir)
|
|
11
|
-
*/
|
|
12
|
-
export declare function getStagedFiles(rootDir: string): Promise<string[]>;
|
|
13
|
-
/**
|
|
14
|
-
* Get list of all changed files (staged and unstaged)
|
|
15
|
-
*
|
|
16
|
-
* @param rootDir - Root directory of the repository
|
|
17
|
-
* @returns Array of changed file paths (relative to rootDir)
|
|
18
|
-
*/
|
|
19
|
-
export declare function getChangedFiles(rootDir: string): Promise<string[]>;
|
|
20
|
-
/**
|
|
21
|
-
* Get list of untracked files
|
|
22
|
-
*
|
|
23
|
-
* @param rootDir - Root directory of the repository
|
|
24
|
-
* @returns Array of untracked file paths (relative to rootDir)
|
|
25
|
-
*/
|
|
26
|
-
export declare function getUntrackedFiles(rootDir: string): Promise<string[]>;
|
|
27
|
-
/**
|
|
28
|
-
* Check if a path is inside a Git repository
|
|
29
|
-
*
|
|
30
|
-
* @param dirPath - Directory path to check
|
|
31
|
-
* @returns True if inside a Git repository
|
|
32
|
-
*/
|
|
33
|
-
export declare function isGitRepository(dirPath: string): Promise<boolean>;
|
|
34
|
-
/**
|
|
35
|
-
* Get the root directory of the Git repository
|
|
36
|
-
*
|
|
37
|
-
* @param dirPath - Directory path inside the repository
|
|
38
|
-
* @returns Root directory of the Git repository
|
|
39
|
-
*/
|
|
40
|
-
export declare function getGitRoot(dirPath: string): Promise<string>;
|
|
41
|
-
//# sourceMappingURL=staged-files.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staged-files.d.ts","sourceRoot":"","sources":["../../src/git/staged-files.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBvE;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBxE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiB1E;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUvE;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAWjE"}
|
package/dist/git/staged-files.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Staged Files - Get list of staged files from Git
|
|
3
|
-
*
|
|
4
|
-
* @requirements 37.2
|
|
5
|
-
*/
|
|
6
|
-
import { exec } from 'node:child_process';
|
|
7
|
-
import { promisify } from 'node:util';
|
|
8
|
-
const execAsync = promisify(exec);
|
|
9
|
-
/**
|
|
10
|
-
* Get list of staged files from Git
|
|
11
|
-
*
|
|
12
|
-
* @param rootDir - Root directory of the repository
|
|
13
|
-
* @returns Array of staged file paths (relative to rootDir)
|
|
14
|
-
*/
|
|
15
|
-
export async function getStagedFiles(rootDir) {
|
|
16
|
-
try {
|
|
17
|
-
const { stdout } = await execAsync('git diff --cached --name-only --diff-filter=ACMR', {
|
|
18
|
-
cwd: rootDir,
|
|
19
|
-
encoding: 'utf-8',
|
|
20
|
-
});
|
|
21
|
-
const files = stdout
|
|
22
|
-
.split('\n')
|
|
23
|
-
.map((line) => line.trim())
|
|
24
|
-
.filter((line) => line.length > 0);
|
|
25
|
-
return files;
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
const err = error;
|
|
29
|
-
if (err.code === 'ENOENT') {
|
|
30
|
-
throw new Error('Git is not installed or not in PATH');
|
|
31
|
-
}
|
|
32
|
-
throw new Error(`Failed to get staged files: ${err.message}`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Get list of all changed files (staged and unstaged)
|
|
37
|
-
*
|
|
38
|
-
* @param rootDir - Root directory of the repository
|
|
39
|
-
* @returns Array of changed file paths (relative to rootDir)
|
|
40
|
-
*/
|
|
41
|
-
export async function getChangedFiles(rootDir) {
|
|
42
|
-
try {
|
|
43
|
-
const { stdout } = await execAsync('git diff --name-only --diff-filter=ACMR HEAD', {
|
|
44
|
-
cwd: rootDir,
|
|
45
|
-
encoding: 'utf-8',
|
|
46
|
-
});
|
|
47
|
-
const files = stdout
|
|
48
|
-
.split('\n')
|
|
49
|
-
.map((line) => line.trim())
|
|
50
|
-
.filter((line) => line.length > 0);
|
|
51
|
-
return files;
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
const err = error;
|
|
55
|
-
throw new Error(`Failed to get changed files: ${err.message}`);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Get list of untracked files
|
|
60
|
-
*
|
|
61
|
-
* @param rootDir - Root directory of the repository
|
|
62
|
-
* @returns Array of untracked file paths (relative to rootDir)
|
|
63
|
-
*/
|
|
64
|
-
export async function getUntrackedFiles(rootDir) {
|
|
65
|
-
try {
|
|
66
|
-
const { stdout } = await execAsync('git ls-files --others --exclude-standard', {
|
|
67
|
-
cwd: rootDir,
|
|
68
|
-
encoding: 'utf-8',
|
|
69
|
-
});
|
|
70
|
-
const files = stdout
|
|
71
|
-
.split('\n')
|
|
72
|
-
.map((line) => line.trim())
|
|
73
|
-
.filter((line) => line.length > 0);
|
|
74
|
-
return files;
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
const err = error;
|
|
78
|
-
throw new Error(`Failed to get untracked files: ${err.message}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Check if a path is inside a Git repository
|
|
83
|
-
*
|
|
84
|
-
* @param dirPath - Directory path to check
|
|
85
|
-
* @returns True if inside a Git repository
|
|
86
|
-
*/
|
|
87
|
-
export async function isGitRepository(dirPath) {
|
|
88
|
-
try {
|
|
89
|
-
await execAsync('git rev-parse --git-dir', {
|
|
90
|
-
cwd: dirPath,
|
|
91
|
-
encoding: 'utf-8',
|
|
92
|
-
});
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
catch {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Get the root directory of the Git repository
|
|
101
|
-
*
|
|
102
|
-
* @param dirPath - Directory path inside the repository
|
|
103
|
-
* @returns Root directory of the Git repository
|
|
104
|
-
*/
|
|
105
|
-
export async function getGitRoot(dirPath) {
|
|
106
|
-
try {
|
|
107
|
-
const { stdout } = await execAsync('git rev-parse --show-toplevel', {
|
|
108
|
-
cwd: dirPath,
|
|
109
|
-
encoding: 'utf-8',
|
|
110
|
-
});
|
|
111
|
-
return stdout.trim();
|
|
112
|
-
}
|
|
113
|
-
catch (error) {
|
|
114
|
-
const err = error;
|
|
115
|
-
throw new Error(`Failed to get Git root: ${err.message}`);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=staged-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staged-files.js","sourceRoot":"","sources":["../../src/git/staged-files.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @drift/cli - Command-line interface for Drift
|
|
3
|
-
*
|
|
4
|
-
* This package provides CLI commands:
|
|
5
|
-
* - drift init: Initialize Drift in a project
|
|
6
|
-
* - drift scan: Scan codebase for patterns
|
|
7
|
-
* - drift check: Check for violations
|
|
8
|
-
* - drift status: Show current drift status
|
|
9
|
-
* - drift approve: Approve a pattern
|
|
10
|
-
* - drift ignore: Ignore a pattern
|
|
11
|
-
* - drift report: Generate reports
|
|
12
|
-
*/
|
|
13
|
-
export declare const VERSION: string;
|
|
14
|
-
export * from './types/index.js';
|
|
15
|
-
export * from './ui/index.js';
|
|
16
|
-
export { initCommand, scanCommand, checkCommand, statusCommand, approveCommand, ignoreCommand, reportCommand, } from './commands/index.js';
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|