@bike4mind/cli 0.2.64-worktree-refactor-extract-search-query-builders.21815 → 0.2.64
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/bin/bike4mind-cli.mjs +6 -6
- package/dist/BubblewrapRuntime-BHbtqvLx.mjs +72 -0
- package/dist/ConfigStore-CllM6jOf.mjs +8614 -0
- package/dist/ImageStore-DaKT_Ew8.mjs +202 -0
- package/dist/ProxyManager-Dl2nFk-A.mjs +259 -0
- package/dist/ProxyManager-kiOD1X8-.mjs +3 -0
- package/dist/SandboxOrchestrator-BEW3rqYi.mjs +159 -0
- package/dist/SandboxOrchestrator-CHZgSR3P.mjs +3 -0
- package/dist/SandboxRuntimeAdapter-C1B4t20N.mjs +57 -0
- package/dist/SandboxRuntimeAdapter-D7UAG13n.mjs +3 -0
- package/dist/SeatbeltRuntime-D4m0VOcD.mjs +116 -0
- package/dist/StderrViolationParser-D0afQ3-1.mjs +70 -0
- package/dist/ViolationLogStore-CZl35HcA.mjs +96 -0
- package/dist/bashExecute-BTkdqlSs-5foM20Lb.mjs +466 -0
- package/dist/commands/doctorCommand.mjs +101 -0
- package/dist/commands/headlessCommand.mjs +319 -0
- package/dist/commands/mcpCommand.mjs +218 -0
- package/dist/commands/updateCommand.mjs +40 -0
- package/dist/createFile-yQfh8uvk-I-yM5DxC.mjs +63 -0
- package/dist/deleteFile-DKHfnyny-G3b1Kj2T.mjs +66 -0
- package/dist/globFiles-D1en6joM-8jekiXdX.mjs +100 -0
- package/dist/grepSearch-aMamoBn_-DCJcY8JS.mjs +173 -0
- package/dist/index.mjs +6722 -0
- package/dist/pathValidation-Cgjh5WQO-DiCZTcq6.mjs +63 -0
- package/dist/store-Dw1nZX2Y.mjs +128 -0
- package/dist/store-nZExNOWX.mjs +3 -0
- package/dist/terminalSetup-rmr1P8KF.mjs +254 -0
- package/dist/tools-C6M5aW8W.mjs +20907 -0
- package/dist/treeSitterEngine-DCSXcm_3.mjs +309 -0
- package/dist/types-DBEjF9YS.mjs +59 -0
- package/dist/types-DK3P88Px.mjs +3 -0
- package/dist/updateChecker-Cu9dkHxV.mjs +120 -0
- package/package.json +10 -10
- package/dist/BubblewrapRuntime-PMIOLWKR.js +0 -71
- package/dist/HydrationEngine-YL2HWJ3V.js +0 -9
- package/dist/ImageStore-MMUOUPI2.js +0 -224
- package/dist/ProxyManager-HEB4TLVX.js +0 -7
- package/dist/SandboxOrchestrator-UIJ5GYBB.js +0 -8
- package/dist/SandboxRuntimeAdapter-FQ56MAB2.js +0 -13
- package/dist/SeatbeltRuntime-EE3TTLEP.js +0 -98
- package/dist/StderrViolationParser-7OYPM2DJ.js +0 -59
- package/dist/ViolationLogStore-RIIUVURH.js +0 -104
- package/dist/artifactExtractor-R7DIP2XO.js +0 -180
- package/dist/bashExecute-GLGLD3JD.js +0 -379
- package/dist/chunk-4BIBE3J7.js +0 -48
- package/dist/chunk-5LZS5CVJ.js +0 -161
- package/dist/chunk-BDQBOLYG.js +0 -120
- package/dist/chunk-BPFEGDC7.js +0 -192
- package/dist/chunk-EPIYC3LA.js +0 -13770
- package/dist/chunk-G4ZGEQFT.js +0 -250
- package/dist/chunk-GQGOWACU.js +0 -770
- package/dist/chunk-J6ZBI6TI.js +0 -1079
- package/dist/chunk-JW3JRHH7.js +0 -12433
- package/dist/chunk-KQAMBXAW.js +0 -163
- package/dist/chunk-KUVV2NAB.js +0 -19125
- package/dist/chunk-LTLJRF6I.js +0 -44
- package/dist/chunk-PFBYGCOW.js +0 -449
- package/dist/chunk-QWB6ZYY4.js +0 -48
- package/dist/chunk-SGPRXN4C.js +0 -245
- package/dist/chunk-UZUHPHZC.js +0 -95
- package/dist/chunk-WBE7SQUB.js +0 -241
- package/dist/chunk-Y4WOJJM3.js +0 -147
- package/dist/commands/doctorCommand.js +0 -87
- package/dist/commands/headlessCommand.js +0 -380
- package/dist/commands/mcpCommand.js +0 -203
- package/dist/commands/updateCommand.js +0 -42
- package/dist/create-C4VEEEYR.js +0 -12
- package/dist/createFile-6PSPLW6R.js +0 -71
- package/dist/deleteFile-AUSRLWIK.js +0 -73
- package/dist/formatConverter-5QEJDW24.js +0 -7
- package/dist/globFiles-TSRN64N2.js +0 -120
- package/dist/grepSearch-634XWZOJ.js +0 -216
- package/dist/index.js +0 -6779
- package/dist/llmMarkdownGenerator-Z6NB26TT.js +0 -371
- package/dist/markdownGenerator-SK2ZQQL4.js +0 -269
- package/dist/mementoService-N4IM6QAC.js +0 -12
- package/dist/notificationDeduplicator-HUC53NEW.js +0 -9
- package/dist/src-F4KZCAA2.js +0 -319
- package/dist/src-ISX322I7.js +0 -1101
- package/dist/store-CAB6BV3P.js +0 -11
- package/dist/subtractCredits-D4KEM6VU.js +0 -12
- package/dist/terminalSetup-C5FHMLC3.js +0 -214
- package/dist/treeSitterEngine-4SGFQDY3.js +0 -330
- package/dist/types-KB5NP6T4.js +0 -7
- package/dist/utils-JCHWDM4Z.js +0 -31
package/dist/chunk-BPFEGDC7.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// ../../b4m-core/packages/services/dist/src/notebookCurationService/formatConverter.js
|
|
4
|
-
import { marked } from "marked";
|
|
5
|
-
var FormatConverter = class {
|
|
6
|
-
constructor(logger) {
|
|
7
|
-
this.logger = logger;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Convert markdown content to specified format
|
|
11
|
-
*/
|
|
12
|
-
async convert(markdownContent, format) {
|
|
13
|
-
this.logger?.info(`Converting markdown to ${format}`);
|
|
14
|
-
switch (format) {
|
|
15
|
-
case "markdown":
|
|
16
|
-
return this.convertToMarkdown(markdownContent);
|
|
17
|
-
case "txt":
|
|
18
|
-
return this.convertToTXT(markdownContent);
|
|
19
|
-
case "html":
|
|
20
|
-
return this.convertToHTML(markdownContent);
|
|
21
|
-
default:
|
|
22
|
-
throw new Error(`Unsupported format: ${format}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Markdown (no conversion needed)
|
|
27
|
-
*/
|
|
28
|
-
convertToMarkdown(content) {
|
|
29
|
-
return {
|
|
30
|
-
content: Buffer.from(content, "utf-8"),
|
|
31
|
-
mimeType: "text/markdown",
|
|
32
|
-
extension: ".md"
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Convert markdown to HTML
|
|
37
|
-
*/
|
|
38
|
-
async convertToHTML(markdownContent) {
|
|
39
|
-
try {
|
|
40
|
-
const htmlBody = await marked.parse(markdownContent);
|
|
41
|
-
const fullHTML = `<!DOCTYPE html>
|
|
42
|
-
<html lang="en">
|
|
43
|
-
<head>
|
|
44
|
-
<meta charset="UTF-8">
|
|
45
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
46
|
-
<title>Curated Notebook</title>
|
|
47
|
-
<style>
|
|
48
|
-
${this.getHTMLStylesheet()}
|
|
49
|
-
</style>
|
|
50
|
-
</head>
|
|
51
|
-
<body>
|
|
52
|
-
<div class="markdown-body">
|
|
53
|
-
${htmlBody}
|
|
54
|
-
</div>
|
|
55
|
-
</body>
|
|
56
|
-
</html>`;
|
|
57
|
-
return {
|
|
58
|
-
content: Buffer.from(fullHTML, "utf-8"),
|
|
59
|
-
mimeType: "text/html",
|
|
60
|
-
extension: ".html"
|
|
61
|
-
};
|
|
62
|
-
} catch (error) {
|
|
63
|
-
this.logger?.error("HTML conversion failed:", error);
|
|
64
|
-
throw new Error(`HTML conversion failed: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Convert markdown to plain text
|
|
69
|
-
* Strips all markdown formatting and returns plain text
|
|
70
|
-
*/
|
|
71
|
-
convertToTXT(markdownContent) {
|
|
72
|
-
let plainText = markdownContent;
|
|
73
|
-
plainText = plainText.replace(/^#{1,6}\s+/gm, "");
|
|
74
|
-
plainText = plainText.replace(/(\*\*|__)(.*?)\1/g, "$2");
|
|
75
|
-
plainText = plainText.replace(/(\*|_)(.*?)\1/g, "$2");
|
|
76
|
-
plainText = plainText.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1");
|
|
77
|
-
plainText = plainText.replace(/!\[([^\]]*)\]\([^)]+\)/g, "[Image: $1]");
|
|
78
|
-
plainText = plainText.replace(/`([^`]+)`/g, "$1");
|
|
79
|
-
plainText = plainText.replace(/```[\s\S]*?\n([\s\S]*?)```/g, "$1");
|
|
80
|
-
plainText = plainText.replace(/^[-*_]{3,}\s*$/gm, "");
|
|
81
|
-
plainText = plainText.replace(/^>\s+/gm, "");
|
|
82
|
-
plainText = plainText.replace(/<[^>]+>/g, "");
|
|
83
|
-
plainText = plainText.replace(/\n{3,}/g, "\n\n");
|
|
84
|
-
return {
|
|
85
|
-
content: Buffer.from(plainText, "utf-8"),
|
|
86
|
-
mimeType: "text/plain",
|
|
87
|
-
extension: ".txt"
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Get HTML-specific CSS stylesheet
|
|
92
|
-
*/
|
|
93
|
-
getHTMLStylesheet() {
|
|
94
|
-
return `
|
|
95
|
-
body {
|
|
96
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
97
|
-
font-size: 16px;
|
|
98
|
-
line-height: 1.6;
|
|
99
|
-
color: #24292e;
|
|
100
|
-
max-width: 980px;
|
|
101
|
-
margin: 0 auto;
|
|
102
|
-
padding: 45px;
|
|
103
|
-
background-color: #fff;
|
|
104
|
-
}
|
|
105
|
-
.markdown-body {
|
|
106
|
-
box-sizing: border-box;
|
|
107
|
-
min-width: 200px;
|
|
108
|
-
max-width: 980px;
|
|
109
|
-
}
|
|
110
|
-
h1, h2, h3, h4, h5, h6 {
|
|
111
|
-
margin-top: 24px;
|
|
112
|
-
margin-bottom: 16px;
|
|
113
|
-
font-weight: 600;
|
|
114
|
-
line-height: 1.25;
|
|
115
|
-
}
|
|
116
|
-
h1 { font-size: 2em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
|
|
117
|
-
h2 { font-size: 1.5em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
|
|
118
|
-
h3 { font-size: 1.25em; }
|
|
119
|
-
pre {
|
|
120
|
-
background-color: #f6f8fa;
|
|
121
|
-
border-radius: 6px;
|
|
122
|
-
padding: 16px;
|
|
123
|
-
overflow: auto;
|
|
124
|
-
font-size: 85%;
|
|
125
|
-
line-height: 1.45;
|
|
126
|
-
}
|
|
127
|
-
code {
|
|
128
|
-
background-color: rgba(27,31,35,0.05);
|
|
129
|
-
border-radius: 3px;
|
|
130
|
-
padding: 0.2em 0.4em;
|
|
131
|
-
font-family: 'SF Mono', Monaco, Menlo, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
132
|
-
font-size: 85%;
|
|
133
|
-
}
|
|
134
|
-
pre code {
|
|
135
|
-
background-color: transparent;
|
|
136
|
-
padding: 0;
|
|
137
|
-
font-size: 100%;
|
|
138
|
-
}
|
|
139
|
-
blockquote {
|
|
140
|
-
padding: 0 1em;
|
|
141
|
-
color: #6a737d;
|
|
142
|
-
border-left: 0.25em solid #dfe2e5;
|
|
143
|
-
margin: 0 0 16px 0;
|
|
144
|
-
}
|
|
145
|
-
table {
|
|
146
|
-
border-collapse: collapse;
|
|
147
|
-
border-spacing: 0;
|
|
148
|
-
width: 100%;
|
|
149
|
-
margin-bottom: 16px;
|
|
150
|
-
overflow: auto;
|
|
151
|
-
}
|
|
152
|
-
table th {
|
|
153
|
-
font-weight: 600;
|
|
154
|
-
background-color: #f6f8fa;
|
|
155
|
-
}
|
|
156
|
-
table th, table td {
|
|
157
|
-
padding: 6px 13px;
|
|
158
|
-
border: 1px solid #dfe2e5;
|
|
159
|
-
}
|
|
160
|
-
table tr {
|
|
161
|
-
background-color: #fff;
|
|
162
|
-
border-top: 1px solid #c6cbd1;
|
|
163
|
-
}
|
|
164
|
-
table tr:nth-child(2n) {
|
|
165
|
-
background-color: #f6f8fa;
|
|
166
|
-
}
|
|
167
|
-
img {
|
|
168
|
-
max-width: 100%;
|
|
169
|
-
box-sizing: content-box;
|
|
170
|
-
background-color: #fff;
|
|
171
|
-
}
|
|
172
|
-
a {
|
|
173
|
-
color: #0366d6;
|
|
174
|
-
text-decoration: none;
|
|
175
|
-
}
|
|
176
|
-
a:hover {
|
|
177
|
-
text-decoration: underline;
|
|
178
|
-
}
|
|
179
|
-
hr {
|
|
180
|
-
height: 0.25em;
|
|
181
|
-
padding: 0;
|
|
182
|
-
margin: 24px 0;
|
|
183
|
-
background-color: #e1e4e8;
|
|
184
|
-
border: 0;
|
|
185
|
-
}
|
|
186
|
-
`;
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export {
|
|
191
|
-
FormatConverter
|
|
192
|
-
};
|