@btravstack/amqp-worker 0.25.0 → 0.26.0
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/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/package.json +8 -8
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigInvalid,
|
|
1
|
+
import { ConfigInvalid, EnvReading } from "@btravstack/config";
|
|
2
2
|
import { AnyUnitModule, Refuse, Runtime, RuntimePort, UnitGate, UnitNeedsOf, UnitRecordOf } from "@btravstack/core";
|
|
3
3
|
import { AnyModule, AnyPort, AnyProvider, Exportable, Module, NeedsGate, PortClassOf, PortInstance, Provider, ServiceOf } from "@btravstack/di";
|
|
4
4
|
import { ConsumerOptions, TypedAmqpWorker, WorkerInferHandlers } from "@amqp-contract/worker";
|
|
@@ -162,7 +162,7 @@ type AmqpTuning<Unit extends AnyUnitModule | undefined = undefined> = {
|
|
|
162
162
|
*
|
|
163
163
|
* With `url` pinned the module reads nothing from the environment.
|
|
164
164
|
*/
|
|
165
|
-
export declare const amqp: <TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined = undefined>(options: AmqpOptions<TContract, Unit>) => Module<AmqpRuntime | AmqpConfig, ConfigInvalid,
|
|
165
|
+
export declare const amqp: <TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined = undefined>(options: AmqpOptions<TContract, Unit>) => Module<AmqpRuntime | AmqpConfig, ConfigInvalid, EnvReading<never, "AMQP_URL" | "AMQP_CONNECT_TIMEOUT_MS"> | HandlersInstanceOf<TContract> | UnitNeedsOf$1<Unit>>;
|
|
166
166
|
/** One piece of the handlers record — what `AmqpHandler(contract, key)(…)` returns, as the composing form consumes it. */
|
|
167
167
|
type PieceOf<C extends AnyAmqpContract> = { readonly [K in HandlerKeyOf<C>]: {
|
|
168
168
|
readonly port: HandlerPortOf<C, K>;
|
|
@@ -237,7 +237,7 @@ export declare const AmqpHandlers: <C extends AnyAmqpContract>(contract: C) => W
|
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region src/amqp-module.d.ts
|
|
239
239
|
/** The starter's own module, as the sugar adds it to the application's imports. */
|
|
240
|
-
type AmqpStarter<TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = Module<AmqpRuntime | AmqpConfig, ConfigInvalid,
|
|
240
|
+
type AmqpStarter<TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = Module<AmqpRuntime | AmqpConfig, ConfigInvalid, EnvReading<never, "AMQP_URL" | "AMQP_CONNECT_TIMEOUT_MS"> | HandlersInstanceOf<TContract> | UnitNeedsOf$1<Unit>>;
|
|
241
241
|
/** The application's imports plus the starter — the tuple `Module(name)` is handed. */
|
|
242
242
|
type Imports<I extends readonly AnyModule[], TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = readonly [...I, AmqpStarter<TContract, Unit>];
|
|
243
243
|
/** The handlers provider plus the application's own — the tuple `Module(name)` is handed. */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyModule, AnyPort, AnyProvider, Exportable, Module, NeedsGate, PortClassOf, PortInstance, Provider, ServiceOf } from "@btravstack/di";
|
|
2
2
|
import { ConsumerOptions, TypedAmqpWorker, WorkerInferHandlers } from "@amqp-contract/worker";
|
|
3
|
-
import { ConfigInvalid,
|
|
3
|
+
import { ConfigInvalid, EnvReading } from "@btravstack/config";
|
|
4
4
|
import { AnyUnitModule, Refuse, Runtime, RuntimePort, UnitGate, UnitNeedsOf, UnitRecordOf } from "@btravstack/core";
|
|
5
5
|
//#region src/handler.d.ts
|
|
6
6
|
/** The consumer and rpc names `C` declares — the keys of its handlers record. */
|
|
@@ -162,7 +162,7 @@ type AmqpTuning<Unit extends AnyUnitModule | undefined = undefined> = {
|
|
|
162
162
|
*
|
|
163
163
|
* With `url` pinned the module reads nothing from the environment.
|
|
164
164
|
*/
|
|
165
|
-
export declare const amqp: <TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined = undefined>(options: AmqpOptions<TContract, Unit>) => Module<AmqpRuntime | AmqpConfig, ConfigInvalid,
|
|
165
|
+
export declare const amqp: <TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined = undefined>(options: AmqpOptions<TContract, Unit>) => Module<AmqpRuntime | AmqpConfig, ConfigInvalid, EnvReading<never, "AMQP_URL" | "AMQP_CONNECT_TIMEOUT_MS"> | HandlersInstanceOf<TContract> | UnitNeedsOf$1<Unit>>;
|
|
166
166
|
/** One piece of the handlers record — what `AmqpHandler(contract, key)(…)` returns, as the composing form consumes it. */
|
|
167
167
|
type PieceOf<C extends AnyAmqpContract> = { readonly [K in HandlerKeyOf<C>]: {
|
|
168
168
|
readonly port: HandlerPortOf<C, K>;
|
|
@@ -237,7 +237,7 @@ export declare const AmqpHandlers: <C extends AnyAmqpContract>(contract: C) => W
|
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region src/amqp-module.d.ts
|
|
239
239
|
/** The starter's own module, as the sugar adds it to the application's imports. */
|
|
240
|
-
type AmqpStarter<TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = Module<AmqpRuntime | AmqpConfig, ConfigInvalid,
|
|
240
|
+
type AmqpStarter<TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = Module<AmqpRuntime | AmqpConfig, ConfigInvalid, EnvReading<never, "AMQP_URL" | "AMQP_CONNECT_TIMEOUT_MS"> | HandlersInstanceOf<TContract> | UnitNeedsOf$1<Unit>>;
|
|
241
241
|
/** The application's imports plus the starter — the tuple `Module(name)` is handed. */
|
|
242
242
|
type Imports<I extends readonly AnyModule[], TContract extends AnyAmqpContract, Unit extends AnyUnitModule | undefined> = readonly [...I, AmqpStarter<TContract, Unit>];
|
|
243
243
|
/** The handlers provider plus the application's own — the tuple `Module(name)` is handed. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btravstack/amqp-worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "The AMQP starter for @btravstack/core: the handlers as a port, one unit per delivery, and a drain the kernel's deadline releases",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"amqp",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"@amqp-contract/contract": "3.0.0-beta.11",
|
|
48
48
|
"@amqp-contract/testing": "3.0.0-beta.11",
|
|
49
49
|
"@amqp-contract/worker": "3.0.0-beta.11",
|
|
50
|
-
"@btravstack/config": "0.
|
|
51
|
-
"@btravstack/core": "0.
|
|
52
|
-
"@btravstack/di": "0.
|
|
50
|
+
"@btravstack/config": "0.26.0",
|
|
51
|
+
"@btravstack/core": "0.26.0",
|
|
52
|
+
"@btravstack/di": "0.26.0",
|
|
53
53
|
"@btravstack/internal-test-infra": "0.0.0",
|
|
54
|
-
"@btravstack/testing": "0.
|
|
54
|
+
"@btravstack/testing": "0.26.0",
|
|
55
55
|
"@btravstack/tsconfig": "0.4.0",
|
|
56
56
|
"@opentelemetry/api": "1.9.1",
|
|
57
57
|
"@types/node": "26.6.4",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@amqp-contract/worker": "^3.0.0-beta.7",
|
|
69
|
-
"@btravstack/config": "^0.
|
|
70
|
-
"@btravstack/core": "^0.
|
|
71
|
-
"@btravstack/di": "^0.
|
|
69
|
+
"@btravstack/config": "^0.26.0",
|
|
70
|
+
"@btravstack/core": "^0.26.0",
|
|
71
|
+
"@btravstack/di": "^0.26.0",
|
|
72
72
|
"@opentelemetry/api": "^1",
|
|
73
73
|
"unthrown": "^5.7.0"
|
|
74
74
|
},
|