@directus/api 34.0.1 → 35.0.0

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 (1702) hide show
  1. package/dist/__utils__/items-utils.js +32 -0
  2. package/dist/__utils__/schemas.js +297 -0
  3. package/dist/__utils__/snapshots.js +899 -0
  4. package/dist/_virtual/rolldown_runtime.js +38 -0
  5. package/dist/ai/chat/constants/system-prompt.js +5 -1
  6. package/dist/ai/chat/controllers/chat.post.js +69 -61
  7. package/dist/ai/chat/lib/create-ui-stream.js +71 -45
  8. package/dist/ai/chat/lib/transform-file-parts.js +43 -32
  9. package/dist/ai/chat/middleware/load-settings.js +42 -41
  10. package/dist/ai/chat/models/chat-request.js +77 -69
  11. package/dist/ai/chat/models/providers.js +23 -18
  12. package/dist/ai/chat/router.js +10 -5
  13. package/dist/ai/chat/utils/chat-request-tool-to-ai-sdk-tool.js +40 -36
  14. package/dist/ai/chat/utils/fix-error-tool-calls.js +30 -28
  15. package/dist/ai/chat/utils/format-context.js +87 -89
  16. package/dist/ai/chat/utils/parse-json-schema-7.js +84 -73
  17. package/dist/ai/devtools/index.js +38 -0
  18. package/dist/ai/files/adapters/anthropic.js +29 -24
  19. package/dist/ai/files/adapters/google.js +60 -57
  20. package/dist/ai/files/adapters/index.js +5 -3
  21. package/dist/ai/files/adapters/openai.js +26 -21
  22. package/dist/ai/files/controllers/upload.js +101 -95
  23. package/dist/ai/files/lib/fetch-provider.js +27 -22
  24. package/dist/ai/files/lib/upload-to-provider.js +32 -25
  25. package/dist/ai/files/router.js +10 -5
  26. package/dist/ai/files/types.js +1 -1
  27. package/dist/ai/mcp/index.js +3 -1
  28. package/dist/ai/mcp/server.js +293 -301
  29. package/dist/ai/mcp/transport.js +22 -18
  30. package/dist/ai/mcp/types.js +1 -1
  31. package/dist/ai/providers/anthropic-file-support.js +91 -89
  32. package/dist/ai/providers/anthropic-tool-search.js +33 -0
  33. package/dist/ai/providers/index.js +5 -3
  34. package/dist/ai/providers/options.js +27 -24
  35. package/dist/ai/providers/registry.js +65 -60
  36. package/dist/ai/providers/types.js +1 -1
  37. package/dist/ai/telemetry/braintrust.js +27 -0
  38. package/dist/ai/telemetry/index.js +79 -0
  39. package/dist/ai/telemetry/langfuse.js +67 -0
  40. package/dist/ai/tools/assets/index.js +56 -55
  41. package/dist/ai/tools/collections/index.js +96 -89
  42. package/dist/ai/tools/define-tool.js +6 -2
  43. package/dist/ai/tools/fields/index.js +157 -162
  44. package/dist/ai/tools/files/index.js +109 -104
  45. package/dist/ai/tools/flows/index.js +99 -87
  46. package/dist/ai/tools/folders/index.js +103 -98
  47. package/dist/ai/tools/index.js +32 -28
  48. package/dist/ai/tools/items/index.js +149 -146
  49. package/dist/ai/tools/operations/index.js +88 -80
  50. package/dist/ai/tools/relations/index.js +100 -91
  51. package/dist/ai/tools/schema/index.js +240 -302
  52. package/dist/ai/tools/schema.js +198 -205
  53. package/dist/ai/tools/system/index.js +23 -22
  54. package/dist/ai/tools/trigger-flow/index.js +62 -49
  55. package/dist/ai/tools/types.js +1 -1
  56. package/dist/ai/tools/utils.js +20 -15
  57. package/dist/app.js +296 -288
  58. package/dist/auth/auth.js +46 -41
  59. package/dist/auth/drivers/index.js +7 -5
  60. package/dist/auth/drivers/ldap.js +314 -342
  61. package/dist/auth/drivers/local.js +86 -89
  62. package/dist/auth/drivers/oauth2.js +369 -385
  63. package/dist/auth/drivers/openid.js +429 -447
  64. package/dist/auth/drivers/saml.js +172 -172
  65. package/dist/auth/utils/generate-callback-url.js +38 -35
  66. package/dist/auth/utils/resolve-login-redirect.js +54 -60
  67. package/dist/auth.js +66 -60
  68. package/dist/bus/index.js +3 -1
  69. package/dist/bus/lib/use-bus.js +29 -19
  70. package/dist/cache.js +136 -124
  71. package/dist/cli/commands/bootstrap/index.js +61 -59
  72. package/dist/cli/commands/cache/clear.js +33 -0
  73. package/dist/cli/commands/count/index.js +25 -21
  74. package/dist/cli/commands/database/install.js +20 -16
  75. package/dist/cli/commands/database/migrate.js +26 -23
  76. package/dist/cli/commands/init/index.js +116 -100
  77. package/dist/cli/commands/init/questions.js +86 -48
  78. package/dist/cli/commands/roles/create.js +51 -37
  79. package/dist/cli/commands/schema/apply.js +188 -203
  80. package/dist/cli/commands/schema/snapshot.js +55 -56
  81. package/dist/cli/commands/security/key.js +9 -4
  82. package/dist/cli/commands/security/secret.js +8 -4
  83. package/dist/cli/commands/users/create.js +35 -23
  84. package/dist/cli/commands/users/passwd.js +37 -35
  85. package/dist/cli/index.js +53 -90
  86. package/dist/cli/load-extensions.js +25 -19
  87. package/dist/cli/run.js +9 -7
  88. package/dist/cli/utils/create-db-connection.js +56 -54
  89. package/dist/cli/utils/create-env/index.js +33 -35
  90. package/dist/cli/utils/drivers.js +16 -13
  91. package/dist/constants.js +132 -89
  92. package/dist/controllers/access.js +137 -140
  93. package/dist/controllers/activity.js +47 -46
  94. package/dist/controllers/assets.js +200 -241
  95. package/dist/controllers/auth.js +175 -175
  96. package/dist/controllers/collections.js +99 -99
  97. package/dist/controllers/comments.js +136 -138
  98. package/dist/controllers/dashboards.js +131 -132
  99. package/dist/controllers/deployment-webhooks.js +92 -93
  100. package/dist/controllers/deployment.js +330 -350
  101. package/dist/controllers/extensions.js +205 -199
  102. package/dist/controllers/fields.js +155 -164
  103. package/dist/controllers/files.js +250 -269
  104. package/dist/controllers/flows.js +150 -151
  105. package/dist/controllers/folders.js +138 -141
  106. package/dist/controllers/graphql.js +33 -28
  107. package/dist/controllers/items.js +157 -172
  108. package/dist/controllers/mcp.js +33 -31
  109. package/dist/controllers/metrics.js +33 -29
  110. package/dist/controllers/not-found.js +35 -28
  111. package/dist/controllers/notifications.js +138 -141
  112. package/dist/controllers/operations.js +131 -132
  113. package/dist/controllers/panels.js +131 -132
  114. package/dist/controllers/permissions.js +162 -166
  115. package/dist/controllers/policies.js +155 -160
  116. package/dist/controllers/presets.js +138 -141
  117. package/dist/controllers/relations.js +96 -102
  118. package/dist/controllers/revisions.js +40 -32
  119. package/dist/controllers/roles.js +152 -152
  120. package/dist/controllers/schema.js +97 -92
  121. package/dist/controllers/server.js +84 -81
  122. package/dist/controllers/settings.js +44 -40
  123. package/dist/controllers/shares.js +180 -213
  124. package/dist/controllers/translations.js +138 -141
  125. package/dist/controllers/tus.js +70 -72
  126. package/dist/controllers/users.js +303 -308
  127. package/dist/controllers/utils.js +149 -134
  128. package/dist/controllers/versions.js +178 -176
  129. package/dist/database/errors/dialects/mssql.js +137 -153
  130. package/dist/database/errors/dialects/mysql.js +123 -137
  131. package/dist/database/errors/dialects/oracle.js +24 -20
  132. package/dist/database/errors/dialects/postgres.js +91 -94
  133. package/dist/database/errors/dialects/sqlite.js +48 -46
  134. package/dist/database/errors/dialects/types.js +1 -1
  135. package/dist/database/errors/translate.js +47 -42
  136. package/dist/database/get-ast-from-query/get-ast-from-query.js +51 -52
  137. package/dist/database/get-ast-from-query/lib/convert-wildcards.js +74 -78
  138. package/dist/database/get-ast-from-query/lib/parse-fields.js +231 -246
  139. package/dist/database/get-ast-from-query/utils/get-allowed-sort.js +31 -34
  140. package/dist/database/get-ast-from-query/utils/get-deep-query.js +20 -15
  141. package/dist/database/get-ast-from-query/utils/get-related-collection.js +16 -12
  142. package/dist/database/helpers/capabilities/dialects/default.js +7 -3
  143. package/dist/database/helpers/capabilities/dialects/mysql.js +11 -9
  144. package/dist/database/helpers/capabilities/dialects/postgres.js +14 -14
  145. package/dist/database/helpers/capabilities/index.js +18 -7
  146. package/dist/database/helpers/capabilities/types.js +20 -15
  147. package/dist/database/helpers/date/dialects/default.js +7 -3
  148. package/dist/database/helpers/date/dialects/mssql.js +13 -8
  149. package/dist/database/helpers/date/dialects/mysql.js +17 -12
  150. package/dist/database/helpers/date/dialects/oracle.js +27 -27
  151. package/dist/database/helpers/date/dialects/sqlite.js +27 -28
  152. package/dist/database/helpers/date/index.js +20 -7
  153. package/dist/database/helpers/date/types.js +25 -22
  154. package/dist/database/helpers/fn/dialects/mssql.js +64 -63
  155. package/dist/database/helpers/fn/dialects/mysql.js +70 -67
  156. package/dist/database/helpers/fn/dialects/oracle.js +64 -63
  157. package/dist/database/helpers/fn/dialects/postgres.js +87 -84
  158. package/dist/database/helpers/fn/dialects/sqlite.js +61 -78
  159. package/dist/database/helpers/fn/index.js +20 -7
  160. package/dist/database/helpers/fn/json/parse-function.js +60 -61
  161. package/dist/database/helpers/fn/types.js +48 -56
  162. package/dist/database/helpers/geometry/dialects/mssql.js +42 -34
  163. package/dist/database/helpers/geometry/dialects/mysql.js +21 -12
  164. package/dist/database/helpers/geometry/dialects/oracle.js +49 -37
  165. package/dist/database/helpers/geometry/dialects/postgres.js +27 -18
  166. package/dist/database/helpers/geometry/dialects/redshift.js +21 -12
  167. package/dist/database/helpers/geometry/dialects/sqlite.js +19 -10
  168. package/dist/database/helpers/geometry/index.js +21 -7
  169. package/dist/database/helpers/geometry/types.js +59 -51
  170. package/dist/database/helpers/index.js +26 -21
  171. package/dist/database/helpers/number/dialects/default.js +7 -3
  172. package/dist/database/helpers/number/dialects/mssql.js +16 -11
  173. package/dist/database/helpers/number/dialects/oracle.js +12 -7
  174. package/dist/database/helpers/number/dialects/postgres.js +18 -15
  175. package/dist/database/helpers/number/dialects/sqlite.js +12 -7
  176. package/dist/database/helpers/number/index.js +20 -7
  177. package/dist/database/helpers/number/types.js +14 -9
  178. package/dist/database/helpers/number/utils/decimal-limit.js +17 -9
  179. package/dist/database/helpers/number/utils/maybe-stringify-big-int.js +9 -5
  180. package/dist/database/helpers/number/utils/number-in-range.js +18 -19
  181. package/dist/database/helpers/schema/dialects/cockroachdb.js +63 -81
  182. package/dist/database/helpers/schema/dialects/default.js +7 -3
  183. package/dist/database/helpers/schema/dialects/mssql.js +64 -84
  184. package/dist/database/helpers/schema/dialects/mysql.js +61 -103
  185. package/dist/database/helpers/schema/dialects/oracle.js +96 -116
  186. package/dist/database/helpers/schema/dialects/postgres.js +41 -52
  187. package/dist/database/helpers/schema/dialects/sqlite.js +31 -29
  188. package/dist/database/helpers/schema/index.js +22 -7
  189. package/dist/database/helpers/schema/types.js +151 -154
  190. package/dist/database/helpers/schema/utils/prep-query-params.js +38 -34
  191. package/dist/database/helpers/sequence/dialects/default.js +7 -3
  192. package/dist/database/helpers/sequence/dialects/postgres.js +23 -13
  193. package/dist/database/helpers/sequence/index.js +17 -7
  194. package/dist/database/helpers/sequence/types.js +11 -6
  195. package/dist/database/helpers/types.js +9 -6
  196. package/dist/database/index.js +255 -287
  197. package/dist/database/migrations/20201028A-remove-collection-foreign-keys.js +44 -40
  198. package/dist/database/migrations/20201029A-remove-system-relations.js +122 -120
  199. package/dist/database/migrations/20201029B-remove-system-collections.js +96 -91
  200. package/dist/database/migrations/20201029C-remove-system-fields.js +1527 -1636
  201. package/dist/database/migrations/20201105A-add-cascade-system-relations.js +114 -126
  202. package/dist/database/migrations/20201105B-change-webhook-url-type.js +15 -10
  203. package/dist/database/migrations/20210225A-add-relations-sort-field.js +30 -28
  204. package/dist/database/migrations/20210304A-remove-locked-fields.js +12 -8
  205. package/dist/database/migrations/20210312A-webhooks-collections-text.js +15 -10
  206. package/dist/database/migrations/20210331A-add-refresh-interval.js +12 -8
  207. package/dist/database/migrations/20210415A-make-filesize-nullable.js +18 -13
  208. package/dist/database/migrations/20210416A-add-collections-accountability.js +13 -9
  209. package/dist/database/migrations/20210422A-remove-files-interface.js +7 -5
  210. package/dist/database/migrations/20210506A-rename-interfaces.js +77 -70
  211. package/dist/database/migrations/20210510A-restructure-relations.js +26 -25
  212. package/dist/database/migrations/20210518A-add-foreign-key-constraints.js +83 -106
  213. package/dist/database/migrations/20210519A-add-system-fk-triggers.js +143 -162
  214. package/dist/database/migrations/20210521A-add-collections-icon-color.js +12 -8
  215. package/dist/database/migrations/20210525A-add-insights.js +33 -29
  216. package/dist/database/migrations/20210608A-add-deep-clone-config.js +12 -8
  217. package/dist/database/migrations/20210626A-change-filesize-bigint.js +22 -17
  218. package/dist/database/migrations/20210716A-add-conditions-to-fields.js +12 -8
  219. package/dist/database/migrations/20210721A-add-default-folder.js +16 -16
  220. package/dist/database/migrations/20210802A-replace-groups.js +35 -44
  221. package/dist/database/migrations/20210803A-add-required-to-fields.js +12 -8
  222. package/dist/database/migrations/20210805A-update-groups.js +26 -27
  223. package/dist/database/migrations/20210805B-change-image-metadata-structure.js +67 -82
  224. package/dist/database/migrations/20210811A-add-geometry-config.js +14 -10
  225. package/dist/database/migrations/20210831A-remove-limit-column.js +12 -8
  226. package/dist/database/migrations/20210903A-add-auth-provider.js +38 -33
  227. package/dist/database/migrations/20210907A-webhooks-collections-not-null.js +14 -11
  228. package/dist/database/migrations/20210910A-move-module-setup.js +18 -14
  229. package/dist/database/migrations/20210920A-webhooks-url-not-null.js +18 -19
  230. package/dist/database/migrations/20210924A-add-collection-organization.js +19 -17
  231. package/dist/database/migrations/20210927A-replace-fields-group.js +48 -48
  232. package/dist/database/migrations/20210927B-replace-m2m-interface.js +8 -14
  233. package/dist/database/migrations/20210929A-rename-login-action.js +8 -12
  234. package/dist/database/migrations/20211007A-update-presets.js +79 -96
  235. package/dist/database/migrations/20211009A-add-auth-data.js +12 -8
  236. package/dist/database/migrations/20211016A-add-webhook-headers.js +12 -8
  237. package/dist/database/migrations/20211103A-set-unique-to-user-token.js +12 -8
  238. package/dist/database/migrations/20211103B-update-special-geometry.js +8 -18
  239. package/dist/database/migrations/20211104A-remove-collections-listing.js +12 -8
  240. package/dist/database/migrations/20211118A-add-notifications.js +28 -23
  241. package/dist/database/migrations/20211211A-add-shares.js +37 -37
  242. package/dist/database/migrations/20211230A-add-project-descriptor.js +12 -8
  243. package/dist/database/migrations/20220303A-remove-default-project-color.js +20 -15
  244. package/dist/database/migrations/20220308A-add-bookmark-icon-and-color.js +14 -10
  245. package/dist/database/migrations/20220314A-add-translation-strings.js +12 -8
  246. package/dist/database/migrations/20220322A-rename-field-typecast-flags.js +59 -70
  247. package/dist/database/migrations/20220323A-add-field-validation.js +14 -10
  248. package/dist/database/migrations/20220325A-fix-typecast-flags.js +36 -43
  249. package/dist/database/migrations/20220325B-add-default-language.js +26 -21
  250. package/dist/database/migrations/20220402A-remove-default-value-panel-icon.js +20 -15
  251. package/dist/database/migrations/20220429A-add-flows.js +80 -75
  252. package/dist/database/migrations/20220429B-add-color-to-insights-icon.js +12 -8
  253. package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.js +12 -8
  254. package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.js +12 -8
  255. package/dist/database/migrations/20220614A-rename-hook-trigger-to-event.js +8 -4
  256. package/dist/database/migrations/20220801A-update-notifications-timestamp-column.js +15 -12
  257. package/dist/database/migrations/20220802A-add-custom-aspect-ratios.js +12 -8
  258. package/dist/database/migrations/20220826A-add-origin-to-accountability.js +18 -14
  259. package/dist/database/migrations/20230401A-update-material-icons.js +22 -17
  260. package/dist/database/migrations/20230525A-add-preview-settings.js +12 -8
  261. package/dist/database/migrations/20230526A-migrate-translation-strings.js +56 -48
  262. package/dist/database/migrations/20230721A-require-shares-fields.js +52 -48
  263. package/dist/database/migrations/20230823A-add-content-versioning.js +34 -36
  264. package/dist/database/migrations/20230927A-themes.js +51 -47
  265. package/dist/database/migrations/20231009A-update-csv-fields-to-text.js +42 -38
  266. package/dist/database/migrations/20231009B-update-panel-options.js +64 -75
  267. package/dist/database/migrations/20231010A-add-extensions.js +11 -7
  268. package/dist/database/migrations/20231215A-add-focalpoints.js +14 -10
  269. package/dist/database/migrations/20240122A-add-report-url-fields.js +16 -12
  270. package/dist/database/migrations/20240204A-marketplace.js +98 -99
  271. package/dist/database/migrations/20240305A-change-useragent-type.js +16 -17
  272. package/dist/database/migrations/20240311A-deprecate-webhooks.js +97 -121
  273. package/dist/database/migrations/20240422A-public-registration.js +16 -12
  274. package/dist/database/migrations/20240515A-add-session-window.js +12 -8
  275. package/dist/database/migrations/20240701A-add-tus-data.js +14 -10
  276. package/dist/database/migrations/20240716A-update-files-date-fields.js +29 -27
  277. package/dist/database/migrations/20240806A-permissions-policies.js +202 -262
  278. package/dist/database/migrations/20240817A-update-icon-fields-length.js +50 -53
  279. package/dist/database/migrations/20240909A-separate-comments.js +53 -60
  280. package/dist/database/migrations/20240909B-consolidate-content-versioning.js +12 -8
  281. package/dist/database/migrations/20240924A-migrate-legacy-comments.js +67 -79
  282. package/dist/database/migrations/20240924B-populate-versioning-deltas.js +26 -31
  283. package/dist/database/migrations/20250224A-visual-editor.js +31 -31
  284. package/dist/database/migrations/20250609A-license-banner.js +17 -12
  285. package/dist/database/migrations/20250613A-add-project-id.js +22 -24
  286. package/dist/database/migrations/20250718A-add-direction.js +12 -8
  287. package/dist/database/migrations/20250813A-add-mcp.js +20 -16
  288. package/dist/database/migrations/20251012A-add-field-searchable.js +12 -8
  289. package/dist/database/migrations/20251014A-add-project-owner.js +40 -35
  290. package/dist/database/migrations/20251028A-add-retention-indexes.js +53 -40
  291. package/dist/database/migrations/20251103A-add-ai-settings.js +16 -12
  292. package/dist/database/migrations/20251224A-remove-webhooks.js +21 -17
  293. package/dist/database/migrations/20260110A-add-ai-provider-settings.js +45 -33
  294. package/dist/database/migrations/20260113A-add-revisions-index.js +49 -39
  295. package/dist/database/migrations/20260128A-add-collaborative-editing.js +12 -8
  296. package/dist/database/migrations/20260204A-add-deployment.js +34 -30
  297. package/dist/database/migrations/20260211A-add-deployment-webhooks.js +39 -35
  298. package/dist/database/migrations/run.js +113 -109
  299. package/dist/database/run-ast/lib/apply-query/add-join.js +81 -85
  300. package/dist/database/run-ast/lib/apply-query/aggregate.js +34 -23
  301. package/dist/database/run-ast/lib/apply-query/filter/get-filter-type.js +27 -19
  302. package/dist/database/run-ast/lib/apply-query/filter/index.js +136 -150
  303. package/dist/database/run-ast/lib/apply-query/filter/operator.js +174 -182
  304. package/dist/database/run-ast/lib/apply-query/filter/validate-operator.js +17 -17
  305. package/dist/database/run-ast/lib/apply-query/get-filter-path.js +17 -12
  306. package/dist/database/run-ast/lib/apply-query/get-operation.js +26 -17
  307. package/dist/database/run-ast/lib/apply-query/index.js +88 -88
  308. package/dist/database/run-ast/lib/apply-query/join-filter-with-cases.js +13 -11
  309. package/dist/database/run-ast/lib/apply-query/mock.js +9 -4
  310. package/dist/database/run-ast/lib/apply-query/pagination.js +14 -9
  311. package/dist/database/run-ast/lib/apply-query/search.js +75 -77
  312. package/dist/database/run-ast/lib/apply-query/sort.js +90 -86
  313. package/dist/database/run-ast/lib/get-db-query.js +181 -241
  314. package/dist/database/run-ast/lib/parse-current-level.js +54 -47
  315. package/dist/database/run-ast/modules/fetch-permitted-ast-root-fields.js +44 -27
  316. package/dist/database/run-ast/run-ast.js +131 -129
  317. package/dist/database/run-ast/types.js +1 -1
  318. package/dist/database/run-ast/utils/apply-case-when.js +29 -26
  319. package/dist/database/run-ast/utils/apply-function-to-column-name.js +29 -26
  320. package/dist/database/run-ast/utils/apply-parent-filters.js +58 -56
  321. package/dist/database/run-ast/utils/generate-alias.js +48 -52
  322. package/dist/database/run-ast/utils/get-column-pre-processor.js +66 -66
  323. package/dist/database/run-ast/utils/get-column.js +64 -64
  324. package/dist/database/run-ast/utils/get-field-alias.js +9 -5
  325. package/dist/database/run-ast/utils/get-inner-query-column-pre-processor.js +30 -23
  326. package/dist/database/run-ast/utils/merge-with-parent-items.js +127 -137
  327. package/dist/database/run-ast/utils/remove-temporary-fields.js +70 -78
  328. package/dist/database/run-ast/utils/with-preprocess-bindings.js +17 -14
  329. package/dist/database/seeds/run.js +77 -78
  330. package/dist/deployment/deployment.js +34 -29
  331. package/dist/deployment/drivers/index.js +4 -2
  332. package/dist/deployment/drivers/netlify.js +372 -358
  333. package/dist/deployment/drivers/vercel.js +276 -285
  334. package/dist/deployment/index.js +6 -2
  335. package/dist/deployment.js +66 -62
  336. package/dist/emitter.js +101 -89
  337. package/dist/extensions/index.js +12 -7
  338. package/dist/extensions/lib/get-extensions-path.js +13 -8
  339. package/dist/extensions/lib/get-extensions-settings.js +117 -128
  340. package/dist/extensions/lib/get-extensions.js +20 -11
  341. package/dist/extensions/lib/get-shared-deps-mapping.js +30 -26
  342. package/dist/extensions/lib/installation/index.js +12 -7
  343. package/dist/extensions/lib/installation/manager.js +100 -95
  344. package/dist/extensions/lib/sandbox/generate-api-extensions-sandbox-entrypoint.js +66 -43
  345. package/dist/extensions/lib/sandbox/generate-host-function-reference.js +19 -16
  346. package/dist/extensions/lib/sandbox/register/action.js +23 -17
  347. package/dist/extensions/lib/sandbox/register/call-reference.js +28 -21
  348. package/dist/extensions/lib/sandbox/register/filter.js +26 -20
  349. package/dist/extensions/lib/sandbox/register/index.js +7 -5
  350. package/dist/extensions/lib/sandbox/register/operation.js +27 -21
  351. package/dist/extensions/lib/sandbox/register/route.js +52 -43
  352. package/dist/extensions/lib/sandbox/sdk/generators/index.js +5 -3
  353. package/dist/extensions/lib/sandbox/sdk/generators/log.js +14 -11
  354. package/dist/extensions/lib/sandbox/sdk/generators/request.js +56 -48
  355. package/dist/extensions/lib/sandbox/sdk/generators/sleep.js +13 -10
  356. package/dist/extensions/lib/sandbox/sdk/index.js +4 -2
  357. package/dist/extensions/lib/sandbox/sdk/instantiate.js +32 -26
  358. package/dist/extensions/lib/sandbox/sdk/sdk.js +32 -9
  359. package/dist/extensions/lib/sandbox/sdk/utils/index.js +3 -1
  360. package/dist/extensions/lib/sandbox/sdk/utils/wrap.js +50 -47
  361. package/dist/extensions/lib/sync/status.js +30 -29
  362. package/dist/extensions/lib/sync/sync.js +83 -89
  363. package/dist/extensions/lib/sync/tracker.js +68 -71
  364. package/dist/extensions/lib/sync/utils.js +53 -54
  365. package/dist/extensions/lib/wrap-embeds.js +9 -6
  366. package/dist/extensions/manager.js +718 -746
  367. package/dist/flows.js +574 -427
  368. package/dist/index.js +3 -1
  369. package/dist/lock/index.js +3 -1
  370. package/dist/lock/lib/use-lock.js +28 -18
  371. package/dist/logger/index.js +186 -179
  372. package/dist/logger/logs-stream.js +45 -40
  373. package/dist/logger/redact-query.js +16 -12
  374. package/dist/mailer.js +61 -60
  375. package/dist/metrics/index.js +3 -1
  376. package/dist/metrics/lib/create-metrics.js +250 -233
  377. package/dist/metrics/lib/use-metrics.js +19 -14
  378. package/dist/metrics/types/metric.js +1 -1
  379. package/dist/middleware/authenticate.js +46 -47
  380. package/dist/middleware/cache.js +61 -57
  381. package/dist/middleware/collection-exists.js +24 -24
  382. package/dist/middleware/cors.js +17 -12
  383. package/dist/middleware/error-handler.js +77 -86
  384. package/dist/middleware/extract-token.js +37 -43
  385. package/dist/middleware/graphql.js +70 -68
  386. package/dist/middleware/rate-limiter-global.js +41 -38
  387. package/dist/middleware/rate-limiter-ip.js +36 -29
  388. package/dist/middleware/rate-limiter-registration.js +32 -29
  389. package/dist/middleware/request-counter.js +28 -0
  390. package/dist/middleware/respond.js +97 -109
  391. package/dist/middleware/sanitize-query.js +25 -27
  392. package/dist/middleware/schema.js +11 -6
  393. package/dist/middleware/use-collection.js +10 -5
  394. package/dist/middleware/validate-batch.js +41 -42
  395. package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +445 -0
  396. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/index.js +176 -0
  397. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/system/policy.js +54 -0
  398. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/any/any.js +13 -0
  399. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/any/index.js +3 -0
  400. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/argument/argument.js +15 -0
  401. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/argument/index.js +3 -0
  402. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/array/array.js +16 -0
  403. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/array/index.js +3 -0
  404. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.js +16 -0
  405. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/async-iterator/index.js +3 -0
  406. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.js +37 -0
  407. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/awaited/index.js +3 -0
  408. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.js +16 -0
  409. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/bigint/index.js +3 -0
  410. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.js +16 -0
  411. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/boolean/index.js +3 -0
  412. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/clone/index.js +4 -0
  413. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/clone/type.js +17 -0
  414. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/clone/value.js +35 -0
  415. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/composite/composite.js +42 -0
  416. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/composite/index.js +3 -0
  417. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/computed/computed.js +16 -0
  418. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/computed/index.js +3 -0
  419. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/const/const.js +52 -0
  420. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/const/index.js +3 -0
  421. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.js +17 -0
  422. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor/index.js +3 -0
  423. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.js +14 -0
  424. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/index.js +3 -0
  425. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/create/immutable.js +32 -0
  426. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/create/index.js +3 -0
  427. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/create/type.js +20 -0
  428. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/date/date.js +15 -0
  429. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/date/index.js +3 -0
  430. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/discard/discard.js +12 -0
  431. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/discard/index.js +3 -0
  432. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/enum/enum.js +23 -0
  433. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/enum/index.js +3 -0
  434. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/error/error.js +10 -0
  435. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/error/index.js +3 -0
  436. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.js +20 -0
  437. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.js +11 -0
  438. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.js +25 -0
  439. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/exclude/index.js +5 -0
  440. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.js +267 -0
  441. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.js +29 -0
  442. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.js +21 -0
  443. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends-undefined.js +21 -0
  444. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/extends.js +20 -0
  445. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extends/index.js +7 -0
  446. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.js +20 -0
  447. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.js +11 -0
  448. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/extract.js +25 -0
  449. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/extract/index.js +5 -0
  450. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/function/function.js +17 -0
  451. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/function/index.js +3 -0
  452. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/index.js +5 -0
  453. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/kind.js +204 -0
  454. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/type.js +293 -0
  455. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/value.js +68 -0
  456. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/helpers/helpers.js +8 -0
  457. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/helpers/index.js +3 -0
  458. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/index.js +6 -0
  459. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.js +27 -0
  460. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.js +24 -0
  461. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.js +24 -0
  462. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.js +67 -0
  463. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instance-type/index.js +3 -0
  464. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.js +13 -0
  465. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instantiate/index.js +3 -0
  466. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.js +102 -0
  467. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/integer/index.js +3 -0
  468. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/integer/integer.js +15 -0
  469. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/index.js +5 -0
  470. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.js +23 -0
  471. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.js +35 -0
  472. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-type.js +3 -0
  473. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.js +17 -0
  474. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.js +10 -0
  475. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/index.js +8 -0
  476. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.js +30 -0
  477. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.js +54 -0
  478. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.js +10 -0
  479. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.js +10 -0
  480. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.js +10 -0
  481. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/iterator/index.js +3 -0
  482. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.js +16 -0
  483. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/index.js +6 -0
  484. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.js +21 -0
  485. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-entries.js +17 -0
  486. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.js +52 -0
  487. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.js +38 -0
  488. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/literal/index.js +3 -0
  489. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/literal/literal.js +16 -0
  490. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/index.js +5 -0
  491. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-key.js +14 -0
  492. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.js +14 -0
  493. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.js +86 -0
  494. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/module/compute.js +144 -0
  495. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/module/index.js +3 -0
  496. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/module/module.js +44 -0
  497. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/never/index.js +3 -0
  498. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/never/never.js +15 -0
  499. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/not/index.js +3 -0
  500. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/not/not.js +15 -0
  501. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/null/index.js +3 -0
  502. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/null/null.js +15 -0
  503. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/number/index.js +3 -0
  504. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/number/number.js +15 -0
  505. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/object/index.js +3 -0
  506. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/object/object.js +33 -0
  507. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/index.js +5 -0
  508. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.js +27 -0
  509. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.js +21 -0
  510. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/omit/omit.js +65 -0
  511. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/optional/index.js +4 -0
  512. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.js +20 -0
  513. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/optional/optional.js +29 -0
  514. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/parameters/index.js +3 -0
  515. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.js +14 -0
  516. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/partial/index.js +4 -0
  517. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.js +21 -0
  518. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/partial/partial.js +62 -0
  519. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/patterns/index.js +3 -0
  520. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.js +12 -0
  521. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/index.js +5 -0
  522. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.js +27 -0
  523. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.js +21 -0
  524. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/pick/pick.js +63 -0
  525. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/promise/index.js +3 -0
  526. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/promise/promise.js +16 -0
  527. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly/index.js +4 -0
  528. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.js +20 -0
  529. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.js +29 -0
  530. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/index.js +3 -0
  531. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.js +13 -0
  532. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/record/index.js +3 -0
  533. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/record/record.js +92 -0
  534. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/recursive/index.js +3 -0
  535. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.js +24 -0
  536. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/ref/index.js +3 -0
  537. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/ref/ref.js +19 -0
  538. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/regexp/index.js +3 -0
  539. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.js +19 -0
  540. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/registry/format.js +30 -0
  541. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/registry/index.js +4 -0
  542. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/registry/type.js +30 -0
  543. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/required/index.js +4 -0
  544. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.js +20 -0
  545. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/required/required.js +60 -0
  546. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/rest/index.js +3 -0
  547. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/rest/rest.js +13 -0
  548. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/return-type/index.js +3 -0
  549. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.js +13 -0
  550. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/schema/anyschema.js +1 -0
  551. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/schema/index.js +4 -0
  552. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/schema/schema.js +3 -0
  553. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/sets/index.js +3 -0
  554. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/sets/set.js +42 -0
  555. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/static/index.js +3 -0
  556. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/static/static.js +1 -0
  557. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/string/index.js +3 -0
  558. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/string/string.js +15 -0
  559. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbol/index.js +3 -0
  560. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.js +15 -0
  561. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbols/index.js +3 -0
  562. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.js +14 -0
  563. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.js +28 -0
  564. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.js +37 -0
  565. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/index.js +9 -0
  566. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.js +125 -0
  567. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.js +24 -0
  568. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.js +55 -0
  569. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.js +20 -0
  570. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.js +16 -0
  571. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/transform/index.js +3 -0
  572. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/transform/transform.js +51 -0
  573. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/tuple/index.js +3 -0
  574. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.js +24 -0
  575. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/index.js +10 -0
  576. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/javascript.js +123 -0
  577. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/json.js +263 -0
  578. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/type/type.js +191 -0
  579. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/uint8array/index.js +3 -0
  580. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.js +15 -0
  581. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/undefined/index.js +3 -0
  582. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.js +15 -0
  583. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/index.js +5 -0
  584. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union-create.js +14 -0
  585. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.js +33 -0
  586. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union-type.js +3 -0
  587. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/union/union.js +13 -0
  588. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unknown/index.js +3 -0
  589. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.js +12 -0
  590. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unsafe/index.js +3 -0
  591. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.js +12 -0
  592. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/void/index.js +3 -0
  593. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/void/void.js +15 -0
  594. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/value/guard/guard.js +140 -0
  595. package/dist/node_modules/.pnpm/@sinclair_typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/value/guard/index.js +3 -0
  596. package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +1714 -0
  597. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +1287 -0
  598. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +2151 -0
  599. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/index.js +8 -0
  600. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/utils.js +8 -0
  601. package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +2082 -0
  602. package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +192 -0
  603. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +158 -0
  604. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +1535 -0
  605. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +155 -0
  606. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js +244 -0
  607. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +621 -0
  608. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js +890 -0
  609. package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3558 -0
  610. package/dist/node_modules/.pnpm/expect-type@1.2.2/node_modules/expect-type/dist/branding.js +13 -0
  611. package/dist/node_modules/.pnpm/expect-type@1.2.2/node_modules/expect-type/dist/index.js +115 -0
  612. package/dist/node_modules/.pnpm/expect-type@1.2.2/node_modules/expect-type/dist/messages.js +77 -0
  613. package/dist/node_modules/.pnpm/expect-type@1.2.2/node_modules/expect-type/dist/overloads.js +13 -0
  614. package/dist/node_modules/.pnpm/expect-type@1.2.2/node_modules/expect-type/dist/utils.js +30 -0
  615. package/dist/node_modules/.pnpm/js-tokens@9.0.1/node_modules/js-tokens/index.js +398 -0
  616. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/MockClient.js +79 -0
  617. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/MockConnection.js +64 -0
  618. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/Tracker.js +185 -0
  619. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/constants.js +30 -0
  620. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/index.js +37 -0
  621. package/dist/node_modules/.pnpm/knex-mock-client@3.0.2_knex@3.1.0_mysql2@3.15.3_pg@8.16.3_sqlite3@5.1.7_tedious@18.6.1_/node_modules/knex-mock-client/dist/utils.js +17 -0
  622. package/dist/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js +1486 -0
  623. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
  624. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +18 -0
  625. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
  626. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +19 -0
  627. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +15 -0
  628. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +39 -0
  629. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +14 -0
  630. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +141 -0
  631. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +43 -0
  632. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +138 -0
  633. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
  634. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +22 -0
  635. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +27 -0
  636. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
  637. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
  638. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
  639. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +27 -0
  640. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +10 -0
  641. package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +36 -0
  642. package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +1258 -0
  643. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.js +21 -0
  644. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +478 -0
  645. package/dist/node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.js +84 -0
  646. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +85 -0
  647. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js +15 -0
  648. package/dist/node_modules/.pnpm/tinyspy@4.0.4/node_modules/tinyspy/dist/index.js +158 -0
  649. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +8 -0
  650. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/benchmark.CYdenmiT.js +41 -0
  651. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
  652. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/index.CdQS2e2Q.js +38 -0
  653. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +66 -0
  654. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +2986 -0
  655. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_node@22.13.14_@vitest_ui@3.2.4_happy-dom@20.0.10_jiti@2.6.1_jsdom@2_4abc0aa80426c2cc5a9175f21e1d4ebb/node_modules/vitest/dist/index.js +24 -0
  656. package/dist/operations/condition/index.js +23 -21
  657. package/dist/operations/exec/index.js +49 -44
  658. package/dist/operations/item-create/index.js +49 -36
  659. package/dist/operations/item-delete/index.js +56 -44
  660. package/dist/operations/item-read/index.js +56 -44
  661. package/dist/operations/item-update/index.js +62 -51
  662. package/dist/operations/json-web-token/index.js +33 -35
  663. package/dist/operations/log/index.js +14 -9
  664. package/dist/operations/mail/index.js +39 -25
  665. package/dist/operations/mail/rate-limiter.js +26 -25
  666. package/dist/operations/notification/index.js +52 -42
  667. package/dist/operations/request/index.js +47 -39
  668. package/dist/operations/sleep/index.js +11 -6
  669. package/dist/operations/throw-error/index.js +14 -9
  670. package/dist/operations/transform/index.js +12 -7
  671. package/dist/operations/trigger/index.js +42 -37
  672. package/dist/packages/types/dist/index.js +403 -0
  673. package/dist/permissions/cache.js +28 -25
  674. package/dist/permissions/lib/fetch-permissions.js +33 -26
  675. package/dist/permissions/lib/fetch-policies.js +42 -41
  676. package/dist/permissions/lib/fetch-roles-tree.js +10 -5
  677. package/dist/permissions/lib/with-app-minimal-permissions.js +14 -9
  678. package/dist/permissions/modules/fetch-accountability-collection-access/fetch-accountability-collection-access.js +56 -54
  679. package/dist/permissions/modules/fetch-accountability-policy-globals/fetch-accountability-policy-globals.js +14 -15
  680. package/dist/permissions/modules/fetch-allowed-collections/fetch-allowed-collections.js +26 -11
  681. package/dist/permissions/modules/fetch-allowed-field-map/fetch-allowed-field-map.js +40 -25
  682. package/dist/permissions/modules/fetch-allowed-fields/fetch-allowed-fields.js +34 -19
  683. package/dist/permissions/modules/fetch-global-access/fetch-global-access.js +33 -26
  684. package/dist/permissions/modules/fetch-inconsistent-field-map/fetch-inconsistent-field-map.js +38 -25
  685. package/dist/permissions/modules/fetch-policies-ip-access/fetch-policies-ip-access.js +27 -27
  686. package/dist/permissions/modules/process-ast/lib/extract-fields-from-children.js +33 -48
  687. package/dist/permissions/modules/process-ast/lib/extract-fields-from-query.js +55 -55
  688. package/dist/permissions/modules/process-ast/lib/field-map-from-ast.js +15 -7
  689. package/dist/permissions/modules/process-ast/lib/get-cases.js +30 -39
  690. package/dist/permissions/modules/process-ast/lib/inject-cases.js +44 -50
  691. package/dist/permissions/modules/process-ast/process-ast.js +45 -38
  692. package/dist/permissions/modules/process-ast/types.js +1 -1
  693. package/dist/permissions/modules/process-ast/utils/collections-in-field-map.js +10 -6
  694. package/dist/permissions/modules/process-ast/utils/context-has-dynamic-variables.js +6 -2
  695. package/dist/permissions/modules/process-ast/utils/dedupe-access.js +32 -28
  696. package/dist/permissions/modules/process-ast/utils/extract-paths-from-query.js +54 -58
  697. package/dist/permissions/modules/process-ast/utils/find-related-collection.js +12 -8
  698. package/dist/permissions/modules/process-ast/utils/flatten-filter.js +30 -33
  699. package/dist/permissions/modules/process-ast/utils/format-a2o-key.js +6 -2
  700. package/dist/permissions/modules/process-ast/utils/get-info-for-path.js +13 -6
  701. package/dist/permissions/modules/process-ast/utils/has-item-permissions.js +6 -2
  702. package/dist/permissions/modules/process-ast/utils/stringify-query-path.js +6 -2
  703. package/dist/permissions/modules/process-ast/utils/validate-path/create-error.js +13 -14
  704. package/dist/permissions/modules/process-ast/utils/validate-path/validate-path-existence.js +16 -11
  705. package/dist/permissions/modules/process-ast/utils/validate-path/validate-path-permissions.js +28 -27
  706. package/dist/permissions/modules/process-payload/lib/is-field-nullable.js +13 -10
  707. package/dist/permissions/modules/process-payload/process-payload.js +77 -82
  708. package/dist/permissions/modules/validate-access/lib/validate-collection-access.js +19 -9
  709. package/dist/permissions/modules/validate-access/lib/validate-item-access.js +108 -99
  710. package/dist/permissions/modules/validate-access/validate-access.js +33 -39
  711. package/dist/permissions/modules/validate-remaining-admin/validate-remaining-admin-count.js +10 -7
  712. package/dist/permissions/modules/validate-remaining-admin/validate-remaining-admin-users.js +14 -9
  713. package/dist/permissions/types.js +1 -1
  714. package/dist/permissions/utils/create-default-accountability.js +14 -10
  715. package/dist/permissions/utils/default-permission.js +10 -6
  716. package/dist/permissions/utils/extract-required-dynamic-variable-context.js +47 -42
  717. package/dist/permissions/utils/fetch-dynamic-variable-data.js +62 -69
  718. package/dist/permissions/utils/fetch-raw-permissions.js +33 -37
  719. package/dist/permissions/utils/fetch-share-info.js +17 -8
  720. package/dist/permissions/utils/filter-policies-by-ip.js +16 -14
  721. package/dist/permissions/utils/get-permissions-for-share.js +163 -176
  722. package/dist/permissions/utils/get-unaliased-field-key.js +21 -23
  723. package/dist/permissions/utils/merge-fields.js +23 -28
  724. package/dist/permissions/utils/merge-permissions.js +78 -104
  725. package/dist/permissions/utils/process-permissions.js +15 -10
  726. package/dist/permissions/utils/with-cache.js +30 -25
  727. package/dist/rate-limiter.js +28 -26
  728. package/dist/redis/index.js +5 -3
  729. package/dist/redis/lib/create-redis.js +15 -10
  730. package/dist/redis/lib/use-redis.js +21 -19
  731. package/dist/redis/utils/redis-config-available.js +14 -9
  732. package/dist/request/agent-with-ip-validation.js +27 -35
  733. package/dist/request/index.js +19 -14
  734. package/dist/request/is-denied-ip.js +41 -39
  735. package/dist/schedules/metrics.js +45 -42
  736. package/dist/schedules/project.js +26 -25
  737. package/dist/schedules/retention.js +105 -106
  738. package/dist/schedules/telemetry.js +30 -26
  739. package/dist/schedules/tus.js +24 -21
  740. package/dist/server.js +155 -151
  741. package/dist/services/access.js +43 -43
  742. package/dist/services/activity.js +11 -6
  743. package/dist/services/assets/name-deduper.js +28 -23
  744. package/dist/services/assets.js +292 -300
  745. package/dist/services/authentication.js +410 -444
  746. package/dist/services/collections.js +592 -646
  747. package/dist/services/comments.js +143 -132
  748. package/dist/services/dashboards.js +11 -6
  749. package/dist/services/deployment-projects.js +135 -138
  750. package/dist/services/deployment-runs.js +87 -92
  751. package/dist/services/deployment.js +459 -449
  752. package/dist/services/extensions.js +211 -227
  753. package/dist/services/fields/build-collection-and-field-relations.js +53 -53
  754. package/dist/services/fields/get-collection-meta-updates.js +68 -69
  755. package/dist/services/fields/get-collection-relation-list.js +26 -26
  756. package/dist/services/fields.js +732 -810
  757. package/dist/services/files/lib/extract-metadata.js +34 -31
  758. package/dist/services/files/lib/get-sharp-instance.js +14 -9
  759. package/dist/services/files/utils/get-metadata.js +101 -105
  760. package/dist/services/files/utils/parse-image-metadata.js +70 -64
  761. package/dist/services/files.js +409 -328
  762. package/dist/services/flows.js +34 -27
  763. package/dist/services/folders.js +83 -81
  764. package/dist/services/graphql/errors/execution.js +7 -2
  765. package/dist/services/graphql/errors/format.js +16 -11
  766. package/dist/services/graphql/errors/index.js +4 -2
  767. package/dist/services/graphql/errors/validation.js +7 -2
  768. package/dist/services/graphql/index.js +95 -94
  769. package/dist/services/graphql/resolvers/get-collection-type.js +34 -33
  770. package/dist/services/graphql/resolvers/get-field-type.js +51 -50
  771. package/dist/services/graphql/resolvers/get-relation-type.js +41 -38
  772. package/dist/services/graphql/resolvers/mutation.js +68 -73
  773. package/dist/services/graphql/resolvers/query.js +68 -68
  774. package/dist/services/graphql/resolvers/system-admin.js +279 -286
  775. package/dist/services/graphql/resolvers/system-global.js +414 -432
  776. package/dist/services/graphql/resolvers/system.js +406 -459
  777. package/dist/services/graphql/schema/get-types.js +182 -220
  778. package/dist/services/graphql/schema/index.js +189 -185
  779. package/dist/services/graphql/schema/parse-args.js +28 -33
  780. package/dist/services/graphql/schema/parse-query.js +106 -103
  781. package/dist/services/graphql/schema/read.js +451 -735
  782. package/dist/services/graphql/schema/write.js +119 -141
  783. package/dist/services/graphql/schema-cache.js +13 -7
  784. package/dist/services/graphql/subscription.js +91 -94
  785. package/dist/services/graphql/types/bigint.js +41 -42
  786. package/dist/services/graphql/types/date.js +10 -5
  787. package/dist/services/graphql/types/geojson.js +11 -6
  788. package/dist/services/graphql/types/hash.js +10 -5
  789. package/dist/services/graphql/types/string-or-float.js +31 -29
  790. package/dist/services/graphql/types/void.js +18 -13
  791. package/dist/services/graphql/utils/add-path-to-validation-error.js +18 -14
  792. package/dist/services/graphql/utils/aggregate-query.js +33 -37
  793. package/dist/services/graphql/utils/dedupe-resolvers.js +62 -0
  794. package/dist/services/graphql/utils/filter-replace-m2a.js +66 -63
  795. package/dist/services/graphql/utils/process-error.js +40 -41
  796. package/dist/services/graphql/utils/replace-fragments.js +30 -19
  797. package/dist/services/graphql/utils/replace-funcs.js +23 -19
  798. package/dist/services/graphql/utils/sanitize-gql-schema.js +79 -73
  799. package/dist/services/import-export.js +671 -633
  800. package/dist/services/index.js +95 -41
  801. package/dist/services/items.js +854 -945
  802. package/dist/services/mail/index.js +106 -104
  803. package/dist/services/mail/rate-limiter.js +26 -25
  804. package/dist/services/meta.js +71 -63
  805. package/dist/services/notifications.js +66 -58
  806. package/dist/services/operations.js +30 -25
  807. package/dist/services/panels.js +11 -6
  808. package/dist/services/payload.js +745 -832
  809. package/dist/services/permissions.js +143 -132
  810. package/dist/services/policies.js +74 -87
  811. package/dist/services/presets.js +11 -6
  812. package/dist/services/relations.js +438 -494
  813. package/dist/services/revisions.js +50 -44
  814. package/dist/services/roles.js +81 -87
  815. package/dist/services/schema.js +50 -52
  816. package/dist/services/server.js +320 -384
  817. package/dist/services/settings.js +31 -21
  818. package/dist/services/shares.js +138 -141
  819. package/dist/services/specifications.js +396 -526
  820. package/dist/services/tfa.js +64 -65
  821. package/dist/services/translations.js +46 -36
  822. package/dist/services/tus/data-store.js +186 -214
  823. package/dist/services/tus/index.js +4 -2
  824. package/dist/services/tus/lockers.js +77 -81
  825. package/dist/services/tus/server.js +109 -113
  826. package/dist/services/tus/utils/wait-timeout.js +16 -12
  827. package/dist/services/users.js +490 -525
  828. package/dist/services/utils.js +102 -129
  829. package/dist/services/versions.js +303 -314
  830. package/dist/services/websocket.js +45 -36
  831. package/dist/start.js +6 -1
  832. package/dist/storage/get-storage-driver.js +18 -15
  833. package/dist/storage/index.js +18 -16
  834. package/dist/storage/register-drivers.js +20 -17
  835. package/dist/storage/register-locations.js +28 -17
  836. package/dist/synchronization.js +106 -103
  837. package/dist/telemetry/counter/use-buffered-counter.js +138 -0
  838. package/dist/telemetry/counter/use-counters.js +32 -0
  839. package/dist/telemetry/index.js +5 -3
  840. package/dist/telemetry/lib/get-report.js +72 -58
  841. package/dist/telemetry/lib/send-report.js +24 -23
  842. package/dist/telemetry/lib/track.js +32 -28
  843. package/dist/telemetry/types/report.js +1 -1
  844. package/dist/telemetry/utils/check-user-limits.js +20 -16
  845. package/dist/telemetry/utils/format-api-request-counts.js +26 -0
  846. package/dist/telemetry/utils/get-extension-count.js +21 -18
  847. package/dist/telemetry/utils/get-field-count.js +12 -11
  848. package/dist/telemetry/utils/get-filesize-sum.js +9 -6
  849. package/dist/telemetry/utils/get-item-count.js +40 -34
  850. package/dist/telemetry/utils/get-random-wait-time.js +8 -4
  851. package/dist/telemetry/utils/get-settings.js +37 -34
  852. package/dist/telemetry/utils/get-user-item-count.js +24 -18
  853. package/dist/telemetry/utils/should-check-user-limits.js +14 -11
  854. package/dist/test-utils/README.md +316 -5
  855. package/dist/test-utils/cache.js +62 -57
  856. package/dist/test-utils/controllers.js +94 -93
  857. package/dist/test-utils/database.js +50 -50
  858. package/dist/test-utils/emitter.js +36 -36
  859. package/dist/test-utils/env.js +77 -0
  860. package/dist/test-utils/knex.js +208 -254
  861. package/dist/test-utils/schema.js +33 -33
  862. package/dist/test-utils/services/fields-service.js +36 -35
  863. package/dist/test-utils/services/files-service.js +33 -32
  864. package/dist/test-utils/services/folders-service.js +32 -31
  865. package/dist/test-utils/services/items-service.js +50 -35
  866. package/dist/test-utils/storage.js +150 -0
  867. package/dist/types/ast.js +1 -1
  868. package/dist/types/auth.js +1 -1
  869. package/dist/types/collection.js +1 -1
  870. package/dist/types/events.js +1 -1
  871. package/dist/types/index.js +9 -7
  872. package/dist/types/meta.js +9 -5
  873. package/dist/types/migration.js +1 -1
  874. package/dist/types/revision.js +1 -1
  875. package/dist/types/rolemap.js +1 -1
  876. package/dist/utils/apply-diff.js +276 -291
  877. package/dist/utils/apply-snapshot.js +27 -13
  878. package/dist/utils/async-handler.js +5 -1
  879. package/dist/utils/calculate-field-depth.js +70 -69
  880. package/dist/utils/compress.js +13 -10
  881. package/dist/utils/construct-flow-tree.js +29 -24
  882. package/dist/utils/create-admin.js +54 -46
  883. package/dist/utils/deep-map-response.js +64 -59
  884. package/dist/utils/delete-from-require-cache.js +15 -11
  885. package/dist/utils/destroy-piped-stream.js +13 -0
  886. package/dist/utils/encrypt.js +59 -59
  887. package/dist/utils/fetch-user-count/fetch-access-lookup.js +22 -22
  888. package/dist/utils/fetch-user-count/fetch-access-roles.js +31 -35
  889. package/dist/utils/fetch-user-count/fetch-active-users.js +6 -2
  890. package/dist/utils/fetch-user-count/fetch-user-count.js +56 -62
  891. package/dist/utils/fetch-user-count/get-user-count-query.js +19 -16
  892. package/dist/utils/filter-items.js +27 -30
  893. package/dist/utils/freeze-schema.js +28 -29
  894. package/dist/utils/generate-hash.js +11 -8
  895. package/dist/utils/generate-translations.js +436 -0
  896. package/dist/utils/get-accountability-for-role.js +35 -30
  897. package/dist/utils/get-accountability-for-token.js +50 -53
  898. package/dist/utils/get-address.js +20 -17
  899. package/dist/utils/get-allowed-log-levels.js +12 -9
  900. package/dist/utils/get-auth-providers.js +30 -23
  901. package/dist/utils/get-cache-headers.js +30 -37
  902. package/dist/utils/get-cache-key.js +29 -26
  903. package/dist/utils/get-collection-from-alias.js +14 -10
  904. package/dist/utils/get-column-path.js +62 -61
  905. package/dist/utils/get-config-from-env.js +43 -45
  906. package/dist/utils/get-default-index-name.js +23 -20
  907. package/dist/utils/get-default-value.js +43 -52
  908. package/dist/utils/get-field-relational-depth.js +24 -20
  909. package/dist/utils/get-field-system-rows.js +19 -16
  910. package/dist/utils/get-graphql-query-and-variables.js +9 -4
  911. package/dist/utils/get-graphql-type.js +32 -38
  912. package/dist/utils/get-ip-from-req.js +38 -42
  913. package/dist/utils/get-local-type.js +119 -129
  914. package/dist/utils/get-milliseconds.js +13 -8
  915. package/dist/utils/get-module-default.js +9 -5
  916. package/dist/utils/get-schema.js +160 -165
  917. package/dist/utils/get-secret.js +18 -13
  918. package/dist/utils/get-service.js +63 -59
  919. package/dist/utils/get-snapshot-diff.js +106 -134
  920. package/dist/utils/get-snapshot.js +70 -55
  921. package/dist/utils/get-string-byte-size.js +8 -4
  922. package/dist/utils/get-versioned-hash.js +12 -4
  923. package/dist/utils/import-file-url.js +10 -5
  924. package/dist/utils/is-directus-jwt.js +17 -14
  925. package/dist/utils/is-field-allowed.js +11 -7
  926. package/dist/utils/is-url-allowed.js +29 -29
  927. package/dist/utils/is-valid-uuid.js +22 -18
  928. package/dist/utils/job-queue.js +29 -25
  929. package/dist/utils/jwt.js +30 -27
  930. package/dist/utils/md.js +12 -7
  931. package/dist/utils/parse-filter-key.js +21 -14
  932. package/dist/utils/parse-numeric-string.js +20 -20
  933. package/dist/utils/parse-value.js +12 -9
  934. package/dist/utils/permissions-cacheable.js +45 -37
  935. package/dist/utils/redact-object.js +120 -125
  936. package/dist/utils/reduce-schema.js +53 -60
  937. package/dist/utils/require-text.js +8 -3
  938. package/dist/utils/require-yaml.js +10 -5
  939. package/dist/utils/sanitize-query.js +195 -213
  940. package/dist/utils/sanitize-schema.js +102 -83
  941. package/dist/utils/schedule.js +28 -24
  942. package/dist/utils/should-clear-cache.js +23 -18
  943. package/dist/utils/should-skip-cache.js +39 -40
  944. package/dist/utils/split-fields.js +33 -30
  945. package/dist/utils/stall.js +36 -32
  946. package/dist/utils/store.js +40 -0
  947. package/dist/utils/transaction.js +82 -81
  948. package/dist/utils/transformations.js +125 -129
  949. package/dist/utils/translations-shared.js +56 -0
  950. package/dist/utils/translations-validation.js +9 -0
  951. package/dist/utils/url.js +67 -66
  952. package/dist/utils/user-name.js +18 -14
  953. package/dist/utils/validate-diff.js +124 -150
  954. package/dist/utils/validate-env.js +16 -11
  955. package/dist/utils/validate-keys.js +22 -19
  956. package/dist/utils/validate-query.js +185 -198
  957. package/dist/utils/validate-snapshot.js +63 -73
  958. package/dist/utils/validate-storage.js +37 -35
  959. package/dist/utils/validate-user-count-integrity.js +28 -20
  960. package/dist/utils/verify-session-jwt.js +21 -21
  961. package/dist/utils/versioning/handle-version.js +96 -95
  962. package/dist/utils/versioning/merge-version-data.js +14 -9
  963. package/dist/utils/versioning/split-recursive.js +40 -26
  964. package/dist/websocket/authenticate.js +67 -66
  965. package/dist/websocket/collab/calculate-cache-metadata.js +99 -118
  966. package/dist/websocket/collab/collab.js +420 -479
  967. package/dist/websocket/collab/constants.js +16 -12
  968. package/dist/websocket/collab/filter-to-fields.js +18 -10
  969. package/dist/websocket/collab/messenger.js +252 -224
  970. package/dist/websocket/collab/payload-permissions.js +140 -149
  971. package/dist/websocket/collab/permissions-cache.js +188 -202
  972. package/dist/websocket/collab/room.js +569 -588
  973. package/dist/websocket/collab/store.js +9 -31
  974. package/dist/websocket/collab/types.js +1 -1
  975. package/dist/websocket/collab/verify-permissions.js +116 -98
  976. package/dist/websocket/controllers/base.js +331 -352
  977. package/dist/websocket/controllers/graphql.js +98 -104
  978. package/dist/websocket/controllers/hooks.js +117 -118
  979. package/dist/websocket/controllers/index.js +31 -29
  980. package/dist/websocket/controllers/logs.js +65 -53
  981. package/dist/websocket/controllers/rest.js +59 -47
  982. package/dist/websocket/errors.js +62 -55
  983. package/dist/websocket/handlers/heartbeat.js +77 -77
  984. package/dist/websocket/handlers/index.js +36 -35
  985. package/dist/websocket/handlers/items.js +111 -109
  986. package/dist/websocket/handlers/logs.js +122 -120
  987. package/dist/websocket/handlers/subscribe.js +165 -182
  988. package/dist/websocket/messages.js +90 -93
  989. package/dist/websocket/types.js +1 -1
  990. package/dist/websocket/utils/get-expires-at-for-token.js +12 -7
  991. package/dist/websocket/utils/items.js +123 -123
  992. package/dist/websocket/utils/message.js +26 -24
  993. package/dist/websocket/utils/wait-for-message.js +46 -43
  994. package/package.json +35 -32
  995. package/dist/ai/chat/constants/system-prompt.d.ts +0 -1
  996. package/dist/ai/chat/controllers/chat.post.d.ts +0 -2
  997. package/dist/ai/chat/lib/create-ui-stream.d.ts +0 -16
  998. package/dist/ai/chat/lib/transform-file-parts.d.ts +0 -12
  999. package/dist/ai/chat/middleware/load-settings.d.ts +0 -2
  1000. package/dist/ai/chat/models/chat-request.d.ts +0 -167
  1001. package/dist/ai/chat/models/providers.d.ts +0 -23
  1002. package/dist/ai/chat/router.d.ts +0 -1
  1003. package/dist/ai/chat/utils/chat-request-tool-to-ai-sdk-tool.d.ts +0 -9
  1004. package/dist/ai/chat/utils/fix-error-tool-calls.d.ts +0 -12
  1005. package/dist/ai/chat/utils/format-context.d.ts +0 -5
  1006. package/dist/ai/chat/utils/parse-json-schema-7.d.ts +0 -13
  1007. package/dist/ai/files/adapters/anthropic.d.ts +0 -3
  1008. package/dist/ai/files/adapters/google.d.ts +0 -3
  1009. package/dist/ai/files/adapters/index.d.ts +0 -3
  1010. package/dist/ai/files/adapters/openai.d.ts +0 -3
  1011. package/dist/ai/files/controllers/upload.d.ts +0 -2
  1012. package/dist/ai/files/lib/fetch-provider.d.ts +0 -1
  1013. package/dist/ai/files/lib/upload-to-provider.d.ts +0 -4
  1014. package/dist/ai/files/router.d.ts +0 -1
  1015. package/dist/ai/files/types.d.ts +0 -5
  1016. package/dist/ai/mcp/index.d.ts +0 -1
  1017. package/dist/ai/mcp/server.d.ts +0 -126
  1018. package/dist/ai/mcp/transport.d.ts +0 -13
  1019. package/dist/ai/mcp/types.d.ts +0 -15
  1020. package/dist/ai/providers/anthropic-file-support.d.ts +0 -12
  1021. package/dist/ai/providers/index.d.ts +0 -3
  1022. package/dist/ai/providers/options.d.ts +0 -14
  1023. package/dist/ai/providers/registry.d.ts +0 -6
  1024. package/dist/ai/providers/types.d.ts +0 -34
  1025. package/dist/ai/tools/assets/index.d.ts +0 -3
  1026. package/dist/ai/tools/collections/index.d.ts +0 -84
  1027. package/dist/ai/tools/define-tool.d.ts +0 -2
  1028. package/dist/ai/tools/fields/index.d.ts +0 -101
  1029. package/dist/ai/tools/files/index.d.ts +0 -235
  1030. package/dist/ai/tools/flows/index.d.ts +0 -323
  1031. package/dist/ai/tools/folders/index.d.ts +0 -95
  1032. package/dist/ai/tools/index.d.ts +0 -15
  1033. package/dist/ai/tools/items/index.d.ts +0 -87
  1034. package/dist/ai/tools/operations/index.d.ts +0 -217
  1035. package/dist/ai/tools/relations/index.d.ts +0 -73
  1036. package/dist/ai/tools/schema/index.d.ts +0 -54
  1037. package/dist/ai/tools/schema.d.ts +0 -485
  1038. package/dist/ai/tools/system/index.d.ts +0 -3
  1039. package/dist/ai/tools/trigger-flow/index.d.ts +0 -8
  1040. package/dist/ai/tools/types.d.ts +0 -40
  1041. package/dist/ai/tools/utils.d.ts +0 -9
  1042. package/dist/app.d.ts +0 -2
  1043. package/dist/auth/auth.d.ts +0 -47
  1044. package/dist/auth/drivers/index.d.ts +0 -5
  1045. package/dist/auth/drivers/ldap.d.ts +0 -18
  1046. package/dist/auth/drivers/local.d.ts +0 -9
  1047. package/dist/auth/drivers/oauth2.d.ts +0 -18
  1048. package/dist/auth/drivers/openid.d.ts +0 -19
  1049. package/dist/auth/drivers/saml.d.ts +0 -13
  1050. package/dist/auth/utils/generate-callback-url.d.ts +0 -11
  1051. package/dist/auth/utils/resolve-login-redirect.d.ts +0 -11
  1052. package/dist/auth.d.ts +0 -3
  1053. package/dist/bus/index.d.ts +0 -1
  1054. package/dist/bus/lib/use-bus.d.ts +0 -9
  1055. package/dist/cache.d.ts +0 -31
  1056. package/dist/cli/commands/bootstrap/index.d.ts +0 -3
  1057. package/dist/cli/commands/count/index.d.ts +0 -1
  1058. package/dist/cli/commands/database/install.d.ts +0 -1
  1059. package/dist/cli/commands/database/migrate.d.ts +0 -1
  1060. package/dist/cli/commands/init/index.d.ts +0 -1
  1061. package/dist/cli/commands/init/questions.d.ts +0 -21
  1062. package/dist/cli/commands/roles/create.d.ts +0 -5
  1063. package/dist/cli/commands/schema/apply.d.ts +0 -9
  1064. package/dist/cli/commands/schema/snapshot.d.ts +0 -4
  1065. package/dist/cli/commands/security/key.d.ts +0 -1
  1066. package/dist/cli/commands/security/secret.d.ts +0 -1
  1067. package/dist/cli/commands/users/create.d.ts +0 -5
  1068. package/dist/cli/commands/users/passwd.d.ts +0 -4
  1069. package/dist/cli/index.d.ts +0 -2
  1070. package/dist/cli/load-extensions.d.ts +0 -1
  1071. package/dist/cli/run.d.ts +0 -1
  1072. package/dist/cli/utils/create-db-connection.d.ts +0 -13
  1073. package/dist/cli/utils/create-env/index.d.ts +0 -3
  1074. package/dist/cli/utils/drivers.d.ts +0 -3
  1075. package/dist/constants.d.ts +0 -30
  1076. package/dist/controllers/access.d.ts +0 -2
  1077. package/dist/controllers/activity.d.ts +0 -2
  1078. package/dist/controllers/assets.d.ts +0 -2
  1079. package/dist/controllers/auth.d.ts +0 -2
  1080. package/dist/controllers/collections.d.ts +0 -2
  1081. package/dist/controllers/comments.d.ts +0 -2
  1082. package/dist/controllers/dashboards.d.ts +0 -2
  1083. package/dist/controllers/deployment-webhooks.d.ts +0 -2
  1084. package/dist/controllers/deployment.d.ts +0 -2
  1085. package/dist/controllers/extensions.d.ts +0 -2
  1086. package/dist/controllers/fields.d.ts +0 -2
  1087. package/dist/controllers/files.d.ts +0 -4
  1088. package/dist/controllers/flows.d.ts +0 -2
  1089. package/dist/controllers/folders.d.ts +0 -2
  1090. package/dist/controllers/graphql.d.ts +0 -2
  1091. package/dist/controllers/items.d.ts +0 -2
  1092. package/dist/controllers/mcp.d.ts +0 -2
  1093. package/dist/controllers/metrics.d.ts +0 -2
  1094. package/dist/controllers/not-found.d.ts +0 -14
  1095. package/dist/controllers/notifications.d.ts +0 -2
  1096. package/dist/controllers/operations.d.ts +0 -2
  1097. package/dist/controllers/panels.d.ts +0 -2
  1098. package/dist/controllers/permissions.d.ts +0 -2
  1099. package/dist/controllers/policies.d.ts +0 -2
  1100. package/dist/controllers/presets.d.ts +0 -2
  1101. package/dist/controllers/relations.d.ts +0 -2
  1102. package/dist/controllers/revisions.d.ts +0 -2
  1103. package/dist/controllers/roles.d.ts +0 -2
  1104. package/dist/controllers/schema.d.ts +0 -2
  1105. package/dist/controllers/server.d.ts +0 -2
  1106. package/dist/controllers/settings.d.ts +0 -2
  1107. package/dist/controllers/shares.d.ts +0 -2
  1108. package/dist/controllers/translations.d.ts +0 -2
  1109. package/dist/controllers/tus.d.ts +0 -2
  1110. package/dist/controllers/users.d.ts +0 -2
  1111. package/dist/controllers/utils.d.ts +0 -2
  1112. package/dist/controllers/versions.d.ts +0 -2
  1113. package/dist/database/errors/dialects/mssql.d.ts +0 -3
  1114. package/dist/database/errors/dialects/mysql.d.ts +0 -3
  1115. package/dist/database/errors/dialects/oracle.d.ts +0 -2
  1116. package/dist/database/errors/dialects/postgres.d.ts +0 -3
  1117. package/dist/database/errors/dialects/sqlite.d.ts +0 -3
  1118. package/dist/database/errors/dialects/types.d.ts +0 -41
  1119. package/dist/database/errors/translate.d.ts +0 -12
  1120. package/dist/database/get-ast-from-query/get-ast-from-query.d.ts +0 -16
  1121. package/dist/database/get-ast-from-query/lib/convert-wildcards.d.ts +0 -15
  1122. package/dist/database/get-ast-from-query/lib/parse-fields.d.ts +0 -17
  1123. package/dist/database/get-ast-from-query/utils/get-allowed-sort.d.ts +0 -9
  1124. package/dist/database/get-ast-from-query/utils/get-deep-query.d.ts +0 -14
  1125. package/dist/database/get-ast-from-query/utils/get-related-collection.d.ts +0 -2
  1126. package/dist/database/helpers/capabilities/dialects/default.d.ts +0 -3
  1127. package/dist/database/helpers/capabilities/dialects/mysql.d.ts +0 -4
  1128. package/dist/database/helpers/capabilities/dialects/postgres.d.ts +0 -5
  1129. package/dist/database/helpers/capabilities/index.d.ts +0 -7
  1130. package/dist/database/helpers/capabilities/types.d.ts +0 -11
  1131. package/dist/database/helpers/date/dialects/default.d.ts +0 -3
  1132. package/dist/database/helpers/date/dialects/mssql.d.ts +0 -4
  1133. package/dist/database/helpers/date/dialects/mysql.d.ts +0 -5
  1134. package/dist/database/helpers/date/dialects/oracle.d.ts +0 -5
  1135. package/dist/database/helpers/date/dialects/sqlite.d.ts +0 -5
  1136. package/dist/database/helpers/date/index.d.ts +0 -7
  1137. package/dist/database/helpers/date/types.d.ts +0 -7
  1138. package/dist/database/helpers/fn/dialects/mssql.d.ts +0 -15
  1139. package/dist/database/helpers/fn/dialects/mysql.d.ts +0 -16
  1140. package/dist/database/helpers/fn/dialects/oracle.d.ts +0 -15
  1141. package/dist/database/helpers/fn/dialects/postgres.d.ts +0 -28
  1142. package/dist/database/helpers/fn/dialects/sqlite.d.ts +0 -15
  1143. package/dist/database/helpers/fn/index.d.ts +0 -7
  1144. package/dist/database/helpers/fn/json/parse-function.d.ts +0 -19
  1145. package/dist/database/helpers/fn/types.d.ts +0 -34
  1146. package/dist/database/helpers/geometry/dialects/mssql.d.ts +0 -14
  1147. package/dist/database/helpers/geometry/dialects/mysql.d.ts +0 -7
  1148. package/dist/database/helpers/geometry/dialects/oracle.d.ts +0 -15
  1149. package/dist/database/helpers/geometry/dialects/postgres.d.ts +0 -10
  1150. package/dist/database/helpers/geometry/dialects/redshift.d.ts +0 -7
  1151. package/dist/database/helpers/geometry/dialects/sqlite.d.ts +0 -6
  1152. package/dist/database/helpers/geometry/index.d.ts +0 -7
  1153. package/dist/database/helpers/geometry/types.d.ts +0 -20
  1154. package/dist/database/helpers/index.d.ts +0 -19
  1155. package/dist/database/helpers/number/dialects/default.d.ts +0 -3
  1156. package/dist/database/helpers/number/dialects/mssql.d.ts +0 -7
  1157. package/dist/database/helpers/number/dialects/oracle.d.ts +0 -6
  1158. package/dist/database/helpers/number/dialects/postgres.d.ts +0 -5
  1159. package/dist/database/helpers/number/dialects/sqlite.d.ts +0 -6
  1160. package/dist/database/helpers/number/index.d.ts +0 -7
  1161. package/dist/database/helpers/number/types.d.ts +0 -12
  1162. package/dist/database/helpers/number/utils/decimal-limit.d.ts +0 -4
  1163. package/dist/database/helpers/number/utils/maybe-stringify-big-int.d.ts +0 -1
  1164. package/dist/database/helpers/number/utils/number-in-range.d.ts +0 -3
  1165. package/dist/database/helpers/schema/dialects/cockroachdb.d.ts +0 -12
  1166. package/dist/database/helpers/schema/dialects/default.d.ts +0 -3
  1167. package/dist/database/helpers/schema/dialects/mssql.d.ts +0 -14
  1168. package/dist/database/helpers/schema/dialects/mysql.d.ts +0 -10
  1169. package/dist/database/helpers/schema/dialects/oracle.d.ts +0 -24
  1170. package/dist/database/helpers/schema/dialects/postgres.d.ts +0 -8
  1171. package/dist/database/helpers/schema/dialects/sqlite.d.ts +0 -8
  1172. package/dist/database/helpers/schema/index.d.ts +0 -7
  1173. package/dist/database/helpers/schema/types.d.ts +0 -63
  1174. package/dist/database/helpers/schema/utils/prep-query-params.d.ts +0 -12
  1175. package/dist/database/helpers/sequence/dialects/default.d.ts +0 -3
  1176. package/dist/database/helpers/sequence/dialects/postgres.d.ts +0 -12
  1177. package/dist/database/helpers/sequence/index.d.ts +0 -7
  1178. package/dist/database/helpers/sequence/types.d.ts +0 -5
  1179. package/dist/database/helpers/types.d.ts +0 -5
  1180. package/dist/database/index.d.ts +0 -15
  1181. package/dist/database/migrations/20201028A-remove-collection-foreign-keys.d.ts +0 -3
  1182. package/dist/database/migrations/20201029A-remove-system-relations.d.ts +0 -3
  1183. package/dist/database/migrations/20201029B-remove-system-collections.d.ts +0 -3
  1184. package/dist/database/migrations/20201029C-remove-system-fields.d.ts +0 -3
  1185. package/dist/database/migrations/20201105A-add-cascade-system-relations.d.ts +0 -8
  1186. package/dist/database/migrations/20201105B-change-webhook-url-type.d.ts +0 -3
  1187. package/dist/database/migrations/20210225A-add-relations-sort-field.d.ts +0 -3
  1188. package/dist/database/migrations/20210304A-remove-locked-fields.d.ts +0 -3
  1189. package/dist/database/migrations/20210312A-webhooks-collections-text.d.ts +0 -3
  1190. package/dist/database/migrations/20210331A-add-refresh-interval.d.ts +0 -3
  1191. package/dist/database/migrations/20210415A-make-filesize-nullable.d.ts +0 -3
  1192. package/dist/database/migrations/20210416A-add-collections-accountability.d.ts +0 -3
  1193. package/dist/database/migrations/20210422A-remove-files-interface.d.ts +0 -3
  1194. package/dist/database/migrations/20210506A-rename-interfaces.d.ts +0 -3
  1195. package/dist/database/migrations/20210510A-restructure-relations.d.ts +0 -3
  1196. package/dist/database/migrations/20210518A-add-foreign-key-constraints.d.ts +0 -3
  1197. package/dist/database/migrations/20210519A-add-system-fk-triggers.d.ts +0 -3
  1198. package/dist/database/migrations/20210521A-add-collections-icon-color.d.ts +0 -3
  1199. package/dist/database/migrations/20210525A-add-insights.d.ts +0 -3
  1200. package/dist/database/migrations/20210608A-add-deep-clone-config.d.ts +0 -3
  1201. package/dist/database/migrations/20210626A-change-filesize-bigint.d.ts +0 -3
  1202. package/dist/database/migrations/20210716A-add-conditions-to-fields.d.ts +0 -3
  1203. package/dist/database/migrations/20210721A-add-default-folder.d.ts +0 -3
  1204. package/dist/database/migrations/20210802A-replace-groups.d.ts +0 -3
  1205. package/dist/database/migrations/20210803A-add-required-to-fields.d.ts +0 -3
  1206. package/dist/database/migrations/20210805A-update-groups.d.ts +0 -3
  1207. package/dist/database/migrations/20210805B-change-image-metadata-structure.d.ts +0 -3
  1208. package/dist/database/migrations/20210811A-add-geometry-config.d.ts +0 -3
  1209. package/dist/database/migrations/20210831A-remove-limit-column.d.ts +0 -3
  1210. package/dist/database/migrations/20210903A-add-auth-provider.d.ts +0 -3
  1211. package/dist/database/migrations/20210907A-webhooks-collections-not-null.d.ts +0 -3
  1212. package/dist/database/migrations/20210910A-move-module-setup.d.ts +0 -3
  1213. package/dist/database/migrations/20210920A-webhooks-url-not-null.d.ts +0 -3
  1214. package/dist/database/migrations/20210924A-add-collection-organization.d.ts +0 -3
  1215. package/dist/database/migrations/20210927A-replace-fields-group.d.ts +0 -3
  1216. package/dist/database/migrations/20210927B-replace-m2m-interface.d.ts +0 -3
  1217. package/dist/database/migrations/20210929A-rename-login-action.d.ts +0 -3
  1218. package/dist/database/migrations/20211007A-update-presets.d.ts +0 -3
  1219. package/dist/database/migrations/20211009A-add-auth-data.d.ts +0 -3
  1220. package/dist/database/migrations/20211016A-add-webhook-headers.d.ts +0 -3
  1221. package/dist/database/migrations/20211103A-set-unique-to-user-token.d.ts +0 -3
  1222. package/dist/database/migrations/20211103B-update-special-geometry.d.ts +0 -3
  1223. package/dist/database/migrations/20211104A-remove-collections-listing.d.ts +0 -3
  1224. package/dist/database/migrations/20211118A-add-notifications.d.ts +0 -3
  1225. package/dist/database/migrations/20211211A-add-shares.d.ts +0 -3
  1226. package/dist/database/migrations/20211230A-add-project-descriptor.d.ts +0 -3
  1227. package/dist/database/migrations/20220303A-remove-default-project-color.d.ts +0 -3
  1228. package/dist/database/migrations/20220308A-add-bookmark-icon-and-color.d.ts +0 -3
  1229. package/dist/database/migrations/20220314A-add-translation-strings.d.ts +0 -3
  1230. package/dist/database/migrations/20220322A-rename-field-typecast-flags.d.ts +0 -3
  1231. package/dist/database/migrations/20220323A-add-field-validation.d.ts +0 -3
  1232. package/dist/database/migrations/20220325A-fix-typecast-flags.d.ts +0 -3
  1233. package/dist/database/migrations/20220325B-add-default-language.d.ts +0 -3
  1234. package/dist/database/migrations/20220402A-remove-default-value-panel-icon.d.ts +0 -3
  1235. package/dist/database/migrations/20220429A-add-flows.d.ts +0 -3
  1236. package/dist/database/migrations/20220429B-add-color-to-insights-icon.d.ts +0 -3
  1237. package/dist/database/migrations/20220429C-drop-non-null-from-ip-of-activity.d.ts +0 -3
  1238. package/dist/database/migrations/20220429D-drop-non-null-from-sender-of-notifications.d.ts +0 -3
  1239. package/dist/database/migrations/20220614A-rename-hook-trigger-to-event.d.ts +0 -3
  1240. package/dist/database/migrations/20220801A-update-notifications-timestamp-column.d.ts +0 -3
  1241. package/dist/database/migrations/20220802A-add-custom-aspect-ratios.d.ts +0 -3
  1242. package/dist/database/migrations/20220826A-add-origin-to-accountability.d.ts +0 -3
  1243. package/dist/database/migrations/20230401A-update-material-icons.d.ts +0 -3
  1244. package/dist/database/migrations/20230525A-add-preview-settings.d.ts +0 -3
  1245. package/dist/database/migrations/20230526A-migrate-translation-strings.d.ts +0 -3
  1246. package/dist/database/migrations/20230721A-require-shares-fields.d.ts +0 -3
  1247. package/dist/database/migrations/20230823A-add-content-versioning.d.ts +0 -3
  1248. package/dist/database/migrations/20230927A-themes.d.ts +0 -3
  1249. package/dist/database/migrations/20231009A-update-csv-fields-to-text.d.ts +0 -3
  1250. package/dist/database/migrations/20231009B-update-panel-options.d.ts +0 -3
  1251. package/dist/database/migrations/20231010A-add-extensions.d.ts +0 -3
  1252. package/dist/database/migrations/20231215A-add-focalpoints.d.ts +0 -3
  1253. package/dist/database/migrations/20240122A-add-report-url-fields.d.ts +0 -3
  1254. package/dist/database/migrations/20240204A-marketplace.d.ts +0 -3
  1255. package/dist/database/migrations/20240305A-change-useragent-type.d.ts +0 -3
  1256. package/dist/database/migrations/20240311A-deprecate-webhooks.d.ts +0 -28
  1257. package/dist/database/migrations/20240422A-public-registration.d.ts +0 -3
  1258. package/dist/database/migrations/20240515A-add-session-window.d.ts +0 -3
  1259. package/dist/database/migrations/20240701A-add-tus-data.d.ts +0 -3
  1260. package/dist/database/migrations/20240716A-update-files-date-fields.d.ts +0 -3
  1261. package/dist/database/migrations/20240806A-permissions-policies.d.ts +0 -3
  1262. package/dist/database/migrations/20240817A-update-icon-fields-length.d.ts +0 -3
  1263. package/dist/database/migrations/20240909A-separate-comments.d.ts +0 -3
  1264. package/dist/database/migrations/20240909B-consolidate-content-versioning.d.ts +0 -3
  1265. package/dist/database/migrations/20240924A-migrate-legacy-comments.d.ts +0 -3
  1266. package/dist/database/migrations/20240924B-populate-versioning-deltas.d.ts +0 -3
  1267. package/dist/database/migrations/20250224A-visual-editor.d.ts +0 -3
  1268. package/dist/database/migrations/20250609A-license-banner.d.ts +0 -3
  1269. package/dist/database/migrations/20250613A-add-project-id.d.ts +0 -3
  1270. package/dist/database/migrations/20250718A-add-direction.d.ts +0 -3
  1271. package/dist/database/migrations/20250813A-add-mcp.d.ts +0 -3
  1272. package/dist/database/migrations/20251012A-add-field-searchable.d.ts +0 -3
  1273. package/dist/database/migrations/20251014A-add-project-owner.d.ts +0 -3
  1274. package/dist/database/migrations/20251028A-add-retention-indexes.d.ts +0 -3
  1275. package/dist/database/migrations/20251103A-add-ai-settings.d.ts +0 -3
  1276. package/dist/database/migrations/20251224A-remove-webhooks.d.ts +0 -3
  1277. package/dist/database/migrations/20260110A-add-ai-provider-settings.d.ts +0 -3
  1278. package/dist/database/migrations/20260113A-add-revisions-index.d.ts +0 -3
  1279. package/dist/database/migrations/20260128A-add-collaborative-editing.d.ts +0 -3
  1280. package/dist/database/migrations/20260204A-add-deployment.d.ts +0 -3
  1281. package/dist/database/migrations/20260211A-add-deployment-webhooks.d.ts +0 -3
  1282. package/dist/database/migrations/run.d.ts +0 -2
  1283. package/dist/database/run-ast/lib/apply-query/add-join.d.ts +0 -54
  1284. package/dist/database/run-ast/lib/apply-query/aggregate.d.ts +0 -3
  1285. package/dist/database/run-ast/lib/apply-query/filter/get-filter-type.d.ts +0 -8
  1286. package/dist/database/run-ast/lib/apply-query/filter/index.d.ts +0 -8
  1287. package/dist/database/run-ast/lib/apply-query/filter/operator.d.ts +0 -3
  1288. package/dist/database/run-ast/lib/apply-query/filter/validate-operator.d.ts +0 -2
  1289. package/dist/database/run-ast/lib/apply-query/get-filter-path.d.ts +0 -1
  1290. package/dist/database/run-ast/lib/apply-query/get-operation.d.ts +0 -7
  1291. package/dist/database/run-ast/lib/apply-query/index.d.ts +0 -19
  1292. package/dist/database/run-ast/lib/apply-query/join-filter-with-cases.d.ts +0 -2
  1293. package/dist/database/run-ast/lib/apply-query/mock.d.ts +0 -3
  1294. package/dist/database/run-ast/lib/apply-query/pagination.d.ts +0 -3
  1295. package/dist/database/run-ast/lib/apply-query/search.d.ts +0 -4
  1296. package/dist/database/run-ast/lib/apply-query/sort.d.ts +0 -19
  1297. package/dist/database/run-ast/lib/get-db-query.d.ts +0 -14
  1298. package/dist/database/run-ast/lib/parse-current-level.d.ts +0 -7
  1299. package/dist/database/run-ast/modules/fetch-permitted-ast-root-fields.d.ts +0 -15
  1300. package/dist/database/run-ast/run-ast.d.ts +0 -7
  1301. package/dist/database/run-ast/types.d.ts +0 -20
  1302. package/dist/database/run-ast/utils/apply-case-when.d.ts +0 -17
  1303. package/dist/database/run-ast/utils/apply-function-to-column-name.d.ts +0 -12
  1304. package/dist/database/run-ast/utils/apply-parent-filters.d.ts +0 -3
  1305. package/dist/database/run-ast/utils/generate-alias.d.ts +0 -6
  1306. package/dist/database/run-ast/utils/get-column-pre-processor.d.ts +0 -10
  1307. package/dist/database/run-ast/utils/get-column.d.ts +0 -25
  1308. package/dist/database/run-ast/utils/get-field-alias.d.ts +0 -2
  1309. package/dist/database/run-ast/utils/get-inner-query-column-pre-processor.d.ts +0 -5
  1310. package/dist/database/run-ast/utils/merge-with-parent-items.d.ts +0 -3
  1311. package/dist/database/run-ast/utils/remove-temporary-fields.d.ts +0 -3
  1312. package/dist/database/run-ast/utils/with-preprocess-bindings.d.ts +0 -2
  1313. package/dist/database/seeds/run.d.ts +0 -2
  1314. package/dist/deployment/deployment.d.ts +0 -117
  1315. package/dist/deployment/drivers/index.d.ts +0 -2
  1316. package/dist/deployment/drivers/netlify.d.ts +0 -37
  1317. package/dist/deployment/drivers/vercel.d.ts +0 -35
  1318. package/dist/deployment/index.d.ts +0 -2
  1319. package/dist/deployment.d.ts +0 -29
  1320. package/dist/emitter.d.ts +0 -21
  1321. package/dist/extensions/index.d.ts +0 -2
  1322. package/dist/extensions/lib/get-extensions-path.d.ts +0 -1
  1323. package/dist/extensions/lib/get-extensions-settings.d.ts +0 -11
  1324. package/dist/extensions/lib/get-extensions.d.ts +0 -5
  1325. package/dist/extensions/lib/get-shared-deps-mapping.d.ts +0 -1
  1326. package/dist/extensions/lib/installation/index.d.ts +0 -2
  1327. package/dist/extensions/lib/installation/manager.d.ts +0 -5
  1328. package/dist/extensions/lib/sandbox/generate-api-extensions-sandbox-entrypoint.d.ts +0 -28
  1329. package/dist/extensions/lib/sandbox/generate-host-function-reference.d.ts +0 -11
  1330. package/dist/extensions/lib/sandbox/register/action.d.ts +0 -6
  1331. package/dist/extensions/lib/sandbox/register/call-reference.d.ts +0 -5
  1332. package/dist/extensions/lib/sandbox/register/filter.d.ts +0 -6
  1333. package/dist/extensions/lib/sandbox/register/index.d.ts +0 -5
  1334. package/dist/extensions/lib/sandbox/register/operation.d.ts +0 -6
  1335. package/dist/extensions/lib/sandbox/register/route.d.ts +0 -17
  1336. package/dist/extensions/lib/sandbox/sdk/generators/index.d.ts +0 -3
  1337. package/dist/extensions/lib/sandbox/sdk/generators/log.d.ts +0 -3
  1338. package/dist/extensions/lib/sandbox/sdk/generators/request.d.ts +0 -12
  1339. package/dist/extensions/lib/sandbox/sdk/generators/sleep.d.ts +0 -3
  1340. package/dist/extensions/lib/sandbox/sdk/index.d.ts +0 -2
  1341. package/dist/extensions/lib/sandbox/sdk/instantiate.d.ts +0 -11
  1342. package/dist/extensions/lib/sandbox/sdk/sdk.d.ts +0 -20
  1343. package/dist/extensions/lib/sandbox/sdk/utils/index.d.ts +0 -1
  1344. package/dist/extensions/lib/sandbox/sdk/utils/wrap.d.ts +0 -13
  1345. package/dist/extensions/lib/sync/status.d.ts +0 -11
  1346. package/dist/extensions/lib/sync/sync.d.ts +0 -6
  1347. package/dist/extensions/lib/sync/tracker.d.ts +0 -18
  1348. package/dist/extensions/lib/sync/utils.d.ts +0 -24
  1349. package/dist/extensions/lib/wrap-embeds.d.ts +0 -4
  1350. package/dist/extensions/manager.d.ts +0 -164
  1351. package/dist/flows.d.ts +0 -29
  1352. package/dist/index.d.ts +0 -1
  1353. package/dist/lock/index.d.ts +0 -1
  1354. package/dist/lock/lib/use-lock.d.ts +0 -8
  1355. package/dist/logger/index.d.ts +0 -14
  1356. package/dist/logger/logs-stream.d.ts +0 -10
  1357. package/dist/logger/redact-query.d.ts +0 -1
  1358. package/dist/mailer.d.ts +0 -2
  1359. package/dist/metrics/index.d.ts +0 -1
  1360. package/dist/metrics/lib/create-metrics.d.ts +0 -15
  1361. package/dist/metrics/lib/use-metrics.d.ts +0 -17
  1362. package/dist/metrics/types/metric.d.ts +0 -1
  1363. package/dist/middleware/authenticate.d.ts +0 -7
  1364. package/dist/middleware/cache.d.ts +0 -3
  1365. package/dist/middleware/collection-exists.d.ts +0 -6
  1366. package/dist/middleware/cors.d.ts +0 -3
  1367. package/dist/middleware/error-handler.d.ts +0 -2
  1368. package/dist/middleware/extract-token.d.ts +0 -12
  1369. package/dist/middleware/graphql.d.ts +0 -2
  1370. package/dist/middleware/rate-limiter-global.d.ts +0 -5
  1371. package/dist/middleware/rate-limiter-ip.d.ts +0 -5
  1372. package/dist/middleware/rate-limiter-registration.d.ts +0 -5
  1373. package/dist/middleware/respond.d.ts +0 -2
  1374. package/dist/middleware/sanitize-query.d.ts +0 -7
  1375. package/dist/middleware/schema.d.ts +0 -3
  1376. package/dist/middleware/use-collection.d.ts +0 -7
  1377. package/dist/middleware/validate-batch.d.ts +0 -1
  1378. package/dist/operations/condition/index.d.ts +0 -6
  1379. package/dist/operations/exec/index.d.ts +0 -5
  1380. package/dist/operations/item-create/index.d.ts +0 -8
  1381. package/dist/operations/item-delete/index.d.ts +0 -10
  1382. package/dist/operations/item-read/index.d.ts +0 -10
  1383. package/dist/operations/item-update/index.d.ts +0 -11
  1384. package/dist/operations/json-web-token/index.d.ts +0 -10
  1385. package/dist/operations/log/index.d.ts +0 -5
  1386. package/dist/operations/mail/index.d.ts +0 -13
  1387. package/dist/operations/mail/rate-limiter.d.ts +0 -1
  1388. package/dist/operations/notification/index.d.ts +0 -10
  1389. package/dist/operations/request/index.d.ts +0 -11
  1390. package/dist/operations/sleep/index.d.ts +0 -5
  1391. package/dist/operations/throw-error/index.d.ts +0 -7
  1392. package/dist/operations/transform/index.d.ts +0 -5
  1393. package/dist/operations/trigger/index.d.ts +0 -8
  1394. package/dist/permissions/cache.d.ts +0 -2
  1395. package/dist/permissions/lib/fetch-permissions.d.ts +0 -20
  1396. package/dist/permissions/lib/fetch-policies.d.ts +0 -14
  1397. package/dist/permissions/lib/fetch-roles-tree.d.ts +0 -6
  1398. package/dist/permissions/lib/with-app-minimal-permissions.d.ts +0 -2
  1399. package/dist/permissions/modules/fetch-accountability-collection-access/fetch-accountability-collection-access.d.ts +0 -7
  1400. package/dist/permissions/modules/fetch-accountability-policy-globals/fetch-accountability-policy-globals.d.ts +0 -3
  1401. package/dist/permissions/modules/fetch-allowed-collections/fetch-allowed-collections.d.ts +0 -7
  1402. package/dist/permissions/modules/fetch-allowed-field-map/fetch-allowed-field-map.d.ts +0 -8
  1403. package/dist/permissions/modules/fetch-allowed-fields/fetch-allowed-fields.d.ts +0 -15
  1404. package/dist/permissions/modules/fetch-global-access/fetch-global-access.d.ts +0 -12
  1405. package/dist/permissions/modules/fetch-inconsistent-field-map/fetch-inconsistent-field-map.d.ts +0 -11
  1406. package/dist/permissions/modules/fetch-policies-ip-access/fetch-policies-ip-access.d.ts +0 -4
  1407. package/dist/permissions/modules/process-ast/lib/extract-fields-from-children.d.ts +0 -4
  1408. package/dist/permissions/modules/process-ast/lib/extract-fields-from-query.d.ts +0 -3
  1409. package/dist/permissions/modules/process-ast/lib/field-map-from-ast.d.ts +0 -4
  1410. package/dist/permissions/modules/process-ast/lib/get-cases.d.ts +0 -6
  1411. package/dist/permissions/modules/process-ast/lib/inject-cases.d.ts +0 -9
  1412. package/dist/permissions/modules/process-ast/process-ast.d.ts +0 -9
  1413. package/dist/permissions/modules/process-ast/types.d.ts +0 -18
  1414. package/dist/permissions/modules/process-ast/utils/collections-in-field-map.d.ts +0 -2
  1415. package/dist/permissions/modules/process-ast/utils/context-has-dynamic-variables.d.ts +0 -2
  1416. package/dist/permissions/modules/process-ast/utils/dedupe-access.d.ts +0 -12
  1417. package/dist/permissions/modules/process-ast/utils/extract-paths-from-query.d.ts +0 -15
  1418. package/dist/permissions/modules/process-ast/utils/find-related-collection.d.ts +0 -3
  1419. package/dist/permissions/modules/process-ast/utils/flatten-filter.d.ts +0 -3
  1420. package/dist/permissions/modules/process-ast/utils/format-a2o-key.d.ts +0 -1
  1421. package/dist/permissions/modules/process-ast/utils/get-info-for-path.d.ts +0 -5
  1422. package/dist/permissions/modules/process-ast/utils/has-item-permissions.d.ts +0 -2
  1423. package/dist/permissions/modules/process-ast/utils/stringify-query-path.d.ts +0 -2
  1424. package/dist/permissions/modules/process-ast/utils/validate-path/create-error.d.ts +0 -3
  1425. package/dist/permissions/modules/process-ast/utils/validate-path/validate-path-existence.d.ts +0 -2
  1426. package/dist/permissions/modules/process-ast/utils/validate-path/validate-path-permissions.d.ts +0 -2
  1427. package/dist/permissions/modules/process-payload/lib/is-field-nullable.d.ts +0 -5
  1428. package/dist/permissions/modules/process-payload/process-payload.d.ts +0 -14
  1429. package/dist/permissions/modules/validate-access/lib/validate-collection-access.d.ts +0 -12
  1430. package/dist/permissions/modules/validate-access/lib/validate-item-access.d.ts +0 -22
  1431. package/dist/permissions/modules/validate-access/validate-access.d.ts +0 -16
  1432. package/dist/permissions/modules/validate-remaining-admin/validate-remaining-admin-count.d.ts +0 -1
  1433. package/dist/permissions/modules/validate-remaining-admin/validate-remaining-admin-users.d.ts +0 -4
  1434. package/dist/permissions/types.d.ts +0 -7
  1435. package/dist/permissions/utils/create-default-accountability.d.ts +0 -2
  1436. package/dist/permissions/utils/default-permission.d.ts +0 -7
  1437. package/dist/permissions/utils/extract-required-dynamic-variable-context.d.ts +0 -9
  1438. package/dist/permissions/utils/fetch-dynamic-variable-data.d.ts +0 -9
  1439. package/dist/permissions/utils/fetch-raw-permissions.d.ts +0 -11
  1440. package/dist/permissions/utils/fetch-share-info.d.ts +0 -12
  1441. package/dist/permissions/utils/filter-policies-by-ip.d.ts +0 -2
  1442. package/dist/permissions/utils/get-permissions-for-share.d.ts +0 -4
  1443. package/dist/permissions/utils/get-unaliased-field-key.d.ts +0 -5
  1444. package/dist/permissions/utils/merge-fields.d.ts +0 -1
  1445. package/dist/permissions/utils/merge-permissions.d.ts +0 -9
  1446. package/dist/permissions/utils/process-permissions.d.ts +0 -17
  1447. package/dist/permissions/utils/with-cache.d.ts +0 -12
  1448. package/dist/rate-limiter.d.ts +0 -5
  1449. package/dist/redis/index.d.ts +0 -3
  1450. package/dist/redis/lib/create-redis.d.ts +0 -7
  1451. package/dist/redis/lib/use-redis.d.ts +0 -16
  1452. package/dist/redis/utils/redis-config-available.d.ts +0 -4
  1453. package/dist/request/agent-with-ip-validation.d.ts +0 -10
  1454. package/dist/request/index.d.ts +0 -5
  1455. package/dist/request/is-denied-ip.d.ts +0 -1
  1456. package/dist/schedules/metrics.d.ts +0 -7
  1457. package/dist/schedules/project.d.ts +0 -4
  1458. package/dist/schedules/retention.d.ts +0 -14
  1459. package/dist/schedules/telemetry.d.ts +0 -11
  1460. package/dist/schedules/tus.d.ts +0 -6
  1461. package/dist/server.d.ts +0 -4
  1462. package/dist/services/access.d.ts +0 -9
  1463. package/dist/services/activity.d.ts +0 -5
  1464. package/dist/services/assets/name-deduper.d.ts +0 -7
  1465. package/dist/services/assets.d.ts +0 -35
  1466. package/dist/services/authentication.d.ts +0 -26
  1467. package/dist/services/collections.d.ts +0 -57
  1468. package/dist/services/comments.d.ts +0 -12
  1469. package/dist/services/dashboards.d.ts +0 -5
  1470. package/dist/services/deployment-projects.d.ts +0 -49
  1471. package/dist/services/deployment-runs.d.ts +0 -31
  1472. package/dist/services/deployment.d.ts +0 -81
  1473. package/dist/services/extensions.d.ts +0 -34
  1474. package/dist/services/fields/build-collection-and-field-relations.d.ts +0 -21
  1475. package/dist/services/fields/get-collection-meta-updates.d.ts +0 -11
  1476. package/dist/services/fields/get-collection-relation-list.d.ts +0 -5
  1477. package/dist/services/fields.d.ts +0 -49
  1478. package/dist/services/files/lib/extract-metadata.d.ts +0 -3
  1479. package/dist/services/files/lib/get-sharp-instance.d.ts +0 -2
  1480. package/dist/services/files/utils/get-metadata.d.ts +0 -4
  1481. package/dist/services/files/utils/parse-image-metadata.d.ts +0 -2
  1482. package/dist/services/files.d.ts +0 -31
  1483. package/dist/services/flows.d.ts +0 -8
  1484. package/dist/services/folders.d.ts +0 -30
  1485. package/dist/services/graphql/errors/execution.d.ts +0 -6
  1486. package/dist/services/graphql/errors/format.d.ts +0 -6
  1487. package/dist/services/graphql/errors/index.d.ts +0 -2
  1488. package/dist/services/graphql/errors/validation.d.ts +0 -6
  1489. package/dist/services/graphql/index.d.ts +0 -30
  1490. package/dist/services/graphql/resolvers/get-collection-type.d.ts +0 -3
  1491. package/dist/services/graphql/resolvers/get-field-type.d.ts +0 -3
  1492. package/dist/services/graphql/resolvers/get-relation-type.d.ts +0 -3
  1493. package/dist/services/graphql/resolvers/mutation.d.ts +0 -4
  1494. package/dist/services/graphql/resolvers/query.d.ts +0 -8
  1495. package/dist/services/graphql/resolvers/system-admin.d.ts +0 -5
  1496. package/dist/services/graphql/resolvers/system-global.d.ts +0 -7
  1497. package/dist/services/graphql/resolvers/system.d.ts +0 -5
  1498. package/dist/services/graphql/schema/get-types.d.ts +0 -12
  1499. package/dist/services/graphql/schema/index.d.ts +0 -32
  1500. package/dist/services/graphql/schema/parse-args.d.ts +0 -9
  1501. package/dist/services/graphql/schema/parse-query.d.ts +0 -7
  1502. package/dist/services/graphql/schema/read.d.ts +0 -12
  1503. package/dist/services/graphql/schema/write.d.ts +0 -9
  1504. package/dist/services/graphql/schema-cache.d.ts +0 -3
  1505. package/dist/services/graphql/subscription.d.ts +0 -22
  1506. package/dist/services/graphql/types/bigint.d.ts +0 -2
  1507. package/dist/services/graphql/types/date.d.ts +0 -2
  1508. package/dist/services/graphql/types/geojson.d.ts +0 -2
  1509. package/dist/services/graphql/types/hash.d.ts +0 -2
  1510. package/dist/services/graphql/types/string-or-float.d.ts +0 -5
  1511. package/dist/services/graphql/types/void.d.ts +0 -2
  1512. package/dist/services/graphql/utils/add-path-to-validation-error.d.ts +0 -2
  1513. package/dist/services/graphql/utils/aggregate-query.d.ts +0 -6
  1514. package/dist/services/graphql/utils/filter-replace-m2a.d.ts +0 -7
  1515. package/dist/services/graphql/utils/process-error.d.ts +0 -7
  1516. package/dist/services/graphql/utils/replace-fragments.d.ts +0 -6
  1517. package/dist/services/graphql/utils/replace-funcs.d.ts +0 -5
  1518. package/dist/services/graphql/utils/sanitize-gql-schema.d.ts +0 -8
  1519. package/dist/services/import-export.d.ts +0 -44
  1520. package/dist/services/index.d.ts +0 -41
  1521. package/dist/services/items.d.ts +0 -105
  1522. package/dist/services/mail/index.d.ts +0 -32
  1523. package/dist/services/mail/rate-limiter.d.ts +0 -1
  1524. package/dist/services/meta.d.ts +0 -11
  1525. package/dist/services/notifications.d.ts +0 -7
  1526. package/dist/services/operations.d.ts +0 -8
  1527. package/dist/services/panels.d.ts +0 -5
  1528. package/dist/services/payload.d.ts +0 -77
  1529. package/dist/services/permissions.d.ts +0 -14
  1530. package/dist/services/policies.d.ts +0 -11
  1531. package/dist/services/presets.d.ts +0 -5
  1532. package/dist/services/relations.d.ts +0 -55
  1533. package/dist/services/revisions.d.ts +0 -11
  1534. package/dist/services/roles.d.ts +0 -9
  1535. package/dist/services/schema.d.ts +0 -14
  1536. package/dist/services/server.d.ts +0 -13
  1537. package/dist/services/settings.d.ts +0 -6
  1538. package/dist/services/shares.d.ts +0 -19
  1539. package/dist/services/specifications.d.ts +0 -39
  1540. package/dist/services/tfa.d.ts +0 -12
  1541. package/dist/services/translations.d.ts +0 -8
  1542. package/dist/services/tus/data-store.d.ts +0 -33
  1543. package/dist/services/tus/index.d.ts +0 -2
  1544. package/dist/services/tus/lockers.d.ts +0 -36
  1545. package/dist/services/tus/server.d.ts +0 -8
  1546. package/dist/services/tus/utils/wait-timeout.d.ts +0 -1
  1547. package/dist/services/users.d.ts +0 -54
  1548. package/dist/services/utils.d.ts +0 -15
  1549. package/dist/services/versions.d.ts +0 -19
  1550. package/dist/services/websocket.d.ts +0 -12
  1551. package/dist/start.d.ts +0 -1
  1552. package/dist/storage/get-storage-driver.d.ts +0 -3
  1553. package/dist/storage/index.d.ts +0 -5
  1554. package/dist/storage/register-drivers.d.ts +0 -2
  1555. package/dist/storage/register-locations.d.ts +0 -2
  1556. package/dist/synchronization.d.ts +0 -7
  1557. package/dist/telemetry/index.d.ts +0 -3
  1558. package/dist/telemetry/lib/get-report.d.ts +0 -5
  1559. package/dist/telemetry/lib/send-report.d.ts +0 -10
  1560. package/dist/telemetry/lib/track.d.ts +0 -10
  1561. package/dist/telemetry/types/report.d.ts +0 -102
  1562. package/dist/telemetry/utils/check-user-limits.d.ts +0 -5
  1563. package/dist/telemetry/utils/get-extension-count.d.ts +0 -9
  1564. package/dist/telemetry/utils/get-field-count.d.ts +0 -6
  1565. package/dist/telemetry/utils/get-filesize-sum.d.ts +0 -5
  1566. package/dist/telemetry/utils/get-item-count.d.ts +0 -30
  1567. package/dist/telemetry/utils/get-random-wait-time.d.ts +0 -5
  1568. package/dist/telemetry/utils/get-settings.d.ts +0 -26
  1569. package/dist/telemetry/utils/get-user-item-count.d.ts +0 -13
  1570. package/dist/telemetry/utils/should-check-user-limits.d.ts +0 -4
  1571. package/dist/test-utils/cache.d.ts +0 -51
  1572. package/dist/test-utils/controllers.d.ts +0 -65
  1573. package/dist/test-utils/database.d.ts +0 -48
  1574. package/dist/test-utils/emitter.d.ts +0 -35
  1575. package/dist/test-utils/knex.d.ts +0 -164
  1576. package/dist/test-utils/schema.d.ts +0 -26
  1577. package/dist/test-utils/services/fields-service.d.ts +0 -28
  1578. package/dist/test-utils/services/files-service.d.ts +0 -28
  1579. package/dist/test-utils/services/folders-service.d.ts +0 -28
  1580. package/dist/test-utils/services/items-service.d.ts +0 -23
  1581. package/dist/types/ast.d.ts +0 -100
  1582. package/dist/types/auth.d.ts +0 -42
  1583. package/dist/types/collection.d.ts +0 -9
  1584. package/dist/types/events.d.ts +0 -18
  1585. package/dist/types/index.d.ts +0 -7
  1586. package/dist/types/meta.d.ts +0 -4
  1587. package/dist/types/migration.d.ts +0 -5
  1588. package/dist/types/revision.d.ts +0 -7
  1589. package/dist/types/rolemap.d.ts +0 -3
  1590. package/dist/utils/apply-diff.d.ts +0 -8
  1591. package/dist/utils/apply-snapshot.d.ts +0 -8
  1592. package/dist/utils/async-handler.d.ts +0 -3
  1593. package/dist/utils/calculate-field-depth.d.ts +0 -33
  1594. package/dist/utils/compress.d.ts +0 -2
  1595. package/dist/utils/construct-flow-tree.d.ts +0 -2
  1596. package/dist/utils/create-admin.d.ts +0 -11
  1597. package/dist/utils/deep-map-response.d.ts +0 -17
  1598. package/dist/utils/delete-from-require-cache.d.ts +0 -1
  1599. package/dist/utils/encrypt.d.ts +0 -2
  1600. package/dist/utils/fetch-user-count/fetch-access-lookup.d.ts +0 -19
  1601. package/dist/utils/fetch-user-count/fetch-access-roles.d.ts +0 -16
  1602. package/dist/utils/fetch-user-count/fetch-active-users.d.ts +0 -6
  1603. package/dist/utils/fetch-user-count/fetch-user-count.d.ts +0 -11
  1604. package/dist/utils/fetch-user-count/get-user-count-query.d.ts +0 -20
  1605. package/dist/utils/filter-items.d.ts +0 -2
  1606. package/dist/utils/freeze-schema.d.ts +0 -3
  1607. package/dist/utils/generate-hash.d.ts +0 -1
  1608. package/dist/utils/get-accountability-for-role.d.ts +0 -7
  1609. package/dist/utils/get-accountability-for-token.d.ts +0 -2
  1610. package/dist/utils/get-address.d.ts +0 -2
  1611. package/dist/utils/get-allowed-log-levels.d.ts +0 -3
  1612. package/dist/utils/get-auth-providers.d.ts +0 -10
  1613. package/dist/utils/get-cache-headers.d.ts +0 -10
  1614. package/dist/utils/get-cache-key.d.ts +0 -2
  1615. package/dist/utils/get-collection-from-alias.d.ts +0 -6
  1616. package/dist/utils/get-column-path.d.ts +0 -26
  1617. package/dist/utils/get-config-from-env.d.ts +0 -6
  1618. package/dist/utils/get-default-index-name.d.ts +0 -13
  1619. package/dist/utils/get-default-value.d.ts +0 -5
  1620. package/dist/utils/get-field-relational-depth.d.ts +0 -13
  1621. package/dist/utils/get-field-system-rows.d.ts +0 -2
  1622. package/dist/utils/get-graphql-query-and-variables.d.ts +0 -2
  1623. package/dist/utils/get-graphql-type.d.ts +0 -4
  1624. package/dist/utils/get-ip-from-req.d.ts +0 -3
  1625. package/dist/utils/get-local-type.d.ts +0 -9
  1626. package/dist/utils/get-milliseconds.d.ts +0 -4
  1627. package/dist/utils/get-module-default.d.ts +0 -3
  1628. package/dist/utils/get-schema.d.ts +0 -10
  1629. package/dist/utils/get-secret.d.ts +0 -4
  1630. package/dist/utils/get-service.d.ts +0 -7
  1631. package/dist/utils/get-snapshot-diff.d.ts +0 -2
  1632. package/dist/utils/get-snapshot.d.ts +0 -6
  1633. package/dist/utils/get-string-byte-size.d.ts +0 -4
  1634. package/dist/utils/get-versioned-hash.d.ts +0 -1
  1635. package/dist/utils/import-file-url.d.ts +0 -5
  1636. package/dist/utils/is-directus-jwt.d.ts +0 -5
  1637. package/dist/utils/is-field-allowed.d.ts +0 -4
  1638. package/dist/utils/is-url-allowed.d.ts +0 -4
  1639. package/dist/utils/is-valid-uuid.d.ts +0 -3
  1640. package/dist/utils/job-queue.d.ts +0 -9
  1641. package/dist/utils/jwt.d.ts +0 -3
  1642. package/dist/utils/md.d.ts +0 -4
  1643. package/dist/utils/parse-filter-key.d.ts +0 -7
  1644. package/dist/utils/parse-numeric-string.d.ts +0 -2
  1645. package/dist/utils/parse-value.d.ts +0 -4
  1646. package/dist/utils/permissions-cacheable.d.ts +0 -8
  1647. package/dist/utils/redact-object.d.ts +0 -23
  1648. package/dist/utils/reduce-schema.d.ts +0 -7
  1649. package/dist/utils/require-text.d.ts +0 -1
  1650. package/dist/utils/require-yaml.d.ts +0 -1
  1651. package/dist/utils/sanitize-query.d.ts +0 -5
  1652. package/dist/utils/sanitize-schema.d.ts +0 -33
  1653. package/dist/utils/schedule.d.ts +0 -5
  1654. package/dist/utils/should-clear-cache.d.ts +0 -10
  1655. package/dist/utils/should-skip-cache.d.ts +0 -7
  1656. package/dist/utils/split-fields.d.ts +0 -4
  1657. package/dist/utils/stall.d.ts +0 -26
  1658. package/dist/utils/transaction.d.ts +0 -9
  1659. package/dist/utils/transformations.d.ts +0 -6
  1660. package/dist/utils/url.d.ts +0 -18
  1661. package/dist/utils/user-name.d.ts +0 -2
  1662. package/dist/utils/validate-diff.d.ts +0 -7
  1663. package/dist/utils/validate-env.d.ts +0 -1
  1664. package/dist/utils/validate-keys.d.ts +0 -5
  1665. package/dist/utils/validate-query.d.ts +0 -4
  1666. package/dist/utils/validate-snapshot.d.ts +0 -5
  1667. package/dist/utils/validate-storage.d.ts +0 -1
  1668. package/dist/utils/validate-user-count-integrity.d.ts +0 -6
  1669. package/dist/utils/verify-session-jwt.d.ts +0 -7
  1670. package/dist/utils/versioning/handle-version.d.ts +0 -3
  1671. package/dist/utils/versioning/merge-version-data.d.ts +0 -2
  1672. package/dist/utils/versioning/split-recursive.d.ts +0 -4
  1673. package/dist/websocket/authenticate.d.ts +0 -5
  1674. package/dist/websocket/collab/calculate-cache-metadata.d.ts +0 -9
  1675. package/dist/websocket/collab/collab.d.ts +0 -63
  1676. package/dist/websocket/collab/constants.d.ts +0 -1
  1677. package/dist/websocket/collab/filter-to-fields.d.ts +0 -2
  1678. package/dist/websocket/collab/messenger.d.ts +0 -43
  1679. package/dist/websocket/collab/payload-permissions.d.ts +0 -18
  1680. package/dist/websocket/collab/permissions-cache.d.ts +0 -52
  1681. package/dist/websocket/collab/room.d.ts +0 -125
  1682. package/dist/websocket/collab/store.d.ts +0 -7
  1683. package/dist/websocket/collab/types.d.ts +0 -21
  1684. package/dist/websocket/collab/verify-permissions.d.ts +0 -11
  1685. package/dist/websocket/controllers/base.d.ts +0 -35
  1686. package/dist/websocket/controllers/graphql.d.ts +0 -11
  1687. package/dist/websocket/controllers/hooks.d.ts +0 -1
  1688. package/dist/websocket/controllers/index.d.ts +0 -13
  1689. package/dist/websocket/controllers/logs.d.ts +0 -17
  1690. package/dist/websocket/controllers/rest.d.ts +0 -8
  1691. package/dist/websocket/errors.d.ts +0 -16
  1692. package/dist/websocket/handlers/heartbeat.d.ts +0 -11
  1693. package/dist/websocket/handlers/index.d.ts +0 -7
  1694. package/dist/websocket/handlers/items.d.ts +0 -6
  1695. package/dist/websocket/handlers/logs.d.ts +0 -31
  1696. package/dist/websocket/handlers/subscribe.d.ts +0 -38
  1697. package/dist/websocket/messages.d.ts +0 -114
  1698. package/dist/websocket/types.d.ts +0 -38
  1699. package/dist/websocket/utils/get-expires-at-for-token.d.ts +0 -1
  1700. package/dist/websocket/utils/items.d.ts +0 -43
  1701. package/dist/websocket/utils/message.d.ts +0 -4
  1702. package/dist/websocket/utils/wait-for-message.d.ts +0 -4
