@vm0/cli 9.177.9 → 9.177.10
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/{chunk-HA7ZZ2L6.js → chunk-AXV23NAE.js} +173 -86
- package/{chunk-HA7ZZ2L6.js.map → chunk-AXV23NAE.js.map} +1 -1
- package/index.js +9 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +17 -8
- package/zero.js.map +1 -1
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
getConfiguredConnectorAuthMethods,
|
|
60
60
|
getConnectorAuthMethod,
|
|
61
61
|
getConnectorAuthMethodScopeDiff,
|
|
62
|
-
|
|
62
|
+
getConnectorEnvBindingEntries,
|
|
63
63
|
getConnectorEnvNamesForSecret,
|
|
64
64
|
getConnectorFirewall,
|
|
65
65
|
getConnectorGenerationTypes,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
upsertZeroOrgModelProvider,
|
|
147
147
|
withErrorHandler,
|
|
148
148
|
zeroAgentCustomSkillNameSchema
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-AXV23NAE.js";
|
|
150
150
|
import {
|
|
151
151
|
__toESM,
|
|
152
152
|
init_esm_shims
|
|
@@ -1965,11 +1965,20 @@ function listSecretNames(config) {
|
|
|
1965
1965
|
}
|
|
1966
1966
|
return names;
|
|
1967
1967
|
}
|
|
1968
|
+
function listEnvNames(type) {
|
|
1969
|
+
return [
|
|
1970
|
+
...new Set(
|
|
1971
|
+
getConnectorEnvBindingEntries(type).map(({ envName }) => {
|
|
1972
|
+
return envName;
|
|
1973
|
+
})
|
|
1974
|
+
)
|
|
1975
|
+
];
|
|
1976
|
+
}
|
|
1968
1977
|
function findExactMatch(keywordLower, type, config) {
|
|
1969
1978
|
if (type.toLowerCase() === keywordLower) {
|
|
1970
1979
|
return { score: 100, matchedField: "type" };
|
|
1971
1980
|
}
|
|
1972
|
-
for (const envName of
|
|
1981
|
+
for (const envName of listEnvNames(type)) {
|
|
1973
1982
|
if (envName.toLowerCase() === keywordLower) {
|
|
1974
1983
|
return { score: 90, matchedField: `env:${envName}` };
|
|
1975
1984
|
}
|
|
@@ -1992,7 +2001,7 @@ function findSubstringMatch(keywordLower, type, config) {
|
|
|
1992
2001
|
if (config.label.toLowerCase().includes(keywordLower)) {
|
|
1993
2002
|
return { score: 50, matchedField: "label" };
|
|
1994
2003
|
}
|
|
1995
|
-
for (const envName of
|
|
2004
|
+
for (const envName of listEnvNames(type)) {
|
|
1996
2005
|
if (envName.toLowerCase().includes(keywordLower)) {
|
|
1997
2006
|
return { score: 40, matchedField: `env:${envName}` };
|
|
1998
2007
|
}
|
|
@@ -2015,7 +2024,7 @@ function collectCandidateTokens(type, config) {
|
|
|
2015
2024
|
const sources = [
|
|
2016
2025
|
type,
|
|
2017
2026
|
config.label,
|
|
2018
|
-
...
|
|
2027
|
+
...listEnvNames(type),
|
|
2019
2028
|
...listSecretNames(config),
|
|
2020
2029
|
...config.tags ?? []
|
|
2021
2030
|
];
|
|
@@ -2561,10 +2570,10 @@ function resolveConnectorFromUrl(url) {
|
|
|
2561
2570
|
}
|
|
2562
2571
|
}
|
|
2563
2572
|
if (!bestMatch) return null;
|
|
2564
|
-
const
|
|
2573
|
+
const envBindingEntries = getConnectorEnvBindingEntries(
|
|
2565
2574
|
bestMatch.connectorType
|
|
2566
2575
|
);
|
|
2567
|
-
const envName =
|
|
2576
|
+
const envName = envBindingEntries[0]?.envName;
|
|
2568
2577
|
if (!envName) return null;
|
|
2569
2578
|
const relativePath = normalized === bestMatch.base ? "/" : normalized.slice(bestMatch.base.length);
|
|
2570
2579
|
return {
|
|
@@ -13189,7 +13198,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
13189
13198
|
var program = new Command();
|
|
13190
13199
|
program.name("zero").description(
|
|
13191
13200
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
13192
|
-
).version("9.177.
|
|
13201
|
+
).version("9.177.10").addHelpText("after", () => {
|
|
13193
13202
|
return buildZeroHelpText();
|
|
13194
13203
|
});
|
|
13195
13204
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|