@snowtop/ent 0.1.0-alpha12 → 0.1.0-alpha121

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.
Files changed (167) hide show
  1. package/action/action.d.ts +37 -31
  2. package/action/action.js +22 -7
  3. package/action/executor.d.ts +3 -3
  4. package/action/executor.js +8 -3
  5. package/action/experimental_action.d.ts +32 -22
  6. package/action/experimental_action.js +35 -9
  7. package/action/index.d.ts +2 -0
  8. package/action/index.js +7 -1
  9. package/action/orchestrator.d.ts +33 -14
  10. package/action/orchestrator.js +251 -54
  11. package/action/privacy.d.ts +2 -2
  12. package/action/relative_value.d.ts +47 -0
  13. package/action/relative_value.js +125 -0
  14. package/action/transaction.d.ts +10 -0
  15. package/action/transaction.js +23 -0
  16. package/auth/auth.d.ts +1 -1
  17. package/core/base.d.ts +60 -37
  18. package/core/base.js +7 -1
  19. package/core/clause.d.ts +84 -40
  20. package/core/clause.js +358 -64
  21. package/core/config.d.ts +12 -1
  22. package/core/config.js +7 -1
  23. package/core/const.d.ts +3 -0
  24. package/core/const.js +6 -0
  25. package/core/context.d.ts +6 -4
  26. package/core/context.js +20 -2
  27. package/core/convert.d.ts +1 -1
  28. package/core/date.js +1 -5
  29. package/core/db.d.ts +11 -8
  30. package/core/db.js +20 -8
  31. package/core/ent.d.ts +82 -30
  32. package/core/ent.js +632 -193
  33. package/core/global_schema.d.ts +7 -0
  34. package/core/global_schema.js +51 -0
  35. package/core/loaders/assoc_count_loader.d.ts +3 -2
  36. package/core/loaders/assoc_count_loader.js +10 -2
  37. package/core/loaders/assoc_edge_loader.d.ts +2 -2
  38. package/core/loaders/assoc_edge_loader.js +8 -11
  39. package/core/loaders/index.d.ts +1 -1
  40. package/core/loaders/index.js +1 -3
  41. package/core/loaders/index_loader.d.ts +3 -3
  42. package/core/loaders/loader.d.ts +2 -2
  43. package/core/loaders/loader.js +5 -5
  44. package/core/loaders/object_loader.d.ts +11 -10
  45. package/core/loaders/object_loader.js +70 -60
  46. package/core/loaders/query_loader.d.ts +7 -13
  47. package/core/loaders/query_loader.js +52 -11
  48. package/core/loaders/raw_count_loader.d.ts +2 -2
  49. package/core/loaders/raw_count_loader.js +5 -1
  50. package/core/logger.d.ts +1 -1
  51. package/core/logger.js +1 -0
  52. package/core/privacy.d.ts +25 -24
  53. package/core/privacy.js +21 -25
  54. package/core/query/assoc_query.d.ts +7 -6
  55. package/core/query/assoc_query.js +9 -1
  56. package/core/query/custom_clause_query.d.ts +27 -0
  57. package/core/query/custom_clause_query.js +84 -0
  58. package/core/query/custom_query.d.ts +20 -5
  59. package/core/query/custom_query.js +87 -12
  60. package/core/query/index.d.ts +1 -0
  61. package/core/query/index.js +3 -1
  62. package/core/query/query.d.ts +8 -4
  63. package/core/query/query.js +101 -53
  64. package/core/query/shared_assoc_test.d.ts +2 -1
  65. package/core/query/shared_assoc_test.js +35 -45
  66. package/core/query/shared_test.d.ts +8 -1
  67. package/core/query/shared_test.js +470 -236
  68. package/core/viewer.d.ts +3 -3
  69. package/core/viewer.js +1 -1
  70. package/graphql/graphql.d.ts +15 -7
  71. package/graphql/graphql.js +23 -7
  72. package/graphql/index.d.ts +1 -1
  73. package/graphql/index.js +3 -4
  74. package/graphql/query/connection_type.d.ts +9 -9
  75. package/graphql/query/edge_connection.d.ts +9 -9
  76. package/graphql/query/page_info.d.ts +1 -1
  77. package/graphql/query/shared_assoc_test.js +1 -1
  78. package/graphql/query/shared_edge_connection.js +1 -19
  79. package/graphql/scalars/orderby_direction.d.ts +2 -0
  80. package/graphql/scalars/orderby_direction.js +15 -0
  81. package/imports/index.d.ts +6 -1
  82. package/imports/index.js +19 -4
  83. package/index.d.ts +13 -5
  84. package/index.js +21 -7
  85. package/package.json +17 -16
  86. package/parse_schema/parse.d.ts +31 -9
  87. package/parse_schema/parse.js +152 -12
  88. package/schema/base_schema.d.ts +5 -3
  89. package/schema/base_schema.js +6 -0
  90. package/schema/field.d.ts +78 -21
  91. package/schema/field.js +219 -72
  92. package/schema/index.d.ts +2 -2
  93. package/schema/index.js +5 -1
  94. package/schema/json_field.d.ts +16 -4
  95. package/schema/json_field.js +32 -2
  96. package/schema/schema.d.ts +89 -20
  97. package/schema/schema.js +13 -14
  98. package/schema/struct_field.d.ts +15 -3
  99. package/schema/struct_field.js +71 -22
  100. package/schema/union_field.d.ts +1 -1
  101. package/scripts/custom_compiler.js +10 -6
  102. package/scripts/custom_graphql.js +124 -31
  103. package/scripts/migrate_v0.1.js +36 -0
  104. package/scripts/move_types.js +117 -0
  105. package/scripts/read_schema.js +20 -5
  106. package/testutils/action/complex_schemas.d.ts +69 -0
  107. package/testutils/action/complex_schemas.js +398 -0
  108. package/testutils/builder.d.ts +43 -47
  109. package/testutils/builder.js +76 -49
  110. package/testutils/db/fixture.d.ts +10 -0
  111. package/testutils/db/fixture.js +26 -0
  112. package/testutils/db/{test_db.d.ts → temp_db.d.ts} +24 -8
  113. package/testutils/db/{test_db.js → temp_db.js} +182 -45
  114. package/testutils/db/value.d.ts +7 -0
  115. package/testutils/db/value.js +251 -0
  116. package/testutils/db_mock.d.ts +16 -4
  117. package/testutils/db_mock.js +51 -6
  118. package/testutils/db_time_zone.d.ts +4 -0
  119. package/testutils/db_time_zone.js +41 -0
  120. package/testutils/ent-graphql-tests/index.d.ts +7 -1
  121. package/testutils/ent-graphql-tests/index.js +52 -23
  122. package/testutils/fake_data/const.d.ts +2 -1
  123. package/testutils/fake_data/const.js +3 -0
  124. package/testutils/fake_data/fake_contact.d.ts +8 -4
  125. package/testutils/fake_data/fake_contact.js +15 -8
  126. package/testutils/fake_data/fake_event.d.ts +5 -2
  127. package/testutils/fake_data/fake_event.js +9 -7
  128. package/testutils/fake_data/fake_tag.d.ts +36 -0
  129. package/testutils/fake_data/fake_tag.js +89 -0
  130. package/testutils/fake_data/fake_user.d.ts +10 -7
  131. package/testutils/fake_data/fake_user.js +18 -16
  132. package/testutils/fake_data/index.js +5 -1
  133. package/testutils/fake_data/internal.d.ts +2 -0
  134. package/testutils/fake_data/internal.js +7 -1
  135. package/testutils/fake_data/tag_query.d.ts +13 -0
  136. package/testutils/fake_data/tag_query.js +43 -0
  137. package/testutils/fake_data/test_helpers.d.ts +11 -4
  138. package/testutils/fake_data/test_helpers.js +28 -12
  139. package/testutils/fake_data/user_query.d.ts +13 -6
  140. package/testutils/fake_data/user_query.js +54 -22
  141. package/testutils/fake_log.d.ts +3 -3
  142. package/testutils/parse_sql.d.ts +6 -0
  143. package/testutils/parse_sql.js +16 -2
  144. package/testutils/test_edge_global_schema.d.ts +15 -0
  145. package/testutils/test_edge_global_schema.js +62 -0
  146. package/testutils/write.d.ts +2 -2
  147. package/testutils/write.js +33 -7
  148. package/tsc/ast.d.ts +25 -2
  149. package/tsc/ast.js +141 -17
  150. package/tsc/compilerOptions.js +5 -1
  151. package/tsc/move_generated.d.ts +1 -0
  152. package/tsc/move_generated.js +164 -0
  153. package/tsc/transform.d.ts +22 -0
  154. package/tsc/transform.js +181 -0
  155. package/tsc/transform_action.d.ts +22 -0
  156. package/tsc/transform_action.js +183 -0
  157. package/tsc/transform_ent.d.ts +17 -0
  158. package/tsc/transform_ent.js +60 -0
  159. package/tsc/transform_schema.d.ts +27 -0
  160. package/{scripts → tsc}/transform_schema.js +146 -117
  161. package/graphql/enums.d.ts +0 -3
  162. package/graphql/enums.js +0 -25
  163. package/scripts/move_generated.js +0 -142
  164. package/scripts/transform_code.js +0 -113
  165. package/scripts/transform_schema.d.ts +0 -1
  166. /package/scripts/{move_generated.d.ts → migrate_v0.1.d.ts} +0 -0
  167. /package/scripts/{transform_code.d.ts → move_types.d.ts} +0 -0
