@sfxcode/nuxt-ui-mongocamp 1.3.4 → 1.4.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 (212) hide show
  1. package/README.md +4 -0
  2. package/dist/module.d.mts +8 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +6 -0
  5. package/dist/runtime/components/MongocampAggregationBuilder.vue +302 -3
  6. package/dist/runtime/components/MongocampAggregationChart.d.vue.ts +6 -0
  7. package/dist/runtime/components/MongocampAggregationChart.vue +93 -0
  8. package/dist/runtime/components/MongocampAggregationChart.vue.d.ts +6 -0
  9. package/dist/runtime/components/MongocampAggregationStagePreview.d.vue.ts +9 -0
  10. package/dist/runtime/components/MongocampAggregationStagePreview.vue +148 -0
  11. package/dist/runtime/components/MongocampAggregationStagePreview.vue.d.ts +9 -0
  12. package/dist/runtime/components/MongocampBucketFiles.vue +169 -48
  13. package/dist/runtime/components/MongocampBulkDelete.d.vue.ts +19 -0
  14. package/dist/runtime/components/MongocampBulkDelete.vue +118 -23
  15. package/dist/runtime/components/MongocampBulkDelete.vue.d.ts +19 -0
  16. package/dist/runtime/components/MongocampBulkEdit.d.vue.ts +6 -0
  17. package/dist/runtime/components/MongocampBulkEdit.vue +23 -2
  18. package/dist/runtime/components/MongocampBulkEdit.vue.d.ts +6 -0
  19. package/dist/runtime/components/MongocampChart.d.vue.ts +29 -0
  20. package/dist/runtime/components/MongocampChart.vue +129 -0
  21. package/dist/runtime/components/MongocampChart.vue.d.ts +29 -0
  22. package/dist/runtime/components/MongocampCollectionCharts.d.vue.ts +15 -0
  23. package/dist/runtime/components/MongocampCollectionCharts.vue +199 -0
  24. package/dist/runtime/components/MongocampCollectionCharts.vue.d.ts +15 -0
  25. package/dist/runtime/components/MongocampCollectionCopy.d.vue.ts +23 -0
  26. package/dist/runtime/components/MongocampCollectionCopy.vue +445 -0
  27. package/dist/runtime/components/MongocampCollectionCopy.vue.d.ts +23 -0
  28. package/dist/runtime/components/MongocampCollectionData.d.vue.ts +4 -0
  29. package/dist/runtime/components/MongocampCollectionData.vue +343 -146
  30. package/dist/runtime/components/MongocampCollectionData.vue.d.ts +4 -0
  31. package/dist/runtime/components/MongocampCollectionInfos.vue +106 -238
  32. package/dist/runtime/components/MongocampCollections.vue +62 -0
  33. package/dist/runtime/components/MongocampCommandPalette.d.vue.ts +40 -0
  34. package/dist/runtime/components/MongocampCommandPalette.vue +135 -0
  35. package/dist/runtime/components/MongocampCommandPalette.vue.d.ts +40 -0
  36. package/dist/runtime/components/MongocampConfirmByName.vue +2 -2
  37. package/dist/runtime/components/MongocampDashboard.d.vue.ts +3 -1
  38. package/dist/runtime/components/MongocampDashboard.vue +21 -2
  39. package/dist/runtime/components/MongocampDashboard.vue.d.ts +3 -1
  40. package/dist/runtime/components/MongocampDatabases.vue +22 -0
  41. package/dist/runtime/components/MongocampDocumentCompare.d.vue.ts +20 -0
  42. package/dist/runtime/components/MongocampDocumentCompare.vue +146 -0
  43. package/dist/runtime/components/MongocampDocumentCompare.vue.d.ts +20 -0
  44. package/dist/runtime/components/MongocampDocumentView.d.vue.ts +22 -0
  45. package/dist/runtime/components/MongocampDocumentView.vue +202 -0
  46. package/dist/runtime/components/MongocampDocumentView.vue.d.ts +22 -0
  47. package/dist/runtime/components/MongocampErrorAlert.vue +12 -16
  48. package/dist/runtime/components/MongocampExportAll.d.vue.ts +18 -0
  49. package/dist/runtime/components/MongocampExportAll.vue +204 -0
  50. package/dist/runtime/components/MongocampExportAll.vue.d.ts +18 -0
  51. package/dist/runtime/components/MongocampFilePreview.d.vue.ts +16 -0
  52. package/dist/runtime/components/MongocampFilePreview.vue +162 -0
  53. package/dist/runtime/components/MongocampFilePreview.vue.d.ts +16 -0
  54. package/dist/runtime/components/MongocampFilterBuilder.vue +11 -0
  55. package/dist/runtime/components/MongocampImport.vue +2 -10
  56. package/dist/runtime/components/MongocampIndexes.d.vue.ts +18 -0
  57. package/dist/runtime/components/MongocampIndexes.vue +455 -0
  58. package/dist/runtime/components/MongocampIndexes.vue.d.ts +18 -0
  59. package/dist/runtime/components/MongocampJobs.d.vue.ts +6 -1
  60. package/dist/runtime/components/MongocampJobs.vue +24 -4
  61. package/dist/runtime/components/MongocampJobs.vue.d.ts +6 -1
  62. package/dist/runtime/components/MongocampPermissionMatrix.d.vue.ts +12 -0
  63. package/dist/runtime/components/MongocampPermissionMatrix.vue +301 -0
  64. package/dist/runtime/components/MongocampPermissionMatrix.vue.d.ts +12 -0
  65. package/dist/runtime/components/MongocampQueryBar.d.vue.ts +26 -0
  66. package/dist/runtime/components/MongocampQueryBar.vue +398 -0
  67. package/dist/runtime/components/MongocampQueryBar.vue.d.ts +26 -0
  68. package/dist/runtime/components/MongocampRoleGrants.vue +2 -2
  69. package/dist/runtime/components/MongocampRoles.vue +3 -3
  70. package/dist/runtime/components/MongocampServerOverview.d.vue.ts +20 -0
  71. package/dist/runtime/components/MongocampServerOverview.vue +443 -0
  72. package/dist/runtime/components/MongocampServerOverview.vue.d.ts +20 -0
  73. package/dist/runtime/components/MongocampSettings.d.vue.ts +25 -1
  74. package/dist/runtime/components/MongocampSettings.vue +70 -9
  75. package/dist/runtime/components/MongocampSettings.vue.d.ts +25 -1
  76. package/dist/runtime/components/MongocampUsers.vue +3 -3
  77. package/dist/runtime/composables/useMongocampAdmin.d.ts +2 -1
  78. package/dist/runtime/composables/useMongocampAdmin.js +7 -15
  79. package/dist/runtime/composables/useMongocampAggregation.d.ts +12 -1
  80. package/dist/runtime/composables/useMongocampAggregation.js +33 -25
  81. package/dist/runtime/composables/useMongocampAutoRefresh.d.ts +26 -0
  82. package/dist/runtime/composables/useMongocampAutoRefresh.js +78 -0
  83. package/dist/runtime/composables/useMongocampBucket.d.ts +13 -1
  84. package/dist/runtime/composables/useMongocampBucket.js +34 -0
  85. package/dist/runtime/composables/useMongocampClientApi.d.ts +1 -1
  86. package/dist/runtime/composables/useMongocampClientApi.js +2 -1
  87. package/dist/runtime/composables/useMongocampCollectionCopy.d.ts +85 -0
  88. package/dist/runtime/composables/useMongocampCollectionCopy.js +105 -0
  89. package/dist/runtime/composables/useMongocampCollectionStats.d.ts +10 -0
  90. package/dist/runtime/composables/useMongocampCollectionStats.js +17 -0
  91. package/dist/runtime/composables/useMongocampError.d.ts +2 -1
  92. package/dist/runtime/composables/useMongocampError.js +16 -1
  93. package/dist/runtime/composables/useMongocampExportAll.d.ts +47 -0
  94. package/dist/runtime/composables/useMongocampExportAll.js +27 -0
  95. package/dist/runtime/composables/useMongocampExtendedJson.d.ts +5 -1
  96. package/dist/runtime/composables/useMongocampExtendedJson.js +12 -6
  97. package/dist/runtime/composables/useMongocampFetchAll.d.ts +25 -0
  98. package/dist/runtime/composables/useMongocampFetchAll.js +27 -0
  99. package/dist/runtime/composables/useMongocampPermissions.d.ts +14 -0
  100. package/dist/runtime/composables/useMongocampPermissions.js +21 -0
  101. package/dist/runtime/composables/useMongocampPersistedState.d.ts +15 -0
  102. package/dist/runtime/composables/useMongocampPersistedState.js +21 -0
  103. package/dist/runtime/composables/useMongocampProxyApi.d.ts +1 -1
  104. package/dist/runtime/composables/useMongocampProxyApi.js +2 -1
  105. package/dist/runtime/composables/useMongocampQuery.d.ts +50 -2
  106. package/dist/runtime/composables/useMongocampQuery.js +72 -1
  107. package/dist/runtime/composables/useMongocampSavedPipelines.d.ts +25 -0
  108. package/dist/runtime/composables/useMongocampSavedPipelines.js +23 -0
  109. package/dist/runtime/composables/useMongocampSavedQueries.d.ts +37 -0
  110. package/dist/runtime/composables/useMongocampSavedQueries.js +50 -0
  111. package/dist/runtime/composables/useMongocampServerOverview.d.ts +42 -0
  112. package/dist/runtime/composables/useMongocampServerOverview.js +61 -0
  113. package/dist/runtime/composables/useMongocampSession.d.ts +3 -2
  114. package/dist/runtime/composables/useMongocampSession.js +14 -22
  115. package/dist/runtime/composables/useMongocampSystem.d.ts +7 -2
  116. package/dist/runtime/composables/useMongocampSystem.js +6 -2
  117. package/dist/runtime/locales/de.json +495 -10
  118. package/dist/runtime/locales/en.json +495 -10
  119. package/dist/runtime/plugin.js +8 -5
  120. package/dist/runtime/utils/aggregationPipeline.d.ts +5 -4
  121. package/dist/runtime/utils/aggregationPipeline.js +23 -9
  122. package/dist/runtime/utils/aggregationPreview.d.ts +13 -0
  123. package/dist/runtime/utils/aggregationPreview.js +10 -0
  124. package/dist/runtime/utils/aggregationResult.d.ts +5 -0
  125. package/dist/runtime/utils/aggregationResult.js +4 -0
  126. package/dist/runtime/utils/aggregationTemplates.d.ts +34 -0
  127. package/dist/runtime/utils/aggregationTemplates.js +47 -0
  128. package/dist/runtime/utils/analyzeSamples.d.ts +1 -0
  129. package/dist/runtime/utils/analyzeSamples.js +1 -1
  130. package/dist/runtime/utils/autoRefresh.d.ts +14 -0
  131. package/dist/runtime/utils/autoRefresh.js +15 -0
  132. package/dist/runtime/utils/bigIntJson.d.ts +15 -0
  133. package/dist/runtime/utils/bigIntJson.js +55 -0
  134. package/dist/runtime/utils/bulkDelete.d.ts +9 -1
  135. package/dist/runtime/utils/bulkDelete.js +15 -3
  136. package/dist/runtime/utils/bulkEdit.d.ts +6 -0
  137. package/dist/runtime/utils/bulkEdit.js +7 -0
  138. package/dist/runtime/utils/chartData.d.ts +11 -0
  139. package/dist/runtime/utils/chartData.js +9 -0
  140. package/dist/runtime/utils/collectionChart.d.ts +36 -0
  141. package/dist/runtime/utils/collectionChart.js +73 -0
  142. package/dist/runtime/utils/collectionCopy.d.ts +26 -0
  143. package/dist/runtime/utils/collectionCopy.js +38 -0
  144. package/dist/runtime/utils/collectionStats.d.ts +31 -0
  145. package/dist/runtime/utils/collectionStats.js +42 -0
  146. package/dist/runtime/utils/commandPalette.d.ts +48 -0
  147. package/dist/runtime/utils/commandPalette.js +39 -0
  148. package/dist/runtime/utils/createProxyMongocampApis.d.ts +2 -2
  149. package/dist/runtime/utils/createProxyMongocampApis.js +2 -2
  150. package/dist/runtime/utils/documentCompare.d.ts +31 -0
  151. package/dist/runtime/utils/documentCompare.js +70 -0
  152. package/dist/runtime/utils/documentDiff.d.ts +19 -0
  153. package/dist/runtime/utils/documentDiff.js +71 -0
  154. package/dist/runtime/utils/documentPaths.d.ts +44 -0
  155. package/dist/runtime/utils/documentPaths.js +144 -0
  156. package/dist/runtime/utils/documentTree.d.ts +40 -0
  157. package/dist/runtime/utils/documentTree.js +94 -0
  158. package/dist/runtime/utils/exportDocuments.d.ts +35 -0
  159. package/dist/runtime/utils/exportDocuments.js +54 -0
  160. package/dist/runtime/utils/exportRows.js +1 -1
  161. package/dist/runtime/utils/filePreview.d.ts +27 -0
  162. package/dist/runtime/utils/filePreview.js +50 -0
  163. package/dist/runtime/utils/filterBuilder.d.ts +6 -1
  164. package/dist/runtime/utils/filterBuilder.js +6 -5
  165. package/dist/runtime/utils/formatBytes.d.ts +2 -0
  166. package/dist/runtime/utils/formatBytes.js +11 -0
  167. package/dist/runtime/utils/grantMatching.d.ts +8 -0
  168. package/dist/runtime/utils/grantMatching.js +15 -0
  169. package/dist/runtime/utils/importRows.js +12 -2
  170. package/dist/runtime/utils/indexCopy.d.ts +26 -0
  171. package/dist/runtime/utils/indexCopy.js +22 -0
  172. package/dist/runtime/utils/indexForm.d.ts +69 -0
  173. package/dist/runtime/utils/indexForm.js +63 -0
  174. package/dist/runtime/utils/limitedMap.d.ts +17 -0
  175. package/dist/runtime/utils/limitedMap.js +19 -0
  176. package/dist/runtime/utils/luceneExpression.d.ts +15 -0
  177. package/dist/runtime/utils/luceneExpression.js +74 -0
  178. package/dist/runtime/utils/pagedFetch.d.ts +46 -0
  179. package/dist/runtime/utils/pagedFetch.js +58 -0
  180. package/dist/runtime/utils/paginationHeaders.d.ts +4 -0
  181. package/dist/runtime/utils/paginationHeaders.js +4 -0
  182. package/dist/runtime/utils/permissionDenied.d.ts +10 -0
  183. package/dist/runtime/utils/permissionDenied.js +23 -0
  184. package/dist/runtime/utils/permissionMatrix.d.ts +55 -0
  185. package/dist/runtime/utils/permissionMatrix.js +85 -0
  186. package/dist/runtime/utils/persistedState.d.ts +25 -0
  187. package/dist/runtime/utils/persistedState.js +47 -0
  188. package/dist/runtime/utils/queryState.d.ts +45 -0
  189. package/dist/runtime/utils/queryState.js +75 -0
  190. package/dist/runtime/utils/requestLimits.d.ts +2 -0
  191. package/dist/runtime/utils/requestLimits.js +4 -0
  192. package/dist/runtime/utils/resultChart.d.ts +32 -0
  193. package/dist/runtime/utils/resultChart.js +59 -0
  194. package/dist/runtime/utils/savedPipelines.d.ts +22 -0
  195. package/dist/runtime/utils/savedPipelines.js +46 -0
  196. package/dist/runtime/utils/savedQueries.d.ts +60 -0
  197. package/dist/runtime/utils/savedQueries.js +143 -0
  198. package/dist/runtime/utils/schemaAnalysis.d.ts +16 -0
  199. package/dist/runtime/utils/schemaAnalysis.js +57 -0
  200. package/dist/runtime/utils/serverError.d.ts +19 -0
  201. package/dist/runtime/utils/serverError.js +19 -0
  202. package/dist/runtime/utils/serverOverview.d.ts +47 -0
  203. package/dist/runtime/utils/serverOverview.js +40 -0
  204. package/dist/runtime/utils/sessionGuard.d.ts +3 -0
  205. package/dist/runtime/utils/sessionGuard.js +18 -1
  206. package/package.json +13 -12
  207. package/dist/runtime/utils/failureKind.d.ts +0 -3
  208. package/dist/runtime/utils/failureKind.js +0 -11
  209. package/dist/runtime/utils/serverProbe.d.ts +0 -10
  210. package/dist/runtime/utils/serverProbe.js +0 -25
  211. package/dist/runtime/utils/throttled.d.ts +0 -6
  212. package/dist/runtime/utils/throttled.js +0 -16
