@devframes/plugin-git 0.9.0 → 0.9.2
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/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-C0GsWXZS.mjs → src-DfxtqbaA.mjs} +16 -13
- package/package.json +9 -9
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGitDevframe } from "./src-
|
|
1
|
+
import { t as createGitDevframe } from "./src-DfxtqbaA.mjs";
|
|
2
2
|
export { createGitDevframe, createGitDevframe as default };
|
|
@@ -6,13 +6,13 @@ import { promisify } from "node:util";
|
|
|
6
6
|
import { s } from "devframe/utils/simple-schema";
|
|
7
7
|
//#region package.json
|
|
8
8
|
var name = "@devframes/plugin-git";
|
|
9
|
-
var version = "0.9.
|
|
9
|
+
var version = "0.9.2";
|
|
10
10
|
var description = "Devframe plugin that shows a Git dashboard for status, log, branches, and diffs.";
|
|
11
11
|
var homepage = "https://github.com/devframes/devframe#readme";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/node/git.ts
|
|
14
14
|
const execFileAsync = promisify(execFile);
|
|
15
|
-
const MAX_BUFFER =
|
|
15
|
+
const MAX_BUFFER = 67108864;
|
|
16
16
|
/**
|
|
17
17
|
* Run a git command in `cwd`. Rejects when git exits non-zero — callers that
|
|
18
18
|
* tolerate failure (e.g. "no upstream configured") should use {@link tryGit}.
|
|
@@ -225,11 +225,12 @@ function parseStatus(root, raw) {
|
|
|
225
225
|
if (token.startsWith("# ")) {
|
|
226
226
|
const [, key, ...rest] = token.split(" ");
|
|
227
227
|
const value = rest.join(" ");
|
|
228
|
-
if (key === "branch.head")
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
if (key === "branch.head") {
|
|
229
|
+
if (value === "(detached)") {
|
|
230
|
+
status.detached = true;
|
|
231
|
+
status.branch = null;
|
|
232
|
+
} else status.branch = value;
|
|
233
|
+
} else if (key === "branch.oid" && value !== "(initial)") status.head = value.slice(0, 9);
|
|
233
234
|
else if (key === "branch.upstream") status.upstream = value;
|
|
234
235
|
else if (key === "branch.ab") {
|
|
235
236
|
const match = value.match(/\+(\d+)\s+-(\d+)/);
|
|
@@ -744,10 +745,12 @@ async function readCommit(git, hash, includePatch) {
|
|
|
744
745
|
"--end-of-options",
|
|
745
746
|
hash
|
|
746
747
|
]);
|
|
747
|
-
if (raw != null)
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
748
|
+
if (raw != null) {
|
|
749
|
+
if (raw.length > PATCH_CHAR_LIMIT) {
|
|
750
|
+
patch = raw.slice(0, PATCH_CHAR_LIMIT);
|
|
751
|
+
truncated = true;
|
|
752
|
+
} else patch = raw;
|
|
753
|
+
}
|
|
751
754
|
}
|
|
752
755
|
return {
|
|
753
756
|
isRepo: true,
|
|
@@ -885,8 +888,7 @@ const writeFunctions = [
|
|
|
885
888
|
//#region src/index.ts
|
|
886
889
|
const remoteAssets = {
|
|
887
890
|
package: `${name}--assets`,
|
|
888
|
-
version
|
|
889
|
-
resolveFrom: import.meta.url
|
|
891
|
+
version
|
|
890
892
|
};
|
|
891
893
|
/**
|
|
892
894
|
* Create the Git dashboard devframe. Mount it into any host via devframe's
|
|
@@ -902,6 +904,7 @@ function createGitDevframe(options = {}) {
|
|
|
902
904
|
name: "Git",
|
|
903
905
|
version,
|
|
904
906
|
packageName: name,
|
|
907
|
+
importMetaUrl: import.meta.url,
|
|
905
908
|
homepage,
|
|
906
909
|
description,
|
|
907
910
|
icon: "ph:git-branch-duotone",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/plugin-git",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.2",
|
|
5
5
|
"description": "Devframe plugin that shows a Git dashboard for status, log, branches, and diffs.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@devframes/plugin-git--assets": "0.9.
|
|
36
|
+
"@devframes/plugin-git--assets": "0.9.2"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@devframes/plugin-git--assets": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"cac": "^7.0.0",
|
|
45
45
|
"pathe": "^2.0.3",
|
|
46
|
-
"devframe": "0.9.
|
|
46
|
+
"devframe": "0.9.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@antfu/design": "^0.3.4",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@pierre/diffs": "^1.2.12",
|
|
53
53
|
"@radix-ui/react-scroll-area": "^1.2.18",
|
|
54
54
|
"@radix-ui/react-slot": "^1.3.3",
|
|
55
|
-
"@storybook/addon-a11y": "^10.5.
|
|
56
|
-
"@storybook/addon-docs": "^10.5.
|
|
57
|
-
"@storybook/react-vite": "^10.5.
|
|
55
|
+
"@storybook/addon-a11y": "^10.5.8",
|
|
56
|
+
"@storybook/addon-docs": "^10.5.8",
|
|
57
|
+
"@storybook/react-vite": "^10.5.8",
|
|
58
58
|
"@types/react": "^19.2.18",
|
|
59
59
|
"@types/react-dom": "^19.2.4",
|
|
60
60
|
"@unocss/postcss": "^66.7.5",
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
"clsx": "^2.1.1",
|
|
63
63
|
"colorjs.io": "^0.7.1",
|
|
64
64
|
"h3": "^2.0.1-rc.26",
|
|
65
|
-
"next": "^16.3.
|
|
65
|
+
"next": "^16.3.1",
|
|
66
66
|
"react": "^19.2.8",
|
|
67
67
|
"react-dom": "^19.2.8",
|
|
68
|
-
"storybook": "^10.5.
|
|
68
|
+
"storybook": "^10.5.8",
|
|
69
69
|
"tailwind-merge": "^3.6.0",
|
|
70
70
|
"tsdown": "^0.22.14",
|
|
71
71
|
"unocss": "^66.7.5",
|
|
72
72
|
"vitest": "^4.1.10",
|
|
73
73
|
"ws": "^8.21.3",
|
|
74
|
-
"@devframes/plugin-git--assets": "0.9.
|
|
74
|
+
"@devframes/plugin-git--assets": "0.9.2"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "tsdown && pnpm run build:spa",
|