@prisma/internals 7.5.0-dev.9 → 7.6.0-dev.1
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/{chunk-KFBTC6Z3.js → chunk-23CMYKWL.js} +6 -13
- package/dist/chunk-3TFDMTMW.js +15514 -0
- package/dist/{chunk-GDFK3VMX.js → chunk-52QP6QWI.js} +7 -14
- package/dist/{chunk-SBDP6A4I.js → chunk-6YLZXNMI.js} +8 -8
- package/dist/{chunk-YU77OAWM.js → chunk-7BLAASDO.js} +5 -5
- package/dist/{chunk-QEESVUH5.js → chunk-AIURXCIY.js} +8 -8
- package/dist/{chunk-FTUIGG2R.js → chunk-BL6IA7HX.js} +5 -5
- package/dist/{chunk-4FCJOJEL.js → chunk-EDMQEZXP.js} +8 -8
- package/dist/{chunk-NXV7XVET.js → chunk-EONFSFBN.js} +5 -5
- package/dist/{chunk-AZBZEBD7.js → chunk-F22QIJ34.js} +15 -15
- package/dist/{chunk-MQCKKDYI.js → chunk-GTOF7LIA.js} +8 -8
- package/dist/{chunk-BEW6XKKG.js → chunk-HHY5VW5M.js} +5 -5
- package/dist/{chunk-4LJJXSNG.js → chunk-HOOPOJXZ.js} +5 -5
- package/dist/{chunk-AWSCUK5N.js → chunk-HXMDA5QL.js} +5 -5
- package/dist/{chunk-BQSKA543.js → chunk-K6AUSNAZ.js} +15 -15
- package/dist/{chunk-ILP4KHUL.js → chunk-NUZCFAFN.js} +7 -7
- package/dist/{chunk-7V4QEA2M.js → chunk-PHSZERBB.js} +5 -5
- package/dist/{chunk-NW5RSTCY.js → chunk-WATTAWYS.js} +8 -8
- package/dist/{chunk-UW3XPODP.js → chunk-WQZ5YH6L.js} +5 -5
- package/dist/{chunk-U7OBDIOX.js → chunk-WS75TKHZ.js} +8 -8
- package/dist/{chunk-H4AIGR4D.js → chunk-YOT64SO3.js} +7 -7
- package/dist/cli/checkUnsupportedDataProxy.js +12 -12
- package/dist/cli/schemaContext.js +13 -13
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +11 -11
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +18 -18
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.d.ts +1 -1
- package/dist/get-generators/getGenerators.js +14 -14
- package/dist/index.js +27 -27
- package/dist/magic-string.es-B2CP4FDB.js +1324 -0
- package/dist/utils/__tests__/isCi.test.js +16 -15
- package/dist/utils/__tests__/isInteractive.test.js +14 -13
- package/dist/utils/callOnce.test.js +17 -16
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/max.test.js +11 -10
- package/dist/utils/path.test.js +30 -29
- package/dist/utils/prismaPostgres.test.js +23 -22
- package/dist/wasm.js +5 -5
- package/package.json +14 -21
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_H4NI2RIK = require("../../chunk-H4NI2RIK.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../../chunk-4VNS5WPM.js");
|
|
4
5
|
var originalEnv = { ...process.env };
|
|
@@ -17,41 +18,41 @@ function restoreEnv() {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
describe("isCi", () => {
|
|
21
|
-
beforeEach(() => {
|
|
21
|
+
(0, import_chunk_3TFDMTMW.describe)("isCi", () => {
|
|
22
|
+
(0, import_chunk_3TFDMTMW.beforeEach)(() => {
|
|
22
23
|
restoreEnv();
|
|
23
24
|
process.stdin.isTTY = originalStdinisTTY;
|
|
24
25
|
});
|
|
25
|
-
afterAll(() => {
|
|
26
|
+
(0, import_chunk_3TFDMTMW.afterAll)(() => {
|
|
26
27
|
restoreEnv();
|
|
27
28
|
process.stdin.isTTY = originalStdinisTTY;
|
|
28
29
|
});
|
|
29
|
-
describe("in non TTY environment", () => {
|
|
30
|
-
beforeEach(() => {
|
|
30
|
+
(0, import_chunk_3TFDMTMW.describe)("in non TTY environment", () => {
|
|
31
|
+
(0, import_chunk_3TFDMTMW.beforeEach)(() => {
|
|
31
32
|
delete process.env.GITHUB_ACTIONS;
|
|
32
33
|
delete process.env.CI;
|
|
33
34
|
process.stdin.isTTY = false;
|
|
34
35
|
});
|
|
35
|
-
test("with undefined env vars, isCi should be false", () => {
|
|
36
|
-
|
|
36
|
+
(0, import_chunk_3TFDMTMW.test)("with undefined env vars, isCi should be false", () => {
|
|
37
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_H4NI2RIK.isCi)()).toBe(false);
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
|
-
describe("in TTY environment", () => {
|
|
40
|
-
beforeEach(() => {
|
|
40
|
+
(0, import_chunk_3TFDMTMW.describe)("in TTY environment", () => {
|
|
41
|
+
(0, import_chunk_3TFDMTMW.beforeEach)(() => {
|
|
41
42
|
delete process.env.GITHUB_ACTIONS;
|
|
42
43
|
delete process.env.CI;
|
|
43
44
|
process.stdin.isTTY = true;
|
|
44
45
|
});
|
|
45
|
-
test("with CI env var, isCi should be true", () => {
|
|
46
|
+
(0, import_chunk_3TFDMTMW.test)("with CI env var, isCi should be true", () => {
|
|
46
47
|
process.env.CI = "true";
|
|
47
|
-
|
|
48
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_H4NI2RIK.isCi)()).toBe(true);
|
|
48
49
|
});
|
|
49
|
-
test("with GitHub Actions env var, isCi should be true", () => {
|
|
50
|
+
(0, import_chunk_3TFDMTMW.test)("with GitHub Actions env var, isCi should be true", () => {
|
|
50
51
|
process.env.GITHUB_ACTIONS = "true";
|
|
51
|
-
|
|
52
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_H4NI2RIK.isCi)()).toBe(true);
|
|
52
53
|
});
|
|
53
|
-
test("with undefined env vars, isCi should be false", () => {
|
|
54
|
-
|
|
54
|
+
(0, import_chunk_3TFDMTMW.test)("with undefined env vars, isCi should be false", () => {
|
|
55
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_H4NI2RIK.isCi)()).toBe(false);
|
|
55
56
|
});
|
|
56
57
|
});
|
|
57
58
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_ICFLO5JW = require("../../chunk-ICFLO5JW.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../../chunk-4VNS5WPM.js");
|
|
4
5
|
var originalEnv = { ...process.env };
|
|
@@ -16,31 +17,31 @@ function restoreEnv() {
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
describe("isInteractive", () => {
|
|
20
|
-
beforeEach(() => {
|
|
20
|
+
(0, import_chunk_3TFDMTMW.describe)("isInteractive", () => {
|
|
21
|
+
(0, import_chunk_3TFDMTMW.beforeEach)(() => {
|
|
21
22
|
restoreEnv();
|
|
22
23
|
});
|
|
23
|
-
afterAll(() => {
|
|
24
|
+
(0, import_chunk_3TFDMTMW.afterAll)(() => {
|
|
24
25
|
restoreEnv();
|
|
25
26
|
});
|
|
26
|
-
describe("in non TTY environment", () => {
|
|
27
|
+
(0, import_chunk_3TFDMTMW.describe)("in non TTY environment", () => {
|
|
27
28
|
const mockedValue = { isTTY: false };
|
|
28
|
-
test("isInteractive should be false", () => {
|
|
29
|
-
|
|
29
|
+
(0, import_chunk_3TFDMTMW.test)("isInteractive should be false", () => {
|
|
30
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_ICFLO5JW.isInteractive)({ stream: mockedValue })).toBe(false);
|
|
30
31
|
});
|
|
31
|
-
test("isInteractive should be false if TERM = dumb", () => {
|
|
32
|
+
(0, import_chunk_3TFDMTMW.test)("isInteractive should be false if TERM = dumb", () => {
|
|
32
33
|
process.env.TERM = "dumb";
|
|
33
|
-
|
|
34
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_ICFLO5JW.isInteractive)({ stream: mockedValue })).toBe(false);
|
|
34
35
|
});
|
|
35
36
|
});
|
|
36
|
-
describe("in TTY environment", () => {
|
|
37
|
+
(0, import_chunk_3TFDMTMW.describe)("in TTY environment", () => {
|
|
37
38
|
const mockedValue = { isTTY: true };
|
|
38
|
-
test("isInteractive should be true", () => {
|
|
39
|
-
|
|
39
|
+
(0, import_chunk_3TFDMTMW.test)("isInteractive should be true", () => {
|
|
40
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_ICFLO5JW.isInteractive)({ stream: mockedValue })).toBe(true);
|
|
40
41
|
});
|
|
41
|
-
test("isInteractive should be false if TERM = dumb", () => {
|
|
42
|
+
(0, import_chunk_3TFDMTMW.test)("isInteractive should be false if TERM = dumb", () => {
|
|
42
43
|
process.env.TERM = "dumb";
|
|
43
|
-
|
|
44
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_ICFLO5JW.isInteractive)({ stream: mockedValue })).toBe(false);
|
|
44
45
|
});
|
|
45
46
|
});
|
|
46
47
|
});
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_NIWBAJZV = require("../chunk-NIWBAJZV.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
|
4
|
-
test("returns the result correctly", async () => {
|
|
5
|
-
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)(
|
|
6
|
-
await
|
|
5
|
+
(0, import_chunk_3TFDMTMW.test)("returns the result correctly", async () => {
|
|
6
|
+
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)(import_chunk_3TFDMTMW.vi.fn().mockResolvedValue("hello"));
|
|
7
|
+
await (0, import_chunk_3TFDMTMW.globalExpect)(wrapper()).resolves.toBe("hello");
|
|
7
8
|
});
|
|
8
|
-
test("forwards the arguments correctly", async () => {
|
|
9
|
+
(0, import_chunk_3TFDMTMW.test)("forwards the arguments correctly", async () => {
|
|
9
10
|
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)((x) => Promise.resolve(x + 1));
|
|
10
|
-
await
|
|
11
|
+
await (0, import_chunk_3TFDMTMW.globalExpect)(wrapper(2)).resolves.toBe(3);
|
|
11
12
|
});
|
|
12
|
-
test("\u0441alls wrapped function only once before promise resolves", async () => {
|
|
13
|
-
const wrapped =
|
|
13
|
+
(0, import_chunk_3TFDMTMW.test)("\u0441alls wrapped function only once before promise resolves", async () => {
|
|
14
|
+
const wrapped = import_chunk_3TFDMTMW.vi.fn().mockResolvedValue("hello");
|
|
14
15
|
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)(wrapped);
|
|
15
16
|
void wrapper();
|
|
16
17
|
void wrapper();
|
|
17
18
|
await wrapper();
|
|
18
|
-
|
|
19
|
+
(0, import_chunk_3TFDMTMW.globalExpect)(wrapped).toHaveBeenCalledTimes(1);
|
|
19
20
|
});
|
|
20
|
-
test("caches the result when it succeeds", async () => {
|
|
21
|
-
const wrapped =
|
|
21
|
+
(0, import_chunk_3TFDMTMW.test)("caches the result when it succeeds", async () => {
|
|
22
|
+
const wrapped = import_chunk_3TFDMTMW.vi.fn().mockResolvedValue("hello");
|
|
22
23
|
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)(wrapped);
|
|
23
24
|
await wrapper();
|
|
24
25
|
await wrapper();
|
|
25
26
|
const result = await wrapper();
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
(0, import_chunk_3TFDMTMW.globalExpect)(wrapped).toHaveBeenCalledTimes(1);
|
|
28
|
+
(0, import_chunk_3TFDMTMW.globalExpect)(result).toBe("hello");
|
|
28
29
|
});
|
|
29
|
-
test("does not cache the result when it fails", async () => {
|
|
30
|
-
const wrapped =
|
|
30
|
+
(0, import_chunk_3TFDMTMW.test)("does not cache the result when it fails", async () => {
|
|
31
|
+
const wrapped = import_chunk_3TFDMTMW.vi.fn().mockRejectedValue(new Error("hello"));
|
|
31
32
|
const wrapper = (0, import_chunk_NIWBAJZV.callOnceOnSuccess)(wrapped);
|
|
32
33
|
await Promise.allSettled([wrapper(), wrapper()]);
|
|
33
|
-
await
|
|
34
|
-
|
|
34
|
+
await (0, import_chunk_3TFDMTMW.globalExpect)(wrapper()).rejects.toThrow("hello");
|
|
35
|
+
(0, import_chunk_3TFDMTMW.globalExpect)(wrapped).toHaveBeenCalledTimes(2);
|
|
35
36
|
});
|
|
@@ -18,9 +18,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var getVersionFromPackageJson_exports = {};
|
|
20
20
|
__export(getVersionFromPackageJson_exports, {
|
|
21
|
-
version: () =>
|
|
21
|
+
version: () => import_chunk_HOOPOJXZ.version
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(getVersionFromPackageJson_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_HOOPOJXZ = require("../chunk-HOOPOJXZ.js");
|
|
25
|
+
var import_chunk_52QP6QWI = require("../chunk-52QP6QWI.js");
|
|
26
26
|
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
package/dist/utils/max.test.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_CGFNDGGI = require("../chunk-CGFNDGGI.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
|
4
|
-
describe("maxWithComparator", () => {
|
|
5
|
-
test("empty array", () => {
|
|
6
|
-
|
|
5
|
+
(0, import_chunk_3TFDMTMW.describe)("maxWithComparator", () => {
|
|
6
|
+
(0, import_chunk_3TFDMTMW.test)("empty array", () => {
|
|
7
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_CGFNDGGI.maxWithComparator)([], () => 0)).toBe(void 0);
|
|
7
8
|
});
|
|
8
|
-
test("with items", () => {
|
|
9
|
+
(0, import_chunk_3TFDMTMW.test)("with items", () => {
|
|
9
10
|
const items = [{ count: 1 }, { count: 10 }, { count: 5 }];
|
|
10
|
-
|
|
11
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_CGFNDGGI.maxWithComparator)(items, (a, b) => a.count - b.count)).toBe(items[1]);
|
|
11
12
|
});
|
|
12
13
|
});
|
|
13
|
-
describe("maxBy", () => {
|
|
14
|
-
test("empty array", () => {
|
|
15
|
-
|
|
14
|
+
(0, import_chunk_3TFDMTMW.describe)("maxBy", () => {
|
|
15
|
+
(0, import_chunk_3TFDMTMW.test)("empty array", () => {
|
|
16
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_CGFNDGGI.maxBy)([], () => 1)).toBe(void 0);
|
|
16
17
|
});
|
|
17
|
-
test("with items", () => {
|
|
18
|
+
(0, import_chunk_3TFDMTMW.test)("with items", () => {
|
|
18
19
|
const items = [{ count: 1 }, { count: 10 }, { count: 5 }];
|
|
19
|
-
|
|
20
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_CGFNDGGI.maxBy)(items, (item) => item.count)).toBe(items[1]);
|
|
20
21
|
});
|
|
21
22
|
});
|
package/dist/utils/path.test.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_J77ZIDXB = require("../chunk-J77ZIDXB.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
|
4
|
-
var testIf = (condition) => condition ? test : test.skip;
|
|
5
|
-
var describeIf = (condition) => condition ? describe : describe.skip;
|
|
6
|
-
describe("pathToPosix", () => {
|
|
7
|
-
test("forward slashes", () => {
|
|
8
|
-
|
|
5
|
+
var testIf = (condition) => condition ? import_chunk_3TFDMTMW.test : import_chunk_3TFDMTMW.test.skip;
|
|
6
|
+
var describeIf = (condition) => condition ? import_chunk_3TFDMTMW.describe : import_chunk_3TFDMTMW.describe.skip;
|
|
7
|
+
(0, import_chunk_3TFDMTMW.describe)("pathToPosix", () => {
|
|
8
|
+
(0, import_chunk_3TFDMTMW.test)("forward slashes", () => {
|
|
9
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.pathToPosix)("a/b/c")).toBe("a/b/c");
|
|
9
10
|
});
|
|
10
11
|
testIf(process.platform === "win32")("backslashes on windows", () => {
|
|
11
|
-
|
|
12
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.pathToPosix)("a\\b\\c")).toBe("a/b/c");
|
|
12
13
|
});
|
|
13
14
|
testIf(process.platform !== "win32")("backslashes on posix", () => {
|
|
14
|
-
|
|
15
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.pathToPosix)("a\\b\\c")).toBe("a\\b\\c");
|
|
15
16
|
});
|
|
16
17
|
});
|
|
17
|
-
describe("longestCommonPathPrefix", () => {
|
|
18
|
+
(0, import_chunk_3TFDMTMW.describe)("longestCommonPathPrefix", () => {
|
|
18
19
|
describeIf(process.platform !== "win32")("posix", () => {
|
|
19
|
-
test("common ancestor directory", () => {
|
|
20
|
-
|
|
20
|
+
(0, import_chunk_3TFDMTMW.test)("common ancestor directory", () => {
|
|
21
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("/usr/lib/libprisma.so", "/usr/bin/prisma")).toBe("/usr");
|
|
21
22
|
});
|
|
22
|
-
test("common ancestor is root", () => {
|
|
23
|
-
|
|
23
|
+
(0, import_chunk_3TFDMTMW.test)("common ancestor is root", () => {
|
|
24
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("/usr/bin/prisma", "/home/prisma")).toBe("/");
|
|
24
25
|
});
|
|
25
|
-
test("common ancestor is the path itself", () => {
|
|
26
|
-
|
|
26
|
+
(0, import_chunk_3TFDMTMW.test)("common ancestor is the path itself", () => {
|
|
27
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("/home/prisma", "/home/prisma")).toBe("/home/prisma");
|
|
27
28
|
});
|
|
28
|
-
test("substring is not treated as a path component", () => {
|
|
29
|
-
|
|
29
|
+
(0, import_chunk_3TFDMTMW.test)("substring is not treated as a path component", () => {
|
|
30
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("/prisma", "/pri")).toBe("/");
|
|
30
31
|
});
|
|
31
32
|
});
|
|
32
33
|
describeIf(process.platform === "win32")("windows", () => {
|
|
33
|
-
test("common ancestor directory", () => {
|
|
34
|
-
|
|
34
|
+
(0, import_chunk_3TFDMTMW.test)("common ancestor directory", () => {
|
|
35
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("C:\\Common\\A\\Prisma", "C:\\Common\\B\\Prisma")).toBe("C:\\Common");
|
|
35
36
|
});
|
|
36
|
-
test("common ancestor is disk", () => {
|
|
37
|
-
|
|
37
|
+
(0, import_chunk_3TFDMTMW.test)("common ancestor is disk", () => {
|
|
38
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("C:\\A\\Prisma", "C:\\B\\Prisma")).toBe("C:\\");
|
|
38
39
|
});
|
|
39
|
-
test("substring is not treated as a path component", () => {
|
|
40
|
-
|
|
40
|
+
(0, import_chunk_3TFDMTMW.test)("substring is not treated as a path component", () => {
|
|
41
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("C:\\Prisma", "C:\\Pri")).toBe("C:\\");
|
|
41
42
|
});
|
|
42
|
-
test("namespaced path works", () => {
|
|
43
|
-
|
|
43
|
+
(0, import_chunk_3TFDMTMW.test)("namespaced path works", () => {
|
|
44
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("C:\\Common\\A\\Prisma", "\\\\?\\C:\\Common\\B\\Prisma")).toBe("\\\\?\\C:\\Common");
|
|
44
45
|
});
|
|
45
|
-
test("different disks", () => {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
(0, import_chunk_3TFDMTMW.test)("different disks", () => {
|
|
47
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("C:\\Prisma", "D:\\Prisma")).toBeUndefined();
|
|
48
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("\\\\?\\C:\\Prisma", "\\\\?\\D:\\Prisma")).toBeUndefined();
|
|
48
49
|
});
|
|
49
|
-
test("different namespaces", () => {
|
|
50
|
-
|
|
50
|
+
(0, import_chunk_3TFDMTMW.test)("different namespaces", () => {
|
|
51
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_J77ZIDXB.longestCommonPathPrefix)("\\\\?\\C:\\Prisma", "\\\\.\\COM1")).toBeUndefined();
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
54
|
});
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var import_chunk_3TFDMTMW = require("../chunk-3TFDMTMW.js");
|
|
2
3
|
var import_chunk_LPNBWFQ3 = require("../chunk-LPNBWFQ3.js");
|
|
3
4
|
var import_chunk_4VNS5WPM = require("../chunk-4VNS5WPM.js");
|
|
4
|
-
describe("isPrismaPostgres", () => {
|
|
5
|
-
test("returns false on invalid or non Prisma Postgres protocols", () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
(0, import_chunk_3TFDMTMW.describe)("isPrismaPostgres", () => {
|
|
6
|
+
(0, import_chunk_3TFDMTMW.test)("returns false on invalid or non Prisma Postgres protocols", () => {
|
|
7
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)()).toBe(false);
|
|
8
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("")).toBe(false);
|
|
9
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("mysql://database.url/test")).toBe(false);
|
|
10
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("prisma://database.url/test")).toBe(false);
|
|
10
11
|
});
|
|
11
|
-
test("returns true on valid Prisma Postgres protocols", () => {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
(0, import_chunk_3TFDMTMW.test)("returns true on valid Prisma Postgres protocols", () => {
|
|
13
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("prisma+postgres://database.url/test")).toBe(true);
|
|
14
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)(`${import_chunk_LPNBWFQ3.PRISMA_POSTGRES_PROTOCOL}//database.url/test`)).toBe(true);
|
|
14
15
|
});
|
|
15
16
|
});
|
|
16
|
-
describe("isPrismaPostgresDev", () => {
|
|
17
|
-
test("returns false on invalid or non Prisma Postgres protocols", () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
(0, import_chunk_3TFDMTMW.describe)("isPrismaPostgresDev", () => {
|
|
18
|
+
(0, import_chunk_3TFDMTMW.test)("returns false on invalid or non Prisma Postgres protocols", () => {
|
|
19
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)()).toBe(false);
|
|
20
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("")).toBe(false);
|
|
21
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("mysql://database.url/test")).toBe(false);
|
|
22
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgres)("prisma://database.url/test")).toBe(false);
|
|
22
23
|
});
|
|
23
|
-
test("returns false on valid Prisma Postgres protocols with non localhost host", () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
(0, import_chunk_3TFDMTMW.test)("returns false on valid Prisma Postgres protocols with non localhost host", () => {
|
|
25
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgresDev)("prisma+postgres://database.url/test")).toBe(false);
|
|
26
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgresDev)(`${import_chunk_LPNBWFQ3.PRISMA_POSTGRES_PROTOCOL}//database.url/test`)).toBe(false);
|
|
27
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgresDev)("prisma+postgres://127.0.0.2:5432/test")).toBe(false);
|
|
27
28
|
});
|
|
28
|
-
test("returns true on valid Prisma Postgres protocols with localhost host", () => {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
(0, import_chunk_3TFDMTMW.test)("returns true on valid Prisma Postgres protocols with localhost host", () => {
|
|
30
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgresDev)("prisma+postgres://localhost:5432/test")).toBe(true);
|
|
31
|
+
(0, import_chunk_3TFDMTMW.globalExpect)((0, import_chunk_LPNBWFQ3.isPrismaPostgresDev)("prisma+postgres://127.0.0.1:5432/test")).toBe(true);
|
|
31
32
|
});
|
|
32
33
|
});
|
package/dist/wasm.js
CHANGED
|
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var wasm_exports = {};
|
|
20
20
|
__export(wasm_exports, {
|
|
21
|
-
prismaSchemaWasm: () =>
|
|
22
|
-
prismaSchemaWasmVersion: () =>
|
|
23
|
-
schemaEngineWasmVersion: () =>
|
|
21
|
+
prismaSchemaWasm: () => import_chunk_HHY5VW5M.prismaSchemaWasm,
|
|
22
|
+
prismaSchemaWasmVersion: () => import_chunk_HHY5VW5M.prismaSchemaWasmVersion,
|
|
23
|
+
schemaEngineWasmVersion: () => import_chunk_HHY5VW5M.schemaEngineWasmVersion
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(wasm_exports);
|
|
26
|
-
var
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_HHY5VW5M = require("./chunk-HHY5VW5M.js");
|
|
27
|
+
var import_chunk_52QP6QWI = require("./chunk-52QP6QWI.js");
|
|
28
28
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
29
29
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/internals",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0-dev.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,19 +22,14 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@babel/helper-validator-identifier": "7.25.9",
|
|
24
24
|
"@opentelemetry/api": "1.9.0",
|
|
25
|
-
"@swc/core": "1.11.5",
|
|
26
|
-
"@swc/jest": "0.2.37",
|
|
27
25
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
28
|
-
"@types/jest": "29.5.14",
|
|
29
26
|
"@types/node": "~20.19.24",
|
|
30
27
|
"@types/resolve": "1.20.6",
|
|
31
|
-
"archiver": "6.0.2",
|
|
32
28
|
"checkpoint-client": "1.1.33",
|
|
33
29
|
"cli-truncate": "4.0.0",
|
|
34
30
|
"empathic": "2.0.0",
|
|
35
31
|
"escape-string-regexp": "5.0.0",
|
|
36
32
|
"execa": "8.0.1",
|
|
37
|
-
"fast-glob": "3.3.3",
|
|
38
33
|
"find-up": "7.0.0",
|
|
39
34
|
"fp-ts": "2.16.9",
|
|
40
35
|
"fs-extra": "11.3.0",
|
|
@@ -44,8 +39,6 @@
|
|
|
44
39
|
"indent-string": "4.0.0",
|
|
45
40
|
"is-windows": "1.0.2",
|
|
46
41
|
"is-wsl": "3.1.0",
|
|
47
|
-
"jest": "29.7.0",
|
|
48
|
-
"jest-junit": "16.0.0",
|
|
49
42
|
"kleur": "4.1.5",
|
|
50
43
|
"mock-stdin": "1.0.0",
|
|
51
44
|
"new-github-issue-url": "0.2.1",
|
|
@@ -66,20 +59,20 @@
|
|
|
66
59
|
"yarn": "1.22.22"
|
|
67
60
|
},
|
|
68
61
|
"dependencies": {
|
|
69
|
-
"@prisma/prisma-schema-wasm": "7.5.0-
|
|
70
|
-
"@prisma/schema-engine-wasm": "7.5.0-
|
|
62
|
+
"@prisma/prisma-schema-wasm": "7.5.0-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
63
|
+
"@prisma/schema-engine-wasm": "7.5.0-15.280c870be64f457428992c43c1f6d557fab6e29e",
|
|
71
64
|
"arg": "5.0.2",
|
|
72
65
|
"prompts": "2.4.2",
|
|
73
|
-
"@prisma/config": "7.
|
|
74
|
-
"@prisma/debug": "7.
|
|
75
|
-
"@prisma/
|
|
76
|
-
"@prisma/
|
|
77
|
-
"@prisma/fetch-engine": "7.
|
|
78
|
-
"@prisma/
|
|
79
|
-
"@prisma/generator": "7.
|
|
80
|
-
"@prisma/generator-helper": "7.
|
|
81
|
-
"@prisma/get-platform": "7.
|
|
82
|
-
"@prisma/schema-files-loader": "7.
|
|
66
|
+
"@prisma/config": "7.6.0-dev.1",
|
|
67
|
+
"@prisma/debug": "7.6.0-dev.1",
|
|
68
|
+
"@prisma/dmmf": "7.6.0-dev.1",
|
|
69
|
+
"@prisma/driver-adapter-utils": "7.6.0-dev.1",
|
|
70
|
+
"@prisma/fetch-engine": "7.6.0-dev.1",
|
|
71
|
+
"@prisma/engines": "7.6.0-dev.1",
|
|
72
|
+
"@prisma/generator": "7.6.0-dev.1",
|
|
73
|
+
"@prisma/generator-helper": "7.6.0-dev.1",
|
|
74
|
+
"@prisma/get-platform": "7.6.0-dev.1",
|
|
75
|
+
"@prisma/schema-files-loader": "7.6.0-dev.1"
|
|
83
76
|
},
|
|
84
77
|
"peerDependencies": {
|
|
85
78
|
"typescript": ">=5.4.0"
|
|
@@ -93,6 +86,6 @@
|
|
|
93
86
|
"scripts": {
|
|
94
87
|
"dev": "DEV=true tsx helpers/build.ts",
|
|
95
88
|
"build": "tsx helpers/build.ts",
|
|
96
|
-
"test": "dotenv -e ../../.db.env --
|
|
89
|
+
"test": "dotenv -e ../../.db.env -- vitest run --silent"
|
|
97
90
|
}
|
|
98
91
|
}
|