@drzl/analyzer 1.21.4 → 1.21.5
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/dist/index.cjs +16 -1
- package/dist/index.js +16 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -470,6 +470,17 @@ function unknownColumnHint(reason) {
|
|
|
470
470
|
}
|
|
471
471
|
return "Open an issue naming the column type so it can be modelled, or declare it with .$type<T>() and turn on typedColumns.";
|
|
472
472
|
}
|
|
473
|
+
async function jitiCacheDir(fs, path) {
|
|
474
|
+
try {
|
|
475
|
+
const modules = path.join(process.cwd(), "node_modules");
|
|
476
|
+
await fs.stat(modules);
|
|
477
|
+
const dir = path.join(modules, ".cache", "jiti");
|
|
478
|
+
await fs.mkdir(dir, { recursive: true });
|
|
479
|
+
return dir;
|
|
480
|
+
} catch {
|
|
481
|
+
return void 0;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
473
484
|
var _SchemaAnalyzer = class _SchemaAnalyzer {
|
|
474
485
|
/**
|
|
475
486
|
* One path or several. The plural exists for drizzle-kit interop: kit's `schema` key names
|
|
@@ -1216,7 +1227,11 @@ var _SchemaAnalyzer = class _SchemaAnalyzer {
|
|
|
1216
1227
|
return { dialect: "unknown", tables: [], enums: [], relations: [], issues };
|
|
1217
1228
|
}
|
|
1218
1229
|
const { default: jiti } = await import("jiti");
|
|
1219
|
-
const
|
|
1230
|
+
const cacheDir = await jitiCacheDir(fs, path);
|
|
1231
|
+
const jit = jiti(import_meta.url, {
|
|
1232
|
+
moduleCache: false,
|
|
1233
|
+
...cacheDir ? { fsCache: cacheDir } : {}
|
|
1234
|
+
});
|
|
1220
1235
|
const exportsObj = {};
|
|
1221
1236
|
const exportOrigin = /* @__PURE__ */ new Map();
|
|
1222
1237
|
const duplicateDisagreement = (a, b) => {
|
package/dist/index.js
CHANGED
|
@@ -427,6 +427,17 @@ function unknownColumnHint(reason) {
|
|
|
427
427
|
}
|
|
428
428
|
return "Open an issue naming the column type so it can be modelled, or declare it with .$type<T>() and turn on typedColumns.";
|
|
429
429
|
}
|
|
430
|
+
async function jitiCacheDir(fs, path) {
|
|
431
|
+
try {
|
|
432
|
+
const modules = path.join(process.cwd(), "node_modules");
|
|
433
|
+
await fs.stat(modules);
|
|
434
|
+
const dir = path.join(modules, ".cache", "jiti");
|
|
435
|
+
await fs.mkdir(dir, { recursive: true });
|
|
436
|
+
return dir;
|
|
437
|
+
} catch {
|
|
438
|
+
return void 0;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
430
441
|
var _SchemaAnalyzer = class _SchemaAnalyzer {
|
|
431
442
|
/**
|
|
432
443
|
* One path or several. The plural exists for drizzle-kit interop: kit's `schema` key names
|
|
@@ -1173,7 +1184,11 @@ var _SchemaAnalyzer = class _SchemaAnalyzer {
|
|
|
1173
1184
|
return { dialect: "unknown", tables: [], enums: [], relations: [], issues };
|
|
1174
1185
|
}
|
|
1175
1186
|
const { default: jiti } = await import("jiti");
|
|
1176
|
-
const
|
|
1187
|
+
const cacheDir = await jitiCacheDir(fs, path);
|
|
1188
|
+
const jit = jiti(import.meta.url, {
|
|
1189
|
+
moduleCache: false,
|
|
1190
|
+
...cacheDir ? { fsCache: cacheDir } : {}
|
|
1191
|
+
});
|
|
1177
1192
|
const exportsObj = {};
|
|
1178
1193
|
const exportOrigin = /* @__PURE__ */ new Map();
|
|
1179
1194
|
const duplicateDisagreement = (a, b) => {
|