@sfxcode/nuxt-ui-mongocamp 1.1.4 → 1.2.1
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.
- package/README.md +8 -4
- package/dist/module.d.mts +22 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +41 -5
- package/dist/runtime/components/MongocampAccount.vue +21 -20
- package/dist/runtime/components/MongocampBucketFiles.vue +34 -32
- package/dist/runtime/components/MongocampCollectionData.vue +36 -35
- package/dist/runtime/components/MongocampCollectionInfos.vue +37 -36
- package/dist/runtime/components/MongocampCollections.vue +30 -29
- package/dist/runtime/components/MongocampDatabases.vue +13 -12
- package/dist/runtime/components/MongocampJobs.vue +43 -45
- package/dist/runtime/components/MongocampLogin.d.vue.ts +4 -1
- package/dist/runtime/components/MongocampLogin.vue +13 -9
- package/dist/runtime/components/MongocampLogin.vue.d.ts +4 -1
- package/dist/runtime/components/MongocampRoleGrants.vue +30 -28
- package/dist/runtime/components/MongocampRoles.vue +30 -31
- package/dist/runtime/components/MongocampUsers.vue +35 -36
- package/dist/runtime/components/MongocampVersion.vue +3 -1
- package/dist/runtime/composables/useMongocampAccount.js +6 -5
- package/dist/runtime/composables/useMongocampAdmin.js +2 -2
- package/dist/runtime/composables/useMongocampBucket.js +20 -19
- package/dist/runtime/composables/useMongocampClientApi.d.ts +13 -0
- package/dist/runtime/composables/useMongocampClientApi.js +8 -0
- package/dist/runtime/composables/useMongocampIndex.js +2 -2
- package/dist/runtime/composables/useMongocampJobs.js +2 -2
- package/dist/runtime/composables/useMongocampProxyApi.d.ts +13 -0
- package/dist/runtime/composables/useMongocampProxyApi.js +9 -0
- package/dist/runtime/composables/useMongocampRoles.d.ts +2 -0
- package/dist/runtime/composables/useMongocampRoles.js +4 -2
- package/dist/runtime/composables/useMongocampSystem.js +2 -2
- package/dist/runtime/locales/de.json +265 -0
- package/dist/runtime/locales/en.json +265 -0
- package/dist/runtime/plugin.js +8 -8
- package/dist/runtime/server/handlers/mongocampProxy.d.ts +2 -0
- package/dist/runtime/server/handlers/mongocampProxy.js +45 -0
- package/dist/runtime/utils/createProxyMongocampApis.d.ts +15 -0
- package/dist/runtime/utils/createProxyMongocampApis.js +28 -0
- package/package.json +11 -8
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nuxtUiMongocamp": {
|
|
3
|
+
"common": {
|
|
4
|
+
"cancel": "Cancel",
|
|
5
|
+
"delete": "Delete",
|
|
6
|
+
"save": "Save",
|
|
7
|
+
"saveChanges": "Save Changes",
|
|
8
|
+
"refresh": "Refresh",
|
|
9
|
+
"retry": "Retry",
|
|
10
|
+
"copy": "Copy",
|
|
11
|
+
"dismiss": "Dismiss",
|
|
12
|
+
"yes": "Yes",
|
|
13
|
+
"no": "No",
|
|
14
|
+
"admin": "Admin",
|
|
15
|
+
"standard": "Standard"
|
|
16
|
+
},
|
|
17
|
+
"login": {
|
|
18
|
+
"heading": "Mongocamp Login",
|
|
19
|
+
"email": "Email",
|
|
20
|
+
"password": "Password",
|
|
21
|
+
"submit": "Login",
|
|
22
|
+
"error": "Wrong Login or Password !"
|
|
23
|
+
},
|
|
24
|
+
"users": {
|
|
25
|
+
"heading": "Users",
|
|
26
|
+
"searchPlaceholder": "Search users...",
|
|
27
|
+
"addUser": "Add User",
|
|
28
|
+
"editUserTitle": "Edit User: {userId}",
|
|
29
|
+
"deleteUserTitle": "Delete User",
|
|
30
|
+
"confirmDelete": "Are you sure you want to delete user {userId}? This action cannot be undone.",
|
|
31
|
+
"email": "Email",
|
|
32
|
+
"password": "Password",
|
|
33
|
+
"newPassword": "New Password",
|
|
34
|
+
"newPasswordHelp": "Leave empty to keep current password",
|
|
35
|
+
"roles": "Roles",
|
|
36
|
+
"available": "Available",
|
|
37
|
+
"assigned": "Assigned",
|
|
38
|
+
"columnUser": "User",
|
|
39
|
+
"columnAdmin": "Admin",
|
|
40
|
+
"columnRoles": "Roles",
|
|
41
|
+
"roleAdmin": "Admin",
|
|
42
|
+
"roleUser": "User",
|
|
43
|
+
"editUserTooltip": "Edit user",
|
|
44
|
+
"deleteUserTooltip": "Delete user",
|
|
45
|
+
"errorAddUser": "Failed to add user",
|
|
46
|
+
"errorEditUser": "Failed to update user"
|
|
47
|
+
},
|
|
48
|
+
"roles": {
|
|
49
|
+
"heading": "Roles",
|
|
50
|
+
"searchPlaceholder": "Search roles...",
|
|
51
|
+
"addRole": "Add Role",
|
|
52
|
+
"editRoleTitle": "Edit Role: {roleName}",
|
|
53
|
+
"deleteRoleTitle": "Delete Role",
|
|
54
|
+
"confirmDelete": "Are you sure you want to delete role {roleName}? This action cannot be undone.",
|
|
55
|
+
"roleName": "Role Name",
|
|
56
|
+
"adminRole": "Admin Role",
|
|
57
|
+
"columnRole": "Role",
|
|
58
|
+
"columnAdmin": "Admin",
|
|
59
|
+
"columnGrants": "Grants",
|
|
60
|
+
"manageGrantsTooltip": "Manage grants",
|
|
61
|
+
"editRoleTooltip": "Edit role",
|
|
62
|
+
"deleteRoleTooltip": "Delete role",
|
|
63
|
+
"errorAddRole": "Failed to add role",
|
|
64
|
+
"errorEditRole": "Failed to update role"
|
|
65
|
+
},
|
|
66
|
+
"roleGrants": {
|
|
67
|
+
"heading": "Grants: {roleName}",
|
|
68
|
+
"addGrant": "Add Grant",
|
|
69
|
+
"editGrantTitle": "Edit Grant: {name}",
|
|
70
|
+
"collection": "Collection",
|
|
71
|
+
"read": "Read",
|
|
72
|
+
"write": "Write",
|
|
73
|
+
"administrate": "Administrate",
|
|
74
|
+
"columnCollection": "Collection",
|
|
75
|
+
"columnType": "Type",
|
|
76
|
+
"columnRead": "Read",
|
|
77
|
+
"columnWrite": "Write",
|
|
78
|
+
"columnAdmin": "Admin",
|
|
79
|
+
"editGrantTooltip": "Edit grant",
|
|
80
|
+
"removeGrantTooltip": "Remove grant",
|
|
81
|
+
"errorSave": "Failed to save grants"
|
|
82
|
+
},
|
|
83
|
+
"collections": {
|
|
84
|
+
"heading": "Collections",
|
|
85
|
+
"filterPlaceholder": "Filter collections...",
|
|
86
|
+
"columnCollection": "Collection",
|
|
87
|
+
"columnDocuments": "Documents",
|
|
88
|
+
"columnSize": "Size (KB)",
|
|
89
|
+
"columnIndexes": "Indexes",
|
|
90
|
+
"bucketBadge": "bucket",
|
|
91
|
+
"infoTooltip": "Collection info",
|
|
92
|
+
"dataTooltip": "Collection data",
|
|
93
|
+
"browseFilesTooltip": "Browse files",
|
|
94
|
+
"clearBucketTooltip": "Clear bucket",
|
|
95
|
+
"deleteBucketTooltip": "Delete bucket",
|
|
96
|
+
"clearBucketTitle": "Clear Bucket",
|
|
97
|
+
"confirmClearBucket": "Are you sure you want to delete every file in the \"{bucketName}\" bucket? The bucket itself is kept, but all files in it are permanently removed. This action cannot be undone.",
|
|
98
|
+
"deleteBucketTitle": "Delete Bucket",
|
|
99
|
+
"confirmDeleteBucket": "Are you sure you want to delete the \"{bucketName}\" bucket? This permanently removes both the \"{bucketName}.files\" and \"{bucketName}.chunks\" collections. This action cannot be undone."
|
|
100
|
+
},
|
|
101
|
+
"collectionInfos": {
|
|
102
|
+
"documents": "Documents",
|
|
103
|
+
"dataSize": "Data Size",
|
|
104
|
+
"storageSize": "Storage Size",
|
|
105
|
+
"avgDocSize": "Avg Doc Size",
|
|
106
|
+
"indexes": "Indexes",
|
|
107
|
+
"indexSize": "Index Size",
|
|
108
|
+
"indexesCount": "{count} indexes",
|
|
109
|
+
"createIndex": "Create Index",
|
|
110
|
+
"copyAsTs": "Copy as TS Interface",
|
|
111
|
+
"copiedTitle": "Copied to clipboard",
|
|
112
|
+
"copiedDescription": "TypeScript interface copied.",
|
|
113
|
+
"fieldsCount": "{count} fields",
|
|
114
|
+
"columnField": "Field",
|
|
115
|
+
"columnType": "Type",
|
|
116
|
+
"columnInAllSamples": "In all samples",
|
|
117
|
+
"columnIndex": "Index",
|
|
118
|
+
"columnKeys": "Keys",
|
|
119
|
+
"columnSizeKb": "Size (KB)",
|
|
120
|
+
"deleteIndexTooltip": "Delete index",
|
|
121
|
+
"fieldName": "Field Name",
|
|
122
|
+
"ascending": "Ascending",
|
|
123
|
+
"indexType": "Index Type",
|
|
124
|
+
"expireAfter": "Expire After (e.g. 3600s)",
|
|
125
|
+
"expireAfterHelp": "Only used for the expiring index type.",
|
|
126
|
+
"createIndexTitle": "Create Index",
|
|
127
|
+
"deleteIndexTitle": "Delete Index",
|
|
128
|
+
"confirmDeleteIndex": "Are you sure you want to delete the index \"{indexName}\"? This action cannot be undone.",
|
|
129
|
+
"errorCreateIndex": "Error creating index",
|
|
130
|
+
"errorDeleteIndex": "Error deleting index"
|
|
131
|
+
},
|
|
132
|
+
"collectionData": {
|
|
133
|
+
"filterPlaceholder": "Filter rows...",
|
|
134
|
+
"documentsCount": "{count} documents",
|
|
135
|
+
"uploadFileTooltip": "Upload file",
|
|
136
|
+
"insertDocumentTooltip": "Insert document",
|
|
137
|
+
"reloadTooltip": "Reload",
|
|
138
|
+
"detailsTitle": "Details",
|
|
139
|
+
"insertDocumentTitle": "Insert Document",
|
|
140
|
+
"editDocumentTitle": "Edit Document",
|
|
141
|
+
"deleteDocumentTitle": "Delete Document",
|
|
142
|
+
"confirmDeleteDocument": "Are you sure you want to delete this document? This action cannot be undone.",
|
|
143
|
+
"invalidJson": "Invalid JSON",
|
|
144
|
+
"errorSave": "Error saving document",
|
|
145
|
+
"errorDelete": "Error deleting document",
|
|
146
|
+
"insert": "Insert",
|
|
147
|
+
"downloadFileTooltip": "Download file",
|
|
148
|
+
"editDocumentTooltip": "Edit document",
|
|
149
|
+
"deleteDocumentTooltip": "Delete document",
|
|
150
|
+
"viewArray": "View array",
|
|
151
|
+
"viewObject": "View object",
|
|
152
|
+
"createdByPrefix": "created: ",
|
|
153
|
+
"updatedByPrefix": "updated: ",
|
|
154
|
+
"byPrefix": "by: "
|
|
155
|
+
},
|
|
156
|
+
"bucketFiles": {
|
|
157
|
+
"filterPlaceholder": "Filter by filename...",
|
|
158
|
+
"filesCount": "{count} files",
|
|
159
|
+
"uploadFileTooltip": "Upload file",
|
|
160
|
+
"reloadTooltip": "Reload",
|
|
161
|
+
"metadataTitle": "Metadata",
|
|
162
|
+
"renameTitle": "Rename / edit metadata",
|
|
163
|
+
"deleteFileTitle": "Delete File",
|
|
164
|
+
"confirmDeleteFile": "Are you sure you want to delete this file? This action cannot be undone.",
|
|
165
|
+
"filename": "Filename",
|
|
166
|
+
"keyCount": "1 key",
|
|
167
|
+
"keysCount": "{count} keys",
|
|
168
|
+
"viewMetadataTooltip": "View metadata",
|
|
169
|
+
"columnFilename": "Filename",
|
|
170
|
+
"columnSize": "Size",
|
|
171
|
+
"columnUploaded": "Uploaded",
|
|
172
|
+
"columnMetadata": "Metadata",
|
|
173
|
+
"downloadFileTooltip": "Download file",
|
|
174
|
+
"renameTooltip": "Rename / edit metadata",
|
|
175
|
+
"deleteFileTooltip": "Delete file",
|
|
176
|
+
"metadataKey": "Key",
|
|
177
|
+
"metadataValue": "Value"
|
|
178
|
+
},
|
|
179
|
+
"jobs": {
|
|
180
|
+
"heading": "Jobs",
|
|
181
|
+
"addJob": "Add Job",
|
|
182
|
+
"editJobTitle": "Edit Job: {name}",
|
|
183
|
+
"deleteJobTitle": "Delete Job",
|
|
184
|
+
"confirmDelete": "Are you sure you want to delete job {name}? This action cannot be undone.",
|
|
185
|
+
"name": "Name",
|
|
186
|
+
"group": "Group",
|
|
187
|
+
"jobClass": "Job Class",
|
|
188
|
+
"description": "Description",
|
|
189
|
+
"cronExpression": "Cron Expression",
|
|
190
|
+
"cronExpressionHelp": "Quartz cron syntax, e.g. 0 0 * * * ?",
|
|
191
|
+
"priority": "Priority",
|
|
192
|
+
"columnName": "Name",
|
|
193
|
+
"columnGroup": "Group",
|
|
194
|
+
"columnCron": "Cron Expression",
|
|
195
|
+
"columnNextFireTime": "Next Fire Time",
|
|
196
|
+
"columnPriority": "Priority",
|
|
197
|
+
"executeNowTooltip": "Execute now",
|
|
198
|
+
"editJobTooltip": "Edit job",
|
|
199
|
+
"deleteJobTooltip": "Delete job",
|
|
200
|
+
"executedTitle": "Job executed",
|
|
201
|
+
"executedDescription": "\"{name}\" was triggered.",
|
|
202
|
+
"executionFailedTitle": "Execution failed",
|
|
203
|
+
"executionFailedDescription": "Could not execute \"{name}\".",
|
|
204
|
+
"errorAdd": "Failed to register job",
|
|
205
|
+
"errorEdit": "Failed to update job"
|
|
206
|
+
},
|
|
207
|
+
"account": {
|
|
208
|
+
"heading": "Account",
|
|
209
|
+
"user": "User",
|
|
210
|
+
"role": "Role",
|
|
211
|
+
"roles": "Roles",
|
|
212
|
+
"changePasswordHeading": "Change Password",
|
|
213
|
+
"newPassword": "New Password",
|
|
214
|
+
"changePassword": "Change Password",
|
|
215
|
+
"apiKeyHeading": "API Key",
|
|
216
|
+
"apiKeyOnceWarning": "This key is shown only once. Copy it now — it cannot be retrieved again.",
|
|
217
|
+
"regenerateWarning": "Regenerating your API key immediately invalidates the current one.",
|
|
218
|
+
"regenerateApiKey": "Regenerate API Key",
|
|
219
|
+
"confirmRegenerate": "Are you sure you want to regenerate your API key? Your current key will stop working immediately.",
|
|
220
|
+
"regenerate": "Regenerate",
|
|
221
|
+
"copiedTitle": "Copied to clipboard",
|
|
222
|
+
"copiedDescription": "API key copied.",
|
|
223
|
+
"passwordChangedTitle": "Password changed",
|
|
224
|
+
"passwordChangedDescription": "Your password was updated.",
|
|
225
|
+
"changeFailedTitle": "Change failed",
|
|
226
|
+
"changeFailedFallback": "Could not change your password."
|
|
227
|
+
},
|
|
228
|
+
"databases": {
|
|
229
|
+
"heading": "Databases",
|
|
230
|
+
"columnDatabase": "Database",
|
|
231
|
+
"columnSize": "Size (KB)",
|
|
232
|
+
"columnCollections": "Collections",
|
|
233
|
+
"columnEmpty": "Empty",
|
|
234
|
+
"emptyBadge": "Empty",
|
|
235
|
+
"loadFailedTitle": "Failed to load databases",
|
|
236
|
+
"errorLoad": "Failed to load databases"
|
|
237
|
+
},
|
|
238
|
+
"version": {
|
|
239
|
+
"unavailable": "MongoCamp unavailable"
|
|
240
|
+
},
|
|
241
|
+
"bucket": {
|
|
242
|
+
"downloadFailedTitle": "Download failed",
|
|
243
|
+
"downloadFailedFallback": "Could not download the file.",
|
|
244
|
+
"uploadedTitle": "File uploaded",
|
|
245
|
+
"uploadedDescription": "\"{fileName}\" was uploaded.",
|
|
246
|
+
"uploadFailedTitle": "Upload failed",
|
|
247
|
+
"uploadFailedFallback": "Could not upload the file.",
|
|
248
|
+
"deletedTitle": "File deleted",
|
|
249
|
+
"deletedDescription": "The file was deleted.",
|
|
250
|
+
"deleteFailedTitle": "Delete failed",
|
|
251
|
+
"deleteFailedFallback": "Could not delete the file.",
|
|
252
|
+
"updatedTitle": "File updated",
|
|
253
|
+
"updatedDescription": "The file information was updated.",
|
|
254
|
+
"updateFailedTitle": "Update failed",
|
|
255
|
+
"updateFailedFallback": "Could not update the file information.",
|
|
256
|
+
"bucketClearedTitle": "Bucket cleared",
|
|
257
|
+
"bucketClearedDescription": "All files in \"{bucketName}\" were deleted.",
|
|
258
|
+
"clearFailedTitle": "Clear failed",
|
|
259
|
+
"clearFailedFallback": "Could not clear bucket \"{bucketName}\".",
|
|
260
|
+
"bucketDeletedTitle": "Bucket deleted",
|
|
261
|
+
"bucketDeletedDescription": "Bucket \"{bucketName}\" was deleted.",
|
|
262
|
+
"deleteFailedBucketFallback": "Could not delete bucket \"{bucketName}\"."
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineNuxtPlugin, addRouteMiddleware, navigateTo, useAsyncData, useRuntimeConfig } from "#app";
|
|
2
|
-
import {
|
|
2
|
+
import { useMongocampAuth, useMongocampClientApi } from "#imports";
|
|
3
3
|
import { useMongocampRoles } from "./composables/useMongocampRoles.js";
|
|
4
4
|
export default defineNuxtPlugin(async (_nuxtApp) => {
|
|
5
|
-
const {
|
|
6
|
-
const { informationApi } = useMongocampApi();
|
|
7
|
-
const { notAllowedPath, isAllowedPathForRoute } = useMongocampRoles();
|
|
5
|
+
const { informationApi } = useMongocampClientApi();
|
|
8
6
|
const config = useRuntimeConfig();
|
|
9
7
|
const useGlobalAuthMiddleware = config.public.nuxtUiMongocampOptions.useGlobalAuthMiddleware ?? false;
|
|
10
8
|
const { data: version } = await useAsyncData("version", () => informationApi.version());
|
|
11
9
|
if (useGlobalAuthMiddleware) {
|
|
12
|
-
addRouteMiddleware("global-auth", (to) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
addRouteMiddleware("global-auth", async (to) => {
|
|
11
|
+
const { logout } = useMongocampAuth();
|
|
12
|
+
const { notAllowedPath, logoutRedirectPath, logoutPath, isAllowedPathForRoute } = useMongocampRoles();
|
|
13
|
+
if (to.path === logoutPath) {
|
|
14
|
+
await logout();
|
|
15
|
+
return navigateTo(logoutRedirectPath);
|
|
16
16
|
}
|
|
17
17
|
if (!isAllowedPathForRoute(to.path)) {
|
|
18
18
|
return navigateTo(notAllowedPath);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createError, defineEventHandler, getRequestURL, proxyRequest } from "h3";
|
|
2
|
+
import { useNitroApp, useRuntimeConfig } from "nitropack/runtime";
|
|
3
|
+
import { consola } from "consola";
|
|
4
|
+
let warnedMissingAuthorizeHook = false;
|
|
5
|
+
function hasAuthorizeHookRegistered(hooks) {
|
|
6
|
+
const bag = hooks._hooks;
|
|
7
|
+
if (!bag) return true;
|
|
8
|
+
return (bag["mongocamp-proxy:authorize"]?.length ?? 0) > 0;
|
|
9
|
+
}
|
|
10
|
+
export default defineEventHandler(async (event) => {
|
|
11
|
+
const config = useRuntimeConfig(event);
|
|
12
|
+
const options = config.public.nuxtUiMongocampOptions;
|
|
13
|
+
if (!options?.useServerProxy) {
|
|
14
|
+
throw createError({ statusCode: 404, statusMessage: "Not Found" });
|
|
15
|
+
}
|
|
16
|
+
const nitroHooks = useNitroApp().hooks;
|
|
17
|
+
if (!warnedMissingAuthorizeHook && !hasAuthorizeHookRegistered(nitroHooks)) {
|
|
18
|
+
warnedMissingAuthorizeHook = true;
|
|
19
|
+
consola.warn(
|
|
20
|
+
"[nuxt-ui-mongocamp] `useServerProxy` is enabled but no `mongocamp-proxy:authorize` hook is registered. The proxy route is unguarded: any caller who can reach it gets the full power of the configured MongoCamp api key. Register a guard from your own `server/plugins/*.ts` \u2014 see docs/guide/server-proxy-auth.md."
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
await nitroHooks.callHook("mongocamp-proxy:authorize", event);
|
|
24
|
+
const serverProxyPath = (options.serverProxyPath ?? "/api/_mongocamp").replace(/\/+$/, "");
|
|
25
|
+
const mongocampUrl = config.public.mongocamp?.url;
|
|
26
|
+
const apiKey = config.mongocampApiKey ?? "";
|
|
27
|
+
if (!mongocampUrl) {
|
|
28
|
+
throw createError({ statusCode: 500, statusMessage: "nuxt-ui-mongocamp: `mongocamp.url` is not configured" });
|
|
29
|
+
}
|
|
30
|
+
if (!apiKey) {
|
|
31
|
+
throw createError({ statusCode: 500, statusMessage: "nuxt-ui-mongocamp: `mongocamp.apiKey` is not configured for server proxy mode" });
|
|
32
|
+
}
|
|
33
|
+
const requestUrl = getRequestURL(event);
|
|
34
|
+
const subPath = requestUrl.pathname.slice(serverProxyPath.length);
|
|
35
|
+
const target = `${mongocampUrl}${subPath}${requestUrl.search}`;
|
|
36
|
+
return proxyRequest(event, target, {
|
|
37
|
+
headers: {
|
|
38
|
+
"X-AUTH-APIKEY": apiKey,
|
|
39
|
+
// Neutralize any Authorization header the caller sent — auth against MongoCamp in
|
|
40
|
+
// proxy mode must only ever come from the server-side api key above, never from
|
|
41
|
+
// whatever a caller (legitimate or not) put on their own request.
|
|
42
|
+
"Authorization": ""
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AdminApi, ApplicationApi, AuthApi, BucketApi, CollectionApi, DatabaseApi, DocumentApi, FileApi, IndexApi, InformationApi, JobsApi } from '@sfxcode/nuxt-mongocamp-server/api';
|
|
2
|
+
import type { Configuration } from '@sfxcode/nuxt-mongocamp-server/api';
|
|
3
|
+
export declare function createProxyMongocampApis(configuration: Configuration): {
|
|
4
|
+
adminApi: AdminApi;
|
|
5
|
+
applicationApi: ApplicationApi;
|
|
6
|
+
authApi: AuthApi;
|
|
7
|
+
bucketApi: BucketApi;
|
|
8
|
+
collectionApi: CollectionApi;
|
|
9
|
+
databaseApi: DatabaseApi;
|
|
10
|
+
documentApi: DocumentApi;
|
|
11
|
+
fileApi: FileApi;
|
|
12
|
+
indexApi: IndexApi;
|
|
13
|
+
informationApi: InformationApi;
|
|
14
|
+
jobApi: JobsApi;
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AdminApi,
|
|
3
|
+
ApplicationApi,
|
|
4
|
+
AuthApi,
|
|
5
|
+
BucketApi,
|
|
6
|
+
CollectionApi,
|
|
7
|
+
DatabaseApi,
|
|
8
|
+
DocumentApi,
|
|
9
|
+
FileApi,
|
|
10
|
+
IndexApi,
|
|
11
|
+
InformationApi,
|
|
12
|
+
JobsApi
|
|
13
|
+
} from "@sfxcode/nuxt-mongocamp-server/api";
|
|
14
|
+
export function createProxyMongocampApis(configuration) {
|
|
15
|
+
return {
|
|
16
|
+
adminApi: new AdminApi(configuration),
|
|
17
|
+
applicationApi: new ApplicationApi(configuration),
|
|
18
|
+
authApi: new AuthApi(configuration),
|
|
19
|
+
bucketApi: new BucketApi(configuration),
|
|
20
|
+
collectionApi: new CollectionApi(configuration),
|
|
21
|
+
databaseApi: new DatabaseApi(configuration),
|
|
22
|
+
documentApi: new DocumentApi(configuration),
|
|
23
|
+
fileApi: new FileApi(configuration),
|
|
24
|
+
indexApi: new IndexApi(configuration),
|
|
25
|
+
informationApi: new InformationApi(configuration),
|
|
26
|
+
jobApi: new JobsApi(configuration)
|
|
27
|
+
};
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/nuxt-ui-mongocamp",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A Nuxt module that wraps @sfxcode/nuxt-mongocamp-server with ready-made UI components, composables, and a runtime plugin",
|
|
5
5
|
"repository": "sfxcode/nuxt-ui-mongocamp",
|
|
6
6
|
"homepage": "https://sfxcode.github.io/nuxt-ui-mongocamp/",
|
|
@@ -55,29 +55,32 @@
|
|
|
55
55
|
"docs:preview": "vitepress preview docs"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
+
"@formkit/nuxt": "^2.1.0",
|
|
58
59
|
"@internationalized/date": "^3.12.2",
|
|
59
60
|
"@nuxt/kit": "^4.4.8",
|
|
60
|
-
"@nuxt/ui": "4.
|
|
61
|
-
"@
|
|
62
|
-
"@sfxcode/nuxt-
|
|
61
|
+
"@nuxt/ui": "^4.10.0",
|
|
62
|
+
"@nuxtjs/i18n": "^10.4.1",
|
|
63
|
+
"@sfxcode/nuxt-mongocamp-server": "^1.5.0",
|
|
64
|
+
"@sfxcode/nuxt-ui-formkit": "^1.2.7",
|
|
65
|
+
"consola": "^3.4.2",
|
|
63
66
|
"defu": "^6.1.7",
|
|
64
67
|
"minimatch": "^10.2.5",
|
|
65
68
|
"unocss-nuxt-ui": "^1.2.2"
|
|
66
69
|
},
|
|
67
70
|
"devDependencies": {
|
|
71
|
+
"@iconify-json/lucide": "^1.2.118",
|
|
68
72
|
"@nuxt/devtools": "4.0.0-alpha.7",
|
|
69
73
|
"@nuxt/eslint-config": "^1.16.0",
|
|
70
74
|
"@nuxt/module-builder": "^1.0.2",
|
|
71
75
|
"@nuxt/schema": "^4.4.8",
|
|
72
76
|
"@nuxt/test-utils": "^4.0.3",
|
|
73
|
-
"@playwright/test": "^1.
|
|
77
|
+
"@playwright/test": "^1.61.1",
|
|
74
78
|
"@types/node": "latest",
|
|
75
|
-
"@vue/test-utils": "^2.4.
|
|
79
|
+
"@vue/test-utils": "^2.4.11",
|
|
76
80
|
"changelogen": "^0.6.2",
|
|
77
81
|
"eslint": "^10.7.0",
|
|
78
|
-
"happy-dom": "
|
|
82
|
+
"happy-dom": "^20.10.6",
|
|
79
83
|
"nuxt": "^4.4.8",
|
|
80
|
-
"tailwindcss": "^4.3.2",
|
|
81
84
|
"typescript": "~6.0.3",
|
|
82
85
|
"vitepress": "2.0.0-alpha.18",
|
|
83
86
|
"vitest": "^4.1.10",
|