@sfxcode/nuxt-mongocamp-server 1.1.1 → 1.1.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "configKey": "mongocamp",
5
5
  "compatibility": {
6
6
  "nuxt": "^3.0.0"
package/dist/module.mjs CHANGED
@@ -534,7 +534,7 @@ function createConsola(options = {}) {
534
534
  const consola = createConsola();
535
535
 
536
536
  const name = "@sfxcode/nuxt-mongocamp-server";
537
- const version = "1.1.1";
537
+ const version = "1.1.2";
538
538
 
539
539
  const module = defineNuxtModule({
540
540
  meta: {
@@ -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.1.1",
3
+ "version": "1.1.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {