cruddl 3.3.1 → 3.3.2

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 (331) hide show
  1. package/dist/src/cruddl-version.js +1 -1
  2. package/dist/src/meta-schema/meta-schema.js +19 -17
  3. package/dist/src/meta-schema/meta-schema.js.map +1 -1
  4. package/package.json +1 -1
  5. package/dist/spec/authorization/move-errors-to-output-nodes.spec.d.ts +0 -1
  6. package/dist/spec/authorization/move-errors-to-output-nodes.spec.js +0 -111
  7. package/dist/spec/authorization/move-errors-to-output-nodes.spec.js.map +0 -1
  8. package/dist/spec/authorization/permission-descriptor.spec.d.ts +0 -1
  9. package/dist/spec/authorization/permission-descriptor.spec.js +0 -85
  10. package/dist/spec/authorization/permission-descriptor.spec.js.map +0 -1
  11. package/dist/spec/authorization/permission-profile.spec.d.ts +0 -1
  12. package/dist/spec/authorization/permission-profile.spec.js +0 -110
  13. package/dist/spec/authorization/permission-profile.spec.js.map +0 -1
  14. package/dist/spec/database/arangodb/aql-generator.spec.d.ts +0 -1
  15. package/dist/spec/database/arangodb/aql-generator.spec.js +0 -21
  16. package/dist/spec/database/arangodb/aql-generator.spec.js.map +0 -1
  17. package/dist/spec/database/arangodb/aql.spec.d.ts +0 -1
  18. package/dist/spec/database/arangodb/aql.spec.js +0 -78
  19. package/dist/spec/database/arangodb/aql.spec.js.map +0 -1
  20. package/dist/spec/database/arangodb/arangodb-adapter.spec.d.ts +0 -1
  21. package/dist/spec/database/arangodb/arangodb-adapter.spec.js +0 -192
  22. package/dist/spec/database/arangodb/arangodb-adapter.spec.js.map +0 -1
  23. package/dist/spec/database/arangodb/arangodb-test-utils.d.ts +0 -1
  24. package/dist/spec/database/arangodb/arangodb-test-utils.js +0 -8
  25. package/dist/spec/database/arangodb/arangodb-test-utils.js.map +0 -1
  26. package/dist/spec/database/arangodb/retry.spec.d.ts +0 -1
  27. package/dist/spec/database/arangodb/retry.spec.js +0 -74
  28. package/dist/spec/database/arangodb/retry.spec.js.map +0 -1
  29. package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.d.ts +0 -1
  30. package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.js +0 -76
  31. package/dist/spec/database/arangodb/schema-migration/arango-search-helper.spec.js.map +0 -1
  32. package/dist/spec/database/arangodb/ttl.spec.d.ts +0 -1
  33. package/dist/spec/database/arangodb/ttl.spec.js +0 -346
  34. package/dist/spec/database/arangodb/ttl.spec.js.map +0 -1
  35. package/dist/spec/database/like-helper.spec.d.ts +0 -1
  36. package/dist/spec/database/like-helper.spec.js +0 -87
  37. package/dist/spec/database/like-helper.spec.js.map +0 -1
  38. package/dist/spec/dev/fast-server.d.ts +0 -4
  39. package/dist/spec/dev/fast-server.js +0 -57
  40. package/dist/spec/dev/fast-server.js.map +0 -1
  41. package/dist/spec/dev/server.d.ts +0 -12
  42. package/dist/spec/dev/server.js +0 -121
  43. package/dist/spec/dev/server.js.map +0 -1
  44. package/dist/spec/dev/start.d.ts +0 -1
  45. package/dist/spec/dev/start.js +0 -10
  46. package/dist/spec/dev/start.js.map +0 -1
  47. package/dist/spec/graphql/query-distiller.spec.d.ts +0 -1
  48. package/dist/spec/graphql/query-distiller.spec.js +0 -220
  49. package/dist/spec/graphql/query-distiller.spec.js.map +0 -1
  50. package/dist/spec/helpers/log4js-logger-provider.d.ts +0 -11
  51. package/dist/spec/helpers/log4js-logger-provider.js +0 -18
  52. package/dist/spec/helpers/log4js-logger-provider.js.map +0 -1
  53. package/dist/spec/init.mocha.d.ts +0 -1
  54. package/dist/spec/init.mocha.js +0 -11
  55. package/dist/spec/init.mocha.js.map +0 -1
  56. package/dist/spec/meta-schema/meta-schema.spec.d.ts +0 -1
  57. package/dist/spec/meta-schema/meta-schema.spec.js +0 -951
  58. package/dist/spec/meta-schema/meta-schema.spec.js.map +0 -1
  59. package/dist/spec/model/create-model.spec.d.ts +0 -1
  60. package/dist/spec/model/create-model.spec.js +0 -158
  61. package/dist/spec/model/create-model.spec.js.map +0 -1
  62. package/dist/spec/model/implementation/billing-validation.spec.d.ts +0 -1
  63. package/dist/spec/model/implementation/billing-validation.spec.js +0 -180
  64. package/dist/spec/model/implementation/billing-validation.spec.js.map +0 -1
  65. package/dist/spec/model/implementation/collect-path.spec.d.ts +0 -1
  66. package/dist/spec/model/implementation/collect-path.spec.js +0 -678
  67. package/dist/spec/model/implementation/collect-path.spec.js.map +0 -1
  68. package/dist/spec/model/implementation/entity-extenion-type.spec.d.ts +0 -1
  69. package/dist/spec/model/implementation/entity-extenion-type.spec.js +0 -71
  70. package/dist/spec/model/implementation/entity-extenion-type.spec.js.map +0 -1
  71. package/dist/spec/model/implementation/field.spec.d.ts +0 -1
  72. package/dist/spec/model/implementation/field.spec.js +0 -648
  73. package/dist/spec/model/implementation/field.spec.js.map +0 -1
  74. package/dist/spec/model/implementation/flex-search-validation.spec.d.ts +0 -1
  75. package/dist/spec/model/implementation/flex-search-validation.spec.js +0 -288
  76. package/dist/spec/model/implementation/flex-search-validation.spec.js.map +0 -1
  77. package/dist/spec/model/implementation/i18n-fields.spec.d.ts +0 -1
  78. package/dist/spec/model/implementation/i18n-fields.spec.js +0 -208
  79. package/dist/spec/model/implementation/i18n-fields.spec.js.map +0 -1
  80. package/dist/spec/model/implementation/i18n-types.spec.d.ts +0 -1
  81. package/dist/spec/model/implementation/i18n-types.spec.js +0 -160
  82. package/dist/spec/model/implementation/i18n-types.spec.js.map +0 -1
  83. package/dist/spec/model/implementation/i18n-validation.spec.d.ts +0 -1
  84. package/dist/spec/model/implementation/i18n-validation.spec.js +0 -210
  85. package/dist/spec/model/implementation/i18n-validation.spec.js.map +0 -1
  86. package/dist/spec/model/implementation/indices.spec.d.ts +0 -1
  87. package/dist/spec/model/implementation/indices.spec.js +0 -96
  88. package/dist/spec/model/implementation/indices.spec.js.map +0 -1
  89. package/dist/spec/model/implementation/model.spec.d.ts +0 -1
  90. package/dist/spec/model/implementation/model.spec.js +0 -101
  91. package/dist/spec/model/implementation/model.spec.js.map +0 -1
  92. package/dist/spec/model/implementation/namespace.spec.d.ts +0 -1
  93. package/dist/spec/model/implementation/namespace.spec.js +0 -231
  94. package/dist/spec/model/implementation/namespace.spec.js.map +0 -1
  95. package/dist/spec/model/implementation/object-type.spec.d.ts +0 -1
  96. package/dist/spec/model/implementation/object-type.spec.js +0 -65
  97. package/dist/spec/model/implementation/object-type.spec.js.map +0 -1
  98. package/dist/spec/model/implementation/relation.spec.d.ts +0 -1
  99. package/dist/spec/model/implementation/relation.spec.js +0 -99
  100. package/dist/spec/model/implementation/relation.spec.js.map +0 -1
  101. package/dist/spec/model/implementation/root-entity-type.spec.d.ts +0 -1
  102. package/dist/spec/model/implementation/root-entity-type.spec.js +0 -470
  103. package/dist/spec/model/implementation/root-entity-type.spec.js.map +0 -1
  104. package/dist/spec/model/implementation/type.spec.d.ts +0 -1
  105. package/dist/spec/model/implementation/type.spec.js +0 -52
  106. package/dist/spec/model/implementation/type.spec.js.map +0 -1
  107. package/dist/spec/model/implementation/validation-utils.d.ts +0 -7
  108. package/dist/spec/model/implementation/validation-utils.js +0 -34
  109. package/dist/spec/model/implementation/validation-utils.js.map +0 -1
  110. package/dist/spec/model/model-spec.helper.d.ts +0 -3
  111. package/dist/spec/model/model-spec.helper.js +0 -35
  112. package/dist/spec/model/model-spec.helper.js.map +0 -1
  113. package/dist/spec/performance/associations.perf.d.ts +0 -3
  114. package/dist/spec/performance/associations.perf.js +0 -78
  115. package/dist/spec/performance/associations.perf.js.map +0 -1
  116. package/dist/spec/performance/count.perf.d.ts +0 -5
  117. package/dist/spec/performance/count.perf.js +0 -52
  118. package/dist/spec/performance/count.perf.js.map +0 -1
  119. package/dist/spec/performance/crud.perf.d.ts +0 -3
  120. package/dist/spec/performance/crud.perf.js +0 -100
  121. package/dist/spec/performance/crud.perf.js.map +0 -1
  122. package/dist/spec/performance/filter.perf.d.ts +0 -3
  123. package/dist/spec/performance/filter.perf.js +0 -32
  124. package/dist/spec/performance/filter.perf.js.map +0 -1
  125. package/dist/spec/performance/index.d.ts +0 -1
  126. package/dist/spec/performance/index.js +0 -21
  127. package/dist/spec/performance/index.js.map +0 -1
  128. package/dist/spec/performance/pagination.perf.d.ts +0 -5
  129. package/dist/spec/performance/pagination.perf.js +0 -50
  130. package/dist/spec/performance/pagination.perf.js.map +0 -1
  131. package/dist/spec/performance/query-pipeline.perf.d.ts +0 -3
  132. package/dist/spec/performance/query-pipeline.perf.js +0 -196
  133. package/dist/spec/performance/query-pipeline.perf.js.map +0 -1
  134. package/dist/spec/performance/references.perf.d.ts +0 -3
  135. package/dist/spec/performance/references.perf.js +0 -62
  136. package/dist/spec/performance/references.perf.js.map +0 -1
  137. package/dist/spec/performance/support/async-bench.d.ts +0 -92
  138. package/dist/spec/performance/support/async-bench.js +0 -237
  139. package/dist/spec/performance/support/async-bench.js.map +0 -1
  140. package/dist/spec/performance/support/helpers.d.ts +0 -28
  141. package/dist/spec/performance/support/helpers.js +0 -130
  142. package/dist/spec/performance/support/helpers.js.map +0 -1
  143. package/dist/spec/performance/support/runner.d.ts +0 -2
  144. package/dist/spec/performance/support/runner.js +0 -72
  145. package/dist/spec/performance/support/runner.js.map +0 -1
  146. package/dist/spec/project/project.spec.d.ts +0 -1
  147. package/dist/spec/project/project.spec.js +0 -72
  148. package/dist/spec/project/project.spec.js.map +0 -1
  149. package/dist/spec/query-tree/utils/simplify-booleans.spec.d.ts +0 -1
  150. package/dist/spec/query-tree/utils/simplify-booleans.spec.js +0 -87
  151. package/dist/spec/query-tree/utils/simplify-booleans.spec.js.map +0 -1
  152. package/dist/spec/regression/drop-test-db.d.ts +0 -1
  153. package/dist/spec/regression/drop-test-db.js +0 -5
  154. package/dist/spec/regression/drop-test-db.js.map +0 -1
  155. package/dist/spec/regression/initialization.d.ts +0 -10
  156. package/dist/spec/regression/initialization.js +0 -148
  157. package/dist/spec/regression/initialization.js.map +0 -1
  158. package/dist/spec/regression/regression-suite.d.ts +0 -28
  159. package/dist/spec/regression/regression-suite.js +0 -228
  160. package/dist/spec/regression/regression-suite.js.map +0 -1
  161. package/dist/spec/regression/regressions.spec.d.ts +0 -1
  162. package/dist/spec/regression/regressions.spec.js +0 -54
  163. package/dist/spec/regression/regressions.spec.js.map +0 -1
  164. package/dist/spec/schema/ast-validation-modules/business-object.spec.d.ts +0 -1
  165. package/dist/spec/schema/ast-validation-modules/business-object.spec.js +0 -27
  166. package/dist/spec/schema/ast-validation-modules/business-object.spec.js.map +0 -1
  167. package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.d.ts +0 -1
  168. package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.js +0 -73
  169. package/dist/spec/schema/ast-validation-modules/check-directed-relation-edges-validator.spec.js.map +0 -1
  170. package/dist/spec/schema/ast-validation-modules/collect-validation.spec.d.ts +0 -1
  171. package/dist/spec/schema/ast-validation-modules/collect-validation.spec.js +0 -633
  172. package/dist/spec/schema/ast-validation-modules/collect-validation.spec.js.map +0 -1
  173. package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.d.ts +0 -1
  174. package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.js +0 -94
  175. package/dist/spec/schema/ast-validation-modules/entity-directive-nesting-validator.spec.js.map +0 -1
  176. package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.d.ts +0 -1
  177. package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.js +0 -235
  178. package/dist/spec/schema/ast-validation-modules/flex-search-commit-interval-msec-validator.spec.js.map +0 -1
  179. package/dist/spec/schema/ast-validation-modules/helpers.d.ts +0 -10
  180. package/dist/spec/schema/ast-validation-modules/helpers.js +0 -85
  181. package/dist/spec/schema/ast-validation-modules/helpers.js.map +0 -1
  182. package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.d.ts +0 -1
  183. package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.js +0 -24
  184. package/dist/spec/schema/ast-validation-modules/illegal-enum-values.spec.js.map +0 -1
  185. package/dist/spec/schema/ast-validation-modules/indices-validator.spec.d.ts +0 -1
  186. package/dist/spec/schema/ast-validation-modules/indices-validator.spec.js +0 -117
  187. package/dist/spec/schema/ast-validation-modules/indices-validator.spec.js.map +0 -1
  188. package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.d.ts +0 -1
  189. package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.js +0 -139
  190. package/dist/spec/schema/ast-validation-modules/key-field-validator.spec.js.map +0 -1
  191. package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.d.ts +0 -1
  192. package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.js +0 -27
  193. package/dist/spec/schema/ast-validation-modules/known-field-directive-validator.spec.js.map +0 -1
  194. package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.d.ts +0 -1
  195. package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.js +0 -31
  196. package/dist/spec/schema/ast-validation-modules/known-object-type-directive-validator.spec.js.map +0 -1
  197. package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.d.ts +0 -1
  198. package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.js +0 -32
  199. package/dist/spec/schema/ast-validation-modules/no-duplicate-types-validator.spec.js.map +0 -1
  200. package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.d.ts +0 -1
  201. package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.js +0 -27
  202. package/dist/spec/schema/ast-validation-modules/no-lists-of-lists-validator.spec.js.map +0 -1
  203. package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.d.ts +0 -1
  204. package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.js +0 -27
  205. package/dist/spec/schema/ast-validation-modules/no-lists-of-references-validator.spec.js.map +0 -1
  206. package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.d.ts +0 -1
  207. package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.js +0 -27
  208. package/dist/spec/schema/ast-validation-modules/no-unused-non-root-object-types-validator.spec.js.map +0 -1
  209. package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.d.ts +0 -1
  210. package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.js +0 -29
  211. package/dist/spec/schema/ast-validation-modules/non-unique-fields-validator.spec.js.map +0 -1
  212. package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.d.ts +0 -1
  213. package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.js +0 -53
  214. package/dist/spec/schema/ast-validation-modules/object-directive-count-validator.spec.js.map +0 -1
  215. package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.d.ts +0 -1
  216. package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.js +0 -30
  217. package/dist/spec/schema/ast-validation-modules/only-allowed-types-validator.spec.js.map +0 -1
  218. package/dist/spec/schema/ast-validation-modules/parent-field.spec.d.ts +0 -1
  219. package/dist/spec/schema/ast-validation-modules/parent-field.spec.js +0 -451
  220. package/dist/spec/schema/ast-validation-modules/parent-field.spec.js.map +0 -1
  221. package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.d.ts +0 -1
  222. package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.js +0 -40
  223. package/dist/spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.js.map +0 -1
  224. package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.d.ts +0 -1
  225. package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.js +0 -74
  226. package/dist/spec/schema/ast-validation-modules/references-with-key-field.spec.js.map +0 -1
  227. package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.d.ts +0 -1
  228. package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.js +0 -26
  229. package/dist/spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.js.map +0 -1
  230. package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.d.ts +0 -1
  231. package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.js +0 -26
  232. package/dist/spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.js.map +0 -1
  233. package/dist/spec/schema/ast-validation-modules/relations.spec.d.ts +0 -1
  234. package/dist/spec/schema/ast-validation-modules/relations.spec.js +0 -145
  235. package/dist/spec/schema/ast-validation-modules/relations.spec.js.map +0 -1
  236. package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.d.ts +0 -1
  237. package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.js +0 -31
  238. package/dist/spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.js.map +0 -1
  239. package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.d.ts +0 -1
  240. package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.js +0 -35
  241. package/dist/spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.js.map +0 -1
  242. package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.d.ts +0 -1
  243. package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.js +0 -27
  244. package/dist/spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.js.map +0 -1
  245. package/dist/spec/schema/ast-validation-modules/root-field.spec.d.ts +0 -1
  246. package/dist/spec/schema/ast-validation-modules/root-field.spec.js +0 -405
  247. package/dist/spec/schema/ast-validation-modules/root-field.spec.js.map +0 -1
  248. package/dist/spec/schema/ast-validation-modules/ttl.spec.d.ts +0 -1
  249. package/dist/spec/schema/ast-validation-modules/ttl.spec.js +0 -362
  250. package/dist/spec/schema/ast-validation-modules/ttl.spec.js.map +0 -1
  251. package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.d.ts +0 -1
  252. package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.js +0 -79
  253. package/dist/spec/schema/ast-validation-modules/undefined-permission-profile.spec.js.map +0 -1
  254. package/dist/spec/schema/ast-validation-modules/undefined-types.spec.d.ts +0 -1
  255. package/dist/spec/schema/ast-validation-modules/undefined-types.spec.js +0 -38
  256. package/dist/spec/schema/ast-validation-modules/undefined-types.spec.js.map +0 -1
  257. package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.d.ts +0 -1
  258. package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.js +0 -53
  259. package/dist/spec/schema/preparation/ast-transformation-modules/add-namespaces-to-types-transformer.spec.js.map +0 -1
  260. package/dist/spec/schema/scalars/date-time.spec.d.ts +0 -1
  261. package/dist/spec/schema/scalars/date-time.spec.js +0 -74
  262. package/dist/spec/schema/scalars/date-time.spec.js.map +0 -1
  263. package/dist/spec/schema/scalars/fixed-point-decimals.spec.d.ts +0 -1
  264. package/dist/spec/schema/scalars/fixed-point-decimals.spec.js +0 -66
  265. package/dist/spec/schema/scalars/fixed-point-decimals.spec.js.map +0 -1
  266. package/dist/spec/schema/scalars/int53.spec.d.ts +0 -1
  267. package/dist/spec/schema/scalars/int53.spec.js +0 -45
  268. package/dist/spec/schema/scalars/int53.spec.js.map +0 -1
  269. package/dist/spec/schema/scalars/local-date.spec.d.ts +0 -1
  270. package/dist/spec/schema/scalars/local-date.spec.js +0 -30
  271. package/dist/spec/schema/scalars/local-date.spec.js.map +0 -1
  272. package/dist/spec/schema/scalars/local-time.spec.d.ts +0 -1
  273. package/dist/spec/schema/scalars/local-time.spec.js +0 -64
  274. package/dist/spec/schema/scalars/local-time.spec.js.map +0 -1
  275. package/dist/spec/schema/scalars/offset-date-time.spec.d.ts +0 -1
  276. package/dist/spec/schema/scalars/offset-date-time.spec.js +0 -82
  277. package/dist/spec/schema/scalars/offset-date-time.spec.js.map +0 -1
  278. package/dist/spec/schema/scalars/string-map.spec.d.ts +0 -1
  279. package/dist/spec/schema/scalars/string-map.spec.js +0 -230
  280. package/dist/spec/schema/scalars/string-map.spec.js.map +0 -1
  281. package/dist/spec/schema/schema-builder.spec.d.ts +0 -1
  282. package/dist/spec/schema/schema-builder.spec.js +0 -105
  283. package/dist/spec/schema/schema-builder.spec.js.map +0 -1
  284. package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.d.ts +0 -1
  285. package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.js +0 -30
  286. package/dist/spec/schema/source-validation-modules/check-graphql-syntax.spec.js.map +0 -1
  287. package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.d.ts +0 -1
  288. package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.js +0 -36
  289. package/dist/spec/schema/source-validation-modules/check-json-syntax.spec.js.map +0 -1
  290. package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.d.ts +0 -1
  291. package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.js +0 -30
  292. package/dist/spec/schema/source-validation-modules/check-yaml-syntax.spec.js.map +0 -1
  293. package/dist/spec/schema/source-validation-modules/graphql-rules.spec.d.ts +0 -1
  294. package/dist/spec/schema/source-validation-modules/graphql-rules.spec.js +0 -89
  295. package/dist/spec/schema/source-validation-modules/graphql-rules.spec.js.map +0 -1
  296. package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.d.ts +0 -1
  297. package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.js +0 -99
  298. package/dist/spec/schema/source-validation-modules/permission-profile-validator.spec.js.map +0 -1
  299. package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.d.ts +0 -1
  300. package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.js +0 -145
  301. package/dist/spec/schema/source-validation-modules/sidecar-schema.spec.js.map +0 -1
  302. package/dist/spec/schema/source-validation-modules/source-validation-helper.d.ts +0 -3
  303. package/dist/spec/schema/source-validation-modules/source-validation-helper.js +0 -12
  304. package/dist/spec/schema/source-validation-modules/source-validation-helper.js.map +0 -1
  305. package/dist/spec/schema/source-validation-modules/yaml-parser.spec.d.ts +0 -1
  306. package/dist/spec/schema/source-validation-modules/yaml-parser.spec.js +0 -87
  307. package/dist/spec/schema/source-validation-modules/yaml-parser.spec.js.map +0 -1
  308. package/dist/spec/schema-generation/create-input-type-generator.spec.d.ts +0 -1
  309. package/dist/spec/schema-generation/create-input-type-generator.spec.js +0 -518
  310. package/dist/spec/schema-generation/create-input-type-generator.spec.js.map +0 -1
  311. package/dist/spec/schema-generation/createdat-updatedat-modification.spec.d.ts +0 -1
  312. package/dist/spec/schema-generation/createdat-updatedat-modification.spec.js +0 -160
  313. package/dist/spec/schema-generation/createdat-updatedat-modification.spec.js.map +0 -1
  314. package/dist/spec/schema-generation/enum-type-generator.spec.d.ts +0 -1
  315. package/dist/spec/schema-generation/enum-type-generator.spec.js +0 -21
  316. package/dist/spec/schema-generation/enum-type-generator.spec.js.map +0 -1
  317. package/dist/spec/schema-generation/memorize-decorator.spec.d.ts +0 -1
  318. package/dist/spec/schema-generation/memorize-decorator.spec.js +0 -39
  319. package/dist/spec/schema-generation/memorize-decorator.spec.js.map +0 -1
  320. package/dist/spec/schema-generation/order-by-enum-generator.spec.d.ts +0 -1
  321. package/dist/spec/schema-generation/order-by-enum-generator.spec.js +0 -188
  322. package/dist/spec/schema-generation/order-by-enum-generator.spec.js.map +0 -1
  323. package/dist/spec/utils/group-by-equivalence.spec.d.ts +0 -1
  324. package/dist/spec/utils/group-by-equivalence.spec.js +0 -11
  325. package/dist/spec/utils/group-by-equivalence.spec.js.map +0 -1
  326. package/dist/spec/utils/utils.spec.d.ts +0 -1
  327. package/dist/spec/utils/utils.spec.js +0 -24
  328. package/dist/spec/utils/utils.spec.js.map +0 -1
  329. package/dist/spec/utils/visitor.spec.d.ts +0 -1
  330. package/dist/spec/utils/visitor.spec.js +0 -119
  331. package/dist/spec/utils/visitor.spec.js.map +0 -1
