unplugin-build-meta 1.0.5 → 1.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.
Files changed (64) hide show
  1. package/dist/astro.cjs +25 -17
  2. package/dist/astro.d.cts +4 -5
  3. package/dist/{astro.d.ts → astro.d.mts} +5 -5
  4. package/dist/astro.mjs +25 -18
  5. package/dist/esbuild.cjs +20 -9
  6. package/dist/esbuild.d.cts +5 -6
  7. package/dist/{esbuild.d.ts → esbuild.d.mts} +7 -6
  8. package/dist/esbuild.mjs +19 -9
  9. package/dist/farm.cjs +20 -9
  10. package/dist/farm.d.cts +3 -4
  11. package/dist/{farm.d.ts → farm.d.mts} +5 -4
  12. package/dist/farm.mjs +19 -9
  13. package/dist/{index.d.ts → index-Crle-EHN.d.cts} +5 -4
  14. package/dist/index-DEDKZAET.d.mts +14 -0
  15. package/dist/index.cjs +4 -8
  16. package/dist/index.d.cts +3 -13
  17. package/dist/index.d.mts +3 -0
  18. package/dist/index.mjs +3 -9
  19. package/dist/module-D-A3G8xU.mjs +14 -0
  20. package/dist/module-DT5DVEPk.cjs +20 -0
  21. package/dist/module.cjs +3 -5
  22. package/dist/module.d.cts +4 -4
  23. package/dist/{module.d.ts → module.d.mts} +4 -4
  24. package/dist/module.mjs +3 -6
  25. package/dist/nuxt.cjs +35 -29
  26. package/dist/nuxt.d.cts +4 -5
  27. package/dist/{nuxt.d.ts → nuxt.d.mts} +6 -5
  28. package/dist/nuxt.mjs +33 -28
  29. package/dist/rolldown.cjs +20 -9
  30. package/dist/rolldown.d.cts +5 -6
  31. package/dist/{rolldown.d.ts → rolldown.d.mts} +7 -6
  32. package/dist/rolldown.mjs +19 -9
  33. package/dist/rollup.cjs +20 -9
  34. package/dist/rollup.d.cts +5 -6
  35. package/dist/{rollup.d.ts → rollup.d.mts} +7 -6
  36. package/dist/rollup.mjs +19 -9
  37. package/dist/rspack.cjs +25 -9
  38. package/dist/rspack.d.cts +5 -5
  39. package/dist/{rspack.d.ts → rspack.d.mts} +7 -5
  40. package/dist/rspack.mjs +24 -9
  41. package/dist/src-BZ8mQVle.cjs +208 -0
  42. package/dist/src-D338eO6B.mjs +150 -0
  43. package/dist/types--sVtB8IG.d.mts +25 -0
  44. package/dist/types-Be8ZD_mp.d.cts +25 -0
  45. package/dist/vite.cjs +20 -6
  46. package/dist/vite.d.cts +5 -6
  47. package/dist/{vite.d.ts → vite.d.mts} +7 -6
  48. package/dist/vite.mjs +21 -8
  49. package/dist/webpack.cjs +18 -6
  50. package/dist/webpack.d.cts +5 -6
  51. package/dist/webpack.d.mts +19 -0
  52. package/dist/webpack.mjs +19 -8
  53. package/package.json +55 -110
  54. package/dist/chunk-7ZTBKMAA.mjs +0 -11
  55. package/dist/chunk-GU2UU6BD.mjs +0 -11
  56. package/dist/chunk-IO4OWFHV.cjs +0 -170
  57. package/dist/chunk-NT6BOYSQ.cjs +0 -11
  58. package/dist/chunk-OAZ3YOGG.mjs +0 -170
  59. package/dist/chunk-RJEZ2A3A.mjs +0 -8
  60. package/dist/chunk-SSXJV7C2.cjs +0 -8
  61. package/dist/chunk-TQTDIF6M.cjs +0 -11
  62. package/dist/types-C-6IiPYY.d.cts +0 -24
  63. package/dist/types-C-6IiPYY.d.ts +0 -24
  64. package/dist/webpack.d.ts +0 -18
