unplugin-kubb 5.9.2 → 5.9.3
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/astro.cjs +1 -1
- package/dist/esbuild.cjs +1 -1
- package/dist/esbuild.js +1 -1
- package/dist/farm.cjs +1 -1
- package/dist/farm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/nuxt.cjs +1 -1
- package/dist/rolldown.cjs +1 -1
- package/dist/rolldown.js +1 -1
- package/dist/rollup.cjs +1 -1
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.js +1 -1
- package/dist/{unpluginFactory-3oScRRaA.cjs → unpluginFactory-CqDfPz0M.cjs} +2 -2
- package/dist/{unpluginFactory-3oScRRaA.cjs.map → unpluginFactory-CqDfPz0M.cjs.map} +1 -1
- package/dist/{unpluginFactory-Dxy9aXt2.js → unpluginFactory-DKugbAOX.js} +2 -2
- package/dist/{unpluginFactory-Dxy9aXt2.js.map → unpluginFactory-DKugbAOX.js.map} +1 -1
- package/dist/unpluginFactory.cjs +1 -1
- package/dist/unpluginFactory.js +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +6 -6
package/dist/astro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
const require_vite = require("./vite.cjs");
|
|
3
3
|
//#region src/astro.ts
|
|
4
4
|
var astro_default = /* @__PURE__ */ require_unpluginFactory.__name((options) => ({
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/esbuild.ts
|
|
3
3
|
var esbuild_default = (0, require("unplugin").createEsbuildPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/esbuild.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createEsbuildPlugin } from "unplugin";
|
|
3
3
|
//#region src/esbuild.ts
|
|
4
4
|
var esbuild_default = createEsbuildPlugin(unpluginFactory);
|
package/dist/farm.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/farm.ts
|
|
3
3
|
var farm_default = (0, require("unplugin").createFarmPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/farm.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
5
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
6
6
|
//#region src/index.ts
|
|
7
7
|
const plugin = /* #__PURE__ */ (0, require("unplugin").createUnplugin)(require_unpluginFactory.unpluginFactory);
|
|
8
8
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
const plugin = /* #__PURE__ */ createUnplugin(unpluginFactory);
|
package/dist/nuxt.cjs
CHANGED
package/dist/rolldown.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/rolldown.ts
|
|
3
3
|
var rolldown_default = (0, require("unplugin").createRolldownPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/rolldown.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createRolldownPlugin } from "unplugin";
|
|
3
3
|
//#region src/rolldown.ts
|
|
4
4
|
var rolldown_default = createRolldownPlugin(unpluginFactory);
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/rollup.ts
|
|
3
3
|
var rollup_default = (0, require("unplugin").createRollupPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/rollup.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createRollupPlugin } from "unplugin";
|
|
3
3
|
//#region src/rollup.ts
|
|
4
4
|
var rollup_default = createRollupPlugin(unpluginFactory);
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/rspack.ts
|
|
3
3
|
var rspack_default = (0, require("unplugin").createRspackPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/rspack.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createRspackPlugin } from "unplugin";
|
|
3
3
|
//#region src/rspack.ts
|
|
4
4
|
var rspack_default = createRspackPlugin(unpluginFactory);
|
|
@@ -10,7 +10,7 @@ let _kubb_core = require("@kubb/core");
|
|
|
10
10
|
let _kubb_plugin_barrel = require("@kubb/plugin-barrel");
|
|
11
11
|
let _kubb_parser_ts = require("@kubb/parser-ts");
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version = "5.9.
|
|
13
|
+
var version = "5.9.3";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/unpluginFactory.ts
|
|
16
16
|
/**
|
|
@@ -119,4 +119,4 @@ Object.defineProperty(exports, "unpluginFactory", {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
//# sourceMappingURL=unpluginFactory-
|
|
122
|
+
//# sourceMappingURL=unpluginFactory-CqDfPz0M.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unpluginFactory-
|
|
1
|
+
{"version":3,"file":"unpluginFactory-CqDfPz0M.cjs","names":["Hookable","Diagnostics","applyConfigDefaults","adapterOas","pluginBarrel","pluginBarrelName","parserTs","parserTsx","unpluginVersion","createKubb"],"sources":["../package.json","../src/unpluginFactory.ts"],"sourcesContent":["","import { adapterOas } from '@kubb/adapter-oas'\nimport { applyConfigDefaults, type Config, createKubb, Diagnostics, type KubbHooks, Hookable } from '@kubb/core'\nimport { pluginBarrel, pluginBarrelName } from '@kubb/plugin-barrel'\nimport { parserTs, parserTsx } from '@kubb/parser-ts'\nimport type { UnpluginFactory } from 'unplugin'\nimport { version as unpluginVersion } from '../package.json'\nimport type { Options } from './types.ts'\n\n/**\n * Builds the Kubb unplugin for any unplugin-supported bundler (Vite, Rollup, Webpack, esbuild).\n *\n * Registers hook handlers that log lifecycle, diagnostics, and a per-plugin summary, then runs\n * the Kubb build during the first `buildStart`. When the config omits them, it fills in defaults:\n * the OAS adapter, the TS and TSX parsers, and a barrel plugin. Under Vite it only applies during\n * `build`. A missing config or a failed generation fails the host build.\n */\nexport const unpluginFactory: UnpluginFactory<Options | undefined> = (options, meta) => {\n const name = 'unplugin-kubb' as const\n const hooks = new Hookable<KubbHooks>()\n const isVite = meta.framework === 'vite'\n\n hooks.hook('kubb:lifecycle:start', ({ version }) => {\n console.log(`Kubb Unplugin ${version} 🧩`)\n })\n\n hooks.hook('kubb:error', ({ error }) => {\n console.error(`✗ ${error?.message || 'failed'}`)\n })\n\n hooks.hook('kubb:warn', ({ message }) => {\n console.warn(`⚠ ${message}`)\n })\n\n hooks.hook('kubb:info', ({ message }) => {\n console.info(`ℹ ${message}`)\n })\n\n // Unplugin has no diagnostic renderer, so route each problem by severity to a channel it logs on.\n hooks.hook('kubb:diagnostic', ({ diagnostic }) => {\n if (diagnostic.severity === 'error') return hooks.callHook('kubb:error', { error: diagnostic.cause ?? new Error(diagnostic.message) })\n if (diagnostic.severity === 'warning') return hooks.callHook('kubb:warn', { message: diagnostic.message })\n return hooks.callHook('kubb:info', { message: diagnostic.message })\n })\n\n hooks.hook('kubb:success', ({ message }) => {\n console.log(`✓ ${message}`)\n })\n\n hooks.hook('kubb:plugin:end', ({ plugin, duration }) => {\n const durationStr = duration >= 1000 ? `${(duration / 1000).toFixed(2)}s` : `${duration}ms`\n\n console.log(`✓ ${plugin.name} completed in ${durationStr}`)\n })\n\n hooks.hook('kubb:files:processing:end', () => {\n console.log('✓ Files written successfully')\n })\n\n hooks.hook('kubb:generation:end', ({ config, status, diagnostics }) => {\n const result = status === 'failed' ? '✗ Generation failed' : '✓ Generation succeeded'\n console.log(config.name ? `${result} for ${config.name}` : result)\n\n if (!diagnostics || !status) return\n\n const failedCount = Diagnostics.failedPlugins(diagnostics).length\n const pluginsCount = config.plugins.length\n const passedCount = pluginsCount - failedCount\n const { errors } = Diagnostics.count(diagnostics)\n\n // A run that fails before any plugin runs has 0 failed plugins, so show the error count.\n console.log(\n status === 'success'\n ? `Kubb Summary: ✓ ${passedCount} passed (${pluginsCount})`\n : `Kubb Summary: ✗ ${passedCount} passed | ${failedCount} failed (${pluginsCount}) | ${errors} ${errors === 1 ? 'error' : 'errors'}`,\n )\n })\n\n // Throw: webpack, Rspack, esbuild, and Farm contexts have no `this.error`.\n async function runBuild() {\n if (!options?.config) {\n throw new Error(`[${name}] Config is not set`)\n }\n\n const { adapter, output, plugins } = applyConfigDefaults(options.config, {\n defaultAdapter: adapterOas(),\n barrelPlugin: pluginBarrel(),\n barrelPluginName: pluginBarrelName,\n defaultOutput: { barrel: false, format: false, lint: false },\n })\n\n const config = {\n ...options.config,\n adapter,\n parsers: options.config.parsers?.length ? options.config.parsers : [parserTs(), parserTsx()],\n plugins,\n output,\n }\n const userConfig = config as Config\n\n await hooks.callHook('kubb:lifecycle:start', { version: unpluginVersion })\n\n const kubb = createKubb(userConfig, { hooks })\n const result = await kubb.generate()\n\n await hooks.callHook('kubb:lifecycle:end')\n\n if (!result.success) {\n const failedCount = Diagnostics.failedPlugins(result.diagnostics).length\n const firstError = result.diagnostics.filter(Diagnostics.isProblem).find((diagnostic) => diagnostic.severity === 'error')\n const message = failedCount > 0 ? `Build Error with ${failedCount} failed plugins` : (firstError?.message ?? 'Build failed')\n\n throw new Error(`[${name}] ${message}`, { cause: firstError?.cause })\n }\n }\n\n // A rerun with `output.clean` loops webpack and Rspack watchers, so generate once per instance.\n let generation: Promise<void> | undefined\n\n return {\n name,\n enforce: 'pre',\n apply: isVite ? 'build' : undefined,\n async buildStart() {\n generation ??= runBuild().catch((error: unknown) => {\n generation = undefined\n throw error\n })\n await generation\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;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AClE,MAAM,aAAa,OAAO,YAAY,OAAOA,WAAAA,YAAY,SAAS,CAAC,CAAC,MAAM,eAAe,WAAW,aAAa,OAAO;GACxH,MAAM,UAAU,cAAc,IAAI,oBAAoB,YAAY,mBAAoB,YAAY,WAAW;GAE7G,MAAM,IAAI,MAAM,IAAI,KAAK,IAAI,WAAW,EAAE,OAAO,YAAY,MAAM,CAAC;EACtE;CACF;CAGA,IAAI;CAEJ,OAAO;EACL;EACA,SAAS;EACT,OAAO,SAAS,UAAU,KAAA;EAC1B,MAAM,aAAa;GACjB,eAAe,SAAS,CAAC,CAAC,OAAO,UAAmB;IAClD,aAAa,KAAA;IACb,MAAM;GACR,CAAC;GACD,MAAM;EACR;CACF;AACF"}
|
|
@@ -4,7 +4,7 @@ import { Diagnostics, Hookable, applyConfigDefaults, createKubb } from "@kubb/co
|
|
|
4
4
|
import { pluginBarrel, pluginBarrelName } from "@kubb/plugin-barrel";
|
|
5
5
|
import { parserTs, parserTsx } from "@kubb/parser-ts";
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "5.9.
|
|
7
|
+
var version = "5.9.3";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/unpluginFactory.ts
|
|
10
10
|
/**
|
|
@@ -102,4 +102,4 @@ const unpluginFactory = (options, meta) => {
|
|
|
102
102
|
//#endregion
|
|
103
103
|
export { unpluginFactory as t };
|
|
104
104
|
|
|
105
|
-
//# sourceMappingURL=unpluginFactory-
|
|
105
|
+
//# sourceMappingURL=unpluginFactory-DKugbAOX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unpluginFactory-
|
|
1
|
+
{"version":3,"file":"unpluginFactory-DKugbAOX.js","names":["unpluginVersion"],"sources":["../package.json","../src/unpluginFactory.ts"],"sourcesContent":["","import { adapterOas } from '@kubb/adapter-oas'\nimport { applyConfigDefaults, type Config, createKubb, Diagnostics, type KubbHooks, Hookable } from '@kubb/core'\nimport { pluginBarrel, pluginBarrelName } from '@kubb/plugin-barrel'\nimport { parserTs, parserTsx } from '@kubb/parser-ts'\nimport type { UnpluginFactory } from 'unplugin'\nimport { version as unpluginVersion } from '../package.json'\nimport type { Options } from './types.ts'\n\n/**\n * Builds the Kubb unplugin for any unplugin-supported bundler (Vite, Rollup, Webpack, esbuild).\n *\n * Registers hook handlers that log lifecycle, diagnostics, and a per-plugin summary, then runs\n * the Kubb build during the first `buildStart`. When the config omits them, it fills in defaults:\n * the OAS adapter, the TS and TSX parsers, and a barrel plugin. Under Vite it only applies during\n * `build`. A missing config or a failed generation fails the host build.\n */\nexport const unpluginFactory: UnpluginFactory<Options | undefined> = (options, meta) => {\n const name = 'unplugin-kubb' as const\n const hooks = new Hookable<KubbHooks>()\n const isVite = meta.framework === 'vite'\n\n hooks.hook('kubb:lifecycle:start', ({ version }) => {\n console.log(`Kubb Unplugin ${version} 🧩`)\n })\n\n hooks.hook('kubb:error', ({ error }) => {\n console.error(`✗ ${error?.message || 'failed'}`)\n })\n\n hooks.hook('kubb:warn', ({ message }) => {\n console.warn(`⚠ ${message}`)\n })\n\n hooks.hook('kubb:info', ({ message }) => {\n console.info(`ℹ ${message}`)\n })\n\n // Unplugin has no diagnostic renderer, so route each problem by severity to a channel it logs on.\n hooks.hook('kubb:diagnostic', ({ diagnostic }) => {\n if (diagnostic.severity === 'error') return hooks.callHook('kubb:error', { error: diagnostic.cause ?? new Error(diagnostic.message) })\n if (diagnostic.severity === 'warning') return hooks.callHook('kubb:warn', { message: diagnostic.message })\n return hooks.callHook('kubb:info', { message: diagnostic.message })\n })\n\n hooks.hook('kubb:success', ({ message }) => {\n console.log(`✓ ${message}`)\n })\n\n hooks.hook('kubb:plugin:end', ({ plugin, duration }) => {\n const durationStr = duration >= 1000 ? `${(duration / 1000).toFixed(2)}s` : `${duration}ms`\n\n console.log(`✓ ${plugin.name} completed in ${durationStr}`)\n })\n\n hooks.hook('kubb:files:processing:end', () => {\n console.log('✓ Files written successfully')\n })\n\n hooks.hook('kubb:generation:end', ({ config, status, diagnostics }) => {\n const result = status === 'failed' ? '✗ Generation failed' : '✓ Generation succeeded'\n console.log(config.name ? `${result} for ${config.name}` : result)\n\n if (!diagnostics || !status) return\n\n const failedCount = Diagnostics.failedPlugins(diagnostics).length\n const pluginsCount = config.plugins.length\n const passedCount = pluginsCount - failedCount\n const { errors } = Diagnostics.count(diagnostics)\n\n // A run that fails before any plugin runs has 0 failed plugins, so show the error count.\n console.log(\n status === 'success'\n ? `Kubb Summary: ✓ ${passedCount} passed (${pluginsCount})`\n : `Kubb Summary: ✗ ${passedCount} passed | ${failedCount} failed (${pluginsCount}) | ${errors} ${errors === 1 ? 'error' : 'errors'}`,\n )\n })\n\n // Throw: webpack, Rspack, esbuild, and Farm contexts have no `this.error`.\n async function runBuild() {\n if (!options?.config) {\n throw new Error(`[${name}] Config is not set`)\n }\n\n const { adapter, output, plugins } = applyConfigDefaults(options.config, {\n defaultAdapter: adapterOas(),\n barrelPlugin: pluginBarrel(),\n barrelPluginName: pluginBarrelName,\n defaultOutput: { barrel: false, format: false, lint: false },\n })\n\n const config = {\n ...options.config,\n adapter,\n parsers: options.config.parsers?.length ? options.config.parsers : [parserTs(), parserTsx()],\n plugins,\n output,\n }\n const userConfig = config as Config\n\n await hooks.callHook('kubb:lifecycle:start', { version: unpluginVersion })\n\n const kubb = createKubb(userConfig, { hooks })\n const result = await kubb.generate()\n\n await hooks.callHook('kubb:lifecycle:end')\n\n if (!result.success) {\n const failedCount = Diagnostics.failedPlugins(result.diagnostics).length\n const firstError = result.diagnostics.filter(Diagnostics.isProblem).find((diagnostic) => diagnostic.severity === 'error')\n const message = failedCount > 0 ? `Build Error with ${failedCount} failed plugins` : (firstError?.message ?? 'Build failed')\n\n throw new Error(`[${name}] ${message}`, { cause: firstError?.cause })\n }\n }\n\n // A rerun with `output.clean` loops webpack and Rspack watchers, so generate once per instance.\n let generation: Promise<void> | undefined\n\n return {\n name,\n enforce: 'pre',\n apply: isVite ? 'build' : undefined,\n async buildStart() {\n gener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AO;GACxH,MAAM,UAAU,cAAc,IAAI,oBAAoB,YAAY,mBAAoB,YAAY,WAAW;GAE7G,MAAM,IAAI,MAAM,IAAI,KAAK,IAAI,WAAW,EAAE,OAAO,YAAY,MAAM,CAAC;EACtE;CACF;CAGA,IAAI;CAEJ,OAAO;EACL;EACA,SAAS;EACT,OAAO,SAAS,UAAU,KAAA;EAC1B,MAAM,aAAa;GACjB,eAAe,SAAS,CAAC,CAAC,OAAO,UAAmB;IAClD,aAAa,KAAA;IACb,MAAM;GACR,CAAC;GACD,MAAM;EACR;CACF;AACF"}
|
package/dist/unpluginFactory.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
2
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
3
3
|
exports.unpluginFactory = require_unpluginFactory.unpluginFactory;
|
package/dist/unpluginFactory.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
export { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
package/dist/vite.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/vite.ts
|
|
3
3
|
var vite_default = (0, require("unplugin").createVitePlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/vite.js
CHANGED
package/dist/webpack.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_unpluginFactory = require("./unpluginFactory-
|
|
1
|
+
const require_unpluginFactory = require("./unpluginFactory-CqDfPz0M.cjs");
|
|
2
2
|
//#region src/webpack.ts
|
|
3
3
|
var webpack_default = (0, require("unplugin").createWebpackPlugin)(require_unpluginFactory.unpluginFactory);
|
|
4
4
|
//#endregion
|
package/dist/webpack.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as unpluginFactory } from "./unpluginFactory-
|
|
1
|
+
import { t as unpluginFactory } from "./unpluginFactory-DKugbAOX.js";
|
|
2
2
|
import { createWebpackPlugin } from "unplugin";
|
|
3
3
|
//#region src/webpack.ts
|
|
4
4
|
var webpack_default = createWebpackPlugin(unpluginFactory);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-kubb",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.3",
|
|
4
4
|
"description": "Integration of Kubb for Vite, webpack, Rollup, Rolldown, Rspack, esbuild, Farm, Nuxt, and Astro.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -126,15 +126,15 @@
|
|
|
126
126
|
"registry": "https://registry.npmjs.org/"
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@kubb/adapter-oas": "5.9.
|
|
130
|
-
"@kubb/core": "5.9.
|
|
131
|
-
"@kubb/parser-ts": "5.9.
|
|
132
|
-
"@kubb/plugin-barrel": "5.9.
|
|
129
|
+
"@kubb/adapter-oas": "5.9.3",
|
|
130
|
+
"@kubb/core": "5.9.3",
|
|
131
|
+
"@kubb/parser-ts": "5.9.3",
|
|
132
|
+
"@kubb/plugin-barrel": "5.9.3",
|
|
133
133
|
"unplugin": "^3.4.0"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
136
|
"@farmfe/core": "^1.7.11",
|
|
137
|
-
"@kubb/ast": "5.9.
|
|
137
|
+
"@kubb/ast": "5.9.3",
|
|
138
138
|
"@nuxt/kit": "^4.6.1",
|
|
139
139
|
"@nuxt/schema": "^4.6.1",
|
|
140
140
|
"@rspack/core": "^2.2.8",
|