@robinmordasiewicz/f5xc-xcsh 2.0.21-2601100223 → 2.0.21-2601100343

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 +43 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48639,8 +48639,8 @@ function getLogoModeFromEnv(envPrefix) {
48639
48639
  var CLI_NAME = "xcsh";
48640
48640
  var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
48641
48641
  function getVersion() {
48642
- if ("v2.0.21-2601100223") {
48643
- return "v2.0.21-2601100223";
48642
+ if ("v2.0.21-2601100343") {
48643
+ return "v2.0.21-2601100343";
48644
48644
  }
48645
48645
  if (process.env.XCSH_VERSION) {
48646
48646
  return process.env.XCSH_VERSION;
@@ -75306,17 +75306,30 @@ var REPLSession = class {
75306
75306
  * Initialize the session (async operations)
75307
75307
  */
75308
75308
  async initialize() {
75309
+ const startTime = Date.now();
75310
+ const profile = (label) => {
75311
+ if (this._debug || process.env.XCSH_PROFILE === "true") {
75312
+ console.error(
75313
+ `[PROFILE] ${label}: ${Date.now() - startTime}ms`
75314
+ );
75315
+ }
75316
+ };
75317
+ profile("initialize:start");
75309
75318
  try {
75310
75319
  this._history = await HistoryManager.create(
75311
75320
  getHistoryFilePath(),
75312
75321
  1e3
75313
75322
  );
75323
+ profile("history:loaded");
75314
75324
  } catch (error) {
75315
75325
  console.error("Warning: could not initialize history:", error);
75316
75326
  this._history = new HistoryManager(getHistoryFilePath(), 1e3);
75327
+ profile("history:fallback");
75317
75328
  }
75318
75329
  await this.loadActiveProfile();
75330
+ profile("profile:loaded");
75319
75331
  if (this._apiClient?.isAuthenticated()) {
75332
+ profile("token_validation:start");
75320
75333
  debugProtocol.auth("token_validation_start", {
75321
75334
  serverUrl: this._serverUrl,
75322
75335
  hasApiClient: true,
@@ -75325,6 +75338,7 @@ var REPLSession = class {
75325
75338
  const result = await this._apiClient.validateToken();
75326
75339
  this._tokenValidated = result.valid;
75327
75340
  this._validationError = result.error ?? null;
75341
+ profile("token_validation:complete");
75328
75342
  debugProtocol.auth("token_validation_complete", {
75329
75343
  valid: result.valid,
75330
75344
  error: result.error,
@@ -75352,7 +75366,9 @@ var REPLSession = class {
75352
75366
  apiToken: this._apiToken,
75353
75367
  debug: this._debug
75354
75368
  });
75369
+ profile("fallback_validation:start");
75355
75370
  const fallbackResult = await this._apiClient.validateToken();
75371
+ profile("fallback_validation:complete");
75356
75372
  if (fallbackResult.valid) {
75357
75373
  this._tokenValidated = true;
75358
75374
  this._validationError = null;
@@ -75388,9 +75404,12 @@ var REPLSession = class {
75388
75404
  }
75389
75405
  }
75390
75406
  if (this._tokenValidated) {
75407
+ profile("user_info:start");
75391
75408
  await this.fetchUserInfo();
75409
+ profile("user_info:complete");
75392
75410
  }
75393
75411
  }
75412
+ profile("initialize:complete");
75394
75413
  }
75395
75414
  /**
75396
75415
  * Fetch user info from the API
@@ -85472,7 +85491,29 @@ var HeadlessController = class {
85472
85491
 
85473
85492
  // src/index.tsx
85474
85493
  var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
85494
+ var _startupTime = Date.now();
85495
+ var _profile = (label) => {
85496
+ if (process.env.XCSH_PROFILE === "true") {
85497
+ console.error(`[STARTUP] ${label}: ${Date.now() - _startupTime}ms`);
85498
+ }
85499
+ };
85500
+ _profile("script:start");
85501
+ _profile("import:ink");
85502
+ _profile("import:commander");
85503
+ _profile("import:repl");
85504
+ _profile("import:branding");
85505
+ _profile("import:executor");
85506
+ _profile("import:session");
85507
+ _profile("import:help");
85508
+ _profile("import:config");
85509
+ _profile("import:output-types");
85510
+ _profile("import:banner");
85511
+ _profile("import:debug");
85512
+ _profile("import:spec");
85513
+ _profile("import:headless");
85514
+ _profile("imports:complete");
85475
85515
  var program2 = new Command();
85516
+ _profile("commander:created");
85476
85517
  program2.configureHelp({
85477
85518
  formatHelp: () => formatRootHelp().join("\n")
85478
85519
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "2.0.21-2601100223",
3
+ "version": "2.0.21-2601100343",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {