@delorenj/pjangler 1.1.3 → 1.1.4
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 +30 -8
- package/dist/mcp-server.js +30 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -55,8 +55,8 @@ var Command = class {
|
|
|
55
55
|
}
|
|
56
56
|
fileExists(filePath) {
|
|
57
57
|
const { existsSync: existsSync6 } = __require("fs");
|
|
58
|
-
const { join:
|
|
59
|
-
const fullPath =
|
|
58
|
+
const { join: join8 } = __require("path");
|
|
59
|
+
const fullPath = join8(this.context.targetDir, filePath);
|
|
60
60
|
return existsSync6(fullPath);
|
|
61
61
|
}
|
|
62
62
|
writeFile(filePath, content) {
|
|
@@ -64,9 +64,9 @@ var Command = class {
|
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const { writeFileSync: writeFileSync3, mkdirSync: mkdirSync4 } = __require("fs");
|
|
67
|
-
const { join:
|
|
68
|
-
const fullPath =
|
|
69
|
-
const dir =
|
|
67
|
+
const { join: join8, dirname: dirname5 } = __require("path");
|
|
68
|
+
const fullPath = join8(this.context.targetDir, filePath);
|
|
69
|
+
const dir = dirname5(fullPath);
|
|
70
70
|
mkdirSync4(dir, { recursive: true });
|
|
71
71
|
writeFileSync3(fullPath, content);
|
|
72
72
|
}
|
|
@@ -75,8 +75,8 @@ var Command = class {
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
const { mkdirSync: mkdirSync4 } = __require("fs");
|
|
78
|
-
const { join:
|
|
79
|
-
const fullPath =
|
|
78
|
+
const { join: join8 } = __require("path");
|
|
79
|
+
const fullPath = join8(this.context.targetDir, dirPath);
|
|
80
80
|
mkdirSync4(fullPath, { recursive: true });
|
|
81
81
|
}
|
|
82
82
|
};
|
|
@@ -2363,9 +2363,31 @@ function formatMigrationReport(report) {
|
|
|
2363
2363
|
`;
|
|
2364
2364
|
}
|
|
2365
2365
|
|
|
2366
|
+
// src/utils/version.ts
|
|
2367
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
2368
|
+
import { dirname as dirname4, join as join7 } from "node:path";
|
|
2369
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
2370
|
+
var PJANGLER_VERSION = (() => {
|
|
2371
|
+
try {
|
|
2372
|
+
let dir = dirname4(fileURLToPath3(import.meta.url));
|
|
2373
|
+
for (let i = 0; i < 4; i++) {
|
|
2374
|
+
try {
|
|
2375
|
+
const raw = readFileSync3(join7(dir, "package.json"), "utf8");
|
|
2376
|
+
return JSON.parse(raw).version ?? "0.0.0";
|
|
2377
|
+
} catch {
|
|
2378
|
+
const parent = dirname4(dir);
|
|
2379
|
+
if (parent === dir) break;
|
|
2380
|
+
dir = parent;
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
} catch {
|
|
2384
|
+
}
|
|
2385
|
+
return "0.0.0";
|
|
2386
|
+
})();
|
|
2387
|
+
|
|
2366
2388
|
// src/index.ts
|
|
2367
2389
|
var program = new Command3();
|
|
2368
|
-
program.name("pjangler").description("Project subsystem bootstrapper CLI").version(
|
|
2390
|
+
program.name("pjangler").description("Project subsystem bootstrapper CLI").version(PJANGLER_VERSION);
|
|
2369
2391
|
program.command("init").argument("<subsystem>", "Subsystem to initialize").description("Initialize a project subsystem").option("--dry-run", "Preview changes without writing files").option("-f, --force", "Overwrite existing files").action(async (subsystem, options) => {
|
|
2370
2392
|
const context = {
|
|
2371
2393
|
targetDir: process.cwd(),
|
package/dist/mcp-server.js
CHANGED
|
@@ -27,8 +27,8 @@ var Command = class {
|
|
|
27
27
|
}
|
|
28
28
|
fileExists(filePath) {
|
|
29
29
|
const { existsSync: existsSync6 } = __require("fs");
|
|
30
|
-
const { join:
|
|
31
|
-
const fullPath =
|
|
30
|
+
const { join: join7 } = __require("path");
|
|
31
|
+
const fullPath = join7(this.context.targetDir, filePath);
|
|
32
32
|
return existsSync6(fullPath);
|
|
33
33
|
}
|
|
34
34
|
writeFile(filePath, content) {
|
|
@@ -36,9 +36,9 @@ var Command = class {
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
const { writeFileSync: writeFileSync2, mkdirSync: mkdirSync3 } = __require("fs");
|
|
39
|
-
const { join:
|
|
40
|
-
const fullPath =
|
|
41
|
-
const dir =
|
|
39
|
+
const { join: join7, dirname: dirname4 } = __require("path");
|
|
40
|
+
const fullPath = join7(this.context.targetDir, filePath);
|
|
41
|
+
const dir = dirname4(fullPath);
|
|
42
42
|
mkdirSync3(dir, { recursive: true });
|
|
43
43
|
writeFileSync2(fullPath, content);
|
|
44
44
|
}
|
|
@@ -47,8 +47,8 @@ var Command = class {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const { mkdirSync: mkdirSync3 } = __require("fs");
|
|
50
|
-
const { join:
|
|
51
|
-
const fullPath =
|
|
50
|
+
const { join: join7 } = __require("path");
|
|
51
|
+
const fullPath = join7(this.context.targetDir, dirPath);
|
|
52
52
|
mkdirSync3(fullPath, { recursive: true });
|
|
53
53
|
}
|
|
54
54
|
};
|
|
@@ -1248,10 +1248,32 @@ function createRecipe(name, context) {
|
|
|
1248
1248
|
return new info.class(context);
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
|
+
// src/utils/version.ts
|
|
1252
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1253
|
+
import { dirname as dirname3, join as join6 } from "node:path";
|
|
1254
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
1255
|
+
var PJANGLER_VERSION = (() => {
|
|
1256
|
+
try {
|
|
1257
|
+
let dir = dirname3(fileURLToPath2(import.meta.url));
|
|
1258
|
+
for (let i = 0; i < 4; i++) {
|
|
1259
|
+
try {
|
|
1260
|
+
const raw = readFileSync2(join6(dir, "package.json"), "utf8");
|
|
1261
|
+
return JSON.parse(raw).version ?? "0.0.0";
|
|
1262
|
+
} catch {
|
|
1263
|
+
const parent = dirname3(dir);
|
|
1264
|
+
if (parent === dir) break;
|
|
1265
|
+
dir = parent;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
} catch {
|
|
1269
|
+
}
|
|
1270
|
+
return "0.0.0";
|
|
1271
|
+
})();
|
|
1272
|
+
|
|
1251
1273
|
// src/mcp-server.ts
|
|
1252
1274
|
var server = new McpServer({
|
|
1253
1275
|
name: "pjangler-mcp",
|
|
1254
|
-
version:
|
|
1276
|
+
version: PJANGLER_VERSION
|
|
1255
1277
|
});
|
|
1256
1278
|
function resolveTargetDir(targetDir) {
|
|
1257
1279
|
const dir = resolve(targetDir ?? process.cwd());
|