@robinmordasiewicz/f5xc-xcsh 1.0.85-2601020718 → 1.0.85-2601020738

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -6
  2. 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
  }
@@ -46620,8 +46634,8 @@ function getLogoModeFromEnv(envPrefix) {
46620
46634
  var CLI_NAME = "xcsh";
46621
46635
  var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
46622
46636
  function getVersion() {
46623
- if ("v1.0.85-2601020718") {
46624
- return "v1.0.85-2601020718";
46637
+ if ("v1.0.85-2601020738") {
46638
+ return "v1.0.85-2601020738";
46625
46639
  }
46626
46640
  if (process.env.XCSH_VERSION) {
46627
46641
  return process.env.XCSH_VERSION;
@@ -46695,7 +46709,7 @@ function colorDim(text) {
46695
46709
  // src/profile/manager.ts
46696
46710
  var import_yaml = __toESM(require_dist(), 1);
46697
46711
  import { promises as fs2 } from "fs";
46698
- import { join as join2 } from "path";
46712
+ import { join as join3 } from "path";
46699
46713
  function snakeToCamel(str) {
46700
46714
  return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
46701
46715
  }
@@ -46728,7 +46742,7 @@ var ProfileManager = class {
46728
46742
  * Get path to profile JSON file
46729
46743
  */
46730
46744
  getProfilePath(name) {
46731
- return join2(this.config.profilesDir, `${name}.json`);
46745
+ return join3(this.config.profilesDir, `${name}.json`);
46732
46746
  }
46733
46747
  /**
46734
46748
  * Validate profile name (alphanumeric, dash, underscore only)
@@ -46787,7 +46801,7 @@ var ProfileManager = class {
46787
46801
  await this.ensureDirectories();
46788
46802
  const extensions = [".json", ".yaml", ".yml"];
46789
46803
  for (const ext of extensions) {
46790
- const path = join2(this.config.profilesDir, `${name}${ext}`);
46804
+ const path = join3(this.config.profilesDir, `${name}${ext}`);
46791
46805
  try {
46792
46806
  const data = await fs2.readFile(path, "utf-8");
46793
46807
  let parsed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "1.0.85-2601020718",
3
+ "version": "1.0.85-2601020738",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {