@classytic/repo-core 0.22.0 → 0.24.0
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/CHANGELOG.md +908 -890
- package/dist/cleanup/types.d.mts +34 -1
- package/dist/errors/conflict.d.mts +84 -0
- package/dist/errors/conflict.mjs +63 -0
- package/dist/errors/index.d.mts +2 -1
- package/dist/errors/index.mjs +2 -1
- package/dist/lock/index.d.mts +21 -0
- package/dist/lock/index.mjs +10 -3
- package/dist/repository/capabilities.d.mts +44 -2
- package/dist/repository/index.d.mts +4 -2
- package/dist/repository/index.mjs +3 -1
- package/dist/repository/read-only.d.mts +60 -0
- package/dist/repository/read-only.mjs +80 -0
- package/dist/repository/resilience.d.mts +15 -1
- package/dist/repository/resilience.mjs +24 -1
- package/dist/repository/retrying-transaction.d.mts +48 -0
- package/dist/repository/retrying-transaction.mjs +35 -0
- package/dist/repository/types.d.mts +36 -2
- package/dist/tenant/index.d.mts +2 -2
- package/dist/tenant/index.mjs +2 -2
- package/dist/tenant/resolve.d.mts +32 -1
- package/dist/tenant/resolve.mjs +40 -1
- package/dist/testing/conformance.mjs +63 -0
- package/dist/testing/types.d.mts +11 -0
- package/package.json +182 -182
package/package.json
CHANGED
|
@@ -1,184 +1,184 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
2
|
+
"name": "@classytic/repo-core",
|
|
3
|
+
"version": "0.24.0",
|
|
4
|
+
"description": "Driver-agnostic repository primitives: hooks, Filter IR, operations, pagination, cache contract. Foundation for mongokit, sqlitekit, pgkit, and prismakit. Lean by design — no plugins ship here; each kit owns its own.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md",
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"CHANGELOG.md"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
"./hooks": {
|
|
18
|
+
"types": "./dist/hooks/index.d.mts",
|
|
19
|
+
"default": "./dist/hooks/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./operations": {
|
|
22
|
+
"types": "./dist/operations/index.d.mts",
|
|
23
|
+
"default": "./dist/operations/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./errors": {
|
|
26
|
+
"types": "./dist/errors/index.d.mts",
|
|
27
|
+
"default": "./dist/errors/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./pagination": {
|
|
30
|
+
"types": "./dist/pagination/index.d.mts",
|
|
31
|
+
"default": "./dist/pagination/index.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./repository": {
|
|
34
|
+
"types": "./dist/repository/index.d.mts",
|
|
35
|
+
"default": "./dist/repository/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./filter": {
|
|
38
|
+
"types": "./dist/filter/index.d.mts",
|
|
39
|
+
"default": "./dist/filter/index.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./update": {
|
|
42
|
+
"types": "./dist/update/index.d.mts",
|
|
43
|
+
"default": "./dist/update/index.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./query-parser": {
|
|
46
|
+
"types": "./dist/query-parser/index.d.mts",
|
|
47
|
+
"default": "./dist/query-parser/index.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./context": {
|
|
50
|
+
"types": "./dist/context/index.d.mts",
|
|
51
|
+
"default": "./dist/context/index.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./cache": {
|
|
54
|
+
"types": "./dist/cache/index.d.mts",
|
|
55
|
+
"default": "./dist/cache/index.mjs"
|
|
56
|
+
},
|
|
57
|
+
"./hash": {
|
|
58
|
+
"types": "./dist/hash/index.d.mts",
|
|
59
|
+
"default": "./dist/hash/index.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./events": {
|
|
62
|
+
"types": "./dist/events/index.d.mts",
|
|
63
|
+
"default": "./dist/events/index.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./schema": {
|
|
66
|
+
"types": "./dist/schema/index.d.mts",
|
|
67
|
+
"default": "./dist/schema/index.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./testing": {
|
|
70
|
+
"types": "./dist/testing/index.d.mts",
|
|
71
|
+
"default": "./dist/testing/index.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./tenant": {
|
|
74
|
+
"types": "./dist/tenant/index.d.mts",
|
|
75
|
+
"default": "./dist/tenant/index.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./lookup": {
|
|
78
|
+
"types": "./dist/lookup/index.d.mts",
|
|
79
|
+
"default": "./dist/lookup/index.mjs"
|
|
80
|
+
},
|
|
81
|
+
"./adapter": {
|
|
82
|
+
"types": "./dist/adapter/index.d.mts",
|
|
83
|
+
"default": "./dist/adapter/index.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./better-auth": {
|
|
86
|
+
"types": "./dist/better-auth/index.d.mts",
|
|
87
|
+
"default": "./dist/better-auth/index.mjs"
|
|
88
|
+
},
|
|
89
|
+
"./aggregate": {
|
|
90
|
+
"types": "./dist/aggregate/index.d.mts",
|
|
91
|
+
"default": "./dist/aggregate/index.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./plugins": {
|
|
94
|
+
"types": "./dist/plugins/index.d.mts",
|
|
95
|
+
"default": "./dist/plugins/index.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./lock": {
|
|
98
|
+
"types": "./dist/lock/index.d.mts",
|
|
99
|
+
"default": "./dist/lock/index.mjs"
|
|
100
|
+
},
|
|
101
|
+
"./usage": {
|
|
102
|
+
"types": "./dist/usage/index.d.mts",
|
|
103
|
+
"default": "./dist/usage/index.mjs"
|
|
104
|
+
},
|
|
105
|
+
"./package.json": "./package.json",
|
|
106
|
+
"./sync": {
|
|
107
|
+
"types": "./dist/sync/index.d.mts",
|
|
108
|
+
"default": "./dist/sync/index.mjs"
|
|
109
|
+
},
|
|
110
|
+
"./cleanup": {
|
|
111
|
+
"types": "./dist/cleanup/index.d.mts",
|
|
112
|
+
"default": "./dist/cleanup/index.mjs"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"keywords": [
|
|
116
|
+
"repository",
|
|
117
|
+
"repository-pattern",
|
|
118
|
+
"data-access",
|
|
119
|
+
"hooks",
|
|
120
|
+
"filter-ir",
|
|
121
|
+
"pagination",
|
|
122
|
+
"cursor-pagination",
|
|
123
|
+
"keyset-pagination",
|
|
124
|
+
"plugin-based",
|
|
125
|
+
"driver-agnostic",
|
|
126
|
+
"typescript",
|
|
127
|
+
"esm"
|
|
128
|
+
],
|
|
129
|
+
"author": "Classytic <classytic.dev@gmail.com> (https://github.com/classytic)",
|
|
130
|
+
"license": "MIT",
|
|
131
|
+
"repository": {
|
|
132
|
+
"type": "git",
|
|
133
|
+
"url": "git+https://github.com/classytic/repo-core.git"
|
|
134
|
+
},
|
|
135
|
+
"bugs": {
|
|
136
|
+
"url": "https://github.com/classytic/repo-core/issues"
|
|
137
|
+
},
|
|
138
|
+
"homepage": "https://github.com/classytic/repo-core#readme",
|
|
139
|
+
"scripts": {
|
|
140
|
+
"build": "tsdown",
|
|
141
|
+
"dev": "tsdown --watch",
|
|
142
|
+
"test": "vitest run --project unit --project integration",
|
|
143
|
+
"test:unit": "vitest run --project unit",
|
|
144
|
+
"test:integration": "vitest run --project integration",
|
|
145
|
+
"test:e2e": "vitest run --project e2e",
|
|
146
|
+
"test:all": "vitest run",
|
|
147
|
+
"test:watch": "vitest --project unit --project integration",
|
|
148
|
+
"bench": "vitest bench --run --project bench",
|
|
149
|
+
"test:coverage": "vitest run --coverage",
|
|
150
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
151
|
+
"lint": "biome check src tests",
|
|
152
|
+
"lint:fix": "biome check src tests --write",
|
|
153
|
+
"format": "biome format src tests --write",
|
|
154
|
+
"check": "biome ci src tests --diagnostic-level=error",
|
|
155
|
+
"knip": "knip",
|
|
156
|
+
"push": "classytic-push",
|
|
157
|
+
"prepublishOnly": "npm run check && npm run build && npm run typecheck && npm test",
|
|
158
|
+
"release:tag": "node -e \"require('child_process').execSync('npm run push -- v'+require('./package.json').version,{stdio:'inherit'})\"",
|
|
159
|
+
"release": "npm run push -- main && npm run release:tag && npm publish",
|
|
160
|
+
"publish:dry": "npm publish --dry-run --access public",
|
|
161
|
+
"publish:npm": "npm publish --access public"
|
|
162
|
+
},
|
|
163
|
+
"devDependencies": {
|
|
164
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
165
|
+
"@biomejs/biome": "^2.4.12",
|
|
166
|
+
"@classytic/dev-tools": "^0.2.0",
|
|
167
|
+
"@types/node": "^22.0.0",
|
|
168
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
169
|
+
"fast-check": "^4.7.0",
|
|
170
|
+
"knip": "^6.3.0",
|
|
171
|
+
"publint": "^0.3.18",
|
|
172
|
+
"tsdown": "^0.22.14",
|
|
173
|
+
"typescript": "^7.0.2",
|
|
174
|
+
"vitest": "^4.1.4"
|
|
175
|
+
},
|
|
176
|
+
"peerDependencies": {
|
|
177
|
+
"vitest": "^3.0.0 || ^4.0.0"
|
|
178
|
+
},
|
|
179
|
+
"peerDependenciesMeta": {
|
|
180
|
+
"vitest": {
|
|
181
|
+
"optional": true
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
184
|
}
|