@robinmordasiewicz/f5xc-xcsh 6.23.0 → 6.25.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.
package/dist/index.js CHANGED
@@ -38391,11 +38391,11 @@ var require_react_jsx_runtime_development = __commonJS({
38391
38391
  return jsxWithValidation(type, props, key, false);
38392
38392
  }
38393
38393
  }
38394
- var jsx7 = jsxWithValidationDynamic;
38395
- var jsxs6 = jsxWithValidationStatic;
38394
+ var jsx6 = jsxWithValidationDynamic;
38395
+ var jsxs5 = jsxWithValidationStatic;
38396
38396
  exports.Fragment = REACT_FRAGMENT_TYPE;
38397
- exports.jsx = jsx7;
38398
- exports.jsxs = jsxs6;
38397
+ exports.jsx = jsx6;
38398
+ exports.jsxs = jsxs5;
38399
38399
  })();
38400
38400
  }
38401
38401
  }
@@ -44256,9 +44256,9 @@ var generatedDomains = /* @__PURE__ */ new Map([
44256
44256
  ["cdn", {
44257
44257
  name: "cdn",
44258
44258
  displayName: "Cdn",
44259
- description: "Content Delivery Network services for global content distribution and edge caching. Configure CDN load balancers with custom caching rules based on paths, headers, cookies, and query parameters. Define cache TTL policies, eligibility options, and cache-control behaviors. Monitor CDN performance through access logs and metrics aggregation. Perform cache purge operations for content invalidation. Manage addon subscriptions and track service operation status for CDN deployments.",
44260
- descriptionShort: "CDN load balancing, caching rules, and content delivery",
44261
- descriptionMedium: "Configure CDN load balancers and caching rules for content delivery. Manage cache policies, purge operations, and access logs for optimized...",
44259
+ description: "Create cache rules with expression-based matching for paths, headers, cookies, and query parameters. Deploy load balancers optimized for content distribution with configurable TTL settings and cache eligibility options. Monitor access logs and metrics for delivery performance. Purge cached content on demand and track service operation status across namespaces.",
44260
+ descriptionShort: "Configure content delivery and caching rules",
44261
+ descriptionMedium: "Define cache rules and load balancers for content distribution. Set TTL policies, path matching, and header-based caching decisions.",
44262
44262
  aliases: ["cache", "content"],
44263
44263
  complexity: "advanced",
44264
44264
  isPreview: false,
@@ -44368,9 +44368,9 @@ var generatedDomains = /* @__PURE__ */ new Map([
44368
44368
  ["dns", {
44369
44369
  name: "dns",
44370
44370
  displayName: "Dns",
44371
- description: "Comprehensive DNS management for zones, domains, and resource records. Configure DNS load balancing with health checks for high availability. Import and export zone files via BIND format or AXFR transfers. Manage resource record sets including A, AAAA, CNAME, CAA, CERT, AFSDB, and DLV records. Monitor DNS performance through metrics and request logs. Clone zones from existing domains and enforce DNS compliance policies across namespaces.",
44372
- descriptionShort: "DNS zone management, load balancing, and record...",
44373
- descriptionMedium: "Manage DNS zones, configure DNS load balancing with health checks, and control resource record sets. Supports zone imports, BIND file handling,...",
44371
+ description: "Create and manage authoritative zones with support for standard record types including A, AAAA, CNAME, CAA, CERT, and AFSDB. Import existing configurations through BIND file uploads or zone transfers. Define health check policies that monitor backend availability and automatically adjust record responses. Export zone files for backup or migration. Access request logs and performance metrics to analyze query patterns and troubleshoot resolution issues across namespaces.",
44372
+ descriptionShort: "Manage zones, records, and resolution policies",
44373
+ descriptionMedium: "Configure zone imports from BIND files or AXFR transfers. Set up health checks for load-balanced records and monitor query metrics.",
44374
44374
  aliases: ["dns-zone", "zones"],
44375
44375
  complexity: "advanced",
44376
44376
  isPreview: false,
@@ -44750,9 +44750,9 @@ var generatedDomains = /* @__PURE__ */ new Map([
44750
44750
  ["virtual", {
44751
44751
  name: "virtual",
44752
44752
  displayName: "Virtual",
44753
- description: "Comprehensive application delivery and traffic management capabilities including HTTP/HTTPS/TCP/UDP load balancers, origin pool configuration, virtual host management, and advanced routing rules. Supports rate limiting policies, service policy enforcement, geo-location-based routing, and proxy forwarding configurations. Integrates with security features including malware protection, threat campaign detection, and WAF policy attachment. Provides health check configuration, endpoint...",
44754
- descriptionShort: "HTTP/HTTPS load balancing and traffic management",
44755
- descriptionMedium: "Configure HTTP, TCP, and UDP load balancers with origin pools, virtual hosts, routing rules, rate limiting, and service policies for application...",
44753
+ description: "Set up load balancing for HTTP, TCP, and UDP protocols with origin pool configuration and weighted routing. Create service policies to control access patterns and enforce rate limits on incoming requests. Deploy geo-location routing for region-aware traffic steering. Configure health checks to monitor backend availability and trigger automatic failover. Manage proxy forwarding rules and threat protection including malware scanning and campaign blocking.",
44754
+ descriptionShort: "Configure HTTP and TCP load balancers",
44755
+ descriptionMedium: "Manage origin pools and routing rules. Define rate limiting, service policies, and health checks for traffic distribution.",
44756
44756
  aliases: ["lb", "loadbalancer", "vhost"],
44757
44757
  complexity: "advanced",
44758
44758
  isPreview: false,
@@ -44830,9 +44830,9 @@ var generatedDomains = /* @__PURE__ */ new Map([
44830
44830
  ["waf", {
44831
44831
  name: "waf",
44832
44832
  displayName: "Waf",
44833
- description: "Web Application Firewall (WAF) configuration and management for protecting applications against common attacks and vulnerabilities. Define application firewall policies with attack type detection, bot protection settings, and custom blocking pages. Manage WAF exclusion policies for legitimate traffic patterns, configure signature staging and release workflows, and monitor security events with detailed rule hit metrics. Supports AI-powered risk-based blocking, anonymization settings for...",
44834
- descriptionShort: "Web application firewall rules and security policies",
44835
- descriptionMedium: "Configure web application firewall rules, manage security policies, and enable attack detection with customizable blocking actions and signature...",
44833
+ description: "Deploy protection against common web attacks including injection, cross-site scripting, and protocol violations. Set up bot detection with configurable actions for automated traffic handling. Create exclusion policies to whitelist trusted requests and reduce false positives. Monitor security events and rule hits through metrics collection to analyze threat patterns and refine defensive configurations for virtual hosts.",
44834
+ descriptionShort: "Configure web application firewall rules and policies",
44835
+ descriptionMedium: "Manage application security through attack detection and blocking settings. Define custom response codes and signature-based threat mitigation.",
44836
44836
  aliases: ["firewall", "appfw"],
44837
44837
  complexity: "advanced",
44838
44838
  isPreview: false,
@@ -45166,12 +45166,151 @@ var HistoryManager = class _HistoryManager {
45166
45166
  }
45167
45167
  };
45168
45168
 
45169
+ // src/branding/terminal.ts
45170
+ function detectTerminalCapabilities() {
45171
+ const termProgram = process.env.TERM_PROGRAM ?? "";
45172
+ const lcTerminal = process.env.LC_TERMINAL ?? "";
45173
+ const term = process.env.TERM ?? "";
45174
+ const isITerm2 = termProgram === "iTerm.app" || lcTerminal === "iTerm2" || !!process.env.ITERM_SESSION_ID;
45175
+ const isKitty = termProgram === "kitty" || term.includes("kitty");
45176
+ const isWezTerm = termProgram === "WezTerm" || !!process.env.WEZTERM_PANE;
45177
+ const isMintty = !!process.env.MINTTY;
45178
+ const supportsInlineImages = isITerm2 || isKitty || isWezTerm || isMintty;
45179
+ return {
45180
+ supportsInlineImages,
45181
+ terminalProgram: termProgram || lcTerminal || null,
45182
+ isITerm2,
45183
+ isKitty,
45184
+ isWezTerm,
45185
+ isMintty
45186
+ };
45187
+ }
45188
+ function generateITerm2ImageSequence(base64Data, options = {}) {
45189
+ const args = [];
45190
+ if (options.width !== void 0) {
45191
+ args.push(`width=${options.width}`);
45192
+ }
45193
+ if (options.height !== void 0) {
45194
+ args.push(`height=${options.height}`);
45195
+ }
45196
+ if (options.preserveAspectRatio !== void 0) {
45197
+ args.push(`preserveAspectRatio=${options.preserveAspectRatio ? 1 : 0}`);
45198
+ }
45199
+ if (options.name) {
45200
+ const nameBase64 = Buffer.from(options.name, "utf-8").toString(
45201
+ "base64"
45202
+ );
45203
+ args.push(`name=${nameBase64}`);
45204
+ }
45205
+ args.push(`inline=${options.inline !== false ? 1 : 0}`);
45206
+ const argsString = args.join(";");
45207
+ return `\x1B]1337;File=${argsString}:${base64Data}\x07`;
45208
+ }
45209
+ function generateKittyImageSequence(base64Data) {
45210
+ return `\x1B_Ga=T,f=100,t=d;${base64Data}\x1B\\`;
45211
+ }
45212
+ function getTerminalImageSequence(base64Data, capabilities, options = {}) {
45213
+ if (!capabilities.supportsInlineImages) {
45214
+ return null;
45215
+ }
45216
+ if (capabilities.isKitty) {
45217
+ return generateKittyImageSequence(base64Data);
45218
+ }
45219
+ return generateITerm2ImageSequence(base64Data, options);
45220
+ }
45221
+
45222
+ // src/branding/logo-image.ts
45223
+ var F5_LOGO_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAYAAAA+VemS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PAsmh2IrXn2LbrByQ7RGuH/ObxMqAR04/eYNmZ+tSGcU8J03k8oEcaMwpg0DjAwm+TpiGbIzsb81h7HhAE2dFowIILwYRNYxrN+/iZSBNE0N3KfaV5ryho0OZuBHMr6eZtIYTQDOT1a32mEMTC8k7RTIG9pXWhgwkS/3msRhMtEEFaYJnbs7OkB9QGGW4zuTTaRJogG5FHM5E3MZ2UtEqOxx1r5kIJwZdq1jTHBoxd7zESsOhGBrGcwy8coeckVmPNLISvfTNA3wS2w3xGGQiiQv0U7FqaeoHu6XWAr1ecxBIcNzVmvuwkTmsAJJx+MPYgx0Z0C+Qg92zxVSfVc686eFjILKQjn7C9l0ISJlAZm7WBPJOzc31NX+pkIZDNb51j3VIEtIghfY14v1lWjBx6vlfV6mTDBDbBXUs9Eimtxzk70vVJYQoEsx2wxbEz+v97D6EAjbT3VLXtPTG/Pv7X26lG8EbuV4Gf0jP14DGOwEpA5WNfaCOQI1vdtAvaL/w+mdmKWPM7rsgAAAABJRU5ErkJggg==";
45224
+ var F5_LOGO_DISPLAY_WIDTH = 45;
45225
+ var F5_LOGO_DISPLAY_HEIGHT = 18;
45226
+
45227
+ // src/branding/logo-renderer.ts
45228
+ function resolveLogoMode(options) {
45229
+ if (options.cliMode) {
45230
+ return options.cliMode;
45231
+ }
45232
+ if (options.envMode) {
45233
+ return options.envMode;
45234
+ }
45235
+ if (options.configMode) {
45236
+ return options.configMode;
45237
+ }
45238
+ return "image";
45239
+ }
45240
+ function hasImageData() {
45241
+ return F5_LOGO_PNG_BASE64.length > 0;
45242
+ }
45243
+ function renderLogo(mode) {
45244
+ const capabilities = detectTerminalCapabilities();
45245
+ const logoLines = F5_LOGO.split("\n");
45246
+ const asciiLineCount = logoLines.length;
45247
+ let effectiveMode;
45248
+ if (mode === "none") {
45249
+ effectiveMode = "none";
45250
+ } else if (mode === "image") {
45251
+ if (capabilities.supportsInlineImages && hasImageData()) {
45252
+ effectiveMode = "image";
45253
+ } else {
45254
+ effectiveMode = "ascii";
45255
+ }
45256
+ } else {
45257
+ effectiveMode = "ascii";
45258
+ }
45259
+ switch (effectiveMode) {
45260
+ case "image": {
45261
+ const imageSeq = getTerminalImageSequence(
45262
+ F5_LOGO_PNG_BASE64,
45263
+ capabilities,
45264
+ {
45265
+ width: F5_LOGO_DISPLAY_WIDTH,
45266
+ height: "auto",
45267
+ preserveAspectRatio: true
45268
+ }
45269
+ );
45270
+ return {
45271
+ content: imageSeq ?? "",
45272
+ lineCount: F5_LOGO_DISPLAY_HEIGHT,
45273
+ usedImage: true,
45274
+ capabilities,
45275
+ effectiveMode
45276
+ };
45277
+ }
45278
+ case "none":
45279
+ return {
45280
+ content: "",
45281
+ lineCount: 0,
45282
+ usedImage: false,
45283
+ capabilities,
45284
+ effectiveMode
45285
+ };
45286
+ case "ascii":
45287
+ default:
45288
+ return {
45289
+ content: F5_LOGO,
45290
+ lineCount: asciiLineCount,
45291
+ usedImage: false,
45292
+ capabilities,
45293
+ effectiveMode
45294
+ };
45295
+ }
45296
+ }
45297
+ function getLogoModeFromEnv(envPrefix) {
45298
+ const value = process.env[`${envPrefix}_LOGO`];
45299
+ if (!value) return void 0;
45300
+ const normalized = value.toLowerCase().trim();
45301
+ const validModes = ["image", "ascii", "none"];
45302
+ if (validModes.includes(normalized)) {
45303
+ return normalized;
45304
+ }
45305
+ return void 0;
45306
+ }
45307
+
45169
45308
  // src/branding/index.ts
45170
45309
  var CLI_NAME = "xcsh";
45171
45310
  var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
45172
45311
  function getVersion() {
45173
- if ("6.23.0") {
45174
- return "6.23.0";
45312
+ if ("6.25.0") {
45313
+ return "6.25.0";
45175
45314
  }
45176
45315
  if (process.env.XCSH_VERSION) {
45177
45316
  return process.env.XCSH_VERSION;
@@ -45201,9 +45340,10 @@ var F5_LOGO = ` ________
45201
45340
  (\u2592\u2592\u2592\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2592\u2592\u2592)
45202
45341
  (\u2592\u2592\u2592\u2592\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2592\u2592\u2592\u2592)`;
45203
45342
  var colors = {
45204
- // F5 Brand colors
45205
- red: "\x1B[38;2;228;0;43m",
45206
- // F5 Brand Red (#E4002B)
45343
+ // F5 Brand colors - brightness-adjusted for terminal rendering
45344
+ // PNG uses #E4002B but ANSI needs higher values to match visually
45345
+ red: "\x1B[38;2;202;38;10m",
45346
+ // F5 Brand Red (adjusted for ANSI)
45207
45347
  boldWhite: "\x1B[1;97m",
45208
45348
  // Bold bright white
45209
45349
  reset: "\x1B[0m",
@@ -46783,7 +46923,7 @@ var build_default = TextInput;
46783
46923
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
46784
46924
  function HorizontalRule({ width }) {
46785
46925
  const rule = "\u2500".repeat(Math.max(width, 1));
46786
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "#E4002B", children: rule });
46926
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "#CA260A", children: rule });
46787
46927
  }
46788
46928
  function InputBox({
46789
46929
  prompt,
@@ -46942,33 +47082,9 @@ function getGitInfo() {
46942
47082
  }
46943
47083
  }
46944
47084
 
46945
- // src/domains/login/whoami/types.ts
46946
- function toDisplayTier(tier) {
46947
- const normalized = tier.toUpperCase();
46948
- switch (normalized) {
46949
- case "STANDARD":
46950
- case "BASIC":
46951
- return "Standard";
46952
- case "ADVANCED":
46953
- case "PREMIUM":
46954
- // Legacy mapping
46955
- case "ENTERPRISE":
46956
- return "Advanced";
46957
- default:
46958
- return void 0;
46959
- }
46960
- }
46961
-
46962
- // src/repl/components/Banner.tsx
46963
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
46964
- var TOTAL_WIDTH = 80;
46965
- var INNER_WIDTH = TOTAL_WIDTH - 2;
46966
- var logoLines = F5_LOGO.split("\n");
46967
- var LOGO_WIDTH = Math.max(...logoLines.map((l) => stringWidth(l)));
46968
-
46969
47085
  // src/repl/components/Suggestions.tsx
46970
47086
  var import_react24 = __toESM(require_react(), 1);
46971
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
47087
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
46972
47088
  function getCategoryColor(category) {
46973
47089
  switch (category) {
46974
47090
  case "domain":
@@ -46993,10 +47109,10 @@ function SuggestionItem({
46993
47109
  maxLabelWidth
46994
47110
  }) {
46995
47111
  const categoryColor = getCategoryColor(suggestion.category);
46996
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { children: [
46997
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: isSelected ? "#E4002B" : "#333333", children: isSelected ? "\u25B6 " : " " }),
46998
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: categoryColor, bold: isSelected, inverse: isSelected, children: suggestion.label.padEnd(maxLabelWidth) }),
46999
- suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "#666666", children: [
47112
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { children: [
47113
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: isSelected ? "#CA260A" : "#333333", children: isSelected ? "\u25B6 " : " " }),
47114
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: categoryColor, bold: isSelected, inverse: isSelected, children: suggestion.label.padEnd(maxLabelWidth) }),
47115
+ suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: "#666666", children: [
47000
47116
  " - ",
47001
47117
  suggestion.description
47002
47118
  ] })
@@ -47056,21 +47172,21 @@ function Suggestions({
47056
47172
  const maxLabelWidth = Math.max(
47057
47173
  ...visibleSuggestions.map((s) => s.label.length)
47058
47174
  );
47059
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
47175
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
47060
47176
  Box_default,
47061
47177
  {
47062
47178
  flexDirection: "column",
47063
47179
  borderStyle: "round",
47064
- borderColor: "#E4002B",
47180
+ borderColor: "#CA260A",
47065
47181
  paddingX: 1,
47066
47182
  children: [
47067
- showScrollUp && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "#666666", dimColor: true, children: [
47183
+ showScrollUp && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: "#666666", dimColor: true, children: [
47068
47184
  "\u25B2",
47069
47185
  " (",
47070
47186
  startIndex,
47071
47187
  " more above)"
47072
47188
  ] }),
47073
- visibleSuggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
47189
+ visibleSuggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
47074
47190
  SuggestionItem,
47075
47191
  {
47076
47192
  suggestion,
@@ -47080,13 +47196,13 @@ function Suggestions({
47080
47196
  },
47081
47197
  suggestion.value
47082
47198
  )),
47083
- showScrollDown && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "#666666", dimColor: true, children: [
47199
+ showScrollDown && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: "#666666", dimColor: true, children: [
47084
47200
  "\u25BC",
47085
47201
  " (",
47086
47202
  totalCount - startIndex - maxVisible,
47087
47203
  " more below)"
47088
47204
  ] }),
47089
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "#666666", dimColor: true, children: "Tab: select | Up/Down: navigate | Esc: cancel" }) })
47205
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "#666666", dimColor: true, children: "Tab: select | Up/Down: navigate | Esc: cancel" }) })
47090
47206
  ]
47091
47207
  }
47092
47208
  );
@@ -47250,6 +47366,9 @@ var DomainRegistry = class {
47250
47366
  return this.showSubcommandHelp(domain, subgroup);
47251
47367
  }
47252
47368
  const cmdName = restArgs[0]?.toLowerCase() ?? "";
47369
+ if (cmdName === "--help" || cmdName === "-h" || cmdName === "help") {
47370
+ return this.showSubcommandHelp(domain, subgroup);
47371
+ }
47253
47372
  const cmdArgs = restArgs.slice(1);
47254
47373
  const cmd2 = subgroup.commands.get(cmdName);
47255
47374
  if (cmd2) {
@@ -47419,6 +47538,16 @@ function errorResult(message) {
47419
47538
  error: message
47420
47539
  };
47421
47540
  }
47541
+ function rawStdoutResult(content) {
47542
+ return {
47543
+ output: [],
47544
+ // No regular output - rawStdout is used instead
47545
+ shouldExit: false,
47546
+ shouldClear: false,
47547
+ contextChanged: false,
47548
+ rawStdout: content
47549
+ };
47550
+ }
47422
47551
 
47423
47552
  // src/domains/login/profile/list.ts
47424
47553
  var listCommand = {
@@ -47749,60 +47878,552 @@ var setCommand = {
47749
47878
  } catch {
47750
47879
  }
47751
47880
  }
47752
- const suggestions = ["default", "system", "shared"];
47753
- return suggestions.filter((ns) => ns.startsWith(partial));
47881
+ const suggestions = ["default", "system", "shared"];
47882
+ return suggestions.filter((ns) => ns.startsWith(partial));
47883
+ }
47884
+ };
47885
+ var listCommand2 = {
47886
+ name: "list",
47887
+ description: "List available namespaces",
47888
+ usage: "",
47889
+ aliases: ["ls"],
47890
+ async execute(_args, session) {
47891
+ const currentNamespace = session.getNamespace();
47892
+ if (!session.isConnected()) {
47893
+ return errorResult(
47894
+ "Not connected to F5 XC API. Use 'login profile use <profile>' to connect."
47895
+ );
47896
+ }
47897
+ const client = session.getAPIClient();
47898
+ if (!client?.isAuthenticated()) {
47899
+ return errorResult(
47900
+ "Not authenticated. Configure a profile with API token."
47901
+ );
47902
+ }
47903
+ try {
47904
+ const response = await client.get("/api/web/namespaces");
47905
+ if (!response.ok || !response.data?.items) {
47906
+ return errorResult("Failed to fetch namespaces from API.");
47907
+ }
47908
+ const namespaces = response.data.items.map((item) => item.name).filter((name) => !!name).sort();
47909
+ const lines = ["Available namespaces:", ""];
47910
+ for (const ns of namespaces) {
47911
+ if (ns === currentNamespace) {
47912
+ lines.push(` ${ns} (current)`);
47913
+ } else {
47914
+ lines.push(` ${ns}`);
47915
+ }
47916
+ }
47917
+ lines.push("");
47918
+ lines.push("Use 'login context set <namespace>' to switch.");
47919
+ return successResult(lines);
47920
+ } catch (error) {
47921
+ const message = error instanceof Error ? error.message : String(error);
47922
+ return errorResult(`Failed to list namespaces: ${message}`);
47923
+ }
47924
+ }
47925
+ };
47926
+ var contextSubcommands = {
47927
+ name: "context",
47928
+ description: "Manage default namespace context for API operations",
47929
+ commands: /* @__PURE__ */ new Map([
47930
+ ["show", showCommand2],
47931
+ ["set", setCommand],
47932
+ ["list", listCommand2]
47933
+ ])
47934
+ };
47935
+
47936
+ // src/config/envvars.ts
47937
+ var EnvVarRegistry = [
47938
+ {
47939
+ name: `${ENV_PREFIX}_API_URL`,
47940
+ description: "API endpoint URL",
47941
+ relatedFlag: "",
47942
+ required: true
47943
+ },
47944
+ {
47945
+ name: `${ENV_PREFIX}_API_TOKEN`,
47946
+ description: "API authentication token",
47947
+ relatedFlag: "",
47948
+ required: true
47949
+ },
47950
+ {
47951
+ name: `${ENV_PREFIX}_NAMESPACE`,
47952
+ description: "Default namespace",
47953
+ relatedFlag: "-ns"
47954
+ },
47955
+ {
47956
+ name: `${ENV_PREFIX}_OUTPUT_FORMAT`,
47957
+ description: "Output format (json, yaml, table)",
47958
+ relatedFlag: "-o"
47959
+ },
47960
+ {
47961
+ name: `${ENV_PREFIX}_SUBSCRIPTION_TIER`,
47962
+ description: "Subscription tier for feature validation",
47963
+ relatedFlag: ""
47964
+ },
47965
+ {
47966
+ name: `${ENV_PREFIX}_LOGO`,
47967
+ description: "Logo display mode (auto, image, ascii, both, none)",
47968
+ relatedFlag: "--logo"
47969
+ },
47970
+ {
47971
+ name: "NO_COLOR",
47972
+ description: "Disable color output",
47973
+ relatedFlag: "--no-color"
47974
+ }
47975
+ ];
47976
+ function formatEnvVarsSection() {
47977
+ const maxLen = Math.max(...EnvVarRegistry.map((e) => e.name.length));
47978
+ const lines = ["ENVIRONMENT VARIABLES"];
47979
+ for (const env3 of EnvVarRegistry) {
47980
+ const padding = " ".repeat(maxLen - env3.name.length + 3);
47981
+ const flagNote = env3.relatedFlag ? ` [${env3.relatedFlag}]` : "";
47982
+ lines.push(` ${env3.name}${padding}${env3.description}${flagNote}`);
47983
+ }
47984
+ return lines;
47985
+ }
47986
+ function formatConfigSection() {
47987
+ return [
47988
+ "CONFIGURATION",
47989
+ ` Config file: ~/${CONFIG_FILE_NAME}`,
47990
+ " Priority: CLI flags > environment variables > config file > defaults",
47991
+ "",
47992
+ "DOCUMENTATION",
47993
+ ` ${DOCS_URL}`
47994
+ ];
47995
+ }
47996
+
47997
+ // src/config/settings.ts
47998
+ var import_yaml2 = __toESM(require_dist(), 1);
47999
+ import { homedir as homedir3 } from "os";
48000
+ import { join as join3 } from "path";
48001
+ var LOGO_MODES = [
48002
+ {
48003
+ mode: "image",
48004
+ description: "Image if terminal supports, else ASCII (default)"
48005
+ },
48006
+ { mode: "ascii", description: "ASCII art only" },
48007
+ { mode: "none", description: "No logo" }
48008
+ ];
48009
+ var DEFAULT_SETTINGS = {
48010
+ logo: "image"
48011
+ };
48012
+ function isValidLogoMode(mode) {
48013
+ return LOGO_MODES.some((m) => m.mode === mode);
48014
+ }
48015
+ function validateSettings(settings) {
48016
+ const validated = {};
48017
+ if (settings.logo && isValidLogoMode(settings.logo)) {
48018
+ validated.logo = settings.logo;
48019
+ }
48020
+ return validated;
48021
+ }
48022
+ function loadSettingsSync() {
48023
+ const configPath = join3(homedir3(), CONFIG_FILE_NAME);
48024
+ try {
48025
+ const content = __require("fs").readFileSync(
48026
+ configPath,
48027
+ "utf-8"
48028
+ );
48029
+ const parsed = import_yaml2.default.parse(content);
48030
+ return {
48031
+ ...DEFAULT_SETTINGS,
48032
+ ...validateSettings(parsed)
48033
+ };
48034
+ } catch {
48035
+ return DEFAULT_SETTINGS;
48036
+ }
48037
+ }
48038
+
48039
+ // src/domains/login/banner/display.ts
48040
+ function colorizeLogoLine(line) {
48041
+ let result = "";
48042
+ let currentColor = "none";
48043
+ for (const char of line) {
48044
+ let newColor;
48045
+ switch (char) {
48046
+ case "\u2593":
48047
+ // Dark shade - red (rendered as solid block)
48048
+ case "\u2592":
48049
+ // Medium shade - red
48050
+ case "(":
48051
+ case ")":
48052
+ case "|":
48053
+ case "_":
48054
+ newColor = "red";
48055
+ break;
48056
+ case "\u2588":
48057
+ newColor = "white";
48058
+ break;
48059
+ default:
48060
+ newColor = "none";
48061
+ }
48062
+ if (newColor !== currentColor) {
48063
+ if (currentColor !== "none") {
48064
+ result += colors.reset;
48065
+ }
48066
+ if (newColor === "red") {
48067
+ result += colors.red;
48068
+ } else if (newColor === "white") {
48069
+ result += colors.boldWhite;
48070
+ }
48071
+ currentColor = newColor;
48072
+ }
48073
+ result += char === "\u2593" ? "\u2588" : char;
48074
+ }
48075
+ if (currentColor !== "none") {
48076
+ result += colors.reset;
48077
+ }
48078
+ return result;
48079
+ }
48080
+ function printImageBanner(imageSeq, imageHeight, imageWidth) {
48081
+ const BOX = {
48082
+ topLeft: "\u256D",
48083
+ topRight: "\u256E",
48084
+ bottomLeft: "\u2570",
48085
+ bottomRight: "\u256F",
48086
+ horizontal: "\u2500",
48087
+ vertical: "\u2502"
48088
+ };
48089
+ const TOTAL_WIDTH = 80;
48090
+ const INNER_WIDTH = TOTAL_WIDTH - 2;
48091
+ const IMAGE_COL_WIDTH = 1 + imageWidth + 1;
48092
+ const TEXT_COL_WIDTH = INNER_WIDTH - IMAGE_COL_WIDTH;
48093
+ const HELP_LINES = [
48094
+ "Type 'help' for commands",
48095
+ "Run 'namespace <ns>' to set",
48096
+ "Press Ctrl+C twice to exit"
48097
+ ];
48098
+ const helpStartRow = Math.floor((imageHeight - HELP_LINES.length) / 2);
48099
+ const title = ` ${CLI_FULL_NAME} v${CLI_VERSION} `;
48100
+ const leftDashes = 3;
48101
+ const rightDashes = TOTAL_WIDTH - 1 - leftDashes - title.length - 1;
48102
+ process.stdout.write("\n");
48103
+ process.stdout.write(
48104
+ colorRed(BOX.topLeft + BOX.horizontal.repeat(leftDashes)) + colorBoldWhite(title) + colorRed(
48105
+ BOX.horizontal.repeat(Math.max(0, rightDashes)) + BOX.topRight
48106
+ ) + "\n"
48107
+ );
48108
+ process.stdout.write(
48109
+ colorRed(BOX.vertical) + " ".repeat(INNER_WIDTH) + colorRed(BOX.vertical) + "\n"
48110
+ );
48111
+ for (let row = 0; row < imageHeight; row++) {
48112
+ const helpIndex = row - helpStartRow;
48113
+ const helpText = helpIndex >= 0 && helpIndex < HELP_LINES.length ? HELP_LINES[helpIndex] ?? "" : "";
48114
+ const imageSpace = " ".repeat(IMAGE_COL_WIDTH);
48115
+ const paddedHelp = helpText.padEnd(TEXT_COL_WIDTH);
48116
+ process.stdout.write(
48117
+ colorRed(BOX.vertical) + imageSpace + colorBoldWhite(paddedHelp) + colorRed(BOX.vertical) + "\n"
48118
+ );
48119
+ }
48120
+ process.stdout.write(
48121
+ colorRed(
48122
+ BOX.bottomLeft + BOX.horizontal.repeat(INNER_WIDTH) + BOX.bottomRight
48123
+ ) + "\n"
48124
+ );
48125
+ const rowsUp = imageHeight + 1;
48126
+ process.stdout.write(`\x1B[${rowsUp}A`);
48127
+ process.stdout.write(`\x1B[2C`);
48128
+ process.stdout.write(imageSeq);
48129
+ const rowsDown = imageHeight + 1;
48130
+ process.stdout.write(`\x1B[${rowsDown}B`);
48131
+ process.stdout.write(`\x1B[1G`);
48132
+ process.stdout.write("\n");
48133
+ }
48134
+ function printAsciiBanner() {
48135
+ const BOX = {
48136
+ topLeft: "\u256D",
48137
+ topRight: "\u256E",
48138
+ bottomLeft: "\u2570",
48139
+ bottomRight: "\u256F",
48140
+ horizontal: "\u2500",
48141
+ vertical: "\u2502"
48142
+ };
48143
+ const logoLines = F5_LOGO.split("\n");
48144
+ const logoWidth = Math.max(...logoLines.map((l) => [...l].length));
48145
+ const TOTAL_WIDTH = Math.max(80, logoWidth + 4);
48146
+ const INNER_WIDTH = TOTAL_WIDTH - 2;
48147
+ const HELP_LINES = [
48148
+ "Type 'help' for commands",
48149
+ "Run 'namespace <ns>' to set",
48150
+ "Press Ctrl+C twice to exit"
48151
+ ];
48152
+ const HELP_START_ROW = 8;
48153
+ const title = ` ${CLI_FULL_NAME} v${CLI_VERSION} `;
48154
+ const leftDashes = 3;
48155
+ const rightDashes = TOTAL_WIDTH - 1 - leftDashes - title.length - 1;
48156
+ const output = [];
48157
+ output.push(
48158
+ colorRed(BOX.topLeft + BOX.horizontal.repeat(leftDashes)) + colorBoldWhite(title) + colorRed(
48159
+ BOX.horizontal.repeat(Math.max(0, rightDashes)) + BOX.topRight
48160
+ )
48161
+ );
48162
+ for (let i = 0; i < logoLines.length; i++) {
48163
+ const logoLine = logoLines[i] ?? "";
48164
+ const helpIndex = i - HELP_START_ROW;
48165
+ const helpText = helpIndex >= 0 && helpIndex < HELP_LINES.length ? HELP_LINES[helpIndex] ?? "" : "";
48166
+ const paddedLogo = logoLine.padEnd(logoWidth);
48167
+ const coloredLogo = colorizeLogoLine(paddedLogo);
48168
+ const helpColumnWidth = INNER_WIDTH - logoWidth - 1;
48169
+ const paddedHelp = helpText.padEnd(helpColumnWidth);
48170
+ output.push(
48171
+ colorRed(BOX.vertical) + coloredLogo + " " + colorBoldWhite(paddedHelp) + colorRed(BOX.vertical)
48172
+ );
48173
+ }
48174
+ output.push(
48175
+ colorRed(
48176
+ BOX.bottomLeft + BOX.horizontal.repeat(INNER_WIDTH) + BOX.bottomRight
48177
+ )
48178
+ );
48179
+ output.push("");
48180
+ process.stdout.write("\n");
48181
+ process.stdout.write(output.join("\n") + "\n");
48182
+ }
48183
+ function getBannerLines(logoMode, useImage) {
48184
+ if (logoMode === "none") {
48185
+ return [];
48186
+ }
48187
+ const BOX = {
48188
+ topLeft: "\u256D",
48189
+ topRight: "\u256E",
48190
+ bottomLeft: "\u2570",
48191
+ bottomRight: "\u256F",
48192
+ horizontal: "\u2500",
48193
+ vertical: "\u2502"
48194
+ };
48195
+ const logoLines = F5_LOGO.split("\n");
48196
+ const logoWidth = Math.max(...logoLines.map((l) => [...l].length));
48197
+ const TOTAL_WIDTH = Math.max(80, logoWidth + 4);
48198
+ const INNER_WIDTH = TOTAL_WIDTH - 2;
48199
+ const HELP_LINES = [
48200
+ "Type 'help' for commands",
48201
+ "Run 'namespace <ns>' to set",
48202
+ "Press Ctrl+C twice to exit"
48203
+ ];
48204
+ const title = ` ${CLI_FULL_NAME} v${CLI_VERSION} `;
48205
+ const leftDashes = 3;
48206
+ const rightDashes = TOTAL_WIDTH - 1 - leftDashes - title.length - 1;
48207
+ const output = [];
48208
+ if (useImage) {
48209
+ const capabilities = detectTerminalCapabilities();
48210
+ const imageSeq = getTerminalImageSequence(
48211
+ F5_LOGO_PNG_BASE64,
48212
+ capabilities,
48213
+ {
48214
+ width: F5_LOGO_DISPLAY_WIDTH,
48215
+ height: F5_LOGO_DISPLAY_HEIGHT,
48216
+ preserveAspectRatio: true
48217
+ }
48218
+ );
48219
+ if (imageSeq) {
48220
+ const imageHeight = F5_LOGO_DISPLAY_HEIGHT;
48221
+ const imageWidth = F5_LOGO_DISPLAY_WIDTH;
48222
+ const IMAGE_COL_WIDTH = 1 + imageWidth + 1;
48223
+ const TEXT_COL_WIDTH = INNER_WIDTH - IMAGE_COL_WIDTH;
48224
+ const helpStartRow = Math.floor(
48225
+ (imageHeight - HELP_LINES.length) / 2
48226
+ );
48227
+ let bannerStr = "";
48228
+ bannerStr += "\n";
48229
+ bannerStr += colorRed(BOX.topLeft + BOX.horizontal.repeat(leftDashes)) + colorBoldWhite(title) + colorRed(
48230
+ BOX.horizontal.repeat(Math.max(0, rightDashes)) + BOX.topRight
48231
+ ) + "\n";
48232
+ bannerStr += colorRed(BOX.vertical) + " ".repeat(INNER_WIDTH) + colorRed(BOX.vertical) + "\n";
48233
+ for (let row = 0; row < imageHeight; row++) {
48234
+ const helpIndex = row - helpStartRow;
48235
+ const helpText = helpIndex >= 0 && helpIndex < HELP_LINES.length ? HELP_LINES[helpIndex] ?? "" : "";
48236
+ const imageSpace = " ".repeat(IMAGE_COL_WIDTH);
48237
+ const paddedHelp = helpText.padEnd(TEXT_COL_WIDTH);
48238
+ bannerStr += colorRed(BOX.vertical) + imageSpace + colorBoldWhite(paddedHelp) + colorRed(BOX.vertical) + "\n";
48239
+ }
48240
+ bannerStr += colorRed(
48241
+ BOX.bottomLeft + BOX.horizontal.repeat(INNER_WIDTH) + BOX.bottomRight
48242
+ ) + "\n";
48243
+ const rowsUp = imageHeight + 1;
48244
+ bannerStr += `\x1B[${rowsUp}A`;
48245
+ bannerStr += `\x1B[2C`;
48246
+ bannerStr += imageSeq;
48247
+ const rowsDown = imageHeight + 1;
48248
+ bannerStr += `\x1B[${rowsDown}B`;
48249
+ bannerStr += `\x1B[1G`;
48250
+ return [bannerStr];
48251
+ }
48252
+ }
48253
+ const HELP_START_ROW = 8;
48254
+ output.push("");
48255
+ output.push(
48256
+ colorRed(BOX.topLeft + BOX.horizontal.repeat(leftDashes)) + colorBoldWhite(title) + colorRed(
48257
+ BOX.horizontal.repeat(Math.max(0, rightDashes)) + BOX.topRight
48258
+ )
48259
+ );
48260
+ for (let i = 0; i < logoLines.length; i++) {
48261
+ const logoLine = logoLines[i] ?? "";
48262
+ const helpIndex = i - HELP_START_ROW;
48263
+ const helpText = helpIndex >= 0 && helpIndex < HELP_LINES.length ? HELP_LINES[helpIndex] ?? "" : "";
48264
+ const paddedLogo = logoLine.padEnd(logoWidth);
48265
+ const coloredLogo = colorizeLogoLine(paddedLogo);
48266
+ const helpColumnWidth = INNER_WIDTH - logoWidth - 1;
48267
+ const paddedHelp = helpText.padEnd(helpColumnWidth);
48268
+ output.push(
48269
+ colorRed(BOX.vertical) + coloredLogo + " " + colorBoldWhite(paddedHelp) + colorRed(BOX.vertical)
48270
+ );
48271
+ }
48272
+ output.push(
48273
+ colorRed(
48274
+ BOX.bottomLeft + BOX.horizontal.repeat(INNER_WIDTH) + BOX.bottomRight
48275
+ )
48276
+ );
48277
+ output.push("");
48278
+ return output;
48279
+ }
48280
+ function renderBanner(logoMode, context = "startup") {
48281
+ const settings = loadSettingsSync();
48282
+ const envMode = getLogoModeFromEnv(ENV_PREFIX);
48283
+ const effectiveMode = resolveLogoMode({
48284
+ cliMode: logoMode,
48285
+ envMode,
48286
+ configMode: settings.logo
48287
+ });
48288
+ if (effectiveMode === "none") {
48289
+ return context === "repl" ? [] : void 0;
48290
+ }
48291
+ if (context === "repl") {
48292
+ const rendered2 = renderLogo(effectiveMode);
48293
+ const useImage = rendered2.effectiveMode === "image";
48294
+ return getBannerLines(rendered2.effectiveMode, useImage);
48295
+ }
48296
+ const rendered = renderLogo(effectiveMode);
48297
+ if (rendered.usedImage && rendered.effectiveMode === "image") {
48298
+ const capabilities = detectTerminalCapabilities();
48299
+ const imageSeq = getTerminalImageSequence(
48300
+ F5_LOGO_PNG_BASE64,
48301
+ capabilities,
48302
+ {
48303
+ width: F5_LOGO_DISPLAY_WIDTH,
48304
+ height: F5_LOGO_DISPLAY_HEIGHT,
48305
+ preserveAspectRatio: true
48306
+ }
48307
+ );
48308
+ if (imageSeq) {
48309
+ printImageBanner(
48310
+ imageSeq,
48311
+ F5_LOGO_DISPLAY_HEIGHT,
48312
+ F5_LOGO_DISPLAY_WIDTH
48313
+ );
48314
+ }
48315
+ return;
47754
48316
  }
47755
- };
47756
- var listCommand2 = {
47757
- name: "list",
47758
- description: "List available namespaces",
47759
- usage: "",
47760
- aliases: ["ls"],
47761
- async execute(_args, session) {
47762
- const currentNamespace = session.getNamespace();
47763
- if (!session.isConnected()) {
47764
- return errorResult(
47765
- "Not connected to F5 XC API. Use 'login profile use <profile>' to connect."
47766
- );
48317
+ printAsciiBanner();
48318
+ }
48319
+ function parseLogoArg(args) {
48320
+ for (let i = 0; i < args.length; i++) {
48321
+ const arg = args[i];
48322
+ if (arg === "--logo" && args[i + 1]) {
48323
+ const mode = args[i + 1];
48324
+ if (mode && isValidLogoMode(mode)) {
48325
+ return mode;
48326
+ }
48327
+ } else if (arg?.startsWith("--logo=")) {
48328
+ const mode = arg.slice("--logo=".length);
48329
+ if (isValidLogoMode(mode)) {
48330
+ return mode;
48331
+ }
47767
48332
  }
47768
- const client = session.getAPIClient();
47769
- if (!client?.isAuthenticated()) {
47770
- return errorResult(
47771
- "Not authenticated. Configure a profile with API token."
47772
- );
48333
+ }
48334
+ return void 0;
48335
+ }
48336
+ var bannerCommand = {
48337
+ name: "banner",
48338
+ description: "Display the xcsh banner with optional logo mode",
48339
+ usage: "[--logo <mode>]",
48340
+ async execute(args, _session) {
48341
+ if (args.includes("--help") || args.includes("-h")) {
48342
+ const helpLines = [
48343
+ "login banner - Display the xcsh banner",
48344
+ "",
48345
+ "Usage: login banner [--logo <mode>]",
48346
+ "",
48347
+ "Options:",
48348
+ " --logo <mode> Logo display mode:",
48349
+ // Generate mode list dynamically from LOGO_MODES
48350
+ ...LOGO_MODES.map(
48351
+ (m) => ` - ${m.mode.padEnd(6)} ${m.description}`
48352
+ ),
48353
+ " --help, -h Show this help message",
48354
+ "",
48355
+ "Priority Resolution:",
48356
+ " 1. CLI flag --logo (highest)",
48357
+ " 2. Environment variable F5XC_LOGO",
48358
+ " 3. Config file ~/.xcshconfig \u2192 logo: <mode>",
48359
+ " 4. Auto-detect based on terminal capabilities (fallback)",
48360
+ "",
48361
+ "Examples:",
48362
+ " login banner # Use default/auto mode",
48363
+ " login banner --logo image # Force image mode",
48364
+ " login banner --logo ascii # Force ASCII mode"
48365
+ ];
48366
+ return successResult(helpLines);
48367
+ }
48368
+ const logoMode = parseLogoArg(args);
48369
+ if (args.some((a) => a === "--logo" || a.startsWith("--logo=")) && !logoMode) {
48370
+ return errorResult("Invalid logo mode. Use: image, ascii, or none");
47773
48371
  }
47774
48372
  try {
47775
- const response = await client.get("/api/web/namespaces");
47776
- if (!response.ok || !response.data?.items) {
47777
- return errorResult("Failed to fetch namespaces from API.");
48373
+ const settings = loadSettingsSync();
48374
+ const envMode = getLogoModeFromEnv(ENV_PREFIX);
48375
+ const resolvedMode = resolveLogoMode({
48376
+ cliMode: logoMode,
48377
+ envMode,
48378
+ configMode: settings.logo
48379
+ });
48380
+ if (resolvedMode === "none") {
48381
+ return successResult([]);
47778
48382
  }
47779
- const namespaces = response.data.items.map((item) => item.name).filter((name) => !!name).sort();
47780
- const lines = ["Available namespaces:", ""];
47781
- for (const ns of namespaces) {
47782
- if (ns === currentNamespace) {
47783
- lines.push(` ${ns} (current)`);
47784
- } else {
47785
- lines.push(` ${ns}`);
48383
+ const rendered = renderLogo(resolvedMode);
48384
+ if (rendered.effectiveMode === "image") {
48385
+ const bannerLines = getBannerLines("image", true);
48386
+ if (bannerLines.length > 0 && bannerLines[0]) {
48387
+ return rawStdoutResult(bannerLines[0]);
47786
48388
  }
47787
48389
  }
47788
- lines.push("");
47789
- lines.push("Use 'login context set <namespace>' to switch.");
48390
+ const lines = getBannerLines("ascii", false);
47790
48391
  return successResult(lines);
47791
48392
  } catch (error) {
47792
- const message = error instanceof Error ? error.message : String(error);
47793
- return errorResult(`Failed to list namespaces: ${message}`);
48393
+ return errorResult(
48394
+ `Failed to display banner: ${error instanceof Error ? error.message : "Unknown error"}`
48395
+ );
48396
+ }
48397
+ },
48398
+ async completion(partial, args, _session) {
48399
+ const lastArg = args[args.length - 1];
48400
+ if (lastArg === "--logo") {
48401
+ const modes = LOGO_MODES.map((m) => m.mode);
48402
+ return modes.filter((m) => m.startsWith(partial.toLowerCase()));
47794
48403
  }
48404
+ if (!args.includes("--logo") && "--logo".startsWith(partial)) {
48405
+ return ["--logo"];
48406
+ }
48407
+ return [];
47795
48408
  }
47796
48409
  };
47797
- var contextSubcommands = {
47798
- name: "context",
47799
- description: "Manage default namespace context for API operations",
47800
- commands: /* @__PURE__ */ new Map([
47801
- ["show", showCommand2],
47802
- ["set", setCommand],
47803
- ["list", listCommand2]
47804
- ])
47805
- };
48410
+
48411
+ // src/domains/login/whoami/types.ts
48412
+ function toDisplayTier(tier) {
48413
+ const normalized = tier.toUpperCase();
48414
+ switch (normalized) {
48415
+ case "STANDARD":
48416
+ case "BASIC":
48417
+ return "Standard";
48418
+ case "ADVANCED":
48419
+ case "PREMIUM":
48420
+ // Legacy mapping
48421
+ case "ENTERPRISE":
48422
+ return "Advanced";
48423
+ default:
48424
+ return void 0;
48425
+ }
48426
+ }
47806
48427
 
47807
48428
  // src/domains/login/whoami/service.ts
47808
48429
  async function getWhoamiInfo(session, options = {}) {
@@ -48045,7 +48666,10 @@ var loginDomain = {
48045
48666
  description: "Authentication, identity, and session management for F5 XC. Manage connection profiles to save and switch between tenants, handle context for namespace targeting, and verify current authentication status with whoami.",
48046
48667
  descriptionShort: "Authentication and session management",
48047
48668
  descriptionMedium: "Manage connection profiles, authentication contexts, and session identity for F5 Distributed Cloud.",
48048
- commands: /* @__PURE__ */ new Map([["show", whoamiCommand]]),
48669
+ commands: /* @__PURE__ */ new Map([
48670
+ ["show", whoamiCommand],
48671
+ ["banner", bannerCommand]
48672
+ ]),
48049
48673
  subcommands: /* @__PURE__ */ new Map([
48050
48674
  ["profile", profileSubcommands],
48051
48675
  ["context", contextSubcommands]
@@ -50054,6 +50678,23 @@ var Completer = class {
50054
50678
  }
50055
50679
  }
50056
50680
  }
50681
+ const directCmdName = args[0]?.toLowerCase() ?? "";
50682
+ const directCmd = domain.commands.get(directCmdName);
50683
+ if (directCmd?.completion) {
50684
+ try {
50685
+ const completions = await directCmd.completion(
50686
+ currentWord,
50687
+ args.slice(1),
50688
+ this.session
50689
+ );
50690
+ return completions.map((text) => ({
50691
+ text,
50692
+ description: "",
50693
+ category: "argument"
50694
+ }));
50695
+ } catch {
50696
+ }
50697
+ }
50057
50698
  return suggestions;
50058
50699
  }
50059
50700
  /**
@@ -50646,7 +51287,7 @@ function useCompletion(options) {
50646
51287
  }
50647
51288
 
50648
51289
  // src/output/formatter.ts
50649
- var import_yaml2 = __toESM(require_dist(), 1);
51290
+ var import_yaml3 = __toESM(require_dist(), 1);
50650
51291
  function formatOutput(data, format = "yaml") {
50651
51292
  if (format === "none") {
50652
51293
  return "";
@@ -50669,7 +51310,7 @@ function formatJSON(data) {
50669
51310
  return JSON.stringify(data, null, 2);
50670
51311
  }
50671
51312
  function formatYAML(data) {
50672
- return import_yaml2.default.stringify(data, { indent: 2 });
51313
+ return import_yaml3.default.stringify(data, { indent: 2 });
50673
51314
  }
50674
51315
  function extractItems(data) {
50675
51316
  if (data && typeof data === "object" && "items" in data) {
@@ -50858,62 +51499,6 @@ function formatAPIError(statusCode, body, operation) {
50858
51499
  return lines.join("\n");
50859
51500
  }
50860
51501
 
50861
- // src/config/envvars.ts
50862
- var EnvVarRegistry = [
50863
- {
50864
- name: `${ENV_PREFIX}_API_URL`,
50865
- description: "API endpoint URL",
50866
- relatedFlag: "",
50867
- required: true
50868
- },
50869
- {
50870
- name: `${ENV_PREFIX}_API_TOKEN`,
50871
- description: "API authentication token",
50872
- relatedFlag: "",
50873
- required: true
50874
- },
50875
- {
50876
- name: `${ENV_PREFIX}_NAMESPACE`,
50877
- description: "Default namespace",
50878
- relatedFlag: "-ns"
50879
- },
50880
- {
50881
- name: `${ENV_PREFIX}_OUTPUT_FORMAT`,
50882
- description: "Output format (json, yaml, table)",
50883
- relatedFlag: "-o"
50884
- },
50885
- {
50886
- name: `${ENV_PREFIX}_SUBSCRIPTION_TIER`,
50887
- description: "Subscription tier for feature validation",
50888
- relatedFlag: ""
50889
- },
50890
- {
50891
- name: "NO_COLOR",
50892
- description: "Disable color output",
50893
- relatedFlag: "--no-color"
50894
- }
50895
- ];
50896
- function formatEnvVarsSection() {
50897
- const maxLen = Math.max(...EnvVarRegistry.map((e) => e.name.length));
50898
- const lines = ["ENVIRONMENT VARIABLES"];
50899
- for (const env3 of EnvVarRegistry) {
50900
- const padding = " ".repeat(maxLen - env3.name.length + 3);
50901
- const flagNote = env3.relatedFlag ? ` [${env3.relatedFlag}]` : "";
50902
- lines.push(` ${env3.name}${padding}${env3.description}${flagNote}`);
50903
- }
50904
- return lines;
50905
- }
50906
- function formatConfigSection() {
50907
- return [
50908
- "CONFIGURATION",
50909
- ` Config file: ~/${CONFIG_FILE_NAME}`,
50910
- " Priority: CLI flags > environment variables > config file > defaults",
50911
- "",
50912
- "DOCUMENTATION",
50913
- ` ${DOCS_URL}`
50914
- ];
50915
- }
50916
-
50917
51502
  // src/repl/help.ts
50918
51503
  function formatRootHelp() {
50919
51504
  return [
@@ -51742,6 +52327,7 @@ async function executeCommand(input, session) {
51742
52327
  contextChanged: false
51743
52328
  };
51744
52329
  }
52330
+ session.addToHistory(input);
51745
52331
  if (cmd.isDirectNavigation) {
51746
52332
  return handleDirectNavigation(cmd, ctx, session);
51747
52333
  }
@@ -51768,7 +52354,6 @@ async function executeCommand(input, session) {
51768
52354
  };
51769
52355
  }
51770
52356
  }
51771
- session.addToHistory(cmd.raw);
51772
52357
  return await executeAPICommand(session, ctx, cmd);
51773
52358
  }
51774
52359
  function domainToResourcePath(domain) {
@@ -51976,7 +52561,14 @@ async function executeAPICommand(session, ctx, cmd) {
51976
52561
  }
51977
52562
 
51978
52563
  // src/repl/App.tsx
51979
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
52564
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
52565
+ function isValidDomain2(word) {
52566
+ const lowerWord = word.toLowerCase();
52567
+ if (isCustomDomain(lowerWord)) return true;
52568
+ if (domainRegistry.has(lowerWord)) return true;
52569
+ if (extensionRegistry.getExtension(lowerWord)) return true;
52570
+ return false;
52571
+ }
51980
52572
  function toUISuggestions(suggestions) {
51981
52573
  return suggestions.map((s) => ({
51982
52574
  label: s.text,
@@ -51986,11 +52578,11 @@ function toUISuggestions(suggestions) {
51986
52578
  // Provide default to avoid undefined
51987
52579
  }));
51988
52580
  }
51989
- function App2() {
52581
+ function App2({ initialSession } = {}) {
51990
52582
  const { exit } = use_app_default();
51991
52583
  const { stdout } = use_stdout_default();
51992
- const [session] = (0, import_react28.useState)(() => new REPLSession());
51993
- const [isInitialized, setIsInitialized] = (0, import_react28.useState)(false);
52584
+ const [session] = (0, import_react28.useState)(() => initialSession ?? new REPLSession());
52585
+ const [isInitialized, setIsInitialized] = (0, import_react28.useState)(!!initialSession);
51994
52586
  const [input, setInputState] = (0, import_react28.useState)("");
51995
52587
  const inputRef = (0, import_react28.useRef)("");
51996
52588
  const setInput = (0, import_react28.useCallback)(
@@ -52011,12 +52603,27 @@ function App2() {
52011
52603
  const [statusHint, setStatusHint] = (0, import_react28.useState)("Ctrl+C twice to exit");
52012
52604
  const [historyArray, setHistoryArray] = (0, import_react28.useState)([]);
52013
52605
  const [inputKey, setInputKey] = (0, import_react28.useState)(0);
52606
+ const [hideStatusBar, setHideStatusBar] = (0, import_react28.useState)(false);
52607
+ const [pendingRawStdout, setPendingRawStdout] = (0, import_react28.useState)(
52608
+ null
52609
+ );
52610
+ (0, import_react28.useEffect)(() => {
52611
+ if (hideStatusBar && pendingRawStdout) {
52612
+ process.stdout.write(pendingRawStdout);
52613
+ process.stdout.write("\n\n\n");
52614
+ setPendingRawStdout(null);
52615
+ setHideStatusBar(false);
52616
+ }
52617
+ }, [hideStatusBar, pendingRawStdout]);
52014
52618
  const completion = useCompletion({
52015
52619
  session: isInitialized ? session : null
52016
52620
  });
52017
52621
  const history = useHistory({
52018
52622
  history: historyArray,
52019
- onSelect: (cmd) => setInput(cmd)
52623
+ onSelect: (cmd) => {
52624
+ setInput(cmd);
52625
+ setInputKey((k) => k + 1);
52626
+ }
52020
52627
  });
52021
52628
  const ctrlC = useDoubleCtrlC({
52022
52629
  windowMs: 500,
@@ -52030,13 +52637,15 @@ function App2() {
52030
52637
  });
52031
52638
  (0, import_react28.useEffect)(() => {
52032
52639
  const init = async () => {
52033
- await session.initialize();
52640
+ if (!isInitialized) {
52641
+ await session.initialize();
52642
+ setIsInitialized(true);
52643
+ }
52034
52644
  setPrompt(buildPlainPrompt(session));
52035
52645
  const histMgr = session.getHistory();
52036
52646
  if (histMgr) {
52037
52647
  setHistoryArray(histMgr.getHistory());
52038
52648
  }
52039
- setIsInitialized(true);
52040
52649
  setGitInfo(getGitInfo());
52041
52650
  };
52042
52651
  init();
@@ -52106,7 +52715,10 @@ function App2() {
52106
52715
  if (!trimmed) return;
52107
52716
  addOutput(prompt + trimmed);
52108
52717
  const result = await executeCommand(trimmed, session);
52109
- if (result.shouldClear) {
52718
+ if (result.rawStdout) {
52719
+ setHideStatusBar(true);
52720
+ setPendingRawStdout(result.rawStdout);
52721
+ } else if (result.shouldClear) {
52110
52722
  setOutputItems([]);
52111
52723
  } else {
52112
52724
  result.output.forEach((line) => addOutput(line));
@@ -52129,11 +52741,23 @@ function App2() {
52129
52741
  setInput(newValue);
52130
52742
  if (completion.isShowing) {
52131
52743
  completion.filterSuggestions(newValue);
52744
+ return;
52132
52745
  }
52133
52746
  if (newValue !== oldValue && newValue.endsWith("/")) {
52134
52747
  const beforeSlash = newValue.slice(0, -1);
52135
52748
  if (beforeSlash === "" || beforeSlash.endsWith(" ")) {
52136
52749
  completion.triggerCompletion(newValue);
52750
+ return;
52751
+ }
52752
+ }
52753
+ if (newValue !== oldValue && newValue.endsWith(" ") && !oldValue.endsWith(" ")) {
52754
+ const trimmed = newValue.trimEnd();
52755
+ const words = trimmed.split(/\s+/);
52756
+ if (words.length > 0 && words[0]) {
52757
+ const firstWord = words[0].startsWith("/") ? words[0].slice(1) : words[0];
52758
+ if (isValidDomain2(firstWord)) {
52759
+ completion.triggerCompletion(newValue);
52760
+ }
52137
52761
  }
52138
52762
  }
52139
52763
  },
@@ -52248,10 +52872,10 @@ function App2() {
52248
52872
  },
52249
52873
  [applyCompletion, completion]
52250
52874
  );
52251
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", width, children: [
52252
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Static, { items: outputItems, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: item.content }, item.id) }),
52253
- isInitialized ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
52254
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
52875
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", width, children: [
52876
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Static, { items: outputItems, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: item.content }, item.id) }),
52877
+ isInitialized ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
52878
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
52255
52879
  InputBox,
52256
52880
  {
52257
52881
  prompt,
@@ -52263,7 +52887,7 @@ function App2() {
52263
52887
  inputKey
52264
52888
  }
52265
52889
  ),
52266
- completion.isShowing && completion.suggestions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
52890
+ !hideStatusBar && (completion.isShowing && completion.suggestions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
52267
52891
  Suggestions,
52268
52892
  {
52269
52893
  suggestions: toUISuggestions(
@@ -52276,115 +52900,25 @@ function App2() {
52276
52900
  maxVisible: 20,
52277
52901
  isActive: false
52278
52902
  }
52279
- ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
52903
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
52280
52904
  StatusBar,
52281
52905
  {
52282
52906
  gitInfo,
52283
52907
  width,
52284
52908
  hint: statusHint
52285
52909
  }
52286
- )
52287
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: "Initializing..." })
52910
+ ))
52911
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: "Initializing..." })
52288
52912
  ] });
52289
52913
  }
52290
52914
 
52291
52915
  // src/index.tsx
52292
- var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
52293
- function colorizeLogoLine(line) {
52294
- let result = "";
52295
- let currentColor = "none";
52296
- for (const char of line) {
52297
- let newColor;
52298
- switch (char) {
52299
- case "\u2593":
52300
- // Dark shade - red (rendered as solid block)
52301
- case "\u2592":
52302
- // Medium shade - red
52303
- case "(":
52304
- case ")":
52305
- case "|":
52306
- case "_":
52307
- newColor = "red";
52308
- break;
52309
- case "\u2588":
52310
- newColor = "white";
52311
- break;
52312
- default:
52313
- newColor = "none";
52314
- }
52315
- if (newColor !== currentColor) {
52316
- if (currentColor !== "none") {
52317
- result += colors.reset;
52318
- }
52319
- if (newColor === "red") {
52320
- result += colors.red;
52321
- } else if (newColor === "white") {
52322
- result += colors.boldWhite;
52323
- }
52324
- currentColor = newColor;
52325
- }
52326
- result += char === "\u2593" ? "\u2588" : char;
52327
- }
52328
- if (currentColor !== "none") {
52329
- result += colors.reset;
52330
- }
52331
- return result;
52332
- }
52333
- function printBannerToScrollback() {
52334
- const BOX = {
52335
- topLeft: "\u256D",
52336
- topRight: "\u256E",
52337
- bottomLeft: "\u2570",
52338
- bottomRight: "\u256F",
52339
- horizontal: "\u2500",
52340
- vertical: "\u2502",
52341
- leftT: "\u251C",
52342
- rightT: "\u2524"
52343
- };
52344
- const logoLines2 = F5_LOGO.split("\n");
52345
- const logoWidth = Math.max(...logoLines2.map((l) => [...l].length));
52346
- const TOTAL_WIDTH2 = Math.max(80, logoWidth + 4);
52347
- const INNER_WIDTH2 = TOTAL_WIDTH2 - 2;
52348
- const HELP_LINES = [
52349
- "Type 'help' for commands",
52350
- "Run 'namespace <ns>' to set",
52351
- "Press Ctrl+C twice to exit"
52352
- ];
52353
- const HELP_START_ROW = 8;
52354
- const title = ` ${CLI_FULL_NAME} v${CLI_VERSION} `;
52355
- const leftDashes = 3;
52356
- const rightDashes = TOTAL_WIDTH2 - 1 - leftDashes - title.length - 1;
52357
- const output = [];
52358
- output.push(
52359
- colorRed(BOX.topLeft + BOX.horizontal.repeat(leftDashes)) + colorBoldWhite(title) + colorRed(
52360
- BOX.horizontal.repeat(Math.max(0, rightDashes)) + BOX.topRight
52361
- )
52362
- );
52363
- for (let i = 0; i < logoLines2.length; i++) {
52364
- const logoLine = logoLines2[i] ?? "";
52365
- const helpIndex = i - HELP_START_ROW;
52366
- const helpText = helpIndex >= 0 && helpIndex < HELP_LINES.length ? HELP_LINES[helpIndex] ?? "" : "";
52367
- const paddedLogo = logoLine.padEnd(logoWidth);
52368
- const coloredLogo = colorizeLogoLine(paddedLogo);
52369
- const helpColumnWidth = INNER_WIDTH2 - logoWidth - 1;
52370
- const paddedHelp = helpText.padEnd(helpColumnWidth);
52371
- output.push(
52372
- colorRed(BOX.vertical) + coloredLogo + " " + colorBoldWhite(paddedHelp) + colorRed(BOX.vertical)
52373
- );
52374
- }
52375
- output.push(
52376
- colorRed(
52377
- BOX.bottomLeft + BOX.horizontal.repeat(INNER_WIDTH2) + BOX.bottomRight
52378
- )
52379
- );
52380
- output.push("");
52381
- process.stdout.write(output.join("\n") + "\n");
52382
- }
52916
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
52383
52917
  var program2 = new Command();
52384
52918
  program2.configureHelp({
52385
52919
  formatHelp: () => formatRootHelp().join("\n")
52386
52920
  });
52387
- program2.name(CLI_NAME).description("F5 Distributed Cloud Shell - Interactive CLI for F5 XC").version(CLI_VERSION, "-v, --version", "Show version number").option("-i, --interactive", "Force interactive mode").option("--no-color", "Disable color output").option("-h, --help", "Show help").argument("[command...]", "Command to execute non-interactively").allowUnknownOption(true).helpOption(false).action(
52921
+ program2.name(CLI_NAME).description("F5 Distributed Cloud Shell - Interactive CLI for F5 XC").version(CLI_VERSION, "-v, --version", "Show version number").option("-i, --interactive", "Force interactive mode").option("--no-color", "Disable color output").option("--logo <mode>", "Logo display mode: image, ascii, none").option("-h, --help", "Show help").argument("[command...]", "Command to execute non-interactively").allowUnknownOption(true).helpOption(false).action(
52388
52922
  async (commandArgs, options) => {
52389
52923
  if (options.help && commandArgs.length === 0) {
52390
52924
  formatRootHelp().forEach((line) => console.log(line));
@@ -52393,6 +52927,9 @@ program2.name(CLI_NAME).description("F5 Distributed Cloud Shell - Interactive CL
52393
52927
  if (options.help && commandArgs.length > 0) {
52394
52928
  commandArgs.push("--help");
52395
52929
  }
52930
+ if (options.logo && commandArgs.length > 0) {
52931
+ commandArgs.push("--logo", options.logo);
52932
+ }
52396
52933
  if (commandArgs.length === 0 || options.interactive) {
52397
52934
  if (!process.stdin.isTTY && !options.interactive) {
52398
52935
  console.error(
@@ -52403,9 +52940,15 @@ program2.name(CLI_NAME).description("F5 Distributed Cloud Shell - Interactive CL
52403
52940
  );
52404
52941
  process.exit(1);
52405
52942
  }
52406
- printBannerToScrollback();
52943
+ const cliLogoMode = options.logo && isValidLogoMode(options.logo) ? options.logo : void 0;
52944
+ process.stdout.write("Initializing...");
52945
+ const session = new REPLSession();
52946
+ await session.initialize();
52947
+ process.stdout.write("\r\x1B[K");
52948
+ renderBanner(cliLogoMode, "startup");
52407
52949
  process.stdin.resume();
52408
- render_default(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(App2, {}));
52950
+ const appProps = { initialSession: session };
52951
+ render_default(/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(App2, { ...appProps }));
52409
52952
  return;
52410
52953
  }
52411
52954
  await executeNonInteractive(commandArgs);