@@ -131,7 +131,15 @@
131
131
  "clearedDescription": "Every document in \"{name}\" was deleted.",
132
132
  "droppedTitle": "Collection dropped",
133
133
  "droppedDescription": "The collection \"{name}\" was deleted.",
134
- "bucketActionFailed": "The action on the bucket \"{bucketName}\" failed."
134
+ "bucketActionFailed": "The action on the bucket \"{bucketName}\" failed.",
135
+ "copyTooltip": "Copy collection",
136
+ "chartSummary": "Chart",
137
+ "chartMetric": "Measure",
138
+ "chartStorage": "Storage size",
139
+ "chartDocuments": "Documents",
140
+ "chartOther": "other",
141
+ "chartLabel": "{metric} per collection",
142
+ "chartDescription": "The {count} biggest collections"
135
143
  },
136
144
  "collectionInfos": {
137
145
  "documents": "Documents",
@@ -179,8 +187,21 @@
179
187
  "statsColumnPresent": "Present",
180
188
  "statsPresentTitle": "In {present} of {sampled} sampled documents",
181
189
  "statsColumnValues": "Common values",
190
+ "statsAnalyzeAll": "Analyze all documents",
191
+ "statsAnalyzeAllHint": "Lets the server analyze every document. Takes about a second per 10 000 documents.",
192
+ "statsAnalyzeAllTooLarge": "More than {max} documents — analyze a sample instead.",
193
+ "statsAnalysed": "All {count} documents analyzed",
194
+ "statsNoteAll": "Analyzed by the server over all {count} documents. Common values are not listed.",
195
+ "statsPresentTitleAll": "In about {present} of {sampled} documents",
196
+ "statsServerTimeout": "The analysis took too long. Try again, or analyze a sample instead.",
182
197
  "statsEmpty": "No documents to analyze",
183
- "statsFailed": "The field statistics could not be loaded"
198
+ "statsFailed": "The field statistics could not be loaded",
199
+ "chartsTitle": "Distribution",
200
+ "chartsField": "Field",
201
+ "chartsPick": "Choose a field to see its distribution",
202
+ "presenceSummary": "Field presence chart",
203
+ "presenceLabel": "Share of documents that have the field (%)",
204
+ "presenceDescription": "The {count} fields found in the fewest documents"
184
205
  },
