@dudousxd/nestjs-catalog 0.29.0 → 0.30.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.
|
@@ -3872,14 +3872,36 @@ export declare function readWorkflowCallOutput(value: unknown): WorkflowCallOutp
|
|
|
3872
3872
|
*/
|
|
3873
3873
|
export interface CallableWorkflowRef {
|
|
3874
3874
|
name: string;
|
|
3875
|
+
/**
|
|
3876
|
+
* How strong the fleet's claim about this entry is, mirroring durable core's
|
|
3877
|
+
* `AnnouncementEvidence` rather than re-deriving it.
|
|
3878
|
+
*
|
|
3879
|
+
* - `'declared'` — a live worker published a descriptor naming this workflow,
|
|
3880
|
+
* so everything populated here was stated by that worker.
|
|
3881
|
+
* - `'observed'` — nobody described it. What exists is a live routing token of
|
|
3882
|
+
* this name, which is exactly the condition convention routing uses, so the
|
|
3883
|
+
* name IS reachable — and nothing else is known: no version, no origin, no
|
|
3884
|
+
* runtime, and no assurance the token serves a workflow rather than a step
|
|
3885
|
+
* handler of the same name. A live queue, not a promise.
|
|
3886
|
+
*
|
|
3887
|
+
* Carried because the two tiers answer a question a picker cannot otherwise
|
|
3888
|
+
* put: **will a pin on this name mean anything?** An `'observed'` entry never
|
|
3889
|
+
* declares a version, so a version typed against it is compared, at run time,
|
|
3890
|
+
* against the engine's routing default — the run comes back tagged
|
|
3891
|
+
* `version:undeclared` and `checkCall` reports the pin as unverified rather
|
|
3892
|
+
* than kept. Absent when the deployment answering predates the distinction.
|
|
3893
|
+
*/
|
|
3894
|
+
evidence?: 'declared' | 'observed';
|
|
3875
3895
|
/**
|
|
3876
3896
|
* The version to pin, and **absent is a real answer**.
|
|
3877
3897
|
*
|
|
3878
3898
|
* A worker that has not been upgraded announces a bare name with no version
|
|
3879
|
-
* and no group
|
|
3880
|
-
*
|
|
3881
|
-
* is
|
|
3882
|
-
*
|
|
3899
|
+
* and no group — or announces nothing at all and is here on its heartbeat
|
|
3900
|
+
* alone ({@link evidence} `'observed'`). Silence is not a claim, so no version
|
|
3901
|
+
* is invented for it from another announcer's — and an entry without one
|
|
3902
|
+
* cannot satisfy the pin, which is why {@link callableWorkflowBlock} refuses
|
|
3903
|
+
* it rather than letting a picker offer a name that would run whatever is
|
|
3904
|
+
* newest on the day it runs.
|
|
3883
3905
|
*/
|
|
3884
3906
|
version?: string;
|
|
3885
3907
|
/** What it does, if the deployment publishes one. Shown beside the name. */
|
|
@@ -3931,11 +3953,17 @@ export interface CallableWorkflowDisagreement {
|
|
|
3931
3953
|
* Two refusals, and they are refusals rather than warnings because in both cases
|
|
3932
3954
|
* committing the entry would write a node whose meaning nobody can state:
|
|
3933
3955
|
*
|
|
3934
|
-
* - `no-version` —
|
|
3935
|
-
*
|
|
3936
|
-
*
|
|
3937
|
-
*
|
|
3938
|
-
*
|
|
3956
|
+
* - `no-version` — nothing live states a version for this name, either because an
|
|
3957
|
+
* un-upgraded worker announced a bare name or because nobody described it at
|
|
3958
|
+
* all and it is here on its heartbeat ({@link CallableWorkflowRef.evidence}
|
|
3959
|
+
* `'observed'`). The call node's whole point is the pin; a node holding a name
|
|
3960
|
+
* and no version follows whatever gets deployed next, which is the failure the
|
|
3961
|
+
* version field exists to prevent. The name is still perfectly typeable by hand
|
|
3962
|
+
* *with* a version the author knows — and the message says what that costs,
|
|
3963
|
+
* because a version typed against a callee that declares none is compared at run
|
|
3964
|
+
* time against the engine's routing default and comes back reported as
|
|
3965
|
+
* unverified, not as kept. That is the one thing an author choosing a pin from
|
|
3966
|
+
* this list could not otherwise find out until a load ran.
|
|
3939
3967
|
* - `ambiguous-group` — two live workers claim this exact `name@version` from
|
|
3940
3968
|
* different groups. Two groups means two queues, and nothing here can know
|
|
3941
3969
|
* which one a run would land on, so the two bodies may not even be the same
|
package/dist/catalog.pipeline.js
CHANGED
|
@@ -2381,9 +2381,16 @@ function describeCount(value) {
|
|
|
2381
2381
|
function callableWorkflowBlock(ref) {
|
|
2382
2382
|
const version = typeof ref.version === 'string' ? ref.version.trim() : '';
|
|
2383
2383
|
if (version.length === 0) {
|
|
2384
|
+
// The two tiers differ in what they can even be asked, so they get their own
|
|
2385
|
+
// sentence rather than one that fits neither: an `'observed'` entry has no
|
|
2386
|
+
// descriptor at all behind it, and calling that "not upgraded to publish its
|
|
2387
|
+
// registrations in full" would overstate what was seen.
|
|
2388
|
+
const seen = ref.evidence === 'observed'
|
|
2389
|
+
? `Nothing describes "${ref.name}" — it is here because a live queue of that name exists, which is what an engine routes a call on and all it knows. No version, no origin and no runtime were stated, and not even that the queue serves a workflow rather than a step handler of the same name.`
|
|
2390
|
+
: `A live worker announces "${ref.name}" without saying which version it runs, which is what a worker announces before it has been upgraded to publish its registrations in full.`;
|
|
2384
2391
|
return {
|
|
2385
2392
|
code: 'no-version',
|
|
2386
|
-
message:
|
|
2393
|
+
message: `${seen} A name with no version cannot be pinned, so this cannot be chosen — type the name and the version you mean. Be aware of what that pin is worth: with nothing declaring a version, a run of it carries the engine's routing default and the load reports the pin as unverified rather than kept, until the worker serving it publishes one.`,
|
|
2387
2394
|
};
|
|
2388
2395
|
}
|
|
2389
2396
|
const groups = ref.disagreements?.find((entry) => entry.axis === 'group')?.values ?? [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "A metadata registry for NestJS: object types, properties and relations, derived from your ORM and enriched with decorators.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Davide Carvalho",
|