@naylence/runtime 0.3.5-test.940 → 0.3.5-test.941

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.
@@ -98,12 +98,12 @@ installProcessEnvShim();
98
98
  // --- END ENV SHIM ---
99
99
 
100
100
  // This file is auto-generated during build - do not edit manually
101
- // Generated from package.json version: 0.3.5-test.940
101
+ // Generated from package.json version: 0.3.5-test.941
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.5-test.940';
106
+ const VERSION = '0.3.5-test.941';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -9993,6 +9993,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9993
9993
  if (typeof document !== 'undefined') {
9994
9994
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
9995
9995
  this.visibilityChangeListenerRegistered = true;
9996
+ // Track page lifecycle events to detect browser unload/discard
9997
+ if (typeof window !== 'undefined') {
9998
+ const lifecycleLogger = (event) => {
9999
+ logger$_.info('broadcast_channel_page_lifecycle', {
10000
+ channel: this.channelName,
10001
+ connector_id: this.connectorId,
10002
+ event_type: event.type,
10003
+ visibility_state: document.visibilityState,
10004
+ timestamp: new Date().toISOString(),
10005
+ });
10006
+ };
10007
+ window.addEventListener('beforeunload', lifecycleLogger);
10008
+ window.addEventListener('unload', lifecycleLogger);
10009
+ window.addEventListener('pagehide', lifecycleLogger);
10010
+ window.addEventListener('pageshow', lifecycleLogger);
10011
+ document.addEventListener('freeze', lifecycleLogger);
10012
+ document.addEventListener('resume', lifecycleLogger);
10013
+ }
9996
10014
  // Log initial state with detailed visibility info
9997
10015
  logger$_.debug('broadcast_channel_initial_visibility', {
9998
10016
  channel: this.channelName,
@@ -10001,6 +10019,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
10001
10019
  document_hidden: document.hidden,
10002
10020
  visibility_state: document.visibilityState,
10003
10021
  has_focus: document.hasFocus(),
10022
+ timestamp: new Date().toISOString(),
10004
10023
  });
10005
10024
  }
10006
10025
  }
@@ -96,12 +96,12 @@ installProcessEnvShim();
96
96
  // --- END ENV SHIM ---
97
97
 
98
98
  // This file is auto-generated during build - do not edit manually
99
- // Generated from package.json version: 0.3.5-test.940
99
+ // Generated from package.json version: 0.3.5-test.941
100
100
  /**
101
101
  * The package version, injected at build time.
102
102
  * @internal
103
103
  */
104
- const VERSION = '0.3.5-test.940';
104
+ const VERSION = '0.3.5-test.941';
105
105
 
