hono-takibi 0.19.0 → 0.21.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/dist/cli.js +4 -4
- package/dist/core/docs/index.js +1 -1
- package/dist/core/hooks/index.d.ts +2 -2
- package/dist/core/hooks/index.js +1 -1
- package/dist/core/rpc/index.d.ts +1 -1
- package/dist/core/rpc/index.js +3 -3
- package/dist/core/type/index.js +1 -1
- package/dist/{core-CHLeBQ6y.js → core-BDhKAR3A.js} +197 -298
- package/dist/{docs-y1jSJoJg.js → docs-Im22cNpx.js} +29 -29
- package/dist/generator/zod-openapi-hono/openapi/index.js +1 -1
- package/dist/{hooks-xBFksKgW.js → hooks-CR7angVC.js} +44 -32
- package/dist/index-3BQ2KpP9.d.ts +12 -0
- package/dist/{index-B7AwLlPY.d.ts → index-DhipYt_q.d.ts} +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -9
- package/dist/{openapi-BlxQC7Xn.js → openapi-BRK0691x.js} +200 -259
- package/dist/{rpc-b2oph6wk.js → rpc-Bgtv3nGI.js} +60 -14
- package/dist/{shared-DBOBTH7X.js → shared-COpMVRhG.js} +21 -10
- package/dist/{utils-BCaOY0bs.js → utils-vw99OasL.js} +6 -7
- package/dist/vite-plugin/index.js +3 -3
- package/package.json +1 -1
- package/dist/index-Dn5Bw8ov.d.ts +0 -11
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ import { NodeRuntime, NodeServices } from "@effect/platform-node";
|
|
|
4
4
|
import { Console, Effect, FileSystem, Option, Path, Ref, Schema, Stream } from "effect";
|
|
5
5
|
import { Argument, CliError, Command, Flag } from "effect/cli";
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "0.
|
|
7
|
+
var version = "0.21.0";
|
|
8
8
|
var description = "Hono Takibi is a code generator from OpenAPI to @hono/zod-openapi";
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/cli/index.ts
|
|
@@ -41,7 +41,7 @@ function runJobs(config) {
|
|
|
41
41
|
const [{ parseOpenAPI }, { FormatOptions }, { cleanSplitOutputs, makeJob, packageRoots }] = yield* Effect.promise(() => Promise.all([
|
|
42
42
|
import("./openapi-DQRxq2_O.js").then((n) => n.t),
|
|
43
43
|
import("./format-CuHABcKC.js").then((n) => n.r),
|
|
44
|
-
import("./shared-
|
|
44
|
+
import("./shared-COpMVRhG.js").then((n) => n.a)
|
|
45
45
|
]));
|
|
46
46
|
const openAPI = yield* parseOpenAPI(config.input);
|
|
47
47
|
const jobs = makeJob(openAPI, config, yield* packageRoots(openAPI, config));
|
|
@@ -79,7 +79,7 @@ function reportJobs(config, previous) {
|
|
|
79
79
|
onFailure: (error) => Console.error(`❌ ${error.message}`),
|
|
80
80
|
onSuccess: (report) => Console.log(report)
|
|
81
81
|
}));
|
|
82
|
-
const { outsideSources } = yield* Effect.promise(() => import("./shared-
|
|
82
|
+
const { outsideSources } = yield* Effect.promise(() => import("./shared-COpMVRhG.js").then((n) => n.a));
|
|
83
83
|
const inputDirectory = path.dirname(path.resolve(config.input));
|
|
84
84
|
return {
|
|
85
85
|
inputDirectory,
|
|
@@ -206,7 +206,7 @@ function generate(args) {
|
|
|
206
206
|
})]
|
|
207
207
|
});
|
|
208
208
|
if (input !== void 0 && output !== void 0) {
|
|
209
|
-
const [{ parseOpenAPI }, { takibi }] = yield* Effect.promise(() => Promise.all([import("./openapi-DQRxq2_O.js").then((n) => n.t), import("./core-
|
|
209
|
+
const [{ parseOpenAPI }, { takibi }] = yield* Effect.promise(() => Promise.all([import("./openapi-DQRxq2_O.js").then((n) => n.t), import("./core-BDhKAR3A.js").then((n) => n.t)]));
|
|
210
210
|
return yield* Console.log(yield* takibi(yield* parseOpenAPI(input), output));
|
|
211
211
|
}
|
|
212
212
|
const resolvedConfig = configPath ?? DEFAULT_CONFIG_FILE;
|
package/dist/core/docs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as docs } from "../../docs-
|
|
1
|
+
import { t as docs } from "../../docs-Im22cNpx.js";
|
|
2
2
|
export { docs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as OpenAPI } from "../../index-tsPqeV6H.js";
|
|
2
2
|
import { n as GenerateError, t as FormatError } from "../../index-D_gf3Xzx.js";
|
|
3
|
-
import { t as Grouping } from "../../index-
|
|
3
|
+
import { t as Grouping } from "../../index-3BQ2KpP9.js";
|
|
4
4
|
//#region src/core/hooks/index.d.ts
|
|
5
5
|
declare const HOOK_CONFIGS: {
|
|
6
6
|
readonly swr: {
|
|
@@ -166,5 +166,5 @@ export declare function hooks(openAPI: OpenAPI, output: string, importPath: stri
|
|
|
166
166
|
readonly clientName?: string;
|
|
167
167
|
readonly grouping?: Grouping;
|
|
168
168
|
readonly basePath?: string;
|
|
169
|
-
}): import("effect/Effect").Effect
|
|
169
|
+
}): import("effect/Effect").Effect<`Generated ${string} hooks written to ${string}`, FormatError | GenerateError | import("effect/PlatformError").PlatformError, import("effect/FileSystem").FileSystem>;
|
|
170
170
|
//#endregion
|
package/dist/core/hooks/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as hooks } from "../../hooks-
|
|
1
|
+
import { t as hooks } from "../../hooks-CR7angVC.js";
|
|
2
2
|
export { hooks };
|
package/dist/core/rpc/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as OpenAPI } from "../../index-tsPqeV6H.js";
|
|
2
2
|
import { n as GenerateError, t as FormatError } from "../../index-D_gf3Xzx.js";
|
|
3
|
-
import { t as Grouping } from "../../index-
|
|
3
|
+
import { t as Grouping } from "../../index-3BQ2KpP9.js";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
//#region src/core/rpc/index.d.ts
|
|
6
6
|
/**
|
package/dist/core/rpc/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as HTTP_METHODS } from "../../constants-Bz8YiPum.js";
|
|
2
2
|
import { i as GenerateError } from "../../format-CuHABcKC.js";
|
|
3
|
-
import { L as isOpenAPIPaths, f as methodPath, l as makeInferRequestType, q as isRecord, z as isOperationLike } from "../../utils-
|
|
3
|
+
import { L as isOpenAPIPaths, f as methodPath, l as makeInferRequestType, q as isRecord, z as isOperationLike } from "../../utils-vw99OasL.js";
|
|
4
|
+
import { c as makeGroupClientName, i as parsePathItem, l as operationTags, n as makeOperationDeps, r as operationHasArgs, t as formatPath } from "../../rpc-Bgtv3nGI.js";
|
|
4
5
|
import { t as emit } from "../../emit-uwlZZeRM.js";
|
|
5
|
-
import { a as groupClientName, i as parsePathItem, n as makeOperationDeps, r as operationHasArgs, s as operationTags, t as formatPath } from "../../rpc-b2oph6wk.js";
|
|
6
6
|
import { Effect } from "effect";
|
|
7
7
|
import { dirname } from "node:path";
|
|
8
8
|
//#region src/core/rpc/index.ts
|
|
@@ -27,7 +27,7 @@ function makeOperationCode(path, method, item, base, useParseResponse, hasBasePa
|
|
|
27
27
|
const group = grouping?.(path, operationTags(operation));
|
|
28
28
|
const deps = group === void 0 ? base : {
|
|
29
29
|
...base,
|
|
30
|
-
client:
|
|
30
|
+
client: makeGroupClientName(group)
|
|
31
31
|
};
|
|
32
32
|
const funcName = methodPath(method, path);
|
|
33
33
|
const pathResult = formatPath(path, hasBasePath);
|
package/dist/core/type/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../constants-Bz8YiPum.js";
|
|
2
|
-
import { B as isParameter, F as isMediaWithSchema, L as isOpenAPIPaths, Q as isSchemaArray, R as isOperation, V as isParameterArray, X as isRequestBody, g as statusCodeToNumber, it as isStringRef, j as isHttpMethod, u as makeSafeKey } from "../../utils-
|
|
2
|
+
import { B as isParameter, F as isMediaWithSchema, L as isOpenAPIPaths, Q as isSchemaArray, R as isOperation, V as isParameterArray, X as isRequestBody, g as statusCodeToNumber, it as isStringRef, j as isHttpMethod, u as makeSafeKey } from "../../utils-vw99OasL.js";
|
|
3
3
|
import { t as emit } from "../../emit-uwlZZeRM.js";
|
|
4
4
|
import { Effect } from "effect";
|
|
5
5
|
import path from "node:path";
|