@atscript/db-mongo 0.1.191 → 0.1.192

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 CHANGED
@@ -2760,6 +2760,7 @@ var MongoAdapter = class MongoAdapter extends _atscript_db.BaseDbAdapter {
2760
2760
  const fieldType = _fieldType;
2761
2761
  const tags = fieldType.type.tags;
2762
2762
  if (tags?.has("objectId") && tags?.has("mongo")) return id instanceof mongodb.ObjectId ? id : new mongodb.ObjectId(id);
2763
+ if ((0, _atscript_db.resolveDesignType)(fieldType) === "boolean") return id;
2763
2764
  if (fieldType.type.kind === "") {
2764
2765
  if (fieldType.type.designType === "number") return Number(id);
2765
2766
  }
package/dist/index.mjs CHANGED
@@ -2759,6 +2759,7 @@ var MongoAdapter = class MongoAdapter extends BaseDbAdapter {
2759
2759
  const fieldType = _fieldType;
2760
2760
  const tags = fieldType.type.tags;
2761
2761
  if (tags?.has("objectId") && tags?.has("mongo")) return id instanceof ObjectId ? id : new ObjectId(id);
2762
+ if (resolveDesignType(fieldType) === "boolean") return id;
2762
2763
  if (fieldType.type.kind === "") {
2763
2764
  if (fieldType.type.designType === "number") return Number(id);
2764
2765
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-mongo",
3
- "version": "0.1.191",
3
+ "version": "0.1.192",
4
4
  "description": "Mongodb plugin for atscript.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -46,19 +46,19 @@
46
46
  "access": "public"
47
47
  },
48
48
  "devDependencies": {
49
- "@atscript/core": "^0.2.18",
50
- "@atscript/typescript": "^0.2.18",
49
+ "@atscript/core": "^0.2.19",
50
+ "@atscript/typescript": "^0.2.19",
51
51
  "@uniqu/core": "^0.2.2",
52
52
  "mongodb": "^6.17.0",
53
53
  "mongodb-memory-server-core": "^10.0.0",
54
- "unplugin-atscript": "^0.2.18"
54
+ "unplugin-atscript": "^0.2.19"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atscript/core": "^0.2.18",
58
- "@atscript/typescript": "^0.2.18",
57
+ "@atscript/core": "^0.2.19",
58
+ "@atscript/typescript": "^0.2.19",
59
59
  "@uniqu/core": "^0.2.2",
60
60
  "mongodb": "^6.17.0",
61
- "@atscript/db": "^0.1.191"
61
+ "@atscript/db": "^0.1.192"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "vp pack",