@trishchuk/codex-mcp-tool 1.0.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -11
- package/dist/constants.d.ts +55 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +74 -31
- package/dist/constants.js.map +1 -1
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/dist/tools/apply-diff.tool.d.ts +3 -0
- package/dist/tools/apply-diff.tool.d.ts.map +1 -0
- package/dist/tools/apply-diff.tool.js +52 -0
- package/dist/tools/apply-diff.tool.js.map +1 -0
- package/dist/tools/ask-codex.tool.d.ts.map +1 -1
- package/dist/tools/ask-codex.tool.js +158 -33
- package/dist/tools/ask-codex.tool.js.map +1 -1
- package/dist/tools/batch-codex.tool.d.ts +3 -0
- package/dist/tools/batch-codex.tool.d.ts.map +1 -0
- package/dist/tools/batch-codex.tool.js +134 -0
- package/dist/tools/batch-codex.tool.js.map +1 -0
- package/dist/tools/brainstorm.tool.d.ts.map +1 -1
- package/dist/tools/brainstorm.tool.js +62 -29
- package/dist/tools/brainstorm.tool.js.map +1 -1
- package/dist/tools/exec-codex.tool.d.ts +3 -0
- package/dist/tools/exec-codex.tool.d.ts.map +1 -0
- package/dist/tools/exec-codex.tool.js +46 -0
- package/dist/tools/exec-codex.tool.js.map +1 -0
- package/dist/tools/fetch-chunk.tool.d.ts.map +1 -1
- package/dist/tools/fetch-chunk.tool.js +12 -8
- package/dist/tools/fetch-chunk.tool.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry.d.ts +3 -3
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +9 -5
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/review-codex.tool.d.ts +3 -0
- package/dist/tools/review-codex.tool.d.ts.map +1 -0
- package/dist/tools/review-codex.tool.js +91 -0
- package/dist/tools/review-codex.tool.js.map +1 -0
- package/dist/tools/simple-tools.d.ts +1 -0
- package/dist/tools/simple-tools.d.ts.map +1 -1
- package/dist/tools/simple-tools.js +42 -11
- package/dist/tools/simple-tools.js.map +1 -1
- package/dist/tools/test-tool.example.d.ts.map +1 -1
- package/dist/tools/test-tool.example.js +12 -10
- package/dist/tools/test-tool.example.js.map +1 -1
- package/dist/tools/timeout-test.tool.js +5 -5
- package/dist/tools/timeout-test.tool.js.map +1 -1
- package/dist/utils/changeModeChunker.d.ts.map +1 -1
- package/dist/utils/changeModeChunker.js +10 -6
- package/dist/utils/changeModeChunker.js.map +1 -1
- package/dist/utils/changeModeParser.d.ts.map +1 -1
- package/dist/utils/changeModeParser.js.map +1 -1
- package/dist/utils/changeModeRunner.d.ts.map +1 -1
- package/dist/utils/changeModeRunner.js +17 -11
- package/dist/utils/changeModeRunner.js.map +1 -1
- package/dist/utils/changeModeTranslator.d.ts.map +1 -1
- package/dist/utils/changeModeTranslator.js +5 -2
- package/dist/utils/changeModeTranslator.js.map +1 -1
- package/dist/utils/chunkCache.d.ts.map +1 -1
- package/dist/utils/chunkCache.js +6 -4
- package/dist/utils/chunkCache.js.map +1 -1
- package/dist/utils/codexExecutor.d.ts +17 -0
- package/dist/utils/codexExecutor.d.ts.map +1 -1
- package/dist/utils/codexExecutor.js +163 -4
- package/dist/utils/codexExecutor.js.map +1 -1
- package/dist/utils/commandExecutor.d.ts.map +1 -1
- package/dist/utils/commandExecutor.js +25 -17
- package/dist/utils/commandExecutor.js.map +1 -1
- package/dist/utils/fibonacci.d.ts +2 -0
- package/dist/utils/fibonacci.d.ts.map +1 -0
- package/dist/utils/fibonacci.js +17 -0
- package/dist/utils/fibonacci.js.map +1 -0
- package/dist/utils/gitHelper.d.ts +20 -0
- package/dist/utils/gitHelper.d.ts.map +1 -0
- package/dist/utils/gitHelper.js +66 -0
- package/dist/utils/gitHelper.js.map +1 -0
- package/dist/utils/logger.d.ts +2 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +21 -15
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/outputParser.d.ts +26 -0
- package/dist/utils/outputParser.d.ts.map +1 -0
- package/dist/utils/outputParser.js +174 -0
- package/dist/utils/outputParser.js.map +1 -0
- package/dist/utils/reviewParser.d.ts +28 -0
- package/dist/utils/reviewParser.d.ts.map +1 -0
- package/dist/utils/reviewParser.js +87 -0
- package/dist/utils/reviewParser.js.map +1 -0
- package/dist/utils/workingDirResolver.d.ts +47 -0
- package/dist/utils/workingDirResolver.d.ts.map +1 -0
- package/dist/utils/workingDirResolver.js +199 -0
- package/dist/utils/workingDirResolver.js.map +1 -0
- package/package.json +6 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the project root directory by walking up the directory tree
|
|
3
|
+
* looking for common project marker files.
|
|
4
|
+
*
|
|
5
|
+
* @param startPath - The directory or file path to start searching from
|
|
6
|
+
* @returns The project root directory, or the starting directory if no markers found
|
|
7
|
+
*/
|
|
8
|
+
export declare function findProjectRoot(startPath: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Ensures that the provided path points to a directory.
|
|
11
|
+
* If the path is a file, returns its parent directory.
|
|
12
|
+
* If the path doesn't exist or is invalid, returns undefined.
|
|
13
|
+
*
|
|
14
|
+
* @param path - The file or directory path
|
|
15
|
+
* @returns The directory path, or undefined if invalid
|
|
16
|
+
*/
|
|
17
|
+
export declare function ensureDirectory(path?: string): string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Extract absolute file paths from @path syntax in the prompt.
|
|
20
|
+
* Supports both quoted and unquoted paths.
|
|
21
|
+
*
|
|
22
|
+
* Examples:
|
|
23
|
+
* - @/absolute/path/to/file.ts
|
|
24
|
+
* - @"/path with spaces/file.ts"
|
|
25
|
+
* - @'/path with spaces/file.ts'
|
|
26
|
+
*
|
|
27
|
+
* @param prompt - The user prompt that may contain @path references
|
|
28
|
+
* @returns Array of absolute paths found in the prompt
|
|
29
|
+
*/
|
|
30
|
+
export declare function extractPathFromAtSyntax(prompt: string): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the working directory using a fallback chain with multiple strategies.
|
|
33
|
+
*
|
|
34
|
+
* Priority order (highest to lowest):
|
|
35
|
+
* 1. Explicit workingDir parameter
|
|
36
|
+
* 2. Environment variables: CODEX_MCP_CWD > PWD > INIT_CWD
|
|
37
|
+
* 3. Automatic inference from @path syntax in prompt
|
|
38
|
+
* 4. process.cwd() as last resort
|
|
39
|
+
*
|
|
40
|
+
* @param options - Resolution options
|
|
41
|
+
* @returns The resolved working directory path
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveWorkingDirectory(options?: {
|
|
44
|
+
workingDir?: string;
|
|
45
|
+
prompt?: string;
|
|
46
|
+
}): string | undefined;
|
|
47
|
+
//# sourceMappingURL=workingDirResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workingDirResolver.d.ts","sourceRoot":"","sources":["../../src/utils/workingDirResolver.ts"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2CzD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkCjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BhE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,GAAG,SAAS,CAiDrB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { existsSync, statSync } from 'fs';
|
|
2
|
+
import { dirname, resolve, isAbsolute } from 'path';
|
|
3
|
+
import { Logger } from './logger.js';
|
|
4
|
+
/**
|
|
5
|
+
* Project marker files that indicate the root of a project directory
|
|
6
|
+
*/
|
|
7
|
+
const PROJECT_MARKERS = [
|
|
8
|
+
'package.json', // Node.js/JavaScript
|
|
9
|
+
'.git', // Git repository
|
|
10
|
+
'pyproject.toml', // Python
|
|
11
|
+
'Cargo.toml', // Rust
|
|
12
|
+
'go.mod', // Go
|
|
13
|
+
'pom.xml', // Java (Maven)
|
|
14
|
+
'build.gradle', // Java (Gradle)
|
|
15
|
+
'composer.json', // PHP
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Maximum levels to walk up the directory tree when searching for project root
|
|
19
|
+
*/
|
|
20
|
+
const MAX_WALK_UP_LEVELS = 10;
|
|
21
|
+
/**
|
|
22
|
+
* Find the project root directory by walking up the directory tree
|
|
23
|
+
* looking for common project marker files.
|
|
24
|
+
*
|
|
25
|
+
* @param startPath - The directory or file path to start searching from
|
|
26
|
+
* @returns The project root directory, or the starting directory if no markers found
|
|
27
|
+
*/
|
|
28
|
+
export function findProjectRoot(startPath) {
|
|
29
|
+
try {
|
|
30
|
+
// Ensure we start from a directory, not a file
|
|
31
|
+
let currentDir = ensureDirectory(startPath);
|
|
32
|
+
if (!currentDir) {
|
|
33
|
+
Logger.debug(`findProjectRoot: Invalid start path: ${startPath}`);
|
|
34
|
+
return startPath;
|
|
35
|
+
}
|
|
36
|
+
// Walk up the directory tree looking for project markers
|
|
37
|
+
let levelsWalked = 0;
|
|
38
|
+
while (levelsWalked < MAX_WALK_UP_LEVELS) {
|
|
39
|
+
Logger.debug(`Checking for project markers in: ${currentDir}`);
|
|
40
|
+
// Check if any project marker exists in current directory
|
|
41
|
+
for (const marker of PROJECT_MARKERS) {
|
|
42
|
+
const markerPath = resolve(currentDir, marker);
|
|
43
|
+
if (existsSync(markerPath)) {
|
|
44
|
+
Logger.debug(`Found project root at: ${currentDir} (marker: ${marker})`);
|
|
45
|
+
return currentDir;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Move up one directory
|
|
49
|
+
const parentDir = dirname(currentDir);
|
|
50
|
+
// Stop if we've reached the root directory
|
|
51
|
+
if (parentDir === currentDir) {
|
|
52
|
+
Logger.debug(`Reached filesystem root, using: ${currentDir}`);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
currentDir = parentDir;
|
|
56
|
+
levelsWalked++;
|
|
57
|
+
}
|
|
58
|
+
// If no markers found, return the starting directory
|
|
59
|
+
Logger.debug(`No project markers found, using start directory: ${currentDir}`);
|
|
60
|
+
return ensureDirectory(startPath) || startPath;
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
Logger.debug(`Error in findProjectRoot: ${error}`);
|
|
64
|
+
return startPath;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Ensures that the provided path points to a directory.
|
|
69
|
+
* If the path is a file, returns its parent directory.
|
|
70
|
+
* If the path doesn't exist or is invalid, returns undefined.
|
|
71
|
+
*
|
|
72
|
+
* @param path - The file or directory path
|
|
73
|
+
* @returns The directory path, or undefined if invalid
|
|
74
|
+
*/
|
|
75
|
+
export function ensureDirectory(path) {
|
|
76
|
+
if (!path) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
// Check if path exists
|
|
81
|
+
if (!existsSync(path)) {
|
|
82
|
+
Logger.debug(`Path does not exist: ${path}`);
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
// Get file stats
|
|
86
|
+
const stats = statSync(path);
|
|
87
|
+
// If it's a directory, return as-is
|
|
88
|
+
if (stats.isDirectory()) {
|
|
89
|
+
return path;
|
|
90
|
+
}
|
|
91
|
+
// If it's a file, return its parent directory
|
|
92
|
+
if (stats.isFile()) {
|
|
93
|
+
const parentDir = dirname(path);
|
|
94
|
+
Logger.debug(`Path is a file, using parent directory: ${parentDir}`);
|
|
95
|
+
return parentDir;
|
|
96
|
+
}
|
|
97
|
+
// If it's neither file nor directory (symlink, etc.), try to resolve
|
|
98
|
+
Logger.debug(`Path is neither file nor directory: ${path}`);
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
Logger.debug(`Error in ensureDirectory: ${error}`);
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Extract absolute file paths from @path syntax in the prompt.
|
|
108
|
+
* Supports both quoted and unquoted paths.
|
|
109
|
+
*
|
|
110
|
+
* Examples:
|
|
111
|
+
* - @/absolute/path/to/file.ts
|
|
112
|
+
* - @"/path with spaces/file.ts"
|
|
113
|
+
* - @'/path with spaces/file.ts'
|
|
114
|
+
*
|
|
115
|
+
* @param prompt - The user prompt that may contain @path references
|
|
116
|
+
* @returns Array of absolute paths found in the prompt
|
|
117
|
+
*/
|
|
118
|
+
export function extractPathFromAtSyntax(prompt) {
|
|
119
|
+
const paths = [];
|
|
120
|
+
// Pattern 1: Quoted paths with @ prefix: @"path" or @'path'
|
|
121
|
+
const quotedPathRegex = /@["']([^"']+)["']/g;
|
|
122
|
+
let match;
|
|
123
|
+
while ((match = quotedPathRegex.exec(prompt)) !== null) {
|
|
124
|
+
const path = match[1];
|
|
125
|
+
if (isAbsolute(path)) {
|
|
126
|
+
paths.push(path);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// Pattern 2: Unquoted paths with @ prefix: @/path (no spaces)
|
|
130
|
+
const unquotedPathRegex = /@(\/[^\s"']+)/g;
|
|
131
|
+
while ((match = unquotedPathRegex.exec(prompt)) !== null) {
|
|
132
|
+
const path = match[1];
|
|
133
|
+
if (isAbsolute(path)) {
|
|
134
|
+
paths.push(path);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
Logger.debug(`Extracted ${paths.length} paths from @syntax: ${paths.join(', ')}`);
|
|
138
|
+
return paths;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Resolve the working directory using a fallback chain with multiple strategies.
|
|
142
|
+
*
|
|
143
|
+
* Priority order (highest to lowest):
|
|
144
|
+
* 1. Explicit workingDir parameter
|
|
145
|
+
* 2. Environment variables: CODEX_MCP_CWD > PWD > INIT_CWD
|
|
146
|
+
* 3. Automatic inference from @path syntax in prompt
|
|
147
|
+
* 4. process.cwd() as last resort
|
|
148
|
+
*
|
|
149
|
+
* @param options - Resolution options
|
|
150
|
+
* @returns The resolved working directory path
|
|
151
|
+
*/
|
|
152
|
+
export function resolveWorkingDirectory(options) {
|
|
153
|
+
const { workingDir, prompt } = options || {};
|
|
154
|
+
// Priority 1: Explicit workingDir parameter
|
|
155
|
+
if (workingDir) {
|
|
156
|
+
const validDir = ensureDirectory(workingDir);
|
|
157
|
+
if (validDir) {
|
|
158
|
+
Logger.debug(`Using explicit working directory: ${validDir}`);
|
|
159
|
+
return validDir;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
Logger.warn(`Explicit workingDir is invalid: ${workingDir}`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// Priority 2: Environment variables
|
|
166
|
+
const envVars = ['CODEX_MCP_CWD', 'PWD', 'INIT_CWD'];
|
|
167
|
+
for (const envVar of envVars) {
|
|
168
|
+
const envValue = process.env[envVar];
|
|
169
|
+
if (envValue) {
|
|
170
|
+
const validDir = ensureDirectory(envValue);
|
|
171
|
+
if (validDir) {
|
|
172
|
+
Logger.debug(`Using environment variable ${envVar}: ${validDir}`);
|
|
173
|
+
return validDir;
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
Logger.debug(`Environment variable ${envVar} is invalid: ${envValue}`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Priority 3: Automatic inference from @path syntax
|
|
181
|
+
if (prompt) {
|
|
182
|
+
const paths = extractPathFromAtSyntax(prompt);
|
|
183
|
+
for (const path of paths) {
|
|
184
|
+
if (existsSync(path)) {
|
|
185
|
+
// Find the project root for this path
|
|
186
|
+
const projectRoot = findProjectRoot(path);
|
|
187
|
+
if (projectRoot) {
|
|
188
|
+
Logger.debug(`Inferred working directory from @path syntax: ${projectRoot}`);
|
|
189
|
+
return projectRoot;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// Priority 4: process.cwd() as fallback
|
|
195
|
+
const cwd = process.cwd();
|
|
196
|
+
Logger.debug(`Using process.cwd() as working directory: ${cwd}`);
|
|
197
|
+
return cwd;
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=workingDirResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workingDirResolver.js","sourceRoot":"","sources":["../../src/utils/workingDirResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,eAAe,GAAG;IACtB,cAAc,EAAE,qBAAqB;IACrC,MAAM,EAAE,iBAAiB;IACzB,gBAAgB,EAAE,SAAS;IAC3B,YAAY,EAAE,OAAO;IACrB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,eAAe;IAC1B,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,MAAM;CACf,CAAC;AAEX;;GAEG;AACH,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,IAAI,CAAC;QACH,+CAA+C;QAC/C,IAAI,UAAU,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,CAAC,KAAK,CAAC,wCAAwC,SAAS,EAAE,CAAC,CAAC;YAClE,OAA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,EAAE,CAAC;gBACb,MAAM,CAAC,KAAK,CAAC,8BAA8B,MAAM,KAAK,QAAQ,EAAE,CAAC,CAAC;gBAClE,OAAO,QAAQ,CAAC;YAClB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,KAAK,CAAC,wBAAwB,MAAM,gBAAgB,QAAQ,EAAE,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,KAAK,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;QAE9C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,sCAAsC;gBACtC,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC1C,IAAI,WAAW,EAAE,CAAC;oBAChB,MAAM,CAAC,KAAK,CAAC,iDAAiD,WAAW,EAAE,CAAC,CAAC;oBAC7E,OAAO,WAAW,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,wCAAwC;IACxC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,CAAC,KAAK,CAAC,6CAA6C,GAAG,EAAE,CAAC,CAAC;IACjE,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trishchuk/codex-mcp-tool",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MCP server for Codex CLI integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"dev": "tsc && node dist/index.js",
|
|
14
14
|
"test": "echo \"No tests yet\" && exit 0",
|
|
15
15
|
"lint": "tsc --noEmit",
|
|
16
|
+
"format": "prettier --write \"src/**/*.{ts,js,json,md}\" \"docs/**/*.{md,json}\" \"*.{md,json}\"",
|
|
17
|
+
"format:check": "prettier --check \"src/**/*.{ts,js,json,md}\" \"docs/**/*.{md,json}\" \"*.{md,json}\"",
|
|
16
18
|
"prepublishOnly": "echo '⚠️ Remember to test locally first!' && npm run build",
|
|
17
19
|
"docs:dev": "vitepress dev docs",
|
|
18
20
|
"docs:build": "vitepress build docs",
|
|
@@ -60,11 +62,12 @@
|
|
|
60
62
|
"@types/node": "^18.19.124",
|
|
61
63
|
"archiver": "^7.0.1",
|
|
62
64
|
"mermaid": "^11.9.0",
|
|
65
|
+
"prettier": "^3.6.2",
|
|
66
|
+
"prismjs": "^1.30.0",
|
|
63
67
|
"tsx": "^4.20.5",
|
|
64
68
|
"typescript": "^5.0.0",
|
|
65
69
|
"vitepress": "^1.6.4",
|
|
66
|
-
"vitepress-plugin-mermaid": "^2.0.17"
|
|
67
|
-
"prismjs": "^1.30.0"
|
|
70
|
+
"vitepress-plugin-mermaid": "^2.0.17"
|
|
68
71
|
},
|
|
69
72
|
"publishConfig": {
|
|
70
73
|
"access": "public"
|