tina4-nodejs 3.13.96 → 3.13.97
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/CLAUDE.md +2 -2
- package/package.json +1 -1
- package/packages/cli/dist/bin.js +27 -18
- package/packages/core/dist/index.js +27 -18
- package/packages/core/src/queueBackends/kafkaBackend.ts +23 -2
- package/packages/core/src/queueBackends/rabbitmqBackend.ts +29 -17
- package/packages/core/src/session.ts +8 -1
- package/packages/orm/dist/index.js +27 -18
- package/types/core/src/queueBackends/kafkaBackend.d.ts +1 -0
- package/types/core/src/queueBackends/rabbitmqBackend.d.ts +2 -1
- package/types/core/src/session.d.ts +7 -0
package/CLAUDE.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.
|
|
1
|
+
# CLAUDE.md - AI Developer Guide for tina4-nodejs (v3.13.97)
|
|
2
2
|
|
|
3
3
|
> This file helps AI assistants (Claude, Copilot, Cursor, etc.) understand and work on this codebase effectively.
|
|
4
4
|
|
|
5
5
|
## What This Project Is
|
|
6
6
|
|
|
7
|
-
Tina4 for Node.js/TypeScript v3.13.
|
|
7
|
+
Tina4 for Node.js/TypeScript v3.13.97 - The Intelligent Native Application 4ramework. A convention-over-configuration structural paradigm. The developer writes TypeScript; Tina4 is invisible infrastructure.
|
|
8
8
|
|
|
9
9
|
The philosophy: zero ceremony, batteries included, file system as source of truth.
|
|
10
10
|
|
package/package.json
CHANGED
package/packages/cli/dist/bin.js
CHANGED
|
@@ -17346,10 +17346,17 @@ var init_session = __esm({
|
|
|
17346
17346
|
*
|
|
17347
17347
|
* session.flash("message", "Saved!") // set
|
|
17348
17348
|
* session.flash("message") // get + auto-remove → "Saved!"
|
|
17349
|
+
* session.flash("message", null) // get + auto-remove (null is a GET sentinel)
|
|
17350
|
+
*
|
|
17351
|
+
* `null` — NOT just `undefined` — is the GET sentinel, so `flash(key, null)`
|
|
17352
|
+
* READS and clears rather than STORING null. This matches the Python master
|
|
17353
|
+
* (`if value is not None`), PHP (`if ($value !== null)`) and Ruby
|
|
17354
|
+
* (`if value.nil?`): passing the language's "no value" literal means GET. A
|
|
17355
|
+
* caller wanting to persist an explicit null should store it with `set()`.
|
|
17349
17356
|
*/
|
|
17350
17357
|
flash(key, value) {
|
|
17351
17358
|
const flashKey = `${FLASH_PREFIX}${key}`;
|
|
17352
|
-
if (value !== void 0) {
|
|
17359
|
+
if (value !== void 0 && value !== null) {
|
|
17353
17360
|
this.set(flashKey, value);
|
|
17354
17361
|
return void 0;
|
|
17355
17362
|
}
|
|
@@ -39205,16 +39212,8 @@ var init_rabbitmqBackend = __esm({
|
|
|
39205
39212
|
process.stdout.write(String(msgCount));
|
|
39206
39213
|
closeConnection();
|
|
39207
39214
|
}
|
|
39208
|
-
|
|
39209
|
-
|
|
39210
|
-
const qBuf = Buffer.from(queueName, "utf-8");
|
|
39211
|
-
const purgePayload = Buffer.alloc(4 + qBuf.length);
|
|
39212
|
-
purgePayload.writeUInt16BE(0, 0);
|
|
39213
|
-
purgePayload.writeUInt8(qBuf.length, 2);
|
|
39214
|
-
qBuf.copy(purgePayload, 3);
|
|
39215
|
-
purgePayload.writeUInt8(0, 3 + qBuf.length); // no-wait=false
|
|
39216
|
-
sendMethod(1, 50, 30, purgePayload);
|
|
39217
|
-
}
|
|
39215
|
+
// No "purge" operation: clear()/purge() refuse by name (ADR-0022),
|
|
39216
|
+
// so nothing ever sends Queue.Purge and the drain path is gone.
|
|
39218
39217
|
}
|
|
39219
39218
|
else if (classId === 60 && methodId === 71) {
|
|
39220
39219
|
// Basic.Get-Ok \u2014 message body will follow in content frames
|
|
@@ -39225,11 +39224,6 @@ var init_rabbitmqBackend = __esm({
|
|
|
39225
39224
|
process.stdout.write("__EMPTY__");
|
|
39226
39225
|
closeConnection();
|
|
39227
39226
|
}
|
|
39228
|
-
else if (classId === 50 && methodId === 31) {
|
|
39229
|
-
// Queue.Purge-Ok
|
|
39230
|
-
process.stdout.write("__PURGED__");
|
|
39231
|
-
closeConnection();
|
|
39232
|
-
}
|
|
39233
39227
|
else if (classId === 10 && methodId === 50) {
|
|
39234
39228
|
// Connection.Close (server-initiated, e.g. a channel/protocol error)
|
|
39235
39229
|
// \u2192 send Connection.Close-Ok and exit non-zero so the caller sees the
|
|
@@ -39359,8 +39353,15 @@ var init_rabbitmqBackend = __esm({
|
|
|
39359
39353
|
const num = parseInt(result, 10);
|
|
39360
39354
|
return isNaN(num) ? 0 : num;
|
|
39361
39355
|
}
|
|
39362
|
-
clear(
|
|
39363
|
-
|
|
39356
|
+
clear(_queue) {
|
|
39357
|
+
throw new Error(
|
|
39358
|
+
"The rabbitmq queue backend cannot perform clear(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed clear would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
39359
|
+
);
|
|
39360
|
+
}
|
|
39361
|
+
purge(_queue, _status) {
|
|
39362
|
+
throw new Error(
|
|
39363
|
+
"The rabbitmq queue backend cannot perform purge(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed purge would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
39364
|
+
);
|
|
39364
39365
|
}
|
|
39365
39366
|
};
|
|
39366
39367
|
}
|
|
@@ -39922,6 +39923,14 @@ var init_kafkaBackend = __esm({
|
|
|
39922
39923
|
return 0;
|
|
39923
39924
|
}
|
|
39924
39925
|
clear(_queue) {
|
|
39926
|
+
throw new Error(
|
|
39927
|
+
"The kafka queue backend cannot perform clear(): Kafka has no notion of job status and cannot delete records on demand. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
39928
|
+
);
|
|
39929
|
+
}
|
|
39930
|
+
purge(_queue, _status) {
|
|
39931
|
+
throw new Error(
|
|
39932
|
+
"The kafka queue backend cannot perform purge(): Kafka has no notion of job status to purge by. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
39933
|
+
);
|
|
39925
39934
|
}
|
|
39926
39935
|
};
|
|
39927
39936
|
}
|
|
@@ -17345,10 +17345,17 @@ var init_session = __esm({
|
|
|
17345
17345
|
*
|
|
17346
17346
|
* session.flash("message", "Saved!") // set
|
|
17347
17347
|
* session.flash("message") // get + auto-remove → "Saved!"
|
|
17348
|
+
* session.flash("message", null) // get + auto-remove (null is a GET sentinel)
|
|
17349
|
+
*
|
|
17350
|
+
* `null` — NOT just `undefined` — is the GET sentinel, so `flash(key, null)`
|
|
17351
|
+
* READS and clears rather than STORING null. This matches the Python master
|
|
17352
|
+
* (`if value is not None`), PHP (`if ($value !== null)`) and Ruby
|
|
17353
|
+
* (`if value.nil?`): passing the language's "no value" literal means GET. A
|
|
17354
|
+
* caller wanting to persist an explicit null should store it with `set()`.
|
|
17348
17355
|
*/
|
|
17349
17356
|
flash(key, value) {
|
|
17350
17357
|
const flashKey = `${FLASH_PREFIX}${key}`;
|
|
17351
|
-
if (value !== void 0) {
|
|
17358
|
+
if (value !== void 0 && value !== null) {
|
|
17352
17359
|
this.set(flashKey, value);
|
|
17353
17360
|
return void 0;
|
|
17354
17361
|
}
|
|
@@ -39176,16 +39183,8 @@ var init_rabbitmqBackend = __esm({
|
|
|
39176
39183
|
process.stdout.write(String(msgCount));
|
|
39177
39184
|
closeConnection();
|
|
39178
39185
|
}
|
|
39179
|
-
|
|
39180
|
-
|
|
39181
|
-
const qBuf = Buffer.from(queueName, "utf-8");
|
|
39182
|
-
const purgePayload = Buffer.alloc(4 + qBuf.length);
|
|
39183
|
-
purgePayload.writeUInt16BE(0, 0);
|
|
39184
|
-
purgePayload.writeUInt8(qBuf.length, 2);
|
|
39185
|
-
qBuf.copy(purgePayload, 3);
|
|
39186
|
-
purgePayload.writeUInt8(0, 3 + qBuf.length); // no-wait=false
|
|
39187
|
-
sendMethod(1, 50, 30, purgePayload);
|
|
39188
|
-
}
|
|
39186
|
+
// No "purge" operation: clear()/purge() refuse by name (ADR-0022),
|
|
39187
|
+
// so nothing ever sends Queue.Purge and the drain path is gone.
|
|
39189
39188
|
}
|
|
39190
39189
|
else if (classId === 60 && methodId === 71) {
|
|
39191
39190
|
// Basic.Get-Ok \u2014 message body will follow in content frames
|
|
@@ -39196,11 +39195,6 @@ var init_rabbitmqBackend = __esm({
|
|
|
39196
39195
|
process.stdout.write("__EMPTY__");
|
|
39197
39196
|
closeConnection();
|
|
39198
39197
|
}
|
|
39199
|
-
else if (classId === 50 && methodId === 31) {
|
|
39200
|
-
// Queue.Purge-Ok
|
|
39201
|
-
process.stdout.write("__PURGED__");
|
|
39202
|
-
closeConnection();
|
|
39203
|
-
}
|
|
39204
39198
|
else if (classId === 10 && methodId === 50) {
|
|
39205
39199
|
// Connection.Close (server-initiated, e.g. a channel/protocol error)
|
|
39206
39200
|
// \u2192 send Connection.Close-Ok and exit non-zero so the caller sees the
|
|
@@ -39330,8 +39324,15 @@ var init_rabbitmqBackend = __esm({
|
|
|
39330
39324
|
const num = parseInt(result, 10);
|
|
39331
39325
|
return isNaN(num) ? 0 : num;
|
|
39332
39326
|
}
|
|
39333
|
-
clear(
|
|
39334
|
-
|
|
39327
|
+
clear(_queue) {
|
|
39328
|
+
throw new Error(
|
|
39329
|
+
"The rabbitmq queue backend cannot perform clear(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed clear would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
39330
|
+
);
|
|
39331
|
+
}
|
|
39332
|
+
purge(_queue, _status) {
|
|
39333
|
+
throw new Error(
|
|
39334
|
+
"The rabbitmq queue backend cannot perform purge(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed purge would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
39335
|
+
);
|
|
39335
39336
|
}
|
|
39336
39337
|
};
|
|
39337
39338
|
}
|
|
@@ -39893,6 +39894,14 @@ var init_kafkaBackend = __esm({
|
|
|
39893
39894
|
return 0;
|
|
39894
39895
|
}
|
|
39895
39896
|
clear(_queue) {
|
|
39897
|
+
throw new Error(
|
|
39898
|
+
"The kafka queue backend cannot perform clear(): Kafka has no notion of job status and cannot delete records on demand. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
39899
|
+
);
|
|
39900
|
+
}
|
|
39901
|
+
purge(_queue, _status) {
|
|
39902
|
+
throw new Error(
|
|
39903
|
+
"The kafka queue backend cannot perform purge(): Kafka has no notion of job status to purge by. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
39904
|
+
);
|
|
39896
39905
|
}
|
|
39897
39906
|
};
|
|
39898
39907
|
}
|
|
@@ -697,7 +697,28 @@ export class KafkaBackend implements QueueBackend {
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
clear(_queue: string): void {
|
|
700
|
-
// Kafka
|
|
701
|
-
//
|
|
700
|
+
// Not performable on Kafka - throws naming the backend and the operation.
|
|
701
|
+
// clear() empties the queue, but a Kafka log cannot delete records on
|
|
702
|
+
// demand: a partition is read in offset order and records leave only by
|
|
703
|
+
// retention. This used to be a silent no-op, which claimed the queue was
|
|
704
|
+
// emptied when it was untouched (ADR-0022 invariant 6). PHP, Python and
|
|
705
|
+
// Ruby already refuse by name; this brings the Node backend class in line.
|
|
706
|
+
throw new Error(
|
|
707
|
+
"The kafka queue backend cannot perform clear(): Kafka has no notion of " +
|
|
708
|
+
"job status and cannot delete records on demand. A log is read in " +
|
|
709
|
+
"offset order and records leave only by retention. Use the file or " +
|
|
710
|
+
"mongodb backend.",
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
purge(_queue: string, _status?: string): number {
|
|
715
|
+
// Not performable on Kafka - throws naming the backend and the operation.
|
|
716
|
+
// purge(status) removes jobs SELECTED BY STATUS; a Kafka log has no notion
|
|
717
|
+
// of status to purge by. Refusing by name is the honest answer.
|
|
718
|
+
throw new Error(
|
|
719
|
+
"The kafka queue backend cannot perform purge(): Kafka has no notion of " +
|
|
720
|
+
"job status to purge by. A log is read in offset order and records " +
|
|
721
|
+
"leave only by retention. Use the file or mongodb backend.",
|
|
722
|
+
);
|
|
702
723
|
}
|
|
703
724
|
}
|
|
@@ -471,16 +471,8 @@ export class RabbitMQBackend implements QueueBackend {
|
|
|
471
471
|
process.stdout.write(String(msgCount));
|
|
472
472
|
closeConnection();
|
|
473
473
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
const qBuf = Buffer.from(queueName, "utf-8");
|
|
477
|
-
const purgePayload = Buffer.alloc(4 + qBuf.length);
|
|
478
|
-
purgePayload.writeUInt16BE(0, 0);
|
|
479
|
-
purgePayload.writeUInt8(qBuf.length, 2);
|
|
480
|
-
qBuf.copy(purgePayload, 3);
|
|
481
|
-
purgePayload.writeUInt8(0, 3 + qBuf.length); // no-wait=false
|
|
482
|
-
sendMethod(1, 50, 30, purgePayload);
|
|
483
|
-
}
|
|
474
|
+
// No "purge" operation: clear()/purge() refuse by name (ADR-0022),
|
|
475
|
+
// so nothing ever sends Queue.Purge and the drain path is gone.
|
|
484
476
|
}
|
|
485
477
|
else if (classId === 60 && methodId === 71) {
|
|
486
478
|
// Basic.Get-Ok — message body will follow in content frames
|
|
@@ -491,11 +483,6 @@ export class RabbitMQBackend implements QueueBackend {
|
|
|
491
483
|
process.stdout.write("__EMPTY__");
|
|
492
484
|
closeConnection();
|
|
493
485
|
}
|
|
494
|
-
else if (classId === 50 && methodId === 31) {
|
|
495
|
-
// Queue.Purge-Ok
|
|
496
|
-
process.stdout.write("__PURGED__");
|
|
497
|
-
closeConnection();
|
|
498
|
-
}
|
|
499
486
|
else if (classId === 10 && methodId === 50) {
|
|
500
487
|
// Connection.Close (server-initiated, e.g. a channel/protocol error)
|
|
501
488
|
// → send Connection.Close-Ok and exit non-zero so the caller sees the
|
|
@@ -633,7 +620,32 @@ export class RabbitMQBackend implements QueueBackend {
|
|
|
633
620
|
return isNaN(num) ? 0 : num;
|
|
634
621
|
}
|
|
635
622
|
|
|
636
|
-
clear(
|
|
637
|
-
|
|
623
|
+
clear(_queue: string): void {
|
|
624
|
+
// Not performable on RabbitMQ - throws naming the backend and the operation.
|
|
625
|
+
// clear() empties the queue, but RabbitMQ cannot address messages by status;
|
|
626
|
+
// the only thing it could do is queue.purge the WHOLE live queue. This used
|
|
627
|
+
// to do exactly that (execSync("purge", queue)), silently destroying every
|
|
628
|
+
// pending job. Draining a live broker on a status-addressed clear is data
|
|
629
|
+
// loss (ADR-0022 invariant 6), so it refuses by name instead. PHP, Python
|
|
630
|
+
// and Ruby already refuse; this brings the Node backend class in line.
|
|
631
|
+
throw new Error(
|
|
632
|
+
"The rabbitmq queue backend cannot perform clear(): RabbitMQ cannot " +
|
|
633
|
+
"address messages by status (basic.get pops the head of the queue), so " +
|
|
634
|
+
"a status-addressed clear would have to drain the entire live queue and " +
|
|
635
|
+
"destroy pending work. Use the file or mongodb backend.",
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
purge(_queue: string, _status?: string): number {
|
|
640
|
+
// Not performable on RabbitMQ - throws naming the backend and the operation.
|
|
641
|
+
// purge(status) removes jobs SELECTED BY STATUS; RabbitMQ has no status
|
|
642
|
+
// concept and could only drain the whole live queue. Refusing by name is
|
|
643
|
+
// the honest answer.
|
|
644
|
+
throw new Error(
|
|
645
|
+
"The rabbitmq queue backend cannot perform purge(): RabbitMQ cannot " +
|
|
646
|
+
"address messages by status (basic.get pops the head of the queue), so " +
|
|
647
|
+
"a status-addressed purge would have to drain the entire live queue and " +
|
|
648
|
+
"destroy pending work. Use the file or mongodb backend.",
|
|
649
|
+
);
|
|
638
650
|
}
|
|
639
651
|
}
|
|
@@ -711,10 +711,17 @@ export class Session {
|
|
|
711
711
|
*
|
|
712
712
|
* session.flash("message", "Saved!") // set
|
|
713
713
|
* session.flash("message") // get + auto-remove → "Saved!"
|
|
714
|
+
* session.flash("message", null) // get + auto-remove (null is a GET sentinel)
|
|
715
|
+
*
|
|
716
|
+
* `null` — NOT just `undefined` — is the GET sentinel, so `flash(key, null)`
|
|
717
|
+
* READS and clears rather than STORING null. This matches the Python master
|
|
718
|
+
* (`if value is not None`), PHP (`if ($value !== null)`) and Ruby
|
|
719
|
+
* (`if value.nil?`): passing the language's "no value" literal means GET. A
|
|
720
|
+
* caller wanting to persist an explicit null should store it with `set()`.
|
|
714
721
|
*/
|
|
715
722
|
flash(key: string, value?: unknown): unknown {
|
|
716
723
|
const flashKey = `${FLASH_PREFIX}${key}`;
|
|
717
|
-
if (value !== undefined) {
|
|
724
|
+
if (value !== undefined && value !== null) {
|
|
718
725
|
// Set mode
|
|
719
726
|
this.set(flashKey, value);
|
|
720
727
|
return undefined;
|
|
@@ -7257,10 +7257,17 @@ var init_session = __esm({
|
|
|
7257
7257
|
*
|
|
7258
7258
|
* session.flash("message", "Saved!") // set
|
|
7259
7259
|
* session.flash("message") // get + auto-remove → "Saved!"
|
|
7260
|
+
* session.flash("message", null) // get + auto-remove (null is a GET sentinel)
|
|
7261
|
+
*
|
|
7262
|
+
* `null` — NOT just `undefined` — is the GET sentinel, so `flash(key, null)`
|
|
7263
|
+
* READS and clears rather than STORING null. This matches the Python master
|
|
7264
|
+
* (`if value is not None`), PHP (`if ($value !== null)`) and Ruby
|
|
7265
|
+
* (`if value.nil?`): passing the language's "no value" literal means GET. A
|
|
7266
|
+
* caller wanting to persist an explicit null should store it with `set()`.
|
|
7260
7267
|
*/
|
|
7261
7268
|
flash(key, value) {
|
|
7262
7269
|
const flashKey = `${FLASH_PREFIX}${key}`;
|
|
7263
|
-
if (value !== void 0) {
|
|
7270
|
+
if (value !== void 0 && value !== null) {
|
|
7264
7271
|
this.set(flashKey, value);
|
|
7265
7272
|
return void 0;
|
|
7266
7273
|
}
|
|
@@ -29556,16 +29563,8 @@ var init_rabbitmqBackend = __esm({
|
|
|
29556
29563
|
process.stdout.write(String(msgCount));
|
|
29557
29564
|
closeConnection();
|
|
29558
29565
|
}
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
const qBuf = Buffer.from(queueName, "utf-8");
|
|
29562
|
-
const purgePayload = Buffer.alloc(4 + qBuf.length);
|
|
29563
|
-
purgePayload.writeUInt16BE(0, 0);
|
|
29564
|
-
purgePayload.writeUInt8(qBuf.length, 2);
|
|
29565
|
-
qBuf.copy(purgePayload, 3);
|
|
29566
|
-
purgePayload.writeUInt8(0, 3 + qBuf.length); // no-wait=false
|
|
29567
|
-
sendMethod(1, 50, 30, purgePayload);
|
|
29568
|
-
}
|
|
29566
|
+
// No "purge" operation: clear()/purge() refuse by name (ADR-0022),
|
|
29567
|
+
// so nothing ever sends Queue.Purge and the drain path is gone.
|
|
29569
29568
|
}
|
|
29570
29569
|
else if (classId === 60 && methodId === 71) {
|
|
29571
29570
|
// Basic.Get-Ok \u2014 message body will follow in content frames
|
|
@@ -29576,11 +29575,6 @@ var init_rabbitmqBackend = __esm({
|
|
|
29576
29575
|
process.stdout.write("__EMPTY__");
|
|
29577
29576
|
closeConnection();
|
|
29578
29577
|
}
|
|
29579
|
-
else if (classId === 50 && methodId === 31) {
|
|
29580
|
-
// Queue.Purge-Ok
|
|
29581
|
-
process.stdout.write("__PURGED__");
|
|
29582
|
-
closeConnection();
|
|
29583
|
-
}
|
|
29584
29578
|
else if (classId === 10 && methodId === 50) {
|
|
29585
29579
|
// Connection.Close (server-initiated, e.g. a channel/protocol error)
|
|
29586
29580
|
// \u2192 send Connection.Close-Ok and exit non-zero so the caller sees the
|
|
@@ -29710,8 +29704,15 @@ var init_rabbitmqBackend = __esm({
|
|
|
29710
29704
|
const num = parseInt(result, 10);
|
|
29711
29705
|
return isNaN(num) ? 0 : num;
|
|
29712
29706
|
}
|
|
29713
|
-
clear(
|
|
29714
|
-
|
|
29707
|
+
clear(_queue) {
|
|
29708
|
+
throw new Error(
|
|
29709
|
+
"The rabbitmq queue backend cannot perform clear(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed clear would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
29710
|
+
);
|
|
29711
|
+
}
|
|
29712
|
+
purge(_queue, _status) {
|
|
29713
|
+
throw new Error(
|
|
29714
|
+
"The rabbitmq queue backend cannot perform purge(): RabbitMQ cannot address messages by status (basic.get pops the head of the queue), so a status-addressed purge would have to drain the entire live queue and destroy pending work. Use the file or mongodb backend."
|
|
29715
|
+
);
|
|
29715
29716
|
}
|
|
29716
29717
|
};
|
|
29717
29718
|
}
|
|
@@ -30273,6 +30274,14 @@ var init_kafkaBackend = __esm({
|
|
|
30273
30274
|
return 0;
|
|
30274
30275
|
}
|
|
30275
30276
|
clear(_queue) {
|
|
30277
|
+
throw new Error(
|
|
30278
|
+
"The kafka queue backend cannot perform clear(): Kafka has no notion of job status and cannot delete records on demand. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
30279
|
+
);
|
|
30280
|
+
}
|
|
30281
|
+
purge(_queue, _status) {
|
|
30282
|
+
throw new Error(
|
|
30283
|
+
"The kafka queue backend cannot perform purge(): Kafka has no notion of job status to purge by. A log is read in offset order and records leave only by retention. Use the file or mongodb backend."
|
|
30284
|
+
);
|
|
30276
30285
|
}
|
|
30277
30286
|
};
|
|
30278
30287
|
}
|
|
@@ -51,5 +51,6 @@ export declare class RabbitMQBackend implements QueueBackend {
|
|
|
51
51
|
push(queue: string, payload: unknown, _delay?: number): string;
|
|
52
52
|
pop(queue: string): QueueJob | null;
|
|
53
53
|
size(queue: string): number;
|
|
54
|
-
clear(
|
|
54
|
+
clear(_queue: string): void;
|
|
55
|
+
purge(_queue: string, _status?: string): number;
|
|
55
56
|
}
|
|
@@ -233,6 +233,13 @@ export declare class Session {
|
|
|
233
233
|
*
|
|
234
234
|
* session.flash("message", "Saved!") // set
|
|
235
235
|
* session.flash("message") // get + auto-remove → "Saved!"
|
|
236
|
+
* session.flash("message", null) // get + auto-remove (null is a GET sentinel)
|
|
237
|
+
*
|
|
238
|
+
* `null` — NOT just `undefined` — is the GET sentinel, so `flash(key, null)`
|
|
239
|
+
* READS and clears rather than STORING null. This matches the Python master
|
|
240
|
+
* (`if value is not None`), PHP (`if ($value !== null)`) and Ruby
|
|
241
|
+
* (`if value.nil?`): passing the language's "no value" literal means GET. A
|
|
242
|
+
* caller wanting to persist an explicit null should store it with `set()`.
|
|
236
243
|
*/
|
|
237
244
|
flash(key: string, value?: unknown): unknown;
|
|
238
245
|
/**
|