185
206
  "collectionData": {
186
207
  "filterPlaceholder": "Filter rows...",
@@ -202,6 +223,7 @@
202
223
  "confirmDeleteDocument": "Are you sure you want to delete this document? This action cannot be undone.",
203
224
  "invalidJson": "Invalid JSON",
204
225
  "errorSave": "Error saving document",
226
+ "documentGone": "The document no longer exists.",
205
227
  "errorDelete": "Error deleting document",
206
228
  "insert": "Insert",
207
229
  "downloadFileTooltip": "Download file",
@@ -219,7 +241,15 @@
219
241
  "pageSizeLabel": "Rows per page",
220
242
  "filtersTooltip": "Filters",
221
243
  "removeFilter": "Remove filter {filter}",
222
- "clearFilters": "Clear filters"
244
+ "filterExcluding": "Excluding documents that match",
245
+ "clearFilters": "Clear filters",
246
+ "viewDocumentTooltip": "View document",
247
+ "viewDocumentTitle": "Document",
248
+ "viewTable": "Table",
249
+ "viewJson": "JSON",
250
+ "viewModeLabel": "Page view",
251
+ "editLoadFailed": "The full document could not be loaded for editing",
252
+ "projectedNote": "Only some fields are loaded"
223
253
  },
224
254
  "bucketFiles": {
225
255
  "filterPlaceholder": "Filter by filename...",
@@ -242,7 +272,14 @@
242
272
  "renameTooltip": "Rename / edit metadata",
243
273
  "deleteFileTooltip": "Delete file",
244
274
  "metadataKey": "Key",
245
- "metadataValue": "Value"
275
+ "metadataValue": "Value",
276
+ "previewTooltip": "Preview file",
277
+ "dropHere": "Drop files to upload",
278
+ "uploadProgress": "Uploading {done} of {total}…",
279
+ "uploadSummary": "{uploaded} uploaded, {failed} failed",
280
+ "metadataInvalidJson": "Not valid JSON",
281
+ "metadataNotObject": "Metadata must be a JSON object",
282
+ "metadataHelp": "A JSON object; leave empty for no metadata"
246
283
  },
