assai 0.4.3 → 0.4.4

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.
@@ -10,7 +10,7 @@
10
10
  * @param {string} name
11
11
  * @param {IcreateCollectionOptions<T>} [options]
12
12
  */
13
- export function createMongoCollection<T extends import("../types.js").MongoDocument>(name: string, options?: IcreateCollectionOptions<T> | undefined): Promise<{
13
+ export function createMongoCollection<T extends import("../types.js").MongoDocument>(name: string, options?: IcreateCollectionOptions<T> | undefined): {
14
14
  /**
15
15
  * Returns the native driver.
16
16
  */
@@ -71,7 +71,7 @@ export function createMongoCollection<T extends import("../types.js").MongoDocum
71
71
  * @param {import('mongodb').UpdateFilter<T>} update
72
72
  */
73
73
  updateMany: (query: import("mongodb").Filter<T>, update: import("mongodb").UpdateFilter<T>) => Promise<boolean>;
74
- }>;
74
+ };
75
75
  export type IcollectionGetter<T extends import("../types.js").MongoDocument> = () => Promise<Collection<T>>;
76
76
  export type IcreateCollectionOptions<T extends import("../types.js").MongoDocument> = {
77
77
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assai",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "repository": {
5
5
  "url": "https://github.com/TimeLord2010/assai",
6
6
  "type": "git"
@@ -9,7 +9,7 @@
9
9
  "main": "index.mjs",
10
10
  "types": "dist/index.d.mts",
11
11
  "scripts": {
12
- "prepare": "tsc -p ./jsconfig.prod.json",
12
+ "prepare": "rm -rf dist && tsc -p ./jsconfig.prod.json",
13
13
  "start": "node --env-file=.env index.mjs",
14
14
  "test": "node --env-file=.env --test"
15
15
  },
@@ -19,7 +19,7 @@ import {
19
19
  * @param {string} name
20
20
  * @param {IcreateCollectionOptions<T>} [options]
21
21
  */
22
- export async function createMongoCollection(name, options = {}) {
22
+ export function createMongoCollection(name, options = {}) {
23
23
 
24
24
  /** @type {Collection<T> | null} */
25
25
  let _collection = null