@@ -0,0 +1,3558 @@
1
+ import { __export as __export$1 } from "../../../../../_virtual/rolldown_runtime.js";
2
+
3
+ //#region ../node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js
4
+ var chai_exports = /* @__PURE__ */ __export$1({
5
+ Assertion: () => Assertion,
6
+ AssertionError: () => AssertionError,
7
+ Should: () => Should,
8
+ assert: () => assert,
9
+ config: () => config,
10
+ expect: () => expect,
11
+ should: () => should,
12
+ use: () => use,
13
+ util: () => utils_exports
14
+ });
15
+ var __defProp = Object.defineProperty;
16
+ var __name = (target, value) => __defProp(target, "name", {
17
+ value,
18
+ configurable: true
19
+ });
20
+ var __export = (target, all) => {
21
+ for (var name in all) __defProp(target, name, {
22
+ get: all[name],
23
+ enumerable: true
24
+ });
25
+ };
26
+ var utils_exports = {};
27
+ __export(utils_exports, {
28
+ addChainableMethod: () => addChainableMethod,
29
+ addLengthGuard: () => addLengthGuard,
30
+ addMethod: () => addMethod,
31
+ addProperty: () => addProperty,
32
+ checkError: () => check_error_exports,
33
+ compareByInspect: () => compareByInspect,
34
+ eql: () => deep_eql_default,
35
+ expectTypes: () => expectTypes,
36
+ flag: () => flag,
37
+ getActual: () => getActual,
38
+ getMessage: () => getMessage2,
39
+ getName: () => getName,
40
+ getOperator: () => getOperator,
41
+ getOwnEnumerableProperties: () => getOwnEnumerableProperties,
42
+ getOwnEnumerablePropertySymbols: () => getOwnEnumerablePropertySymbols,
43
+ getPathInfo: () => getPathInfo,
44
+ hasProperty: () => hasProperty,
45
+ inspect: () => inspect2,
46
+ isNaN: () => isNaN2,
47
+ isNumeric: () => isNumeric,
48
+ isProxyEnabled: () => isProxyEnabled,
49
+ isRegExp: () => isRegExp2,
50
+ objDisplay: () => objDisplay,
51
+ overwriteChainableMethod: () => overwriteChainableMethod,
52
+ overwriteMethod: () => overwriteMethod,
53
+ overwriteProperty: () => overwriteProperty,
54
+ proxify: () => proxify,
55
+ test: () => test,
56
+ transferFlags: () => transferFlags,
57
+ type: () => type
58
+ });
59
+ var check_error_exports = {};
60
+ __export(check_error_exports, {
61
+ compatibleConstructor: () => compatibleConstructor,
62
+ compatibleInstance: () => compatibleInstance,
63
+ compatibleMessage: () => compatibleMessage,
64
+ getConstructorName: () => getConstructorName,
65
+ getMessage: () => getMessage
66
+ });
67
+ function isErrorInstance(obj) {
68
+ return obj instanceof Error || Object.prototype.toString.call(obj) === "[object Error]";
69
+ }
70
+ __name(isErrorInstance, "isErrorInstance");
71
+ function isRegExp(obj) {
72
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
73
+ }
74
+ __name(isRegExp, "isRegExp");
75
+ function compatibleInstance(thrown, errorLike) {
76
+ return isErrorInstance(errorLike) && thrown === errorLike;
77
+ }
78
+ __name(compatibleInstance, "compatibleInstance");
79
+ function compatibleConstructor(thrown, errorLike) {
80
+ if (isErrorInstance(errorLike)) {
81
+ return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;
82
+ } else if ((typeof errorLike === "object" || typeof errorLike === "function") && errorLike.prototype) {
83
+ return thrown.constructor === errorLike || thrown instanceof errorLike;
84
+ }
85
+ return false;
86
+ }
87
+ __name(compatibleConstructor, "compatibleConstructor");
88
+ function compatibleMessage(thrown, errMatcher) {
89
+ const comparisonString = typeof thrown === "string" ? thrown : thrown.message;
90
+ if (isRegExp(errMatcher)) {
91
+ return errMatcher.test(comparisonString);
92
+ } else if (typeof errMatcher === "string") {
93
+ return comparisonString.indexOf(errMatcher) !== -1;
94
+ }
95
+ return false;
96
+ }
97
+ __name(compatibleMessage, "compatibleMessage");
98
+ function getConstructorName(errorLike) {
99
+ let constructorName = errorLike;
100
+ if (isErrorInstance(errorLike)) {
101
+ constructorName = errorLike.constructor.name;
102
+ } else if (typeof errorLike === "function") {
103
+ constructorName = errorLike.name;
104
+ if (constructorName === "") {
105
+ const newConstructorName = new errorLike().name;
106
+ constructorName = newConstructorName || constructorName;
107
+ }
108
+ }
109
+ return constructorName;
110
+ }
111
+ __name(getConstructorName, "getConstructorName");
112
+ function getMessage(errorLike) {
113
+ let msg = "";
114
+ if (errorLike && errorLike.message) {
115
+ msg = errorLike.message;
116
+ } else if (typeof errorLike === "string") {
117
+ msg = errorLike;
118
+ }
119
+ return msg;
120
+ }
121
+ __name(getMessage, "getMessage");
122
+ function flag(obj, key, value) {
123
+ let flags = obj.__flags || (obj.__flags = /* @__PURE__ */ Object.create(null));
124
+ if (arguments.length === 3) {
125
+ flags[key] = value;
126
+ } else {
127
+ return flags[key];
128
+ }
129
+ }
130
+ __name(flag, "flag");
131
+ function test(obj, args) {
132
+ let negate = flag(obj, "negate"), expr = args[0];
133
+ return negate ? !expr : expr;
134
+ }
135
+ __name(test, "test");
136
+ function type(obj) {
137
+ if (typeof obj === "undefined") {
138
+ return "undefined";
139
+ }
140
+ if (obj === null) {
141
+ return "null";
142
+ }
143
+ const stringTag = obj[Symbol.toStringTag];
144
+ if (typeof stringTag === "string") {
145
+ return stringTag;
146
+ }
147
+ const type3 = Object.prototype.toString.call(obj).slice(8, -1);
148
+ return type3;
149
+ }
150
+ __name(type, "type");
151
+ var canElideFrames = "captureStackTrace" in Error;
152
+ var AssertionError = class _AssertionError extends Error {
153
+ static {
154
+ __name(this, "AssertionError");
155
+ }
156
+ message;
157
+ get name() {
158
+ return "AssertionError";
159
+ }
160
+ get ok() {
161
+ return false;
162
+ }
163
+ constructor(message = "Unspecified AssertionError", props, ssf) {
164
+ super(message);
165
+ this.message = message;
166
+ if (canElideFrames) {
167
+ Error.captureStackTrace(this, ssf || _AssertionError);
168
+ }
169
+ for (const key in props) {
170
+ if (!(key in this)) {
171
+ this[key] = props[key];
172
+ }
173
+ }
174
+ }
175
+ toJSON(stack) {
176
+ return {
177
+ ...this,
178
+ name: this.name,
179
+ message: this.message,
180
+ ok: false,
181
+ stack: stack !== false ? this.stack : void 0
182
+ };
183
+ }
184
+ };
185
+ function expectTypes(obj, types) {
186
+ let flagMsg = flag(obj, "message");
187
+ let ssfi = flag(obj, "ssfi");
188
+ flagMsg = flagMsg ? flagMsg + ": " : "";
189
+ obj = flag(obj, "object");
190
+ types = types.map(function(t) {
191
+ return t.toLowerCase();
192
+ });
193
+ types.sort();
194
+ let str = types.map(function(t, index) {
195
+ let art = ~[
196
+ "a",
197
+ "e",
198
+ "i",
199
+ "o",
200
+ "u"
201
+ ].indexOf(t.charAt(0)) ? "an" : "a";
202
+ let or = types.length > 1 && index === types.length - 1 ? "or " : "";
203
+ return or + art + " " + t;
204
+ }).join(", ");
205
+ let objType = type(obj).toLowerCase();
206
+ if (!types.some(function(expected) {
207
+ return objType === expected;
208
+ })) {
209
+ throw new AssertionError(flagMsg + "object tested must be " + str + ", but " + objType + " given", void 0, ssfi);
210
+ }
211
+ }
212
+ __name(expectTypes, "expectTypes");
213
+ function getActual(obj, args) {
214
+ return args.length > 4 ? args[4] : obj._obj;
215
+ }
216
+ __name(getActual, "getActual");
217
+ var ansiColors = {
218
+ bold: ["1", "22"],
219
+ dim: ["2", "22"],
220
+ italic: ["3", "23"],
221
+ underline: ["4", "24"],
222
+ inverse: ["7", "27"],
223
+ hidden: ["8", "28"],
224
+ strike: ["9", "29"],
225
+ black: ["30", "39"],
226
+ red: ["31", "39"],
227
+ green: ["32", "39"],
228
+ yellow: ["33", "39"],
229
+ blue: ["34", "39"],
230
+ magenta: ["35", "39"],
231
+ cyan: ["36", "39"],
232
+ white: ["37", "39"],
233
+ brightblack: ["30;1", "39"],
234
+ brightred: ["31;1", "39"],
235
+ brightgreen: ["32;1", "39"],
236
+ brightyellow: ["33;1", "39"],
237
+ brightblue: ["34;1", "39"],
238
+ brightmagenta: ["35;1", "39"],
239
+ brightcyan: ["36;1", "39"],
240
+ brightwhite: ["37;1", "39"],
241
+ grey: ["90", "39"]
242
+ };
243
+ var styles = {
244
+ special: "cyan",
245
+ number: "yellow",
246
+ bigint: "yellow",
247
+ boolean: "yellow",
248
+ undefined: "grey",
249
+ null: "bold",
250
+ string: "green",
251
+ symbol: "green",
252
+ date: "magenta",
253
+ regexp: "red"
254
+ };
255
+ var truncator = "…";
256
+ function colorise(value, styleType) {
257
+ const color = ansiColors[styles[styleType]] || ansiColors[styleType] || "";
258
+ if (!color) {
259
+ return String(value);
260
+ }
261
+ return `\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m`;
262
+ }
263
+ __name(colorise, "colorise");
264
+ function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [], truncate: truncate2 = Infinity, stylize = String } = {}, inspect3) {
265
+ const options = {
266
+ showHidden: Boolean(showHidden),
267
+ depth: Number(depth),
268
+ colors: Boolean(colors),
269
+ customInspect: Boolean(customInspect),
270
+ showProxy: Boolean(showProxy),
271
+ maxArrayLength: Number(maxArrayLength),
272
+ breakLength: Number(breakLength),
273
+ truncate: Number(truncate2),
274
+ seen,
275
+ inspect: inspect3,
276
+ stylize
277
+ };
278
+ if (options.colors) {
279
+ options.stylize = colorise;
280
+ }
281
+ return options;
282
+ }
283
+ __name(normaliseOptions, "normaliseOptions");
284
+ function isHighSurrogate(char) {
285
+ return char >= "\ud800" && char <= "\udbff";
286
+ }
287
+ __name(isHighSurrogate, "isHighSurrogate");
288
+ function truncate(string, length, tail = truncator) {
289
+ string = String(string);
290
+ const tailLength = tail.length;
291
+ const stringLength = string.length;
292
+ if (tailLength > length && stringLength > tailLength) {
293
+ return tail;
294
+ }
295
+ if (stringLength > length && stringLength > tailLength) {
296
+ let end = length - tailLength;
297
+ if (end > 0 && isHighSurrogate(string[end - 1])) {
298
+ end = end - 1;
299
+ }
300
+ return `${string.slice(0, end)}${tail}`;
301
+ }
302
+ return string;
303
+ }
304
+ __name(truncate, "truncate");
305
+ function inspectList(list, options, inspectItem, separator = ", ") {
306
+ inspectItem = inspectItem || options.inspect;
307
+ const size = list.length;
308
+ if (size === 0) return "";
309
+ const originalLength = options.truncate;
310
+ let output = "";
311
+ let peek = "";
312
+ let truncated = "";
313
+ for (let i = 0; i < size; i += 1) {
314
+ const last = i + 1 === list.length;
315
+ const secondToLast = i + 2 === list.length;
316
+ truncated = `${truncator}(${list.length - i})`;
317
+ const value = list[i];
318
+ options.truncate = originalLength - output.length - (last ? 0 : separator.length);
319
+ const string = peek || inspectItem(value, options) + (last ? "" : separator);
320
+ const nextLength = output.length + string.length;
321
+ const truncatedLength = nextLength + truncated.length;
322
+ if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {
323
+ break;
324
+ }
325
+ if (!last && !secondToLast && truncatedLength > originalLength) {
326
+ break;
327
+ }
328
+ peek = last ? "" : inspectItem(list[i + 1], options) + (secondToLast ? "" : separator);
329
+ if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
330
+ break;
331
+ }
332
+ output += string;
333
+ if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
334
+ truncated = `${truncator}(${list.length - i - 1})`;
335
+ break;
336
+ }
337
+ truncated = "";
338
+ }
339
+ return `${output}${truncated}`;
340
+ }
341
+ __name(inspectList, "inspectList");
342
+ function quoteComplexKey(key) {
343
+ if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {
344
+ return key;
345
+ }
346
+ return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, "\"").replace(/(^"|"$)/g, "'");
347
+ }
348
+ __name(quoteComplexKey, "quoteComplexKey");
349
+ function inspectProperty([key, value], options) {
350
+ options.truncate -= 2;
351
+ if (typeof key === "string") {
352
+ key = quoteComplexKey(key);
353
+ } else if (typeof key !== "number") {
354
+ key = `[${options.inspect(key, options)}]`;
355
+ }
356
+ options.truncate -= key.length;
357
+ value = options.inspect(value, options);
358
+ return `${key}: ${value}`;
359
+ }
360
+ __name(inspectProperty, "inspectProperty");
361
+ function inspectArray(array, options) {
362
+ const nonIndexProperties = Object.keys(array).slice(array.length);
363
+ if (!array.length && !nonIndexProperties.length) return "[]";
364
+ options.truncate -= 4;
365
+ const listContents = inspectList(array, options);
366
+ options.truncate -= listContents.length;
367
+ let propertyContents = "";
368
+ if (nonIndexProperties.length) {
369
+ propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
370
+ }
371
+ return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
372
+ }
373
+ __name(inspectArray, "inspectArray");
374
+ var getArrayName = /* @__PURE__ */ __name((array) => {
375
+ if (typeof Buffer === "function" && array instanceof Buffer) {
376
+ return "Buffer";
377
+ }
378
+ if (array[Symbol.toStringTag]) {
379
+ return array[Symbol.toStringTag];
380
+ }
381
+ return array.constructor.name;
382
+ }, "getArrayName");
383
+ function inspectTypedArray(array, options) {
384
+ const name = getArrayName(array);
385
+ options.truncate -= name.length + 4;
386
+ const nonIndexProperties = Object.keys(array).slice(array.length);
387
+ if (!array.length && !nonIndexProperties.length) return `${name}[]`;
388
+ let output = "";
389
+ for (let i = 0; i < array.length; i++) {
390
+ const string = `${options.stylize(truncate(array[i], options.truncate), "number")}${i === array.length - 1 ? "" : ", "}`;
391
+ options.truncate -= string.length;
392
+ if (array[i] !== array.length && options.truncate <= 3) {
393
+ output += `${truncator}(${array.length - array[i] + 1})`;
394
+ break;
395
+ }
396
+ output += string;
397
+ }
398
+ let propertyContents = "";
399
+ if (nonIndexProperties.length) {
400
+ propertyContents = inspectList(nonIndexProperties.map((key) => [key, array[key]]), options, inspectProperty);
401
+ }
402
+ return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
403
+ }
404
+ __name(inspectTypedArray, "inspectTypedArray");
405
+ function inspectDate(dateObject, options) {
406
+ const stringRepresentation = dateObject.toJSON();
407
+ if (stringRepresentation === null) {
408
+ return "Invalid Date";
409
+ }
410
+ const split = stringRepresentation.split("T");
411
+ const date = split[0];
412
+ return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
413
+ }
414
+ __name(inspectDate, "inspectDate");
415
+ function inspectFunction(func, options) {
416
+ const functionType = func[Symbol.toStringTag] || "Function";
417
+ const name = func.name;
418
+ if (!name) {
419
+ return options.stylize(`[${functionType}]`, "special");
420
+ }
421
+ return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special");
422
+ }
423
+ __name(inspectFunction, "inspectFunction");
424
+ function inspectMapEntry([key, value], options) {
425
+ options.truncate -= 4;
426
+ key = options.inspect(key, options);
427
+ options.truncate -= key.length;
428
+ value = options.inspect(value, options);
429
+ return `${key} => ${value}`;
430
+ }
431
+ __name(inspectMapEntry, "inspectMapEntry");
432
+ function mapToEntries(map) {
433
+ const entries = [];
434
+ map.forEach((value, key) => {
435
+ entries.push([key, value]);
436
+ });
437
+ return entries;
438
+ }
439
+ __name(mapToEntries, "mapToEntries");
440
+ function inspectMap(map, options) {
441
+ if (map.size === 0) return "Map{}";
442
+ options.truncate -= 7;
443
+ return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
444
+ }
445
+ __name(inspectMap, "inspectMap");
446
+ var isNaN = Number.isNaN || ((i) => i !== i);
447
+ function inspectNumber(number, options) {
448
+ if (isNaN(number)) {
449
+ return options.stylize("NaN", "number");
450
+ }
451
+ if (number === Infinity) {
452
+ return options.stylize("Infinity", "number");
453
+ }
454
+ if (number === -Infinity) {
455
+ return options.stylize("-Infinity", "number");
456
+ }
457
+ if (number === 0) {
458
+ return options.stylize(1 / number === Infinity ? "+0" : "-0", "number");
459
+ }
460
+ return options.stylize(truncate(String(number), options.truncate), "number");
461
+ }
462
+ __name(inspectNumber, "inspectNumber");
463
+ function inspectBigInt(number, options) {
464
+ let nums = truncate(number.toString(), options.truncate - 1);
465
+ if (nums !== truncator) nums += "n";
466
+ return options.stylize(nums, "bigint");
467
+ }
468
+ __name(inspectBigInt, "inspectBigInt");
469
+ function inspectRegExp(value, options) {
470
+ const flags = value.toString().split("/")[2];
471
+ const sourceLength = options.truncate - (2 + flags.length);
472
+ const source = value.source;
473
+ return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
474
+ }
475
+ __name(inspectRegExp, "inspectRegExp");
476
+ function arrayFromSet(set2) {
477
+ const values = [];
478
+ set2.forEach((value) => {
479
+ values.push(value);
480
+ });
481
+ return values;
482
+ }
483
+ __name(arrayFromSet, "arrayFromSet");
484
+ function inspectSet(set2, options) {
485
+ if (set2.size === 0) return "Set{}";
486
+ options.truncate -= 7;
487
+ return `Set{ ${inspectList(arrayFromSet(set2), options)} }`;
488
+ }
489
+ __name(inspectSet, "inspectSet");
490
+ var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
491
+ var escapeCharacters = {
492
+ "\b": "\\b",
493
+ " ": "\\t",
494
+ "\n": "\\n",
495
+ "\f": "\\f",
496
+ "\r": "\\r",
497
+ "'": "\\'",
498
+ "\\": "\\\\"
499
+ };
500
+ var hex = 16;
501
+ var unicodeLength = 4;
502
+ function escape(char) {
503
+ return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
504
+ }
505
+ __name(escape, "escape");
506
+ function inspectString(string, options) {
507
+ if (stringEscapeChars.test(string)) {
508
+ string = string.replace(stringEscapeChars, escape);
509
+ }
510
+ return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
511
+ }
512
+ __name(inspectString, "inspectString");
513
+ function inspectSymbol(value) {
514
+ if ("description" in Symbol.prototype) {
515
+ return value.description ? `Symbol(${value.description})` : "Symbol()";
516
+ }
517
+ return value.toString();
518
+ }
519
+ __name(inspectSymbol, "inspectSymbol");
520
+ var getPromiseValue = /* @__PURE__ */ __name(() => "Promise{…}", "getPromiseValue");
521
+ var promise_default = getPromiseValue;
522
+ function inspectObject(object, options) {
523
+ const properties = Object.getOwnPropertyNames(object);
524
+ const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
525
+ if (properties.length === 0 && symbols.length === 0) {
526
+ return "{}";
527
+ }
528
+ options.truncate -= 4;
529
+ options.seen = options.seen || [];
530
+ if (options.seen.includes(object)) {
531
+ return "[Circular]";
532
+ }
533
+ options.seen.push(object);
534
+ const propertyContents = inspectList(properties.map((key) => [key, object[key]]), options, inspectProperty);
535
+ const symbolContents = inspectList(symbols.map((key) => [key, object[key]]), options, inspectProperty);
536
+ options.seen.pop();
537
+ let sep = "";
538
+ if (propertyContents && symbolContents) {
539
+ sep = ", ";
540
+ }
541
+ return `{ ${propertyContents}${sep}${symbolContents} }`;
542
+ }
543
+ __name(inspectObject, "inspectObject");
544
+ var toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
545
+ function inspectClass(value, options) {
546
+ let name = "";
547
+ if (toStringTag && toStringTag in value) {
548
+ name = value[toStringTag];
549
+ }
550
+ name = name || value.constructor.name;
551
+ if (!name || name === "_class") {
552
+ name = "<Anonymous Class>";
553
+ }
554
+ options.truncate -= name.length;
555
+ return `${name}${inspectObject(value, options)}`;
556
+ }
557
+ __name(inspectClass, "inspectClass");
558
+ function inspectArguments(args, options) {
559
+ if (args.length === 0) return "Arguments[]";
560
+ options.truncate -= 13;
561
+ return `Arguments[ ${inspectList(args, options)} ]`;
562
+ }
563
+ __name(inspectArguments, "inspectArguments");
564
+ var errorKeys = [
565
+ "stack",
566
+ "line",
567
+ "column",
568
+ "name",
569
+ "message",
570
+ "fileName",
571
+ "lineNumber",
572
+ "columnNumber",
573
+ "number",
574
+ "description",
575
+ "cause"
576
+ ];
577
+ function inspectObject2(error, options) {
578
+ const properties = Object.getOwnPropertyNames(error).filter((key) => errorKeys.indexOf(key) === -1);
579
+ const name = error.name;
580
+ options.truncate -= name.length;
581
+ let message = "";
582
+ if (typeof error.message === "string") {
583
+ message = truncate(error.message, options.truncate);
584
+ } else {
585
+ properties.unshift("message");
586
+ }
587
+ message = message ? `: ${message}` : "";
588
+ options.truncate -= message.length + 5;
589
+ options.seen = options.seen || [];
590
+ if (options.seen.includes(error)) {
591
+ return "[Circular]";
592
+ }
593
+ options.seen.push(error);
594
+ const propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
595
+ return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
596
+ }
597
+ __name(inspectObject2, "inspectObject");
598
+ function inspectAttribute([key, value], options) {
599
+ options.truncate -= 3;
600
+ if (!value) {
601
+ return `${options.stylize(String(key), "yellow")}`;
602
+ }
603
+ return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
604
+ }
605
+ __name(inspectAttribute, "inspectAttribute");
606
+ function inspectNodeCollection(collection, options) {
607
+ return inspectList(collection, options, inspectNode, "\n");
608
+ }
609
+ __name(inspectNodeCollection, "inspectNodeCollection");
610
+ function inspectNode(node, options) {
611
+ switch (node.nodeType) {
612
+ case 1: return inspectHTML(node, options);
613
+ case 3: return options.inspect(node.data, options);
614
+ default: return options.inspect(node, options);
615
+ }
616
+ }
617
+ __name(inspectNode, "inspectNode");
618
+ function inspectHTML(element, options) {
619
+ const properties = element.getAttributeNames();
620
+ const name = element.tagName.toLowerCase();
621
+ const head = options.stylize(`<${name}`, "special");
622
+ const headClose = options.stylize(`>`, "special");
623
+ const tail = options.stylize(`</${name}>`, "special");
624
+ options.truncate -= name.length * 2 + 5;
625
+ let propertyContents = "";
626
+ if (properties.length > 0) {
627
+ propertyContents += " ";
628
+ propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, " ");
629
+ }
630
+ options.truncate -= propertyContents.length;
631
+ const truncate2 = options.truncate;
632
+ let children = inspectNodeCollection(element.children, options);
633
+ if (children && children.length > truncate2) {
634
+ children = `${truncator}(${element.children.length})`;
635
+ }
636
+ return `${head}${propertyContents}${headClose}${children}${tail}`;
637
+ }
638
+ __name(inspectHTML, "inspectHTML");
639
+ var symbolsSupported = typeof Symbol === "function" && typeof Symbol.for === "function";
640
+ var chaiInspect = symbolsSupported ? Symbol.for("chai/inspect") : "@@chai/inspect";
641
+ var nodeInspect = Symbol.for("nodejs.util.inspect.custom");
642
+ var constructorMap = /* @__PURE__ */ new WeakMap();
643
+ var stringTagMap = {};
644
+ var baseTypesMap = {
645
+ undefined: /* @__PURE__ */ __name((value, options) => options.stylize("undefined", "undefined"), "undefined"),
646
+ null: /* @__PURE__ */ __name((value, options) => options.stylize("null", "null"), "null"),
647
+ boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "boolean"),
648
+ Boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "Boolean"),
649
+ number: inspectNumber,
650
+ Number: inspectNumber,
651
+ bigint: inspectBigInt,
652
+ BigInt: inspectBigInt,
653
+ string: inspectString,
654
+ String: inspectString,
655
+ function: inspectFunction,
656
+ Function: inspectFunction,
657
+ symbol: inspectSymbol,
658
+ Symbol: inspectSymbol,
659
+ Array: inspectArray,
660
+ Date: inspectDate,
661
+ Map: inspectMap,
662
+ Set: inspectSet,
663
+ RegExp: inspectRegExp,
664
+ Promise: promise_default,
665
+ WeakSet: /* @__PURE__ */ __name((value, options) => options.stylize("WeakSet{…}", "special"), "WeakSet"),
666
+ WeakMap: /* @__PURE__ */ __name((value, options) => options.stylize("WeakMap{…}", "special"), "WeakMap"),
667
+ Arguments: inspectArguments,
668
+ Int8Array: inspectTypedArray,
669
+ Uint8Array: inspectTypedArray,
670
+ Uint8ClampedArray: inspectTypedArray,
671
+ Int16Array: inspectTypedArray,
672
+ Uint16Array: inspectTypedArray,
673
+ Int32Array: inspectTypedArray,
674
+ Uint32Array: inspectTypedArray,
675
+ Float32Array: inspectTypedArray,
676
+ Float64Array: inspectTypedArray,
677
+ Generator: /* @__PURE__ */ __name(() => "", "Generator"),
678
+ DataView: /* @__PURE__ */ __name(() => "", "DataView"),
679
+ ArrayBuffer: /* @__PURE__ */ __name(() => "", "ArrayBuffer"),
680
+ Error: inspectObject2,
681
+ HTMLCollection: inspectNodeCollection,
682
+ NodeList: inspectNodeCollection
683
+ };
684
+ var inspectCustom = /* @__PURE__ */ __name((value, options, type3) => {
685
+ if (chaiInspect in value && typeof value[chaiInspect] === "function") {
686
+ return value[chaiInspect](options);
687
+ }
688
+ if (nodeInspect in value && typeof value[nodeInspect] === "function") {
689
+ return value[nodeInspect](options.depth, options);
690
+ }
691
+ if ("inspect" in value && typeof value.inspect === "function") {
692
+ return value.inspect(options.depth, options);
693
+ }
694
+ if ("constructor" in value && constructorMap.has(value.constructor)) {
695
+ return constructorMap.get(value.constructor)(value, options);
696
+ }
697
+ if (stringTagMap[type3]) {
698
+ return stringTagMap[type3](value, options);
699
+ }
700
+ return "";
701
+ }, "inspectCustom");
702
+ var toString = Object.prototype.toString;
703
+ function inspect(value, opts = {}) {
704
+ const options = normaliseOptions(opts, inspect);
705
+ const { customInspect } = options;
706
+ let type3 = value === null ? "null" : typeof value;
707
+ if (type3 === "object") {
708
+ type3 = toString.call(value).slice(8, -1);
709
+ }
710
+ if (type3 in baseTypesMap) {
711
+ return baseTypesMap[type3](value, options);
712
+ }
713
+ if (customInspect && value) {
714
+ const output = inspectCustom(value, options, type3);
715
+ if (output) {
716
+ if (typeof output === "string") return output;
717
+ return inspect(output, options);
718
+ }
719
+ }
720
+ const proto = value ? Object.getPrototypeOf(value) : false;
721
+ if (proto === Object.prototype || proto === null) {
722
+ return inspectObject(value, options);
723
+ }
724
+ if (value && typeof HTMLElement === "function" && value instanceof HTMLElement) {
725
+ return inspectHTML(value, options);
726
+ }
727
+ if ("constructor" in value) {
728
+ if (value.constructor !== Object) {
729
+ return inspectClass(value, options);
730
+ }
731
+ return inspectObject(value, options);
732
+ }
733
+ if (value === Object(value)) {
734
+ return inspectObject(value, options);
735
+ }
736
+ return options.stylize(String(value), type3);
737
+ }
738
+ __name(inspect, "inspect");
739
+ var config = {
740
+ includeStack: false,
741
+ showDiff: true,
742
+ truncateThreshold: 40,
743
+ useProxy: true,
744
+ proxyExcludedKeys: [
745
+ "then",
746
+ "catch",
747
+ "inspect",
748
+ "toJSON"
749
+ ],
750
+ deepEqual: null
751
+ };
752
+ function inspect2(obj, showHidden, depth, colors) {
753
+ let options = {
754
+ colors,
755
+ depth: typeof depth === "undefined" ? 2 : depth,
756
+ showHidden,
757
+ truncate: config.truncateThreshold ? config.truncateThreshold : Infinity
758
+ };
759
+ return inspect(obj, options);
760
+ }
761
+ __name(inspect2, "inspect");
762
+ function objDisplay(obj) {
763
+ let str = inspect2(obj), type3 = Object.prototype.toString.call(obj);
764
+ if (config.truncateThreshold && str.length >= config.truncateThreshold) {
765
+ if (type3 === "[object Function]") {
766
+ return !obj.name || obj.name === "" ? "[Function]" : "[Function: " + obj.name + "]";
767
+ } else if (type3 === "[object Array]") {
768
+ return "[ Array(" + obj.length + ") ]";
769
+ } else if (type3 === "[object Object]") {
770
+ let keys = Object.keys(obj), kstr = keys.length > 2 ? keys.splice(0, 2).join(", ") + ", ..." : keys.join(", ");
771
+ return "{ Object (" + kstr + ") }";
772
+ } else {
773
+ return str;
774
+ }
775
+ } else {
776
+ return str;
777
+ }
778
+ }
779
+ __name(objDisplay, "objDisplay");
780
+ function getMessage2(obj, args) {
781
+ let negate = flag(obj, "negate");
782
+ let val = flag(obj, "object");
783
+ let expected = args[3];
784
+ let actual = getActual(obj, args);
785
+ let msg = negate ? args[2] : args[1];
786
+ let flagMsg = flag(obj, "message");
787
+ if (typeof msg === "function") msg = msg();
788
+ msg = msg || "";
789
+ msg = msg.replace(/#\{this\}/g, function() {
790
+ return objDisplay(val);
791
+ }).replace(/#\{act\}/g, function() {
792
+ return objDisplay(actual);
793
+ }).replace(/#\{exp\}/g, function() {
794
+ return objDisplay(expected);
795
+ });
796
+ return flagMsg ? flagMsg + ": " + msg : msg;
797
+ }
798
+ __name(getMessage2, "getMessage");
799
+ function transferFlags(assertion, object, includeAll) {
800
+ let flags = assertion.__flags || (assertion.__flags = /* @__PURE__ */ Object.create(null));
801
+ if (!object.__flags) {
802
+ object.__flags = /* @__PURE__ */ Object.create(null);
803
+ }
804
+ includeAll = arguments.length === 3 ? includeAll : true;
805
+ for (let flag3 in flags) {
806
+ if (includeAll || flag3 !== "object" && flag3 !== "ssfi" && flag3 !== "lockSsfi" && flag3 != "message") {
807
+ object.__flags[flag3] = flags[flag3];
808
+ }
809
+ }
810
+ }
811
+ __name(transferFlags, "transferFlags");
812
+ function type2(obj) {
813
+ if (typeof obj === "undefined") {
814
+ return "undefined";
815
+ }
816
+ if (obj === null) {
817
+ return "null";
818
+ }
819
+ const stringTag = obj[Symbol.toStringTag];
820
+ if (typeof stringTag === "string") {
821
+ return stringTag;
822
+ }
823
+ const sliceStart = 8;
824
+ const sliceEnd = -1;
825
+ return Object.prototype.toString.call(obj).slice(sliceStart, sliceEnd);
826
+ }
827
+ __name(type2, "type");
828
+ function FakeMap() {
829
+ this._key = "chai/deep-eql__" + Math.random() + Date.now();
830
+ }
831
+ __name(FakeMap, "FakeMap");
832
+ FakeMap.prototype = {
833
+ get: /* @__PURE__ */ __name(function get(key) {
834
+ return key[this._key];
835
+ }, "get"),
836
+ set: /* @__PURE__ */ __name(function set(key, value) {
837
+ if (Object.isExtensible(key)) {
838
+ Object.defineProperty(key, this._key, {
839
+ value,
840
+ configurable: true
841
+ });
842
+ }
843
+ }, "set")
844
+ };
845
+ var MemoizeMap = typeof WeakMap === "function" ? WeakMap : FakeMap;
846
+ function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {
847
+ if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
848
+ return null;
849
+ }
850
+ var leftHandMap = memoizeMap.get(leftHandOperand);
851
+ if (leftHandMap) {
852
+ var result = leftHandMap.get(rightHandOperand);
853
+ if (typeof result === "boolean") {
854
+ return result;
855
+ }
856
+ }
857
+ return null;
858
+ }
859
+ __name(memoizeCompare, "memoizeCompare");
860
+ function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
861
+ if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
862
+ return;
863
+ }
864
+ var leftHandMap = memoizeMap.get(leftHandOperand);
865
+ if (leftHandMap) {
866
+ leftHandMap.set(rightHandOperand, result);
867
+ } else {
868
+ leftHandMap = new MemoizeMap();
869
+ leftHandMap.set(rightHandOperand, result);
870
+ memoizeMap.set(leftHandOperand, leftHandMap);
871
+ }
872
+ }
873
+ __name(memoizeSet, "memoizeSet");
874
+ var deep_eql_default = deepEqual;
875
+ function deepEqual(leftHandOperand, rightHandOperand, options) {
876
+ if (options && options.comparator) {
877
+ return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
878
+ }
879
+ var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
880
+ if (simpleResult !== null) {
881
+ return simpleResult;
882
+ }
883
+ return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
884
+ }
885
+ __name(deepEqual, "deepEqual");
886
+ function simpleEqual(leftHandOperand, rightHandOperand) {
887
+ if (leftHandOperand === rightHandOperand) {
888
+ return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;
889
+ }
890
+ if (leftHandOperand !== leftHandOperand && rightHandOperand !== rightHandOperand) {
891
+ return true;
892
+ }
893
+ if (isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
894
+ return false;
895
+ }
896
+ return null;
897
+ }
898
+ __name(simpleEqual, "simpleEqual");
899
+ function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {
900
+ options = options || {};
901
+ options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();
902
+ var comparator = options && options.comparator;
903
+ var memoizeResultLeft = memoizeCompare(leftHandOperand, rightHandOperand, options.memoize);
904
+ if (memoizeResultLeft !== null) {
905
+ return memoizeResultLeft;
906
+ }
907
+ var memoizeResultRight = memoizeCompare(rightHandOperand, leftHandOperand, options.memoize);
908
+ if (memoizeResultRight !== null) {
909
+ return memoizeResultRight;
910
+ }
911
+ if (comparator) {
912
+ var comparatorResult = comparator(leftHandOperand, rightHandOperand);
913
+ if (comparatorResult === false || comparatorResult === true) {
914
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, comparatorResult);
915
+ return comparatorResult;
916
+ }
917
+ var simpleResult = simpleEqual(leftHandOperand, rightHandOperand);
918
+ if (simpleResult !== null) {
919
+ return simpleResult;
920
+ }
921
+ }
922
+ var leftHandType = type2(leftHandOperand);
923
+ if (leftHandType !== type2(rightHandOperand)) {
924
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, false);
925
+ return false;
926
+ }
927
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, true);
928
+ var result = extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options);
929
+ memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);
930
+ return result;
931
+ }
932
+ __name(extensiveDeepEqual, "extensiveDeepEqual");
933
+ function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {
934
+ switch (leftHandType) {
935
+ case "String":
936
+ case "Number":
937
+ case "Boolean":
938
+ case "Date": return deepEqual(leftHandOperand.valueOf(), rightHandOperand.valueOf());
939
+ case "Promise":
940
+ case "Symbol":
941
+ case "function":
942
+ case "WeakMap":
943
+ case "WeakSet": return leftHandOperand === rightHandOperand;
944
+ case "Error": return keysEqual(leftHandOperand, rightHandOperand, [
945
+ "name",
946
+ "message",
947
+ "code"
948
+ ], options);
949
+ case "Arguments":
950
+ case "Int8Array":
951
+ case "Uint8Array":
952
+ case "Uint8ClampedArray":
953
+ case "Int16Array":
954
+ case "Uint16Array":
955
+ case "Int32Array":
956
+ case "Uint32Array":
957
+ case "Float32Array":
958
+ case "Float64Array":
959
+ case "Array": return iterableEqual(leftHandOperand, rightHandOperand, options);
960
+ case "RegExp": return regexpEqual(leftHandOperand, rightHandOperand);
961
+ case "Generator": return generatorEqual(leftHandOperand, rightHandOperand, options);
962
+ case "DataView": return iterableEqual(new Uint8Array(leftHandOperand.buffer), new Uint8Array(rightHandOperand.buffer), options);
963
+ case "ArrayBuffer": return iterableEqual(new Uint8Array(leftHandOperand), new Uint8Array(rightHandOperand), options);
964
+ case "Set": return entriesEqual(leftHandOperand, rightHandOperand, options);
965
+ case "Map": return entriesEqual(leftHandOperand, rightHandOperand, options);
966
+ case "Temporal.PlainDate":
967
+ case "Temporal.PlainTime":
968
+ case "Temporal.PlainDateTime":
969
+ case "Temporal.Instant":
970
+ case "Temporal.ZonedDateTime":
971
+ case "Temporal.PlainYearMonth":
972
+ case "Temporal.PlainMonthDay": return leftHandOperand.equals(rightHandOperand);
973
+ case "Temporal.Duration": return leftHandOperand.total("nanoseconds") === rightHandOperand.total("nanoseconds");
974
+ case "Temporal.TimeZone":
975
+ case "Temporal.Calendar": return leftHandOperand.toString() === rightHandOperand.toString();
976
+ default: return objectEqual(leftHandOperand, rightHandOperand, options);
977
+ }
978
+ }
979
+ __name(extensiveDeepEqualByType, "extensiveDeepEqualByType");
980
+ function regexpEqual(leftHandOperand, rightHandOperand) {
981
+ return leftHandOperand.toString() === rightHandOperand.toString();
982
+ }
983
+ __name(regexpEqual, "regexpEqual");
984
+ function entriesEqual(leftHandOperand, rightHandOperand, options) {
985
+ try {
986
+ if (leftHandOperand.size !== rightHandOperand.size) {
987
+ return false;
988
+ }
989
+ if (leftHandOperand.size === 0) {
990
+ return true;
991
+ }
992
+ } catch (sizeError) {
993
+ return false;
994
+ }
995
+ var leftHandItems = [];
996
+ var rightHandItems = [];
997
+ leftHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
998
+ leftHandItems.push([key, value]);
999
+ }, "gatherEntries"));
1000
+ rightHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
1001
+ rightHandItems.push([key, value]);
1002
+ }, "gatherEntries"));
1003
+ return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);
1004
+ }
1005
+ __name(entriesEqual, "entriesEqual");
1006
+ function iterableEqual(leftHandOperand, rightHandOperand, options) {
1007
+ var length = leftHandOperand.length;
1008
+ if (length !== rightHandOperand.length) {
1009
+ return false;
1010
+ }
1011
+ if (length === 0) {
1012
+ return true;
1013
+ }
1014
+ var index = -1;
1015
+ while (++index < length) {
1016
+ if (deepEqual(leftHandOperand[index], rightHandOperand[index], options) === false) {
1017
+ return false;
1018
+ }
1019
+ }
1020
+ return true;
1021
+ }
1022
+ __name(iterableEqual, "iterableEqual");
1023
+ function generatorEqual(leftHandOperand, rightHandOperand, options) {
1024
+ return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);
1025
+ }
1026
+ __name(generatorEqual, "generatorEqual");
1027
+ function hasIteratorFunction(target) {
1028
+ return typeof Symbol !== "undefined" && typeof target === "object" && typeof Symbol.iterator !== "undefined" && typeof target[Symbol.iterator] === "function";
1029
+ }
1030
+ __name(hasIteratorFunction, "hasIteratorFunction");
1031
+ function getIteratorEntries(target) {
1032
+ if (hasIteratorFunction(target)) {
1033
+ try {
1034
+ return getGeneratorEntries(target[Symbol.iterator]());
1035
+ } catch (iteratorError) {
1036
+ return [];
1037
+ }
1038
+ }
1039
+ return [];
1040
+ }
1041
+ __name(getIteratorEntries, "getIteratorEntries");
1042
+ function getGeneratorEntries(generator) {
1043
+ var generatorResult = generator.next();
1044
+ var accumulator = [generatorResult.value];
1045
+ while (generatorResult.done === false) {
1046
+ generatorResult = generator.next();
1047
+ accumulator.push(generatorResult.value);
1048
+ }
1049
+ return accumulator;
1050
+ }
1051
+ __name(getGeneratorEntries, "getGeneratorEntries");
1052
+ function getEnumerableKeys(target) {
1053
+ var keys = [];
1054
+ for (var key in target) {
1055
+ keys.push(key);
1056
+ }
1057
+ return keys;
1058
+ }
1059
+ __name(getEnumerableKeys, "getEnumerableKeys");
1060
+ function getEnumerableSymbols(target) {
1061
+ var keys = [];
1062
+ var allKeys = Object.getOwnPropertySymbols(target);
1063
+ for (var i = 0; i < allKeys.length; i += 1) {
1064
+ var key = allKeys[i];
1065
+ if (Object.getOwnPropertyDescriptor(target, key).enumerable) {
1066
+ keys.push(key);
1067
+ }
1068
+ }
1069
+ return keys;
1070
+ }
1071
+ __name(getEnumerableSymbols, "getEnumerableSymbols");
1072
+ function keysEqual(leftHandOperand, rightHandOperand, keys, options) {
1073
+ var length = keys.length;
1074
+ if (length === 0) {
1075
+ return true;
1076
+ }
1077
+ for (var i = 0; i < length; i += 1) {
1078
+ if (deepEqual(leftHandOperand[keys[i]], rightHandOperand[keys[i]], options) === false) {
1079
+ return false;
1080
+ }
1081
+ }
1082
+ return true;
1083
+ }
1084
+ __name(keysEqual, "keysEqual");
1085
+ function objectEqual(leftHandOperand, rightHandOperand, options) {
1086
+ var leftHandKeys = getEnumerableKeys(leftHandOperand);
1087
+ var rightHandKeys = getEnumerableKeys(rightHandOperand);
1088
+ var leftHandSymbols = getEnumerableSymbols(leftHandOperand);
1089
+ var rightHandSymbols = getEnumerableSymbols(rightHandOperand);
1090
+ leftHandKeys = leftHandKeys.concat(leftHandSymbols);
1091
+ rightHandKeys = rightHandKeys.concat(rightHandSymbols);
1092
+ if (leftHandKeys.length && leftHandKeys.length === rightHandKeys.length) {
1093
+ if (iterableEqual(mapSymbols(leftHandKeys).sort(), mapSymbols(rightHandKeys).sort()) === false) {
1094
+ return false;
1095
+ }
1096
+ return keysEqual(leftHandOperand, rightHandOperand, leftHandKeys, options);
1097
+ }
1098
+ var leftHandEntries = getIteratorEntries(leftHandOperand);
1099
+ var rightHandEntries = getIteratorEntries(rightHandOperand);
1100
+ if (leftHandEntries.length && leftHandEntries.length === rightHandEntries.length) {
1101
+ leftHandEntries.sort();
1102
+ rightHandEntries.sort();
1103
+ return iterableEqual(leftHandEntries, rightHandEntries, options);
1104
+ }
1105
+ if (leftHandKeys.length === 0 && leftHandEntries.length === 0 && rightHandKeys.length === 0 && rightHandEntries.length === 0) {
1106
+ return true;
1107
+ }
1108
+ return false;
1109
+ }
1110
+ __name(objectEqual, "objectEqual");
1111
+ function isPrimitive(value) {
1112
+ return value === null || typeof value !== "object";
1113
+ }
1114
+ __name(isPrimitive, "isPrimitive");
1115
+ function mapSymbols(arr) {
1116
+ return arr.map(/* @__PURE__ */ __name(function mapSymbol(entry) {
1117
+ if (typeof entry === "symbol") {
1118
+ return entry.toString();
1119
+ }
1120
+ return entry;
1121
+ }, "mapSymbol"));
1122
+ }
1123
+ __name(mapSymbols, "mapSymbols");
1124
+ function hasProperty(obj, name) {
1125
+ if (typeof obj === "undefined" || obj === null) {
1126
+ return false;
1127
+ }
1128
+ return name in Object(obj);
1129
+ }
1130
+ __name(hasProperty, "hasProperty");
1131
+ function parsePath(path) {
1132
+ const str = path.replace(/([^\\])\[/g, "$1.[");
1133
+ const parts = str.match(/(\\\.|[^.]+?)+/g);
1134
+ return parts.map((value) => {
1135
+ if (value === "constructor" || value === "__proto__" || value === "prototype") {
1136
+ return {};
1137
+ }
1138
+ const regexp = /^\[(\d+)\]$/;
1139
+ const mArr = regexp.exec(value);
1140
+ let parsed = null;
1141
+ if (mArr) {
1142
+ parsed = { i: parseFloat(mArr[1]) };
1143
+ } else {
1144
+ parsed = { p: value.replace(/\\([.[\]])/g, "$1") };
1145
+ }
1146
+ return parsed;
1147
+ });
1148
+ }
1149
+ __name(parsePath, "parsePath");
1150
+ function internalGetPathValue(obj, parsed, pathDepth) {
1151
+ let temporaryValue = obj;
1152
+ let res = null;
1153
+ pathDepth = typeof pathDepth === "undefined" ? parsed.length : pathDepth;
1154
+ for (let i = 0; i < pathDepth; i++) {
1155
+ const part = parsed[i];
1156
+ if (temporaryValue) {
1157
+ if (typeof part.p === "undefined") {
1158
+ temporaryValue = temporaryValue[part.i];
1159
+ } else {
1160
+ temporaryValue = temporaryValue[part.p];
1161
+ }
1162
+ if (i === pathDepth - 1) {
1163
+ res = temporaryValue;
1164
+ }
1165
+ }
1166
+ }
1167
+ return res;
1168
+ }
1169
+ __name(internalGetPathValue, "internalGetPathValue");
1170
+ function getPathInfo(obj, path) {
1171
+ const parsed = parsePath(path);
1172
+ const last = parsed[parsed.length - 1];
1173
+ const info = {
1174
+ parent: parsed.length > 1 ? internalGetPathValue(obj, parsed, parsed.length - 1) : obj,
1175
+ name: last.p || last.i,
1176
+ value: internalGetPathValue(obj, parsed)
1177
+ };
1178
+ info.exists = hasProperty(info.parent, info.name);
1179
+ return info;
1180
+ }
1181
+ __name(getPathInfo, "getPathInfo");
1182
+ var Assertion = class _Assertion {
1183
+ static {
1184
+ __name(this, "Assertion");
1185
+ }
1186
+ /** @type {{}} */
1187
+ __flags = {};
1188
+ /**
1189
+ * Creates object for chaining.
1190
+ * `Assertion` objects contain metadata in the form of flags. Three flags can
1191
+ * be assigned during instantiation by passing arguments to this constructor:
1192
+ *
1193
+ * - `object`: This flag contains the target of the assertion. For example, in
1194
+ * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
1195
+ * contain `numKittens` so that the `equal` assertion can reference it when
1196
+ * needed.
1197
+ *
1198
+ * - `message`: This flag contains an optional custom error message to be
1199
+ * prepended to the error message that's generated by the assertion when it
1200
+ * fails.
1201
+ *
1202
+ * - `ssfi`: This flag stands for "start stack function indicator". It
1203
+ * contains a function reference that serves as the starting point for
1204
+ * removing frames from the stack trace of the error that's created by the
1205
+ * assertion when it fails. The goal is to provide a cleaner stack trace to
1206
+ * end users by removing Chai's internal functions. Note that it only works
1207
+ * in environments that support `Error.captureStackTrace`, and only when
1208
+ * `Chai.config.includeStack` hasn't been set to `false`.
1209
+ *
1210
+ * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
1211
+ * should retain its current value, even as assertions are chained off of
1212
+ * this object. This is usually set to `true` when creating a new assertion
1213
+ * from within another assertion. It's also temporarily set to `true` before
1214
+ * an overwritten assertion gets called by the overwriting assertion.
1215
+ *
1216
+ * - `eql`: This flag contains the deepEqual function to be used by the assertion.
1217
+ *
1218
+ * @param {unknown} obj target of the assertion
1219
+ * @param {string} [msg] (optional) custom error message
1220
+ * @param {Function} [ssfi] (optional) starting point for removing stack frames
1221
+ * @param {boolean} [lockSsfi] (optional) whether or not the ssfi flag is locked
1222
+ */
1223
+ constructor(obj, msg, ssfi, lockSsfi) {
1224
+ flag(this, "ssfi", ssfi || _Assertion);
1225
+ flag(this, "lockSsfi", lockSsfi);
1226
+ flag(this, "object", obj);
1227
+ flag(this, "message", msg);
1228
+ flag(this, "eql", config.deepEqual || deep_eql_default);
1229
+ return proxify(this);
1230
+ }
1231
+ /** @returns {boolean} */
1232
+ static get includeStack() {
1233
+ console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead.");
1234
+ return config.includeStack;
1235
+ }
1236
+ /** @param {boolean} value */
1237
+ static set includeStack(value) {
1238
+ console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead.");
1239
+ config.includeStack = value;
1240
+ }
1241
+ /** @returns {boolean} */
1242
+ static get showDiff() {
1243
+ console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead.");
1244
+ return config.showDiff;
1245
+ }
1246
+ /** @param {boolean} value */
1247
+ static set showDiff(value) {
1248
+ console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead.");
1249
+ config.showDiff = value;
1250
+ }
1251
+ /**
1252
+ * @param {string} name
1253
+ * @param {Function} fn
1254
+ */
1255
+ static addProperty(name, fn) {
1256
+ addProperty(this.prototype, name, fn);
1257
+ }
1258
+ /**
1259
+ * @param {string} name
1260
+ * @param {Function} fn
1261
+ */
1262
+ static addMethod(name, fn) {
1263
+ addMethod(this.prototype, name, fn);
1264
+ }
1265
+ /**
1266
+ * @param {string} name
1267
+ * @param {Function} fn
1268
+ * @param {Function} chainingBehavior
1269
+ */
1270
+ static addChainableMethod(name, fn, chainingBehavior) {
1271
+ addChainableMethod(this.prototype, name, fn, chainingBehavior);
1272
+ }
1273
+ /**
1274
+ * @param {string} name
1275
+ * @param {Function} fn
1276
+ */
1277
+ static overwriteProperty(name, fn) {
1278
+ overwriteProperty(this.prototype, name, fn);
1279
+ }
1280
+ /**
1281
+ * @param {string} name
1282
+ * @param {Function} fn
1283
+ */
1284
+ static overwriteMethod(name, fn) {
1285
+ overwriteMethod(this.prototype, name, fn);
1286
+ }
1287
+ /**
1288
+ * @param {string} name
1289
+ * @param {Function} fn
1290
+ * @param {Function} chainingBehavior
1291
+ */
1292
+ static overwriteChainableMethod(name, fn, chainingBehavior) {
1293
+ overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);
1294
+ }
1295
+ /**
1296
+ * ### .assert(expression, message, negateMessage, expected, actual, showDiff)
1297
+ *
1298
+ * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
1299
+ *
1300
+ * @name assert
1301
+ * @param {unknown} _expr to be tested
1302
+ * @param {string | Function} msg or function that returns message to display if expression fails
1303
+ * @param {string | Function} _negateMsg or function that returns negatedMessage to display if negated expression fails
1304
+ * @param {unknown} expected value (remember to check for negation)
1305
+ * @param {unknown} _actual (optional) will default to `this.obj`
1306
+ * @param {boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails
1307
+ * @returns {void}
1308
+ */
1309
+ assert(_expr, msg, _negateMsg, expected, _actual, showDiff) {
1310
+ const ok = test(this, arguments);
1311
+ if (false !== showDiff) showDiff = true;
1312
+ if (void 0 === expected && void 0 === _actual) showDiff = false;
1313
+ if (true !== config.showDiff) showDiff = false;
1314
+ if (!ok) {
1315
+ msg = getMessage2(this, arguments);
1316
+ const actual = getActual(this, arguments);
1317
+ const assertionErrorObjectProperties = {
1318
+ actual,
1319
+ expected,
1320
+ showDiff
1321
+ };
1322
+ const operator = getOperator(this, arguments);
1323
+ if (operator) {
1324
+ assertionErrorObjectProperties.operator = operator;
1325
+ }
1326
+ throw new AssertionError(msg, assertionErrorObjectProperties, config.includeStack ? this.assert : flag(this, "ssfi"));
1327
+ }
1328
+ }
1329
+ /**
1330
+ * Quick reference to stored `actual` value for plugin developers.
1331
+ *
1332
+ * @returns {unknown}
1333
+ */
1334
+ get _obj() {
1335
+ return flag(this, "object");
1336
+ }
1337
+ /**
1338
+ * Quick reference to stored `actual` value for plugin developers.
1339
+ *
1340
+ * @param {unknown} val
1341
+ */
1342
+ set _obj(val) {
1343
+ flag(this, "object", val);
1344
+ }
1345
+ };
1346
+ function isProxyEnabled() {
1347
+ return config.useProxy && typeof Proxy !== "undefined" && typeof Reflect !== "undefined";
1348
+ }
1349
+ __name(isProxyEnabled, "isProxyEnabled");
1350
+ function addProperty(ctx, name, getter) {
1351
+ getter = getter === void 0 ? function() {} : getter;
1352
+ Object.defineProperty(ctx, name, {
1353
+ get: /* @__PURE__ */ __name(function propertyGetter() {
1354
+ if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
1355
+ flag(this, "ssfi", propertyGetter);
1356
+ }
1357
+ let result = getter.call(this);
1358
+ if (result !== void 0) return result;
1359
+ let newAssertion = new Assertion();
1360
+ transferFlags(this, newAssertion);
1361
+ return newAssertion;
1362
+ }, "propertyGetter"),
1363
+ configurable: true
1364
+ });
1365
+ }
1366
+ __name(addProperty, "addProperty");
1367
+ var fnLengthDesc = Object.getOwnPropertyDescriptor(function() {}, "length");
1368
+ function addLengthGuard(fn, assertionName, isChainable) {
1369
+ if (!fnLengthDesc.configurable) return fn;
1370
+ Object.defineProperty(fn, "length", { get: /* @__PURE__ */ __name(function() {
1371
+ if (isChainable) {
1372
+ throw Error("Invalid Chai property: " + assertionName + ".length. Due to a compatibility issue, \"length\" cannot directly follow \"" + assertionName + "\". Use \"" + assertionName + ".lengthOf\" instead.");
1373
+ }
1374
+ throw Error("Invalid Chai property: " + assertionName + ".length. See docs for proper usage of \"" + assertionName + "\".");
1375
+ }, "get") });
1376
+ return fn;
1377
+ }
1378
+ __name(addLengthGuard, "addLengthGuard");
1379
+ function getProperties(object) {
1380
+ let result = Object.getOwnPropertyNames(object);
1381
+ function addProperty2(property) {
1382
+ if (result.indexOf(property) === -1) {
1383
+ result.push(property);
1384
+ }
1385
+ }
1386
+ __name(addProperty2, "addProperty");
1387
+ let proto = Object.getPrototypeOf(object);
1388
+ while (proto !== null) {
1389
+ Object.getOwnPropertyNames(proto).forEach(addProperty2);
1390
+ proto = Object.getPrototypeOf(proto);
1391
+ }
1392
+ return result;
1393
+ }
1394
+ __name(getProperties, "getProperties");
1395
+ var builtins = [
1396
+ "__flags",
1397
+ "__methods",
1398
+ "_obj",
1399
+ "assert"
1400
+ ];
1401
+ function proxify(obj, nonChainableMethodName) {
1402
+ if (!isProxyEnabled()) return obj;
1403
+ return new Proxy(obj, { get: /* @__PURE__ */ __name(function proxyGetter(target, property) {
1404
+ if (typeof property === "string" && config.proxyExcludedKeys.indexOf(property) === -1 && !Reflect.has(target, property)) {
1405
+ if (nonChainableMethodName) {
1406
+ throw Error("Invalid Chai property: " + nonChainableMethodName + "." + property + ". See docs for proper usage of \"" + nonChainableMethodName + "\".");
1407
+ }
1408
+ let suggestion = null;
1409
+ let suggestionDistance = 4;
1410
+ getProperties(target).forEach(function(prop) {
1411
+ if (!Object.prototype.hasOwnProperty(prop) && builtins.indexOf(prop) === -1) {
1412
+ let dist = stringDistanceCapped(property, prop, suggestionDistance);
1413
+ if (dist < suggestionDistance) {
1414
+ suggestion = prop;
1415
+ suggestionDistance = dist;
1416
+ }
1417
+ }
1418
+ });
1419
+ if (suggestion !== null) {
1420
+ throw Error("Invalid Chai property: " + property + ". Did you mean \"" + suggestion + "\"?");
1421
+ } else {
1422
+ throw Error("Invalid Chai property: " + property);
1423
+ }
1424
+ }
1425
+ if (builtins.indexOf(property) === -1 && !flag(target, "lockSsfi")) {
1426
+ flag(target, "ssfi", proxyGetter);
1427
+ }
1428
+ return Reflect.get(target, property);
1429
+ }, "proxyGetter") });
1430
+ }
1431
+ __name(proxify, "proxify");
1432
+ function stringDistanceCapped(strA, strB, cap) {
1433
+ if (Math.abs(strA.length - strB.length) >= cap) {
1434
+ return cap;
1435
+ }
1436
+ let memo = [];
1437
+ for (let i = 0; i <= strA.length; i++) {
1438
+ memo[i] = Array(strB.length + 1).fill(0);
1439
+ memo[i][0] = i;
1440
+ }
1441
+ for (let j = 0; j < strB.length; j++) {
1442
+ memo[0][j] = j;
1443
+ }
1444
+ for (let i = 1; i <= strA.length; i++) {
1445
+ let ch = strA.charCodeAt(i - 1);
1446
+ for (let j = 1; j <= strB.length; j++) {
1447
+ if (Math.abs(i - j) >= cap) {
1448
+ memo[i][j] = cap;
1449
+ continue;
1450
+ }
1451
+ memo[i][j] = Math.min(memo[i - 1][j] + 1, memo[i][j - 1] + 1, memo[i - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1));
1452
+ }
1453
+ }
1454
+ return memo[strA.length][strB.length];
1455
+ }
1456
+ __name(stringDistanceCapped, "stringDistanceCapped");
1457
+ function addMethod(ctx, name, method) {
1458
+ let methodWrapper = /* @__PURE__ */ __name(function() {
1459
+ if (!flag(this, "lockSsfi")) {
1460
+ flag(this, "ssfi", methodWrapper);
1461
+ }
1462
+ let result = method.apply(this, arguments);
1463
+ if (result !== void 0) return result;
1464
+ let newAssertion = new Assertion();
1465
+ transferFlags(this, newAssertion);
1466
+ return newAssertion;
1467
+ }, "methodWrapper");
1468
+ addLengthGuard(methodWrapper, name, false);
1469
+ ctx[name] = proxify(methodWrapper, name);
1470
+ }
1471
+ __name(addMethod, "addMethod");
1472
+ function overwriteProperty(ctx, name, getter) {
1473
+ let _get = Object.getOwnPropertyDescriptor(ctx, name), _super = /* @__PURE__ */ __name(function() {}, "_super");
1474
+ if (_get && "function" === typeof _get.get) _super = _get.get;
1475
+ Object.defineProperty(ctx, name, {
1476
+ get: /* @__PURE__ */ __name(function overwritingPropertyGetter() {
1477
+ if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
1478
+ flag(this, "ssfi", overwritingPropertyGetter);
1479
+ }
1480
+ let origLockSsfi = flag(this, "lockSsfi");
1481
+ flag(this, "lockSsfi", true);
1482
+ let result = getter(_super).call(this);
1483
+ flag(this, "lockSsfi", origLockSsfi);
1484
+ if (result !== void 0) {
1485
+ return result;
1486
+ }
1487
+ let newAssertion = new Assertion();
1488
+ transferFlags(this, newAssertion);
1489
+ return newAssertion;
1490
+ }, "overwritingPropertyGetter"),
1491
+ configurable: true
1492
+ });
1493
+ }
1494
+ __name(overwriteProperty, "overwriteProperty");
1495
+ function overwriteMethod(ctx, name, method) {
1496
+ let _method = ctx[name], _super = /* @__PURE__ */ __name(function() {
1497
+ throw new Error(name + " is not a function");
1498
+ }, "_super");
1499
+ if (_method && "function" === typeof _method) _super = _method;
1500
+ let overwritingMethodWrapper = /* @__PURE__ */ __name(function() {
1501
+ if (!flag(this, "lockSsfi")) {
1502
+ flag(this, "ssfi", overwritingMethodWrapper);
1503
+ }
1504
+ let origLockSsfi = flag(this, "lockSsfi");
1505
+ flag(this, "lockSsfi", true);
1506
+ let result = method(_super).apply(this, arguments);
1507
+ flag(this, "lockSsfi", origLockSsfi);
1508
+ if (result !== void 0) {
1509
+ return result;
1510
+ }
1511
+ let newAssertion = new Assertion();
1512
+ transferFlags(this, newAssertion);
1513
+ return newAssertion;
1514
+ }, "overwritingMethodWrapper");
1515
+ addLengthGuard(overwritingMethodWrapper, name, false);
1516
+ ctx[name] = proxify(overwritingMethodWrapper, name);
1517
+ }
1518
+ __name(overwriteMethod, "overwriteMethod");
1519
+ var canSetPrototype = typeof Object.setPrototypeOf === "function";
1520
+ var testFn = /* @__PURE__ */ __name(function() {}, "testFn");
1521
+ var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
1522
+ let propDesc = Object.getOwnPropertyDescriptor(testFn, name);
1523
+ if (typeof propDesc !== "object") return true;
1524
+ return !propDesc.configurable;
1525
+ });
1526
+ var call = Function.prototype.call;
1527
+ var apply = Function.prototype.apply;
1528
+ function addChainableMethod(ctx, name, method, chainingBehavior) {
1529
+ if (typeof chainingBehavior !== "function") {
1530
+ chainingBehavior = /* @__PURE__ */ __name(function() {}, "chainingBehavior");
1531
+ }
1532
+ let chainableBehavior = {
1533
+ method,
1534
+ chainingBehavior
1535
+ };
1536
+ if (!ctx.__methods) {
1537
+ ctx.__methods = {};
1538
+ }
1539
+ ctx.__methods[name] = chainableBehavior;
1540
+ Object.defineProperty(ctx, name, {
1541
+ get: /* @__PURE__ */ __name(function chainableMethodGetter() {
1542
+ chainableBehavior.chainingBehavior.call(this);
1543
+ let chainableMethodWrapper = /* @__PURE__ */ __name(function() {
1544
+ if (!flag(this, "lockSsfi")) {
1545
+ flag(this, "ssfi", chainableMethodWrapper);
1546
+ }
1547
+ let result = chainableBehavior.method.apply(this, arguments);
1548
+ if (result !== void 0) {
1549
+ return result;
1550
+ }
1551
+ let newAssertion = new Assertion();
1552
+ transferFlags(this, newAssertion);
1553
+ return newAssertion;
1554
+ }, "chainableMethodWrapper");
1555
+ addLengthGuard(chainableMethodWrapper, name, true);
1556
+ if (canSetPrototype) {
1557
+ let prototype = Object.create(this);
1558
+ prototype.call = call;
1559
+ prototype.apply = apply;
1560
+ Object.setPrototypeOf(chainableMethodWrapper, prototype);
1561
+ } else {
1562
+ let asserterNames = Object.getOwnPropertyNames(ctx);
1563
+ asserterNames.forEach(function(asserterName) {
1564
+ if (excludeNames.indexOf(asserterName) !== -1) {
1565
+ return;
1566
+ }
1567
+ let pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
1568
+ Object.defineProperty(chainableMethodWrapper, asserterName, pd);
1569
+ });
1570
+ }
1571
+ transferFlags(this, chainableMethodWrapper);
1572
+ return proxify(chainableMethodWrapper);
1573
+ }, "chainableMethodGetter"),
1574
+ configurable: true
1575
+ });
1576
+ }
1577
+ __name(addChainableMethod, "addChainableMethod");
1578
+ function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
1579
+ let chainableBehavior = ctx.__methods[name];
1580
+ let _chainingBehavior = chainableBehavior.chainingBehavior;
1581
+ chainableBehavior.chainingBehavior = /* @__PURE__ */ __name(function overwritingChainableMethodGetter() {
1582
+ let result = chainingBehavior(_chainingBehavior).call(this);
1583
+ if (result !== void 0) {
1584
+ return result;
1585
+ }
1586
+ let newAssertion = new Assertion();
1587
+ transferFlags(this, newAssertion);
1588
+ return newAssertion;
1589
+ }, "overwritingChainableMethodGetter");
1590
+ let _method = chainableBehavior.method;
1591
+ chainableBehavior.method = /* @__PURE__ */ __name(function overwritingChainableMethodWrapper() {
1592
+ let result = method(_method).apply(this, arguments);
1593
+ if (result !== void 0) {
1594
+ return result;
1595
+ }
1596
+ let newAssertion = new Assertion();
1597
+ transferFlags(this, newAssertion);
1598
+ return newAssertion;
1599
+ }, "overwritingChainableMethodWrapper");
1600
+ }
1601
+ __name(overwriteChainableMethod, "overwriteChainableMethod");
1602
+ function compareByInspect(a, b) {
1603
+ return inspect2(a) < inspect2(b) ? -1 : 1;
1604
+ }
1605
+ __name(compareByInspect, "compareByInspect");
1606
+ function getOwnEnumerablePropertySymbols(obj) {
1607
+ if (typeof Object.getOwnPropertySymbols !== "function") return [];
1608
+ return Object.getOwnPropertySymbols(obj).filter(function(sym) {
1609
+ return Object.getOwnPropertyDescriptor(obj, sym).enumerable;
1610
+ });
1611
+ }
1612
+ __name(getOwnEnumerablePropertySymbols, "getOwnEnumerablePropertySymbols");
1613
+ function getOwnEnumerableProperties(obj) {
1614
+ return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));
1615
+ }
1616
+ __name(getOwnEnumerableProperties, "getOwnEnumerableProperties");
1617
+ var isNaN2 = Number.isNaN;
1618
+ function isObjectType(obj) {
1619
+ let objectType = type(obj);
1620
+ let objectTypes = [
1621
+ "Array",
1622
+ "Object",
1623
+ "Function"
1624
+ ];
1625
+ return objectTypes.indexOf(objectType) !== -1;
1626
+ }
1627
+ __name(isObjectType, "isObjectType");
1628
+ function getOperator(obj, args) {
1629
+ let operator = flag(obj, "operator");
1630
+ let negate = flag(obj, "negate");
1631
+ let expected = args[3];
1632
+ let msg = negate ? args[2] : args[1];
1633
+ if (operator) {
1634
+ return operator;
1635
+ }
1636
+ if (typeof msg === "function") msg = msg();
1637
+ msg = msg || "";
1638
+ if (!msg) {
1639
+ return void 0;
1640
+ }
1641
+ if (/\shave\s/.test(msg)) {
1642
+ return void 0;
1643
+ }
1644
+ let isObject = isObjectType(expected);
1645
+ if (/\snot\s/.test(msg)) {
1646
+ return isObject ? "notDeepStrictEqual" : "notStrictEqual";
1647
+ }
1648
+ return isObject ? "deepStrictEqual" : "strictEqual";
1649
+ }
1650
+ __name(getOperator, "getOperator");
1651
+ function getName(fn) {
1652
+ return fn.name;
1653
+ }
1654
+ __name(getName, "getName");
1655
+ function isRegExp2(obj) {
1656
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
1657
+ }
1658
+ __name(isRegExp2, "isRegExp");
1659
+ function isNumeric(obj) {
1660
+ return ["Number", "BigInt"].includes(type(obj));
1661
+ }
1662
+ __name(isNumeric, "isNumeric");
1663
+ var { flag: flag2 } = utils_exports;
1664
+ [
1665
+ "to",
1666
+ "be",
1667
+ "been",
1668
+ "is",
1669
+ "and",
1670
+ "has",
1671
+ "have",
1672
+ "with",
1673
+ "that",
1674
+ "which",
1675
+ "at",
1676
+ "of",
1677
+ "same",
1678
+ "but",
1679
+ "does",
1680
+ "still",
1681
+ "also"
1682
+ ].forEach(function(chain) {
1683
+ Assertion.addProperty(chain);
1684
+ });
1685
+ Assertion.addProperty("not", function() {
1686
+ flag2(this, "negate", true);
1687
+ });
1688
+ Assertion.addProperty("deep", function() {
1689
+ flag2(this, "deep", true);
1690
+ });
1691
+ Assertion.addProperty("nested", function() {
1692
+ flag2(this, "nested", true);
1693
+ });
1694
+ Assertion.addProperty("own", function() {
1695
+ flag2(this, "own", true);
1696
+ });
1697
+ Assertion.addProperty("ordered", function() {
1698
+ flag2(this, "ordered", true);
1699
+ });
1700
+ Assertion.addProperty("any", function() {
1701
+ flag2(this, "any", true);
1702
+ flag2(this, "all", false);
1703
+ });
1704
+ Assertion.addProperty("all", function() {
1705
+ flag2(this, "all", true);
1706
+ flag2(this, "any", false);
1707
+ });
1708
+ var functionTypes = {
1709
+ function: [
1710
+ "function",
1711
+ "asyncfunction",
1712
+ "generatorfunction",
1713
+ "asyncgeneratorfunction"
1714
+ ],
1715
+ asyncfunction: ["asyncfunction", "asyncgeneratorfunction"],
1716
+ generatorfunction: ["generatorfunction", "asyncgeneratorfunction"],
1717
+ asyncgeneratorfunction: ["asyncgeneratorfunction"]
1718
+ };
1719
+ function an(type3, msg) {
1720
+ if (msg) flag2(this, "message", msg);
1721
+ type3 = type3.toLowerCase();
1722
+ let obj = flag2(this, "object"), article = ~[
1723
+ "a",
1724
+ "e",
1725
+ "i",
1726
+ "o",
1727
+ "u"
1728
+ ].indexOf(type3.charAt(0)) ? "an " : "a ";
1729
+ const detectedType = type(obj).toLowerCase();
1730
+ if (functionTypes["function"].includes(type3)) {
1731
+ this.assert(functionTypes[type3].includes(detectedType), "expected #{this} to be " + article + type3, "expected #{this} not to be " + article + type3);
1732
+ } else {
1733
+ this.assert(type3 === detectedType, "expected #{this} to be " + article + type3, "expected #{this} not to be " + article + type3);
1734
+ }
1735
+ }
1736
+ __name(an, "an");
1737
+ Assertion.addChainableMethod("an", an);
1738
+ Assertion.addChainableMethod("a", an);
1739
+ function SameValueZero(a, b) {
1740
+ return isNaN2(a) && isNaN2(b) || a === b;
1741
+ }
1742
+ __name(SameValueZero, "SameValueZero");
1743
+ function includeChainingBehavior() {
1744
+ flag2(this, "contains", true);
1745
+ }
1746
+ __name(includeChainingBehavior, "includeChainingBehavior");
1747
+ function include(val, msg) {
1748
+ if (msg) flag2(this, "message", msg);
1749
+ let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), negate = flag2(this, "negate"), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), descriptor = isDeep ? "deep " : "", isEql = isDeep ? flag2(this, "eql") : SameValueZero;
1750
+ flagMsg = flagMsg ? flagMsg + ": " : "";
1751
+ let included = false;
1752
+ switch (objType) {
1753
+ case "string":
1754
+ included = obj.indexOf(val) !== -1;
1755
+ break;
1756
+ case "weakset":
1757
+ if (isDeep) {
1758
+ throw new AssertionError(flagMsg + "unable to use .deep.include with WeakSet", void 0, ssfi);
1759
+ }
1760
+ included = obj.has(val);
1761
+ break;
1762
+ case "map":
1763
+ obj.forEach(function(item) {
1764
+ included = included || isEql(item, val);
1765
+ });
1766
+ break;
1767
+ case "set":
1768
+ if (isDeep) {
1769
+ obj.forEach(function(item) {
1770
+ included = included || isEql(item, val);
1771
+ });
1772
+ } else {
1773
+ included = obj.has(val);
1774
+ }
1775
+ break;
1776
+ case "array":
1777
+ if (isDeep) {
1778
+ included = obj.some(function(item) {
1779
+ return isEql(item, val);
1780
+ });
1781
+ } else {
1782
+ included = obj.indexOf(val) !== -1;
1783
+ }
1784
+ break;
1785
+ default: {
1786
+ if (val !== Object(val)) {
1787
+ throw new AssertionError(flagMsg + "the given combination of arguments (" + objType + " and " + type(val).toLowerCase() + ") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a " + type(val).toLowerCase(), void 0, ssfi);
1788
+ }
1789
+ let props = Object.keys(val);
1790
+ let firstErr = null;
1791
+ let numErrs = 0;
1792
+ props.forEach(function(prop) {
1793
+ let propAssertion = new Assertion(obj);
1794
+ transferFlags(this, propAssertion, true);
1795
+ flag2(propAssertion, "lockSsfi", true);
1796
+ if (!negate || props.length === 1) {
1797
+ propAssertion.property(prop, val[prop]);
1798
+ return;
1799
+ }
1800
+ try {
1801
+ propAssertion.property(prop, val[prop]);
1802
+ } catch (err) {
1803
+ if (!check_error_exports.compatibleConstructor(err, AssertionError)) {
1804
+ throw err;
1805
+ }
1806
+ if (firstErr === null) firstErr = err;
1807
+ numErrs++;
1808
+ }
1809
+ }, this);
1810
+ if (negate && props.length > 1 && numErrs === props.length) {
1811
+ throw firstErr;
1812
+ }
1813
+ return;
1814
+ }
1815
+ }
1816
+ this.assert(included, "expected #{this} to " + descriptor + "include " + inspect2(val), "expected #{this} to not " + descriptor + "include " + inspect2(val));
1817
+ }
1818
+ __name(include, "include");
1819
+ Assertion.addChainableMethod("include", include, includeChainingBehavior);
1820
+ Assertion.addChainableMethod("contain", include, includeChainingBehavior);
1821
+ Assertion.addChainableMethod("contains", include, includeChainingBehavior);
1822
+ Assertion.addChainableMethod("includes", include, includeChainingBehavior);
1823
+ Assertion.addProperty("ok", function() {
1824
+ this.assert(flag2(this, "object"), "expected #{this} to be truthy", "expected #{this} to be falsy");
1825
+ });
1826
+ Assertion.addProperty("true", function() {
1827
+ this.assert(true === flag2(this, "object"), "expected #{this} to be true", "expected #{this} to be false", flag2(this, "negate") ? false : true);
1828
+ });
1829
+ Assertion.addProperty("numeric", function() {
1830
+ const object = flag2(this, "object");
1831
+ this.assert(["Number", "BigInt"].includes(type(object)), "expected #{this} to be numeric", "expected #{this} to not be numeric", flag2(this, "negate") ? false : true);
1832
+ });
1833
+ Assertion.addProperty("callable", function() {
1834
+ const val = flag2(this, "object");
1835
+ const ssfi = flag2(this, "ssfi");
1836
+ const message = flag2(this, "message");
1837
+ const msg = message ? `${message}: ` : "";
1838
+ const negate = flag2(this, "negate");
1839
+ const assertionMessage = negate ? `${msg}expected ${inspect2(val)} not to be a callable function` : `${msg}expected ${inspect2(val)} to be a callable function`;
1840
+ const isCallable = [
1841
+ "Function",
1842
+ "AsyncFunction",
1843
+ "GeneratorFunction",
1844
+ "AsyncGeneratorFunction"
1845
+ ].includes(type(val));
1846
+ if (isCallable && negate || !isCallable && !negate) {
1847
+ throw new AssertionError(assertionMessage, void 0, ssfi);
1848
+ }
1849
+ });
1850
+ Assertion.addProperty("false", function() {
1851
+ this.assert(false === flag2(this, "object"), "expected #{this} to be false", "expected #{this} to be true", flag2(this, "negate") ? true : false);
1852
+ });
1853
+ Assertion.addProperty("null", function() {
1854
+ this.assert(null === flag2(this, "object"), "expected #{this} to be null", "expected #{this} not to be null");
1855
+ });
1856
+ Assertion.addProperty("undefined", function() {
1857
+ this.assert(void 0 === flag2(this, "object"), "expected #{this} to be undefined", "expected #{this} not to be undefined");
1858
+ });
1859
+ Assertion.addProperty("NaN", function() {
1860
+ this.assert(isNaN2(flag2(this, "object")), "expected #{this} to be NaN", "expected #{this} not to be NaN");
1861
+ });
1862
+ function assertExist() {
1863
+ let val = flag2(this, "object");
1864
+ this.assert(val !== null && val !== void 0, "expected #{this} to exist", "expected #{this} to not exist");
1865
+ }
1866
+ __name(assertExist, "assertExist");
1867
+ Assertion.addProperty("exist", assertExist);
1868
+ Assertion.addProperty("exists", assertExist);
1869
+ Assertion.addProperty("empty", function() {
1870
+ let val = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), itemsCount;
1871
+ flagMsg = flagMsg ? flagMsg + ": " : "";
1872
+ switch (type(val).toLowerCase()) {
1873
+ case "array":
1874
+ case "string":
1875
+ itemsCount = val.length;
1876
+ break;
1877
+ case "map":
1878
+ case "set":
1879
+ itemsCount = val.size;
1880
+ break;
1881
+ case "weakmap":
1882
+ case "weakset": throw new AssertionError(flagMsg + ".empty was passed a weak collection", void 0, ssfi);
1883
+ case "function": {
1884
+ const msg = flagMsg + ".empty was passed a function " + getName(val);
1885
+ throw new AssertionError(msg.trim(), void 0, ssfi);
1886
+ }
1887
+ default:
1888
+ if (val !== Object(val)) {
1889
+ throw new AssertionError(flagMsg + ".empty was passed non-string primitive " + inspect2(val), void 0, ssfi);
1890
+ }
1891
+ itemsCount = Object.keys(val).length;
1892
+ }
1893
+ this.assert(0 === itemsCount, "expected #{this} to be empty", "expected #{this} not to be empty");
1894
+ });
1895
+ function checkArguments() {
1896
+ let obj = flag2(this, "object"), type3 = type(obj);
1897
+ this.assert("Arguments" === type3, "expected #{this} to be arguments but got " + type3, "expected #{this} to not be arguments");
1898
+ }
1899
+ __name(checkArguments, "checkArguments");
1900
+ Assertion.addProperty("arguments", checkArguments);
1901
+ Assertion.addProperty("Arguments", checkArguments);
1902
+ function assertEqual(val, msg) {
1903
+ if (msg) flag2(this, "message", msg);
1904
+ let obj = flag2(this, "object");
1905
+ if (flag2(this, "deep")) {
1906
+ let prevLockSsfi = flag2(this, "lockSsfi");
1907
+ flag2(this, "lockSsfi", true);
1908
+ this.eql(val);
1909
+ flag2(this, "lockSsfi", prevLockSsfi);
1910
+ } else {
1911
+ this.assert(val === obj, "expected #{this} to equal #{exp}", "expected #{this} to not equal #{exp}", val, this._obj, true);
1912
+ }
1913
+ }
1914
+ __name(assertEqual, "assertEqual");
1915
+ Assertion.addMethod("equal", assertEqual);
1916
+ Assertion.addMethod("equals", assertEqual);
1917
+ Assertion.addMethod("eq", assertEqual);
1918
+ function assertEql(obj, msg) {
1919
+ if (msg) flag2(this, "message", msg);
1920
+ let eql = flag2(this, "eql");
1921
+ this.assert(eql(obj, flag2(this, "object")), "expected #{this} to deeply equal #{exp}", "expected #{this} to not deeply equal #{exp}", obj, this._obj, true);
1922
+ }
1923
+ __name(assertEql, "assertEql");
1924
+ Assertion.addMethod("eql", assertEql);
1925
+ Assertion.addMethod("eqls", assertEql);
1926
+ function assertAbove(n, msg) {
1927
+ if (msg) flag2(this, "message", msg);
1928
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase();
1929
+ if (doLength && objType !== "map" && objType !== "set") {
1930
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
1931
+ }
1932
+ if (!doLength && objType === "date" && nType !== "date") {
1933
+ throw new AssertionError(msgPrefix + "the argument to above must be a date", void 0, ssfi);
1934
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
1935
+ throw new AssertionError(msgPrefix + "the argument to above must be a number", void 0, ssfi);
1936
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
1937
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
1938
+ throw new AssertionError(msgPrefix + "expected " + printObj + " to be a number or a date", void 0, ssfi);
1939
+ }
1940
+ if (doLength) {
1941
+ let descriptor = "length", itemsCount;
1942
+ if (objType === "map" || objType === "set") {
1943
+ descriptor = "size";
1944
+ itemsCount = obj.size;
1945
+ } else {
1946
+ itemsCount = obj.length;
1947
+ }
1948
+ this.assert(itemsCount > n, "expected #{this} to have a " + descriptor + " above #{exp} but got #{act}", "expected #{this} to not have a " + descriptor + " above #{exp}", n, itemsCount);
1949
+ } else {
1950
+ this.assert(obj > n, "expected #{this} to be above #{exp}", "expected #{this} to be at most #{exp}", n);
1951
+ }
1952
+ }
1953
+ __name(assertAbove, "assertAbove");
1954
+ Assertion.addMethod("above", assertAbove);
1955
+ Assertion.addMethod("gt", assertAbove);
1956
+ Assertion.addMethod("greaterThan", assertAbove);
1957
+ function assertLeast(n, msg) {
1958
+ if (msg) flag2(this, "message", msg);
1959
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
1960
+ if (doLength && objType !== "map" && objType !== "set") {
1961
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
1962
+ }
1963
+ if (!doLength && objType === "date" && nType !== "date") {
1964
+ errorMessage = msgPrefix + "the argument to least must be a date";
1965
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
1966
+ errorMessage = msgPrefix + "the argument to least must be a number";
1967
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
1968
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
1969
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
1970
+ } else {
1971
+ shouldThrow = false;
1972
+ }
1973
+ if (shouldThrow) {
1974
+ throw new AssertionError(errorMessage, void 0, ssfi);
1975
+ }
1976
+ if (doLength) {
1977
+ let descriptor = "length", itemsCount;
1978
+ if (objType === "map" || objType === "set") {
1979
+ descriptor = "size";
1980
+ itemsCount = obj.size;
1981
+ } else {
1982
+ itemsCount = obj.length;
1983
+ }
1984
+ this.assert(itemsCount >= n, "expected #{this} to have a " + descriptor + " at least #{exp} but got #{act}", "expected #{this} to have a " + descriptor + " below #{exp}", n, itemsCount);
1985
+ } else {
1986
+ this.assert(obj >= n, "expected #{this} to be at least #{exp}", "expected #{this} to be below #{exp}", n);
1987
+ }
1988
+ }
1989
+ __name(assertLeast, "assertLeast");
1990
+ Assertion.addMethod("least", assertLeast);
1991
+ Assertion.addMethod("gte", assertLeast);
1992
+ Assertion.addMethod("greaterThanOrEqual", assertLeast);
1993
+ function assertBelow(n, msg) {
1994
+ if (msg) flag2(this, "message", msg);
1995
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
1996
+ if (doLength && objType !== "map" && objType !== "set") {
1997
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
1998
+ }
1999
+ if (!doLength && objType === "date" && nType !== "date") {
2000
+ errorMessage = msgPrefix + "the argument to below must be a date";
2001
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2002
+ errorMessage = msgPrefix + "the argument to below must be a number";
2003
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2004
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2005
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2006
+ } else {
2007
+ shouldThrow = false;
2008
+ }
2009
+ if (shouldThrow) {
2010
+ throw new AssertionError(errorMessage, void 0, ssfi);
2011
+ }
2012
+ if (doLength) {
2013
+ let descriptor = "length", itemsCount;
2014
+ if (objType === "map" || objType === "set") {
2015
+ descriptor = "size";
2016
+ itemsCount = obj.size;
2017
+ } else {
2018
+ itemsCount = obj.length;
2019
+ }
2020
+ this.assert(itemsCount < n, "expected #{this} to have a " + descriptor + " below #{exp} but got #{act}", "expected #{this} to not have a " + descriptor + " below #{exp}", n, itemsCount);
2021
+ } else {
2022
+ this.assert(obj < n, "expected #{this} to be below #{exp}", "expected #{this} to be at least #{exp}", n);
2023
+ }
2024
+ }
2025
+ __name(assertBelow, "assertBelow");
2026
+ Assertion.addMethod("below", assertBelow);
2027
+ Assertion.addMethod("lt", assertBelow);
2028
+ Assertion.addMethod("lessThan", assertBelow);
2029
+ function assertMost(n, msg) {
2030
+ if (msg) flag2(this, "message", msg);
2031
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), nType = type(n).toLowerCase(), errorMessage, shouldThrow = true;
2032
+ if (doLength && objType !== "map" && objType !== "set") {
2033
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2034
+ }
2035
+ if (!doLength && objType === "date" && nType !== "date") {
2036
+ errorMessage = msgPrefix + "the argument to most must be a date";
2037
+ } else if (!isNumeric(n) && (doLength || isNumeric(obj))) {
2038
+ errorMessage = msgPrefix + "the argument to most must be a number";
2039
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2040
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2041
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2042
+ } else {
2043
+ shouldThrow = false;
2044
+ }
2045
+ if (shouldThrow) {
2046
+ throw new AssertionError(errorMessage, void 0, ssfi);
2047
+ }
2048
+ if (doLength) {
2049
+ let descriptor = "length", itemsCount;
2050
+ if (objType === "map" || objType === "set") {
2051
+ descriptor = "size";
2052
+ itemsCount = obj.size;
2053
+ } else {
2054
+ itemsCount = obj.length;
2055
+ }
2056
+ this.assert(itemsCount <= n, "expected #{this} to have a " + descriptor + " at most #{exp} but got #{act}", "expected #{this} to have a " + descriptor + " above #{exp}", n, itemsCount);
2057
+ } else {
2058
+ this.assert(obj <= n, "expected #{this} to be at most #{exp}", "expected #{this} to be above #{exp}", n);
2059
+ }
2060
+ }
2061
+ __name(assertMost, "assertMost");
2062
+ Assertion.addMethod("most", assertMost);
2063
+ Assertion.addMethod("lte", assertMost);
2064
+ Assertion.addMethod("lessThanOrEqual", assertMost);
2065
+ Assertion.addMethod("within", function(start, finish, msg) {
2066
+ if (msg) flag2(this, "message", msg);
2067
+ let obj = flag2(this, "object"), doLength = flag2(this, "doLength"), flagMsg = flag2(this, "message"), msgPrefix = flagMsg ? flagMsg + ": " : "", ssfi = flag2(this, "ssfi"), objType = type(obj).toLowerCase(), startType = type(start).toLowerCase(), finishType = type(finish).toLowerCase(), errorMessage, shouldThrow = true, range = startType === "date" && finishType === "date" ? start.toISOString() + ".." + finish.toISOString() : start + ".." + finish;
2068
+ if (doLength && objType !== "map" && objType !== "set") {
2069
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2070
+ }
2071
+ if (!doLength && objType === "date" && (startType !== "date" || finishType !== "date")) {
2072
+ errorMessage = msgPrefix + "the arguments to within must be dates";
2073
+ } else if ((!isNumeric(start) || !isNumeric(finish)) && (doLength || isNumeric(obj))) {
2074
+ errorMessage = msgPrefix + "the arguments to within must be numbers";
2075
+ } else if (!doLength && objType !== "date" && !isNumeric(obj)) {
2076
+ let printObj = objType === "string" ? "'" + obj + "'" : obj;
2077
+ errorMessage = msgPrefix + "expected " + printObj + " to be a number or a date";
2078
+ } else {
2079
+ shouldThrow = false;
2080
+ }
2081
+ if (shouldThrow) {
2082
+ throw new AssertionError(errorMessage, void 0, ssfi);
2083
+ }
2084
+ if (doLength) {
2085
+ let descriptor = "length", itemsCount;
2086
+ if (objType === "map" || objType === "set") {
2087
+ descriptor = "size";
2088
+ itemsCount = obj.size;
2089
+ } else {
2090
+ itemsCount = obj.length;
2091
+ }
2092
+ this.assert(itemsCount >= start && itemsCount <= finish, "expected #{this} to have a " + descriptor + " within " + range, "expected #{this} to not have a " + descriptor + " within " + range);
2093
+ } else {
2094
+ this.assert(obj >= start && obj <= finish, "expected #{this} to be within " + range, "expected #{this} to not be within " + range);
2095
+ }
2096
+ });
2097
+ function assertInstanceOf(constructor, msg) {
2098
+ if (msg) flag2(this, "message", msg);
2099
+ let target = flag2(this, "object");
2100
+ let ssfi = flag2(this, "ssfi");
2101
+ let flagMsg = flag2(this, "message");
2102
+ let isInstanceOf;
2103
+ try {
2104
+ isInstanceOf = target instanceof constructor;
2105
+ } catch (err) {
2106
+ if (err instanceof TypeError) {
2107
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2108
+ throw new AssertionError(flagMsg + "The instanceof assertion needs a constructor but " + type(constructor) + " was given.", void 0, ssfi);
2109
+ }
2110
+ throw err;
2111
+ }
2112
+ let name = getName(constructor);
2113
+ if (name == null) {
2114
+ name = "an unnamed constructor";
2115
+ }
2116
+ this.assert(isInstanceOf, "expected #{this} to be an instance of " + name, "expected #{this} to not be an instance of " + name);
2117
+ }
2118
+ __name(assertInstanceOf, "assertInstanceOf");
2119
+ Assertion.addMethod("instanceof", assertInstanceOf);
2120
+ Assertion.addMethod("instanceOf", assertInstanceOf);
2121
+ function assertProperty(name, val, msg) {
2122
+ if (msg) flag2(this, "message", msg);
2123
+ let isNested = flag2(this, "nested"), isOwn = flag2(this, "own"), flagMsg = flag2(this, "message"), obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), nameType = typeof name;
2124
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2125
+ if (isNested) {
2126
+ if (nameType !== "string") {
2127
+ throw new AssertionError(flagMsg + "the argument to property must be a string when using nested syntax", void 0, ssfi);
2128
+ }
2129
+ } else {
2130
+ if (nameType !== "string" && nameType !== "number" && nameType !== "symbol") {
2131
+ throw new AssertionError(flagMsg + "the argument to property must be a string, number, or symbol", void 0, ssfi);
2132
+ }
2133
+ }
2134
+ if (isNested && isOwn) {
2135
+ throw new AssertionError(flagMsg + "The \"nested\" and \"own\" flags cannot be combined.", void 0, ssfi);
2136
+ }
2137
+ if (obj === null || obj === void 0) {
2138
+ throw new AssertionError(flagMsg + "Target cannot be null or undefined.", void 0, ssfi);
2139
+ }
2140
+ let isDeep = flag2(this, "deep"), negate = flag2(this, "negate"), pathInfo = isNested ? getPathInfo(obj, name) : null, value = isNested ? pathInfo.value : obj[name], isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2;
2141
+ let descriptor = "";
2142
+ if (isDeep) descriptor += "deep ";
2143
+ if (isOwn) descriptor += "own ";
2144
+ if (isNested) descriptor += "nested ";
2145
+ descriptor += "property ";
2146
+ let hasProperty2;
2147
+ if (isOwn) hasProperty2 = Object.prototype.hasOwnProperty.call(obj, name);
2148
+ else if (isNested) hasProperty2 = pathInfo.exists;
2149
+ else hasProperty2 = hasProperty(obj, name);
2150
+ if (!negate || arguments.length === 1) {
2151
+ this.assert(hasProperty2, "expected #{this} to have " + descriptor + inspect2(name), "expected #{this} to not have " + descriptor + inspect2(name));
2152
+ }
2153
+ if (arguments.length > 1) {
2154
+ this.assert(hasProperty2 && isEql(val, value), "expected #{this} to have " + descriptor + inspect2(name) + " of #{exp}, but got #{act}", "expected #{this} to not have " + descriptor + inspect2(name) + " of #{act}", val, value);
2155
+ }
2156
+ flag2(this, "object", value);
2157
+ }
2158
+ __name(assertProperty, "assertProperty");
2159
+ Assertion.addMethod("property", assertProperty);
2160
+ function assertOwnProperty(_name, _value, _msg) {
2161
+ flag2(this, "own", true);
2162
+ assertProperty.apply(this, arguments);
2163
+ }
2164
+ __name(assertOwnProperty, "assertOwnProperty");
2165
+ Assertion.addMethod("ownProperty", assertOwnProperty);
2166
+ Assertion.addMethod("haveOwnProperty", assertOwnProperty);
2167
+ function assertOwnPropertyDescriptor(name, descriptor, msg) {
2168
+ if (typeof descriptor === "string") {
2169
+ msg = descriptor;
2170
+ descriptor = null;
2171
+ }
2172
+ if (msg) flag2(this, "message", msg);
2173
+ let obj = flag2(this, "object");
2174
+ let actualDescriptor = Object.getOwnPropertyDescriptor(Object(obj), name);
2175
+ let eql = flag2(this, "eql");
2176
+ if (actualDescriptor && descriptor) {
2177
+ this.assert(eql(descriptor, actualDescriptor), "expected the own property descriptor for " + inspect2(name) + " on #{this} to match " + inspect2(descriptor) + ", got " + inspect2(actualDescriptor), "expected the own property descriptor for " + inspect2(name) + " on #{this} to not match " + inspect2(descriptor), descriptor, actualDescriptor, true);
2178
+ } else {
2179
+ this.assert(actualDescriptor, "expected #{this} to have an own property descriptor for " + inspect2(name), "expected #{this} to not have an own property descriptor for " + inspect2(name));
2180
+ }
2181
+ flag2(this, "object", actualDescriptor);
2182
+ }
2183
+ __name(assertOwnPropertyDescriptor, "assertOwnPropertyDescriptor");
2184
+ Assertion.addMethod("ownPropertyDescriptor", assertOwnPropertyDescriptor);
2185
+ Assertion.addMethod("haveOwnPropertyDescriptor", assertOwnPropertyDescriptor);
2186
+ function assertLengthChain() {
2187
+ flag2(this, "doLength", true);
2188
+ }
2189
+ __name(assertLengthChain, "assertLengthChain");
2190
+ function assertLength(n, msg) {
2191
+ if (msg) flag2(this, "message", msg);
2192
+ let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), descriptor = "length", itemsCount;
2193
+ switch (objType) {
2194
+ case "map":
2195
+ case "set":
2196
+ descriptor = "size";
2197
+ itemsCount = obj.size;
2198
+ break;
2199
+ default:
2200
+ new Assertion(obj, flagMsg, ssfi, true).to.have.property("length");
2201
+ itemsCount = obj.length;
2202
+ }
2203
+ this.assert(itemsCount == n, "expected #{this} to have a " + descriptor + " of #{exp} but got #{act}", "expected #{this} to not have a " + descriptor + " of #{act}", n, itemsCount);
2204
+ }
2205
+ __name(assertLength, "assertLength");
2206
+ Assertion.addChainableMethod("length", assertLength, assertLengthChain);
2207
+ Assertion.addChainableMethod("lengthOf", assertLength, assertLengthChain);
2208
+ function assertMatch(re, msg) {
2209
+ if (msg) flag2(this, "message", msg);
2210
+ let obj = flag2(this, "object");
2211
+ this.assert(re.exec(obj), "expected #{this} to match " + re, "expected #{this} not to match " + re);
2212
+ }
2213
+ __name(assertMatch, "assertMatch");
2214
+ Assertion.addMethod("match", assertMatch);
2215
+ Assertion.addMethod("matches", assertMatch);
2216
+ Assertion.addMethod("string", function(str, msg) {
2217
+ if (msg) flag2(this, "message", msg);
2218
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2219
+ new Assertion(obj, flagMsg, ssfi, true).is.a("string");
2220
+ this.assert(~obj.indexOf(str), "expected #{this} to contain " + inspect2(str), "expected #{this} to not contain " + inspect2(str));
2221
+ });
2222
+ function assertKeys(keys) {
2223
+ let obj = flag2(this, "object"), objType = type(obj), keysType = type(keys), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), str, deepStr = "", actual, ok = true, flagMsg = flag2(this, "message");
2224
+ flagMsg = flagMsg ? flagMsg + ": " : "";
2225
+ let mixedArgsMsg = flagMsg + "when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";
2226
+ if (objType === "Map" || objType === "Set") {
2227
+ deepStr = isDeep ? "deeply " : "";
2228
+ actual = [];
2229
+ obj.forEach(function(val, key) {
2230
+ actual.push(key);
2231
+ });
2232
+ if (keysType !== "Array") {
2233
+ keys = Array.prototype.slice.call(arguments);
2234
+ }
2235
+ } else {
2236
+ actual = getOwnEnumerableProperties(obj);
2237
+ switch (keysType) {
2238
+ case "Array":
2239
+ if (arguments.length > 1) {
2240
+ throw new AssertionError(mixedArgsMsg, void 0, ssfi);
2241
+ }
2242
+ break;
2243
+ case "Object":
2244
+ if (arguments.length > 1) {
2245
+ throw new AssertionError(mixedArgsMsg, void 0, ssfi);
2246
+ }
2247
+ keys = Object.keys(keys);
2248
+ break;
2249
+ default: keys = Array.prototype.slice.call(arguments);
2250
+ }
2251
+ keys = keys.map(function(val) {
2252
+ return typeof val === "symbol" ? val : String(val);
2253
+ });
2254
+ }
2255
+ if (!keys.length) {
2256
+ throw new AssertionError(flagMsg + "keys required", void 0, ssfi);
2257
+ }
2258
+ let len = keys.length, any = flag2(this, "any"), all = flag2(this, "all"), expected = keys, isEql = isDeep ? flag2(this, "eql") : (val1, val2) => val1 === val2;
2259
+ if (!any && !all) {
2260
+ all = true;
2261
+ }
2262
+ if (any) {
2263
+ ok = expected.some(function(expectedKey) {
2264
+ return actual.some(function(actualKey) {
2265
+ return isEql(expectedKey, actualKey);
2266
+ });
2267
+ });
2268
+ }
2269
+ if (all) {
2270
+ ok = expected.every(function(expectedKey) {
2271
+ return actual.some(function(actualKey) {
2272
+ return isEql(expectedKey, actualKey);
2273
+ });
2274
+ });
2275
+ if (!flag2(this, "contains")) {
2276
+ ok = ok && keys.length == actual.length;
2277
+ }
2278
+ }
2279
+ if (len > 1) {
2280
+ keys = keys.map(function(key) {
2281
+ return inspect2(key);
2282
+ });
2283
+ let last = keys.pop();
2284
+ if (all) {
2285
+ str = keys.join(", ") + ", and " + last;
2286
+ }
2287
+ if (any) {
2288
+ str = keys.join(", ") + ", or " + last;
2289
+ }
2290
+ } else {
2291
+ str = inspect2(keys[0]);
2292
+ }
2293
+ str = (len > 1 ? "keys " : "key ") + str;
2294
+ str = (flag2(this, "contains") ? "contain " : "have ") + str;
2295
+ this.assert(ok, "expected #{this} to " + deepStr + str, "expected #{this} to not " + deepStr + str, expected.slice(0).sort(compareByInspect), actual.sort(compareByInspect), true);
2296
+ }
2297
+ __name(assertKeys, "assertKeys");
2298
+ Assertion.addMethod("keys", assertKeys);
2299
+ Assertion.addMethod("key", assertKeys);
2300
+ function assertThrows(errorLike, errMsgMatcher, msg) {
2301
+ if (msg) flag2(this, "message", msg);
2302
+ let obj = flag2(this, "object"), ssfi = flag2(this, "ssfi"), flagMsg = flag2(this, "message"), negate = flag2(this, "negate") || false;
2303
+ new Assertion(obj, flagMsg, ssfi, true).is.a("function");
2304
+ if (isRegExp2(errorLike) || typeof errorLike === "string") {
2305
+ errMsgMatcher = errorLike;
2306
+ errorLike = null;
2307
+ }
2308
+ let caughtErr;
2309
+ let errorWasThrown = false;
2310
+ try {
2311
+ obj();
2312
+ } catch (err) {
2313
+ errorWasThrown = true;
2314
+ caughtErr = err;
2315
+ }
2316
+ let everyArgIsUndefined = errorLike === void 0 && errMsgMatcher === void 0;
2317
+ let everyArgIsDefined = Boolean(errorLike && errMsgMatcher);
2318
+ let errorLikeFail = false;
2319
+ let errMsgMatcherFail = false;
2320
+ if (everyArgIsUndefined || !everyArgIsUndefined && !negate) {
2321
+ let errorLikeString = "an error";
2322
+ if (errorLike instanceof Error) {
2323
+ errorLikeString = "#{exp}";
2324
+ } else if (errorLike) {
2325
+ errorLikeString = check_error_exports.getConstructorName(errorLike);
2326
+ }
2327
+ let actual = caughtErr;
2328
+ if (caughtErr instanceof Error) {
2329
+ actual = caughtErr.toString();
2330
+ } else if (typeof caughtErr === "string") {
2331
+ actual = caughtErr;
2332
+ } else if (caughtErr && (typeof caughtErr === "object" || typeof caughtErr === "function")) {
2333
+ try {
2334
+ actual = check_error_exports.getConstructorName(caughtErr);
2335
+ } catch (_err) {}
2336
+ }
2337
+ this.assert(errorWasThrown, "expected #{this} to throw " + errorLikeString, "expected #{this} to not throw an error but #{act} was thrown", errorLike && errorLike.toString(), actual);
2338
+ }
2339
+ if (errorLike && caughtErr) {
2340
+ if (errorLike instanceof Error) {
2341
+ let isCompatibleInstance = check_error_exports.compatibleInstance(caughtErr, errorLike);
2342
+ if (isCompatibleInstance === negate) {
2343
+ if (everyArgIsDefined && negate) {
2344
+ errorLikeFail = true;
2345
+ } else {
2346
+ this.assert(negate, "expected #{this} to throw #{exp} but #{act} was thrown", "expected #{this} to not throw #{exp}" + (caughtErr && !negate ? " but #{act} was thrown" : ""), errorLike.toString(), caughtErr.toString());
2347
+ }
2348
+ }
2349
+ }
2350
+ let isCompatibleConstructor = check_error_exports.compatibleConstructor(caughtErr, errorLike);
2351
+ if (isCompatibleConstructor === negate) {
2352
+ if (everyArgIsDefined && negate) {
2353
+ errorLikeFail = true;
2354
+ } else {
2355
+ this.assert(negate, "expected #{this} to throw #{exp} but #{act} was thrown", "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""), errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike), caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr));
2356
+ }
2357
+ }
2358
+ }
2359
+ if (caughtErr && errMsgMatcher !== void 0 && errMsgMatcher !== null) {
2360
+ let placeholder = "including";
2361
+ if (isRegExp2(errMsgMatcher)) {
2362
+ placeholder = "matching";
2363
+ }
2364
+ let isCompatibleMessage = check_error_exports.compatibleMessage(caughtErr, errMsgMatcher);
2365
+ if (isCompatibleMessage === negate) {
2366
+ if (everyArgIsDefined && negate) {
2367
+ errMsgMatcherFail = true;
2368
+ } else {
2369
+ this.assert(negate, "expected #{this} to throw error " + placeholder + " #{exp} but got #{act}", "expected #{this} to throw error not " + placeholder + " #{exp}", errMsgMatcher, check_error_exports.getMessage(caughtErr));
2370
+ }
2371
+ }
2372
+ }
2373
+ if (errorLikeFail && errMsgMatcherFail) {
2374
+ this.assert(negate, "expected #{this} to throw #{exp} but #{act} was thrown", "expected #{this} to not throw #{exp}" + (caughtErr ? " but #{act} was thrown" : ""), errorLike instanceof Error ? errorLike.toString() : errorLike && check_error_exports.getConstructorName(errorLike), caughtErr instanceof Error ? caughtErr.toString() : caughtErr && check_error_exports.getConstructorName(caughtErr));
2375
+ }
2376
+ flag2(this, "object", caughtErr);
2377
+ }
2378
+ __name(assertThrows, "assertThrows");
2379
+ Assertion.addMethod("throw", assertThrows);
2380
+ Assertion.addMethod("throws", assertThrows);
2381
+ Assertion.addMethod("Throw", assertThrows);
2382
+ function respondTo(method, msg) {
2383
+ if (msg) flag2(this, "message", msg);
2384
+ let obj = flag2(this, "object"), itself = flag2(this, "itself"), context = "function" === typeof obj && !itself ? obj.prototype[method] : obj[method];
2385
+ this.assert("function" === typeof context, "expected #{this} to respond to " + inspect2(method), "expected #{this} to not respond to " + inspect2(method));
2386
+ }
2387
+ __name(respondTo, "respondTo");
2388
+ Assertion.addMethod("respondTo", respondTo);
2389
+ Assertion.addMethod("respondsTo", respondTo);
2390
+ Assertion.addProperty("itself", function() {
2391
+ flag2(this, "itself", true);
2392
+ });
2393
+ function satisfy(matcher, msg) {
2394
+ if (msg) flag2(this, "message", msg);
2395
+ let obj = flag2(this, "object");
2396
+ let result = matcher(obj);
2397
+ this.assert(result, "expected #{this} to satisfy " + objDisplay(matcher), "expected #{this} to not satisfy" + objDisplay(matcher), flag2(this, "negate") ? false : true, result);
2398
+ }
2399
+ __name(satisfy, "satisfy");
2400
+ Assertion.addMethod("satisfy", satisfy);
2401
+ Assertion.addMethod("satisfies", satisfy);
2402
+ function closeTo(expected, delta, msg) {
2403
+ if (msg) flag2(this, "message", msg);
2404
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2405
+ new Assertion(obj, flagMsg, ssfi, true).is.numeric;
2406
+ let message = "A `delta` value is required for `closeTo`";
2407
+ if (delta == void 0) {
2408
+ throw new AssertionError(flagMsg ? `${flagMsg}: ${message}` : message, void 0, ssfi);
2409
+ }
2410
+ new Assertion(delta, flagMsg, ssfi, true).is.numeric;
2411
+ message = "A `expected` value is required for `closeTo`";
2412
+ if (expected == void 0) {
2413
+ throw new AssertionError(flagMsg ? `${flagMsg}: ${message}` : message, void 0, ssfi);
2414
+ }
2415
+ new Assertion(expected, flagMsg, ssfi, true).is.numeric;
2416
+ const abs = /* @__PURE__ */ __name((x) => x < 0n ? -x : x, "abs");
2417
+ const strip = /* @__PURE__ */ __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
2418
+ this.assert(strip(abs(obj - expected)) <= delta, "expected #{this} to be close to " + expected + " +/- " + delta, "expected #{this} not to be close to " + expected + " +/- " + delta);
2419
+ }
2420
+ __name(closeTo, "closeTo");
2421
+ Assertion.addMethod("closeTo", closeTo);
2422
+ Assertion.addMethod("approximately", closeTo);
2423
+ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
2424
+ let superset = Array.from(_superset);
2425
+ let subset = Array.from(_subset);
2426
+ if (!contains) {
2427
+ if (subset.length !== superset.length) return false;
2428
+ superset = superset.slice();
2429
+ }
2430
+ return subset.every(function(elem, idx) {
2431
+ if (ordered) return cmp ? cmp(elem, superset[idx]) : elem === superset[idx];
2432
+ if (!cmp) {
2433
+ let matchIdx = superset.indexOf(elem);
2434
+ if (matchIdx === -1) return false;
2435
+ if (!contains) superset.splice(matchIdx, 1);
2436
+ return true;
2437
+ }
2438
+ return superset.some(function(elem2, matchIdx) {
2439
+ if (!cmp(elem, elem2)) return false;
2440
+ if (!contains) superset.splice(matchIdx, 1);
2441
+ return true;
2442
+ });
2443
+ });
2444
+ }
2445
+ __name(isSubsetOf, "isSubsetOf");
2446
+ Assertion.addMethod("members", function(subset, msg) {
2447
+ if (msg) flag2(this, "message", msg);
2448
+ let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2449
+ new Assertion(obj, flagMsg, ssfi, true).to.be.iterable;
2450
+ new Assertion(subset, flagMsg, ssfi, true).to.be.iterable;
2451
+ let contains = flag2(this, "contains");
2452
+ let ordered = flag2(this, "ordered");
2453
+ let subject, failMsg, failNegateMsg;
2454
+ if (contains) {
2455
+ subject = ordered ? "an ordered superset" : "a superset";
2456
+ failMsg = "expected #{this} to be " + subject + " of #{exp}";
2457
+ failNegateMsg = "expected #{this} to not be " + subject + " of #{exp}";
2458
+ } else {
2459
+ subject = ordered ? "ordered members" : "members";
2460
+ failMsg = "expected #{this} to have the same " + subject + " as #{exp}";
2461
+ failNegateMsg = "expected #{this} to not have the same " + subject + " as #{exp}";
2462
+ }
2463
+ let cmp = flag2(this, "deep") ? flag2(this, "eql") : void 0;
2464
+ this.assert(isSubsetOf(subset, obj, cmp, contains, ordered), failMsg, failNegateMsg, subset, obj, true);
2465
+ });
2466
+ Assertion.addProperty("iterable", function(msg) {
2467
+ if (msg) flag2(this, "message", msg);
2468
+ let obj = flag2(this, "object");
2469
+ this.assert(obj != void 0 && obj[Symbol.iterator], "expected #{this} to be an iterable", "expected #{this} to not be an iterable", obj);
2470
+ });
2471
+ function oneOf(list, msg) {
2472
+ if (msg) flag2(this, "message", msg);
2473
+ let expected = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), contains = flag2(this, "contains"), isDeep = flag2(this, "deep"), eql = flag2(this, "eql");
2474
+ new Assertion(list, flagMsg, ssfi, true).to.be.an("array");
2475
+ if (contains) {
2476
+ this.assert(list.some(function(possibility) {
2477
+ return expected.indexOf(possibility) > -1;
2478
+ }), "expected #{this} to contain one of #{exp}", "expected #{this} to not contain one of #{exp}", list, expected);
2479
+ } else {
2480
+ if (isDeep) {
2481
+ this.assert(list.some(function(possibility) {
2482
+ return eql(expected, possibility);
2483
+ }), "expected #{this} to deeply equal one of #{exp}", "expected #{this} to deeply equal one of #{exp}", list, expected);
2484
+ } else {
2485
+ this.assert(list.indexOf(expected) > -1, "expected #{this} to be one of #{exp}", "expected #{this} to not be one of #{exp}", list, expected);
2486
+ }
2487
+ }
2488
+ }
2489
+ __name(oneOf, "oneOf");
2490
+ Assertion.addMethod("oneOf", oneOf);
2491
+ function assertChanges(subject, prop, msg) {
2492
+ if (msg) flag2(this, "message", msg);
2493
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2494
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
2495
+ let initial;
2496
+ if (!prop) {
2497
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
2498
+ initial = subject();
2499
+ } else {
2500
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
2501
+ initial = subject[prop];
2502
+ }
2503
+ fn();
2504
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
2505
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
2506
+ flag2(this, "deltaMsgObj", msgObj);
2507
+ flag2(this, "initialDeltaValue", initial);
2508
+ flag2(this, "finalDeltaValue", final);
2509
+ flag2(this, "deltaBehavior", "change");
2510
+ flag2(this, "realDelta", final !== initial);
2511
+ this.assert(initial !== final, "expected " + msgObj + " to change", "expected " + msgObj + " to not change");
2512
+ }
2513
+ __name(assertChanges, "assertChanges");
2514
+ Assertion.addMethod("change", assertChanges);
2515
+ Assertion.addMethod("changes", assertChanges);
2516
+ function assertIncreases(subject, prop, msg) {
2517
+ if (msg) flag2(this, "message", msg);
2518
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2519
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
2520
+ let initial;
2521
+ if (!prop) {
2522
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
2523
+ initial = subject();
2524
+ } else {
2525
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
2526
+ initial = subject[prop];
2527
+ }
2528
+ new Assertion(initial, flagMsg, ssfi, true).is.a("number");
2529
+ fn();
2530
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
2531
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
2532
+ flag2(this, "deltaMsgObj", msgObj);
2533
+ flag2(this, "initialDeltaValue", initial);
2534
+ flag2(this, "finalDeltaValue", final);
2535
+ flag2(this, "deltaBehavior", "increase");
2536
+ flag2(this, "realDelta", final - initial);
2537
+ this.assert(final - initial > 0, "expected " + msgObj + " to increase", "expected " + msgObj + " to not increase");
2538
+ }
2539
+ __name(assertIncreases, "assertIncreases");
2540
+ Assertion.addMethod("increase", assertIncreases);
2541
+ Assertion.addMethod("increases", assertIncreases);
2542
+ function assertDecreases(subject, prop, msg) {
2543
+ if (msg) flag2(this, "message", msg);
2544
+ let fn = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
2545
+ new Assertion(fn, flagMsg, ssfi, true).is.a("function");
2546
+ let initial;
2547
+ if (!prop) {
2548
+ new Assertion(subject, flagMsg, ssfi, true).is.a("function");
2549
+ initial = subject();
2550
+ } else {
2551
+ new Assertion(subject, flagMsg, ssfi, true).to.have.property(prop);
2552
+ initial = subject[prop];
2553
+ }
2554
+ new Assertion(initial, flagMsg, ssfi, true).is.a("number");
2555
+ fn();
2556
+ let final = prop === void 0 || prop === null ? subject() : subject[prop];
2557
+ let msgObj = prop === void 0 || prop === null ? initial : "." + prop;
2558
+ flag2(this, "deltaMsgObj", msgObj);
2559
+ flag2(this, "initialDeltaValue", initial);
2560
+ flag2(this, "finalDeltaValue", final);
2561
+ flag2(this, "deltaBehavior", "decrease");
2562
+ flag2(this, "realDelta", initial - final);
2563
+ this.assert(final - initial < 0, "expected " + msgObj + " to decrease", "expected " + msgObj + " to not decrease");
2564
+ }
2565
+ __name(assertDecreases, "assertDecreases");
2566
+ Assertion.addMethod("decrease", assertDecreases);
2567
+ Assertion.addMethod("decreases", assertDecreases);
2568
+ function assertDelta(delta, msg) {
2569
+ if (msg) flag2(this, "message", msg);
2570
+ let msgObj = flag2(this, "deltaMsgObj");
2571
+ let initial = flag2(this, "initialDeltaValue");
2572
+ let final = flag2(this, "finalDeltaValue");
2573
+ let behavior = flag2(this, "deltaBehavior");
2574
+ let realDelta = flag2(this, "realDelta");
2575
+ let expression;
2576
+ if (behavior === "change") {
2577
+ expression = Math.abs(final - initial) === Math.abs(delta);
2578
+ } else {
2579
+ expression = realDelta === Math.abs(delta);
2580
+ }
2581
+ this.assert(expression, "expected " + msgObj + " to " + behavior + " by " + delta, "expected " + msgObj + " to not " + behavior + " by " + delta);
2582
+ }
2583
+ __name(assertDelta, "assertDelta");
2584
+ Assertion.addMethod("by", assertDelta);
2585
+ Assertion.addProperty("extensible", function() {
2586
+ let obj = flag2(this, "object");
2587
+ let isExtensible = obj === Object(obj) && Object.isExtensible(obj);
2588
+ this.assert(isExtensible, "expected #{this} to be extensible", "expected #{this} to not be extensible");
2589
+ });
2590
+ Assertion.addProperty("sealed", function() {
2591
+ let obj = flag2(this, "object");
2592
+ let isSealed = obj === Object(obj) ? Object.isSealed(obj) : true;
2593
+ this.assert(isSealed, "expected #{this} to be sealed", "expected #{this} to not be sealed");
2594
+ });
2595
+ Assertion.addProperty("frozen", function() {
2596
+ let obj = flag2(this, "object");
2597
+ let isFrozen = obj === Object(obj) ? Object.isFrozen(obj) : true;
2598
+ this.assert(isFrozen, "expected #{this} to be frozen", "expected #{this} to not be frozen");
2599
+ });
2600
+ Assertion.addProperty("finite", function(_msg) {
2601
+ let obj = flag2(this, "object");
2602
+ this.assert(typeof obj === "number" && isFinite(obj), "expected #{this} to be a finite number", "expected #{this} to not be a finite number");
2603
+ });
2604
+ function compareSubset(expected, actual) {
2605
+ if (expected === actual) {
2606
+ return true;
2607
+ }
2608
+ if (typeof actual !== typeof expected) {
2609
+ return false;
2610
+ }
2611
+ if (typeof expected !== "object" || expected === null) {
2612
+ return expected === actual;
2613
+ }
2614
+ if (!actual) {
2615
+ return false;
2616
+ }
2617
+ if (Array.isArray(expected)) {
2618
+ if (!Array.isArray(actual)) {
2619
+ return false;
2620
+ }
2621
+ return expected.every(function(exp) {
2622
+ return actual.some(function(act) {
2623
+ return compareSubset(exp, act);
2624
+ });
2625
+ });
2626
+ }
2627
+ if (expected instanceof Date) {
2628
+ if (actual instanceof Date) {
2629
+ return expected.getTime() === actual.getTime();
2630
+ } else {
2631
+ return false;
2632
+ }
2633
+ }
2634
+ return Object.keys(expected).every(function(key) {
2635
+ let expectedValue = expected[key];
2636
+ let actualValue = actual[key];
2637
+ if (typeof expectedValue === "object" && expectedValue !== null && actualValue !== null) {
2638
+ return compareSubset(expectedValue, actualValue);
2639
+ }
2640
+ if (typeof expectedValue === "function") {
2641
+ return expectedValue(actualValue);
2642
+ }
2643
+ return actualValue === expectedValue;
2644
+ });
2645
+ }
2646
+ __name(compareSubset, "compareSubset");
2647
+ Assertion.addMethod("containSubset", function(expected) {
2648
+ const actual = flag(this, "object");
2649
+ const showDiff = config.showDiff;
2650
+ this.assert(compareSubset(expected, actual), "expected #{act} to contain subset #{exp}", "expected #{act} to not contain subset #{exp}", expected, actual, showDiff);
2651
+ });
2652
+ function expect(val, message) {
2653
+ return new Assertion(val, message);
2654
+ }
2655
+ __name(expect, "expect");
2656
+ expect.fail = function(actual, expected, message, operator) {
2657
+ if (arguments.length < 2) {
2658
+ message = actual;
2659
+ actual = void 0;
2660
+ }
2661
+ message = message || "expect.fail()";
2662
+ throw new AssertionError(message, {
2663
+ actual,
2664
+ expected,
2665
+ operator
2666
+ }, expect.fail);
2667
+ };
2668
+ var should_exports = {};
2669
+ __export(should_exports, {
2670
+ Should: () => Should,
2671
+ should: () => should
2672
+ });
2673
+ function loadShould() {
2674
+ function shouldGetter() {
2675
+ if (this instanceof String || this instanceof Number || this instanceof Boolean || typeof Symbol === "function" && this instanceof Symbol || typeof BigInt === "function" && this instanceof BigInt) {
2676
+ return new Assertion(this.valueOf(), null, shouldGetter);
2677
+ }
2678
+ return new Assertion(this, null, shouldGetter);
2679
+ }
2680
+ __name(shouldGetter, "shouldGetter");
2681
+ function shouldSetter(value) {
2682
+ Object.defineProperty(this, "should", {
2683
+ value,
2684
+ enumerable: true,
2685
+ configurable: true,
2686
+ writable: true
2687
+ });
2688
+ }
2689
+ __name(shouldSetter, "shouldSetter");
2690
+ Object.defineProperty(Object.prototype, "should", {
2691
+ set: shouldSetter,
2692
+ get: shouldGetter,
2693
+ configurable: true
2694
+ });
2695
+ let should2 = {};
2696
+ should2.fail = function(actual, expected, message, operator) {
2697
+ if (arguments.length < 2) {
2698
+ message = actual;
2699
+ actual = void 0;
2700
+ }
2701
+ message = message || "should.fail()";
2702
+ throw new AssertionError(message, {
2703
+ actual,
2704
+ expected,
2705
+ operator
2706
+ }, should2.fail);
2707
+ };
2708
+ should2.equal = function(actual, expected, message) {
2709
+ new Assertion(actual, message).to.equal(expected);
2710
+ };
2711
+ should2.Throw = function(fn, errt, errs, msg) {
2712
+ new Assertion(fn, msg).to.Throw(errt, errs);
2713
+ };
2714
+ should2.exist = function(val, msg) {
2715
+ new Assertion(val, msg).to.exist;
2716
+ };
2717
+ should2.not = {};
2718
+ should2.not.equal = function(actual, expected, msg) {
2719
+ new Assertion(actual, msg).to.not.equal(expected);
2720
+ };
2721
+ should2.not.Throw = function(fn, errt, errs, msg) {
2722
+ new Assertion(fn, msg).to.not.Throw(errt, errs);
2723
+ };
2724
+ should2.not.exist = function(val, msg) {
2725
+ new Assertion(val, msg).to.not.exist;
2726
+ };
2727
+ should2["throw"] = should2["Throw"];
2728
+ should2.not["throw"] = should2.not["Throw"];
2729
+ return should2;
2730
+ }
2731
+ __name(loadShould, "loadShould");
2732
+ var should = loadShould;
2733
+ var Should = loadShould;
2734
+ function assert(express, errmsg) {
2735
+ let test2 = new Assertion(null, null, assert, true);
2736
+ test2.assert(express, errmsg, "[ negation message unavailable ]");
2737
+ }
2738
+ __name(assert, "assert");
2739
+ assert.fail = function(actual, expected, message, operator) {
2740
+ if (arguments.length < 2) {
2741
+ message = actual;
2742
+ actual = void 0;
2743
+ }
2744
+ message = message || "assert.fail()";
2745
+ throw new AssertionError(message, {
2746
+ actual,
2747
+ expected,
2748
+ operator
2749
+ }, assert.fail);
2750
+ };
2751
+ assert.isOk = function(val, msg) {
2752
+ new Assertion(val, msg, assert.isOk, true).is.ok;
2753
+ };
2754
+ assert.isNotOk = function(val, msg) {
2755
+ new Assertion(val, msg, assert.isNotOk, true).is.not.ok;
2756
+ };
2757
+ assert.equal = function(act, exp, msg) {
2758
+ let test2 = new Assertion(act, msg, assert.equal, true);
2759
+ test2.assert(exp == flag(test2, "object"), "expected #{this} to equal #{exp}", "expected #{this} to not equal #{act}", exp, act, true);
2760
+ };
2761
+ assert.notEqual = function(act, exp, msg) {
2762
+ let test2 = new Assertion(act, msg, assert.notEqual, true);
2763
+ test2.assert(exp != flag(test2, "object"), "expected #{this} to not equal #{exp}", "expected #{this} to equal #{act}", exp, act, true);
2764
+ };
2765
+ assert.strictEqual = function(act, exp, msg) {
2766
+ new Assertion(act, msg, assert.strictEqual, true).to.equal(exp);
2767
+ };
2768
+ assert.notStrictEqual = function(act, exp, msg) {
2769
+ new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp);
2770
+ };
2771
+ assert.deepEqual = assert.deepStrictEqual = function(act, exp, msg) {
2772
+ new Assertion(act, msg, assert.deepEqual, true).to.eql(exp);
2773
+ };
2774
+ assert.notDeepEqual = function(act, exp, msg) {
2775
+ new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp);
2776
+ };
2777
+ assert.isAbove = function(val, abv, msg) {
2778
+ new Assertion(val, msg, assert.isAbove, true).to.be.above(abv);
2779
+ };
2780
+ assert.isAtLeast = function(val, atlst, msg) {
2781
+ new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst);
2782
+ };
2783
+ assert.isBelow = function(val, blw, msg) {
2784
+ new Assertion(val, msg, assert.isBelow, true).to.be.below(blw);
2785
+ };
2786
+ assert.isAtMost = function(val, atmst, msg) {
2787
+ new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst);
2788
+ };
2789
+ assert.isTrue = function(val, msg) {
2790
+ new Assertion(val, msg, assert.isTrue, true).is["true"];
2791
+ };
2792
+ assert.isNotTrue = function(val, msg) {
2793
+ new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true);
2794
+ };
2795
+ assert.isFalse = function(val, msg) {
2796
+ new Assertion(val, msg, assert.isFalse, true).is["false"];
2797
+ };
2798
+ assert.isNotFalse = function(val, msg) {
2799
+ new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false);
2800
+ };
2801
+ assert.isNull = function(val, msg) {
2802
+ new Assertion(val, msg, assert.isNull, true).to.equal(null);
2803
+ };
2804
+ assert.isNotNull = function(val, msg) {
2805
+ new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null);
2806
+ };
2807
+ assert.isNaN = function(val, msg) {
2808
+ new Assertion(val, msg, assert.isNaN, true).to.be.NaN;
2809
+ };
2810
+ assert.isNotNaN = function(value, message) {
2811
+ new Assertion(value, message, assert.isNotNaN, true).not.to.be.NaN;
2812
+ };
2813
+ assert.exists = function(val, msg) {
2814
+ new Assertion(val, msg, assert.exists, true).to.exist;
2815
+ };
2816
+ assert.notExists = function(val, msg) {
2817
+ new Assertion(val, msg, assert.notExists, true).to.not.exist;
2818
+ };
2819
+ assert.isUndefined = function(val, msg) {
2820
+ new Assertion(val, msg, assert.isUndefined, true).to.equal(void 0);
2821
+ };
2822
+ assert.isDefined = function(val, msg) {
2823
+ new Assertion(val, msg, assert.isDefined, true).to.not.equal(void 0);
2824
+ };
2825
+ assert.isCallable = function(value, message) {
2826
+ new Assertion(value, message, assert.isCallable, true).is.callable;
2827
+ };
2828
+ assert.isNotCallable = function(value, message) {
2829
+ new Assertion(value, message, assert.isNotCallable, true).is.not.callable;
2830
+ };
2831
+ assert.isObject = function(val, msg) {
2832
+ new Assertion(val, msg, assert.isObject, true).to.be.a("object");
2833
+ };
2834
+ assert.isNotObject = function(val, msg) {
2835
+ new Assertion(val, msg, assert.isNotObject, true).to.not.be.a("object");
2836
+ };
2837
+ assert.isArray = function(val, msg) {
2838
+ new Assertion(val, msg, assert.isArray, true).to.be.an("array");
2839
+ };
2840
+ assert.isNotArray = function(val, msg) {
2841
+ new Assertion(val, msg, assert.isNotArray, true).to.not.be.an("array");
2842
+ };
2843
+ assert.isString = function(val, msg) {
2844
+ new Assertion(val, msg, assert.isString, true).to.be.a("string");
2845
+ };
2846
+ assert.isNotString = function(val, msg) {
2847
+ new Assertion(val, msg, assert.isNotString, true).to.not.be.a("string");
2848
+ };
2849
+ assert.isNumber = function(val, msg) {
2850
+ new Assertion(val, msg, assert.isNumber, true).to.be.a("number");
2851
+ };
2852
+ assert.isNotNumber = function(val, msg) {
2853
+ new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a("number");
2854
+ };
2855
+ assert.isNumeric = function(val, msg) {
2856
+ new Assertion(val, msg, assert.isNumeric, true).is.numeric;
2857
+ };
2858
+ assert.isNotNumeric = function(val, msg) {
2859
+ new Assertion(val, msg, assert.isNotNumeric, true).is.not.numeric;
2860
+ };
2861
+ assert.isFinite = function(val, msg) {
2862
+ new Assertion(val, msg, assert.isFinite, true).to.be.finite;
2863
+ };
2864
+ assert.isBoolean = function(val, msg) {
2865
+ new Assertion(val, msg, assert.isBoolean, true).to.be.a("boolean");
2866
+ };
2867
+ assert.isNotBoolean = function(val, msg) {
2868
+ new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a("boolean");
2869
+ };
2870
+ assert.typeOf = function(val, type3, msg) {
2871
+ new Assertion(val, msg, assert.typeOf, true).to.be.a(type3);
2872
+ };
2873
+ assert.notTypeOf = function(value, type3, message) {
2874
+ new Assertion(value, message, assert.notTypeOf, true).to.not.be.a(type3);
2875
+ };
2876
+ assert.instanceOf = function(val, type3, msg) {
2877
+ new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type3);
2878
+ };
2879
+ assert.notInstanceOf = function(val, type3, msg) {
2880
+ new Assertion(val, msg, assert.notInstanceOf, true).to.not.be.instanceOf(type3);
2881
+ };
2882
+ assert.include = function(exp, inc, msg) {
2883
+ new Assertion(exp, msg, assert.include, true).include(inc);
2884
+ };
2885
+ assert.notInclude = function(exp, inc, msg) {
2886
+ new Assertion(exp, msg, assert.notInclude, true).not.include(inc);
2887
+ };
2888
+ assert.deepInclude = function(exp, inc, msg) {
2889
+ new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc);
2890
+ };
2891
+ assert.notDeepInclude = function(exp, inc, msg) {
2892
+ new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc);
2893
+ };
2894
+ assert.nestedInclude = function(exp, inc, msg) {
2895
+ new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc);
2896
+ };
2897
+ assert.notNestedInclude = function(exp, inc, msg) {
2898
+ new Assertion(exp, msg, assert.notNestedInclude, true).not.nested.include(inc);
2899
+ };
2900
+ assert.deepNestedInclude = function(exp, inc, msg) {
2901
+ new Assertion(exp, msg, assert.deepNestedInclude, true).deep.nested.include(inc);
2902
+ };
2903
+ assert.notDeepNestedInclude = function(exp, inc, msg) {
2904
+ new Assertion(exp, msg, assert.notDeepNestedInclude, true).not.deep.nested.include(inc);
2905
+ };
2906
+ assert.ownInclude = function(exp, inc, msg) {
2907
+ new Assertion(exp, msg, assert.ownInclude, true).own.include(inc);
2908
+ };
2909
+ assert.notOwnInclude = function(exp, inc, msg) {
2910
+ new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc);
2911
+ };
2912
+ assert.deepOwnInclude = function(exp, inc, msg) {
2913
+ new Assertion(exp, msg, assert.deepOwnInclude, true).deep.own.include(inc);
2914
+ };
2915
+ assert.notDeepOwnInclude = function(exp, inc, msg) {
2916
+ new Assertion(exp, msg, assert.notDeepOwnInclude, true).not.deep.own.include(inc);
2917
+ };
2918
+ assert.match = function(exp, re, msg) {
2919
+ new Assertion(exp, msg, assert.match, true).to.match(re);
2920
+ };
2921
+ assert.notMatch = function(exp, re, msg) {
2922
+ new Assertion(exp, msg, assert.notMatch, true).to.not.match(re);
2923
+ };
2924
+ assert.property = function(obj, prop, msg) {
2925
+ new Assertion(obj, msg, assert.property, true).to.have.property(prop);
2926
+ };
2927
+ assert.notProperty = function(obj, prop, msg) {
2928
+ new Assertion(obj, msg, assert.notProperty, true).to.not.have.property(prop);
2929
+ };
2930
+ assert.propertyVal = function(obj, prop, val, msg) {
2931
+ new Assertion(obj, msg, assert.propertyVal, true).to.have.property(prop, val);
2932
+ };
2933
+ assert.notPropertyVal = function(obj, prop, val, msg) {
2934
+ new Assertion(obj, msg, assert.notPropertyVal, true).to.not.have.property(prop, val);
2935
+ };
2936
+ assert.deepPropertyVal = function(obj, prop, val, msg) {
2937
+ new Assertion(obj, msg, assert.deepPropertyVal, true).to.have.deep.property(prop, val);
2938
+ };
2939
+ assert.notDeepPropertyVal = function(obj, prop, val, msg) {
2940
+ new Assertion(obj, msg, assert.notDeepPropertyVal, true).to.not.have.deep.property(prop, val);
2941
+ };
2942
+ assert.ownProperty = function(obj, prop, msg) {
2943
+ new Assertion(obj, msg, assert.ownProperty, true).to.have.own.property(prop);
2944
+ };
2945
+ assert.notOwnProperty = function(obj, prop, msg) {
2946
+ new Assertion(obj, msg, assert.notOwnProperty, true).to.not.have.own.property(prop);
2947
+ };
2948
+ assert.ownPropertyVal = function(obj, prop, value, msg) {
2949
+ new Assertion(obj, msg, assert.ownPropertyVal, true).to.have.own.property(prop, value);
2950
+ };
2951
+ assert.notOwnPropertyVal = function(obj, prop, value, msg) {
2952
+ new Assertion(obj, msg, assert.notOwnPropertyVal, true).to.not.have.own.property(prop, value);
2953
+ };
2954
+ assert.deepOwnPropertyVal = function(obj, prop, value, msg) {
2955
+ new Assertion(obj, msg, assert.deepOwnPropertyVal, true).to.have.deep.own.property(prop, value);
2956
+ };
2957
+ assert.notDeepOwnPropertyVal = function(obj, prop, value, msg) {
2958
+ new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true).to.not.have.deep.own.property(prop, value);
2959
+ };
2960
+ assert.nestedProperty = function(obj, prop, msg) {
2961
+ new Assertion(obj, msg, assert.nestedProperty, true).to.have.nested.property(prop);
2962
+ };
2963
+ assert.notNestedProperty = function(obj, prop, msg) {
2964
+ new Assertion(obj, msg, assert.notNestedProperty, true).to.not.have.nested.property(prop);
2965
+ };
2966
+ assert.nestedPropertyVal = function(obj, prop, val, msg) {
2967
+ new Assertion(obj, msg, assert.nestedPropertyVal, true).to.have.nested.property(prop, val);
2968
+ };
2969
+ assert.notNestedPropertyVal = function(obj, prop, val, msg) {
2970
+ new Assertion(obj, msg, assert.notNestedPropertyVal, true).to.not.have.nested.property(prop, val);
2971
+ };
2972
+ assert.deepNestedPropertyVal = function(obj, prop, val, msg) {
2973
+ new Assertion(obj, msg, assert.deepNestedPropertyVal, true).to.have.deep.nested.property(prop, val);
2974
+ };
2975
+ assert.notDeepNestedPropertyVal = function(obj, prop, val, msg) {
2976
+ new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true).to.not.have.deep.nested.property(prop, val);
2977
+ };
2978
+ assert.lengthOf = function(exp, len, msg) {
2979
+ new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len);
2980
+ };
2981
+ assert.hasAnyKeys = function(obj, keys, msg) {
2982
+ new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys);
2983
+ };
2984
+ assert.hasAllKeys = function(obj, keys, msg) {
2985
+ new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys);
2986
+ };
2987
+ assert.containsAllKeys = function(obj, keys, msg) {
2988
+ new Assertion(obj, msg, assert.containsAllKeys, true).to.contain.all.keys(keys);
2989
+ };
2990
+ assert.doesNotHaveAnyKeys = function(obj, keys, msg) {
2991
+ new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true).to.not.have.any.keys(keys);
2992
+ };
2993
+ assert.doesNotHaveAllKeys = function(obj, keys, msg) {
2994
+ new Assertion(obj, msg, assert.doesNotHaveAllKeys, true).to.not.have.all.keys(keys);
2995
+ };
2996
+ assert.hasAnyDeepKeys = function(obj, keys, msg) {
2997
+ new Assertion(obj, msg, assert.hasAnyDeepKeys, true).to.have.any.deep.keys(keys);
2998
+ };
2999
+ assert.hasAllDeepKeys = function(obj, keys, msg) {
3000
+ new Assertion(obj, msg, assert.hasAllDeepKeys, true).to.have.all.deep.keys(keys);
3001
+ };
3002
+ assert.containsAllDeepKeys = function(obj, keys, msg) {
3003
+ new Assertion(obj, msg, assert.containsAllDeepKeys, true).to.contain.all.deep.keys(keys);
3004
+ };
3005
+ assert.doesNotHaveAnyDeepKeys = function(obj, keys, msg) {
3006
+ new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true).to.not.have.any.deep.keys(keys);
3007
+ };
3008
+ assert.doesNotHaveAllDeepKeys = function(obj, keys, msg) {
3009
+ new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true).to.not.have.all.deep.keys(keys);
3010
+ };
3011
+ assert.throws = function(fn, errorLike, errMsgMatcher, msg) {
3012
+ if ("string" === typeof errorLike || errorLike instanceof RegExp) {
3013
+ errMsgMatcher = errorLike;
3014
+ errorLike = null;
3015
+ }
3016
+ let assertErr = new Assertion(fn, msg, assert.throws, true).to.throw(errorLike, errMsgMatcher);
3017
+ return flag(assertErr, "object");
3018
+ };
3019
+ assert.doesNotThrow = function(fn, errorLike, errMsgMatcher, message) {
3020
+ if ("string" === typeof errorLike || errorLike instanceof RegExp) {
3021
+ errMsgMatcher = errorLike;
3022
+ errorLike = null;
3023
+ }
3024
+ new Assertion(fn, message, assert.doesNotThrow, true).to.not.throw(errorLike, errMsgMatcher);
3025
+ };
3026
+ assert.operator = function(val, operator, val2, msg) {
3027
+ let ok;
3028
+ switch (operator) {
3029
+ case "==":
3030
+ ok = val == val2;
3031
+ break;
3032
+ case "===":
3033
+ ok = val === val2;
3034
+ break;
3035
+ case ">":
3036
+ ok = val > val2;
3037
+ break;
3038
+ case ">=":
3039
+ ok = val >= val2;
3040
+ break;
3041
+ case "<":
3042
+ ok = val < val2;
3043
+ break;
3044
+ case "<=":
3045
+ ok = val <= val2;
3046
+ break;
3047
+ case "!=":
3048
+ ok = val != val2;
3049
+ break;
3050
+ case "!==":
3051
+ ok = val !== val2;
3052
+ break;
3053
+ default:
3054
+ msg = msg ? msg + ": " : msg;
3055
+ throw new AssertionError(msg + "Invalid operator \"" + operator + "\"", void 0, assert.operator);
3056
+ }
3057
+ let test2 = new Assertion(ok, msg, assert.operator, true);
3058
+ test2.assert(true === flag(test2, "object"), "expected " + inspect2(val) + " to be " + operator + " " + inspect2(val2), "expected " + inspect2(val) + " to not be " + operator + " " + inspect2(val2));
3059
+ };
3060
+ assert.closeTo = function(act, exp, delta, msg) {
3061
+ new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta);
3062
+ };
3063
+ assert.approximately = function(act, exp, delta, msg) {
3064
+ new Assertion(act, msg, assert.approximately, true).to.be.approximately(exp, delta);
3065
+ };
3066
+ assert.sameMembers = function(set1, set2, msg) {
3067
+ new Assertion(set1, msg, assert.sameMembers, true).to.have.same.members(set2);
3068
+ };
3069
+ assert.notSameMembers = function(set1, set2, msg) {
3070
+ new Assertion(set1, msg, assert.notSameMembers, true).to.not.have.same.members(set2);
3071
+ };
3072
+ assert.sameDeepMembers = function(set1, set2, msg) {
3073
+ new Assertion(set1, msg, assert.sameDeepMembers, true).to.have.same.deep.members(set2);
3074
+ };
3075
+ assert.notSameDeepMembers = function(set1, set2, msg) {
3076
+ new Assertion(set1, msg, assert.notSameDeepMembers, true).to.not.have.same.deep.members(set2);
3077
+ };
3078
+ assert.sameOrderedMembers = function(set1, set2, msg) {
3079
+ new Assertion(set1, msg, assert.sameOrderedMembers, true).to.have.same.ordered.members(set2);
3080
+ };
3081
+ assert.notSameOrderedMembers = function(set1, set2, msg) {
3082
+ new Assertion(set1, msg, assert.notSameOrderedMembers, true).to.not.have.same.ordered.members(set2);
3083
+ };
3084
+ assert.sameDeepOrderedMembers = function(set1, set2, msg) {
3085
+ new Assertion(set1, msg, assert.sameDeepOrderedMembers, true).to.have.same.deep.ordered.members(set2);
3086
+ };
3087
+ assert.notSameDeepOrderedMembers = function(set1, set2, msg) {
3088
+ new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true).to.not.have.same.deep.ordered.members(set2);
3089
+ };
3090
+ assert.includeMembers = function(superset, subset, msg) {
3091
+ new Assertion(superset, msg, assert.includeMembers, true).to.include.members(subset);
3092
+ };
3093
+ assert.notIncludeMembers = function(superset, subset, msg) {
3094
+ new Assertion(superset, msg, assert.notIncludeMembers, true).to.not.include.members(subset);
3095
+ };
3096
+ assert.includeDeepMembers = function(superset, subset, msg) {
3097
+ new Assertion(superset, msg, assert.includeDeepMembers, true).to.include.deep.members(subset);
3098
+ };
3099
+ assert.notIncludeDeepMembers = function(superset, subset, msg) {
3100
+ new Assertion(superset, msg, assert.notIncludeDeepMembers, true).to.not.include.deep.members(subset);
3101
+ };
3102
+ assert.includeOrderedMembers = function(superset, subset, msg) {
3103
+ new Assertion(superset, msg, assert.includeOrderedMembers, true).to.include.ordered.members(subset);
3104
+ };
3105
+ assert.notIncludeOrderedMembers = function(superset, subset, msg) {
3106
+ new Assertion(superset, msg, assert.notIncludeOrderedMembers, true).to.not.include.ordered.members(subset);
3107
+ };
3108
+ assert.includeDeepOrderedMembers = function(superset, subset, msg) {
3109
+ new Assertion(superset, msg, assert.includeDeepOrderedMembers, true).to.include.deep.ordered.members(subset);
3110
+ };
3111
+ assert.notIncludeDeepOrderedMembers = function(superset, subset, msg) {
3112
+ new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true).to.not.include.deep.ordered.members(subset);
3113
+ };
3114
+ assert.oneOf = function(inList, list, msg) {
3115
+ new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list);
3116
+ };
3117
+ assert.isIterable = function(obj, msg) {
3118
+ if (obj == void 0 || !obj[Symbol.iterator]) {
3119
+ msg = msg ? `${msg} expected ${inspect2(obj)} to be an iterable` : `expected ${inspect2(obj)} to be an iterable`;
3120
+ throw new AssertionError(msg, void 0, assert.isIterable);
3121
+ }
3122
+ };
3123
+ assert.changes = function(fn, obj, prop, msg) {
3124
+ if (arguments.length === 3 && typeof obj === "function") {
3125
+ msg = prop;
3126
+ prop = null;
3127
+ }
3128
+ new Assertion(fn, msg, assert.changes, true).to.change(obj, prop);
3129
+ };
3130
+ assert.changesBy = function(fn, obj, prop, delta, msg) {
3131
+ if (arguments.length === 4 && typeof obj === "function") {
3132
+ let tmpMsg = delta;
3133
+ delta = prop;
3134
+ msg = tmpMsg;
3135
+ } else if (arguments.length === 3) {
3136
+ delta = prop;
3137
+ prop = null;
3138
+ }
3139
+ new Assertion(fn, msg, assert.changesBy, true).to.change(obj, prop).by(delta);
3140
+ };
3141
+ assert.doesNotChange = function(fn, obj, prop, msg) {
3142
+ if (arguments.length === 3 && typeof obj === "function") {
3143
+ msg = prop;
3144
+ prop = null;
3145
+ }
3146
+ return new Assertion(fn, msg, assert.doesNotChange, true).to.not.change(obj, prop);
3147
+ };
3148
+ assert.changesButNotBy = function(fn, obj, prop, delta, msg) {
3149
+ if (arguments.length === 4 && typeof obj === "function") {
3150
+ let tmpMsg = delta;
3151
+ delta = prop;
3152
+ msg = tmpMsg;
3153
+ } else if (arguments.length === 3) {
3154
+ delta = prop;
3155
+ prop = null;
3156
+ }
3157
+ new Assertion(fn, msg, assert.changesButNotBy, true).to.change(obj, prop).but.not.by(delta);
3158
+ };
3159
+ assert.increases = function(fn, obj, prop, msg) {
3160
+ if (arguments.length === 3 && typeof obj === "function") {
3161
+ msg = prop;
3162
+ prop = null;
3163
+ }
3164
+ return new Assertion(fn, msg, assert.increases, true).to.increase(obj, prop);
3165
+ };
3166
+ assert.increasesBy = function(fn, obj, prop, delta, msg) {
3167
+ if (arguments.length === 4 && typeof obj === "function") {
3168
+ let tmpMsg = delta;
3169
+ delta = prop;
3170
+ msg = tmpMsg;
3171
+ } else if (arguments.length === 3) {
3172
+ delta = prop;
3173
+ prop = null;
3174
+ }
3175
+ new Assertion(fn, msg, assert.increasesBy, true).to.increase(obj, prop).by(delta);
3176
+ };
3177
+ assert.doesNotIncrease = function(fn, obj, prop, msg) {
3178
+ if (arguments.length === 3 && typeof obj === "function") {
3179
+ msg = prop;
3180
+ prop = null;
3181
+ }
3182
+ return new Assertion(fn, msg, assert.doesNotIncrease, true).to.not.increase(obj, prop);
3183
+ };
3184
+ assert.increasesButNotBy = function(fn, obj, prop, delta, msg) {
3185
+ if (arguments.length === 4 && typeof obj === "function") {
3186
+ let tmpMsg = delta;
3187
+ delta = prop;
3188
+ msg = tmpMsg;
3189
+ } else if (arguments.length === 3) {
3190
+ delta = prop;
3191
+ prop = null;
3192
+ }
3193
+ new Assertion(fn, msg, assert.increasesButNotBy, true).to.increase(obj, prop).but.not.by(delta);
3194
+ };
3195
+ assert.decreases = function(fn, obj, prop, msg) {
3196
+ if (arguments.length === 3 && typeof obj === "function") {
3197
+ msg = prop;
3198
+ prop = null;
3199
+ }
3200
+ return new Assertion(fn, msg, assert.decreases, true).to.decrease(obj, prop);
3201
+ };
3202
+ assert.decreasesBy = function(fn, obj, prop, delta, msg) {
3203
+ if (arguments.length === 4 && typeof obj === "function") {
3204
+ let tmpMsg = delta;
3205
+ delta = prop;
3206
+ msg = tmpMsg;
3207
+ } else if (arguments.length === 3) {
3208
+ delta = prop;
3209
+ prop = null;
3210
+ }
3211
+ new Assertion(fn, msg, assert.decreasesBy, true).to.decrease(obj, prop).by(delta);
3212
+ };
3213
+ assert.doesNotDecrease = function(fn, obj, prop, msg) {
3214
+ if (arguments.length === 3 && typeof obj === "function") {
3215
+ msg = prop;
3216
+ prop = null;
3217
+ }
3218
+ return new Assertion(fn, msg, assert.doesNotDecrease, true).to.not.decrease(obj, prop);
3219
+ };
3220
+ assert.doesNotDecreaseBy = function(fn, obj, prop, delta, msg) {
3221
+ if (arguments.length === 4 && typeof obj === "function") {
3222
+ let tmpMsg = delta;
3223
+ delta = prop;
3224
+ msg = tmpMsg;
3225
+ } else if (arguments.length === 3) {
3226
+ delta = prop;
3227
+ prop = null;
3228
+ }
3229
+ return new Assertion(fn, msg, assert.doesNotDecreaseBy, true).to.not.decrease(obj, prop).by(delta);
3230
+ };
3231
+ assert.decreasesButNotBy = function(fn, obj, prop, delta, msg) {
3232
+ if (arguments.length === 4 && typeof obj === "function") {
3233
+ let tmpMsg = delta;
3234
+ delta = prop;
3235
+ msg = tmpMsg;
3236
+ } else if (arguments.length === 3) {
3237
+ delta = prop;
3238
+ prop = null;
3239
+ }
3240
+ new Assertion(fn, msg, assert.decreasesButNotBy, true).to.decrease(obj, prop).but.not.by(delta);
3241
+ };
3242
+ assert.ifError = function(val) {
3243
+ if (val) {
3244
+ throw val;
3245
+ }
3246
+ };
3247
+ assert.isExtensible = function(obj, msg) {
3248
+ new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible;
3249
+ };
3250
+ assert.isNotExtensible = function(obj, msg) {
3251
+ new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible;
3252
+ };
3253
+ assert.isSealed = function(obj, msg) {
3254
+ new Assertion(obj, msg, assert.isSealed, true).to.be.sealed;
3255
+ };
3256
+ assert.isNotSealed = function(obj, msg) {
3257
+ new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed;
3258
+ };
3259
+ assert.isFrozen = function(obj, msg) {
3260
+ new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen;
3261
+ };
3262
+ assert.isNotFrozen = function(obj, msg) {
3263
+ new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen;
3264
+ };
3265
+ assert.isEmpty = function(val, msg) {
3266
+ new Assertion(val, msg, assert.isEmpty, true).to.be.empty;
3267
+ };
3268
+ assert.isNotEmpty = function(val, msg) {
3269
+ new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty;
3270
+ };
3271
+ assert.containsSubset = function(val, exp, msg) {
3272
+ new Assertion(val, msg).to.containSubset(exp);
3273
+ };
3274
+ assert.doesNotContainSubset = function(val, exp, msg) {
3275
+ new Assertion(val, msg).to.not.containSubset(exp);
3276
+ };
3277
+ var aliases = [
3278
+ ["isOk", "ok"],
3279
+ ["isNotOk", "notOk"],
3280
+ ["throws", "throw"],
3281
+ ["throws", "Throw"],
3282
+ ["isExtensible", "extensible"],
3283
+ ["isNotExtensible", "notExtensible"],
3284
+ ["isSealed", "sealed"],
3285
+ ["isNotSealed", "notSealed"],
3286
+ ["isFrozen", "frozen"],
3287
+ ["isNotFrozen", "notFrozen"],
3288
+ ["isEmpty", "empty"],
3289
+ ["isNotEmpty", "notEmpty"],
3290
+ ["isCallable", "isFunction"],
3291
+ ["isNotCallable", "isNotFunction"],
3292
+ ["containsSubset", "containSubset"]
3293
+ ];
3294
+ for (const [name, as] of aliases) {
3295
+ assert[as] = assert[name];
3296
+ }
3297
+ var used = [];
3298
+ function use(fn) {
3299
+ const exports = {
3300
+ use,
3301
+ AssertionError,
3302
+ util: utils_exports,
3303
+ config,
3304
+ expect,
3305
+ assert,
3306
+ Assertion,
3307
+ ...should_exports
3308
+ };
3309
+ if (!~used.indexOf(fn)) {
3310
+ fn(exports, utils_exports);
3311
+ used.push(fn);
3312
+ }
3313
+ return exports;
3314
+ }
3315
+ __name(use, "use");
3316
+ /*!
3317
+ * Chai - flag utility
3318
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3319
+ * MIT Licensed
3320
+ */
3321
+ /*!
3322
+ * Chai - test utility
3323
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3324
+ * MIT Licensed
3325
+ */
3326
+ /*!
3327
+ * Chai - expectTypes utility
3328
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3329
+ * MIT Licensed
3330
+ */
3331
+ /*!
3332
+ * Chai - getActual utility
3333
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3334
+ * MIT Licensed
3335
+ */
3336
+ /*!
3337
+ * Chai - message composition utility
3338
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3339
+ * MIT Licensed
3340
+ */
3341
+ /*!
3342
+ * Chai - transferFlags utility
3343
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3344
+ * MIT Licensed
3345
+ */
3346
+ /*!
3347
+ * chai
3348
+ * http://chaijs.com
3349
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
3350
+ * MIT Licensed
3351
+ */
3352
+ /*!
3353
+ * Chai - isProxyEnabled helper
3354
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3355
+ * MIT Licensed
3356
+ */
3357
+ /*!
3358
+ * Chai - addProperty utility
3359
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3360
+ * MIT Licensed
3361
+ */
3362
+ /*!
3363
+ * Chai - addLengthGuard utility
3364
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3365
+ * MIT Licensed
3366
+ */
3367
+ /*!
3368
+ * Chai - getProperties utility
3369
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3370
+ * MIT Licensed
3371
+ */
3372
+ /*!
3373
+ * Chai - proxify utility
3374
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3375
+ * MIT Licensed
3376
+ */
3377
+ /*!
3378
+ * Chai - addMethod utility
3379
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3380
+ * MIT Licensed
3381
+ */
3382
+ /*!
3383
+ * Chai - overwriteProperty utility
3384
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3385
+ * MIT Licensed
3386
+ */
3387
+ /*!
3388
+ * Chai - overwriteMethod utility
3389
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3390
+ * MIT Licensed
3391
+ */
3392
+ /*!
3393
+ * Chai - addChainingMethod utility
3394
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3395
+ * MIT Licensed
3396
+ */
3397
+ /*!
3398
+ * Chai - overwriteChainableMethod utility
3399
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
3400
+ * MIT Licensed
3401
+ */
3402
+ /*!
3403
+ * Chai - compareByInspect utility
3404
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
3405
+ * MIT Licensed
3406
+ */
3407
+ /*!
3408
+ * Chai - getOwnEnumerablePropertySymbols utility
3409
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
3410
+ * MIT Licensed
3411
+ */
3412
+ /*!
3413
+ * Chai - getOwnEnumerableProperties utility
3414
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
3415
+ * MIT Licensed
3416
+ */
3417
+ /*!
3418
+ * Chai - isNaN utility
3419
+ * Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
3420
+ * MIT Licensed
3421
+ */
3422
+ /*!
3423
+ * chai
3424
+ * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
3425
+ * MIT Licensed
3426
+ */
3427
+ /*!
3428
+ * chai
3429
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
3430
+ * MIT Licensed
3431
+ */
3432
+ /*! Bundled license information:
3433
+
3434
+ deep-eql/index.js:
3435
+ (*!
3436
+ * deep-eql
3437
+ * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
3438
+ * MIT Licensed
3439
+ *)
3440
+ (*!
3441
+ * Check to see if the MemoizeMap has recorded a result of the two operands
3442
+ *
3443
+ * @param {Mixed} leftHandOperand
3444
+ * @param {Mixed} rightHandOperand
3445
+ * @param {MemoizeMap} memoizeMap
3446
+ * @returns {Boolean|null} result
3447
+ *)
3448
+ (*!
3449
+ * Set the result of the equality into the MemoizeMap
3450
+ *
3451
+ * @param {Mixed} leftHandOperand
3452
+ * @param {Mixed} rightHandOperand
3453
+ * @param {MemoizeMap} memoizeMap
3454
+ * @param {Boolean} result
3455
+ *)
3456
+ (*!
3457
+ * Primary Export
3458
+ *)
3459
+ (*!
3460
+ * The main logic of the `deepEqual` function.
3461
+ *
3462
+ * @param {Mixed} leftHandOperand
3463
+ * @param {Mixed} rightHandOperand
3464
+ * @param {Object} [options] (optional) Additional options
3465
+ * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
3466
+ * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
3467
+ complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
3468
+ references to blow the stack.
3469
+ * @return {Boolean} equal match
3470
+ *)
3471
+ (*!
3472
+ * Compare two Regular Expressions for equality.
3473
+ *
3474
+ * @param {RegExp} leftHandOperand
3475
+ * @param {RegExp} rightHandOperand
3476
+ * @return {Boolean} result
3477
+ *)
3478
+ (*!
3479
+ * Compare two Sets/Maps for equality. Faster than other equality functions.
3480
+ *
3481
+ * @param {Set} leftHandOperand
3482
+ * @param {Set} rightHandOperand
3483
+ * @param {Object} [options] (Optional)
3484
+ * @return {Boolean} result
3485
+ *)
3486
+ (*!
3487
+ * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
3488
+ *
3489
+ * @param {Iterable} leftHandOperand
3490
+ * @param {Iterable} rightHandOperand
3491
+ * @param {Object} [options] (Optional)
3492
+ * @return {Boolean} result
3493
+ *)
3494
+ (*!
3495
+ * Simple equality for generator objects such as those returned by generator functions.
3496
+ *
3497
+ * @param {Iterable} leftHandOperand
3498
+ * @param {Iterable} rightHandOperand
3499
+ * @param {Object} [options] (Optional)
3500
+ * @return {Boolean} result
3501
+ *)
3502
+ (*!
3503
+ * Determine if the given object has an @@iterator function.
3504
+ *
3505
+ * @param {Object} target
3506
+ * @return {Boolean} `true` if the object has an @@iterator function.
3507
+ *)
3508
+ (*!
3509
+ * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
3510
+ * This will consume the iterator - which could have side effects depending on the @@iterator implementation.
3511
+ *
3512
+ * @param {Object} target
3513
+ * @returns {Array} an array of entries from the @@iterator function
3514
+ *)
3515
+ (*!
3516
+ * Gets all entries from a Generator. This will consume the generator - which could have side effects.
3517
+ *
3518
+ * @param {Generator} target
3519
+ * @returns {Array} an array of entries from the Generator.
3520
+ *)
3521
+ (*!
3522
+ * Gets all own and inherited enumerable keys from a target.
3523
+ *
3524
+ * @param {Object} target
3525
+ * @returns {Array} an array of own and inherited enumerable keys from the target.
3526
+ *)
3527
+ (*!
3528
+ * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
3529
+ * each key. If any value of the given key is not equal, the function will return false (early).
3530
+ *
3531
+ * @param {Mixed} leftHandOperand
3532
+ * @param {Mixed} rightHandOperand
3533
+ * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
3534
+ * @param {Object} [options] (Optional)
3535
+ * @return {Boolean} result
3536
+ *)
3537
+ (*!
3538
+ * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
3539
+ * for each enumerable key in the object.
3540
+ *
3541
+ * @param {Mixed} leftHandOperand
3542
+ * @param {Mixed} rightHandOperand
3543
+ * @param {Object} [options] (Optional)
3544
+ * @return {Boolean} result
3545
+ *)
3546
+ (*!
3547
+ * Returns true if the argument is a primitive.
3548
+ *
3549
+ * This intentionally returns true for all objects that can be compared by reference,
3550
+ * including functions and symbols.
3551
+ *
3552
+ * @param {Mixed} value
3553
+ * @return {Boolean} result
3554
+ *)
3555
+ */
3556
+
3557
+ //#endregion
3558
+ export { Assertion, assert, chai_exports, expect, should, use, utils_exports };