@@ -0,0 +1,150 @@
1
+ import { t as defineBuildMetaModule } from "./module-D-A3G8xU.mjs";
2
+ import { createUnplugin } from "unplugin";
3
+ import parseGitUrl from "git-url-parse";
4
+ import { simpleGit } from "simple-git";
5
+ import process from "node:process";
6
+
7
+ //#region src/core/constants.ts
8
+ const PLUGIN_NAME = "unplugin-build-meta";
9
+ const NUXT_CONFIG_KEY = "buildMeta";
10
+
11
+ //#endregion
12
+ //#region src/core/modules/git.ts
13
+ var git_default = defineBuildMetaModule({
14
+ name: "git",
15
+ load: async () => {
16
+ const git = simpleGit();
17
+ const info = {};
18
+ function generateOutput(data) {
19
+ return [
20
+ "repositoryUrl",
21
+ "sha",
22
+ "shortSha",
23
+ "branch",
24
+ "tag",
25
+ "tags",
26
+ "lastTag",
27
+ "commitAuthorName",
28
+ "commitAuthorEmail",
29
+ "commitAuthorDate",
30
+ "commitCommitterName",
31
+ "commitCommitterEmail",
32
+ "commitCommitterDate",
33
+ "latestCommitMessage"
34
+ ].map((key) => `export const ${key} = ${data && data[key] !== void 0 ? JSON.stringify(data[key]) : "null"}`).join("\n");
35
+ }
36
+ try {
37
+ if (!await git.checkIsRepo()) return generateOutput();
38
+ } catch (error) {
39
+ console.error("failed to check if directory is a git repository:", error);
40
+ return generateOutput();
41
+ }
42
+ try {
43
+ info.branch = (await git.branch([])).current;
44
+ } catch (error) {
45
+ console.error("failed to fetch branch information:", error);
46
+ }
47
+ try {
48
+ const log = await git.log(["-1"]);
49
+ if (log.latest) {
50
+ info.sha = log.latest.hash;
51
+ info.shortSha = log.latest.hash?.slice(0, 10);
52
+ info.latestCommitMessage = log.latest.message;
53
+ info.commitAuthorName = log.latest.author_name;
54
+ info.commitAuthorEmail = log.latest.author_email;
55
+ info.commitAuthorDate = log.latest.date;
56
+ }
57
+ } catch (error) {
58
+ console.error("failed to fetch commit information:", error);
59
+ }
60
+ try {
61
+ const committerLines = (await git.show(["-s", "--format=%cn%n%ce%n%cd"])).split("\n").map((line) => line.trim());
62
+ if (committerLines.length >= 3) {
63
+ info.commitCommitterName = committerLines[0];
64
+ info.commitCommitterEmail = committerLines[1];
65
+ info.commitCommitterDate = committerLines[2];
66
+ }
67
+ } catch (error) {
68
+ console.error("failed to fetch committer information:", error);
69
+ }
70
+ try {
71
+ const hash = await git.revparse(["HEAD"]);
72
+ const tagsResult = await git.tags(["--points-at", hash]);
73
+ const allTags = await git.tags();
74
+ info.tags = tagsResult.all;
75
+ info.tag = tagsResult.all[tagsResult.all.length - 1];
76
+ info.lastTag = allTags.latest;
77
+ } catch (error) {
78
+ console.error("failed to fetch tags information:", error);
79
+ }
80
+ try {
81
+ const origin = (await git.getRemotes(true)).find((remote) => remote.name === "origin");
82
+ if (origin?.refs.fetch) {
83
+ const parsed = parseGitUrl(origin.refs.fetch);
84
+ if (parsed.resource === "github.com" && parsed.full_name) info.repositoryUrl = `https://github.com/${parsed.full_name}`;
85
+ }
86
+ } catch (error) {
87
+ console.error("failed to fetch GitHub URL:", error);
88
+ }
89
+ return generateOutput(info);
90
+ }
91
+ });
92
+
93
+ //#endregion
94
+ //#region src/core/modules/runtime.ts
95
+ const runtimeModule = {
96
+ name: "runtime",
97
+ load: async () => {
98
+ const runtime = {
99
+ platform: process.platform,
100
+ arch: process.arch,
101
+ versions: process.versions
102
+ };
103
+ return [
104
+ `export const platform = ${JSON.stringify(runtime.platform)}`,
105
+ `export const arch = ${JSON.stringify(runtime.arch)}`,
106
+ `export const versions = ${JSON.stringify(runtime.versions, null, 2)}`
107
+ ].join("\n");
108
+ }
109
+ };
110
+
111
+ //#endregion
112
+ //#region src/core/index.ts
113
+ const PREFIX = "virtual:build-meta/";
114
+ const PREFIX_WITH_NULL = `\0${PREFIX}`;
115
+ /**
116
+ * A unplugin factory, used by Unplugin to create a new plugin instance.
117
+ */
118
+ const unpluginFactory = (options = {}) => {
119
+ const { git = true, extraModules = [], runtime = true } = options;
120
+ const modules = [];
121
+ if (git) modules.push(git_default);
122
+ if (runtime) modules.push(runtimeModule);
123
+ modules.push(...extraModules);
124
+ return {
125
+ name: PLUGIN_NAME,
126
+ enforce: "pre",
127
+ resolveId(id) {
128
+ if (!id.startsWith(PREFIX)) return;
129
+ id = id.slice(19);
130
+ if (!modules.map((m) => m.name).includes(id)) return;
131
+ return `${PREFIX_WITH_NULL}${id}`;
132
+ },
133
+ loadInclude(id) {
134
+ if (!id.startsWith(PREFIX_WITH_NULL)) return false;
135
+ return modules.map((m) => m.name).includes(id.slice(PREFIX_WITH_NULL.length));
136
+ },
137
+ async load(id) {
138
+ if (!id.startsWith(PREFIX_WITH_NULL)) return;
139
+ id = id.slice(PREFIX_WITH_NULL.length);
140
+ for (const mod of Object.values(modules)) if (id === mod.name) return mod.load(this, id);
141
+ }
142
+ };
143
+ };
144
+ /**
145
+ * The main unplugin instance.
146
+ */
147
+ const unplugin = /* @__PURE__ */ createUnplugin(unpluginFactory);
148
+
149
+ //#endregion
150
+ export { PLUGIN_NAME as i, unpluginFactory as n, NUXT_CONFIG_KEY as r, unplugin as t };
@@ -0,0 +1,25 @@
1
+ import { UnpluginBuildContext, UnpluginContext } from "unplugin";
2
+
3
+ //#region src/core/types.d.ts
4
+ interface BuildMetaModule {
5
+ name: string;
6
+ load: (ctx: UnpluginBuildContext & UnpluginContext, id: string) => Promise<string>;
7
+ }
8
+ interface BuildMetaOptions {
9
+ /**
10
+ * Whether to enable the git module.
11
+ * @default true
12
+ */
13
+ git?: boolean;
14
+ /**
15
+ * Whether to enable the runtime module.
16
+ * @default true
17
+ */
18
+ runtime?: boolean;
19
+ /**
20
+ * Additional custom modules to include in the build meta.
21
+ */
22
+ extraModules?: BuildMetaModule[];
23
+ }
24
+ //#endregion
25
+ export { BuildMetaOptions as n, BuildMetaModule as t };
@@ -0,0 +1,25 @@
1
+ import { UnpluginBuildContext, UnpluginContext } from "unplugin";
2
+
3
+ //#region src/core/types.d.ts
4
+ interface BuildMetaModule {
5
+ name: string;
6
+ load: (ctx: UnpluginBuildContext & UnpluginContext, id: string) => Promise<string>;
7
+ }
8
+ interface BuildMetaOptions {
9
+ /**
10
+ * Whether to enable the git module.
11
+ * @default true
12
+ */
13
+ git?: boolean;
14
+ /**
15
+ * Whether to enable the runtime module.
16
+ * @default true
17
+ */
18
+ runtime?: boolean;
19
+ /**
20
+ * Additional custom modules to include in the build meta.
21
+ */
22
+ extraModules?: BuildMetaModule[];
23
+ }
24
+ //#endregion
25
+ export { BuildMetaOptions as n, BuildMetaModule as t };
package/dist/vite.cjs CHANGED
@@ -1,8 +1,22 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_src = require('./src-BZ8mQVle.cjs');
3
+ let unplugin = require("unplugin");
2
4
 
