fraim 2.0.357-next.0 → 2.0.357-next.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.
|
@@ -78,6 +78,7 @@ const CACHE_ROOT = path.join(USER_DIR, 'npm-cache', 'mcp');
|
|
|
78
78
|
const REFRESH_LOCK = path.join(STATE_DIR, 'refresh.lock');
|
|
79
79
|
const REFRESH_LOCK_STALE_MS = 10 * 60 * 1000;
|
|
80
80
|
const launchStartedAt = Date.now();
|
|
81
|
+
const DIST_TAG = (process.env.FRAIM_RELEASE_CHANNEL || '').toUpperCase() === 'PPE' ? 'next' : 'latest';
|
|
81
82
|
|
|
82
83
|
const commandName = (name) => process.platform === 'win32' ? name + '.cmd' : name;
|
|
83
84
|
const npmCommand = commandName('npm');
|
|
@@ -152,6 +153,7 @@ function isUsableState(state) {
|
|
|
152
153
|
state &&
|
|
153
154
|
state.packageName === 'fraim' &&
|
|
154
155
|
state.binName === 'fraim' &&
|
|
156
|
+
(state.distTag || 'latest') === DIST_TAG &&
|
|
155
157
|
typeof state.version === 'string' &&
|
|
156
158
|
/^\\d+\\.\\d+\\.\\d+/.test(state.version)
|
|
157
159
|
);
|
|
@@ -185,9 +187,9 @@ function resolvePackage() {
|
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
|
|
188
|
-
const fraimVersion = resolveLatest('fraim');
|
|
190
|
+
const fraimVersion = resolveLatest('fraim@' + DIST_TAG);
|
|
189
191
|
if (fraimVersion) {
|
|
190
|
-
const state = { packageName: 'fraim', binName: 'fraim', version: fraimVersion, fromCache: false };
|
|
192
|
+
const state = { packageName: 'fraim', binName: 'fraim', version: fraimVersion, distTag: DIST_TAG, fromCache: false };
|
|
191
193
|
writeState(state);
|
|
192
194
|
return state;
|
|
193
195
|
}
|
|
@@ -279,9 +281,9 @@ function startBackgroundRefresh() {
|
|
|
279
281
|
|
|
280
282
|
if (refreshMode) {
|
|
281
283
|
try {
|
|
282
|
-
const latest = resolveLatest('fraim');
|
|
284
|
+
const latest = resolveLatest('fraim@' + DIST_TAG);
|
|
283
285
|
if (latest) {
|
|
284
|
-
const next = { packageName: 'fraim', binName: 'fraim', version: latest, fromCache: false };
|
|
286
|
+
const next = { packageName: 'fraim', binName: 'fraim', version: latest, distTag: DIST_TAG, fromCache: false };
|
|
285
287
|
const nextCache = path.join(CACHE_ROOT, 'fraim-' + latest);
|
|
286
288
|
if (installedEntry(next, nextCache) || (runPackage(next, nextCache, ['--version']) === 0 && installedEntry(next, nextCache))) {
|
|
287
289
|
writeState(next);
|