@miketromba/issy-app 0.1.6 → 0.1.8
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/app.js +8 -8
- package/dist/server.js +20 -0
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -37,6 +37,20 @@ function findIssuesDirUpward(fromPath) {
|
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
+
function findGitRoot(fromPath) {
|
|
41
|
+
let current = resolve(fromPath);
|
|
42
|
+
for (let i = 0;i < 20; i++) {
|
|
43
|
+
const gitDir = join(current, ".git");
|
|
44
|
+
if (existsSync(gitDir)) {
|
|
45
|
+
return current;
|
|
46
|
+
}
|
|
47
|
+
const parent = dirname(current);
|
|
48
|
+
if (parent === current)
|
|
49
|
+
break;
|
|
50
|
+
current = parent;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
40
54
|
function resolveIssuesDir() {
|
|
41
55
|
if (process.env.ISSUES_DIR) {
|
|
42
56
|
const dir = resolve(process.env.ISSUES_DIR);
|
|
@@ -49,6 +63,12 @@ function resolveIssuesDir() {
|
|
|
49
63
|
setIssuesDir(found);
|
|
50
64
|
return found;
|
|
51
65
|
}
|
|
66
|
+
const gitRoot = findGitRoot(startDir);
|
|
67
|
+
if (gitRoot) {
|
|
68
|
+
const gitIssuesDir = join(gitRoot, ".issues");
|
|
69
|
+
setIssuesDir(gitIssuesDir);
|
|
70
|
+
return gitIssuesDir;
|
|
71
|
+
}
|
|
52
72
|
const fallback = join(resolve(startDir), ".issues");
|
|
53
73
|
setIssuesDir(fallback);
|
|
54
74
|
return fallback;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miketromba/issy-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Local web UI and API server for issy",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": ">=18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@miketromba/issy-core": "^0.1.
|
|
38
|
+
"@miketromba/issy-core": "^0.1.8"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@tailwindcss/typography": "^0.5.16",
|