@tinycloud/operations 0.2.1-beta.0 → 0.3.0-beta.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.
@@ -6616,6 +6616,7 @@ function canonicalizeCaveats(caveats) {
6616
6616
 
6617
6617
  // src/state.ts
6618
6618
  var import_node_crypto = require("crypto");
6619
+ var import_node_async_hooks = require("async_hooks");
6619
6620
  var import_promises = require("fs/promises");
6620
6621
  var import_node_os = require("os");
6621
6622
  var import_node_path = require("path");
@@ -6624,6 +6625,7 @@ var DEFAULT_LOCK_RETRY_MS = 25;
6624
6625
  var DEFAULT_STALE_LOCK_MS = 3e4;
6625
6626
  var TEST_LOCK_CONTENTION_SIGNAL_PATH = "TC_TEST_PROFILE_LOCK_CONTENTION_SIGNAL_PATH";
6626
6627
  var TEST_LOCK_RECOVERY_BARRIER_DIR = "TC_TEST_PROFILE_LOCK_RECOVERY_BARRIER_DIR";
6628
+ var invocationStateRoot = new import_node_async_hooks.AsyncLocalStorage();
6627
6629
  var ProfileLockTimeoutError = class extends Error {
6628
6630
  constructor(profile, timeoutMs) {
6629
6631
  super(`Timed out waiting for the profile lock for "${profile}" after ${timeoutMs}ms.`);
@@ -6632,7 +6634,7 @@ var ProfileLockTimeoutError = class extends Error {
6632
6634
  }
6633
6635
  };
6634
6636
  function tinycloudHomePath() {
6635
- const home = process.env.TC_HOME ?? process.env.HOME ?? process.env.USERPROFILE ?? (0, import_node_os.homedir)();
6637
+ const home = invocationStateRoot.getStore() ?? process.env.TC_HOME ?? process.env.HOME ?? process.env.USERPROFILE ?? (0, import_node_os.homedir)();
6636
6638
  return (0, import_node_path.join)(home, ".tinycloud");
6637
6639
  }
6638
6640
  function profilesPath() {