specrails-desktop 2.56.1 → 2.57.0
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.
|
@@ -7,14 +7,16 @@ read-only discovery; it does not execute a PATH shim or install a global package
|
|
|
7
7
|
An explicit `SPECRAILS_CORE_BIN` wins when it resolves to a usable compatible
|
|
8
8
|
package. Otherwise Desktop selects the newest compatible package from its
|
|
9
9
|
activated managed installation, bundled resources, local dependency and external
|
|
10
|
-
CLI on PATH. Core 4
|
|
10
|
+
CLI on PATH. Supported Core majors are 4, 5 and 6 (`SUPPORTED_CORE_MAJORS` in
|
|
11
|
+
`server/core-package.ts`). A runtime older than the active
|
|
11
12
|
framework is rejected rather than silently replacing an update.
|
|
12
13
|
|
|
13
14
|
## Persistence and publication
|
|
14
15
|
|
|
15
|
-
The release bundle pins Core
|
|
16
|
-
`scripts/assemble-bundled-core.lock.json`.
|
|
17
|
-
|
|
16
|
+
The release bundle pins Core 6.0.0 in `desktop-release.yml` and
|
|
17
|
+
`scripts/assemble-bundled-core.lock.json`. Core 6 is the Desktop-only engine: it
|
|
18
|
+
publishes integration contract 5.0 (no standalone `update`) and ships only the
|
|
19
|
+
implement, batch-implement and retry workflows. Update both pins together and check compatibility against
|
|
18
20
|
the staged published package; retained runs still use their original runtime.
|
|
19
21
|
|
|
20
22
|
Desktop updates retain the complete npm installation, including dependencies,
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CORE_PACKAGE_SPEC = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
exports.CORE_PACKAGE_SPEC = exports.SUPPORTED_CORE_MAJORS = void 0;
|
|
4
|
+
exports.isSupportedCoreVersion = isSupportedCoreVersion;
|
|
5
|
+
/** Core majors this Desktop can drive. Core 6 publishes integration contract
|
|
6
|
+
* 5.0 (no standalone `update`); Cores 4 and 5 remain readable for installed
|
|
7
|
+
* apps. The runtime resolver selects the newest usable compatible package and
|
|
8
|
+
* never downgrades a newer activated framework. */
|
|
9
|
+
exports.SUPPORTED_CORE_MAJORS = [4, 5, 6];
|
|
10
|
+
function isSupportedCoreVersion(version) {
|
|
11
|
+
return exports.SUPPORTED_CORE_MAJORS.includes(Number(version.split('.')[0]));
|
|
12
|
+
}
|
|
13
|
+
/** Online fallback selects the Core 6 lifecycle, the same major the desktop bundles. */
|
|
14
|
+
exports.CORE_PACKAGE_SPEC = 'specrails-core@^6.0.0';
|
|
@@ -15,6 +15,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
15
15
|
const path_1 = __importDefault(require("path"));
|
|
16
16
|
const artifact_registry_1 = require("./artifact-registry");
|
|
17
17
|
const bundled_core_1 = require("./bundled-core");
|
|
18
|
+
const core_package_1 = require("./core-package");
|
|
18
19
|
const semver_lite_1 = require("./semver-lite");
|
|
19
20
|
const VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
20
21
|
function managedCoreRoot(home) {
|
|
@@ -114,8 +115,8 @@ function resolveCoreRuntime(home, external) {
|
|
|
114
115
|
const runtime = packageForBinary(override, 'override');
|
|
115
116
|
if (!runtime)
|
|
116
117
|
throw new Error('SPECRAILS_CORE_BIN does not resolve to a usable specrails-core package.');
|
|
117
|
-
if (!
|
|
118
|
-
throw new Error(
|
|
118
|
+
if (!(0, core_package_1.isSupportedCoreVersion)(runtime.version))
|
|
119
|
+
throw new Error(`The explicit Core package is not compatible with this Desktop. Supported Core majors: ${core_package_1.SUPPORTED_CORE_MAJORS.join(', ')}.`);
|
|
119
120
|
if (current && (0, semver_lite_1.compareVersions)(runtime.version, current) < 0)
|
|
120
121
|
throw new Error(`The explicit Core ${runtime.version} is older than active framework ${current}; Desktop will not downgrade it.`);
|
|
121
122
|
return runtime;
|
|
@@ -135,10 +136,7 @@ function resolveCoreRuntime(home, external) {
|
|
|
135
136
|
candidates.push(managed);
|
|
136
137
|
}
|
|
137
138
|
candidates.push(...(external ?? (home === undefined ? discoverExternalCoreRuntimes() : [])));
|
|
138
|
-
const compatible = candidates.filter(candidate =>
|
|
139
|
-
const major = Number(candidate.version.split('.')[0]);
|
|
140
|
-
return major >= 4 && major <= 5;
|
|
141
|
-
}).sort((a, b) => (0, semver_lite_1.compareVersions)(b.version, a.version));
|
|
139
|
+
const compatible = candidates.filter(candidate => (0, core_package_1.isSupportedCoreVersion)(candidate.version)).sort((a, b) => (0, semver_lite_1.compareVersions)(b.version, a.version));
|
|
142
140
|
const selected = compatible[0] ?? null;
|
|
143
141
|
if (current && (!selected || (0, semver_lite_1.compareVersions)(selected.version, current) < 0)) {
|
|
144
142
|
throw new Error(`Core framework ${current} is installed, but its runtime package is unavailable. Reinstall Core ${current} or a newer compatible version; Desktop will not downgrade it.`);
|
|
@@ -13,6 +13,7 @@ const semver_lite_1 = require("./semver-lite");
|
|
|
13
13
|
const win_spawn_1 = require("./util/win-spawn");
|
|
14
14
|
const bundled_core_1 = require("./bundled-core");
|
|
15
15
|
const core_runtime_1 = require("./core-runtime");
|
|
16
|
+
const core_package_1 = require("./core-package");
|
|
16
17
|
const artifact_registry_1 = require("./artifact-registry");
|
|
17
18
|
/** Voluntary Core updates retain the complete npm package and dependencies,
|
|
18
19
|
* publish its framework, then await every project refresh. Partial refreshes
|
|
@@ -117,8 +118,8 @@ class CoreUpdateManager {
|
|
|
117
118
|
if (!requested || !(0, semver_lite_1.isValidVersion)(requested)) {
|
|
118
119
|
return { ok: false, error: 'No valid target version to update to. Check for updates first.' };
|
|
119
120
|
}
|
|
120
|
-
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(requested) || !
|
|
121
|
-
return { ok: false, error:
|
|
121
|
+
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(requested) || !(0, core_package_1.isSupportedCoreVersion)(requested)) {
|
|
122
|
+
return { ok: false, error: `This Desktop supports Core ${core_package_1.SUPPORTED_CORE_MAJORS.join(', ')}. Update Desktop before installing another major version.` };
|
|
122
123
|
}
|
|
123
124
|
const current = (0, framework_manager_1.readCurrentFrameworkVersion)(this.home);
|
|
124
125
|
if (current && !(0, semver_lite_1.isNewer)(requested, current) && !(requested === current && ((0, core_runtime_1.getCoreRuntimeStatus)(this.home).error || this.pendingVersion === requested))) {
|