@zintrust/db-d1 0.4.92 → 0.4.94

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,14 +1,14 @@
1
1
  {
2
2
  "name": "@zintrust/db-d1",
3
- "version": "0.4.92",
4
- "buildDate": "2026-04-10T08:36:02.784Z",
3
+ "version": "0.4.94",
4
+ "buildDate": "2026-04-11T09:19:22.738Z",
5
5
  "buildEnvironment": {
6
6
  "node": "v20.20.2",
7
7
  "platform": "linux",
8
8
  "arch": "x64"
9
9
  },
10
10
  "git": {
11
- "commit": "d195a996",
11
+ "commit": "785d0351",
12
12
  "branch": "master"
13
13
  },
14
14
  "package": {
@@ -23,15 +23,15 @@
23
23
  "files": {
24
24
  "build-manifest.json": {
25
25
  "size": 943,
26
- "sha256": "52a3f5060392ec4070939994167586ac6e8c64515b78c264f2ff6c6be0cda80e"
26
+ "sha256": "133d7ab0f8098f2a2a3af74455219c39b8a4baf3546e12cfd1564e5ed7e42579"
27
27
  },
28
28
  "index.d.ts": {
29
29
  "size": 1736,
30
30
  "sha256": "364c53002dba14622807b373485ade98cb33ee3e53a2077d3a9a79db4eec828c"
31
31
  },
32
32
  "index.js": {
33
- "size": 4442,
34
- "sha256": "a9f777c8fda8ab3743669331d98b5a5676c250b0a1e1005065c51e4e25343699"
33
+ "size": 4526,
34
+ "sha256": "bd8fa652853d3e9ef84c4583bfb1e6e4b1e90bd0267fab103affadc9876ff57a"
35
35
  },
36
36
  "register.d.ts": {
37
37
  "size": 177,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Cloudflare, ErrorFactory, FeatureFlags, Logger, QueryBuilder } from '@zintrust/core';
1
+ import { BaseAdapter, Cloudflare, ErrorFactory, FeatureFlags, Logger, QueryBuilder, } from '@zintrust/core';
2
2
  function getD1Binding(config) {
3
3
  return Cloudflare.getD1Binding(config);
4
4
  }
@@ -22,7 +22,7 @@ async function queryD1(config, sql, parameters) {
22
22
  try {
23
23
  const stmt = db.prepare(sql);
24
24
  const result = await stmt.bind(...parameters).all();
25
- const rows = result.results ?? [];
25
+ const rows = BaseAdapter.normalizeRows(result.results ?? []);
26
26
  return { rows, rowCount: rows.length };
27
27
  }
28
28
  catch (error) {
@@ -34,7 +34,7 @@ async function queryOneD1(config, sql, parameters) {
34
34
  try {
35
35
  const stmt = db.prepare(sql);
36
36
  const result = await stmt.bind(...parameters).first();
37
- return result ?? null;
37
+ return result === null ? null : BaseAdapter.normalizeRow(result);
38
38
  }
39
39
  catch (error) {
40
40
  throw ErrorFactory.createTryCatchError(`D1 queryOne failed: ${sql}`, error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/db-d1",
3
- "version": "0.4.92",
3
+ "version": "0.4.94",
4
4
  "description": "Cloudflare D1 database adapter for ZinTrust.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "node": ">=20.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@zintrust/core": "^0.4.91"
26
+ "@zintrust/core": "^0.4.93"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"