negotium 0.2.30 → 0.2.32

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.
@@ -2121,6 +2121,18 @@ async function killAllPlaywright() {
2121
2121
  }
2122
2122
  }));
2123
2123
  }
2124
+ async function drainPlaywrightManager() {
2125
+ pinnedInstances.clear();
2126
+ await Promise.allSettled([...spawning.values()]);
2127
+ try {
2128
+ await killAllPlaywright();
2129
+ } catch (err) {
2130
+ logger.warn({ err }, "drainPlaywrightManager: killAllPlaywright failed; continuing");
2131
+ }
2132
+ await Promise.allSettled([...spawning.values()]);
2133
+ spawning.clear();
2134
+ pinnedInstances.clear();
2135
+ }
2124
2136
  setInterval(() => {
2125
2137
  while (evictIdleInstance() !== null) {}
2126
2138
  try {
@@ -2179,10 +2191,11 @@ export {
2179
2191
  extractUserDataDirArg,
2180
2192
  ensurePlaywright,
2181
2193
  ensureBrowserProfile,
2194
+ drainPlaywrightManager,
2182
2195
  deleteManagedBrowserProfile,
2183
2196
  configurePlaywrightManagerHost,
2184
2197
  closeBrowserOwnerTabs,
2185
2198
  browserProcessMatchesExpectedProfile
2186
2199
  };
2187
2200
 
2188
- //# debugId=18F842BF5398F8CA64756E2164756E21
2201
+ //# debugId=429D4FA0DA83793564756E2164756E21