@atscript/db-mongo 0.1.111 → 0.1.113
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 +2 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -2417,7 +2417,9 @@ function createAdapter(connection, _options) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
//#endregion
|
|
2419
2419
|
exports.CollectionPatcher = CollectionPatcher;
|
|
2420
|
+
exports.INDEX_PREFIX = INDEX_PREFIX;
|
|
2420
2421
|
exports.MongoAdapter = MongoAdapter;
|
|
2421
2422
|
exports.buildMongoFilter = require_mongo_filter.buildMongoFilter;
|
|
2422
2423
|
exports.createAdapter = createAdapter;
|
|
2424
|
+
exports.mongoIndexKey = mongoIndexKey;
|
|
2423
2425
|
exports.validateMongoIdPlugin = validateMongoIdPlugin;
|
package/dist/index.d.cts
CHANGED
|
@@ -145,6 +145,7 @@ declare class CollectionPatcher {
|
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
147
147
|
//#region src/lib/mongo-types.d.ts
|
|
148
|
+
declare const INDEX_PREFIX = "atscript__";
|
|
148
149
|
interface TPlainIndex {
|
|
149
150
|
key: string;
|
|
150
151
|
name: string;
|
|
@@ -185,6 +186,7 @@ interface TSearchIndex {
|
|
|
185
186
|
strategy?: "compound" | "autocomplete" | "text";
|
|
186
187
|
}
|
|
187
188
|
type TMongoIndex = TPlainIndex | TSearchIndex;
|
|
189
|
+
declare function mongoIndexKey(type: TMongoIndex["type"], name: string): string;
|
|
188
190
|
type TVectorSimilarity = "cosine" | "euclidean" | "dotProduct";
|
|
189
191
|
/**
|
|
190
192
|
* One Atlas Search field-type mapping. `type: "string"` is plain word matching;
|
|
@@ -457,4 +459,4 @@ declare const validateMongoIdPlugin: TValidatorPlugin;
|
|
|
457
459
|
//#region src/lib/index.d.ts
|
|
458
460
|
declare function createAdapter(connection: string, _options?: Record<string, unknown>): DbSpace;
|
|
459
461
|
//#endregion
|
|
460
|
-
export { CollectionPatcher, MongoAdapter, TCollectionPatcherContext, type TMongoIndex, type TMongoSearchIndexDefinition, type TPlainIndex, type TSearchIndex, buildMongoFilter, createAdapter, validateMongoIdPlugin };
|
|
462
|
+
export { CollectionPatcher, INDEX_PREFIX, MongoAdapter, TCollectionPatcherContext, type TMongoIndex, type TMongoSearchIndexDefinition, type TPlainIndex, type TSearchIndex, buildMongoFilter, createAdapter, mongoIndexKey, validateMongoIdPlugin };
|
package/dist/index.d.mts
CHANGED
|
@@ -145,6 +145,7 @@ declare class CollectionPatcher {
|
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
147
147
|
//#region src/lib/mongo-types.d.ts
|
|
148
|
+
declare const INDEX_PREFIX = "atscript__";
|
|
148
149
|
interface TPlainIndex {
|
|
149
150
|
key: string;
|
|
150
151
|
name: string;
|
|
@@ -185,6 +186,7 @@ interface TSearchIndex {
|
|
|
185
186
|
strategy?: "compound" | "autocomplete" | "text";
|
|
186
187
|
}
|
|
187
188
|
type TMongoIndex = TPlainIndex | TSearchIndex;
|
|
189
|
+
declare function mongoIndexKey(type: TMongoIndex["type"], name: string): string;
|
|
188
190
|
type TVectorSimilarity = "cosine" | "euclidean" | "dotProduct";
|
|
189
191
|
/**
|
|
190
192
|
* One Atlas Search field-type mapping. `type: "string"` is plain word matching;
|
|
@@ -457,4 +459,4 @@ declare const validateMongoIdPlugin: TValidatorPlugin;
|
|
|
457
459
|
//#region src/lib/index.d.ts
|
|
458
460
|
declare function createAdapter(connection: string, _options?: Record<string, unknown>): DbSpace;
|
|
459
461
|
//#endregion
|
|
460
|
-
export { CollectionPatcher, MongoAdapter, TCollectionPatcherContext, type TMongoIndex, type TMongoSearchIndexDefinition, type TPlainIndex, type TSearchIndex, buildMongoFilter, createAdapter, validateMongoIdPlugin };
|
|
462
|
+
export { CollectionPatcher, INDEX_PREFIX, MongoAdapter, TCollectionPatcherContext, type TMongoIndex, type TMongoSearchIndexDefinition, type TPlainIndex, type TSearchIndex, buildMongoFilter, createAdapter, mongoIndexKey, validateMongoIdPlugin };
|
package/dist/index.mjs
CHANGED
|
@@ -2415,4 +2415,4 @@ function createAdapter(connection, _options) {
|
|
|
2415
2415
|
return new DbSpace(() => new MongoAdapter(db, client));
|
|
2416
2416
|
}
|
|
2417
2417
|
//#endregion
|
|
2418
|
-
export { CollectionPatcher, MongoAdapter, buildMongoFilter, createAdapter, validateMongoIdPlugin };
|
|
2418
|
+
export { CollectionPatcher, INDEX_PREFIX, MongoAdapter, buildMongoFilter, createAdapter, mongoIndexKey, validateMongoIdPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-mongo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.113",
|
|
4
4
|
"description": "Mongodb plugin for atscript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@atscript/core": "^0.1.
|
|
50
|
-
"@atscript/typescript": "^0.1.
|
|
49
|
+
"@atscript/core": "^0.1.80",
|
|
50
|
+
"@atscript/typescript": "^0.1.80",
|
|
51
51
|
"mongodb": "^6.17.0",
|
|
52
52
|
"mongodb-memory-server-core": "^10.0.0",
|
|
53
|
-
"unplugin-atscript": "^0.1.
|
|
53
|
+
"unplugin-atscript": "^0.1.80"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atscript/core": "^0.1.
|
|
57
|
-
"@atscript/typescript": "^0.1.
|
|
56
|
+
"@atscript/core": "^0.1.80",
|
|
57
|
+
"@atscript/typescript": "^0.1.80",
|
|
58
58
|
"mongodb": "^6.17.0",
|
|
59
|
-
"@atscript/db": "^0.1.
|
|
59
|
+
"@atscript/db": "^0.1.113"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"postinstall": "asc -f dts",
|