@kubb/plugin-faker 5.0.0-beta.81 → 5.0.0-beta.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/dist/index.cjs +51 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/package.json +4 -6
package/dist/index.cjs
CHANGED
|
@@ -24,13 +24,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
let
|
|
27
|
+
let kubb_kit = require("kubb/kit");
|
|
28
28
|
let _kubb_plugin_ts = require("@kubb/plugin-ts");
|
|
29
|
-
let
|
|
29
|
+
let kubb_jsx = require("kubb/jsx");
|
|
30
30
|
let node_path = require("node:path");
|
|
31
31
|
node_path = __toESM(node_path, 1);
|
|
32
|
-
let
|
|
33
|
-
let _kubb_renderer_jsx_jsx_runtime = require("@kubb/renderer-jsx/jsx-runtime");
|
|
32
|
+
let kubb_jsx_jsx_runtime = require("kubb/jsx/jsx-runtime");
|
|
34
33
|
let node_crypto = require("node:crypto");
|
|
35
34
|
//#region src/utils.ts
|
|
36
35
|
/**
|
|
@@ -125,14 +124,14 @@ function buildResponseUnionSchema(node, resolver) {
|
|
|
125
124
|
if (responses.length === 1) {
|
|
126
125
|
const schema = responses[0].content?.[0]?.schema;
|
|
127
126
|
if (schema && shouldInlineSingleResponseSchema(schema)) return schema;
|
|
128
|
-
return
|
|
127
|
+
return kubb_kit.ast.factory.createSchema({
|
|
129
128
|
type: "ref",
|
|
130
129
|
name: resolver.resolveResponseStatusName(node, responses[0].statusCode)
|
|
131
130
|
});
|
|
132
131
|
}
|
|
133
|
-
return
|
|
132
|
+
return kubb_kit.ast.factory.createSchema({
|
|
134
133
|
type: "union",
|
|
135
|
-
members: responses.map((response) =>
|
|
134
|
+
members: responses.map((response) => kubb_kit.ast.factory.createSchema({
|
|
136
135
|
type: "ref",
|
|
137
136
|
name: resolver.resolveResponseStatusName(node, response.statusCode)
|
|
138
137
|
}))
|
|
@@ -255,24 +254,24 @@ function Faker({ node, description, name, typeName, printer, seed, canOverride }
|
|
|
255
254
|
const paramsSignature = declarationPrinter.print(params) ?? "";
|
|
256
255
|
const returnType = resolvedReturnType;
|
|
257
256
|
const returnExpression = node.type === "ref" && canOverride && returnType ? `${fakerTextWithOverride} as ${returnType}` : fakerTextWithOverride;
|
|
258
|
-
return /* @__PURE__ */ (0,
|
|
257
|
+
return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Source, {
|
|
259
258
|
name,
|
|
260
259
|
isExportable: true,
|
|
261
260
|
isIndexable: true,
|
|
262
|
-
children: /* @__PURE__ */ (0,
|
|
261
|
+
children: /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx.Function, {
|
|
263
262
|
export: true,
|
|
264
263
|
name,
|
|
265
|
-
JSDoc: { comments: description ? [`@description ${
|
|
264
|
+
JSDoc: { comments: description ? [`@description ${kubb_kit.ast.jsStringEscape(description)}`] : [] },
|
|
266
265
|
params: canOverride ? paramsSignature : void 0,
|
|
267
266
|
returnType: returnType ?? void 0,
|
|
268
|
-
children: [seed ? /* @__PURE__ */ (0,
|
|
267
|
+
children: [seed ? /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx_jsx_runtime.Fragment, { children: [`faker.seed(${JSON.stringify(seed)})`, /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)("br", {})] }) : void 0, `return ${returnExpression}`]
|
|
269
268
|
})
|
|
270
269
|
});
|
|
271
270
|
}
|
|
272
|
-
const functionSignature = `${description ? `/**\n * @description ${
|
|
271
|
+
const functionSignature = `${description ? `/**\n * @description ${kubb_kit.ast.jsStringEscape(description)}\n */\n ` : ""}export function ${name}<TData extends Partial<${typeName}> = object>(data?: TData)`;
|
|
273
272
|
const seedCode = seed ? `faker.seed(${JSON.stringify(seed)})\n ` : "";
|
|
274
273
|
const { cyclicSchemas, schemaName } = printer.options;
|
|
275
|
-
const functionBody = node.type === "object" && !!cyclicSchemas && (node.properties ?? []).some((p) =>
|
|
274
|
+
const functionBody = node.type === "object" && !!cyclicSchemas && (node.properties ?? []).some((p) => kubb_kit.ast.containsCircularRef(p.schema, {
|
|
276
275
|
circularSchemas: cyclicSchemas,
|
|
277
276
|
excludeName: schemaName
|
|
278
277
|
})) ? `{
|
|
@@ -290,7 +289,7 @@ function Faker({ node, description, name, typeName, printer, seed, canOverride }
|
|
|
290
289
|
...(data || {}),
|
|
291
290
|
} as Omit<typeof defaultFakeData, keyof TData> & TData
|
|
292
291
|
}`;
|
|
293
|
-
return /* @__PURE__ */ (0,
|
|
292
|
+
return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx.File.Source, {
|
|
294
293
|
name,
|
|
295
294
|
isExportable: true,
|
|
296
295
|
isIndexable: true,
|
|
@@ -682,7 +681,7 @@ const fakerKeywordMapper = {
|
|
|
682
681
|
return `{...${items.join(", ...")}}`;
|
|
683
682
|
},
|
|
684
683
|
matches: (value = "", regexGenerator = "faker") => {
|
|
685
|
-
if (regexGenerator === "randexp") return `${
|
|
684
|
+
if (regexGenerator === "randexp") return `${kubb_kit.ast.toRegExpString(value, "RandExp")}.gen()`;
|
|
686
685
|
return `faker.helpers.fromRegExp("${value}")`;
|
|
687
686
|
},
|
|
688
687
|
email: () => "faker.internet.email()",
|
|
@@ -693,15 +692,15 @@ function getEnumValues(node) {
|
|
|
693
692
|
return node.enumValues ?? [];
|
|
694
693
|
}
|
|
695
694
|
function parseEnumValue(value) {
|
|
696
|
-
if (typeof value === "string") return
|
|
695
|
+
if (typeof value === "string") return kubb_kit.ast.stringify(value);
|
|
697
696
|
return value;
|
|
698
697
|
}
|
|
699
698
|
/**
|
|
700
699
|
* Reads the discriminator literal off a variant, or `undefined` when it can't be determined.
|
|
701
700
|
*/
|
|
702
701
|
function getDiscriminatorValue(member, discriminatorPropertyName) {
|
|
703
|
-
const prop =
|
|
704
|
-
const enumNode = prop ?
|
|
702
|
+
const prop = kubb_kit.ast.narrowSchema(member, "object")?.properties?.find((p) => p.name === discriminatorPropertyName);
|
|
703
|
+
const enumNode = prop ? kubb_kit.ast.narrowSchema(prop.schema, "enum") : null;
|
|
705
704
|
return enumNode ? getEnumValues(enumNode)[0] : void 0;
|
|
706
705
|
}
|
|
707
706
|
/**
|
|
@@ -718,7 +717,7 @@ function indexedTypeName(typeName, propertyName, nestedInUnion) {
|
|
|
718
717
|
* Creates a Faker printer that generates mock data generation code from schema nodes.
|
|
719
718
|
* Handles circular references gracefully by emitting memoizing getters for cyclic properties.
|
|
720
719
|
*/
|
|
721
|
-
const printerFaker =
|
|
720
|
+
const printerFaker = kubb_kit.ast.createPrinter((options) => {
|
|
722
721
|
const printNested = (node, overrideOptions = {}) => {
|
|
723
722
|
return printerFaker({
|
|
724
723
|
...options,
|
|
@@ -758,7 +757,7 @@ const printerFaker = _kubb_core.ast.createPrinter((options) => {
|
|
|
758
757
|
return fakerKeywordMapper.time(node.representation ?? "string", this.options.dateParser);
|
|
759
758
|
},
|
|
760
759
|
ref(node) {
|
|
761
|
-
const refName = node.ref ? this.options.nameMapping?.get(node.ref) ??
|
|
760
|
+
const refName = node.ref ? this.options.nameMapping?.get(node.ref) ?? kubb_kit.ast.extractRefName(node.ref) ?? node.name ?? node.schema?.name : node.name ?? node.schema?.name;
|
|
762
761
|
if (!refName) throw new Error("Name not defined for ref node");
|
|
763
762
|
if (this.options.schemaName && refName === this.options.schemaName) return this.options.typeName ? `undefined as unknown as ${this.options.typeName}` : "undefined as unknown";
|
|
764
763
|
const resolvedName = node.ref ? this.options.resolver.resolveName(refName) : refName;
|
|
@@ -771,7 +770,7 @@ const printerFaker = _kubb_core.ast.createPrinter((options) => {
|
|
|
771
770
|
union(node) {
|
|
772
771
|
const { discriminatorPropertyName } = node;
|
|
773
772
|
const baseTypeName = this.options.typeName;
|
|
774
|
-
const items =
|
|
773
|
+
const items = kubb_kit.ast.mapSchemaMembers(node, (member) => {
|
|
775
774
|
const value = discriminatorPropertyName ? getDiscriminatorValue(member, discriminatorPropertyName) : void 0;
|
|
776
775
|
if (baseTypeName && value !== void 0) return printNested(member, {
|
|
777
776
|
typeName: `Extract<NonNullable<${baseTypeName}>, { ${JSON.stringify(discriminatorPropertyName)}: ${parseEnumValue(value)} }>`,
|
|
@@ -786,11 +785,11 @@ const printerFaker = _kubb_core.ast.createPrinter((options) => {
|
|
|
786
785
|
return fakerKeywordMapper.union(items);
|
|
787
786
|
},
|
|
788
787
|
intersection(node) {
|
|
789
|
-
const items =
|
|
788
|
+
const items = kubb_kit.ast.mapSchemaMembers(node, (member) => printNested(member, { nestedInObject: true })).map(({ output }) => output).filter((item) => Boolean(item) && item !== "undefined");
|
|
790
789
|
return fakerKeywordMapper.and(items);
|
|
791
790
|
},
|
|
792
791
|
array(node) {
|
|
793
|
-
const items =
|
|
792
|
+
const items = kubb_kit.ast.mapSchemaItems(node, (member) => printNested(member, {
|
|
794
793
|
typeName: this.options.typeName ? `NonNullable<${this.options.typeName}>[number]` : void 0,
|
|
795
794
|
nestedInObject: true
|
|
796
795
|
})).map(({ output }) => output).filter((item) => Boolean(item));
|
|
@@ -805,17 +804,18 @@ const printerFaker = _kubb_core.ast.createPrinter((options) => {
|
|
|
805
804
|
},
|
|
806
805
|
object(node) {
|
|
807
806
|
const cyclicSchemas = this.options.cyclicSchemas;
|
|
808
|
-
|
|
807
|
+
const entries = (node.properties ?? []).map((property) => {
|
|
809
808
|
const value = printNested(property.schema, {
|
|
810
809
|
typeName: this.options.typeName ? indexedTypeName(this.options.typeName, property.name, this.options.nestedInUnion) : void 0,
|
|
811
810
|
nestedInObject: true
|
|
812
811
|
}) ?? "undefined";
|
|
813
|
-
if (cyclicSchemas &&
|
|
812
|
+
if (cyclicSchemas && kubb_kit.ast.containsCircularRef(property.schema, {
|
|
814
813
|
circularSchemas: cyclicSchemas,
|
|
815
814
|
excludeName: this.options.schemaName
|
|
816
|
-
})) return `get ${
|
|
817
|
-
return `${
|
|
818
|
-
})
|
|
815
|
+
})) return `get ${kubb_kit.ast.objectKey(property.name)}() { const _value = ${value}; Object.defineProperty(this, ${JSON.stringify(property.name)}, { value: _value, configurable: true, writable: true, enumerable: true }); return _value }`;
|
|
816
|
+
return `${kubb_kit.ast.objectKey(property.name)}: ${value}`;
|
|
817
|
+
});
|
|
818
|
+
return kubb_kit.ast.buildObject(entries);
|
|
819
819
|
},
|
|
820
820
|
...options.nodes
|
|
821
821
|
},
|
|
@@ -832,9 +832,9 @@ const printerFaker = _kubb_core.ast.createPrinter((options) => {
|
|
|
832
832
|
* factory returns a value matching the corresponding TypeScript type from
|
|
833
833
|
* `@kubb/plugin-ts`.
|
|
834
834
|
*/
|
|
835
|
-
const fakerGenerator = (0,
|
|
835
|
+
const fakerGenerator = (0, kubb_kit.defineGenerator)({
|
|
836
836
|
name: "faker",
|
|
837
|
-
renderer:
|
|
837
|
+
renderer: kubb_jsx.jsxRenderer,
|
|
838
838
|
schema(node, ctx) {
|
|
839
839
|
const { adapter, config, resolver, root } = ctx;
|
|
840
840
|
const { output, group, dateParser, regexGenerator, seed, locale, printer } = ctx.options;
|
|
@@ -842,7 +842,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
842
842
|
if (!node.name || !pluginTs) return;
|
|
843
843
|
const tsResolver = ctx.driver.getResolver(_kubb_plugin_ts.pluginTsName);
|
|
844
844
|
const schemaName = node.name;
|
|
845
|
-
const isEnumSchema = !!
|
|
845
|
+
const isEnumSchema = !!kubb_kit.ast.narrowSchema(node, kubb_kit.ast.schemaTypes.enum);
|
|
846
846
|
const tsEnumType = pluginTs.options?.enum?.type;
|
|
847
847
|
const tsEnumTypeSuffix = pluginTs.options?.enum?.typeSuffix ?? "Key";
|
|
848
848
|
const schemaTypeName = isEnumSchema && tsEnumType === "asConst" ? tsResolver.resolveEnumKeyName({ name: schemaName }, tsEnumTypeSuffix) : tsResolver.resolveTypeName(schemaName);
|
|
@@ -898,7 +898,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
898
898
|
group: group ?? void 0
|
|
899
899
|
}).path
|
|
900
900
|
})), fakerText);
|
|
901
|
-
return /* @__PURE__ */ (0,
|
|
901
|
+
return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx.File, {
|
|
902
902
|
baseName: meta.file.baseName,
|
|
903
903
|
path: meta.file.path,
|
|
904
904
|
meta: meta.file.meta,
|
|
@@ -919,28 +919,28 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
919
919
|
}
|
|
920
920
|
}),
|
|
921
921
|
children: [
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
922
|
+
/* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
923
923
|
name: locale ? [{
|
|
924
924
|
propertyName: localeToFakerImport(locale),
|
|
925
925
|
name: "faker"
|
|
926
926
|
}] : ["faker"],
|
|
927
927
|
path: "@faker-js/faker"
|
|
928
928
|
}),
|
|
929
|
-
regexGenerator === "randexp" && /* @__PURE__ */ (0,
|
|
929
|
+
regexGenerator === "randexp" && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
930
930
|
name: "RandExp",
|
|
931
931
|
path: "randexp"
|
|
932
932
|
}),
|
|
933
|
-
dateParser !== "faker" && /* @__PURE__ */ (0,
|
|
933
|
+
dateParser !== "faker" && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
934
934
|
path: dateParser,
|
|
935
935
|
name: dateParser
|
|
936
936
|
}),
|
|
937
|
-
typeReference.importPath && /* @__PURE__ */ (0,
|
|
937
|
+
typeReference.importPath && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
938
938
|
isTypeOnly: true,
|
|
939
939
|
root: meta.file.path,
|
|
940
940
|
path: typeReference.importPath,
|
|
941
941
|
name: [meta.typeName]
|
|
942
942
|
}),
|
|
943
|
-
usedImports.map((imp) => /* @__PURE__ */ (0,
|
|
943
|
+
usedImports.map((imp) => /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
944
944
|
root: meta.file.path,
|
|
945
945
|
path: imp.path,
|
|
946
946
|
name: imp.name
|
|
@@ -949,7 +949,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
949
949
|
imp.path,
|
|
950
950
|
imp.name
|
|
951
951
|
].join("-"))),
|
|
952
|
-
/* @__PURE__ */ (0,
|
|
952
|
+
/* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(Faker, {
|
|
953
953
|
name: meta.name,
|
|
954
954
|
typeName: typeReference.typeName,
|
|
955
955
|
description: node.description,
|
|
@@ -986,9 +986,9 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
986
986
|
}];
|
|
987
987
|
}
|
|
988
988
|
const variants = resolveContentTypeVariants(entries, baseName);
|
|
989
|
-
const unionSchema =
|
|
989
|
+
const unionSchema = kubb_kit.ast.factory.createSchema({
|
|
990
990
|
type: "union",
|
|
991
|
-
members: variants.map((variant) =>
|
|
991
|
+
members: variants.map((variant) => kubb_kit.ast.factory.createSchema({
|
|
992
992
|
type: "ref",
|
|
993
993
|
name: variant.name
|
|
994
994
|
}))
|
|
@@ -1079,14 +1079,14 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
1079
1079
|
filePath: meta.file.path,
|
|
1080
1080
|
typeFilePath: meta.typeFile.path
|
|
1081
1081
|
});
|
|
1082
|
-
return /* @__PURE__ */ (0,
|
|
1083
|
-
typeReference.importPath && /* @__PURE__ */ (0,
|
|
1082
|
+
return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx_jsx_runtime.Fragment, { children: [
|
|
1083
|
+
typeReference.importPath && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
1084
1084
|
isTypeOnly: true,
|
|
1085
1085
|
root: meta.file.path,
|
|
1086
1086
|
path: typeReference.importPath,
|
|
1087
1087
|
name: [typeName]
|
|
1088
1088
|
}),
|
|
1089
|
-
imports.map((imp) => /* @__PURE__ */ (0,
|
|
1089
|
+
imports.map((imp) => /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
1090
1090
|
root: meta.file.path,
|
|
1091
1091
|
path: imp.path,
|
|
1092
1092
|
name: imp.name
|
|
@@ -1095,7 +1095,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
1095
1095
|
imp.path,
|
|
1096
1096
|
imp.name
|
|
1097
1097
|
].join("-"))),
|
|
1098
|
-
/* @__PURE__ */ (0,
|
|
1098
|
+
/* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(Faker, {
|
|
1099
1099
|
name,
|
|
1100
1100
|
typeName: typeReference.typeName,
|
|
1101
1101
|
description,
|
|
@@ -1109,7 +1109,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
1109
1109
|
})
|
|
1110
1110
|
] });
|
|
1111
1111
|
}
|
|
1112
|
-
return /* @__PURE__ */ (0,
|
|
1112
|
+
return /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsxs)(kubb_jsx.File, {
|
|
1113
1113
|
baseName: meta.file.baseName,
|
|
1114
1114
|
path: meta.file.path,
|
|
1115
1115
|
meta: meta.file.meta,
|
|
@@ -1130,18 +1130,18 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}),
|
|
1132
1132
|
children: [
|
|
1133
|
-
/* @__PURE__ */ (0,
|
|
1133
|
+
/* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
1134
1134
|
name: locale ? [{
|
|
1135
1135
|
propertyName: localeToFakerImport(locale),
|
|
1136
1136
|
name: "faker"
|
|
1137
1137
|
}] : ["faker"],
|
|
1138
1138
|
path: "@faker-js/faker"
|
|
1139
1139
|
}),
|
|
1140
|
-
regexGenerator === "randexp" && /* @__PURE__ */ (0,
|
|
1140
|
+
regexGenerator === "randexp" && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
1141
1141
|
name: "RandExp",
|
|
1142
1142
|
path: "randexp"
|
|
1143
1143
|
}),
|
|
1144
|
-
dateParser !== "faker" && /* @__PURE__ */ (0,
|
|
1144
|
+
dateParser !== "faker" && /* @__PURE__ */ (0, kubb_jsx_jsx_runtime.jsx)(kubb_jsx.File.Import, {
|
|
1145
1145
|
path: dateParser,
|
|
1146
1146
|
name: dateParser
|
|
1147
1147
|
}),
|
|
@@ -1188,7 +1188,7 @@ const fakerGenerator = (0, _kubb_core.defineGenerator)({
|
|
|
1188
1188
|
* resolverFaker.default('list pets', 'function') // 'createListPets'
|
|
1189
1189
|
* ```
|
|
1190
1190
|
*/
|
|
1191
|
-
const resolverFaker = (0,
|
|
1191
|
+
const resolverFaker = (0, kubb_kit.defineResolver)(() => {
|
|
1192
1192
|
return {
|
|
1193
1193
|
name: "default",
|
|
1194
1194
|
pluginName: "plugin-faker",
|
|
@@ -1263,7 +1263,7 @@ const pluginFakerName = "plugin-faker";
|
|
|
1263
1263
|
*
|
|
1264
1264
|
* @example
|
|
1265
1265
|
* ```ts
|
|
1266
|
-
* import { defineConfig } from 'kubb'
|
|
1266
|
+
* import { defineConfig } from 'kubb/config'
|
|
1267
1267
|
* import { pluginTs } from '@kubb/plugin-ts'
|
|
1268
1268
|
* import { pluginFaker } from '@kubb/plugin-faker'
|
|
1269
1269
|
*
|
|
@@ -1280,7 +1280,7 @@ const pluginFakerName = "plugin-faker";
|
|
|
1280
1280
|
* })
|
|
1281
1281
|
* ```
|
|
1282
1282
|
*/
|
|
1283
|
-
const pluginFaker = (0,
|
|
1283
|
+
const pluginFaker = (0, kubb_kit.definePlugin)((options) => {
|
|
1284
1284
|
const { output = {
|
|
1285
1285
|
path: "mocks",
|
|
1286
1286
|
barrel: { type: "named" }
|