3
- var _chunkNT6BOYSQcjs = require('./chunk-NT6BOYSQ.cjs');
4
- require('./chunk-IO4OWFHV.cjs');
5
- require('./chunk-SSXJV7C2.cjs');
5
+ //#region src/vite.ts
6
+ /**
7
+ * Vite plugin
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * // vite.config.ts
12
+ * import buildMeta from "unplugin-build-meta/vite"
13
+ *
14
+ * export default defineConfig({
15
+ * plugins: [buildMeta()],
16
+ * })
17
+ * ```
18
+ */
19
+ var vite_default = (0, unplugin.createVitePlugin)(require_src.unpluginFactory);
6
20
 
7
-
8
- exports.default = _chunkNT6BOYSQcjs.vite_default;
21
+ //#endregion
22
+ exports.default = vite_default;
package/dist/vite.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import * as vite from 'vite';
2
- import { B as BuildMetaOptions } from './types-C-6IiPYY.cjs';
3
- import 'unplugin';
1
+ import { n as BuildMetaOptions } from "./types-Be8ZD_mp.cjs";
2
+ import * as vite0 from "vite";
4
3
 
4
+ //#region src/vite.d.ts
5
5
  /**
6
6
  * Vite plugin
7
7
  *
@@ -15,6 +15,5 @@ import 'unplugin';
15
15
  * })
16
16
  * ```
17
17
  */
