@prisma-next/sql-lane 0.3.0-pr.94.3 → 0.3.0-pr.95.2

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.
Files changed (56) hide show
  1. package/dist/chunk-72PNERR5.js +1541 -0
  2. package/dist/chunk-72PNERR5.js.map +1 -0
  3. package/dist/exports/sql.d.ts +5 -0
  4. package/dist/exports/sql.d.ts.map +1 -0
  5. package/dist/exports/sql.js +11 -0
  6. package/dist/exports/sql.js.map +1 -0
  7. package/dist/index.d.ts +5 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +11 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/raw.d.ts +11 -0
  12. package/dist/raw.d.ts.map +1 -0
  13. package/dist/sql/builder.d.ts +11 -0
  14. package/dist/sql/builder.d.ts.map +1 -0
  15. package/dist/sql/context.d.ts +5 -0
  16. package/dist/sql/context.d.ts.map +1 -0
  17. package/dist/sql/include-builder.d.ts +35 -0
  18. package/dist/sql/include-builder.d.ts.map +1 -0
  19. package/dist/sql/join-builder.d.ts +4 -0
  20. package/dist/sql/join-builder.d.ts.map +1 -0
  21. package/dist/sql/mutation-builder.d.ts +64 -0
  22. package/dist/sql/mutation-builder.d.ts.map +1 -0
  23. package/dist/sql/plan.d.ts +4 -0
  24. package/dist/sql/plan.d.ts.map +1 -0
  25. package/dist/sql/predicate-builder.d.ts +11 -0
  26. package/dist/sql/predicate-builder.d.ts.map +1 -0
  27. package/dist/sql/projection.d.ts +18 -0
  28. package/dist/sql/projection.d.ts.map +1 -0
  29. package/dist/sql/select-builder.d.ts +35 -0
  30. package/dist/sql/select-builder.d.ts.map +1 -0
  31. package/dist/types/internal.d.ts +35 -0
  32. package/dist/types/internal.d.ts.map +1 -0
  33. package/dist/types/public.d.ts +18 -0
  34. package/dist/types/public.d.ts.map +1 -0
  35. package/dist/utils/assertions.d.ts +28 -0
  36. package/dist/utils/assertions.d.ts.map +1 -0
  37. package/dist/utils/capabilities.d.ts +4 -0
  38. package/dist/utils/capabilities.d.ts.map +1 -0
  39. package/dist/utils/errors.d.ts +30 -0
  40. package/dist/utils/errors.d.ts.map +1 -0
  41. package/dist/utils/state.d.ts +30 -0
  42. package/dist/utils/state.d.ts.map +1 -0
  43. package/package.json +18 -20
  44. package/src/sql/include-builder.ts +4 -1
  45. package/src/sql/plan.ts +2 -2
  46. package/src/sql/predicate-builder.ts +2 -2
  47. package/src/sql/projection.ts +1 -1
  48. package/src/sql/select-builder.ts +1 -1
  49. package/dist/builder-7PlMfjqo.mjs +0 -1175
  50. package/dist/builder-7PlMfjqo.mjs.map +0 -1
  51. package/dist/builder-C8ExdG4j.d.mts +0 -121
  52. package/dist/builder-C8ExdG4j.d.mts.map +0 -1
  53. package/dist/exports/sql.d.mts +0 -3
  54. package/dist/exports/sql.mjs +0 -3
  55. package/dist/index.d.mts +0 -3
  56. package/dist/index.mjs +0 -3
