@veloxts/client 0.6.25 → 0.6.27

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 (3) hide show
  1. package/CHANGELOG.md +371 -0
  2. package/GUIDE.md +75 -0
  3. package/package.json +5 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,371 @@
1
+ # @veloxts/client
2
+
3
+ ## 0.6.27
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: add GUIDE, LICENSE and CHANGELOG.md to npm files
8
+
9
+ ## 0.6.26
10
+
11
+ ### Patch Changes
12
+
13
+ - docs(mcp): add README and GUIDE, docs(web): simplify README and create concise GUIDE
14
+
15
+ ## 0.6.25
16
+
17
+ ### Patch Changes
18
+
19
+ - docs(create): add guide for React Server Components setup
20
+
21
+ ## 0.6.24
22
+
23
+ ### Patch Changes
24
+
25
+ - clarify installation paths and package contents
26
+
27
+ ## 0.6.23
28
+
29
+ ### Patch Changes
30
+
31
+ - add defineContract for improved type inference DX
32
+
33
+ ## 0.6.22
34
+
35
+ ### Patch Changes
36
+
37
+ - support {method, path} route entry format
38
+
39
+ ## 0.6.21
40
+
41
+ ### Patch Changes
42
+
43
+ - separate schemas from procedures for browser-safe import
44
+
45
+ ## 0.6.20
46
+
47
+ ### Patch Changes
48
+
49
+ - add Fastify ecosystem stubs and debuglog to util
50
+
51
+ ## 0.6.19
52
+
53
+ ### Patch Changes
54
+
55
+ - restore dotenv stub for browser compatibility
56
+
57
+ ## 0.6.18
58
+
59
+ ### Patch Changes
60
+
61
+ - add node:fs/promises stub and fix esbuild plugin
62
+
63
+ ## 0.6.17
64
+
65
+ ### Patch Changes
66
+
67
+ - remove optimizeDeps.exclude to fix CJS/ESM interop
68
+
69
+ ## 0.6.16
70
+
71
+ ### Patch Changes
72
+
73
+ - add stubs for Fastify ecosystem packages
74
+
75
+ ## 0.6.15
76
+
77
+ ### Patch Changes
78
+
79
+ - implement three-layer Node.js stubbing for Vite
80
+
81
+ ## 0.6.14
82
+
83
+ ### Patch Changes
84
+
85
+ - stub dotenv as virtual module instead of process shims
86
+
87
+ ## 0.6.13
88
+
89
+ ### Patch Changes
90
+
91
+ - add process.argv stub for dotenv browser compatibility
92
+
93
+ ## 0.6.12
94
+
95
+ ### Patch Changes
96
+
97
+ - Fixes the "process is not defined" error from dotenv
98
+
99
+ ## 0.6.11
100
+
101
+ ### Patch Changes
102
+
103
+ - add Vite plugin for Node.js module stubs
104
+
105
+ ## 0.6.10
106
+
107
+ ### Patch Changes
108
+
109
+ - use import() type syntax for AppRouter
110
+
111
+ ## 0.6.9
112
+
113
+ ### Patch Changes
114
+
115
+ - isolate auth procedures from database imports
116
+
117
+ ## 0.6.8
118
+
119
+ ### Patch Changes
120
+
121
+ - prevent dotenv from leaking into browser bundle
122
+
123
+ ## 0.6.7
124
+
125
+ ### Patch Changes
126
+
127
+ - better-sqlite3 versions mismatch fix
128
+
129
+ ## 0.6.6
130
+
131
+ ### Patch Changes
132
+
133
+ - ensure the web app never imports server-side code paths
134
+
135
+ ## 0.6.5
136
+
137
+ ### Patch Changes
138
+
139
+ - move @prisma/client-runtime-utils to root package.json
140
+
141
+ ## 0.6.4
142
+
143
+ ### Patch Changes
144
+
145
+ - add @prisma/client-runtime-utils dependency
146
+
147
+ ## 0.6.3
148
+
149
+ ### Patch Changes
150
+
151
+ - Add workspaces field to root package.json template + Fix Prisma ESM/CJS import for Node.js v24
152
+
153
+ ## 0.6.2
154
+
155
+ ### Patch Changes
156
+
157
+ - add server actions, removed some deprecated and other chore
158
+
159
+ ## 0.6.1
160
+
161
+ ### Patch Changes
162
+
163
+ - route groups for file-based routing; add dynamic route support with [param] segments
164
+
165
+ ## 0.6.0
166
+
167
+ ### Minor Changes
168
+
169
+ - RSC streaming, dynamic routes, Vinxi integration
170
+
171
+ ## 0.5.0
172
+
173
+ ### Minor Changes
174
+
175
+ - Auto-register procedures + inject Prisma models feature
176
+
177
+ ## 0.4.21
178
+
179
+ ### Patch Changes
180
+
181
+ - format Prisma default values correctly by type
182
+
183
+ ## 0.4.20
184
+
185
+ ### Patch Changes
186
+
187
+ - import consolidation: update import paths for `@veloxts/velox`
188
+
189
+ ## 0.4.19
190
+
191
+ ### Patch Changes
192
+
193
+ - update default dev server port to 3030
194
+
195
+ ## 0.4.18
196
+
197
+ ### Patch Changes
198
+
199
+ - introduce interactive field menu and templates for resource generation
200
+
201
+ ## 0.4.17
202
+
203
+ ### Patch Changes
204
+
205
+ - add interactive field prompts for resource generation
206
+
207
+ ## 0.4.16
208
+
209
+ ### Patch Changes
210
+
211
+ - fixed velox procedures list
212
+
213
+ ## 0.4.15
214
+
215
+ ### Patch Changes
216
+
217
+ - chore lint fixes
218
+
219
+ ## 0.4.14
220
+
221
+ ### Patch Changes
222
+
223
+ - fixed proxy-type inferance and update proxy hooks for optional input handling
224
+
225
+ ## 0.4.13
226
+
227
+ ### Patch Changes
228
+
229
+ - add debug mode to dev server
230
+
231
+ ## 0.4.12
232
+
233
+ ### Patch Changes
234
+
235
+ - preserve type info in trpc template AppRouter export
236
+
237
+ ## 0.4.11
238
+
239
+ ### Patch Changes
240
+
241
+ - fixed api.health.check.useQuery is not a function issue
242
+
243
+ ## 0.4.10
244
+
245
+ ### Patch Changes
246
+
247
+ - fixed ReferenceError: styles is not defined in rpc template
248
+
249
+ ## 0.4.8
250
+
251
+ ### Patch Changes
252
+
253
+ - Fix 'Illegal invocation' error when using fetch in browser
254
+
255
+ Bind fetch to globalThis to preserve the correct execution context.
256
+
257
+ ## 0.4.7
258
+
259
+ ### Patch Changes
260
+
261
+ - Add dynamic headers and routes config to client
262
+
263
+ ## 0.4.6
264
+
265
+ ### Patch Changes
266
+
267
+ - Fix broken npm packages - republish with correct dependencies
268
+
269
+ ## 0.4.5
270
+
271
+ ### Patch Changes
272
+
273
+ - b06631b: CI CD npm Trusted Publishing setup
274
+
275
+ ## 0.4.4
276
+
277
+ ### Patch Changes
278
+
279
+ - 05ae1a5: Update to boilerplate, work in progress
280
+ - 9961b52: full-stack React frontend implementation
281
+
282
+ ## 0.4.3
283
+
284
+ ### Patch Changes
285
+
286
+ - ef8d5d0: Dynamically load VeloxTS version from `package.json` in shared template configuration
287
+
288
+ ## 0.4.2
289
+
290
+ ### Patch Changes
291
+
292
+ - 5b4f02c: Updated documentations
293
+ - 0d8d775: Updated guides and readme files
294
+
295
+ ## 0.4.1
296
+
297
+ ### Patch Changes
298
+
299
+ - 0eea918: Completed CLI generators
300
+
301
+ ## 0.4.0
302
+
303
+ ### Minor Changes
304
+
305
+ - b478fee: Performance Benchmarks | 34k req/s, <1ms p50 latency, 75MB memory, 530ms startup
306
+
307
+ ## 0.3.6
308
+
309
+ ### Patch Changes
310
+
311
+ - 929f2ab: Interactive CLI setup
312
+
313
+ ## 0.3.5
314
+
315
+ ### Patch Changes
316
+
317
+ - 658e83f: @veloxts/auth, Full REST Support, Better error messages, Type tests with tsd
318
+
319
+ ## 0.3.4
320
+
321
+ ### Patch Changes
322
+
323
+ - 65ef3e7: DI container and Auth Guards
324
+
325
+ ## 0.3.3
326
+
327
+ ### Patch Changes
328
+
329
+ - 4ee103b: Full REST support PUT, PATCH and DELETE
330
+
331
+ ## 0.3.2
332
+
333
+ ### Patch Changes
334
+
335
+ - abf270e: Dynamically set core `VELOX_VERSION` from package.json
336
+
337
+ ## 0.3.1
338
+
339
+ ### Patch Changes
340
+
341
+ - cb9806e: Fixed the value for VELOXTS_VERSION in create app template
342
+
343
+ ## 0.3.0
344
+
345
+ ### Minor Changes
346
+
347
+ - 1adce10: Introduced an umbrella package for server side packages: @veloxts/velox
348
+
349
+ ## 0.2.2
350
+
351
+ ### Patch Changes
352
+
353
+ - Version bump to sync with create-velox-app native module fix
354
+
355
+ ## 0.2.0
356
+
357
+ ### Minor Changes
358
+
359
+ - 9404976: fix Prisma client generation. README adjustments
360
+
361
+ ## 0.1.1
362
+
363
+ ### Patch Changes
364
+
365
+ - Fix Prisma client generation in scaffolder
366
+
367
+ - Added automatic Prisma client generation after dependency installation in create-velox-app
368
+ - Fixed database template to validate DATABASE_URL environment variable
369
+ - Added alpha release warning to all package READMEs
370
+ - Fixed TypeScript type for registerTRPCPlugin to accept FastifyInstance
371
+ - Updated playground app to use Prisma 7.x custom output path
package/GUIDE.md ADDED
@@ -0,0 +1,75 @@
1
+ # @veloxts/client
2
+
3
+ Type-safe frontend API client with zero code generation.
4
+
5
+ ## Quick Start
6
+
7
+ ```typescript
8
+ import { createClient } from '@veloxts/client';
9
+ import type { userProcedures } from '../server/procedures';
10
+
11
+ const api = createClient<{ users: typeof userProcedures }>({
12
+ baseUrl: '/api',
13
+ });
14
+
15
+ const user = await api.users.getUser({ id: '123' });
16
+ // user is fully typed from backend schema
17
+ ```
18
+
19
+ ## Configuration
20
+
21
+ ```typescript
22
+ const api = createClient<Router>({
23
+ baseUrl: '/api',
24
+ headers: { 'Authorization': 'Bearer token' },
25
+ onRequest: async (url, options) => console.log(`${options.method} ${url}`),
26
+ onError: async (error) => console.error('API Error:', error.message),
27
+ });
28
+ ```
29
+
30
+ ## Error Handling
31
+
32
+ ```typescript
33
+ import { isClientNotFoundError, isClientValidationError } from '@veloxts/client';
34
+
35
+ try {
36
+ const user = await api.users.getUser({ id: 'invalid' });
37
+ } catch (error) {
38
+ if (isClientNotFoundError(error)) console.log('Not found:', error.resource);
39
+ if (isClientValidationError(error)) console.log('Validation:', error.fields);
40
+ }
41
+ ```
42
+
43
+ ## React Query Integration
44
+
45
+ ```typescript
46
+ import { useQuery, useMutation } from '@tanstack/react-query';
47
+
48
+ function useUser(userId: string) {
49
+ return useQuery({
50
+ queryKey: ['users', userId],
51
+ queryFn: () => api.users.getUser({ id: userId }),
52
+ });
53
+ }
54
+
55
+ function useCreateUser() {
56
+ return useMutation({
57
+ mutationFn: (data) => api.users.createUser(data),
58
+ });
59
+ }
60
+ ```
61
+
62
+ ## REST Mapping
63
+
64
+ | Procedure | Method | Path |
65
+ |-----------|--------|------|
66
+ | `getUser` | GET | `/users/:id` |
67
+ | `listUsers` | GET | `/users` |
68
+ | `createUser` | POST | `/users` |
69
+ | `updateUser` | PUT | `/users/:id` |
70
+ | `patchUser` | PATCH | `/users/:id` |
71
+ | `deleteUser` | DELETE | `/users/:id` |
72
+
73
+ ## Learn More
74
+
75
+ See [@veloxts/velox](https://www.npmjs.com/package/@veloxts/velox) for complete documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/client",
3
- "version": "0.6.25",
3
+ "version": "0.6.27",
4
4
  "description": "Type-safe frontend API client for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,10 @@
17
17
  },
18
18
  "files": [
19
19
  "dist",
20
- "README.md"
20
+ "README.md",
21
+ "GUIDE.md",
22
+ "LICENSE",
23
+ "CHANGELOG.md"
21
24
  ],
22
25
  "peerDependencies": {
23
26
  "@tanstack/react-query": "^5.90.12",