18
- declare const _default: (options?: BuildMetaOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
19
-
20
- export { _default as default };
18
+ declare const _default: (options?: BuildMetaOptions | undefined) => vite0.Plugin<any> | vite0.Plugin<any>[];
19
+ export = _default;
@@ -1,7 +1,8 @@
1
- import * as vite from 'vite';
2
- import { B as BuildMetaOptions } from './types-C-6IiPYY.js';
3
- import 'unplugin';
1
+ import { n as BuildMetaOptions } from "./types--sVtB8IG.mjs";
2
+ import "./index-DEDKZAET.mjs";
3
+ import * as vite0 from "vite";
4
4
 
5
+ //#region src/vite.d.ts
5
6
  /**
6
7
  * Vite plugin
7
8
  *
@@ -15,6 +16,6 @@ import 'unplugin';
15
16
  * })
16
17
  * ```
17
18
  */
18
- declare const _default: (options?: BuildMetaOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
19
-
20
- export { _default as default };
19
+ declare const _default: (options?: BuildMetaOptions | undefined) => vite0.Plugin<any> | vite0.Plugin<any>[];
20
+ //#endregion
21
+ export { _default as default };
package/dist/vite.mjs CHANGED
@@ -1,8 +1,21 @@
1
- import {
2
- vite_default
3
- } from "./chunk-GU2UU6BD.mjs";
4
- import "./chunk-OAZ3YOGG.mjs";
5
- import "./chunk-RJEZ2A3A.mjs";
6
- export {
7
- vite_default as default
8
- };
1
+ import { n as unpluginFactory } from "./src-D338eO6B.mjs";
2
+ import { createVitePlugin } from "unplugin";
3
+
4
+ //#region src/vite.ts
5
+ /**
6
+ * Vite plugin
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * // vite.config.ts
11
+ * import buildMeta from "unplugin-build-meta/vite"
12
+ *
13
+ * export default defineConfig({
14
+ * plugins: [buildMeta()],
15
+ * })
16
+ * ```
17
+ */
18
+ var vite_default = createVitePlugin(unpluginFactory);
19
+
20
+ //#endregion
21
+ export { vite_default as default };
package/dist/webpack.cjs CHANGED
@@ -1,8 +1,20 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_src = require('./src-BZ8mQVle.cjs');
3
+ let unplugin = require("unplugin");
2
4
 
3
- var _chunkTQTDIF6Mcjs = require('./chunk-TQTDIF6M.cjs');
4
- require('./chunk-IO4OWFHV.cjs');
5
- require('./chunk-SSXJV7C2.cjs');
5
+ //#region src/webpack.ts
6
+ /**
7
+ * Webpack plugin
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * // webpack.config.js
12
+ * module.exports = {
13
+ * plugins: [require("unplugin-build-meta/webpack")()],
14
+ * }
15
+ * ```
16
+ */
17
+ var webpack_default = (0, unplugin.createWebpackPlugin)(require_src.unpluginFactory);
6
18
 
7
-
8
- exports.default = _chunkTQTDIF6Mcjs.webpack_default;
19
+ //#endregion
20
+ exports.default = webpack_default;
@@ -1,7 +1,7 @@
1
- import * as webpack from 'webpack';
2
- import { B as BuildMetaOptions } from './types-C-6IiPYY.cjs';
3
- import 'unplugin';
1
+ import { n as BuildMetaOptions } from "./types-Be8ZD_mp.cjs";
2
+ import * as webpack0 from "webpack";
4
3
 
4
+ //#region src/webpack.d.ts
5
5
  /**
6
6
  * Webpack plugin
7
7
  *
@@ -13,6 +13,5 @@ import 'unplugin';
13
13
  * }
14
14
  * ```
15
15
  */
16
- declare const _default: (options?: BuildMetaOptions | undefined) => webpack.WebpackPluginInstance;
17
-
18
- export { _default as default };
16
+ declare const _default: (options?: BuildMetaOptions | undefined) => webpack0.WebpackPluginInstance;
17
+ export = _default;
@@ -0,0 +1,19 @@
1
+ import { n as BuildMetaOptions } from "./types--sVtB8IG.mjs";
2
+ import "./index-DEDKZAET.mjs";
3
+ import * as webpack0 from "webpack";
4
+
5
+ //#region src/webpack.d.ts
6
+ /**
7
+ * Webpack plugin
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * // webpack.config.js
12
+ * module.exports = {
13
+ * plugins: [require("unplugin-build-meta/webpack")()],
14
+ * }
15
+ * ```
16
+ */
17
+ declare const _default: (options?: BuildMetaOptions | undefined) => webpack0.WebpackPluginInstance;
18
+ //#endregion
19
+ export { _default as default };
package/dist/webpack.mjs CHANGED
@@ -1,8 +1,19 @@
1
- import {
2
- webpack_default
3
- } from "./chunk-7ZTBKMAA.mjs";
4
- import "./chunk-OAZ3YOGG.mjs";
5
- import "./chunk-RJEZ2A3A.mjs";
6
- export {
7
- webpack_default as default
8
- };
1
+ import { n as unpluginFactory } from "./src-D338eO6B.mjs";
2
+ import { createWebpackPlugin } from "unplugin";
3
+
4
+ //#region src/webpack.ts
5
+ /**
6
+ * Webpack plugin
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * // webpack.config.js
11
+ * module.exports = {
12
+ * plugins: [require("unplugin-build-meta/webpack")()],
13
+ * }
14
+ * ```
15
+ */
16
+ var webpack_default = createWebpackPlugin(unpluginFactory);
17
+
18
+ //#endregion
19
+ export { webpack_default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-build-meta",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Provide build metadata as a virutal module",
5
5
  "type": "module",
6
6
  "author": {
@@ -31,116 +31,60 @@
31
31
  ],
32
32
  "exports": {
33
33
  ".": {
34
- "import": {
35
- "types": "./dist/index.d.ts",
36
- "default": "./dist/index.mjs"
37
- },
38
- "require": {
39
- "types": "./dist/index.d.cts",
40
- "default": "./dist/index.cjs"
41
- }
34
+ "require": "./dist/index.cjs",
35
+ "import": "./dist/index.mjs"
42
36
  },
43
37
  "./astro": {
44
- "import": {
45
- "types": "./dist/astro.d.ts",
46
- "default": "./dist/astro.mjs"
47
- },
48
- "require": {
49
- "types": "./dist/astro.d.cts",
50
- "default": "./dist/astro.cjs"
51
- }
38
+ "require": "./dist/astro.cjs",
39
+ "import": "./dist/astro.mjs"
52
40
  },
53
- "./farm": {
54
- "import": {
55
- "types": "./dist/farm.d.ts",
56
- "default": "./dist/farm.mjs"
57
- },
58
- "require": {
59
- "types": "./dist/farm.d.cts",
60
- "default": "./dist/farm.cjs"
61
- }
62
- },
63
- "./rspack": {
64
- "import": {
65
- "types": "./dist/rspack.d.ts",
66
- "default": "./dist/rspack.mjs"
67
- },
68
- "require": {
69
- "types": "./dist/rspack.d.cts",
70
- "default": "./dist/rspack.cjs"
71
- }
41
+ "./esbuild": {
42
+ "require": "./dist/esbuild.cjs",
43
+ "import": "./dist/esbuild.mjs"
72
44
  },
73
- "./rolldown": {
74
- "import": {
75
- "types": "./dist/rolldown.d.ts",
76
- "default": "./dist/rolldown.mjs"
77
- },
78
- "require": {
79
- "types": "./dist/rolldown.d.cts",
80
- "default": "./dist/rolldown.cjs"
81
- }
45
+ "./farm": {
46
+ "require": "./dist/farm.cjs",
47
+ "import": "./dist/farm.mjs"
82
48
  },
83
- "./esbuild": {
84
- "import": {
85
- "types": "./dist/esbuild.d.ts",
86
- "default": "./dist/esbuild.mjs"
87
- },
88
- "require": {
89
- "types": "./dist/esbuild.d.cts",
90
- "default": "./dist/esbuild.cjs"
91
- }
49
+ "./module": {
50
+ "require": "./dist/module.cjs",
51
+ "import": "./dist/module.mjs"
92
52
  },
93
53
  "./nuxt": {
94
- "import": {
95
- "types": "./dist/nuxt.d.ts",
96
- "default": "./dist/nuxt.mjs"
97
- },
98
- "require": {
99
- "types": "./dist/nuxt.d.cts",
100
- "default": "./dist/nuxt.cjs"
101
- }
54
+ "require": "./dist/nuxt.cjs",
55
+ "import": "./dist/nuxt.mjs"
56
+ },
57
+ "./rolldown": {
58
+ "require": "./dist/rolldown.cjs",
59
+ "import": "./dist/rolldown.mjs"
102
60
  },
103
61
  "./rollup": {
104
- "import": {
105
- "types": "./dist/rollup.d.ts",
106
- "default": "./dist/rollup.mjs"
107
- },
108
- "require": {
109
- "types": "./dist/rollup.d.cts",
110
- "default": "./dist/rollup.cjs"
111
- }
62
+ "require": "./dist/rollup.cjs",
63
+ "import": "./dist/rollup.mjs"
64
+ },
65
+ "./rspack": {
66
+ "require": "./dist/rspack.cjs",
67
+ "import": "./dist/rspack.mjs"
112
68
  },
113
69
  "./vite": {
114
- "import": {
115
- "types": "./dist/vite.d.ts",
116
- "default": "./dist/vite.mjs"
117
- },
118
- "require": {
119
- "types": "./dist/vite.d.cts",
120
- "default": "./dist/vite.cjs"
121
- }
70
+ "require": "./dist/vite.cjs",
71
+ "import": "./dist/vite.mjs"
122
72
  },
123
73
  "./webpack": {
124
- "import": {
125
- "types": "./dist/webpack.d.ts",
126
- "default": "./dist/webpack.mjs"
127
- },
128
- "require": {
129
- "types": "./dist/webpack.d.cts",
130
- "default": "./dist/webpack.cjs"
131
- }
74
+ "require": "./dist/webpack.cjs",
75
+ "import": "./dist/webpack.mjs"
132
76
  },
77
+ "./package.json": "./package.json",
133
78
  "./types": {
134
79
  "types": "./types/index.d.ts"
135
80
  },
136
81
  "./types/*": {
137
82
  "types": "./types/*.d.ts"
138
- },
139
- "./package.json": "./package.json"
83
+ }
140
84
  },
141
- "main": "dist/index.cjs",
142
- "module": "dist/index.mjs",
143
- "types": "dist/index.d.ts",
85
+ "main": "./dist/index.cjs",
86
+ "module": "./dist/index.mjs",
87
+ "types": "./dist/index.d.cts",
144
88
  "files": [
145
89
  "dist",
146
90
  "types"
@@ -187,29 +131,30 @@
187
131
  },
188
132
  "dependencies": {
189
133
  "git-url-parse": "^16.1.0",
190
- "simple-git": "^3.28.0",
191
- "unplugin": "^2.3.10"
134
+ "simple-git": "^3.30.0",
135
+ "unplugin": "^3.0.0"
192
136
  },
193
137
  "devDependencies": {
194
- "@luxass/eslint-config": "^5.3.2",
195
- "@nuxt/kit": "^4.1.2",
196
- "@nuxt/schema": "^4.1.2",
197
- "@rspack/core": "^1.5.3",
198
- "@types/node": "^22.9.0",
199
- "esbuild": "^0.25.9",
200
- "eslint": "^9.35.0",
201
- "rolldown": "1.0.0-beta.37",
202
- "rollup": "^4.50.1",
203
- "tsup": "^8.5.0",
204
- "typescript": "^5.9.2",
205
- "vite": "^7.1.5",
206
- "vitest": "^3.2.4",
207
- "vitest-testdirs": "^4.2.0",
208
- "webpack": "^5.101.3"
138
+ "@luxass/eslint-config": "^6.0.3",
139
+ "@nuxt/kit": "^4.3.0",
140
+ "@nuxt/schema": "^4.3.0",
141
+ "@rspack/core": "^1.7.4",
142
+ "@types/node": "^24.10.0",
143
+ "esbuild": "^0.27.2",
144
+ "eslint": "^9.39.2",
145
+ "publint": "^0.3.17",
146
+ "rolldown": "^1.0.0-rc.2",
147
+ "rollup": "^4.57.1",
148
+ "tsdown": "^0.20.1",
149
+ "typescript": "^5.9.3",
150
+ "vite": "^7.3.1",
151
+ "vitest": "^4.0.18",
152
+ "vitest-testdirs": "^4.3.0",
153
+ "webpack": "^5.104.1"
209
154
  },
210
155
  "scripts": {
211
- "build": "tsup",
212
- "dev": "tsup --watch",
156
+ "build": "tsdown",
157
+ "dev": "tsdown --watch",
213
158
  "lint": "eslint .",
214
159
  "test": "vitest --run",
215
160
  "test:watch": "vitest",
@@ -1,11 +0,0 @@
1
- import {
2
- unpluginFactory
3
- } from "./chunk-OAZ3YOGG.mjs";
4
-
5
- // src/webpack.ts
6
- import { createWebpackPlugin } from "unplugin";
7
- var webpack_default = createWebpackPlugin(unpluginFactory);
8
-
9
- export {
10
- webpack_default
11
- };
@@ -1,11 +0,0 @@
1
- import {
2
- unpluginFactory
3
- } from "./chunk-OAZ3YOGG.mjs";
4
-
5
- // src/vite.ts
6
- import { createVitePlugin } from "unplugin";
7
- var vite_default = createVitePlugin(unpluginFactory);
8
-
9
- export {
10
- vite_default
11
- };