@lark-codem/codem-cli 0.1.235-dev-meego-integration.100102735857.0.gb42e28d → 0.1.235
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/package.json +8 -8
- package/profile/profile-migration.js +31 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-codem/codem-cli",
|
|
3
|
-
"version": "0.1.235
|
|
3
|
+
"version": "0.1.235",
|
|
4
4
|
"codemServiceManagementProtocol": 3,
|
|
5
5
|
"codemProfileProtocol": 1,
|
|
6
6
|
"type": "module",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@lark-codem/codem-core": "0.8.67
|
|
32
|
+
"@lark-codem/codem-core": "0.8.67",
|
|
33
33
|
"zod": "3.25.76"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@lark-codem/codem-cli-darwin-arm64": "0.1.235
|
|
37
|
-
"@lark-codem/codem-cli-darwin-x64": "0.1.235
|
|
38
|
-
"@lark-codem/codem-cli-linux-arm64": "0.1.235
|
|
39
|
-
"@lark-codem/codem-cli-linux-x64": "0.1.235
|
|
40
|
-
"@lark-codem/codem-cli-win32-arm64": "0.1.235
|
|
41
|
-
"@lark-codem/codem-cli-win32-x64": "0.1.235
|
|
36
|
+
"@lark-codem/codem-cli-darwin-arm64": "0.1.235",
|
|
37
|
+
"@lark-codem/codem-cli-darwin-x64": "0.1.235",
|
|
38
|
+
"@lark-codem/codem-cli-linux-arm64": "0.1.235",
|
|
39
|
+
"@lark-codem/codem-cli-linux-x64": "0.1.235",
|
|
40
|
+
"@lark-codem/codem-cli-win32-arm64": "0.1.235",
|
|
41
|
+
"@lark-codem/codem-cli-win32-x64": "0.1.235"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=18"
|
|
@@ -127,7 +127,19 @@ export async function migrateCodeMProfile(options) {
|
|
|
127
127
|
const hasDeferredIdentitySelection = (profile)=>Boolean(profile.bundle.get(DEFERRED_IDENTITY_SELECTION_FILE));
|
|
128
128
|
if (pending) {
|
|
129
129
|
const transaction = await parseTransaction(pending, homes, target);
|
|
130
|
-
|
|
130
|
+
let credentialStorage;
|
|
131
|
+
try {
|
|
132
|
+
credentialStorage = sources.some((profile)=>hasCredentialStorage(profile.bundle)) || await hasTransactionCredentials(transaction, backupHome);
|
|
133
|
+
} catch (error) {
|
|
134
|
+
if (options.mode !== 'automatic' || !hasIdentity(canonical) || canonical.issue) throw error;
|
|
135
|
+
reportDeferredLegacyConsolidation(error);
|
|
136
|
+
return {
|
|
137
|
+
kind: 'ready',
|
|
138
|
+
backupHome: join(backupHome, transaction.id),
|
|
139
|
+
legacyCleanupPending: true
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
if (credentialStorage) {
|
|
131
143
|
if (options.mode === 'automatic' && hasIdentity(canonical)) {
|
|
132
144
|
return {
|
|
133
145
|
kind: 'ready',
|
|
@@ -284,16 +296,26 @@ export async function migrateCodeMProfile(options) {
|
|
|
284
296
|
for (const profile of affectedProfiles){
|
|
285
297
|
if (profile.blocker !== null) throw profile.blocker;
|
|
286
298
|
}
|
|
287
|
-
|
|
288
|
-
if (
|
|
299
|
+
try {
|
|
300
|
+
if (hasCredentialStorage(selected.bundle) || affectedProfiles.some((profile)=>hasCredentialStorage(profile.bundle))) {
|
|
301
|
+
if (!maintenance && hasIdentity(canonical)) {
|
|
302
|
+
return {
|
|
303
|
+
kind: 'ready',
|
|
304
|
+
backupHome: null,
|
|
305
|
+
legacyCleanupPending: legacy.length > 0
|
|
306
|
+
};
|
|
307
|
+
}
|
|
289
308
|
return {
|
|
290
|
-
kind: '
|
|
291
|
-
backupHome: null,
|
|
292
|
-
legacyCleanupPending: legacy.length > 0
|
|
309
|
+
kind: 'defer'
|
|
293
310
|
};
|
|
294
311
|
}
|
|
312
|
+
} catch (error) {
|
|
313
|
+
if (options.mode !== 'automatic' || !hasIdentity(canonical) || canonical.issue) throw error;
|
|
314
|
+
reportDeferredLegacyConsolidation(error);
|
|
295
315
|
return {
|
|
296
|
-
kind: '
|
|
316
|
+
kind: 'ready',
|
|
317
|
+
backupHome: null,
|
|
318
|
+
legacyCleanupPending: true
|
|
297
319
|
};
|
|
298
320
|
}
|
|
299
321
|
const affected = affectedProfiles.map((profile)=>profile.home);
|
|
@@ -381,9 +403,8 @@ function hasCredentialStorage(bundle) {
|
|
|
381
403
|
]){
|
|
382
404
|
const bytes = bundle.get(name);
|
|
383
405
|
if (!bytes) continue;
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
} catch {}
|
|
406
|
+
// Unreadable JSON cannot prove the absence of a secure storage reference.
|
|
407
|
+
if (parseObject(bytes, name).credentialStorageRef != null) return true;
|
|
387
408
|
}
|
|
388
409
|
return false;
|
|
389
410
|
}
|