@veloxts/web 0.6.83 → 0.6.84
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
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @veloxts/web
|
|
2
2
|
|
|
3
|
+
## 0.6.84
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- - auth: add simplified guard() function with overloads + fluent builder
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @veloxts/auth@0.6.84
|
|
10
|
+
- @veloxts/client@0.6.84
|
|
11
|
+
- @veloxts/core@0.6.84
|
|
12
|
+
- @veloxts/router@0.6.84
|
|
13
|
+
|
|
3
14
|
## 0.6.83
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type { FormParseOptions } from './form-parser.js';
|
|
|
18
18
|
export { formDataToObject, isFormData, parseFormDataToSchema, parseFormDataToSchemaAsync, } from './form-parser.js';
|
|
19
19
|
export { createAction, createActionContext, createActionRegistry, createAuthenticatedContext, createFormAction, error, generateActionId, getActionRegistry, isAuthenticatedContext, isError, isSuccess, parseCookies, registerAction, resetActionRegistry, success, success as ok, } from './handler.js';
|
|
20
20
|
export type { ExecuteProcedureOptions } from './procedure-bridge.js';
|
|
21
|
-
export { createProcedureContext, executeProcedureDirectly, type InferProcedureInputType, type InferProcedureOutputType, } from './procedure-bridge.js';
|
|
21
|
+
export { createProcedureContext, executeProcedureDirectly, type InferProcedureInputType, type InferProcedureOutputType, invokeProc, } from './procedure-bridge.js';
|
|
22
22
|
export type { ActionBuilder, ActionContext, ActionError, ActionErrorCode, ActionHandler, ActionMetadata, ActionRegistry, ActionResult, ActionSuccess, AuthenticatedActionContext, CallableAction, CallableFormAction, CreateActionOptions, FormActionHandler, ProcedureCaller, RegisteredAction, TrpcBridgeOptions, } from './types.js';
|
|
23
23
|
export type { InferSchemaType, InferValidatedInput, InferValidatedOutput, RateLimitConfig, ValidatedHandler, ValidatedOptions, ValidatedOptionsAuthenticated, ValidatedOptionsBase, ValidZodSchema, } from './validated.js';
|
|
24
24
|
export { AuthenticationError, AuthorizationError, CsrfError, clearRateLimitStore, InputSizeError, RateLimitError, resetServerContextCache, stopRateLimitCleanup, validated, validatedMutation, validatedQuery, } from './validated.js';
|
package/dist/actions/index.js
CHANGED
|
@@ -15,5 +15,5 @@ export { classifyError, classifyPrismaError, createErrorClassifier, DEFAULT_ERRO
|
|
|
15
15
|
export { formDataToObject, isFormData, parseFormDataToSchema, parseFormDataToSchemaAsync, } from './form-parser.js';
|
|
16
16
|
// Handler functions
|
|
17
17
|
export { createAction, createActionContext, createActionRegistry, createAuthenticatedContext, createFormAction, error, generateActionId, getActionRegistry, isAuthenticatedContext, isError, isSuccess, parseCookies, registerAction, resetActionRegistry, success, success as ok, } from './handler.js';
|
|
18
|
-
export { createProcedureContext, executeProcedureDirectly, } from './procedure-bridge.js';
|
|
18
|
+
export { createProcedureContext, executeProcedureDirectly, invokeProc, } from './procedure-bridge.js';
|
|
19
19
|
export { AuthenticationError, AuthorizationError, CsrfError, clearRateLimitStore, InputSizeError, RateLimitError, resetServerContextCache, stopRateLimitCleanup, validated, validatedMutation, validatedQuery, } from './validated.js';
|
|
@@ -100,3 +100,21 @@ export type InferProcedureOutputType<T> = T extends CompiledProcedure<unknown, i
|
|
|
100
100
|
* Re-export router inference types for convenience
|
|
101
101
|
*/
|
|
102
102
|
export type { InferProcedureInput, InferProcedureOutput };
|
|
103
|
+
/**
|
|
104
|
+
* Short alias for executeProcedureDirectly
|
|
105
|
+
*
|
|
106
|
+
* Provides a cleaner, more ergonomic API for server actions that call procedures.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* import { invokeProc } from '@veloxts/web/server';
|
|
111
|
+
* import { userProcedures } from './procedures/users';
|
|
112
|
+
*
|
|
113
|
+
* export async function listUsers() {
|
|
114
|
+
* 'use server';
|
|
115
|
+
* const ctx = await createH3Context();
|
|
116
|
+
* return invokeProc(userProcedures.procedures.listUsers, {}, ctx);
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare const invokeProc: typeof executeProcedureDirectly;
|
|
@@ -260,3 +260,24 @@ async function executeMiddlewareChain(middlewares, input, ctx, handler) {
|
|
|
260
260
|
const result = await next();
|
|
261
261
|
return result.output;
|
|
262
262
|
}
|
|
263
|
+
// ============================================================================
|
|
264
|
+
// Alias for cleaner API
|
|
265
|
+
// ============================================================================
|
|
266
|
+
/**
|
|
267
|
+
* Short alias for executeProcedureDirectly
|
|
268
|
+
*
|
|
269
|
+
* Provides a cleaner, more ergonomic API for server actions that call procedures.
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* ```typescript
|
|
273
|
+
* import { invokeProc } from '@veloxts/web/server';
|
|
274
|
+
* import { userProcedures } from './procedures/users';
|
|
275
|
+
*
|
|
276
|
+
* export async function listUsers() {
|
|
277
|
+
* 'use server';
|
|
278
|
+
* const ctx = await createH3Context();
|
|
279
|
+
* return invokeProc(userProcedures.procedures.listUsers, {}, ctx);
|
|
280
|
+
* }
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
export const invokeProc = executeProcedureDirectly;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type { FormParseOptions } from '../actions/form-parser.js';
|
|
|
38
38
|
export { formDataToObject, isFormData, parseFormDataToSchema, parseFormDataToSchemaAsync, } from '../actions/form-parser.js';
|
|
39
39
|
export { createAction, createActionContext, createActionRegistry, createAuthenticatedContext, createFormAction, error, generateActionId, getActionRegistry, isAuthenticatedContext, isError, isSuccess, parseCookies, registerAction, resetActionRegistry, success, success as ok, } from '../actions/handler.js';
|
|
40
40
|
export type { ExecuteProcedureOptions, InferProcedureInputType, InferProcedureOutputType, } from '../actions/procedure-bridge.js';
|
|
41
|
-
export { createProcedureContext, executeProcedureDirectly, } from '../actions/procedure-bridge.js';
|
|
41
|
+
export { createProcedureContext, executeProcedureDirectly, invokeProc, } from '../actions/procedure-bridge.js';
|
|
42
42
|
export type { ActionBuilder, ActionContext, ActionHandler, ActionMetadata, ActionRegistry, AuthenticatedActionContext, CallableAction, CallableFormAction, CreateActionOptions, FormActionHandler, ProcedureCaller, RegisteredAction, TrpcBridgeOptions, } from '../actions/types.js';
|
|
43
43
|
export type { InferSchemaType, InferValidatedInput, InferValidatedOutput, RateLimitConfig, ValidatedHandler, ValidatedOptions, ValidatedOptionsAuthenticated, ValidatedOptionsBase, ValidZodSchema, } from '../actions/validated.js';
|
|
44
44
|
export { AuthenticationError, AuthorizationError, CsrfError, clearRateLimitStore, InputSizeError, RateLimitError, resetServerContextCache, stopRateLimitCleanup, validated, validatedMutation, validatedQuery, } from '../actions/validated.js';
|
package/dist/server/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export { formDataToObject, isFormData, parseFormDataToSchema, parseFormDataToSch
|
|
|
38
38
|
// Action Handler Utilities
|
|
39
39
|
// ============================================================================
|
|
40
40
|
export { createAction, createActionContext, createActionRegistry, createAuthenticatedContext, createFormAction, error, generateActionId, getActionRegistry, isAuthenticatedContext, isError, isSuccess, parseCookies, registerAction, resetActionRegistry, success, success as ok, } from '../actions/handler.js';
|
|
41
|
-
export { createProcedureContext, executeProcedureDirectly, } from '../actions/procedure-bridge.js';
|
|
41
|
+
export { createProcedureContext, executeProcedureDirectly, invokeProc, } from '../actions/procedure-bridge.js';
|
|
42
42
|
export { AuthenticationError, AuthorizationError, CsrfError, clearRateLimitStore, InputSizeError, RateLimitError, resetServerContextCache, stopRateLimitCleanup, validated, validatedMutation, validatedQuery, } from '../actions/validated.js';
|
|
43
43
|
// ============================================================================
|
|
44
44
|
// Fastify Adapter - For embedding Fastify in Vinxi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/web",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.84",
|
|
4
4
|
"description": "React Server Components integration for VeloxTS framework using Vinxi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -72,10 +72,10 @@
|
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">=19.2.0",
|
|
74
74
|
"react-dom": ">=19.2.0",
|
|
75
|
-
"@veloxts/core": "0.6.
|
|
76
|
-
"@veloxts/router": "0.6.
|
|
77
|
-
"@veloxts/
|
|
78
|
-
"@veloxts/
|
|
75
|
+
"@veloxts/core": "0.6.84",
|
|
76
|
+
"@veloxts/router": "0.6.84",
|
|
77
|
+
"@veloxts/client": "0.6.84",
|
|
78
|
+
"@veloxts/auth": "0.6.84"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"@veloxts/auth": {
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"react-server-dom-webpack": "19.2.3",
|
|
99
99
|
"typescript": "5.9.3",
|
|
100
100
|
"vitest": "4.0.16",
|
|
101
|
-
"@veloxts/core": "0.6.
|
|
102
|
-
"@veloxts/auth": "0.6.
|
|
103
|
-
"@veloxts/client": "0.6.
|
|
104
|
-
"@veloxts/router": "0.6.
|
|
101
|
+
"@veloxts/core": "0.6.84",
|
|
102
|
+
"@veloxts/auth": "0.6.84",
|
|
103
|
+
"@veloxts/client": "0.6.84",
|
|
104
|
+
"@veloxts/router": "0.6.84"
|
|
105
105
|
},
|
|
106
106
|
"keywords": [
|
|
107
107
|
"velox",
|