@@ -0,0 +1,35 @@
1
+ import type { ParamDescriptor } from '@prisma-next/contract/types';
2
+ import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
3
+ import type { TableRef } from '@prisma-next/sql-relational-core/ast';
4
+ import type { AnyBinaryBuilder, AnyExpressionSource, AnyOrderBuilder, NestedProjection } from '@prisma-next/sql-relational-core/types';
5
+ import type { ProjectionState } from '../utils/state';
6
+ export type ProjectionInput = Record<string, AnyExpressionSource | boolean | NestedProjection>;
7
+ export interface MetaBuildArgs {
8
+ readonly contract: SqlContract<SqlStorage>;
9
+ readonly table: TableRef;
10
+ readonly projection: ProjectionState;
11
+ readonly joins?: ReadonlyArray<{
12
+ readonly joinType: 'inner' | 'left' | 'right' | 'full';
13
+ readonly table: TableRef;
14
+ readonly on: {
15
+ readonly left: unknown;
16
+ readonly right: unknown;
17
+ };
18
+ }>;
19
+ readonly includes?: ReadonlyArray<{
20
+ readonly alias: string;
21
+ readonly table: TableRef;
22
+ readonly on: {
23
+ readonly left: unknown;
24
+ readonly right: unknown;
25
+ };
26
+ readonly childProjection: ProjectionState;
27
+ readonly childWhere?: AnyBinaryBuilder;
28
+ readonly childOrderBy?: AnyOrderBuilder;
29
+ }>;
30
+ readonly where?: AnyBinaryBuilder;
31
+ readonly orderBy?: AnyOrderBuilder;
32
+ readonly paramDescriptors: ParamDescriptor[];
33
+ readonly paramCodecs?: Record<string, string>;
34
+ }
35
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/types/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,GAAG,gBAAgB,CAAC,CAAC;AAE/F,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;QAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;QACvD,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;QACzB,QAAQ,CAAC,EAAE,EAAE;YACX,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;YACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;SACzB,CAAC;KACH,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC;QAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;QACzB,QAAQ,CAAC,EAAE,EAAE;YACX,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;YACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;SACzB,CAAC;QACF,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;QAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;QACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,eAAe,CAAC;KACzC,CAAC,CAAC;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C"}
@@ -0,0 +1,18 @@
1
+ import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
2
+ import type { TableRef } from '@prisma-next/sql-relational-core/ast';
3
+ import type { ParamPlaceholder, RawFactory } from '@prisma-next/sql-relational-core/types';
4
+ import type { DeleteBuilder, InsertBuilder, UpdateBuilder } from '../sql/mutation-builder';
5
+ import type { SelectBuilderImpl } from '../sql/select-builder';
6
+ export type { TableRef } from '@prisma-next/sql-relational-core/ast';
7
+ export type { AnyColumnBuilder, BuildOptions, InferReturningRow, ParamPlaceholder, RawFactory, SqlBuilderOptions, } from '@prisma-next/sql-relational-core/types';
8
+ export type SelectBuilder<TContract extends SqlContract<SqlStorage> = SqlContract<SqlStorage>, Row = unknown, CodecTypes extends Record<string, {
9
+ readonly output: unknown;
10
+ }> = Record<string, never>, Includes extends Record<string, unknown> = Record<string, never>> = SelectBuilderImpl<TContract, Row, CodecTypes, Includes> & {
11
+ readonly raw: RawFactory;
12
+ insert(table: TableRef, values: Record<string, ParamPlaceholder>): InsertBuilder<TContract, CodecTypes>;
13
+ update(table: TableRef, set: Record<string, ParamPlaceholder>): UpdateBuilder<TContract, CodecTypes>;
14
+ delete(table: TableRef): DeleteBuilder<TContract, CodecTypes>;
15
+ };
16
+ export type { IncludeChildBuilder } from '../sql/include-builder';
17
+ export type { DeleteBuilder, InsertBuilder, UpdateBuilder } from '../sql/mutation-builder';
18
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/types/public.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,YAAY,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,GAClB,MAAM,wCAAwC,CAAC;AAEhD,MAAM,MAAM,aAAa,CACvB,SAAS,SAAS,WAAW,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,EACnE,GAAG,GAAG,OAAO,EACb,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACvF,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAC9D,iBAAiB,CAAC,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG;IAC5D,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,MAAM,CACJ,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACvC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACxC,MAAM,CACJ,KAAK,EAAE,QAAQ,EACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GACpC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CAC/D,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { AnyColumnBuilder } from '@prisma-next/sql-relational-core/types';
2
+ /**
3
+ * Asserts that a ColumnBuilder has table and column properties.
4
+ */
5
+ export declare function assertColumnBuilder(col: unknown, context: string): AnyColumnBuilder;
6
+ /**
7
+ * Asserts that a JoinOnPredicate has valid left and right columns.
8
+ */
9
+ export declare function assertJoinOnPredicate(on: {
10
+ left?: {
11
+ table?: string;
12
+ column?: string;
13
+ };
14
+ right?: {
15
+ table?: string;
16
+ column?: string;
17
+ };
18
+ }): asserts on is {
19
+ left: {
20
+ table: string;
21
+ column: string;
22
+ };
23
+ right: {
24
+ table: string;
25
+ column: string;
26
+ };
27
+ };
28
+ //# sourceMappingURL=assertions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["../../src/utils/assertions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAYnF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE;IACxC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C,GAAG,OAAO,CAAC,EAAE,IAAI;IAChB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1C,CAIA"}
@@ -0,0 +1,4 @@
1
+ import type { SqlContract, SqlStorage } from '@prisma-next/sql-contract/types';
2
+ export declare function checkIncludeCapabilities(contract: SqlContract<SqlStorage>): void;
3
+ export declare function checkReturningCapability(contract: SqlContract<SqlStorage>): void;
4
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/utils/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAQ/E,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,IAAI,CAkBhF;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,IAAI,CAUhF"}
@@ -0,0 +1,30 @@
1
+ export declare function errorAliasPathEmpty(): never;
2
+ export declare function errorAliasCollision(path: string[], alias: string, existingPath?: string[]): never;
3
+ export declare function errorLimitMustBeNonNegativeInteger(): never;
4
+ export declare function errorChildProjectionMustBeSpecified(): never;
5
+ export declare function errorIncludeRequiresCapabilities(target?: string): never;
6
+ export declare function errorIncludeCapabilitiesNotTrue(target?: string, values?: {
7
+ lateral?: unknown;
8
+ jsonAgg?: unknown;
9
+ }): never;
10
+ export declare function errorUnknownTable(tableName: string): never;
11
+ export declare function errorSelfJoinNotSupported(): never;
12
+ export declare function errorChildProjectionEmpty(): never;
13
+ export declare function errorIncludeAliasCollision(alias: string, type: 'projection' | 'include'): never;
14
+ export declare function errorMissingColumnForAlias(alias: string, index: number): never;
15
+ export declare function errorMissingAlias(index: number): never;
16
+ export declare function errorInvalidColumnForAlias(alias: string, index: number): never;
17
+ export declare function errorFromMustBeCalled(): never;
18
+ export declare function errorSelectMustBeCalled(): never;
19
+ export declare function errorMissingParameter(paramName: string): never;
20
+ export declare function errorInvalidProjectionValue(path: string[]): never;
21
+ export declare function errorIncludeAliasNotFound(alias: string): never;
22
+ export declare function errorInvalidProjectionKey(key: string): never;
23
+ export declare function errorProjectionEmpty(): never;
24
+ export declare function errorReturningRequiresCapability(target?: string): never;
25
+ export declare function errorReturningCapabilityNotTrue(target?: string, value?: unknown): never;
26
+ export declare function errorUnknownColumn(columnName: string, tableName: string): never;
27
+ export declare function errorWhereMustBeCalledForUpdate(): never;
28
+ export declare function errorFailedToBuildWhereClause(): never;
29
+ export declare function errorWhereMustBeCalledForDelete(): never;
30
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,IAAI,KAAK,CAE3C;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK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AED,wBAAgB,oBAAoB,IAAI,KAAK,CAE5C;AAED,wBAAgB,gCAAgC,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAevE;AAED,wBAAgB,+BAA+B,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAcvF;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,CAE/E;AAED,wBAAgB,+BAA+B,IAAI,KAAK,CAEvD;AAED,wBAAgB,6BAA6B,IAAI,KAAK,CAErD;AAED,wBAAgB,+BAA+B,IAAI,KAAK,CAEvD"}
@@ -0,0 +1,30 @@
1
+ import type { TableRef } from '@prisma-next/sql-relational-core/ast';
2
+ import type { AnyBinaryBuilder, AnyExpressionSource, AnyOrderBuilder, JoinOnPredicate } from '@prisma-next/sql-relational-core/types';
3
+ export interface ProjectionState {
4
+ readonly aliases: string[];
5
+ readonly columns: AnyExpressionSource[];
6
+ }
7
+ export interface JoinState {
8
+ readonly joinType: 'inner' | 'left' | 'right' | 'full';
9
+ readonly table: TableRef;
10
+ readonly on: JoinOnPredicate;
11
+ }
12
+ export interface IncludeState {
13
+ readonly alias: string;
14
+ readonly table: TableRef;
15
+ readonly on: JoinOnPredicate;
16
+ readonly childProjection: ProjectionState;
17
+ readonly childWhere?: AnyBinaryBuilder;
18
+ readonly childOrderBy?: AnyOrderBuilder;
19
+ readonly childLimit?: number;
20
+ }
21
+ export interface BuilderState {
22
+ from?: TableRef;
23
+ joins?: ReadonlyArray<JoinState>;
24
+ includes?: ReadonlyArray<IncludeState>;
25
+ projection?: ProjectionState;
26
+ where?: AnyBinaryBuilder;
27
+ orderBy?: AnyOrderBuilder;
28
+ limit?: number;
29
+ }
30
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":"AAAA,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ane",
3
- "version": "0.3.0-pr.94.3",
3
+ "version": "0.3.0-pr.95.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
- "engines": {
7
- "node": ">=20"
8
- },
9
6
  "description": "Relational DSL and raw SQL helpers for Prisma Next",
