@prisma-next/sql-operations 0.3.0-dev.4 → 0.3.0-dev.6

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/index.d.ts CHANGED
@@ -1,15 +1,13 @@
1
- import { OperationSignature, OperationRegistry } from '@prisma-next/operations';
2
-
3
- interface SqlLoweringSpec {
1
+ import type { OperationSignature as CoreOperationSignature, OperationRegistry } from '@prisma-next/operations';
2
+ export interface SqlLoweringSpec {
4
3
  readonly targetFamily: 'sql';
5
4
  readonly strategy: 'infix' | 'function';
6
5
  readonly template: string;
7
6
  }
8
- interface SqlOperationSignature extends OperationSignature {
7
+ export interface SqlOperationSignature extends CoreOperationSignature {
9
8
  readonly lowering: SqlLoweringSpec;
10
9
  }
11
- type SqlOperationRegistry = OperationRegistry;
12
- declare function createSqlOperationRegistry(): SqlOperationRegistry;
13
- declare function register(registry: SqlOperationRegistry, signature: SqlOperationSignature): void;
14
-
15
- export { type SqlLoweringSpec, type SqlOperationRegistry, type SqlOperationSignature, createSqlOperationRegistry, register };
10
+ export type SqlOperationRegistry = OperationRegistry;
11
+ export declare function createSqlOperationRegistry(): SqlOperationRegistry;
12
+ export declare function register(registry: SqlOperationRegistry, signature: SqlOperationSignature): void;
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,sBAAsB,EAC5C,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,UAAU,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,qBAAsB,SAAQ,sBAAsB;IACnE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC;AAED,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AAErD,wBAAgB,0BAA0B,IAAI,oBAAoB,CAEjE;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,EAAE,SAAS,EAAE,qBAAqB,GAAG,IAAI,CAE/F"}
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-operations",
3
- "version": "0.3.0-dev.4",
3
+ "version": "0.3.0-dev.6",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "SQL-specific operations for Prisma Next",
7
7
  "dependencies": {
8
8
  "arktype": "^2.1.26",
9
- "@prisma-next/operations": "0.3.0-dev.4"
9
+ "@prisma-next/operations": "0.3.0-dev.6"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@vitest/coverage-v8": "4.0.16",
13
13
  "tsup": "8.5.1",
14
14
  "typescript": "5.9.3",
15
15
  "vitest": "4.0.16",
16
- "@prisma-next/emitter": "0.3.0-dev.4",
16
+ "@prisma-next/emitter": "0.3.0-dev.6",
17
17
  "@prisma-next/test-utils": "0.0.1"
18
18
  },
19
19
  "files": [
20
- "dist"
20
+ "dist",
21
+ "src"
21
22
  ],
22
23
  "exports": {
23
24
  ".": {
@@ -26,7 +27,7 @@
26
27
  }
27
28
  },
28
29
  "scripts": {
29
- "build": "tsup --config tsup.config.ts",
30
+ "build": "tsup --config tsup.config.ts && tsc --project tsconfig.build.json",
30
31
  "test": "vitest run --passWithNoTests",
31
32
  "test:coverage": "vitest run --coverage --passWithNoTests",
32
33
  "typecheck": "tsc --project tsconfig.json --noEmit",
package/src/index.ts ADDED
@@ -0,0 +1,25 @@
1
+ import type {
2
+ OperationSignature as CoreOperationSignature,
3
+ OperationRegistry,
4
+ } from '@prisma-next/operations';
5
+ import { createOperationRegistry } from '@prisma-next/operations';
6
+
7
+ export interface SqlLoweringSpec {
8
+ readonly targetFamily: 'sql';
9
+ readonly strategy: 'infix' | 'function';
10
+ readonly template: string;
11
+ }
12
+
13
+ export interface SqlOperationSignature extends CoreOperationSignature {
14
+ readonly lowering: SqlLoweringSpec;
15
+ }
16
+
17
+ export type SqlOperationRegistry = OperationRegistry;
18
+
19
+ export function createSqlOperationRegistry(): SqlOperationRegistry {
20
+ return createOperationRegistry() as SqlOperationRegistry;
21
+ }
22
+
23
+ export function register(registry: SqlOperationRegistry, signature: SqlOperationSignature): void {
24
+ registry.register(signature);
25
+ }