@kuckit/db 2.0.7 → 3.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 +1 @@
1
- {"version":3,"file":"schema-discovery.d.ts","names":[],"sources":["../src/schema-discovery.ts"],"sourcesContent":[],"mappings":";;AAuDA;;;;;;;;;;;iBAAgB,oBAAA,CAAA"}
1
+ {"version":3,"file":"schema-discovery.d.ts","names":[],"sources":["../src/schema-discovery.ts"],"sourcesContent":[],"mappings":";;AAiHA;;;;;;;;;;;iBAAgB,oBAAA,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- import { existsSync } from "fs";
2
+ import { existsSync, readdirSync } from "fs";
3
3
  import { dirname, resolve } from "path";
4
4
  import { fileURLToPath } from "url";
5
5
  import { createRequire as createRequire$1 } from "module";
@@ -57,8 +57,44 @@ function loadKuckitConfigSync(cwd = process.cwd()) {
57
57
  const currentDirPath = dirname(fileURLToPath(import.meta.url));
58
58
  const require = createRequire$1(import.meta.url);
59
59
  /**
60
+ * Find the monorepo/project root by walking up from current directory.
61
+ * Looks for kuckit.config.ts or package.json with workspaces.
62
+ */
63
+ function findProjectRoot() {
64
+ let dir = currentDirPath;
65
+ for (let i = 0; i < 10; i++) {
66
+ if (existsSync(resolve(dir, "kuckit.config.ts"))) return dir;
67
+ const parent = dirname(dir);
68
+ if (parent === dir) break;
69
+ dir = parent;
70
+ }
71
+ return null;
72
+ }
73
+ /**
74
+ * Scan workspace directories (packages/, apps/) for a package.
75
+ * Fallback when require.resolve fails in monorepo context.
76
+ */
77
+ function findPackageInWorkspace(packageName, projectRoot) {
78
+ for (const wsDir of ["packages", "apps"]) {
79
+ const wsPath = resolve(projectRoot, wsDir);
80
+ if (!existsSync(wsPath)) continue;
81
+ try {
82
+ const entries = readdirSync(wsPath, { withFileTypes: true });
83
+ for (const entry of entries) {
84
+ if (!entry.isDirectory()) continue;
85
+ const pkgJsonPath = resolve(wsPath, entry.name, "package.json");
86
+ if (!existsSync(pkgJsonPath)) continue;
87
+ try {
88
+ if (JSON.parse(require("fs").readFileSync(pkgJsonPath, "utf-8")).name === packageName) return resolve(wsPath, entry.name);
89
+ } catch {}
90
+ }
91
+ } catch {}
92
+ }
93
+ return null;
94
+ }
95
+ /**
60
96
  * Resolve a module's package root directory using require.resolve.
61
- * Works for packages in node_modules, packages/, apps/, or any location.
97
+ * Falls back to workspace scanning in monorepo context.
62
98
  *
63
99
  * @param packageName - NPM package name (e.g., '@kuckit/users-module')
64
100
  * @returns Absolute path to package root, or null if not found
@@ -76,8 +112,13 @@ function resolvePackageRoot(packageName) {
76
112
  dir = parent;
77
113
  }
78
114
  } catch {}
79
- return null;
80
115
  }
116
+ const projectRoot = findProjectRoot();
117
+ if (projectRoot) {
118
+ const wsPath = findPackageInWorkspace(packageName, projectRoot);
119
+ if (wsPath) return wsPath;
120
+ }
121
+ return null;
81
122
  }
82
123
  /**
83
124
  * Get schema paths for Drizzle configuration.
@@ -1 +1 @@
1
- {"version":3,"file":"schema-discovery.js","names":["dirname","resolve","existsSync","createRequire"],"sources":["../../sdk/dist/loader-BJ2ClBV6.js","../src/schema-discovery.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { existsSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\n\n//#region rolldown:runtime\nvar __require = /* @__PURE__ */ createRequire(import.meta.url);\n\n//#endregion\n//#region src/config/loader.ts\nconst CONFIG_FILES = [\n\t\"kuckit.config.ts\",\n\t\"kuckit.config.js\",\n\t\"kuckit.config.mjs\"\n];\n/**\n* Find the config file path by searching from cwd upward\n*/\nfunction findConfigFile(cwd = process.cwd()) {\n\tlet dir = cwd;\n\twhile (dir !== dirname(dir)) {\n\t\tfor (const file of CONFIG_FILES) {\n\t\t\tconst configPath = resolve(dir, file);\n\t\t\tif (existsSync(configPath)) return configPath;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\tfor (const file of CONFIG_FILES) {\n\t\tconst configPath = resolve(dir, file);\n\t\tif (existsSync(configPath)) return configPath;\n\t}\n\treturn null;\n}\n/**\n* Check if a unified config file exists\n*/\nfunction hasUnifiedConfig(cwd = process.cwd()) {\n\treturn findConfigFile(cwd) !== null;\n}\n/**\n* Load Kuckit configuration from file\n*\n* Uses jiti for TypeScript support at runtime.\n* Falls back to dynamic import for JS/MJS files.\n*\n* @param cwd - Directory to start searching from (default: process.cwd())\n* @throws Error if config file not found or invalid\n*/\nasync function loadKuckitConfig(cwd = process.cwd()) {\n\tconst configPath = findConfigFile(cwd);\n\tif (!configPath) throw new Error(`No Kuckit config file found. Create a kuckit.config.ts at your project root.\\nSearched from: ${cwd}`);\n\tlet config;\n\tif (configPath.endsWith(\".ts\")) {\n\t\tconst { createJiti } = await import(\"jiti\");\n\t\tconst loaded = await createJiti(cwd, { interopDefault: true }).import(configPath);\n\t\tconfig = loaded.default ?? loaded;\n\t} else {\n\t\tconst loaded = await import(configPath);\n\t\tconfig = loaded.default ?? loaded;\n\t}\n\tif (!config || typeof config !== \"object\") throw new Error(`Invalid Kuckit config at ${configPath}: expected an object`);\n\tif (!Array.isArray(config.modules)) throw new Error(`Invalid Kuckit config at ${configPath}: 'modules' must be an array`);\n\treturn {\n\t\t...config,\n\t\t_configPath: configPath\n\t};\n}\n/**\n* Synchronously load config (for non-async contexts like drizzle.config.ts)\n* Uses jiti synchronously to load TypeScript config\n*/\nfunction loadKuckitConfigSync(cwd = process.cwd()) {\n\tconst configPath = findConfigFile(cwd);\n\tif (!configPath) return null;\n\ttry {\n\t\tconst { createJiti } = __require(\"jiti\");\n\t\tconst loaded = createJiti(cwd, { interopDefault: true })(configPath);\n\t\tconst config = loaded.default ?? loaded;\n\t\tif (!config || typeof config !== \"object\" || !Array.isArray(config.modules)) return null;\n\t\treturn {\n\t\t\t...config,\n\t\t\t_configPath: configPath\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n/**\n* Try to load config, returning null if not found\n*/\nasync function tryLoadKuckitConfig(cwd = process.cwd()) {\n\ttry {\n\t\treturn await loadKuckitConfig(cwd);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n//#endregion\nexport { tryLoadKuckitConfig as a, loadKuckitConfigSync as i, hasUnifiedConfig as n, loadKuckitConfig as r, findConfigFile as t };\n//# sourceMappingURL=loader-BJ2ClBV6.js.map","import { existsSync } from 'fs'\nimport { resolve, dirname } from 'path'\nimport { fileURLToPath } from 'url'\nimport { createRequire } from 'module'\nimport { loadKuckitConfigSync, type KuckitModuleConfig } from '@kuckit/sdk/config/node'\n\nconst currentDirPath = dirname(fileURLToPath(import.meta.url))\nconst require = createRequire(import.meta.url)\n\n/**\n * Resolve a module's package root directory using require.resolve.\n * Works for packages in node_modules, packages/, apps/, or any location.\n *\n * @param packageName - NPM package name (e.g., '@kuckit/users-module')\n * @returns Absolute path to package root, or null if not found\n */\nfunction resolvePackageRoot(packageName: string): string | null {\n\ttry {\n\t\t// Try to resolve the package's package.json\n\t\tconst packageJsonPath = require.resolve(`${packageName}/package.json`)\n\t\treturn dirname(packageJsonPath)\n\t} catch {\n\t\t// Package not installed or doesn't have package.json exports\n\t\ttry {\n\t\t\t// Fallback: resolve main entry and walk up to find package.json\n\t\t\tconst mainPath = require.resolve(packageName)\n\t\t\tlet dir = dirname(mainPath)\n\t\t\t// Walk up until we find package.json (max 10 levels to prevent infinite loop)\n\t\t\tfor (let i = 0; i < 10; i++) {\n\t\t\t\tif (existsSync(resolve(dir, 'package.json'))) {\n\t\t\t\t\treturn dir\n\t\t\t\t}\n\t\t\t\tconst parent = dirname(dir)\n\t\t\t\tif (parent === dir) break // Reached filesystem root\n\t\t\t\tdir = parent\n\t\t\t}\n\t\t} catch {\n\t\t\t// Package not resolvable at all\n\t\t}\n\t\treturn null\n\t}\n}\n\n/**\n * Get schema paths for Drizzle configuration.\n * Derives paths from kuckit.config.ts (single source of truth).\n *\n * Uses require.resolve to dynamically locate packages, supporting:\n * - Modules in packages/ directory\n * - Modules in apps/ directory\n * - External modules in node_modules\n * - Nested package directories\n *\n * @returns Array of absolute paths to schema directories, starting with core schema\n */\nexport function getModuleSchemaPaths(): string[] {\n\tconst coreSchema = resolve(currentDirPath, './schema')\n\n\t// Load config using the SDK's pure config loader (no side effects)\n\tconst config = loadKuckitConfigSync()\n\tif (!config) {\n\t\t// Fall back to just core schema if no config found\n\t\treturn [coreSchema]\n\t}\n\n\tconst modulePaths = config.modules\n\t\t.filter((m: KuckitModuleConfig) => m.enabled !== false)\n\t\t.map((m: KuckitModuleConfig) => {\n\t\t\tconst packageRoot = resolvePackageRoot(m.package)\n\t\t\tif (!packageRoot) return null\n\n\t\t\tconst schemaDir = m.schemaDir ?? 'src/server/schema'\n\t\t\treturn resolve(packageRoot, schemaDir)\n\t\t})\n\t\t.filter((p): p is string => p !== null && existsSync(p))\n\n\treturn [coreSchema, ...modulePaths]\n}\n"],"mappings":";;;;;;;;;AAKA,IAAI,YAA4B,8BAAc,OAAO,KAAK,IAAI;AAI9D,MAAM,eAAe;CACpB;CACA;CACA;CACA;;;;AAID,SAAS,eAAe,MAAM,QAAQ,KAAK,EAAE;CAC5C,IAAI,MAAM;AACV,QAAO,QAAQA,UAAQ,IAAI,EAAE;AAC5B,OAAK,MAAM,QAAQ,cAAc;GAChC,MAAM,aAAaC,UAAQ,KAAK,KAAK;AACrC,OAAIC,aAAW,WAAW,CAAE,QAAO;;AAEpC,QAAMF,UAAQ,IAAI;;AAEnB,MAAK,MAAM,QAAQ,cAAc;EAChC,MAAM,aAAaC,UAAQ,KAAK,KAAK;AACrC,MAAIC,aAAW,WAAW,CAAE,QAAO;;AAEpC,QAAO;;;;;;AAwCR,SAAS,qBAAqB,MAAM,QAAQ,KAAK,EAAE;CAClD,MAAM,aAAa,eAAe,IAAI;AACtC,KAAI,CAAC,WAAY,QAAO;AACxB,KAAI;EACH,MAAM,EAAE,eAAe,UAAU,OAAO;EACxC,MAAM,SAAS,WAAW,KAAK,EAAE,gBAAgB,MAAM,CAAC,CAAC,WAAW;EACpE,MAAM,SAAS,OAAO,WAAW;AACjC,MAAI,CAAC,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,QAAQ,CAAE,QAAO;AACpF,SAAO;GACN,GAAG;GACH,aAAa;GACb;SACM;AACP,SAAO;;;;;;AC7ET,MAAM,iBAAiB,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAC9D,MAAM,UAAUC,gBAAc,OAAO,KAAK,IAAI;;;;;;;;AAS9C,SAAS,mBAAmB,aAAoC;AAC/D,KAAI;AAGH,SAAO,QADiB,QAAQ,QAAQ,GAAG,YAAY,eAAe,CACvC;SACxB;AAEP,MAAI;GAGH,IAAI,MAAM,QADO,QAAQ,QAAQ,YAAY,CAClB;AAE3B,QAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;AAC5B,QAAI,WAAW,QAAQ,KAAK,eAAe,CAAC,CAC3C,QAAO;IAER,MAAM,SAAS,QAAQ,IAAI;AAC3B,QAAI,WAAW,IAAK;AACpB,UAAM;;UAEA;AAGR,SAAO;;;;;;;;;;;;;;;AAgBT,SAAgB,uBAAiC;CAChD,MAAM,aAAa,QAAQ,gBAAgB,WAAW;CAGtD,MAAM,SAAS,sBAAsB;AACrC,KAAI,CAAC,OAEJ,QAAO,CAAC,WAAW;AAcpB,QAAO,CAAC,YAAY,GAXA,OAAO,QACzB,QAAQ,MAA0B,EAAE,YAAY,MAAM,CACtD,KAAK,MAA0B;EAC/B,MAAM,cAAc,mBAAmB,EAAE,QAAQ;AACjD,MAAI,CAAC,YAAa,QAAO;AAGzB,SAAO,QAAQ,aADG,EAAE,aAAa,oBACK;GACrC,CACD,QAAQ,MAAmB,MAAM,QAAQ,WAAW,EAAE,CAAC,CAEtB"}
1
+ {"version":3,"file":"schema-discovery.js","names":["dirname","resolve","existsSync","createRequire"],"sources":["../../sdk/dist/loader-BJ2ClBV6.js","../src/schema-discovery.ts"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { existsSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\n\n//#region rolldown:runtime\nvar __require = /* @__PURE__ */ createRequire(import.meta.url);\n\n//#endregion\n//#region src/config/loader.ts\nconst CONFIG_FILES = [\n\t\"kuckit.config.ts\",\n\t\"kuckit.config.js\",\n\t\"kuckit.config.mjs\"\n];\n/**\n* Find the config file path by searching from cwd upward\n*/\nfunction findConfigFile(cwd = process.cwd()) {\n\tlet dir = cwd;\n\twhile (dir !== dirname(dir)) {\n\t\tfor (const file of CONFIG_FILES) {\n\t\t\tconst configPath = resolve(dir, file);\n\t\t\tif (existsSync(configPath)) return configPath;\n\t\t}\n\t\tdir = dirname(dir);\n\t}\n\tfor (const file of CONFIG_FILES) {\n\t\tconst configPath = resolve(dir, file);\n\t\tif (existsSync(configPath)) return configPath;\n\t}\n\treturn null;\n}\n/**\n* Check if a unified config file exists\n*/\nfunction hasUnifiedConfig(cwd = process.cwd()) {\n\treturn findConfigFile(cwd) !== null;\n}\n/**\n* Load Kuckit configuration from file\n*\n* Uses jiti for TypeScript support at runtime.\n* Falls back to dynamic import for JS/MJS files.\n*\n* @param cwd - Directory to start searching from (default: process.cwd())\n* @throws Error if config file not found or invalid\n*/\nasync function loadKuckitConfig(cwd = process.cwd()) {\n\tconst configPath = findConfigFile(cwd);\n\tif (!configPath) throw new Error(`No Kuckit config file found. Create a kuckit.config.ts at your project root.\\nSearched from: ${cwd}`);\n\tlet config;\n\tif (configPath.endsWith(\".ts\")) {\n\t\tconst { createJiti } = await import(\"jiti\");\n\t\tconst loaded = await createJiti(cwd, { interopDefault: true }).import(configPath);\n\t\tconfig = loaded.default ?? loaded;\n\t} else {\n\t\tconst loaded = await import(configPath);\n\t\tconfig = loaded.default ?? loaded;\n\t}\n\tif (!config || typeof config !== \"object\") throw new Error(`Invalid Kuckit config at ${configPath}: expected an object`);\n\tif (!Array.isArray(config.modules)) throw new Error(`Invalid Kuckit config at ${configPath}: 'modules' must be an array`);\n\treturn {\n\t\t...config,\n\t\t_configPath: configPath\n\t};\n}\n/**\n* Synchronously load config (for non-async contexts like drizzle.config.ts)\n* Uses jiti synchronously to load TypeScript config\n*/\nfunction loadKuckitConfigSync(cwd = process.cwd()) {\n\tconst configPath = findConfigFile(cwd);\n\tif (!configPath) return null;\n\ttry {\n\t\tconst { createJiti } = __require(\"jiti\");\n\t\tconst loaded = createJiti(cwd, { interopDefault: true })(configPath);\n\t\tconst config = loaded.default ?? loaded;\n\t\tif (!config || typeof config !== \"object\" || !Array.isArray(config.modules)) return null;\n\t\treturn {\n\t\t\t...config,\n\t\t\t_configPath: configPath\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n/**\n* Try to load config, returning null if not found\n*/\nasync function tryLoadKuckitConfig(cwd = process.cwd()) {\n\ttry {\n\t\treturn await loadKuckitConfig(cwd);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n//#endregion\nexport { tryLoadKuckitConfig as a, loadKuckitConfigSync as i, hasUnifiedConfig as n, loadKuckitConfig as r, findConfigFile as t };\n//# sourceMappingURL=loader-BJ2ClBV6.js.map","import { existsSync, readdirSync } from 'fs'\nimport { resolve, dirname } from 'path'\nimport { fileURLToPath } from 'url'\nimport { createRequire } from 'module'\nimport { loadKuckitConfigSync, type KuckitModuleConfig } from '@kuckit/sdk/config/node'\n\nconst currentDirPath = dirname(fileURLToPath(import.meta.url))\nconst require = createRequire(import.meta.url)\n\n/**\n * Find the monorepo/project root by walking up from current directory.\n * Looks for kuckit.config.ts or package.json with workspaces.\n */\nfunction findProjectRoot(): string | null {\n\tlet dir = currentDirPath\n\tfor (let i = 0; i < 10; i++) {\n\t\tif (existsSync(resolve(dir, 'kuckit.config.ts'))) {\n\t\t\treturn dir\n\t\t}\n\t\tconst parent = dirname(dir)\n\t\tif (parent === dir) break\n\t\tdir = parent\n\t}\n\treturn null\n}\n\n/**\n * Scan workspace directories (packages/, apps/) for a package.\n * Fallback when require.resolve fails in monorepo context.\n */\nfunction findPackageInWorkspace(packageName: string, projectRoot: string): string | null {\n\tconst workspaceDirs = ['packages', 'apps']\n\n\tfor (const wsDir of workspaceDirs) {\n\t\tconst wsPath = resolve(projectRoot, wsDir)\n\t\tif (!existsSync(wsPath)) continue\n\n\t\ttry {\n\t\t\tconst entries = readdirSync(wsPath, { withFileTypes: true })\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (!entry.isDirectory()) continue\n\n\t\t\t\tconst pkgJsonPath = resolve(wsPath, entry.name, 'package.json')\n\t\t\t\tif (!existsSync(pkgJsonPath)) continue\n\n\t\t\t\ttry {\n\t\t\t\t\tconst pkgJson = JSON.parse(require('fs').readFileSync(pkgJsonPath, 'utf-8'))\n\t\t\t\t\tif (pkgJson.name === packageName) {\n\t\t\t\t\t\treturn resolve(wsPath, entry.name)\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// Skip invalid package.json\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// Skip unreadable directories\n\t\t}\n\t}\n\treturn null\n}\n\n/**\n * Resolve a module's package root directory using require.resolve.\n * Falls back to workspace scanning in monorepo context.\n *\n * @param packageName - NPM package name (e.g., '@kuckit/users-module')\n * @returns Absolute path to package root, or null if not found\n */\nfunction resolvePackageRoot(packageName: string): string | null {\n\t// First try require.resolve (works for installed packages)\n\ttry {\n\t\tconst packageJsonPath = require.resolve(`${packageName}/package.json`)\n\t\treturn dirname(packageJsonPath)\n\t} catch {\n\t\t// Package not installed or doesn't have package.json exports\n\t\ttry {\n\t\t\tconst mainPath = require.resolve(packageName)\n\t\t\tlet dir = dirname(mainPath)\n\t\t\tfor (let i = 0; i < 10; i++) {\n\t\t\t\tif (existsSync(resolve(dir, 'package.json'))) {\n\t\t\t\t\treturn dir\n\t\t\t\t}\n\t\t\t\tconst parent = dirname(dir)\n\t\t\t\tif (parent === dir) break\n\t\t\t\tdir = parent\n\t\t\t}\n\t\t} catch {\n\t\t\t// Package not resolvable - try workspace scanning\n\t\t}\n\t}\n\n\t// Fallback: scan workspace directories (monorepo support)\n\tconst projectRoot = findProjectRoot()\n\tif (projectRoot) {\n\t\tconst wsPath = findPackageInWorkspace(packageName, projectRoot)\n\t\tif (wsPath) return wsPath\n\t}\n\n\treturn null\n}\n\n/**\n * Get schema paths for Drizzle configuration.\n * Derives paths from kuckit.config.ts (single source of truth).\n *\n * Uses require.resolve to dynamically locate packages, supporting:\n * - Modules in packages/ directory\n * - Modules in apps/ directory\n * - External modules in node_modules\n * - Nested package directories\n *\n * @returns Array of absolute paths to schema directories, starting with core schema\n */\nexport function getModuleSchemaPaths(): string[] {\n\tconst coreSchema = resolve(currentDirPath, './schema')\n\n\t// Load config using the SDK's pure config loader (no side effects)\n\tconst config = loadKuckitConfigSync()\n\tif (!config) {\n\t\t// Fall back to just core schema if no config found\n\t\treturn [coreSchema]\n\t}\n\n\tconst modulePaths = config.modules\n\t\t.filter((m: KuckitModuleConfig) => m.enabled !== false)\n\t\t.map((m: KuckitModuleConfig) => {\n\t\t\tconst packageRoot = resolvePackageRoot(m.package)\n\t\t\tif (!packageRoot) return null\n\n\t\t\tconst schemaDir = m.schemaDir ?? 'src/server/schema'\n\t\t\treturn resolve(packageRoot, schemaDir)\n\t\t})\n\t\t.filter((p): p is string => p !== null && existsSync(p))\n\n\treturn [coreSchema, ...modulePaths]\n}\n"],"mappings":";;;;;;;;;AAKA,IAAI,YAA4B,8BAAc,OAAO,KAAK,IAAI;AAI9D,MAAM,eAAe;CACpB;CACA;CACA;CACA;;;;AAID,SAAS,eAAe,MAAM,QAAQ,KAAK,EAAE;CAC5C,IAAI,MAAM;AACV,QAAO,QAAQA,UAAQ,IAAI,EAAE;AAC5B,OAAK,MAAM,QAAQ,cAAc;GAChC,MAAM,aAAaC,UAAQ,KAAK,KAAK;AACrC,OAAIC,aAAW,WAAW,CAAE,QAAO;;AAEpC,QAAMF,UAAQ,IAAI;;AAEnB,MAAK,MAAM,QAAQ,cAAc;EAChC,MAAM,aAAaC,UAAQ,KAAK,KAAK;AACrC,MAAIC,aAAW,WAAW,CAAE,QAAO;;AAEpC,QAAO;;;;;;AAwCR,SAAS,qBAAqB,MAAM,QAAQ,KAAK,EAAE;CAClD,MAAM,aAAa,eAAe,IAAI;AACtC,KAAI,CAAC,WAAY,QAAO;AACxB,KAAI;EACH,MAAM,EAAE,eAAe,UAAU,OAAO;EACxC,MAAM,SAAS,WAAW,KAAK,EAAE,gBAAgB,MAAM,CAAC,CAAC,WAAW;EACpE,MAAM,SAAS,OAAO,WAAW;AACjC,MAAI,CAAC,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,QAAQ,CAAE,QAAO;AACpF,SAAO;GACN,GAAG;GACH,aAAa;GACb;SACM;AACP,SAAO;;;;;;AC7ET,MAAM,iBAAiB,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;AAC9D,MAAM,UAAUC,gBAAc,OAAO,KAAK,IAAI;;;;;AAM9C,SAAS,kBAAiC;CACzC,IAAI,MAAM;AACV,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;AAC5B,MAAI,WAAW,QAAQ,KAAK,mBAAmB,CAAC,CAC/C,QAAO;EAER,MAAM,SAAS,QAAQ,IAAI;AAC3B,MAAI,WAAW,IAAK;AACpB,QAAM;;AAEP,QAAO;;;;;;AAOR,SAAS,uBAAuB,aAAqB,aAAoC;AAGxF,MAAK,MAAM,SAFW,CAAC,YAAY,OAAO,EAEP;EAClC,MAAM,SAAS,QAAQ,aAAa,MAAM;AAC1C,MAAI,CAAC,WAAW,OAAO,CAAE;AAEzB,MAAI;GACH,MAAM,UAAU,YAAY,QAAQ,EAAE,eAAe,MAAM,CAAC;AAC5D,QAAK,MAAM,SAAS,SAAS;AAC5B,QAAI,CAAC,MAAM,aAAa,CAAE;IAE1B,MAAM,cAAc,QAAQ,QAAQ,MAAM,MAAM,eAAe;AAC/D,QAAI,CAAC,WAAW,YAAY,CAAE;AAE9B,QAAI;AAEH,SADgB,KAAK,MAAM,QAAQ,KAAK,CAAC,aAAa,aAAa,QAAQ,CAAC,CAChE,SAAS,YACpB,QAAO,QAAQ,QAAQ,MAAM,KAAK;YAE5B;;UAIF;;AAIT,QAAO;;;;;;;;;AAUR,SAAS,mBAAmB,aAAoC;AAE/D,KAAI;AAEH,SAAO,QADiB,QAAQ,QAAQ,GAAG,YAAY,eAAe,CACvC;SACxB;AAEP,MAAI;GAEH,IAAI,MAAM,QADO,QAAQ,QAAQ,YAAY,CAClB;AAC3B,QAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;AAC5B,QAAI,WAAW,QAAQ,KAAK,eAAe,CAAC,CAC3C,QAAO;IAER,MAAM,SAAS,QAAQ,IAAI;AAC3B,QAAI,WAAW,IAAK;AACpB,UAAM;;UAEA;;CAMT,MAAM,cAAc,iBAAiB;AACrC,KAAI,aAAa;EAChB,MAAM,SAAS,uBAAuB,aAAa,YAAY;AAC/D,MAAI,OAAQ,QAAO;;AAGpB,QAAO;;;;;;;;;;;;;;AAeR,SAAgB,uBAAiC;CAChD,MAAM,aAAa,QAAQ,gBAAgB,WAAW;CAGtD,MAAM,SAAS,sBAAsB;AACrC,KAAI,CAAC,OAEJ,QAAO,CAAC,WAAW;AAcpB,QAAO,CAAC,YAAY,GAXA,OAAO,QACzB,QAAQ,MAA0B,EAAE,YAAY,MAAM,CACtD,KAAK,MAA0B;EAC/B,MAAM,cAAc,mBAAmB,EAAE,QAAQ;AACjD,MAAI,CAAC,YAAa,QAAO;AAGzB,SAAO,QAAQ,aADG,EAAE,aAAa,oBACK;GACrC,CACD,QAAQ,MAAmB,MAAM,QAAQ,WAAW,EAAE,CAAC,CAEtB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuckit/db",
3
- "version": "2.0.7",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,6 +23,10 @@
23
23
  "./*": {
24
24
  "types": "./dist/*.d.ts",
25
25
  "default": "./dist/*.js"
26
+ },
27
+ "./schema-discovery": {
28
+ "types": "./dist/schema-discovery.d.ts",
29
+ "default": "./dist/schema-discovery.js"
26
30
  }
27
31
  },
28
32
  "scripts": {