106
106
  /**
107
107
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -9991,6 +9991,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9991
9991
  if (typeof document !== 'undefined') {
9992
9992
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
9993
9993
  this.visibilityChangeListenerRegistered = true;
9994
+ // Track page lifecycle events to detect browser unload/discard
9995
+ if (typeof window !== 'undefined') {
9996
+ const lifecycleLogger = (event) => {
9997
+ logger$_.info('broadcast_channel_page_lifecycle', {
9998
+ channel: this.channelName,
9999
+ connector_id: this.connectorId,
10000
+ event_type: event.type,
10001
+ visibility_state: document.visibilityState,
10002
+ timestamp: new Date().toISOString(),
10003
+ });
10004
+ };
10005
+ window.addEventListener('beforeunload', lifecycleLogger);
10006
+ window.addEventListener('unload', lifecycleLogger);
10007
+ window.addEventListener('pagehide', lifecycleLogger);
10008
+ window.addEventListener('pageshow', lifecycleLogger);
10009
+ document.addEventListener('freeze', lifecycleLogger);
10010
+ document.addEventListener('resume', lifecycleLogger);
10011
+ }
9994
10012
  // Log initial state with detailed visibility info
9995
10013
  logger$_.debug('broadcast_channel_initial_visibility', {
9996
10014
  channel: this.channelName,
@@ -9999,6 +10017,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9999
10017
  document_hidden: document.hidden,
10000
10018
  visibility_state: document.visibilityState,
10001
10019
  has_focus: document.hasFocus(),
10020
+ timestamp: new Date().toISOString(),
10002
10021
  });
10003
10022
  }
10004
10023
  }
@@ -181,6 +181,24 @@ class BroadcastChannelConnector extends base_async_connector_js_1.BaseAsyncConne
181
181
  if (typeof document !== 'undefined') {
182
182
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
183
183
  this.visibilityChangeListenerRegistered = true;
184
+ // Track page lifecycle events to detect browser unload/discard
185
+ if (typeof window !== 'undefined') {
186
+ const lifecycleLogger = (event) => {
187
+ logger.info('broadcast_channel_page_lifecycle', {
188
+ channel: this.channelName,
189
+ connector_id: this.connectorId,
190
+ event_type: event.type,
191
+ visibility_state: document.visibilityState,
192
+ timestamp: new Date().toISOString(),
193
+ });
194
+ };
195
+ window.addEventListener('beforeunload', lifecycleLogger);
196
+ window.addEventListener('unload', lifecycleLogger);
197
+ window.addEventListener('pagehide', lifecycleLogger);
198
+ window.addEventListener('pageshow', lifecycleLogger);
199
+ document.addEventListener('freeze', lifecycleLogger);
200
+ document.addEventListener('resume', lifecycleLogger);
201
+ }
184
202
  // Log initial state with detailed visibility info
185
203
  logger.debug('broadcast_channel_initial_visibility', {
186
204
  channel: this.channelName,
@@ -189,6 +207,7 @@ class BroadcastChannelConnector extends base_async_connector_js_1.BaseAsyncConne
189
207
  document_hidden: document.hidden,
190
208
  visibility_state: document.visibilityState,
191
209
  has_focus: document.hasFocus(),
210
+ timestamp: new Date().toISOString(),
192
211
  });
193
212
  }
194
213
  }
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // This file is auto-generated during build - do not edit manually
3
- // Generated from package.json version: 0.3.5-test.940
3
+ // Generated from package.json version: 0.3.5-test.941
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VERSION = void 0;
6
6
  /**
7
7
  * The package version, injected at build time.
8
8
  * @internal
9
9
  */
10
- exports.VERSION = '0.3.5-test.940';
10
+ exports.VERSION = '0.3.5-test.941';
@@ -178,6 +178,24 @@ export class BroadcastChannelConnector extends BaseAsyncConnector {
178
178
  if (typeof document !== 'undefined') {
179
179
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
180
180
  this.visibilityChangeListenerRegistered = true;
181
+ // Track page lifecycle events to detect browser unload/discard
182
+ if (typeof window !== 'undefined') {
183
+ const lifecycleLogger = (event) => {
184
+ logger.info('broadcast_channel_page_lifecycle', {
185
+ channel: this.channelName,
186
+ connector_id: this.connectorId,
187
+ event_type: event.type,
188
+ visibility_state: document.visibilityState,
189
+ timestamp: new Date().toISOString(),
190
+ });
191
+ };
192
+ window.addEventListener('beforeunload', lifecycleLogger);
193
+ window.addEventListener('unload', lifecycleLogger);
194
+ window.addEventListener('pagehide', lifecycleLogger);
195
+ window.addEventListener('pageshow', lifecycleLogger);
196
+ document.addEventListener('freeze', lifecycleLogger);
197
+ document.addEventListener('resume', lifecycleLogger);
198
+ }
181
199
  // Log initial state with detailed visibility info
182
200
  logger.debug('broadcast_channel_initial_visibility', {
183
201
  channel: this.channelName,
@@ -186,6 +204,7 @@ export class BroadcastChannelConnector extends BaseAsyncConnector {
186
204
  document_hidden: document.hidden,
187
205
  visibility_state: document.visibilityState,
188
206
  has_focus: document.hasFocus(),
207
+ timestamp: new Date().toISOString(),
189
208
  });
190
209
  }
191
210
  }
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated during build - do not edit manually
2
- // Generated from package.json version: 0.3.5-test.940
2
+ // Generated from package.json version: 0.3.5-test.941
3
3
  /**
4
4
  * The package version, injected at build time.
5
5
  * @internal
6
6
  */
7
- export const VERSION = '0.3.5-test.940';
7
+ export const VERSION = '0.3.5-test.941';
@@ -14,12 +14,12 @@ var fastify = require('fastify');
14
14
  var websocketPlugin = require('@fastify/websocket');
15
15
 
16
16
  // This file is auto-generated during build - do not edit manually
17
- // Generated from package.json version: 0.3.5-test.940
17
+ // Generated from package.json version: 0.3.5-test.941
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.5-test.940';
22
+ const VERSION = '0.3.5-test.941';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -9909,6 +9909,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9909
9909
  if (typeof document !== 'undefined') {
9910
9910
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
9911
9911
  this.visibilityChangeListenerRegistered = true;
9912
+ // Track page lifecycle events to detect browser unload/discard
9913
+ if (typeof window !== 'undefined') {
9914
+ const lifecycleLogger = (event) => {
9915
+ logger$_.info('broadcast_channel_page_lifecycle', {
9916
+ channel: this.channelName,
9917
+ connector_id: this.connectorId,
9918
+ event_type: event.type,
9919
+ visibility_state: document.visibilityState,
9920
+ timestamp: new Date().toISOString(),
9921
+ });
9922
+ };
9923
+ window.addEventListener('beforeunload', lifecycleLogger);
9924
+ window.addEventListener('unload', lifecycleLogger);
9925
+ window.addEventListener('pagehide', lifecycleLogger);
9926
+ window.addEventListener('pageshow', lifecycleLogger);
9927
+ document.addEventListener('freeze', lifecycleLogger);
9928
+ document.addEventListener('resume', lifecycleLogger);
9929
+ }
9912
9930
  // Log initial state with detailed visibility info
9913
9931
  logger$_.debug('broadcast_channel_initial_visibility', {
9914
9932
  channel: this.channelName,
@@ -9917,6 +9935,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9917
9935
  document_hidden: document.hidden,
9918
9936
  visibility_state: document.visibilityState,
9919
9937
  has_focus: document.hasFocus(),
9938
+ timestamp: new Date().toISOString(),
9920
9939
  });
9921
9940
  }
9922
9941
  }
