@lunora/hyperdrive 1.0.0-alpha.120 → 1.0.0-alpha.122
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/global.d.mts +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/packem_shared/{types.d-IgdRydpF.d.mts → types.d-DpWhWTrT.d.mts} +20 -7
- package/dist/packem_shared/{types.d-IgdRydpF.d.ts → types.d-DpWhWTrT.d.ts} +20 -7
- package/package.json +3 -3
package/dist/global.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatabaseWriterLike } from '@lunora/shard-engine';
|
|
2
2
|
import { SqlExec, SqlDialect, SqlCtxDbOptions } from '@lunora/sql-store';
|
|
3
|
-
import { M as Mysql2Like, S as SqlClient } from "./packem_shared/types.d-
|
|
3
|
+
import { M as Mysql2Like, S as SqlClient } from "./packem_shared/types.d-DpWhWTrT.mjs";
|
|
4
4
|
import { VectorMetric, VectorizeIndexLike } from '@lunora/platform';
|
|
5
5
|
/**
|
|
6
6
|
* Minimal row-returning client (e.g. `@lunora/hyperdrive`'s `fromPostgresJs`/`fromNodePg`
|
package/dist/global.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatabaseWriterLike } from '@lunora/shard-engine';
|
|
2
2
|
import { SqlExec, SqlDialect, SqlCtxDbOptions } from '@lunora/sql-store';
|
|
3
|
-
import { M as Mysql2Like, S as SqlClient } from "./packem_shared/types.d-
|
|
3
|
+
import { M as Mysql2Like, S as SqlClient } from "./packem_shared/types.d-DpWhWTrT.js";
|
|
4
4
|
import { VectorMetric, VectorizeIndexLike } from '@lunora/platform';
|
|
5
5
|
/**
|
|
6
6
|
* Minimal row-returning client (e.g. `@lunora/hyperdrive`'s `fromPostgresJs`/`fromNodePg`
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HyperdriveLike, a as HyperdriveConnection, M as Mysql2Like, S as SqlClient, N as NodePgLike, P as PostgresJsLike } from "./packem_shared/types.d-
|
|
1
|
+
import { H as HyperdriveLike, a as HyperdriveConnection, M as Mysql2Like, S as SqlClient, N as NodePgLike, P as PostgresJsLike } from "./packem_shared/types.d-DpWhWTrT.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Surface a Cloudflare Hyperdrive binding as a connection ready to feed a
|
|
4
4
|
* user-supplied SQL driver.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HyperdriveLike, a as HyperdriveConnection, M as Mysql2Like, S as SqlClient, N as NodePgLike, P as PostgresJsLike } from "./packem_shared/types.d-
|
|
1
|
+
import { H as HyperdriveLike, a as HyperdriveConnection, M as Mysql2Like, S as SqlClient, N as NodePgLike, P as PostgresJsLike } from "./packem_shared/types.d-DpWhWTrT.js";
|
|
2
2
|
/**
|
|
3
3
|
* Surface a Cloudflare Hyperdrive binding as a connection ready to feed a
|
|
4
4
|
* user-supplied SQL driver.
|
|
@@ -124,14 +124,27 @@ interface PostgresJsLike {
|
|
|
124
124
|
* element as the rows.
|
|
125
125
|
*
|
|
126
126
|
* Method syntax, not an arrow property — see {@link PostgresJsLike} — but here
|
|
127
|
-
* that is necessary and NOT sufficient,
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
127
|
+
* that is necessary and NOT sufficient, which is why `params` is `unknown`.
|
|
128
|
+
*
|
|
129
|
+
* mysql2 types its second argument as a single `ExecuteValues`: a union of
|
|
130
|
+
* scalars, `ExecuteValues[]` and `{ [key: string]: ExecuteValues }`. Declared
|
|
131
|
+
* `params?: ReadonlyArray<unknown>` this projection could never accept the
|
|
132
|
+
* driver it projects — bivariance needs the two parameter types to relate in
|
|
133
|
+
* ONE direction and they relate in neither (`readonly unknown[] | undefined` is
|
|
134
|
+
* not an `ExecuteValues`, and a `string` is not an array).
|
|
135
|
+
*
|
|
136
|
+
* `unknown` is the narrowest supertype of `ExecuteValues` that does not restate
|
|
137
|
+
* mysql2's union here. Restating it would be the vacuous shim all over again —
|
|
138
|
+
* a local copy that drifts from the package it mirrors and makes the gate pass
|
|
139
|
+
* while a consumer fails.
|
|
140
|
+
*
|
|
141
|
+
* The looseness is confined to the INPUT position: this types the driver a
|
|
142
|
+
* caller hands to `fromMysql2`, not what anyone passes to
|
|
143
|
+
* {@link SqlClient.query}, which still declares `ReadonlyArray<unknown>`. Every
|
|
144
|
+
* call site in this package forwards an array, and the driver validates the
|
|
145
|
+
* values at runtime regardless.
|
|
133
146
|
*/
|
|
134
147
|
interface Mysql2Like {
|
|
135
|
-
execute(this: void, text: string, params?:
|
|
148
|
+
execute(this: void, text: string, params?: unknown): Promise<[unknown, unknown]>;
|
|
136
149
|
}
|
|
137
150
|
export { HyperdriveLike as H, Mysql2Like as M, NodePgLike as N, PostgresJsLike as P, SqlClient as S, HyperdriveConnection as a };
|
|
@@ -124,14 +124,27 @@ interface PostgresJsLike {
|
|
|
124
124
|
* element as the rows.
|
|
125
125
|
*
|
|
126
126
|
* Method syntax, not an arrow property — see {@link PostgresJsLike} — but here
|
|
127
|
-
* that is necessary and NOT sufficient,
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
127
|
+
* that is necessary and NOT sufficient, which is why `params` is `unknown`.
|
|
128
|
+
*
|
|
129
|
+
* mysql2 types its second argument as a single `ExecuteValues`: a union of
|
|
130
|
+
* scalars, `ExecuteValues[]` and `{ [key: string]: ExecuteValues }`. Declared
|
|
131
|
+
* `params?: ReadonlyArray<unknown>` this projection could never accept the
|
|
132
|
+
* driver it projects — bivariance needs the two parameter types to relate in
|
|
133
|
+
* ONE direction and they relate in neither (`readonly unknown[] | undefined` is
|
|
134
|
+
* not an `ExecuteValues`, and a `string` is not an array).
|
|
135
|
+
*
|
|
136
|
+
* `unknown` is the narrowest supertype of `ExecuteValues` that does not restate
|
|
137
|
+
* mysql2's union here. Restating it would be the vacuous shim all over again —
|
|
138
|
+
* a local copy that drifts from the package it mirrors and makes the gate pass
|
|
139
|
+
* while a consumer fails.
|
|
140
|
+
*
|
|
141
|
+
* The looseness is confined to the INPUT position: this types the driver a
|
|
142
|
+
* caller hands to `fromMysql2`, not what anyone passes to
|
|
143
|
+
* {@link SqlClient.query}, which still declares `ReadonlyArray<unknown>`. Every
|
|
144
|
+
* call site in this package forwards an array, and the driver validates the
|
|
145
|
+
* values at runtime regardless.
|
|
133
146
|
*/
|
|
134
147
|
interface Mysql2Like {
|
|
135
|
-
execute(this: void, text: string, params?:
|
|
148
|
+
execute(this: void, text: string, params?: unknown): Promise<[unknown, unknown]>;
|
|
136
149
|
}
|
|
137
150
|
export { HyperdriveLike as H, Mysql2Like as M, NodePgLike as N, PostgresJsLike as P, SqlClient as S, HyperdriveConnection as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/hyperdrive",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.122",
|
|
4
4
|
"description": "Bring-your-own Postgres/MySQL for Lunora via Cloudflare Hyperdrive: a driver-agnostic, action-only ctx.sql",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@lunora/errors": "1.0.0-alpha.39",
|
|
54
54
|
"@lunora/platform": "1.0.0-alpha.32",
|
|
55
|
-
"@lunora/shard-engine": "1.0.0-alpha.
|
|
56
|
-
"@lunora/sql-store": "1.0.0-alpha.
|
|
55
|
+
"@lunora/shard-engine": "1.0.0-alpha.74",
|
|
56
|
+
"@lunora/sql-store": "1.0.0-alpha.125",
|
|
57
57
|
"drizzle-orm": "^0.45.2"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|