okmodel 0.8.0 → 0.9.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.
- package/README.md +14 -0
- package/dist/dialects/pg/ext/btree-gin.d.ts +26 -0
- package/dist/dialects/pg/ext/btree-gin.js +20 -0
- package/dist/dialects/pg/ext/btree-gist.d.ts +26 -0
- package/dist/dialects/pg/ext/btree-gist.js +20 -0
- package/dist/dialects/pg/ext/call.d.ts +53 -0
- package/dist/dialects/pg/ext/citext.js +1 -1
- package/dist/dialects/pg/ext/feature.d.ts +26 -0
- package/dist/dialects/pg/ext/fuzzystrmatch.d.ts +34 -0
- package/dist/dialects/pg/ext/fuzzystrmatch.js +33 -0
- package/dist/dialects/pg/ext/hstore.d.ts +41 -0
- package/dist/dialects/pg/ext/hstore.js +29 -0
- package/dist/dialects/pg/ext/index.d.ts +56 -0
- package/dist/dialects/pg/ext/index.js +1 -1
- package/dist/dialects/pg/ext/ltree.d.ts +41 -0
- package/dist/dialects/pg/ext/ltree.js +29 -0
- package/dist/dialects/pg/ext/pg-trgm.js +4 -13
- package/dist/dialects/pg/ext/pgcrypto.d.ts +33 -0
- package/dist/dialects/pg/ext/pgcrypto.js +33 -0
- package/dist/dialects/pg/ext/unaccent.d.ts +26 -0
- package/dist/dialects/pg/ext/unaccent.js +21 -0
- package/dist/dialects/pg/ext/using.d.ts +23 -0
- package/dist/dialects/pg/ext/versions.d.ts +36 -0
- package/dist/dialects/pg/external.d.ts +19 -0
- package/dist/dialects/pg/fn/index.js +4 -4
- package/dist/dialects/pg/index.d.ts +1 -0
- package/dist/dialects/pg/index.js +16 -11
- package/dist/dialects/pg/view/index.js +5 -5
- package/dist/dialects/pg/view/scratch.d.ts +4 -1
- package/dist/runtime/artifact-file.d.ts +22 -0
- package/dist/runtime/client.d.ts +10 -0
- package/dist/runtime/drift-detail.d.ts +2 -1
- package/dist/runtime/drift.d.ts +3 -10
- package/dist/runtime/pg/bun.js +4 -4
- package/dist/runtime/pg/neon.js +4 -4
- package/dist/runtime/pg/pg.js +4 -4
- package/dist/runtime/pg/pglite.js +4 -4
- package/dist/runtime/pg/postgresjs.js +4 -4
- package/dist/runtime/server-check.d.ts +36 -6
- package/dist/runtime/traits/index.js +5 -5
- package/dist/runtime/validate/index.js +1 -1
- package/dist/shared/{4m6hskg8.js → 0j6qe91y.js} +4 -4
- package/dist/shared/{14x60fbf.js → 1mxm04fy.js} +5 -5
- package/dist/shared/{b6d6p0zc.js → 2szgv6yj.js} +5 -5
- package/dist/shared/{f4jy1j7x.js → 2zdxkt7b.js} +909 -100
- package/dist/shared/{mnvjvqyp.js → 3456242y.js} +17 -17
- package/dist/shared/3t6kw83m.js +1 -1
- package/dist/shared/{6m78c8ss.js → 5kyb3tqx.js} +1 -1
- package/dist/shared/61bmrmhr.js +35 -0
- package/dist/shared/{zbqbmmrp.js → 62b603gr.js} +8 -8
- package/dist/shared/{jgqj11w4.js → 6f0z3hzh.js} +4 -0
- package/dist/shared/{dpc2r7rb.js → 6nae0spm.js} +150 -89
- package/dist/shared/{0wrea3jq.js → 71n0jmhc.js} +1 -1
- package/dist/shared/7ba5h6pb.js +17 -0
- package/dist/shared/{k86n8vq3.js → 8jesqsrk.js} +1 -1
- package/dist/shared/{qd9hhd8f.js → 8n688yjg.js} +1 -1
- package/dist/shared/{zgex00fd.js → 8qzkd9f3.js} +5 -5
- package/dist/shared/{mkrn359n.js → 90sg0w5a.js} +159 -31
- package/dist/shared/{7ghwamrf.js → 99qp9vtg.js} +1 -1
- package/dist/shared/{bxas03mq.js → 9dtgn1z2.js} +1 -1
- package/dist/shared/{p5nh3r8q.js → aksb89mn.js} +2 -2
- package/dist/shared/{wcrheftc.js → bphrgwz9.js} +2 -2
- package/dist/shared/{wz2a78mp.js → c3mvnq7a.js} +1 -1
- package/dist/shared/{pan0370z.js → ccsmhv9r.js} +24 -6
- package/dist/shared/{n0jmpgj1.js → cexb7z6b.js} +1 -1
- package/dist/shared/{wvdjznah.js → cf8zdz5p.js} +5 -5
- package/dist/shared/{3449rcae.js → ckz05z15.js} +4 -4
- package/dist/shared/{35q0n9tz.js → dd5pmnky.js} +7 -7
- package/dist/shared/{e8zyaqvj.js → ds229x4r.js} +1 -1
- package/dist/{tooling/shared/yw30vnq2.js → shared/e275q7sd.js} +1 -1
- package/dist/shared/{mfedzr74.js → ebhz8vh6.js} +4 -4
- package/dist/shared/{z581d7ny.js → fdsz3w80.js} +2 -2
- package/dist/shared/{sjk86yrx.js → fk9vef30.js} +84 -73
- package/dist/shared/{needfe47.js → g89fmz5s.js} +1 -1
- package/dist/shared/{m4xff2a6.js → ghqzdp94.js} +2 -2
- package/dist/shared/h9811jjm.js +17 -0
- package/dist/shared/{kj9d8maq.js → jpybhf98.js} +1 -1
- package/dist/shared/kzgrnckd.js +29 -0
- package/dist/shared/{agsfb86s.js → mazpbcdj.js} +4 -4
- package/dist/shared/{195pzzzz.js → mgaq2sd3.js} +10 -7
- package/dist/shared/{5mtf6cj3.js → mvmm3xpb.js} +5 -2
- package/dist/shared/{p3xbdcvt.js → myk8fswx.js} +55 -6
- package/dist/shared/{njga14v4.js → n306gqkd.js} +8 -8
- package/dist/shared/n5whk3mt.js +665 -0
- package/dist/shared/{bah9nbg3.js → npdftanb.js} +12 -20
- package/dist/shared/{16kvjebh.js → pg4ezgyf.js} +7 -26
- package/dist/{tooling/shared/08kemxjd.js → shared/pgsak1yw.js} +1 -1
- package/dist/shared/{jp36k7dp.js → qvwwp1mp.js} +61 -40
- package/dist/shared/rbxt795q.js +1766 -0
- package/dist/shared/{g5yc06ka.js → s7he5e5d.js} +1 -1
- package/dist/shared/{hfqmpasr.js → ss2kv2rs.js} +5 -5
- package/dist/shared/stfa9xcw.js +450 -0
- package/dist/{tooling/shared/rs1jb051.js → shared/tr64w5p0.js} +1 -1
- package/dist/shared/{jebgrkeq.js → tw1nvvfj.js} +2 -2
- package/dist/shared/{v1wad97q.js → wvtjg5m3.js} +1 -1
- package/dist/shared/xqacq37x.js +61 -0
- package/dist/shared/{n05z9nwz.js → xtsydxjg.js} +1 -1
- package/dist/shared/{jx2m62cs.js → xv8qj97g.js} +5 -5
- package/dist/shared/{63f4ksbz.js → xwhdcrm4.js} +1 -1
- package/dist/shared/{hm5f8jby.js → yvabyg9k.js} +6 -6
- package/dist/shared/yybhre6n.js +136 -0
- package/dist/shared/zdqf8k5d.js +8 -0
- package/dist/tooling/cli.js +94 -22
- package/dist/tooling/driver-run.js +15 -332
- package/dist/tooling/github/comment.d.ts +50 -0
- package/dist/tooling/github/post-comment.d.ts +17 -0
- package/dist/tooling/migrate/commands.d.ts +2 -1
- package/dist/tooling/migrate/config.d.ts +13 -0
- package/dist/tooling/migrate/export.d.ts +165 -0
- package/dist/tooling/migrate/ext-surface.d.ts +80 -0
- package/dist/tooling/migrate/ext.d.ts +31 -4
- package/dist/tooling/migrate/import-drizzle.d.ts +40 -0
- package/dist/tooling/migrate/index.d.ts +3 -0
- package/dist/tooling/migrate/index.js +55 -10
- package/dist/tooling/migrate/lint-rules.d.ts +18 -1
- package/dist/tooling/migrate/lint.d.ts +14 -1
- package/dist/tooling/migrate/place.d.ts +18 -0
- package/dist/tooling/migrate/plan-json.d.ts +65 -0
- package/dist/tooling/migrate/project.d.ts +10 -1
- package/dist/tooling/migrate/pull-emit.d.ts +98 -0
- package/dist/tooling/migrate/pull-routines.d.ts +126 -0
- package/dist/tooling/migrate/pull-verify.d.ts +26 -0
- package/dist/tooling/migrate/pull.d.ts +62 -0
- package/dist/tooling/migrate/reprint.d.ts +32 -0
- package/dist/tooling/migrate/sandbox.d.ts +8 -2
- package/dist/tooling/migrate/schema-api.d.ts +43 -0
- package/dist/tooling/migrate/sql-lex.d.ts +18 -0
- package/dist/tooling/shared/{3m1hkg7z.js → 04svnxxj.js} +4 -4
- package/dist/tooling/shared/{ppnnnvj8.js → 0j0jtse1.js} +1 -1
- package/dist/tooling/shared/{z8d7ptht.js → 0r05zhyq.js} +5 -5
- package/dist/tooling/shared/{a6pp9d12.js → 1800eymw.js} +3 -3
- package/dist/tooling/shared/{cmptmb4f.js → 35zemrmf.js} +1 -1
- package/dist/tooling/shared/{w7qe8sj1.js → 3rmaz3pq.js} +1 -1
- package/dist/{shared/q0cqt2sp.js → tooling/shared/3yn79q5m.js} +1 -1
- package/dist/tooling/shared/{2revefqt.js → 57btdkgm.js} +2 -2
- package/dist/tooling/shared/{ma2340rx.js → 5bmksndh.js} +2 -2
- package/dist/tooling/shared/{9xzm7hjg.js → 5p8km5jb.js} +3 -3
- package/dist/tooling/shared/{xhrnjch9.js → 5x3pf400.js} +3 -3
- package/dist/tooling/shared/{wwnekq5n.js → 5zrzffnk.js} +1 -1
- package/dist/tooling/shared/{p7f08ktn.js → 62fxpc1p.js} +7 -7
- package/dist/tooling/shared/{7ae7rjmn.js → 68tf18v4.js} +2 -2
- package/dist/tooling/shared/{rf83gr2d.js → 6vk28rjp.js} +7 -3
- package/dist/tooling/shared/76pv6qff.js +9 -0
- package/dist/tooling/shared/{bz2dqhab.js → 7aews1zg.js} +3 -3
- package/dist/tooling/shared/{9kazs5p6.js → 7b3xp9gc.js} +3 -3
- package/dist/tooling/shared/{4d2w25vw.js → 7pxncnzs.js} +2 -2
- package/dist/tooling/shared/{zvnhh1n0.js → 829fjxyw.js} +2 -2
- package/dist/tooling/shared/{dzx85q70.js → 8m5znpdt.js} +1 -1
- package/dist/tooling/shared/{g9ad4n80.js → 8yr7ges1.js} +7 -7
- package/dist/tooling/shared/{tn8gay14.js → 9qr9rkbh.js} +6 -6
- package/dist/tooling/shared/{8sqrsw3s.js → 9sfbtwsk.js} +3 -3
- package/dist/{shared/bnby0esn.js → tooling/shared/9wsnsvbf.js} +1 -1
- package/dist/tooling/shared/{aftb2mwr.js → a2xe04bm.js} +1 -1
- package/dist/tooling/shared/{nf7jmhfa.js → a4pzghha.js} +2 -2
- package/dist/tooling/shared/{y5656f0e.js → am04v8na.js} +5 -5
- package/dist/tooling/shared/{417zdsk7.js → asgr07mp.js} +5 -5
- package/dist/tooling/shared/{pqy21k24.js → c0xevn1h.js} +4 -4
- package/dist/tooling/shared/dhatassp.js +134 -0
- package/dist/tooling/shared/{spk1jg3r.js → ezqn88nj.js} +8 -8
- package/dist/tooling/shared/{6nyfyw70.js → f77nnfqy.js} +2 -2
- package/dist/tooling/shared/{wt7j7nf6.js → fh07z1dt.js} +1 -1
- package/dist/tooling/shared/{3rrw5w8f.js → gqwevek4.js} +1 -1
- package/dist/tooling/shared/{f9mphxej.js → hfq3n3bd.js} +346 -19
- package/dist/tooling/shared/{vs0t6qt8.js → j664qjrt.js} +2 -2
- package/dist/tooling/shared/{733a1tq3.js → jpgmjsx3.js} +3 -3
- package/dist/tooling/shared/{mtrqn2hn.js → jr2nmr81.js} +22 -30
- package/dist/{shared/mtw6jz76.js → tooling/shared/jsjjz875.js} +1 -1
- package/dist/tooling/shared/{2wtvc7rw.js → kbqnrs1x.js} +2 -2
- package/dist/tooling/shared/{gfvtj6d0.js → kz715295.js} +7 -7
- package/dist/tooling/shared/{a7q7t4n3.js → m3xt8b1h.js} +2 -2
- package/dist/tooling/shared/{dw08f3m8.js → m4hhb8aa.js} +2 -2
- package/dist/tooling/shared/{y031jct9.js → mw5npye0.js} +2 -2
- package/dist/tooling/shared/{vraj6d74.js → nxq95eb6.js} +3 -3
- package/dist/tooling/shared/{fb9k2qwd.js → qartgazh.js} +11 -30
- package/dist/tooling/shared/{xjs6zqtc.js → rcywj2w8.js} +9 -9
- package/dist/tooling/shared/{dy672fz6.js → s6qha57m.js} +2 -2
- package/dist/tooling/shared/{vx86qjv8.js → shjs0379.js} +3 -3
- package/dist/tooling/shared/{345tbc2k.js → sjwkt1pg.js} +1 -1
- package/dist/tooling/shared/{rq5kk8j6.js → stebqyyd.js} +3 -3
- package/dist/tooling/shared/{yk9mp7vb.js → t4xveemq.js} +4 -4
- package/dist/tooling/shared/{djydjpqt.js → t6zjeake.js} +5 -5
- package/dist/tooling/shared/{zhwnfyb2.js → tcwpjvxe.js} +1 -1
- package/dist/tooling/shared/{72fyg4zv.js → tpssp7ac.js} +1 -1
- package/dist/tooling/shared/{jne7b93p.js → v6j1ep6w.js} +3 -3
- package/dist/tooling/shared/{ec71zqgt.js → vwr2y833.js} +2 -2
- package/dist/tooling/shared/{j9t5s12a.js → w17sj05d.js} +2 -2
- package/dist/tooling/shared/{3tq8pnb8.js → w5d89rb4.js} +1 -1
- package/dist/tooling/shared/{smn6kz1p.js → wbwq1jsa.js} +2 -2
- package/dist/tooling/shared/{pwsytxm5.js → wezxf3h8.js} +1 -1
- package/dist/tooling/shared/{5bvw2nev.js → yb4kd19s.js} +1 -1
- package/dist/tooling/shared/{gmcf9cxf.js → ybdew6j7.js} +2 -2
- package/dist/tooling/shared/{ep8zh3bk.js → yfedr1zb.js} +1 -1
- package/dist/tooling/shared/{ddjtfgnx.js → yhp829bx.js} +3 -3
- package/dist/tooling/shared/{yfr8hzhm.js → ytk1tjs0.js} +1 -1
- package/dist/tooling/shared/{03k6res6.js → zs9aymcp.js} +1 -1
- package/dist/tooling/shared/zx3v9phv.js +8 -0
- package/dist/tooling/testing/index.js +2 -2
- package/package.json +38 -9
- package/dist/shared/fjpnhqan.js +0 -71
- package/dist/shared/n41w4fbz.js +0 -113
- package/dist/tooling/shared/pw8fgahx.js +0 -69
- /package/dist/shared/{ae4j5f42.js → mfvx6kjx.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
open3,
|
|
3
3
|
PgSession2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./62fxpc1p.js";
|
|
5
5
|
import {
|
|
6
6
|
POSTGRESJS_CAPABILITIES,
|
|
7
7
|
readCapability2,
|
|
8
8
|
hasCapability2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./5x3pf400.js";
|
|
10
10
|
export {
|
|
11
11
|
PgSession2 as PgSession,
|
|
12
12
|
POSTGRESJS_CAPABILITIES as capabilities,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
open3
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./62fxpc1p.js";
|
|
4
4
|
import {
|
|
5
5
|
createClient
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./jr2nmr81.js";
|
|
7
7
|
|
|
8
8
|
// src/runtime/pg/postgresjs.ts
|
|
9
9
|
function connect(target, options) {
|
|
10
10
|
if (typeof target === "object" && !isPool(target)) {
|
|
11
|
-
return import("./
|
|
11
|
+
return import("./kbqnrs1x.js").then((mod) => mod.default(target, options, open3));
|
|
12
12
|
}
|
|
13
13
|
const owned = !isPool(target);
|
|
14
14
|
const pool = isPool(target) ? target : open3({
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OkmError,
|
|
3
3
|
catalogFileText2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./hfq3n3bd.js";
|
|
5
|
+
import {
|
|
6
|
+
artifactDir,
|
|
7
|
+
readText
|
|
8
|
+
} from "./dhatassp.js";
|
|
5
9
|
|
|
6
10
|
// src/runtime/drift.ts
|
|
7
|
-
async function assertCompatible(pool, schema, recordedHash, source, options) {
|
|
11
|
+
async function assertCompatible(pool, schema, recordedHash, source, options, namespace = "public") {
|
|
8
12
|
const code = await codeHash(schema, source);
|
|
9
13
|
if (code.hash === recordedHash)
|
|
10
14
|
return;
|
|
@@ -12,7 +16,7 @@ async function assertCompatible(pool, schema, recordedHash, source, options) {
|
|
|
12
16
|
if (code.artifact !== undefined) {
|
|
13
17
|
const artifact = code.artifact;
|
|
14
18
|
await loadOnce(`text\x00${artifact.hash}`, async () => {
|
|
15
|
-
const { loadTrustedCatalog } = await import("./
|
|
19
|
+
const { loadTrustedCatalog } = await import("./yb4kd19s.js");
|
|
16
20
|
loadTrustedCatalog(artifact.text, artifact.hash);
|
|
17
21
|
});
|
|
18
22
|
} else if (code.fromFile) {
|
|
@@ -26,12 +30,12 @@ async function assertCompatible(pool, schema, recordedHash, source, options) {
|
|
|
26
30
|
}
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
|
-
const { loadTrustedCatalog } = await import("./
|
|
33
|
+
const { loadTrustedCatalog } = await import("./yb4kd19s.js");
|
|
30
34
|
loadTrustedCatalog(text, code.hash);
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
|
-
const { assertDrift } = await import("./
|
|
34
|
-
await assertDrift(pool, code.hash, recordedHash, options);
|
|
37
|
+
const { assertDrift } = await import("./6vk28rjp.js");
|
|
38
|
+
await assertDrift(pool, code.hash, recordedHash, options, namespace);
|
|
35
39
|
}
|
|
36
40
|
async function codeHash(schema, source) {
|
|
37
41
|
if (source.catalog !== undefined) {
|
|
@@ -40,7 +44,7 @@ async function codeHash(schema, source) {
|
|
|
40
44
|
const listed = await readHashFile(source.catalogDir);
|
|
41
45
|
if (listed !== undefined)
|
|
42
46
|
return { hash: listed, fromFile: true };
|
|
43
|
-
const { catalogHash } = await import("./
|
|
47
|
+
const { catalogHash } = await import("./yb4kd19s.js");
|
|
44
48
|
return { hash: catalogHash(schemaCatalog(schema)), fromFile: false };
|
|
45
49
|
}
|
|
46
50
|
function schemaCatalog(schema) {
|
|
@@ -61,29 +65,6 @@ async function readHashFile(catalogDir) {
|
|
|
61
65
|
const hash = catalogFileText2(text, "catalog.hash").trim();
|
|
62
66
|
return hash.length === 0 ? undefined : hash;
|
|
63
67
|
}
|
|
64
|
-
function artifactDir(catalogDir) {
|
|
65
|
-
if (catalogDir !== undefined)
|
|
66
|
-
return catalogDir.replace(/[/\\]+$/, "");
|
|
67
|
-
const cwd = globalThis.process?.cwd?.() ?? ".";
|
|
68
|
-
return `${cwd}/.okm`;
|
|
69
|
-
}
|
|
70
|
-
async function readText(path) {
|
|
71
|
-
const bun = globalThis.Bun;
|
|
72
|
-
if (bun !== undefined) {
|
|
73
|
-
const file = bun.file(path);
|
|
74
|
-
if (!await file.exists())
|
|
75
|
-
return;
|
|
76
|
-
return file.text();
|
|
77
|
-
}
|
|
78
|
-
const loader = globalThis.process?.getBuiltinModule;
|
|
79
|
-
if (loader === undefined)
|
|
80
|
-
return;
|
|
81
|
-
try {
|
|
82
|
-
return await loader("node:fs/promises").readFile(path, "utf8");
|
|
83
|
-
} catch {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
68
|
export {
|
|
88
69
|
assertCompatible
|
|
89
70
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DriverError2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./hfq3n3bd.js";
|
|
4
4
|
import {
|
|
5
5
|
noticeBuffer,
|
|
6
6
|
WireSession
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./jsjjz875.js";
|
|
8
8
|
import {
|
|
9
9
|
noTimeout
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./3yn79q5m.js";
|
|
11
11
|
import {
|
|
12
12
|
BUNSQL_CAPABILITIES,
|
|
13
13
|
driverErrors,
|
|
14
14
|
rejectClosed,
|
|
15
15
|
mapFailure,
|
|
16
16
|
runCall
|
|
17
|
-
} from "./
|
|
17
|
+
} from "./5x3pf400.js";
|
|
18
18
|
|
|
19
19
|
// src/adapters/pg/bunsql.ts
|
|
20
20
|
import { SQL as BunSQL } from "bun";
|
|
@@ -66,19 +66,19 @@ function open2(config) {
|
|
|
66
66
|
};
|
|
67
67
|
const run = (text, params, watch) => {
|
|
68
68
|
const sent = dropped;
|
|
69
|
-
return root.query(text, params, watch).catch((error) => import("./
|
|
69
|
+
return root.query(text, params, watch).catch((error) => import("./8yr7ges1.js").then((mod) => mod.recover(sql, error, text, root.depth(), clientPools.has(pool), dropped > sent, () => root.query(text, params, watch))));
|
|
70
70
|
};
|
|
71
71
|
const afterDrop = (text, params, watch) => {
|
|
72
72
|
if (dropped === 0)
|
|
73
73
|
return run(text, params, watch);
|
|
74
74
|
const seen = dropped;
|
|
75
|
-
return import("./
|
|
75
|
+
return import("./8yr7ges1.js").then((mod) => mod.drainClosed(sql).then(() => {
|
|
76
76
|
if (dropped === seen)
|
|
77
77
|
dropped = 0;
|
|
78
78
|
return run(text, params, watch);
|
|
79
79
|
}));
|
|
80
80
|
};
|
|
81
|
-
const checkout = () => closed ? rejectClosed() : import("./
|
|
81
|
+
const checkout = () => closed ? rejectClosed() : import("./8yr7ges1.js").then((mod) => mod.checkout(held));
|
|
82
82
|
const pool = {
|
|
83
83
|
capabilities: BUNSQL_CAPABILITIES,
|
|
84
84
|
execute(text, params, options) {
|
|
@@ -101,12 +101,12 @@ function open2(config) {
|
|
|
101
101
|
reserve: () => checkout(),
|
|
102
102
|
stream(text, params) {
|
|
103
103
|
return async function* () {
|
|
104
|
-
const { streamRows } = await import("./
|
|
104
|
+
const { streamRows } = await import("./8yr7ges1.js");
|
|
105
105
|
yield* streamRows(checkout, text, params);
|
|
106
106
|
}();
|
|
107
107
|
},
|
|
108
108
|
listen(channel, onNotify) {
|
|
109
|
-
return import("./
|
|
109
|
+
return import("./8yr7ges1.js").then((mod) => mod.listen(sql, parked, closed, channel, onNotify));
|
|
110
110
|
},
|
|
111
111
|
stats: () => statsOf(counters, max),
|
|
112
112
|
async close() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
open6,
|
|
3
3
|
seal2
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./t6zjeake.js";
|
|
5
5
|
import {
|
|
6
6
|
PGLITE_CAPABILITIES,
|
|
7
7
|
readCapability2,
|
|
8
8
|
hasCapability2
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./5x3pf400.js";
|
|
10
10
|
export {
|
|
11
11
|
PGLITE_CAPABILITIES as capabilities,
|
|
12
12
|
hasCapability2 as hasCapability,
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./n4jqhpqz.js";
|
|
4
4
|
import {
|
|
5
5
|
refuseUncancellableTimeout
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./tcwpjvxe.js";
|
|
7
7
|
import {
|
|
8
8
|
withHttp,
|
|
9
9
|
settleCall
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./jr2nmr81.js";
|
|
11
11
|
import {
|
|
12
12
|
OkmError,
|
|
13
13
|
rejectKeys,
|
|
14
14
|
isRecord,
|
|
15
15
|
fail2
|
|
16
|
-
} from "./
|
|
16
|
+
} from "./hfq3n3bd.js";
|
|
17
17
|
|
|
18
18
|
// src/runtime/batch.ts
|
|
19
19
|
async function batch(session, ops, options, replica) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
refuseUncancellableTimeout
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./tcwpjvxe.js";
|
|
4
4
|
import {
|
|
5
5
|
openClient,
|
|
6
6
|
withHttp,
|
|
7
7
|
settleCall
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./jr2nmr81.js";
|
|
9
9
|
import {
|
|
10
10
|
OkmError,
|
|
11
11
|
isConnectionLost,
|
|
12
12
|
rejectKeys,
|
|
13
13
|
isRecord,
|
|
14
14
|
fail2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./hfq3n3bd.js";
|
|
16
16
|
|
|
17
17
|
// src/runtime/transaction.ts
|
|
18
18
|
var BEGIN = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stack2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./35zemrmf.js";
|
|
4
4
|
import {
|
|
5
5
|
updateSliceBody2,
|
|
6
6
|
rejectDuplicateTargets2,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
expectOf2,
|
|
16
16
|
allowSet2,
|
|
17
17
|
noteGuarded2
|
|
18
|
-
} from "./
|
|
19
|
-
import"./
|
|
18
|
+
} from "./ezqn88nj.js";
|
|
19
|
+
import"./w5d89rb4.js";
|
|
20
20
|
import {
|
|
21
21
|
emitWhere,
|
|
22
22
|
projectExpr,
|
|
23
23
|
quote,
|
|
24
24
|
isRecord,
|
|
25
25
|
fail2
|
|
26
|
-
} from "./
|
|
26
|
+
} from "./hfq3n3bd.js";
|
|
27
27
|
|
|
28
28
|
// src/runtime/version.ts
|
|
29
29
|
function planVersioned(schema, table, input, options, mods) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
noTimeout
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./3yn79q5m.js";
|
|
4
4
|
import {
|
|
5
5
|
PGLITE_CAPABILITIES,
|
|
6
6
|
driverErrors,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
runCall,
|
|
12
12
|
EMPTY_NOTICES,
|
|
13
13
|
resultFrom
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./5x3pf400.js";
|
|
15
15
|
|
|
16
16
|
// src/adapters/pg/pglite.ts
|
|
17
17
|
import { PGlite } from "@electric-sql/pglite";
|
|
18
18
|
async function open6(config = {}) {
|
|
19
|
-
const wire = await import("./
|
|
19
|
+
const wire = await import("./8m5znpdt.js");
|
|
20
20
|
const db = new PGlite({
|
|
21
21
|
dataDir: config.dataDir ?? "memory://",
|
|
22
22
|
parsers: wire.parsers,
|
|
@@ -58,7 +58,7 @@ async function open6(config = {}) {
|
|
|
58
58
|
if (refused !== undefined)
|
|
59
59
|
return refused;
|
|
60
60
|
return runCall(closed, options, async (watch) => {
|
|
61
|
-
const { runAtomicBatch } = await import("./
|
|
61
|
+
const { runAtomicBatch } = await import("./gqwevek4.js");
|
|
62
62
|
return runAtomicBatch(session, statements, watch);
|
|
63
63
|
});
|
|
64
64
|
},
|
|
@@ -67,7 +67,7 @@ async function open6(config = {}) {
|
|
|
67
67
|
return;
|
|
68
68
|
released = true;
|
|
69
69
|
try {
|
|
70
|
-
const { resetQueried } = await import("./
|
|
70
|
+
const { resetQueried } = await import("./9wsnsvbf.js");
|
|
71
71
|
await resetQueried(session);
|
|
72
72
|
} finally {
|
|
73
73
|
slot.release();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
async function refuseUncancellableTimeout(pool, timeout) {
|
|
3
3
|
if (pool.capabilities.cancel === true || timeout === undefined || !(timeout > 0))
|
|
4
4
|
return;
|
|
5
|
-
const { refused } = await import("./
|
|
5
|
+
const { refused } = await import("./sjwkt1pg.js");
|
|
6
6
|
await refused();
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
open4
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./asgr07mp.js";
|
|
4
4
|
import {
|
|
5
5
|
createClient
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./jr2nmr81.js";
|
|
7
7
|
|
|
8
8
|
// src/runtime/pg/pg.ts
|
|
9
9
|
function connect(target, options) {
|
|
10
10
|
if (typeof target === "object" && !isPool(target)) {
|
|
11
|
-
return import("./
|
|
11
|
+
return import("./kbqnrs1x.js").then((mod) => mod.default(target, options, open4));
|
|
12
12
|
}
|
|
13
13
|
const owned = !isPool(target);
|
|
14
14
|
const pool = isPool(target) ? target : open4({
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
readHandle,
|
|
3
3
|
readCall,
|
|
4
4
|
attachHttp
|
|
5
|
-
} from "./
|
|
5
|
+
} from "./jr2nmr81.js";
|
|
6
6
|
import {
|
|
7
7
|
OkmError,
|
|
8
8
|
throwNamed,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
list,
|
|
18
18
|
isRecord,
|
|
19
19
|
fail2
|
|
20
|
-
} from "./
|
|
20
|
+
} from "./hfq3n3bd.js";
|
|
21
21
|
|
|
22
22
|
// src/runtime/tree.ts
|
|
23
23
|
var OPTIONS = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNoControl
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./w5d89rb4.js";
|
|
4
4
|
import {
|
|
5
5
|
throwNamed,
|
|
6
6
|
isOperator,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
list,
|
|
13
13
|
isRecord,
|
|
14
14
|
fail2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./hfq3n3bd.js";
|
|
16
16
|
|
|
17
17
|
// src/dialects/pg/ops/search-query.ts
|
|
18
18
|
function searchValue(query, options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNoControl
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./w5d89rb4.js";
|
|
4
4
|
import {
|
|
5
5
|
OkmError,
|
|
6
6
|
throwNamed,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
quote,
|
|
13
13
|
list,
|
|
14
14
|
fail2
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./hfq3n3bd.js";
|
|
16
16
|
|
|
17
17
|
// src/dialects/pg/ops/fragment.ts
|
|
18
18
|
var IDENT = Symbol("okmodel.sql.ident");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build3
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./829fjxyw.js";
|
|
4
4
|
import {
|
|
5
5
|
attachHttp
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./jr2nmr81.js";
|
|
7
7
|
import {
|
|
8
8
|
OkmError,
|
|
9
9
|
rejectKeys,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
indexes,
|
|
12
12
|
isRecord,
|
|
13
13
|
fail2
|
|
14
|
-
} from "./
|
|
14
|
+
} from "./hfq3n3bd.js";
|
|
15
15
|
|
|
16
16
|
// src/runtime/read-stream.ts
|
|
17
17
|
var DEFAULT_BATCH = 1000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "okmodel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "okmodel is a catalog-first TypeScript ORM, PostgreSQL first.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"migrations",
|
|
@@ -114,10 +114,38 @@
|
|
|
114
114
|
"./pg/pg_trgm": {
|
|
115
115
|
"types": "./dist/dialects/pg/ext/pg-trgm.d.ts",
|
|
116
116
|
"import": "./dist/dialects/pg/ext/pg-trgm.js"
|
|
117
|
+
},
|
|
118
|
+
"./pg/unaccent": {
|
|
119
|
+
"types": "./dist/dialects/pg/ext/unaccent.d.ts",
|
|
120
|
+
"import": "./dist/dialects/pg/ext/unaccent.js"
|
|
121
|
+
},
|
|
122
|
+
"./pg/hstore": {
|
|
123
|
+
"types": "./dist/dialects/pg/ext/hstore.d.ts",
|
|
124
|
+
"import": "./dist/dialects/pg/ext/hstore.js"
|
|
125
|
+
},
|
|
126
|
+
"./pg/ltree": {
|
|
127
|
+
"types": "./dist/dialects/pg/ext/ltree.d.ts",
|
|
128
|
+
"import": "./dist/dialects/pg/ext/ltree.js"
|
|
129
|
+
},
|
|
130
|
+
"./pg/btree_gist": {
|
|
131
|
+
"types": "./dist/dialects/pg/ext/btree-gist.d.ts",
|
|
132
|
+
"import": "./dist/dialects/pg/ext/btree-gist.js"
|
|
133
|
+
},
|
|
134
|
+
"./pg/btree_gin": {
|
|
135
|
+
"types": "./dist/dialects/pg/ext/btree-gin.d.ts",
|
|
136
|
+
"import": "./dist/dialects/pg/ext/btree-gin.js"
|
|
137
|
+
},
|
|
138
|
+
"./pg/fuzzystrmatch": {
|
|
139
|
+
"types": "./dist/dialects/pg/ext/fuzzystrmatch.d.ts",
|
|
140
|
+
"import": "./dist/dialects/pg/ext/fuzzystrmatch.js"
|
|
141
|
+
},
|
|
142
|
+
"./pg/pgcrypto": {
|
|
143
|
+
"types": "./dist/dialects/pg/ext/pgcrypto.d.ts",
|
|
144
|
+
"import": "./dist/dialects/pg/ext/pgcrypto.js"
|
|
117
145
|
}
|
|
118
146
|
},
|
|
119
147
|
"scripts": {
|
|
120
|
-
"build": "rm -rf dist && bun build ./src/contracts/index.ts ./src/contracts/internal.ts ./src/dialects/pg/index.ts ./src/runtime/pg/postgresjs.ts ./src/runtime/pg/pglite.ts ./src/runtime/pg/pg.ts ./src/runtime/pg/bun.ts ./src/runtime/pg/neon.ts ./src/runtime/ids/index.ts ./src/runtime/safety/index.ts ./src/runtime/traits/index.ts ./src/runtime/tenancy/index.ts ./src/runtime/validate/index.ts ./src/runtime/otel.ts ./src/dialects/pg/ext/index.ts ./src/dialects/pg/fn/index.ts ./src/dialects/pg/view/index.ts ./src/dialects/pg/ext/citext.ts ./src/dialects/pg/ext/pg-trgm.ts ./src/tooling/migrate/index.ts ./src/tooling/testing/index.ts ./src/tooling/cli.ts --outdir ./dist --root ./src --format esm --target node --splitting --chunk-naming=shared/[hash].js --external postgres --external @electric-sql/pglite --external pg --external bun --external @neondatabase/serverless && bunx tsc -p tsconfig.build.json && rm -f ./dist/dialects/pg/temporal.local.d.ts && bun build ./packages/harness/src/driver-run.ts --outdir ./dist/tooling --format esm --target node --splitting --chunk-naming=shared/[hash].js --external postgres --external @electric-sql/pglite --external pg --external bun --external @neondatabase/serverless && bun ./scripts/write-bin-wrappers.ts",
|
|
148
|
+
"build": "rm -rf dist && bun build ./src/contracts/index.ts ./src/contracts/internal.ts ./src/dialects/pg/index.ts ./src/runtime/pg/postgresjs.ts ./src/runtime/pg/pglite.ts ./src/runtime/pg/pg.ts ./src/runtime/pg/bun.ts ./src/runtime/pg/neon.ts ./src/runtime/ids/index.ts ./src/runtime/safety/index.ts ./src/runtime/traits/index.ts ./src/runtime/tenancy/index.ts ./src/runtime/validate/index.ts ./src/runtime/otel.ts ./src/dialects/pg/ext/index.ts ./src/dialects/pg/fn/index.ts ./src/dialects/pg/view/index.ts ./src/dialects/pg/ext/citext.ts ./src/dialects/pg/ext/pg-trgm.ts ./src/dialects/pg/ext/unaccent.ts ./src/dialects/pg/ext/hstore.ts ./src/dialects/pg/ext/ltree.ts ./src/dialects/pg/ext/btree-gist.ts ./src/dialects/pg/ext/btree-gin.ts ./src/dialects/pg/ext/fuzzystrmatch.ts ./src/dialects/pg/ext/pgcrypto.ts ./src/tooling/migrate/index.ts ./src/tooling/testing/index.ts ./src/tooling/cli.ts --outdir ./dist --root ./src --format esm --target node --splitting --chunk-naming=shared/[hash].js --external postgres --external @electric-sql/pglite --external pg --external bun --external @neondatabase/serverless && bunx tsc -p tsconfig.build.json && rm -f ./dist/dialects/pg/temporal.local.d.ts && bun build ./packages/harness/src/driver-run.ts --outdir ./dist/tooling --format esm --target node --splitting --chunk-naming=shared/[hash].js --external postgres --external @electric-sql/pglite --external pg --external bun --external @neondatabase/serverless && bun ./scripts/write-bin-wrappers.ts",
|
|
121
149
|
"driver-bench": "bun ./scripts/driver-bench.ts",
|
|
122
150
|
"typecheck": "bunx tsc --noEmit -p tsconfig.json",
|
|
123
151
|
"editor-check": "bun ./scripts/editor-check.ts",
|
|
@@ -161,15 +189,16 @@
|
|
|
161
189
|
"devDependencies": {
|
|
162
190
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
163
191
|
"@electric-sql/pglite-socket": "^0.2.11",
|
|
164
|
-
"@types/bun": "^1.4.
|
|
192
|
+
"@types/bun": "^1.4.3",
|
|
193
|
+
"drizzle-orm": "0.45.4",
|
|
165
194
|
"expect-type": "^1.4.0",
|
|
166
195
|
"fast-check": "^4.10.2",
|
|
167
|
-
"oxc-parser": "
|
|
168
|
-
"oxfmt": "0.
|
|
169
|
-
"oxlint": "^1.
|
|
170
|
-
"oxlint-tsgolint": "^7.0.
|
|
171
|
-
"publint": "^0.3.
|
|
172
|
-
"temporal-polyfill": "^1.0.
|
|
196
|
+
"oxc-parser": "0.154.0",
|
|
197
|
+
"oxfmt": "0.73.0",
|
|
198
|
+
"oxlint": "^1.88.0",
|
|
199
|
+
"oxlint-tsgolint": "^7.0.2004",
|
|
200
|
+
"publint": "^0.3.25",
|
|
201
|
+
"temporal-polyfill": "^1.0.6",
|
|
173
202
|
"temporal-spec": "^1.0.1",
|
|
174
203
|
"typescript": "7",
|
|
175
204
|
"typescript-editor": "npm:typescript@6.0.3"
|