@prisma-next/extension-pgvector 0.3.0-dev.34 → 0.3.0-dev.36
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 +11 -8
- package/dist/codec-types.d.mts +41 -0
- package/dist/codec-types.d.mts.map +1 -0
- package/dist/codec-types.mjs +1 -0
- package/dist/{exports/column-types.d.ts → column-types.d.mts} +14 -15
- package/dist/column-types.d.mts.map +1 -0
- package/dist/column-types.mjs +36 -0
- package/dist/column-types.mjs.map +1 -0
- package/dist/constants-BmZpaev5.mjs +13 -0
- package/dist/constants-BmZpaev5.mjs.map +1 -0
- package/dist/control.d.mts +7 -0
- package/dist/control.d.mts.map +1 -0
- package/dist/control.mjs +49 -0
- package/dist/control.mjs.map +1 -0
- package/dist/descriptor-meta-BADTQp0u.mjs +57 -0
- package/dist/descriptor-meta-BADTQp0u.mjs.map +1 -0
- package/dist/operation-types.d.mts +32 -0
- package/dist/operation-types.d.mts.map +1 -0
- package/dist/operation-types.mjs +1 -0
- package/dist/pack.d.mts +46 -0
- package/dist/pack.d.mts.map +1 -0
- package/dist/pack.mjs +9 -0
- package/dist/pack.mjs.map +1 -0
- package/dist/runtime.d.mts +7 -0
- package/dist/runtime.d.mts.map +1 -0
- package/dist/runtime.mjs +74 -0
- package/dist/runtime.mjs.map +1 -0
- package/package.json +32 -44
- package/src/core/descriptor-meta.ts +6 -20
- package/src/exports/control.ts +2 -13
- package/src/exports/runtime.ts +14 -38
- package/dist/chunk-DSJTFXJR.js +0 -73
- package/dist/chunk-DSJTFXJR.js.map +0 -1
- package/dist/chunk-MUHUVAQX.js +0 -9
- package/dist/chunk-MUHUVAQX.js.map +0 -1
- package/dist/core/codecs.d.ts +0 -23
- package/dist/core/codecs.d.ts.map +0 -1
- package/dist/core/constants.d.ts +0 -9
- package/dist/core/constants.d.ts.map +0 -1
- package/dist/core/descriptor-meta.d.ts +0 -61
- package/dist/core/descriptor-meta.d.ts.map +0 -1
- package/dist/exports/codec-types.d.ts +0 -7
- package/dist/exports/codec-types.d.ts.map +0 -1
- package/dist/exports/codec-types.js +0 -1
- package/dist/exports/codec-types.js.map +0 -1
- package/dist/exports/column-types.d.ts.map +0 -1
- package/dist/exports/column-types.js +0 -27
- package/dist/exports/column-types.js.map +0 -1
- package/dist/exports/control.d.ts +0 -9
- package/dist/exports/control.d.ts.map +0 -1
- package/dist/exports/control.js +0 -67
- package/dist/exports/control.js.map +0 -1
- package/dist/exports/operation-types.d.ts +0 -7
- package/dist/exports/operation-types.d.ts.map +0 -1
- package/dist/exports/operation-types.js +0 -1
- package/dist/exports/operation-types.js.map +0 -1
- package/dist/exports/pack.d.ts +0 -60
- package/dist/exports/pack.d.ts.map +0 -1
- package/dist/exports/pack.js +0 -11
- package/dist/exports/pack.js.map +0 -1
- package/dist/exports/runtime.d.ts +0 -8
- package/dist/exports/runtime.d.ts.map +0 -1
- package/dist/exports/runtime.js +0 -112
- package/dist/exports/runtime.js.map +0 -1
- package/dist/types/codec-types.d.ts +0 -34
- package/dist/types/codec-types.d.ts.map +0 -1
- package/dist/types/operation-types.d.ts +0 -31
- package/dist/types/operation-types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -91,19 +91,22 @@ export const contract = defineContract<AllCodecTypes>()
|
|
|
91
91
|
|
|
92
92
|
### Runtime Setup
|
|
93
93
|
|
|
94
|
-
Register the extension when creating your
|
|
94
|
+
Register the extension when creating your execution stack:
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
|
-
import {
|
|
98
|
-
import {
|
|
97
|
+
import { instantiateExecutionStack } from '@prisma-next/core-execution-plane/stack';
|
|
98
|
+
import { createExecutionContext, createSqlExecutionStack } from '@prisma-next/sql-runtime';
|
|
99
|
+
import postgresAdapter from '@prisma-next/adapter-postgres/runtime';
|
|
100
|
+
import postgresTarget from '@prisma-next/target-postgres/runtime';
|
|
99
101
|
import pgvector from '@prisma-next/extension-pgvector/runtime';
|
|
100
102
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
extensions: [pgvector()],
|
|
103
|
+
const stack = createSqlExecutionStack({
|
|
104
|
+
target: postgresTarget,
|
|
105
|
+
adapter: postgresAdapter,
|
|
106
|
+
extensionPacks: [pgvector],
|
|
106
107
|
});
|
|
108
|
+
const context = createExecutionContext({ contract, stack });
|
|
109
|
+
const stackInstance = instantiateExecutionStack(stack);
|
|
107
110
|
```
|
|
108
111
|
|
|
109
112
|
### Query Usage
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as _prisma_next_sql_relational_core_ast0 from "@prisma-next/sql-relational-core/ast";
|
|
2
|
+
|
|
3
|
+
//#region src/core/codecs.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Vector codec implementation for pgvector extension.
|
|
7
|
+
*
|
|
8
|
+
* Provides encoding/decoding for the `vector` PostgreSQL type.
|
|
9
|
+
* Wire format is a string like `[1,2,3]` (PostgreSQL vector text format).
|
|
10
|
+
*/
|
|
11
|
+
declare const codecs: _prisma_next_sql_relational_core_ast0.CodecDefBuilder<{} & Record<"vector", _prisma_next_sql_relational_core_ast0.Codec<"pg/vector@1", string, number[], Record<string, unknown>, unknown>>>;
|
|
12
|
+
type CodecTypes$1 = typeof codecs.CodecTypes;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/types/codec-types.d.ts
|
|
15
|
+
/**
|
|
16
|
+
* Type-level branded vector.
|
|
17
|
+
*
|
|
18
|
+
* The runtime values are plain number arrays, but parameterized column typing can
|
|
19
|
+
* carry the dimension at the type level (e.g. Vector<1536>).
|
|
20
|
+
*/
|
|
21
|
+
type Vector<N$1 extends number = number> = number[] & {
|
|
22
|
+
readonly __vectorLength?: N$1;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Codec types for pgvector.
|
|
26
|
+
*
|
|
27
|
+
* - Scalar output remains `number[]` (runtime representation).
|
|
28
|
+
* - `parameterizedOutput` enables lane typing to compute `Vector<N>` from column `typeParams`.
|
|
29
|
+
*/
|
|
30
|
+
type CodecTypes = CodecTypes$1 & {
|
|
31
|
+
readonly 'pg/vector@1': CodecTypes$1['pg/vector@1'] & {
|
|
32
|
+
readonly parameterizedOutput: <P extends {
|
|
33
|
+
readonly length: number;
|
|
34
|
+
}>(params: P) => P extends {
|
|
35
|
+
readonly length: infer N extends number;
|
|
36
|
+
} ? Vector<N> : Vector<number>;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { type CodecTypes, type Vector };
|
|
41
|
+
//# sourceMappingURL=codec-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec-types.d.mts","names":[],"sources":["../src/core/codecs.ts","../src/types/codec-types.ts"],"sourcesContent":[],"mappings":";;;;;;;AA0DY;;;cAAN,MAAM,EAAA,qCAAA,CAAA,eAAA,CAAA,CAAA,CAAA,GAAA,MAAA,CAAA,QAAA,EAAA,qCAAA,CAAA,KAAA,CAAA,aAAA,EAAA,MAAA,EAAA,MAAA,EAAA,EAAA,MAAA,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,CAAA,CAAA,CAAA;AC7BqD,KDoCrD,YAAA,GCpCqD,ODoCjC,MAAA,CAAO,UCpC0B;;;ADoCjE;;;;AChDA;AAQA;AAAyB,KARb,MAQa,CAAA,YAAA,MAAA,GAAA,MAAA,CAAA,GAAA,MAAA,EAAA,GAAA;EACC,SAAA,cAAA,CAAA,EAT6D,GAS7D;CAEZ;;;;;;;KAHF,UAAA,GAAa;0BACC;;;eAEZ,MACL;;QAAwD,OAAO,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* They are derived from the same source of truth as codec definitions and manifests.
|
|
6
|
-
*/
|
|
7
|
-
import type { ColumnTypeDescriptor } from '@prisma-next/contract-authoring';
|
|
1
|
+
import { ColumnTypeDescriptor } from "@prisma-next/contract-authoring";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/column-types.d.ts
|
|
4
|
+
|
|
8
5
|
/**
|
|
9
6
|
* Static vector column descriptor without dimension.
|
|
10
7
|
* Use `vector(N)` for dimensioned vectors that produce `vector(N)` DDL.
|
|
11
8
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
declare const vectorColumn: {
|
|
10
|
+
readonly codecId: "pg/vector@1";
|
|
11
|
+
readonly nativeType: "vector";
|
|
15
12
|
};
|
|
16
13
|
/**
|
|
17
14
|
* Factory for creating dimensioned vector column descriptors.
|
|
@@ -26,9 +23,11 @@ export declare const vectorColumn: {
|
|
|
26
23
|
* @returns A column type descriptor with `typeParams.length` set
|
|
27
24
|
* @throws {RangeError} If length is not an integer in the range [1, VECTOR_MAX_DIM]
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
declare function vector<N extends number>(length: N): ColumnTypeDescriptor & {
|
|
27
|
+
readonly typeParams: {
|
|
28
|
+
readonly length: N;
|
|
29
|
+
};
|
|
33
30
|
};
|
|
34
|
-
//#
|
|
31
|
+
//#endregion
|
|
32
|
+
export { vector, vectorColumn };
|
|
33
|
+
//# sourceMappingURL=column-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-types.d.mts","names":[],"sources":["../src/exports/column-types.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAca;;;;;;;;;;;;;;;;;iBAkBG,iCACN,IACP;;qBAAiE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { n as VECTOR_MAX_DIM, t as VECTOR_CODEC_ID } from "./constants-BmZpaev5.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/column-types.ts
|
|
4
|
+
/**
|
|
5
|
+
* Static vector column descriptor without dimension.
|
|
6
|
+
* Use `vector(N)` for dimensioned vectors that produce `vector(N)` DDL.
|
|
7
|
+
*/
|
|
8
|
+
const vectorColumn = {
|
|
9
|
+
codecId: VECTOR_CODEC_ID,
|
|
10
|
+
nativeType: "vector"
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Factory for creating dimensioned vector column descriptors.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* .column('embedding', { type: vector(1536), nullable: false })
|
|
18
|
+
* // Produces: nativeType: 'vector(1536)', typeParams: { length: 1536 }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param length - The dimension of the vector (e.g., 1536 for OpenAI embeddings)
|
|
22
|
+
* @returns A column type descriptor with `typeParams.length` set
|
|
23
|
+
* @throws {RangeError} If length is not an integer in the range [1, VECTOR_MAX_DIM]
|
|
24
|
+
*/
|
|
25
|
+
function vector(length) {
|
|
26
|
+
if (!Number.isInteger(length) || length < 1 || length > VECTOR_MAX_DIM) throw new RangeError(`pgvector: dimension must be an integer in [1, ${VECTOR_MAX_DIM}], got ${length}`);
|
|
27
|
+
return {
|
|
28
|
+
codecId: VECTOR_CODEC_ID,
|
|
29
|
+
nativeType: `vector(${length})`,
|
|
30
|
+
typeParams: { length }
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { vector, vectorColumn };
|
|
36
|
+
//# sourceMappingURL=column-types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-types.mjs","names":[],"sources":["../src/exports/column-types.ts"],"sourcesContent":["/**\n * Column type descriptors for pgvector extension.\n *\n * These descriptors provide both codecId and nativeType for use in contract authoring.\n * They are derived from the same source of truth as codec definitions and manifests.\n */\n\nimport type { ColumnTypeDescriptor } from '@prisma-next/contract-authoring';\nimport { VECTOR_CODEC_ID, VECTOR_MAX_DIM } from '../core/constants';\n\n/**\n * Static vector column descriptor without dimension.\n * Use `vector(N)` for dimensioned vectors that produce `vector(N)` DDL.\n */\nexport const vectorColumn = {\n codecId: VECTOR_CODEC_ID,\n nativeType: 'vector',\n} as const satisfies ColumnTypeDescriptor;\n\n/**\n * Factory for creating dimensioned vector column descriptors.\n *\n * @example\n * ```typescript\n * .column('embedding', { type: vector(1536), nullable: false })\n * // Produces: nativeType: 'vector(1536)', typeParams: { length: 1536 }\n * ```\n *\n * @param length - The dimension of the vector (e.g., 1536 for OpenAI embeddings)\n * @returns A column type descriptor with `typeParams.length` set\n * @throws {RangeError} If length is not an integer in the range [1, VECTOR_MAX_DIM]\n */\nexport function vector<N extends number>(\n length: N,\n): ColumnTypeDescriptor & { readonly typeParams: { readonly length: N } } {\n if (!Number.isInteger(length) || length < 1 || length > VECTOR_MAX_DIM) {\n throw new RangeError(\n `pgvector: dimension must be an integer in [1, ${VECTOR_MAX_DIM}], got ${length}`,\n );\n }\n return {\n codecId: VECTOR_CODEC_ID,\n nativeType: `vector(${length})`,\n typeParams: { length },\n } as const;\n}\n"],"mappings":";;;;;;;AAcA,MAAa,eAAe;CAC1B,SAAS;CACT,YAAY;CACb;;;;;;;;;;;;;;AAeD,SAAgB,OACd,QACwE;AACxE,KAAI,CAAC,OAAO,UAAU,OAAO,IAAI,SAAS,KAAK,SAAS,eACtD,OAAM,IAAI,WACR,iDAAiD,eAAe,SAAS,SAC1E;AAEH,QAAO;EACL,SAAS;EACT,YAAY,UAAU,OAAO;EAC7B,YAAY,EAAE,QAAQ;EACvB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/core/constants.ts
|
|
2
|
+
/**
|
|
3
|
+
* Codec ID for pgvector's vector type.
|
|
4
|
+
*/
|
|
5
|
+
const VECTOR_CODEC_ID = "pg/vector@1";
|
|
6
|
+
/**
|
|
7
|
+
* Maximum dimension for pgvector vectors (VECTOR_MAX_DIM from pgvector).
|
|
8
|
+
*/
|
|
9
|
+
const VECTOR_MAX_DIM = 16e3;
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { VECTOR_MAX_DIM as n, VECTOR_CODEC_ID as t };
|
|
13
|
+
//# sourceMappingURL=constants-BmZpaev5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-BmZpaev5.mjs","names":[],"sources":["../src/core/constants.ts"],"sourcesContent":["/**\n * Codec ID for pgvector's vector type.\n */\nexport const VECTOR_CODEC_ID = 'pg/vector@1' as const;\n\n/**\n * Maximum dimension for pgvector vectors (VECTOR_MAX_DIM from pgvector).\n */\nexport const VECTOR_MAX_DIM = 16000;\n"],"mappings":";;;;AAGA,MAAa,kBAAkB;;;;AAK/B,MAAa,iBAAiB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SqlControlExtensionDescriptor } from "@prisma-next/family-sql/control";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/control.d.ts
|
|
4
|
+
declare const pgvectorExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { pgvectorExtensionDescriptor as default, pgvectorExtensionDescriptor };
|
|
7
|
+
//# sourceMappingURL=control.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/exports/control.ts"],"sourcesContent":[],"mappings":";;;cA0DM,6BAA6B"}
|
package/dist/control.mjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { n as pgvectorPackMeta, t as pgvectorOperationSignature } from "./descriptor-meta-BADTQp0u.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/control.ts
|
|
4
|
+
function verifyVectorExtensionInstalled(schema) {
|
|
5
|
+
if (!schema.extensions.includes("vector")) return [{
|
|
6
|
+
kind: "extension_missing",
|
|
7
|
+
table: "",
|
|
8
|
+
message: "Extension \"vector\" is missing from database (required by pgvector)"
|
|
9
|
+
}];
|
|
10
|
+
return [];
|
|
11
|
+
}
|
|
12
|
+
const pgvectorDatabaseDependencies = { init: [{
|
|
13
|
+
id: "postgres.extension.vector",
|
|
14
|
+
label: "Enable vector extension",
|
|
15
|
+
install: [{
|
|
16
|
+
id: "extension.vector",
|
|
17
|
+
label: "Enable extension \"vector\"",
|
|
18
|
+
summary: "Ensures the vector extension is available for pgvector operations",
|
|
19
|
+
operationClass: "additive",
|
|
20
|
+
target: { id: "postgres" },
|
|
21
|
+
precheck: [{
|
|
22
|
+
description: "verify extension \"vector\" is not already enabled",
|
|
23
|
+
sql: "SELECT NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector')"
|
|
24
|
+
}],
|
|
25
|
+
execute: [{
|
|
26
|
+
description: "create extension \"vector\"",
|
|
27
|
+
sql: "CREATE EXTENSION IF NOT EXISTS vector"
|
|
28
|
+
}],
|
|
29
|
+
postcheck: [{
|
|
30
|
+
description: "confirm extension \"vector\" is enabled",
|
|
31
|
+
sql: "SELECT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector')"
|
|
32
|
+
}]
|
|
33
|
+
}],
|
|
34
|
+
verifyDatabaseDependencyInstalled: verifyVectorExtensionInstalled
|
|
35
|
+
}] };
|
|
36
|
+
const pgvectorExtensionDescriptor = {
|
|
37
|
+
...pgvectorPackMeta,
|
|
38
|
+
operationSignatures: () => [pgvectorOperationSignature],
|
|
39
|
+
databaseDependencies: pgvectorDatabaseDependencies,
|
|
40
|
+
create: () => ({
|
|
41
|
+
familyId: "sql",
|
|
42
|
+
targetId: "postgres"
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
var control_default = pgvectorExtensionDescriptor;
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { control_default as default, pgvectorExtensionDescriptor };
|
|
49
|
+
//# sourceMappingURL=control.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control.mjs","names":["pgvectorDatabaseDependencies: ComponentDatabaseDependencies<unknown>","pgvectorExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'>"],"sources":["../src/exports/control.ts"],"sourcesContent":["import type { SchemaIssue } from '@prisma-next/core-control-plane/types';\nimport type {\n ComponentDatabaseDependencies,\n SqlControlExtensionDescriptor,\n} from '@prisma-next/family-sql/control';\nimport type { SqlSchemaIR } from '@prisma-next/sql-schema-ir/types';\nimport { pgvectorOperationSignature, pgvectorPackMeta } from '../core/descriptor-meta';\n\nfunction verifyVectorExtensionInstalled(schema: SqlSchemaIR): readonly SchemaIssue[] {\n if (!schema.extensions.includes('vector')) {\n return [\n {\n kind: 'extension_missing',\n table: '',\n message: 'Extension \"vector\" is missing from database (required by pgvector)',\n },\n ];\n }\n return [];\n}\n\nconst pgvectorDatabaseDependencies: ComponentDatabaseDependencies<unknown> = {\n init: [\n {\n id: 'postgres.extension.vector',\n label: 'Enable vector extension',\n install: [\n {\n id: 'extension.vector',\n label: 'Enable extension \"vector\"',\n summary: 'Ensures the vector extension is available for pgvector operations',\n operationClass: 'additive',\n target: { id: 'postgres' },\n precheck: [\n {\n description: 'verify extension \"vector\" is not already enabled',\n sql: \"SELECT NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector')\",\n },\n ],\n execute: [\n {\n description: 'create extension \"vector\"',\n sql: 'CREATE EXTENSION IF NOT EXISTS vector',\n },\n ],\n postcheck: [\n {\n description: 'confirm extension \"vector\" is enabled',\n sql: \"SELECT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'vector')\",\n },\n ],\n },\n ],\n verifyDatabaseDependencyInstalled: verifyVectorExtensionInstalled,\n },\n ],\n};\n\nconst pgvectorExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> = {\n ...pgvectorPackMeta,\n operationSignatures: () => [pgvectorOperationSignature],\n databaseDependencies: pgvectorDatabaseDependencies,\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n};\n\nexport { pgvectorExtensionDescriptor };\nexport default pgvectorExtensionDescriptor;\n"],"mappings":";;;AAQA,SAAS,+BAA+B,QAA6C;AACnF,KAAI,CAAC,OAAO,WAAW,SAAS,SAAS,CACvC,QAAO,CACL;EACE,MAAM;EACN,OAAO;EACP,SAAS;EACV,CACF;AAEH,QAAO,EAAE;;AAGX,MAAMA,+BAAuE,EAC3E,MAAM,CACJ;CACE,IAAI;CACJ,OAAO;CACP,SAAS,CACP;EACE,IAAI;EACJ,OAAO;EACP,SAAS;EACT,gBAAgB;EAChB,QAAQ,EAAE,IAAI,YAAY;EAC1B,UAAU,CACR;GACE,aAAa;GACb,KAAK;GACN,CACF;EACD,SAAS,CACP;GACE,aAAa;GACb,KAAK;GACN,CACF;EACD,WAAW,CACT;GACE,aAAa;GACb,KAAK;GACN,CACF;EACF,CACF;CACD,mCAAmC;CACpC,CACF,EACF;AAED,MAAMC,8BAAyE;CAC7E,GAAG;CACH,2BAA2B,CAAC,2BAA2B;CACvD,sBAAsB;CACtB,eAAe;EACb,UAAU;EACV,UAAU;EACX;CACF;AAGD,sBAAe"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//#region src/core/descriptor-meta.ts
|
|
2
|
+
const pgvectorTypeId = "pg/vector@1";
|
|
3
|
+
const cosineDistanceOperation = Object.freeze({
|
|
4
|
+
method: "cosineDistance",
|
|
5
|
+
args: [{ kind: "param" }],
|
|
6
|
+
returns: {
|
|
7
|
+
kind: "builtin",
|
|
8
|
+
type: "number"
|
|
9
|
+
},
|
|
10
|
+
lowering: {
|
|
11
|
+
targetFamily: "sql",
|
|
12
|
+
strategy: "function",
|
|
13
|
+
template: "1 - ({{self}} <=> {{arg0}})"
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const pgvectorOperationSignature = {
|
|
17
|
+
forTypeId: pgvectorTypeId,
|
|
18
|
+
...cosineDistanceOperation
|
|
19
|
+
};
|
|
20
|
+
const pgvectorPackMeta = {
|
|
21
|
+
kind: "extension",
|
|
22
|
+
id: "pgvector",
|
|
23
|
+
familyId: "sql",
|
|
24
|
+
targetId: "postgres",
|
|
25
|
+
version: "0.0.1",
|
|
26
|
+
capabilities: { postgres: { "pgvector/cosine": true } },
|
|
27
|
+
types: {
|
|
28
|
+
codecTypes: {
|
|
29
|
+
import: {
|
|
30
|
+
package: "@prisma-next/extension-pgvector/codec-types",
|
|
31
|
+
named: "CodecTypes",
|
|
32
|
+
alias: "PgVectorTypes"
|
|
33
|
+
},
|
|
34
|
+
typeImports: [{
|
|
35
|
+
package: "@prisma-next/extension-pgvector/codec-types",
|
|
36
|
+
named: "Vector",
|
|
37
|
+
alias: "Vector"
|
|
38
|
+
}],
|
|
39
|
+
parameterized: { [pgvectorTypeId]: "Vector<{{length}}>" }
|
|
40
|
+
},
|
|
41
|
+
operationTypes: { import: {
|
|
42
|
+
package: "@prisma-next/extension-pgvector/operation-types",
|
|
43
|
+
named: "OperationTypes",
|
|
44
|
+
alias: "PgVectorOperationTypes"
|
|
45
|
+
} },
|
|
46
|
+
storage: [{
|
|
47
|
+
typeId: pgvectorTypeId,
|
|
48
|
+
familyId: "sql",
|
|
49
|
+
targetId: "postgres",
|
|
50
|
+
nativeType: "vector"
|
|
51
|
+
}]
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { pgvectorPackMeta as n, pgvectorOperationSignature as t };
|
|
57
|
+
//# sourceMappingURL=descriptor-meta-BADTQp0u.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-BADTQp0u.mjs","names":["pgvectorOperationSignature: SqlOperationSignature"],"sources":["../src/core/descriptor-meta.ts"],"sourcesContent":["import type { SqlOperationSignature } from '@prisma-next/sql-operations';\n\nconst pgvectorTypeId = 'pg/vector@1' as const;\n\nconst cosineLowering = {\n targetFamily: 'sql',\n strategy: 'function',\n template: '1 - ({{self}} <=> {{arg0}})',\n} as const;\n\nconst cosineDistanceOperation = Object.freeze({\n method: 'cosineDistance',\n args: [{ kind: 'param' }],\n returns: { kind: 'builtin', type: 'number' },\n lowering: cosineLowering,\n} as const);\n\nexport const pgvectorOperationSignature: SqlOperationSignature = {\n forTypeId: pgvectorTypeId,\n ...cosineDistanceOperation,\n};\n\nexport const pgvectorPackMeta = {\n kind: 'extension',\n id: 'pgvector',\n familyId: 'sql',\n targetId: 'postgres',\n version: '0.0.1',\n capabilities: {\n postgres: {\n 'pgvector/cosine': true,\n },\n },\n types: {\n codecTypes: {\n import: {\n package: '@prisma-next/extension-pgvector/codec-types',\n named: 'CodecTypes',\n alias: 'PgVectorTypes',\n },\n typeImports: [\n {\n package: '@prisma-next/extension-pgvector/codec-types',\n named: 'Vector',\n alias: 'Vector',\n },\n ],\n parameterized: {\n [pgvectorTypeId]: 'Vector<{{length}}>',\n },\n },\n operationTypes: {\n import: {\n package: '@prisma-next/extension-pgvector/operation-types',\n named: 'OperationTypes',\n alias: 'PgVectorOperationTypes',\n },\n },\n storage: [\n { typeId: pgvectorTypeId, familyId: 'sql', targetId: 'postgres', nativeType: 'vector' },\n ],\n },\n} as const;\n"],"mappings":";AAEA,MAAM,iBAAiB;AAQvB,MAAM,0BAA0B,OAAO,OAAO;CAC5C,QAAQ;CACR,MAAM,CAAC,EAAE,MAAM,SAAS,CAAC;CACzB,SAAS;EAAE,MAAM;EAAW,MAAM;EAAU;CAC5C,UAVqB;EACrB,cAAc;EACd,UAAU;EACV,UAAU;EACX;CAOA,CAAU;AAEX,MAAaA,6BAAoD;CAC/D,WAAW;CACX,GAAG;CACJ;AAED,MAAa,mBAAmB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,cAAc,EACZ,UAAU,EACR,mBAAmB,MACpB,EACF;CACD,OAAO;EACL,YAAY;GACV,QAAQ;IACN,SAAS;IACT,OAAO;IACP,OAAO;IACR;GACD,aAAa,CACX;IACE,SAAS;IACT,OAAO;IACP,OAAO;IACR,CACF;GACD,eAAe,GACZ,iBAAiB,sBACnB;GACF;EACD,gBAAgB,EACd,QAAQ;GACN,SAAS;GACT,OAAO;GACP,OAAO;GACR,EACF;EACD,SAAS,CACP;GAAE,QAAQ;GAAgB,UAAU;GAAO,UAAU;GAAY,YAAY;GAAU,CACxF;EACF;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region src/types/operation-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Operation type definitions for pgvector extension.
|
|
4
|
+
*
|
|
5
|
+
* This file exports type-only definitions for operation method signatures.
|
|
6
|
+
* These types are imported by contract.d.ts files for compile-time type inference.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Operation types for pgvector extension.
|
|
10
|
+
* Maps typeId to operation methods.
|
|
11
|
+
*/
|
|
12
|
+
type OperationTypes = {
|
|
13
|
+
readonly 'pg/vector@1': {
|
|
14
|
+
readonly cosineDistance: {
|
|
15
|
+
readonly args: readonly [{
|
|
16
|
+
readonly kind: 'param';
|
|
17
|
+
}];
|
|
18
|
+
readonly returns: {
|
|
19
|
+
readonly kind: 'builtin';
|
|
20
|
+
readonly type: 'number';
|
|
21
|
+
};
|
|
22
|
+
readonly lowering: {
|
|
23
|
+
readonly targetFamily: 'sql';
|
|
24
|
+
readonly strategy: 'function';
|
|
25
|
+
readonly template: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { type OperationTypes };
|
|
32
|
+
//# sourceMappingURL=operation-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-types.d.mts","names":[],"sources":["../src/types/operation-types.ts"],"sourcesContent":[],"mappings":";;AAWA;;;;;;;;;KAAY,cAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/pack.d.mts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//#region src/exports/pack.d.ts
|
|
2
|
+
declare const pgvectorPack: {
|
|
3
|
+
readonly kind: "extension";
|
|
4
|
+
readonly id: "pgvector";
|
|
5
|
+
readonly familyId: "sql";
|
|
6
|
+
readonly targetId: "postgres";
|
|
7
|
+
readonly version: "0.0.1";
|
|
8
|
+
readonly capabilities: {
|
|
9
|
+
readonly postgres: {
|
|
10
|
+
readonly 'pgvector/cosine': true;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
readonly types: {
|
|
14
|
+
readonly codecTypes: {
|
|
15
|
+
readonly import: {
|
|
16
|
+
readonly package: "@prisma-next/extension-pgvector/codec-types";
|
|
17
|
+
readonly named: "CodecTypes";
|
|
18
|
+
readonly alias: "PgVectorTypes";
|
|
19
|
+
};
|
|
20
|
+
readonly typeImports: readonly [{
|
|
21
|
+
readonly package: "@prisma-next/extension-pgvector/codec-types";
|
|
22
|
+
readonly named: "Vector";
|
|
23
|
+
readonly alias: "Vector";
|
|
24
|
+
}];
|
|
25
|
+
readonly parameterized: {
|
|
26
|
+
readonly "pg/vector@1": "Vector<{{length}}>";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly operationTypes: {
|
|
30
|
+
readonly import: {
|
|
31
|
+
readonly package: "@prisma-next/extension-pgvector/operation-types";
|
|
32
|
+
readonly named: "OperationTypes";
|
|
33
|
+
readonly alias: "PgVectorOperationTypes";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly storage: readonly [{
|
|
37
|
+
readonly typeId: "pg/vector@1";
|
|
38
|
+
readonly familyId: "sql";
|
|
39
|
+
readonly targetId: "postgres";
|
|
40
|
+
readonly nativeType: "vector";
|
|
41
|
+
}];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { pgvectorPack as default };
|
|
46
|
+
//# sourceMappingURL=pack.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"sourcesContent":[],"mappings":";cAEM;EAAA,SAAA,IAAA,EAA+B,WAAA"}
|
package/dist/pack.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { n as pgvectorPackMeta } from "./descriptor-meta-BADTQp0u.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/pack.ts
|
|
4
|
+
const pgvectorPack = pgvectorPackMeta;
|
|
5
|
+
var pack_default = pgvectorPack;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pack_default as default };
|
|
9
|
+
//# sourceMappingURL=pack.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack.mjs","names":[],"sources":["../src/exports/pack.ts"],"sourcesContent":["import { pgvectorPackMeta } from '../core/descriptor-meta';\n\nconst pgvectorPack = pgvectorPackMeta;\n\nexport default pgvectorPack;\n"],"mappings":";;;AAEA,MAAM,eAAe;AAErB,mBAAe"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SqlRuntimeExtensionDescriptor } from "@prisma-next/sql-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/exports/runtime.d.ts
|
|
4
|
+
declare const pgvectorRuntimeDescriptor: SqlRuntimeExtensionDescriptor<'postgres'>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { pgvectorRuntimeDescriptor as default };
|
|
7
|
+
//# sourceMappingURL=runtime.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/exports/runtime.ts"],"sourcesContent":[],"mappings":";;;cAwCM,2BAA2B"}
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { n as pgvectorPackMeta, t as pgvectorOperationSignature } from "./descriptor-meta-BADTQp0u.mjs";
|
|
2
|
+
import { n as VECTOR_MAX_DIM, t as VECTOR_CODEC_ID } from "./constants-BmZpaev5.mjs";
|
|
3
|
+
import { codec, createCodecRegistry, defineCodecs } from "@prisma-next/sql-relational-core/ast";
|
|
4
|
+
import { type } from "arktype";
|
|
5
|
+
|
|
6
|
+
//#region src/core/codecs.ts
|
|
7
|
+
/**
|
|
8
|
+
* Vector codec implementation for pgvector extension.
|
|
9
|
+
*
|
|
10
|
+
* Provides encoding/decoding for the `vector` PostgreSQL type.
|
|
11
|
+
* Wire format is a string like `[1,2,3]` (PostgreSQL vector text format).
|
|
12
|
+
*/
|
|
13
|
+
const pgVectorCodec = codec({
|
|
14
|
+
typeId: "pg/vector@1",
|
|
15
|
+
targetTypes: ["vector"],
|
|
16
|
+
encode: (value) => {
|
|
17
|
+
if (!Array.isArray(value)) throw new Error("Vector value must be an array of numbers");
|
|
18
|
+
if (!value.every((v) => typeof v === "number")) throw new Error("Vector value must contain only numbers");
|
|
19
|
+
return `[${value.join(",")}]`;
|
|
20
|
+
},
|
|
21
|
+
decode: (wire) => {
|
|
22
|
+
if (typeof wire !== "string") throw new Error("Vector wire value must be a string");
|
|
23
|
+
if (!wire.startsWith("[") || !wire.endsWith("]")) throw new Error(`Invalid vector format: expected "[...]", got "${wire}"`);
|
|
24
|
+
const content = wire.slice(1, -1).trim();
|
|
25
|
+
if (content === "") return [];
|
|
26
|
+
return content.split(",").map((v) => {
|
|
27
|
+
const num = Number.parseFloat(v.trim());
|
|
28
|
+
if (Number.isNaN(num)) throw new Error(`Invalid vector value: "${v}" is not a number`);
|
|
29
|
+
return num;
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
meta: { db: { sql: { postgres: { nativeType: "vector" } } } }
|
|
33
|
+
});
|
|
34
|
+
const codecs = defineCodecs().add("vector", pgVectorCodec);
|
|
35
|
+
const codecDefinitions = codecs.codecDefinitions;
|
|
36
|
+
const dataTypes = codecs.dataTypes;
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/exports/runtime.ts
|
|
40
|
+
const parameterizedCodecDescriptors = [{
|
|
41
|
+
codecId: VECTOR_CODEC_ID,
|
|
42
|
+
paramsSchema: type({ length: "number" }).narrow((params, ctx) => {
|
|
43
|
+
const { length } = params;
|
|
44
|
+
if (!Number.isInteger(length)) return ctx.mustBe("an integer");
|
|
45
|
+
if (length < 1 || length > VECTOR_MAX_DIM) return ctx.mustBe(`in the range [1, ${VECTOR_MAX_DIM}]`);
|
|
46
|
+
return true;
|
|
47
|
+
})
|
|
48
|
+
}];
|
|
49
|
+
function createPgvectorCodecRegistry() {
|
|
50
|
+
const registry = createCodecRegistry();
|
|
51
|
+
for (const def of Object.values(codecDefinitions)) registry.register(def.codec);
|
|
52
|
+
return registry;
|
|
53
|
+
}
|
|
54
|
+
const pgvectorRuntimeDescriptor = {
|
|
55
|
+
kind: "extension",
|
|
56
|
+
id: pgvectorPackMeta.id,
|
|
57
|
+
version: pgvectorPackMeta.version,
|
|
58
|
+
familyId: "sql",
|
|
59
|
+
targetId: "postgres",
|
|
60
|
+
codecs: createPgvectorCodecRegistry,
|
|
61
|
+
operationSignatures: () => [pgvectorOperationSignature],
|
|
62
|
+
parameterizedCodecs: () => parameterizedCodecDescriptors,
|
|
63
|
+
create() {
|
|
64
|
+
return {
|
|
65
|
+
familyId: "sql",
|
|
66
|
+
targetId: "postgres"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var runtime_default = pgvectorRuntimeDescriptor;
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { runtime_default as default };
|
|
74
|
+
//# sourceMappingURL=runtime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":["arktype","pgvectorRuntimeDescriptor: SqlRuntimeExtensionDescriptor<'postgres'>"],"sources":["../src/core/codecs.ts","../src/exports/runtime.ts"],"sourcesContent":["/**\n * Vector codec implementation for pgvector extension.\n *\n * Provides encoding/decoding for the `vector` PostgreSQL type.\n * Wire format is a string like `[1,2,3]` (PostgreSQL vector text format).\n */\n\nimport { codec, defineCodecs } from '@prisma-next/sql-relational-core/ast';\n\nconst pgVectorCodec = codec<'pg/vector@1', string, number[]>({\n typeId: 'pg/vector@1',\n targetTypes: ['vector'],\n encode: (value: number[]): string => {\n // Validate that value is an array of numbers\n if (!Array.isArray(value)) {\n throw new Error('Vector value must be an array of numbers');\n }\n if (!value.every((v) => typeof v === 'number')) {\n throw new Error('Vector value must contain only numbers');\n }\n // Format as PostgreSQL vector text format: [1,2,3]\n // PostgreSQL's pg library requires the vector format string\n return `[${value.join(',')}]`;\n },\n decode: (wire: string): number[] => {\n // Handle string format from PostgreSQL: [1,2,3]\n if (typeof wire !== 'string') {\n throw new Error('Vector wire value must be a string');\n }\n // Parse PostgreSQL vector format: [1,2,3]\n if (!wire.startsWith('[') || !wire.endsWith(']')) {\n throw new Error(`Invalid vector format: expected \"[...]\", got \"${wire}\"`);\n }\n const content = wire.slice(1, -1).trim();\n if (content === '') {\n return [];\n }\n const values = content.split(',').map((v) => {\n const num = Number.parseFloat(v.trim());\n if (Number.isNaN(num)) {\n throw new Error(`Invalid vector value: \"${v}\" is not a number`);\n }\n return num;\n });\n return values;\n },\n meta: {\n db: {\n sql: {\n postgres: {\n nativeType: 'vector',\n },\n },\n },\n },\n});\n\n// Build codec definitions using the builder DSL\nconst codecs = defineCodecs().add('vector', pgVectorCodec);\n\n// Export derived structures directly from codecs builder\nexport const codecDefinitions = codecs.codecDefinitions;\nexport const dataTypes = codecs.dataTypes;\n\n// Export types derived from codecs builder\nexport type CodecTypes = typeof codecs.CodecTypes;\n","import { createCodecRegistry } from '@prisma-next/sql-relational-core/ast';\nimport type {\n RuntimeParameterizedCodecDescriptor,\n SqlRuntimeExtensionDescriptor,\n} from '@prisma-next/sql-runtime';\nimport { type as arktype } from 'arktype';\nimport { codecDefinitions } from '../core/codecs';\nimport { VECTOR_CODEC_ID, VECTOR_MAX_DIM } from '../core/constants';\nimport { pgvectorOperationSignature, pgvectorPackMeta } from '../core/descriptor-meta';\n\nconst vectorParamsSchema = arktype({\n length: 'number',\n}).narrow((params, ctx) => {\n const { length } = params;\n if (!Number.isInteger(length)) {\n return ctx.mustBe('an integer');\n }\n if (length < 1 || length > VECTOR_MAX_DIM) {\n return ctx.mustBe(`in the range [1, ${VECTOR_MAX_DIM}]`);\n }\n return true;\n});\n\nconst parameterizedCodecDescriptors = [\n {\n codecId: VECTOR_CODEC_ID,\n paramsSchema: vectorParamsSchema,\n },\n] as const satisfies ReadonlyArray<\n RuntimeParameterizedCodecDescriptor<{ readonly length: number }>\n>;\n\nfunction createPgvectorCodecRegistry() {\n const registry = createCodecRegistry();\n for (const def of Object.values(codecDefinitions)) {\n registry.register(def.codec);\n }\n return registry;\n}\n\nconst pgvectorRuntimeDescriptor: SqlRuntimeExtensionDescriptor<'postgres'> = {\n kind: 'extension' as const,\n id: pgvectorPackMeta.id,\n version: pgvectorPackMeta.version,\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n codecs: createPgvectorCodecRegistry,\n operationSignatures: () => [pgvectorOperationSignature],\n parameterizedCodecs: () => parameterizedCodecDescriptors,\n create() {\n return {\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n };\n },\n};\n\nexport default pgvectorRuntimeDescriptor;\n"],"mappings":";;;;;;;;;;;;AASA,MAAM,gBAAgB,MAAuC;CAC3D,QAAQ;CACR,aAAa,CAAC,SAAS;CACvB,SAAS,UAA4B;AAEnC,MAAI,CAAC,MAAM,QAAQ,MAAM,CACvB,OAAM,IAAI,MAAM,2CAA2C;AAE7D,MAAI,CAAC,MAAM,OAAO,MAAM,OAAO,MAAM,SAAS,CAC5C,OAAM,IAAI,MAAM,yCAAyC;AAI3D,SAAO,IAAI,MAAM,KAAK,IAAI,CAAC;;CAE7B,SAAS,SAA2B;AAElC,MAAI,OAAO,SAAS,SAClB,OAAM,IAAI,MAAM,qCAAqC;AAGvD,MAAI,CAAC,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAC9C,OAAM,IAAI,MAAM,iDAAiD,KAAK,GAAG;EAE3E,MAAM,UAAU,KAAK,MAAM,GAAG,GAAG,CAAC,MAAM;AACxC,MAAI,YAAY,GACd,QAAO,EAAE;AASX,SAPe,QAAQ,MAAM,IAAI,CAAC,KAAK,MAAM;GAC3C,MAAM,MAAM,OAAO,WAAW,EAAE,MAAM,CAAC;AACvC,OAAI,OAAO,MAAM,IAAI,CACnB,OAAM,IAAI,MAAM,0BAA0B,EAAE,mBAAmB;AAEjE,UAAO;IACP;;CAGJ,MAAM,EACJ,IAAI,EACF,KAAK,EACH,UAAU,EACR,YAAY,UACb,EACF,EACF,EACF;CACF,CAAC;AAGF,MAAM,SAAS,cAAc,CAAC,IAAI,UAAU,cAAc;AAG1D,MAAa,mBAAmB,OAAO;AACvC,MAAa,YAAY,OAAO;;;;ACvChC,MAAM,gCAAgC,CACpC;CACE,SAAS;CACT,cAhBuBA,KAAQ,EACjC,QAAQ,UACT,CAAC,CAAC,QAAQ,QAAQ,QAAQ;EACzB,MAAM,EAAE,WAAW;AACnB,MAAI,CAAC,OAAO,UAAU,OAAO,CAC3B,QAAO,IAAI,OAAO,aAAa;AAEjC,MAAI,SAAS,KAAK,SAAS,eACzB,QAAO,IAAI,OAAO,oBAAoB,eAAe,GAAG;AAE1D,SAAO;GACP;CAMC,CACF;AAID,SAAS,8BAA8B;CACrC,MAAM,WAAW,qBAAqB;AACtC,MAAK,MAAM,OAAO,OAAO,OAAO,iBAAiB,CAC/C,UAAS,SAAS,IAAI,MAAM;AAE9B,QAAO;;AAGT,MAAMC,4BAAuE;CAC3E,MAAM;CACN,IAAI,iBAAiB;CACrB,SAAS,iBAAiB;CAC1B,UAAU;CACV,UAAU;CACV,QAAQ;CACR,2BAA2B,CAAC,2BAA2B;CACvD,2BAA2B;CAC3B,SAAS;AACP,SAAO;GACL,UAAU;GACV,UAAU;GACX;;CAEJ;AAED,sBAAe"}
|
package/package.json
CHANGED
|
@@ -1,65 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/extension-pgvector",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.36",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"arktype": "^2.0.0",
|
|
8
|
-
"@prisma-next/cli": "0.3.0-dev.
|
|
9
|
-
"@prisma-next/contract": "0.3.0-dev.
|
|
10
|
-
"@prisma-next/contract-authoring": "0.3.0-dev.
|
|
11
|
-
"@prisma-next/core-control-plane": "0.3.0-dev.
|
|
12
|
-
"@prisma-next/family-sql": "0.3.0-dev.
|
|
13
|
-
"@prisma-next/sql-operations": "0.3.0-dev.
|
|
14
|
-
"@prisma-next/sql-relational-core": "0.3.0-dev.
|
|
15
|
-
"@prisma-next/sql-runtime": "0.3.0-dev.
|
|
16
|
-
"@prisma-next/sql-schema-ir": "0.3.0-dev.
|
|
8
|
+
"@prisma-next/cli": "0.3.0-dev.36",
|
|
9
|
+
"@prisma-next/contract": "0.3.0-dev.36",
|
|
10
|
+
"@prisma-next/contract-authoring": "0.3.0-dev.36",
|
|
11
|
+
"@prisma-next/core-control-plane": "0.3.0-dev.36",
|
|
12
|
+
"@prisma-next/family-sql": "0.3.0-dev.36",
|
|
13
|
+
"@prisma-next/sql-operations": "0.3.0-dev.36",
|
|
14
|
+
"@prisma-next/sql-relational-core": "0.3.0-dev.36",
|
|
15
|
+
"@prisma-next/sql-runtime": "0.3.0-dev.36",
|
|
16
|
+
"@prisma-next/sql-schema-ir": "0.3.0-dev.36"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"
|
|
19
|
+
"tsdown": "0.18.4",
|
|
20
20
|
"typescript": "5.9.3",
|
|
21
|
-
"vitest": "4.0.
|
|
22
|
-
"@prisma-next/adapter-postgres": "0.3.0-dev.
|
|
23
|
-
"@prisma-next/operations": "0.3.0-dev.
|
|
24
|
-
"@prisma-next/sql-contract": "0.3.0-dev.
|
|
25
|
-
"@prisma-next/sql-contract-ts": "0.3.0-dev.
|
|
26
|
-
"@prisma-next/sql-lane": "0.3.0-dev.
|
|
21
|
+
"vitest": "4.0.17",
|
|
22
|
+
"@prisma-next/adapter-postgres": "0.3.0-dev.36",
|
|
23
|
+
"@prisma-next/operations": "0.3.0-dev.36",
|
|
24
|
+
"@prisma-next/sql-contract": "0.3.0-dev.36",
|
|
25
|
+
"@prisma-next/sql-contract-ts": "0.3.0-dev.36",
|
|
26
|
+
"@prisma-next/sql-lane": "0.3.0-dev.36",
|
|
27
27
|
"@prisma-next/test-utils": "0.0.1",
|
|
28
|
-
"@prisma-next/tsconfig": "0.0.0"
|
|
28
|
+
"@prisma-next/tsconfig": "0.0.0",
|
|
29
|
+
"@prisma-next/tsdown": "0.0.0"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
32
|
"dist",
|
|
32
33
|
"src"
|
|
33
34
|
],
|
|
34
35
|
"exports": {
|
|
35
|
-
"./
|
|
36
|
-
"./
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"./runtime":
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
"./codec-types": {
|
|
49
|
-
"types": "./dist/exports/codec-types.d.ts",
|
|
50
|
-
"import": "./dist/exports/codec-types.js"
|
|
51
|
-
},
|
|
52
|
-
"./column-types": {
|
|
53
|
-
"types": "./dist/exports/column-types.d.ts",
|
|
54
|
-
"import": "./dist/exports/column-types.js"
|
|
55
|
-
},
|
|
56
|
-
"./operation-types": {
|
|
57
|
-
"types": "./dist/exports/operation-types.d.ts",
|
|
58
|
-
"import": "./dist/exports/operation-types.js"
|
|
59
|
-
}
|
|
36
|
+
"./codec-types": "./dist/codec-types.mjs",
|
|
37
|
+
"./column-types": "./dist/column-types.mjs",
|
|
38
|
+
"./control": "./dist/control.mjs",
|
|
39
|
+
"./operation-types": "./dist/operation-types.mjs",
|
|
40
|
+
"./pack": "./dist/pack.mjs",
|
|
41
|
+
"./runtime": "./dist/runtime.mjs",
|
|
42
|
+
"./package.json": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/prisma/prisma-next.git",
|
|
47
|
+
"directory": "packages/3-extensions/pgvector"
|
|
60
48
|
},
|
|
61
49
|
"scripts": {
|
|
62
|
-
"build": "
|
|
50
|
+
"build": "tsdown",
|
|
63
51
|
"test": "vitest run",
|
|
64
52
|
"test:coverage": "vitest run --coverage",
|
|
65
53
|
"typecheck": "tsc --project tsconfig.json --noEmit",
|