@@ -13,12 +13,12 @@ import fastify from 'fastify';
13
13
  import websocketPlugin from '@fastify/websocket';
14
14
 
15
15
  // This file is auto-generated during build - do not edit manually
16
- // Generated from package.json version: 0.3.5-test.940
16
+ // Generated from package.json version: 0.3.5-test.941
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.940';
21
+ const VERSION = '0.3.5-test.941';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -9908,6 +9908,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9908
9908
  if (typeof document !== 'undefined') {
9909
9909
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
9910
9910
  this.visibilityChangeListenerRegistered = true;
9911
+ // Track page lifecycle events to detect browser unload/discard
9912
+ if (typeof window !== 'undefined') {
9913
+ const lifecycleLogger = (event) => {
9914
+ logger$_.info('broadcast_channel_page_lifecycle', {
9915
+ channel: this.channelName,
9916
+ connector_id: this.connectorId,
9917
+ event_type: event.type,
9918
+ visibility_state: document.visibilityState,
9919
+ timestamp: new Date().toISOString(),
9920
+ });
9921
+ };
9922
+ window.addEventListener('beforeunload', lifecycleLogger);
9923
+ window.addEventListener('unload', lifecycleLogger);
9924
+ window.addEventListener('pagehide', lifecycleLogger);
9925
+ window.addEventListener('pageshow', lifecycleLogger);
9926
+ document.addEventListener('freeze', lifecycleLogger);
9927
+ document.addEventListener('resume', lifecycleLogger);
9928
+ }
9911
9929
  // Log initial state with detailed visibility info
9912
9930
  logger$_.debug('broadcast_channel_initial_visibility', {
9913
9931
  channel: this.channelName,
@@ -9916,6 +9934,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
9916
9934
  document_hidden: document.hidden,
9917
9935
  visibility_state: document.visibilityState,
9918
9936
  has_focus: document.hasFocus(),
9937
+ timestamp: new Date().toISOString(),
9919
9938
  });
9920
9939
  }
9921
9940
  }
@@ -5478,12 +5478,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5478
5478
  }
5479
5479
 
5480
5480
  // This file is auto-generated during build - do not edit manually
5481
- // Generated from package.json version: 0.3.5-test.940
5481
+ // Generated from package.json version: 0.3.5-test.941
5482
5482
  /**
5483
5483
  * The package version, injected at build time.
5484
5484
  * @internal
5485
5485
  */
5486
- const VERSION = '0.3.5-test.940';
5486
+ const VERSION = '0.3.5-test.941';
5487
5487
 
