claude-use 2.0.1 → 2.0.2
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.cjs +20 -7
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -221857,7 +221857,7 @@ var categories_default_default = {
|
|
|
221857
221857
|
// package.json
|
|
221858
221858
|
var package_default = {
|
|
221859
221859
|
name: "claude-use",
|
|
221860
|
-
version: "2.0.
|
|
221860
|
+
version: "2.0.2",
|
|
221861
221861
|
description: "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
221862
221862
|
license: "Apache-2.0",
|
|
221863
221863
|
author: "Joseph Mearman <joseph@mearman.co.uk>",
|
|
@@ -240354,11 +240354,15 @@ function createProfile(paths, name, extendsList) {
|
|
|
240354
240354
|
if (profileExists(paths, name)) {
|
|
240355
240355
|
throw new ProfileAlreadyExistsError(name);
|
|
240356
240356
|
}
|
|
240357
|
-
const
|
|
240357
|
+
const filePath = profileJsonPath(paths, name);
|
|
240358
|
+
const parsed = ConfigProfileSchema.safeParse(
|
|
240358
240359
|
extendsList !== void 0 && extendsList.length > 0 ? { extends: [...extendsList] } : {}
|
|
240359
240360
|
);
|
|
240360
|
-
|
|
240361
|
-
|
|
240361
|
+
if (!parsed.success) {
|
|
240362
|
+
throw new ConfigValidationError(filePath, parsed.error.issues);
|
|
240363
|
+
}
|
|
240364
|
+
writeJsonAtomic(filePath, parsed.data);
|
|
240365
|
+
return parsed.data;
|
|
240362
240366
|
}
|
|
240363
240367
|
function listProfiles(paths) {
|
|
240364
240368
|
if (!import_node_fs4.default.existsSync(paths.configProfilesDir)) {
|
|
@@ -240732,19 +240736,28 @@ var DirectoryRuleNotFoundError = class extends CliError {
|
|
|
240732
240736
|
}
|
|
240733
240737
|
rulePath;
|
|
240734
240738
|
};
|
|
240739
|
+
var DirectoryRuleMissingTargetError = class extends CliError {
|
|
240740
|
+
constructor() {
|
|
240741
|
+
super("A directory rule must set at least one of --profile or --identity.");
|
|
240742
|
+
this.name = "DirectoryRuleMissingTargetError";
|
|
240743
|
+
}
|
|
240744
|
+
};
|
|
240735
240745
|
function readDirectoryRules(paths) {
|
|
240736
240746
|
return readJson(paths.directoryRulesFile, DirectoryRulesSchema) ?? { rules: [] };
|
|
240737
240747
|
}
|
|
240738
240748
|
function writeDirectoryRules(paths, rules) {
|
|
240739
|
-
const
|
|
240740
|
-
|
|
240749
|
+
const parsed = DirectoryRulesSchema.safeParse(rules);
|
|
240750
|
+
if (!parsed.success) {
|
|
240751
|
+
throw new ConfigValidationError(paths.directoryRulesFile, parsed.error.issues);
|
|
240752
|
+
}
|
|
240753
|
+
writeJsonAtomic(paths.directoryRulesFile, parsed.data);
|
|
240741
240754
|
}
|
|
240742
240755
|
function listDirectoryRules(paths) {
|
|
240743
240756
|
return readDirectoryRules(paths).rules;
|
|
240744
240757
|
}
|
|
240745
240758
|
function addDirectoryRule(paths, rulePath, options) {
|
|
240746
240759
|
if (options.configProfile === void 0 && options.identity === void 0) {
|
|
240747
|
-
throw new
|
|
240760
|
+
throw new DirectoryRuleMissingTargetError();
|
|
240748
240761
|
}
|
|
240749
240762
|
const current = readDirectoryRules(paths);
|
|
240750
240763
|
const existingIndex = current.rules.findIndex((rule) => rule.path === rulePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-use",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A profile manager and launcher for Claude Code that lets one person run multiple logins from one machine while controlling what gets shared between them.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Joseph Mearman <joseph@mearman.co.uk>",
|