10
7
  "dependencies": {
11
- "@prisma-next/plan": "0.3.0-pr.94.3",
12
- "@prisma-next/contract": "0.3.0-pr.94.3",
13
- "@prisma-next/sql-contract": "0.3.0-pr.94.3",
14
- "@prisma-next/sql-relational-core": "0.3.0-pr.94.3"
8
+ "@prisma-next/contract": "0.3.0-pr.95.2",
9
+ "@prisma-next/plan": "0.3.0-pr.95.2",
10
+ "@prisma-next/sql-contract": "0.3.0-pr.95.2",
11
+ "@prisma-next/sql-relational-core": "0.3.0-pr.95.2"
15
12
  },
16
13
  "devDependencies": {
17
14
  "@types/pg": "8.16.0",
18
15
  "pg": "8.16.3",
19
- "tsdown": "0.18.4",
16
+ "tsup": "8.5.1",
20
17
  "typescript": "5.9.3",
21
18
  "vitest": "4.0.16",
22
- "@prisma-next/sql-contract-ts": "0.3.0-pr.94.3",
23
- "@prisma-next/sql-runtime": "0.3.0-pr.94.3",
19
+ "@prisma-next/sql-contract-ts": "0.3.0-pr.95.2",
24
20
  "@prisma-next/test-utils": "0.0.1",
25
21
  "@prisma-next/tsconfig": "0.0.0",
26
- "@prisma-next/tsdown": "0.0.0"
22
+ "@prisma-next/sql-runtime": "0.3.0-pr.95.2"
27
23
  },
