@bike4mind/cli 0.2.31-chore-upgrade-zod4.19447 → 0.2.31-cli-update-command.19453
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 +48 -0
- package/dist/{HydrationEngine-WGYKF46H.js → HydrationEngine-YL2HWJ3V.js} +1 -1
- package/dist/{artifactExtractor-OXCHLMKP.js → artifactExtractor-22AVFN7A.js} +1 -1
- package/dist/{chunk-ERZ57OCU.js → chunk-24JZFYBV.js} +2 -2
- package/dist/{chunk-IAAF5YB3.js → chunk-6HWTNX47.js} +3 -3
- package/dist/{chunk-TFOFGFWG.js → chunk-DEW32L4X.js} +2 -2
- package/dist/{chunk-L6OTUVAD.js → chunk-E77VWEKZ.js} +183 -166
- package/dist/{chunk-RUI6HNLO.js → chunk-GQGOWACU.js} +8 -4
- package/dist/{chunk-32PKF3N7.js → chunk-LBTTUQJM.js} +15 -16
- package/dist/chunk-Q6YCIGC3.js +244 -0
- package/dist/{chunk-MPE4WXYA.js → chunk-U4HDDXWT.js} +3 -3
- package/dist/commands/doctorCommand.js +87 -0
- package/dist/commands/mcpCommand.js +1 -1
- package/dist/commands/updateCommand.js +42 -0
- package/dist/{create-PBRMG2BG.js → create-LTISVVKL.js} +3 -3
- package/dist/index.js +362 -300
- package/dist/{llmMarkdownGenerator-WTX4Q2R2.js → llmMarkdownGenerator-DF7EFQZW.js} +1 -1
- package/dist/{markdownGenerator-5CIEZGZU.js → markdownGenerator-6TAH7OEH.js} +1 -1
- package/dist/{mementoService-GDXTMKTX.js → mementoService-BY5ACS3K.js} +3 -3
- package/dist/{src-VASK6EIL.js → src-C5QSTGEZ.js} +2 -2
- package/dist/{src-G5AZRFZP.js → src-ZXFQ5Y4O.js} +1 -1
- package/dist/{subtractCredits-JY6D67PM.js → subtractCredits-V645IMXQ.js} +3 -3
- package/package.json +9 -9
package/bin/bike4mind-cli.mjs
CHANGED
|
@@ -88,6 +88,8 @@ const argv = await yargs(hideBin(process.argv))
|
|
|
88
88
|
})
|
|
89
89
|
.demandCommand(1, 'You must provide a subcommand (list, add, remove, enable, disable)');
|
|
90
90
|
})
|
|
91
|
+
.command('update', 'Check for and install CLI updates')
|
|
92
|
+
.command('doctor', 'Run diagnostic checks on CLI installation')
|
|
91
93
|
.help()
|
|
92
94
|
.alias('help', 'h')
|
|
93
95
|
.version()
|
|
@@ -149,6 +151,52 @@ if (argv._[0] === 'mcp') {
|
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
|
|
154
|
+
// Handle update command (external command)
|
|
155
|
+
if (argv._[0] === 'update') {
|
|
156
|
+
try {
|
|
157
|
+
let handleUpdateCommand;
|
|
158
|
+
|
|
159
|
+
if (isDev) {
|
|
160
|
+
const { register } = require('tsx/esm/api');
|
|
161
|
+
register();
|
|
162
|
+
const module = await import('../src/commands/updateCommand.ts');
|
|
163
|
+
handleUpdateCommand = module.handleUpdateCommand;
|
|
164
|
+
} else {
|
|
165
|
+
const module = await import('../dist/commands/updateCommand.js');
|
|
166
|
+
handleUpdateCommand = module.handleUpdateCommand;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
await handleUpdateCommand();
|
|
170
|
+
process.exit(0);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
console.error('Error:', error.message);
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Handle doctor command (external command)
|
|
178
|
+
if (argv._[0] === 'doctor') {
|
|
179
|
+
try {
|
|
180
|
+
let handleDoctorCommand;
|
|
181
|
+
|
|
182
|
+
if (isDev) {
|
|
183
|
+
const { register } = require('tsx/esm/api');
|
|
184
|
+
register();
|
|
185
|
+
const module = await import('../src/commands/doctorCommand.ts');
|
|
186
|
+
handleDoctorCommand = module.handleDoctorCommand;
|
|
187
|
+
} else {
|
|
188
|
+
const module = await import('../dist/commands/doctorCommand.js');
|
|
189
|
+
handleDoctorCommand = module.handleDoctorCommand;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
await handleDoctorCommand();
|
|
193
|
+
process.exit(0);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error('Error:', error.message);
|
|
196
|
+
process.exit(1);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
152
200
|
if (isDev) {
|
|
153
201
|
// Show dev mode indicator for developers
|
|
154
202
|
console.log('🔧 Running in development mode (using TypeScript source)\n');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CurationArtifactType
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-E77VWEKZ.js";
|
|
5
5
|
|
|
6
6
|
// ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
|
|
7
7
|
var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
dayjsConfig_default,
|
|
17
17
|
extractSnippetMeta,
|
|
18
18
|
settingsMap
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E77VWEKZ.js";
|
|
20
20
|
import {
|
|
21
21
|
Logger
|
|
22
22
|
} from "./chunk-OCYRD7D6.js";
|
|
@@ -7791,7 +7791,7 @@ function secureParameters(params, schema) {
|
|
|
7791
7791
|
return schema.parse(params);
|
|
7792
7792
|
} catch (e) {
|
|
7793
7793
|
if (isZodError(e)) {
|
|
7794
|
-
throw new UnprocessableEntityError(e.
|
|
7794
|
+
throw new UnprocessableEntityError(e.errors.map((err) => `${err.path.join(".")}: ${err.message}`).join(", "));
|
|
7795
7795
|
}
|
|
7796
7796
|
throw new InternalServerError();
|
|
7797
7797
|
}
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
getSettingsByNames,
|
|
7
7
|
obfuscateApiKey,
|
|
8
8
|
secureParameters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-24JZFYBV.js";
|
|
10
10
|
import {
|
|
11
11
|
ApiKeyType,
|
|
12
12
|
MementoTier,
|
|
13
13
|
isSupportedEmbeddingModel
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E77VWEKZ.js";
|
|
15
15
|
|
|
16
16
|
// ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
|
|
17
17
|
import { z } from "zod";
|
|
18
18
|
var getApiKeySchema = z.object({
|
|
19
|
-
type: z.
|
|
19
|
+
type: z.nativeEnum(ApiKeyType),
|
|
20
20
|
nullIfMissing: z.boolean().optional(),
|
|
21
21
|
obfuscate: z.boolean().optional(),
|
|
22
22
|
demoKeyName: z.string().optional()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
BadRequestError,
|
|
4
4
|
secureParameters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-24JZFYBV.js";
|
|
6
6
|
import {
|
|
7
7
|
CompletionApiUsageTransaction,
|
|
8
8
|
GenericCreditDeductTransaction,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
TextGenerationUsageTransaction,
|
|
13
13
|
TransferCreditTransaction,
|
|
14
14
|
VideoGenerationUsageTransaction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E77VWEKZ.js";
|
|
16
16
|
|
|
17
17
|
// ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
|
|
18
18
|
import { z } from "zod";
|