@povio/openapi-codegen-cli 3.1.0-rc.3 → 3.1.0-rc.4
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/metro.d.mts +4 -2
- package/dist/metro.mjs +3 -1
- package/dist/{openapi-BkC5yZ-W.d.mts → openapi-source.runner-BSIrB6ny.d.mts} +26 -1
- package/dist/openapi-source.runner-wLs5vqw6.mjs +705 -0
- package/dist/sh.mjs +1 -1
- package/dist/tiny.d.mts +3 -20
- package/dist/tiny.mjs +1 -649
- package/dist/vite.d.mts +4 -2
- package/dist/vite.mjs +3 -1
- package/package.json +1 -1
- package/dist/openapi-source.runner-D19XnvMe.mjs +0 -39
package/dist/metro.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as GenerateFileFormatter } from "./options-CE4Koxof.mjs";
|
|
2
2
|
import { t as OpenAPICodegenConfig } from "./config-BU7wVf7U.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { d as GenerateOpenApiFile, m as GenerateOpenApiSpec, n as TinyOpenApiSpecModuleConfig } from "./openapi-source.runner-BSIrB6ny.mjs";
|
|
4
4
|
import { IncomingMessage, ServerResponse } from "http";
|
|
5
5
|
|
|
6
6
|
//#region src/metro/openapi-codegen.plugin.d.ts
|
|
@@ -35,7 +35,9 @@ interface TinyOpenApiCodegenMetroOptions extends OpenApiCodegenMetroOptions {
|
|
|
35
35
|
apiMode?: string;
|
|
36
36
|
cwd?: string;
|
|
37
37
|
env?: NodeJS.ProcessEnv;
|
|
38
|
-
generateOpenApiFile
|
|
38
|
+
generateOpenApiFile?: GenerateOpenApiFile;
|
|
39
|
+
generateOpenApiSpec?: GenerateOpenApiSpec;
|
|
40
|
+
generateOpenApiSpecModule?: string | TinyOpenApiSpecModuleConfig;
|
|
39
41
|
watchFolders: readonly string[];
|
|
40
42
|
watchTinyOpenApiInput?: boolean;
|
|
41
43
|
}
|
package/dist/metro.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./generateCodeFromOpenAPIDoc-C-n0Knj8.mjs";
|
|
2
2
|
import "./generate.runner-BXTc97I0.mjs";
|
|
3
3
|
import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-QGd35-a3.mjs";
|
|
4
|
-
import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-
|
|
4
|
+
import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-wLs5vqw6.mjs";
|
|
5
5
|
import fs from "fs";
|
|
6
6
|
import path from "path";
|
|
7
7
|
|
|
@@ -97,6 +97,8 @@ function withResolvedTinyOpenApiCodegen(metroConfig, codegenConfig, options) {
|
|
|
97
97
|
cwd: options.cwd,
|
|
98
98
|
env: options.env,
|
|
99
99
|
generateOpenApiFile: options.generateOpenApiFile,
|
|
100
|
+
generateOpenApiSpec: options.generateOpenApiSpec,
|
|
101
|
+
generateOpenApiSpecModule: options.generateOpenApiSpecModule,
|
|
100
102
|
input: codegenConfig.input,
|
|
101
103
|
root
|
|
102
104
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { t as OpenAPICodegenConfig } from "./config-BU7wVf7U.mjs";
|
|
2
|
+
|
|
1
3
|
//#region src/tiny/openapi.d.ts
|
|
2
4
|
interface GenerateOpenApiFileOptions {
|
|
3
5
|
argv?: readonly string[];
|
|
@@ -12,6 +14,7 @@ interface GenerateOpenApiFileResult {
|
|
|
12
14
|
changed: boolean;
|
|
13
15
|
outputPath: string;
|
|
14
16
|
}
|
|
17
|
+
type GenerateOpenApiSpec = () => Promise<unknown> | unknown;
|
|
15
18
|
type GenerateOpenApiFile = (options: GenerateOpenApiFileOptions) => Promise<unknown> | unknown;
|
|
16
19
|
type JsonObject = Record<string, unknown>;
|
|
17
20
|
type AnySchema = unknown;
|
|
@@ -168,4 +171,26 @@ declare function applyPaginatedItemSchemas(spec: JsonObject): void;
|
|
|
168
171
|
declare function toOpenAPI30Document(spec: JsonObject): JsonObject;
|
|
169
172
|
declare function generateORPCOpenAPISpec(options: GenerateORPCOpenAPISpecOptions): Promise<JsonObject>;
|
|
170
173
|
//#endregion
|
|
171
|
-
|
|
174
|
+
//#region src/tiny/openapi-source.runner.d.ts
|
|
175
|
+
interface TinyOpenApiSpecModuleConfig {
|
|
176
|
+
exportName?: string;
|
|
177
|
+
path: string;
|
|
178
|
+
}
|
|
179
|
+
interface TinyOpenApiSourceRunnerConfig {
|
|
180
|
+
cwd?: string;
|
|
181
|
+
env?: NodeJS.ProcessEnv;
|
|
182
|
+
generateOpenApiFile?: GenerateOpenApiFile;
|
|
183
|
+
generateOpenApiSpec?: GenerateOpenApiSpec;
|
|
184
|
+
generateOpenApiSpecModule?: string | TinyOpenApiSpecModuleConfig;
|
|
185
|
+
input: OpenAPICodegenConfig["input"];
|
|
186
|
+
root: string;
|
|
187
|
+
}
|
|
188
|
+
declare function createTinyOpenApiSourceRunner(config: TinyOpenApiSourceRunnerConfig): {
|
|
189
|
+
enqueueGenerate: () => Promise<void>;
|
|
190
|
+
getOutputPath: () => string | undefined;
|
|
191
|
+
};
|
|
192
|
+
declare function isTinyOpenApiFakeMode(apiMode?: string | undefined): boolean;
|
|
193
|
+
declare function getLocalInputPath(input: OpenAPICodegenConfig["input"], root: string): string | undefined;
|
|
194
|
+
declare function normalizeWatchFolders(root: string, watchFolders?: readonly string[]): string[];
|
|
195
|
+
//#endregion
|
|
196
|
+
export { getModuleOpenApiTag as $, collectApiModelSchemaExports as A, toOpenAPI30Document as At, collectReachableModelSchemas as B, applyEnumExtensions as C, procedureSchemaName as Ct, applyRobodevModuleExtensions as D, schemaExportName as Dt, applyParameterExtensions as E, schemaComponentRef as Et, collectExtraSchemas as F, findComponentEnumNames as G, compactTagName as H, collectModelSchemaExports as I, generateOpenApiFile as J, findEnumNames as K, collectModuleModelSchemaExports as L, collectContractSchemas as M, toOpenAPIAclRule as Mt, collectDbTableModelSchemaExport as N, toPascalCase as Nt, applyRobodevUserRolesExtension as O, sharedSchemaExportName as Ot, collectDbTableModelSchemaExports as P, visitZodSchema as Pt, getModuleOpenApiController as Q, collectOperationMeta as R, addContractSchema as S, operationKey as St, applyPaginatedItemSchemas as T, routeHasPathParameters as Tt, createModelSchemaNameGetter as U, collectSchemaRegistryRoots as V, defineOpenApiSchemas as W, getContractProcedureData as X, getComponentSchemas as Y, getDerivedOperationId as Z, OpenApiSchemaRegistry as _, namedControllerActionSchema as _t, isTinyOpenApiFakeMode as a, getProcedureInputSchemaRole as at, TinyOpenApiUserRole as b, namedOpenApiResponseSchema as bt, AnyContractRouter as c, isContractProcedure as ct, GenerateOpenApiFile as d, isObject as dt, getObjectPropertySchema as et, GenerateOpenApiFileOptions as f, isProcedureMeta as ft, JsonObject as g, namedControllerActionInputDtoSchema as gt, GenerateTinyOpenApiFileOptions as h, modelSchemaNameEntries as ht, getLocalInputPath as i, getPaginatedItemSchema as it, collectContractSchemaRoots as j, toOpenAPI30Schema as jt, asStringArray as k, stripNoContentResponseBodies as kt, AnySchema as l, isNullSchema as lt, GenerateOpenApiSpec as m, modelSchemaExportName as mt, TinyOpenApiSpecModuleConfig as n, getOperationAction as nt, normalizeWatchFolders as o, getRobodevModuleRoles as ot, GenerateOpenApiFileResult as p, isZodSchema as pt, generateORPCOpenAPISpec as q, createTinyOpenApiSourceRunner as r, getOperationController as rt, AclRule as s, getStringEnumValues as st, TinyOpenApiSourceRunnerConfig as t, getOpenApiSchemaName as tt, GenerateORPCOpenAPISpecOptions as u, isNullableOnlySchema as ut, ProcedureMeta as v, namedOpenApiOutputSchema as vt, applyOperationMeta as w, resolveOpenApiOutputPath as wt, ZodSchema as x, namedOpenApiSchema as xt, TinyOpenApiModule as y, namedOpenApiRequestSchema as yt, collectOperationTags as z };
|