@ewb/mongoose-query-express 0.0.2 → 0.0.3

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 CHANGED
@@ -22,6 +22,3 @@ user.post('/', userQuery.post);
22
22
  user.patch('/:id', userQuery.patch);
23
23
  user.delete('/:id', userQuery.delete); // Can also use userQuery.archive if archive option set.
24
24
  ```
25
-
26
- // This is used to set some logic for query to that model. Model for query is set in the controllers.
27
-
@@ -2,7 +2,7 @@ import { QueryError } from '@ewb/mongoose-query';
2
2
  import httpStatus from 'http-status';
3
3
  import mongoose from 'mongoose';
4
4
  import { QueryExpressSub } from './QueryExpressSub.js';
5
- import { pageLinkHeader } from './utils';
5
+ import { pageLinkHeader } from './utils.js';
6
6
  export class QueryExpress {
7
7
  constructor(param, handler, options = {}) {
8
8
  this.param = param;
@@ -1,7 +1,7 @@
1
1
  import { QueryError } from '@ewb/mongoose-query';
2
2
  import httpStatus from 'http-status';
3
3
  import mongoose from 'mongoose';
4
- import { pageLinkHeader } from './utils';
4
+ import { pageLinkHeader } from './utils.js';
5
5
  export class QueryExpressSub {
6
6
  constructor(handler, express, reqKey, param) {
7
7
  this.handler = handler;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import './declarations';
1
+ import './declarations.js';
2
2
  import { Request, NextFunction, Response } from 'express';
3
3
  export * from './QueryExpress.js';
4
4
  declare function queryExpress(req: Request, _res: Response, next: NextFunction): void;
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './declarations';
1
+ import './declarations.js';
2
2
  import { Query } from '@ewb/mongoose-query';
3
3
  export * from './QueryExpress.js';
4
4
  function queryExpress(req, _res, next) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ewb/mongoose-query-express",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "description": "Routes and controllers for express to handle mongoose queries",
6
6
  "main": "./lib/index.js",