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,145 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const helpers_1 = require("./helpers");
5
- describe('@relation', () => {
6
- it('allows CASCADE in forward relations', () => {
7
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
8
- type Parent @rootEntity {
9
- children: [Child] @relation(onDelete: CASCADE)
10
- }
11
- type Child @rootEntity {
12
- parent: Parent @relation(inverseOf: "children")
13
- }
14
- `);
15
- });
16
- it('allows RESTRICT in forward relations', () => {
17
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
18
- type Parent @rootEntity {
19
- children: [Child] @relation(onDelete: RESTRICT)
20
- }
21
- type Child @rootEntity {
22
- parent: Parent @relation(inverseOf: "children")
23
- }
24
- `);
25
- });
26
- it('allows RESTRICT in forward relations without inverse field', () => {
27
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
28
- type Parent @rootEntity {
29
- children: [Child] @relation(onDelete: RESTRICT)
30
- }
31
- type Child @rootEntity {
32
- name: String
33
- }
34
- `);
35
- });
36
- it('rejects onDelete in inverse relations', () => {
37
- (0, helpers_1.assertValidatorRejects)(`
38
- type Parent @rootEntity {
39
- children: [Child] @relation
40
- }
41
- type Child @rootEntity {
42
- parent: Parent @relation(inverseOf: "children", onDelete: CASCADE)
43
- }
44
- `, '"onDelete" cannot be specified on inverse relations.');
45
- });
46
- it('rejects onDelete: REMOVE_EDGES in inverse relations', () => {
47
- // REMOVE_EDGES is the default, but re reject the argument altogether
48
- (0, helpers_1.assertValidatorRejects)(`
49
- type Parent @rootEntity {
50
- children: [Child] @relation
51
- }
52
- type Child @rootEntity {
53
- parent: Parent @relation(inverseOf: "children", onDelete: REMOVE_EDGES)
54
- }
55
- `, '"onDelete" cannot be specified on inverse relations.');
56
- });
57
- it('rejects onDelete: CASCADE in implicit n-to-m relations', () => {
58
- (0, helpers_1.assertValidatorRejects)(`
59
- type Parent @rootEntity {
60
- children: [Child] @relation(onDelete: CASCADE)
61
- }
62
- type Child @rootEntity {
63
- name: String
64
- }
65
- `, '"CASCADE" is only supported on 1-to-n and 1-to-1 relations. Use "RESTRICT" instead or change this to a 1-to-n relation by adding a field with the @relation(inverseOf: "children") directive to the target type "Child".');
66
- });
67
- it('rejects onDelete: CASCADE in implicit n-to-1 relations', () => {
68
- (0, helpers_1.assertValidatorRejects)(`
69
- type Parent @rootEntity {
70
- child: Child @relation(onDelete: CASCADE)
71
- }
72
- type Child @rootEntity {
73
- name: String
74
- }
75
- `, '"CASCADE" is only supported on 1-to-n and 1-to-1 relations. Use "RESTRICT" instead or change this to a 1-to-1 relation by adding a field with the @relation(inverseOf: "child") directive to the target type "Child".');
76
- });
77
- it('rejects onDelete: CASCADE in explicit n-to-m relations', () => {
78
- (0, helpers_1.assertValidatorRejects)(`
79
- type Parent @rootEntity {
80
- children: [Child] @relation(onDelete: CASCADE)
81
- }
82
- type Child @rootEntity {
83
- parents: [Parent] @relation(inverseOf: "children")
84
- }
85
- `, '"CASCADE" is only supported on 1-to-n and 1-to-1 relations. Use "RESTRICT" instead or change this to a 1-to-n relation by changing the type of "Child.parents" to "Parent".');
86
- });
87
- it('rejects onDelete: CASCADE in explicit 1-to-m relations', () => {
88
- (0, helpers_1.assertValidatorRejects)(`
89
- type Parent @rootEntity {
90
- child: Child @relation(onDelete: CASCADE)
91
- }
92
- type Child @rootEntity {
93
- parents: [Parent] @relation(inverseOf: "child")
94
- }
95
- `, '"CASCADE" is only supported on 1-to-n and 1-to-1 relations. Use "RESTRICT" instead or change this to a 1-to-1 relation by changing the type of "Child.parents" to "Parent".');
96
- });
97
- it('allows RESTRICT in forward n-to-m relations', () => {
98
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
99
- type Parent @rootEntity {
100
- children: [Child] @relation(onDelete: RESTRICT)
101
- }
102
- type Child @rootEntity {
103
- parents: [Parent] @relation(inverseOf: "children")
104
- }
105
- `);
106
- });
107
- it('rejects onDelete: CASCADE on self-recursive fields', () => {
108
- (0, helpers_1.assertValidatorRejects)(`
109
- type Object @rootEntity {
110
- objects: [Object] @relation(onDelete: CASCADE)
111
- }
112
- `, '"CASCADE" cannot be used on recursive fields. Use "RESTRICT" instead.');
113
- });
114
- it('rejects onDelete: CASCADE on indirectly recursive fields', () => {
115
- const errors = (0, helpers_1.validate)(`
116
- type Red @rootEntity {
117
- blues: [Blue] @relation(onDelete: CASCADE)
118
- parentBlue: Blue @relation(inverseOf: "reds")
119
- }
120
-
121
- type Blue @rootEntity {
122
- reds: [Red] @relation(onDelete: CASCADE)
123
- parentRed: Red @relation(inverseOf: "blues")
124
- }
125
- `).getErrors();
126
- (0, chai_1.expect)(errors).to.have.length(2);
127
- (0, chai_1.expect)(errors.map((e) => e.message)).to.deep.equal([
128
- 'The path "blues.reds" is a loop with "onDelete: CASCADE" on each relation, which is not supported. Break the loop by replacing "CASCADE" with "RESTRICT" on any of these relations.',
129
- 'The path "reds.blues" is a loop with "onDelete: CASCADE" on each relation, which is not supported. Break the loop by replacing "CASCADE" with "RESTRICT" on any of these relations.',
130
- ]);
131
- });
132
- it('allows relation loops if it is broken by a RESTRICT', () => {
133
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
134
- type Red @rootEntity {
135
- blues: [Blue] @relation(onDelete: CASCADE)
136
- parentBlue: Blue @relation(inverseOf: "reds")
137
- }
138
- type Blue @rootEntity {
139
- reds: Red @relation(onDelete: RESTRICT)
140
- parentRed: Red @relation(inverseOf: "blues")
141
- }
142
- `);
143
- });
144
- });
145
- //# sourceMappingURL=relations.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"relations.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/relations.spec.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,uCAAmG;AAEnG,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACvB,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QAClE,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC7C,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,sDAAsD,CACzD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC3D,qEAAqE;QACrE,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,sDAAsD,CACzD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,0NAA0N,CAC7N,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,uNAAuN,CAC1N,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,6KAA6K,CAChL,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAC9D,IAAA,gCAAsB,EAClB;;;;;;;SAOH,EACG,6KAA6K,CAChL,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACnD,IAAA,8CAAoC,EAAC;;;;;;;SAOpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC1D,IAAA,gCAAsB,EAClB;;;;SAIH,EACG,uEAAuE,CAC1E,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAChE,MAAM,MAAM,GAAG,IAAA,kBAAQ,EACnB;;;;;;;;;;SAUH,CACA,CAAC,SAAS,EAAE,CAAC;QACd,IAAA,aAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjC,IAAA,aAAM,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAC/C,qLAAqL;YACrL,qLAAqL;SACxL,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC3D,IAAA,8CAAoC,EAAC;;;;;;;;;SASpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const chai_1 = require("chai");
4
- const helpers_1 = require("./helpers");
5
- describe('no-permission-profile validator', () => {
6
- it('rejects @roles and permissionProfile', () => {
7
- const validationResult = (0, helpers_1.validate)(`
8
- type Stuff @rootEntity(permissionProfile: "default") @roles {
9
- foo: [String]
10
- }
11
- `);
12
- (0, chai_1.expect)(validationResult.getErrors()).to.have.lengthOf(2);
13
- (0, chai_1.expect)(validationResult.getErrors()[0].message).to.equal('Permission profile and explicit role specifiers cannot be combined.');
14
- (0, chai_1.expect)(validationResult.getErrors()[1].message).to.equal('Permission profile and explicit role specifiers cannot be combined.');
15
- });
16
- it('accepts @roles', () => {
17
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
18
- type Stuff @rootEntity @roles(readWrite: "abc") {
19
- foo: [String]
20
- }
21
- `);
22
- });
23
- it('accepts permissionProfile', () => {
24
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
25
- type Stuff @rootEntity(permissionProfile: "default") {
26
- foo: [String]
27
- }
28
- `);
29
- });
30
- });
31
- //# sourceMappingURL=roles-and-permission-profile-combined.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roles-and-permission-profile-combined.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/roles-and-permission-profile-combined.spec.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,uCAA2E;AAE3E,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC7C,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,MAAM,gBAAgB,GAAG,IAAA,kBAAQ,EAAC;;;;SAIjC,CAAC,CAAC;QACH,IAAA,aAAM,EAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzD,IAAA,aAAM,EAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CACpD,qEAAqE,CACxE,CAAC;QACF,IAAA,aAAM,EAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CACpD,qEAAqE,CACxE,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;QACtB,IAAA,8CAAoC,EAAC;;;;SAIpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACjC,IAAA,8CAAoC,EAAC;;;;SAIpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- describe('roles-on-non-root-entity-types validator', () => {
5
- it('rejects value objects with @roles', () => {
6
- (0, helpers_1.assertValidatorRejects)(`
7
- type ValueObject @valueObject @roles {
8
- foo: String
9
- }
10
- `, '@roles is only allowed on fields and on root entity types.');
11
- });
12
- it('rejects entity extensions with @roles', () => {
13
- (0, helpers_1.assertValidatorRejects)(`
14
- type ValueObject @entityExtension @roles {
15
- foo: String
16
- }
17
- `, '@roles is only allowed on fields and on root entity types.');
18
- });
19
- it('accepts value objects without roles', () => {
20
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
21
- type ValueObject @valueObject {
22
- foo: String
23
- }
24
- type Root @rootEntity { bar: ValueObject } # to avoid warning because ValueObject is not used
25
- `);
26
- });
27
- it('accepts root entities with roles', () => {
28
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
29
- type ValueObject @rootEntity @roles(readWrite: "abc") {
30
- foo: String
31
- }
32
- `);
33
- });
34
- });
35
- //# sourceMappingURL=roles-on-non-root-entity-types.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roles-on-non-root-entity-types.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/roles-on-non-root-entity-types.spec.ts"],"names":[],"mappings":";;AAAA,uCAAyF;AAEzF,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACtD,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QACzC,IAAA,gCAAsB,EAClB;;;;SAIH,EACG,4DAA4D,CAC/D,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC7C,IAAA,gCAAsB,EAClB;;;;SAIH,EACG,4DAA4D,CAC/D,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,IAAA,8CAAoC,EAAC;;;;;SAKpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QACxC,IAAA,8CAAoC,EAAC;;;;SAIpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./helpers");
4
- describe('root-entities-without-read-roles validator', () => {
5
- it('rejects @roles without read or readWrite', () => {
6
- (0, helpers_1.assertValidatorWarns)(`
7
- type Stuff @rootEntity @roles {
8
- foo: [String]
9
- }
10
- `, 'No roles with read access are specified. Access is denied for everyone.');
11
- });
12
- it('warns @roles with empty roles', () => {
13
- (0, helpers_1.assertValidatorWarns)(`
14
- type Stuff @rootEntity @roles(read: "") {
15
- foo: [String]
16
- }
17
- `, 'Specified empty string as role.');
18
- });
19
- it('accepts non-nested lists', () => {
20
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
21
- type Stuff @rootEntity @roles(readWrite: "reader") {
22
- foo: [String]
23
- }
24
- `);
25
- });
26
- });
27
- //# sourceMappingURL=root-entities-without-read-roles.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root-entities-without-read-roles.spec.js","sourceRoot":"","sources":["../../../../spec/schema/ast-validation-modules/root-entities-without-read-roles.spec.ts"],"names":[],"mappings":";;AAAA,uCAAuF;AAEvF,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACxD,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAChD,IAAA,8BAAoB,EAChB;;;;SAIH,EACG,yEAAyE,CAC5E,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACrC,IAAA,8BAAoB,EAChB;;;;SAIH,EACG,iCAAiC,CACpC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAChC,IAAA,8CAAoC,EAAC;;;;SAIpC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,405 +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('@root 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
- root: Root @root
15
- }
16
- `);
17
- });
18
- it('accepts embedding in other child entity', () => {
19
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
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
- root: Root @root
31
- }
32
- `);
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
- root: Root @root
47
- }
48
- `);
49
- });
50
- it('accepts embedding nested with multiple extension in between', () => {
51
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
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
- root: Root @root
71
- }
72
-
73
- type Child2 @childEntity {
74
- children: [Child3]
75
- root: Root @root
76
- }
77
-
78
- type Child3 @childEntity {
79
- extension: Extension4
80
- root: Root @root
81
- }
82
-
83
- type Extension4 @entityExtension {
84
- children: [Child4]
85
- }
86
-
87
- type Child4 @childEntity {
88
- name: String
89
- root: Root @root
90
- }
91
- `);
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
- root: Root @root
108
- }
109
- `);
110
- });
111
- it('accepts if embedded only by one entity type, but used with @collect in another', () => {
112
- (0, helpers_1.assertValidatorAcceptsAndDoesNotWarn)(`
113
- type Root @rootEntity {
114
- children: [Child]
115
- }
116
-
117
- type Root2 @rootEntity {
118
- roots: [Root] @relation
119
- rootChildren: [Child] @collect(path: "roots.children")
120
- }
121
-
122
- type Child @childEntity {
123
- name: String
124
- root: Root @root
125
- }
126
- `);
127
- });
128
- it('rejects with list', () => {
129
- (0, helpers_1.assertValidatorRejects)(`
130
- type Root @rootEntity {
131
- children: [Child]
132
- }
133
-
134
- type Child @childEntity {
135
- name: String
136
- root: [Child] @root
137
- }
138
- `, `A root field cannot be a list.`);
139
- });
140
- it('rejects in root entity types', () => {
141
- (0, helpers_1.assertValidatorRejects)(`
142
- type Root @rootEntity {
143
- name: String
144
- root: Root @root
145
- }
146
- `, `@root can only be used on fields of child entity types.`);
147
- });
148
- it('rejects in entity extensions', () => {
149
- (0, helpers_1.assertValidatorRejects)(`
150
- type Root @rootEntity {
151
- extension: Extension
152
- }
153
-
154
- type Extension @entityExtension {
155
- name: String
156
- root: Root @root
157
- }
158
- `, `@root can only be used on fields of child entity types.`);
159
- });
160
- it('rejects in value object', () => {
161
- (0, helpers_1.assertValidatorRejects)(`
162
- type Root @rootEntity {
163
- objects: [ValueObject]
164
- }
165
-
166
- type ValueObject @valueObject {
167
- name: String
168
- root: Root @root
169
- }
170
- `, `@root can only be used on fields of child entity types.`);
171
- });
172
- it('rejects if there is nothing but parent and root fields in a child entity', () => {
173
- (0, helpers_1.assertValidatorRejects)(`
174
- type Root @rootEntity {
175
- child: [Child]
176
- }
177
-
178
- type Child @childEntity {
179
- parent: Root @parent
180
- root: Root @root
181
- }
182
- `, `There need to be fields other than parent and root fields in a child entity type.`);
183
- });
184
- it('rejects in combination with @reference', () => {
185
- (0, helpers_1.assertValidatorRejects)(`
186
- type Root @rootEntity {
187
- children: [Child]
188
- key: String @key
189
- }
190
-
191
- type Child @childEntity {
192
- name: String
193
- root: Root @root @reference
194
- }
195
- `, `@root and @reference cannot be combined.`);
196
- });
197
- it('rejects in combination with @collect', () => {
198
- (0, helpers_1.assertValidatorRejects)(`
199
- type Root @rootEntity {
200
- children: [Child]
201
- }
202
-
203
- type Child @childEntity {
204
- children: [Grandchild]
205
- root: [Grandchild] @root @collect(path: "children")
206
- }
207
-
208
- type Grandchild @childEntity {
209
- field: String
210
- }
211
- `, `@root and @collect cannot be combined.`);
212
- });
213
- it('rejects in combination with @flexSearch', () => {
214
- (0, helpers_1.assertValidatorRejects)(`
215
- type Root @rootEntity {
216
- children: [Child]
217
- }
218
-
219
- type Child @childEntity {
220
- name: String
221
- root: Root @root @flexSearch
222
- }
223
- `, `@flexSearch is not supported on root fields.`);
224
- });
225
- it('rejects in combination with @flexSearchFulltext', () => {
226
- (0, helpers_1.assertValidatorRejects)(`
227
- type Root @rootEntity {
228
- children: [Child]
229
- }
230
-
231
- type Child @childEntity {
232
- name: String
233
- root: Root @root @flexSearchFulltext
234
- }
235
- `, `@flexSearchFulltext is not supported on type "Root".`);
236
- });
237
- it('rejects in combination with @defaultValue', () => {
238
- (0, helpers_1.assertValidatorRejects)(`
239
- type Root @rootEntity {
240
- children: [Child]
241
- }
242
-
243
- type Child @childEntity {
244
- name: String
245
- root: Root @root @defaultValue(value: { })
246
- }
247
- `, `Default values are not supported on root fields.`);
248
- });
249
- it('rejects in combination with @parent', () => {
250
- (0, helpers_1.assertValidatorRejects)(`
251
- type Root @rootEntity {
252
- children: [Child]
253
- }
254
-
255
- type Child @childEntity {
256
- name: String
257
- root: Root @root @parent
258
- }
259
- `, `@parent and @root cannot be combined.`);
260
- });
261
- it('rejects without usage', () => {
262
- (0, helpers_1.assertValidatorRejects)(`
263
- type Root @rootEntity {
264
- field: String
265
- }
266
-
267
- type Child @childEntity {
268
- name: String
269
- root: Root @root
270
- }
271
- `, `Type "Child" is not used by any root entity type and therefore cannot have a root field.`);
272
- });
273
- it('rejects with wrong type', () => {
274
- (0, helpers_1.assertValidatorRejects)(`
275
- type Root1 @rootEntity {
276
- children: [Child]
277
- }
278
-
279
- type Root2 @rootEntity {
280
- otherField: String
281
- }
282
-
283
- type Child @childEntity {
284
- name: String
285
- root: Root2 @root
286
- }
287
- `, `Type "Child" is used in root entity type "Root1", so the type of this root field should be "Root1".`);
288
- });
289
- it('rejects with another possible types', () => {
290
- (0, helpers_1.assertValidatorRejects)(`
291
- type Root1 @rootEntity {
292
- children: [Child]
293
- }
294
-
295
- type Root2 @rootEntity {
296
- children: [Child]
297
- }
298
-
299
- type Child @childEntity {
300
- name: String
301
- root: Root1 @root
302
- }
303
- `, `Type "Child" is used in root entity type "Root2" as well and thus cannot have a root field.`);
304
- });
305
- it('rejects with other possible types', () => {
306
- (0, helpers_1.assertValidatorRejects)(`
307
- type Root1 @rootEntity {
308
- children: [Child]
309
- }
310
-
311
- type Root2 @rootEntity {
312
- children: [Child]
313
- }
314
-
315
- type Root3 @rootEntity {
316
- children: [Child]
317
- }
318
-
319
- type Child @childEntity {
320
- name: String
321
- root: Root1 @root
322
- }
323
- `, `Type "Child" is used in root entity types "Root2" and "Root3" as well and thus cannot have a root field.`);
324
- });
325
- it('rejects with other possible types when types would not work at all', () => {
326
- (0, helpers_1.assertValidatorRejects)(`
327
- type Root1 @rootEntity {
328
- children: [Child]
329
- }
330
-
331
- type Root2 @rootEntity {
332
- children: [Child]
333
- }
334
-
335
- type Root3 @rootEntity {
336
- children: [Child]
337
- }
338
-
339
- type Root4 @rootEntity {
340
- field: String
341
- }
342
-
343
- type Child @childEntity {
344
- name: String
345
- root: Root4 @root
346
- }
347
- `, `Type "Child" is used in multiple root entity types ("Root1", "Root2" and "Root3") and thus cannot have a root field.`);
348
- });
349
- it('rejects if type would only work with @collect', () => {
350
- (0, helpers_1.assertValidatorRejects)(`
351
- type Root @rootEntity {
352
- children: [Child]
353
- }
354
-
355
- type Root2 @rootEntity {
356
- roots: [Root] @relation
357
- rootChildren: [Child] @collect(path: "roots.children")
358
- }
359
-
360
- type Child @childEntity {
361
- name: String
362
- root: Root2 @root
363
- }
364
- `, 'Type "Child" is used in root entity type "Root", so the type of this root field should be "Root".');
365
- });
366
- it('rejects if entity embedding extension is used instead', () => {
367
- (0, helpers_1.assertValidatorRejects)(`
368
- type Root @rootEntity {
369
- extension: Extension1
370
- }
371
-
372
- type Extension1 @entityExtension {
373
- extension: Extension2
374
- }
375
-
376
- type Extension2 @entityExtension {
377
- children: [Child]
378
- }
379
-
380
- type Child @childEntity {
381
- name: String
382
- root: Extension1 @root
383
- }
384
- `, 'Type "Child" is used in root entity type "Root", so the type of this root field should be "Root".');
385
- });
386
- it('rejects multiple @root fields', () => {
387
- const result = (0, helpers_1.validate)(`
388
- type Root @rootEntity {
389
- children: [Child]
390
- }
391
-
392
- type Child @childEntity {
393
- name: String
394
- root1: Root @root
395
- root2: Root @root
396
- }
397
- `);
398
- (0, chai_1.expect)(result.hasErrors()).to.be.true;
399
- (0, chai_1.expect)(result.messages.map((m) => m.message)).to.deep.equal([
400
- `There can only be one root field per type.`,
401
- `There can only be one root field per type.`,
402
- ]);
403
- });
404
- });
405
- //# sourceMappingURL=root-field.spec.js.map