@@ -1,451 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- const chai_1 = require("chai");
5
- describe('@parent directive', () => {
6
- it('accepts direct embedding in root entity', () => {
7
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
8
- type Root @rootEntity {
9
- children: [Child]
10
- }
11
-
12
- type Child @childEntity {
13
- name: String
14
- parent: Root @parent
15
- }
16
- `);
17
- });
18
- it('accepts embedding in other child entity', () => {
19
- (0, helpers_1.assertValidatorWarns)(`
20
- type Root @rootEntity {
21
- children: [Child]
22
- }
23
-
24
- type Child @childEntity {
25
- children: [Grandchild]
26
- }
27
-
28
- type Grandchild @childEntity {
29
- name: String
30
- parent: Child @parent
31
- }
32
- `, 'Parent fields currently can\'t be selected within collect fields, so this field will probably be useless. You could add a @root field (of type "Root") instead.');
33
- });
34
- it('accepts embedding with entity extension in between', () => {
35
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
36
- type Root @rootEntity {
37
- extension: Extension
38
- }
39
-
40
- type Extension @entityExtension {
41
- children: [Child]
42
- }
43
-
44
- type Child @childEntity {
45
- name: String
46
- parent: Root @parent
47
- }
48
- `);
49
- });
50
- it('accepts embedding nested with multiple extension in between', () => {
51
- (0, helpers_1.assertValidatorWarns)(`
52
- type Root @rootEntity {
53
- extension: Extension1
54
- }
55
-
56
- type Extension1 @entityExtension {
57
- extension2: Extension2
58
- }
59
-
60
- type Extension2 @entityExtension {
61
- extension3: Extension3
62
- }
63
-
64
- type Extension3 @entityExtension {
65
- children: [Child1]
66
- }
67
-
68
- type Child1 @childEntity {
69
- children: [Child2]
70
- parent: Root @parent
71
- }
72
-
73
- type Child2 @childEntity {
74
- children: [Child3]
75
- parent: Child1 @parent
76
- }
77
-
78
- type Child3 @childEntity {
79
- extension: Extension4
80
- parent: Child2 @parent
81
- }
82
-
83
- type Extension4 @entityExtension {
84
- children: [Child4]
85
- }
86
-
87
- type Child4 @childEntity {
88
- name: String
89
- parent: Child3 @parent
90
- }
91
- `, 'Parent fields currently can\'t be selected within collect fields, so this field will probably be useless. You could add a @root field (of type "Root") instead.');
92
- });
93
- it('accepts embedding in multiple fields with the same type', () => {
94
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
95
- type Root @rootEntity {
96
- children1: [Child]
97
- children2: [Child]
98
- extension: Extension
99
- }
100
-
101
- type Extension @entityExtension {
102
- children: [Child]
103
- }
104
-
105
- type Child @childEntity {
106
- name: String
107
- parent: Root @parent
108
- }
109
- `);
110
- });
111
- it('accepts if embedded only by one entity type, but used with @collect in another', () => {
112
- (0, helpers_1.assertValidatorWarns)(`
113
- type Root @rootEntity {
114
- children: [Child]
115
- grandchildren: [Grandchild] @collect(path: "children.children")
116
- }
117
-
118
- type Child @childEntity {
119
- children: [Grandchild]
120
- }
121
-
122
- type Grandchild @childEntity {
123
- name: String
124
- parent: Child @parent
125
- }
126
- `, 'Parent fields currently can\'t be selected within collect fields, so this field will probably be useless. You could add a @root field (of type "Root") instead.');
127
- });
128
- it('rejects with list', () => {
129
- (0, helpers_1.assertValidatorRejects)(`
130
- type Child @childEntity {
131
- name: String
132
- parent: [Child] @parent
133
- }
134
- `, `A parent field cannot be a list.`);
135
- });
136
- it('rejects in root entity types', () => {
137
- (0, helpers_1.assertValidatorRejects)(`
138
- type Root @rootEntity {
139
- name: String
140
- parent: Root @parent
141
- }
142
- `, `@parent can only be used on fields of child entity types.`);
143
- });
144
- it('rejects in entity extensions', () => {
145
- (0, helpers_1.assertValidatorRejects)(`
146
- type Root @rootEntity {
147
- extension: Extension
148
- }
149
-
150
- type Extension @entityExtension {
151
- name: String
152
- parent: Root @parent
153
- }
154
- `, `@parent can only be used on fields of child entity types.`);
155
- });
156
- it('rejects in value object', () => {
157
- (0, helpers_1.assertValidatorRejects)(`
158
- type Root @rootEntity {
159
- objects: [ValueObject]
160
- }
161
-
162
- type ValueObject @valueObject {
163
- name: String
164
- parent: Root @parent
165
- }
166
- `, `@parent can only be used on fields of child entity types.`);
167
- });
168
- it('rejects if there is nothing but parent and root fields in a child entity', () => {
169
- (0, helpers_1.assertValidatorRejects)(`
170
- type Root @rootEntity {
171
- child: [Child]
172
- }
173
-
174
- type Child @childEntity {
175
- parent: Root @parent
176
- root: Root @root
177
- }
178
- `, `There need to be fields other than parent and root fields in a child entity type.`);
179
- });
180
- it('rejects in combination with @reference', () => {
181
- (0, helpers_1.assertValidatorRejects)(`
182
- type Root @rootEntity {
183
- children: [Child]
184
- key: String @key
185
- }
186
-
187
- type Child @childEntity {
188
- name: String
189
- parent: Root @parent @reference
190
- }
191
- `, `@parent and @reference cannot be combined.`);
192
- });
193
- it('rejects in combination with @collect', () => {
194
- (0, helpers_1.assertValidatorRejects)(`
195
- type Root @rootEntity {
196
- children: [Child]
197
- }
198
-
199
- type Child @childEntity {
200
- children: [Grandchild]
201
- parent: [Grandchild] @parent @collect(path: "children")
202
- }
203
-
204
- type Grandchild @childEntity {
205
- field: String
206
- }
207
- `, `@parent and @collect cannot be combined.`);
208
- });
209
- it('rejects in combination with @flexSearch', () => {
210
- (0, helpers_1.assertValidatorRejects)(`
211
- type Root @rootEntity {
212
- children: [Child]
213
- }
214
-
215
- type Child @childEntity {
216
- name: String
217
- parent: Root @parent @flexSearch
218
- }
219
- `, `@flexSearch is not supported on parent fields.`);
220
- });
221
- it('rejects in combination with @flexSearchFulltext', () => {
222
- (0, helpers_1.assertValidatorRejects)(`
223
- type Root @rootEntity {
224
- children: [Child]
225
- }
226
-
227
- type Child @childEntity {
228
- name: String
229
- parent: Root @parent @flexSearchFulltext
230
- }
231
- `, `@flexSearchFulltext is not supported on type "Root".`);
232
- });
233
- it('rejects in combination with @defaultValue', () => {
234
- (0, helpers_1.assertValidatorRejects)(`
235
- type Root @rootEntity {
236
- children: [Child]
237
- }
238
-
239
- type Child @childEntity {
240
- name: String
241
- parent: Root @parent @defaultValue(value: { })
242
- }
243
- `, `Default values are not supported on parent fields.`);
244
- });
245
- it('rejects without usage', () => {
246
- (0, helpers_1.assertValidatorRejects)(`
247
- type Root @rootEntity {
248
- field: String
249
- }
250
-
251
- type Child @childEntity {
252
- name: String
253
- parent: Root @parent
254
- }
255
- `, `Type "Child" is not used by any entity type and therefore cannot have a parent field.`);
256
- });
257
- it('rejects with wrong type', () => {
258
- (0, helpers_1.assertValidatorRejects)(`
259
- type Root1 @rootEntity {
260
- children: [Child]
261
- }
262
-
263
- type Root2 @rootEntity {
264
- otherField: String
265
- }
266
-
267
- type Child @childEntity {
268
- name: String
269
- parent: Root2 @parent
270
- }
271
- `, `Type "Child" is used in entity type "Root1", so the type of this parent field should be "Root1".`);
272
- });
273
- it('rejects with another possible types', () => {
274
- (0, helpers_1.assertValidatorRejects)(`
275
- type Root1 @rootEntity {
276
- children: [Child]
277
- }
278
-
279
- type Root2 @rootEntity {
280
- children: [Child]
281
- }
282
-
283
- type Child @childEntity {
284
- name: String
285
- parent: Root1 @parent
286
- }
287
- `, `Type "Child" is used in entity type "Root2" as well and thus cannot have a parent field.`);
288
- });
289
- it('rejects for recursive child entities', () => {
290
- (0, helpers_1.assertValidatorRejects)(`
291
- type Root @rootEntity {
292
- children: [Child]
293
- }
294
-
295
- type Child @childEntity {
296
- children: [Child]
297
- parent: Root @parent
298
- }
299
- `, `Type "Child" is a recursive child entity type and therefore cannot have a parent field. Use the @root directive instead.`);
300
- });
301
- it('rejects with other possible types', () => {
302
- (0, helpers_1.assertValidatorRejects)(`
303
- type Root1 @rootEntity {
304
- children: [Child]
305
- }
306
-
307
- type Root2 @rootEntity {
308
- children: [Child]
309
- }
310
-
311
- type Root3 @rootEntity {
312
- children: [Child]
313
- }
314
-
315
- type Child @childEntity {
316
- name: String
317
- parent: Root1 @parent
318
- }
319
- `, `Type "Child" is used in entity types "Root2" and "Root3" as well and thus cannot have a parent field.`);
320
- });
321
- it('rejects with other possible types when types would not work at all', () => {
322
- (0, helpers_1.assertValidatorRejects)(`
323
- type Root1 @rootEntity {
324
- children: [Child]
325
- }
326
-
327
- type Root2 @rootEntity {
328
- children: [Child]
329
- }
330
-
331
- type Root3 @rootEntity {
332
- children: [Child]
333
- }
334
-
335
- type Root4 @rootEntity {
336
- field: String
337
- }
338
-
339
- type Child @childEntity {
340
- name: String
341
- parent: Root4 @parent
342
- }
343
- `, `Type "Child" is used in multiple entity types ("Root1", "Root2" and "Root3") and thus cannot have a parent field.`);
344
- });
345
- it('rejects with multiple possible types through extensions', () => {
346
- (0, helpers_1.assertValidatorRejects)(`
347
- type Root1 @rootEntity {
348
- children: [Child]
349
- extension: Extension
350
- }
351
-
352
- type Child @childEntity {
353
- name: String
354
- parent: Root1 @parent
355
- }
356
-
357
- type Extension @entityExtension {
358
- children: [Child2]
359
- }
360
-
361
- type Child2 @childEntity {
362
- children: [Child]
363
- }
364
- `, `Type "Child" is used in entity type "Child2" as well and thus cannot have a parent field.`);
365
- });
366
- it('rejects if type would only work with @collect', () => {
367
- (0, helpers_1.assertValidatorRejects)(`
368
- type Root @rootEntity {
369
- children: [Child]
370
- grandchildren: [Grandchild] @collect(path: "children.children")
371
- }
372
-
373
- type Child @childEntity {
374
- children: [Grandchild]
375
- }
376
-
377
- type Grandchild @childEntity {
378
- name: String
379
- parent: Root @parent
380
- }
381
- `, 'Type "Grandchild" is used in entity type "Child", so the type of this parent field should be "Child".');
382
- });
383
- it('rejects if entity embedding extension is used instead', () => {
384
- (0, helpers_1.assertValidatorRejects)(`
385
- type Root @rootEntity {
386
- extension: Extension1
387
- }
388
-
389
- type Extension1 @entityExtension {
390
- extension: Extension2
391
- }
392
-
393
- type Extension2 @entityExtension {
394
- children: [Child]
395
- }
396
-
397
- type Child @childEntity {
398
- name: String
399
- parent: Extension1 @parent
400
- }
401
- `, 'Type "Child" is used in type "Extension1", but the closest entity type in the hierarchy is "Root", so the type of this parent field should be "Root".');
402
- });
403
- it('rejects multiple @parent fields', () => {
404
- const result = (0, helpers_1.validate)(`
405
- type Root @rootEntity {
406
- children: [Child]
407
- }
408
-
409
- type Child @childEntity {
410
- name: String
411
- parent1: Root @parent
412
- parent2: Root @parent
413
- }
414
- `);
415
- (0, chai_1.expect)(result.hasErrors()).to.be.true;
416
- (0, chai_1.expect)(result.messages.map((m) => m.message)).to.deep.equal([
417
- `There can only be one parent field per type.`,
418
- `There can only be one parent field per type.`,
419
- ]);
420
- });
421
- it('warns about @parent usage', () => {
422
- (0, helpers_1.assertValidatorWarns)(`
423
- type Root @rootEntity {
424
- children: [Child]
425
- }
426
-
427
- type Child @childEntity {
428
- name: String
429
- children: [Grandchild]
430
- }
431
-
432
- type Grandchild @childEntity {
433
- name: String
434
- parent: Child @parent
435
- }
436
- `, 'Parent fields currently can\'t be selected within collect fields, so this field will probably be useless. You could add a @root field (of type "Root") instead.');
437
- });
438
- it('does not warn about @parent usage that is essential a @root', () => {
439
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
440
- type Root @rootEntity {
441
- children: [Child]
442
- }
443
-
444
- type Child @childEntity {
445
- name: String
446
- parent: Root @parent
447
- }
448
- `);
449
- });
450
- });
451
- //# sourceMappingURL=parent-field.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parent-field.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/parent-field.spec.ts"],"names":[],"mappings":";;AAAA,uCAKmB;AACnB,+BAA8B;AAE9B,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,IAAA,8CAAoC,EAAC;;;;;;;;;SASpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,IAAA,8BAAoB,EAChB;;;;;;;;;;;;;SAaH,EACG,iKAAiK,CACpK,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC1D,IAAA,8CAAoC,EAAC;;;;;;;;;;;;;SAapC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CA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EAAE;QACnE,IAAA,8CAAoC,EAChC;;;;;;;;;SASH,CACA,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- const modelWithReferenceToNonRoot = `
5
- type Stuff @childEntity {
6
- foo: String
7
- }
8
- type Bar @rootEntity {
9
- stuff: [Stuff] @reference
10
- }
11
- `;
12
- const modelWithReferenceToRootWithoutKeyField = `
13
- type Stuff @rootEntity {
14
- foo: String
15
- }
16
- type Bar @rootEntity {
17
- stuff: Stuff @reference
18
- }
19
- `;
20
- const modelWithoutReferenceToNonRoot = `
21
- type Stuff @rootEntity {
22
- foo: String @key
23
- }
24
- type Bar @rootEntity {
25
- stuff: Stuff @reference(keyField: "stuffKey")
26
- stuffKey: String
27
- }
28
- `;
29
- describe('references only on root entity with key field validator', () => {
30
- it('rejects @reference to non-@rootEntity', () => {
31
- (0, helpers_1.assertValidatorRejects)(modelWithReferenceToNonRoot, '"Stuff" cannot be used as @reference type because is not a root entity type.');
32
- });
33
- it('rejects @reference to rootEntity without @key', () => {
34
- (0, helpers_1.assertValidatorRejects)(modelWithReferenceToRootWithoutKeyField, '"Stuff" cannot be used as @reference type because it does not have a field annotated with @key.');
35
- });
36
- it('accepts @reference to @rootEntity with @key', () => {
37
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(modelWithoutReferenceToNonRoot);
38
- });
39
- });
40
- //# sourceMappingURL=references-only-to-root-entities-with-key-field-validator.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"references-only-to-root-entities-with-key-field-validator.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/references-only-to-root-entities-with-key-field-validator.spec.ts"],"names":[],"mappings":";;AAAA,uCAAyF;AAEzF,MAAM,2BAA2B,GAAG;;;;;;;SAO3B,CAAC;AAEV,MAAM,uCAAuC,GAAG;;;;;;;SAOvC,CAAC;AAEV,MAAM,8BAA8B,GAAG;;;;;;;;SAQ9B,CAAC;AAEV,QAAQ,CAAC,yDAAyD,EAAE,GAAG,EAAE;IACrE,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC7C,IAAA,gCAAsB,EAClB,2BAA2B,EAC3B,8EAA8E,CACjF,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;QACrD,IAAA,gCAAsB,EAClB,uCAAuC,EACvC,iGAAiG,CACpG,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACnD,IAAA,8CAAoC,EAAC,8BAA8B,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- const chai_1 = require("chai");
5
- describe('references with key field', () => {
6
- it('accepts proper configuration', () => {
7
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
8
- type Stuff @rootEntity {
9
- key: String @key
10
- }
11
- type RefStuff @rootEntity {
12
- stuffKey: String
13
- stuff: Stuff @reference(keyField: "stuffKey")
14
- }
15
- `);
16
- });
17
- it('rejects missing key field', () => {
18
- (0, helpers_1.assertValidatorRejects)(`
19
- type Stuff @rootEntity {
20
- key: String @key
21
- }
22
- type RefStuff @rootEntity {
23
- stuff: Stuff @reference(keyField: "stuffKey")
24
- }
25
- `, `Field "RefStuff.stuffKey" not found.`);
26
- });
27
- it('rejects system key field', () => {
28
- (0, helpers_1.assertValidatorRejects)(`
29
- type Stuff @rootEntity {
30
- key: String @key
31
- }
32
- type RefStuff @rootEntity {
33
- stuff: Stuff @reference(keyField: "id")
34
- }
35
- `, `"RefStuff.id" is a system field and cannot be used as keyField of a @reference.`);
36
- });
37
- it('rejects ill-typed key field', () => {
38
- (0, helpers_1.assertValidatorRejects)(`
39
- type Stuff @rootEntity {
40
- key: String @key
41
- }
42
- type RefStuff @rootEntity {
43
- stuffKey: Int
44
- stuff: Stuff @reference(keyField: "stuffKey")
45
- }
46
- `, `The type of the keyField "RefStuff.stuffKey" ("Int") must be the same as the type of the @key-annotated field "Stuff.key" ("String")`);
47
- });
48
- it('rejects doubly-used key field field', () => {
49
- const result = (0, helpers_1.validate)(`
50
- type Stuff @rootEntity {
51
- key: String @key
52
- }
53
- type RefStuff @rootEntity {
54
- stuffKey: String
55
- stuff1: Stuff @reference(keyField: "stuffKey")
56
- stuff2: Stuff @reference(keyField: "stuffKey")
57
- }
58
- `);
59
- (0, chai_1.expect)(result.messages, result.messages.join('\n')).have.lengthOf(2);
60
- (0, chai_1.expect)(result.messages[0].message).to.equal(`There are multiple references declared for keyField "stuffKey".`);
61
- (0, chai_1.expect)(result.messages[1].message).to.equal(`There are multiple references declared for keyField "stuffKey".`);
62
- });
63
- it('warns about @reference without key field', () => {
64
- (0, helpers_1.assertValidatorWarns)(`
65
- type Stuff @rootEntity {
66
- key: String @key
67
- }
68
- type RefStuff @rootEntity {
69
- stuff: Stuff @reference
70
- }
71
- `, `Usage of @reference without the keyField argument is deprecated. Add a field of type "String" and specify it in @reference(keyField: "...")`);
72
- });
73
- });
74
- //# sourceMappingURL=references-with-key-field.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"references-with-key-field.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/references-with-key-field.spec.ts"],"names":[],"mappings":";;AAAA,uCAKmB;AACnB,+BAA8B;AAE9B,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACpC,IAAA,8CAAoC,EAAC;;;;;;;;SAQpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACjC,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,sCAAsC,CACzC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAChC,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,iFAAiF,CACpF,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACnC,IAAA,gCAAsB,EAClB;;;;;;;;SAQH,EACG,sIAAsI,CACzI,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,MAAM,MAAM,GAAG,IAAA,kBAAQ,EAAC;;;;;;;;;SASvB,CAAC,CAAC;QACH,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACrE,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CACvC,iEAAiE,CACpE,CAAC;QACF,IAAA,aAAM,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CACvC,iEAAiE,CACpE,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,8BAAoB,EAChB;;;;;;;SAOH,EACG,6IAA6I,CAChJ,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- describe('relations only in root entities validator', () => {
5
- it('rejects @relation in non-@rootEntity', () => {
6
- (0, helpers_1.assertValidatorRejects)(`
7
- type Stuff @rootEntity {
8
- foo: String
9
- }
10
- type Bar @childEntity {
11
- stuff: [Stuff] @relation
12
- }
13
- `, 'Relations can only be defined on root entity types. Consider using @reference instead.');
14
- });
15
- it('accepts @relation in @rootEntity', () => {
16
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
17
- type Stuff @rootEntity {
18
- foo: String
19
- }
20
- type Bar @rootEntity {
21
- stuff: [Stuff] @relation
22
- }
23
- `);
24
- });
25
- });
26
- //# sourceMappingURL=relations-only-in-root-entities-validator.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relations-only-in-root-entities-validator.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/relations-only-in-root-entities-validator.spec.ts"],"names":[],"mappings":";;AAAA,uCAAyF;AAEzF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACvD,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,wFAAwF,CAC3F,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QACxC,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- describe('relations only on root entities validator', () => {
5
- it('rejects @relation to non-@rootEntity', () => {
6
- (0, helpers_1.assertValidatorRejects)(`
7
- type Stuff @childEntity {
8
- foo: String
9
- }
10
- type Bar @rootEntity {
11
- stuff: [Stuff] @relation
12
- }
13
- `, 'Type "Stuff" cannot be used with @relation because it is not a root entity type.');
14
- });
15
- it('accepts @relation to @rootEntity', () => {
16
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
17
- type Stuff @rootEntity {
18
- foo: String
19
- }
20
- type Bar @rootEntity {
21
- stuff: [Stuff] @relation
22
- }
23
- `);
24
- });
25
- });
26
- //# sourceMappingURL=relations-only-to-root-entities-validator.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relations-only-to-root-entities-validator.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/relations-only-to-root-entities-validator.spec.ts"],"names":[],"mappings":";;AAAA,uCAAyF;AAEzF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACvD,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,kFAAkF,CACrF,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QACxC,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}