247
284
  "jobs": {
248
285
  "heading": "Jobs",
@@ -298,6 +335,9 @@
298
335
  "heading": "Server settings",
299
336
  "loadFailedTitle": "Failed to load the server settings",
300
337
  "adminOnly": "Only administrators can view the server settings.",
338
+ "clusterHeading": "Cluster",
339
+ "clusterCoordinator": "coordinator",
340
+ "clusterSiteMaster": "site master",
301
341
  "pluginsHeading": "Plugins",
302
342
  "routesPlugins": "Route plugins",
303
343
  "filePlugins": "File plugins",
@@ -320,12 +360,16 @@
320
360
  "columnCollections": "Collections",
321
361
  "columnEmpty": "Empty",
322
362
  "emptyBadge": "Empty",
323
- "loadFailedTitle": "Failed to load databases"
363
+ "loadFailedTitle": "Failed to load databases",
364
+ "chartSummary": "Chart",
365
+ "chartSize": "Size on disk",
366
+ "chartDescription": "Size of {count} databases, biggest first"
324
367
  },
325
368
  "version": {
326
369
  "unavailable": "MongoCamp unavailable"
327
370
  },
328
371
  "bucket": {
372
+ "filterTooLong": "The filter is too long for the server (more than {max} characters once encoded). Please shorten it.",
329
373
  "downloadFailedTitle": "Download failed",
330
374
  "downloadFailedFallback": "Could not download the file.",
331
375
  "uploadedTitle": "File uploaded",
@@ -353,9 +397,11 @@
353
397
  "network": "The server could not be reached, or your session has expired. Try again, or log in again.",
354
398
  "unauthorized": "Your session has expired. Please log in again.",
355
399
  "forbidden": "You do not have permission to do this.",
400
+ "notAllowed": "The server does not allow this request.",
401
+ "notAllowedOperator": "The server does not allow the operator {operator}.",
402
+ "serverMessage": "Server message: {message}",
356
403
  "generic": "Something went wrong.",
357
404
  "loginAgain": "Log in again",
358
- "requestRefused": "The server is reachable and your session is valid, but it refused this request. Try again, or change what you asked for.",
359
405
  "filterRejectedTitle": "The filter could not be applied",
360
406
  "filterRejected": "The server rejected the current search or filters, although the collection itself loads. Clear them, or remove the last condition, and try again.",
361
407
  "clearFilters": "Clear filters"
@@ -403,7 +449,26 @@
403
449
  "confirmEdit": "Update {count}",
404
450
  "editPartialFailure": "{failed} of {total} could not be updated: {reason}",
405
451
  "editShortfall": "only {matched} of {expected} selected documents were found",
406
- "editUnaddressable": "this document id cannot be updated in bulk"
452
+ "editUnaddressable": "this document id cannot be updated in bulk",
453
+ "pageSelected": "All {count} documents on this page are selected.",
454
+ "selectAllMatching": "Select all {total} matching documents",
455
+ "allMatchingSelected": "All {count} matching documents are selected.",
456
+ "collecting": "Collecting ids: {loaded} of {target}",
457
+ "collectingUnknown": "Collecting ids: {loaded}",
458
+ "cancelCollecting": "Cancel",
459
+ "matchingTooMany": "{total} documents match, more than the {cap} that can be handled at once. Narrow the filter first.",
460
+ "matchingChanged": "The collection changed while the ids were collected, so nothing was selected. Try again.",
461
+ "matchingDrift": "{collected} documents were found; the list reported {reported}. Documents were added or removed meanwhile.",
462
+ "typeToConfirm": "To delete every matching document, type the collection name {name}.",
463
+ "typeToConfirmLabel": "Collection name",
464
+ "progressDelete": "Deleted {done} of {total}",
465
+ "progressEdit": "Updated {done} of {total}",
466
+ "stop": "Stop",
467
+ "stoppedDelete": "Stopped: {done} of {total} deleted. The other {left} were not touched.",
468
+ "stoppedEdit": "Stopped: {done} of {total} updated. The other {left} were not touched.",
469
+ "matchingDeleted": "Deleted {deleted} of {total} documents",
470
+ "matchingUpdated": "Updated {updated} of {total} documents",
471
+ "compareSelected": "Compare selected"
407
472
  },
