transactions-mongoose
Advanced tools
Comparing version 1.2.6 to 1.2.7
{ | ||
"name": "transactions-mongoose", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"description": "Transactions for mongoose", | ||
"main": "index.js", | ||
"types": "types/index.d.ts", | ||
"repository": { | ||
@@ -36,9 +37,10 @@ "type": "git", | ||
"scripts": { | ||
"test": "npm run test:insert && npm run test:update && npm run test:execute && npm run test:session", | ||
"test:insert": "node examples/create-insert.test.js", | ||
"test:update": "node examples/update-existing.test.js", | ||
"test:execute": "node examples/execute.test.js", | ||
"test:session": "node examples/sessions.test.js", | ||
"test:mocha": "mocha examples/*.test.js" | ||
"test": "npm run test:tsd && npm run test:insert && npm run test:update && npm run test:execute && npm run test:session", | ||
"test:insert": "node ./tests/create-insert.test.js", | ||
"test:update": "node ./tests/update-existing.test.js", | ||
"test:execute": "node ./tests/execute.test.js", | ||
"test:session": "node ./tests/sessions.test.js", | ||
"test:mocha": "mocha ./tests/*.test.js", | ||
"test:tsd": "npx tsd" | ||
} | ||
} |
@@ -45,3 +45,3 @@ # 🇺🇦 Transactions for mongoose | ||
### [Create / Insert new document](https://github.com/rosbitskyy/transactions-mongoose/blob/main/examples/create-insert.js) | ||
### [Create / Insert new document](https://github.com/rosbitskyy/transactions-mongoose/blob/main/tests/create-insert.js) | ||
```javascript | ||
@@ -80,3 +80,3 @@ const {Transaction} = require("transactions-mongoose"); | ||
### [Update an existing one](https://github.com/rosbitskyy/transactions-mongoose/blob/main/examples/update-existing.js) | ||
### [Update an existing one](https://github.com/rosbitskyy/transactions-mongoose/blob/main/tests/update-existing.js) | ||
```javascript | ||
@@ -113,3 +113,3 @@ const {Transaction} = require("transactions-mongoose"); | ||
### [Executing an isolated block that may fail is not related to Mongo but affects whether the data is saved or not.](https://github.com/rosbitskyy/transactions-mongoose/blob/main/examples/execute.js) | ||
### [Executing an isolated block that may fail is not related to Mongo but affects whether the data is saved or not.](https://github.com/rosbitskyy/transactions-mongoose/blob/main/tests/execute.js) | ||
```javascript | ||
@@ -159,3 +159,3 @@ const fetch = require("node-fetch"); | ||
### [With session executor](https://github.com/rosbitskyy/transactions-mongoose/blob/main/examples/sessions.js) | ||
### [With session executor](https://github.com/rosbitskyy/transactions-mongoose/blob/main/tests/sessions.js) | ||
@@ -162,0 +162,0 @@ To use with Mongo Replica set |
@@ -247,2 +247,5 @@ /* | ||
/** | ||
* @return {boolean} | ||
*/ | ||
get isExecutor() { | ||
@@ -252,2 +255,5 @@ return !!this.function; | ||
/** | ||
* @return {string} | ||
*/ | ||
get type() { | ||
@@ -273,3 +279,3 @@ return this.data.constructor.name.replace('Async', '') | ||
/** | ||
* @return {{[]: SchemaConstructor}} | ||
* @return {object} | ||
*/ | ||
@@ -285,3 +291,3 @@ get schema() { | ||
/** | ||
* @return {{any}} | ||
* @return {object} | ||
*/ | ||
@@ -288,0 +294,0 @@ get modifiedData() { |
@@ -160,7 +160,7 @@ /// <reference types="mongoose/types/aggregate" /> | ||
get type(): any; | ||
get type(): string; | ||
get transaction(): Transaction; | ||
get uniqueFields(): [string]; | ||
get uniqueFields(): string[]; | ||
@@ -173,5 +173,5 @@ /** | ||
/** | ||
* @return {{[]: SchemaConstructor}} | ||
* @return {Namespace.Schema} | ||
*/ | ||
get schema(): {}; | ||
get schema(): object; | ||
@@ -181,7 +181,5 @@ get schemaFields(): string[]; | ||
/** | ||
* @return {{any}} | ||
* @return {object} | ||
*/ | ||
get modifiedData(): { | ||
any: any; | ||
}; | ||
get modifiedData(): object; | ||
@@ -278,3 +276,3 @@ /** | ||
_ABSTRACT: string; | ||
_doc: {}; | ||
_doc: object; | ||
isNew: boolean; | ||
@@ -281,0 +279,0 @@ model: any; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87187
22
1588