@zenstackhq/runtime 3.0.0-alpha.22 → 3.0.0-alpha.23
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/{contract-D8U59Syb.d.cts → contract-Y3qWOegb.d.cts} +5 -5
- package/dist/{contract-D8U59Syb.d.ts → contract-Y3qWOegb.d.ts} +5 -5
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/plugins/policy/index.d.cts +1 -1
- package/dist/plugins/policy/index.d.ts +1 -1
- package/package.json +8 -8
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientConstructor } from './contract-
|
|
2
|
-
export { K as AggregateArgs, L as AggregateResult, B as BatchResult, i as BooleanFilter, h as BytesFilter, c as ClientContract, d as ClientOptions, G as CountArgs, H as CountResult, u as CreateArgs, w as CreateManyAndReturnArgs, v as CreateManyArgs, D as DateTimeFilter, A as DeleteArgs, E as DeleteManyArgs, F as FindArgs, s as FindFirstArgs, r as FindManyArgs, t as FindUniqueArgs, P as GroupByArgs, Q as GroupByResult, I as IncludeInput, J as JsonArray, a as JsonObject, b as JsonValue, M as ModelResult, k as NullsOrder, N as NumberFilter, m as OmitInput, O as OrderBy, n as SelectIncludeOmit, o as SelectInput, q as SelectSubset, S as SimplifiedModelResult, j as SortOrder, g as StringFilter, p as Subset, T as ToKysely, f as TypeDefResult, U as UpdateArgs, y as UpdateManyAndReturnArgs, x as UpdateManyArgs, z as UpsertArgs, W as WhereInput, l as WhereUniqueInput, e as definePlugin } from './contract-
|
|
1
|
+
import { C as ClientConstructor } from './contract-Y3qWOegb.cjs';
|
|
2
|
+
export { K as AggregateArgs, L as AggregateResult, B as BatchResult, i as BooleanFilter, h as BytesFilter, c as ClientContract, d as ClientOptions, G as CountArgs, H as CountResult, u as CreateArgs, w as CreateManyAndReturnArgs, v as CreateManyArgs, D as DateTimeFilter, A as DeleteArgs, E as DeleteManyArgs, F as FindArgs, s as FindFirstArgs, r as FindManyArgs, t as FindUniqueArgs, P as GroupByArgs, Q as GroupByResult, I as IncludeInput, J as JsonArray, a as JsonObject, b as JsonValue, M as ModelResult, k as NullsOrder, N as NumberFilter, m as OmitInput, O as OrderBy, n as SelectIncludeOmit, o as SelectInput, q as SelectSubset, S as SimplifiedModelResult, j as SortOrder, g as StringFilter, p as Subset, T as ToKysely, f as TypeDefResult, U as UpdateArgs, y as UpdateManyAndReturnArgs, x as UpdateManyArgs, z as UpsertArgs, W as WhereInput, l as WhereUniqueInput, e as definePlugin } from './contract-Y3qWOegb.cjs';
|
|
3
3
|
import 'decimal.js';
|
|
4
4
|
import '@zenstackhq/sdk/schema';
|
|
5
5
|
import 'kysely';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ClientConstructor } from './contract-
|
|
2
|
-
export { K as AggregateArgs, L as AggregateResult, B as BatchResult, i as BooleanFilter, h as BytesFilter, c as ClientContract, d as ClientOptions, G as CountArgs, H as CountResult, u as CreateArgs, w as CreateManyAndReturnArgs, v as CreateManyArgs, D as DateTimeFilter, A as DeleteArgs, E as DeleteManyArgs, F as FindArgs, s as FindFirstArgs, r as FindManyArgs, t as FindUniqueArgs, P as GroupByArgs, Q as GroupByResult, I as IncludeInput, J as JsonArray, a as JsonObject, b as JsonValue, M as ModelResult, k as NullsOrder, N as NumberFilter, m as OmitInput, O as OrderBy, n as SelectIncludeOmit, o as SelectInput, q as SelectSubset, S as SimplifiedModelResult, j as SortOrder, g as StringFilter, p as Subset, T as ToKysely, f as TypeDefResult, U as UpdateArgs, y as UpdateManyAndReturnArgs, x as UpdateManyArgs, z as UpsertArgs, W as WhereInput, l as WhereUniqueInput, e as definePlugin } from './contract-
|
|
1
|
+
import { C as ClientConstructor } from './contract-Y3qWOegb.js';
|
|
2
|
+
export { K as AggregateArgs, L as AggregateResult, B as BatchResult, i as BooleanFilter, h as BytesFilter, c as ClientContract, d as ClientOptions, G as CountArgs, H as CountResult, u as CreateArgs, w as CreateManyAndReturnArgs, v as CreateManyArgs, D as DateTimeFilter, A as DeleteArgs, E as DeleteManyArgs, F as FindArgs, s as FindFirstArgs, r as FindManyArgs, t as FindUniqueArgs, P as GroupByArgs, Q as GroupByResult, I as IncludeInput, J as JsonArray, a as JsonObject, b as JsonValue, M as ModelResult, k as NullsOrder, N as NumberFilter, m as OmitInput, O as OrderBy, n as SelectIncludeOmit, o as SelectInput, q as SelectSubset, S as SimplifiedModelResult, j as SortOrder, g as StringFilter, p as Subset, T as ToKysely, f as TypeDefResult, U as UpdateArgs, y as UpdateManyAndReturnArgs, x as UpdateManyArgs, z as UpsertArgs, W as WhereInput, l as WhereUniqueInput, e as definePlugin } from './contract-Y3qWOegb.js';
|
|
3
3
|
import 'decimal.js';
|
|
4
4
|
import '@zenstackhq/sdk/schema';
|
|
5
5
|
import 'kysely';
|
package/dist/index.js
CHANGED
|
@@ -5873,7 +5873,7 @@ var ZenStackQueryExecutor = class _ZenStackQueryExecutor extends DefaultQueryExe
|
|
|
5873
5873
|
await this.callBeforeMutationHooks(queryNode, mutationInterceptionInfo);
|
|
5874
5874
|
}
|
|
5875
5875
|
const oldQueryNode = queryNode;
|
|
5876
|
-
if ((InsertQueryNode2.is(queryNode) || UpdateQueryNode2.is(queryNode)) && mutationInterceptionInfo?.
|
|
5876
|
+
if ((InsertQueryNode2.is(queryNode) || UpdateQueryNode2.is(queryNode)) && mutationInterceptionInfo?.loadAfterMutationEntities) {
|
|
5877
5877
|
queryNode = {
|
|
5878
5878
|
...queryNode,
|
|
5879
5879
|
returning: ReturningNode3.create([
|
|
@@ -6019,12 +6019,12 @@ ${compiled.parameters.map((p) => inspect2(p)).join("\n")}`;
|
|
|
6019
6019
|
queryNode
|
|
6020
6020
|
});
|
|
6021
6021
|
result.intercept ||= filterResult.intercept;
|
|
6022
|
-
result.
|
|
6023
|
-
result.
|
|
6022
|
+
result.loadBeforeMutationEntities ||= filterResult.loadBeforeMutationEntities;
|
|
6023
|
+
result.loadAfterMutationEntities ||= filterResult.loadAfterMutationEntities;
|
|
6024
6024
|
}
|
|
6025
6025
|
}
|
|
6026
6026
|
let beforeMutationEntities;
|
|
6027
|
-
if (result.
|
|
6027
|
+
if (result.loadBeforeMutationEntities && (UpdateQueryNode2.is(queryNode) || DeleteQueryNode2.is(queryNode))) {
|
|
6028
6028
|
beforeMutationEntities = await this.loadEntities(mutationModel, where);
|
|
6029
6029
|
}
|
|
6030
6030
|
return {
|
|
@@ -6073,7 +6073,7 @@ ${compiled.parameters.map((p) => inspect2(p)).join("\n")}`;
|
|
|
6073
6073
|
const inTransaction = this.driver.isTransactionConnection(connection);
|
|
6074
6074
|
for (const hook of hooks) {
|
|
6075
6075
|
let afterMutationEntities = void 0;
|
|
6076
|
-
if (mutationInterceptionInfo.
|
|
6076
|
+
if (mutationInterceptionInfo.loadAfterMutationEntities) {
|
|
6077
6077
|
if (InsertQueryNode2.is(queryNode) || UpdateQueryNode2.is(queryNode)) {
|
|
6078
6078
|
afterMutationEntities = queryResult.rows;
|
|
6079
6079
|
}
|