@xata.io/drizzle 0.0.0-alpha.veb0d47bb2a60af38f961367b95acb62f9b6c31c7 → 0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @xata.io/drizzle@0.0.21 build /home/runner/work/client-ts/client-ts/packages/plugin-client-drizzle
2
+ > @xata.io/drizzle@0.0.22 build /home/runner/work/client-ts/client-ts/packages/plugin-client-drizzle
3
3
  > rimraf dist && rollup -c
4
4
 
5
5
  
@@ -8,10 +8,10 @@
8
8
  https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
9
9
  drizzle-orm (imported by "src/http/driver.ts", "src/http/session.ts" and "src/shared/utils.ts")
10
10
  drizzle-orm/pg-core (imported by "src/http/driver.ts" and "src/http/session.ts")
11
- created dist/index.cjs, dist/index.mjs in 257ms
11
+ created dist/index.cjs, dist/index.mjs in 290ms
12
12
  
13
13
  src/index.ts → dist/index.d.ts...
14
- created dist/index.d.ts in 5s
14
+ created dist/index.d.ts in 7.2s
15
15
  
16
16
  src/pg/index.ts → dist/pg.cjs, dist/pg.mjs...
17
17
  (!) Unresolved dependencies
@@ -19,7 +19,7 @@
19
19
  drizzle-orm (imported by "src/pg/driver.ts", "src/pg/session.ts" and "src/shared/utils.ts")
20
20
  drizzle-orm/pg-core (imported by "src/pg/driver.ts" and "src/pg/session.ts")
21
21
  pg (imported by "src/pg/session.ts")
22
- created dist/pg.cjs, dist/pg.mjs in 78ms
22
+ created dist/pg.cjs, dist/pg.mjs in 50ms
23
23
  
24
24
  src/pg/index.ts → dist/pg.d.ts...
25
- created dist/pg.d.ts in 1.4s
25
+ created dist/pg.d.ts in 1.5s
package/CHANGELOG.md CHANGED
@@ -1,17 +1,20 @@
1
1
  # @xata.io/drizzle
2
2
 
3
- ## 0.0.0-alpha.veb0d47bb2a60af38f961367b95acb62f9b6c31c7
4
-
5
- ### Major Changes
6
-
7
- - [#1473](https://github.com/xataio/client-ts/pull/1473) [`0a60b36`](https://github.com/xataio/client-ts/commit/0a60b3612f7fba050eb3c73b0b3b7a73e58ff26f) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Version 1.0
3
+ ## 0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3
8
4
 
9
5
  ### Patch Changes
10
6
 
11
7
  - Force canary build
12
8
 
13
- - Updated dependencies [[`6b754d2`](https://github.com/xataio/client-ts/commit/6b754d2f6a1f7b9378a96fe27502ff6c29ff5ed8), [`1b0b1a0`](https://github.com/xataio/client-ts/commit/1b0b1a09240cfcffc292cc5c17205eba10e5b054), [`0a60b36`](https://github.com/xataio/client-ts/commit/0a60b3612f7fba050eb3c73b0b3b7a73e58ff26f)]:
14
- - @xata.io/client@0.0.0-alpha.veb0d47bb2a60af38f961367b95acb62f9b6c31c7
9
+ - Updated dependencies []:
10
+ - @xata.io/client@0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3
11
+
12
+ ## 0.0.22
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`6b754d2`](https://github.com/xataio/client-ts/commit/6b754d2f6a1f7b9378a96fe27502ff6c29ff5ed8)]:
17
+ - @xata.io/client@0.29.5
15
18
 
16
19
  ## 0.0.21
17
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xata.io/drizzle",
3
- "version": "0.0.0-alpha.veb0d47bb2a60af38f961367b95acb62f9b6c31c7",
3
+ "version": "0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3",
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.veb0d47bb2a60af38f961367b95acb62f9b6c31c7"
26
+ "@xata.io/client": "0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/pg": "^8.11.6",
30
- "drizzle-orm": "^0.30.10",
31
- "pg": "^8.11.5"
30
+ "drizzle-orm": "^0.31.2",
31
+ "pg": "^8.12.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "drizzle-orm": "*"
@@ -53,16 +53,13 @@ function getDomain(host: HostProvider) {
53
53
 
54
54
  function getDrizzleClient(type: string, branch: string) {
55
55
  if (type === 'http') {
56
- const xata = new BaseClient(
57
- {
58
- apiKey,
59
- host,
60
- clientName: 'sdk-tests',
61
- databaseURL: `https://${workspace}.${region}.${getDomain(host)}/db/${database}`,
62
- branch
63
- },
64
- { tables: [] }
65
- );
56
+ const xata = new BaseClient({
57
+ apiKey,
58
+ host,
59
+ clientName: 'sdk-tests',
60
+ databaseURL: `https://${workspace}.${region}.${getDomain(host)}/db/${database}`,
61
+ branch
62
+ });
66
63
 
67
64
  return { db: drizzleHttp(xata, { schema, logger: ENABLE_LOGGING }) };
68
65
  } else if (type === 'pg') {
@@ -81,9 +78,10 @@ function getDrizzleClient(type: string, branch: string) {
81
78
 
82
79
  describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({ type }) => {
83
80
  beforeAll(async () => {
84
- await api.databases.createDatabase({
85
- pathParams: { workspaceId: workspace, dbName: database },
86
- body: { region, branchName: 'main' },
81
+ await api.database.createDatabase({
82
+ workspace,
83
+ database,
84
+ data: { region, branchName: 'main' },
87
85
  headers: { 'X-Features': 'feat-pgroll-migrations=1' }
88
86
  });
89
87
 
@@ -157,15 +155,12 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
157
155
  });
158
156
 
159
157
  afterAll(async () => {
160
- await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName: database } });
158
+ await api.database.deleteDatabase({ workspace, database });
161
159
  });
162
160
 
163
161
  beforeEach(async (ctx) => {
164
162
  ctx.branch = `test-${Math.random().toString(36).substring(7)}`;
165
- await api.branch.createBranch({
166
- pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` },
167
- body: { from: 'main' }
168
- });
163
+ await api.branches.createBranch({ workspace, database, region, branch: ctx.branch, from: 'main' });
169
164
 
170
165
  const { db, client } = getDrizzleClient(type, ctx.branch);
171
166
  await client?.connect();
@@ -176,7 +171,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
176
171
 
177
172
  afterEach(async (ctx) => {
178
173
  await ctx.client?.end();
179
- await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` } });
174
+ await api.branches.deleteBranch({ workspace, database, region, branch: ctx.branch });
180
175
  });
181
176
 
182
177
  /*
@@ -6290,7 +6285,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
6290
6285
  async function waitForReplication(): Promise<void> {
6291
6286
  try {
6292
6287
  await new Promise((resolve) => setTimeout(resolve, 2000));
6293
- await api.branch.getBranchList({ pathParams: { workspace, dbName: database, region } });
6288
+ await api.branches.getBranchList({ workspace, database, region });
6294
6289
  } catch (error) {
6295
6290
  console.log(`Replication not ready yet, retrying...`);
6296
6291
  return await waitForReplication();