@moneko/core 4.6.8 → 4.6.10
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/lib/commom/git.d.mts +2 -1
- package/lib/commom/git.mjs +1 -1
- package/lib/process-env.d.mts +1 -1
- package/package.json +3 -3
package/lib/commom/git.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export interface GitInfo {
|
|
2
2
|
/** 当前分支名 */ branch: string;
|
|
3
|
-
/**
|
|
3
|
+
/** 提交链接 */ commit: string;
|
|
4
4
|
/** 提交信息 */ message: string;
|
|
5
5
|
/** 提交用户名 */ author: string;
|
|
6
6
|
/** 提交用户邮箱 */ email: string;
|
|
7
7
|
/** 提交日期 */ date: string;
|
|
8
|
+
/** Git 远程地址 */ url: string;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* 获取 Git 信息
|
package/lib/commom/git.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{execSync as
|
|
1
|
+
import{execSync as t}from"node:child_process";let i=null;export const getGitInfo=e=>{let r=!1!==e;if(r&&null!==i)return i;let n=null;try{let i=t('git remote get-url origin && git rev-parse --abbrev-ref HEAD && git log -1 --pretty=format:"%h%x00%B%x00%an%x00%ae%x00%ai"',{encoding:"utf-8",stdio:["pipe","pipe","ignore"],maxBuffer:1048576}).trim();if(i){let t=i.indexOf("\n");if(-1!==t){let e=i.substring(0,t).trim().trim().replace(/^git@([^:]+):(.+?)(\.git)?$/,"https://$1/$2"),r=i.indexOf("\n",t+1),l=i.substring(t+1,r).trim(),m=i.substring(r+1).split("\0");if(m.length>=5){let t=m[0].trim(),i=e.includes("github")?`${e}/commit/${t}`:`${e}/-/commit/${t}`,r=m[1],o=m[2].trim(),g=m[3].trim(),s=m[4].trim();n={branch:l,commit:i,message:r,author:o,email:g,date:s,url:e}}}}}catch{}return r&&(i=n),n};
|
package/lib/process-env.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AppType, type Framework } from './index.mjs';
|
|
2
|
-
type PackageJson = typeof import('
|
|
2
|
+
type PackageJson = typeof import('package.json');
|
|
3
3
|
export declare const packageJson: Omit<PackageJson, 'scripts'> & {
|
|
4
4
|
scripts?: Record<string, string>;
|
|
5
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.10",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"marked-completed": "1.2.15",
|
|
150
150
|
"swc-loader": "0.2.7",
|
|
151
151
|
"typescript": "5.9.3",
|
|
152
|
-
"webpack": "5.105.
|
|
152
|
+
"webpack": "5.105.1",
|
|
153
153
|
"webpack-hot-middleware": "2.26.1",
|
|
154
154
|
"webpack-merge": "6.0.1"
|
|
155
155
|
},
|
|
@@ -170,5 +170,5 @@
|
|
|
170
170
|
"lib",
|
|
171
171
|
"typings"
|
|
172
172
|
],
|
|
173
|
-
"packageManager": "pnpm@10.29.
|
|
173
|
+
"packageManager": "pnpm@10.29.3"
|
|
174
174
|
}
|