@dudousxd/nestjs-durable-core 0.62.1 → 0.63.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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2676,6 +2676,7 @@ var WorkflowEngine = class {
|
|
|
2676
2676
|
onEvent: opts?.onEvent,
|
|
2677
2677
|
eventBatch: opts?.eventBatch,
|
|
2678
2678
|
requires: opts?.requires,
|
|
2679
|
+
origin: opts?.origin,
|
|
2679
2680
|
// A real, retained in-process body — so `workflowBody` can hand it to an in-app worker, and so
|
|
2680
2681
|
// it is NOT confused with the throwing stub `registerRemote` installs for a body-less remote.
|
|
2681
2682
|
hasBody: true
|
|
@@ -2902,6 +2903,11 @@ var WorkflowEngine = class {
|
|
|
2902
2903
|
workflowVersion: registered.version,
|
|
2903
2904
|
status: "pending",
|
|
2904
2905
|
namespace: opts?.namespace ?? this.namespace,
|
|
2906
|
+
// DERIVED from the registration, exactly like `namespace` is derived from this engine — there is
|
|
2907
|
+
// deliberately no `opts.origin`, so a caller cannot label its run as another package's work.
|
|
2908
|
+
// `undefined` when the registration carried none (remote/convention/synthesized child, or a
|
|
2909
|
+
// registrar that could not resolve the declaring package): unknown, not "the app".
|
|
2910
|
+
origin: registered.origin,
|
|
2905
2911
|
input,
|
|
2906
2912
|
tags,
|
|
2907
2913
|
searchAttributes: opts?.searchAttributes,
|
|
@@ -6247,6 +6253,7 @@ var InMemoryStateStore = class {
|
|
|
6247
6253
|
if (query.statuses) runs = runs.filter((r) => query.statuses?.includes(r.status));
|
|
6248
6254
|
if (query.tag) runs = runs.filter((r) => r.tags?.includes(query.tag));
|
|
6249
6255
|
if (query.namespace !== void 0) runs = runs.filter((r) => r.namespace === query.namespace);
|
|
6256
|
+
if (query.origin !== void 0) runs = runs.filter((r) => r.origin === query.origin);
|
|
6250
6257
|
if (query.attributes?.length) {
|
|
6251
6258
|
let candidates = null;
|
|
6252
6259
|
for (const f of query.attributes) {
|