ccraft 1.0.0 → 1.0.1
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/bin/claude-craft.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccraft",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Intelligent Claude Code project configurator — role-aware agents, skills, rules, MCPs, and workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"ccraft": "./bin/claude-craft.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin/",
|
package/src/commands/auth.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auth command — store API key for claude-craft server.
|
|
3
3
|
*
|
|
4
|
-
* Usage:
|
|
4
|
+
* Usage: ccraft auth <key> [-s <server-url>]
|
|
5
5
|
*/
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import { validateKey, saveConfig, loadConfig, ApiError } from '../utils/api-client.js';
|
package/src/commands/logout.js
CHANGED
package/src/commands/update.js
CHANGED
|
@@ -141,7 +141,7 @@ export async function runUpdate(options = {}) {
|
|
|
141
141
|
|
|
142
142
|
if (!storedProfile) {
|
|
143
143
|
logger.error(
|
|
144
|
-
'No stored user profile found. Re-run: ' + chalk.bold('
|
|
144
|
+
'No stored user profile found. Re-run: ' + chalk.bold('ccraft install') +
|
|
145
145
|
' to rebuild the profile cache.',
|
|
146
146
|
);
|
|
147
147
|
process.exit(1);
|
|
@@ -149,7 +149,7 @@ export async function runUpdate(options = {}) {
|
|
|
149
149
|
|
|
150
150
|
if (!previousAnalysis) {
|
|
151
151
|
logger.error(
|
|
152
|
-
'No stored project analysis found. Re-run: ' + chalk.bold('
|
|
152
|
+
'No stored project analysis found. Re-run: ' + chalk.bold('ccraft install') +
|
|
153
153
|
' to rebuild the analysis cache.',
|
|
154
154
|
);
|
|
155
155
|
process.exit(1);
|
package/src/utils/api-client.js
CHANGED
|
@@ -54,7 +54,7 @@ export async function callGenerate(profile, analysis, options = {}) {
|
|
|
54
54
|
const config = loadConfig();
|
|
55
55
|
if (!config?.apiKey) {
|
|
56
56
|
throw new ApiError(
|
|
57
|
-
'No API key configured. Run:
|
|
57
|
+
'No API key configured. Run: ccraft auth <key>',
|
|
58
58
|
'NO_API_KEY',
|
|
59
59
|
);
|
|
60
60
|
}
|
|
@@ -99,13 +99,13 @@ export async function callGenerate(profile, analysis, options = {}) {
|
|
|
99
99
|
case 401:
|
|
100
100
|
case 403:
|
|
101
101
|
throw new ApiError(
|
|
102
|
-
body.error || 'API key invalid or expired. Run:
|
|
102
|
+
body.error || 'API key invalid or expired. Run: ccraft auth <new-key>',
|
|
103
103
|
'AUTH_ERROR',
|
|
104
104
|
res.status,
|
|
105
105
|
);
|
|
106
106
|
case 426:
|
|
107
107
|
throw new ApiError(
|
|
108
|
-
body.error || 'Client incompatible with server. Run: npm update -g
|
|
108
|
+
body.error || 'Client incompatible with server. Run: npm update -g ccraft',
|
|
109
109
|
'VERSION_MISMATCH',
|
|
110
110
|
426,
|
|
111
111
|
);
|
|
@@ -141,7 +141,7 @@ export async function callUpdate(profile, currentAnalysis, previousAnalysis, ins
|
|
|
141
141
|
const config = loadConfig();
|
|
142
142
|
if (!config?.apiKey) {
|
|
143
143
|
throw new ApiError(
|
|
144
|
-
'No API key configured. Run:
|
|
144
|
+
'No API key configured. Run: ccraft auth <key>',
|
|
145
145
|
'NO_API_KEY',
|
|
146
146
|
);
|
|
147
147
|
}
|
|
@@ -186,13 +186,13 @@ export async function callUpdate(profile, currentAnalysis, previousAnalysis, ins
|
|
|
186
186
|
case 401:
|
|
187
187
|
case 403:
|
|
188
188
|
throw new ApiError(
|
|
189
|
-
body.error || 'API key invalid or expired. Run:
|
|
189
|
+
body.error || 'API key invalid or expired. Run: ccraft auth <new-key>',
|
|
190
190
|
'AUTH_ERROR',
|
|
191
191
|
res.status,
|
|
192
192
|
);
|
|
193
193
|
case 426:
|
|
194
194
|
throw new ApiError(
|
|
195
|
-
body.error || 'Client incompatible with server. Run: npm update -g
|
|
195
|
+
body.error || 'Client incompatible with server. Run: npm update -g ccraft',
|
|
196
196
|
'VERSION_MISMATCH',
|
|
197
197
|
426,
|
|
198
198
|
);
|
package/src/utils/preflight.js
CHANGED
|
@@ -58,7 +58,7 @@ export async function runPreflight(options = {}) {
|
|
|
58
58
|
console.log(' ' + dotPad('claude-craft project', colors.success('ok')));
|
|
59
59
|
} else {
|
|
60
60
|
console.log(' ' + dotPad('claude-craft project', colors.error('not found')));
|
|
61
|
-
envErrors.push('No claude-craft project found. Run:
|
|
61
|
+
envErrors.push('No claude-craft project found. Run: ccraft install first.');
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -70,7 +70,7 @@ export async function runPreflight(options = {}) {
|
|
|
70
70
|
apiConfig = await promptForApiKey();
|
|
71
71
|
} else {
|
|
72
72
|
console.log(' ' + dotPad('API key', colors.error('missing')));
|
|
73
|
-
envErrors.push('No API key configured. Run:
|
|
73
|
+
envErrors.push('No API key configured. Run: ccraft auth <key>');
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -84,7 +84,7 @@ export async function runPreflight(options = {}) {
|
|
|
84
84
|
console.log(' ' + dotPad('API key', colors.success('valid')));
|
|
85
85
|
} else {
|
|
86
86
|
console.log(' ' + dotPad('API key', colors.error('invalid')));
|
|
87
|
-
envErrors.push('API key is invalid or expired. Run:
|
|
87
|
+
envErrors.push('API key is invalid or expired. Run: ccraft auth <new-key>');
|
|
88
88
|
}
|
|
89
89
|
} catch (err) {
|
|
90
90
|
if (err instanceof ApiError && err.code === 'NETWORK_ERROR') {
|
|
@@ -21,7 +21,7 @@ export async function promptForApiKey() {
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
if (!key || !key.trim()) {
|
|
24
|
-
logger.error('No key provided. Run: ' + chalk.bold('
|
|
24
|
+
logger.error('No key provided. Run: ' + chalk.bold('ccraft auth <key>'));
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
|