@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.
@@ -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');
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  HydrationEngine,
4
4
  createHydrationEngine
5
- } from "./chunk-RUI6HNLO.js";
5
+ } from "./chunk-GQGOWACU.js";
6
6
  export {
7
7
  HydrationEngine,
8
8
  createHydrationEngine
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-L6OTUVAD.js";
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-L6OTUVAD.js";
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.issues.map((err) => `${err.path.join(".")}: ${err.message}`).join(", "));
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-ERZ57OCU.js";
9
+ } from "./chunk-24JZFYBV.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-L6OTUVAD.js";
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.enum(ApiKeyType),
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-ERZ57OCU.js";
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-L6OTUVAD.js";
15
+ } from "./chunk-E77VWEKZ.js";
16
16
 
17
17
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
18
18
  import { z } from "zod";