ts-procedures 9.2.0 → 10.1.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 +54 -0
- package/build/adapters/hono/envelope-parity.test.js +17 -6
- package/build/adapters/hono/envelope-parity.test.js.map +1 -1
- package/build/codegen/bin/cli.js +1 -1
- package/build/codegen/bin/cli.js.map +1 -1
- package/build/codegen/constants.js +2 -2
- package/build/codegen/constants.js.map +1 -1
- package/build/codegen/emit/api-route.js +1 -1
- package/build/codegen/emit/api-route.js.map +1 -1
- package/build/codegen/emit/scope-file.js +1 -1
- package/build/codegen/emit/scope-file.js.map +1 -1
- package/build/codegen/emit-errors.integration.test.js +2 -2
- package/build/codegen/emit-errors.integration.test.js.map +1 -1
- package/build/codegen/resolve-envelope.js +1 -1
- package/build/codegen/resolve-envelope.js.map +1 -1
- package/build/codegen/test-helpers/run-tsc.js +1 -1
- package/build/codegen/test-helpers/run-tsc.js.map +1 -1
- package/build/exports.d.ts +1 -0
- package/build/exports.js +4 -0
- package/build/exports.js.map +1 -1
- package/build/server/doc-registry.js +3 -0
- package/build/server/doc-registry.js.map +1 -1
- package/build/server/doc-registry.test.js +31 -0
- package/build/server/doc-registry.test.js.map +1 -1
- package/build/server/index.d.ts +1 -0
- package/build/server/index.js +1 -0
- package/build/server/index.js.map +1 -1
- package/build/server/spec-version.d.ts +24 -0
- package/build/server/spec-version.js +26 -0
- package/build/server/spec-version.js.map +1 -0
- package/build/server/types.d.ts +15 -0
- package/build/version.d.ts +9 -0
- package/build/version.js +11 -0
- package/build/version.js.map +1 -0
- package/docs/doc-envelope-spec.md +291 -0
- package/docs/doc-envelope.schema.json +253 -0
- package/docs/http-integrations.md +27 -1
- package/package.json +8 -8
- package/src/adapters/hono/envelope-parity.test.ts +18 -6
- package/src/codegen/bin/cli.ts +1 -1
- package/src/codegen/constants.ts +2 -2
- package/src/codegen/emit/api-route.ts +1 -1
- package/src/codegen/emit/scope-file.ts +2 -1
- package/src/codegen/emit-errors.integration.test.ts +2 -2
- package/src/codegen/resolve-envelope.ts +1 -1
- package/src/codegen/test-helpers/run-tsc.ts +1 -0
- package/src/exports.ts +4 -0
- package/src/server/doc-registry.test.ts +34 -0
- package/src/server/doc-registry.ts +3 -0
- package/src/server/index.ts +1 -0
- package/src/server/spec-version.ts +27 -0
- package/src/server/types.ts +15 -0
- package/src/version.ts +11 -0
- package/build/errors.d.ts +0 -33
- package/build/errors.js +0 -91
- package/build/errors.js.map +0 -1
- package/build/errors.test.d.ts +0 -1
- package/build/errors.test.js +0 -122
- package/build/errors.test.js.map +0 -1
- package/build/implementations/http/doc-registry.d.ts +0 -28
- package/build/implementations/http/doc-registry.js +0 -96
- package/build/implementations/http/doc-registry.js.map +0 -1
- package/build/implementations/http/doc-registry.test.d.ts +0 -1
- package/build/implementations/http/doc-registry.test.js +0 -516
- package/build/implementations/http/doc-registry.test.js.map +0 -1
- package/build/implementations/http/error-taxonomy.d.ts +0 -249
- package/build/implementations/http/error-taxonomy.js +0 -252
- package/build/implementations/http/error-taxonomy.js.map +0 -1
- package/build/implementations/http/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/error-taxonomy.test.js +0 -399
- package/build/implementations/http/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/express-rpc/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/express-rpc/error-taxonomy.test.js +0 -83
- package/build/implementations/http/express-rpc/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/express-rpc/index.d.ts +0 -125
- package/build/implementations/http/express-rpc/index.js +0 -216
- package/build/implementations/http/express-rpc/index.js.map +0 -1
- package/build/implementations/http/express-rpc/index.test.d.ts +0 -1
- package/build/implementations/http/express-rpc/index.test.js +0 -684
- package/build/implementations/http/express-rpc/index.test.js.map +0 -1
- package/build/implementations/http/express-rpc/types.d.ts +0 -11
- package/build/implementations/http/express-rpc/types.js +0 -2
- package/build/implementations/http/express-rpc/types.js.map +0 -1
- package/build/implementations/http/hono-api/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-api/error-taxonomy.test.js +0 -137
- package/build/implementations/http/hono-api/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-api/index.d.ts +0 -151
- package/build/implementations/http/hono-api/index.js +0 -344
- package/build/implementations/http/hono-api/index.js.map +0 -1
- package/build/implementations/http/hono-api/index.test.d.ts +0 -1
- package/build/implementations/http/hono-api/index.test.js +0 -992
- package/build/implementations/http/hono-api/index.test.js.map +0 -1
- package/build/implementations/http/hono-api/types.d.ts +0 -13
- package/build/implementations/http/hono-api/types.js +0 -2
- package/build/implementations/http/hono-api/types.js.map +0 -1
- package/build/implementations/http/hono-rpc/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-rpc/error-taxonomy.test.js +0 -64
- package/build/implementations/http/hono-rpc/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-rpc/index.d.ts +0 -130
- package/build/implementations/http/hono-rpc/index.js +0 -209
- package/build/implementations/http/hono-rpc/index.js.map +0 -1
- package/build/implementations/http/hono-rpc/index.test.d.ts +0 -1
- package/build/implementations/http/hono-rpc/index.test.js +0 -828
- package/build/implementations/http/hono-rpc/index.test.js.map +0 -1
- package/build/implementations/http/hono-rpc/types.d.ts +0 -11
- package/build/implementations/http/hono-rpc/types.js +0 -2
- package/build/implementations/http/hono-rpc/types.js.map +0 -1
- package/build/implementations/http/hono-stream/error-taxonomy.test.d.ts +0 -1
- package/build/implementations/http/hono-stream/error-taxonomy.test.js +0 -159
- package/build/implementations/http/hono-stream/error-taxonomy.test.js.map +0 -1
- package/build/implementations/http/hono-stream/index.d.ts +0 -171
- package/build/implementations/http/hono-stream/index.js +0 -415
- package/build/implementations/http/hono-stream/index.js.map +0 -1
- package/build/implementations/http/hono-stream/index.test.d.ts +0 -1
- package/build/implementations/http/hono-stream/index.test.js +0 -1383
- package/build/implementations/http/hono-stream/index.test.js.map +0 -1
- package/build/implementations/http/hono-stream/types.d.ts +0 -15
- package/build/implementations/http/hono-stream/types.js +0 -2
- package/build/implementations/http/hono-stream/types.js.map +0 -1
- package/build/implementations/http/on-request-error.test.d.ts +0 -1
- package/build/implementations/http/on-request-error.test.js +0 -173
- package/build/implementations/http/on-request-error.test.js.map +0 -1
- package/build/implementations/http/route-errors.test.d.ts +0 -1
- package/build/implementations/http/route-errors.test.js +0 -139
- package/build/implementations/http/route-errors.test.js.map +0 -1
- package/build/implementations/types.d.ts +0 -192
- package/build/implementations/types.js +0 -2
- package/build/implementations/types.js.map +0 -1
- package/build/index.d.ts +0 -165
- package/build/index.js +0 -258
- package/build/index.js.map +0 -1
- package/build/index.test.d.ts +0 -1
- package/build/index.test.js +0 -920
- package/build/index.test.js.map +0 -1
- package/build/schema/extract-json-schema.d.ts +0 -2
- package/build/schema/extract-json-schema.js +0 -12
- package/build/schema/extract-json-schema.js.map +0 -1
- package/build/schema/extract-json-schema.test.d.ts +0 -1
- package/build/schema/extract-json-schema.test.js +0 -23
- package/build/schema/extract-json-schema.test.js.map +0 -1
- package/build/schema/parser.d.ts +0 -28
- package/build/schema/parser.js +0 -170
- package/build/schema/parser.js.map +0 -1
- package/build/schema/parser.test.d.ts +0 -1
- package/build/schema/parser.test.js +0 -120
- package/build/schema/parser.test.js.map +0 -1
- package/build/schema/resolve-schema-lib.d.ts +0 -12
- package/build/schema/resolve-schema-lib.js +0 -11
- package/build/schema/resolve-schema-lib.js.map +0 -1
- package/build/schema/resolve-schema-lib.test.d.ts +0 -1
- package/build/schema/resolve-schema-lib.test.js +0 -17
- package/build/schema/resolve-schema-lib.test.js.map +0 -1
- package/build/schema/types.d.ts +0 -8
- package/build/schema/types.js +0 -2
- package/build/schema/types.js.map +0 -1
- package/build/stack-utils.d.ts +0 -25
- package/build/stack-utils.js +0 -95
- package/build/stack-utils.js.map +0 -1
- package/build/stack-utils.test.d.ts +0 -1
- package/build/stack-utils.test.js +0 -80
- package/build/stack-utils.test.js.map +0 -1
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
import { Hono } from 'hono';
|
|
2
|
-
import { defineErrorTaxonomy, resolveErrorResponse, } from '../error-taxonomy.js';
|
|
3
|
-
export { defineErrorTaxonomy };
|
|
4
|
-
/** Default query parser using native URLSearchParams. */
|
|
5
|
-
function parseQueryNative(queryString) {
|
|
6
|
-
const searchParams = new URLSearchParams(queryString);
|
|
7
|
-
const result = {};
|
|
8
|
-
for (const key of new Set(searchParams.keys())) {
|
|
9
|
-
const values = searchParams.getAll(key);
|
|
10
|
-
result[key] = values.length > 1 ? values : values[0];
|
|
11
|
-
}
|
|
12
|
-
return result;
|
|
13
|
-
}
|
|
14
|
-
/** Extract path parameter names from a route pattern (e.g., '/users/:id' → ['id']) */
|
|
15
|
-
function extractPathParamNames(path) {
|
|
16
|
-
const matches = path.match(/:([a-zA-Z_][a-zA-Z0-9_]*)/g);
|
|
17
|
-
return matches ? matches.map((m) => m.slice(1)) : [];
|
|
18
|
-
}
|
|
19
|
-
/** Default success status codes by HTTP method */
|
|
20
|
-
function defaultSuccessStatus(method) {
|
|
21
|
-
switch (method) {
|
|
22
|
-
case 'post':
|
|
23
|
-
return 201;
|
|
24
|
-
case 'delete':
|
|
25
|
-
return 204;
|
|
26
|
-
default:
|
|
27
|
-
return 200;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/** HTTP methods that typically carry a request body */
|
|
31
|
-
const BODY_METHODS = ['post', 'put', 'patch'];
|
|
32
|
-
/** Extracts the raw query string from a URL and runs it through the resolved parser. */
|
|
33
|
-
function extractQuery(url, queryParser) {
|
|
34
|
-
const questionMark = url.indexOf('?');
|
|
35
|
-
if (questionMark === -1)
|
|
36
|
-
return {};
|
|
37
|
-
const rawQuery = url.slice(questionMark + 1);
|
|
38
|
-
if (!rawQuery)
|
|
39
|
-
return {};
|
|
40
|
-
return queryParser(rawQuery);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Builder class for creating a Hono application with REST-style API routes.
|
|
44
|
-
*
|
|
45
|
-
* Uses `schema.input` for per-channel type safety:
|
|
46
|
-
* - `input.pathParams` → validated path parameters
|
|
47
|
-
* - `input.query` → validated query string parameters
|
|
48
|
-
* - `input.body` → validated request body
|
|
49
|
-
* - `input.headers` → validated request headers
|
|
50
|
-
*
|
|
51
|
-
* Usage:
|
|
52
|
-
* const API = Procedures<MyContext, APIConfig>()
|
|
53
|
-
*
|
|
54
|
-
* API.Create('GetUser', {
|
|
55
|
-
* path: '/users/:id',
|
|
56
|
-
* method: 'get',
|
|
57
|
-
* schema: {
|
|
58
|
-
* input: {
|
|
59
|
-
* pathParams: Type.Object({ id: Type.String() }),
|
|
60
|
-
* query: Type.Object({ include: Type.Optional(Type.String()) }),
|
|
61
|
-
* },
|
|
62
|
-
* returnType: Type.Object({ id: Type.String(), name: Type.String() }),
|
|
63
|
-
* }
|
|
64
|
-
* }, async (ctx, { pathParams, query }) => {
|
|
65
|
-
* return { id: pathParams.id, name: 'John' }
|
|
66
|
-
* })
|
|
67
|
-
*
|
|
68
|
-
* const apiApp = new HonoAPIAppBuilder()
|
|
69
|
-
* .register(API, (c) => ({ ... }))
|
|
70
|
-
* .build()
|
|
71
|
-
*/
|
|
72
|
-
export class HonoAPIAppBuilder {
|
|
73
|
-
config;
|
|
74
|
-
constructor(config) {
|
|
75
|
-
this.config = config;
|
|
76
|
-
if (config?.app) {
|
|
77
|
-
this._app = config.app;
|
|
78
|
-
}
|
|
79
|
-
if (config?.onRequestStart) {
|
|
80
|
-
this._app.use('*', async (c, next) => {
|
|
81
|
-
config.onRequestStart(c);
|
|
82
|
-
await next();
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
if (config?.onRequestEnd) {
|
|
86
|
-
this._app.use('*', async (c, next) => {
|
|
87
|
-
await next();
|
|
88
|
-
config.onRequestEnd(c);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
factories = [];
|
|
93
|
-
_app = new Hono();
|
|
94
|
-
_docs = [];
|
|
95
|
-
get app() {
|
|
96
|
-
return this._app;
|
|
97
|
-
}
|
|
98
|
-
get docs() {
|
|
99
|
-
return this._docs;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Registers a procedure factory with its context.
|
|
103
|
-
* @param factory - The procedure factory created by Procedures<Context, APIConfig>()
|
|
104
|
-
* @param factoryContext - Context for handlers. Direct value, sync function, or async function.
|
|
105
|
-
* @param extendProcedureDoc - Custom function to extend the generated route documentation.
|
|
106
|
-
*/
|
|
107
|
-
register(factory, factoryContext, extendProcedureDoc) {
|
|
108
|
-
this.factories.push({ factory, factoryContext, extendProcedureDoc });
|
|
109
|
-
return this;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Resolves the full path for a route, combining pathPrefix and the procedure's path.
|
|
113
|
-
*/
|
|
114
|
-
resolveFullPath(procedurePath) {
|
|
115
|
-
const prefix = this.config?.pathPrefix;
|
|
116
|
-
const normalizedPrefix = prefix ? (prefix.startsWith('/') ? prefix : `/${prefix}`) : '';
|
|
117
|
-
const normalizedPath = procedurePath.startsWith('/') ? procedurePath : `/${procedurePath}`;
|
|
118
|
-
return `${normalizedPrefix}${normalizedPath}`;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Builds and returns the Hono application with registered API routes.
|
|
122
|
-
*/
|
|
123
|
-
build() {
|
|
124
|
-
const queryParser = this.config?.queryParser ?? parseQueryNative;
|
|
125
|
-
this.factories.forEach(({ factory, factoryContext, extendProcedureDoc }) => {
|
|
126
|
-
factory.getProcedures().map((procedure) => {
|
|
127
|
-
const { config } = procedure;
|
|
128
|
-
const fullPath = this.resolveFullPath(config.path);
|
|
129
|
-
const inputSchema = procedure.config.schema?.input;
|
|
130
|
-
// Validate consistency: path params in path template must match schema.input.pathParams
|
|
131
|
-
this.validatePathParamConsistency(procedure.name, config.path, inputSchema);
|
|
132
|
-
const route = this.buildApiHttpRouteDoc(procedure, fullPath, extendProcedureDoc);
|
|
133
|
-
this._docs.push(route);
|
|
134
|
-
const method = config.method;
|
|
135
|
-
const handler = this.createRouteHandler(procedure, factoryContext, config, inputSchema, queryParser);
|
|
136
|
-
this._app.on(method.toUpperCase(), fullPath, handler);
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
return this._app;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Validates that path parameter names in the path template match the schema.input.pathParams declaration.
|
|
143
|
-
*/
|
|
144
|
-
validatePathParamConsistency(procedureName, path, inputSchema) {
|
|
145
|
-
// Only validate when schema.input is used; schema.params (flat mode) skips this check
|
|
146
|
-
if (!inputSchema)
|
|
147
|
-
return;
|
|
148
|
-
const pathParamNames = extractPathParamNames(path);
|
|
149
|
-
if (pathParamNames.length > 0 && !inputSchema.pathParams) {
|
|
150
|
-
throw new Error(`Path "${path}" has path parameters [${pathParamNames.join(', ')}] but schema.input.pathParams is not defined for procedure "${procedureName}". ` +
|
|
151
|
-
`Define schema.input.pathParams to validate path parameters.`);
|
|
152
|
-
}
|
|
153
|
-
if (inputSchema.pathParams && pathParamNames.length === 0) {
|
|
154
|
-
throw new Error(`schema.input.pathParams is defined for procedure "${procedureName}" but path "${path}" has no path parameters. ` +
|
|
155
|
-
`Remove schema.input.pathParams or add path parameters to the path.`);
|
|
156
|
-
}
|
|
157
|
-
// Deep validation: verify schema property names match the :param names in the path
|
|
158
|
-
if (inputSchema.pathParams && pathParamNames.length > 0) {
|
|
159
|
-
const pathParamsJsonSchema = inputSchema.pathParams;
|
|
160
|
-
const schemaProperties = pathParamsJsonSchema.properties;
|
|
161
|
-
if (schemaProperties) {
|
|
162
|
-
const schemaKeys = Object.keys(schemaProperties);
|
|
163
|
-
const missingInSchema = pathParamNames.filter((p) => !schemaKeys.includes(p));
|
|
164
|
-
const extraInSchema = schemaKeys.filter((k) => !pathParamNames.includes(k));
|
|
165
|
-
if (missingInSchema.length > 0 || extraInSchema.length > 0) {
|
|
166
|
-
const parts = [];
|
|
167
|
-
if (missingInSchema.length > 0) {
|
|
168
|
-
parts.push(`path has [${missingInSchema.join(', ')}] but they are missing from schema`);
|
|
169
|
-
}
|
|
170
|
-
if (extraInSchema.length > 0) {
|
|
171
|
-
parts.push(`schema has [${extraInSchema.join(', ')}] but they are not in the path`);
|
|
172
|
-
}
|
|
173
|
-
throw new Error(`Path param mismatch for procedure "${procedureName}": ${parts.join('; ')}. ` +
|
|
174
|
-
`Path "${path}" expects [${pathParamNames.join(', ')}], schema defines [${schemaKeys.join(', ')}].`);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Creates the async route handler for a procedure.
|
|
181
|
-
*/
|
|
182
|
-
createRouteHandler(procedure, factoryContext, config, inputSchema, queryParser) {
|
|
183
|
-
const successStatus = config.successStatus ?? defaultSuccessStatus(config.method);
|
|
184
|
-
return async (c) => {
|
|
185
|
-
try {
|
|
186
|
-
const context = typeof factoryContext === 'function'
|
|
187
|
-
? await factoryContext(c)
|
|
188
|
-
: factoryContext;
|
|
189
|
-
let params;
|
|
190
|
-
if (inputSchema) {
|
|
191
|
-
// schema.input mode: build structured params from HTTP sources
|
|
192
|
-
params = await this.extractInputParams(c, config.method, inputSchema, queryParser);
|
|
193
|
-
}
|
|
194
|
-
else if (procedure.config.schema?.params) {
|
|
195
|
-
// schema.params mode: extract from body or query based on method
|
|
196
|
-
if (BODY_METHODS.includes(config.method)) {
|
|
197
|
-
params = await c.req.json().catch(() => ({}));
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
params = extractQuery(c.req.url, queryParser);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
params = await c.req.json().catch(() => undefined);
|
|
205
|
-
}
|
|
206
|
-
const result = await procedure.handler({ ...context, signal: c.req.raw.signal }, params);
|
|
207
|
-
if (this.config?.onSuccess) {
|
|
208
|
-
this.config.onSuccess(procedure, c);
|
|
209
|
-
}
|
|
210
|
-
// 204 No Content returns no body
|
|
211
|
-
if (successStatus === 204) {
|
|
212
|
-
return c.body(null, 204);
|
|
213
|
-
}
|
|
214
|
-
return c.json(result, successStatus);
|
|
215
|
-
}
|
|
216
|
-
catch (error) {
|
|
217
|
-
// Observer fires first — cross-cutting, cannot alter dispatch or the
|
|
218
|
-
// response. Swallow any throw from the observer so instrumentation
|
|
219
|
-
// bugs never break the primary error-response flow.
|
|
220
|
-
if (this.config?.onRequestError) {
|
|
221
|
-
try {
|
|
222
|
-
await this.config.onRequestError({ err: error, procedure, raw: c });
|
|
223
|
-
}
|
|
224
|
-
catch (observerErr) {
|
|
225
|
-
console.error('[ts-procedures hono-api] onRequestError threw — swallowed:', observerErr);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
// Dispatch: taxonomy → onError → hard default. The two modes are
|
|
229
|
-
// peers; apps configure whichever fits (or both, in which case the
|
|
230
|
-
// taxonomy handles what it covers and `onError` handles the tail).
|
|
231
|
-
if (this.config?.errors || this.config?.unknownError) {
|
|
232
|
-
const resolved = resolveErrorResponse({
|
|
233
|
-
err: error,
|
|
234
|
-
userTaxonomy: this.config.errors,
|
|
235
|
-
unknownError: this.config.unknownError,
|
|
236
|
-
procedure,
|
|
237
|
-
raw: c,
|
|
238
|
-
});
|
|
239
|
-
if (resolved) {
|
|
240
|
-
await resolved.runOnCatch();
|
|
241
|
-
return c.json(resolved.body, resolved.statusCode);
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
if (this.config?.onError) {
|
|
245
|
-
return this.config.onError(procedure, c, error);
|
|
246
|
-
}
|
|
247
|
-
return c.json({ error: error.message }, 500);
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Extracts and assembles structured input params from HTTP request sources.
|
|
253
|
-
* Each channel (pathParams, query, body, headers) is extracted from its HTTP source.
|
|
254
|
-
* The core validates each channel independently via schema.input validators.
|
|
255
|
-
*/
|
|
256
|
-
async extractInputParams(c, method, inputSchema, queryParser) {
|
|
257
|
-
const params = {};
|
|
258
|
-
const channelNames = Object.keys(inputSchema);
|
|
259
|
-
for (const channel of channelNames) {
|
|
260
|
-
switch (channel) {
|
|
261
|
-
case 'pathParams':
|
|
262
|
-
params.pathParams = c.req.param();
|
|
263
|
-
break;
|
|
264
|
-
case 'query':
|
|
265
|
-
params.query = extractQuery(c.req.url, queryParser);
|
|
266
|
-
break;
|
|
267
|
-
case 'body':
|
|
268
|
-
if (BODY_METHODS.includes(method)) {
|
|
269
|
-
params.body = await c.req.json().catch(() => ({}));
|
|
270
|
-
}
|
|
271
|
-
break;
|
|
272
|
-
case 'headers': {
|
|
273
|
-
// Pass all request headers; AJV's removeAdditional strips non-declared keys
|
|
274
|
-
const headersObj = {};
|
|
275
|
-
c.req.raw.headers.forEach((value, key) => {
|
|
276
|
-
headersObj[key] = value;
|
|
277
|
-
});
|
|
278
|
-
params.headers = headersObj;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
default:
|
|
282
|
-
// Unknown channel — pass through empty. Core validation will catch mismatches.
|
|
283
|
-
params[channel] = undefined;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
return params;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Generates the API HTTP route documentation for the given procedure.
|
|
291
|
-
*/
|
|
292
|
-
buildApiHttpRouteDoc(procedure, fullPath, extendProcedureDoc) {
|
|
293
|
-
const { config } = procedure;
|
|
294
|
-
const inputSchema = config.schema?.input;
|
|
295
|
-
const jsonSchema = {};
|
|
296
|
-
// Populate per-channel JSON schemas from schema.input
|
|
297
|
-
if (inputSchema) {
|
|
298
|
-
if (inputSchema.pathParams)
|
|
299
|
-
jsonSchema.pathParams = inputSchema.pathParams;
|
|
300
|
-
if (inputSchema.query)
|
|
301
|
-
jsonSchema.query = inputSchema.query;
|
|
302
|
-
if (inputSchema.body)
|
|
303
|
-
jsonSchema.body = inputSchema.body;
|
|
304
|
-
if (inputSchema.headers)
|
|
305
|
-
jsonSchema.headers = inputSchema.headers;
|
|
306
|
-
}
|
|
307
|
-
else if (config.schema?.params) {
|
|
308
|
-
// Fallback: schema.params treated as body/query depending on method
|
|
309
|
-
if (BODY_METHODS.includes(config.method)) {
|
|
310
|
-
jsonSchema.body = config.schema.params;
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
jsonSchema.query = config.schema.params;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
if (config.schema?.returnType) {
|
|
317
|
-
jsonSchema.response = config.schema.returnType;
|
|
318
|
-
}
|
|
319
|
-
const base = {
|
|
320
|
-
kind: 'api',
|
|
321
|
-
name: procedure.name,
|
|
322
|
-
scope: config.scope,
|
|
323
|
-
path: config.path,
|
|
324
|
-
method: config.method,
|
|
325
|
-
fullPath,
|
|
326
|
-
jsonSchema,
|
|
327
|
-
};
|
|
328
|
-
if (config.successStatus) {
|
|
329
|
-
base.successStatus = config.successStatus;
|
|
330
|
-
}
|
|
331
|
-
if (config.errors && config.errors.length > 0) {
|
|
332
|
-
base.errors = [...config.errors];
|
|
333
|
-
}
|
|
334
|
-
let extendedDoc = {};
|
|
335
|
-
if (extendProcedureDoc) {
|
|
336
|
-
extendedDoc = extendProcedureDoc({ base, procedure });
|
|
337
|
-
}
|
|
338
|
-
return {
|
|
339
|
-
...extendedDoc,
|
|
340
|
-
...base,
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/implementations/http/hono-api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,MAAM,CAAA;AAWpC,OAAO,EAIL,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAS9B,yDAAyD;AACzD,SAAS,gBAAgB,CAAC,WAA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