unplugin-kubb 2.0.3 → 3.1.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/LICENSE +1 -1
- package/README.md +18 -16
- package/dist/astro.cjs +11 -87
- package/dist/astro.cjs.map +1 -0
- package/dist/astro.d.cts +8 -8
- package/dist/astro.d.ts +8 -7
- package/dist/astro.js +11 -14
- package/dist/astro.js.map +1 -0
- package/dist/chunk-BybIe9x4.js +28 -0
- package/dist/esbuild.cjs +8 -79
- package/dist/esbuild.cjs.map +1 -0
- package/dist/esbuild.d.cts +6 -6
- package/dist/esbuild.d.ts +6 -5
- package/dist/esbuild.js +7 -8
- package/dist/esbuild.js.map +1 -0
- package/dist/index.cjs +5 -83
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +3 -10
- package/dist/nuxt.cjs +20 -99
- package/dist/nuxt.cjs.map +1 -0
- package/dist/nuxt.d.cts +8 -8
- package/dist/nuxt.d.ts +8 -8
- package/dist/nuxt.js +18 -21
- package/dist/nuxt.js.map +1 -0
- package/dist/rollup.cjs +8 -79
- package/dist/rollup.cjs.map +1 -0
- package/dist/rollup.d.cts +6 -6
- package/dist/rollup.d.ts +6 -5
- package/dist/rollup.js +7 -8
- package/dist/rollup.js.map +1 -0
- package/dist/rspack.cjs +8 -79
- package/dist/rspack.cjs.map +1 -0
- package/dist/rspack.d.cts +4 -4
- package/dist/rspack.d.ts +4 -3
- package/dist/rspack.js +7 -8
- package/dist/rspack.js.map +1 -0
- package/dist/src-Dn-CzqNK.js +50 -0
- package/dist/src-Dn-CzqNK.js.map +1 -0
- package/dist/src-INEri0Ub.cjs +99 -0
- package/dist/src-INEri0Ub.cjs.map +1 -0
- package/dist/types-BbLZctbn.d.ts +606 -0
- package/dist/types-F_pPB4iq.d.cts +606 -0
- package/dist/types.cjs +0 -18
- package/dist/types.d.cts +2 -10
- package/dist/types.d.ts +2 -10
- package/dist/types.js +1 -0
- package/dist/vite-CEW_QLtL.js +9 -0
- package/dist/vite-CEW_QLtL.js.map +1 -0
- package/dist/vite-Df2FT-jf.cjs +15 -0
- package/dist/vite-Df2FT-jf.cjs.map +1 -0
- package/dist/vite.cjs +3 -80
- package/dist/vite.d.cts +6 -6
- package/dist/vite.d.ts +6 -5
- package/dist/vite.js +4 -7
- package/dist/webpack-D2VoiCsm.cjs +15 -0
- package/dist/webpack-D2VoiCsm.cjs.map +1 -0
- package/dist/webpack-gtaz7qKH.js +9 -0
- package/dist/webpack-gtaz7qKH.js.map +1 -0
- package/dist/webpack.cjs +3 -80
- package/dist/webpack.d.cts +6 -6
- package/dist/webpack.d.ts +6 -5
- package/dist/webpack.js +4 -7
- package/package.json +42 -55
- package/dist/chunk-4WNCII7J.js +0 -11
- package/dist/chunk-6YF7O2R7.js +0 -59
- package/dist/chunk-EJWH3EPL.js +0 -11
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
+
<h1>Kubb Unplugin</h1>
|
|
3
|
+
<a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
|
|
4
|
+
<img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
|
|
5
|
+
</a>
|
|
2
6
|
|
|
3
|
-
<!-- <img src="assets/logo.png" alt="logo" width="200" height="auto" /> -->
|
|
4
|
-
<h1>unplugin-kubb</h1>
|
|
5
|
-
|
|
6
|
-
<p>
|
|
7
|
-
Kubb plugin for Vite, webpack, esbuild, Rollup, Nuxt, Astro and Rspack.
|
|
8
|
-
</p>
|
|
9
|
-
<img src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/banner.png" alt="logo" height="auto" />
|
|
10
7
|
|
|
11
8
|
[![npm version][npm-version-src]][npm-version-href]
|
|
12
9
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
13
10
|
[![Coverage][coverage-src]][coverage-href]
|
|
14
11
|
[![License][license-src]][license-href]
|
|
15
|
-
|
|
12
|
+
[![Sponsors][sponsors-src]][sponsors-href]
|
|
16
13
|
<h4>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
<a href="https://codesandbox.io/s/github/kubb-labs/kubb/tree/main//examples/typescript" target="_blank">View Demo</a>
|
|
15
|
+
<span> · </span>
|
|
16
|
+
<a href="https://kubb.dev/" target="_blank">Documentation</a>
|
|
17
|
+
<span> · </span>
|
|
18
|
+
<a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
|
|
19
|
+
<span> · </span>
|
|
20
|
+
<a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
|
|
21
|
+
</h4>
|
|
25
22
|
</div>
|
|
26
23
|
|
|
24
|
+
Kubb plugin for Vite, webpack, esbuild, Rollup, Nuxt, Astro and Rspack.
|
|
25
|
+
|
|
26
|
+
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
29
|
```bash
|
|
@@ -127,3 +127,5 @@ Kubb uses an MIT-licensed open source project with its ongoing development made
|
|
|
127
127
|
[minified-href]: https://www.npmjs.com/package/unplugin-kubb
|
|
128
128
|
[coverage-src]: https://img.shields.io/codecov/c/github/kubb-labs/kubb?style=flat&colorA=18181B&colorB=f58517
|
|
129
129
|
[coverage-href]: https://www.npmjs.com/package/unplugin-kubb
|
|
130
|
+
[sponsors-src]: https://img.shields.io/github/sponsors/stijnvanhulle?style=flat&colorA=18181B&colorB=f58517
|
|
131
|
+
[sponsors-href]: https://github.com/sponsors/stijnvanhulle/
|
package/dist/astro.cjs
CHANGED
|
@@ -1,90 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
const require_src = require('./src-INEri0Ub.cjs');
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
var astro_exports = {};
|
|
22
|
-
__export(astro_exports, {
|
|
23
|
-
default: () => astro_default
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(astro_exports);
|
|
26
|
-
|
|
27
|
-
// src/index.ts
|
|
28
|
-
var import_core = require("@kubb/core");
|
|
29
|
-
var import_logger = require("@kubb/core/logger");
|
|
30
|
-
var import_unplugin = require("unplugin");
|
|
31
|
-
var unpluginFactory = (options) => {
|
|
32
|
-
const name = "unplugin-kubb";
|
|
33
|
-
const logger = (0, import_logger.createLogger)({
|
|
34
|
-
name
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
name,
|
|
38
|
-
enforce: "pre",
|
|
39
|
-
vite: {
|
|
40
|
-
configResolved(config) {
|
|
41
|
-
logger.on("start", (message) => {
|
|
42
|
-
config.logger.info(`${name}: ${message}`);
|
|
43
|
-
});
|
|
44
|
-
logger.on("success", (message) => {
|
|
45
|
-
config.logger.info(`${name}: ${message}`);
|
|
46
|
-
});
|
|
47
|
-
logger.on("warning", (message) => {
|
|
48
|
-
config.logger.info(`${name}: ${message}`);
|
|
49
|
-
});
|
|
50
|
-
logger.on("error", (message) => {
|
|
51
|
-
config.logger.info(`${name}: ${message}`);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
async buildStart() {
|
|
56
|
-
if (!options?.config) {
|
|
57
|
-
throw new Error("Config is not set");
|
|
58
|
-
}
|
|
59
|
-
const { root: _root, ...userConfig } = options.config;
|
|
60
|
-
logger.emit("start", "Building");
|
|
61
|
-
const { error } = await (0, import_core.safeBuild)({
|
|
62
|
-
config: {
|
|
63
|
-
root: process.cwd(),
|
|
64
|
-
...userConfig,
|
|
65
|
-
output: {
|
|
66
|
-
write: true,
|
|
67
|
-
...userConfig.output
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
logger
|
|
71
|
-
});
|
|
72
|
-
if (error) {
|
|
73
|
-
throw error;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
var unplugin = /* @__PURE__ */ (0, import_unplugin.createUnplugin)(unpluginFactory);
|
|
79
|
-
var index_default = unplugin;
|
|
80
|
-
|
|
81
|
-
// src/astro.ts
|
|
3
|
+
//#region src/astro.ts
|
|
82
4
|
var astro_default = (options) => ({
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}
|
|
5
|
+
name: "unplugin-starter",
|
|
6
|
+
hooks: { "astro:config:setup": async (astro) => {
|
|
7
|
+
astro.config.vite.plugins ||= [];
|
|
8
|
+
astro.config.vite.plugins.push(require_src.src_default.vite(options));
|
|
9
|
+
} }
|
|
90
10
|
});
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
module.exports = astro_default;
|
|
14
|
+
//# sourceMappingURL=astro.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro.cjs","names":["unplugin"],"sources":["../src/astro.ts"],"sourcesContent":["import unplugin from './index.ts'\n\nimport type { Options } from './types.ts'\n\nexport default (options: Options) => ({\n name: 'unplugin-starter',\n hooks: {\n 'astro:config:setup': async (astro: any) => {\n astro.config.vite.plugins ||= []\n astro.config.vite.plugins.push(unplugin.vite(options))\n },\n },\n})\n"],"mappings":";;;AAIA,qBAAgB,aAAsB;CACpC,MAAM;CACN,OAAO,EACL,sBAAsB,OAAO,UAAe;AAC1C,QAAM,OAAO,KAAK,YAAY,EAAE;AAChC,QAAM,OAAO,KAAK,QAAQ,KAAKA,wBAAS,KAAK,QAAQ,CAAC;IAEzD;CACF"}
|
package/dist/astro.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
import '@kubb/core';
|
|
1
|
+
import { t as Options } from "./types-F_pPB4iq.cjs";
|
|
3
2
|
|
|
3
|
+
//#region src/astro.d.ts
|
|
4
4
|
declare const _default: (options: Options) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
hooks: {
|
|
7
|
+
'astro:config:setup': (astro: any) => Promise<void>;
|
|
8
|
+
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
export = _default;
|
|
11
|
+
//# sourceMappingURL=astro.d.cts.map
|
package/dist/astro.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
import '@kubb/core';
|
|
1
|
+
import { t as Options } from "./types-BbLZctbn.js";
|
|
3
2
|
|
|
3
|
+
//#region src/astro.d.ts
|
|
4
4
|
declare const _default: (options: Options) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
hooks: {
|
|
7
|
+
'astro:config:setup': (astro: any) => Promise<void>;
|
|
8
|
+
};
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
//#endregion
|
|
11
11
|
export { _default as default };
|
|
12
|
+
//# sourceMappingURL=astro.d.ts.map
|
package/dist/astro.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
index_default
|
|
3
|
-
} from "./chunk-6YF7O2R7.js";
|
|
1
|
+
import { t as src_default } from "./src-Dn-CzqNK.js";
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
//#region src/astro.ts
|
|
6
4
|
var astro_default = (options) => ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
}
|
|
5
|
+
name: "unplugin-starter",
|
|
6
|
+
hooks: { "astro:config:setup": async (astro) => {
|
|
7
|
+
astro.config.vite.plugins ||= [];
|
|
8
|
+
astro.config.vite.plugins.push(src_default.vite(options));
|
|
9
|
+
} }
|
|
14
10
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { astro_default as default };
|
|
14
|
+
//# sourceMappingURL=astro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro.js","names":["unplugin"],"sources":["../src/astro.ts"],"sourcesContent":["import unplugin from './index.ts'\n\nimport type { Options } from './types.ts'\n\nexport default (options: Options) => ({\n name: 'unplugin-starter',\n hooks: {\n 'astro:config:setup': async (astro: any) => {\n astro.config.vite.plugins ||= []\n astro.config.vite.plugins.push(unplugin.vite(options))\n },\n },\n})\n"],"mappings":";;;AAIA,qBAAgB,aAAsB;CACpC,MAAM;CACN,OAAO,EACL,sBAAsB,OAAO,UAAe;AAC1C,QAAM,OAAO,KAAK,YAAY,EAAE;AAChC,QAAM,OAAO,KAAK,QAAQ,KAAKA,YAAS,KAAK,QAAQ,CAAC;IAEzD;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
21
|
+
value: mod,
|
|
22
|
+
enumerable: true
|
|
23
|
+
}) : target, mod));
|
|
24
|
+
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
|
25
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { };
|
package/dist/esbuild.cjs
CHANGED
|
@@ -1,81 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
const require_src = require('./src-INEri0Ub.cjs');
|
|
2
|
+
let unplugin = require("unplugin");
|
|
3
|
+
unplugin = require_src.__toESM(unplugin);
|
|
19
4
|
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
__export(esbuild_exports, {
|
|
23
|
-
default: () => esbuild_default
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(esbuild_exports);
|
|
26
|
-
var import_unplugin2 = require("unplugin");
|
|
5
|
+
//#region src/esbuild.ts
|
|
6
|
+
var esbuild_default = (0, unplugin.createEsbuildPlugin)(require_src.unpluginFactory);
|
|
27
7
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var import_unplugin = require("unplugin");
|
|
32
|
-
var unpluginFactory = (options) => {
|
|
33
|
-
const name = "unplugin-kubb";
|
|
34
|
-
const logger = (0, import_logger.createLogger)({
|
|
35
|
-
name
|
|
36
|
-
});
|
|
37
|
-
return {
|
|
38
|
-
name,
|
|
39
|
-
enforce: "pre",
|
|
40
|
-
vite: {
|
|
41
|
-
configResolved(config) {
|
|
42
|
-
logger.on("start", (message) => {
|
|
43
|
-
config.logger.info(`${name}: ${message}`);
|
|
44
|
-
});
|
|
45
|
-
logger.on("success", (message) => {
|
|
46
|
-
config.logger.info(`${name}: ${message}`);
|
|
47
|
-
});
|
|
48
|
-
logger.on("warning", (message) => {
|
|
49
|
-
config.logger.info(`${name}: ${message}`);
|
|
50
|
-
});
|
|
51
|
-
logger.on("error", (message) => {
|
|
52
|
-
config.logger.info(`${name}: ${message}`);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
async buildStart() {
|
|
57
|
-
if (!options?.config) {
|
|
58
|
-
throw new Error("Config is not set");
|
|
59
|
-
}
|
|
60
|
-
const { root: _root, ...userConfig } = options.config;
|
|
61
|
-
logger.emit("start", "Building");
|
|
62
|
-
const { error } = await (0, import_core.safeBuild)({
|
|
63
|
-
config: {
|
|
64
|
-
root: process.cwd(),
|
|
65
|
-
...userConfig,
|
|
66
|
-
output: {
|
|
67
|
-
write: true,
|
|
68
|
-
...userConfig.output
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
logger
|
|
72
|
-
});
|
|
73
|
-
if (error) {
|
|
74
|
-
throw error;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// src/esbuild.ts
|
|
81
|
-
var esbuild_default = (0, import_unplugin2.createEsbuildPlugin)(unpluginFactory);
|
|
8
|
+
//#endregion
|
|
9
|
+
module.exports = esbuild_default;
|
|
10
|
+
//# sourceMappingURL=esbuild.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esbuild.cjs","names":["unpluginFactory"],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './index.ts'\n\nexport default createEsbuildPlugin(unpluginFactory)\n"],"mappings":";;;;;AAIA,wDAAmCA,4BAAgB"}
|
package/dist/esbuild.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@kubb/core';
|
|
1
|
+
import { t as Options } from "./types-F_pPB4iq.cjs";
|
|
2
|
+
import * as esbuild0 from "esbuild";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
4
|
+
//#region src/esbuild.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
6
|
+
export = _default;
|
|
7
|
+
//# sourceMappingURL=esbuild.d.cts.map
|
package/dist/esbuild.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@kubb/core';
|
|
4
|
-
|
|
5
|
-
declare const _default: (options?: Options | undefined) => esbuild.Plugin;
|
|
1
|
+
import { t as Options } from "./types-BbLZctbn.js";
|
|
2
|
+
import * as esbuild0 from "esbuild";
|
|
6
3
|
|
|
4
|
+
//#region src/esbuild.d.ts
|
|
5
|
+
declare const _default: (options?: Options | undefined) => esbuild0.Plugin;
|
|
6
|
+
//#endregion
|
|
7
7
|
export { _default as default };
|
|
8
|
+
//# sourceMappingURL=esbuild.d.ts.map
|
package/dist/esbuild.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
unpluginFactory
|
|
3
|
-
} from "./chunk-6YF7O2R7.js";
|
|
4
|
-
|
|
5
|
-
// src/esbuild.ts
|
|
1
|
+
import { r as unpluginFactory } from "./src-Dn-CzqNK.js";
|
|
6
2
|
import { createEsbuildPlugin } from "unplugin";
|
|
3
|
+
|
|
4
|
+
//#region src/esbuild.ts
|
|
7
5
|
var esbuild_default = createEsbuildPlugin(unpluginFactory);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { esbuild_default as default };
|
|
9
|
+
//# sourceMappingURL=esbuild.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esbuild.js","names":[],"sources":["../src/esbuild.ts"],"sourcesContent":["import { createEsbuildPlugin } from 'unplugin'\n\nimport { unpluginFactory } from './index.ts'\n\nexport default createEsbuildPlugin(unpluginFactory)\n"],"mappings":";;;;AAIA,sBAAe,oBAAoB,gBAAgB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,84 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
const require_src = require('./src-INEri0Ub.cjs');
|
|
19
3
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
default: () => index_default,
|
|
24
|
-
unplugin: () => unplugin,
|
|
25
|
-
unpluginFactory: () => unpluginFactory
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var import_core = require("@kubb/core");
|
|
29
|
-
var import_logger = require("@kubb/core/logger");
|
|
30
|
-
var import_unplugin = require("unplugin");
|
|
31
|
-
var unpluginFactory = (options) => {
|
|
32
|
-
const name = "unplugin-kubb";
|
|
33
|
-
const logger = (0, import_logger.createLogger)({
|
|
34
|
-
name
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
name,
|
|
38
|
-
enforce: "pre",
|
|
39
|
-
vite: {
|
|
40
|
-
configResolved(config) {
|
|
41
|
-
logger.on("start", (message) => {
|
|
42
|
-
config.logger.info(`${name}: ${message}`);
|
|
43
|
-
});
|
|
44
|
-
logger.on("success", (message) => {
|
|
45
|
-
config.logger.info(`${name}: ${message}`);
|
|
46
|
-
});
|
|
47
|
-
logger.on("warning", (message) => {
|
|
48
|
-
config.logger.info(`${name}: ${message}`);
|
|
49
|
-
});
|
|
50
|
-
logger.on("error", (message) => {
|
|
51
|
-
config.logger.info(`${name}: ${message}`);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
async buildStart() {
|
|
56
|
-
if (!options?.config) {
|
|
57
|
-
throw new Error("Config is not set");
|
|
58
|
-
}
|
|
59
|
-
const { root: _root, ...userConfig } = options.config;
|
|
60
|
-
logger.emit("start", "Building");
|
|
61
|
-
const { error } = await (0, import_core.safeBuild)({
|
|
62
|
-
config: {
|
|
63
|
-
root: process.cwd(),
|
|
64
|
-
...userConfig,
|
|
65
|
-
output: {
|
|
66
|
-
write: true,
|
|
67
|
-
...userConfig.output
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
logger
|
|
71
|
-
});
|
|
72
|
-
if (error) {
|
|
73
|
-
throw error;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
var unplugin = /* @__PURE__ */ (0, import_unplugin.createUnplugin)(unpluginFactory);
|
|
79
|
-
var index_default = unplugin;
|
|
80
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
-
0 && (module.exports = {
|
|
82
|
-
unplugin,
|
|
83
|
-
unpluginFactory
|
|
84
|
-
});
|
|
4
|
+
exports.default = require_src.src_default;
|
|
5
|
+
exports.unplugin = require_src.unplugin;
|
|
6
|
+
exports.unpluginFactory = require_src.unpluginFactory;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import '@kubb/core';
|
|
1
|
+
import { t as Options } from "./types-F_pPB4iq.cjs";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
|
+
import { UnpluginFactory } from "unplugin";
|
|
5
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
6
6
|
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
-
declare const unplugin:
|
|
8
|
-
|
|
7
|
+
declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
+
//#endregion
|
|
9
9
|
export { unplugin as default, unplugin, unpluginFactory };
|
|
10
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import '@kubb/core';
|
|
1
|
+
import { t as Options } from "./types-BbLZctbn.js";
|
|
2
|
+
import * as unplugin0 from "unplugin";
|
|
3
|
+
import { UnpluginFactory } from "unplugin";
|
|
5
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
6
6
|
declare const unpluginFactory: UnpluginFactory<Options | undefined>;
|
|
7
|
-
declare const unplugin:
|
|
8
|
-
|
|
7
|
+
declare const unplugin: unplugin0.UnpluginInstance<Options | undefined, boolean>;
|
|
8
|
+
//#endregion
|
|
9
9
|
export { unplugin as default, unplugin, unpluginFactory };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
unpluginFactory
|
|
5
|
-
} from "./chunk-6YF7O2R7.js";
|
|
6
|
-
export {
|
|
7
|
-
index_default as default,
|
|
8
|
-
unplugin,
|
|
9
|
-
unpluginFactory
|
|
10
|
-
};
|
|
1
|
+
import { n as unplugin, r as unpluginFactory, t as src_default } from "./src-Dn-CzqNK.js";
|
|
2
|
+
|
|
3
|
+
export { src_default as default, unplugin, unpluginFactory };
|