@markmdev/pebble 0.1.13 → 0.1.15
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/index.js +22 -4
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -8,6 +8,9 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
8
8
|
|
|
9
9
|
// src/cli/index.ts
|
|
10
10
|
import { Command } from "commander";
|
|
11
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
12
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
13
|
+
import { dirname as dirname2, join as join3 } from "path";
|
|
11
14
|
|
|
12
15
|
// src/shared/types.ts
|
|
13
16
|
var ISSUE_TYPES = ["task", "bug", "epic", "verification"];
|
|
@@ -119,6 +122,18 @@ function resolveWorktreePebbleDir(localPebbleDir) {
|
|
|
119
122
|
return localPebbleDir;
|
|
120
123
|
}
|
|
121
124
|
function discoverPebbleDir(startDir = process.cwd()) {
|
|
125
|
+
if (process.env.PEBBLE_LOCAL !== "1") {
|
|
126
|
+
const mainRoot = getMainWorktreeRoot();
|
|
127
|
+
if (mainRoot) {
|
|
128
|
+
const mainPebble = path2.join(mainRoot, PEBBLE_DIR);
|
|
129
|
+
if (fs.existsSync(mainPebble) && fs.statSync(mainPebble).isDirectory()) {
|
|
130
|
+
const config = getConfigSafe(mainPebble);
|
|
131
|
+
if (config?.useMainTreePebble !== false) {
|
|
132
|
+
return mainPebble;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
122
137
|
let currentDir = path2.resolve(startDir);
|
|
123
138
|
const root = path2.parse(currentDir).root;
|
|
124
139
|
while (currentDir !== root) {
|
|
@@ -3037,9 +3052,9 @@ data: ${message}
|
|
|
3037
3052
|
res.status(500).json({ error: error.message });
|
|
3038
3053
|
}
|
|
3039
3054
|
});
|
|
3040
|
-
const
|
|
3041
|
-
const
|
|
3042
|
-
const uiPath = path3.resolve(
|
|
3055
|
+
const __filename3 = fileURLToPath(import.meta.url);
|
|
3056
|
+
const __dirname3 = path3.dirname(__filename3);
|
|
3057
|
+
const uiPath = path3.resolve(__dirname3, "../ui");
|
|
3043
3058
|
app.use(express.static(uiPath));
|
|
3044
3059
|
app.get("*", (_req, res) => {
|
|
3045
3060
|
res.sendFile(path3.join(uiPath, "index.html"));
|
|
@@ -3725,8 +3740,11 @@ function initCommand(program2) {
|
|
|
3725
3740
|
}
|
|
3726
3741
|
|
|
3727
3742
|
// src/cli/index.ts
|
|
3743
|
+
var __filename2 = fileURLToPath2(import.meta.url);
|
|
3744
|
+
var __dirname2 = dirname2(__filename2);
|
|
3745
|
+
var packageJson = JSON.parse(readFileSync2(join3(__dirname2, "../../package.json"), "utf-8"));
|
|
3728
3746
|
var program = new Command();
|
|
3729
|
-
program.name("pebble").description("A lightweight JSONL-based issue tracker").version(
|
|
3747
|
+
program.name("pebble").description("A lightweight JSONL-based issue tracker").version(packageJson.version);
|
|
3730
3748
|
program.option("-P, --pretty", "Human-readable output (default: JSON)");
|
|
3731
3749
|
program.option("--json", "JSON output (this is the default, flag not needed)");
|
|
3732
3750
|
program.option("--local", "Use local .pebble directory even in a git worktree");
|