drizzle-kit 0.20.0-f39d8bc → 0.20.1-56e7be6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/@types/utils.d.ts +12 -0
  2. package/{index.cjs → bin.cjs} +28995 -37098
  3. package/cli/commands/migrate.d.ts +260 -0
  4. package/cli/commands/mysqlUp.d.ts +4 -0
  5. package/cli/commands/pgConnect.d.ts +5 -0
  6. package/cli/commands/pgIntrospect.d.ts +116 -0
  7. package/cli/commands/pgPushUtils.d.ts +14 -0
  8. package/cli/commands/pgUp.d.ts +4 -0
  9. package/cli/commands/sqliteIntrospect.d.ts +102 -0
  10. package/cli/commands/sqliteUtils.d.ts +162 -0
  11. package/cli/commands/upFolders.d.ts +27 -0
  12. package/cli/commands/utils.d.ts +265 -0
  13. package/cli/selector-ui.d.ts +13 -0
  14. package/cli/utils.d.ts +11 -0
  15. package/cli/validations/common.d.ts +13 -0
  16. package/cli/validations/mysql.d.ts +365 -0
  17. package/cli/validations/outputs.d.ts +40 -0
  18. package/cli/validations/pg.d.ts +438 -0
  19. package/cli/validations/sqlite.d.ts +220 -0
  20. package/cli/validations/studio.d.ts +593 -0
  21. package/cli/views.d.ts +61 -0
  22. package/drivers/index.d.ts +25 -0
  23. package/global.d.ts +3 -0
  24. package/index.d.mts +105 -0
  25. package/index.d.ts +48 -1
  26. package/index.js +31 -0
  27. package/index.mjs +7 -0
  28. package/introspect.d.ts +4 -0
  29. package/jsonDiffer.d.ts +76 -0
  30. package/jsonStatements.d.ts +349 -0
  31. package/migrationPreparator.d.ts +35 -0
  32. package/orm-extenstions/d1-driver/driver.d.ts +8 -0
  33. package/orm-extenstions/d1-driver/session.d.ts +51 -0
  34. package/orm-extenstions/d1-driver/wrangler-client.d.ts +3 -0
  35. package/package.json +26 -9
  36. package/schemaValidator.d.ts +1306 -0
  37. package/serializer/index.d.ts +9 -0
  38. package/serializer/mysqlImports.d.ts +6 -0
  39. package/serializer/mysqlSchema.d.ts +3833 -0
  40. package/serializer/mysqlSerializer.d.ts +7 -0
  41. package/serializer/pgImports.d.ts +11 -0
  42. package/serializer/pgSchema.d.ts +4244 -0
  43. package/serializer/pgSerializer.d.ts +9 -0
  44. package/serializer/sqliteImports.d.ts +5 -0
  45. package/serializer/sqliteSchema.d.ts +3227 -0
  46. package/serializer/sqliteSerializer.d.ts +8 -0
  47. package/serializer/studioUtils.d.ts +53 -0
  48. package/snapshotsDiffer.d.ts +2660 -0
  49. package/sqlgenerator.d.ts +33 -0
  50. package/sqlite-introspect.d.ts +5 -0
  51. package/utils/words.d.ts +7 -0
  52. package/utils-studio.d.ts +5 -0
  53. package/utils-studio.js +3367 -0
  54. package/utils.d.ts +211 -0
  55. package/utils.js +52586 -11755
  56. package/loader.mjs +0 -57
package/loader.mjs DELETED
@@ -1,57 +0,0 @@
1
- import esbuild from "esbuild";
2
- import * as path from "path";
3
- import { readFileSync } from "fs";
4
-
5
- const parse = (it) => {
6
- if (!it) return { drizzle: false };
7
-
8
- if (it.endsWith("__drizzle__")) {
9
- const offset = it.startsWith("file://") ? "file://".length : 0;
10
- const clean = it.slice(offset, -"__drizzle__".length);
11
- return { drizzle: true, clean, original: it };
12
- }
13
- return { drizzle: false, clean: it };
14
- };
15
-
16
- export function resolve(specifier, context, nextResolve) {
17
- const { drizzle, clean } = parse(specifier);
18
- if (drizzle && !clean.endsWith(".ts") && !clean.endsWith(".mts")) {
19
- return nextResolve(clean);
20
- }
21
-
22
- if (drizzle) {
23
- return {
24
- shortCircuit: true,
25
- url: `file://${specifier}`,
26
- };
27
- }
28
-
29
- const parsedParent = parse(context.parentURL);
30
- const parentURL = parsedParent.drizzle
31
- ? new URL(`file://${path.resolve(parsedParent.clean)}`)
32
- : context.parentURL;
33
-
34
- // Let Node.js handle all other specifiers.
35
- return nextResolve(specifier, { ...context, parentURL });
36
- }
37
-
38
- export async function load(url, context, defaultLoad) {
39
- const { drizzle, clean } = parse(url);
40
- if (drizzle) {
41
- const file = readFileSync(clean, "utf-8");
42
- if (clean.endsWith(".ts") || clean.endsWith(".mts")) {
43
- const source = esbuild.transformSync(file, {
44
- loader: "ts",
45
- format: "esm",
46
- });
47
- return {
48
- format: "module",
49
- shortCircuit: true,
50
- source: source.code,
51
- };
52
- }
53
- }
54
-
55
- // let Node.js handle all other URLs
56
- return defaultLoad(url, context, defaultLoad);
57
- }