@prisma-next/extension-paradedb 0.12.0 → 0.13.0-dev.1
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 +2 -9
- package/dist/control.d.mts +1 -2
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +17 -10
- package/dist/control.mjs.map +1 -1
- package/dist/{descriptor-meta-CPQfeTa-.mjs → descriptor-meta-gJ8uJD9M.mjs} +2 -2
- package/dist/{descriptor-meta-CPQfeTa-.mjs.map → descriptor-meta-gJ8uJD9M.mjs.map} +1 -1
- package/dist/{index-types-BZqoAhWT.mjs → index-types-DErT09Xw.mjs} +1 -1
- package/dist/{index-types-BZqoAhWT.mjs.map → index-types-DErT09Xw.mjs.map} +1 -1
- package/dist/index-types.d.mts +1 -3
- package/dist/index-types.d.mts.map +1 -1
- package/dist/index-types.mjs +1 -1
- package/dist/{operation-types-DXmTJ7jd.d.mts → operation-types-BKGQc1MM.d.mts} +1 -1
- package/dist/operation-types-BKGQc1MM.d.mts.map +1 -0
- package/dist/operation-types.d.mts +2 -2
- package/dist/pack.d.mts +1 -3
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +1 -1
- package/dist/runtime.mjs +1 -1
- package/package.json +20 -20
- package/src/contract.d.ts +10 -4
- package/src/contract.json +12 -3
- package/dist/operation-types-DXmTJ7jd.d.mts.map +0 -1
package/README.md
CHANGED
|
@@ -73,16 +73,9 @@ ParadeDB BM25 indexes require a `key_field` — a unique column that identifies
|
|
|
73
73
|
|
|
74
74
|
## Authoring (maintainers)
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
After changing the contract source, run `pnpm migrations:regen` from the repo root to keep migration metadata, `refs/head.json`, and `end-contract.*` consistent with the freshly-built `src/contract.json`; it is also wired into `pnpm fixtures:emit` automatically.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
- `pnpm exec prisma-next migration plan --name <slug>` (run from this package directory) — scaffolds a new migration directory under `migrations/<dirName>/` for schema changes. **Not chained into `pnpm build`**: `migration plan` is non-idempotent (each invocation generates a new timestamped directory), so it runs manually when the contract changes. Note: paradedb's contract declares no tables or models, so the planner currently refuses to scaffold the baseline migration (this is **Path B** authoring per [ADR 212](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md#contract-space-package-layout)). That directory was hand-authored once (Migration subclass + seed `migration.json` preserving the full `toContract`) and `pnpm tsx migrations/<dirName>/migration.ts` re-emits `ops.json` + `migration.json` deterministically. Future migrations that add tables or models can use `migration plan` directly (Path A).
|
|
80
|
-
- `pnpm tsx migrations/<dirName>/migration.ts` (run from this package directory) — re-emits `ops.json` + `migration.json` from the hand-edited subclass. Use `tsx`, not bare `node`, because the Migration subclass imports relative TypeScript siblings which Node's native loader can't resolve without a TS-aware loader.
|
|
81
|
-
- `migrations/refs/head.json` is hand-pinned with the latest migration's `to` hash + `providedInvariants`.
|
|
82
|
-
|
|
83
|
-
The descriptor at `src/exports/control.ts` then JSON-imports those artefacts and synthesises the framework's `MigrationPackage` shape.
|
|
84
|
-
|
|
85
|
-
See [ADR 212 — Contract spaces](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md) ("Contract-space package layout") for the canonical layout and rationale.
|
|
78
|
+
See [ADR 212 — Contract spaces](../../../docs/architecture%20docs/adrs/ADR%20212%20-%20Contract%20spaces.md) ("Contract-space package layout") for the layout and rationale.
|
|
86
79
|
|
|
87
80
|
## Not yet implemented
|
|
88
81
|
|
package/dist/control.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$_prisma_next_sql_contract_index_types0 from "@prisma-next/sql-contract/index-types";
|
|
2
1
|
import { SqlControlExtensionDescriptor } from "@prisma-next/family-sql/control";
|
|
3
2
|
|
|
4
3
|
//#region src/core/descriptor-meta.d.ts
|
|
@@ -13,7 +12,7 @@ declare const paradedbPackMeta: {
|
|
|
13
12
|
readonly 'paradedb/bm25': true;
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
|
-
readonly indexTypes:
|
|
15
|
+
readonly indexTypes: import("@prisma-next/sql-contract/index-types").IndexTypeBuilder<Record<never, never> & Record<"bm25", {
|
|
17
16
|
readonly options: {
|
|
18
17
|
key_field: string;
|
|
19
18
|
};
|
package/dist/control.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/core/descriptor-meta.ts","../src/exports/control.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/core/descriptor-meta.ts","../src/exports/control.ts"],"mappings":";;;cAmMa,gBAAA;EAAA;;;;;;;;;;wFAqBH,MAAA,iBAAA,MAAA;IAAA;;;;;;;;;;;;;;;;cC9JJ,2BAAA,EAA6B,6BAA6B"}
|
package/dist/control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as paradedbQueryOperations, r as PARADEDB_SPACE_ID, t as paradedbPackMeta } from "./descriptor-meta-
|
|
1
|
+
import { n as paradedbQueryOperations, r as PARADEDB_SPACE_ID, t as paradedbPackMeta } from "./descriptor-meta-gJ8uJD9M.mjs";
|
|
2
2
|
import { contractSpaceFromJson } from "@prisma-next/migration-tools/spaces";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/exports/control.ts
|
|
@@ -11,12 +11,19 @@ const paradedbContractSpace = contractSpaceFromJson({
|
|
|
11
11
|
roots: {},
|
|
12
12
|
domain: { "namespaces": { "public": { "models": {} } } },
|
|
13
13
|
storage: {
|
|
14
|
-
"namespaces": {
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
"namespaces": {
|
|
15
|
+
"__unbound__": {
|
|
16
|
+
"entries": { "table": {} },
|
|
17
|
+
"id": "__unbound__",
|
|
18
|
+
"kind": "postgres-unbound-schema"
|
|
19
|
+
},
|
|
20
|
+
"public": {
|
|
21
|
+
"entries": { "table": {} },
|
|
22
|
+
"id": "public",
|
|
23
|
+
"kind": "postgres-schema"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"storageHash": "sha256:6214fc543ea5ffa1c5bdf6f663e62c61b6a3f04460e1e27bf7f47f1544f11603"
|
|
20
27
|
},
|
|
21
28
|
capabilities: {
|
|
22
29
|
"postgres": {
|
|
@@ -46,10 +53,10 @@ const paradedbContractSpace = contractSpaceFromJson({
|
|
|
46
53
|
dirName: "20260601T0000_install_pg_search_extension",
|
|
47
54
|
metadata: {
|
|
48
55
|
from: null,
|
|
49
|
-
to: "sha256:
|
|
56
|
+
to: "sha256:6214fc543ea5ffa1c5bdf6f663e62c61b6a3f04460e1e27bf7f47f1544f11603",
|
|
50
57
|
providedInvariants: ["paradedb:install-pg-search-v1"],
|
|
51
58
|
createdAt: "2026-06-01T00:00:00.000Z",
|
|
52
|
-
migrationHash: "sha256:
|
|
59
|
+
migrationHash: "sha256:71fba51945d5d0d8f6a7e2e7e6a58d1c90d789d4affe348c195db586f088d971"
|
|
53
60
|
},
|
|
54
61
|
ops: [{
|
|
55
62
|
"id": "paradedb.install-pg-search-extension",
|
|
@@ -79,7 +86,7 @@ const paradedbContractSpace = contractSpaceFromJson({
|
|
|
79
86
|
}]
|
|
80
87
|
}],
|
|
81
88
|
headRef: {
|
|
82
|
-
hash: "sha256:
|
|
89
|
+
hash: "sha256:6214fc543ea5ffa1c5bdf6f663e62c61b6a3f04460e1e27bf7f47f1544f11603",
|
|
83
90
|
invariants: ["paradedb:install-pg-search-v1"]
|
|
84
91
|
}
|
|
85
92
|
});
|
package/dist/control.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260601T0000_install_pg_search_extension/migration.json","../migrations/20260601T0000_install_pg_search_extension/ops.json","../migrations/refs/head.json","../src/contract.json","../src/exports/control.ts"],"sourcesContent":["","","","","/**\n * Control-plane descriptor for the paradedb extension.\n *\n * **Contract-space package layout.** The extension's contract\n * + migrations are emitted by the same pipeline application authors use:\n *\n * `prisma-next contract emit` → `<package>/src/contract.{json,d.ts}`\n * `prisma-next migration plan` → `<package>/migrations/<dir>/...`\n *\n * The descriptor wires those JSON artefacts via JSON-import declarations\n * so they flow through the consuming application's module resolver\n * without filesystem assumptions, and synthesises the canonical\n * {@link import('@prisma-next/framework-components/control').MigrationPackage}\n * shape for the framework's runner / verifier to consume. Readers in\n * `@prisma-next/migration-tools` add `dirPath` when loading from disk\n * (`OnDiskMigrationPackage`); descriptor-bundled packages do not need\n * it because the framework reads them directly from the descriptor.\n *\n * Wired surfaces:\n *\n * - `contractSpace.{contractJson,migrations,headRef}` — sourced from\n * the on-disk artefacts emitted by `build:contract-space`.\n * - `queryOperations` — BM25 full-text search operations registered\n * via `paradedbQueryOperations()`.\n *\n * @see docs/architecture docs/adrs/ADR 212 - Contract spaces.md\n * (contract-space package layout convention).\n */\n\nimport type { Contract } from '@prisma-next/contract/types';\nimport type { SqlControlExtensionDescriptor } from '@prisma-next/family-sql/control';\nimport { contractSpaceFromJson } from '@prisma-next/migration-tools/spaces';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport baselineMetadata from '../../migrations/20260601T0000_install_pg_search_extension/migration.json' with {\n type: 'json',\n};\nimport baselineOps from '../../migrations/20260601T0000_install_pg_search_extension/ops.json' with {\n type: 'json',\n};\nimport headRef from '../../migrations/refs/head.json' with { type: 'json' };\nimport contractJson from '../contract.json' with { type: 'json' };\nimport { PARADEDB_SPACE_ID } from '../core/constants';\nimport { paradedbPackMeta, paradedbQueryOperations } from '../core/descriptor-meta';\n\nconst BASELINE_DIR_NAME = '20260601T0000_install_pg_search_extension';\n\nconst paradedbContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: BASELINE_DIR_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst paradedbExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> = {\n ...paradedbPackMeta,\n id: PARADEDB_SPACE_ID,\n contractSpace: paradedbContractSpace,\n queryOperations: () => paradedbQueryOperations(),\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n};\n\nexport { paradedbExtensionDescriptor, paradedbPackMeta };\nexport default paradedbExtensionDescriptor;\n"],"mappings":";;;;AI8CA,MAAM,wBAAwB,sBAA4C;CACxE,cAAA
|
|
1
|
+
{"version":3,"file":"control.mjs","names":["baselineMetadata","baselineOps"],"sources":["../migrations/20260601T0000_install_pg_search_extension/migration.json","../migrations/20260601T0000_install_pg_search_extension/ops.json","../migrations/refs/head.json","../src/contract.json","../src/exports/control.ts"],"sourcesContent":["","","","","/**\n * Control-plane descriptor for the paradedb extension.\n *\n * **Contract-space package layout.** The extension's contract\n * + migrations are emitted by the same pipeline application authors use:\n *\n * `prisma-next contract emit` → `<package>/src/contract.{json,d.ts}`\n * `prisma-next migration plan` → `<package>/migrations/<dir>/...`\n *\n * The descriptor wires those JSON artefacts via JSON-import declarations\n * so they flow through the consuming application's module resolver\n * without filesystem assumptions, and synthesises the canonical\n * {@link import('@prisma-next/framework-components/control').MigrationPackage}\n * shape for the framework's runner / verifier to consume. Readers in\n * `@prisma-next/migration-tools` add `dirPath` when loading from disk\n * (`OnDiskMigrationPackage`); descriptor-bundled packages do not need\n * it because the framework reads them directly from the descriptor.\n *\n * Wired surfaces:\n *\n * - `contractSpace.{contractJson,migrations,headRef}` — sourced from\n * the on-disk artefacts emitted by `build:contract-space`.\n * - `queryOperations` — BM25 full-text search operations registered\n * via `paradedbQueryOperations()`.\n *\n * @see docs/architecture docs/adrs/ADR 212 - Contract spaces.md\n * (contract-space package layout convention).\n */\n\nimport type { Contract } from '@prisma-next/contract/types';\nimport type { SqlControlExtensionDescriptor } from '@prisma-next/family-sql/control';\nimport { contractSpaceFromJson } from '@prisma-next/migration-tools/spaces';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport baselineMetadata from '../../migrations/20260601T0000_install_pg_search_extension/migration.json' with {\n type: 'json',\n};\nimport baselineOps from '../../migrations/20260601T0000_install_pg_search_extension/ops.json' with {\n type: 'json',\n};\nimport headRef from '../../migrations/refs/head.json' with { type: 'json' };\nimport contractJson from '../contract.json' with { type: 'json' };\nimport { PARADEDB_SPACE_ID } from '../core/constants';\nimport { paradedbPackMeta, paradedbQueryOperations } from '../core/descriptor-meta';\n\nconst BASELINE_DIR_NAME = '20260601T0000_install_pg_search_extension';\n\nconst paradedbContractSpace = contractSpaceFromJson<Contract<SqlStorage>>({\n contractJson,\n migrations: [\n {\n dirName: BASELINE_DIR_NAME,\n metadata: baselineMetadata,\n ops: baselineOps,\n },\n ],\n headRef,\n});\n\nconst paradedbExtensionDescriptor: SqlControlExtensionDescriptor<'postgres'> = {\n ...paradedbPackMeta,\n id: PARADEDB_SPACE_ID,\n contractSpace: paradedbContractSpace,\n queryOperations: () => paradedbQueryOperations(),\n create: () => ({\n familyId: 'sql' as const,\n targetId: 'postgres' as const,\n }),\n};\n\nexport { paradedbExtensionDescriptor, paradedbPackMeta };\nexport default paradedbExtensionDescriptor;\n"],"mappings":";;;;AI8CA,MAAM,wBAAwB,sBAA4C;CACxE,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAA;CACA,YAAY,CACV;EACE,SAAS;EACT,UAAUA;;;;;;EAAAA;EACV,KAAKC;;;;;;;;;;;;;;;;;;;;;;;;;GAAAA;CACP,CACF;CACA,SAAA;;;CAAA;AACF,CAAC;AAED,MAAM,8BAAyE;CAC7E,GAAG;CACH,IAAI;CACJ,eAAe;CACf,uBAAuB,wBAAwB;CAC/C,eAAe;EACb,UAAU;EACV,UAAU;CACZ;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as paradedbIndexTypes } from "./index-types-
|
|
1
|
+
import { t as paradedbIndexTypes } from "./index-types-DErT09Xw.mjs";
|
|
2
2
|
import { LiteralExpr, OperationExpr } from "@prisma-next/sql-relational-core/ast";
|
|
3
3
|
import { buildOperation, toExpr } from "@prisma-next/sql-relational-core/expression";
|
|
4
4
|
//#region src/core/constants.ts
|
|
@@ -276,4 +276,4 @@ const paradedbPackMeta = {
|
|
|
276
276
|
//#endregion
|
|
277
277
|
export { paradedbQueryOperations as n, PARADEDB_SPACE_ID as r, paradedbPackMeta as t };
|
|
278
278
|
|
|
279
|
-
//# sourceMappingURL=descriptor-meta-
|
|
279
|
+
//# sourceMappingURL=descriptor-meta-gJ8uJD9M.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor-meta-CPQfeTa-.mjs","names":["TEXT","TEXT_REF"],"sources":["../src/core/constants.ts","../src/core/proximity-chain.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["/**\n * Extension ID for ParadeDB pg_search.\n */\nexport const PARADEDB_EXTENSION_ID = 'paradedb' as const;\n\n/**\n * Static names and identifiers used across paradedb's contract space.\n *\n * Centralised here so the contract IR (`./contract`), the baseline\n * migration ops (`./migrations`), the head ref, and the descriptor\n * (`../exports/control`) all reference the same values without typos.\n *\n * The space identifier `'paradedb'` is what the framework writes to\n * `migrations/` in the user's repo and what the marker table's\n * `space` column carries for paradedb-owned rows.\n *\n * The `paradedb:*` invariantId namespace is locked here — once\n * published, an invariantId is immutable so downstream consumers can\n * reference it by literal string match.\n */\nexport const PARADEDB_SPACE_ID = 'paradedb' as const;\n\nexport const PARADEDB_BASELINE_MIGRATION_NAME =\n '20260601T0000_install_pg_search_extension' as const;\n\n/**\n * `paradedb:*` invariantIds emitted by the baseline migration. Each id,\n * once published, is immutable: downstream consumers reference them by\n * literal string match.\n */\nexport const PARADEDB_INVARIANTS = {\n installPgSearch: 'paradedb:install-pg-search-v1',\n} as const;\n","import {\n type AnyExpression,\n LiteralExpr,\n OperationExpr,\n} from '@prisma-next/sql-relational-core/ast';\nimport { type Expression, toExpr } from '@prisma-next/sql-relational-core/expression';\n\nconst TEXT = 'pg/text@1' as const;\nconst TEXT_REF = { codecId: TEXT } as const;\n\nexport type ProximityTerm = unknown;\n\nexport interface ProximityWithinOptions {\n readonly ordered?: boolean;\n}\n\ninterface ProximityStep {\n readonly distance: number;\n readonly term: ProximityTerm;\n readonly ordered: boolean;\n}\n\n// https://docs.paradedb.com/documentation/full-text/proximity\nexport class ParadeDbProximityChain\n implements Expression<{ codecId: 'pg/text@1'; nullable: false }>\n{\n readonly returnType = { codecId: TEXT, nullable: false } as const;\n\n private readonly start: ProximityTerm;\n private readonly steps: readonly ProximityStep[];\n\n constructor(start: ProximityTerm, steps: readonly ProximityStep[] = []) {\n this.start = start;\n this.steps = steps;\n }\n\n within(\n distance: number,\n term: ProximityTerm,\n options?: ProximityWithinOptions,\n ): ParadeDbProximityChain {\n if (!Number.isInteger(distance) || distance < 0) {\n throw new Error(\n `paradeDbProximity.within: distance must be a non-negative integer; got ${String(distance)}`,\n );\n }\n return new ParadeDbProximityChain(this.start, [\n ...this.steps,\n { distance, term, ordered: options?.ordered === true },\n ]);\n }\n\n buildAst(): AnyExpression {\n if (this.steps.length === 0) {\n throw new Error(\n 'paradeDbProximity: chain must have at least one .within(distance, term) step',\n );\n }\n const args: AnyExpression[] = [toExpr(this.start, TEXT_REF)];\n let template = '({{self}}';\n this.steps.forEach((step, i) => {\n const op = step.ordered ? '##>' : '##';\n args.push(LiteralExpr.of(step.distance));\n args.push(toExpr(step.term, TEXT_REF));\n template += ` ${op} {{arg${2 * i}}} ${op} {{arg${2 * i + 1}}}`;\n });\n template += ')';\n const [self, ...rest] = args;\n if (!self) {\n throw new Error('paradeDbProximity: invariant violation — empty args');\n }\n return new OperationExpr({\n method: 'paradeDbProximity',\n self,\n args: rest.length > 0 ? rest : undefined,\n returns: this.returnType,\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template,\n },\n });\n }\n}\n","import { LiteralExpr } from '@prisma-next/sql-relational-core/ast';\nimport { buildOperation, toExpr } from '@prisma-next/sql-relational-core/expression';\nimport { paradedbIndexTypes } from '../types/index-types';\nimport type { QueryOperationTypes } from '../types/operation-types';\nimport { PARADEDB_EXTENSION_ID } from './constants';\nimport { ParadeDbProximityChain } from './proximity-chain';\n\ntype CodecTypesBase = Record<string, { readonly input: unknown; readonly output: unknown }>;\n\nconst TEXT = 'pg/text@1' as const;\nconst BOOL = 'pg/bool@1' as const;\nconst FLOAT4 = 'pg/float4@1' as const;\nconst INT4 = 'pg/int4@1' as const;\n\nconst TEXT_REF = { codecId: TEXT } as const;\nconst INT4_REF = { codecId: INT4 } as const;\n\nexport function paradedbQueryOperations<CT extends CodecTypesBase>(): QueryOperationTypes<CT> {\n return {\n // `@@@` accepts both text and structured query types on its RHS.\n // https://docs.paradedb.com/documentation/full-text/match\n paradeDbMatch: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatch',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} @@@ {{arg0}}',\n },\n }),\n },\n paradeDbMatchAny: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatchAny',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} ||| {{arg0}}',\n },\n }),\n },\n paradeDbMatchAll: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatchAll',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} &&& {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/full-text/term\n paradeDbTerm: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbTerm',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} === {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/full-text/phrase\n paradeDbPhrase: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbPhrase',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} ### {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/sorting/score\n paradeDbScore: {\n self: { codecId: INT4 },\n impl: (self) =>\n buildOperation({\n method: 'paradeDbScore',\n args: [toExpr(self, INT4_REF)],\n returns: { codecId: FLOAT4, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: 'pdb.score({{self}})',\n },\n }),\n },\n // PG rejects parameterized typmods, so the cast argument lowers to a literal.\n // https://docs.paradedb.com/documentation/full-text/fuzzy\n paradeDbFuzzy: {\n self: { codecId: TEXT },\n impl: (self, distance) => {\n if (!Number.isInteger(distance) || distance < 0 || distance > 2) {\n throw new Error(\n `paradeDbFuzzy: distance must be an integer in [0, 2]; got ${String(distance)}`,\n );\n }\n return buildOperation({\n method: 'paradeDbFuzzy',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(distance)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.fuzzy({{arg0}})',\n },\n });\n },\n },\n // https://docs.paradedb.com/documentation/sorting/boost\n paradeDbBoost: {\n self: { codecId: TEXT },\n impl: (self, weight) => {\n if (!Number.isInteger(weight) || weight < -2048 || weight > 2048) {\n throw new Error(\n `paradeDbBoost: boost must be an integer in [-2048, 2048]; got ${String(weight)}`,\n );\n }\n return buildOperation({\n method: 'paradeDbBoost',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(weight)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.boost({{arg0}})',\n },\n });\n },\n },\n paradeDbConst: {\n self: { codecId: TEXT },\n impl: (self, value) => {\n if (!Number.isInteger(value)) {\n throw new Error(`paradeDbConst: value must be an integer; got ${String(value)}`);\n }\n return buildOperation({\n method: 'paradeDbConst',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(value)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.const({{arg0}})',\n },\n });\n },\n },\n paradeDbSlop: {\n self: { codecId: TEXT },\n impl: (self, slop) => {\n if (!Number.isInteger(slop) || slop < 0) {\n throw new Error(`paradeDbSlop: slop must be a non-negative integer; got ${String(slop)}`);\n }\n return buildOperation({\n method: 'paradeDbSlop',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(slop)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.slop({{arg0}})',\n },\n });\n },\n },\n // https://docs.paradedb.com/documentation/full-text/proximity\n paradeDbProximity: {\n self: { codecId: TEXT },\n impl: (start) => new ParadeDbProximityChain(start),\n },\n };\n}\n\nexport const paradedbPackMeta = {\n kind: 'extension',\n id: PARADEDB_EXTENSION_ID,\n familyId: 'sql',\n targetId: 'postgres',\n version: '0.0.1',\n capabilities: {\n postgres: {\n 'paradedb/bm25': true,\n },\n },\n indexTypes: paradedbIndexTypes,\n types: {\n queryOperationTypes: {\n import: {\n package: '@prisma-next/extension-paradedb/operation-types',\n named: 'QueryOperationTypes',\n alias: 'ParadeDbQueryOperationTypes',\n },\n },\n },\n} as const;\n"],"mappings":";;;;;;;AAGA,MAAa,wBAAwB;;;;;;;;;;;;;;;;AAiBrC,MAAa,oBAAoB;;;ACbjC,MAAMA,SAAO;AACb,MAAMC,aAAW,EAAE,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AAK,GACzB,MAAM,IAAI,MAAM,gDAAgD,OAAO,KAAK,GAAG;IAEjF,OAAO,eAAe;KACpB,QAAQ;KACR,MAAM,CAAC,OAAO,MAAM,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAC;KACpD,SAAS;MAAE,SAAS;MAAM,UAAU;KAAM;KAC1C,UAAU;MACR,cAAc;MACd,UAAU;MACV,UAAU;KACZ;IACF,CAAC;GACH;EACF;EACA,cAAc;GACZ,MAAM,EAAE,SAAS,KAAK;GACtB,OAAO,MAAM,SAAS;IACpB,IAAI,CAAC,OAAO,UAAU,IAAI,KAAK,OAAO,GACpC,MAAM,IAAI,MAAM,0DAA0D,OAAO,IAAI,GAAG;IAE1F,OAAO,eAAe;KACpB,QAAQ;KACR,MAAM,CAAC,OAAO,MAAM,QAAQ,GAAG,YAAY,GAAG,IAAI,CAAC;KACnD,SAAS;MAAE,SAAS;MAAM,UAAU;KAAM;KAC1C,UAAU;MACR,cAAc;MACd,UAAU;MACV,UAAU;KACZ;IACF,CAAC;GACH;EACF;EAEA,mBAAmB;GACjB,MAAM,EAAE,SAAS,KAAK;GACtB,OAAO,UAAU,IAAI,uBAAuB,KAAK;EACnD;CACF;AACF;AAEA,MAAa,mBAAmB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,cAAc,EACZ,UAAU,EACR,iBAAiB,KACnB,EACF;CACA,YAAY;CACZ,OAAO,EACL,qBAAqB,EACnB,QAAQ;EACN,SAAS;EACT,OAAO;EACP,OAAO;CACT,EACF,EACF;AACF"}
|
|
1
|
+
{"version":3,"file":"descriptor-meta-gJ8uJD9M.mjs","names":["TEXT","TEXT_REF"],"sources":["../src/core/constants.ts","../src/core/proximity-chain.ts","../src/core/descriptor-meta.ts"],"sourcesContent":["/**\n * Extension ID for ParadeDB pg_search.\n */\nexport const PARADEDB_EXTENSION_ID = 'paradedb' as const;\n\n/**\n * Static names and identifiers used across paradedb's contract space.\n *\n * Centralised here so the contract IR (`./contract`), the baseline\n * migration ops (`./migrations`), the head ref, and the descriptor\n * (`../exports/control`) all reference the same values without typos.\n *\n * The space identifier `'paradedb'` is what the framework writes to\n * `migrations/` in the user's repo and what the marker table's\n * `space` column carries for paradedb-owned rows.\n *\n * The `paradedb:*` invariantId namespace is locked here — once\n * published, an invariantId is immutable so downstream consumers can\n * reference it by literal string match.\n */\nexport const PARADEDB_SPACE_ID = 'paradedb' as const;\n\nexport const PARADEDB_BASELINE_MIGRATION_NAME =\n '20260601T0000_install_pg_search_extension' as const;\n\n/**\n * `paradedb:*` invariantIds emitted by the baseline migration. Each id,\n * once published, is immutable: downstream consumers reference them by\n * literal string match.\n */\nexport const PARADEDB_INVARIANTS = {\n installPgSearch: 'paradedb:install-pg-search-v1',\n} as const;\n","import {\n type AnyExpression,\n LiteralExpr,\n OperationExpr,\n} from '@prisma-next/sql-relational-core/ast';\nimport { type Expression, toExpr } from '@prisma-next/sql-relational-core/expression';\n\nconst TEXT = 'pg/text@1' as const;\nconst TEXT_REF = { codecId: TEXT } as const;\n\nexport type ProximityTerm = unknown;\n\nexport interface ProximityWithinOptions {\n readonly ordered?: boolean;\n}\n\ninterface ProximityStep {\n readonly distance: number;\n readonly term: ProximityTerm;\n readonly ordered: boolean;\n}\n\n// https://docs.paradedb.com/documentation/full-text/proximity\nexport class ParadeDbProximityChain\n implements Expression<{ codecId: 'pg/text@1'; nullable: false }>\n{\n readonly returnType = { codecId: TEXT, nullable: false } as const;\n\n private readonly start: ProximityTerm;\n private readonly steps: readonly ProximityStep[];\n\n constructor(start: ProximityTerm, steps: readonly ProximityStep[] = []) {\n this.start = start;\n this.steps = steps;\n }\n\n within(\n distance: number,\n term: ProximityTerm,\n options?: ProximityWithinOptions,\n ): ParadeDbProximityChain {\n if (!Number.isInteger(distance) || distance < 0) {\n throw new Error(\n `paradeDbProximity.within: distance must be a non-negative integer; got ${String(distance)}`,\n );\n }\n return new ParadeDbProximityChain(this.start, [\n ...this.steps,\n { distance, term, ordered: options?.ordered === true },\n ]);\n }\n\n buildAst(): AnyExpression {\n if (this.steps.length === 0) {\n throw new Error(\n 'paradeDbProximity: chain must have at least one .within(distance, term) step',\n );\n }\n const args: AnyExpression[] = [toExpr(this.start, TEXT_REF)];\n let template = '({{self}}';\n this.steps.forEach((step, i) => {\n const op = step.ordered ? '##>' : '##';\n args.push(LiteralExpr.of(step.distance));\n args.push(toExpr(step.term, TEXT_REF));\n template += ` ${op} {{arg${2 * i}}} ${op} {{arg${2 * i + 1}}}`;\n });\n template += ')';\n const [self, ...rest] = args;\n if (!self) {\n throw new Error('paradeDbProximity: invariant violation — empty args');\n }\n return new OperationExpr({\n method: 'paradeDbProximity',\n self,\n args: rest.length > 0 ? rest : undefined,\n returns: this.returnType,\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template,\n },\n });\n }\n}\n","import { LiteralExpr } from '@prisma-next/sql-relational-core/ast';\nimport { buildOperation, toExpr } from '@prisma-next/sql-relational-core/expression';\nimport { paradedbIndexTypes } from '../types/index-types';\nimport type { QueryOperationTypes } from '../types/operation-types';\nimport { PARADEDB_EXTENSION_ID } from './constants';\nimport { ParadeDbProximityChain } from './proximity-chain';\n\ntype CodecTypesBase = Record<string, { readonly input: unknown; readonly output: unknown }>;\n\nconst TEXT = 'pg/text@1' as const;\nconst BOOL = 'pg/bool@1' as const;\nconst FLOAT4 = 'pg/float4@1' as const;\nconst INT4 = 'pg/int4@1' as const;\n\nconst TEXT_REF = { codecId: TEXT } as const;\nconst INT4_REF = { codecId: INT4 } as const;\n\nexport function paradedbQueryOperations<CT extends CodecTypesBase>(): QueryOperationTypes<CT> {\n return {\n // `@@@` accepts both text and structured query types on its RHS.\n // https://docs.paradedb.com/documentation/full-text/match\n paradeDbMatch: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatch',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} @@@ {{arg0}}',\n },\n }),\n },\n paradeDbMatchAny: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatchAny',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} ||| {{arg0}}',\n },\n }),\n },\n paradeDbMatchAll: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbMatchAll',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} &&& {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/full-text/term\n paradeDbTerm: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbTerm',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} === {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/full-text/phrase\n paradeDbPhrase: {\n self: { codecId: TEXT },\n impl: (self, query) =>\n buildOperation({\n method: 'paradeDbPhrase',\n args: [toExpr(self, TEXT_REF), toExpr(query, TEXT_REF)],\n returns: { codecId: BOOL, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}} ### {{arg0}}',\n },\n }),\n },\n // https://docs.paradedb.com/documentation/sorting/score\n paradeDbScore: {\n self: { codecId: INT4 },\n impl: (self) =>\n buildOperation({\n method: 'paradeDbScore',\n args: [toExpr(self, INT4_REF)],\n returns: { codecId: FLOAT4, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: 'pdb.score({{self}})',\n },\n }),\n },\n // PG rejects parameterized typmods, so the cast argument lowers to a literal.\n // https://docs.paradedb.com/documentation/full-text/fuzzy\n paradeDbFuzzy: {\n self: { codecId: TEXT },\n impl: (self, distance) => {\n if (!Number.isInteger(distance) || distance < 0 || distance > 2) {\n throw new Error(\n `paradeDbFuzzy: distance must be an integer in [0, 2]; got ${String(distance)}`,\n );\n }\n return buildOperation({\n method: 'paradeDbFuzzy',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(distance)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.fuzzy({{arg0}})',\n },\n });\n },\n },\n // https://docs.paradedb.com/documentation/sorting/boost\n paradeDbBoost: {\n self: { codecId: TEXT },\n impl: (self, weight) => {\n if (!Number.isInteger(weight) || weight < -2048 || weight > 2048) {\n throw new Error(\n `paradeDbBoost: boost must be an integer in [-2048, 2048]; got ${String(weight)}`,\n );\n }\n return buildOperation({\n method: 'paradeDbBoost',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(weight)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.boost({{arg0}})',\n },\n });\n },\n },\n paradeDbConst: {\n self: { codecId: TEXT },\n impl: (self, value) => {\n if (!Number.isInteger(value)) {\n throw new Error(`paradeDbConst: value must be an integer; got ${String(value)}`);\n }\n return buildOperation({\n method: 'paradeDbConst',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(value)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.const({{arg0}})',\n },\n });\n },\n },\n paradeDbSlop: {\n self: { codecId: TEXT },\n impl: (self, slop) => {\n if (!Number.isInteger(slop) || slop < 0) {\n throw new Error(`paradeDbSlop: slop must be a non-negative integer; got ${String(slop)}`);\n }\n return buildOperation({\n method: 'paradeDbSlop',\n args: [toExpr(self, TEXT_REF), LiteralExpr.of(slop)],\n returns: { codecId: TEXT, nullable: false },\n lowering: {\n targetFamily: 'sql',\n strategy: 'function',\n template: '{{self}}::pdb.slop({{arg0}})',\n },\n });\n },\n },\n // https://docs.paradedb.com/documentation/full-text/proximity\n paradeDbProximity: {\n self: { codecId: TEXT },\n impl: (start) => new ParadeDbProximityChain(start),\n },\n };\n}\n\nexport const paradedbPackMeta = {\n kind: 'extension',\n id: PARADEDB_EXTENSION_ID,\n familyId: 'sql',\n targetId: 'postgres',\n version: '0.0.1',\n capabilities: {\n postgres: {\n 'paradedb/bm25': true,\n },\n },\n indexTypes: paradedbIndexTypes,\n types: {\n queryOperationTypes: {\n import: {\n package: '@prisma-next/extension-paradedb/operation-types',\n named: 'QueryOperationTypes',\n alias: 'ParadeDbQueryOperationTypes',\n },\n },\n },\n} as const;\n"],"mappings":";;;;;;;AAGA,MAAa,wBAAwB;;;;;;;;;;;;;;;;AAiBrC,MAAa,oBAAoB;;;ACbjC,MAAMA,SAAO;AACb,MAAMC,aAAW,EAAE,SAASD,OAAK;AAejC,IAAa,yBAAb,MAAa,uBAEb;CACE,aAAsB;EAAE,SAASA;EAAM,UAAU;CAAM;CAEvD;CACA;CAEA,YAAY,OAAsB,QAAkC,CAAC,GAAG;EACtE,KAAK,QAAQ;EACb,KAAK,QAAQ;CACf;CAEA,OACE,UACA,MACA,SACwB;EACxB,IAAI,CAAC,OAAO,UAAU,QAAQ,KAAK,WAAW,GAC5C,MAAM,IAAI,MACR,0EAA0E,OAAO,QAAQ,GAC3F;EAEF,OAAO,IAAI,uBAAuB,KAAK,OAAO,CAC5C,GAAG,KAAK,OACR;GAAE;GAAU;GAAM,SAAS,SAAS,YAAY;EAAK,CACvD,CAAC;CACH;CAEA,WAA0B;EACxB,IAAI,KAAK,MAAM,WAAW,GACxB,MAAM,IAAI,MACR,8EACF;EAEF,MAAM,OAAwB,CAAC,OAAO,KAAK,OAAOC,UAAQ,CAAC;EAC3D,IAAI,WAAW;EACf,KAAK,MAAM,SAAS,MAAM,MAAM;GAC9B,MAAM,K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,CAAC;GACH;EACF;EAEA,mBAAmB;GACjB,MAAM,EAAE,SAAS,KAAK;GACtB,OAAO,UAAU,IAAI,uBAAuB,KAAK;EACnD;CACF;AACF;AAEA,MAAa,mBAAmB;CAC9B,MAAM;CACN,IAAI;CACJ,UAAU;CACV,UAAU;CACV,SAAS;CACT,cAAc,EACZ,UAAU,EACR,iBAAiB,KACnB,EACF;CACA,YAAY;CACZ,OAAO,EACL,qBAAqB,EACnB,QAAQ;EACN,SAAS;EACT,OAAO;EACP,OAAO;CACT,EACF,EACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-types-
|
|
1
|
+
{"version":3,"file":"index-types-DErT09Xw.mjs","names":[],"sources":["../src/types/index-types.ts"],"sourcesContent":["import { defineIndexTypes } from '@prisma-next/sql-contract/index-types';\nimport { type } from 'arktype';\n\nexport const paradedbIndexTypes = defineIndexTypes().add('bm25', {\n options: type({\n '+': 'reject',\n key_field: 'string',\n }),\n});\n\nexport type IndexTypes = typeof paradedbIndexTypes.IndexTypes;\nexport type Bm25IndexOptions = IndexTypes['bm25']['options'];\n"],"mappings":";;;AAGA,MAAa,qBAAqB,iBAAiB,CAAC,CAAC,IAAI,QAAQ,EAC/D,SAAS,KAAK;CACZ,KAAK;CACL,WAAW;AACb,CAAC,EACH,CAAC"}
|
package/dist/index-types.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as _$_prisma_next_sql_contract_index_types0 from "@prisma-next/sql-contract/index-types";
|
|
2
|
-
|
|
3
1
|
//#region src/types/index-types.d.ts
|
|
4
|
-
declare const paradedbIndexTypes:
|
|
2
|
+
declare const paradedbIndexTypes: import("@prisma-next/sql-contract/index-types").IndexTypeBuilder<Record<never, never> & Record<"bm25", {
|
|
5
3
|
readonly options: {
|
|
6
4
|
key_field: string;
|
|
7
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-types.d.mts","names":[],"sources":["../src/types/index-types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index-types.d.mts","names":[],"sources":["../src/types/index-types.ts"],"mappings":";cAGa,kBAAA,kDAAkB,gBAAA,CAAA,MAAA,iBAAA,MAAA;EAAA;;;;KAOnB,UAAA,UAAoB,kBAAA,CAAmB,UAAU;AAAA,KACjD,gBAAA,GAAmB,UAAU"}
|
package/dist/index-types.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as paradedbIndexTypes } from "./index-types-
|
|
1
|
+
import { t as paradedbIndexTypes } from "./index-types-DErT09Xw.mjs";
|
|
2
2
|
export { paradedbIndexTypes };
|
|
@@ -132,4 +132,4 @@ type QueryOperationTypes<CT extends CodecTypesBase> = SqlQueryOperationTypes<CT,
|
|
|
132
132
|
}>;
|
|
133
133
|
//#endregion
|
|
134
134
|
export { QueryOperationTypes as t };
|
|
135
|
-
//# sourceMappingURL=operation-types-
|
|
135
|
+
//# sourceMappingURL=operation-types-BKGQc1MM.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-types-BKGQc1MM.d.mts","names":[],"sources":["../src/core/proximity-chain.ts","../src/types/operation-types.ts"],"mappings":";;;;;KAUY,aAAA;AAAA,UAEK,sBAAA;EAAA,SACN,OAAO;AAAA;AAAA,UAGR,aAAA;EAAA,SACC,QAAA;EAAA,SACA,IAAA,EAAM,aAAa;EAAA,SACnB,OAAA;AAAA;AAAA,cAIE,sBAAA,YACA,UAAA;EAAa,OAAA;EAAsB,QAAA;AAAA;EAAA,SAErC,UAAA;IAAA;;;mBAEQ,KAAA;EAAA,iBACA,KAAA;cAEL,KAAA,EAAO,aAAA,EAAe,KAAA,YAAgB,aAAA;EAKlD,MAAA,CACE,QAAA,UACA,IAAA,EAAM,aAAA,EACN,OAAA,GAAU,sBAAA,GACT,sBAAA;EAYH,QAAA,IAAY,aAAA;AAAA;;;KChDT,cAAA,GAAiB,MAAM;EAAA,SAAoB,KAAA;EAAA,SAAyB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,UAAA;MAAa,OAAA;MAAwB,QAAA;IAAA;EAAA;EAAA,SAEnC,aAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,uBAAsC,EAAA,GAC5C,QAAA,aACG,UAAA;MAAa,OAAA;MAAsB,QAAA;IAAA;EAAA;EAAA,SAEjC,aAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,uBAAsC,EAAA,GAC5C,MAAA,aACG,UAAA;MAAa,OAAA;MAAsB,QAAA;IAAA;EAAA;EAAA,SAEjC,aAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,uBAAsC,EAAA,GAC5C,KAAA,aACG,UAAA;MAAa,OAAA;MAAsB,QAAA;IAAA;EAAA;EAAA,SAEjC,YAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GACP,IAAA,EAAM,eAAA,uBAAsC,EAAA,GAC5C,IAAA,aACG,UAAA;MAAa,OAAA;MAAsB,QAAA;IAAA;EAAA;EAAA,SAEjC,iBAAA;IAAA,SACE,IAAA;MAAA,SAAiB,OAAA;IAAA;IAAA,SACjB,IAAA,GAAO,KAAA,EAAO,eAAA,uBAAsC,EAAA,MAAQ,sBAAA;EAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as QueryOperationTypes } from "./operation-types-
|
|
2
|
-
export {
|
|
1
|
+
import { t as QueryOperationTypes } from "./operation-types-BKGQc1MM.mjs";
|
|
2
|
+
export type { QueryOperationTypes };
|
package/dist/pack.d.mts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$_prisma_next_sql_contract_index_types0 from "@prisma-next/sql-contract/index-types";
|
|
2
|
-
|
|
3
1
|
//#region src/exports/pack.d.ts
|
|
4
2
|
declare const paradedbPack: {
|
|
5
3
|
readonly kind: "extension";
|
|
@@ -12,7 +10,7 @@ declare const paradedbPack: {
|
|
|
12
10
|
readonly 'paradedb/bm25': true;
|
|
13
11
|
};
|
|
14
12
|
};
|
|
15
|
-
readonly indexTypes:
|
|
13
|
+
readonly indexTypes: import("@prisma-next/sql-contract/index-types").IndexTypeBuilder<Record<never, never> & Record<"bm25", {
|
|
16
14
|
readonly options: {
|
|
17
15
|
key_field: string;
|
|
18
16
|
};
|
package/dist/pack.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pack.d.mts","names":[],"sources":["../src/exports/pack.ts"],"mappings":";cAEM,YAAA;EAAA;;;;;;;;;;wFAA+B,MAAA,iBAAA,MAAA;IAAA"}
|
package/dist/pack.mjs
CHANGED
package/dist/runtime.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as paradedbQueryOperations, t as paradedbPackMeta } from "./descriptor-meta-
|
|
1
|
+
import { n as paradedbQueryOperations, t as paradedbPackMeta } from "./descriptor-meta-gJ8uJD9M.mjs";
|
|
2
2
|
//#region src/exports/runtime.ts
|
|
3
3
|
const paradedbRuntimeDescriptor = {
|
|
4
4
|
kind: "extension",
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/extension-paradedb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-dev.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/contract": "0.
|
|
9
|
-
"@prisma-next/contract-authoring": "0.
|
|
10
|
-
"@prisma-next/family-sql": "0.
|
|
11
|
-
"@prisma-next/framework-components": "0.
|
|
12
|
-
"@prisma-next/migration-tools": "0.
|
|
13
|
-
"@prisma-next/sql-contract": "0.
|
|
14
|
-
"@prisma-next/sql-operations": "0.
|
|
15
|
-
"@prisma-next/sql-relational-core": "0.
|
|
16
|
-
"@prisma-next/sql-runtime": "0.
|
|
8
|
+
"@prisma-next/contract": "0.13.0-dev.1",
|
|
9
|
+
"@prisma-next/contract-authoring": "0.13.0-dev.1",
|
|
10
|
+
"@prisma-next/family-sql": "0.13.0-dev.1",
|
|
11
|
+
"@prisma-next/framework-components": "0.13.0-dev.1",
|
|
12
|
+
"@prisma-next/migration-tools": "0.13.0-dev.1",
|
|
13
|
+
"@prisma-next/sql-contract": "0.13.0-dev.1",
|
|
14
|
+
"@prisma-next/sql-operations": "0.13.0-dev.1",
|
|
15
|
+
"@prisma-next/sql-relational-core": "0.13.0-dev.1",
|
|
16
|
+
"@prisma-next/sql-runtime": "0.13.0-dev.1",
|
|
17
17
|
"arktype": "^2.2.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@prisma-next/adapter-postgres": "0.
|
|
21
|
-
"@prisma-next/cli": "0.
|
|
22
|
-
"@prisma-next/operations": "0.
|
|
23
|
-
"@prisma-next/sql-contract-ts": "0.
|
|
24
|
-
"@prisma-next/target-postgres": "0.
|
|
25
|
-
"@prisma-next/test-utils": "0.
|
|
26
|
-
"@prisma-next/tsconfig": "0.
|
|
27
|
-
"@prisma-next/tsdown": "0.
|
|
28
|
-
"tsdown": "0.22.
|
|
20
|
+
"@prisma-next/adapter-postgres": "0.13.0-dev.1",
|
|
21
|
+
"@prisma-next/cli": "0.13.0-dev.1",
|
|
22
|
+
"@prisma-next/operations": "0.13.0-dev.1",
|
|
23
|
+
"@prisma-next/sql-contract-ts": "0.13.0-dev.1",
|
|
24
|
+
"@prisma-next/target-postgres": "0.13.0-dev.1",
|
|
25
|
+
"@prisma-next/test-utils": "0.13.0-dev.1",
|
|
26
|
+
"@prisma-next/tsconfig": "0.13.0-dev.1",
|
|
27
|
+
"@prisma-next/tsdown": "0.13.0-dev.1",
|
|
28
|
+
"tsdown": "0.22.1",
|
|
29
29
|
"typescript": "5.9.3",
|
|
30
|
-
"vitest": "4.1.
|
|
30
|
+
"vitest": "4.1.8"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"typescript": ">=5.9"
|
package/src/contract.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
} from '@prisma-next/sql-contract/types';
|
|
24
24
|
import type {
|
|
25
25
|
Contract as ContractType,
|
|
26
|
-
|
|
26
|
+
ContractModelDefinitions,
|
|
27
27
|
ExecutionHashBase,
|
|
28
28
|
NamespaceId,
|
|
29
29
|
ProfileHashBase,
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
} from '@prisma-next/contract/types';
|
|
32
32
|
|
|
33
33
|
export type StorageHash =
|
|
34
|
-
StorageHashBase<'sha256:
|
|
34
|
+
StorageHashBase<'sha256:6214fc543ea5ffa1c5bdf6f663e62c61b6a3f04460e1e27bf7f47f1544f11603'>;
|
|
35
35
|
export type ExecutionHash = ExecutionHashBase<string>;
|
|
36
36
|
export type ProfileHash =
|
|
37
37
|
ProfileHashBase<'sha256:9c8aa3114e84ed3b7ea2bd57526d9c2e1bf7c5292be694e9d3801f566fda7ccb'>;
|
|
@@ -56,10 +56,15 @@ type ContractBase = Omit<
|
|
|
56
56
|
ContractType<
|
|
57
57
|
{
|
|
58
58
|
readonly namespaces: {
|
|
59
|
+
readonly __unbound__: {
|
|
60
|
+
readonly id: '__unbound__';
|
|
61
|
+
readonly kind: 'sql-namespace';
|
|
62
|
+
readonly entries: { readonly table: {} };
|
|
63
|
+
};
|
|
59
64
|
readonly public: {
|
|
60
65
|
readonly id: 'public';
|
|
61
66
|
readonly kind: 'sql-namespace';
|
|
62
|
-
readonly
|
|
67
|
+
readonly entries: { readonly table: {} };
|
|
63
68
|
};
|
|
64
69
|
};
|
|
65
70
|
readonly storageHash: StorageHash;
|
|
@@ -100,7 +105,8 @@ type ContractBase = Omit<
|
|
|
100
105
|
readonly profileHash: ProfileHash;
|
|
101
106
|
};
|
|
102
107
|
|
|
108
|
+
export type Models = ContractModelDefinitions<Contract>;
|
|
109
|
+
|
|
103
110
|
export type Contract = ContractWithTypeMaps<ContractBase, TypeMaps>;
|
|
104
111
|
|
|
105
112
|
export type Namespaces = Contract['storage']['namespaces'];
|
|
106
|
-
export type Models = ContractModelsMap<Contract>;
|
package/src/contract.json
CHANGED
|
@@ -13,13 +13,22 @@
|
|
|
13
13
|
},
|
|
14
14
|
"storage": {
|
|
15
15
|
"namespaces": {
|
|
16
|
+
"__unbound__": {
|
|
17
|
+
"entries": {
|
|
18
|
+
"table": {}
|
|
19
|
+
},
|
|
20
|
+
"id": "__unbound__",
|
|
21
|
+
"kind": "postgres-unbound-schema"
|
|
22
|
+
},
|
|
16
23
|
"public": {
|
|
24
|
+
"entries": {
|
|
25
|
+
"table": {}
|
|
26
|
+
},
|
|
17
27
|
"id": "public",
|
|
18
|
-
"kind": "postgres-schema"
|
|
19
|
-
"tables": {}
|
|
28
|
+
"kind": "postgres-schema"
|
|
20
29
|
}
|
|
21
30
|
},
|
|
22
|
-
"storageHash": "sha256:
|
|
31
|
+
"storageHash": "sha256:6214fc543ea5ffa1c5bdf6f663e62c61b6a3f04460e1e27bf7f47f1544f11603"
|
|
23
32
|
},
|
|
24
33
|
"capabilities": {
|
|
25
34
|
"postgres": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-types-DXmTJ7jd.d.mts","names":[],"sources":["../src/core/proximity-chain.ts","../src/types/operation-types.ts"],"mappings":";;;;;KAUY,aAAA;AAAA,UAEK,sBAAA;EAAA,SACN,OAAO;AAAA;AAAA,UAGR,aAAA;EAAA,SACC,QAAA;EAAA,SACA,IAAA,EAAM,aAAa;EAAA,SACnB,OAAA;AAAA;AAAA,cAIE,sBAAA,YACA,UAAA;EAAa,OAAA;EAAsB,QAAA;AAAA;EA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