@atscript/db-mongo 0.1.43 → 0.1.45
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/index.cjs +1 -2
- package/dist/index.mjs +1 -2
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1622,8 +1622,7 @@ var MongoAdapter = class MongoAdapter extends _atscript_db.BaseDbAdapter {
|
|
|
1622
1622
|
}))?.seq ?? count;
|
|
1623
1623
|
if (seq === count) {
|
|
1624
1624
|
const currentMax = await this._getCurrentFieldMax(field);
|
|
1625
|
-
const
|
|
1626
|
-
const effectiveBase = Math.max(minStart, currentMax + 1);
|
|
1625
|
+
const effectiveBase = Math.max(typeof startValue === "number" ? startValue : 1, currentMax + 1);
|
|
1627
1626
|
if (effectiveBase > seq) {
|
|
1628
1627
|
const adjusted = effectiveBase + count - 1;
|
|
1629
1628
|
await counters.updateOne({ _id: counterId }, { $max: { seq: adjusted } });
|
package/dist/index.mjs
CHANGED
|
@@ -1621,8 +1621,7 @@ var MongoAdapter = class MongoAdapter extends BaseDbAdapter {
|
|
|
1621
1621
|
}))?.seq ?? count;
|
|
1622
1622
|
if (seq === count) {
|
|
1623
1623
|
const currentMax = await this._getCurrentFieldMax(field);
|
|
1624
|
-
const
|
|
1625
|
-
const effectiveBase = Math.max(minStart, currentMax + 1);
|
|
1624
|
+
const effectiveBase = Math.max(typeof startValue === "number" ? startValue : 1, currentMax + 1);
|
|
1626
1625
|
if (effectiveBase > seq) {
|
|
1627
1626
|
const adjusted = effectiveBase + count - 1;
|
|
1628
1627
|
await counters.updateOne({ _id: counterId }, { $max: { seq: adjusted } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-mongo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"description": "Mongodb plugin for atscript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@atscript/core": "^0.1.
|
|
55
|
-
"@atscript/typescript": "^0.1.
|
|
54
|
+
"@atscript/core": "^0.1.44",
|
|
55
|
+
"@atscript/typescript": "^0.1.44",
|
|
56
56
|
"mongodb": "^6.17.0",
|
|
57
|
-
"unplugin-atscript": "^0.1.
|
|
57
|
+
"unplugin-atscript": "^0.1.44"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atscript/core": "^0.1.
|
|
61
|
-
"@atscript/typescript": "^0.1.
|
|
60
|
+
"@atscript/core": "^0.1.44",
|
|
61
|
+
"@atscript/typescript": "^0.1.44",
|
|
62
62
|
"mongodb": "^6.17.0",
|
|
63
|
-
"@atscript/db": "^0.1.
|
|
63
|
+
"@atscript/db": "^0.1.45"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"postinstall": "asc -f dts",
|