ezx 0.0.2 → 0.0.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 +49 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/preprocessor.d.ts +1 -2
- package/dist/preprocessor.d.ts.map +1 -1
- package/dist/preprocessor.js +53 -109
- package/dist/preprocessor.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,32 +21,63 @@ echo "We're still in my-project!"
|
|
|
21
21
|
pwd
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
**Note:** The directory context also affects file extraction blocks. Files created after `# set the current directory` will have their paths relative to the original directory, but the command will prepend `cd` to create them in the correct location.
|
|
25
|
+
|
|
24
26
|
### 2. File Extraction
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
**Note:** zx executes all code blocks in markdown files. If you have code blocks that are for documentation only (examples to show users, not to run or write as files), add the `no-eval` flag to prevent execution:
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
|
|
30
|
+
```markdown
|
|
31
|
+
```typescript no-eval
|
|
32
|
+
interface User {
|
|
33
|
+
name: string;
|
|
34
|
+
age: number;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Extract code blocks to files using the info string syntax on the code fence. The file directive is specified after the language identifier using `file:` or `file=`. The file path is always relative to the original working directory (not affected by `# set the current directory`).
|
|
40
|
+
|
|
41
|
+
**JSON:**
|
|
42
|
+
```json file:my-project/package.json
|
|
31
43
|
{
|
|
32
44
|
"name": "my-project",
|
|
33
45
|
"version": "1.0.0"
|
|
34
46
|
}
|
|
35
47
|
```
|
|
36
48
|
|
|
49
|
+
**TypeScript/JavaScript:**
|
|
50
|
+
```typescript file:my-project/index.ts
|
|
51
|
+
console.log("Hello world")
|
|
52
|
+
```
|
|
53
|
+
|
|
37
54
|
**Bash/Shell:**
|
|
38
|
-
```bash
|
|
39
|
-
# file: .npmrc
|
|
55
|
+
```bash file:my-project/.npmrc
|
|
40
56
|
shared-workspace-lockfile=false
|
|
41
57
|
```
|
|
42
58
|
|
|
43
59
|
**Markdown:**
|
|
44
|
-
```markdown
|
|
45
|
-
<!-- file: README.md -->
|
|
60
|
+
```markdown file:my-project/README.md
|
|
46
61
|
# My Project
|
|
47
62
|
```
|
|
48
63
|
|
|
49
|
-
|
|
64
|
+
**Any language:** The file directive works with any language, including unknown languages, because it's specified in the code fence info string, not inside the code content.
|
|
65
|
+
|
|
66
|
+
File extraction blocks are transformed to bash heredoc commands that execute in order with the rest of the markdown. If a directory context is active, the heredoc command will prepend `cd`:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Without directory context:
|
|
70
|
+
cat > 'path/to/file' << 'EZXEOF'
|
|
71
|
+
content here
|
|
72
|
+
EZXEOF
|
|
73
|
+
|
|
74
|
+
# With directory context (after "# set the current directory my-project"):
|
|
75
|
+
cd my-project && cat > 'path/to/file' << 'EZXEOF'
|
|
76
|
+
content here
|
|
77
|
+
EZXEOF
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This means if a parent directory doesn't exist, the command will fail (as expected). You should create directories first using `mkdir -p` in a bash block.
|
|
50
81
|
|
|
51
82
|
## Installation
|
|
52
83
|
|
|
@@ -98,10 +129,9 @@ import { preprocessMarkdown, preprocessFile } from 'ezx'
|
|
|
98
129
|
// Preprocess markdown content
|
|
99
130
|
const { preprocessedMarkdown, extractedFiles } = preprocessMarkdown(markdown)
|
|
100
131
|
|
|
101
|
-
// Preprocess markdown file
|
|
102
|
-
const result = preprocessFile('./script.md', {
|
|
103
|
-
|
|
104
|
-
cwd: process.cwd()
|
|
132
|
+
// Preprocess markdown file
|
|
133
|
+
const result = preprocessFile('./script.md', {
|
|
134
|
+
cwd: process.cwd()
|
|
105
135
|
})
|
|
106
136
|
```
|
|
107
137
|
|
|
@@ -119,8 +149,7 @@ cd my-app
|
|
|
119
149
|
npm init -y
|
|
120
150
|
\`\`\`
|
|
121
151
|
|
|
122
|
-
\`\`\`
|
|
123
|
-
// file: package.json
|
|
152
|
+
\`\`\`json file:my-app/package.json
|
|
124
153
|
{
|
|
125
154
|
"name": "my-app",
|
|
126
155
|
"version": "1.0.0",
|
|
@@ -130,8 +159,7 @@ npm init -y
|
|
|
130
159
|
}
|
|
131
160
|
\`\`\`
|
|
132
161
|
|
|
133
|
-
\`\`\`typescript
|
|
134
|
-
// file: index.ts
|
|
162
|
+
\`\`\`typescript file:my-app/index.ts
|
|
135
163
|
console.log('Hello from ezx!')
|
|
136
164
|
\`\`\`
|
|
137
165
|
|
|
@@ -180,12 +208,11 @@ Preprocess markdown content.
|
|
|
180
208
|
**Parameters:**
|
|
181
209
|
- `input` (string) - Markdown content
|
|
182
210
|
- `options` (object)
|
|
183
|
-
- `
|
|
184
|
-
- `cwd` (string) - Current working directory
|
|
211
|
+
- `cwd` (string) - Current working directory (default: `process.cwd()`)
|
|
185
212
|
|
|
186
213
|
**Returns:** PreprocessResult
|
|
187
|
-
- `preprocessedMarkdown` (string) - The preprocessed markdown
|
|
188
|
-
- `extractedFiles` (FileExtraction[]) - Array of extracted
|
|
214
|
+
- `preprocessedMarkdown` (string) - The preprocessed markdown with file directive blocks transformed to bash heredocs
|
|
215
|
+
- `extractedFiles` (FileExtraction[]) - Array of extracted file information (for informational purposes only)
|
|
189
216
|
|
|
190
217
|
### `preprocessFile(filePath, options)`
|
|
191
218
|
|
|
@@ -209,4 +236,4 @@ node dist/cli.js test-preprocessor.md --verbose
|
|
|
209
236
|
|
|
210
237
|
## License
|
|
211
238
|
|
|
212
|
-
|
|
239
|
+
MIT
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,kBAAkB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,kBAAkB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8D5G;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvG;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjH;AAGD,cAAc,IAAI,CAAC;AAGnB,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -47,10 +47,8 @@ export async function runMarkdown(markdown, options = {}) {
|
|
|
47
47
|
markdownContent = markdown.toString();
|
|
48
48
|
}
|
|
49
49
|
// Preprocess markdown with ezx enhancements
|
|
50
|
-
|
|
51
|
-
const { preprocessedMarkdown, extractedFiles } = preprocessMarkdown(markdownContent, {
|
|
50
|
+
const { preprocessedMarkdown } = preprocessMarkdown(markdownContent, {
|
|
52
51
|
cwd: options.cwd || process.cwd(),
|
|
53
|
-
outputFiles: true,
|
|
54
52
|
});
|
|
55
53
|
// Transform markdown to JavaScript
|
|
56
54
|
let jsCode = transformMarkdown(preprocessedMarkdown);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAC,MAAM,IAAI,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAgB,aAAa,EAAC,MAAM,UAAU,CAAC;AACtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAErD,iEAAiE;AACjE,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;AAY3B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAyB,EAAE,UAA8B,EAAE;IAC5F,qBAAqB;IACrB,MAAM,UAAU,GAAG;QAClB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,WAAW,EAAE,CAAC,CAAC,WAAW;KAC1B,CAAC;IAEF,IAAI,CAAC;QACJ,gBAAgB;QAChB,IAAI,OAAO,CAAC,OAAO,KAAK,SA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BAAqB;YACrB,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACtD,CAAC;IACF,CAAC;YAAS,CAAC;QACV,gBAAgB;QAChB,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC9B,CAAC;AACF,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,QAAgB,EAAE,UAA8B,EAAE;IACvF,OAAO,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,eAAuB,EAAE,UAA8B,EAAE;IACjG,OAAO,WAAW,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,+CAA+C;AAC/C,cAAc,IAAI,CAAC;AAEnB,gCAAgC;AAChC,cAAc,mBAAmB,CAAC"}
|
package/dist/preprocessor.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export interface CodeBlock {
|
|
|
3
3
|
content: string;
|
|
4
4
|
startLine: number;
|
|
5
5
|
endLine: number;
|
|
6
|
+
filePath?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface FileExtraction {
|
|
8
9
|
filePath: string;
|
|
@@ -17,14 +18,12 @@ export interface PreprocessResult {
|
|
|
17
18
|
* Preprocess markdown file
|
|
18
19
|
*/
|
|
19
20
|
export declare function preprocessMarkdown(input: string, options?: {
|
|
20
|
-
outputFiles?: boolean;
|
|
21
21
|
cwd?: string;
|
|
22
22
|
}): PreprocessResult;
|
|
23
23
|
/**
|
|
24
24
|
* Read and preprocess a markdown file
|
|
25
25
|
*/
|
|
26
26
|
export declare function preprocessFile(filePath: string, options?: {
|
|
27
|
-
outputFiles?: boolean;
|
|
28
27
|
cwd?: string;
|
|
29
28
|
}): PreprocessResult;
|
|
30
29
|
//# sourceMappingURL=preprocessor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAChC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,cAAc,EAAE,CAAC;CACjC;AA6ED;;GAEG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAM,GAC1B,gBAAgB,CA6JlB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAM,GAC1B,gBAAgB,CAGlB"}
|
package/dist/preprocessor.js
CHANGED
|
@@ -1,53 +1,7 @@
|
|
|
1
|
-
import { readFileSync
|
|
2
|
-
import { resolve, dirname } from 'path';
|
|
3
|
-
/**
|
|
4
|
-
* Comment tokens for different languages
|
|
5
|
-
*/
|
|
6
|
-
const COMMENT_TOKENS = {
|
|
7
|
-
// Languages with // comment
|
|
8
|
-
typescript: '//',
|
|
9
|
-
javascript: '//',
|
|
10
|
-
js: '//',
|
|
11
|
-
ts: '//',
|
|
12
|
-
cpp: '//',
|
|
13
|
-
c: '//',
|
|
14
|
-
csharp: '//',
|
|
15
|
-
go: '//',
|
|
16
|
-
rust: '//',
|
|
17
|
-
java: '//',
|
|
18
|
-
kotlin: '//',
|
|
19
|
-
swift: '//',
|
|
20
|
-
php: '//',
|
|
21
|
-
// Languages with # comment
|
|
22
|
-
bash: '#',
|
|
23
|
-
sh: '#',
|
|
24
|
-
shell: '#',
|
|
25
|
-
python: '#',
|
|
26
|
-
rb: '#',
|
|
27
|
-
ruby: '#',
|
|
28
|
-
perl: '#',
|
|
29
|
-
r: '#',
|
|
30
|
-
// Languages with -- comment
|
|
31
|
-
sql: '--',
|
|
32
|
-
lua: '--',
|
|
33
|
-
haskell: '--',
|
|
34
|
-
// Languages with ; comment
|
|
35
|
-
asm: ';',
|
|
36
|
-
// Languages with <!-- comment -->
|
|
37
|
-
html: '<!--',
|
|
38
|
-
xml: '<!--',
|
|
39
|
-
markdown: '<!--',
|
|
40
|
-
md: '<!--',
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Get the comment token for a language
|
|
44
|
-
*/
|
|
45
|
-
function getCommentToken(language) {
|
|
46
|
-
const lowerLang = language.toLowerCase().trim();
|
|
47
|
-
return COMMENT_TOKENS[lowerLang] || null;
|
|
48
|
-
}
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
49
2
|
/**
|
|
50
3
|
* Parse markdown and extract all code blocks with their line numbers
|
|
4
|
+
* Also extracts file path from info string if present (e.g., ```json file:path/to/file.json)
|
|
51
5
|
*/
|
|
52
6
|
function parseCodeBlocks(markdown) {
|
|
53
7
|
const codeBlocks = [];
|
|
@@ -58,12 +12,15 @@ function parseCodeBlocks(markdown) {
|
|
|
58
12
|
for (let i = 0; i < lines.length; i++) {
|
|
59
13
|
const line = lines[i];
|
|
60
14
|
// Check for code block start
|
|
61
|
-
if (line.match(
|
|
15
|
+
if (line.match(/^```/)) {
|
|
62
16
|
if (!inCodeBlock) {
|
|
63
17
|
// Starting a new code block
|
|
64
|
-
|
|
18
|
+
// Parse language and optional file directive from info string
|
|
19
|
+
// Formats: ```json, ```json file:path, ```json file=path
|
|
20
|
+
const match = line.match(/^```(\w*)\s*(?:file[:=](\S+))?/i);
|
|
65
21
|
currentBlock = {
|
|
66
|
-
language:
|
|
22
|
+
language: match?.[1] || '',
|
|
23
|
+
filePath: match?.[2] || undefined,
|
|
67
24
|
content: '',
|
|
68
25
|
startLine: i,
|
|
69
26
|
};
|
|
@@ -80,6 +37,7 @@ function parseCodeBlocks(markdown) {
|
|
|
80
37
|
content: currentBlock.content,
|
|
81
38
|
startLine: currentBlock.startLine,
|
|
82
39
|
endLine: i,
|
|
40
|
+
filePath: currentBlock.filePath,
|
|
83
41
|
});
|
|
84
42
|
}
|
|
85
43
|
inCodeBlock = false;
|
|
@@ -100,78 +58,45 @@ function isDirectorySetCommand(line) {
|
|
|
100
58
|
const trimmed = line.trim().toLowerCase();
|
|
101
59
|
return trimmed === '# set the current directory';
|
|
102
60
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Check if a line contains a file extraction comment
|
|
105
|
-
*/
|
|
106
|
-
function isFileExtractionComment(line, commentToken) {
|
|
107
|
-
const trimmed = line.trim();
|
|
108
|
-
// For HTML/XML style comments, we need to remove the closing -->
|
|
109
|
-
let searchLine = trimmed;
|
|
110
|
-
if (commentToken === '<!--') {
|
|
111
|
-
searchLine = trimmed.replace(/-->.*$/, '');
|
|
112
|
-
}
|
|
113
|
-
const filePattern = new RegExp(`^${escapeRegExp(commentToken)}\\s*file:\\s*(.+)$`, 'i');
|
|
114
|
-
const match = searchLine.match(filePattern);
|
|
115
|
-
if (match) {
|
|
116
|
-
return match[1].trim();
|
|
117
|
-
}
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Escape special regex characters
|
|
122
|
-
*/
|
|
123
|
-
function escapeRegExp(string) {
|
|
124
|
-
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
125
|
-
}
|
|
126
61
|
/**
|
|
127
62
|
* Preprocess markdown file
|
|
128
63
|
*/
|
|
129
64
|
export function preprocessMarkdown(input, options = {}) {
|
|
130
|
-
const {
|
|
65
|
+
const { cwd = process.cwd() } = options;
|
|
131
66
|
const lines = input.split('\n');
|
|
132
67
|
const codeBlocks = parseCodeBlocks(input);
|
|
133
68
|
const extractedFiles = [];
|
|
134
69
|
// Track the current directory context
|
|
135
70
|
let currentDirectory = null;
|
|
136
|
-
// Set of block indices to remove completely (for file extraction)
|
|
137
|
-
const blocksToRemove = new Set();
|
|
138
71
|
// Map of block indices to transformations (prepend cd)
|
|
139
72
|
const blocksToTransform = new Map();
|
|
73
|
+
// Map of block indices to transform to heredoc
|
|
74
|
+
const blocksToHeredoc = new Map();
|
|
140
75
|
// Process each code block
|
|
141
76
|
for (let i = 0; i < codeBlocks.length; i++) {
|
|
142
77
|
const block = codeBlocks[i];
|
|
143
|
-
const blockLines = block.content.split('\n');
|
|
144
78
|
const isBash = block.language === 'bash' || block.language === 'sh' || block.language === 'shell';
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (outputFiles) {
|
|
163
|
-
const filePath = extractedFiles[extractedFiles.length - 1].filePath;
|
|
164
|
-
const dir = dirname(filePath);
|
|
165
|
-
// Create directory if it doesn't exist
|
|
166
|
-
mkdirSync(dir, { recursive: true });
|
|
167
|
-
writeFileSync(filePath, fileContent, 'utf-8');
|
|
168
|
-
console.log(`Extracted file: ${filePath}`);
|
|
169
|
-
}
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
79
|
+
// Check if this is a file extraction block (file path in info string)
|
|
80
|
+
if (block.filePath) {
|
|
81
|
+
// This is a file extraction block - transform to heredoc
|
|
82
|
+
const fileContent = block.content.trim();
|
|
83
|
+
extractedFiles.push({
|
|
84
|
+
filePath: block.filePath,
|
|
85
|
+
content: fileContent,
|
|
86
|
+
language: block.language,
|
|
87
|
+
});
|
|
88
|
+
// Mark this block for transformation to heredoc
|
|
89
|
+
// If we have a current directory, prepend it to the heredoc command
|
|
90
|
+
blocksToHeredoc.set(i, {
|
|
91
|
+
filePath: block.filePath,
|
|
92
|
+
content: fileContent,
|
|
93
|
+
directoryPrefix: currentDirectory || undefined,
|
|
94
|
+
});
|
|
95
|
+
continue;
|
|
172
96
|
}
|
|
173
97
|
// Check for directory set command in bash blocks
|
|
174
98
|
if (isBash) {
|
|
99
|
+
const blockLines = block.content.split('\n');
|
|
175
100
|
let justSetDirectory = false;
|
|
176
101
|
// First, check if this block has a directory set command
|
|
177
102
|
const hasDirectorySet = blockLines.some((line) => isDirectorySetCommand(line));
|
|
@@ -219,13 +144,32 @@ export function preprocessMarkdown(input, options = {}) {
|
|
|
219
144
|
for (let i = 0; i < lines.length; i++) {
|
|
220
145
|
const line = lines[i];
|
|
221
146
|
// Check if this is the start of a code block
|
|
222
|
-
if (line.match(
|
|
147
|
+
if (line.match(/^```/)) {
|
|
223
148
|
const blockIndex = codeBlocks.findIndex((b) => b.startLine === i);
|
|
224
149
|
if (blockIndex !== -1) {
|
|
225
150
|
const block = codeBlocks[blockIndex];
|
|
226
|
-
// Check if this block should be
|
|
227
|
-
if (
|
|
228
|
-
|
|
151
|
+
// Check if this block should be transformed to heredoc
|
|
152
|
+
if (blocksToHeredoc.has(blockIndex)) {
|
|
153
|
+
const heredoc = blocksToHeredoc.get(blockIndex);
|
|
154
|
+
// Transform to bash heredoc block
|
|
155
|
+
preprocessedLines.push('```bash');
|
|
156
|
+
// If we have a directory prefix, prepend cd && to the cat command
|
|
157
|
+
// Also strip the directory prefix from the file path if it matches
|
|
158
|
+
let catPath = heredoc.filePath;
|
|
159
|
+
if (heredoc.directoryPrefix) {
|
|
160
|
+
// Remove the directory prefix from the file path if it starts with it
|
|
161
|
+
if (catPath.startsWith(heredoc.directoryPrefix + '/')) {
|
|
162
|
+
catPath = catPath.slice(heredoc.directoryPrefix.length + 1);
|
|
163
|
+
}
|
|
164
|
+
preprocessedLines.push(`cd ${heredoc.directoryPrefix} && cat > '${catPath}' << 'EZXEOF'`);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
preprocessedLines.push(`cat > '${catPath}' << 'EZXEOF'`);
|
|
168
|
+
}
|
|
169
|
+
preprocessedLines.push(heredoc.content);
|
|
170
|
+
preprocessedLines.push('EZXEOF');
|
|
171
|
+
preprocessedLines.push('```');
|
|
172
|
+
// Skip to the closing ```
|
|
229
173
|
i = block.endLine;
|
|
230
174
|
continue;
|
|
231
175
|
}
|
package/dist/preprocessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocessor.js","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"preprocessor.js","sourceRoot":"","sources":["../src/preprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AA+BrC;;;GAGG;AACH,SAAS,eAAe,CAAC,QAAgB;IACxC,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,YAAY,GAAuB,EAAE,CAAC;IAC1C,IAAI,cAAc,GAAG,CAAC,CAAC;IAEvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEtB,6BAA6B;QAC7B,IAAI,IAAI,CAAC,KAAK,CA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