@kuckit/cli 1.0.1 → 2.0.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.
@@ -1,595 +0,0 @@
1
- import { access, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
2
- import { join } from "node:path";
3
- import { execSync } from "node:child_process";
4
- import { accessSync, constants, existsSync } from "node:fs";
5
-
6
- //#region src/commands/generate-module.ts
7
- function toKebabCase(str) {
8
- return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
9
- }
10
- function toPascalCase(str) {
11
- return str.split(/[-_\s]+/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join("");
12
- }
13
- function toCamelCase(str) {
14
- const pascal = toPascalCase(str);
15
- return pascal.charAt(0).toLowerCase() + pascal.slice(1);
16
- }
17
- async function generateModule(name, options) {
18
- const kebabName = toKebabCase(name);
19
- const pascalName = toPascalCase(name);
20
- const camelName = toCamelCase(name);
21
- const moduleDirName = `${kebabName}-module`;
22
- const packageName = options.org ? `@${options.org}/${moduleDirName}` : `@kuckit/${moduleDirName}`;
23
- const moduleId = options.org ? `${options.org}.${kebabName}` : `kuckit.${kebabName}`;
24
- const targetDir = join(process.cwd(), options.dir, moduleDirName);
25
- console.log(`Creating module: ${packageName}`);
26
- console.log(` Directory: ${targetDir}`);
27
- await mkdir(join(targetDir, "src", "server", "schema"), { recursive: true });
28
- await mkdir(join(targetDir, "src", "client", "components"), { recursive: true });
29
- const packageJson = {
30
- name: packageName,
31
- version: "0.1.0",
32
- description: `${pascalName} module for Kuckit`,
33
- type: "module",
34
- main: "src/server/module.ts",
35
- types: "src/server/module.ts",
36
- files: ["dist"],
37
- exports: {
38
- ".": {
39
- types: "./src/server/module.ts",
40
- default: "./src/server/module.ts"
41
- },
42
- "./client": {
43
- types: "./src/client/index.ts",
44
- default: "./src/client/index.ts"
45
- }
46
- },
47
- publishConfig: {
48
- main: "dist/server/module.js",
49
- types: "dist/server/module.d.ts",
50
- exports: {
51
- ".": {
52
- types: "./dist/server/module.d.ts",
53
- default: "./dist/server/module.js"
54
- },
55
- "./client": {
56
- types: "./dist/client/index.d.ts",
57
- default: "./dist/client/index.js"
58
- }
59
- }
60
- },
61
- kuckit: {
62
- id: moduleId,
63
- server: ".",
64
- client: "./client",
65
- schema: "./src/server/schema/index.ts"
66
- },
67
- scripts: { build: "tsdown" },
68
- peerDependencies: {
69
- "@kuckit/sdk": "^0.1.0",
70
- "@kuckit/sdk-react": "^0.1.0",
71
- "drizzle-orm": "^0.38",
72
- typescript: "^5"
73
- },
74
- devDependencies: { tsdown: "catalog:" }
75
- };
76
- await writeFile(join(targetDir, "package.json"), JSON.stringify(packageJson, null, " ") + "\n");
77
- await writeFile(join(targetDir, "tsconfig.json"), JSON.stringify({
78
- extends: "../../tsconfig.base.json",
79
- compilerOptions: {
80
- outDir: "dist",
81
- rootDir: "src"
82
- },
83
- include: ["src"]
84
- }, null, " ") + "\n");
85
- const exampleSchema = `import { pgTable, text, timestamp } from 'drizzle-orm/pg-core'
86
-
87
- // Example table schema - replace with your module's tables
88
- export const ${camelName}Table = pgTable('${moduleId.replace(/[.-]/g, "_")}_${camelName}s', {
89
- id: text('id').primaryKey(),
90
- name: text('name').notNull(),
91
- createdAt: timestamp('created_at').notNull().defaultNow(),
92
- updatedAt: timestamp('updated_at').notNull().defaultNow(),
93
- })
94
-
95
- // Export inferred types for use in repositories
96
- export type ${pascalName} = typeof ${camelName}Table.$inferSelect
97
- export type New${pascalName} = typeof ${camelName}Table.$inferInsert
98
- `;
99
- await writeFile(join(targetDir, "src", "server", "schema", `${kebabName}.ts`), exampleSchema);
100
- const schemaIndex = `export * from './${kebabName}.js'
101
- `;
102
- await writeFile(join(targetDir, "src", "server", "schema", "index.ts"), schemaIndex);
103
- const serverModule = `import { defineKuckitModule, type KuckitModuleContext } from '@kuckit/sdk'
104
- import { ${camelName}Table } from './schema/index.js'
105
-
106
- export interface ${pascalName}ModuleConfig {
107
- // Add your module configuration options here
108
- }
109
-
110
- export const kuckitModule = defineKuckitModule<${pascalName}ModuleConfig>({
111
- id: '${moduleId}',
112
- displayName: '${pascalName}',
113
- description: '${pascalName} module for Kuckit',
114
- version: '0.1.0',
115
-
116
- async register(ctx: KuckitModuleContext<${pascalName}ModuleConfig>) {
117
- const { container } = ctx
118
-
119
- // Register schemas for this module
120
- ctx.registerSchema('${camelName}s', ${camelName}Table)
121
-
122
- // Register your services, repositories, and use cases here
123
- // Example:
124
- // container.register({
125
- // ${camelName}Repository: asFunction(() => make${pascalName}Repository()).scoped(),
126
- // get${pascalName}: asFunction(({ ${camelName}Repository }) => makeGet${pascalName}({ ${camelName}Repository })).scoped(),
127
- // })
128
- },
129
-
130
- async onBootstrap(ctx: KuckitModuleContext<${pascalName}ModuleConfig>) {
131
- const { container } = ctx
132
- const logger = container.resolve('logger')
133
- logger.info('${pascalName} module initialized')
134
- },
135
-
136
- async onShutdown(ctx: KuckitModuleContext<${pascalName}ModuleConfig>) {
137
- const { container } = ctx
138
- const logger = container.resolve('logger')
139
- logger.info('${pascalName} module shutting down')
140
- },
141
- })
142
- `;
143
- await writeFile(join(targetDir, "src", "server", "module.ts"), serverModule);
144
- const clientModule = `import { defineKuckitClientModule, type KuckitClientModuleContext } from '@kuckit/sdk-react'
145
- import { ${pascalName}Page } from './components/${pascalName}Page.js'
146
-
147
- export const kuckitClientModule = defineKuckitClientModule({
148
- id: '${moduleId}',
149
- displayName: '${pascalName}',
150
- version: '0.1.0',
151
-
152
- register(ctx: KuckitClientModuleContext) {
153
- // Register components that can be used in the host application
154
- ctx.registerComponent('${pascalName}Page', ${pascalName}Page)
155
-
156
- // Register a route for this module
157
- ctx.addRoute({
158
- id: '${kebabName}',
159
- path: '/${kebabName}',
160
- component: ${pascalName}Page,
161
- meta: {
162
- title: '${pascalName}',
163
- icon: 'box', // Change to appropriate icon
164
- requiresAuth: false,
165
- },
166
- })
167
-
168
- // Register a navigation item for the sidebar
169
- ctx.addNavItem({
170
- id: '${kebabName}',
171
- label: '${pascalName}',
172
- path: '/${kebabName}',
173
- icon: 'box', // Change to appropriate icon
174
- order: 100, // Adjust order as needed
175
- })
176
-
177
- // Register components into host app slots
178
- // ctx.registerSlot('dashboard.widgets', ${pascalName}Widget, { order: 50 })
179
- // ctx.registerSlot('settings.tabs', ${pascalName}SettingsTab, { order: 100 })
180
- },
181
- })
182
- `;
183
- await writeFile(join(targetDir, "src", "client", "index.ts"), clientModule);
184
- const pageComponent = `export function ${pascalName}Page() {
185
- return (
186
- <div>
187
- <h1>${pascalName}</h1>
188
- <p>Welcome to the ${pascalName} module.</p>
189
- </div>
190
- )
191
- }
192
- `;
193
- await writeFile(join(targetDir, "src", "client", "components", `${pascalName}Page.tsx`), pageComponent);
194
- console.log(`
195
- Module created successfully!
196
-
197
- Next steps:
198
- 1. cd ${options.dir}/${moduleDirName}
199
- 2. Add module to apps/server/src/config/modules.ts:
200
- { package: '${packageName}' }
201
- 3. Add client module to apps/web (if using frontend components):
202
- { package: '${packageName}/client' }
203
- 4. Run 'bun install' from the root to link the new package
204
- `);
205
- }
206
-
207
- //#endregion
208
- //#region src/commands/add-module.ts
209
- const CONFIG_FILES = [
210
- "kuckit.config.ts",
211
- "kuckit.config.js",
212
- "kuckit.config.mjs"
213
- ];
214
- async function fileExists(path) {
215
- try {
216
- await access(path, constants.F_OK);
217
- return true;
218
- } catch {
219
- return false;
220
- }
221
- }
222
- function findConfigFile(cwd) {
223
- for (const file of CONFIG_FILES) {
224
- const configPath = join(cwd, file);
225
- if (existsSync(configPath)) return configPath;
226
- }
227
- return null;
228
- }
229
- function detectPackageManager(cwd) {
230
- for (const [file, pm] of Object.entries({
231
- "bun.lock": "bun",
232
- "bun.lockb": "bun",
233
- "package-lock.json": "npm",
234
- "yarn.lock": "yarn",
235
- "pnpm-lock.yaml": "pnpm"
236
- })) try {
237
- accessSync(join(cwd, file), constants.F_OK);
238
- return pm;
239
- } catch {}
240
- return "npm";
241
- }
242
- async function readPackageKuckitMetadata(packageName, cwd) {
243
- const packageJsonPath = join(cwd, "node_modules", packageName, "package.json");
244
- try {
245
- const content = await readFile(packageJsonPath, "utf-8");
246
- return JSON.parse(content).kuckit ?? null;
247
- } catch {
248
- return null;
249
- }
250
- }
251
- const MODULES_MARKER_START = "// KUCKIT_MODULES_START";
252
- const MODULES_MARKER_END = "// KUCKIT_MODULES_END";
253
- const CLIENT_MODULES_MARKER_START = "// KUCKIT_CLIENT_MODULES_START";
254
- const CLIENT_MODULES_MARKER_END = "// KUCKIT_CLIENT_MODULES_END";
255
- /**
256
- * Add module to unified kuckit.config.ts
257
- */
258
- async function addToUnifiedConfig(packageName, configPath) {
259
- let content = await readFile(configPath, "utf-8");
260
- if (content.includes(`'${packageName}'`) || content.includes(`"${packageName}"`)) {
261
- console.log(` Module ${packageName} is already in ${configPath}`);
262
- return true;
263
- }
264
- const modulesArrayMatch = content.match(/modules:\s*\[/);
265
- if (!modulesArrayMatch) {
266
- console.warn(`Warning: Could not find 'modules' array in ${configPath}`);
267
- console.log(` Please manually add: { package: '${packageName}' }`);
268
- return false;
269
- }
270
- const insertPos = modulesArrayMatch.index + modulesArrayMatch[0].length;
271
- const newEntry = `\n\t\t{ package: '${packageName}' },`;
272
- content = content.slice(0, insertPos) + newEntry + content.slice(insertPos);
273
- await writeFile(configPath, content);
274
- console.log(` Added to unified config: ${configPath}`);
275
- return true;
276
- }
277
- async function addToServerModules(packageName, cwd) {
278
- const modulesPath = join(cwd, "apps", "server", "src", "config", "modules.ts");
279
- if (!await fileExists(modulesPath)) {
280
- console.warn(`Warning: Server modules file not found at ${modulesPath}`);
281
- return false;
282
- }
283
- let content = await readFile(modulesPath, "utf-8");
284
- if (content.includes(`package: '${packageName}'`)) {
285
- console.log(` Module ${packageName} is already in server modules`);
286
- return true;
287
- }
288
- if (!content.includes(MODULES_MARKER_START)) {
289
- if (content.match(/return modules\s*$/)) {
290
- const insertPos = content.lastIndexOf("return modules");
291
- const before$1 = content.slice(0, insertPos);
292
- const after$1 = content.slice(insertPos);
293
- content = before$1 + `\n\t\t${MODULES_MARKER_START}\n\t\t// Modules installed via 'kuckit add' will be added here\n\t\t${MODULES_MARKER_END}\n\n\t\t` + after$1;
294
- }
295
- }
296
- const newEntry = `{ package: '${packageName}' },`;
297
- const markerEndPos = content.indexOf(MODULES_MARKER_END);
298
- if (markerEndPos === -1) {
299
- console.warn(`Warning: Could not find marker in ${modulesPath}`);
300
- console.log(` Please manually add: ${newEntry}`);
301
- return false;
302
- }
303
- const before = content.slice(0, markerEndPos);
304
- const after = content.slice(markerEndPos);
305
- content = before + `${newEntry}\n\t\t` + after;
306
- await writeFile(modulesPath, content);
307
- console.log(` Added to server modules: ${modulesPath}`);
308
- return true;
309
- }
310
- async function addToClientModules(packageName, clientPath, cwd) {
311
- const clientModulesPath = join(cwd, "apps", "web", "src", "modules.client.ts");
312
- if (!await fileExists(clientModulesPath)) {
313
- await writeFile(clientModulesPath, `import type { ClientModuleSpec } from '@kuckit/sdk-react'
314
-
315
- /**
316
- * Client module specifications
317
- *
318
- * Add your Kuckit client modules here. Modules can be:
319
- * - Direct references: { module: myModule }
320
- * - Package imports: { package: '@acme/billing-module/client' }
321
- *
322
- * The CLI command \`kuckit add <package>\` will automatically update this file.
323
- */
324
- export const getClientModuleSpecs = (): ClientModuleSpec[] => [
325
- ${CLIENT_MODULES_MARKER_START}
326
- ${CLIENT_MODULES_MARKER_END}
327
- ]
328
- `);
329
- console.log(` Created client modules file: ${clientModulesPath}`);
330
- }
331
- let content = await readFile(clientModulesPath, "utf-8");
332
- const clientPackagePath = `${packageName}/${clientPath.replace("./", "")}`;
333
- if (content.includes(`package: '${clientPackagePath}'`)) {
334
- console.log(` Client module is already registered`);
335
- return true;
336
- }
337
- const newEntry = `{ package: '${clientPackagePath}' },`;
338
- const markerEndPos = content.indexOf(CLIENT_MODULES_MARKER_END);
339
- if (markerEndPos === -1) {
340
- console.warn(`Warning: Could not find marker in ${clientModulesPath}`);
341
- console.log(` Please manually add: ${newEntry}`);
342
- return false;
343
- }
344
- const before = content.slice(0, markerEndPos);
345
- const after = content.slice(markerEndPos);
346
- content = before + `${newEntry}\n\t` + after;
347
- await writeFile(clientModulesPath, content);
348
- console.log(` Added to client modules: ${clientModulesPath}`);
349
- return true;
350
- }
351
- async function addModule(packageName, options) {
352
- const cwd = process.cwd();
353
- console.log(`Adding module: ${packageName}`);
354
- if (!options.skipInstall) {
355
- const pm = detectPackageManager(cwd);
356
- const installCmd = pm === "npm" ? `${pm} install ${packageName}` : `${pm} add ${packageName}`;
357
- console.log(` Installing with ${pm}...`);
358
- try {
359
- execSync(installCmd, {
360
- cwd,
361
- stdio: "inherit"
362
- });
363
- } catch {
364
- console.error(`Failed to install ${packageName}`);
365
- process.exit(1);
366
- }
367
- }
368
- const metadata = await readPackageKuckitMetadata(packageName, cwd);
369
- if (!metadata) {
370
- console.error(`\nError: ${packageName} is not a valid Kuckit module.`);
371
- console.error(`The package.json must contain a "kuckit" field with module metadata.`);
372
- console.error(`\nExpected structure:`);
373
- console.error(`{
374
- "kuckit": {
375
- "id": "acme.billing",
376
- "server": ".",
377
- "client": "./client"
378
- }
379
- }`);
380
- process.exit(1);
381
- }
382
- console.log(` Found Kuckit module: ${metadata.id}`);
383
- const configPath = findConfigFile(cwd);
384
- if (configPath) await addToUnifiedConfig(packageName, configPath);
385
- else {
386
- if (metadata.server) await addToServerModules(packageName, cwd);
387
- if (metadata.client) await addToClientModules(packageName, metadata.client, cwd);
388
- }
389
- console.log(`
390
- Module ${packageName} added successfully!
391
-
392
- Run 'bun run dev' to start the server with the new module.
393
- `);
394
- }
395
-
396
- //#endregion
397
- //#region src/lib/sdk-loader.ts
398
- async function loadTryLoadKuckitConfig() {
399
- try {
400
- const sdk = await import("@kuckit/sdk");
401
- if (!sdk.tryLoadKuckitConfig) throw new Error("Invalid @kuckit/sdk version: tryLoadKuckitConfig not found.");
402
- return sdk.tryLoadKuckitConfig;
403
- } catch {
404
- console.error("Error: This command requires @kuckit/sdk to be installed in your project.");
405
- console.error("Install it with one of:");
406
- console.error(" npm install -D @kuckit/sdk");
407
- console.error(" pnpm add -D @kuckit/sdk");
408
- console.error(" bun add -d @kuckit/sdk");
409
- process.exit(1);
410
- }
411
- }
412
-
413
- //#endregion
414
- //#region src/commands/discover-module.ts
415
- async function readKuckitMetadataFromPath(packageJsonPath) {
416
- try {
417
- const content = await readFile(packageJsonPath, "utf-8");
418
- return JSON.parse(content).kuckit ?? null;
419
- } catch {
420
- return null;
421
- }
422
- }
423
- async function readPackageName(packageJsonPath) {
424
- try {
425
- const content = await readFile(packageJsonPath, "utf-8");
426
- return JSON.parse(content).name ?? null;
427
- } catch {
428
- return null;
429
- }
430
- }
431
- async function scanWorkspacePackages(cwd) {
432
- const discovered = [];
433
- const packagesDir = join(cwd, "packages");
434
- if (!existsSync(packagesDir)) return discovered;
435
- try {
436
- const entries = await readdir(packagesDir, { withFileTypes: true });
437
- for (const entry of entries) {
438
- if (!entry.isDirectory()) continue;
439
- const packageJsonPath = join(packagesDir, entry.name, "package.json");
440
- const metadata = await readKuckitMetadataFromPath(packageJsonPath);
441
- if (metadata) {
442
- const packageName = await readPackageName(packageJsonPath);
443
- if (packageName) discovered.push({
444
- package: packageName,
445
- id: metadata.id,
446
- server: metadata.server,
447
- client: metadata.client,
448
- enabled: false,
449
- local: true
450
- });
451
- }
452
- }
453
- } catch {}
454
- return discovered;
455
- }
456
- async function scanNodeModules(cwd) {
457
- const nodeModulesPath = join(cwd, "node_modules");
458
- const discovered = [];
459
- try {
460
- const entries = await readdir(nodeModulesPath, { withFileTypes: true });
461
- for (const entry of entries) {
462
- if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
463
- if (entry.name.startsWith(".")) continue;
464
- if (entry.name.startsWith("@")) {
465
- const scopePath = join(nodeModulesPath, entry.name);
466
- try {
467
- const scopedEntries = await readdir(scopePath, { withFileTypes: true });
468
- for (const scopedEntry of scopedEntries) {
469
- if (!scopedEntry.isDirectory() && !scopedEntry.isSymbolicLink()) continue;
470
- const packageName = `${entry.name}/${scopedEntry.name}`;
471
- const metadata = await readKuckitMetadataFromPath(join(nodeModulesPath, packageName, "package.json"));
472
- if (metadata) discovered.push({
473
- package: packageName,
474
- id: metadata.id,
475
- server: metadata.server,
476
- client: metadata.client,
477
- enabled: false
478
- });
479
- }
480
- } catch {}
481
- } else {
482
- const metadata = await readKuckitMetadataFromPath(join(nodeModulesPath, entry.name, "package.json"));
483
- if (metadata) discovered.push({
484
- package: entry.name,
485
- id: metadata.id,
486
- server: metadata.server,
487
- client: metadata.client,
488
- enabled: false
489
- });
490
- }
491
- }
492
- } catch {}
493
- return discovered;
494
- }
495
- async function addModulesToConfig(packages, configPath) {
496
- const content = await readFile(configPath, "utf-8");
497
- let updated = content;
498
- for (const pkg of packages) {
499
- if (updated.includes(`'${pkg}'`) || updated.includes(`"${pkg}"`)) continue;
500
- const modulesArrayMatch = updated.match(/modules:\s*\[/);
501
- if (!modulesArrayMatch) continue;
502
- const insertPos = modulesArrayMatch.index + modulesArrayMatch[0].length;
503
- const newEntry = `\n\t\t{ package: '${pkg}' },`;
504
- updated = updated.slice(0, insertPos) + newEntry + updated.slice(insertPos);
505
- }
506
- if (updated !== content) {
507
- const { writeFile: writeFile$1 } = await import("node:fs/promises");
508
- await writeFile$1(configPath, updated);
509
- }
510
- }
511
- async function discoverModules(options) {
512
- const cwd = process.cwd();
513
- if (!options.json) console.log("Scanning for Kuckit modules...\n");
514
- const config = await (await loadTryLoadKuckitConfig())(cwd);
515
- const configuredPackages = new Set(config?.modules.map((m) => m.package) ?? []);
516
- const workspaceModules = await scanWorkspacePackages(cwd);
517
- const nodeModules = await scanNodeModules(cwd);
518
- const seen = /* @__PURE__ */ new Set();
519
- const discovered = [];
520
- for (const mod of workspaceModules) {
521
- seen.add(mod.package);
522
- mod.enabled = configuredPackages.has(mod.package);
523
- discovered.push(mod);
524
- }
525
- for (const mod of nodeModules) if (!seen.has(mod.package)) {
526
- mod.enabled = configuredPackages.has(mod.package);
527
- discovered.push(mod);
528
- }
529
- discovered.sort((a, b) => {
530
- if (a.enabled !== b.enabled) return a.enabled ? -1 : 1;
531
- return a.package.localeCompare(b.package);
532
- });
533
- const result = {
534
- discovered,
535
- enabled: discovered.filter((m) => m.enabled).length,
536
- unconfigured: discovered.filter((m) => !m.enabled).length
537
- };
538
- if (options.json) {
539
- console.log(JSON.stringify(result, null, 2));
540
- return;
541
- }
542
- if (discovered.length === 0) {
543
- console.log("No Kuckit modules found.");
544
- console.log("\nInstall modules with: kuckit add <package>");
545
- return;
546
- }
547
- console.log(`Found ${discovered.length} Kuckit module${discovered.length === 1 ? "" : "s"}:`);
548
- for (const mod of discovered) {
549
- const status = mod.enabled ? "✓" : "○";
550
- const label = mod.enabled ? "(enabled)" : "(not configured)";
551
- const localLabel = mod.local ? " [local]" : "";
552
- console.log(` ${status} ${mod.package}${localLabel} ${label}`);
553
- }
554
- const unconfigured = discovered.filter((m) => !m.enabled);
555
- if (unconfigured.length === 0) {
556
- console.log("\nAll discovered modules are already configured.");
557
- return;
558
- }
559
- if (!options.interactive) {
560
- console.log(`\n${unconfigured.length} module${unconfigured.length === 1 ? "" : "s"} not configured.`);
561
- console.log("Run without --no-interactive to enable them.");
562
- return;
563
- }
564
- if (!config?._configPath) {
565
- console.log("\nNo kuckit.config.ts found. Create one first with:");
566
- console.log(" npx create-kuckit-app --init");
567
- return;
568
- }
569
- try {
570
- const { checkbox } = await import("@inquirer/prompts");
571
- const selected = await checkbox({
572
- message: "Enable modules:",
573
- choices: unconfigured.map((m) => ({
574
- name: m.package,
575
- value: m.package,
576
- checked: true
577
- }))
578
- });
579
- if (selected.length === 0) {
580
- console.log("\nNo modules selected.");
581
- return;
582
- }
583
- await addModulesToConfig(selected, config._configPath);
584
- console.log(`\nUpdated kuckit.config.ts with ${selected.length} new module${selected.length === 1 ? "" : "s"}.`);
585
- } catch (error) {
586
- if (error.name === "ExitPromptError") {
587
- console.log("\nCancelled.");
588
- return;
589
- }
590
- throw error;
591
- }
592
- }
593
-
594
- //#endregion
595
- export { generateModule as i, loadTryLoadKuckitConfig as n, addModule as r, discoverModules as t };