drizzle-kit 0.19.1 → 0.19.2-0fc6b10
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/index.cjs +6225 -612
- package/index.d.ts +2 -9
- package/loader.mjs +6 -6
- package/package.json +3 -3
- package/utils.js +10814 -10800
package/index.d.ts
CHANGED
|
@@ -34,10 +34,7 @@ export type Config = {
|
|
|
34
34
|
password?: string;
|
|
35
35
|
database: string;
|
|
36
36
|
ssl?: boolean;
|
|
37
|
-
}
|
|
38
|
-
} | {
|
|
39
|
-
driver: "pg";
|
|
40
|
-
dbCredentials: {
|
|
37
|
+
} | {
|
|
41
38
|
connectionString: string;
|
|
42
39
|
};
|
|
43
40
|
} | {
|
|
@@ -48,11 +45,7 @@ export type Config = {
|
|
|
48
45
|
user?: string;
|
|
49
46
|
password?: string;
|
|
50
47
|
database: string;
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
} | {
|
|
54
|
-
driver: "mysql2";
|
|
55
|
-
dbCredentials: {
|
|
48
|
+
} | {
|
|
56
49
|
connectionString: string;
|
|
57
50
|
};
|
|
58
51
|
} | {});
|
package/loader.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import * as path from "path";
|
|
|
3
3
|
import { readFileSync } from "fs";
|
|
4
4
|
|
|
5
5
|
export function resolve(specifier, context, nextResolve) {
|
|
6
|
-
if (specifier.startsWith("
|
|
6
|
+
if (specifier.startsWith("__drizzle__")) {
|
|
7
7
|
if (!specifier.endsWith(".ts")) {
|
|
8
|
-
const url = specifier.slice("
|
|
8
|
+
const url = specifier.slice("__drizzle__".length).toString();
|
|
9
9
|
return nextResolve(url);
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -16,8 +16,8 @@ export function resolve(specifier, context, nextResolve) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const { parentURL: url } = context;
|
|
19
|
-
const parentURL = url?.startsWith("
|
|
20
|
-
? new URL(`file://${path.resolve(url.slice("
|
|
19
|
+
const parentURL = url?.startsWith("__drizzle__")
|
|
20
|
+
? new URL(`file://${path.resolve(url.slice("__drizzle__".length))}`)
|
|
21
21
|
: url;
|
|
22
22
|
|
|
23
23
|
// Let Node.js handle all other specifiers.
|
|
@@ -25,9 +25,9 @@ export function resolve(specifier, context, nextResolve) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export async function load(url, context, defaultLoad) {
|
|
28
|
-
if (url.startsWith("
|
|
28
|
+
if (url.startsWith("__drizzle__")) {
|
|
29
29
|
|
|
30
|
-
const path = url.slice("
|
|
30
|
+
const path = url.slice("__drizzle__".length).trim();
|
|
31
31
|
const file = readFileSync(path, "utf-8");
|
|
32
32
|
if (path.endsWith(".ts") || path.endsWith(".mts")) {
|
|
33
33
|
const source = esbuild.transformSync(file, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-kit",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2-0fc6b10",
|
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
|
5
5
|
"author": "Drizzle Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,6 +55,8 @@
|
|
|
55
55
|
"camelcase": "^7.0.1",
|
|
56
56
|
"chalk": "^5.2.0",
|
|
57
57
|
"commander": "^9.4.1",
|
|
58
|
+
"esbuild": "^0.18.6",
|
|
59
|
+
"esbuild-register": "^3.4.2",
|
|
58
60
|
"glob": "^8.1.0",
|
|
59
61
|
"hanji": "^0.0.5",
|
|
60
62
|
"json-diff": "0.9.0",
|
|
@@ -76,8 +78,6 @@
|
|
|
76
78
|
"dockerode": "^3.3.4",
|
|
77
79
|
"dotenv": "^16.0.3",
|
|
78
80
|
"drizzle-orm": "0.27.0-56b9edc",
|
|
79
|
-
"esbuild": "^0.17.19",
|
|
80
|
-
"esbuild-register": "^3.4.2",
|
|
81
81
|
"eslint": "^8.29.0",
|
|
82
82
|
"eslint-config-prettier": "^8.5.0",
|
|
83
83
|
"eslint-plugin-prettier": "^4.2.1",
|