@btravstack/core 0.26.0 → 0.27.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.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1007,14 +1007,14 @@ const dispatchUnit = (dispatch) => observed(dispatch.observers, dispatch.operati
|
|
|
1007
1007
|
* record the piece declared. The starter keeps the types; this keeps the body.
|
|
1008
1008
|
*/
|
|
1009
1009
|
const mintPiece = (port, withUnit) => (options) => (0, _btravstack_di.Provider)(port)({
|
|
1010
|
-
inject: options.inject,
|
|
1010
|
+
inject: options.inject ?? {},
|
|
1011
1011
|
sync: (services) => withUnit(options.unit ?? {}, options.sync(services))
|
|
1012
1012
|
});
|
|
1013
1013
|
/**
|
|
1014
1014
|
* The runtime half of a starter's composing provider — `AmqpHandlers(contract)`,
|
|
1015
1015
|
* `TemporalActivities(contract)` — and its two arms. An array of pieces is
|
|
1016
1016
|
* composed into one record keyed by each piece's port id less `prefix`, so the
|
|
1017
|
-
* services record IS the composed record; a `{ inject
|
|
1017
|
+
* services record IS the composed record; a `{ inject?, unit?, sync }` record
|
|
1018
1018
|
* has `withUnit` applied to every entry `sync` answers.
|
|
1019
1019
|
*/
|
|
1020
1020
|
const composeByPrefix = (port, prefix, withUnit) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -966,9 +966,9 @@ export declare class UnitOverrides extends UnitOverrides_base<Readonly<Record<st
|
|
|
966
966
|
type Refuse<T extends readonly unknown[], Marker extends string, Detail> = T extends readonly [...infer Head, unknown] ? readonly [...Head, readonly [Marker, Detail]] : readonly [readonly [Marker, Detail]];
|
|
967
967
|
/** How a starter puts a piece's declared `unit:` record on one of its entries. */
|
|
968
968
|
type EntryWrapper = (record: Readonly<Record<string, AnyPort>>, entry: unknown) => unknown;
|
|
969
|
-
/** A piece's `{ inject
|
|
969
|
+
/** A piece's `{ inject?, unit?, sync }` options, with the types each starter states erased. */
|
|
970
970
|
type PieceOptions = {
|
|
971
|
-
readonly inject
|
|
971
|
+
readonly inject?: Readonly<Record<string, AnyPort>>;
|
|
972
972
|
readonly unit?: Readonly<Record<string, AnyPort>>;
|
|
973
973
|
readonly sync: (services: never) => unknown;
|
|
974
974
|
};
|
|
@@ -983,7 +983,7 @@ export declare const mintPiece: (port: AnyPort, withUnit: EntryWrapper) => (opti
|
|
|
983
983
|
* The runtime half of a starter's composing provider — `AmqpHandlers(contract)`,
|
|
984
984
|
* `TemporalActivities(contract)` — and its two arms. An array of pieces is
|
|
985
985
|
* composed into one record keyed by each piece's port id less `prefix`, so the
|
|
986
|
-
* services record IS the composed record; a `{ inject
|
|
986
|
+
* services record IS the composed record; a `{ inject?, unit?, sync }` record
|
|
987
987
|
* has `withUnit` applied to every entry `sync` answers.
|
|
988
988
|
*/
|
|
989
989
|
export declare const composeByPrefix: (port: AnyPort, prefix: string, withUnit: EntryWrapper) => ((first: unknown) => unknown);
|
package/dist/index.d.mts
CHANGED
|
@@ -966,9 +966,9 @@ export declare class UnitOverrides extends UnitOverrides_base<Readonly<Record<st
|
|
|
966
966
|
type Refuse<T extends readonly unknown[], Marker extends string, Detail> = T extends readonly [...infer Head, unknown] ? readonly [...Head, readonly [Marker, Detail]] : readonly [readonly [Marker, Detail]];
|
|
967
967
|
/** How a starter puts a piece's declared `unit:` record on one of its entries. */
|
|
968
968
|
type EntryWrapper = (record: Readonly<Record<string, AnyPort>>, entry: unknown) => unknown;
|
|
969
|
-
/** A piece's `{ inject
|
|
969
|
+
/** A piece's `{ inject?, unit?, sync }` options, with the types each starter states erased. */
|
|
970
970
|
type PieceOptions = {
|
|
971
|
-
readonly inject
|
|
971
|
+
readonly inject?: Readonly<Record<string, AnyPort>>;
|
|
972
972
|
readonly unit?: Readonly<Record<string, AnyPort>>;
|
|
973
973
|
readonly sync: (services: never) => unknown;
|
|
974
974
|
};
|
|
@@ -983,7 +983,7 @@ export declare const mintPiece: (port: AnyPort, withUnit: EntryWrapper) => (opti
|
|
|
983
983
|
* The runtime half of a starter's composing provider — `AmqpHandlers(contract)`,
|
|
984
984
|
* `TemporalActivities(contract)` — and its two arms. An array of pieces is
|
|
985
985
|
* composed into one record keyed by each piece's port id less `prefix`, so the
|
|
986
|
-
* services record IS the composed record; a `{ inject
|
|
986
|
+
* services record IS the composed record; a `{ inject?, unit?, sync }` record
|
|
987
987
|
* has `withUnit` applied to every entry `sync` answers.
|
|
988
988
|
*/
|
|
989
989
|
export declare const composeByPrefix: (port: AnyPort, prefix: string, withUnit: EntryWrapper) => ((first: unknown) => unknown);
|
package/dist/index.mjs
CHANGED
|
@@ -1006,14 +1006,14 @@ const dispatchUnit = (dispatch) => observed(dispatch.observers, dispatch.operati
|
|
|
1006
1006
|
* record the piece declared. The starter keeps the types; this keeps the body.
|
|
1007
1007
|
*/
|
|
1008
1008
|
const mintPiece = (port, withUnit) => (options) => Provider(port)({
|
|
1009
|
-
inject: options.inject,
|
|
1009
|
+
inject: options.inject ?? {},
|
|
1010
1010
|
sync: (services) => withUnit(options.unit ?? {}, options.sync(services))
|
|
1011
1011
|
});
|
|
1012
1012
|
/**
|
|
1013
1013
|
* The runtime half of a starter's composing provider — `AmqpHandlers(contract)`,
|
|
1014
1014
|
* `TemporalActivities(contract)` — and its two arms. An array of pieces is
|
|
1015
1015
|
* composed into one record keyed by each piece's port id less `prefix`, so the
|
|
1016
|
-
* services record IS the composed record; a `{ inject
|
|
1016
|
+
* services record IS the composed record; a `{ inject?, unit?, sync }` record
|
|
1017
1017
|
* has `withUnit` applied to every entry `sync` answers.
|
|
1018
1018
|
*/
|
|
1019
1019
|
const composeByPrefix = (port, prefix, withUnit) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@btravstack/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "The application kernel: boot a di module into a running process, and stop it without losing work",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"application",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"./package.json": "./package.json"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@btravstack/config": "0.
|
|
49
|
-
"@btravstack/di": "0.
|
|
48
|
+
"@btravstack/config": "0.27.0",
|
|
49
|
+
"@btravstack/di": "0.27.0",
|
|
50
50
|
"@btravstack/tsconfig": "0.4.0",
|
|
51
51
|
"@stryker-mutator/core": "10.0.0",
|
|
52
52
|
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"vitest": "5.0.3"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@btravstack/config": "^0.
|
|
64
|
-
"@btravstack/di": "^0.
|
|
63
|
+
"@btravstack/config": "^0.27.0",
|
|
64
|
+
"@btravstack/di": "^0.27.0",
|
|
65
65
|
"unthrown": "^5.0.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|