408
473
  "filterBuilder": {
409
474
  "matchLabel": "Match",
@@ -422,6 +487,8 @@
422
487
  "query": "Query",
423
488
  "noFields": "No fields to filter on yet",
424
489
  "noConditions": "No conditions yet — add one to start filtering",
490
+ "negate": "Exclude matching documents (NOT)",
491
+ "negateHint": "Shows the documents that do not match these conditions.",
425
492
  "ignoredRows": "{count} incomplete condition is ignored | {count} incomplete conditions are ignored",
426
493
  "operators": {
427
494
  "contains": "contains",
@@ -525,7 +592,7 @@
525
592
  "exportJson": "Export page as JSON",
526
593
  "exportCsv": "Export page as CSV",
527
594
  "noResults": "The pipeline returned no results",
528
- "precisionNote": "Results are plain JSON: dates appear as ISO text and whole numbers beyond 2^53 may be rounded.",
595
+ "precisionNote": "Results are plain JSON: dates appear as ISO text and whole numbers beyond 2^53 are shown as text with all their digits.",
529
596
  "runFailedTitle": "The pipeline could not be run",
530
597
  "fixStages": "Fix the stages marked below first.",
531
598
  "fixStagesFirst": "Fix the stages with errors before switching to JSON.",
@@ -535,7 +602,11 @@
535
602
  "$group": "$group — group and aggregate",
536
603
  "$sort": "$sort — order",
537
604
  "$project": "$project — choose or compute fields",
538
- "$limit": "$limit — keep the first N"
605
+ "$limit": "$limit — keep the first N",
606
+ "$unwind": "$unwind — one document per array item",
607
+ "$addFields": "$addFields — add computed fields",
608
+ "$count": "$count — number of documents",
609
+ "$bucketAuto": "$bucketAuto — automatic ranges"
539
610
  },
540
611
  "stageErrors": {
541
612
  "invalid-json": "Not valid JSON",
@@ -543,7 +614,10 @@
543
614
  "invalid-limit": "The limit must be a whole number of 1 or more",
544
615
  "invalid-sort": "Sort directions must be 1 or -1",
545
616
  "group-needs-id": "$group needs an _id (use null to group everything)",
546
- "forbidden": "{operator} is not allowed"
617
+ "forbidden": "{operator} is not allowed",
618
+ "invalid-unwind": "Use a field path such as \"$tags\", or an object with a path",
619
+ "invalid-count": "Use a name for the result field: no $ and no dot, for example \"total\"",
620
+ "bucket-needs-fields": "$bucketAuto needs groupBy and a whole number of buckets (1 or more)"
547
621
  },
548
622
  "pipelineErrors": {
549
623
  "too-large": "The pipeline is too large",
@@ -553,7 +627,418 @@
553
627
  "stage-shape": "Stage {n} must be an object with exactly one key that starts with $, for example \"$match\"",
554
628
  "forbidden-operator": "{operator} is not allowed (stage {n})",
555
629
  "too-deep": "Stage {n} is nested too deeply"
630
+ },
631
+ "previewShow": "Preview after this stage",
632
+ "previewHide": "Hide preview",
633
+ "previewTitle": "First {count} documents after stage {n}",
634
+ "previewLoading": "Running…",
635
+ "previewEmpty": "No documents after this stage",
636
+ "previewBlocked": "Fix the stages up to here first",
637
+ "previewFailed": "The preview could not be run",
638
+ "templatesButton": "Templates",
639
+ "templatesHelp": "The stages are added to the editor and stay editable.",
640
+ "templateLabel": "Template",
641
+ "templateCountByField": "Count by field",
642
+ "templateTopValues": "Most common values",
643
+ "templateDateHistogram": "Documents per month or day",
644
+ "templateSumAvg": "Sum and average by group",
645
+ "templateField": "Field",
646
+ "templateFieldGroup": "Group by field",
647
+ "templateFieldDate": "Date field",
648
+ "templateValueField": "Number field",
649
+ "templateTop": "How many values",
650
+ "templateUnit": "Per",
651
+ "unitMonth": "Month",
652
+ "unitDay": "Day",
653
+ "addTemplate": "Add stages",
654
+ "templateProblemField": "Enter a field name without $",
655
+ "templateProblemValue": "Enter the number field",
656
+ "templateProblemTop": "Use a whole number from 1 to 1000",
657
+ "savedButton": "Saved pipelines",
658
+ "savedTitle": "Saved pipelines",
659
+ "savedEmpty": "No saved pipelines",
660
+ "saveName": "Name",
661
+ "saveNamePlaceholder": "Name of the pipeline",
662
+ "save": "Save current pipeline",
663
+ "deleteSaved": "Delete saved pipeline {name}",
664
+ "saveFailedName": "Give the pipeline a name of up to 80 characters",
665
+ "saveFailedPipeline": "Fix the pipeline first — it must be valid and not empty",
666
+ "saveFailedLimit": "At most 50 pipelines can be saved — delete one first",
667
+ "saveFailedSize": "The saved pipelines are too large — delete one first",
668
+ "savedNote": "Saved in this browser only.",
669
+ "unitYear": "Year"
670
+ },
671
+ "documentView": {
672
+ "heading": "Document",
673
+ "modeTree": "Tree",
674
+ "modeJson": "JSON",
675
+ "modeLabel": "View mode",
676
+ "expandAll": "Expand all",
677
+ "collapseAll": "Collapse all",
678
+ "expand": "Expand",
679
+ "collapse": "Collapse",
680
+ "copyPath": "Copy path",
681
+ "copyValue": "Copy value",
682
+ "copyDocument": "Copy document",
683
+ "copied": "Copied",
684
+ "copyFailed": "Copying failed — the browser refused clipboard access",
685
+ "truncated": "Only the first {count} nodes are shown.",
686
+ "collapsedNote": "Large document — expand the parts you need",
687
+ "empty": "No document",
688
+ "typeLabel": "Type: {type}"
689
+ },
690
+ "queryBar": {
691
+ "sortButton": "Sort",
692
+ "sortTitle": "Sort by",
693
+ "sortNone": "Not sorted",
694
+ "addSort": "Add sort",
695
+ "removeSort": "Remove sort on {field}",
696
+ "sortField": "Sort field {position}",
697
+ "sortAscending": "Ascending",
698
+ "sortDescending": "Descending",
699
+ "toggleSortDirection": "Change direction of {field}",
700
+ "fieldsButton": "Fields",
701
+ "fieldsAll": "All fields are loaded",
702
+ "fieldsSome": "{count} of {total} fields are loaded",
703
+ "fieldsNote": "Fields that are not ticked are not loaded at all. The id always comes with a document.",
704
+ "fieldsReset": "Load all fields",
705
+ "historyButton": "History and saved queries",
706
+ "recent": "Recent",
707
+ "saved": "Saved",
708
+ "noRecent": "Nothing yet — queries you run appear here",
709
+ "noSaved": "No saved queries",
710
+ "clearHistory": "Clear history",
711
+ "saveCurrent": "Save current query",
712
+ "saveName": "Name",
713
+ "saveNamePlaceholder": "Name of the query",
714
+ "save": "Save",
715
+ "apply": "Apply",
716
+ "deleteSaved": "Delete saved query {name}",
717
+ "nothingToSave": "Set a filter, sort or fields first",
718
+ "saveFailedName": "Give the query a name of up to 80 characters",
719
+ "saveFailedLimit": "At most 50 queries can be saved — delete one first",
720
+ "saveFailedSize": "The saved queries are too large — delete one first",
721
+ "saveFailedQuery": "This query cannot be saved",
722
+ "saved_ok": "Saved",
723
+ "wordFilter": "Filter",
724
+ "wordSort": "Sort",
725
+ "wordFields": "Fields",
726
+ "customFilter": "Filter text: {query}"
727
+ },
728
+ "indexes": {
729
+ "columnUsage": "Usage",
730
+ "columnSize": "Size",
731
+ "usageOps": "{count} uses",
732
+ "usageSince": "since {date}",
733
+ "neverUsed": "never used since {date}",
734
+ "neverUsedHint": "The counter restarts with the database server, so this is a hint, not proof that the index is not needed.",
735
+ "usageUnavailable": "Usage numbers are not available",
736
+ "protectedHint": "The _id index cannot be dropped",
737
+ "kindStandard": "Standard",
738
+ "kindUnique": "Unique",
739
+ "kindText": "Text",
740
+ "kindExpiring": "Expiring",
741
+ "kindLabel": "Index type",
742
+ "fieldLabel": "Field {position}",
743
+ "fieldPlaceholder": "field or nested.path",
744
+ "directionLabel": "Direction of field {position}",
745
+ "directionAsc": "Ascending",
746
+ "directionDesc": "Descending",
747
+ "addField": "Add field",
748
+ "removeField": "Remove field {position}",
749
+ "nameLabel": "Name (optional)",
750
+ "expireLabel": "Expire after",
751
+ "expireHelp": "A number and s, m, h or d, for example 3600s or 7d.",
752
+ "compoundNote": "With several fields the order matters: the first field is the one queries must filter on.",
753
+ "textNote": "A text index covers one field.",
754
+ "create": "Create index",
755
+ "problemNoField": "Enter at least one field",
756
+ "problemEmptyField": "A field name is empty",
757
+ "problemDuplicateField": "A field is listed twice",
758
+ "problemTooManyFields": "At most {max} fields",
759
+ "problemBadDuration": "Use a number and s, m, h or d, for example 3600s",
760
+ "problemBadName": "The name is too long",
761
+ "errorDuplicate": "The existing documents repeat values of these fields, so a unique index cannot be built",
762
+ "errorConflict": "An index on these fields already exists with other options",
763
+ "errorEmptyKeys": "Enter at least one field",
764
+ "created": "Index {name} created",
765
+ "dropped": "Index {name} dropped",
766
+ "dropTitle": "Delete index",
767
+ "dropDescription": "Deletes the index {name}. Queries that used it get slower. This cannot be undone.",
768
+ "dropConfirm": "Delete index",
769
+ "chartsSummary": "Charts",
770
+ "chartSize": "Index size",
771
+ "chartUsage": "Index uses",
772
+ "chartSizeDescription": "Size of {count} indexes, biggest first",
773
+ "chartUsageDescription": "Uses since the server started, for {count} indexes, most used first"
774
+ },
775
+ "collectionCopy": {
776
+ "title": "Copy collection {source}",
777
+ "titleFiltered": "Copy matching documents of {source}",
778
+ "intro": "Copies the documents into a new collection. Grants, the schema and files of a bucket are not copied.",
779
+ "targetLabel": "Name of the new collection",
780
+ "targetPlaceholder": "for example orders_backup",
781
+ "targetHelp": "Letters, digits and _ - . only. The collection must not exist yet.",
782
+ "count": "{count} document will be copied. | {count} documents will be copied.",
783
+ "countFiltered": "{count} matching document will be copied. | {count} matching documents will be copied.",
784
+ "countLoading": "Counting documents…",
785
+ "countFailed": "The documents could not be counted",
786
+ "tooMany": "This collection holds {count} documents; at most {cap} can be copied here.",
787
+ "problemEmpty": "Enter a name",
788
+ "problemTooLong": "At most {max} characters",
789
+ "problemInvalid": "Use letters, digits and _ - . only, starting with a letter, digit or _",
790
+ "problemProtected": "This name is reserved",
791
+ "problemSame": "Choose a name other than the source",
792
+ "problemExists": "A collection with this name already exists",
793
+ "start": "Copy",
794
+ "stop": "Stop",
795
+ "retry": "Retry failed batches",
796
+ "close": "Close",
797
+ "reading": "Reading {done} of {total}",
798
+ "writing": "Writing {done} of {total}",
799
+ "doneTitle": "Copied {count} document to {target}. | Copied {count} documents to {target}.",
800
+ "verified": "The new collection holds {count} documents.",
801
+ "verifyMismatch": "The new collection holds {actual} documents, but {expected} were copied. Check it before relying on the copy.",
802
+ "failedTitle": "{failed} of {total} documents could not be copied",
803
+ "failedRange": "Documents {from}–{to}: {reason}",
804
+ "maybePartial": "A failed batch may have been partly written. Retrying can then fail on documents that already exist; in that case drop the new collection and copy again.",
805
+ "incomplete": "The new collection {target} is incomplete.",
806
+ "stopped": "Stopped: {done} of {total} documents were copied; {skipped} were not sent. The new collection {target} is incomplete.",
807
+ "changed": "The source changed while it was read, so the copy may miss or repeat a document.",
808
+ "refusedExists": "A collection named {target} exists now. Choose another name.",
809
+ "failedGeneric": "The copy failed",
810
+ "quickBackup": "Quick backup",
811
+ "quickBackupHint": "Copies everything now into a new collection named {name}, without asking for a name.",
812
+ "quickBackupFailed": "This collection cannot be copied",
813
+ "withIndexes": "Also create the same indexes",
814
+ "withIndexesHelp": "The indexes of the source are created on the new collection after the documents are written. A few kinds cannot be copied and are listed afterwards.",
815
+ "indexes": "Creating indexes {done} of {total}",
816
+ "indexesCopied": "Indexes created: {count}",
817
+ "indexesNone": "The source has no indexes besides the default one.",
818
+ "indexSkipped": "Not copied: {name} — {reason}",
819
+ "indexFailed": "Could not create {name}: {reason}",
820
+ "skipMultiText": "a text index over several fields cannot be created here",
821
+ "skipWeights": "its text weights cannot be copied",
822
+ "skipKeyType": "this kind of index cannot be created here",
823
+ "skipOrder": "the field order of this index is not known",
824
+ "indexesError": "The indexes of the source could not be read, so none were created.",
825
+ "indexesPending": "The indexes are created after a successful retry."
826
+ },
827
+ "exportAll": {
828
+ "title": "Export all matching",
829
+ "intro": "Exports every matching document, not only the page on screen.",
830
+ "scopeAll": "All documents of {collection}",
831
+ "scopeFiltered": "The documents of {collection} that match the current filter",
832
+ "count": "{count} document | {count} documents",
833
+ "formatLabel": "Format",
834
+ "formatJson": "JSON (one array)",
835
+ "formatNdjson": "NDJSON (one document per line)",
836
+ "formatCsv": "CSV",
837
+ "cap": "At most {cap} documents are exported; more are cut off and the file says so here.",
838
+ "start": "Export",
839
+ "stop": "Cancel",
840
+ "close": "Close",
841
+ "reading": "Reading {done} of {total}",
842
+ "done": "Exported {count} document to {file}. | Exported {count} documents to {file}.",
843
+ "truncated": "The file is incomplete: only the first {count} of {total} documents were exported. Narrow the filter.",
844
+ "changed": "Documents were added or removed while reading, so the file may miss or repeat one.",
845
+ "cancelled": "Cancelled — nothing was downloaded.",
846
+ "failed": "The export failed",
847
+ "menuItem": "Export all matching…"
848
+ },
849
+ "charts": {
850
+ "titleValues": "Most common values",
851
+ "titleDates": "Documents over time",
852
+ "titleNumbers": "Distribution of numbers",
853
+ "seriesLabel": "Documents",
854
+ "noneLabel": "(none)",
855
+ "unitLabel": "Per",
856
+ "unitYear": "Year",
857
+ "unitMonth": "Month",
858
+ "unitDay": "Day",
859
+ "noteValues": "The {shown} most common of {total} values.",
860
+ "noteValuesAll": "All {total} values.",
861
+ "notePeriods": "The first {shown} of {total} periods are shown.",
862
+ "noteNumbers": "Each range holds about the same number of documents. Documents without a number in this field are not counted.",
863
+ "empty": "No documents have a value of this kind in {field}.",
864
+ "unsupported": "There is no chart for a field of type {type}. Charts need text, true/false, dates or numbers.",
865
+ "unknownField": "{field} was not found in a sample of the documents.",
866
+ "invalidField": "This field name cannot be charted.",
867
+ "loading": "Loading chart…",
868
+ "failedTitle": "The chart could not be loaded",
869
+ "retry": "Try again",
870
+ "showData": "Show the data as a table",
871
+ "columnValue": "Value",
872
+ "columnCount": "Documents",
873
+ "ariaLabel": "{title}: {field}",
874
+ "ariaDescriptionValues": "{shown} bars; the highest is {label} with {count} documents.",
875
+ "ariaDescriptionDates": "{shown} periods from {first} to {last}; the highest is {label} with {count} documents.",
876
+ "ariaDescriptionNumbers": "{shown} ranges; the fullest is {label} with {count} documents.",
877
+ "kindValues": "text or true/false",
878
+ "typeString": "text",
879
+ "typeBoolean": "true/false",
880
+ "typeDate": "date",
881
+ "typeNumber": "number",
882
+ "typeObject": "object",
883
+ "typeArray": "array",
884
+ "typeNull": "empty"
885
+ },
886
+ "serverOverview": {
887
+ "heading": "Server overview",
888
+ "subtitle": "Size and activity of the server at a glance",
889
+ "statDatabases": "Databases",
890
+ "statCollections": "Collections",
891
+ "statDocuments": "Documents",
892
+ "statStorage": "Storage of collections",
893
+ "statIndexes": "Index weight",
894
+ "statIndexesHint": "{share} of the size on disk",
895
+ "statDisk": "{size} on disk",
896
+ "reading": "Reading collections: {done} of {total}",
897
+ "stop": "Stop",
898
+ "partial": "{read} of {total} collections were read; {skipped} were left out (the limit is {max}).",
899
+ "failedCollections": "{count} collections could not be read: {names}",
900
+ "biggestTitle": "Biggest collections",
901
+ "rankBy": "Rank by",
902
+ "metricStorageSize": "Storage on disk",
903
+ "metricCount": "Documents",
904
+ "metricAvgObjSize": "Average document size",
905
+ "metricTotalIndexSize": "Index size",
906
+ "noCollections": "No collections to show",
907
+ "openInfo": "Info of {name}",
908
+ "openData": "Documents of {name}",
909
+ "shareTitle": "Share of storage",
910
+ "otherCollections": "All other collections",
911
+ "databasesTitle": "Databases",
912
+ "databaseEmpty": "empty",
913
+ "seriesSize": "Size",
914
+ "clusterTitle": "Cluster",
915
+ "coordinator": "Coordinator",
916
+ "siteMaster": "Site master",
917
+ "member": "Member",
918
+ "jobsTitle": "Next jobs",
919
+ "jobsNone": "No job has a next run",
920
+ "allJobs": "All jobs",
921
+ "errorDatabases": "The databases could not be read.",
922
+ "errorCollections": "The collections could not be read.",
923
+ "errorCluster": "The cluster could not be read.",
924
+ "errorJobs": "The jobs could not be read.",
925
+ "retry": "Try again",
926
+ "chartBiggest": "Biggest collections by {metric}",
927
+ "chartBiggestDescription": "{shown} collections; the biggest is {name} with {value}.",
928
+ "chartShare": "Share of storage per collection",
929
+ "chartShareDescription": "{shown} slices; the biggest is {name} with {value}.",
930
+ "chartDatabases": "Size of each database",
931
+ "chartDatabasesDescription": "{shown} databases; the biggest is {name} with {value}.",
932
+ "columnCollection": "Collection",
933
+ "columnName": "Name"
934
+ },
935
+ "permissionMatrix": {
936
+ "heading": "Permissions",
937
+ "subtitle": "Who may read, write and administrate which collection. Read-only: grants are edited per role.",
938
+ "filterPlaceholder": "Filter users and collections…",
939
+ "roleLabel": "Role",
940
+ "roleAll": "All roles",
941
+ "viewAll": "Everything",
942
+ "viewNoRoles": "Users without a role",
943
+ "viewNobodyWrites": "Collections nobody can write",
944
+ "viewNobodyReads": "Collections nobody can read",
945
+ "viewLabel": "Quick views",
946
+ "swap": "Swap rows and columns",
947
+ "exportCsv": "Export CSV",
948
+ "refresh": "Reload",
949
+ "summary": "{users} users × {collections} collections",
950
+ "cappedCollections": "Only the first {shown} of {total} collections are shown. Narrow them with the filter.",
951
+ "cappedUsers": "Only the first {shown} of {total} users are shown. Narrow them with the filter.",
952
+ "columnUser": "User",
953
+ "columnCollection": "Collection",
954
+ "adminBadge": "Admin",
955
+ "unknownRole": "{role} (role not found)",
956
+ "noUsers": "No users match",
957
+ "noCollections": "No collections match",
958
+ "nothingLoaded": "No users or collections yet",
959
+ "legend": "R read · W write · A administrate · · none · admin administrator · ? not known (GridFS bucket parts)",
960
+ "cellRead": "read",
961
+ "cellWrite": "write",
962
+ "cellAdministrate": "administrate",
963
+ "cellNone": "no access",
964
+ "cellUnknown": "not known",
965
+ "cellAdmin": "administrator: everything",
966
+ "via": "via {roles}",
967
+ "viaNone": "no role grants this",
968
+ "viaDirect": "granted directly to the user",
969
+ "nobodyNote": "Administrators can always do everything, so they are not counted here.",
970
+ "rolesOf": "Roles of {user}",
971
+ "openRole": "Grants of role {role}",
972
+ "unknownRoleNote": "A role of this user does not exist any more; its grants do not count.",
973
+ "bucketNote": "The grants of a GridFS bucket's .files and .chunks parts were not verified, so they show as ? for users that are not administrators.",
974
+ "retry": "Try again"
975
+ },
976
+ "filePreview": {
977
+ "title": "File preview",
978
+ "loading": "Loading preview…",
979
+ "failed": "The file could not be loaded",
980
+ "noPreview": "No preview for this file type — download it to open it.",
981
+ "tooLarge": "Too large to preview (limit {max}) — download it instead.",
982
+ "clipped": "Only the beginning of the file is shown.",
983
+ "download": "Download"
984
+ },
985
+ "commandPalette": {
986
+ "title": "Go to",
987
+ "description": "Jump to a collection, bucket, user, role, job or action",
988
+ "placeholder": "Search collections, users, roles, jobs…",
989
+ "empty": "Nothing found",
990
+ "failed": "Not loaded: {parts}",
991
+ "group": {
992
+ "collection": "Collections",
993
+ "bucket": "Buckets",
994
+ "user": "Users",
995
+ "role": "Roles",
996
+ "job": "Jobs",
997
+ "action": "Actions"
998
+ },
999
+ "action": {
1000
+ "account": "Open my account",
1001
+ "settings": "Open server settings",
1002
+ "refresh": "Refresh this list",
1003
+ "logout": "Log out"
556
1004
  }
1005
+ },
1006
+ "documentCompare": {
1007
+ "title": "Compare documents",
1008
+ "path": "Path",
1009
+ "left": "Left",
1010
+ "right": "Right",
1011
+ "state": "State",
1012
+ "root": "(document)",
1013
+ "onlyDifferences": "Only differences",
1014
+ "identical": "The documents are identical.",
1015
+ "nothing": "Nothing to show",
1016
+ "truncated": "The documents are large; only the first paths were compared.",
1017
+ "status": {
1018
+ "same": "same",
1019
+ "changed": "changed",
1020
+ "added": "added",
1021
+ "removed": "removed"
1022
+ },
1023
+ "first": "First document",
1024
+ "second": "Second document"
1025
+ },
1026
+ "aggregationChart": {
1027
+ "viewTable": "Table",
1028
+ "viewChart": "Chart",
1029
+ "nothing": "No numeric column to chart on this page.",
1030
+ "labelColumn": "Label",
1031
+ "valueColumns": "Values (max {max})",
1032
+ "type": "Type",
1033
+ "kind": {
1034
+ "bar": "Bars",
1035
+ "area": "Area",
1036
+ "donut": "Donut"
1037
+ },
1038
+ "ariaLabel": "Chart of {values} by {label}",
1039
+ "ariaDescription": "{count} values from the shown page of the result",
1040
+ "cut": "Only the first {max} rows of this page are charted.",
1041
+ "skipped": "{count} rows without a number were left out."
557
1042
  }
