@naylence/runtime 0.3.5-test.918 → 0.3.5-test.920

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.918
101
+ // Generated from package.json version: 0.3.5-test.920
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.5-test.918';
106
+ const VERSION = '0.3.5-test.920';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -1211,17 +1211,18 @@ class TaskSpawner {
1211
1211
  grace_period_ms: gracePeriod,
1212
1212
  });
1213
1213
  const tasks = Array.from(this._tasks.values());
1214
- // 1. Python-style wait with immediate timeout check
1214
+ // 1. Signal all tasks to stop immediately (abort signal)
1215
+ // This allows long-running loops to break out of waits/sleeps
1216
+ tasks.forEach((task) => task.cancel());
1217
+ // 2. Wait gracefully for tasks to complete their cleanup
1215
1218
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1216
- // 2. Cancel stragglers if requested
1219
+ // 3. Check for stragglers that didn't respond to cancellation
1217
1220
  if (cancelHanging) {
1218
1221
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1219
1222
  if (stillRunning.length > 0) {
1220
- logger$1b.debug('cancelling_hanging_tasks', {
1223
+ logger$1b.debug('tasks_did_not_complete_within_grace_period', {
1221
1224
  hanging_count: stillRunning.length,
1222
1225
  });
1223
- // Cancel all hanging tasks
1224
- stillRunning.forEach((task) => task.cancel());
1225
1226
  // Wait for them to finish with individual timeouts
1226
1227
  await Promise.allSettled(stillRunning.map(async (task) => {
1227
1228
  try {
@@ -21240,7 +21241,6 @@ class KeyManagementHandler extends TaskSpawner {
21240
21241
  }
21241
21242
  async stop() {
21242
21243
  this.isStarted = false;
21243
- await delay(100);
21244
21244
  await this.shutdownTasks({
21245
21245
  gracePeriod: 10,
21246
21246
  cancelHanging: true,
@@ -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.918
99
+ // Generated from package.json version: 0.3.5-test.920
100
100
  /**
101
101
  * The package version, injected at build time.
102
102
  * @internal
103
103
  */
104
- const VERSION = '0.3.5-test.918';
104
+ const VERSION = '0.3.5-test.920';
105
105
 
106
106
  /**
107
107
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -1209,17 +1209,18 @@ class TaskSpawner {
1209
1209
  grace_period_ms: gracePeriod,
1210
1210
  });
1211
1211
  const tasks = Array.from(this._tasks.values());
1212
- // 1. Python-style wait with immediate timeout check
1212
+ // 1. Signal all tasks to stop immediately (abort signal)
1213
+ // This allows long-running loops to break out of waits/sleeps
1214
+ tasks.forEach((task) => task.cancel());
1215
+ // 2. Wait gracefully for tasks to complete their cleanup
1213
1216
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1214
- // 2. Cancel stragglers if requested
1217
+ // 3. Check for stragglers that didn't respond to cancellation
1215
1218
  if (cancelHanging) {
1216
1219
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1217
1220
  if (stillRunning.length > 0) {
1218
- logger$1b.debug('cancelling_hanging_tasks', {
1221
+ logger$1b.debug('tasks_did_not_complete_within_grace_period', {
1219
1222
  hanging_count: stillRunning.length,
1220
1223
  });
1221
- // Cancel all hanging tasks
1222
- stillRunning.forEach((task) => task.cancel());
1223
1224
  // Wait for them to finish with individual timeouts
1224
1225
  await Promise.allSettled(stillRunning.map(async (task) => {
1225
1226
  try {
@@ -21238,7 +21239,6 @@ class KeyManagementHandler extends TaskSpawner {
21238
21239
  }
21239
21240
  async stop() {
21240
21241
  this.isStarted = false;
21241
- await delay(100);
21242
21242
  await this.shutdownTasks({
21243
21243
  gracePeriod: 10,
21244
21244
  cancelHanging: true,
@@ -102,7 +102,6 @@ class KeyManagementHandler extends task_spawner_js_1.TaskSpawner {
102
102
  }
103
103
  async stop() {
104
104
  this.isStarted = false;
105
- await (0, task_utils_js_1.delay)(100);
106
105
  await this.shutdownTasks({
107
106
  gracePeriod: 10,
108
107
  cancelHanging: true,
@@ -307,17 +307,18 @@ class TaskSpawner {
307
307
  grace_period_ms: gracePeriod,
308
308
  });
309
309
  const tasks = Array.from(this._tasks.values());
310
- // 1. Python-style wait with immediate timeout check
310
+ // 1. Signal all tasks to stop immediately (abort signal)
311
+ // This allows long-running loops to break out of waits/sleeps
312
+ tasks.forEach((task) => task.cancel());
313
+ // 2. Wait gracefully for tasks to complete their cleanup
311
314
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
312
- // 2. Cancel stragglers if requested
315
+ // 3. Check for stragglers that didn't respond to cancellation
313
316
  if (cancelHanging) {
314
317
  const stillRunning = tasks.filter((task) => task.getState() === task_types_js_1.TaskState.RUNNING && !completed.has(task));
315
318
  if (stillRunning.length > 0) {
316
- logger.debug('cancelling_hanging_tasks', {
319
+ logger.debug('tasks_did_not_complete_within_grace_period', {
317
320
  hanging_count: stillRunning.length,
318
321
  });
319
- // Cancel all hanging tasks
320
- stillRunning.forEach((task) => task.cancel());
321
322
  // Wait for them to finish with individual timeouts
322
323
  await Promise.allSettled(stillRunning.map(async (task) => {
323
324
  try {
@@ -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.918
3
+ // Generated from package.json version: 0.3.5-test.920
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.918';
10
+ exports.VERSION = '0.3.5-test.920';
@@ -99,7 +99,6 @@ export class KeyManagementHandler extends TaskSpawner {
99
99
  }
100
100
  async stop() {
101
101
  this.isStarted = false;
102
- await delay(100);
103
102
  await this.shutdownTasks({
104
103
  gracePeriod: 10,
105
104
  cancelHanging: true,
@@ -304,17 +304,18 @@ export class TaskSpawner {
304
304
  grace_period_ms: gracePeriod,
305
305
  });
306
306
  const tasks = Array.from(this._tasks.values());
307
- // 1. Python-style wait with immediate timeout check
307
+ // 1. Signal all tasks to stop immediately (abort signal)
308
+ // This allows long-running loops to break out of waits/sleeps
309
+ tasks.forEach((task) => task.cancel());
310
+ // 2. Wait gracefully for tasks to complete their cleanup
308
311
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
309
- // 2. Cancel stragglers if requested
312
+ // 3. Check for stragglers that didn't respond to cancellation
310
313
  if (cancelHanging) {
311
314
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
312
315
  if (stillRunning.length > 0) {
313
- logger.debug('cancelling_hanging_tasks', {
316
+ logger.debug('tasks_did_not_complete_within_grace_period', {
314
317
  hanging_count: stillRunning.length,
315
318
  });
316
- // Cancel all hanging tasks
317
- stillRunning.forEach((task) => task.cancel());
318
319
  // Wait for them to finish with individual timeouts
319
320
  await Promise.allSettled(stillRunning.map(async (task) => {
320
321
  try {
@@ -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.918
2
+ // Generated from package.json version: 0.3.5-test.920
3
3
  /**
4
4
  * The package version, injected at build time.
5
5
  * @internal
6
6
  */
7
- export const VERSION = '0.3.5-test.918';
7
+ export const VERSION = '0.3.5-test.920';
@@ -14,12 +14,12 @@ var websocketPlugin = require('@fastify/websocket');
14
14
  var ed25519 = require('@noble/ed25519');
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.918
17
+ // Generated from package.json version: 0.3.5-test.920
18
18
  /**
19
19
  * The package version, injected at build time.
20
20
  * @internal
21
21
  */
22
- const VERSION = '0.3.5-test.918';
22
+ const VERSION = '0.3.5-test.920';
23
23
 
24
24
  /**
25
25
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -1127,17 +1127,18 @@ class TaskSpawner {
1127
1127
  grace_period_ms: gracePeriod,
1128
1128
  });
1129
1129
  const tasks = Array.from(this._tasks.values());
1130
- // 1. Python-style wait with immediate timeout check
1130
+ // 1. Signal all tasks to stop immediately (abort signal)
1131
+ // This allows long-running loops to break out of waits/sleeps
1132
+ tasks.forEach((task) => task.cancel());
1133
+ // 2. Wait gracefully for tasks to complete their cleanup
1131
1134
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1132
- // 2. Cancel stragglers if requested
1135
+ // 3. Check for stragglers that didn't respond to cancellation
1133
1136
  if (cancelHanging) {
1134
1137
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1135
1138
  if (stillRunning.length > 0) {
1136
- logger$1b.debug('cancelling_hanging_tasks', {
1139
+ logger$1b.debug('tasks_did_not_complete_within_grace_period', {
1137
1140
  hanging_count: stillRunning.length,
1138
1141
  });
1139
- // Cancel all hanging tasks
1140
- stillRunning.forEach((task) => task.cancel());
1141
1142
  // Wait for them to finish with individual timeouts
1142
1143
  await Promise.allSettled(stillRunning.map(async (task) => {
1143
1144
  try {
@@ -21156,7 +21157,6 @@ class KeyManagementHandler extends TaskSpawner {
21156
21157
  }
21157
21158
  async stop() {
21158
21159
  this.isStarted = false;
21159
- await delay(100);
21160
21160
  await this.shutdownTasks({
21161
21161
  gracePeriod: 10,
21162
21162
  cancelHanging: true,
@@ -13,12 +13,12 @@ import websocketPlugin from '@fastify/websocket';
13
13
  import { sign, hashes, verify } from '@noble/ed25519';
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.918
16
+ // Generated from package.json version: 0.3.5-test.920
17
17
  /**
18
18
  * The package version, injected at build time.
19
19
  * @internal
20
20
  */
21
- const VERSION = '0.3.5-test.918';
21
+ const VERSION = '0.3.5-test.920';
22
22
 
23
23
  /**
24
24
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -1126,17 +1126,18 @@ class TaskSpawner {
1126
1126
  grace_period_ms: gracePeriod,
1127
1127
  });
1128
1128
  const tasks = Array.from(this._tasks.values());
1129
- // 1. Python-style wait with immediate timeout check
1129
+ // 1. Signal all tasks to stop immediately (abort signal)
1130
+ // This allows long-running loops to break out of waits/sleeps
1131
+ tasks.forEach((task) => task.cancel());
1132
+ // 2. Wait gracefully for tasks to complete their cleanup
1130
1133
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1131
- // 2. Cancel stragglers if requested
1134
+ // 3. Check for stragglers that didn't respond to cancellation
1132
1135
  if (cancelHanging) {
1133
1136
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1134
1137
  if (stillRunning.length > 0) {
1135
- logger$1b.debug('cancelling_hanging_tasks', {
1138
+ logger$1b.debug('tasks_did_not_complete_within_grace_period', {
1136
1139
  hanging_count: stillRunning.length,
1137
1140
  });
1138
- // Cancel all hanging tasks
1139
- stillRunning.forEach((task) => task.cancel());
1140
1141
  // Wait for them to finish with individual timeouts
1141
1142
  await Promise.allSettled(stillRunning.map(async (task) => {
1142
1143
  try {
@@ -21155,7 +21156,6 @@ class KeyManagementHandler extends TaskSpawner {
21155
21156
  }
21156
21157
  async stop() {
21157
21158
  this.isStarted = false;
21158
- await delay(100);
21159
21159
  await this.shutdownTasks({
21160
21160
  gracePeriod: 10,
21161
21161
  cancelHanging: true,
@@ -1015,17 +1015,18 @@ class TaskSpawner {
1015
1015
  grace_period_ms: gracePeriod,
1016
1016
  });
1017
1017
  const tasks = Array.from(this._tasks.values());
1018
- // 1. Python-style wait with immediate timeout check
1018
+ // 1. Signal all tasks to stop immediately (abort signal)
1019
+ // This allows long-running loops to break out of waits/sleeps
1020
+ tasks.forEach((task) => task.cancel());
1021
+ // 2. Wait gracefully for tasks to complete their cleanup
1019
1022
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1020
- // 2. Cancel stragglers if requested
1023
+ // 3. Check for stragglers that didn't respond to cancellation
1021
1024
  if (cancelHanging) {
1022
1025
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1023
1026
  if (stillRunning.length > 0) {
1024
- logger$1g.debug('cancelling_hanging_tasks', {
1027
+ logger$1g.debug('tasks_did_not_complete_within_grace_period', {
1025
1028
  hanging_count: stillRunning.length,
1026
1029
  });
1027
- // Cancel all hanging tasks
1028
- stillRunning.forEach((task) => task.cancel());
1029
1030
  // Wait for them to finish with individual timeouts
1030
1031
  await Promise.allSettled(stillRunning.map(async (task) => {
1031
1032
  try {
@@ -5364,12 +5365,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5364
5365
  }
5365
5366
 
5366
5367
  // This file is auto-generated during build - do not edit manually
5367
- // Generated from package.json version: 0.3.5-test.918
5368
+ // Generated from package.json version: 0.3.5-test.920
5368
5369
  /**
5369
5370
  * The package version, injected at build time.
5370
5371
  * @internal
5371
5372
  */
5372
- const VERSION = '0.3.5-test.918';
5373
+ const VERSION = '0.3.5-test.920';
5373
5374
 
5374
5375
  /**
5375
5376
  * Fame errors module - Fame protocol specific error classes
@@ -22316,7 +22317,6 @@ class KeyManagementHandler extends TaskSpawner {
22316
22317
  }
22317
22318
  async stop() {
22318
22319
  this.isStarted = false;
22319
- await delay(100);
22320
22320
  await this.shutdownTasks({
22321
22321
  gracePeriod: 10,
22322
22322
  cancelHanging: true,
@@ -1014,17 +1014,18 @@ class TaskSpawner {
1014
1014
  grace_period_ms: gracePeriod,
1015
1015
  });
1016
1016
  const tasks = Array.from(this._tasks.values());
1017
- // 1. Python-style wait with immediate timeout check
1017
+ // 1. Signal all tasks to stop immediately (abort signal)
1018
+ // This allows long-running loops to break out of waits/sleeps
1019
+ tasks.forEach((task) => task.cancel());
1020
+ // 2. Wait gracefully for tasks to complete their cleanup
1018
1021
  const completed = await this._waitWithGracePeriod(tasks, gracePeriod);
1019
- // 2. Cancel stragglers if requested
1022
+ // 3. Check for stragglers that didn't respond to cancellation
1020
1023
  if (cancelHanging) {
1021
1024
  const stillRunning = tasks.filter((task) => task.getState() === TaskState.RUNNING && !completed.has(task));
1022
1025
  if (stillRunning.length > 0) {
1023
- logger$1g.debug('cancelling_hanging_tasks', {
1026
+ logger$1g.debug('tasks_did_not_complete_within_grace_period', {
1024
1027
  hanging_count: stillRunning.length,
1025
1028
  });
1026
- // Cancel all hanging tasks
1027
- stillRunning.forEach((task) => task.cancel());
1028
1029
  // Wait for them to finish with individual timeouts
1029
1030
  await Promise.allSettled(stillRunning.map(async (task) => {
1030
1031
  try {
@@ -5363,12 +5364,12 @@ for (const [name, config] of Object.entries(SQLITE_PROFILES)) {
5363
5364
  }
5364
5365
 
5365
5366
  // This file is auto-generated during build - do not edit manually
5366
- // Generated from package.json version: 0.3.5-test.918
5367
+ // Generated from package.json version: 0.3.5-test.920
5367
5368
  /**
5368
5369
  * The package version, injected at build time.
5369
5370
  * @internal
5370
5371
  */
5371
- const VERSION = '0.3.5-test.918';
5372
+ const VERSION = '0.3.5-test.920';
5372
5373
 
5373
5374
  /**
5374
5375
  * Fame errors module - Fame protocol specific error classes
@@ -22315,7 +22316,6 @@ class KeyManagementHandler extends TaskSpawner {
22315
22316
  }
22316
22317
  async stop() {
22317
22318
  this.isStarted = false;
22318
- await delay(100);
22319
22319
  await this.shutdownTasks({
22320
22320
  gracePeriod: 10,
22321
22321
  cancelHanging: true,
@@ -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.918";
5
+ export declare const VERSION = "0.3.5-test.920";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naylence/runtime",
3
- "version": "0.3.5-test.918",
3
+ "version": "0.3.5-test.920",
4
4
  "type": "module",
5
5
  "description": "Naylence Runtime - Complete TypeScript runtime",
6
6
  "author": "Naylence Dev <naylencedev@gmail.com>",