@robinmordasiewicz/f5xc-xcsh 1.0.85-2601020718 → 1.0.85-2601020815
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 +41 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46237,7 +46237,8 @@ var ContextValidator = class {
|
|
|
46237
46237
|
|
|
46238
46238
|
// src/repl/history.ts
|
|
46239
46239
|
import { readFileSync as readFileSync2, writeFileSync, mkdirSync, existsSync as existsSync2 } from "fs";
|
|
46240
|
-
import { dirname } from "path";
|
|
46240
|
+
import { dirname, join as join2 } from "path";
|
|
46241
|
+
import { homedir as homedir2 } from "os";
|
|
46241
46242
|
|
|
46242
46243
|
// src/config/paths.ts
|
|
46243
46244
|
import { homedir } from "os";
|
|
@@ -46281,6 +46282,7 @@ var paths = {
|
|
|
46281
46282
|
};
|
|
46282
46283
|
|
|
46283
46284
|
// src/repl/history.ts
|
|
46285
|
+
var LEGACY_HISTORY_PATH = join2(homedir2(), ".xcsh_history");
|
|
46284
46286
|
var SENSITIVE_PATTERNS = [
|
|
46285
46287
|
// Flag-based patterns: --flag value or --flag=value (capture flag and separator separately)
|
|
46286
46288
|
{
|
|
@@ -46339,9 +46341,21 @@ var HistoryManager = class _HistoryManager {
|
|
|
46339
46341
|
}
|
|
46340
46342
|
/**
|
|
46341
46343
|
* Load reads history from the history file
|
|
46344
|
+
* Includes one-time migration from legacy ~/.xcsh_history location
|
|
46342
46345
|
*/
|
|
46343
46346
|
async load() {
|
|
46344
46347
|
try {
|
|
46348
|
+
const newPathExists = existsSync2(this.path);
|
|
46349
|
+
const legacyExists = existsSync2(LEGACY_HISTORY_PATH);
|
|
46350
|
+
if (!newPathExists && legacyExists) {
|
|
46351
|
+
const dir = dirname(this.path);
|
|
46352
|
+
mkdirSync(dir, { recursive: true });
|
|
46353
|
+
const legacyContent = readFileSync2(
|
|
46354
|
+
LEGACY_HISTORY_PATH,
|
|
46355
|
+
"utf-8"
|
|
46356
|
+
);
|
|
46357
|
+
writeFileSync(this.path, legacyContent, "utf-8");
|
|
46358
|
+
}
|
|
46345
46359
|
if (!existsSync2(this.path)) {
|
|
46346
46360
|
return;
|
|
46347
46361
|
}
|
|
@@ -46433,43 +46447,38 @@ var HistoryManager = class _HistoryManager {
|
|
|
46433
46447
|
};
|
|
46434
46448
|
|
|
46435
46449
|
// src/domains/descriptions.generated.ts
|
|
46450
|
+
var CLI_TITLE_FROM_SPEC = "F5 Distributed Cloud API";
|
|
46451
|
+
var CLI_DESCRIPTION_FROM_SPEC = "Unified application services across multi-cloud, edge, and hybrid environments. Load balancers with origin pools and health checks for traffic distribution. Web application firewall and bot defense for application protection. DNS zones with geographic routing for name resolution. Cloud sites on AWS, Azure, and GCP for infrastructure deployment. Service policies, network security, and observability dashboards from a single control plane.";
|
|
46436
46452
|
var generatedDescriptions = {
|
|
46437
46453
|
version: "1.0.0",
|
|
46438
|
-
generatedAt: "2026-01-
|
|
46439
|
-
cli: {
|
|
46440
|
-
"xcsh": {
|
|
46441
|
-
short: "Configure multi-cloud application delivery services",
|
|
46442
|
-
medium: "Manage load balancers, security policies, DNS routing, and cloud site provisioning across hybrid environments.",
|
|
46443
|
-
long: "Deploy distributed application infrastructure spanning AWS, Azure, GCP, and edge locations. Create origin pools with health monitoring and traffic management. Apply WAF rules, bot mitigation, and DDoS protection. Set up DNS zones supporting geographic and weighted routing strategies. Establish network segmentation and service mesh configurations. Monitor performance through observability dashboards. Validate subscription quotas before resource creation. Generate JSON output for CI/CD pipeline integration."
|
|
46444
|
-
}
|
|
46445
|
-
},
|
|
46454
|
+
generatedAt: "2026-01-02T08:07:08.466Z",
|
|
46446
46455
|
domains: {
|
|
46447
46456
|
"login": {
|
|
46448
|
-
short: "
|
|
46449
|
-
medium: "
|
|
46450
|
-
long: "Handle
|
|
46457
|
+
short: "Manage authentication and session profiles",
|
|
46458
|
+
medium: "Configure authentication credentials, manage named profiles for different environments, and control connection context for CLI sessions.",
|
|
46459
|
+
long: "Handle identity verification and persistent session state for CLI operations. Use 'show' to display current token status and credential validity. Create named profiles for distinct tenants or environments with the 'profile' command, enabling quick switching without re-entering passwords. Set active endpoint URLs and default namespaces using 'context'. View system announcements with 'banner'. Stored configurations persist securely across sessions.",
|
|
46451
46460
|
subcommands: {
|
|
46452
46461
|
"profile": {
|
|
46453
|
-
short: "Manage saved
|
|
46454
|
-
medium: "Store named configurations with URLs and tokens
|
|
46455
|
-
long: "
|
|
46462
|
+
short: "Manage saved credential sets for tenant connections",
|
|
46463
|
+
medium: "Store named authentication configurations with URLs and tokens. Switch between environments without re-entering credentials each time.",
|
|
46464
|
+
long: "Configure named credential sets that persist tenant URLs and access tokens for quick environment switching. Create entries for development, staging, and production tenants, then activate them as needed. List all saved entries, view their configuration details, set one as active for subsequent commands, or remove entries no longer needed. Credentials are stored securely in your local configuration directory and persist across sessions."
|
|
46456
46465
|
},
|
|
46457
46466
|
"context": {
|
|
46458
|
-
short: "Manage default namespace
|
|
46459
|
-
medium: "Configure and switch between namespace settings that
|
|
46460
|
-
long: "
|
|
46467
|
+
short: "Manage default namespace for scoping operations",
|
|
46468
|
+
medium: "Configure, display, and switch between namespace settings that scope subsequent commands to organizational boundaries.",
|
|
46469
|
+
long: "Manage namespace settings that determine the default scope for resource operations. The active namespace applies when commands do not explicitly provide one, reducing repetitive flags across multiple operations. Use 'show' to display the current active namespace, 'set' to change the default for future commands, and 'list' to view all available namespaces. Settings persist across sessions until explicitly changed, streamlining workflows within a single boundary."
|
|
46461
46470
|
}
|
|
46462
46471
|
}
|
|
46463
46472
|
},
|
|
46464
46473
|
"cloudstatus": {
|
|
46465
|
-
short: "
|
|
46466
|
-
medium: "
|
|
46467
|
-
long: "
|
|
46474
|
+
short: "Check platform status and service incidents",
|
|
46475
|
+
medium: "View operational health, active incidents, component availability, and scheduled maintenance windows for infrastructure services.",
|
|
46476
|
+
long: "Monitor real-time service availability across infrastructure components. Query active incidents with severity classification and affected systems, inspect individual component states, and review upcoming maintenance schedules. Filter by component type, date range, or impact level. Generate human-readable summaries or structured JSON output for integration with alerting tools and automation pipelines. Designed for operations teams tracking system reliability and coordinating around planned outages."
|
|
46468
46477
|
},
|
|
46469
46478
|
"completion": {
|
|
46470
|
-
short: "Generate tab-completion scripts for
|
|
46471
|
-
medium: "Create
|
|
46472
|
-
long: "
|
|
46479
|
+
short: "Generate tab-completion scripts for supported shells",
|
|
46480
|
+
medium: "Create shell integration scripts for bash, zsh, and fish that provide intelligent tab-triggered suggestions for commands, flags, and arguments.",
|
|
46481
|
+
long: "Output scripts enabling your terminal to suggest valid options when pressing Tab. Supports bash, zsh, and fish with automatic command discovery, argument hints, and flag recommendations. Install the generated output in your shell's designated directory or source it directly in your configuration file (e.g., .bashrc, .zshrc). Once active, Tab displays available subcommands, recognized flags, and expected parameter values as you type, reducing errors and accelerating CLI usage through context-aware assistance."
|
|
46473
46482
|
}
|
|
46474
46483
|
}
|
|
46475
46484
|
};
|
|
@@ -46620,8 +46629,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
46620
46629
|
var CLI_NAME = "xcsh";
|
|
46621
46630
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
46622
46631
|
function getVersion() {
|
|
46623
|
-
if ("v1.0.85-
|
|
46624
|
-
return "v1.0.85-
|
|
46632
|
+
if ("v1.0.85-2601020815") {
|
|
46633
|
+
return "v1.0.85-2601020815";
|
|
46625
46634
|
}
|
|
46626
46635
|
if (process.env.XCSH_VERSION) {
|
|
46627
46636
|
return process.env.XCSH_VERSION;
|
|
@@ -46630,9 +46639,9 @@ function getVersion() {
|
|
|
46630
46639
|
}
|
|
46631
46640
|
var CLI_VERSION = getVersion();
|
|
46632
46641
|
var cliDescs = getCliDescriptions();
|
|
46633
|
-
var CLI_DESCRIPTION_SHORT = cliDescs?.short ?? "
|
|
46634
|
-
var CLI_DESCRIPTION_MEDIUM = cliDescs?.medium ?? CLI_DESCRIPTION_SHORT;
|
|
46635
|
-
var CLI_DESCRIPTION_LONG = cliDescs?.long ?? CLI_DESCRIPTION_MEDIUM;
|
|
46642
|
+
var CLI_DESCRIPTION_SHORT = CLI_TITLE_FROM_SPEC ?? cliDescs?.short ?? "F5 Distributed Cloud Shell";
|
|
46643
|
+
var CLI_DESCRIPTION_MEDIUM = CLI_TITLE_FROM_SPEC ?? cliDescs?.medium ?? CLI_DESCRIPTION_SHORT;
|
|
46644
|
+
var CLI_DESCRIPTION_LONG = CLI_DESCRIPTION_FROM_SPEC ?? cliDescs?.long ?? CLI_DESCRIPTION_MEDIUM;
|
|
46636
46645
|
var ENV_PREFIX = "F5XC";
|
|
46637
46646
|
var F5_LOGO = ` ________
|
|
46638
46647
|
(\u2592\u2592\u2592\u2592\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2592\u2592\u2592\u2592)
|
|
@@ -46695,7 +46704,7 @@ function colorDim(text) {
|
|
|
46695
46704
|
// src/profile/manager.ts
|
|
46696
46705
|
var import_yaml = __toESM(require_dist(), 1);
|
|
46697
46706
|
import { promises as fs2 } from "fs";
|
|
46698
|
-
import { join as
|
|
46707
|
+
import { join as join3 } from "path";
|
|
46699
46708
|
function snakeToCamel(str) {
|
|
46700
46709
|
return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
46701
46710
|
}
|
|
@@ -46728,7 +46737,7 @@ var ProfileManager = class {
|
|
|
46728
46737
|
* Get path to profile JSON file
|
|
46729
46738
|
*/
|
|
46730
46739
|
getProfilePath(name) {
|
|
46731
|
-
return
|
|
46740
|
+
return join3(this.config.profilesDir, `${name}.json`);
|
|
46732
46741
|
}
|
|
46733
46742
|
/**
|
|
46734
46743
|
* Validate profile name (alphanumeric, dash, underscore only)
|
|
@@ -46787,7 +46796,7 @@ var ProfileManager = class {
|
|
|
46787
46796
|
await this.ensureDirectories();
|
|
46788
46797
|
const extensions = [".json", ".yaml", ".yml"];
|
|
46789
46798
|
for (const ext of extensions) {
|
|
46790
|
-
const path =
|
|
46799
|
+
const path = join3(this.config.profilesDir, `${name}${ext}`);
|
|
46791
46800
|
try {
|
|
46792
46801
|
const data = await fs2.readFile(path, "utf-8");
|
|
46793
46802
|
let parsed;
|