@zenstackhq/plugin-policy 3.0.0-beta.13 → 3.0.0-beta.15

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.d.cts CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as kysely from 'kysely';
2
- import * as _zenstackhq_runtime from '@zenstackhq/runtime';
3
- import { RuntimePlugin, OnKyselyQueryArgs } from '@zenstackhq/runtime';
4
- import { SchemaDef } from '@zenstackhq/runtime/schema';
2
+ import * as _zenstackhq_orm from '@zenstackhq/orm';
3
+ import { RuntimePlugin, OnKyselyQueryArgs } from '@zenstackhq/orm';
4
+ import { SchemaDef } from '@zenstackhq/orm/schema';
5
5
 
6
6
  declare class PolicyPlugin<Schema extends SchemaDef> implements RuntimePlugin<Schema> {
7
7
  get id(): string;
8
8
  get name(): string;
9
9
  get description(): string;
10
10
  get functions(): {
11
- check: _zenstackhq_runtime.ZModelFunction<any>;
11
+ check: _zenstackhq_orm.ZModelFunction<any>;
12
12
  };
13
13
  onKyselyQuery({ query, client, proceed }: OnKyselyQueryArgs<Schema>): Promise<kysely.QueryResult<any>>;
14
14
  }
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as kysely from 'kysely';
2
- import * as _zenstackhq_runtime from '@zenstackhq/runtime';
3
- import { RuntimePlugin, OnKyselyQueryArgs } from '@zenstackhq/runtime';
4
- import { SchemaDef } from '@zenstackhq/runtime/schema';
2
+ import * as _zenstackhq_orm from '@zenstackhq/orm';
3
+ import { RuntimePlugin, OnKyselyQueryArgs } from '@zenstackhq/orm';
4
+ import { SchemaDef } from '@zenstackhq/orm/schema';
5
5
 
6
6
  declare class PolicyPlugin<Schema extends SchemaDef> implements RuntimePlugin<Schema> {
7
7
  get id(): string;
8
8
  get name(): string;
9
9
  get description(): string;
10
10
  get functions(): {
11
- check: _zenstackhq_runtime.ZModelFunction<any>;
11
+ check: _zenstackhq_orm.ZModelFunction<any>;
12
12
  };
13
13
  onKyselyQuery({ query, client, proceed }: OnKyselyQueryArgs<Schema>): Promise<kysely.QueryResult<any>>;
14
14
  }
package/dist/index.js CHANGED
@@ -3,18 +3,18 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
 
4
4
  // src/functions.ts
5
5
  import { invariant as invariant4 } from "@zenstackhq/common-helpers";
6
- import { CRUD, QueryUtils as QueryUtils3 } from "@zenstackhq/runtime";
6
+ import { CRUD, QueryUtils as QueryUtils3 } from "@zenstackhq/orm";
7
7
  import { ExpressionWrapper as ExpressionWrapper2, ValueNode as ValueNode4 } from "kysely";
8
8
 
9
9
  // src/policy-handler.ts
10
10
  import { invariant as invariant3 } from "@zenstackhq/common-helpers";
11
- import { getCrudDialect as getCrudDialect2, InternalError as InternalError2, QueryError as QueryError2, QueryUtils as QueryUtils2, RejectedByPolicyError, RejectedByPolicyReason, SchemaUtils } from "@zenstackhq/runtime";
12
- import { ExpressionUtils as ExpressionUtils4 } from "@zenstackhq/runtime/schema";
11
+ import { getCrudDialect as getCrudDialect2, InternalError as InternalError2, QueryError as QueryError2, QueryUtils as QueryUtils2, RejectedByPolicyError, RejectedByPolicyReason, SchemaUtils } from "@zenstackhq/orm";
12
+ import { ExpressionUtils as ExpressionUtils4 } from "@zenstackhq/orm/schema";
13
13
  import { AliasNode as AliasNode3, BinaryOperationNode as BinaryOperationNode3, ColumnNode as ColumnNode2, DeleteQueryNode, expressionBuilder as expressionBuilder2, ExpressionWrapper, FromNode as FromNode2, FunctionNode as FunctionNode3, IdentifierNode as IdentifierNode2, InsertQueryNode, OperationNodeTransformer, OperatorNode as OperatorNode3, ParensNode as ParensNode2, PrimitiveValueListNode, RawNode, ReferenceNode as ReferenceNode3, ReturningNode, SelectAllNode, SelectionNode as SelectionNode2, SelectQueryNode as SelectQueryNode2, sql, TableNode as TableNode3, UpdateQueryNode, ValueListNode as ValueListNode2, ValueNode as ValueNode3, ValuesNode, WhereNode as WhereNode2 } from "kysely";
14
14
  import { match as match3 } from "ts-pattern";
15
15
 
16
16
  // src/column-collector.ts
17
- import { KyselyUtils } from "@zenstackhq/runtime";
17
+ import { KyselyUtils } from "@zenstackhq/orm";
18
18
  var ColumnCollector = class extends KyselyUtils.DefaultOperationNodeVisitor {
19
19
  static {
20
20
  __name(this, "ColumnCollector");
@@ -34,15 +34,15 @@ var ColumnCollector = class extends KyselyUtils.DefaultOperationNodeVisitor {
34
34
 
35
35
  // src/expression-transformer.ts
36
36
  import { invariant as invariant2 } from "@zenstackhq/common-helpers";
37
- import { getCrudDialect, InternalError, QueryError, QueryUtils } from "@zenstackhq/runtime";
38
- import { ExpressionUtils as ExpressionUtils3 } from "@zenstackhq/runtime/schema";
37
+ import { getCrudDialect, InternalError, QueryError, QueryUtils } from "@zenstackhq/orm";
38
+ import { ExpressionUtils as ExpressionUtils3 } from "@zenstackhq/orm/schema";
39
39
  import { AliasNode as AliasNode2, BinaryOperationNode as BinaryOperationNode2, ColumnNode, expressionBuilder, FromNode, FunctionNode as FunctionNode2, IdentifierNode, OperatorNode as OperatorNode2, ReferenceNode as ReferenceNode2, SelectionNode, SelectQueryNode, TableNode as TableNode2, ValueListNode, ValueNode as ValueNode2, WhereNode } from "kysely";
40
40
  import { match as match2 } from "ts-pattern";
41
41
 
42
42
  // src/expression-evaluator.ts
43
43
  import { invariant } from "@zenstackhq/common-helpers";
44
44
  import { match } from "ts-pattern";
45
- import { ExpressionUtils } from "@zenstackhq/runtime/schema";
45
+ import { ExpressionUtils } from "@zenstackhq/orm/schema";
46
46
  var ExpressionEvaluator = class {
47
47
  static {
48
48
  __name(this, "ExpressionEvaluator");
@@ -111,7 +111,7 @@ var ExpressionEvaluator = class {
111
111
  };
112
112
 
113
113
  // src/utils.ts
114
- import { ExpressionUtils as ExpressionUtils2 } from "@zenstackhq/runtime/schema";
114
+ import { ExpressionUtils as ExpressionUtils2 } from "@zenstackhq/orm/schema";
115
115
  import { AliasNode, AndNode, BinaryOperationNode, FunctionNode, OperatorNode, OrNode, ParensNode, ReferenceNode, TableNode, UnaryOperationNode, ValueNode } from "kysely";
116
116
  function trueNode(dialect) {
117
117
  return ValueNode.createImmediate(dialect.transformPrimitive(true, "Boolean", false));