unplugin-kubb 2.0.3 → 3.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/LICENSE +1 -1
- 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/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-DnCwQQFX.js +50 -0
- package/dist/src-DnCwQQFX.js.map +1 -0
- package/dist/src-INEri0Ub.cjs +99 -0
- package/dist/src-INEri0Ub.cjs.map +1 -0
- package/dist/types-BHypkRQJ.d.cts +660 -0
- package/dist/types-CFQIMFRS.d.ts +660 -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-D_U2l8No.js +9 -0
- package/dist/vite-D_U2l8No.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-CQIEgBNc.js +9 -0
- package/dist/webpack-CQIEgBNc.js.map +1 -0
- package/dist/webpack-D2VoiCsm.cjs +15 -0
- package/dist/webpack-D2VoiCsm.cjs.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 +43 -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/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 { Options } from "./types-BHypkRQJ.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 { Options } from "./types-CFQIMFRS.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 { src_default } from "./src-DnCwQQFX.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"}
|
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 { Options } from "./types-BHypkRQJ.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 { Options } from "./types-CFQIMFRS.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 { unpluginFactory } from "./src-DnCwQQFX.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 { Options } from "./types-BHypkRQJ.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 { Options } from "./types-CFQIMFRS.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 { src_default, unplugin, unpluginFactory } from "./src-DnCwQQFX.js";
|
|
2
|
+
|
|
3
|
+
export { src_default as default, unplugin, unpluginFactory };
|
package/dist/nuxt.cjs
CHANGED
|
@@ -1,102 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
const require_vite = require('./vite-Df2FT-jf.cjs');
|
|
3
|
+
const require_webpack = require('./webpack-D2VoiCsm.cjs');
|
|
4
|
+
let __nuxt_kit = require("@nuxt/kit");
|
|
5
|
+
__nuxt_kit = require_src.__toESM(__nuxt_kit);
|
|
6
|
+
require("@nuxt/schema");
|
|
19
7
|
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
//#region src/nuxt.ts
|
|
9
|
+
var nuxt_default = (0, __nuxt_kit.defineNuxtModule)({
|
|
10
|
+
meta: {
|
|
11
|
+
name: "nuxt-unplugin-starter",
|
|
12
|
+
configKey: "unpluginStarter"
|
|
13
|
+
},
|
|
14
|
+
defaults: void 0,
|
|
15
|
+
setup(options, _nuxt) {
|
|
16
|
+
(0, __nuxt_kit.addVitePlugin)(() => require_vite.vite_default(options));
|
|
17
|
+
(0, __nuxt_kit.addWebpackPlugin)(() => require_webpack.webpack_default(options));
|
|
18
|
+
}
|
|
24
19
|
});
|
|
25
|
-
module.exports = __toCommonJS(nuxt_exports);
|
|
26
|
-
var import_kit = require("@nuxt/kit");
|
|
27
|
-
var import_schema = require("@nuxt/schema");
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// src/index.ts
|
|
33
|
-
var import_core = require("@kubb/core");
|
|
34
|
-
var import_logger = require("@kubb/core/logger");
|
|
35
|
-
var import_unplugin = require("unplugin");
|
|
36
|
-
var unpluginFactory = (options) => {
|
|
37
|
-
const name = "unplugin-kubb";
|
|
38
|
-
const logger = (0, import_logger.createLogger)({
|
|
39
|
-
name
|
|
40
|
-
});
|
|
41
|
-
return {
|
|
42
|
-
name,
|
|
43
|
-
enforce: "pre",
|
|
44
|
-
vite: {
|
|
45
|
-
configResolved(config) {
|
|
46
|
-
logger.on("start", (message) => {
|
|
47
|
-
config.logger.info(`${name}: ${message}`);
|
|
48
|
-
});
|
|
49
|
-
logger.on("success", (message) => {
|
|
50
|
-
config.logger.info(`${name}: ${message}`);
|
|
51
|
-
});
|
|
52
|
-
logger.on("warning", (message) => {
|
|
53
|
-
config.logger.info(`${name}: ${message}`);
|
|
54
|
-
});
|
|
55
|
-
logger.on("error", (message) => {
|
|
56
|
-
config.logger.info(`${name}: ${message}`);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
async buildStart() {
|
|
61
|
-
if (!options?.config) {
|
|
62
|
-
throw new Error("Config is not set");
|
|
63
|
-
}
|
|
64
|
-
const { root: _root, ...userConfig } = options.config;
|
|
65
|
-
logger.emit("start", "Building");
|
|
66
|
-
const { error } = await (0, import_core.safeBuild)({
|
|
67
|
-
config: {
|
|
68
|
-
root: process.cwd(),
|
|
69
|
-
...userConfig,
|
|
70
|
-
output: {
|
|
71
|
-
write: true,
|
|
72
|
-
...userConfig.output
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
logger
|
|
76
|
-
});
|
|
77
|
-
if (error) {
|
|
78
|
-
throw error;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// src/vite.ts
|
|
85
|
-
var vite_default = (0, import_unplugin2.createVitePlugin)(unpluginFactory);
|
|
86
|
-
|
|
87
|
-
// src/webpack.ts
|
|
88
|
-
var import_unplugin3 = require("unplugin");
|
|
89
|
-
var webpack_default = (0, import_unplugin3.createWebpackPlugin)(unpluginFactory);
|
|
90
|
-
|
|
91
|
-
// src/nuxt.ts
|
|
92
|
-
var nuxt_default = (0, import_kit.defineNuxtModule)({
|
|
93
|
-
meta: {
|
|
94
|
-
name: "nuxt-unplugin-starter",
|
|
95
|
-
configKey: "unpluginStarter"
|
|
96
|
-
},
|
|
97
|
-
defaults: void 0,
|
|
98
|
-
setup(options, _nuxt) {
|
|
99
|
-
(0, import_kit.addVitePlugin)(() => vite_default(options));
|
|
100
|
-
(0, import_kit.addWebpackPlugin)(() => webpack_default(options));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
21
|
+
//#endregion
|
|
22
|
+
module.exports = nuxt_default;
|
|
23
|
+
//# sourceMappingURL=nuxt.cjs.map
|
|
@@ -0,0 +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 vite from './vite.ts'\nimport webpack from './webpack.ts'\n\nimport type { Options } from './types.ts'\n\nexport interface ModuleOptions extends Options {}\n\nexport default defineNuxtModule<ModuleOptions>({\n meta: {\n name: 'nuxt-unplugin-starter',\n configKey: 'unpluginStarter',\n },\n defaults: undefined,\n setup(options, _nuxt) {\n addVitePlugin(() => vite(options))\n addWebpackPlugin(() => webpack(options))\n\n // ...\n },\n})\n"],"mappings":";;;;;;;;AAUA,oDAA+C;CAC7C,MAAM;EACJ,MAAM;EACN,WAAW;EACZ;CACD,UAAU;CACV,MAAM,SAAS,OAAO;AACpB,sCAAoBA,0BAAK,QAAQ,CAAC;AAClC,yCAAuBC,gCAAQ,QAAQ,CAAC;;CAI3C,CAAC"}
|
package/dist/nuxt.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@kubb/core';
|
|
1
|
+
import { Options } from "./types-BHypkRQJ.cjs";
|
|
2
|
+
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare const _default:
|
|
8
|
-
|
|
9
|
-
export {
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
interface ModuleOptions extends Options {}
|
|
6
|
+
declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ModuleOptions, _default as default };
|
|
9
|
+
//# sourceMappingURL=nuxt.d.cts.map
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@kubb/core';
|
|
1
|
+
import { Options } from "./types-CFQIMFRS.js";
|
|
2
|
+
import * as _nuxt_schema0 from "@nuxt/schema";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
declare const _default:
|
|
8
|
-
|
|
9
|
-
export {
|
|
4
|
+
//#region src/nuxt.d.ts
|
|
5
|
+
interface ModuleOptions extends Options {}
|
|
6
|
+
declare const _default: _nuxt_schema0.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ModuleOptions, _default as default };
|
|
9
|
+
//# sourceMappingURL=nuxt.d.ts.map
|