@neurcode-ai/cli 0.9.46 → 0.9.47
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/commands/verify.js +9 -3
- package/package.json +1 -1
package/dist/commands/verify.js
CHANGED
|
@@ -101,9 +101,9 @@ function toArtifactSignatureSummary(status) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
function resolveCliComponentVersion() {
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
return
|
|
104
|
+
const explicitEnvVersion = process.env.NEURCODE_CLI_VERSION;
|
|
105
|
+
if (explicitEnvVersion && explicitEnvVersion.trim()) {
|
|
106
|
+
return explicitEnvVersion.trim();
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
109
109
|
const packagePath = (0, path_1.join)(__dirname, '../../package.json');
|
|
@@ -116,6 +116,12 @@ function resolveCliComponentVersion() {
|
|
|
116
116
|
catch {
|
|
117
117
|
// Ignore and fall back.
|
|
118
118
|
}
|
|
119
|
+
const npmContextVersion = process.env.npm_package_version;
|
|
120
|
+
if (npmContextVersion
|
|
121
|
+
&& npmContextVersion.trim()
|
|
122
|
+
&& npmContextVersion.trim() !== '0.0.0') {
|
|
123
|
+
return npmContextVersion.trim();
|
|
124
|
+
}
|
|
119
125
|
return '0.0.0';
|
|
120
126
|
}
|
|
121
127
|
const CLI_COMPONENT_VERSION = resolveCliComponentVersion();
|