reactronic 0.21.524 → 0.21.525
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.
|
@@ -107,7 +107,7 @@ class OperationController extends Controller_1.Controller {
|
|
|
107
107
|
peek(args) {
|
|
108
108
|
const ctx = Snapshot_1.Snapshot.current();
|
|
109
109
|
const r = ctx.seekRevision(this.ownHolder, this.memberName);
|
|
110
|
-
const op = this.peekFromRevision(r);
|
|
110
|
+
const op = this.peekFromRevision(r, args);
|
|
111
111
|
const isValid = op.options.kind !== Options_1.Kind.Transaction && op.cause !== ROOT_TRIGGER &&
|
|
112
112
|
(ctx === op.revision.snapshot || ctx.timestamp < op.obsoleteSince) &&
|
|
113
113
|
(!op.options.sensitiveArgs || args === undefined ||
|
|
@@ -125,7 +125,7 @@ class OperationController extends Controller_1.Controller {
|
|
|
125
125
|
const m = this.memberName;
|
|
126
126
|
const ctx = Snapshot_1.Snapshot.edit();
|
|
127
127
|
const r = ctx.getEditableRevision(h, m, Data_1.Meta.Holder, this);
|
|
128
|
-
let op = this.peekFromRevision(r);
|
|
128
|
+
let op = this.peekFromRevision(r, undefined);
|
|
129
129
|
if (op.revision !== r) {
|
|
130
130
|
const op2 = new Operation(this, r, op);
|
|
131
131
|
r.data[m] = op2.reenterOver(op);
|
|
@@ -135,7 +135,7 @@ class OperationController extends Controller_1.Controller {
|
|
|
135
135
|
}
|
|
136
136
|
return { operation: op, isUpToDate: true, snapshot: ctx, revision: r };
|
|
137
137
|
}
|
|
138
|
-
peekFromRevision(r) {
|
|
138
|
+
peekFromRevision(r, args) {
|
|
139
139
|
const m = this.memberName;
|
|
140
140
|
let op = r.data[m];
|
|
141
141
|
if (op.controller !== this) {
|
|
@@ -148,6 +148,8 @@ class OperationController extends Controller_1.Controller {
|
|
|
148
148
|
if (op2.controller !== this) {
|
|
149
149
|
r2 = Snapshot_1.Snapshot.edit().getEditableRevision(h, m, Data_1.Meta.Holder, this);
|
|
150
150
|
const t = new Operation(this, r2, op2);
|
|
151
|
+
if (args)
|
|
152
|
+
t.args = args;
|
|
151
153
|
t.cause = ROOT_TRIGGER;
|
|
152
154
|
r2.data[m] = t;
|
|
153
155
|
Snapshot_1.Snapshot.markEdited(op2, t, true, r2, m, h);
|
|
@@ -124,10 +124,11 @@ class TransactionImpl extends Transaction {
|
|
|
124
124
|
t.guard();
|
|
125
125
|
let result = t.runImpl(options === null || options === void 0 ? void 0 : options.trace, func, ...args);
|
|
126
126
|
if (root) {
|
|
127
|
-
if (result instanceof Promise)
|
|
127
|
+
if (result instanceof Promise) {
|
|
128
128
|
result = TransactionImpl.standalone(() => {
|
|
129
129
|
return t.wrapToRetry(t.wrapToWaitUntilFinish(result), func, ...args);
|
|
130
130
|
});
|
|
131
|
+
}
|
|
131
132
|
t.seal();
|
|
132
133
|
}
|
|
133
134
|
return result;
|