@robinmordasiewicz/f5xc-xcsh 2.0.21-2601091357 → 2.0.21-2601091525
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/index.js +17 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46994,8 +46994,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
46994
46994
|
var CLI_NAME = "xcsh";
|
|
46995
46995
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
46996
46996
|
function getVersion() {
|
|
46997
|
-
if ("v2.0.21-
|
|
46998
|
-
return "v2.0.21-
|
|
46997
|
+
if ("v2.0.21-2601091525") {
|
|
46998
|
+
return "v2.0.21-2601091525";
|
|
46999
46999
|
}
|
|
47000
47000
|
if (process.env.XCSH_VERSION) {
|
|
47001
47001
|
return process.env.XCSH_VERSION;
|
|
@@ -77199,6 +77199,7 @@ var CompletionRegistry = class {
|
|
|
77199
77199
|
getDomainSuggestions(prefix = "") {
|
|
77200
77200
|
const suggestions = [];
|
|
77201
77201
|
const lowerPrefix = prefix.toLowerCase();
|
|
77202
|
+
const addedAliases = /* @__PURE__ */ new Set();
|
|
77202
77203
|
for (const node of this.tree.values()) {
|
|
77203
77204
|
if (node.hidden) continue;
|
|
77204
77205
|
if (!prefix || node.name.toLowerCase().startsWith(lowerPrefix)) {
|
|
@@ -77216,10 +77217,21 @@ var CompletionRegistry = class {
|
|
|
77216
77217
|
description: `Alias for ${node.name}`,
|
|
77217
77218
|
category: "domain"
|
|
77218
77219
|
});
|
|
77220
|
+
addedAliases.add(alias);
|
|
77219
77221
|
}
|
|
77220
77222
|
}
|
|
77221
77223
|
}
|
|
77222
77224
|
}
|
|
77225
|
+
for (const [alias, canonicalName] of this.aliases.entries()) {
|
|
77226
|
+
if (addedAliases.has(alias)) continue;
|
|
77227
|
+
if (!prefix || alias.toLowerCase().startsWith(lowerPrefix)) {
|
|
77228
|
+
suggestions.push({
|
|
77229
|
+
text: alias,
|
|
77230
|
+
description: `Alias for ${canonicalName}`,
|
|
77231
|
+
category: "domain"
|
|
77232
|
+
});
|
|
77233
|
+
}
|
|
77234
|
+
}
|
|
77223
77235
|
return suggestions.sort((a, b) => a.text.localeCompare(b.text));
|
|
77224
77236
|
}
|
|
77225
77237
|
/**
|
|
@@ -81091,7 +81103,8 @@ var Completer = class {
|
|
|
81091
81103
|
return this.getRootContextSuggestions();
|
|
81092
81104
|
}
|
|
81093
81105
|
const firstArg = parsed.args[0]?.toLowerCase() ?? "";
|
|
81094
|
-
|
|
81106
|
+
const isStillTypingDomain = parsed.args.length === 1 && parsed.currentWord === firstArg;
|
|
81107
|
+
if (isCustomDomain(firstArg) && parsed.args.length >= 1 && !isStillTypingDomain) {
|
|
81095
81108
|
return await this.getCustomDomainCompletions(
|
|
81096
81109
|
firstArg,
|
|
81097
81110
|
parsed.args.slice(1),
|
|
@@ -81148,7 +81161,7 @@ var Completer = class {
|
|
|
81148
81161
|
let suggestions;
|
|
81149
81162
|
if (parsed.isEscapedToRoot) {
|
|
81150
81163
|
const firstArg2 = parsed.args[0];
|
|
81151
|
-
if (parsed.args.length > 0 && firstArg2) {
|
|
81164
|
+
if (parsed.args.length > 0 && firstArg2 && !isStillTypingDomain) {
|
|
81152
81165
|
const targetDomain = firstArg2.toLowerCase();
|
|
81153
81166
|
if (completionRegistry.has(targetDomain)) {
|
|
81154
81167
|
const domainNode = completionRegistry.get(targetDomain);
|