@blitzbrowser/blitzbrowser 1.1.6 → 1.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blitzbrowser/blitzbrowser",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "Deploying, scaling and managing headful browsers in docker.",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -100,8 +100,6 @@ export class BrowserPoolService extends EventEmitter<PoolServiceEvents> implemen
100
100
 
101
101
  this.logger.log(`Created browser instance ${browser_instance.id}.`);
102
102
 
103
- this.emit('browser_instance_created', browser_instance);
104
-
105
103
  browser_instance.on('terminated', () => {
106
104
  this.logger.log(`Browser instance ${browser_instance.id} terminated. Removing from pool.`);
107
105
  this.#browser_instances.delete(browser_instance.id);
@@ -109,6 +107,8 @@ export class BrowserPoolService extends EventEmitter<PoolServiceEvents> implemen
109
107
 
110
108
  this.#browser_instances.set(browser_instance.id, browser_instance);
111
109
 
110
+ this.emit('browser_instance_created', browser_instance);
111
+
112
112
  return browser_instance;
113
113
  }
114
114