558
1043
  }
559
1044
  }
@@ -1,24 +1,27 @@
1
1
  import { defineNuxtPlugin, addRouteMiddleware, navigateTo, useAsyncData, useRuntimeConfig } from "#app";
2
- import { useMongocampAuth, useMongocampClientApi } from "#imports";
2
+ import { useMongocampAuth, useMongocampClientApi, useMongocampStorage } from "#imports";
3
3
  import { useMongocampRoles } from "./composables/useMongocampRoles.js";
4
4
  import { useMongocampSession } from "./composables/useMongocampSession.js";
5
- import { runSessionGuard } from "./utils/sessionGuard.js";
5
+ import { createVerifyCache, runSessionGuard } from "./utils/sessionGuard.js";
6
6
  export default defineNuxtPlugin(async (_nuxtApp) => {
7
- const { informationApi } = useMongocampClientApi();
7
+ const { systemApi } = useMongocampClientApi();
8
8
  const config = useRuntimeConfig();
9
9
  const useGlobalAuthMiddleware = config.public.nuxtUiMongocampOptions.useGlobalAuthMiddleware ?? false;
10
10
  const useServerProxy = config.public.nuxtUiMongocampOptions.useServerProxy ?? false;
11
11
  const sessionGuard = config.public.nuxtUiMongocampOptions.sessionGuard ?? false;
12
- const { data: version } = await useAsyncData("version", () => informationApi.version());
12
+ const sessionGuardVerify = (config.public.nuxtUiMongocampOptions.sessionGuardVerify ?? false) && import.meta.client;
13
+ const verifyCache = createVerifyCache(3e4);
14
+ const { data: version } = await useAsyncData("version", () => systemApi.version());
13
15
  if (sessionGuard && !useServerProxy) {
14
16
  addRouteMiddleware("session-guard", async (to) => {
15
- const { checkExpiry, invalidateSession } = useMongocampSession();
17
+ const { checkExpiry, invalidateSession, verify } = useMongocampSession();
16
18
  const { loginPath } = useMongocampRoles();
17
19
  const outcome = await runSessionGuard({
18
20
  path: to.path,
19
21
  loginPath,
20
22
  checkExpiry,
21
23
  invalidate: invalidateSession,
24
+ verify: sessionGuardVerify ? () => verifyCache(String(useMongocampStorage().value?.token ?? ""), verify) : void 0,
22
25
  // a fresh call: it must read the session as it is after the invalidation
23
26
  isAllowed: (path) => useMongocampRoles().isAllowedPathForRoute(path)
24
27
  });