@kubb/plugin-faker 0.0.0-canary-20251222142412 → 0.0.0-canary-20251222215628
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/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/{fakerGenerator-CDlH6RdG.cjs → fakerGenerator-B3pZdOrD.cjs} +5 -4
- package/dist/fakerGenerator-B3pZdOrD.cjs.map +1 -0
- package/dist/{fakerGenerator-E5O0u3li.js → fakerGenerator-fBsuw2yN.js} +5 -4
- package/dist/fakerGenerator-fBsuw2yN.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{types-CuzhfBSS.d.cts → types-Bfb-67hJ.d.cts} +25 -29
- package/dist/{types-C_tkhFwB.d.ts → types-DS1zMTZc.d.ts} +25 -29
- package/package.json +5 -5
- package/src/generators/fakerGenerator.tsx +2 -2
- package/src/types.ts +1 -1
- package/dist/fakerGenerator-CDlH6RdG.cjs.map +0 -1
- package/dist/fakerGenerator-E5O0u3li.js.map +0 -1
package/dist/components.d.cts
CHANGED
package/dist/components.d.ts
CHANGED
|
@@ -37,10 +37,11 @@ const fakerGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
37
37
|
schemas.request,
|
|
38
38
|
schemas.response
|
|
39
39
|
].flat().filter(Boolean);
|
|
40
|
-
const mapOperationSchema = ({ name, schema
|
|
40
|
+
const mapOperationSchema = ({ name, schema, description, ...options$1 }) => {
|
|
41
41
|
const tree = schemaGenerator.parse({
|
|
42
|
-
|
|
43
|
-
name
|
|
42
|
+
schema,
|
|
43
|
+
name,
|
|
44
|
+
parentName: null
|
|
44
45
|
});
|
|
45
46
|
const imports = schemaManager.getImports(tree);
|
|
46
47
|
const group = options$1.operation ? getGroup(options$1.operation) : void 0;
|
|
@@ -200,4 +201,4 @@ Object.defineProperty(exports, 'fakerGenerator', {
|
|
|
200
201
|
return fakerGenerator;
|
|
201
202
|
}
|
|
202
203
|
});
|
|
203
|
-
//# sourceMappingURL=fakerGenerator-
|
|
204
|
+
//# sourceMappingURL=fakerGenerator-B3pZdOrD.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fakerGenerator-B3pZdOrD.cjs","names":["SchemaGenerator","options","pluginTsName","schemaKeywords","Fragment","File","Faker"],"sources":["../src/generators/fakerGenerator.tsx"],"sourcesContent":["import { useMode, usePluginManager } from '@kubb/core/hooks'\nimport { type OperationSchema as OperationSchemaType, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, Fragment } from '@kubb/react-fabric'\nimport { Faker } from '../components'\nimport type { PluginFaker } from '../types'\n\nexport const fakerGenerator = createReactGenerator<PluginFaker>({\n name: 'faker',\n Operation({ operation, generator, plugin }) {\n const {\n options,\n options: { dateParser, regexGenerator, seed, mapper },\n } = plugin\n const mode = useMode()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager(generator)\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n fabric: generator.context.fabric,\n oas,\n plugin,\n events: generator.context.events,\n pluginManager,\n mode,\n override: options.override,\n })\n\n const operationSchemas = [schemas.pathParams, schemas.queryParams, schemas.headerParams, schemas.statusCodes, schemas.request, schemas.response]\n .flat()\n .filter(Boolean)\n\n const mapOperationSchema = ({ name, schema, description, ...options }: OperationSchemaType) => {\n const tree = schemaGenerator.parse({ schema, name, parentName: null })\n const imports = schemaManager.getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const faker = {\n name: schemaManager.getName(name, { type: 'function' }),\n file: schemaManager.getFile(name),\n }\n\n const type = {\n name: schemaManager.getName(name, { type: 'type', pluginKey: [pluginTsName] }),\n file: schemaManager.getFile(options.operationName || name, { pluginKey: [pluginTsName], group }),\n }\n\n const canOverride = tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple,\n )\n\n return (\n <Fragment>\n {canOverride && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={file.path} path={imp.path} name={imp.name} />\n ))}\n <Faker\n name={faker.name}\n typeName={type.name}\n description={description}\n tree={tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </Fragment>\n )\n }\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ schema, plugin }) {\n const { getName, getFile, getImports } = useSchemaManager()\n const {\n options: { output, dateParser, regexGenerator, seed, mapper },\n } = plugin\n const pluginManager = usePluginManager()\n const oas = useOas()\n const imports = getImports(schema.tree)\n\n const faker = {\n name: getName(schema.name, { type: 'function' }),\n file: getFile(schema.name),\n }\n\n const type = {\n name: getName(schema.name, { type: 'type', pluginKey: [pluginTsName] }),\n file: getFile(schema.name, { pluginKey: [pluginTsName] }),\n }\n\n const canOverride = schema.tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple ||\n keyword === schemaKeywords.string ||\n keyword === schemaKeywords.integer ||\n keyword === schemaKeywords.number,\n )\n\n return (\n <File\n baseName={faker.file.baseName}\n path={faker.file.path}\n meta={faker.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n <File.Import isTypeOnly root={faker.file.path} path={type.file.path} name={[type.name]} />\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={faker.file.path} path={imp.path} name={imp.name} />\n ))}\n\n <Faker\n name={faker.name}\n typeName={type.name}\n description={schema.value.description}\n tree={schema.tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,uEAAmD;CAC9D,MAAM;CACN,UAAU,EAAE,WAAW,WAAW,UAAU;EAC1C,MAAM,EACJ,SACA,SAAS,EAAE,YAAY,gBAAgB,MAAM,aAC3C;EACJ,MAAM,sCAAgB;EACtB,MAAM,wDAAkC;EAExC,MAAM,0CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,6DAAiC,UAAU;EACxE,MAAM,8DAAkC;EAExC,MAAM,OAAO,QAAQ,UAAU;EAC/B,MAAM,UAAU,WAAW,UAAU;EACrC,MAAM,kBAAkB,IAAIA,iCAAgB,SAAS;GACnD,QAAQ,UAAU,QAAQ;GAC1B;GACA;GACA,QAAQ,UAAU,QAAQ;GAC1B;GACA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,KAAK;GACjB,MAAM,MAAM,KAAK;GACjB,8CAAkB;IAAE;IAAK;IAAQ,QAAQ,cAAc;IAAQ,CAAC;GAChE,8CAAkB;IAAE;IAAK;IAAQ,CAAC;;IAElC,wDAACA,wBAAK;KAAO,MAAM,CAAC,QAAQ;KAAE,MAAK;MAAoB;IACtD,mBAAmB,aAAa,wDAACA,wBAAK;KAAO,MAAM;KAAW,MAAM;MAAa;IACjF,eAAe,WAAW,wDAACA,wBAAK;KAAO,MAAM;KAAY,MAAM;MAAc;IAC9E,wDAACA,wBAAK;KAAO;KAAW,MAAM,MAAM,KAAK;KAAM,MAAM,KAAK,KAAK;KAAM,MAAM,CAAC,KAAK,KAAK;MAAI;IACzF,QAAQ,KAAK,QACZ,wDAACA,wBAAK;KAA4D,MAAM,MAAM,KAAK;KAAM,MAAM,IAAI;KAAM,MAAM,IAAI;OAAjG;KAAC,IAAI;KAAM,IAAI;KAAM,IAAI;KAAW,CAAC,KAAK,IAAI,CAA2D,CAC3H;IAEF,wDAACC;KACC,MAAM,MAAM;KACZ,UAAU,KAAK;KACf,aAAa,OAAO,MAAM;KAC1B,MAAM,OAAO;KACG;KACJ;KACJ;KACF;KACO;MACb;;IACG;;CAGZ,CAAC"}
|
|
@@ -37,10 +37,11 @@ const fakerGenerator = createReactGenerator({
|
|
|
37
37
|
schemas.request,
|
|
38
38
|
schemas.response
|
|
39
39
|
].flat().filter(Boolean);
|
|
40
|
-
const mapOperationSchema = ({ name, schema
|
|
40
|
+
const mapOperationSchema = ({ name, schema, description, ...options$1 }) => {
|
|
41
41
|
const tree = schemaGenerator.parse({
|
|
42
|
-
|
|
43
|
-
name
|
|
42
|
+
schema,
|
|
43
|
+
name,
|
|
44
|
+
parentName: null
|
|
44
45
|
});
|
|
45
46
|
const imports = schemaManager.getImports(tree);
|
|
46
47
|
const group = options$1.operation ? getGroup(options$1.operation) : void 0;
|
|
@@ -195,4 +196,4 @@ const fakerGenerator = createReactGenerator({
|
|
|
195
196
|
|
|
196
197
|
//#endregion
|
|
197
198
|
export { fakerGenerator as t };
|
|
198
|
-
//# sourceMappingURL=fakerGenerator-
|
|
199
|
+
//# sourceMappingURL=fakerGenerator-fBsuw2yN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fakerGenerator-fBsuw2yN.js","names":["options"],"sources":["../src/generators/fakerGenerator.tsx"],"sourcesContent":["import { useMode, usePluginManager } from '@kubb/core/hooks'\nimport { type OperationSchema as OperationSchemaType, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, Fragment } from '@kubb/react-fabric'\nimport { Faker } from '../components'\nimport type { PluginFaker } from '../types'\n\nexport const fakerGenerator = createReactGenerator<PluginFaker>({\n name: 'faker',\n Operation({ operation, generator, plugin }) {\n const {\n options,\n options: { dateParser, regexGenerator, seed, mapper },\n } = plugin\n const mode = useMode()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager(generator)\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n fabric: generator.context.fabric,\n oas,\n plugin,\n events: generator.context.events,\n pluginManager,\n mode,\n override: options.override,\n })\n\n const operationSchemas = [schemas.pathParams, schemas.queryParams, schemas.headerParams, schemas.statusCodes, schemas.request, schemas.response]\n .flat()\n .filter(Boolean)\n\n const mapOperationSchema = ({ name, schema, description, ...options }: OperationSchemaType) => {\n const tree = schemaGenerator.parse({ schema, name, parentName: null })\n const imports = schemaManager.getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const faker = {\n name: schemaManager.getName(name, { type: 'function' }),\n file: schemaManager.getFile(name),\n }\n\n const type = {\n name: schemaManager.getName(name, { type: 'type', pluginKey: [pluginTsName] }),\n file: schemaManager.getFile(options.operationName || name, { pluginKey: [pluginTsName], group }),\n }\n\n const canOverride = tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple,\n )\n\n return (\n <Fragment>\n {canOverride && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={file.path} path={imp.path} name={imp.name} />\n ))}\n <Faker\n name={faker.name}\n typeName={type.name}\n description={description}\n tree={tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </Fragment>\n )\n }\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ schema, plugin }) {\n const { getName, getFile, getImports } = useSchemaManager()\n const {\n options: { output, dateParser, regexGenerator, seed, mapper },\n } = plugin\n const pluginManager = usePluginManager()\n const oas = useOas()\n const imports = getImports(schema.tree)\n\n const faker = {\n name: getName(schema.name, { type: 'function' }),\n file: getFile(schema.name),\n }\n\n const type = {\n name: getName(schema.name, { type: 'type', pluginKey: [pluginTsName] }),\n file: getFile(schema.name, { pluginKey: [pluginTsName] }),\n }\n\n const canOverride = schema.tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple ||\n keyword === schemaKeywords.string ||\n keyword === schemaKeywords.integer ||\n keyword === schemaKeywords.number,\n )\n\n return (\n <File\n baseName={faker.file.baseName}\n path={faker.file.path}\n meta={faker.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n <File.Import isTypeOnly root={faker.file.path} path={type.file.path} name={[type.name]} />\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={faker.file.path} path={imp.path} name={imp.name} />\n ))}\n\n <Faker\n name={faker.name}\n typeName={type.name}\n description={schema.value.description}\n tree={schema.tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,iBAAiB,qBAAkC;CAC9D,MAAM;CACN,UAAU,EAAE,WAAW,WAAW,UAAU;EAC1C,MAAM,EACJ,SACA,SAAS,EAAE,YAAY,gBAAgB,MAAM,aAC3C;EACJ,MAAM,OAAO,SAAS;EACtB,MAAM,gBAAgB,kBAAkB;EAExC,MAAM,MAAM,QAAQ;EACpB,MAAM,EAAE,YAAY,SAAS,aAAa,oBAAoB,UAAU;EACxE,MAAM,gBAAgB,kBAAkB;EAExC,MAAM,OAAO,QAAQ,UAAU;EAC/B,MAAM,UAAU,WAAW,UAAU;EACrC,MAAM,kBAAkB,IAAI,gBAAgB,SAAS;GACnD,QAAQ,UAAU,QAAQ;GAC1B;GACA;GACA,QAAQ,UAAU,QAAQ;GAC1B;GACA;GACA,UAAU,QAAQ;GACnB,CAAC;EAEF,MAAM,mBAAmB;GAAC,QAAQ;GAAY,QAAQ;GAAa,QAAQ;GAAc,QAAQ;GAAa,Q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AK;IAAQ,CAAC;;IAElC,oBAAC,KAAK;KAAO,MAAM,CAAC,QAAQ;KAAE,MAAK;MAAoB;IACtD,mBAAmB,aAAa,oBAAC,KAAK;KAAO,MAAM;KAAW,MAAM;MAAa;IACjF,eAAe,WAAW,oBAAC,KAAK;KAAO,MAAM;KAAY,MAAM;MAAc;IAC9E,oBAAC,KAAK;KAAO;KAAW,MAAM,MAAM,KAAK;KAAM,MAAM,KAAK,KAAK;KAAM,MAAM,CAAC,KAAK,KAAK;MAAI;IACzF,QAAQ,KAAK,QACZ,oBAAC,KAAK;KAA4D,MAAM,MAAM,KAAK;KAAM,MAAM,IAAI;KAAM,MAAM,IAAI;OAAjG;KAAC,IAAI;KAAM,IAAI;KAAM,IAAI;KAAW,CAAC,KAAK,IAAI,CAA2D,CAC3H;IAEF,oBAAC;KACC,MAAM,MAAM;KACZ,UAAU,KAAK;KACf,aAAa,OAAO,MAAM;KAC1B,MAAM,OAAO;KACG;KACJ;KACJ;KACF;KACO;MACb;;IACG;;CAGZ,CAAC"}
|
package/dist/generators.cjs
CHANGED
package/dist/generators.d.cts
CHANGED
package/dist/generators.d.ts
CHANGED
package/dist/generators.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_components = require('./components-BW7xUtoJ.cjs');
|
|
2
|
-
const require_fakerGenerator = require('./fakerGenerator-
|
|
2
|
+
const require_fakerGenerator = require('./fakerGenerator-B3pZdOrD.cjs');
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_components.__toESM(node_path);
|
|
5
5
|
let _kubb_core = require("@kubb/core");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-
|
|
1
|
+
import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-Bfb-67hJ.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginFakerName = "plugin-faker";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-
|
|
1
|
+
import { a as UserPluginWithLifeCycle, n as PluginFaker, t as Options } from "./types-DS1zMTZc.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginFakerName = "plugin-faker";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as fakerGenerator } from "./fakerGenerator-
|
|
1
|
+
import { t as fakerGenerator } from "./fakerGenerator-fBsuw2yN.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { definePlugin, getBarrelFiles, getMode } from "@kubb/core";
|
|
4
4
|
import { camelCase } from "@kubb/core/transformers";
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
2
2
|
import { Fabric } from "@kubb/react-fabric";
|
|
3
|
-
import * as OasTypes from "oas/types";
|
|
4
|
-
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
5
|
-
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
6
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
7
3
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
8
4
|
import BaseOas from "oas";
|
|
5
|
+
import { Operation } from "oas/operation";
|
|
6
|
+
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
9
7
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
10
8
|
|
|
11
9
|
//#region ../core/src/BaseGenerator.d.ts
|
|
@@ -677,38 +675,36 @@ type FileMetaBase = {
|
|
|
677
675
|
//#endregion
|
|
678
676
|
//#region ../oas/src/types.d.ts
|
|
679
677
|
type contentType = 'application/json' | (string & {});
|
|
680
|
-
type SchemaObject$1 =
|
|
678
|
+
type SchemaObject$1 = SchemaObject & {
|
|
681
679
|
'x-nullable'?: boolean;
|
|
682
680
|
$ref?: string;
|
|
683
681
|
};
|
|
682
|
+
type HttpMethod = HttpMethods;
|
|
683
|
+
type Document = OASDocument;
|
|
684
|
+
type Operation$1 = Operation;
|
|
685
|
+
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
684
686
|
//#endregion
|
|
685
687
|
//#region ../oas/src/Oas.d.ts
|
|
686
688
|
type Options$1 = {
|
|
687
689
|
contentType?: contentType;
|
|
688
690
|
discriminator?: 'strict' | 'inherit';
|
|
689
691
|
};
|
|
690
|
-
declare class Oas
|
|
692
|
+
declare class Oas extends BaseOas {
|
|
691
693
|
#private;
|
|
692
|
-
document:
|
|
693
|
-
constructor(
|
|
694
|
-
oas,
|
|
695
|
-
user
|
|
696
|
-
}: {
|
|
697
|
-
oas: TOAS | OASDocument | string;
|
|
698
|
-
user?: User;
|
|
699
|
-
});
|
|
694
|
+
document: Document;
|
|
695
|
+
constructor(document: Document);
|
|
700
696
|
setOptions(options: Options$1): void;
|
|
701
697
|
get options(): Options$1;
|
|
702
|
-
get($ref: string):
|
|
698
|
+
get<T = unknown>($ref: string): T | null;
|
|
703
699
|
getKey($ref: string): string | undefined;
|
|
704
700
|
set($ref: string, value: unknown): false | undefined;
|
|
705
|
-
getDiscriminator(schema:
|
|
706
|
-
dereferenceWithRef(schema?:
|
|
707
|
-
getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
|
|
708
|
-
getRequestSchema(operation: Operation): SchemaObject | undefined;
|
|
709
|
-
getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
|
|
701
|
+
getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
|
|
702
|
+
dereferenceWithRef<T = unknown>(schema?: T): T;
|
|
703
|
+
getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
|
|
704
|
+
getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
|
|
705
|
+
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
710
706
|
valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
711
|
-
flattenSchema(schema
|
|
707
|
+
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
712
708
|
}
|
|
713
709
|
//#endregion
|
|
714
710
|
//#region ../plugin-oas/src/types.d.ts
|
|
@@ -1095,13 +1091,13 @@ type SchemaGeneratorOptions = {
|
|
|
1095
1091
|
* TODO TODO add docs
|
|
1096
1092
|
* @beta
|
|
1097
1093
|
*/
|
|
1098
|
-
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema
|
|
1094
|
+
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
|
|
1099
1095
|
};
|
|
1100
1096
|
};
|
|
1101
1097
|
type SchemaProps$1 = {
|
|
1102
|
-
|
|
1103
|
-
name
|
|
1104
|
-
parentName
|
|
1098
|
+
schema: SchemaObject$1 | null;
|
|
1099
|
+
name: string | null;
|
|
1100
|
+
parentName: string | null;
|
|
1105
1101
|
};
|
|
1106
1102
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
1107
1103
|
#private;
|
|
@@ -1239,9 +1235,9 @@ type Options = {
|
|
|
1239
1235
|
* @beta
|
|
1240
1236
|
*/
|
|
1241
1237
|
schema?: (props: {
|
|
1242
|
-
schema
|
|
1243
|
-
name
|
|
1244
|
-
parentName
|
|
1238
|
+
schema: SchemaObject$1 | null;
|
|
1239
|
+
name: string | null;
|
|
1240
|
+
parentName: string | null;
|
|
1245
1241
|
}, defaultSchemas: Schema[]) => Schema[] | undefined;
|
|
1246
1242
|
};
|
|
1247
1243
|
/**
|
|
@@ -1265,4 +1261,4 @@ type ResolvedOptions = {
|
|
|
1265
1261
|
type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
1266
1262
|
//#endregion
|
|
1267
1263
|
export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
|
|
1268
|
-
//# sourceMappingURL=types-
|
|
1264
|
+
//# sourceMappingURL=types-Bfb-67hJ.d.cts.map
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Fabric } from "@kubb/react-fabric";
|
|
2
2
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
3
|
-
import * as OasTypes from "oas/types";
|
|
4
|
-
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
5
|
-
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
6
|
-
import { OpenAPIV3 } from "openapi-types";
|
|
7
3
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
8
4
|
import BaseOas from "oas";
|
|
5
|
+
import { Operation } from "oas/operation";
|
|
6
|
+
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
9
7
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
10
8
|
|
|
11
9
|
//#region ../core/src/BaseGenerator.d.ts
|
|
@@ -677,38 +675,36 @@ type FileMetaBase = {
|
|
|
677
675
|
//#endregion
|
|
678
676
|
//#region ../oas/src/types.d.ts
|
|
679
677
|
type contentType = 'application/json' | (string & {});
|
|
680
|
-
type SchemaObject$1 =
|
|
678
|
+
type SchemaObject$1 = SchemaObject & {
|
|
681
679
|
'x-nullable'?: boolean;
|
|
682
680
|
$ref?: string;
|
|
683
681
|
};
|
|
682
|
+
type HttpMethod = HttpMethods;
|
|
683
|
+
type Document = OASDocument;
|
|
684
|
+
type Operation$1 = Operation;
|
|
685
|
+
type DiscriminatorObject$1 = DiscriminatorObject;
|
|
684
686
|
//#endregion
|
|
685
687
|
//#region ../oas/src/Oas.d.ts
|
|
686
688
|
type Options$1 = {
|
|
687
689
|
contentType?: contentType;
|
|
688
690
|
discriminator?: 'strict' | 'inherit';
|
|
689
691
|
};
|
|
690
|
-
declare class Oas
|
|
692
|
+
declare class Oas extends BaseOas {
|
|
691
693
|
#private;
|
|
692
|
-
document:
|
|
693
|
-
constructor(
|
|
694
|
-
oas,
|
|
695
|
-
user
|
|
696
|
-
}: {
|
|
697
|
-
oas: TOAS | OASDocument | string;
|
|
698
|
-
user?: User;
|
|
699
|
-
});
|
|
694
|
+
document: Document;
|
|
695
|
+
constructor(document: Document);
|
|
700
696
|
setOptions(options: Options$1): void;
|
|
701
697
|
get options(): Options$1;
|
|
702
|
-
get($ref: string):
|
|
698
|
+
get<T = unknown>($ref: string): T | null;
|
|
703
699
|
getKey($ref: string): string | undefined;
|
|
704
700
|
set($ref: string, value: unknown): false | undefined;
|
|
705
|
-
getDiscriminator(schema:
|
|
706
|
-
dereferenceWithRef(schema?:
|
|
707
|
-
getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
|
|
708
|
-
getRequestSchema(operation: Operation): SchemaObject | undefined;
|
|
709
|
-
getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
|
|
701
|
+
getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
|
|
702
|
+
dereferenceWithRef<T = unknown>(schema?: T): T;
|
|
703
|
+
getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
|
|
704
|
+
getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
|
|
705
|
+
getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
|
|
710
706
|
valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
|
|
711
|
-
flattenSchema(schema
|
|
707
|
+
flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
|
|
712
708
|
}
|
|
713
709
|
//#endregion
|
|
714
710
|
//#region ../plugin-oas/src/types.d.ts
|
|
@@ -1095,13 +1091,13 @@ type SchemaGeneratorOptions = {
|
|
|
1095
1091
|
* TODO TODO add docs
|
|
1096
1092
|
* @beta
|
|
1097
1093
|
*/
|
|
1098
|
-
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema
|
|
1094
|
+
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
|
|
1099
1095
|
};
|
|
1100
1096
|
};
|
|
1101
1097
|
type SchemaProps$1 = {
|
|
1102
|
-
|
|
1103
|
-
name
|
|
1104
|
-
parentName
|
|
1098
|
+
schema: SchemaObject$1 | null;
|
|
1099
|
+
name: string | null;
|
|
1100
|
+
parentName: string | null;
|
|
1105
1101
|
};
|
|
1106
1102
|
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
1107
1103
|
#private;
|
|
@@ -1239,9 +1235,9 @@ type Options = {
|
|
|
1239
1235
|
* @beta
|
|
1240
1236
|
*/
|
|
1241
1237
|
schema?: (props: {
|
|
1242
|
-
schema
|
|
1243
|
-
name
|
|
1244
|
-
parentName
|
|
1238
|
+
schema: SchemaObject$1 | null;
|
|
1239
|
+
name: string | null;
|
|
1240
|
+
parentName: string | null;
|
|
1245
1241
|
}, defaultSchemas: Schema[]) => Schema[] | undefined;
|
|
1246
1242
|
};
|
|
1247
1243
|
/**
|
|
@@ -1265,4 +1261,4 @@ type ResolvedOptions = {
|
|
|
1265
1261
|
type PluginFaker = PluginFactoryOptions<'plugin-faker', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
1266
1262
|
//#endregion
|
|
1267
1263
|
export { UserPluginWithLifeCycle as a, Schema as i, PluginFaker as n, ReactGenerator as r, Options as t };
|
|
1268
|
-
//# sourceMappingURL=types-
|
|
1264
|
+
//# sourceMappingURL=types-DS1zMTZc.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-faker",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251222215628",
|
|
4
4
|
"description": "Faker.js data generator plugin for Kubb, creating realistic mock data from OpenAPI specifications for development and testing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"faker",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@kubb/react-fabric": "0.7.4",
|
|
72
|
-
"@kubb/core": "0.0.0-canary-
|
|
73
|
-
"@kubb/oas": "0.0.0-canary-
|
|
74
|
-
"@kubb/plugin-oas": "0.0.0-canary-
|
|
75
|
-
"@kubb/plugin-ts": "0.0.0-canary-
|
|
72
|
+
"@kubb/core": "0.0.0-canary-20251222215628",
|
|
73
|
+
"@kubb/oas": "0.0.0-canary-20251222215628",
|
|
74
|
+
"@kubb/plugin-oas": "0.0.0-canary-20251222215628",
|
|
75
|
+
"@kubb/plugin-ts": "0.0.0-canary-20251222215628"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=20"
|
|
@@ -38,8 +38,8 @@ export const fakerGenerator = createReactGenerator<PluginFaker>({
|
|
|
38
38
|
.flat()
|
|
39
39
|
.filter(Boolean)
|
|
40
40
|
|
|
41
|
-
const mapOperationSchema = ({ name, schema
|
|
42
|
-
const tree = schemaGenerator.parse({
|
|
41
|
+
const mapOperationSchema = ({ name, schema, description, ...options }: OperationSchemaType) => {
|
|
42
|
+
const tree = schemaGenerator.parse({ schema, name, parentName: null })
|
|
43
43
|
const imports = schemaManager.getImports(tree)
|
|
44
44
|
const group = options.operation ? getGroup(options.operation) : undefined
|
|
45
45
|
|
package/src/types.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type Options = {
|
|
|
81
81
|
* TODO TODO add docs
|
|
82
82
|
* @beta
|
|
83
83
|
*/
|
|
84
|
-
schema?: (props: { schema
|
|
84
|
+
schema?: (props: { schema: SchemaObject | null; name: string | null; parentName: string | null }, defaultSchemas: Schema[]) => Schema[] | undefined
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Define some generators next to the faker generators
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakerGenerator-CDlH6RdG.cjs","names":["SchemaGenerator","options","pluginTsName","schemaKeywords","Fragment","File","Faker"],"sources":["../src/generators/fakerGenerator.tsx"],"sourcesContent":["import { useMode, usePluginManager } from '@kubb/core/hooks'\nimport { type OperationSchema as OperationSchemaType, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, Fragment } from '@kubb/react-fabric'\nimport { Faker } from '../components'\nimport type { PluginFaker } from '../types'\n\nexport const fakerGenerator = createReactGenerator<PluginFaker>({\n name: 'faker',\n Operation({ operation, generator, plugin }) {\n const {\n options,\n options: { dateParser, regexGenerator, seed, mapper },\n } = plugin\n const mode = useMode()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager(generator)\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n fabric: generator.context.fabric,\n oas,\n plugin,\n events: generator.context.events,\n pluginManager,\n mode,\n override: options.override,\n })\n\n const operationSchemas = [schemas.pathParams, schemas.queryParams, schemas.headerParams, schemas.statusCodes, schemas.request, schemas.response]\n .flat()\n .filter(Boolean)\n\n const mapOperationSchema = ({ name, schema: schemaObject, description, ...options }: OperationSchemaType) => {\n const tree = schemaGenerator.parse({ schemaObject, name })\n const imports = schemaManager.getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const faker = {\n name: schemaManager.getName(name, { type: 'function' }),\n file: schemaManager.getFile(name),\n }\n\n const type = {\n name: schemaManager.getName(name, { type: 'type', pluginKey: [pluginTsName] }),\n file: schemaManager.getFile(options.operationName || name, { pluginKey: [pluginTsName], group }),\n }\n\n const canOverride = tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple,\n )\n\n return (\n <Fragment>\n {canOverride && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={file.path} path={imp.path} name={imp.name} />\n ))}\n <Faker\n name={faker.name}\n typeName={type.name}\n description={description}\n tree={tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </Fragment>\n )\n }\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ schema, plugin }) {\n const { getName, getFile, getImports } = useSchemaManager()\n const {\n options: { output, dateParser, regexGenerator, seed, mapper },\n } = plugin\n const pluginManager = usePluginManager()\n const oas = useOas()\n const imports = getImports(schema.tree)\n\n const faker = {\n name: getName(schema.name, { type: 'function' }),\n file: getFile(schema.name),\n }\n\n const type = {\n name: getName(schema.name, { type: 'type', pluginKey: [pluginTsName] }),\n file: getFile(schema.name, { pluginKey: [pluginTsName] }),\n }\n\n const canOverride = schema.tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple ||\n keyword === schemaKeywords.string ||\n keyword === schemaKeywords.integer ||\n keyword === schemaKeywords.number,\n )\n\n return (\n <File\n baseName={faker.file.baseName}\n path={faker.file.path}\n meta={faker.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n <File.Import isTypeOnly root={faker.file.path} path={type.file.path} name={[type.name]} />\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={faker.file.path} path={imp.path} name={imp.name} />\n ))}\n\n <Faker\n name={faker.name}\n typeName={type.name}\n description={schema.value.description}\n tree={schema.tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;AAUA,MAAa,uEAAmD;CAC9D,MAAM;CACN,UAAU,EAAE,WAAW,WAAW,UAAU;EAC1C,MAAM,EACJ,SACA,SAAS,EAAE,YAAY,gBAAgB,MAAM,aAC3C;EACJ,MAAM,sCAAgB;EACtB,MAAM,wDAAkC;EAExC,MAAM,0CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,6DAAiC,UAAU;EACxE,MAAM,8DAAkC;EAExC,MAAM,OAAO,QAAQ,UAAU;EAC/B,MAAM,UAAU,WAAW,UAAU;EACrC,MAAM,kBAAkB,IAAIA,iCAAgB,SAAS;GACnD,QAAQ,UAAU,QAAQ;GAC1B;GACA;GACA,QAAQ,UAAU,QAAQ;GAC1B;GACA;GACA,UAAU,QAAQ;GACnB,CAAC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,8CAAkB;IAAE;IAAK;IAAQ,QAAQ,cAAc;IAAQ,CAAC;GAChE,8CAAkB;IAAE;IAAK;IAAQ,CAAC;;IAElC,wDAACA,wBAAK;KAAO,MAAM,CAAC,QAAQ;KAAE,MAAK;MAAoB;IACtD,mBAAmB,aAAa,wDAACA,wBAAK;KAAO,MAAM;KAAW,MAAM;MAAa;IACjF,eAAe,WAAW,wDAACA,wBAAK;KAAO,MAAM;KAAY,MAAM;MAAc;IAC9E,wDAACA,wBAAK;KAAO;KAAW,MAAM,MAAM,KAAK;KAAM,MAAM,KAAK,KAAK;KAAM,MAAM,CAAC,KAAK,KAAK;MAAI;IACzF,QAAQ,KAAK,QACZ,wDAACA,wBAAK;KAA4D,MAAM,MAAM,KAAK;KAAM,MAAM,IAAI;KAAM,MAAM,IAAI;OAAjG;KAAC,IAAI;KAAM,IAAI;KAAM,IAAI;KAAW,CAAC,KAAK,IAAI,CAA2D,CAC3H;IAEF,wDAACC;KACC,MAAM,MAAM;KACZ,UAAU,KAAK;KACf,aAAa,OAAO,MAAM;KAC1B,MAAM,OAAO;KACG;KACJ;KACJ;KACF;KACO;MACb;;IACG;;CAGZ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakerGenerator-E5O0u3li.js","names":["options"],"sources":["../src/generators/fakerGenerator.tsx"],"sourcesContent":["import { useMode, usePluginManager } from '@kubb/core/hooks'\nimport { type OperationSchema as OperationSchemaType, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager, useSchemaManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { File, Fragment } from '@kubb/react-fabric'\nimport { Faker } from '../components'\nimport type { PluginFaker } from '../types'\n\nexport const fakerGenerator = createReactGenerator<PluginFaker>({\n name: 'faker',\n Operation({ operation, generator, plugin }) {\n const {\n options,\n options: { dateParser, regexGenerator, seed, mapper },\n } = plugin\n const mode = useMode()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getFile, getGroup } = useOperationManager(generator)\n const schemaManager = useSchemaManager()\n\n const file = getFile(operation)\n const schemas = getSchemas(operation)\n const schemaGenerator = new SchemaGenerator(options, {\n fabric: generator.context.fabric,\n oas,\n plugin,\n events: generator.context.events,\n pluginManager,\n mode,\n override: options.override,\n })\n\n const operationSchemas = [schemas.pathParams, schemas.queryParams, schemas.headerParams, schemas.statusCodes, schemas.request, schemas.response]\n .flat()\n .filter(Boolean)\n\n const mapOperationSchema = ({ name, schema: schemaObject, description, ...options }: OperationSchemaType) => {\n const tree = schemaGenerator.parse({ schemaObject, name })\n const imports = schemaManager.getImports(tree)\n const group = options.operation ? getGroup(options.operation) : undefined\n\n const faker = {\n name: schemaManager.getName(name, { type: 'function' }),\n file: schemaManager.getFile(name),\n }\n\n const type = {\n name: schemaManager.getName(name, { type: 'type', pluginKey: [pluginTsName] }),\n file: schemaManager.getFile(options.operationName || name, { pluginKey: [pluginTsName], group }),\n }\n\n const canOverride = tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple,\n )\n\n return (\n <Fragment>\n {canOverride && <File.Import isTypeOnly root={file.path} path={type.file.path} name={[type.name]} />}\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={file.path} path={imp.path} name={imp.name} />\n ))}\n <Faker\n name={faker.name}\n typeName={type.name}\n description={description}\n tree={tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </Fragment>\n )\n }\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: plugin.options.output, config: pluginManager.config })}\n footer={getFooter({ oas, output: plugin.options.output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n {operationSchemas.map(mapOperationSchema)}\n </File>\n )\n },\n Schema({ schema, plugin }) {\n const { getName, getFile, getImports } = useSchemaManager()\n const {\n options: { output, dateParser, regexGenerator, seed, mapper },\n } = plugin\n const pluginManager = usePluginManager()\n const oas = useOas()\n const imports = getImports(schema.tree)\n\n const faker = {\n name: getName(schema.name, { type: 'function' }),\n file: getFile(schema.name),\n }\n\n const type = {\n name: getName(schema.name, { type: 'type', pluginKey: [pluginTsName] }),\n file: getFile(schema.name, { pluginKey: [pluginTsName] }),\n }\n\n const canOverride = schema.tree.some(\n ({ keyword }) =>\n keyword === schemaKeywords.array ||\n keyword === schemaKeywords.and ||\n keyword === schemaKeywords.object ||\n keyword === schemaKeywords.union ||\n keyword === schemaKeywords.tuple ||\n keyword === schemaKeywords.string ||\n keyword === schemaKeywords.integer ||\n keyword === schemaKeywords.number,\n )\n\n return (\n <File\n baseName={faker.file.baseName}\n path={faker.file.path}\n meta={faker.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={['faker']} path=\"@faker-js/faker\" />\n {regexGenerator === 'randexp' && <File.Import name={'RandExp'} path={'randexp'} />}\n {dateParser !== 'faker' && <File.Import path={dateParser} name={dateParser} />}\n <File.Import isTypeOnly root={faker.file.path} path={type.file.path} name={[type.name]} />\n {imports.map((imp) => (\n <File.Import key={[imp.path, imp.name, imp.isTypeOnly].join('-')} root={faker.file.path} path={imp.path} name={imp.name} />\n ))}\n\n <Faker\n name={faker.name}\n typeName={type.name}\n description={schema.value.description}\n tree={schema.tree}\n regexGenerator={regexGenerator}\n dateParser={dateParser}\n mapper={mapper}\n seed={seed}\n canOverride={canOverride}\n />\n </File>\n )\n },\n})\n"],"mappings":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