unplugin-kubb 4.0.2 → 5.0.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/astro.cjs +6 -6
- package/dist/astro.cjs.map +1 -1
- package/dist/astro.d.ts +4 -10
- package/dist/astro.js +6 -7
- package/dist/astro.js.map +1 -1
- package/dist/{chunk-CIm-hhu7.js → chunk-DKWOrOAv.js} +1 -1
- package/dist/esbuild.cjs +3 -2
- package/dist/esbuild.cjs.map +1 -1
- package/dist/esbuild.d.ts +5 -6
- package/dist/esbuild.js +1 -1
- package/dist/esbuild.js.map +1 -1
- package/dist/farm.cjs +10 -0
- package/dist/farm.cjs.map +1 -0
- package/dist/farm.d.ts +8 -0
- package/dist/farm.js +9 -0
- package/dist/farm.js.map +1 -0
- package/dist/index.cjs +12 -5
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -0
- package/dist/nuxt.cjs +5 -5
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.ts +2 -2
- package/dist/nuxt.js +3 -3
- package/dist/nuxt.js.map +1 -1
- package/dist/package-ClLHpgT2.js +6 -0
- package/dist/package-ClLHpgT2.js.map +1 -0
- package/dist/package-uutExRPO.cjs +55 -0
- package/dist/package-uutExRPO.cjs.map +1 -0
- package/dist/rolldown.cjs +10 -0
- package/dist/rolldown.cjs.map +1 -0
- package/dist/rolldown.d.ts +8 -0
- package/dist/rolldown.js +9 -0
- package/dist/rolldown.js.map +1 -0
- package/dist/rollup.cjs +3 -2
- package/dist/rollup.cjs.map +1 -1
- package/dist/rollup.d.ts +5 -6
- package/dist/rollup.js +1 -1
- package/dist/rollup.js.map +1 -1
- package/dist/rspack.cjs +3 -2
- package/dist/rspack.cjs.map +1 -1
- package/dist/rspack.d.ts +3 -4
- package/dist/rspack.js +1 -1
- package/dist/rspack.js.map +1 -1
- package/dist/types.d.ts +13 -2
- package/dist/unpluginFactory.cjs +90 -0
- package/dist/unpluginFactory.cjs.map +1 -0
- package/dist/unpluginFactory.d.ts +9 -0
- package/dist/{src-CiUcBKSs.js → unpluginFactory.js} +14 -20
- package/dist/unpluginFactory.js.map +1 -0
- package/dist/vite.cjs +3 -2
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.ts +5 -6
- package/dist/vite.js +1 -1
- package/dist/vite.js.map +1 -1
- package/dist/webpack.cjs +3 -2
- package/dist/webpack.cjs.map +1 -1
- package/dist/webpack.d.ts +4 -5
- package/dist/webpack.js +1 -1
- package/dist/webpack.js.map +1 -1
- package/package.json +66 -41
- package/src/astro.ts +4 -5
- package/src/esbuild.ts +1 -1
- package/src/farm.ts +5 -0
- package/src/index.ts +6 -133
- package/src/nuxt.ts +2 -2
- package/src/rolldown.ts +5 -0
- package/src/rollup.ts +1 -1
- package/src/rspack.ts +1 -1
- package/src/unpluginFactory.ts +132 -0
- package/src/vite.ts +1 -1
- package/src/webpack.ts +1 -2
- package/dist/astro.d.cts +0 -11
- package/dist/esbuild.d.cts +0 -7
- package/dist/index.d.cts +0 -10
- package/dist/nuxt.d.cts +0 -9
- package/dist/rollup.d.cts +0 -7
- package/dist/rspack.d.cts +0 -6
- package/dist/src-BiN2tznZ.cjs +0 -155
- package/dist/src-BiN2tznZ.cjs.map +0 -1
- package/dist/src-CiUcBKSs.js.map +0 -1
- package/dist/types-C-ZTDGdJ.d.cts +0 -650
- package/dist/types-CUVJ-CBJ.d.ts +0 -649
- package/dist/types.d.cts +0 -2
- package/dist/vite.d.cts +0 -7
- package/dist/webpack.d.cts +0 -8
package/dist/astro.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_vite = require('./vite.cjs');
|
|
2
3
|
|
|
3
4
|
//#region src/astro.ts
|
|
4
|
-
var astro_default = (options) => ({
|
|
5
|
-
name: "unplugin-
|
|
5
|
+
var astro_default = /* @__PURE__ */ require_package.__name((options) => ({
|
|
6
|
+
name: "unplugin-kubb",
|
|
6
7
|
hooks: { "astro:config:setup": async (astro) => {
|
|
7
8
|
astro.config.vite.plugins ||= [];
|
|
8
|
-
astro.config.vite.plugins.push(
|
|
9
|
+
astro.config.vite.plugins.push(require_vite(options));
|
|
9
10
|
} }
|
|
10
|
-
});
|
|
11
|
-
require_src.__name(astro_default, "default");
|
|
11
|
+
}), "default");
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
module.exports = astro_default;
|
package/dist/astro.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro.cjs","names":["
|
|
1
|
+
{"version":3,"file":"astro.cjs","names":["vitePlugin"],"sources":["../src/astro.ts"],"sourcesContent":["import type { Options } from './types.ts'\nimport vitePlugin from './vite.ts'\n\nexport default (options: Options): any => ({\n name: 'unplugin-kubb',\n hooks: {\n 'astro:config:setup': async (astro: any) => {\n astro.config.vite.plugins ||= []\n astro.config.vite.plugins.push(vitePlugin(options))\n },\n },\n})\n"],"mappings":";;;;AAGA,4DAAgB,aAA2B;CACzC,MAAM;CACN,OAAO,EACL,sBAAsB,OAAO,UAAe;AAC1C,QAAM,OAAO,KAAK,YAAY,EAAE;AAChC,QAAM,OAAO,KAAK,QAAQ,KAAKA,aAAW,QAAQ,CAAC;IAEtD;CACF"}
|
package/dist/astro.d.ts
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/astro.d.ts
|
|
5
|
-
declare const _default: (options: Options) =>
|
|
6
|
-
|
|
7
|
-
hooks: {
|
|
8
|
-
'astro:config:setup': (astro: any) => Promise<void>;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { _default as default };
|
|
5
|
+
declare const _default: (options: Options) => any;
|
|
6
|
+
export = _default;
|
|
13
7
|
//# sourceMappingURL=astro.d.ts.map
|
package/dist/astro.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import
|
|
1
|
+
import { t as __name } from "./chunk-DKWOrOAv.js";
|
|
2
|
+
import vite_default from "./vite.js";
|
|
3
3
|
|
|
4
4
|
//#region src/astro.ts
|
|
5
|
-
var astro_default = (options) => ({
|
|
6
|
-
name: "unplugin-
|
|
5
|
+
var astro_default = /* @__PURE__ */ __name((options) => ({
|
|
6
|
+
name: "unplugin-kubb",
|
|
7
7
|
hooks: { "astro:config:setup": async (astro) => {
|
|
8
8
|
astro.config.vite.plugins ||= [];
|
|
9
|
-
astro.config.vite.plugins.push(
|
|
9
|
+
astro.config.vite.plugins.push(vite_default(options));
|
|
10
10
|
} }
|
|
11
|
-
});
|
|
12
|
-
__name(astro_default, "default");
|
|
11
|
+
}), "default");
|
|
13
12
|
|
|
14
13
|
//#endregion
|
|
15
14
|
export { astro_default as default };
|
package/dist/astro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"astro.js","names":["
|
|
1
|
+
{"version":3,"file":"astro.js","names":["vitePlugin"],"sources":["../src/astro.ts"],"sourcesContent":["import type { Options } from './types.ts'\nimport vitePlugin from './vite.ts'\n\nexport default (options: Options): any => ({\n name: 'unplugin-kubb',\n hooks: {\n 'astro:config:setup': async (astro: any) => {\n astro.config.vite.plugins ||= []\n astro.config.vite.plugins.push(vitePlugin(options))\n },\n },\n})\n"],"mappings":";;;;AAGA,4CAAgB,aAA2B;CACzC,MAAM;CACN,OAAO,EACL,sBAAsB,OAAO,UAAe;AAC1C,QAAM,OAAO,KAAK,YAAY,EAAE;AAChC,QAAM,OAAO,KAAK,QAAQ,KAAKA,aAAW,QAAQ,CAAC;IAEtD;CACF"}
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
2
3
|
let unplugin = require("unplugin");
|
|
3
4
|
|
|
4
5
|
//#region src/esbuild.ts
|
|
5
|
-
var esbuild_default = (0, unplugin.createEsbuildPlugin)(
|
|
6
|
+
var esbuild_default = (0, unplugin.createEsbuildPlugin)(require_unpluginFactory.unpluginFactory);
|
|
6
7
|
|
|
7
8
|
//#endregion
|
|
8
9
|
module.exports = esbuild_default;
|
package/dist/esbuild.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild.cjs","names":["unpluginFactory"],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"esbuild.cjs","names":["unpluginFactory"],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createEsbuildPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,wDAAmCA,wCAAgB"}
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
|
+
import * as esbuild from "esbuild";
|
|
4
4
|
|
|
5
5
|
//#region src/esbuild.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) =>
|
|
7
|
-
|
|
8
|
-
export { _default as default };
|
|
6
|
+
declare const _default: (options?: Options | undefined) => esbuild.Plugin;
|
|
7
|
+
export = _default;
|
|
9
8
|
//# sourceMappingURL=esbuild.d.ts.map
|
package/dist/esbuild.js
CHANGED
package/dist/esbuild.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"esbuild.js","names":[],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"esbuild.js","names":[],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createEsbuildPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,sBAAe,oBAAoB,gBAAgB"}
|
package/dist/farm.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
3
|
+
let unplugin = require("unplugin");
|
|
4
|
+
|
|
5
|
+
//#region src/farm.ts
|
|
6
|
+
var farm_default = (0, unplugin.createFarmPlugin)(require_unpluginFactory.unpluginFactory);
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
module.exports = farm_default;
|
|
10
|
+
//# sourceMappingURL=farm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farm.cjs","names":["unpluginFactory"],"sources":["../src/farm.ts"],"sourcesContent":["import { createFarmPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createFarmPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,kDAAgCA,wCAAgB"}
|
package/dist/farm.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
|
+
import * as _farmfe_core0 from "@farmfe/core";
|
|
4
|
+
|
|
5
|
+
//#region src/farm.d.ts
|
|
6
|
+
declare const _default: (options?: Options | undefined) => _farmfe_core0.JsPlugin;
|
|
7
|
+
export = _default;
|
|
8
|
+
//# sourceMappingURL=farm.d.ts.map
|
package/dist/farm.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { unpluginFactory } from "./unpluginFactory.js";
|
|
2
|
+
import { createFarmPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/farm.ts
|
|
5
|
+
var farm_default = createFarmPlugin(unpluginFactory);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { farm_default as default };
|
|
9
|
+
//# sourceMappingURL=farm.js.map
|
package/dist/farm.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farm.js","names":[],"sources":["../src/farm.ts"],"sourcesContent":["import { createFarmPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createFarmPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,mBAAe,iBAAiB,gBAAgB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
const
|
|
1
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
3
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
4
|
+
let unplugin = require("unplugin");
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
//#region src/index.ts
|
|
7
|
+
const plugin = /* @__PURE__ */ (0, unplugin.createUnplugin)(require_unpluginFactory.unpluginFactory);
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.default = plugin;
|
|
11
|
+
exports.unplugin = plugin;
|
|
12
|
+
exports.unpluginFactory = require_unpluginFactory.unpluginFactory;
|
|
13
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["unpluginFactory"],"sources":["../src/index.ts"],"sourcesContent":["import { createUnplugin } from 'unplugin'\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport type { Options } from './types.ts'\nexport { unpluginFactory } from './unpluginFactory.ts'\n\nconst plugin = /* #__PURE__ */ createUnplugin(unpluginFactory)\n\nexport { plugin as unplugin }\nexport { plugin as default }\n"],"mappings":";;;;;;AAMA,MAAM,SAAyB,6CAAeA,wCAAgB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
|
+
import { unpluginFactory } from "./unpluginFactory.js";
|
|
4
|
+
import * as unplugin from "unplugin";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
7
|
-
declare const
|
|
8
|
-
declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
7
|
+
declare const plugin: unplugin.UnpluginInstance<Options | undefined, boolean>;
|
|
9
8
|
//#endregion
|
|
10
|
-
export {
|
|
9
|
+
export { type Options, plugin as default, plugin as unplugin, unpluginFactory };
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { unpluginFactory } from "./unpluginFactory.js";
|
|
2
|
+
import { createUnplugin } from "unplugin";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const plugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { plugin as default, plugin as unplugin, unpluginFactory };
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { createUnplugin } from 'unplugin'\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport type { Options } from './types.ts'\nexport { unpluginFactory } from './unpluginFactory.ts'\n\nconst plugin = /* #__PURE__ */ createUnplugin(unpluginFactory)\n\nexport { plugin as unplugin }\nexport { plugin as default }\n"],"mappings":";;;;AAMA,MAAM,SAAyB,+BAAe,gBAAgB"}
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
2
|
const require_vite = require('./vite.cjs');
|
|
3
3
|
const require_webpack = require('./webpack.cjs');
|
|
4
4
|
let _nuxt_kit = require("@nuxt/kit");
|
|
@@ -7,13 +7,13 @@ require("@nuxt/schema");
|
|
|
7
7
|
//#region src/nuxt.ts
|
|
8
8
|
var nuxt_default = (0, _nuxt_kit.defineNuxtModule)({
|
|
9
9
|
meta: {
|
|
10
|
-
name: "nuxt-unplugin-
|
|
11
|
-
configKey: "
|
|
10
|
+
name: "nuxt-unplugin-kubb",
|
|
11
|
+
configKey: "unpluginKubb"
|
|
12
12
|
},
|
|
13
13
|
defaults: void 0,
|
|
14
14
|
setup(options, _nuxt) {
|
|
15
|
-
(0, _nuxt_kit.addVitePlugin)(() => require_vite
|
|
16
|
-
(0, _nuxt_kit.addWebpackPlugin)(() => require_webpack
|
|
15
|
+
(0, _nuxt_kit.addVitePlugin)(() => require_vite(options));
|
|
16
|
+
(0, _nuxt_kit.addWebpackPlugin)(() => require_webpack(options));
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
package/dist/nuxt.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nuxt.cjs","names":["vite","webpack"],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from '@nuxt/kit'\nimport '@nuxt/schema'\n\nimport type { Options } from './types.ts'\nimport vite from './vite.ts'\nimport webpack from './webpack.ts'\n\nexport interface ModuleOptions extends Options {}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: 'nuxt-unplugin-
|
|
1
|
+
{"version":3,"file":"nuxt.cjs","names":["vite","webpack"],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from '@nuxt/kit'\nimport '@nuxt/schema'\n\nimport type { Options } from './types.ts'\nimport vite from './vite.ts'\nimport webpack from './webpack.ts'\n\nexport interface ModuleOptions extends Options {}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: 'nuxt-unplugin-kubb',\n configKey: 'unpluginKubb',\n },\n defaults: undefined,\n setup(options, _nuxt) {\n addVitePlugin(() => vite(options))\n addWebpackPlugin(() => webpack(options))\n\n // ...\n },\n})\n"],"mappings":";;;;;;;AASA,mDAA+C;CAC7C,MAAM;EACJ,MAAM;EACN,WAAW;EACZ;CACD,UAAU;CACV,MAAM,SAAS,OAAO;AACpB,qCAAoBA,aAAK,QAAQ,CAAC;AAClC,wCAAuBC,gBAAQ,QAAQ,CAAC;;CAI3C,CAAC"}
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
3
|
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
4
|
|
|
5
5
|
//#region src/nuxt.d.ts
|
package/dist/nuxt.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
1
|
+
import { t as __name } from "./chunk-DKWOrOAv.js";
|
|
2
2
|
import vite_default from "./vite.js";
|
|
3
3
|
import webpack_default from "./webpack.js";
|
|
4
4
|
import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from "@nuxt/kit";
|
|
@@ -7,8 +7,8 @@ import "@nuxt/schema";
|
|
|
7
7
|
//#region src/nuxt.ts
|
|
8
8
|
var nuxt_default = defineNuxtModule({
|
|
9
9
|
meta: {
|
|
10
|
-
name: "nuxt-unplugin-
|
|
11
|
-
configKey: "
|
|
10
|
+
name: "nuxt-unplugin-kubb",
|
|
11
|
+
configKey: "unpluginKubb"
|
|
12
12
|
},
|
|
13
13
|
defaults: void 0,
|
|
14
14
|
setup(options, _nuxt) {
|
package/dist/nuxt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nuxt.js","names":["vite","webpack"],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from '@nuxt/kit'\nimport '@nuxt/schema'\n\nimport type { Options } from './types.ts'\nimport vite from './vite.ts'\nimport webpack from './webpack.ts'\n\nexport interface ModuleOptions extends Options {}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: 'nuxt-unplugin-
|
|
1
|
+
{"version":3,"file":"nuxt.js","names":["vite","webpack"],"sources":["../src/nuxt.ts"],"sourcesContent":["import { addVitePlugin, addWebpackPlugin, defineNuxtModule } from '@nuxt/kit'\nimport '@nuxt/schema'\n\nimport type { Options } from './types.ts'\nimport vite from './vite.ts'\nimport webpack from './webpack.ts'\n\nexport interface ModuleOptions extends Options {}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: 'nuxt-unplugin-kubb',\n configKey: 'unpluginKubb',\n },\n defaults: undefined,\n setup(options, _nuxt) {\n addVitePlugin(() => vite(options))\n addWebpackPlugin(() => webpack(options))\n\n // ...\n },\n})\n"],"mappings":";;;;;;;AASA,mBAAe,iBAAgC;CAC7C,MAAM;EACJ,MAAM;EACN,WAAW;EACZ;CACD,UAAU;CACV,MAAM,SAAS,OAAO;AACpB,sBAAoBA,aAAK,QAAQ,CAAC;AAClC,yBAAuBC,gBAAQ,QAAQ,CAAC;;CAI3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-ClLHpgT2.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
5
|
+
value,
|
|
6
|
+
configurable: true
|
|
7
|
+
});
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
17
|
+
__defProp(to, key, {
|
|
18
|
+
get: ((k) => from[k]).bind(null, key),
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
value: mod,
|
|
28
|
+
enumerable: true
|
|
29
|
+
}) : target, mod));
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
|
|
33
|
+
//#region package.json
|
|
34
|
+
var version = "5.0.0";
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
Object.defineProperty(exports, '__name', {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return __name;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, '__toESM', {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return __toESM;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, 'version', {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return version;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=package-uutExRPO.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-uutExRPO.cjs","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
3
|
+
let unplugin = require("unplugin");
|
|
4
|
+
|
|
5
|
+
//#region src/rolldown.ts
|
|
6
|
+
var rolldown_default = (0, unplugin.createRolldownPlugin)(require_unpluginFactory.unpluginFactory);
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
module.exports = rolldown_default;
|
|
10
|
+
//# sourceMappingURL=rolldown.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolldown.cjs","names":["unpluginFactory"],"sources":["../src/rolldown.ts"],"sourcesContent":["import { createRolldownPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRolldownPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,0DAAoCA,wCAAgB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
|
+
import * as rolldown from "rolldown";
|
|
4
|
+
|
|
5
|
+
//#region src/rolldown.d.ts
|
|
6
|
+
declare const _default: (options?: Options | undefined) => rolldown.Plugin<any> | rolldown.Plugin<any>[];
|
|
7
|
+
export = _default;
|
|
8
|
+
//# sourceMappingURL=rolldown.d.ts.map
|
package/dist/rolldown.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { unpluginFactory } from "./unpluginFactory.js";
|
|
2
|
+
import { createRolldownPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/rolldown.ts
|
|
5
|
+
var rolldown_default = createRolldownPlugin(unpluginFactory);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { rolldown_default as default };
|
|
9
|
+
//# sourceMappingURL=rolldown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolldown.js","names":[],"sources":["../src/rolldown.ts"],"sourcesContent":["import { createRolldownPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRolldownPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,uBAAe,qBAAqB,gBAAgB"}
|
package/dist/rollup.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
2
3
|
let unplugin = require("unplugin");
|
|
3
4
|
|
|
4
5
|
//#region src/rollup.ts
|
|
5
|
-
var rollup_default = (0, unplugin.createRollupPlugin)(
|
|
6
|
+
var rollup_default = (0, unplugin.createRollupPlugin)(require_unpluginFactory.unpluginFactory);
|
|
6
7
|
|
|
7
8
|
//#endregion
|
|
8
9
|
module.exports = rollup_default;
|
package/dist/rollup.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.cjs","names":["unpluginFactory"],"sources":["../src/rollup.ts"],"sourcesContent":["import { createRollupPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"rollup.cjs","names":["unpluginFactory"],"sources":["../src/rollup.ts"],"sourcesContent":["import { createRollupPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRollupPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,sDAAkCA,wCAAgB"}
|
package/dist/rollup.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
|
+
import * as rollup from "rollup";
|
|
4
4
|
|
|
5
5
|
//#region src/rollup.d.ts
|
|
6
|
-
declare const _default: (options?: Options | undefined) =>
|
|
7
|
-
|
|
8
|
-
export { _default as default };
|
|
6
|
+
declare const _default: (options?: Options | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
|
|
7
|
+
export = _default;
|
|
9
8
|
//# sourceMappingURL=rollup.d.ts.map
|
package/dist/rollup.js
CHANGED
package/dist/rollup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.js","names":[],"sources":["../src/rollup.ts"],"sourcesContent":["import { createRollupPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"rollup.js","names":[],"sources":["../src/rollup.ts"],"sourcesContent":["import { createRollupPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRollupPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,qBAAe,mBAAmB,gBAAgB"}
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
2
|
+
const require_unpluginFactory = require('./unpluginFactory.cjs');
|
|
2
3
|
let unplugin = require("unplugin");
|
|
3
4
|
|
|
4
5
|
//#region src/rspack.ts
|
|
5
|
-
var rspack_default = (0, unplugin.createRspackPlugin)(
|
|
6
|
+
var rspack_default = (0, unplugin.createRspackPlugin)(require_unpluginFactory.unpluginFactory);
|
|
6
7
|
|
|
7
8
|
//#endregion
|
|
8
9
|
module.exports = rspack_default;
|
package/dist/rspack.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspack.cjs","names":["unpluginFactory"],"sources":["../src/rspack.ts"],"sourcesContent":["import { createRspackPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"rspack.cjs","names":["unpluginFactory"],"sources":["../src/rspack.ts"],"sourcesContent":["import { createRspackPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRspackPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,sDAAkCA,wCAAgB"}
|
package/dist/rspack.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as __name } from "./chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { Options } from "./types.js";
|
|
3
3
|
|
|
4
4
|
//#region src/rspack.d.ts
|
|
5
5
|
declare const _default: (options?: Options | undefined) => RspackPluginInstance;
|
|
6
|
-
|
|
7
|
-
export { _default as default };
|
|
6
|
+
export = _default;
|
|
8
7
|
//# sourceMappingURL=rspack.d.ts.map
|
package/dist/rspack.js
CHANGED
package/dist/rspack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rspack.js","names":[],"sources":["../src/rspack.ts"],"sourcesContent":["import { createRspackPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './
|
|
1
|
+
{"version":3,"file":"rspack.js","names":[],"sources":["../src/rspack.ts"],"sourcesContent":["import { createRspackPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './unpluginFactory.ts'\n\nexport default createRspackPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,qBAAe,mBAAmB,gBAAgB"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
|
|
1
|
+
import { t as __name } from "./chunk-cy2TeOE5.cjs";
|
|
2
|
+
import { UserConfig } from "@kubb/core";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type Options = {
|
|
6
|
+
/**
|
|
7
|
+
* Kubb config without the Hooks.
|
|
8
|
+
*/
|
|
9
|
+
config?: Omit<UserConfig, 'hooks'>;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Options };
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_package = require('./package-uutExRPO.cjs');
|
|
3
|
+
let node_process = require("node:process");
|
|
4
|
+
node_process = require_package.__toESM(node_process);
|
|
5
|
+
let _kubb_core = require("@kubb/core");
|
|
6
|
+
let _kubb_core_utils = require("@kubb/core/utils");
|
|
7
|
+
|
|
8
|
+
//#region src/unpluginFactory.ts
|
|
9
|
+
const unpluginFactory = (options, meta) => {
|
|
10
|
+
const name = "unplugin-kubb";
|
|
11
|
+
const events = new _kubb_core_utils.AsyncEventEmitter();
|
|
12
|
+
const isVite = meta.framework === "vite";
|
|
13
|
+
const hrStart = node_process.default.hrtime();
|
|
14
|
+
async function runBuild(ctx) {
|
|
15
|
+
if (!options?.config) {
|
|
16
|
+
if (ctx.error) ctx.error?.(`[${name}] Config is not set`);
|
|
17
|
+
else console.error(`[${name}] Config is not set`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
events.on("lifecycle:start", (version) => {
|
|
21
|
+
console.log(`Kubb Unplugin ${version} 🧩`);
|
|
22
|
+
});
|
|
23
|
+
events.on("error", (error) => {
|
|
24
|
+
console.error(`✗ ${error?.message || "failed"}`);
|
|
25
|
+
});
|
|
26
|
+
events.on("warn", (message) => {
|
|
27
|
+
console.warn(`⚠ ${message}`);
|
|
28
|
+
});
|
|
29
|
+
events.on("info", (message) => {
|
|
30
|
+
console.info(`ℹ ${message}`);
|
|
31
|
+
});
|
|
32
|
+
events.on("success", (message) => {
|
|
33
|
+
console.log(`✓ ${message}`);
|
|
34
|
+
});
|
|
35
|
+
events.on("plugin:end", (plugin, { duration }) => {
|
|
36
|
+
const durationStr = duration >= 1e3 ? `${(duration / 1e3).toFixed(2)}s` : `${duration}ms`;
|
|
37
|
+
console.log(`✓ ${plugin.name} completed in ${durationStr}`);
|
|
38
|
+
});
|
|
39
|
+
events.on("files:processing:end", () => {
|
|
40
|
+
console.log("✓ Files written successfully");
|
|
41
|
+
});
|
|
42
|
+
events.on("generation:end", (config) => {
|
|
43
|
+
console.log(config.name ? `✓ Generation completed for ${config.name}` : "✓ Generation completed");
|
|
44
|
+
});
|
|
45
|
+
events.on("generation:summary", (config, { status, failedPlugins }) => {
|
|
46
|
+
const pluginsCount = config.plugins?.length || 0;
|
|
47
|
+
const successCount = pluginsCount - failedPlugins.size;
|
|
48
|
+
console.log(status === "success" ? `Kubb Summary: ✓ ${`${successCount} successful`}, ${pluginsCount} total` : `Kubb Summary: ✓ ${`${successCount} successful`}, ✗ ${`${failedPlugins.size} failed`}, ${pluginsCount} total`);
|
|
49
|
+
});
|
|
50
|
+
await events.emit("lifecycle:start", require_package.version);
|
|
51
|
+
const { root: _root, ...userConfig } = options.config;
|
|
52
|
+
await events.emit("generation:start", options.config);
|
|
53
|
+
const { error, failedPlugins, pluginTimings, files, sources } = await (0, _kubb_core.safeBuild)({
|
|
54
|
+
config: {
|
|
55
|
+
root: node_process.default.cwd(),
|
|
56
|
+
...userConfig,
|
|
57
|
+
output: {
|
|
58
|
+
write: true,
|
|
59
|
+
...userConfig.output
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
events
|
|
63
|
+
});
|
|
64
|
+
if (failedPlugins.size > 0 || error) [error, ...Array.from(failedPlugins).filter((it) => it.error).map((it) => it.error)].filter(Boolean).forEach((err) => {
|
|
65
|
+
events.emit("error", err);
|
|
66
|
+
});
|
|
67
|
+
await events.emit("generation:end", options.config, files, sources);
|
|
68
|
+
await events.emit("generation:summary", options.config, {
|
|
69
|
+
failedPlugins,
|
|
70
|
+
filesCreated: files.length,
|
|
71
|
+
status: failedPlugins.size > 0 || error ? "failed" : "success",
|
|
72
|
+
hrStart,
|
|
73
|
+
pluginTimings
|
|
74
|
+
});
|
|
75
|
+
await events.emit("lifecycle:end");
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
name,
|
|
79
|
+
enforce: "pre",
|
|
80
|
+
apply: isVite ? "build" : void 0,
|
|
81
|
+
async buildStart() {
|
|
82
|
+
await runBuild(this);
|
|
83
|
+
},
|
|
84
|
+
vite: {}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.unpluginFactory = unpluginFactory;
|
|
90
|
+
//# sourceMappingURL=unpluginFactory.cjs.map
|