@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,2082 @@
1
+ import { format, plugins } from "../../../../../@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js";
2
+ import { resolve } from "../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";
3
+ import "../../../../../pathe@2.0.3/node_modules/pathe/dist/index.js";
4
+
5
+ //#region ../node_modules/.pnpm/@vitest+snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js
6
+ const comma = ",".charCodeAt(0);
7
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
8
+ const intToChar = new Uint8Array(64);
9
+ const charToInt = new Uint8Array(128);
10
+ for (let i = 0; i < chars.length; i++) {
11
+ const c = chars.charCodeAt(i);
12
+ intToChar[i] = c;
13
+ charToInt[c] = i;
14
+ }
15
+ function decodeInteger(reader, relative) {
16
+ let value = 0;
17
+ let shift = 0;
18
+ let integer = 0;
19
+ do {
20
+ const c = reader.next();
21
+ integer = charToInt[c];
22
+ value |= (integer & 31) << shift;
23
+ shift += 5;
24
+ } while (integer & 32);
25
+ const shouldNegate = value & 1;
26
+ value >>>= 1;
27
+ if (shouldNegate) {
28
+ value = -2147483648 | -value;
29
+ }
30
+ return relative + value;
31
+ }
32
+ function hasMoreVlq(reader, max) {
33
+ if (reader.pos >= max) return false;
34
+ return reader.peek() !== comma;
35
+ }
36
+ var StringReader = class {
37
+ constructor(buffer) {
38
+ this.pos = 0;
39
+ this.buffer = buffer;
40
+ }
41
+ next() {
42
+ return this.buffer.charCodeAt(this.pos++);
43
+ }
44
+ peek() {
45
+ return this.buffer.charCodeAt(this.pos);
46
+ }
47
+ indexOf(char) {
48
+ const { buffer, pos } = this;
49
+ const idx = buffer.indexOf(char, pos);
50
+ return idx === -1 ? buffer.length : idx;
51
+ }
52
+ };
53
+ function decode(mappings) {
54
+ const { length } = mappings;
55
+ const reader = new StringReader(mappings);
56
+ const decoded = [];
57
+ let genColumn = 0;
58
+ let sourcesIndex = 0;
59
+ let sourceLine = 0;
60
+ let sourceColumn = 0;
61
+ let namesIndex = 0;
62
+ do {
63
+ const semi = reader.indexOf(";");
64
+ const line = [];
65
+ let sorted = true;
66
+ let lastCol = 0;
67
+ genColumn = 0;
68
+ while (reader.pos < semi) {
69
+ let seg;
70
+ genColumn = decodeInteger(reader, genColumn);
71
+ if (genColumn < lastCol) sorted = false;
72
+ lastCol = genColumn;
73
+ if (hasMoreVlq(reader, semi)) {
74
+ sourcesIndex = decodeInteger(reader, sourcesIndex);
75
+ sourceLine = decodeInteger(reader, sourceLine);
76
+ sourceColumn = decodeInteger(reader, sourceColumn);
77
+ if (hasMoreVlq(reader, semi)) {
78
+ namesIndex = decodeInteger(reader, namesIndex);
79
+ seg = [
80
+ genColumn,
81
+ sourcesIndex,
82
+ sourceLine,
83
+ sourceColumn,
84
+ namesIndex
85
+ ];
86
+ } else {
87
+ seg = [
88
+ genColumn,
89
+ sourcesIndex,
90
+ sourceLine,
91
+ sourceColumn
92
+ ];
93
+ }
94
+ } else {
95
+ seg = [genColumn];
96
+ }
97
+ line.push(seg);
98
+ reader.pos++;
99
+ }
100
+ if (!sorted) sort(line);
101
+ decoded.push(line);
102
+ reader.pos = semi + 1;
103
+ } while (reader.pos <= length);
104
+ return decoded;
105
+ }
106
+ function sort(line) {
107
+ line.sort(sortComparator$1);
108
+ }
109
+ function sortComparator$1(a$1, b) {
110
+ return a$1[0] - b[0];
111
+ }
112
+ const schemeRegex = /^[\w+.-]+:\/\//;
113
+ /**
114
+ * Matches the parts of a URL:
115
+ * 1. Scheme, including ":", guaranteed.
116
+ * 2. User/password, including "@", optional.
117
+ * 3. Host, guaranteed.
118
+ * 4. Port, including ":", optional.
119
+ * 5. Path, including "/", optional.
120
+ * 6. Query, including "?", optional.
121
+ * 7. Hash, including "#", optional.
122
+ */
123
+ const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
124
+ /**
125
+ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
126
+ * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
127
+ *
128
+ * 1. Host, optional.
129
+ * 2. Path, which may include "/", guaranteed.
130
+ * 3. Query, including "?", optional.
131
+ * 4. Hash, including "#", optional.
132
+ */
133
+ const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
134
+ var UrlType;
135
+ (function(UrlType$1) {
136
+ UrlType$1[UrlType$1["Empty"] = 1] = "Empty";
137
+ UrlType$1[UrlType$1["Hash"] = 2] = "Hash";
138
+ UrlType$1[UrlType$1["Query"] = 3] = "Query";
139
+ UrlType$1[UrlType$1["RelativePath"] = 4] = "RelativePath";
140
+ UrlType$1[UrlType$1["AbsolutePath"] = 5] = "AbsolutePath";
141
+ UrlType$1[UrlType$1["SchemeRelative"] = 6] = "SchemeRelative";
142
+ UrlType$1[UrlType$1["Absolute"] = 7] = "Absolute";
143
+ })(UrlType || (UrlType = {}));
144
+ function isAbsoluteUrl(input) {
145
+ return schemeRegex.test(input);
146
+ }
147
+ function isSchemeRelativeUrl(input) {
148
+ return input.startsWith("//");
149
+ }
150
+ function isAbsolutePath(input) {
151
+ return input.startsWith("/");
152
+ }
153
+ function isFileUrl(input) {
154
+ return input.startsWith("file:");
155
+ }
156
+ function isRelative(input) {
157
+ return /^[.?#]/.test(input);
158
+ }
159
+ function parseAbsoluteUrl(input) {
160
+ const match = urlRegex.exec(input);
161
+ return makeUrl(match[1], match[2] || "", match[3], match[4] || "", match[5] || "/", match[6] || "", match[7] || "");
162
+ }
163
+ function parseFileUrl(input) {
164
+ const match = fileRegex.exec(input);
165
+ const path = match[2];
166
+ return makeUrl("file:", "", match[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match[3] || "", match[4] || "");
167
+ }
168
+ function makeUrl(scheme, user, host, port, path, query, hash) {
169
+ return {
170
+ scheme,
171
+ user,
172
+ host,
173
+ port,
174
+ path,
175
+ query,
176
+ hash,
177
+ type: UrlType.Absolute
178
+ };
179
+ }
180
+ function parseUrl(input) {
181
+ if (isSchemeRelativeUrl(input)) {
182
+ const url$1 = parseAbsoluteUrl("http:" + input);
183
+ url$1.scheme = "";
184
+ url$1.type = UrlType.SchemeRelative;
185
+ return url$1;
186
+ }
187
+ if (isAbsolutePath(input)) {
188
+ const url$1 = parseAbsoluteUrl("http://foo.com" + input);
189
+ url$1.scheme = "";
190
+ url$1.host = "";
191
+ url$1.type = UrlType.AbsolutePath;
192
+ return url$1;
193
+ }
194
+ if (isFileUrl(input)) return parseFileUrl(input);
195
+ if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
196
+ const url = parseAbsoluteUrl("http://foo.com/" + input);
197
+ url.scheme = "";
198
+ url.host = "";
199
+ url.type = input ? input.startsWith("?") ? UrlType.Query : input.startsWith("#") ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty;
200
+ return url;
201
+ }
202
+ function stripPathFilename(path) {
203
+ if (path.endsWith("/..")) return path;
204
+ const index = path.lastIndexOf("/");
205
+ return path.slice(0, index + 1);
206
+ }
207
+ function mergePaths(url, base) {
208
+ normalizePath(base, base.type);
209
+ if (url.path === "/") {
210
+ url.path = base.path;
211
+ } else {
212
+ url.path = stripPathFilename(base.path) + url.path;
213
+ }
214
+ }
215
+ /**
216
+ * The path can have empty directories "//", unneeded parents "foo/..", or current directory
217
+ * "foo/.". We need to normalize to a standard representation.
218
+ */
219
+ function normalizePath(url, type) {
220
+ const rel = type <= UrlType.RelativePath;
221
+ const pieces = url.path.split("/");
222
+ let pointer = 1;
223
+ let positive = 0;
224
+ let addTrailingSlash = false;
225
+ for (let i = 1; i < pieces.length; i++) {
226
+ const piece = pieces[i];
227
+ if (!piece) {
228
+ addTrailingSlash = true;
229
+ continue;
230
+ }
231
+ addTrailingSlash = false;
232
+ if (piece === ".") continue;
233
+ if (piece === "..") {
234
+ if (positive) {
235
+ addTrailingSlash = true;
236
+ positive--;
237
+ pointer--;
238
+ } else if (rel) {
239
+ pieces[pointer++] = piece;
240
+ }
241
+ continue;
242
+ }
243
+ pieces[pointer++] = piece;
244
+ positive++;
245
+ }
246
+ let path = "";
247
+ for (let i = 1; i < pointer; i++) {
248
+ path += "/" + pieces[i];
249
+ }
250
+ if (!path || addTrailingSlash && !path.endsWith("/..")) {
251
+ path += "/";
252
+ }
253
+ url.path = path;
254
+ }
255
+ /**
256
+ * Attempts to resolve `input` URL/path relative to `base`.
257
+ */
258
+ function resolve$1(input, base) {
259
+ if (!input && !base) return "";
260
+ const url = parseUrl(input);
261
+ let inputType = url.type;
262
+ if (base && inputType !== UrlType.Absolute) {
263
+ const baseUrl = parseUrl(base);
264
+ const baseType = baseUrl.type;
265
+ switch (inputType) {
266
+ case UrlType.Empty: url.hash = baseUrl.hash;
267
+ case UrlType.Hash: url.query = baseUrl.query;
268
+ case UrlType.Query:
269
+ case UrlType.RelativePath: mergePaths(url, baseUrl);
270
+ case UrlType.AbsolutePath:
271
+ url.user = baseUrl.user;
272
+ url.host = baseUrl.host;
273
+ url.port = baseUrl.port;
274
+ case UrlType.SchemeRelative: url.scheme = baseUrl.scheme;
275
+ }
276
+ if (baseType > inputType) inputType = baseType;
277
+ }
278
+ normalizePath(url, inputType);
279
+ const queryHash = url.query + url.hash;
280
+ switch (inputType) {
281
+ case UrlType.Hash:
282
+ case UrlType.Query: return queryHash;
283
+ case UrlType.RelativePath: {
284
+ const path = url.path.slice(1);
285
+ if (!path) return queryHash || ".";
286
+ if (isRelative(base || input) && !isRelative(path)) {
287
+ return "./" + path + queryHash;
288
+ }
289
+ return path + queryHash;
290
+ }
291
+ case UrlType.AbsolutePath: return url.path + queryHash;
292
+ default: return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
293
+ }
294
+ }
295
+ function resolve$2(input, base) {
296
+ if (base && !base.endsWith("/")) base += "/";
297
+ return resolve$1(input, base);
298
+ }
299
+ /**
300
+ * Removes everything after the last "/", but leaves the slash.
301
+ */
302
+ function stripFilename(path) {
303
+ if (!path) return "";
304
+ const index = path.lastIndexOf("/");
305
+ return path.slice(0, index + 1);
306
+ }
307
+ const COLUMN = 0;
308
+ const SOURCES_INDEX = 1;
309
+ const SOURCE_LINE = 2;
310
+ const SOURCE_COLUMN = 3;
311
+ const NAMES_INDEX = 4;
312
+ function maybeSort(mappings, owned) {
313
+ const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
314
+ if (unsortedIndex === mappings.length) return mappings;
315
+ if (!owned) mappings = mappings.slice();
316
+ for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
317
+ mappings[i] = sortSegments(mappings[i], owned);
318
+ }
319
+ return mappings;
320
+ }
321
+ function nextUnsortedSegmentLine(mappings, start) {
322
+ for (let i = start; i < mappings.length; i++) {
323
+ if (!isSorted(mappings[i])) return i;
324
+ }
325
+ return mappings.length;
326
+ }
327
+ function isSorted(line) {
328
+ for (let j = 1; j < line.length; j++) {
329
+ if (line[j][COLUMN] < line[j - 1][COLUMN]) {
330
+ return false;
331
+ }
332
+ }
333
+ return true;
334
+ }
335
+ function sortSegments(line, owned) {
336
+ if (!owned) line = line.slice();
337
+ return line.sort(sortComparator);
338
+ }
339
+ function sortComparator(a$1, b) {
340
+ return a$1[COLUMN] - b[COLUMN];
341
+ }
342
+ let found = false;
343
+ /**
344
+ * A binary search implementation that returns the index if a match is found.
345
+ * If no match is found, then the left-index (the index associated with the item that comes just
346
+ * before the desired index) is returned. To maintain proper sort order, a splice would happen at
347
+ * the next index:
348
+ *
349
+ * ```js
350
+ * const array = [1, 3];
351
+ * const needle = 2;
352
+ * const index = binarySearch(array, needle, (item, needle) => item - needle);
353
+ *
354
+ * assert.equal(index, 0);
355
+ * array.splice(index + 1, 0, needle);
356
+ * assert.deepEqual(array, [1, 2, 3]);
357
+ * ```
358
+ */
359
+ function binarySearch(haystack, needle, low, high) {
360
+ while (low <= high) {
361
+ const mid = low + (high - low >> 1);
362
+ const cmp = haystack[mid][COLUMN] - needle;
363
+ if (cmp === 0) {
364
+ found = true;
365
+ return mid;
366
+ }
367
+ if (cmp < 0) {
368
+ low = mid + 1;
369
+ } else {
370
+ high = mid - 1;
371
+ }
372
+ }
373
+ found = false;
374
+ return low - 1;
375
+ }
376
+ function upperBound(haystack, needle, index) {
377
+ for (let i = index + 1; i < haystack.length; index = i++) {
378
+ if (haystack[i][COLUMN] !== needle) break;
379
+ }
380
+ return index;
381
+ }
382
+ function lowerBound(haystack, needle, index) {
383
+ for (let i = index - 1; i >= 0; index = i--) {
384
+ if (haystack[i][COLUMN] !== needle) break;
385
+ }
386
+ return index;
387
+ }
388
+ function memoizedState() {
389
+ return {
390
+ lastKey: -1,
391
+ lastNeedle: -1,
392
+ lastIndex: -1
393
+ };
394
+ }
395
+ /**
396
+ * This overly complicated beast is just to record the last tested line/column and the resulting
397
+ * index, allowing us to skip a few tests if mappings are monotonically increasing.
398
+ */
399
+ function memoizedBinarySearch(haystack, needle, state, key) {
400
+ const { lastKey, lastNeedle, lastIndex } = state;
401
+ let low = 0;
402
+ let high = haystack.length - 1;
403
+ if (key === lastKey) {
404
+ if (needle === lastNeedle) {
405
+ found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
406
+ return lastIndex;
407
+ }
408
+ if (needle >= lastNeedle) {
409
+ low = lastIndex === -1 ? 0 : lastIndex;
410
+ } else {
411
+ high = lastIndex;
412
+ }
413
+ }
414
+ state.lastKey = key;
415
+ state.lastNeedle = needle;
416
+ return state.lastIndex = binarySearch(haystack, needle, low, high);
417
+ }
418
+ const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
419
+ const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
420
+ const LEAST_UPPER_BOUND = -1;
421
+ const GREATEST_LOWER_BOUND = 1;
422
+ var TraceMap = class {
423
+ constructor(map, mapUrl) {
424
+ const isString = typeof map === "string";
425
+ if (!isString && map._decodedMemo) return map;
426
+ const parsed = isString ? JSON.parse(map) : map;
427
+ const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
428
+ this.version = version;
429
+ this.file = file;
430
+ this.names = names || [];
431
+ this.sourceRoot = sourceRoot;
432
+ this.sources = sources;
433
+ this.sourcesContent = sourcesContent;
434
+ this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;
435
+ const from = resolve$2(sourceRoot || "", stripFilename(mapUrl));
436
+ this.resolvedSources = sources.map((s) => resolve$2(s || "", from));
437
+ const { mappings } = parsed;
438
+ if (typeof mappings === "string") {
439
+ this._encoded = mappings;
440
+ this._decoded = undefined;
441
+ } else {
442
+ this._encoded = undefined;
443
+ this._decoded = maybeSort(mappings, isString);
444
+ }
445
+ this._decodedMemo = memoizedState();
446
+ this._bySources = undefined;
447
+ this._bySourceMemos = undefined;
448
+ }
449
+ };
450
+ /**
451
+ * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
452
+ * with public access modifiers.
453
+ */
454
+ function cast(map) {
455
+ return map;
456
+ }
457
+ /**
458
+ * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
459
+ */
460
+ function decodedMappings(map) {
461
+ var _a;
462
+ return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
463
+ }
464
+ /**
465
+ * A higher-level API to find the source/line/column associated with a generated line/column
466
+ * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
467
+ * `source-map` library.
468
+ */
469
+ function originalPositionFor(map, needle) {
470
+ let { line, column, bias } = needle;
471
+ line--;
472
+ if (line < 0) throw new Error(LINE_GTR_ZERO);
473
+ if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
474
+ const decoded = decodedMappings(map);
475
+ if (line >= decoded.length) return OMapping(null, null, null, null);
476
+ const segments = decoded[line];
477
+ const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
478
+ if (index === -1) return OMapping(null, null, null, null);
479
+ const segment = segments[index];
480
+ if (segment.length === 1) return OMapping(null, null, null, null);
481
+ const { names, resolvedSources } = map;
482
+ return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
483
+ }
484
+ function OMapping(source, line, column, name) {
485
+ return {
486
+ source,
487
+ line,
488
+ column,
489
+ name
490
+ };
491
+ }
492
+ function traceSegmentInternal(segments, memo, line, column, bias) {
493
+ let index = memoizedBinarySearch(segments, column, memo, line);
494
+ if (found) {
495
+ index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
496
+ } else if (bias === LEAST_UPPER_BOUND) index++;
497
+ if (index === -1 || index === segments.length) return -1;
498
+ return index;
499
+ }
500
+ /**
501
+ * Get original stacktrace without source map support the most performant way.
502
+ * - Create only 1 stack frame.
503
+ * - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
504
+ */
505
+ function notNullish(v) {
506
+ return v != null;
507
+ }
508
+ function isPrimitive(value) {
509
+ return value === null || typeof value !== "function" && typeof value !== "object";
510
+ }
511
+ function isObject(item) {
512
+ return item != null && typeof item === "object" && !Array.isArray(item);
513
+ }
514
+ /**
515
+ * If code starts with a function call, will return its last index, respecting arguments.
516
+ * This will return 25 - last ending character of toMatch ")"
517
+ * Also works with callbacks
518
+ * ```
519
+ * toMatch({ test: '123' });
520
+ * toBeAliased('123')
521
+ * ```
522
+ */
523
+ function getCallLastIndex(code) {
524
+ let charIndex = -1;
525
+ let inString = null;
526
+ let startedBracers = 0;
527
+ let endedBracers = 0;
528
+ let beforeChar = null;
529
+ while (charIndex <= code.length) {
530
+ beforeChar = code[charIndex];
531
+ charIndex++;
532
+ const char = code[charIndex];
533
+ const isCharString = char === "\"" || char === "'" || char === "`";
534
+ if (isCharString && beforeChar !== "\\") {
535
+ if (inString === char) {
536
+ inString = null;
537
+ } else if (!inString) {
538
+ inString = char;
539
+ }
540
+ }
541
+ if (!inString) {
542
+ if (char === "(") {
543
+ startedBracers++;
544
+ }
545
+ if (char === ")") {
546
+ endedBracers++;
547
+ }
548
+ }
549
+ if (startedBracers && endedBracers && startedBracers === endedBracers) {
550
+ return charIndex;
551
+ }
552
+ }
553
+ return null;
554
+ }
555
+ const CHROME_IE_STACK_REGEXP = /^\s*at .*(?:\S:\d+|\(native\))/m;
556
+ const SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\[native code\])?$/;
557
+ const stackIgnorePatterns = [
558
+ "node:internal",
559
+ /\/packages\/\w+\/dist\//,
560
+ /\/@vitest\/\w+\/dist\//,
561
+ "/vitest/dist/",
562
+ "/vitest/src/",
563
+ "/vite-node/dist/",
564
+ "/vite-node/src/",
565
+ "/node_modules/chai/",
566
+ "/node_modules/tinypool/",
567
+ "/node_modules/tinyspy/",
568
+ "/deps/chunk-",
569
+ "/deps/@vitest",
570
+ "/deps/loupe",
571
+ "/deps/chai",
572
+ /node:\w+/,
573
+ /__vitest_test__/,
574
+ /__vitest_browser__/,
575
+ /\/deps\/vitest_/
576
+ ];
577
+ function extractLocation(urlLike) {
578
+ if (!urlLike.includes(":")) {
579
+ return [urlLike];
580
+ }
581
+ const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
582
+ const parts = regExp.exec(urlLike.replace(/^\(|\)$/g, ""));
583
+ if (!parts) {
584
+ return [urlLike];
585
+ }
586
+ let url = parts[1];
587
+ if (url.startsWith("async ")) {
588
+ url = url.slice(6);
589
+ }
590
+ if (url.startsWith("http:") || url.startsWith("https:")) {
591
+ const urlObj = new URL(url);
592
+ urlObj.searchParams.delete("import");
593
+ urlObj.searchParams.delete("browserv");
594
+ url = urlObj.pathname + urlObj.hash + urlObj.search;
595
+ }
596
+ if (url.startsWith("/@fs/")) {
597
+ const isWindows = /^\/@fs\/[a-zA-Z]:\//.test(url);
598
+ url = url.slice(isWindows ? 5 : 4);
599
+ }
600
+ return [
601
+ url,
602
+ parts[2] || undefined,
603
+ parts[3] || undefined
604
+ ];
605
+ }
606
+ function parseSingleFFOrSafariStack(raw) {
607
+ let line = raw.trim();
608
+ if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {
609
+ return null;
610
+ }
611
+ if (line.includes(" > eval")) {
612
+ line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1");
613
+ }
614
+ if (!line.includes("@") && !line.includes(":")) {
615
+ return null;
616
+ }
617
+ const functionNameRegex = /((.*".+"[^@]*)?[^@]*)(@)/;
618
+ const matches = line.match(functionNameRegex);
619
+ const functionName = matches && matches[1] ? matches[1] : undefined;
620
+ const [url, lineNumber, columnNumber] = extractLocation(line.replace(functionNameRegex, ""));
621
+ if (!url || !lineNumber || !columnNumber) {
622
+ return null;
623
+ }
624
+ return {
625
+ file: url,
626
+ method: functionName || "",
627
+ line: Number.parseInt(lineNumber),
628
+ column: Number.parseInt(columnNumber)
629
+ };
630
+ }
631
+ function parseSingleV8Stack(raw) {
632
+ let line = raw.trim();
633
+ if (!CHROME_IE_STACK_REGEXP.test(line)) {
634
+ return null;
635
+ }
636
+ if (line.includes("(eval ")) {
637
+ line = line.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, "");
638
+ }
639
+ let sanitizedLine = line.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, "");
640
+ const location = sanitizedLine.match(/ (\(.+\)$)/);
641
+ sanitizedLine = location ? sanitizedLine.replace(location[0], "") : sanitizedLine;
642
+ const [url, lineNumber, columnNumber] = extractLocation(location ? location[1] : sanitizedLine);
643
+ let method = location && sanitizedLine || "";
644
+ let file = url && ["eval", "<anonymous>"].includes(url) ? undefined : url;
645
+ if (!file || !lineNumber || !columnNumber) {
646
+ return null;
647
+ }
648
+ if (method.startsWith("async ")) {
649
+ method = method.slice(6);
650
+ }
651
+ if (file.startsWith("file://")) {
652
+ file = file.slice(7);
653
+ }
654
+ file = file.startsWith("node:") || file.startsWith("internal:") ? file : resolve(file);
655
+ if (method) {
656
+ method = method.replace(/__vite_ssr_import_\d+__\./g, "");
657
+ }
658
+ return {
659
+ method,
660
+ file,
661
+ line: Number.parseInt(lineNumber),
662
+ column: Number.parseInt(columnNumber)
663
+ };
664
+ }
665
+ function parseStacktrace(stack, options = {}) {
666
+ const { ignoreStackEntries = stackIgnorePatterns } = options;
667
+ const stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
668
+ return stacks.map((stack$1) => {
669
+ var _options$getSourceMap;
670
+ if (options.getUrlId) {
671
+ stack$1.file = options.getUrlId(stack$1.file);
672
+ }
673
+ const map = (_options$getSourceMap = options.getSourceMap) === null || _options$getSourceMap === void 0 ? void 0 : _options$getSourceMap.call(options, stack$1.file);
674
+ if (!map || typeof map !== "object" || !map.version) {
675
+ return shouldFilter(ignoreStackEntries, stack$1.file) ? null : stack$1;
676
+ }
677
+ const traceMap = new TraceMap(map);
678
+ const { line, column, source, name } = originalPositionFor(traceMap, stack$1);
679
+ let file = stack$1.file;
680
+ if (source) {
681
+ const fileUrl = stack$1.file.startsWith("file://") ? stack$1.file : `file://${stack$1.file}`;
682
+ const sourceRootUrl = map.sourceRoot ? new URL(map.sourceRoot, fileUrl) : fileUrl;
683
+ file = new URL(source, sourceRootUrl).pathname;
684
+ if (file.match(/\/\w:\//)) {
685
+ file = file.slice(1);
686
+ }
687
+ }
688
+ if (shouldFilter(ignoreStackEntries, file)) {
689
+ return null;
690
+ }
691
+ if (line != null && column != null) {
692
+ return {
693
+ line,
694
+ column,
695
+ file,
696
+ method: name || stack$1.method
697
+ };
698
+ }
699
+ return stack$1;
700
+ }).filter((s) => s != null);
701
+ }
702
+ function shouldFilter(ignoreStackEntries, file) {
703
+ return ignoreStackEntries.some((p$1) => file.match(p$1));
704
+ }
705
+ function parseFFOrSafariStackTrace(stack) {
706
+ return stack.split("\n").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);
707
+ }
708
+ function parseV8Stacktrace(stack) {
709
+ return stack.split("\n").map((line) => parseSingleV8Stack(line)).filter(notNullish);
710
+ }
711
+ function parseErrorStacktrace(e, options = {}) {
712
+ if (!e || isPrimitive(e)) {
713
+ return [];
714
+ }
715
+ if (e.stacks) {
716
+ return e.stacks;
717
+ }
718
+ const stackStr = e.stack || "";
719
+ let stackFrames = typeof stackStr === "string" ? parseStacktrace(stackStr, options) : [];
720
+ if (!stackFrames.length) {
721
+ const e_ = e;
722
+ if (e_.fileName != null && e_.lineNumber != null && e_.columnNumber != null) {
723
+ stackFrames = parseStacktrace(`${e_.fileName}:${e_.lineNumber}:${e_.columnNumber}`, options);
724
+ }
725
+ if (e_.sourceURL != null && e_.line != null && e_._column != null) {
726
+ stackFrames = parseStacktrace(`${e_.sourceURL}:${e_.line}:${e_.column}`, options);
727
+ }
728
+ }
729
+ if (options.frameFilter) {
730
+ stackFrames = stackFrames.filter((f$1) => options.frameFilter(e, f$1) !== false);
731
+ }
732
+ e.stacks = stackFrames;
733
+ return stackFrames;
734
+ }
735
+ let getPromiseValue = () => "Promise{…}";
736
+ try {
737
+ const { getPromiseDetails, kPending, kRejected } = process.binding("util");
738
+ if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
739
+ getPromiseValue = (value, options) => {
740
+ const [state, innerValue] = getPromiseDetails(value);
741
+ if (state === kPending) {
742
+ return "Promise{<pending>}";
743
+ }
744
+ return `Promise${state === kRejected ? "!" : ""}{${options.inspect(innerValue, options)}}`;
745
+ };
746
+ }
747
+ } catch (notNode) {}
748
+ const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = plugins;
749
+ function getDefaultExportFromCjs(x) {
750
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
751
+ }
752
+ var jsTokens_1;
753
+ var hasRequiredJsTokens;
754
+ function requireJsTokens() {
755
+ if (hasRequiredJsTokens) return jsTokens_1;
756
+ hasRequiredJsTokens = 1;
757
+ var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
758
+ RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy;
759
+ Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
760
+ Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy;
761
+ StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y;
762
+ NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;
763
+ Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y;
764
+ WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/uy;
765
+ LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
766
+ MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y;
767
+ SingleLineComment = /\/\/.*/y;
768
+ JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
769
+ JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy;
770
+ JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y;
771
+ JSXText = /[^<>{}]+/y;
772
+ TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
773
+ TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
774
+ KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
775
+ KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;
776
+ Newline = RegExp(LineTerminatorSequence.source);
777
+ jsTokens_1 = function* (input, { jsx = false } = {}) {
778
+ var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
779
+ ({length} = input);
780
+ lastIndex = 0;
781
+ lastSignificantToken = "";
782
+ stack = [{ tag: "JS" }];
783
+ braces = [];
784
+ parenNesting = 0;
785
+ postfixIncDec = false;
786
+ while (lastIndex < length) {
787
+ mode = stack[stack.length - 1];
788
+ switch (mode.tag) {
789
+ case "JS":
790
+ case "JSNonExpressionParen":
791
+ case "InterpolationInTemplate":
792
+ case "InterpolationInJSX":
793
+ if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
794
+ RegularExpressionLiteral.lastIndex = lastIndex;
795
+ if (match = RegularExpressionLiteral.exec(input)) {
796
+ lastIndex = RegularExpressionLiteral.lastIndex;
797
+ lastSignificantToken = match[0];
798
+ postfixIncDec = true;
799
+ yield {
800
+ type: "RegularExpressionLiteral",
801
+ value: match[0],
802
+ closed: match[1] !== void 0 && match[1] !== "\\"
803
+ };
804
+ continue;
805
+ }
806
+ }
807
+ Punctuator.lastIndex = lastIndex;
808
+ if (match = Punctuator.exec(input)) {
809
+ punctuator = match[0];
810
+ nextLastIndex = Punctuator.lastIndex;
811
+ nextLastSignificantToken = punctuator;
812
+ switch (punctuator) {
813
+ case "(":
814
+ if (lastSignificantToken === "?NonExpressionParenKeyword") {
815
+ stack.push({
816
+ tag: "JSNonExpressionParen",
817
+ nesting: parenNesting
818
+ });
819
+ }
820
+ parenNesting++;
821
+ postfixIncDec = false;
822
+ break;
823
+ case ")":
824
+ parenNesting--;
825
+ postfixIncDec = true;
826
+ if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) {
827
+ stack.pop();
828
+ nextLastSignificantToken = "?NonExpressionParenEnd";
829
+ postfixIncDec = false;
830
+ }
831
+ break;
832
+ case "{":
833
+ Punctuator.lastIndex = 0;
834
+ isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));
835
+ braces.push(isExpression);
836
+ postfixIncDec = false;
837
+ break;
838
+ case "}":
839
+ switch (mode.tag) {
840
+ case "InterpolationInTemplate":
841
+ if (braces.length === mode.nesting) {
842
+ Template.lastIndex = lastIndex;
843
+ match = Template.exec(input);
844
+ lastIndex = Template.lastIndex;
845
+ lastSignificantToken = match[0];
846
+ if (match[1] === "${") {
847
+ lastSignificantToken = "?InterpolationInTemplate";
848
+ postfixIncDec = false;
849
+ yield {
850
+ type: "TemplateMiddle",
851
+ value: match[0]
852
+ };
853
+ } else {
854
+ stack.pop();
855
+ postfixIncDec = true;
856
+ yield {
857
+ type: "TemplateTail",
858
+ value: match[0],
859
+ closed: match[1] === "`"
860
+ };
861
+ }
862
+ continue;
863
+ }
864
+ break;
865
+ case "InterpolationInJSX": if (braces.length === mode.nesting) {
866
+ stack.pop();
867
+ lastIndex += 1;
868
+ lastSignificantToken = "}";
869
+ yield {
870
+ type: "JSXPunctuator",
871
+ value: "}"
872
+ };
873
+ continue;
874
+ }
875
+ }
876
+ postfixIncDec = braces.pop();
877
+ nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
878
+ break;
879
+ case "]":
880
+ postfixIncDec = true;
881
+ break;
882
+ case "++":
883
+ case "--":
884
+ nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
885
+ break;
886
+ case "<":
887
+ if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {
888
+ stack.push({ tag: "JSXTag" });
889
+ lastIndex += 1;
890
+ lastSignificantToken = "<";
891
+ yield {
892
+ type: "JSXPunctuator",
893
+ value: punctuator
894
+ };
895
+ continue;
896
+ }
897
+ postfixIncDec = false;
898
+ break;
899
+ default: postfixIncDec = false;
900
+ }
901
+ lastIndex = nextLastIndex;
902
+ lastSignificantToken = nextLastSignificantToken;
903
+ yield {
904
+ type: "Punctuator",
905
+ value: punctuator
906
+ };
907
+ continue;
908
+ }
909
+ Identifier.lastIndex = lastIndex;
910
+ if (match = Identifier.exec(input)) {
911
+ lastIndex = Identifier.lastIndex;
912
+ nextLastSignificantToken = match[0];
913
+ switch (match[0]) {
914
+ case "for":
915
+ case "if":
916
+ case "while":
917
+ case "with": if (lastSignificantToken !== "." && lastSignificantToken !== "?.") {
918
+ nextLastSignificantToken = "?NonExpressionParenKeyword";
919
+ }
920
+ }
921
+ lastSignificantToken = nextLastSignificantToken;
922
+ postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);
923
+ yield {
924
+ type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName",
925
+ value: match[0]
926
+ };
927
+ continue;
928
+ }
929
+ StringLiteral.lastIndex = lastIndex;
930
+ if (match = StringLiteral.exec(input)) {
931
+ lastIndex = StringLiteral.lastIndex;
932
+ lastSignificantToken = match[0];
933
+ postfixIncDec = true;
934
+ yield {
935
+ type: "StringLiteral",
936
+ value: match[0],
937
+ closed: match[2] !== void 0
938
+ };
939
+ continue;
940
+ }
941
+ NumericLiteral.lastIndex = lastIndex;
942
+ if (match = NumericLiteral.exec(input)) {
943
+ lastIndex = NumericLiteral.lastIndex;
944
+ lastSignificantToken = match[0];
945
+ postfixIncDec = true;
946
+ yield {
947
+ type: "NumericLiteral",
948
+ value: match[0]
949
+ };
950
+ continue;
951
+ }
952
+ Template.lastIndex = lastIndex;
953
+ if (match = Template.exec(input)) {
954
+ lastIndex = Template.lastIndex;
955
+ lastSignificantToken = match[0];
956
+ if (match[1] === "${") {
957
+ lastSignificantToken = "?InterpolationInTemplate";
958
+ stack.push({
959
+ tag: "InterpolationInTemplate",
960
+ nesting: braces.length
961
+ });
962
+ postfixIncDec = false;
963
+ yield {
964
+ type: "TemplateHead",
965
+ value: match[0]
966
+ };
967
+ } else {
968
+ postfixIncDec = true;
969
+ yield {
970
+ type: "NoSubstitutionTemplate",
971
+ value: match[0],
972
+ closed: match[1] === "`"
973
+ };
974
+ }
975
+ continue;
976
+ }
977
+ break;
978
+ case "JSXTag":
979
+ case "JSXTagEnd":
980
+ JSXPunctuator.lastIndex = lastIndex;
981
+ if (match = JSXPunctuator.exec(input)) {
982
+ lastIndex = JSXPunctuator.lastIndex;
983
+ nextLastSignificantToken = match[0];
984
+ switch (match[0]) {
985
+ case "<":
986
+ stack.push({ tag: "JSXTag" });
987
+ break;
988
+ case ">":
989
+ stack.pop();
990
+ if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") {
991
+ nextLastSignificantToken = "?JSX";
992
+ postfixIncDec = true;
993
+ } else {
994
+ stack.push({ tag: "JSXChildren" });
995
+ }
996
+ break;
997
+ case "{":
998
+ stack.push({
999
+ tag: "InterpolationInJSX",
1000
+ nesting: braces.length
1001
+ });
1002
+ nextLastSignificantToken = "?InterpolationInJSX";
1003
+ postfixIncDec = false;
1004
+ break;
1005
+ case "/": if (lastSignificantToken === "<") {
1006
+ stack.pop();
1007
+ if (stack[stack.length - 1].tag === "JSXChildren") {
1008
+ stack.pop();
1009
+ }
1010
+ stack.push({ tag: "JSXTagEnd" });
1011
+ }
1012
+ }
1013
+ lastSignificantToken = nextLastSignificantToken;
1014
+ yield {
1015
+ type: "JSXPunctuator",
1016
+ value: match[0]
1017
+ };
1018
+ continue;
1019
+ }
1020
+ JSXIdentifier.lastIndex = lastIndex;
1021
+ if (match = JSXIdentifier.exec(input)) {
1022
+ lastIndex = JSXIdentifier.lastIndex;
1023
+ lastSignificantToken = match[0];
1024
+ yield {
1025
+ type: "JSXIdentifier",
1026
+ value: match[0]
1027
+ };
1028
+ continue;
1029
+ }
1030
+ JSXString.lastIndex = lastIndex;
1031
+ if (match = JSXString.exec(input)) {
1032
+ lastIndex = JSXString.lastIndex;
1033
+ lastSignificantToken = match[0];
1034
+ yield {
1035
+ type: "JSXString",
1036
+ value: match[0],
1037
+ closed: match[2] !== void 0
1038
+ };
1039
+ continue;
1040
+ }
1041
+ break;
1042
+ case "JSXChildren":
1043
+ JSXText.lastIndex = lastIndex;
1044
+ if (match = JSXText.exec(input)) {
1045
+ lastIndex = JSXText.lastIndex;
1046
+ lastSignificantToken = match[0];
1047
+ yield {
1048
+ type: "JSXText",
1049
+ value: match[0]
1050
+ };
1051
+ continue;
1052
+ }
1053
+ switch (input[lastIndex]) {
1054
+ case "<":
1055
+ stack.push({ tag: "JSXTag" });
1056
+ lastIndex++;
1057
+ lastSignificantToken = "<";
1058
+ yield {
1059
+ type: "JSXPunctuator",
1060
+ value: "<"
1061
+ };
1062
+ continue;
1063
+ case "{":
1064
+ stack.push({
1065
+ tag: "InterpolationInJSX",
1066
+ nesting: braces.length
1067
+ });
1068
+ lastIndex++;
1069
+ lastSignificantToken = "?InterpolationInJSX";
1070
+ postfixIncDec = false;
1071
+ yield {
1072
+ type: "JSXPunctuator",
1073
+ value: "{"
1074
+ };
1075
+ continue;
1076
+ }
1077
+ }
1078
+ WhiteSpace.lastIndex = lastIndex;
1079
+ if (match = WhiteSpace.exec(input)) {
1080
+ lastIndex = WhiteSpace.lastIndex;
1081
+ yield {
1082
+ type: "WhiteSpace",
1083
+ value: match[0]
1084
+ };
1085
+ continue;
1086
+ }
1087
+ LineTerminatorSequence.lastIndex = lastIndex;
1088
+ if (match = LineTerminatorSequence.exec(input)) {
1089
+ lastIndex = LineTerminatorSequence.lastIndex;
1090
+ postfixIncDec = false;
1091
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
1092
+ lastSignificantToken = "?NoLineTerminatorHere";
1093
+ }
1094
+ yield {
1095
+ type: "LineTerminatorSequence",
1096
+ value: match[0]
1097
+ };
1098
+ continue;
1099
+ }
1100
+ MultiLineComment.lastIndex = lastIndex;
1101
+ if (match = MultiLineComment.exec(input)) {
1102
+ lastIndex = MultiLineComment.lastIndex;
1103
+ if (Newline.test(match[0])) {
1104
+ postfixIncDec = false;
1105
+ if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
1106
+ lastSignificantToken = "?NoLineTerminatorHere";
1107
+ }
1108
+ }
1109
+ yield {
1110
+ type: "MultiLineComment",
1111
+ value: match[0],
1112
+ closed: match[1] !== void 0
1113
+ };
1114
+ continue;
1115
+ }
1116
+ SingleLineComment.lastIndex = lastIndex;
1117
+ if (match = SingleLineComment.exec(input)) {
1118
+ lastIndex = SingleLineComment.lastIndex;
1119
+ postfixIncDec = false;
1120
+ yield {
1121
+ type: "SingleLineComment",
1122
+ value: match[0]
1123
+ };
1124
+ continue;
1125
+ }
1126
+ firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));
1127
+ lastIndex += firstCodePoint.length;
1128
+ lastSignificantToken = firstCodePoint;
1129
+ postfixIncDec = false;
1130
+ yield {
1131
+ type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
1132
+ value: firstCodePoint
1133
+ };
1134
+ }
1135
+ return void 0;
1136
+ };
1137
+ return jsTokens_1;
1138
+ }
1139
+ requireJsTokens();
1140
+ var reservedWords = {
1141
+ keyword: [
1142
+ "break",
1143
+ "case",
1144
+ "catch",
1145
+ "continue",
1146
+ "debugger",
1147
+ "default",
1148
+ "do",
1149
+ "else",
1150
+ "finally",
1151
+ "for",
1152
+ "function",
1153
+ "if",
1154
+ "return",
1155
+ "switch",
1156
+ "throw",
1157
+ "try",
1158
+ "var",
1159
+ "const",
1160
+ "while",
1161
+ "with",
1162
+ "new",
1163
+ "this",
1164
+ "super",
1165
+ "class",
1166
+ "extends",
1167
+ "export",
1168
+ "import",
1169
+ "null",
1170
+ "true",
1171
+ "false",
1172
+ "in",
1173
+ "instanceof",
1174
+ "typeof",
1175
+ "void",
1176
+ "delete"
1177
+ ],
1178
+ strict: [
1179
+ "implements",
1180
+ "interface",
1181
+ "let",
1182
+ "package",
1183
+ "private",
1184
+ "protected",
1185
+ "public",
1186
+ "static",
1187
+ "yield"
1188
+ ]
1189
+ };
1190
+ new Set(reservedWords.keyword);
1191
+ new Set(reservedWords.strict);
1192
+ var f = {
1193
+ reset: [0, 0],
1194
+ bold: [
1195
+ 1,
1196
+ 22,
1197
+ "\x1B[22m\x1B[1m"
1198
+ ],
1199
+ dim: [
1200
+ 2,
1201
+ 22,
1202
+ "\x1B[22m\x1B[2m"
1203
+ ],
1204
+ italic: [3, 23],
1205
+ underline: [4, 24],
1206
+ inverse: [7, 27],
1207
+ hidden: [8, 28],
1208
+ strikethrough: [9, 29],
1209
+ black: [30, 39],
1210
+ red: [31, 39],
1211
+ green: [32, 39],
1212
+ yellow: [33, 39],
1213
+ blue: [34, 39],
1214
+ magenta: [35, 39],
1215
+ cyan: [36, 39],
1216
+ white: [37, 39],
1217
+ gray: [90, 39],
1218
+ bgBlack: [40, 49],
1219
+ bgRed: [41, 49],
1220
+ bgGreen: [42, 49],
1221
+ bgYellow: [43, 49],
1222
+ bgBlue: [44, 49],
1223
+ bgMagenta: [45, 49],
1224
+ bgCyan: [46, 49],
1225
+ bgWhite: [47, 49],
1226
+ blackBright: [90, 39],
1227
+ redBright: [91, 39],
1228
+ greenBright: [92, 39],
1229
+ yellowBright: [93, 39],
1230
+ blueBright: [94, 39],
1231
+ magentaBright: [95, 39],
1232
+ cyanBright: [96, 39],
1233
+ whiteBright: [97, 39],
1234
+ bgBlackBright: [100, 49],
1235
+ bgRedBright: [101, 49],
1236
+ bgGreenBright: [102, 49],
1237
+ bgYellowBright: [103, 49],
1238
+ bgBlueBright: [104, 49],
1239
+ bgMagentaBright: [105, 49],
1240
+ bgCyanBright: [106, 49],
1241
+ bgWhiteBright: [107, 49]
1242
+ }, h = Object.entries(f);
1243
+ function a(n) {
1244
+ return String(n);
1245
+ }
1246
+ a.open = "";
1247
+ a.close = "";
1248
+ function C(n = false) {
1249
+ let e = typeof process != "undefined" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];
1250
+ return !("NO_COLOR" in i || g.includes("--no-color")) && ("FORCE_COLOR" in i || g.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || n && i.TERM !== "dumb" || "CI" in i) || typeof window != "undefined" && !!window.chrome;
1251
+ }
1252
+ function p(n = false) {
1253
+ let e = C(n), i = (r, t, c, o) => {
1254
+ let l = "", s = 0;
1255
+ do
1256
+ l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);
1257
+ while (~o);
1258
+ return l + r.substring(s);
1259
+ }, g = (r, t, c = r) => {
1260
+ let o = (l) => {
1261
+ let s = String(l), b = s.indexOf(t, r.length);
1262
+ return ~b ? r + i(s, t, c, b) + t : r + s + t;
1263
+ };
1264
+ return o.open = r, o.close = t, o;
1265
+ }, u = { isColorSupported: e }, d = (r) => `\x1B[${r}m`;
1266
+ for (let [r, t] of h) u[r] = e ? g(d(t[0]), d(t[1]), t[2]) : a;
1267
+ return u;
1268
+ }
1269
+ p();
1270
+ const lineSplitRE = /\r?\n/;
1271
+ function positionToOffset(source, lineNumber, columnNumber) {
1272
+ const lines = source.split(lineSplitRE);
1273
+ const nl = /\r\n/.test(source) ? 2 : 1;
1274
+ let start = 0;
1275
+ if (lineNumber > lines.length) {
1276
+ return source.length;
1277
+ }
1278
+ for (let i = 0; i < lineNumber - 1; i++) {
1279
+ start += lines[i].length + nl;
1280
+ }
1281
+ return start + columnNumber;
1282
+ }
1283
+ function offsetToLineNumber(source, offset) {
1284
+ if (offset > source.length) {
1285
+ throw new Error(`offset is longer than source length! offset ${offset} > length ${source.length}`);
1286
+ }
1287
+ const lines = source.split(lineSplitRE);
1288
+ const nl = /\r\n/.test(source) ? 2 : 1;
1289
+ let counted = 0;
1290
+ let line = 0;
1291
+ for (; line < lines.length; line++) {
1292
+ const lineLength = lines[line].length + nl;
1293
+ if (counted + lineLength >= offset) {
1294
+ break;
1295
+ }
1296
+ counted += lineLength;
1297
+ }
1298
+ return line + 1;
1299
+ }
1300
+ async function saveInlineSnapshots(environment, snapshots) {
1301
+ const MagicString = (await import("../../../../../magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js")).default;
1302
+ const files = new Set(snapshots.map((i) => i.file));
1303
+ await Promise.all(Array.from(files).map(async (file) => {
1304
+ const snaps = snapshots.filter((i) => i.file === file);
1305
+ const code = await environment.readSnapshotFile(file);
1306
+ const s = new MagicString(code);
1307
+ for (const snap of snaps) {
1308
+ const index = positionToOffset(code, snap.line, snap.column);
1309
+ replaceInlineSnap(code, s, index, snap.snapshot);
1310
+ }
1311
+ const transformed = s.toString();
1312
+ if (transformed !== code) {
1313
+ await environment.saveSnapshotFile(file, transformed);
1314
+ }
1315
+ }));
1316
+ }
1317
+ const startObjectRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;
1318
+ function replaceObjectSnap(code, s, index, newSnap) {
1319
+ let _code = code.slice(index);
1320
+ const startMatch = startObjectRegex.exec(_code);
1321
+ if (!startMatch) {
1322
+ return false;
1323
+ }
1324
+ _code = _code.slice(startMatch.index);
1325
+ let callEnd = getCallLastIndex(_code);
1326
+ if (callEnd === null) {
1327
+ return false;
1328
+ }
1329
+ callEnd += index + startMatch.index;
1330
+ const shapeStart = index + startMatch.index + startMatch[0].length;
1331
+ const shapeEnd = getObjectShapeEndIndex(code, shapeStart);
1332
+ const snap = `, ${prepareSnapString(newSnap, code, index)}`;
1333
+ if (shapeEnd === callEnd) {
1334
+ s.appendLeft(callEnd, snap);
1335
+ } else {
1336
+ s.overwrite(shapeEnd, callEnd, snap);
1337
+ }
1338
+ return true;
1339
+ }
1340
+ function getObjectShapeEndIndex(code, index) {
1341
+ let startBraces = 1;
1342
+ let endBraces = 0;
1343
+ while (startBraces !== endBraces && index < code.length) {
1344
+ const s = code[index++];
1345
+ if (s === "{") {
1346
+ startBraces++;
1347
+ } else if (s === "}") {
1348
+ endBraces++;
1349
+ }
1350
+ }
1351
+ return index;
1352
+ }
1353
+ function prepareSnapString(snap, source, index) {
1354
+ const lineNumber = offsetToLineNumber(source, index);
1355
+ const line = source.split(lineSplitRE)[lineNumber - 1];
1356
+ const indent = line.match(/^\s*/)[0] || "";
1357
+ const indentNext = indent.includes(" ") ? `${indent}\t` : `${indent} `;
1358
+ const lines = snap.trim().replace(/\\/g, "\\\\").split(/\n/g);
1359
+ const isOneline = lines.length <= 1;
1360
+ const quote = "`";
1361
+ if (isOneline) {
1362
+ return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}${quote}`;
1363
+ }
1364
+ return `${quote}\n${lines.map((i) => i ? indentNext + i : "").join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}\n${indent}${quote}`;
1365
+ }
1366
+ const toMatchInlineName = "toMatchInlineSnapshot";
1367
+ const toThrowErrorMatchingInlineName = "toThrowErrorMatchingInlineSnapshot";
1368
+ function getCodeStartingAtIndex(code, index) {
1369
+ const indexInline = index - toMatchInlineName.length;
1370
+ if (code.slice(indexInline, index) === toMatchInlineName) {
1371
+ return {
1372
+ code: code.slice(indexInline),
1373
+ index: indexInline
1374
+ };
1375
+ }
1376
+ const indexThrowInline = index - toThrowErrorMatchingInlineName.length;
1377
+ if (code.slice(index - indexThrowInline, index) === toThrowErrorMatchingInlineName) {
1378
+ return {
1379
+ code: code.slice(index - indexThrowInline),
1380
+ index: index - indexThrowInline
1381
+ };
1382
+ }
1383
+ return {
1384
+ code: code.slice(index),
1385
+ index
1386
+ };
1387
+ }
1388
+ const startRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;
1389
+ function replaceInlineSnap(code, s, currentIndex, newSnap) {
1390
+ const { code: codeStartingAtIndex, index } = getCodeStartingAtIndex(code, currentIndex);
1391
+ const startMatch = startRegex.exec(codeStartingAtIndex);
1392
+ const firstKeywordMatch = /toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(codeStartingAtIndex);
1393
+ if (!startMatch || startMatch.index !== (firstKeywordMatch === null || firstKeywordMatch === void 0 ? void 0 : firstKeywordMatch.index)) {
1394
+ return replaceObjectSnap(code, s, index, newSnap);
1395
+ }
1396
+ const quote = startMatch[1];
1397
+ const startIndex = index + startMatch.index + startMatch[0].length;
1398
+ const snapString = prepareSnapString(newSnap, code, index);
1399
+ if (quote === ")") {
1400
+ s.appendRight(startIndex - 1, snapString);
1401
+ return true;
1402
+ }
1403
+ const quoteEndRE = new RegExp(`(?:^|[^\\\\])${quote}`);
1404
+ const endMatch = quoteEndRE.exec(code.slice(startIndex));
1405
+ if (!endMatch) {
1406
+ return false;
1407
+ }
1408
+ const endIndex = startIndex + endMatch.index + endMatch[0].length;
1409
+ s.overwrite(startIndex - 1, endIndex, snapString);
1410
+ return true;
1411
+ }
1412
+ const INDENTATION_REGEX = /^([^\S\n]*)\S/m;
1413
+ function stripSnapshotIndentation(inlineSnapshot) {
1414
+ const match = inlineSnapshot.match(INDENTATION_REGEX);
1415
+ if (!match || !match[1]) {
1416
+ return inlineSnapshot;
1417
+ }
1418
+ const indentation = match[1];
1419
+ const lines = inlineSnapshot.split(/\n/g);
1420
+ if (lines.length <= 2) {
1421
+ return inlineSnapshot;
1422
+ }
1423
+ if (lines[0].trim() !== "" || lines[lines.length - 1].trim() !== "") {
1424
+ return inlineSnapshot;
1425
+ }
1426
+ for (let i = 1; i < lines.length - 1; i++) {
1427
+ if (lines[i] !== "") {
1428
+ if (lines[i].indexOf(indentation) !== 0) {
1429
+ return inlineSnapshot;
1430
+ }
1431
+ lines[i] = lines[i].substring(indentation.length);
1432
+ }
1433
+ }
1434
+ lines[lines.length - 1] = "";
1435
+ inlineSnapshot = lines.join("\n");
1436
+ return inlineSnapshot;
1437
+ }
1438
+ async function saveRawSnapshots(environment, snapshots) {
1439
+ await Promise.all(snapshots.map(async (snap) => {
1440
+ if (!snap.readonly) {
1441
+ await environment.saveSnapshotFile(snap.file, snap.snapshot);
1442
+ }
1443
+ }));
1444
+ }
1445
+ var naturalCompare$1 = { exports: {} };
1446
+ var hasRequiredNaturalCompare;
1447
+ function requireNaturalCompare() {
1448
+ if (hasRequiredNaturalCompare) return naturalCompare$1.exports;
1449
+ hasRequiredNaturalCompare = 1;
1450
+ /*
1451
+ * @version 1.4.0
1452
+ * @date 2015-10-26
1453
+ * @stability 3 - Stable
1454
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
1455
+ * @license MIT License
1456
+ */
1457
+ var naturalCompare$2 = function(a$1, b) {
1458
+ var i, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
1459
+ function getCode(str, pos, code) {
1460
+ if (code) {
1461
+ for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
1462
+ return +str.slice(pos - 1, i);
1463
+ }
1464
+ code = alphabet && alphabet.indexOf(str.charAt(pos));
1465
+ return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
1466
+ }
1467
+ if ((a$1 += "") != (b += "")) for (; codeB;) {
1468
+ codeA = getCode(a$1, posA++);
1469
+ codeB = getCode(b, posB++);
1470
+ if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
1471
+ codeA = getCode(a$1, posA, posA);
1472
+ codeB = getCode(b, posB, posA = i);
1473
+ posB = i;
1474
+ }
1475
+ if (codeA != codeB) return codeA < codeB ? -1 : 1;
1476
+ }
1477
+ return 0;
1478
+ };
1479
+ try {
1480
+ naturalCompare$1.exports = naturalCompare$2;
1481
+ } catch (e) {
1482
+ String.naturalCompare = naturalCompare$2;
1483
+ }
1484
+ return naturalCompare$1.exports;
1485
+ }
1486
+ var naturalCompareExports = requireNaturalCompare();
1487
+ var naturalCompare = /* @__PURE__ */ getDefaultExportFromCjs(naturalCompareExports);
1488
+ const serialize$1 = (val, config, indentation, depth, refs, printer) => {
1489
+ const name = val.getMockName();
1490
+ const nameString = name === "vi.fn()" ? "" : ` ${name}`;
1491
+ let callsString = "";
1492
+ if (val.mock.calls.length !== 0) {
1493
+ const indentationNext = indentation + config.indent;
1494
+ callsString = ` {${config.spacingOuter}${indentationNext}"calls": ${printer(val.mock.calls, config, indentationNext, depth, refs)}${config.min ? ", " : ","}${config.spacingOuter}${indentationNext}"results": ${printer(val.mock.results, config, indentationNext, depth, refs)}${config.min ? "" : ","}${config.spacingOuter}${indentation}}`;
1495
+ }
1496
+ return `[MockFunction${nameString}]${callsString}`;
1497
+ };
1498
+ const test = (val) => val && !!val._isMockFunction;
1499
+ const plugin = {
1500
+ serialize: serialize$1,
1501
+ test
1502
+ };
1503
+ const { DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent, AsymmetricMatcher } = plugins;
1504
+ let PLUGINS = [
1505
+ ReactTestComponent,
1506
+ ReactElement,
1507
+ DOMElement,
1508
+ DOMCollection,
1509
+ Immutable,
1510
+ AsymmetricMatcher,
1511
+ plugin
1512
+ ];
1513
+ function addSerializer(plugin$1) {
1514
+ PLUGINS = [plugin$1].concat(PLUGINS);
1515
+ }
1516
+ function getSerializers() {
1517
+ return PLUGINS;
1518
+ }
1519
+ function testNameToKey(testName, count) {
1520
+ return `${testName} ${count}`;
1521
+ }
1522
+ function keyToTestName(key) {
1523
+ if (!/ \d+$/.test(key)) {
1524
+ throw new Error("Snapshot keys must end with a number.");
1525
+ }
1526
+ return key.replace(/ \d+$/, "");
1527
+ }
1528
+ function getSnapshotData(content, options) {
1529
+ const update = options.updateSnapshot;
1530
+ const data = Object.create(null);
1531
+ let snapshotContents = "";
1532
+ let dirty = false;
1533
+ if (content != null) {
1534
+ try {
1535
+ snapshotContents = content;
1536
+ const populate = new Function("exports", snapshotContents);
1537
+ populate(data);
1538
+ } catch {}
1539
+ }
1540
+ const isInvalid = snapshotContents;
1541
+ if ((update === "all" || update === "new") && isInvalid) {
1542
+ dirty = true;
1543
+ }
1544
+ return {
1545
+ data,
1546
+ dirty
1547
+ };
1548
+ }
1549
+ function addExtraLineBreaks(string) {
1550
+ return string.includes("\n") ? `\n${string}\n` : string;
1551
+ }
1552
+ function removeExtraLineBreaks(string) {
1553
+ return string.length > 2 && string.startsWith("\n") && string.endsWith("\n") ? string.slice(1, -1) : string;
1554
+ }
1555
+ const escapeRegex = true;
1556
+ const printFunctionName = false;
1557
+ function serialize(val, indent = 2, formatOverrides = {}) {
1558
+ return normalizeNewlines(format(val, {
1559
+ escapeRegex,
1560
+ indent,
1561
+ plugins: getSerializers(),
1562
+ printFunctionName,
1563
+ ...formatOverrides
1564
+ }));
1565
+ }
1566
+ function escapeBacktickString(str) {
1567
+ return str.replace(/`|\\|\$\{/g, "\\$&");
1568
+ }
1569
+ function printBacktickString(str) {
1570
+ return `\`${escapeBacktickString(str)}\``;
1571
+ }
1572
+ function normalizeNewlines(string) {
1573
+ return string.replace(/\r\n|\r/g, "\n");
1574
+ }
1575
+ async function saveSnapshotFile(environment, snapshotData, snapshotPath) {
1576
+ const snapshots = Object.keys(snapshotData).sort(naturalCompare).map((key) => `exports[${printBacktickString(key)}] = ${printBacktickString(normalizeNewlines(snapshotData[key]))};`);
1577
+ const content = `${environment.getHeader()}\n\n${snapshots.join("\n\n")}\n`;
1578
+ const oldContent = await environment.readSnapshotFile(snapshotPath);
1579
+ const skipWriting = oldContent != null && oldContent === content;
1580
+ if (skipWriting) {
1581
+ return;
1582
+ }
1583
+ await environment.saveSnapshotFile(snapshotPath, content);
1584
+ }
1585
+ function deepMergeArray(target = [], source = []) {
1586
+ const mergedOutput = Array.from(target);
1587
+ source.forEach((sourceElement, index) => {
1588
+ const targetElement = mergedOutput[index];
1589
+ if (Array.isArray(target[index])) {
1590
+ mergedOutput[index] = deepMergeArray(target[index], sourceElement);
1591
+ } else if (isObject(targetElement)) {
1592
+ mergedOutput[index] = deepMergeSnapshot(target[index], sourceElement);
1593
+ } else {
1594
+ mergedOutput[index] = sourceElement;
1595
+ }
1596
+ });
1597
+ return mergedOutput;
1598
+ }
1599
+ /**
1600
+ * Deep merge, but considers asymmetric matchers. Unlike base util's deep merge,
1601
+ * will merge any object-like instance.
1602
+ * Compatible with Jest's snapshot matcher. Should not be used outside of snapshot.
1603
+ *
1604
+ * @example
1605
+ * ```ts
1606
+ * toMatchSnapshot({
1607
+ * name: expect.stringContaining('text')
1608
+ * })
1609
+ * ```
1610
+ */
1611
+ function deepMergeSnapshot(target, source) {
1612
+ if (isObject(target) && isObject(source)) {
1613
+ const mergedOutput = { ...target };
1614
+ Object.keys(source).forEach((key) => {
1615
+ if (isObject(source[key]) && !source[key].$$typeof) {
1616
+ if (!(key in target)) {
1617
+ Object.assign(mergedOutput, { [key]: source[key] });
1618
+ } else {
1619
+ mergedOutput[key] = deepMergeSnapshot(target[key], source[key]);
1620
+ }
1621
+ } else if (Array.isArray(source[key])) {
1622
+ mergedOutput[key] = deepMergeArray(target[key], source[key]);
1623
+ } else {
1624
+ Object.assign(mergedOutput, { [key]: source[key] });
1625
+ }
1626
+ });
1627
+ return mergedOutput;
1628
+ } else if (Array.isArray(target) && Array.isArray(source)) {
1629
+ return deepMergeArray(target, source);
1630
+ }
1631
+ return target;
1632
+ }
1633
+ var DefaultMap = class extends Map {
1634
+ constructor(defaultFn, entries) {
1635
+ super(entries);
1636
+ this.defaultFn = defaultFn;
1637
+ }
1638
+ get(key) {
1639
+ if (!this.has(key)) {
1640
+ this.set(key, this.defaultFn(key));
1641
+ }
1642
+ return super.get(key);
1643
+ }
1644
+ };
1645
+ var CounterMap = class extends DefaultMap {
1646
+ constructor() {
1647
+ super(() => 0);
1648
+ }
1649
+ _total;
1650
+ valueOf() {
1651
+ return this._total = this.total();
1652
+ }
1653
+ increment(key) {
1654
+ if (typeof this._total !== "undefined") {
1655
+ this._total++;
1656
+ }
1657
+ this.set(key, this.get(key) + 1);
1658
+ }
1659
+ total() {
1660
+ if (typeof this._total !== "undefined") {
1661
+ return this._total;
1662
+ }
1663
+ let total = 0;
1664
+ for (const x of this.values()) {
1665
+ total += x;
1666
+ }
1667
+ return total;
1668
+ }
1669
+ };
1670
+ function isSameStackPosition(x, y) {
1671
+ return x.file === y.file && x.column === y.column && x.line === y.line;
1672
+ }
1673
+ var SnapshotState = class SnapshotState {
1674
+ _counters = new CounterMap();
1675
+ _dirty;
1676
+ _updateSnapshot;
1677
+ _snapshotData;
1678
+ _initialData;
1679
+ _inlineSnapshots;
1680
+ _inlineSnapshotStacks;
1681
+ _testIdToKeys = new DefaultMap(() => []);
1682
+ _rawSnapshots;
1683
+ _uncheckedKeys;
1684
+ _snapshotFormat;
1685
+ _environment;
1686
+ _fileExists;
1687
+ expand;
1688
+ _added = new CounterMap();
1689
+ _matched = new CounterMap();
1690
+ _unmatched = new CounterMap();
1691
+ _updated = new CounterMap();
1692
+ get added() {
1693
+ return this._added;
1694
+ }
1695
+ set added(value) {
1696
+ this._added._total = value;
1697
+ }
1698
+ get matched() {
1699
+ return this._matched;
1700
+ }
1701
+ set matched(value) {
1702
+ this._matched._total = value;
1703
+ }
1704
+ get unmatched() {
1705
+ return this._unmatched;
1706
+ }
1707
+ set unmatched(value) {
1708
+ this._unmatched._total = value;
1709
+ }
1710
+ get updated() {
1711
+ return this._updated;
1712
+ }
1713
+ set updated(value) {
1714
+ this._updated._total = value;
1715
+ }
1716
+ constructor(testFilePath, snapshotPath, snapshotContent, options) {
1717
+ this.testFilePath = testFilePath;
1718
+ this.snapshotPath = snapshotPath;
1719
+ const { data, dirty } = getSnapshotData(snapshotContent, options);
1720
+ this._fileExists = snapshotContent != null;
1721
+ this._initialData = { ...data };
1722
+ this._snapshotData = { ...data };
1723
+ this._dirty = dirty;
1724
+ this._inlineSnapshots = [];
1725
+ this._inlineSnapshotStacks = [];
1726
+ this._rawSnapshots = [];
1727
+ this._uncheckedKeys = new Set(Object.keys(this._snapshotData));
1728
+ this.expand = options.expand || false;
1729
+ this._updateSnapshot = options.updateSnapshot;
1730
+ this._snapshotFormat = {
1731
+ printBasicPrototype: false,
1732
+ escapeString: false,
1733
+ ...options.snapshotFormat
1734
+ };
1735
+ this._environment = options.snapshotEnvironment;
1736
+ }
1737
+ static async create(testFilePath, options) {
1738
+ const snapshotPath = await options.snapshotEnvironment.resolvePath(testFilePath);
1739
+ const content = await options.snapshotEnvironment.readSnapshotFile(snapshotPath);
1740
+ return new SnapshotState(testFilePath, snapshotPath, content, options);
1741
+ }
1742
+ get environment() {
1743
+ return this._environment;
1744
+ }
1745
+ markSnapshotsAsCheckedForTest(testName) {
1746
+ this._uncheckedKeys.forEach((uncheckedKey) => {
1747
+ if (/ \d+$| > /.test(uncheckedKey.slice(testName.length))) {
1748
+ this._uncheckedKeys.delete(uncheckedKey);
1749
+ }
1750
+ });
1751
+ }
1752
+ clearTest(testId) {
1753
+ this._inlineSnapshots = this._inlineSnapshots.filter((s) => s.testId !== testId);
1754
+ this._inlineSnapshotStacks = this._inlineSnapshotStacks.filter((s) => s.testId !== testId);
1755
+ for (const key of this._testIdToKeys.get(testId)) {
1756
+ const name = keyToTestName(key);
1757
+ const count = this._counters.get(name);
1758
+ if (count > 0) {
1759
+ if (key in this._snapshotData || key in this._initialData) {
1760
+ this._snapshotData[key] = this._initialData[key];
1761
+ }
1762
+ this._counters.set(name, count - 1);
1763
+ }
1764
+ }
1765
+ this._testIdToKeys.delete(testId);
1766
+ this.added.delete(testId);
1767
+ this.updated.delete(testId);
1768
+ this.matched.delete(testId);
1769
+ this.unmatched.delete(testId);
1770
+ }
1771
+ _inferInlineSnapshotStack(stacks) {
1772
+ const promiseIndex = stacks.findIndex((i) => i.method.match(/__VITEST_(RESOLVES|REJECTS)__/));
1773
+ if (promiseIndex !== -1) {
1774
+ return stacks[promiseIndex + 3];
1775
+ }
1776
+ const stackIndex = stacks.findIndex((i) => i.method.includes("__INLINE_SNAPSHOT__"));
1777
+ return stackIndex !== -1 ? stacks[stackIndex + 2] : null;
1778
+ }
1779
+ _addSnapshot(key, receivedSerialized, options) {
1780
+ this._dirty = true;
1781
+ if (options.stack) {
1782
+ this._inlineSnapshots.push({
1783
+ snapshot: receivedSerialized,
1784
+ testId: options.testId,
1785
+ ...options.stack
1786
+ });
1787
+ } else if (options.rawSnapshot) {
1788
+ this._rawSnapshots.push({
1789
+ ...options.rawSnapshot,
1790
+ snapshot: receivedSerialized
1791
+ });
1792
+ } else {
1793
+ this._snapshotData[key] = receivedSerialized;
1794
+ }
1795
+ }
1796
+ async save() {
1797
+ const hasExternalSnapshots = Object.keys(this._snapshotData).length;
1798
+ const hasInlineSnapshots = this._inlineSnapshots.length;
1799
+ const hasRawSnapshots = this._rawSnapshots.length;
1800
+ const isEmpty = !hasExternalSnapshots && !hasInlineSnapshots && !hasRawSnapshots;
1801
+ const status = {
1802
+ deleted: false,
1803
+ saved: false
1804
+ };
1805
+ if ((this._dirty || this._uncheckedKeys.size) && !isEmpty) {
1806
+ if (hasExternalSnapshots) {
1807
+ await saveSnapshotFile(this._environment, this._snapshotData, this.snapshotPath);
1808
+ this._fileExists = true;
1809
+ }
1810
+ if (hasInlineSnapshots) {
1811
+ await saveInlineSnapshots(this._environment, this._inlineSnapshots);
1812
+ }
1813
+ if (hasRawSnapshots) {
1814
+ await saveRawSnapshots(this._environment, this._rawSnapshots);
1815
+ }
1816
+ status.saved = true;
1817
+ } else if (!hasExternalSnapshots && this._fileExists) {
1818
+ if (this._updateSnapshot === "all") {
1819
+ await this._environment.removeSnapshotFile(this.snapshotPath);
1820
+ this._fileExists = false;
1821
+ }
1822
+ status.deleted = true;
1823
+ }
1824
+ return status;
1825
+ }
1826
+ getUncheckedCount() {
1827
+ return this._uncheckedKeys.size || 0;
1828
+ }
1829
+ getUncheckedKeys() {
1830
+ return Array.from(this._uncheckedKeys);
1831
+ }
1832
+ removeUncheckedKeys() {
1833
+ if (this._updateSnapshot === "all" && this._uncheckedKeys.size) {
1834
+ this._dirty = true;
1835
+ this._uncheckedKeys.forEach((key) => delete this._snapshotData[key]);
1836
+ this._uncheckedKeys.clear();
1837
+ }
1838
+ }
1839
+ match({ testId, testName, received, key, inlineSnapshot, isInline, error, rawSnapshot }) {
1840
+ this._counters.increment(testName);
1841
+ const count = this._counters.get(testName);
1842
+ if (!key) {
1843
+ key = testNameToKey(testName, count);
1844
+ }
1845
+ this._testIdToKeys.get(testId).push(key);
1846
+ if (!(isInline && this._snapshotData[key] !== undefined)) {
1847
+ this._uncheckedKeys.delete(key);
1848
+ }
1849
+ let receivedSerialized = rawSnapshot && typeof received === "string" ? received : serialize(received, undefined, this._snapshotFormat);
1850
+ if (!rawSnapshot) {
1851
+ receivedSerialized = addExtraLineBreaks(receivedSerialized);
1852
+ }
1853
+ if (rawSnapshot) {
1854
+ if (rawSnapshot.content && rawSnapshot.content.match(/\r\n/) && !receivedSerialized.match(/\r\n/)) {
1855
+ rawSnapshot.content = normalizeNewlines(rawSnapshot.content);
1856
+ }
1857
+ }
1858
+ const expected = isInline ? inlineSnapshot : rawSnapshot ? rawSnapshot.content : this._snapshotData[key];
1859
+ const expectedTrimmed = rawSnapshot ? expected : expected === null || expected === void 0 ? void 0 : expected.trim();
1860
+ const pass = expectedTrimmed === (rawSnapshot ? receivedSerialized : receivedSerialized.trim());
1861
+ const hasSnapshot = expected !== undefined;
1862
+ const snapshotIsPersisted = isInline || this._fileExists || rawSnapshot && rawSnapshot.content != null;
1863
+ if (pass && !isInline && !rawSnapshot) {
1864
+ this._snapshotData[key] = receivedSerialized;
1865
+ }
1866
+ let stack;
1867
+ if (isInline) {
1868
+ var _this$environment$pro, _this$environment;
1869
+ const stacks = parseErrorStacktrace(error || new Error("snapshot"), { ignoreStackEntries: [] });
1870
+ const _stack = this._inferInlineSnapshotStack(stacks);
1871
+ if (!_stack) {
1872
+ throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${JSON.stringify(stacks)}`);
1873
+ }
1874
+ stack = ((_this$environment$pro = (_this$environment = this.environment).processStackTrace) === null || _this$environment$pro === void 0 ? void 0 : _this$environment$pro.call(_this$environment, _stack)) || _stack;
1875
+ stack.column--;
1876
+ const snapshotsWithSameStack = this._inlineSnapshotStacks.filter((s) => isSameStackPosition(s, stack));
1877
+ if (snapshotsWithSameStack.length > 0) {
1878
+ this._inlineSnapshots = this._inlineSnapshots.filter((s) => !isSameStackPosition(s, stack));
1879
+ const differentSnapshot = snapshotsWithSameStack.find((s) => s.snapshot !== receivedSerialized);
1880
+ if (differentSnapshot) {
1881
+ throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"), {
1882
+ actual: receivedSerialized,
1883
+ expected: differentSnapshot.snapshot
1884
+ });
1885
+ }
1886
+ }
1887
+ this._inlineSnapshotStacks.push({
1888
+ ...stack,
1889
+ testId,
1890
+ snapshot: receivedSerialized
1891
+ });
1892
+ }
1893
+ if (hasSnapshot && this._updateSnapshot === "all" || (!hasSnapshot || !snapshotIsPersisted) && (this._updateSnapshot === "new" || this._updateSnapshot === "all")) {
1894
+ if (this._updateSnapshot === "all") {
1895
+ if (!pass) {
1896
+ if (hasSnapshot) {
1897
+ this.updated.increment(testId);
1898
+ } else {
1899
+ this.added.increment(testId);
1900
+ }
1901
+ this._addSnapshot(key, receivedSerialized, {
1902
+ stack,
1903
+ testId,
1904
+ rawSnapshot
1905
+ });
1906
+ } else {
1907
+ this.matched.increment(testId);
1908
+ }
1909
+ } else {
1910
+ this._addSnapshot(key, receivedSerialized, {
1911
+ stack,
1912
+ testId,
1913
+ rawSnapshot
1914
+ });
1915
+ this.added.increment(testId);
1916
+ }
1917
+ return {
1918
+ actual: "",
1919
+ count,
1920
+ expected: "",
1921
+ key,
1922
+ pass: true
1923
+ };
1924
+ } else {
1925
+ if (!pass) {
1926
+ this.unmatched.increment(testId);
1927
+ return {
1928
+ actual: rawSnapshot ? receivedSerialized : removeExtraLineBreaks(receivedSerialized),
1929
+ count,
1930
+ expected: expectedTrimmed !== undefined ? rawSnapshot ? expectedTrimmed : removeExtraLineBreaks(expectedTrimmed) : undefined,
1931
+ key,
1932
+ pass: false
1933
+ };
1934
+ } else {
1935
+ this.matched.increment(testId);
1936
+ return {
1937
+ actual: "",
1938
+ count,
1939
+ expected: "",
1940
+ key,
1941
+ pass: true
1942
+ };
1943
+ }
1944
+ }
1945
+ }
1946
+ async pack() {
1947
+ const snapshot = {
1948
+ filepath: this.testFilePath,
1949
+ added: 0,
1950
+ fileDeleted: false,
1951
+ matched: 0,
1952
+ unchecked: 0,
1953
+ uncheckedKeys: [],
1954
+ unmatched: 0,
1955
+ updated: 0
1956
+ };
1957
+ const uncheckedCount = this.getUncheckedCount();
1958
+ const uncheckedKeys = this.getUncheckedKeys();
1959
+ if (uncheckedCount) {
1960
+ this.removeUncheckedKeys();
1961
+ }
1962
+ const status = await this.save();
1963
+ snapshot.fileDeleted = status.deleted;
1964
+ snapshot.added = this.added.total();
1965
+ snapshot.matched = this.matched.total();
1966
+ snapshot.unmatched = this.unmatched.total();
1967
+ snapshot.updated = this.updated.total();
1968
+ snapshot.unchecked = !status.deleted ? uncheckedCount : 0;
1969
+ snapshot.uncheckedKeys = Array.from(uncheckedKeys);
1970
+ return snapshot;
1971
+ }
1972
+ };
1973
+ function createMismatchError(message, expand, actual, expected) {
1974
+ const error = new Error(message);
1975
+ Object.defineProperty(error, "actual", {
1976
+ value: actual,
1977
+ enumerable: true,
1978
+ configurable: true,
1979
+ writable: true
1980
+ });
1981
+ Object.defineProperty(error, "expected", {
1982
+ value: expected,
1983
+ enumerable: true,
1984
+ configurable: true,
1985
+ writable: true
1986
+ });
1987
+ Object.defineProperty(error, "diffOptions", { value: { expand } });
1988
+ return error;
1989
+ }
1990
+ var SnapshotClient = class {
1991
+ snapshotStateMap = new Map();
1992
+ constructor(options = {}) {
1993
+ this.options = options;
1994
+ }
1995
+ async setup(filepath, options) {
1996
+ if (this.snapshotStateMap.has(filepath)) {
1997
+ return;
1998
+ }
1999
+ this.snapshotStateMap.set(filepath, await SnapshotState.create(filepath, options));
2000
+ }
2001
+ async finish(filepath) {
2002
+ const state = this.getSnapshotState(filepath);
2003
+ const result = await state.pack();
2004
+ this.snapshotStateMap.delete(filepath);
2005
+ return result;
2006
+ }
2007
+ skipTest(filepath, testName) {
2008
+ const state = this.getSnapshotState(filepath);
2009
+ state.markSnapshotsAsCheckedForTest(testName);
2010
+ }
2011
+ clearTest(filepath, testId) {
2012
+ const state = this.getSnapshotState(filepath);
2013
+ state.clearTest(testId);
2014
+ }
2015
+ getSnapshotState(filepath) {
2016
+ const state = this.snapshotStateMap.get(filepath);
2017
+ if (!state) {
2018
+ throw new Error(`The snapshot state for '${filepath}' is not found. Did you call 'SnapshotClient.setup()'?`);
2019
+ }
2020
+ return state;
2021
+ }
2022
+ assert(options) {
2023
+ const { filepath, name, testId = name, message, isInline = false, properties, inlineSnapshot, error, errorMessage, rawSnapshot } = options;
2024
+ let { received } = options;
2025
+ if (!filepath) {
2026
+ throw new Error("Snapshot cannot be used outside of test");
2027
+ }
2028
+ const snapshotState = this.getSnapshotState(filepath);
2029
+ if (typeof properties === "object") {
2030
+ if (typeof received !== "object" || !received) {
2031
+ throw new Error("Received value must be an object when the matcher has properties");
2032
+ }
2033
+ try {
2034
+ var _this$options$isEqual, _this$options;
2035
+ const pass$1 = ((_this$options$isEqual = (_this$options = this.options).isEqual) === null || _this$options$isEqual === void 0 ? void 0 : _this$options$isEqual.call(_this$options, received, properties)) ?? false;
2036
+ if (!pass$1) {
2037
+ throw createMismatchError("Snapshot properties mismatched", snapshotState.expand, received, properties);
2038
+ } else {
2039
+ received = deepMergeSnapshot(received, properties);
2040
+ }
2041
+ } catch (err) {
2042
+ err.message = errorMessage || "Snapshot mismatched";
2043
+ throw err;
2044
+ }
2045
+ }
2046
+ const testName = [name, ...message ? [message] : []].join(" > ");
2047
+ const { actual, expected, key, pass } = snapshotState.match({
2048
+ testId,
2049
+ testName,
2050
+ received,
2051
+ isInline,
2052
+ error,
2053
+ inlineSnapshot,
2054
+ rawSnapshot
2055
+ });
2056
+ if (!pass) {
2057
+ throw createMismatchError(`Snapshot \`${key || "unknown"}\` mismatched`, snapshotState.expand, rawSnapshot ? actual : actual === null || actual === void 0 ? void 0 : actual.trim(), rawSnapshot ? expected : expected === null || expected === void 0 ? void 0 : expected.trim());
2058
+ }
2059
+ }
2060
+ async assertRaw(options) {
2061
+ if (!options.rawSnapshot) {
2062
+ throw new Error("Raw snapshot is required");
2063
+ }
2064
+ const { filepath, rawSnapshot } = options;
2065
+ if (rawSnapshot.content == null) {
2066
+ if (!filepath) {
2067
+ throw new Error("Snapshot cannot be used outside of test");
2068
+ }
2069
+ const snapshotState = this.getSnapshotState(filepath);
2070
+ options.filepath || (options.filepath = filepath);
2071
+ rawSnapshot.file = await snapshotState.environment.resolveRawPath(filepath, rawSnapshot.file);
2072
+ rawSnapshot.content = await snapshotState.environment.readSnapshotFile(rawSnapshot.file) ?? undefined;
2073
+ }
2074
+ return this.assert(options);
2075
+ }
2076
+ clear() {
2077
+ this.snapshotStateMap.clear();
2078
+ }
2079
+ };
2080
+
2081
+ //#endregion
2082
+ export { SnapshotClient, addSerializer, stripSnapshotIndentation };