create-universal-ai-context 2.2.1 → 2.2.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.
|
@@ -9,7 +9,7 @@ const fs = require('fs');
|
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const crypto = require('crypto');
|
|
11
11
|
const { getAdapter, getAllAdapters, getAdapterNames } = require('../adapters');
|
|
12
|
-
const {
|
|
12
|
+
const { analyzeCodebase } = require('../static-analyzer');
|
|
13
13
|
const { generateAll, initialize: initGenerator } = require('../ai-context-generator');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -221,7 +221,7 @@ async function propagateContextChange(sourceTool, projectRoot, config, strategy
|
|
|
221
221
|
// 1. Re-analyze codebase to get fresh analysis
|
|
222
222
|
let analysis;
|
|
223
223
|
try {
|
|
224
|
-
analysis = await
|
|
224
|
+
analysis = await analyzeCodebase(projectRoot, config);
|
|
225
225
|
} catch (error) {
|
|
226
226
|
results.errors.push({
|
|
227
227
|
message: `Failed to analyze project: ${error.message}`
|
|
@@ -328,7 +328,7 @@ async function syncAllFromCodebase(projectRoot, config) {
|
|
|
328
328
|
|
|
329
329
|
try {
|
|
330
330
|
// Analyze project
|
|
331
|
-
const analysis = await
|
|
331
|
+
const analysis = await analyzeCodebase(projectRoot, config);
|
|
332
332
|
|
|
333
333
|
// Generate for all tools
|
|
334
334
|
const generateResults = await generateAll(analysis, config, projectRoot, {
|
package/lib/migrate.js
CHANGED
|
@@ -274,6 +274,11 @@ async function migrateV1ToV2(projectRoot, options = {}) {
|
|
|
274
274
|
function getMigrationStatus(projectRoot) {
|
|
275
275
|
const detection = detectV1Installation(projectRoot);
|
|
276
276
|
|
|
277
|
+
// In v2.0, both .ai-context/ AND .claude/ can exist
|
|
278
|
+
// The presence of AI_CONTEXT.md indicates v2.0 installation
|
|
279
|
+
// .claude/ in v2.0 is created by the Claude adapter for Claude-specific features
|
|
280
|
+
const hasAiContextMd = fs.existsSync(path.join(projectRoot, MIGRATIONS.entryFile.new));
|
|
281
|
+
|
|
277
282
|
if (!detection.hasV1 && !detection.hasV2) {
|
|
278
283
|
return {
|
|
279
284
|
status: 'none',
|
|
@@ -282,24 +287,28 @@ function getMigrationStatus(projectRoot) {
|
|
|
282
287
|
};
|
|
283
288
|
}
|
|
284
289
|
|
|
285
|
-
if
|
|
290
|
+
// If AI_CONTEXT.md exists, this is v2.0 (even if .claude/ also exists)
|
|
291
|
+
if (hasAiContextMd) {
|
|
286
292
|
return {
|
|
287
|
-
status: '
|
|
288
|
-
message: '
|
|
289
|
-
needsMigration:
|
|
293
|
+
status: 'v2',
|
|
294
|
+
message: 'v2.0 installation found, no migration needed',
|
|
295
|
+
needsMigration: false,
|
|
290
296
|
details: detection
|
|
291
297
|
};
|
|
292
298
|
}
|
|
293
299
|
|
|
294
|
-
|
|
300
|
+
// If .claude/ exists but no AI_CONTEXT.md, this is v1.x
|
|
301
|
+
if (detection.hasV1 && !detection.hasV2) {
|
|
295
302
|
return {
|
|
296
|
-
status: '
|
|
297
|
-
message: '
|
|
298
|
-
needsMigration:
|
|
303
|
+
status: 'v1',
|
|
304
|
+
message: 'v1.x installation found, migration available',
|
|
305
|
+
needsMigration: true,
|
|
299
306
|
details: detection
|
|
300
307
|
};
|
|
301
308
|
}
|
|
302
309
|
|
|
310
|
+
// True mixed state: both v1.x indicators and v2.0 indicators exist
|
|
311
|
+
// This shouldn't happen normally, but handle it
|
|
303
312
|
if (detection.hasV1 && detection.hasV2) {
|
|
304
313
|
return {
|
|
305
314
|
status: 'mixed',
|
package/package.json
CHANGED