rudel 0.1.3 → 0.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/cli.js +16 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1820,11 +1820,18 @@ async function run(app, inputs, context) {
|
|
|
1820
1820
|
}
|
|
1821
1821
|
|
|
1822
1822
|
// src/lib/claude-settings.ts
|
|
1823
|
-
import {
|
|
1823
|
+
import { execSync } from "child_process";
|
|
1824
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
1824
1825
|
import { join } from "path";
|
|
1825
1826
|
var HOOK_COMMAND = "rudel hooks claude session-end";
|
|
1827
|
+
function findGitRoot() {
|
|
1828
|
+
return execSync("git rev-parse --show-toplevel", {
|
|
1829
|
+
encoding: "utf-8"
|
|
1830
|
+
}).trim();
|
|
1831
|
+
}
|
|
1826
1832
|
function getClaudeSettingsPath() {
|
|
1827
|
-
|
|
1833
|
+
const root = findGitRoot();
|
|
1834
|
+
return join(root, ".claude", "settings.json");
|
|
1828
1835
|
}
|
|
1829
1836
|
function readClaudeSettings() {
|
|
1830
1837
|
const path = getClaudeSettingsPath();
|
|
@@ -1835,6 +1842,10 @@ function readClaudeSettings() {
|
|
|
1835
1842
|
}
|
|
1836
1843
|
function writeClaudeSettings(settings) {
|
|
1837
1844
|
const path = getClaudeSettingsPath();
|
|
1845
|
+
const dir = join(path, "..");
|
|
1846
|
+
if (!existsSync(dir)) {
|
|
1847
|
+
mkdirSync(dir, { recursive: true });
|
|
1848
|
+
}
|
|
1838
1849
|
writeFileSync(path, `${JSON.stringify(settings, null, 2)}
|
|
1839
1850
|
`);
|
|
1840
1851
|
}
|
|
@@ -1900,7 +1911,7 @@ var disableCommand = buildCommand({
|
|
|
1900
1911
|
// src/lib/credentials.ts
|
|
1901
1912
|
import {
|
|
1902
1913
|
existsSync as existsSync2,
|
|
1903
|
-
mkdirSync,
|
|
1914
|
+
mkdirSync as mkdirSync2,
|
|
1904
1915
|
readFileSync as readFileSync2,
|
|
1905
1916
|
rmSync,
|
|
1906
1917
|
writeFileSync as writeFileSync2
|
|
@@ -1915,7 +1926,7 @@ function getCredentialsPath() {
|
|
|
1915
1926
|
function saveCredentials(token, apiBaseUrl) {
|
|
1916
1927
|
const dir = getConfigDir();
|
|
1917
1928
|
if (!existsSync2(dir)) {
|
|
1918
|
-
|
|
1929
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
1919
1930
|
}
|
|
1920
1931
|
const data = { token, apiBaseUrl };
|
|
1921
1932
|
writeFileSync2(getCredentialsPath(), JSON.stringify(data, null, 2), {
|
|
@@ -4112,7 +4123,7 @@ var routes = buildRouteMap({
|
|
|
4112
4123
|
var app = buildApplication(routes, {
|
|
4113
4124
|
name: "rudel",
|
|
4114
4125
|
versionInfo: {
|
|
4115
|
-
currentVersion: "0.1.
|
|
4126
|
+
currentVersion: "0.1.4"
|
|
4116
4127
|
},
|
|
4117
4128
|
scanner: {
|
|
4118
4129
|
caseStyle: "allow-kebab-for-camel"
|