@event-driven-io/pongo 0.17.0-beta.35 → 0.17.0-beta.36
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/cli.cjs +311 -494
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +4 -4
- package/dist/cli.d.ts +4 -3
- package/dist/cli.js +279 -494
- package/dist/cli.js.map +1 -1
- package/dist/cloudflare.cjs +36 -48
- package/dist/cloudflare.cjs.map +1 -1
- package/dist/cloudflare.d.cts +7 -7
- package/dist/cloudflare.d.ts +7 -7
- package/dist/cloudflare.js +29 -47
- package/dist/cloudflare.js.map +1 -1
- package/dist/core-CwxxuUAn.cjs +1590 -0
- package/dist/core-CwxxuUAn.cjs.map +1 -0
- package/dist/core-D_iZiiYe.js +1308 -0
- package/dist/core-D_iZiiYe.js.map +1 -0
- package/dist/core-DwoTLYbR.cjs +319 -0
- package/dist/core-DwoTLYbR.cjs.map +1 -0
- package/dist/core-fsJmsQDa.js +307 -0
- package/dist/core-fsJmsQDa.js.map +1 -0
- package/dist/index-DMq6F3x9.d.ts +705 -0
- package/dist/index-Du_IHXAj.d.ts +10 -0
- package/dist/index-ZKOB86ub.d.cts +10 -0
- package/dist/index-qeC-p0Tq.d.cts +705 -0
- package/dist/index.cjs +61 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -130
- package/dist/index.d.ts +11 -130
- package/dist/index.js +14 -119
- package/dist/index.js.map +1 -1
- package/dist/pg.cjs +214 -320
- package/dist/pg.cjs.map +1 -1
- package/dist/pg.d.cts +24 -22
- package/dist/pg.d.ts +24 -22
- package/dist/pg.js +209 -321
- package/dist/pg.js.map +1 -1
- package/dist/shim.cjs +281 -367
- package/dist/shim.cjs.map +1 -1
- package/dist/shim.d.cts +140 -137
- package/dist/shim.d.ts +140 -137
- package/dist/shim.js +275 -366
- package/dist/shim.js.map +1 -1
- package/dist/sqlite3.cjs +41 -56
- package/dist/sqlite3.cjs.map +1 -1
- package/dist/sqlite3.d.cts +9 -9
- package/dist/sqlite3.d.ts +9 -9
- package/dist/sqlite3.js +35 -56
- package/dist/sqlite3.js.map +1 -1
- package/package.json +15 -15
- package/dist/chunk-EQ3T4XHT.cjs +0 -1583
- package/dist/chunk-EQ3T4XHT.cjs.map +0 -1
- package/dist/chunk-H6YIW5C5.js +0 -399
- package/dist/chunk-H6YIW5C5.js.map +0 -1
- package/dist/chunk-NTHMSHNG.cjs +0 -399
- package/dist/chunk-NTHMSHNG.cjs.map +0 -1
- package/dist/chunk-NWYI26VT.js +0 -1583
- package/dist/chunk-NWYI26VT.js.map +0 -1
- package/dist/index-BfBszcG4.d.ts +0 -8
- package/dist/index-a-fxODW1.d.cts +0 -8
- package/dist/pongoTransactionCache-CRuPGag3.d.cts +0 -556
- package/dist/pongoTransactionCache-CRuPGag3.d.ts +0 -556
package/dist/index.cjs
CHANGED
|
@@ -1,124 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_core = require('./core-CwxxuUAn.cjs');
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var _chunkEQ3T4XHTcjs = require('./chunk-EQ3T4XHT.cjs');
|
|
50
|
-
|
|
51
|
-
// src/index.ts
|
|
4
|
+
//#region src/index.ts
|
|
52
5
|
pongoDriverRegistry.register(`PostgreSQL:pg`, () => loadPongoClient("pg"));
|
|
53
|
-
pongoDriverRegistry.register(
|
|
54
|
-
`SQLite:sqlite3`,
|
|
55
|
-
() => loadPongoClient("sqlite3")
|
|
56
|
-
);
|
|
6
|
+
pongoDriverRegistry.register(`SQLite:sqlite3`, () => loadPongoClient("sqlite3"));
|
|
57
7
|
pongoDriverRegistry.register(`SQLite:d1`, () => loadPongoClient("d1"));
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
} else {
|
|
67
|
-
throw new Error(`Unknown path: ${path}`);
|
|
68
|
-
}
|
|
69
|
-
if (!module.pongoDriver) {
|
|
70
|
-
throw new Error(`Failed to load Pongo client for ${path}`);
|
|
71
|
-
}
|
|
72
|
-
return module.pongoDriver;
|
|
8
|
+
const loadPongoClient = async (path) => {
|
|
9
|
+
let module;
|
|
10
|
+
if (path === "pg") module = await Promise.resolve().then(() => require("./pg.cjs"));
|
|
11
|
+
else if (path === "sqlite3") module = await Promise.resolve().then(() => require("./sqlite3.cjs"));
|
|
12
|
+
else if (path === "d1") module = await Promise.resolve().then(() => require("./cloudflare.cjs"));
|
|
13
|
+
else throw new Error(`Unknown path: ${path}`);
|
|
14
|
+
if (!module.pongoDriver) throw new Error(`Failed to load Pongo client for ${path}`);
|
|
15
|
+
return module.pongoDriver;
|
|
73
16
|
};
|
|
74
17
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
exports.
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.ConcurrencyError = require_core.ConcurrencyError;
|
|
20
|
+
exports.DOCUMENT_DOES_NOT_EXIST = require_core.DOCUMENT_DOES_NOT_EXIST;
|
|
21
|
+
exports.DOCUMENT_EXISTS = require_core.DOCUMENT_EXISTS;
|
|
22
|
+
exports.DocumentCommandHandler = require_core.DocumentCommandHandler;
|
|
23
|
+
exports.NO_CONCURRENCY_CHECK = require_core.NO_CONCURRENCY_CHECK;
|
|
24
|
+
exports.ObjectId = require_core.ObjectId;
|
|
25
|
+
exports.OperatorMap = require_core.OperatorMap;
|
|
26
|
+
exports.PongoCollectionSchemaComponent = require_core.PongoCollectionSchemaComponent;
|
|
27
|
+
exports.PongoDatabase = require_core.PongoDatabase;
|
|
28
|
+
exports.PongoDatabaseCache = require_core.PongoDatabaseCache;
|
|
29
|
+
exports.PongoDatabaseSchemaComponent = require_core.PongoDatabaseSchemaComponent;
|
|
30
|
+
exports.PongoDriverRegistry = require_core.PongoDriverRegistry;
|
|
31
|
+
exports.PongoError = require_core.PongoError;
|
|
32
|
+
exports.QueryOperators = require_core.QueryOperators;
|
|
33
|
+
exports.deepEquals = require_core.deepEquals;
|
|
34
|
+
exports.expectedVersion = require_core.expectedVersion;
|
|
35
|
+
exports.expectedVersionValue = require_core.expectedVersionValue;
|
|
36
|
+
exports.getIdsFromIdOnlyFilter = require_core.getIdsFromIdOnlyFilter;
|
|
37
|
+
exports.hasOperators = require_core.hasOperators;
|
|
38
|
+
exports.idFromFilter = require_core.idFromFilter;
|
|
39
|
+
exports.identityMapCache = require_core.identityMapCache;
|
|
40
|
+
exports.isEquatable = require_core.isEquatable;
|
|
41
|
+
exports.isGeneralExpectedDocumentVersion = require_core.isGeneralExpectedDocumentVersion;
|
|
42
|
+
exports.isNumber = require_core.isNumber;
|
|
43
|
+
exports.isOperator = require_core.isOperator;
|
|
44
|
+
exports.isString = require_core.isString;
|
|
45
|
+
exports.loadPongoClient = loadPongoClient;
|
|
46
|
+
exports.lruCache = require_core.lruCache;
|
|
47
|
+
exports.mapAsync = require_core.mapAsync;
|
|
48
|
+
exports.mapParallel = require_core.mapParallel;
|
|
49
|
+
exports.mapSequential = require_core.mapSequential;
|
|
50
|
+
exports.noopCacheProvider = require_core.noopCacheProvider;
|
|
51
|
+
exports.objectEntries = require_core.objectEntries;
|
|
52
|
+
exports.operationResult = require_core.operationResult;
|
|
53
|
+
exports.pongoCache = require_core.pongoCache;
|
|
54
|
+
exports.pongoCacheWrapper = require_core.pongoCacheWrapper;
|
|
55
|
+
exports.pongoClient = require_core.pongoClient;
|
|
56
|
+
exports.pongoCollection = require_core.pongoCollection;
|
|
57
|
+
exports.pongoDriverRegistry = require_core.pongoDriverRegistry;
|
|
58
|
+
exports.pongoSchema = require_core.pongoSchema;
|
|
59
|
+
exports.pongoSession = require_core.pongoSession;
|
|
60
|
+
exports.pongoTransaction = require_core.pongoTransaction;
|
|
61
|
+
exports.pongoTransactionCache = require_core.pongoTransactionCache;
|
|
62
|
+
exports.proxyClientWithSchema = require_core.proxyClientWithSchema;
|
|
63
|
+
exports.proxyPongoDbWithSchema = require_core.proxyPongoDbWithSchema;
|
|
64
|
+
exports.toClientSchemaMetadata = require_core.toClientSchemaMetadata;
|
|
65
|
+
exports.toDbSchemaMetadata = require_core.toDbSchemaMetadata;
|
|
66
|
+
exports.transactionExecutorOrDefault = require_core.transactionExecutorOrDefault;
|
|
124
67
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { AnyPongoDriver } from './core';\n\nexport * from './core';\n\npongoDriverRegistry.register(`PostgreSQL:pg`, () => loadPongoClient('pg'));\npongoDriverRegistry.register(`SQLite:sqlite3`, () =>\n loadPongoClient('sqlite3'),\n);\npongoDriverRegistry.register(`SQLite:d1`, () => loadPongoClient('d1'));\n\nexport const loadPongoClient = async (\n path: 'pg' | 'sqlite3' | 'd1',\n): Promise<AnyPongoDriver> => {\n let module;\n\n if (path === 'pg') {\n module = await import('./pg');\n } else if (path === 'sqlite3') {\n module = await import('./sqlite3');\n } else if (path === 'd1') {\n module = await import('./cloudflare');\n } else {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n throw new Error(`Unknown path: ${path}`);\n }\n\n if (!module.pongoDriver) {\n throw new Error(`Failed to load Pongo client for ${path}`);\n }\n\n return module.pongoDriver;\n};\n"],"mappings":";;;;AAIA,oBAAoB,SAAS,uBAAuB,gBAAgB,KAAK,CAAC;AAC1E,oBAAoB,SAAS,wBAC3B,gBAAgB,UAAU,CAC3B;AACD,oBAAoB,SAAS,mBAAmB,gBAAgB,KAAK,CAAC;AAEtE,MAAa,kBAAkB,OAC7B,SAC4B;CAC5B,IAAI;AAEJ,KAAI,SAAS,KACX,UAAS,2CAAM;UACN,SAAS,UAClB,UAAS,2CAAM;UACN,SAAS,KAClB,UAAS,2CAAM;KAGf,OAAM,IAAI,MAAM,iBAAiB,OAAO;AAG1C,KAAI,CAAC,OAAO,YACV,OAAM,IAAI,MAAM,mCAAmC,OAAO;AAG5D,QAAO,OAAO"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,140 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { $ as $inc, v as $push, w as $set, x as $unset, y as AlternativeType, z as AnyPongoDriverOptions, B as BatchHandleOptions, D as CacheOptions, F as CacheSettings, G as CacheType, H as CollectionsMap, I as Condition, J as DBsMap, K as DOCUMENT_DOES_NOT_EXIST, L as DOCUMENT_EXISTS, M as DeleteManyOptions, N as DeleteOneOptions, O as Document, Q as DocumentCommandHandler, R as DocumentCommandHandlerInput, S as DocumentCommandHandlerOptions, T as DocumentHandler, U as EnhancedOmit, V as ExpectedDocumentVersion, W as ExpectedDocumentVersionGeneral, X as ExpectedDocumentVersionValue, Y as ExtractPongoDriverOptions, Z as FindOptions, _ as HandleOptions, a0 as HasId, a1 as InferIdType, a2 as InsertManyOptions, a3 as InsertOneOptions, a4 as LRUCacheOptions, a5 as MaybePromise, a6 as NO_CONCURRENCY_CHECK, a7 as NonObjectIdLikeDocument, a8 as ObjectId, a9 as ObjectIdLike, aa as OperationResult, ab as OptionalId, ac as OptionalUnlessRequiredId, ad as OptionalUnlessRequiredIdAndVersion, ae as OptionalUnlessRequiredVersion, af as OptionalVersion, ag as PongoCacheSetEntry, ah as PongoCacheType, ai as PongoClientSchemaMetadata, aj as PongoCollectionSQLBuilder, ak as PongoCollectionSchemaComponentOptions, al as PongoCollectionSchemaMetadata, am as PongoCollectionURN, an as PongoCollectionURNType, ao as PongoDBCollectionOptions, ap as PongoDatabaseSQLBuilder, aq as PongoDatabaseSchemaComponentOptions, ar as PongoDatabaseURN, as as PongoDatabaseURNType, at as PongoDbOptions, au as PongoDbSchemaMetadata, av as PongoDbWithSchema, aw as PongoDeleteManyResult, ax as PongoDeleteResult, ay as PongoDocumentCacheKey, b as PongoDriverOptions, az as PongoDriverRegistry, aA as PongoFilterOperator, aB as PongoHandleResult, aC as PongoInsertManyResult, aD as PongoInsertOneResult, aE as PongoMigrationOptions, aF as PongoReplaceManyResult, aG as PongoSchemaConfig, aH as PongoTransactionCache, aI as PongoTransactionCacheOperationOptions, aJ as PongoUpdate, aK as PongoUpdateManyResult, aL as PongoUpdateResult, aM as RegExpOrString, aN as ReplaceManyOptions, aO as ReplaceOneOptions, aP as RootFilterOperators, aQ as UpdateManyOptions, aR as UpdateOneOptions, aS as WithId, aT as WithIdAndVersion, aU as WithVersion, aV as WithoutId, aW as WithoutIdAndVersion, aX as WithoutVersion, aY as expectedVersion, aZ as expectedVersionValue, a_ as isGeneralExpectedDocumentVersion, a$ as lruCache, b0 as operationResult, b1 as pongoCache, b2 as pongoDriverRegistry, b3 as pongoSchema, b4 as pongoTransactionCache, b5 as proxyClientWithSchema, b6 as proxyPongoDbWithSchema, b7 as toClientSchemaMetadata, b8 as toDbSchemaMetadata } from './pongoTransactionCache-CRuPGag3.cjs';
|
|
3
|
-
import { SQL, DatabaseDriverType, Dumbo, MigrationStyle, JSONSerializer, SQLExecutor, JSONSerializationOptions } from '@event-driven-io/dumbo';
|
|
4
|
-
import 'lru-cache';
|
|
5
|
-
|
|
6
|
-
type Entry<T> = {
|
|
7
|
-
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
8
|
-
}[keyof Required<T>];
|
|
9
|
-
type IterableEntry<T> = Entry<T> & {
|
|
10
|
-
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
11
|
-
};
|
|
12
|
-
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
13
|
-
type NonPartial<T> = {
|
|
14
|
-
[K in keyof Required<T>]: T[K];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
declare const idFromFilter: <T>(filter: PongoFilter<T> | SQL | undefined) => string | undefined;
|
|
18
|
-
declare const getIdsFromIdOnlyFilter: <T>(filter: PongoFilter<T> | SQL | undefined) => string[] | undefined;
|
|
19
|
-
|
|
20
|
-
type PongoCollectionOptions<T extends PongoDocument = PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType, Payload extends PongoDocument = T> = {
|
|
21
|
-
db: PongoDb<DriverType>;
|
|
22
|
-
collectionName: string;
|
|
23
|
-
pool: Dumbo<DatabaseDriverType>;
|
|
24
|
-
schemaComponent: PongoCollectionSchemaComponent;
|
|
25
|
-
schema?: {
|
|
26
|
-
autoMigration?: MigrationStyle;
|
|
27
|
-
versioning?: {
|
|
28
|
-
upcast?: (doc: Payload) => T;
|
|
29
|
-
downcast?: (doc: T) => Payload;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
errors?: {
|
|
33
|
-
throwOnOperationFailures?: boolean;
|
|
34
|
-
};
|
|
35
|
-
serializer: JSONSerializer;
|
|
36
|
-
cache?: CacheConfig | 'disabled' | PongoCache | undefined;
|
|
37
|
-
};
|
|
38
|
-
declare const transactionExecutorOrDefault: <DriverType extends DatabaseDriverType = DatabaseDriverType>(db: PongoDb<DriverType>, options: CollectionOperationOptions | undefined, defaultSqlExecutor: SQLExecutor) => Promise<SQLExecutor>;
|
|
39
|
-
declare const pongoCollection: <T extends PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType, Payload extends PongoDocument = T>({ db, collectionName, pool, schemaComponent, schema, errors, serializer, cache: cacheOptions, }: PongoCollectionOptions<T, DriverType, Payload>) => PongoCollection<T>;
|
|
40
|
-
|
|
41
|
-
declare const QueryOperators: {
|
|
42
|
-
$eq: string;
|
|
43
|
-
$gt: string;
|
|
44
|
-
$gte: string;
|
|
45
|
-
$lt: string;
|
|
46
|
-
$lte: string;
|
|
47
|
-
$ne: string;
|
|
48
|
-
$in: string;
|
|
49
|
-
$nin: string;
|
|
50
|
-
$elemMatch: string;
|
|
51
|
-
$all: string;
|
|
52
|
-
$size: string;
|
|
53
|
-
};
|
|
54
|
-
declare const OperatorMap: {
|
|
55
|
-
$gt: string;
|
|
56
|
-
$gte: string;
|
|
57
|
-
$lt: string;
|
|
58
|
-
$lte: string;
|
|
59
|
-
$ne: string;
|
|
60
|
-
};
|
|
61
|
-
declare const isOperator: (key: string) => boolean;
|
|
62
|
-
declare const hasOperators: (value: Record<string, unknown>) => boolean;
|
|
63
|
-
|
|
64
|
-
declare const identityMapCache: () => PongoCache;
|
|
65
|
-
|
|
66
|
-
declare const noopCacheProvider: PongoCache;
|
|
67
|
-
|
|
68
|
-
declare const pongoCacheWrapper: (options: {
|
|
69
|
-
provider: PongoCache;
|
|
70
|
-
hooks?: CacheHooks;
|
|
71
|
-
}) => PongoCache;
|
|
72
|
-
|
|
73
|
-
declare const PongoDatabaseCache: <Database extends PongoDb<DatabaseDriverType> = PongoDb<DatabaseDriverType>, TypedClientSchema extends PongoClientSchema = PongoClientSchema>({ driver, typedSchema, }: {
|
|
74
|
-
driver: PongoDriver<Database>;
|
|
75
|
-
typedSchema?: TypedClientSchema | undefined;
|
|
76
|
-
}) => {
|
|
77
|
-
getOrCreate: <CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema<PongoDocument>>>(createOptions: Omit<PongoDatabaseFactoryOptions<CollectionsSchema>, "schema"> & JSONSerializationOptions & {
|
|
78
|
-
schema?: {
|
|
79
|
-
autoMigration?: MigrationStyle;
|
|
80
|
-
};
|
|
81
|
-
}) => Database;
|
|
82
|
-
all: () => Database[];
|
|
83
|
-
forAll: (func: (db: Database) => Promise<void>) => Promise<void[]>;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
type PongoDatabaseOptions<DumboType extends Dumbo<DatabaseDriverType, any> = Dumbo<DatabaseDriverType, any>, CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema>> = {
|
|
87
|
-
databaseName: string;
|
|
88
|
-
pool: DumboType;
|
|
89
|
-
serializer: JSONSerializer;
|
|
90
|
-
schemaComponent: PongoDatabaseSchemaComponent<DumboType['driverType']>;
|
|
91
|
-
schema?: {
|
|
92
|
-
autoMigration?: MigrationStyle;
|
|
93
|
-
definition?: PongoDbSchema<CollectionsSchema>;
|
|
94
|
-
} | undefined;
|
|
95
|
-
errors?: {
|
|
96
|
-
throwOnOperationFailures?: boolean;
|
|
97
|
-
} | undefined;
|
|
98
|
-
cache?: CacheConfig | 'disabled' | PongoCache | undefined;
|
|
99
|
-
};
|
|
100
|
-
declare const PongoDatabase: <Database extends AnyPongoDb = AnyPongoDb, DumboType extends Dumbo<Database["driverType"], any> = Dumbo<Database["driverType"], any>>(options: PongoDatabaseOptions<DumboType>) => Database;
|
|
101
|
-
|
|
102
|
-
declare const isNumber: (val: unknown) => val is number;
|
|
103
|
-
declare const isString: (val: unknown) => val is string;
|
|
104
|
-
declare class PongoError extends Error {
|
|
105
|
-
errorCode: number;
|
|
106
|
-
constructor(options?: {
|
|
107
|
-
errorCode: number;
|
|
108
|
-
message?: string;
|
|
109
|
-
} | string | number);
|
|
110
|
-
}
|
|
111
|
-
declare class ConcurrencyError extends PongoError {
|
|
112
|
-
constructor(message?: string);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
declare const pongoClient: <DatabaseDriver extends AnyPongoDriver, TypedClientSchema extends PongoClientSchema = PongoClientSchema>(options: PongoClientOptions<DatabaseDriver, TypedClientSchema>) => PongoClient<DatabaseDriver["driverType"], ExtractPongoDatabaseTypeFromDriver<DatabaseDriver>> & PongoClientWithSchema<TypedClientSchema>;
|
|
116
|
-
|
|
117
|
-
type PongoSessionOptions = {
|
|
118
|
-
explicit?: boolean;
|
|
119
|
-
defaultTransactionOptions: PongoTransactionOptions;
|
|
120
|
-
cache?: CacheConfig | 'disabled' | PongoCache;
|
|
121
|
-
};
|
|
122
|
-
declare const pongoSession: (options?: PongoSessionOptions) => PongoSession;
|
|
123
|
-
|
|
124
|
-
declare const pongoTransaction: (options: PongoTransactionOptions) => PongoDbTransaction;
|
|
1
|
+
import { $ as InferIdType, $t as ExtractPongoDriverOptions, A as MaybePromise, An as PongoCollectionSchemaComponent, At as PongoTransactionOptions, B as DOCUMENT_DOES_NOT_EXIST, Bn as DocumentCommandHandlerOptions, Bt as WithId, C as PongoCacheType, Cn as proxyPongoDbWithSchema, Ct as PongoFilterOperator, D as LRUCacheOptions, Dn as QueryOperators, Dt as PongoMigrationOptions, E as noopCacheProvider, En as OperatorMap, Et as PongoInsertOneResult, F as AlternativeType, Fn as PongoCollectionOptions, Ft as ReplaceManyOptions, G as DocumentHandler, Gt as WithoutVersion, H as DeleteManyOptions, Hn as idFromFilter, Ht as WithVersion, I as AnyPongoDb, In as pongoCollection, It as ReplaceOneOptions, J as ExpectedDocumentVersionGeneral, Jt as isGeneralExpectedDocumentVersion, K as EnhancedOmit, Kt as expectedVersion, L as BatchHandleOptions, Ln as transactionExecutorOrDefault, Lt as RootFilterOperators, M as $push, Mn as PongoCollectionURN, Mt as PongoUpdateManyResult, N as $set, Nn as PongoCollectionURNType, Nt as PongoUpdateResult, O as lruCache, On as hasOperators, Ot as PongoReplaceManyResult, P as $unset, Pn as PongoCollectionSQLBuilder, Pt as RegExpOrString, Q as HasId, Qt as ExtractPongoDatabaseTypeFromDriver, R as CollectionOperationOptions, Rn as DocumentCommandHandler, Rt as UpdateManyOptions, S as PongoCacheSetEntry, Sn as proxyClientWithSchema, St as PongoFilter, T as pongoCache, Tn as toDbSchemaMetadata, Tt as PongoInsertManyResult, U as DeleteOneOptions, Un as NonPartial, Ut as WithoutId, V as DOCUMENT_EXISTS, Vn as getIdsFromIdOnlyFilter, Vt as WithIdAndVersion, W as Document, Wn as objectEntries, Wt as WithoutIdAndVersion, X as FindOptions, Xt as AnyPongoDriver, Y as ExpectedDocumentVersionValue, Yt as operationResult, Z as HandleOptions, Zt as AnyPongoDriverOptions, _ as CacheHooks, _n as PongoDbSchema, _t as PongoDbOptions, a as ConcurrencyError, an as PongoDatabaseSQLBuilder, at as ObjectIdLike, b as CacheType, bn as PongoSchemaConfig, bt as PongoDeleteResult, c as isString, cn as PongoDatabaseURN, ct as OptionalUnlessRequiredId, d as PongoDatabaseCache, dn as DBsMap, dt as OptionalVersion, en as PongoDatabaseFactoryOptions, et as InsertManyOptions, f as PongoTransactionCache, fn as PongoClientSchema, ft as PongoClient, g as CacheConfig, gn as PongoCollectionSchemaMetadata, gt as PongoDb, h as pongoCacheWrapper, hn as PongoCollectionSchema, ht as PongoDBCollectionOptions, i as pongoClient, in as pongoDriverRegistry, it as ObjectId, j as $inc, jn as PongoCollectionSchemaComponentOptions, jt as PongoUpdate, k as identityMapCache, kn as isOperator, kt as PongoSession, l as PongoDatabase, ln as PongoDatabaseURNType, lt as OptionalUnlessRequiredIdAndVersion, m as pongoTransactionCache, mn as PongoClientWithSchema, mt as PongoCollection, n as PongoSessionOptions, nn as PongoDriverOptions, nt as NO_CONCURRENCY_CHECK, o as PongoError, on as PongoDatabaseSchemaComponent, ot as OperationResult, p as PongoTransactionCacheOperationOptions, pn as PongoClientSchemaMetadata, pt as PongoClientOptions, q as ExpectedDocumentVersion, qt as expectedVersionValue, r as pongoSession, rn as PongoDriverRegistry, rt as NonObjectIdLikeDocument, s as isNumber, sn as PongoDatabaseSchemaComponentOptions, st as OptionalId, t as pongoTransaction, tn as PongoDriver, tt as InsertOneOptions, u as PongoDatabaseOptions, un as CollectionsMap, ut as OptionalUnlessRequiredVersion, v as CacheOptions, vn as PongoDbSchemaMetadata, vt as PongoDbTransaction, w as PongoDocumentCacheKey, wn as toClientSchemaMetadata, wt as PongoHandleResult, x as PongoCache, xn as pongoSchema, xt as PongoDocument, y as CacheSettings, yn as PongoDbWithSchema, yt as PongoDeleteManyResult, z as Condition, zn as DocumentCommandHandlerInput, zt as UpdateOneOptions } from "./index-qeC-p0Tq.cjs";
|
|
125
2
|
|
|
3
|
+
//#region src/core/utils/deepEquals.d.ts
|
|
126
4
|
declare const deepEquals: <T>(left: T, right: T) => boolean;
|
|
127
5
|
type Equatable<T> = {
|
|
128
|
-
|
|
6
|
+
equals: (right: T) => boolean;
|
|
129
7
|
} & T;
|
|
130
8
|
declare const isEquatable: <T>(left: T) => left is Equatable<T>;
|
|
131
|
-
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/core/utils/mapAsync.d.ts
|
|
132
11
|
declare function mapSequential<T, R>(items: T[], fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
|
|
133
12
|
declare const mapParallel: <T, R>(items: T[], fn: (item: T, index: number) => Promise<R>) => Promise<R[]>;
|
|
134
13
|
declare const mapAsync: <T, R>(items: T[], fn: (item: T, index: number) => Promise<R>, options?: {
|
|
135
|
-
|
|
14
|
+
parallel: boolean | undefined;
|
|
136
15
|
}) => Promise<R[]>;
|
|
137
|
-
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/index.d.ts
|
|
138
18
|
declare const loadPongoClient: (path: "pg" | "sqlite3" | "d1") => Promise<AnyPongoDriver>;
|
|
139
|
-
|
|
140
|
-
export { AnyPongoDb, AnyPongoDriver, CacheConfig, CacheHooks, CollectionOperationOptions, ConcurrencyError,
|
|
19
|
+
//#endregion
|
|
20
|
+
export { $inc, $push, $set, $unset, AlternativeType, AnyPongoDb, AnyPongoDriver, AnyPongoDriverOptions, BatchHandleOptions, CacheConfig, CacheHooks, CacheOptions, CacheSettings, CacheType, CollectionOperationOptions, CollectionsMap, ConcurrencyError, Condition, DBsMap, DOCUMENT_DOES_NOT_EXIST, DOCUMENT_EXISTS, DeleteManyOptions, DeleteOneOptions, Document, DocumentCommandHandler, DocumentCommandHandlerInput, DocumentCommandHandlerOptions, DocumentHandler, EnhancedOmit, Equatable, ExpectedDocumentVersion, ExpectedDocumentVersionGeneral, ExpectedDocumentVersionValue, ExtractPongoDatabaseTypeFromDriver, ExtractPongoDriverOptions, FindOptions, HandleOptions, HasId, InferIdType, InsertManyOptions, InsertOneOptions, LRUCacheOptions, MaybePromise, NO_CONCURRENCY_CHECK, NonObjectIdLikeDocument, NonPartial, ObjectId, ObjectIdLike, OperationResult, OperatorMap, OptionalId, OptionalUnlessRequiredId, OptionalUnlessRequiredIdAndVersion, OptionalUnlessRequiredVersion, OptionalVersion, PongoCache, PongoCacheSetEntry, PongoCacheType, PongoClient, PongoClientOptions, PongoClientSchema, PongoClientSchemaMetadata, PongoClientWithSchema, PongoCollection, PongoCollectionOptions, PongoCollectionSQLBuilder, PongoCollectionSchema, PongoCollectionSchemaComponent, PongoCollectionSchemaComponentOptions, PongoCollectionSchemaMetadata, PongoCollectionURN, PongoCollectionURNType, PongoDBCollectionOptions, PongoDatabase, PongoDatabaseCache, PongoDatabaseFactoryOptions, PongoDatabaseOptions, PongoDatabaseSQLBuilder, PongoDatabaseSchemaComponent, PongoDatabaseSchemaComponentOptions, PongoDatabaseURN, PongoDatabaseURNType, PongoDb, PongoDbOptions, PongoDbSchema, PongoDbSchemaMetadata, PongoDbTransaction, PongoDbWithSchema, PongoDeleteManyResult, PongoDeleteResult, PongoDocument, PongoDocumentCacheKey, PongoDriver, PongoDriverOptions, PongoDriverRegistry, PongoError, PongoFilter, PongoFilterOperator, PongoHandleResult, PongoInsertManyResult, PongoInsertOneResult, PongoMigrationOptions, PongoReplaceManyResult, PongoSchemaConfig, PongoSession, PongoSessionOptions, PongoTransactionCache, PongoTransactionCacheOperationOptions, PongoTransactionOptions, PongoUpdate, PongoUpdateManyResult, PongoUpdateResult, QueryOperators, RegExpOrString, ReplaceManyOptions, ReplaceOneOptions, RootFilterOperators, UpdateManyOptions, UpdateOneOptions, WithId, WithIdAndVersion, WithVersion, WithoutId, WithoutIdAndVersion, WithoutVersion, deepEquals, expectedVersion, expectedVersionValue, getIdsFromIdOnlyFilter, hasOperators, idFromFilter, identityMapCache, isEquatable, isGeneralExpectedDocumentVersion, isNumber, isOperator, isString, loadPongoClient, lruCache, mapAsync, mapParallel, mapSequential, noopCacheProvider, objectEntries, operationResult, pongoCache, pongoCacheWrapper, pongoClient, pongoCollection, pongoDriverRegistry, pongoSchema, pongoSession, pongoTransaction, pongoTransactionCache, proxyClientWithSchema, proxyPongoDbWithSchema, toClientSchemaMetadata, toDbSchemaMetadata, transactionExecutorOrDefault };
|
|
21
|
+
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,140 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { $ as $inc, v as $push, w as $set, x as $unset, y as AlternativeType, z as AnyPongoDriverOptions, B as BatchHandleOptions, D as CacheOptions, F as CacheSettings, G as CacheType, H as CollectionsMap, I as Condition, J as DBsMap, K as DOCUMENT_DOES_NOT_EXIST, L as DOCUMENT_EXISTS, M as DeleteManyOptions, N as DeleteOneOptions, O as Document, Q as DocumentCommandHandler, R as DocumentCommandHandlerInput, S as DocumentCommandHandlerOptions, T as DocumentHandler, U as EnhancedOmit, V as ExpectedDocumentVersion, W as ExpectedDocumentVersionGeneral, X as ExpectedDocumentVersionValue, Y as ExtractPongoDriverOptions, Z as FindOptions, _ as HandleOptions, a0 as HasId, a1 as InferIdType, a2 as InsertManyOptions, a3 as InsertOneOptions, a4 as LRUCacheOptions, a5 as MaybePromise, a6 as NO_CONCURRENCY_CHECK, a7 as NonObjectIdLikeDocument, a8 as ObjectId, a9 as ObjectIdLike, aa as OperationResult, ab as OptionalId, ac as OptionalUnlessRequiredId, ad as OptionalUnlessRequiredIdAndVersion, ae as OptionalUnlessRequiredVersion, af as OptionalVersion, ag as PongoCacheSetEntry, ah as PongoCacheType, ai as PongoClientSchemaMetadata, aj as PongoCollectionSQLBuilder, ak as PongoCollectionSchemaComponentOptions, al as PongoCollectionSchemaMetadata, am as PongoCollectionURN, an as PongoCollectionURNType, ao as PongoDBCollectionOptions, ap as PongoDatabaseSQLBuilder, aq as PongoDatabaseSchemaComponentOptions, ar as PongoDatabaseURN, as as PongoDatabaseURNType, at as PongoDbOptions, au as PongoDbSchemaMetadata, av as PongoDbWithSchema, aw as PongoDeleteManyResult, ax as PongoDeleteResult, ay as PongoDocumentCacheKey, b as PongoDriverOptions, az as PongoDriverRegistry, aA as PongoFilterOperator, aB as PongoHandleResult, aC as PongoInsertManyResult, aD as PongoInsertOneResult, aE as PongoMigrationOptions, aF as PongoReplaceManyResult, aG as PongoSchemaConfig, aH as PongoTransactionCache, aI as PongoTransactionCacheOperationOptions, aJ as PongoUpdate, aK as PongoUpdateManyResult, aL as PongoUpdateResult, aM as RegExpOrString, aN as ReplaceManyOptions, aO as ReplaceOneOptions, aP as RootFilterOperators, aQ as UpdateManyOptions, aR as UpdateOneOptions, aS as WithId, aT as WithIdAndVersion, aU as WithVersion, aV as WithoutId, aW as WithoutIdAndVersion, aX as WithoutVersion, aY as expectedVersion, aZ as expectedVersionValue, a_ as isGeneralExpectedDocumentVersion, a$ as lruCache, b0 as operationResult, b1 as pongoCache, b2 as pongoDriverRegistry, b3 as pongoSchema, b4 as pongoTransactionCache, b5 as proxyClientWithSchema, b6 as proxyPongoDbWithSchema, b7 as toClientSchemaMetadata, b8 as toDbSchemaMetadata } from './pongoTransactionCache-CRuPGag3.js';
|
|
3
|
-
import { SQL, DatabaseDriverType, Dumbo, MigrationStyle, JSONSerializer, SQLExecutor, JSONSerializationOptions } from '@event-driven-io/dumbo';
|
|
4
|
-
import 'lru-cache';
|
|
5
|
-
|
|
6
|
-
type Entry<T> = {
|
|
7
|
-
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
8
|
-
}[keyof Required<T>];
|
|
9
|
-
type IterableEntry<T> = Entry<T> & {
|
|
10
|
-
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
11
|
-
};
|
|
12
|
-
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
13
|
-
type NonPartial<T> = {
|
|
14
|
-
[K in keyof Required<T>]: T[K];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
declare const idFromFilter: <T>(filter: PongoFilter<T> | SQL | undefined) => string | undefined;
|
|
18
|
-
declare const getIdsFromIdOnlyFilter: <T>(filter: PongoFilter<T> | SQL | undefined) => string[] | undefined;
|
|
19
|
-
|
|
20
|
-
type PongoCollectionOptions<T extends PongoDocument = PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType, Payload extends PongoDocument = T> = {
|
|
21
|
-
db: PongoDb<DriverType>;
|
|
22
|
-
collectionName: string;
|
|
23
|
-
pool: Dumbo<DatabaseDriverType>;
|
|
24
|
-
schemaComponent: PongoCollectionSchemaComponent;
|
|
25
|
-
schema?: {
|
|
26
|
-
autoMigration?: MigrationStyle;
|
|
27
|
-
versioning?: {
|
|
28
|
-
upcast?: (doc: Payload) => T;
|
|
29
|
-
downcast?: (doc: T) => Payload;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
errors?: {
|
|
33
|
-
throwOnOperationFailures?: boolean;
|
|
34
|
-
};
|
|
35
|
-
serializer: JSONSerializer;
|
|
36
|
-
cache?: CacheConfig | 'disabled' | PongoCache | undefined;
|
|
37
|
-
};
|
|
38
|
-
declare const transactionExecutorOrDefault: <DriverType extends DatabaseDriverType = DatabaseDriverType>(db: PongoDb<DriverType>, options: CollectionOperationOptions | undefined, defaultSqlExecutor: SQLExecutor) => Promise<SQLExecutor>;
|
|
39
|
-
declare const pongoCollection: <T extends PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType, Payload extends PongoDocument = T>({ db, collectionName, pool, schemaComponent, schema, errors, serializer, cache: cacheOptions, }: PongoCollectionOptions<T, DriverType, Payload>) => PongoCollection<T>;
|
|
40
|
-
|
|
41
|
-
declare const QueryOperators: {
|
|
42
|
-
$eq: string;
|
|
43
|
-
$gt: string;
|
|
44
|
-
$gte: string;
|
|
45
|
-
$lt: string;
|
|
46
|
-
$lte: string;
|
|
47
|
-
$ne: string;
|
|
48
|
-
$in: string;
|
|
49
|
-
$nin: string;
|
|
50
|
-
$elemMatch: string;
|
|
51
|
-
$all: string;
|
|
52
|
-
$size: string;
|
|
53
|
-
};
|
|
54
|
-
declare const OperatorMap: {
|
|
55
|
-
$gt: string;
|
|
56
|
-
$gte: string;
|
|
57
|
-
$lt: string;
|
|
58
|
-
$lte: string;
|
|
59
|
-
$ne: string;
|
|
60
|
-
};
|
|
61
|
-
declare const isOperator: (key: string) => boolean;
|
|
62
|
-
declare const hasOperators: (value: Record<string, unknown>) => boolean;
|
|
63
|
-
|
|
64
|
-
declare const identityMapCache: () => PongoCache;
|
|
65
|
-
|
|
66
|
-
declare const noopCacheProvider: PongoCache;
|
|
67
|
-
|
|
68
|
-
declare const pongoCacheWrapper: (options: {
|
|
69
|
-
provider: PongoCache;
|
|
70
|
-
hooks?: CacheHooks;
|
|
71
|
-
}) => PongoCache;
|
|
72
|
-
|
|
73
|
-
declare const PongoDatabaseCache: <Database extends PongoDb<DatabaseDriverType> = PongoDb<DatabaseDriverType>, TypedClientSchema extends PongoClientSchema = PongoClientSchema>({ driver, typedSchema, }: {
|
|
74
|
-
driver: PongoDriver<Database>;
|
|
75
|
-
typedSchema?: TypedClientSchema | undefined;
|
|
76
|
-
}) => {
|
|
77
|
-
getOrCreate: <CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema<PongoDocument>>>(createOptions: Omit<PongoDatabaseFactoryOptions<CollectionsSchema>, "schema"> & JSONSerializationOptions & {
|
|
78
|
-
schema?: {
|
|
79
|
-
autoMigration?: MigrationStyle;
|
|
80
|
-
};
|
|
81
|
-
}) => Database;
|
|
82
|
-
all: () => Database[];
|
|
83
|
-
forAll: (func: (db: Database) => Promise<void>) => Promise<void[]>;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
type PongoDatabaseOptions<DumboType extends Dumbo<DatabaseDriverType, any> = Dumbo<DatabaseDriverType, any>, CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema>> = {
|
|
87
|
-
databaseName: string;
|
|
88
|
-
pool: DumboType;
|
|
89
|
-
serializer: JSONSerializer;
|
|
90
|
-
schemaComponent: PongoDatabaseSchemaComponent<DumboType['driverType']>;
|
|
91
|
-
schema?: {
|
|
92
|
-
autoMigration?: MigrationStyle;
|
|
93
|
-
definition?: PongoDbSchema<CollectionsSchema>;
|
|
94
|
-
} | undefined;
|
|
95
|
-
errors?: {
|
|
96
|
-
throwOnOperationFailures?: boolean;
|
|
97
|
-
} | undefined;
|
|
98
|
-
cache?: CacheConfig | 'disabled' | PongoCache | undefined;
|
|
99
|
-
};
|
|
100
|
-
declare const PongoDatabase: <Database extends AnyPongoDb = AnyPongoDb, DumboType extends Dumbo<Database["driverType"], any> = Dumbo<Database["driverType"], any>>(options: PongoDatabaseOptions<DumboType>) => Database;
|
|
101
|
-
|
|
102
|
-
declare const isNumber: (val: unknown) => val is number;
|
|
103
|
-
declare const isString: (val: unknown) => val is string;
|
|
104
|
-
declare class PongoError extends Error {
|
|
105
|
-
errorCode: number;
|
|
106
|
-
constructor(options?: {
|
|
107
|
-
errorCode: number;
|
|
108
|
-
message?: string;
|
|
109
|
-
} | string | number);
|
|
110
|
-
}
|
|
111
|
-
declare class ConcurrencyError extends PongoError {
|
|
112
|
-
constructor(message?: string);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
declare const pongoClient: <DatabaseDriver extends AnyPongoDriver, TypedClientSchema extends PongoClientSchema = PongoClientSchema>(options: PongoClientOptions<DatabaseDriver, TypedClientSchema>) => PongoClient<DatabaseDriver["driverType"], ExtractPongoDatabaseTypeFromDriver<DatabaseDriver>> & PongoClientWithSchema<TypedClientSchema>;
|
|
116
|
-
|
|
117
|
-
type PongoSessionOptions = {
|
|
118
|
-
explicit?: boolean;
|
|
119
|
-
defaultTransactionOptions: PongoTransactionOptions;
|
|
120
|
-
cache?: CacheConfig | 'disabled' | PongoCache;
|
|
121
|
-
};
|
|
122
|
-
declare const pongoSession: (options?: PongoSessionOptions) => PongoSession;
|
|
123
|
-
|
|
124
|
-
declare const pongoTransaction: (options: PongoTransactionOptions) => PongoDbTransaction;
|
|
1
|
+
import { $ as InferIdType, $t as ExtractPongoDriverOptions, A as MaybePromise, An as PongoCollectionSchemaComponent, At as PongoTransactionOptions, B as DOCUMENT_DOES_NOT_EXIST, Bn as DocumentCommandHandlerOptions, Bt as WithId, C as PongoCacheType, Cn as proxyPongoDbWithSchema, Ct as PongoFilterOperator, D as LRUCacheOptions, Dn as QueryOperators, Dt as PongoMigrationOptions, E as noopCacheProvider, En as OperatorMap, Et as PongoInsertOneResult, F as AlternativeType, Fn as PongoCollectionOptions, Ft as ReplaceManyOptions, G as DocumentHandler, Gt as WithoutVersion, H as DeleteManyOptions, Hn as idFromFilter, Ht as WithVersion, I as AnyPongoDb, In as pongoCollection, It as ReplaceOneOptions, J as ExpectedDocumentVersionGeneral, Jt as isGeneralExpectedDocumentVersion, K as EnhancedOmit, Kt as expectedVersion, L as BatchHandleOptions, Ln as transactionExecutorOrDefault, Lt as RootFilterOperators, M as $push, Mn as PongoCollectionURN, Mt as PongoUpdateManyResult, N as $set, Nn as PongoCollectionURNType, Nt as PongoUpdateResult, O as lruCache, On as hasOperators, Ot as PongoReplaceManyResult, P as $unset, Pn as PongoCollectionSQLBuilder, Pt as RegExpOrString, Q as HasId, Qt as ExtractPongoDatabaseTypeFromDriver, R as CollectionOperationOptions, Rn as DocumentCommandHandler, Rt as UpdateManyOptions, S as PongoCacheSetEntry, Sn as proxyClientWithSchema, St as PongoFilter, T as pongoCache, Tn as toDbSchemaMetadata, Tt as PongoInsertManyResult, U as DeleteOneOptions, Un as NonPartial, Ut as WithoutId, V as DOCUMENT_EXISTS, Vn as getIdsFromIdOnlyFilter, Vt as WithIdAndVersion, W as Document, Wn as objectEntries, Wt as WithoutIdAndVersion, X as FindOptions, Xt as AnyPongoDriver, Y as ExpectedDocumentVersionValue, Yt as operationResult, Z as HandleOptions, Zt as AnyPongoDriverOptions, _ as CacheHooks, _n as PongoDbSchema, _t as PongoDbOptions, a as ConcurrencyError, an as PongoDatabaseSQLBuilder, at as ObjectIdLike, b as CacheType, bn as PongoSchemaConfig, bt as PongoDeleteResult, c as isString, cn as PongoDatabaseURN, ct as OptionalUnlessRequiredId, d as PongoDatabaseCache, dn as DBsMap, dt as OptionalVersion, en as PongoDatabaseFactoryOptions, et as InsertManyOptions, f as PongoTransactionCache, fn as PongoClientSchema, ft as PongoClient, g as CacheConfig, gn as PongoCollectionSchemaMetadata, gt as PongoDb, h as pongoCacheWrapper, hn as PongoCollectionSchema, ht as PongoDBCollectionOptions, i as pongoClient, in as pongoDriverRegistry, it as ObjectId, j as $inc, jn as PongoCollectionSchemaComponentOptions, jt as PongoUpdate, k as identityMapCache, kn as isOperator, kt as PongoSession, l as PongoDatabase, ln as PongoDatabaseURNType, lt as OptionalUnlessRequiredIdAndVersion, m as pongoTransactionCache, mn as PongoClientWithSchema, mt as PongoCollection, n as PongoSessionOptions, nn as PongoDriverOptions, nt as NO_CONCURRENCY_CHECK, o as PongoError, on as PongoDatabaseSchemaComponent, ot as OperationResult, p as PongoTransactionCacheOperationOptions, pn as PongoClientSchemaMetadata, pt as PongoClientOptions, q as ExpectedDocumentVersion, qt as expectedVersionValue, r as pongoSession, rn as PongoDriverRegistry, rt as NonObjectIdLikeDocument, s as isNumber, sn as PongoDatabaseSchemaComponentOptions, st as OptionalId, t as pongoTransaction, tn as PongoDriver, tt as InsertOneOptions, u as PongoDatabaseOptions, un as CollectionsMap, ut as OptionalUnlessRequiredVersion, v as CacheOptions, vn as PongoDbSchemaMetadata, vt as PongoDbTransaction, w as PongoDocumentCacheKey, wn as toClientSchemaMetadata, wt as PongoHandleResult, x as PongoCache, xn as pongoSchema, xt as PongoDocument, y as CacheSettings, yn as PongoDbWithSchema, yt as PongoDeleteManyResult, z as Condition, zn as DocumentCommandHandlerInput, zt as UpdateOneOptions } from "./index-DMq6F3x9.js";
|
|
125
2
|
|
|
3
|
+
//#region src/core/utils/deepEquals.d.ts
|
|
126
4
|
declare const deepEquals: <T>(left: T, right: T) => boolean;
|
|
127
5
|
type Equatable<T> = {
|
|
128
|
-
|
|
6
|
+
equals: (right: T) => boolean;
|
|
129
7
|
} & T;
|
|
130
8
|
declare const isEquatable: <T>(left: T) => left is Equatable<T>;
|
|
131
|
-
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/core/utils/mapAsync.d.ts
|
|
132
11
|
declare function mapSequential<T, R>(items: T[], fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
|
|
133
12
|
declare const mapParallel: <T, R>(items: T[], fn: (item: T, index: number) => Promise<R>) => Promise<R[]>;
|
|
134
13
|
declare const mapAsync: <T, R>(items: T[], fn: (item: T, index: number) => Promise<R>, options?: {
|
|
135
|
-
|
|
14
|
+
parallel: boolean | undefined;
|
|
136
15
|
}) => Promise<R[]>;
|
|
137
|
-
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/index.d.ts
|
|
138
18
|
declare const loadPongoClient: (path: "pg" | "sqlite3" | "d1") => Promise<AnyPongoDriver>;
|
|
139
|
-
|
|
140
|
-
export { AnyPongoDb, AnyPongoDriver, CacheConfig, CacheHooks, CollectionOperationOptions, ConcurrencyError,
|
|
19
|
+
//#endregion
|
|
20
|
+
export { $inc, $push, $set, $unset, AlternativeType, AnyPongoDb, AnyPongoDriver, AnyPongoDriverOptions, BatchHandleOptions, CacheConfig, CacheHooks, CacheOptions, CacheSettings, CacheType, CollectionOperationOptions, CollectionsMap, ConcurrencyError, Condition, DBsMap, DOCUMENT_DOES_NOT_EXIST, DOCUMENT_EXISTS, DeleteManyOptions, DeleteOneOptions, Document, DocumentCommandHandler, DocumentCommandHandlerInput, DocumentCommandHandlerOptions, DocumentHandler, EnhancedOmit, Equatable, ExpectedDocumentVersion, ExpectedDocumentVersionGeneral, ExpectedDocumentVersionValue, ExtractPongoDatabaseTypeFromDriver, ExtractPongoDriverOptions, FindOptions, HandleOptions, HasId, InferIdType, InsertManyOptions, InsertOneOptions, LRUCacheOptions, MaybePromise, NO_CONCURRENCY_CHECK, NonObjectIdLikeDocument, NonPartial, ObjectId, ObjectIdLike, OperationResult, OperatorMap, OptionalId, OptionalUnlessRequiredId, OptionalUnlessRequiredIdAndVersion, OptionalUnlessRequiredVersion, OptionalVersion, PongoCache, PongoCacheSetEntry, PongoCacheType, PongoClient, PongoClientOptions, PongoClientSchema, PongoClientSchemaMetadata, PongoClientWithSchema, PongoCollection, PongoCollectionOptions, PongoCollectionSQLBuilder, PongoCollectionSchema, PongoCollectionSchemaComponent, PongoCollectionSchemaComponentOptions, PongoCollectionSchemaMetadata, PongoCollectionURN, PongoCollectionURNType, PongoDBCollectionOptions, PongoDatabase, PongoDatabaseCache, PongoDatabaseFactoryOptions, PongoDatabaseOptions, PongoDatabaseSQLBuilder, PongoDatabaseSchemaComponent, PongoDatabaseSchemaComponentOptions, PongoDatabaseURN, PongoDatabaseURNType, PongoDb, PongoDbOptions, PongoDbSchema, PongoDbSchemaMetadata, PongoDbTransaction, PongoDbWithSchema, PongoDeleteManyResult, PongoDeleteResult, PongoDocument, PongoDocumentCacheKey, PongoDriver, PongoDriverOptions, PongoDriverRegistry, PongoError, PongoFilter, PongoFilterOperator, PongoHandleResult, PongoInsertManyResult, PongoInsertOneResult, PongoMigrationOptions, PongoReplaceManyResult, PongoSchemaConfig, PongoSession, PongoSessionOptions, PongoTransactionCache, PongoTransactionCacheOperationOptions, PongoTransactionOptions, PongoUpdate, PongoUpdateManyResult, PongoUpdateResult, QueryOperators, RegExpOrString, ReplaceManyOptions, ReplaceOneOptions, RootFilterOperators, UpdateManyOptions, UpdateOneOptions, WithId, WithIdAndVersion, WithVersion, WithoutId, WithoutIdAndVersion, WithoutVersion, deepEquals, expectedVersion, expectedVersionValue, getIdsFromIdOnlyFilter, hasOperators, idFromFilter, identityMapCache, isEquatable, isGeneralExpectedDocumentVersion, isNumber, isOperator, isString, loadPongoClient, lruCache, mapAsync, mapParallel, mapSequential, noopCacheProvider, objectEntries, operationResult, pongoCache, pongoCacheWrapper, pongoClient, pongoCollection, pongoDriverRegistry, pongoSchema, pongoSession, pongoTransaction, pongoTransactionCache, proxyClientWithSchema, proxyPongoDbWithSchema, toClientSchemaMetadata, toDbSchemaMetadata, transactionExecutorOrDefault };
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|