@claudetools/tools 0.3.6 → 0.3.7
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/helpers/config.js +12 -4
- package/package.json +1 -1
package/dist/helpers/config.js
CHANGED
|
@@ -143,8 +143,12 @@ export function getDefaultProjectId() {
|
|
|
143
143
|
// Try config first
|
|
144
144
|
if (config.defaultProjectId) {
|
|
145
145
|
if (!isValidProjectId(config.defaultProjectId)) {
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
// Legacy format - convert to local_ format instead of throwing
|
|
147
|
+
const sanitized = config.defaultProjectId.toLowerCase().replace(/[^a-z0-9]/g, '_');
|
|
148
|
+
_defaultProjectId = `local_${sanitized}`;
|
|
149
|
+
console.error(`[claudetools] Warning: Legacy project ID "${config.defaultProjectId}" ` +
|
|
150
|
+
`converted to "${_defaultProjectId}". Run "claudetools cleanup" to fix config.`);
|
|
151
|
+
return _defaultProjectId;
|
|
148
152
|
}
|
|
149
153
|
_defaultProjectId = config.defaultProjectId;
|
|
150
154
|
return _defaultProjectId;
|
|
@@ -163,8 +167,12 @@ export async function getDefaultProjectIdAsync() {
|
|
|
163
167
|
// Try config first
|
|
164
168
|
if (config.defaultProjectId) {
|
|
165
169
|
if (!isValidProjectId(config.defaultProjectId)) {
|
|
166
|
-
|
|
167
|
-
|
|
170
|
+
// Legacy format - convert to local_ format instead of throwing
|
|
171
|
+
const sanitized = config.defaultProjectId.toLowerCase().replace(/[^a-z0-9]/g, '_');
|
|
172
|
+
_defaultProjectId = `local_${sanitized}`;
|
|
173
|
+
console.error(`[claudetools] Warning: Legacy project ID "${config.defaultProjectId}" ` +
|
|
174
|
+
`converted to "${_defaultProjectId}". Run "claudetools cleanup" to fix config.`);
|
|
175
|
+
return _defaultProjectId;
|
|
168
176
|
}
|
|
169
177
|
_defaultProjectId = config.defaultProjectId;
|
|
170
178
|
return _defaultProjectId;
|