28
24
  "files": [
29
25
  "dist",
30
26
  "src"
31
27
  ],
32
28
  "exports": {
33
- ".": "./dist/index.mjs",
34
- "./sql": "./dist/exports/sql.mjs",
35
- "./package.json": "./package.json"
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js"
32
+ },
33
+ "./sql": {
34
+ "types": "./dist/exports/sql.d.ts",
35
+ "import": "./dist/exports/sql.js"
36
+ }
36
37
  },
37
- "main": "./dist/index.mjs",
38
- "module": "./dist/index.mjs",
39
- "types": "./dist/index.d.mts",
40
38
  "scripts": {
41
- "build": "tsdown",
39
+ "build": "tsup --config tsup.config.ts && tsc --project tsconfig.build.json",
42
40
  "test": "vitest run",
43
41
  "test:coverage": "vitest run --coverage",
44
- "typecheck": "tsc --noEmit",
42
+ "typecheck": "tsc --project tsconfig.json --noEmit",
45
43
  "lint": "biome check . --error-on-warnings",
46
44
  "lint:fix": "biome check --write .",
47
45
  "lint:fix:unsafe": "biome check --write --unsafe .",
@@ -13,7 +13,6 @@ import {
13
13
  createOrderByItem,
14
14
  createTableRef,
15
15
  } from '@prisma-next/sql-relational-core/ast';
16
- import { extractBaseColumnRef, isOperationExpr } from '@prisma-next/sql-relational-core/guards';
17
16
  import type {
18
17
  AnyBinaryBuilder,
19
18
  AnyOrderBuilder,
@@ -23,6 +22,10 @@ import type {
23
22
  NestedProjection,
24
23
  OrderBuilder,
25
24
  } from '@prisma-next/sql-relational-core/types';
25
+ import {
26
+ extractBaseColumnRef,
27
+ isOperationExpr,
28
+ } from '@prisma-next/sql-relational-core/utils/guards';
26
29
  import {
27
30
  errorChildProjectionMustBeSpecified,
28
31
  errorLimitMustBeNonNegativeInteger,
package/src/sql/plan.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { PlanMeta } from '@prisma-next/contract/types';
2
2
  import type { Expression } from '@prisma-next/sql-relational-core/ast';
3
3
  import { compact } from '@prisma-next/sql-relational-core/ast';
4
+ import type { AnyExpressionSource } from '@prisma-next/sql-relational-core/types';
4
5
  import {
5
6
  collectColumnRefs,
6
7
  isColumnBuilder,
7
8
  isExpressionBuilder,
8
9
  isOperationExpr,
9
- } from '@prisma-next/sql-relational-core/guards';
10
- import type { AnyExpressionSource } from '@prisma-next/sql-relational-core/types';
10
+ } from '@prisma-next/sql-relational-core/utils/guards';
11
11
  import type { MetaBuildArgs } from '../types/internal';
12
12
  import { assertColumnBuilder } from '../utils/assertions';
13
13
  import { errorMissingColumnForAlias } from '../utils/errors';
@@ -2,12 +2,12 @@ import type { ParamDescriptor } from '@prisma-next/contract/types';
2
2
  import type { SqlContract, SqlStorage, StorageColumn } from '@prisma-next/sql-contract/types';
3
3
  import type { BinaryExpr, Expression, ParamRef } from '@prisma-next/sql-relational-core/ast';
4
4
  import { createBinaryExpr, createParamRef } from '@prisma-next/sql-relational-core/ast';
5
+ import type { BinaryBuilder, ParamPlaceholder } from '@prisma-next/sql-relational-core/types';
5
6
  import {
6
7
  isColumnBuilder,
7
8
  isExpressionBuilder,
8
9
  isParamPlaceholder,
9
- } from '@prisma-next/sql-relational-core/guards';
10
- import type { BinaryBuilder, ParamPlaceholder } from '@prisma-next/sql-relational-core/types';
10
+ } from '@prisma-next/sql-relational-core/utils/guards';
11
11
  import {
12
12
  errorFailedToBuildWhereClause,
13
13
  errorMissingParameter,
@@ -1,6 +1,6 @@
1
1
  import type { TableRef } from '@prisma-next/sql-relational-core/ast';
2
- import { isExpressionSource } from '@prisma-next/sql-relational-core/guards';
3
2
  import type { AnyExpressionSource, NestedProjection } from '@prisma-next/sql-relational-core/types';
3
+ import { isExpressionSource } from '@prisma-next/sql-relational-core/utils/guards';
4
4
  import type { ProjectionInput } from '../types/internal';
5
5
  import {
6
6
  errorAliasCollision,
@@ -16,7 +16,6 @@ import {
16
16
  createSelectAst,
17
17
  createTableRef,
18
18
  } from '@prisma-next/sql-relational-core/ast';
19
- import { isExpressionBuilder } from '@prisma-next/sql-relational-core/guards';
20
19
  import type { SqlQueryPlan } from '@prisma-next/sql-relational-core/plan';
21
20
  import type { QueryLaneContext } from '@prisma-next/sql-relational-core/query-lane-context';
22
21
  import type {
@@ -31,6 +30,7 @@ import type {
31
30
  OrderBuilder,
32
31
  SqlBuilderOptions,
33
32
  } from '@prisma-next/sql-relational-core/types';
33
+ import { isExpressionBuilder } from '@prisma-next/sql-relational-core/utils/guards';
34
34
  import type { ProjectionInput } from '../types/internal';
35
35
  import { checkIncludeCapabilities } from '../utils/capabilities';
36
36
  import {