5488
5488
  /**
5489
5489
  * Fame errors module - Fame protocol specific error classes
@@ -11646,6 +11646,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
11646
11646
  if (typeof document !== 'undefined') {
11647
11647
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
11648
11648
  this.visibilityChangeListenerRegistered = true;
11649
+ // Track page lifecycle events to detect browser unload/discard
11650
+ if (typeof window !== 'undefined') {
11651
+ const lifecycleLogger = (event) => {
11652
+ logger$10.info('broadcast_channel_page_lifecycle', {
11653
+ channel: this.channelName,
11654
+ connector_id: this.connectorId,
11655
+ event_type: event.type,
11656
+ visibility_state: document.visibilityState,
11657
+ timestamp: new Date().toISOString(),
11658
+ });
11659
+ };
11660
+ window.addEventListener('beforeunload', lifecycleLogger);
11661
+ window.addEventListener('unload', lifecycleLogger);
11662
+ window.addEventListener('pagehide', lifecycleLogger);
11663
+ window.addEventListener('pageshow', lifecycleLogger);
11664
+ document.addEventListener('freeze', lifecycleLogger);
11665
+ document.addEventListener('resume', lifecycleLogger);
11666
+ }
11649
11667
  // Log initial state with detailed visibility info
11650
11668
  logger$10.debug('broadcast_channel_initial_visibility', {
11651
11669
  channel: this.channelName,
@@ -11654,6 +11672,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
11654
11672
  document_hidden: document.hidden,
11655
11673
  visibility_state: document.visibilityState,
11656
11674
  has_focus: document.hasFocus(),
11675
+ timestamp: new Date().toISOString(),
11657
11676
  });
11658
11677
  }
11659
11678
  }
@@ -5477,12 +5477,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5477
5477
  }
5478
5478
 
5479
5479
  // This file is auto-generated during build - do not edit manually
5480
- // Generated from package.json version: 0.3.5-test.940
5480
+ // Generated from package.json version: 0.3.5-test.941
5481
5481
  /**
5482
5482
  * The package version, injected at build time.
5483
5483
  * @internal
5484
5484
  */
5485
- const VERSION = '0.3.5-test.940';
5485
+ const VERSION = '0.3.5-test.941';
5486
5486
 
5487
5487
  /**
5488
5488
  * Fame errors module - Fame protocol specific error classes
@@ -11645,6 +11645,24 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
11645
11645
  if (typeof document !== 'undefined') {
11646
11646
  document.addEventListener('visibilitychange', this.visibilityChangeHandler);
11647
11647
  this.visibilityChangeListenerRegistered = true;
11648
+ // Track page lifecycle events to detect browser unload/discard
11649
+ if (typeof window !== 'undefined') {
11650
+ const lifecycleLogger = (event) => {
11651
+ logger$10.info('broadcast_channel_page_lifecycle', {
11652
+ channel: this.channelName,
11653
+ connector_id: this.connectorId,
11654
+ event_type: event.type,
11655
+ visibility_state: document.visibilityState,
11656
+ timestamp: new Date().toISOString(),
11657
+ });
11658
+ };
11659
+ window.addEventListener('beforeunload', lifecycleLogger);
11660
+ window.addEventListener('unload', lifecycleLogger);
11661
+ window.addEventListener('pagehide', lifecycleLogger);
11662
+ window.addEventListener('pageshow', lifecycleLogger);
11663
+ document.addEventListener('freeze', lifecycleLogger);
11664
+ document.addEventListener('resume', lifecycleLogger);
11665
+ }
11648
11666
  // Log initial state with detailed visibility info
11649
11667
  logger$10.debug('broadcast_channel_initial_visibility', {
11650
11668
  channel: this.channelName,
@@ -11653,6 +11671,7 @@ let BroadcastChannelConnector$2 = class BroadcastChannelConnector extends BaseAs
11653
11671
  document_hidden: document.hidden,
11654
11672
  visibility_state: document.visibilityState,
11655
11673
  has_focus: document.hasFocus(),
11674
+ timestamp: new Date().toISOString(),
11656
11675
  });
11657
11676
  }
11658
11677
  }
@@ -2,4 +2,4 @@
2
2
  * The package version, injected at build time.
3
3
  * @internal
4
4
  */
5
- export declare const VERSION = "0.3.5-test.940";
5
+ export declare const VERSION = "0.3.5-test.941";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naylence/runtime",
3
- "version": "0.3.5-test.940",
3
+ "version": "0.3.5-test.941",
4
4
  "type": "module",
5
5
  "description": "Naylence Runtime - Complete TypeScript runtime",
6
6
  "author": "Naylence Dev <naylencedev@gmail.com>",