@rigstate/cli 0.7.23 → 0.7.24
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.cjs +104 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +104 -76
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/daemon/core.ts +30 -0
package/dist/index.js
CHANGED
|
@@ -287,10 +287,10 @@ async function syncProjectRules(projectId, apiKey, apiUrl, dryRun = false) {
|
|
|
287
287
|
const files = syncResponse.data.data.files;
|
|
288
288
|
if (files && Array.isArray(files)) {
|
|
289
289
|
const fs23 = await import("fs/promises");
|
|
290
|
-
const
|
|
290
|
+
const path26 = await import("path");
|
|
291
291
|
for (const file of files) {
|
|
292
|
-
const filePath =
|
|
293
|
-
await fs23.mkdir(
|
|
292
|
+
const filePath = path26.join(process.cwd(), file.path);
|
|
293
|
+
await fs23.mkdir(path26.dirname(filePath), { recursive: true });
|
|
294
294
|
await fs23.writeFile(filePath, file.content, "utf-8");
|
|
295
295
|
}
|
|
296
296
|
console.log(chalk3.dim(` \u{1F4BE} Wrote ${files.length} rule files to local .cursor/rules/`));
|
|
@@ -1533,10 +1533,10 @@ var require_src2 = __commonJS({
|
|
|
1533
1533
|
var fs_1 = __require("fs");
|
|
1534
1534
|
var debug_1 = __importDefault(require_src());
|
|
1535
1535
|
var log = debug_1.default("@kwsites/file-exists");
|
|
1536
|
-
function check(
|
|
1537
|
-
log(`checking %s`,
|
|
1536
|
+
function check(path26, isFile, isDirectory) {
|
|
1537
|
+
log(`checking %s`, path26);
|
|
1538
1538
|
try {
|
|
1539
|
-
const stat = fs_1.statSync(
|
|
1539
|
+
const stat = fs_1.statSync(path26);
|
|
1540
1540
|
if (stat.isFile() && isFile) {
|
|
1541
1541
|
log(`[OK] path represents a file`);
|
|
1542
1542
|
return true;
|
|
@@ -1556,8 +1556,8 @@ var require_src2 = __commonJS({
|
|
|
1556
1556
|
throw e;
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
|
-
function exists2(
|
|
1560
|
-
return check(
|
|
1559
|
+
function exists2(path26, type = exports.READABLE) {
|
|
1560
|
+
return check(path26, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
|
|
1561
1561
|
}
|
|
1562
1562
|
exports.exists = exists2;
|
|
1563
1563
|
exports.FILE = 1;
|
|
@@ -1627,7 +1627,7 @@ var require_package = __commonJS({
|
|
|
1627
1627
|
"package.json"(exports, module) {
|
|
1628
1628
|
module.exports = {
|
|
1629
1629
|
name: "@rigstate/cli",
|
|
1630
|
-
version: "0.7.
|
|
1630
|
+
version: "0.7.24",
|
|
1631
1631
|
description: "Rigstate CLI - Code audit, sync and supervision tool",
|
|
1632
1632
|
type: "module",
|
|
1633
1633
|
main: "./dist/index.js",
|
|
@@ -1807,16 +1807,16 @@ function createLinkCommand() {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
async function installHooks(cwd) {
|
|
1809
1809
|
const fs23 = await import("fs/promises");
|
|
1810
|
-
const
|
|
1810
|
+
const path26 = await import("path");
|
|
1811
1811
|
try {
|
|
1812
|
-
await fs23.access(
|
|
1812
|
+
await fs23.access(path26.join(cwd, ".git"));
|
|
1813
1813
|
} catch {
|
|
1814
1814
|
console.log(chalk5.dim(" (Not a git repository, skipping hooks)"));
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
1817
|
-
const hooksDir =
|
|
1817
|
+
const hooksDir = path26.join(cwd, ".husky");
|
|
1818
1818
|
try {
|
|
1819
|
-
const preCommitPath =
|
|
1819
|
+
const preCommitPath = path26.join(cwd, ".git/hooks/pre-commit");
|
|
1820
1820
|
try {
|
|
1821
1821
|
await fs23.access(preCommitPath);
|
|
1822
1822
|
console.log(chalk5.green(" \u2714 Git hooks already active"));
|
|
@@ -3227,7 +3227,7 @@ import { Command as Command11 } from "commander";
|
|
|
3227
3227
|
import chalk20 from "chalk";
|
|
3228
3228
|
import ora8 from "ora";
|
|
3229
3229
|
import fs18 from "fs/promises";
|
|
3230
|
-
import
|
|
3230
|
+
import path21 from "path";
|
|
3231
3231
|
import { execSync as execSync3 } from "child_process";
|
|
3232
3232
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
3233
3233
|
|
|
@@ -3238,6 +3238,7 @@ init_esm_shims();
|
|
|
3238
3238
|
init_esm_shims();
|
|
3239
3239
|
import chalk19 from "chalk";
|
|
3240
3240
|
import * as fs17 from "fs/promises";
|
|
3241
|
+
import path20 from "path";
|
|
3241
3242
|
import { EventEmitter as EventEmitter3 } from "events";
|
|
3242
3243
|
|
|
3243
3244
|
// src/daemon/file-watcher.ts
|
|
@@ -3905,6 +3906,7 @@ var GuardianDaemon = class extends EventEmitter3 {
|
|
|
3905
3906
|
}
|
|
3906
3907
|
}
|
|
3907
3908
|
this.printActive();
|
|
3909
|
+
await this.updateViolationReport([]);
|
|
3908
3910
|
this.emit("started", this.state);
|
|
3909
3911
|
}
|
|
3910
3912
|
printWelcome() {
|
|
@@ -3927,7 +3929,7 @@ var GuardianDaemon = class extends EventEmitter3 {
|
|
|
3927
3929
|
setupFileWatcher() {
|
|
3928
3930
|
Logger.info("Starting file watcher...");
|
|
3929
3931
|
this.fileWatcher = createFileWatcher(this.config.watchPath);
|
|
3930
|
-
this.fileWatcher.on("change", (
|
|
3932
|
+
this.fileWatcher.on("change", (path26) => this.handleFileChange(path26));
|
|
3931
3933
|
this.fileWatcher.start();
|
|
3932
3934
|
Logger.info("File watcher active");
|
|
3933
3935
|
}
|
|
@@ -3968,11 +3970,37 @@ var GuardianDaemon = class extends EventEmitter3 {
|
|
|
3968
3970
|
this.state.filesChecked++;
|
|
3969
3971
|
if (result.violations.length > 0) {
|
|
3970
3972
|
this.handleViolations(filePath, result.violations);
|
|
3973
|
+
} else {
|
|
3974
|
+
await this.updateViolationReport([]);
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3977
|
+
async updateViolationReport(violations) {
|
|
3978
|
+
const reportPath = path20.join(process.cwd(), ".rigstate", "ACTIVE_VIOLATIONS.md");
|
|
3979
|
+
let content = `# \u{1F6E1}\uFE0F Guardian Status: ${violations.length > 0 ? "\u26A0\uFE0F ATTENTION" : "\u2705 PASS"}
|
|
3980
|
+
|
|
3981
|
+
`;
|
|
3982
|
+
content += `*Last check: ${(/* @__PURE__ */ new Date()).toLocaleString()}*
|
|
3983
|
+
|
|
3984
|
+
`;
|
|
3985
|
+
if (violations.length === 0) {
|
|
3986
|
+
content += "All systems within architectural limits. Frank is satisfied. \u{1F92B}\n";
|
|
3987
|
+
} else {
|
|
3988
|
+
content += "### \u{1F6A8} Active Violations\n\n";
|
|
3989
|
+
for (const v of violations) {
|
|
3990
|
+
content += `- **[${v.severity.toUpperCase()}]**: ${v.message}
|
|
3991
|
+
`;
|
|
3992
|
+
}
|
|
3993
|
+
content += "\n---\n*Rigstate Daemon is watching. Fix violations to clear this report.*";
|
|
3994
|
+
}
|
|
3995
|
+
try {
|
|
3996
|
+
await fs17.writeFile(reportPath, content, "utf-8");
|
|
3997
|
+
} catch (e) {
|
|
3971
3998
|
}
|
|
3972
3999
|
}
|
|
3973
4000
|
handleViolations(filePath, violations) {
|
|
3974
4001
|
this.state.violationsFound += violations.length;
|
|
3975
4002
|
this.emit("violation", { file: filePath, violations });
|
|
4003
|
+
this.updateViolationReport(violations);
|
|
3976
4004
|
for (const v of violations) {
|
|
3977
4005
|
const level = v.severity === "critical" ? "error" : v.severity === "warning" ? "warn" : "info";
|
|
3978
4006
|
Logger[level](`[${v.severity.toUpperCase()}] ${filePath}: ${v.message}`);
|
|
@@ -4059,7 +4087,7 @@ function createDaemonCommand() {
|
|
|
4059
4087
|
}
|
|
4060
4088
|
const spinner = ora8();
|
|
4061
4089
|
try {
|
|
4062
|
-
const pidPath =
|
|
4090
|
+
const pidPath = path21.join(process.cwd(), PID_FILE);
|
|
4063
4091
|
try {
|
|
4064
4092
|
const content = await fs18.readFile(pidPath, "utf-8");
|
|
4065
4093
|
const pid = parseInt(content.trim(), 10);
|
|
@@ -4113,7 +4141,7 @@ function createDaemonCommand() {
|
|
|
4113
4141
|
}
|
|
4114
4142
|
async function isRunning() {
|
|
4115
4143
|
try {
|
|
4116
|
-
const pidPath =
|
|
4144
|
+
const pidPath = path21.join(process.cwd(), PID_FILE);
|
|
4117
4145
|
const content = await fs18.readFile(pidPath, "utf-8");
|
|
4118
4146
|
const pid = parseInt(content.trim(), 10);
|
|
4119
4147
|
try {
|
|
@@ -4129,25 +4157,25 @@ async function isRunning() {
|
|
|
4129
4157
|
}
|
|
4130
4158
|
async function writePidFile() {
|
|
4131
4159
|
try {
|
|
4132
|
-
const dir =
|
|
4160
|
+
const dir = path21.join(process.cwd(), ".rigstate");
|
|
4133
4161
|
await fs18.mkdir(dir, { recursive: true });
|
|
4134
|
-
await fs18.writeFile(
|
|
4162
|
+
await fs18.writeFile(path21.join(dir, "daemon.pid"), process.pid.toString());
|
|
4135
4163
|
} catch {
|
|
4136
4164
|
}
|
|
4137
4165
|
}
|
|
4138
4166
|
async function cleanupPidFile() {
|
|
4139
4167
|
try {
|
|
4140
|
-
await fs18.unlink(
|
|
4141
|
-
await fs18.unlink(
|
|
4168
|
+
await fs18.unlink(path21.join(process.cwd(), PID_FILE));
|
|
4169
|
+
await fs18.unlink(path21.join(process.cwd(), STATE_FILE));
|
|
4142
4170
|
} catch {
|
|
4143
4171
|
}
|
|
4144
4172
|
}
|
|
4145
4173
|
async function writeStateFile(state) {
|
|
4146
4174
|
try {
|
|
4147
|
-
const dir =
|
|
4175
|
+
const dir = path21.join(process.cwd(), ".rigstate");
|
|
4148
4176
|
await fs18.mkdir(dir, { recursive: true });
|
|
4149
4177
|
await fs18.writeFile(
|
|
4150
|
-
|
|
4178
|
+
path21.join(dir, "daemon.state.json"),
|
|
4151
4179
|
JSON.stringify(state, null, 2)
|
|
4152
4180
|
);
|
|
4153
4181
|
} catch {
|
|
@@ -4163,7 +4191,7 @@ async function showStatus() {
|
|
|
4163
4191
|
}
|
|
4164
4192
|
console.log(chalk20.green("Status: Running"));
|
|
4165
4193
|
try {
|
|
4166
|
-
const statePath =
|
|
4194
|
+
const statePath = path21.join(process.cwd(), STATE_FILE);
|
|
4167
4195
|
const content = await fs18.readFile(statePath, "utf-8");
|
|
4168
4196
|
const state = JSON.parse(content);
|
|
4169
4197
|
console.log(chalk20.dim("\u2500".repeat(40)));
|
|
@@ -4177,7 +4205,7 @@ async function showStatus() {
|
|
|
4177
4205
|
console.log(chalk20.dim("(State file not found)"));
|
|
4178
4206
|
}
|
|
4179
4207
|
try {
|
|
4180
|
-
const pidPath =
|
|
4208
|
+
const pidPath = path21.join(process.cwd(), PID_FILE);
|
|
4181
4209
|
const pid = await fs18.readFile(pidPath, "utf-8");
|
|
4182
4210
|
console.log(chalk20.dim(`PID: ${pid.trim()}`));
|
|
4183
4211
|
} catch {
|
|
@@ -4196,9 +4224,9 @@ async function enableDaemon() {
|
|
|
4196
4224
|
console.error(chalk20.red("\u274C Could not determine HOME directory."));
|
|
4197
4225
|
return;
|
|
4198
4226
|
}
|
|
4199
|
-
const agentsDir =
|
|
4200
|
-
const logDir =
|
|
4201
|
-
const plistPath =
|
|
4227
|
+
const agentsDir = path21.join(homeDir, "Library/LaunchAgents");
|
|
4228
|
+
const logDir = path21.join(homeDir, ".rigstate/logs");
|
|
4229
|
+
const plistPath = path21.join(agentsDir, "com.rigstate.daemon.plist");
|
|
4202
4230
|
await fs18.mkdir(agentsDir, { recursive: true });
|
|
4203
4231
|
await fs18.mkdir(logDir, { recursive: true });
|
|
4204
4232
|
const scriptPath = fileURLToPath2(import.meta.url);
|
|
@@ -4219,9 +4247,9 @@ async function enableDaemon() {
|
|
|
4219
4247
|
<key>WorkingDirectory</key>
|
|
4220
4248
|
<string>${process.cwd()}</string>
|
|
4221
4249
|
<key>StandardOutPath</key>
|
|
4222
|
-
<string>${
|
|
4250
|
+
<string>${path21.join(logDir, "daemon.out.log")}</string>
|
|
4223
4251
|
<key>StandardErrorPath</key>
|
|
4224
|
-
<string>${
|
|
4252
|
+
<string>${path21.join(logDir, "daemon.err.log")}</string>
|
|
4225
4253
|
<key>RunAtLoad</key>
|
|
4226
4254
|
<true/>
|
|
4227
4255
|
<key>KeepAlive</key>
|
|
@@ -4251,7 +4279,7 @@ async function enableDaemon() {
|
|
|
4251
4279
|
async function disableDaemon() {
|
|
4252
4280
|
console.log(chalk20.bold("\n\u2699\uFE0F Disabling Rigstate Background Service\n"));
|
|
4253
4281
|
const homeDir = process.env.HOME || "";
|
|
4254
|
-
const plistPath =
|
|
4282
|
+
const plistPath = path21.join(homeDir, "Library/LaunchAgents/com.rigstate.daemon.plist");
|
|
4255
4283
|
try {
|
|
4256
4284
|
await execShellCommand(`launchctl unload ${plistPath}`);
|
|
4257
4285
|
await fs18.unlink(plistPath);
|
|
@@ -4405,7 +4433,7 @@ import chalk22 from "chalk";
|
|
|
4405
4433
|
import ora10 from "ora";
|
|
4406
4434
|
import chokidar2 from "chokidar";
|
|
4407
4435
|
import fs19 from "fs/promises";
|
|
4408
|
-
import
|
|
4436
|
+
import path22 from "path";
|
|
4409
4437
|
import { execSync as execSync4 } from "child_process";
|
|
4410
4438
|
import axios16 from "axios";
|
|
4411
4439
|
function createWatchCommand() {
|
|
@@ -4425,7 +4453,7 @@ function createWatchCommand() {
|
|
|
4425
4453
|
projectId = getProjectId();
|
|
4426
4454
|
if (!projectId) {
|
|
4427
4455
|
try {
|
|
4428
|
-
const manifestPath =
|
|
4456
|
+
const manifestPath = path22.join(process.cwd(), ".rigstate");
|
|
4429
4457
|
const content = await fs19.readFile(manifestPath, "utf-8");
|
|
4430
4458
|
const manifest = JSON.parse(content);
|
|
4431
4459
|
projectId = manifest.project_id;
|
|
@@ -4472,7 +4500,7 @@ function createWatchCommand() {
|
|
|
4472
4500
|
};
|
|
4473
4501
|
const checkCriteria = async (criteria) => {
|
|
4474
4502
|
try {
|
|
4475
|
-
const fullPath =
|
|
4503
|
+
const fullPath = path22.resolve(process.cwd(), criteria.path);
|
|
4476
4504
|
switch (criteria.type) {
|
|
4477
4505
|
case "file_exists":
|
|
4478
4506
|
await fs19.access(fullPath);
|
|
@@ -4617,7 +4645,7 @@ import ora11 from "ora";
|
|
|
4617
4645
|
import axios17 from "axios";
|
|
4618
4646
|
import { execSync as execSync5 } from "child_process";
|
|
4619
4647
|
import fs20 from "fs/promises";
|
|
4620
|
-
import
|
|
4648
|
+
import path23 from "path";
|
|
4621
4649
|
function createFocusCommand() {
|
|
4622
4650
|
const focus = new Command14("focus");
|
|
4623
4651
|
focus.alias("task").description("Get the next active roadmap task and copy its prompt to clipboard").option("--no-copy", "Do not copy to clipboard").action(async (options) => {
|
|
@@ -4633,7 +4661,7 @@ function createFocusCommand() {
|
|
|
4633
4661
|
projectId = getProjectId();
|
|
4634
4662
|
if (!projectId) {
|
|
4635
4663
|
try {
|
|
4636
|
-
const manifestPath =
|
|
4664
|
+
const manifestPath = path23.join(process.cwd(), ".rigstate");
|
|
4637
4665
|
const content = await fs20.readFile(manifestPath, "utf-8");
|
|
4638
4666
|
const manifest = JSON.parse(content);
|
|
4639
4667
|
projectId = manifest.project_id;
|
|
@@ -4789,21 +4817,21 @@ init_config();
|
|
|
4789
4817
|
import { Command as Command16 } from "commander";
|
|
4790
4818
|
import chalk25 from "chalk";
|
|
4791
4819
|
import { spawn } from "child_process";
|
|
4792
|
-
import
|
|
4820
|
+
import path24 from "path";
|
|
4793
4821
|
import fs21 from "fs";
|
|
4794
4822
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
4795
4823
|
var __filename2 = fileURLToPath3(import.meta.url);
|
|
4796
|
-
var __dirname2 =
|
|
4824
|
+
var __dirname2 = path24.dirname(__filename2);
|
|
4797
4825
|
function createMcpCommand() {
|
|
4798
4826
|
const mcp = new Command16("mcp");
|
|
4799
4827
|
mcp.description("Run the Rigstate MCP server for AI editors").action(async () => {
|
|
4800
4828
|
const possiblePaths = [
|
|
4801
4829
|
// From packages/cli -> packages/mcp (sibling package)
|
|
4802
|
-
|
|
4830
|
+
path24.resolve(__dirname2, "../../mcp/dist/index.js"),
|
|
4803
4831
|
// If installed globally or via npm
|
|
4804
|
-
|
|
4832
|
+
path24.resolve(__dirname2, "../../../mcp/dist/index.js"),
|
|
4805
4833
|
// Development path from packages/cli/dist
|
|
4806
|
-
|
|
4834
|
+
path24.resolve(__dirname2, "../../../packages/mcp/dist/index.js")
|
|
4807
4835
|
];
|
|
4808
4836
|
let serverPath = "";
|
|
4809
4837
|
for (const p of possiblePaths) {
|
|
@@ -5247,7 +5275,7 @@ import chalk30 from "chalk";
|
|
|
5247
5275
|
import ora13 from "ora";
|
|
5248
5276
|
import inquirer5 from "inquirer";
|
|
5249
5277
|
import fs22 from "fs/promises";
|
|
5250
|
-
import
|
|
5278
|
+
import path25 from "path";
|
|
5251
5279
|
|
|
5252
5280
|
// ../../node_modules/simple-git/dist/esm/index.js
|
|
5253
5281
|
init_esm_shims();
|
|
@@ -5287,8 +5315,8 @@ function pathspec(...paths) {
|
|
|
5287
5315
|
cache.set(key, paths);
|
|
5288
5316
|
return key;
|
|
5289
5317
|
}
|
|
5290
|
-
function isPathSpec(
|
|
5291
|
-
return
|
|
5318
|
+
function isPathSpec(path26) {
|
|
5319
|
+
return path26 instanceof String && cache.has(path26);
|
|
5292
5320
|
}
|
|
5293
5321
|
function toPaths(pathSpec) {
|
|
5294
5322
|
return cache.get(pathSpec) || [];
|
|
@@ -5377,8 +5405,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
|
|
|
5377
5405
|
function forEachLineWithContent(input, callback) {
|
|
5378
5406
|
return toLinesWithContent(input, true).map((line) => callback(line));
|
|
5379
5407
|
}
|
|
5380
|
-
function folderExists(
|
|
5381
|
-
return (0, import_file_exists.exists)(
|
|
5408
|
+
function folderExists(path26) {
|
|
5409
|
+
return (0, import_file_exists.exists)(path26, import_file_exists.FOLDER);
|
|
5382
5410
|
}
|
|
5383
5411
|
function append(target, item) {
|
|
5384
5412
|
if (Array.isArray(target)) {
|
|
@@ -5782,8 +5810,8 @@ function checkIsRepoRootTask() {
|
|
|
5782
5810
|
commands,
|
|
5783
5811
|
format: "utf-8",
|
|
5784
5812
|
onError,
|
|
5785
|
-
parser(
|
|
5786
|
-
return /^\.(git)?$/.test(
|
|
5813
|
+
parser(path26) {
|
|
5814
|
+
return /^\.(git)?$/.test(path26.trim());
|
|
5787
5815
|
}
|
|
5788
5816
|
};
|
|
5789
5817
|
}
|
|
@@ -6217,11 +6245,11 @@ function parseGrep(grep) {
|
|
|
6217
6245
|
const paths = /* @__PURE__ */ new Set();
|
|
6218
6246
|
const results = {};
|
|
6219
6247
|
forEachLineWithContent(grep, (input) => {
|
|
6220
|
-
const [
|
|
6221
|
-
paths.add(
|
|
6222
|
-
(results[
|
|
6248
|
+
const [path26, line, preview] = input.split(NULL);
|
|
6249
|
+
paths.add(path26);
|
|
6250
|
+
(results[path26] = results[path26] || []).push({
|
|
6223
6251
|
line: asNumber(line),
|
|
6224
|
-
path:
|
|
6252
|
+
path: path26,
|
|
6225
6253
|
preview
|
|
6226
6254
|
});
|
|
6227
6255
|
});
|
|
@@ -6986,14 +7014,14 @@ var init_hash_object = __esm2({
|
|
|
6986
7014
|
init_task();
|
|
6987
7015
|
}
|
|
6988
7016
|
});
|
|
6989
|
-
function parseInit(bare,
|
|
7017
|
+
function parseInit(bare, path26, text) {
|
|
6990
7018
|
const response = String(text).trim();
|
|
6991
7019
|
let result;
|
|
6992
7020
|
if (result = initResponseRegex.exec(response)) {
|
|
6993
|
-
return new InitSummary(bare,
|
|
7021
|
+
return new InitSummary(bare, path26, false, result[1]);
|
|
6994
7022
|
}
|
|
6995
7023
|
if (result = reInitResponseRegex.exec(response)) {
|
|
6996
|
-
return new InitSummary(bare,
|
|
7024
|
+
return new InitSummary(bare, path26, true, result[1]);
|
|
6997
7025
|
}
|
|
6998
7026
|
let gitDir = "";
|
|
6999
7027
|
const tokens = response.split(" ");
|
|
@@ -7004,7 +7032,7 @@ function parseInit(bare, path25, text) {
|
|
|
7004
7032
|
break;
|
|
7005
7033
|
}
|
|
7006
7034
|
}
|
|
7007
|
-
return new InitSummary(bare,
|
|
7035
|
+
return new InitSummary(bare, path26, /^re/i.test(response), gitDir);
|
|
7008
7036
|
}
|
|
7009
7037
|
var InitSummary;
|
|
7010
7038
|
var initResponseRegex;
|
|
@@ -7013,9 +7041,9 @@ var init_InitSummary = __esm2({
|
|
|
7013
7041
|
"src/lib/responses/InitSummary.ts"() {
|
|
7014
7042
|
"use strict";
|
|
7015
7043
|
InitSummary = class {
|
|
7016
|
-
constructor(bare,
|
|
7044
|
+
constructor(bare, path26, existing, gitDir) {
|
|
7017
7045
|
this.bare = bare;
|
|
7018
|
-
this.path =
|
|
7046
|
+
this.path = path26;
|
|
7019
7047
|
this.existing = existing;
|
|
7020
7048
|
this.gitDir = gitDir;
|
|
7021
7049
|
}
|
|
@@ -7027,7 +7055,7 @@ var init_InitSummary = __esm2({
|
|
|
7027
7055
|
function hasBareCommand(command) {
|
|
7028
7056
|
return command.includes(bareCommand);
|
|
7029
7057
|
}
|
|
7030
|
-
function initTask(bare = false,
|
|
7058
|
+
function initTask(bare = false, path26, customArgs) {
|
|
7031
7059
|
const commands = ["init", ...customArgs];
|
|
7032
7060
|
if (bare && !hasBareCommand(commands)) {
|
|
7033
7061
|
commands.splice(1, 0, bareCommand);
|
|
@@ -7036,7 +7064,7 @@ function initTask(bare = false, path25, customArgs) {
|
|
|
7036
7064
|
commands,
|
|
7037
7065
|
format: "utf-8",
|
|
7038
7066
|
parser(text) {
|
|
7039
|
-
return parseInit(commands.includes("--bare"),
|
|
7067
|
+
return parseInit(commands.includes("--bare"), path26, text);
|
|
7040
7068
|
}
|
|
7041
7069
|
};
|
|
7042
7070
|
}
|
|
@@ -7852,12 +7880,12 @@ var init_FileStatusSummary = __esm2({
|
|
|
7852
7880
|
"use strict";
|
|
7853
7881
|
fromPathRegex = /^(.+)\0(.+)$/;
|
|
7854
7882
|
FileStatusSummary = class {
|
|
7855
|
-
constructor(
|
|
7856
|
-
this.path =
|
|
7883
|
+
constructor(path26, index, working_dir) {
|
|
7884
|
+
this.path = path26;
|
|
7857
7885
|
this.index = index;
|
|
7858
7886
|
this.working_dir = working_dir;
|
|
7859
7887
|
if (index === "R" || working_dir === "R") {
|
|
7860
|
-
const detail = fromPathRegex.exec(
|
|
7888
|
+
const detail = fromPathRegex.exec(path26) || [null, path26, path26];
|
|
7861
7889
|
this.from = detail[2] || "";
|
|
7862
7890
|
this.path = detail[1] || "";
|
|
7863
7891
|
}
|
|
@@ -7888,14 +7916,14 @@ function splitLine(result, lineStr) {
|
|
|
7888
7916
|
default:
|
|
7889
7917
|
return;
|
|
7890
7918
|
}
|
|
7891
|
-
function data(index, workingDir,
|
|
7919
|
+
function data(index, workingDir, path26) {
|
|
7892
7920
|
const raw = `${index}${workingDir}`;
|
|
7893
7921
|
const handler = parsers6.get(raw);
|
|
7894
7922
|
if (handler) {
|
|
7895
|
-
handler(result,
|
|
7923
|
+
handler(result, path26);
|
|
7896
7924
|
}
|
|
7897
7925
|
if (raw !== "##" && raw !== "!!") {
|
|
7898
|
-
result.files.push(new FileStatusSummary(
|
|
7926
|
+
result.files.push(new FileStatusSummary(path26, index, workingDir));
|
|
7899
7927
|
}
|
|
7900
7928
|
}
|
|
7901
7929
|
}
|
|
@@ -8208,9 +8236,9 @@ var init_simple_git_api = __esm2({
|
|
|
8208
8236
|
next
|
|
8209
8237
|
);
|
|
8210
8238
|
}
|
|
8211
|
-
hashObject(
|
|
8239
|
+
hashObject(path26, write) {
|
|
8212
8240
|
return this._runTask(
|
|
8213
|
-
hashObjectTask(
|
|
8241
|
+
hashObjectTask(path26, write === true),
|
|
8214
8242
|
trailingFunctionArgument(arguments)
|
|
8215
8243
|
);
|
|
8216
8244
|
}
|
|
@@ -8563,8 +8591,8 @@ var init_branch = __esm2({
|
|
|
8563
8591
|
}
|
|
8564
8592
|
});
|
|
8565
8593
|
function toPath(input) {
|
|
8566
|
-
const
|
|
8567
|
-
return
|
|
8594
|
+
const path26 = input.trim().replace(/^["']|["']$/g, "");
|
|
8595
|
+
return path26 && normalize(path26);
|
|
8568
8596
|
}
|
|
8569
8597
|
var parseCheckIgnore;
|
|
8570
8598
|
var init_CheckIgnore = __esm2({
|
|
@@ -8878,8 +8906,8 @@ __export2(sub_module_exports, {
|
|
|
8878
8906
|
subModuleTask: () => subModuleTask,
|
|
8879
8907
|
updateSubModuleTask: () => updateSubModuleTask
|
|
8880
8908
|
});
|
|
8881
|
-
function addSubModuleTask(repo,
|
|
8882
|
-
return subModuleTask(["add", repo,
|
|
8909
|
+
function addSubModuleTask(repo, path26) {
|
|
8910
|
+
return subModuleTask(["add", repo, path26]);
|
|
8883
8911
|
}
|
|
8884
8912
|
function initSubModuleTask(customArgs) {
|
|
8885
8913
|
return subModuleTask(["init", ...customArgs]);
|
|
@@ -9209,8 +9237,8 @@ var require_git = __commonJS2({
|
|
|
9209
9237
|
}
|
|
9210
9238
|
return this._runTask(straightThroughStringTask2(command, this._trimmed), next);
|
|
9211
9239
|
};
|
|
9212
|
-
Git2.prototype.submoduleAdd = function(repo,
|
|
9213
|
-
return this._runTask(addSubModuleTask2(repo,
|
|
9240
|
+
Git2.prototype.submoduleAdd = function(repo, path26, then) {
|
|
9241
|
+
return this._runTask(addSubModuleTask2(repo, path26), trailingFunctionArgument2(arguments));
|
|
9214
9242
|
};
|
|
9215
9243
|
Git2.prototype.submoduleUpdate = function(args, then) {
|
|
9216
9244
|
return this._runTask(
|
|
@@ -9810,7 +9838,7 @@ function createReleaseCommand() {
|
|
|
9810
9838
|
return;
|
|
9811
9839
|
}
|
|
9812
9840
|
spinner.text = "Scanning completed tasks...";
|
|
9813
|
-
const pkgPath =
|
|
9841
|
+
const pkgPath = path25.resolve(process.cwd(), "package.json");
|
|
9814
9842
|
const pkgContent = await fs22.readFile(pkgPath, "utf-8");
|
|
9815
9843
|
const pkg2 = JSON.parse(pkgContent);
|
|
9816
9844
|
const currentVersion = pkg2.version;
|
|
@@ -9832,7 +9860,7 @@ function createReleaseCommand() {
|
|
|
9832
9860
|
}
|
|
9833
9861
|
pkg2.version = newVersion;
|
|
9834
9862
|
await fs22.writeFile(pkgPath, JSON.stringify(pkg2, null, 4));
|
|
9835
|
-
const changelogPath =
|
|
9863
|
+
const changelogPath = path25.resolve(process.cwd(), "CHANGELOG.md");
|
|
9836
9864
|
const date = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
9837
9865
|
const entry = `
|
|
9838
9866
|
## [${newVersion}] - ${date}
|