package/core/viewer.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ID, Ent, Viewer, Context } from "./base";
2
2
  export declare class LoggedOutViewer implements Viewer {
3
- context?: Context | undefined;
4
- constructor(context?: Context | undefined);
3
+ context?: Context<Viewer<Ent<any> | null, ID | null>> | undefined;
4
+ constructor(context?: Context<Viewer<Ent<any> | null, ID | null>> | undefined);
5
5
  viewerID: null;
6
6
  viewer(): Promise<null>;
7
7
  instanceKey(): string;
@@ -18,6 +18,6 @@ export declare class IDViewer implements Viewer {
18
18
  constructor(viewerID: ID, opts?: Partial<IDViewerOptions>);
19
19
  constructor(opts: IDViewerOptions);
20
20
  setContext(ctx: Context): this;
21
- viewer(): Promise<Ent | null>;
21
+ viewer(): Promise<Ent<Viewer<Ent<any> | null, ID | null>> | null>;
22
22
  instanceKey(): string;
23
23
  }
package/core/viewer.js CHANGED
@@ -35,7 +35,7 @@ class IDViewer {
35
35
  return this.ent;
36
36
  }
37
37
  instanceKey() {
38
- return `idViewer: ${this.viewerID}`;
38
+ return `idViewer:${this.viewerID}`;
39
39
  }
40
40
  }
41
41
  exports.IDViewer = IDViewer;
@@ -3,15 +3,20 @@ import { GraphQLScalarType } from "graphql";
3
3
  interface ClassType<T = any> {
4
4
  new (...args: any[]): T;
5
5
  }
6
+ declare type StringToStringMap = {
7
+ [key: string]: string;
8
+ };
6
9
  export interface CustomType {
7
10
  type: string;
8
11
  importPath: string;
9
12
  tsType?: string;
10
13
  tsImportPath?: string;
14
+ enumMap?: StringToStringMap;
15
+ inputType?: boolean;
11
16
  [x: string]: any;
12
17
  }
