@zenstackhq/client-helpers 3.1.1 → 3.2.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/package.json +12 -9
- package/.turbo/turbo-build.log +0 -24
- package/eslint.config.js +0 -4
- package/src/constants.ts +0 -4
- package/src/fetch.ts +0 -107
- package/src/index.ts +0 -9
- package/src/invalidation.ts +0 -89
- package/src/logging.ts +0 -15
- package/src/mutator.ts +0 -449
- package/src/nested-read-visitor.ts +0 -68
- package/src/nested-write-visitor.ts +0 -359
- package/src/optimistic.ts +0 -139
- package/src/query-analysis.ts +0 -111
- package/src/types.ts +0 -82
- package/test/fetch.test.ts +0 -423
- package/test/invalidation.test.ts +0 -602
- package/test/mutator.test.ts +0 -1533
- package/test/nested-read-visitor.test.ts +0 -949
- package/test/nested-write-visitor.test.ts +0 -1244
- package/test/optimistic.test.ts +0 -743
- package/test/query-analysis.test.ts +0 -1399
- package/test/test-helpers.ts +0 -37
- package/tsconfig.json +0 -4
- package/tsconfig.test.json +0 -7
- package/tsup.config.ts +0 -14
- package/vitest.config.ts +0 -4
package/test/test-helpers.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { FieldDef, SchemaDef } from '@zenstackhq/schema';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Helper to create a mock schema for testing
|
|
5
|
-
*/
|
|
6
|
-
export function createSchema(models: SchemaDef['models']): SchemaDef {
|
|
7
|
-
return {
|
|
8
|
-
provider: { type: 'postgresql' },
|
|
9
|
-
models,
|
|
10
|
-
plugins: {},
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Helper to create a field definition
|
|
16
|
-
*/
|
|
17
|
-
export function createField(name: string, type: string, optional = false): FieldDef {
|
|
18
|
-
return {
|
|
19
|
-
name,
|
|
20
|
-
type,
|
|
21
|
-
optional,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Helper to create a relation field
|
|
27
|
-
*/
|
|
28
|
-
export function createRelationField(name: string, type: string, optional = false): FieldDef {
|
|
29
|
-
return {
|
|
30
|
-
name,
|
|
31
|
-
type,
|
|
32
|
-
optional,
|
|
33
|
-
relation: {
|
|
34
|
-
opposite: 'user',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
package/tsconfig.json
DELETED
package/tsconfig.test.json
DELETED
package/tsup.config.ts
DELETED
package/vitest.config.ts
DELETED