unplugin-build-meta 1.0.3 → 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.
- package/dist/astro.cjs +25 -17
- package/dist/astro.d.cts +4 -5
- package/dist/{astro.d.ts → astro.d.mts} +5 -5
- package/dist/astro.mjs +25 -18
- package/dist/esbuild.cjs +20 -9
- package/dist/esbuild.d.cts +5 -6
- package/dist/{esbuild.d.ts → esbuild.d.mts} +7 -6
- package/dist/esbuild.mjs +19 -9
- package/dist/farm.cjs +20 -9
- package/dist/farm.d.cts +3 -4
- package/dist/{farm.d.ts → farm.d.mts} +5 -4
- package/dist/farm.mjs +19 -9
- package/dist/{index.d.ts → index-Crle-EHN.d.cts} +5 -4
- package/dist/index-DEDKZAET.d.mts +14 -0
- package/dist/index.cjs +4 -8
- package/dist/index.d.cts +3 -13
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +3 -9
- package/dist/module-D-A3G8xU.mjs +14 -0
- package/dist/module-DT5DVEPk.cjs +20 -0
- package/dist/module.cjs +3 -5
- package/dist/module.d.cts +4 -4
- package/dist/{module.d.ts → module.d.mts} +4 -4
- package/dist/module.mjs +3 -6
- package/dist/nuxt.cjs +35 -29
- package/dist/nuxt.d.cts +4 -5
- package/dist/{nuxt.d.ts → nuxt.d.mts} +6 -5
- package/dist/nuxt.mjs +33 -28
- package/dist/rolldown.cjs +20 -9
- package/dist/rolldown.d.cts +5 -6
- package/dist/{rolldown.d.ts → rolldown.d.mts} +7 -6
- package/dist/rolldown.mjs +19 -9
- package/dist/rollup.cjs +20 -9
- package/dist/rollup.d.cts +5 -6
- package/dist/{rollup.d.ts → rollup.d.mts} +7 -6
- package/dist/rollup.mjs +19 -9
- package/dist/rspack.cjs +25 -9
- package/dist/rspack.d.cts +5 -5
- package/dist/{rspack.d.ts → rspack.d.mts} +7 -5
- package/dist/rspack.mjs +24 -9
- package/dist/src-BZ8mQVle.cjs +208 -0
- package/dist/src-D338eO6B.mjs +150 -0
- package/dist/types--sVtB8IG.d.mts +25 -0
- package/dist/types-Be8ZD_mp.d.cts +25 -0
- package/dist/vite.cjs +20 -6
- package/dist/vite.d.cts +5 -6
- package/dist/{vite.d.ts → vite.d.mts} +7 -6
- package/dist/vite.mjs +21 -8
- package/dist/webpack.cjs +18 -6
- package/dist/webpack.d.cts +5 -6
- package/dist/webpack.d.mts +19 -0
- package/dist/webpack.mjs +19 -8
- package/package.json +55 -110
- package/dist/chunk-7ZTBKMAA.mjs +0 -11
- package/dist/chunk-GU2UU6BD.mjs +0 -11
- package/dist/chunk-IO4OWFHV.cjs +0 -170
- package/dist/chunk-NT6BOYSQ.cjs +0 -11
- package/dist/chunk-OAZ3YOGG.mjs +0 -170
- package/dist/chunk-RJEZ2A3A.mjs +0 -8
- package/dist/chunk-SSXJV7C2.cjs +0 -8
- package/dist/chunk-TQTDIF6M.cjs +0 -11
- package/dist/types-C-6IiPYY.d.cts +0 -24
- package/dist/types-C-6IiPYY.d.ts +0 -24
- 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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 =
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.default = vite_default;
|
package/dist/vite.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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) =>
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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) =>
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 =
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.default = webpack_default;
|
package/dist/webpack.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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) =>
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
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
|
-
"
|
|
35
|
-
|
|
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
|
-
"
|
|
45
|
-
|
|
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
|
-
"./
|
|
54
|
-
"
|
|
55
|
-
|
|
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
|
-
"./
|
|
74
|
-
"
|
|
75
|
-
|
|
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
|
-
"./
|
|
84
|
-
"
|
|
85
|
-
|
|
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
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"require":
|
|
99
|
-
|
|
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
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"require":
|
|
109
|
-
|
|
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
|
-
"
|
|
115
|
-
|
|
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
|
-
"
|
|
125
|
-
|
|
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.
|
|
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.
|
|
191
|
-
"unplugin": "^
|
|
134
|
+
"simple-git": "^3.30.0",
|
|
135
|
+
"unplugin": "^3.0.0"
|
|
192
136
|
},
|
|
193
137
|
"devDependencies": {
|
|
194
|
-
"@luxass/eslint-config": "^
|
|
195
|
-
"@nuxt/kit": "^4.0
|
|
196
|
-
"@nuxt/schema": "^4.0
|
|
197
|
-
"@rspack/core": "^1.
|
|
198
|
-
"@types/node": "^
|
|
199
|
-
"esbuild": "^0.
|
|
200
|
-
"eslint": "^9.
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"vitest
|
|
208
|
-
"
|
|
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": "
|
|
212
|
-
"dev": "
|
|
156
|
+
"build": "tsdown",
|
|
157
|
+
"dev": "tsdown --watch",
|
|
213
158
|
"lint": "eslint .",
|
|
214
159
|
"test": "vitest --run",
|
|
215
160
|
"test:watch": "vitest",
|
package/dist/chunk-7ZTBKMAA.mjs
DELETED