13
- declare type Type = GraphQLScalarType | ClassType | string | CustomType;
14
- export declare type GraphQLConnection<T> = {
18
+ type Type = GraphQLScalarType | ClassType | string | CustomType;
19
+ export type GraphQLConnection<T> = {
15
20
  node: T;
16
21
  };
17
22
  export interface gqlFieldOptions {
@@ -24,7 +29,7 @@ export interface gqlObjectOptions {
24
29
  name?: string;
25
30
  description?: string;
26
31
  }
27
- declare type gqlTopLevelOptions = Exclude<gqlFieldOptions, "nullable">;
32
+ type gqlTopLevelOptions = Exclude<gqlFieldOptions, "nullable">;
28
33
  export declare enum CustomFieldType {
29
34
  Accessor = "ACCESSOR",
30
35
  Field = "FIELD",
@@ -42,6 +47,9 @@ interface CustomFieldImpl {
42
47
  export interface CustomField extends CustomFieldImpl {
43
48
  args: Field[];
44
49
  results: Field[];
50
+ extraImports?: any[];
51
+ functionContents?: string;
52
+ edgeName?: string;
45
53
  }
46
54
  export interface CustomMutation extends CustomField {
47
55
  }
@@ -51,15 +59,15 @@ export interface ProcessedCustomField extends CustomFieldImpl {
51
59
  args: ProcessedField[];
52
60
  results: ProcessedField[];
53
61
  }
54
- export declare type ProcessCustomFieldMap = {
55
- [key: string]: ProcessedCustomField;
62
+ export type ProcessCustomFieldMap = {
63
+ [key: string]: ProcessedCustomField[];
56
64
  };
57
65
  export interface CustomObject {
58
66
  nodeName: string;
59
67
  className: string;
60
68
  description?: string;
61
69
  }
62
- declare type NullableListOptions = "contents" | "contentsAndList";
70
+ type NullableListOptions = "contents" | "contentsAndList";
63
71
  interface FieldImpl {
64
72
  type: string;
65
73
  tsType?: string;
@@ -85,7 +93,7 @@ declare enum NullableResult {
85
93
  export declare const knownAllowedNames: Map<string, string>;
86
94
  export declare const knownDisAllowedNames: Map<string, boolean>;
87
95
  export declare const isCustomType: (type: Type) => type is CustomType;
88
- export declare const addCustomType: (type: CustomType) => void;
96
+ export declare const addCustomType: (type: CustomType, gqlCapture: typeof GQLCapture) => void;
89
97
  export declare class GQLCapture {
90
98
  private static enabled;
91
99
  static enable(enabled: boolean): void;
@@ -61,13 +61,15 @@ exports.isCustomType = isCustomType;
61
61
  const isGraphQLScalarType = (type) => {
62
62
  return type.serialize !== undefined;
63
63
  };
64
- const addCustomType = (type) => {
64
+ const addCustomType = (type, gqlCapture) => {
65
65
  // TODO these should return ReadOnly objects...
66
- const customType = GQLCapture.getCustomTypes().get(type.type);
67
- if (customType && customType !== type) {
68
- throw new Error(`cannot add multiple custom types of name ${type.type}`);
66
+ const customTypes = gqlCapture.getCustomTypes();
67
+ const customType = customTypes.get(type.type);
68
+ if (customType && customType === type) {
69
+ return;
69
70
  }
70
- if (customType) {
71
+ if (type.enumMap) {
72
+ customTypes.set(type.type, type);
71
73
  return;
72
74
  }
73
75
  try {
@@ -85,9 +87,21 @@ const addCustomType = (type) => {
85
87
  }
86
88
  }
87
89
  catch (e) {
90
+ if (type.secondaryImportPath) {
91
+ (0, exports.addCustomType)({
92
+ ...type,
93
+ importPath: type.secondaryImportPath,
94
+ }, gqlCapture);
95
+ }
96
+ return;
97
+ }
98
+ if (customType) {
99
+ if (JSON.stringify(customType) !== JSON.stringify(type)) {
100
+ throw new Error(`cannot add multiple custom types of name ${type.type}`);
101
+ }
88
102
  return;
89
103
  }
90
- GQLCapture.getCustomTypes().set(type.type, type);
104
+ customTypes.set(type.type, type);
91
105
  };
92
106
  exports.addCustomType = addCustomType;
93
107
  const getType = (typ, result) => {
@@ -111,7 +125,8 @@ const getType = (typ, result) => {
111
125
  }
112
126
  if ((0, exports.isCustomType)(typ)) {
113
127
  result.type = typ.type;
114
- (0, exports.addCustomType)(typ);
128
+ // TODO???
129
+ (0, exports.addCustomType)(typ, GQLCapture);
115
130
  return;
116
131
  }
117
132
  // GraphQLScalarType or ClassType
@@ -433,6 +448,7 @@ class GQLCapture {
433
448
  this.customInputObjects.forEach((_val, key) => baseArgs.set(key, true));
434
449
  baseArgs.set("Context", true);
435
450
  this.customTypes.forEach((_val, key) => baseArgs.set(key, true));
451
+ // TODO this should be aware of knownCustomTypes
436
452
  const resolveFields = (fields) => {
437
453
  fields.forEach((field) => {
438
454
  // we have a check earlier that *should* make this path impossible
@@ -1,5 +1,6 @@
1
1
  export { gqlFieldOptions, gqlObjectOptions, gqlField, gqlArg, gqlArgType, gqlInputObjectType, gqlObjectType, gqlQuery, gqlMutation, gqlContextType, gqlConnection, GraphQLConnection, GQLCapture, gqlFileUpload, CustomType, } from "./graphql";
2
2
  export { GraphQLTime } from "./scalars/time";
3
+ export { GraphQLOrderByDirection } from "./scalars/orderby_direction";
3
4
  export { GraphQLPageInfo } from "./query/page_info";
4
5
  export { GraphQLEdge, GraphQLEdgeConnection } from "./query/edge_connection";
5
6
  export { GraphQLEdgeType, GraphQLConnectionType, } from "./query/connection_type";
@@ -7,5 +8,4 @@ export { GraphQLNodeInterface } from "./builtins/node";
7
8
  export { GraphQLConnectionInterface } from "./builtins/connection";
8
9
  export { GraphQLEdgeInterface } from "./builtins/edge";
9
10
  export { NodeResolver, EntNodeResolver, registerResolver, clearResolvers, resolveID, nodeIDEncoder, mustDecodeIDFromGQLID, mustDecodeNullableIDFromGQLID, encodeGQLID, } from "./node_resolver";
10
- export { convertFromGQLEnum, convertToGQLEnum } from "./enums";
11
11
  export { transformUnionTypes } from "./mutations/union";
package/graphql/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformUnionTypes = exports.convertToGQLEnum = exports.convertFromGQLEnum = exports.encodeGQLID = exports.mustDecodeNullableIDFromGQLID = exports.mustDecodeIDFromGQLID = exports.nodeIDEncoder = exports.resolveID = exports.clearResolvers = exports.registerResolver = exports.EntNodeResolver = exports.GraphQLEdgeInterface = exports.GraphQLConnectionInterface = exports.GraphQLNodeInterface = exports.GraphQLConnectionType = exports.GraphQLEdgeType = exports.GraphQLEdgeConnection = exports.GraphQLPageInfo = exports.GraphQLTime = exports.gqlFileUpload = exports.GQLCapture = exports.gqlConnection = exports.gqlContextType = exports.gqlMutation = exports.gqlQuery = exports.gqlObjectType = exports.gqlInputObjectType = exports.gqlArgType = exports.gqlArg = exports.gqlField = void 0;
3
+ exports.transformUnionTypes = exports.encodeGQLID = exports.mustDecodeNullableIDFromGQLID = exports.mustDecodeIDFromGQLID = exports.nodeIDEncoder = exports.resolveID = exports.clearResolvers = exports.registerResolver = exports.EntNodeResolver = exports.GraphQLEdgeInterface = exports.GraphQLConnectionInterface = exports.GraphQLNodeInterface = exports.GraphQLConnectionType = exports.GraphQLEdgeType = exports.GraphQLEdgeConnection = exports.GraphQLPageInfo = exports.GraphQLOrderByDirection = exports.GraphQLTime = exports.gqlFileUpload = exports.GQLCapture = exports.gqlConnection = exports.gqlContextType = exports.gqlMutation = exports.gqlQuery = exports.gqlObjectType = exports.gqlInputObjectType = exports.gqlArgType = exports.gqlArg = exports.gqlField = void 0;
4
4
  var graphql_1 = require("./graphql");
5
5
  Object.defineProperty(exports, "gqlField", { enumerable: true, get: function () { return graphql_1.gqlField; } });
6
6
  Object.defineProperty(exports, "gqlArg", { enumerable: true, get: function () { return graphql_1.gqlArg; } });
@@ -15,6 +15,8 @@ Object.defineProperty(exports, "GQLCapture", { enumerable: true, get: function (
15
15
  Object.defineProperty(exports, "gqlFileUpload", { enumerable: true, get: function () { return graphql_1.gqlFileUpload; } });
16
16
  var time_1 = require("./scalars/time");
17
17
  Object.defineProperty(exports, "GraphQLTime", { enumerable: true, get: function () { return time_1.GraphQLTime; } });
18
+ var orderby_direction_1 = require("./scalars/orderby_direction");
19
+ Object.defineProperty(exports, "GraphQLOrderByDirection", { enumerable: true, get: function () { return orderby_direction_1.GraphQLOrderByDirection; } });
18
20
  var page_info_1 = require("./query/page_info");
19
21
  Object.defineProperty(exports, "GraphQLPageInfo", { enumerable: true, get: function () { return page_info_1.GraphQLPageInfo; } });
20
22
  var edge_connection_1 = require("./query/edge_connection");
@@ -37,8 +39,5 @@ Object.defineProperty(exports, "nodeIDEncoder", { enumerable: true, get: functio
37
39
  Object.defineProperty(exports, "mustDecodeIDFromGQLID", { enumerable: true, get: function () { return node_resolver_1.mustDecodeIDFromGQLID; } });
38
40
  Object.defineProperty(exports, "mustDecodeNullableIDFromGQLID", { enumerable: true, get: function () { return node_resolver_1.mustDecodeNullableIDFromGQLID; } });
39
41
  Object.defineProperty(exports, "encodeGQLID", { enumerable: true, get: function () { return node_resolver_1.encodeGQLID; } });
40
- var enums_1 = require("./enums");
41
- Object.defineProperty(exports, "convertFromGQLEnum", { enumerable: true, get: function () { return enums_1.convertFromGQLEnum; } });
42
- Object.defineProperty(exports, "convertToGQLEnum", { enumerable: true, get: function () { return enums_1.convertToGQLEnum; } });
43
42
  var union_1 = require("./mutations/union");
44
43
  Object.defineProperty(exports, "transformUnionTypes", { enumerable: true, get: function () { return union_1.transformUnionTypes; } });
@@ -1,16 +1,16 @@
1
1
  import { GraphQLFieldConfigMap, GraphQLObjectType, GraphQLInterfaceType } from "graphql";
2
2
  import { RequestContext } from "../../core/context";
3
3
  import { GraphQLEdge } from "./edge_connection";
4
- import { Data } from "../../core/base";
5
- declare type nodeType = GraphQLObjectType | GraphQLInterfaceType;
6
- export declare class GraphQLEdgeType<TNode extends nodeType, TEdge extends Data> extends GraphQLObjectType {
7
- constructor(name: string, nodeType: TNode, optionalFields?: () => GraphQLFieldConfigMap<GraphQLEdge<TEdge>, RequestContext>);
4
+ import { Data, Viewer } from "../../core/base";
5
+ type nodeType = GraphQLObjectType | GraphQLInterfaceType;
6
+ export declare class GraphQLEdgeType<TNode extends nodeType, TEdge extends Data, TViewer extends Viewer> extends GraphQLObjectType {
7
+ constructor(name: string, nodeType: TNode, optionalFields?: () => GraphQLFieldConfigMap<GraphQLEdge<TEdge>, RequestContext<TViewer>>);
8
8
  }
9
- interface connectionOptions<T extends Data> {
10
- fields?(): GraphQLFieldConfigMap<GraphQLEdge<T>, RequestContext>;
9
+ interface connectionOptions<T extends Data, TViewer extends Viewer> {
10
+ fields?(): GraphQLFieldConfigMap<GraphQLEdge<T>, RequestContext<TViewer>>;
11
11
  }
12
- export declare class GraphQLConnectionType<TNode extends nodeType, TEdge extends Data> extends GraphQLObjectType {
13
- edgeType: GraphQLEdgeType<TNode, TEdge>;
14
- constructor(name: string, nodeType: TNode, options?: connectionOptions<TEdge>);
12
+ export declare class GraphQLConnectionType<TNode extends nodeType, TEdge extends Data, TViewer extends Viewer> extends GraphQLObjectType {
13
+ edgeType: GraphQLEdgeType<TNode, TEdge, TViewer>;
14
+ constructor(name: string, nodeType: TNode, options?: connectionOptions<TEdge, TViewer>);
15
15
  }
16
16
  export {};
@@ -1,30 +1,30 @@
1
1
  import { EdgeQuery, PaginationInfo } from "../../core/query/query";
2
- import { Data, Ent, Viewer } from "../../core/base";
2
+ import { Data, Ent, ID, Viewer } from "../../core/base";
3
3
  export interface GraphQLEdge<T extends Data> {
4
4
  edge: T;
5
5
  node: Ent;
6
6
  cursor: string;
7
7
  }
8
- interface edgeQueryCtr<T extends Ent, TEdge extends Data> {
9
- (v: Viewer, src: T): EdgeQuery<T, Ent, TEdge>;
8
+ interface edgeQueryCtr<T extends Ent, TEdge extends Data, TViewer extends Viewer> {
9
+ (v: TViewer, src: T): EdgeQuery<T, Ent, TEdge>;
10
10
  }
11
- interface edgeQueryCtr2<T extends Ent, TEdge extends Data> {
12
- (v: Viewer): EdgeQuery<T, Ent, TEdge>;
11
+ interface edgeQueryCtr2<T extends Ent, TEdge extends Data, TViewer extends Viewer> {
12
+ (v: TViewer): EdgeQuery<T, Ent, TEdge>;
13
13
  }
14
- export declare class GraphQLEdgeConnection<TSource extends Ent, TEdge extends Data> {
14
+ export declare class GraphQLEdgeConnection<TSource extends Ent, TEdge extends Data, TViewer extends Viewer = Viewer> {
15
15
  query: EdgeQuery<TSource, Ent, TEdge>;
16
16
  private results;
17
17
  private viewer;
18
18
  private source?;
19
19
  private args?;
20
- constructor(viewer: Viewer, source: TSource, getQuery: edgeQueryCtr<TSource, TEdge>, args?: Data);
21
- constructor(viewer: Viewer, getQuery: edgeQueryCtr2<TSource, TEdge>, args?: Data);
20
+ constructor(viewer: TViewer, source: TSource, getQuery: edgeQueryCtr<TSource, TEdge, TViewer>, args?: Data);
21
+ constructor(viewer: TViewer, getQuery: edgeQueryCtr2<TSource, TEdge, TViewer>, args?: Data);
22
22
  first(limit: number, cursor?: string): void;
23
23
  last(limit: number, cursor?: string): void;
24
24
  modifyQuery(fn: (query: EdgeQuery<TSource, Ent, TEdge>) => EdgeQuery<TSource, Ent, TEdge>): void;
25
25
  queryTotalCount(): Promise<number>;
26
26
  queryEdges(): Promise<GraphQLEdge<TEdge>[]>;
27
- queryNodes(): Promise<Ent[]>;
27
+ queryNodes(): Promise<Ent<Viewer<Ent<any> | null, ID | null>>[]>;
28
28
  private defaultPageInfo;
29
29
  queryPageInfo(): Promise<PaginationInfo>;
30
30
  private queryData;
@@ -1,4 +1,4 @@
1
1
  import { GraphQLObjectType } from "graphql";
2
2
  import { RequestContext } from "../../core/context";
3
3
  import { PaginationInfo } from "../../core/query/query";
4
- export declare const GraphQLPageInfo: GraphQLObjectType<PaginationInfo, RequestContext>;
4
+ export declare const GraphQLPageInfo: GraphQLObjectType<PaginationInfo, RequestContext<import("../..").Viewer<import("../..").Ent<any> | null, import("../..").ID | null>>>;
@@ -139,7 +139,7 @@ function sharedAssocTests() {
139
139
  const conn = new connection_type_1.GraphQLConnectionType("CustomEdge", eventType);
140
140
  const length = (m) => {
141
141
  let count = 0;
142
- for (let k in m) {
142
+ for (let _ in m) {
143
143
  count++;
144
144
  }
145
145
  return count;
@@ -1,14 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.commonTests = void 0;
4
- const pg_1 = require("pg");
5
4
  const viewer_1 = require("../../core/viewer");
6
5
  const ent_1 = require("../../core/ent");
7
- const db_mock_1 = require("../../testutils/db_mock");
8
6
  const edge_connection_1 = require("./edge_connection");
9
7
  const test_helpers_1 = require("../../testutils/fake_data/test_helpers");
10
- jest.mock("pg");
11
- db_mock_1.QueryRecorder.mockPool(pg_1.Pool);
12
8
  class TestConnection {
13
9
  constructor(getQuery, ents, filter) {
14
10
  this.getQuery = getQuery;
@@ -48,23 +44,9 @@ class TestConnection {
48
44
  }
49
45
  const commonTests = (opts) => {
50
46
  function getCursorFrom(contacts, idx) {
51
- // we depend on the fact that the same time is used for the edge and created_at
52
- // based on getContactBuilder
53
- // so regardless of if we're doing assoc or custom queries, we can get the time
54
- // from the created_at field
55
47
  return (0, ent_1.getCursor)({
56
48
  row: contacts[idx],
57
- col: "createdAt",
58
- conv: (t) => {
59
- //sqlite
60
- if (typeof t === "string") {
61
- return Date.parse(t);
62
- }
63
- return t.getTime();
64
- },
65
- // we want the right column to be encoded in the cursor as opposed e.g. time for
66
- // assoc queries, created_at for index/custom queries
67
- cursorKey: opts.sortCol,
49
+ col: "id",
68
50
  });
69
51
  }
70
52
  describe("no filters", () => {
@@ -0,0 +1,2 @@
1
+ import { GraphQLEnumType } from "graphql";
2
+ export declare const GraphQLOrderByDirection: GraphQLEnumType;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GraphQLOrderByDirection = void 0;
4
+ const graphql_1 = require("graphql");
5
+ exports.GraphQLOrderByDirection = new graphql_1.GraphQLEnumType({
6
+ name: "OrderByDirection",
7
+ values: {
8
+ ASC: {
9
+ value: "asc",
10
+ },
11
+ DESC: {
12
+ value: "desc",
13
+ },
14
+ },
15
+ });
@@ -1,5 +1,6 @@
1
1
  export interface Options {
2
2
  filter?: (file: string, index: number, array: string[]) => boolean;
3
+ justCurrentDir?: boolean;
3
4
  ignore?: string | Readonly<string[]> | undefined;
4
5
  }
5
6
  export interface PathResult {
@@ -10,7 +11,11 @@ interface classResult {
10
11
  class: classInfo;
11
12
  file: file;
12
13
  }
13
- export declare function parseCustomImports(filePath: string, opts?: Options): PathResult;
14
+ interface ParseInput {
15
+ root: string;
16
+ opts?: Options;
17
+ }
18
+ export declare function parseCustomImports(filePath: string, inputs: ParseInput[]): PathResult;
14
19
  export interface importInfo {
15
20
  name: string;
16
21
  importPath: string;
package/imports/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -34,7 +38,11 @@ function getFiles(filePath, opts) {
34
38
  }
35
39
  // graphql path should be passed to this
36
40
  // this is more agnostic about what it expect here
37
- let files = glob_1.default.sync(`${filePath}/**/*.ts`, {
41
+ let pattern = `${filePath}/**/*.ts`;
42
+ if (opts?.justCurrentDir) {
43
+ pattern = `${filePath}/**.ts`;
44
+ }
45
+ let files = glob_1.default.sync(pattern, {
38
46
  ignore: opts?.ignore,
39
47
  });
40
48
  if (opts?.filter) {
@@ -42,8 +50,15 @@ function getFiles(filePath, opts) {
42
50
  }
43
51
  return files;
44
52
  }
45
- function parseCustomImports(filePath, opts) {
46
- const files = getFiles(filePath, opts);
53
+ function parseCustomImports(filePath, inputs) {
54
+ const files = [];
55
+ // simplifies tests and other simple callsites
56
+ if (inputs.length === 0) {
57
+ inputs.push({ root: filePath });
58
+ }
59
+ for (const input of inputs) {
60
+ files.push(...getFiles(input.root, input.opts));
61
+ }
47
62
  const options = (0, compilerOptions_1.readCompilerOptions)(filePath);
48
63
  let classMap = new Map();
49
64
  files.forEach((file) => {
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./core/base";
2
- export { loadEnt, loadCustomData, loadCustomEnts, loadEntX, loadEnts, CustomQuery, loadDerivedEnt, loadDerivedEntX, loadEntViaKey, loadEntXViaKey, performRawQuery, loadRowX, loadRow, loadRows, DataOperation, EditNodeOptions, EditNodeOperation, EdgeOperation, DeleteNodeOperation, AssocEdge, AssocEdgeInputOptions, AssocEdgeInput, AssocEdgeData, loadEdgeData, loadEdgeDatas, loadEdges, loadUniqueEdge, loadUniqueNode, loadRawEdgeCountX, loadEdgeForID2, loadNodesByEdge, getEdgeTypeInGroup, } from "./core/ent";
2
+ export { loadEnt, loadCustomData, loadCustomEnts, loadCustomCount, loadEntX, loadEnts, CustomQuery, loadDerivedEnt, loadDerivedEntX, loadEntViaKey, loadEntXViaKey, performRawQuery, loadRowX, loadRow, loadRows, DataOperation, EditNodeOptions, EditNodeOperation, RawQueryOperation, EdgeOperation, DeleteNodeOperation, AssocEdge, AssocEdgeInputOptions, AssocEdgeInput, AssocEdgeData, loadEdgeData, loadEdgeDatas, loadEdges, loadUniqueEdge, loadUniqueNode, loadRawEdgeCountX, loadEdgeForID2, loadNodesByEdge, getEdgeTypeInGroup, } from "./core/ent";
3
+ export { setGlobalSchema } from "./core/global_schema";
3
4
  import DB from "./core/db";
4
5
  export * from "./core/loaders";
5
6
  export { DB };
@@ -7,12 +8,14 @@ export { EntPrivacyError, AlwaysAllowRule, AlwaysDenyRule, DenyIfLoggedInRule, D
7
8
  export * from "./core/query";
8
9
  export * from "./schema/";
9
10
  import * as q from "./core/clause";
11
+ export { Clause } from "./core/clause";
10
12
  declare const query: {
11
13
  Eq: typeof q.Eq;
12
14
  NotEq: typeof q.NotEq;
13
15
  And: typeof q.And;
14
16
  AndOptional: typeof q.AndOptional;
15
17
  Or: typeof q.Or;
18
+ OrOptional: typeof q.OrOptional;
16
19
  In: typeof q.In;
17
20
  Greater: typeof q.Greater;
18
21
  Less: typeof q.Less;
@@ -20,10 +23,15 @@ declare const query: {
20
23
  LessEq: typeof q.LessEq;
21
24
  ArrayEq: typeof q.ArrayEq;
22
25
  ArrayNotEq: typeof q.ArrayNotEq;
23
- ArrayGreater: typeof q.ArrayGreater;
24
- ArrayLess: typeof q.ArrayLess;
25
- ArrayGreaterEq: typeof q.ArrayGreaterEq;
26
- ArrayLessEq: typeof q.ArrayLessEq;
26
+ PostgresArrayContainsValue: typeof q.PostgresArrayContainsValue;
27
+ PostgresArrayContains: typeof q.PostgresArrayContains;
28
+ PostgresArrayNotContainsValue: typeof q.PostgresArrayNotContainsValue;
29
+ PostgresArrayNotContains: typeof q.PostgresArrayNotContains;
30
+ PostgresArrayOverlaps: typeof q.PostgresArrayOverlaps;
31
+ PostgresArrayNotOverlaps: typeof q.PostgresArrayNotOverlaps;
32
+ JSONPathValuePredicate: typeof q.JSONPathValuePredicate;
33
+ JSONObjectFieldKeyASJSON: typeof q.JSONObjectFieldKeyASJSON;
34
+ JSONObjectFieldKeyAsText: typeof q.JSONObjectFieldKeyAsText;
27
35
  TsQuery: typeof q.TsQuery;
28
36
  PlainToTsQuery: typeof q.PlainToTsQuery;
29
37
  PhraseToTsQuery: typeof q.PhraseToTsQuery;
package/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -25,13 +29,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
29
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
30
  };
27
31
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.DenyIfViewerInboundEdgeDoesNotExistRule = exports.DenyIfEdgeDoesNotExistRule = exports.DenyIfViewerOutboundEdgeExistsRule = exports.DenyIfViewerInboundEdgeExistsRule = exports.DenyIfEdgeExistsRule = exports.AllowIfViewerOutboundEdgeExistsRule = exports.AllowIfViewerInboundEdgeExistsRule = exports.AllowIfEdgeExistsRule = exports.DenyIfViewerEqualsRule = exports.AllowIfViewerEqualsRule = exports.DenyIfEntPropertyIsRule = exports.AllowIfEntPropertyIsRule = exports.AllowIfViewerIsEntPropertyRule = exports.AllowIfViewerIsRule = exports.AllowIfFuncRule = exports.AllowIfViewerRule = exports.AllowIfHasIdentity = exports.DenyIfLoggedOutRule = exports.DenyIfLoggedInRule = exports.AlwaysDenyRule = exports.AlwaysAllowRule = exports.EntPrivacyError = exports.DB = exports.getEdgeTypeInGroup = exports.loadNodesByEdge = exports.loadEdgeForID2 = exports.loadRawEdgeCountX = exports.loadUniqueNode = exports.loadUniqueEdge = exports.loadEdges = exports.loadEdgeDatas = exports.loadEdgeData = exports.AssocEdgeData = exports.AssocEdge = exports.DeleteNodeOperation = exports.EdgeOperation = exports.EditNodeOperation = exports.loadRows = exports.loadRow = exports.loadRowX = exports.performRawQuery = exports.loadEntXViaKey = exports.loadEntViaKey = exports.loadDerivedEntX = exports.loadDerivedEnt = exports.loadEnts = exports.loadEntX = exports.loadCustomEnts = exports.loadCustomData = exports.loadEnt = void 0;
29
- exports.setLogLevels = exports.loadConfig = exports.LoggedOutViewer = exports.IDViewer = exports.ContextCache = exports.query = exports.AllowIfViewerHasIdentityPrivacyPolicy = exports.AllowIfViewerPrivacyPolicy = exports.AllowIfSubPolicyAllowsRule = exports.AllowIfConditionAppliesRule = exports.AlwaysDenyPrivacyPolicy = exports.AlwaysAllowPrivacyPolicy = exports.applyPrivacyPolicyX = exports.applyPrivacyPolicy = exports.DelayedResultRule = exports.DenyIfEntIsVisiblePolicy = exports.AllowIfEntIsVisiblePolicy = exports.DenyIfEntIsNotVisibleRule = exports.DenyIfEntIsVisibleRule = exports.AllowIfEntIsNotVisibleRule = exports.AllowIfEntIsVisibleRule = exports.DenyIfViewerOutboundEdgeDoesNotExistRule = void 0;
32
+ exports.DenyIfViewerInboundEdgeExistsRule = exports.DenyIfEdgeExistsRule = exports.AllowIfViewerOutboundEdgeExistsRule = exports.AllowIfViewerInboundEdgeExistsRule = exports.AllowIfEdgeExistsRule = exports.DenyIfViewerEqualsRule = exports.AllowIfViewerEqualsRule = exports.DenyIfEntPropertyIsRule = exports.AllowIfEntPropertyIsRule = exports.AllowIfViewerIsEntPropertyRule = exports.AllowIfViewerIsRule = exports.AllowIfFuncRule = exports.AllowIfViewerRule = exports.AllowIfHasIdentity = exports.DenyIfLoggedOutRule = exports.DenyIfLoggedInRule = exports.AlwaysDenyRule = exports.AlwaysAllowRule = exports.EntPrivacyError = exports.DB = exports.setGlobalSchema = exports.getEdgeTypeInGroup = exports.loadNodesByEdge = exports.loadEdgeForID2 = exports.loadRawEdgeCountX = exports.loadUniqueNode = exports.loadUniqueEdge = exports.loadEdges = exports.loadEdgeDatas = exports.loadEdgeData = exports.AssocEdgeData = exports.AssocEdge = exports.DeleteNodeOperation = exports.EdgeOperation = exports.RawQueryOperation = exports.EditNodeOperation = exports.loadRows = exports.loadRow = exports.loadRowX = exports.performRawQuery = exports.loadEntXViaKey = exports.loadEntViaKey = exports.loadDerivedEntX = exports.loadDerivedEnt = exports.loadEnts = exports.loadEntX = exports.loadCustomCount = exports.loadCustomEnts = exports.loadCustomData = exports.loadEnt = void 0;
33
+ exports.setLogLevels = exports.loadConfig = exports.LoggedOutViewer = exports.IDViewer = exports.ContextCache = exports.query = exports.AllowIfViewerHasIdentityPrivacyPolicy = exports.AllowIfViewerPrivacyPolicy = exports.AllowIfSubPolicyAllowsRule = exports.AllowIfConditionAppliesRule = exports.AlwaysDenyPrivacyPolicy = exports.AlwaysAllowPrivacyPolicy = exports.applyPrivacyPolicyX = exports.applyPrivacyPolicy = exports.DelayedResultRule = exports.DenyIfEntIsVisiblePolicy = exports.AllowIfEntIsVisiblePolicy = exports.DenyIfEntIsNotVisibleRule = exports.DenyIfEntIsVisibleRule = exports.AllowIfEntIsNotVisibleRule = exports.AllowIfEntIsVisibleRule = exports.DenyIfViewerOutboundEdgeDoesNotExistRule = exports.DenyIfViewerInboundEdgeDoesNotExistRule = exports.DenyIfEdgeDoesNotExistRule = exports.DenyIfViewerOutboundEdgeExistsRule = void 0;
30
34
  __exportStar(require("./core/base"), exports);
31
35
  var ent_1 = require("./core/ent");
32
36
  Object.defineProperty(exports, "loadEnt", { enumerable: true, get: function () { return ent_1.loadEnt; } });
33
37
  Object.defineProperty(exports, "loadCustomData", { enumerable: true, get: function () { return ent_1.loadCustomData; } });
34
38
  Object.defineProperty(exports, "loadCustomEnts", { enumerable: true, get: function () { return ent_1.loadCustomEnts; } });
39
+ Object.defineProperty(exports, "loadCustomCount", { enumerable: true, get: function () { return ent_1.loadCustomCount; } });
35
40
  Object.defineProperty(exports, "loadEntX", { enumerable: true, get: function () { return ent_1.loadEntX; } });
36
41
  Object.defineProperty(exports, "loadEnts", { enumerable: true, get: function () { return ent_1.loadEnts; } });
37
42
  Object.defineProperty(exports, "loadDerivedEnt", { enumerable: true, get: function () { return ent_1.loadDerivedEnt; } });
@@ -44,6 +49,7 @@ Object.defineProperty(exports, "loadRowX", { enumerable: true, get: function ()
44
49
  Object.defineProperty(exports, "loadRow", { enumerable: true, get: function () { return ent_1.loadRow; } });
45
50
  Object.defineProperty(exports, "loadRows", { enumerable: true, get: function () { return ent_1.loadRows; } });
46
51
  Object.defineProperty(exports, "EditNodeOperation", { enumerable: true, get: function () { return ent_1.EditNodeOperation; } });
52
+ Object.defineProperty(exports, "RawQueryOperation", { enumerable: true, get: function () { return ent_1.RawQueryOperation; } });
47
53
  Object.defineProperty(exports, "EdgeOperation", { enumerable: true, get: function () { return ent_1.EdgeOperation; } });
48
54
  Object.defineProperty(exports, "DeleteNodeOperation", { enumerable: true, get: function () { return ent_1.DeleteNodeOperation; } });
49
55
  Object.defineProperty(exports, "AssocEdge", { enumerable: true, get: function () { return ent_1.AssocEdge; } });
@@ -57,6 +63,8 @@ Object.defineProperty(exports, "loadRawEdgeCountX", { enumerable: true, get: fun
57
63
  Object.defineProperty(exports, "loadEdgeForID2", { enumerable: true, get: function () { return ent_1.loadEdgeForID2; } });
58
64
  Object.defineProperty(exports, "loadNodesByEdge", { enumerable: true, get: function () { return ent_1.loadNodesByEdge; } });
59
65
  Object.defineProperty(exports, "getEdgeTypeInGroup", { enumerable: true, get: function () { return ent_1.getEdgeTypeInGroup; } });
66
+ var global_schema_1 = require("./core/global_schema");
67
+ Object.defineProperty(exports, "setGlobalSchema", { enumerable: true, get: function () { return global_schema_1.setGlobalSchema; } });
60
68
  const db_1 = __importDefault(require("./core/db"));
61
69
  exports.DB = db_1.default;
62
70
  __exportStar(require("./core/loaders"), exports);
@@ -109,6 +117,7 @@ const query = {
109
117
  And: q.And,
110
118
  AndOptional: q.AndOptional,
111
119
  Or: q.Or,
120
+ OrOptional: q.OrOptional,
112
121
  In: q.In,
113
122
  Greater: q.Greater,
114
123
  Less: q.Less,
@@ -116,10 +125,15 @@ const query = {
116
125
  LessEq: q.LessEq,
117
126
  ArrayEq: q.ArrayEq,
118
127
  ArrayNotEq: q.ArrayNotEq,
119
- ArrayGreater: q.ArrayGreater,
120
- ArrayLess: q.ArrayLess,
121
- ArrayGreaterEq: q.ArrayGreaterEq,
122
- ArrayLessEq: q.ArrayLessEq,
128
+ PostgresArrayContainsValue: q.PostgresArrayContainsValue,
129
+ PostgresArrayContains: q.PostgresArrayContains,
130
+ PostgresArrayNotContainsValue: q.PostgresArrayNotContainsValue,
131
+ PostgresArrayNotContains: q.PostgresArrayNotContains,
132
+ PostgresArrayOverlaps: q.PostgresArrayOverlaps,
133
+ PostgresArrayNotOverlaps: q.PostgresArrayNotOverlaps,
134
+ JSONPathValuePredicate: q.JSONPathValuePredicate,
135
+ JSONObjectFieldKeyASJSON: q.JSONObjectFieldKeyASJSON,
136
+ JSONObjectFieldKeyAsText: q.JSONObjectFieldKeyAsText,
123
137
  TsQuery: q.TsQuery,
124
138
  PlainToTsQuery: q.PlainToTsQuery,
125
139
  PhraseToTsQuery: q.PhraseToTsQuery,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowtop/ent",
3
- "version": "0.1.0-alpha12",
3
+ "version": "0.1.0-alpha121",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -8,26 +8,27 @@
8
8
  "example": "examples"
9
9
  },
10
10
  "dependencies": {
11
- "@types/node": "^15.0.2",
11
+ "@types/node": "^18.11.18",
12
12
  "camel-case": "^4.1.2",
13
- "dataloader": "^2.0.0",
14
- "glob": "^7.1.6",
15
- "graph-data-structure": "^1.12.0",
13
+ "cosmiconfig": "^8.0.0",
14
+ "dataloader": "^2.1.0",
15
+ "glob": "^8.0.3",
16
+ "graph-data-structure": "^2.0.0",
16
17
  "js-yaml": "^4.1.0",
17
- "json5": "^2.1.3",
18
- "luxon": "^1.25.0",
18
+ "json5": "^2.2.2",
19
+ "luxon": "^3.1.1",
19
20
  "memoizee": "^0.4.15",
20
- "minimist": "^1.2.6",
21
+ "minimist": "^1.2.7",
21
22
  "pascal-case": "^3.1.2",
22
- "pg": "^8.0.3",
23
- "prettier": "^2.3.2",
23
+ "pg": "^8.8.0",
24
+ "prettier": "^2.8.1",
24
25
  "reflect-metadata": "^0.1.13",
25
- "snake-case": "^3.0.3",
26
- "ts-node": "^10.2.1",
27
- "tsconfig-paths": "^3.11.0",
28
- "tslib": "^2.3.1",
29
- "typescript": "^4.4.2",
30
- "uuid": "^8.3.2"
26
+ "snake-case": "^3.0.4",
27
+ "ts-node": "^10.9.1",
28
+ "tsconfig-paths": "^4.1.1",
29
+ "tslib": "^2.4.1",
30
+ "typescript": "^4.9.4",
31
+ "uuid": "^9.0.0"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "better-sqlite3": "^7.4.1",