@pubinfo/vite 2.1.1 → 2.1.3-beta.1
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/index.js +13 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -296,7 +296,20 @@ function createLibResolver(options) {
|
|
|
296
296
|
|
|
297
297
|
//#endregion
|
|
298
298
|
//#region src/plugins/built-in/system-info.ts
|
|
299
|
+
function hasGitRepository() {
|
|
300
|
+
try {
|
|
301
|
+
execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
|
|
302
|
+
return true;
|
|
303
|
+
} catch {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
299
307
|
function getGitInfo() {
|
|
308
|
+
if (!hasGitRepository()) return {
|
|
309
|
+
commit: "",
|
|
310
|
+
commitShort: "",
|
|
311
|
+
branch: ""
|
|
312
|
+
};
|
|
300
313
|
try {
|
|
301
314
|
const commit = execSync("git rev-parse HEAD", { encoding: "utf-8" }).trim();
|
|
302
315
|
const commitShort = execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.1",
|
|
4
|
+
"version": "2.1.3-beta.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"vite-plugin-fake-server": "^2.2.0",
|
|
50
50
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
51
51
|
"vite-plugin-vue-devtools": "^8.0.0",
|
|
52
|
-
"@pubinfo/devtools": "2.1.1",
|
|
53
|
-
"@pubinfo/shared": "2.1.1"
|
|
52
|
+
"@pubinfo/devtools": "2.1.3-beta.1",
|
|
53
|
+
"@pubinfo/shared": "2.1.3-beta.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/fs-extra": "^11.0.4",
|