@sfxcode/nuxt-mongocamp-server 1.1.1 → 1.2.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.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
|
+
import { consola } from "consola";
|
|
2
3
|
import { useMongocampApi } from "./mongocampApi.mjs";
|
|
3
4
|
import { useMongocampStorage } from "./mongocampStorage.mjs";
|
|
4
5
|
import { useMongocampUser } from "./mongocampUser.mjs";
|
|
@@ -19,6 +20,7 @@ export function useMongocampAuth() {
|
|
|
19
20
|
const result = await authApi.refreshToken();
|
|
20
21
|
updateUserState(result);
|
|
21
22
|
} catch (e) {
|
|
23
|
+
consola.log(e);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
function updateUserState(result) {
|
|
@@ -2,6 +2,9 @@ import type { FindRequest, MongoFindRequest } from '../api';
|
|
|
2
2
|
export declare function useMongocampSearch(): {
|
|
3
3
|
mongoFindRequest: (filter?: object, sort?: object, projection?: object) => MongoFindRequest;
|
|
4
4
|
findRequest: (collection: string, searchParameter?: MongoFindRequest, rows?: number, actualPage?: number) => FindRequest;
|
|
5
|
+
find: (collectionName: string, filter: string | undefined, page?: number, sort?: string[] | undefined, projection?: string[] | undefined, rowsPerPage?: number) => Promise<{
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
}[]>;
|
|
5
8
|
findAll: (collectionName: string, page?: number, sort?: string[] | undefined, projection?: string[] | undefined, rowsPerPage?: number) => Promise<{
|
|
6
9
|
[key: string]: string;
|
|
7
10
|
}[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useMongocampApi } from "./mongocampApi.mjs";
|
|
2
1
|
import { useRuntimeConfig } from "#app";
|
|
2
|
+
import { useMongocampApi } from "./mongocampApi.mjs";
|
|
3
3
|
export function useMongocampSearch() {
|
|
4
4
|
const { documentApi } = useMongocampApi();
|
|
5
5
|
const config = useRuntimeConfig();
|
|
@@ -19,5 +19,5 @@ export function useMongocampSearch() {
|
|
|
19
19
|
const expression = `${field}: ${value}`;
|
|
20
20
|
return find(collectionName, expression, page, sort, projection, rowsPerPage);
|
|
21
21
|
}
|
|
22
|
-
return { mongoFindRequest, findRequest, findAll, findByField };
|
|
22
|
+
return { mongoFindRequest, findRequest, find, findAll, findByField };
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sfxcode/nuxt-mongocamp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,28 +17,38 @@
|
|
|
17
17
|
"build": {
|
|
18
18
|
"failOnWarn": false
|
|
19
19
|
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepack": "nuxt-module-build build",
|
|
22
|
+
"dev": "nuxi dev playground",
|
|
23
|
+
"dev:build": "nuxi build playground",
|
|
24
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
25
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish --access public && git push --follow-tags",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest watch",
|
|
29
|
+
"test:coverage": "vitest run --coverage",
|
|
30
|
+
"test:update": "vitest run --update",
|
|
31
|
+
"test:update:watch": "vitest run --update --watch",
|
|
32
|
+
"api-codegen": "openapi-generator-cli generate -i ./openapi/docs.yaml -g typescript-fetch -o src/runtime/api --additional-properties=typescriptThreePlus=true,supportsES6=true"
|
|
33
|
+
},
|
|
20
34
|
"dependencies": {
|
|
21
35
|
"@nuxt/kit": "^3.10.3",
|
|
22
36
|
"@vueuse/nuxt": "^10.9.0"
|
|
23
37
|
},
|
|
24
38
|
"devDependencies": {
|
|
25
|
-
"@iconify-json/
|
|
39
|
+
"@iconify-json/bx": "^1.1.10",
|
|
40
|
+
"@nuxt/devtools": "^1.0.8",
|
|
41
|
+
"@nuxt/eslint-config": "^0.2.0",
|
|
26
42
|
"@nuxt/module-builder": "^0.5.5",
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@types/node": "^20.11.
|
|
30
|
-
"@unocss/nuxt": "^0.58.
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"nuxt": "^3.10.3"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"dev:build": "nuxi build playground",
|
|
38
|
-
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
|
|
39
|
-
"dev:start": "node playground/.output/server/index.mjs",
|
|
40
|
-
"lint:show": "eslint ./src/runtime",
|
|
41
|
-
"lint:fix": "eslint --fix ./src/runtime",
|
|
42
|
-
"api-codegen": "openapi-generator-cli generate -i ./openapi/docs.yaml -g typescript-fetch -o src/runtime/api --additional-properties=typescriptThreePlus=true,supportsES6=true"
|
|
43
|
+
"@nuxt/schema": "^3.10.3",
|
|
44
|
+
"@nuxt/test-utils": "^3.11.0",
|
|
45
|
+
"@types/node": "^20.11.28",
|
|
46
|
+
"@unocss/nuxt": "^0.58.6",
|
|
47
|
+
"changelogen": "^0.5.5",
|
|
48
|
+
"eslint": "^8.57.0",
|
|
49
|
+
"nuxt": "^3.10.3",
|
|
50
|
+
"nuxt-primevue": "^0.3.1",
|
|
51
|
+
"primeicons": "^6.0.1",
|
|
52
|
+
"vitest": "^1.4.0"
|
|
43
53
|
}
|
|
44
54
|
}
|