@prisma-next/sql-runtime 0.3.0-dev.9 → 0.3.0-pr.49.7

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/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@prisma-next/sql-runtime",
3
- "version": "0.3.0-dev.9",
3
+ "version": "0.3.0-pr.49.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "SQL runtime implementation for Prisma Next",
7
7
  "dependencies": {
8
- "@prisma-next/core-execution-plane": "0.3.0-dev.9",
9
- "@prisma-next/contract": "0.3.0-dev.9",
10
- "@prisma-next/operations": "0.3.0-dev.9",
11
- "@prisma-next/runtime-executor": "0.3.0-dev.9",
12
- "@prisma-next/sql-contract": "0.3.0-dev.9",
13
- "@prisma-next/sql-operations": "0.3.0-dev.9",
14
- "@prisma-next/sql-relational-core": "0.3.0-dev.9"
8
+ "@prisma-next/contract": "0.3.0-pr.49.7",
9
+ "@prisma-next/core-execution-plane": "0.3.0-pr.49.7",
10
+ "@prisma-next/operations": "0.3.0-pr.49.7",
11
+ "@prisma-next/runtime-executor": "0.3.0-pr.49.7",
12
+ "@prisma-next/sql-contract": "0.3.0-pr.49.7",
13
+ "@prisma-next/sql-operations": "0.3.0-pr.49.7",
14
+ "@prisma-next/sql-relational-core": "0.3.0-pr.49.7"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/pg": "8.16.0",
18
- "@vitest/coverage-v8": "4.0.16",
19
18
  "pg": "8.16.3",
20
19
  "tsup": "8.5.1",
21
20
  "typescript": "5.9.3",
22
21
  "vitest": "4.0.16",
23
- "@prisma-next/test-utils": "0.0.1"
22
+ "@prisma-next/test-utils": "0.0.1",
23
+ "@prisma-next/tsconfig": "0.0.0"
24
24
  },
25
25
  "files": [
26
26
  "dist",
@@ -42,9 +42,9 @@
42
42
  "test": "vitest run --passWithNoTests",
43
43
  "test:coverage": "vitest run --coverage --passWithNoTests",
44
44
  "typecheck": "tsc --project tsconfig.json --noEmit",
45
- "lint": "biome check . --config-path ../../../biome.json --error-on-warnings",
46
- "lint:fix": "biome check --write . --config-path ../../../biome.json",
47
- "lint:fix:unsafe": "biome check --write --unsafe . --config-path ../../../biome.json",
48
- "clean": "node ../../../scripts/clean.mjs"
45
+ "lint": "biome check . --error-on-warnings",
46
+ "lint:fix": "biome check --write .",
47
+ "lint:fix:unsafe": "biome check --write --unsafe .",
48
+ "clean": "rm -rf dist coverage .tmp-output"
49
49
  }
50
50
  }
package/test/utils.ts CHANGED
@@ -238,18 +238,22 @@ export function createStubAdapter(): Adapter<SelectAst, SqlContract<SqlStorage>,
238
238
 
239
239
  /**
240
240
  * Creates a valid test contract without using validateContract.
241
- * Ensures mappings are present and returns the contract with proper typing.
241
+ * Ensures all required fields are present (mappings, capabilities, extensionPacks, meta, sources)
242
+ * and returns the contract with proper typing.
242
243
  * This helper allows tests to create contracts without depending on sql-query.
243
244
  */
244
- export function createTestContract<T extends SqlContract<SqlStorage>>(contract: T): T {
245
- // Ensure mappings are present
246
- if (!contract.mappings) {
247
- return {
248
- ...contract,
249
- mappings: { codecTypes: {}, operationTypes: {} },
250
- } as T;
251
- }
252
- return contract;
245
+ export function createTestContract<T extends SqlContract<SqlStorage>>(
246
+ contract: Partial<T> &
247
+ Omit<T, 'mappings' | 'capabilities' | 'extensionPacks' | 'meta' | 'sources'>,
248
+ ): T {
249
+ return {
250
+ ...contract,
251
+ mappings: contract.mappings ?? { codecTypes: {}, operationTypes: {} },
252
+ capabilities: contract.capabilities ?? {},
253
+ extensionPacks: contract.extensionPacks ?? {},
254
+ meta: contract.meta ?? {},
255
+ sources: contract.sources ?? {},
256
+ } as T;
253
257
  }
254
258
 
255
259
  // Re-export generic utilities from test-utils