@xata.io/drizzle 0.0.0-alpha.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f → 0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +2 -2
- package/package.json +5 -5
- package/test/drizzle.test.ts +14 -13
package/.turbo/turbo-build.log
CHANGED
@@ -6,12 +6,12 @@
|
|
6
6
|
[1msrc/index.ts[22m → [1mdist/index.cjs, dist/index.mjs[22m...[39m
|
7
7
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
8
8
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
9
|
-
[1mdrizzle-orm[22m (imported by "src/http/
|
10
|
-
[1mdrizzle-orm/pg-core[22m (imported by "src/http/
|
11
|
-
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [
|
9
|
+
[1mdrizzle-orm[22m (imported by "src/http/driver.ts", "src/http/session.ts" and "src/shared/utils.ts")
|
10
|
+
[1mdrizzle-orm/pg-core[22m (imported by "src/http/driver.ts" and "src/http/session.ts")
|
11
|
+
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [1m367ms[22m[39m
|
12
12
|
[36m
|
13
13
|
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
14
|
-
[32mcreated [1mdist/index.d.ts[22m in [1m6.
|
14
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m6.2s[22m[39m
|
15
15
|
[36m
|
16
16
|
[1msrc/pg/index.ts[22m → [1mdist/pg.cjs, dist/pg.mjs[22m...[39m
|
17
17
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
@@ -19,7 +19,7 @@
|
|
19
19
|
[1mdrizzle-orm[22m (imported by "src/pg/driver.ts", "src/pg/session.ts" and "src/shared/utils.ts")
|
20
20
|
[1mdrizzle-orm/pg-core[22m (imported by "src/pg/driver.ts" and "src/pg/session.ts")
|
21
21
|
[1mpg[22m (imported by "src/pg/session.ts")
|
22
|
-
[32mcreated [1mdist/pg.cjs, dist/pg.mjs[22m in [
|
22
|
+
[32mcreated [1mdist/pg.cjs, dist/pg.mjs[22m in [1m41ms[22m[39m
|
23
23
|
[36m
|
24
24
|
[1msrc/pg/index.ts[22m → [1mdist/pg.d.ts[22m...[39m
|
25
25
|
[32mcreated [1mdist/pg.d.ts[22m in [1m1.5s[22m[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# @xata.io/drizzle
|
2
2
|
|
3
|
-
## 0.0.0-alpha.
|
3
|
+
## 0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29
|
4
4
|
|
5
5
|
### Patch Changes
|
6
6
|
|
7
7
|
- Force canary build
|
8
8
|
|
9
9
|
- Updated dependencies []:
|
10
|
-
- @xata.io/client@0.0.0-alpha.
|
10
|
+
- @xata.io/client@0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29
|
11
11
|
|
12
12
|
## 0.0.23
|
13
13
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xata.io/drizzle",
|
3
|
-
"version": "0.0.0-alpha.
|
3
|
+
"version": "0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.cjs",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"url": "https://github.com/xataio/client-ts/issues"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@xata.io/client": "0.0.0-alpha.
|
26
|
+
"@xata.io/client": "0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
|
-
"@types/pg": "^8.11.
|
30
|
-
"drizzle-orm": "^0.
|
31
|
-
"pg": "^8.
|
29
|
+
"@types/pg": "^8.11.10",
|
30
|
+
"drizzle-orm": "^0.33.0",
|
31
|
+
"pg": "^8.13.0"
|
32
32
|
},
|
33
33
|
"peerDependencies": {
|
34
34
|
"drizzle-orm": "*"
|
package/test/drizzle.test.ts
CHANGED
@@ -51,7 +51,7 @@ function getDomain(host: HostProvider) {
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
|
54
|
-
function getDrizzleClient(type: string, branch: string) {
|
54
|
+
function getDrizzleClient(type: string, database: string, branch: string) {
|
55
55
|
if (type === 'http') {
|
56
56
|
const xata = new BaseClient({
|
57
57
|
apiKey,
|
@@ -77,17 +77,18 @@ function getDrizzleClient(type: string, branch: string) {
|
|
77
77
|
}
|
78
78
|
|
79
79
|
describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({ type }) => {
|
80
|
+
const dbName = `${database}-${type}`;
|
81
|
+
|
80
82
|
beforeAll(async () => {
|
81
83
|
await api.databases.createDatabase({
|
82
|
-
pathParams: { workspaceId: workspace, dbName
|
83
|
-
body: { region, branchName: 'main' }
|
84
|
-
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
|
84
|
+
pathParams: { workspaceId: workspace, dbName },
|
85
|
+
body: { region, branchName: 'main', postgresEnabled: true }
|
85
86
|
});
|
86
87
|
|
87
|
-
await waitForReplication();
|
88
|
+
await waitForReplication(dbName);
|
88
89
|
|
89
90
|
// For now, run the migrations via wire protocol
|
90
|
-
const { client, db } = getDrizzleClient('pg', 'main');
|
91
|
+
const { client, db } = getDrizzleClient('pg', dbName, 'main');
|
91
92
|
await client?.connect();
|
92
93
|
|
93
94
|
await db.execute(
|
@@ -154,17 +155,17 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
154
155
|
});
|
155
156
|
|
156
157
|
afterAll(async () => {
|
157
|
-
await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName
|
158
|
+
await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName } });
|
158
159
|
});
|
159
160
|
|
160
161
|
beforeEach(async (ctx) => {
|
161
162
|
ctx.branch = `test-${Math.random().toString(36).substring(7)}`;
|
162
163
|
await api.branch.createBranch({
|
163
|
-
pathParams: { workspace, region, dbBranchName: `${
|
164
|
+
pathParams: { workspace, region, dbBranchName: `${dbName}:${ctx.branch}` },
|
164
165
|
body: { from: 'main' }
|
165
166
|
});
|
166
167
|
|
167
|
-
const { db, client } = getDrizzleClient(type, ctx.branch);
|
168
|
+
const { db, client } = getDrizzleClient(type, dbName, ctx.branch);
|
168
169
|
await client?.connect();
|
169
170
|
|
170
171
|
ctx.db = db;
|
@@ -173,7 +174,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
173
174
|
|
174
175
|
afterEach(async (ctx) => {
|
175
176
|
await ctx.client?.end();
|
176
|
-
await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${
|
177
|
+
await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${dbName}:${ctx.branch}` } });
|
177
178
|
});
|
178
179
|
|
179
180
|
/*
|
@@ -6284,12 +6285,12 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
6284
6285
|
});
|
6285
6286
|
});
|
6286
6287
|
|
6287
|
-
async function waitForReplication(): Promise<void> {
|
6288
|
+
async function waitForReplication(dbName: string): Promise<void> {
|
6288
6289
|
try {
|
6289
6290
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
6290
|
-
await api.branch.getBranchList({ pathParams: { workspace, dbName
|
6291
|
+
await api.branch.getBranchList({ pathParams: { workspace, dbName, region } });
|
6291
6292
|
} catch (error) {
|
6292
6293
|
console.log(`Replication not ready yet, retrying...`);
|
6293
|
-
return await waitForReplication();
|
6294
|
+
return await waitForReplication(dbName);
|
6294
6295
|
}
|
6295
6296
|
}
|