@robinmordasiewicz/f5xc-xcsh 1.0.82-2601010009 → 1.0.82-2601010045
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 +51 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45009,8 +45009,50 @@ var ContextValidator = class {
|
|
|
45009
45009
|
|
|
45010
45010
|
// src/repl/history.ts
|
|
45011
45011
|
import { readFileSync as readFileSync2, writeFileSync, mkdirSync, existsSync as existsSync2 } from "fs";
|
|
45012
|
+
import { dirname } from "path";
|
|
45013
|
+
|
|
45014
|
+
// src/config/paths.ts
|
|
45012
45015
|
import { homedir } from "os";
|
|
45013
|
-
import { join
|
|
45016
|
+
import { join } from "path";
|
|
45017
|
+
var APP_NAME = "xcsh";
|
|
45018
|
+
function getConfigDir() {
|
|
45019
|
+
const xdgConfig = process.env.XDG_CONFIG_HOME;
|
|
45020
|
+
if (xdgConfig) {
|
|
45021
|
+
return join(xdgConfig, APP_NAME);
|
|
45022
|
+
}
|
|
45023
|
+
return join(homedir(), ".config", APP_NAME);
|
|
45024
|
+
}
|
|
45025
|
+
function getStateDir() {
|
|
45026
|
+
const xdgState = process.env.XDG_STATE_HOME;
|
|
45027
|
+
if (xdgState) {
|
|
45028
|
+
return join(xdgState, APP_NAME);
|
|
45029
|
+
}
|
|
45030
|
+
return join(homedir(), ".local", "state", APP_NAME);
|
|
45031
|
+
}
|
|
45032
|
+
var paths = {
|
|
45033
|
+
// Config files (XDG_CONFIG_HOME)
|
|
45034
|
+
get configDir() {
|
|
45035
|
+
return getConfigDir();
|
|
45036
|
+
},
|
|
45037
|
+
get profilesDir() {
|
|
45038
|
+
return join(getConfigDir(), "profiles");
|
|
45039
|
+
},
|
|
45040
|
+
get activeProfile() {
|
|
45041
|
+
return join(getConfigDir(), "active_profile");
|
|
45042
|
+
},
|
|
45043
|
+
get settings() {
|
|
45044
|
+
return join(getConfigDir(), "config.yaml");
|
|
45045
|
+
},
|
|
45046
|
+
// State files (XDG_STATE_HOME)
|
|
45047
|
+
get stateDir() {
|
|
45048
|
+
return getStateDir();
|
|
45049
|
+
},
|
|
45050
|
+
get history() {
|
|
45051
|
+
return join(getStateDir(), "history");
|
|
45052
|
+
}
|
|
45053
|
+
};
|
|
45054
|
+
|
|
45055
|
+
// src/repl/history.ts
|
|
45014
45056
|
var SENSITIVE_PATTERNS = [
|
|
45015
45057
|
// Flag-based patterns: --flag value or --flag=value (capture flag and separator separately)
|
|
45016
45058
|
{
|
|
@@ -45047,11 +45089,7 @@ function redactSensitive(cmd) {
|
|
|
45047
45089
|
return redacted;
|
|
45048
45090
|
}
|
|
45049
45091
|
function getHistoryFilePath() {
|
|
45050
|
-
|
|
45051
|
-
return join(homedir(), ".xcsh_history");
|
|
45052
|
-
} catch {
|
|
45053
|
-
return ".xcsh_history";
|
|
45054
|
-
}
|
|
45092
|
+
return paths.history;
|
|
45055
45093
|
}
|
|
45056
45094
|
var HistoryManager = class _HistoryManager {
|
|
45057
45095
|
path;
|
|
@@ -45354,8 +45392,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
45354
45392
|
var CLI_NAME = "xcsh";
|
|
45355
45393
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
45356
45394
|
function getVersion() {
|
|
45357
|
-
if ("v1.0.82-
|
|
45358
|
-
return "v1.0.82-
|
|
45395
|
+
if ("v1.0.82-2601010045") {
|
|
45396
|
+
return "v1.0.82-2601010045";
|
|
45359
45397
|
}
|
|
45360
45398
|
if (process.env.XCSH_VERSION) {
|
|
45361
45399
|
return process.env.XCSH_VERSION;
|
|
@@ -45367,7 +45405,6 @@ var cliDescs = getCliDescriptions();
|
|
|
45367
45405
|
var CLI_DESCRIPTION_SHORT = cliDescs?.short ?? "Navigate cloud services via interactive shell";
|
|
45368
45406
|
var CLI_DESCRIPTION_MEDIUM = cliDescs?.medium ?? CLI_DESCRIPTION_SHORT;
|
|
45369
45407
|
var CLI_DESCRIPTION_LONG = cliDescs?.long ?? CLI_DESCRIPTION_MEDIUM;
|
|
45370
|
-
var CONFIG_FILE_NAME = ".xcshconfig";
|
|
45371
45408
|
var ENV_PREFIX = "F5XC";
|
|
45372
45409
|
var F5_LOGO = ` ________
|
|
45373
45410
|
(\u2592\u2592\u2592\u2592\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2593\u2592\u2592\u2592\u2592)
|
|
@@ -45424,7 +45461,6 @@ function colorDim(text) {
|
|
|
45424
45461
|
// src/profile/manager.ts
|
|
45425
45462
|
var import_yaml = __toESM(require_dist(), 1);
|
|
45426
45463
|
import { promises as fs2 } from "fs";
|
|
45427
|
-
import { homedir as homedir2 } from "os";
|
|
45428
45464
|
import { join as join2 } from "path";
|
|
45429
45465
|
function snakeToCamel(str) {
|
|
45430
45466
|
return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
@@ -45436,21 +45472,13 @@ function convertKeysToCamelCase(obj) {
|
|
|
45436
45472
|
}
|
|
45437
45473
|
return result;
|
|
45438
45474
|
}
|
|
45439
|
-
function getConfigDir() {
|
|
45440
|
-
const xdgConfig = process.env.XDG_CONFIG_HOME;
|
|
45441
|
-
if (xdgConfig) {
|
|
45442
|
-
return join2(xdgConfig, "xcsh");
|
|
45443
|
-
}
|
|
45444
|
-
return join2(homedir2(), ".config", "xcsh");
|
|
45445
|
-
}
|
|
45446
45475
|
var ProfileManager = class {
|
|
45447
45476
|
config;
|
|
45448
45477
|
constructor() {
|
|
45449
|
-
const configDir = getConfigDir();
|
|
45450
45478
|
this.config = {
|
|
45451
|
-
configDir,
|
|
45452
|
-
profilesDir:
|
|
45453
|
-
activeProfileFile:
|
|
45479
|
+
configDir: paths.configDir,
|
|
45480
|
+
profilesDir: paths.profilesDir,
|
|
45481
|
+
activeProfileFile: paths.activeProfile
|
|
45454
45482
|
};
|
|
45455
45483
|
}
|
|
45456
45484
|
/**
|
|
@@ -46588,7 +46616,7 @@ function formatEnvVarsSection() {
|
|
|
46588
46616
|
function formatConfigSection() {
|
|
46589
46617
|
return [
|
|
46590
46618
|
"CONFIGURATION",
|
|
46591
|
-
` Config file:
|
|
46619
|
+
` Config file: ${paths.settings}`,
|
|
46592
46620
|
" Priority: CLI flags > environment variables > config file > defaults",
|
|
46593
46621
|
"",
|
|
46594
46622
|
"DOCUMENTATION",
|
|
@@ -49333,8 +49361,6 @@ var contextSubcommands = {
|
|
|
49333
49361
|
|
|
49334
49362
|
// src/config/settings.ts
|
|
49335
49363
|
var import_yaml3 = __toESM(require_dist(), 1);
|
|
49336
|
-
import { homedir as homedir3 } from "os";
|
|
49337
|
-
import { join as join3 } from "path";
|
|
49338
49364
|
var LOGO_MODES = [
|
|
49339
49365
|
{
|
|
49340
49366
|
mode: "image",
|
|
@@ -49357,7 +49383,7 @@ function validateSettings(settings) {
|
|
|
49357
49383
|
return validated;
|
|
49358
49384
|
}
|
|
49359
49385
|
function loadSettingsSync() {
|
|
49360
|
-
const configPath =
|
|
49386
|
+
const configPath = paths.settings;
|
|
49361
49387
|
try {
|
|
49362
49388
|
const content = __require("fs").readFileSync(
|
|
49363
49389
|
configPath,
|