@event-driven-io/pongo 0.17.0-alpha.6 → 0.17.0-beta.2
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/chunk-4BL6YWLW.cjs +872 -0
- package/dist/chunk-4BL6YWLW.cjs.map +1 -0
- package/dist/chunk-ECQ2CKZE.cjs +330 -0
- package/dist/chunk-ECQ2CKZE.cjs.map +1 -0
- package/dist/chunk-EYQDS752.js +364 -0
- package/dist/chunk-EYQDS752.js.map +1 -0
- package/dist/{chunk-OO7GMTMP.js → chunk-NCNRRYVE.js} +573 -876
- package/dist/chunk-NCNRRYVE.js.map +1 -0
- package/dist/chunk-WH26IXHN.js +10 -0
- package/dist/chunk-WH26IXHN.js.map +1 -0
- package/dist/chunk-WKW4LGF6.cjs +10 -0
- package/dist/chunk-WKW4LGF6.cjs.map +1 -0
- package/dist/chunk-Y7LRKJLJ.js +330 -0
- package/dist/chunk-Y7LRKJLJ.js.map +1 -0
- package/dist/chunk-ZPWKWNK2.cjs +364 -0
- package/dist/chunk-ZPWKWNK2.cjs.map +1 -0
- package/dist/cli.cjs +112 -36
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +110 -34
- package/dist/cli.js.map +1 -1
- package/dist/d1.cjs +54 -0
- package/dist/d1.cjs.map +1 -0
- package/dist/d1.d.cts +11 -0
- package/dist/d1.d.ts +11 -0
- package/dist/d1.js +54 -0
- package/dist/d1.js.map +1 -0
- package/dist/index-BJopB-em.d.cts +7 -0
- package/dist/index-G5DECNb_.d.ts +7 -0
- package/dist/index.cjs +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -18
- package/dist/index.d.ts +58 -18
- package/dist/index.js +14 -17
- package/dist/pg-73DOKU64.js +11 -0
- package/dist/pg-73DOKU64.js.map +1 -0
- package/dist/pg-I267A7IL.cjs +11 -0
- package/dist/pg-I267A7IL.cjs.map +1 -0
- package/dist/pg.cjs +4 -3
- package/dist/pg.cjs.map +1 -1
- package/dist/pg.d.cts +36 -6
- package/dist/pg.d.ts +36 -6
- package/dist/pg.js +10 -9
- package/dist/pongoCollectionSchemaComponent-t_e9n2Wc.d.cts +426 -0
- package/dist/pongoCollectionSchemaComponent-t_e9n2Wc.d.ts +426 -0
- package/dist/shim.cjs +43 -8
- package/dist/shim.cjs.map +1 -1
- package/dist/shim.d.cts +12 -9
- package/dist/shim.d.ts +12 -9
- package/dist/shim.js +40 -5
- package/dist/shim.js.map +1 -1
- package/dist/sqlite3.cjs +66 -1
- package/dist/sqlite3.cjs.map +1 -1
- package/dist/sqlite3.d.cts +13 -1
- package/dist/sqlite3.d.ts +13 -1
- package/dist/sqlite3.js +65 -0
- package/dist/sqlite3.js.map +1 -1
- package/package.json +34 -12
- package/README.md +0 -230
- package/dist/chunk-AV4SHJQB.cjs +0 -1175
- package/dist/chunk-AV4SHJQB.cjs.map +0 -1
- package/dist/chunk-OO7GMTMP.js.map +0 -1
- package/dist/pg-BfTNWLV9.d.ts +0 -39
- package/dist/pg-C9NmCQe7.d.cts +0 -39
- package/dist/pongoClient-D8jPedlZ.d.cts +0 -364
- package/dist/pongoClient-D8jPedlZ.d.ts +0 -364
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import { d as
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { DatabaseDriverType, Dumbo, MigrationStyle, SQLExecutor } from '@event-driven-io/dumbo';
|
|
2
|
+
import { a as PongoDb, c as PongoCollectionSchemaComponent, C as CollectionOperationOptions, d as PongoDocument, e as PongoCollection, f as PongoClientSchema, P as PongoDatabaseDriver, g as PongoCollectionSchema, h as PongoDatabaseFactoryOptions, i as PongoDatabaseSchemaComponent, j as PongoDbSchema, A as AnyPongoDb, k as AnyPongoDatabaseDriver, l as PongoClientOptions, m as PongoClient, E as ExtractPongoDatabaseTypeFromDriver, n as PongoClientWithSchema, o as PongoTransactionOptions, p as PongoSession, q as PongoDbTransaction } from './pongoCollectionSchemaComponent-t_e9n2Wc.cjs';
|
|
3
|
+
export { as as $inc, at as $push, aq as $set, ar as $unset, al as AlternativeType, z as AnyPongoDatabaseDriverOptions, I as CollectionsMap, am as Condition, K as DBsMap, ay as DOCUMENT_DOES_NOT_EXIST, ax as DOCUMENT_EXISTS, B as DatabaseDriverOptionsWithConnectionString, D as DatabaseDriverOptionsWithDatabaseName, a0 as DeleteManyOptions, $ as DeleteOneOptions, ag as Document, aN as DocumentHandler, a5 as EnhancedOmit, aw as ExpectedDocumentVersion, au as ExpectedDocumentVersionGeneral, av as ExpectedDocumentVersionValue, F as ExtractPongoDatabaseDriverOptions, a1 as FindOptions, Z as HandleOptions, a3 as HasId, a4 as InferIdType, W as InsertManyOptions, V as InsertOneOptions, az as NO_CONCURRENCY_CHECK, ak as NonObjectIdLikeDocument, a2 as ObjectId, aj as ObjectIdLike, aE as OperationResult, ah as OptionalId, a6 as OptionalUnlessRequiredId, a8 as OptionalUnlessRequiredIdAndVersion, a7 as OptionalUnlessRequiredVersion, ai as OptionalVersion, R as PongoClientSchemaMetadata, r as PongoCollectionSQLBuilder, u as PongoCollectionSchemaComponentOptions, O as PongoCollectionSchemaMetadata, t as PongoCollectionURN, s as PongoCollectionURNType, b as PongoDatabaseDriverOptions, G as PongoDatabaseDriverRegistry, y as PongoDatabaseSQLBuilder, x as PongoDatabaseSchemaComponentOptions, w as PongoDatabaseURN, v as PongoDatabaseURNType, Q as PongoDbSchemaMetadata, J as PongoDbWithSchema, aL as PongoDeleteManyResult, aK as PongoDeleteResult, an as PongoFilter, ap as PongoFilterOperator, aM as PongoHandleResult, aH as PongoInsertManyResult, aG as PongoInsertOneResult, U as PongoSchemaConfig, aD as PongoUpdate, aJ as PongoUpdateManyResult, aI as PongoUpdateResult, af as RegExpOrString, _ as ReplaceOneOptions, ao as RootFilterOperators, Y as UpdateManyOptions, X as UpdateOneOptions, a9 as WithId, ad as WithIdAndVersion, ab as WithVersion, aa as WithoutId, ae as WithoutIdAndVersion, ac as WithoutVersion, aC as expectedVersion, aB as expectedVersionValue, aA as isGeneralExpectedDocumentVersion, aF as operationResult, H as pongoDatabaseDriverRegistry, L as pongoSchema, N as proxyClientWithSchema, M as proxyPongoDbWithSchema, T as toClientSchemaMetadata, S as toDbSchemaMetadata } from './pongoCollectionSchemaComponent-t_e9n2Wc.cjs';
|
|
4
|
+
|
|
5
|
+
type PongoCollectionOptions<DriverType extends DatabaseDriverType = DatabaseDriverType> = {
|
|
6
|
+
db: PongoDb<DriverType>;
|
|
7
|
+
collectionName: string;
|
|
8
|
+
pool: Dumbo<DatabaseDriverType>;
|
|
9
|
+
schemaComponent: PongoCollectionSchemaComponent;
|
|
10
|
+
schema?: {
|
|
11
|
+
autoMigration?: MigrationStyle;
|
|
12
|
+
};
|
|
13
|
+
errors?: {
|
|
14
|
+
throwOnOperationFailures?: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare const transactionExecutorOrDefault: <DriverType extends DatabaseDriverType = DatabaseDriverType>(db: PongoDb<DriverType>, options: CollectionOperationOptions | undefined, defaultSqlExecutor: SQLExecutor) => Promise<SQLExecutor>;
|
|
18
|
+
declare const pongoCollection: <T extends PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType>({ db, collectionName, pool, schemaComponent, schema, errors, }: PongoCollectionOptions<DriverType>) => PongoCollection<T>;
|
|
19
|
+
|
|
20
|
+
type Entry<T> = {
|
|
21
|
+
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
22
|
+
}[keyof Required<T>];
|
|
23
|
+
type IterableEntry<T> = Entry<T> & {
|
|
24
|
+
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
25
|
+
};
|
|
26
|
+
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
27
|
+
type NonPartial<T> = {
|
|
28
|
+
[K in keyof Required<T>]: T[K];
|
|
29
|
+
};
|
|
8
30
|
|
|
9
31
|
declare const QueryOperators: {
|
|
10
32
|
$eq: string;
|
|
@@ -29,6 +51,33 @@ declare const OperatorMap: {
|
|
|
29
51
|
declare const isOperator: (key: string) => boolean;
|
|
30
52
|
declare const hasOperators: (value: Record<string, unknown>) => boolean;
|
|
31
53
|
|
|
54
|
+
declare const PongoDatabaseCache: <Database extends PongoDb<DatabaseDriverType> = PongoDb<DatabaseDriverType>, TypedClientSchema extends PongoClientSchema = PongoClientSchema>({ driver, typedSchema, }: {
|
|
55
|
+
driver: PongoDatabaseDriver<Database>;
|
|
56
|
+
typedSchema?: TypedClientSchema | undefined;
|
|
57
|
+
}) => {
|
|
58
|
+
getOrCreate: <CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema<PongoDocument>>>(createOptions: Omit<PongoDatabaseFactoryOptions<CollectionsSchema>, "schema"> & {
|
|
59
|
+
schema?: {
|
|
60
|
+
autoMigration?: MigrationStyle;
|
|
61
|
+
};
|
|
62
|
+
}) => Database;
|
|
63
|
+
all: () => Database[];
|
|
64
|
+
forAll: (func: (db: Database) => Promise<void>) => Promise<void[]>;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
type PongoDatabaseOptions<DumboType extends Dumbo<DatabaseDriverType, any> = Dumbo<DatabaseDriverType, any>, CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema>> = {
|
|
68
|
+
databaseName: string;
|
|
69
|
+
pool: DumboType;
|
|
70
|
+
schemaComponent: PongoDatabaseSchemaComponent<DumboType['driverType']>;
|
|
71
|
+
schema?: {
|
|
72
|
+
autoMigration?: MigrationStyle;
|
|
73
|
+
definition?: PongoDbSchema<CollectionsSchema>;
|
|
74
|
+
} | undefined;
|
|
75
|
+
errors?: {
|
|
76
|
+
throwOnOperationFailures?: boolean;
|
|
77
|
+
} | undefined;
|
|
78
|
+
};
|
|
79
|
+
declare const PongoDatabase: <Database extends AnyPongoDb = AnyPongoDb, DumboType extends Dumbo<Database["driverType"], any> = Dumbo<Database["driverType"], any>>(options: PongoDatabaseOptions<DumboType>) => Database;
|
|
80
|
+
|
|
32
81
|
declare const isNumber: (val: unknown) => val is number;
|
|
33
82
|
declare const isString: (val: unknown) => val is string;
|
|
34
83
|
declare class PongoError extends Error {
|
|
@@ -42,16 +91,7 @@ declare class ConcurrencyError extends PongoError {
|
|
|
42
91
|
constructor(message?: string);
|
|
43
92
|
}
|
|
44
93
|
|
|
45
|
-
|
|
46
|
-
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
47
|
-
}[keyof Required<T>];
|
|
48
|
-
type IterableEntry<T> = Entry<T> & {
|
|
49
|
-
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
50
|
-
};
|
|
51
|
-
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
52
|
-
type NonPartial<T> = {
|
|
53
|
-
[K in keyof Required<T>]: T[K];
|
|
54
|
-
};
|
|
94
|
+
declare const pongoClient: <DatabaseDriver extends AnyPongoDatabaseDriver, TypedClientSchema extends PongoClientSchema = PongoClientSchema>(options: PongoClientOptions<DatabaseDriver, TypedClientSchema>) => PongoClient<DatabaseDriver["driverType"], ExtractPongoDatabaseTypeFromDriver<DatabaseDriver>> & PongoClientWithSchema<TypedClientSchema>;
|
|
55
95
|
|
|
56
96
|
type PongoSessionOptions = {
|
|
57
97
|
explicit?: boolean;
|
|
@@ -67,4 +107,4 @@ type Equatable<T> = {
|
|
|
67
107
|
} & T;
|
|
68
108
|
declare const isEquatable: <T>(left: T) => left is Equatable<T>;
|
|
69
109
|
|
|
70
|
-
export { ConcurrencyError, type Equatable, type NonPartial, OperatorMap, PongoDbTransaction, PongoError, PongoSession, type PongoSessionOptions, PongoTransactionOptions, QueryOperators, deepEquals, hasOperators, isEquatable, isNumber, isOperator, isString, objectEntries, pongoSession, pongoTransaction };
|
|
110
|
+
export { AnyPongoDatabaseDriver, AnyPongoDb, CollectionOperationOptions, ConcurrencyError, type Equatable, ExtractPongoDatabaseTypeFromDriver, type NonPartial, OperatorMap, PongoClient, PongoClientOptions, PongoClientSchema, PongoClientWithSchema, PongoCollection, type PongoCollectionOptions, PongoCollectionSchema, PongoCollectionSchemaComponent, PongoDatabase, PongoDatabaseCache, PongoDatabaseDriver, PongoDatabaseFactoryOptions, type PongoDatabaseOptions, PongoDatabaseSchemaComponent, PongoDb, PongoDbSchema, PongoDbTransaction, PongoDocument, PongoError, PongoSession, type PongoSessionOptions, PongoTransactionOptions, QueryOperators, deepEquals, hasOperators, isEquatable, isNumber, isOperator, isString, objectEntries, pongoClient, pongoCollection, pongoSession, pongoTransaction, transactionExecutorOrDefault };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import { d as
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { DatabaseDriverType, Dumbo, MigrationStyle, SQLExecutor } from '@event-driven-io/dumbo';
|
|
2
|
+
import { a as PongoDb, c as PongoCollectionSchemaComponent, C as CollectionOperationOptions, d as PongoDocument, e as PongoCollection, f as PongoClientSchema, P as PongoDatabaseDriver, g as PongoCollectionSchema, h as PongoDatabaseFactoryOptions, i as PongoDatabaseSchemaComponent, j as PongoDbSchema, A as AnyPongoDb, k as AnyPongoDatabaseDriver, l as PongoClientOptions, m as PongoClient, E as ExtractPongoDatabaseTypeFromDriver, n as PongoClientWithSchema, o as PongoTransactionOptions, p as PongoSession, q as PongoDbTransaction } from './pongoCollectionSchemaComponent-t_e9n2Wc.js';
|
|
3
|
+
export { as as $inc, at as $push, aq as $set, ar as $unset, al as AlternativeType, z as AnyPongoDatabaseDriverOptions, I as CollectionsMap, am as Condition, K as DBsMap, ay as DOCUMENT_DOES_NOT_EXIST, ax as DOCUMENT_EXISTS, B as DatabaseDriverOptionsWithConnectionString, D as DatabaseDriverOptionsWithDatabaseName, a0 as DeleteManyOptions, $ as DeleteOneOptions, ag as Document, aN as DocumentHandler, a5 as EnhancedOmit, aw as ExpectedDocumentVersion, au as ExpectedDocumentVersionGeneral, av as ExpectedDocumentVersionValue, F as ExtractPongoDatabaseDriverOptions, a1 as FindOptions, Z as HandleOptions, a3 as HasId, a4 as InferIdType, W as InsertManyOptions, V as InsertOneOptions, az as NO_CONCURRENCY_CHECK, ak as NonObjectIdLikeDocument, a2 as ObjectId, aj as ObjectIdLike, aE as OperationResult, ah as OptionalId, a6 as OptionalUnlessRequiredId, a8 as OptionalUnlessRequiredIdAndVersion, a7 as OptionalUnlessRequiredVersion, ai as OptionalVersion, R as PongoClientSchemaMetadata, r as PongoCollectionSQLBuilder, u as PongoCollectionSchemaComponentOptions, O as PongoCollectionSchemaMetadata, t as PongoCollectionURN, s as PongoCollectionURNType, b as PongoDatabaseDriverOptions, G as PongoDatabaseDriverRegistry, y as PongoDatabaseSQLBuilder, x as PongoDatabaseSchemaComponentOptions, w as PongoDatabaseURN, v as PongoDatabaseURNType, Q as PongoDbSchemaMetadata, J as PongoDbWithSchema, aL as PongoDeleteManyResult, aK as PongoDeleteResult, an as PongoFilter, ap as PongoFilterOperator, aM as PongoHandleResult, aH as PongoInsertManyResult, aG as PongoInsertOneResult, U as PongoSchemaConfig, aD as PongoUpdate, aJ as PongoUpdateManyResult, aI as PongoUpdateResult, af as RegExpOrString, _ as ReplaceOneOptions, ao as RootFilterOperators, Y as UpdateManyOptions, X as UpdateOneOptions, a9 as WithId, ad as WithIdAndVersion, ab as WithVersion, aa as WithoutId, ae as WithoutIdAndVersion, ac as WithoutVersion, aC as expectedVersion, aB as expectedVersionValue, aA as isGeneralExpectedDocumentVersion, aF as operationResult, H as pongoDatabaseDriverRegistry, L as pongoSchema, N as proxyClientWithSchema, M as proxyPongoDbWithSchema, T as toClientSchemaMetadata, S as toDbSchemaMetadata } from './pongoCollectionSchemaComponent-t_e9n2Wc.js';
|
|
4
|
+
|
|
5
|
+
type PongoCollectionOptions<DriverType extends DatabaseDriverType = DatabaseDriverType> = {
|
|
6
|
+
db: PongoDb<DriverType>;
|
|
7
|
+
collectionName: string;
|
|
8
|
+
pool: Dumbo<DatabaseDriverType>;
|
|
9
|
+
schemaComponent: PongoCollectionSchemaComponent;
|
|
10
|
+
schema?: {
|
|
11
|
+
autoMigration?: MigrationStyle;
|
|
12
|
+
};
|
|
13
|
+
errors?: {
|
|
14
|
+
throwOnOperationFailures?: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare const transactionExecutorOrDefault: <DriverType extends DatabaseDriverType = DatabaseDriverType>(db: PongoDb<DriverType>, options: CollectionOperationOptions | undefined, defaultSqlExecutor: SQLExecutor) => Promise<SQLExecutor>;
|
|
18
|
+
declare const pongoCollection: <T extends PongoDocument, DriverType extends DatabaseDriverType = DatabaseDriverType>({ db, collectionName, pool, schemaComponent, schema, errors, }: PongoCollectionOptions<DriverType>) => PongoCollection<T>;
|
|
19
|
+
|
|
20
|
+
type Entry<T> = {
|
|
21
|
+
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
22
|
+
}[keyof Required<T>];
|
|
23
|
+
type IterableEntry<T> = Entry<T> & {
|
|
24
|
+
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
25
|
+
};
|
|
26
|
+
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
27
|
+
type NonPartial<T> = {
|
|
28
|
+
[K in keyof Required<T>]: T[K];
|
|
29
|
+
};
|
|
8
30
|
|
|
9
31
|
declare const QueryOperators: {
|
|
10
32
|
$eq: string;
|
|
@@ -29,6 +51,33 @@ declare const OperatorMap: {
|
|
|
29
51
|
declare const isOperator: (key: string) => boolean;
|
|
30
52
|
declare const hasOperators: (value: Record<string, unknown>) => boolean;
|
|
31
53
|
|
|
54
|
+
declare const PongoDatabaseCache: <Database extends PongoDb<DatabaseDriverType> = PongoDb<DatabaseDriverType>, TypedClientSchema extends PongoClientSchema = PongoClientSchema>({ driver, typedSchema, }: {
|
|
55
|
+
driver: PongoDatabaseDriver<Database>;
|
|
56
|
+
typedSchema?: TypedClientSchema | undefined;
|
|
57
|
+
}) => {
|
|
58
|
+
getOrCreate: <CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema<PongoDocument>>>(createOptions: Omit<PongoDatabaseFactoryOptions<CollectionsSchema>, "schema"> & {
|
|
59
|
+
schema?: {
|
|
60
|
+
autoMigration?: MigrationStyle;
|
|
61
|
+
};
|
|
62
|
+
}) => Database;
|
|
63
|
+
all: () => Database[];
|
|
64
|
+
forAll: (func: (db: Database) => Promise<void>) => Promise<void[]>;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
type PongoDatabaseOptions<DumboType extends Dumbo<DatabaseDriverType, any> = Dumbo<DatabaseDriverType, any>, CollectionsSchema extends Record<string, PongoCollectionSchema> = Record<string, PongoCollectionSchema>> = {
|
|
68
|
+
databaseName: string;
|
|
69
|
+
pool: DumboType;
|
|
70
|
+
schemaComponent: PongoDatabaseSchemaComponent<DumboType['driverType']>;
|
|
71
|
+
schema?: {
|
|
72
|
+
autoMigration?: MigrationStyle;
|
|
73
|
+
definition?: PongoDbSchema<CollectionsSchema>;
|
|
74
|
+
} | undefined;
|
|
75
|
+
errors?: {
|
|
76
|
+
throwOnOperationFailures?: boolean;
|
|
77
|
+
} | undefined;
|
|
78
|
+
};
|
|
79
|
+
declare const PongoDatabase: <Database extends AnyPongoDb = AnyPongoDb, DumboType extends Dumbo<Database["driverType"], any> = Dumbo<Database["driverType"], any>>(options: PongoDatabaseOptions<DumboType>) => Database;
|
|
80
|
+
|
|
32
81
|
declare const isNumber: (val: unknown) => val is number;
|
|
33
82
|
declare const isString: (val: unknown) => val is string;
|
|
34
83
|
declare class PongoError extends Error {
|
|
@@ -42,16 +91,7 @@ declare class ConcurrencyError extends PongoError {
|
|
|
42
91
|
constructor(message?: string);
|
|
43
92
|
}
|
|
44
93
|
|
|
45
|
-
|
|
46
|
-
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
47
|
-
}[keyof Required<T>];
|
|
48
|
-
type IterableEntry<T> = Entry<T> & {
|
|
49
|
-
[Symbol.iterator](): Iterator<Entry<T>>;
|
|
50
|
-
};
|
|
51
|
-
declare const objectEntries: <T extends object>(obj: T) => IterableEntry<T>[];
|
|
52
|
-
type NonPartial<T> = {
|
|
53
|
-
[K in keyof Required<T>]: T[K];
|
|
54
|
-
};
|
|
94
|
+
declare const pongoClient: <DatabaseDriver extends AnyPongoDatabaseDriver, TypedClientSchema extends PongoClientSchema = PongoClientSchema>(options: PongoClientOptions<DatabaseDriver, TypedClientSchema>) => PongoClient<DatabaseDriver["driverType"], ExtractPongoDatabaseTypeFromDriver<DatabaseDriver>> & PongoClientWithSchema<TypedClientSchema>;
|
|
55
95
|
|
|
56
96
|
type PongoSessionOptions = {
|
|
57
97
|
explicit?: boolean;
|
|
@@ -67,4 +107,4 @@ type Equatable<T> = {
|
|
|
67
107
|
} & T;
|
|
68
108
|
declare const isEquatable: <T>(left: T) => left is Equatable<T>;
|
|
69
109
|
|
|
70
|
-
export { ConcurrencyError, type Equatable, type NonPartial, OperatorMap, PongoDbTransaction, PongoError, PongoSession, type PongoSessionOptions, PongoTransactionOptions, QueryOperators, deepEquals, hasOperators, isEquatable, isNumber, isOperator, isString, objectEntries, pongoSession, pongoTransaction };
|
|
110
|
+
export { AnyPongoDatabaseDriver, AnyPongoDb, CollectionOperationOptions, ConcurrencyError, type Equatable, ExtractPongoDatabaseTypeFromDriver, type NonPartial, OperatorMap, PongoClient, PongoClientOptions, PongoClientSchema, PongoClientWithSchema, PongoCollection, type PongoCollectionOptions, PongoCollectionSchema, PongoCollectionSchemaComponent, PongoDatabase, PongoDatabaseCache, PongoDatabaseDriver, PongoDatabaseFactoryOptions, type PongoDatabaseOptions, PongoDatabaseSchemaComponent, PongoDb, PongoDbSchema, PongoDbTransaction, PongoDocument, PongoError, PongoSession, type PongoSessionOptions, PongoTransactionOptions, QueryOperators, deepEquals, hasOperators, isEquatable, isNumber, isOperator, isString, objectEntries, pongoClient, pongoCollection, pongoSession, pongoTransaction, transactionExecutorOrDefault };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "./chunk-WH26IXHN.js";
|
|
1
2
|
import {
|
|
2
3
|
ConcurrencyError,
|
|
3
4
|
DOCUMENT_DOES_NOT_EXIST,
|
|
@@ -5,38 +6,36 @@ import {
|
|
|
5
6
|
NO_CONCURRENCY_CHECK,
|
|
6
7
|
ObjectId,
|
|
7
8
|
OperatorMap,
|
|
9
|
+
PongoCollectionSchemaComponent,
|
|
10
|
+
PongoDatabase,
|
|
11
|
+
PongoDatabaseCache,
|
|
12
|
+
PongoDatabaseDriverRegistry,
|
|
13
|
+
PongoDatabaseSchemaComponent,
|
|
8
14
|
PongoError,
|
|
9
15
|
QueryOperators,
|
|
10
|
-
clientToDbOptions,
|
|
11
16
|
deepEquals,
|
|
12
17
|
expectedVersion,
|
|
13
18
|
expectedVersionValue,
|
|
14
|
-
getPongoDb,
|
|
15
19
|
hasOperators,
|
|
16
20
|
isEquatable,
|
|
17
21
|
isGeneralExpectedDocumentVersion,
|
|
18
22
|
isNumber,
|
|
19
23
|
isOperator,
|
|
20
|
-
isPostgresClientOptions,
|
|
21
24
|
isString,
|
|
22
25
|
objectEntries,
|
|
23
26
|
operationResult,
|
|
24
27
|
pongoClient,
|
|
25
28
|
pongoCollection,
|
|
26
|
-
|
|
27
|
-
pongoCollectionSchemaComponent,
|
|
28
|
-
pongoDbSchemaComponent,
|
|
29
|
+
pongoDatabaseDriverRegistry,
|
|
29
30
|
pongoSchema,
|
|
30
31
|
pongoSession,
|
|
31
32
|
pongoTransaction,
|
|
32
|
-
postgresDb,
|
|
33
|
-
postgresSQLBuilder,
|
|
34
33
|
proxyClientWithSchema,
|
|
35
34
|
proxyPongoDbWithSchema,
|
|
36
35
|
toClientSchemaMetadata,
|
|
37
36
|
toDbSchemaMetadata,
|
|
38
37
|
transactionExecutorOrDefault
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-NCNRRYVE.js";
|
|
40
39
|
export {
|
|
41
40
|
ConcurrencyError,
|
|
42
41
|
DOCUMENT_DOES_NOT_EXIST,
|
|
@@ -44,32 +43,30 @@ export {
|
|
|
44
43
|
NO_CONCURRENCY_CHECK,
|
|
45
44
|
ObjectId,
|
|
46
45
|
OperatorMap,
|
|
46
|
+
PongoCollectionSchemaComponent,
|
|
47
|
+
PongoDatabase,
|
|
48
|
+
PongoDatabaseCache,
|
|
49
|
+
PongoDatabaseDriverRegistry,
|
|
50
|
+
PongoDatabaseSchemaComponent,
|
|
47
51
|
PongoError,
|
|
48
52
|
QueryOperators,
|
|
49
|
-
clientToDbOptions,
|
|
50
53
|
deepEquals,
|
|
51
54
|
expectedVersion,
|
|
52
55
|
expectedVersionValue,
|
|
53
|
-
getPongoDb,
|
|
54
56
|
hasOperators,
|
|
55
57
|
isEquatable,
|
|
56
58
|
isGeneralExpectedDocumentVersion,
|
|
57
59
|
isNumber,
|
|
58
60
|
isOperator,
|
|
59
|
-
isPostgresClientOptions,
|
|
60
61
|
isString,
|
|
61
62
|
objectEntries,
|
|
62
63
|
operationResult,
|
|
63
64
|
pongoClient,
|
|
64
65
|
pongoCollection,
|
|
65
|
-
|
|
66
|
-
pongoCollectionSchemaComponent,
|
|
67
|
-
pongoDbSchemaComponent,
|
|
66
|
+
pongoDatabaseDriverRegistry,
|
|
68
67
|
pongoSchema,
|
|
69
68
|
pongoSession,
|
|
70
69
|
pongoTransaction,
|
|
71
|
-
postgresDb,
|
|
72
|
-
postgresSQLBuilder,
|
|
73
70
|
proxyClientWithSchema,
|
|
74
71
|
proxyPongoDbWithSchema,
|
|
75
72
|
toClientSchemaMetadata,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pgDatabaseDriver,
|
|
3
|
+
usePgDatabaseDriver
|
|
4
|
+
} from "./chunk-EYQDS752.js";
|
|
5
|
+
import "./chunk-NCNRRYVE.js";
|
|
6
|
+
export {
|
|
7
|
+
pgDatabaseDriver as databaseDriver,
|
|
8
|
+
pgDatabaseDriver as pgDriver,
|
|
9
|
+
usePgDatabaseDriver
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=pg-73DOKU64.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkZPWKWNK2cjs = require('./chunk-ZPWKWNK2.cjs');
|
|
5
|
+
require('./chunk-4BL6YWLW.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.databaseDriver = _chunkZPWKWNK2cjs.pgDatabaseDriver; exports.pgDriver = _chunkZPWKWNK2cjs.pgDatabaseDriver; exports.usePgDatabaseDriver = _chunkZPWKWNK2cjs.usePgDatabaseDriver;
|
|
11
|
+
//# sourceMappingURL=pg-I267A7IL.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg-I267A7IL.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,wLAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg-I267A7IL.cjs"}
|
package/dist/pg.cjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-WKW4LGF6.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkZPWKWNK2cjs = require('./chunk-ZPWKWNK2.cjs');
|
|
8
|
+
require('./chunk-4BL6YWLW.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
exports.
|
|
15
|
+
exports.databaseDriver = _chunkZPWKWNK2cjs.pgDatabaseDriver; exports.pgDriver = _chunkZPWKWNK2cjs.pgDatabaseDriver; exports.pongoCollectionPostgreSQLMigrations = _chunkZPWKWNK2cjs.pongoCollectionPostgreSQLMigrations; exports.postgresSQLBuilder = _chunkZPWKWNK2cjs.postgresSQLBuilder; exports.usePgDatabaseDriver = _chunkZPWKWNK2cjs.usePgDatabaseDriver;
|
|
15
16
|
//# sourceMappingURL=pg.cjs.map
|
package/dist/pg.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg.cjs"],"names":[],"mappings":"AAAA,yGAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,gWAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg.cjs"}
|
package/dist/pg.d.cts
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '@event-driven-io/dumbo';
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as _event_driven_io_dumbo from '@event-driven-io/dumbo';
|
|
2
|
+
import { r as PongoCollectionSQLBuilder, P as PongoDatabaseDriver, a as PongoDb, b as PongoDatabaseDriverOptions } from './pongoCollectionSchemaComponent-t_e9n2Wc.cjs';
|
|
3
|
+
import { NodePostgresDriverType, NodePostgresConnection } from '@event-driven-io/dumbo/pg';
|
|
4
|
+
import pg from 'pg';
|
|
5
|
+
|
|
6
|
+
declare const pongoCollectionPostgreSQLMigrations: (collectionName: string) => _event_driven_io_dumbo.SQLMigration[];
|
|
7
|
+
declare const postgresSQLBuilder: (collectionName: string) => PongoCollectionSQLBuilder;
|
|
8
|
+
|
|
9
|
+
type NodePostgresPongoClientOptions = PooledPongoClientOptions | NotPooledPongoOptions;
|
|
10
|
+
type PooledPongoClientOptions = {
|
|
11
|
+
pool: pg.Pool;
|
|
12
|
+
} | {
|
|
13
|
+
pooled: true;
|
|
14
|
+
} | {
|
|
15
|
+
pool: pg.Pool;
|
|
16
|
+
pooled: true;
|
|
17
|
+
} | object;
|
|
18
|
+
type NotPooledPongoOptions = {
|
|
19
|
+
client: pg.Client;
|
|
20
|
+
} | {
|
|
21
|
+
pooled: false;
|
|
22
|
+
} | {
|
|
23
|
+
client: pg.Client;
|
|
24
|
+
pooled: false;
|
|
25
|
+
} | {
|
|
26
|
+
connection: NodePostgresConnection;
|
|
27
|
+
pooled?: false;
|
|
28
|
+
};
|
|
29
|
+
type NodePostgresDatabaseDriverOptions = PongoDatabaseDriverOptions<NodePostgresPongoClientOptions> & {
|
|
30
|
+
databaseName?: string | undefined;
|
|
31
|
+
connectionString: string;
|
|
32
|
+
};
|
|
33
|
+
declare const pgDatabaseDriver: PongoDatabaseDriver<PongoDb<NodePostgresDriverType>, NodePostgresDatabaseDriverOptions>;
|
|
34
|
+
declare const usePgDatabaseDriver: () => void;
|
|
35
|
+
|
|
36
|
+
export { type NodePostgresPongoClientOptions, type NotPooledPongoOptions, type PooledPongoClientOptions, pgDatabaseDriver as databaseDriver, pgDatabaseDriver as pgDriver, pongoCollectionPostgreSQLMigrations, postgresSQLBuilder, usePgDatabaseDriver };
|
package/dist/pg.d.ts
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '@event-driven-io/dumbo';
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as _event_driven_io_dumbo from '@event-driven-io/dumbo';
|
|
2
|
+
import { r as PongoCollectionSQLBuilder, P as PongoDatabaseDriver, a as PongoDb, b as PongoDatabaseDriverOptions } from './pongoCollectionSchemaComponent-t_e9n2Wc.js';
|
|
3
|
+
import { NodePostgresDriverType, NodePostgresConnection } from '@event-driven-io/dumbo/pg';
|
|
4
|
+
import pg from 'pg';
|
|
5
|
+
|
|
6
|
+
declare const pongoCollectionPostgreSQLMigrations: (collectionName: string) => _event_driven_io_dumbo.SQLMigration[];
|
|
7
|
+
declare const postgresSQLBuilder: (collectionName: string) => PongoCollectionSQLBuilder;
|
|
8
|
+
|
|
9
|
+
type NodePostgresPongoClientOptions = PooledPongoClientOptions | NotPooledPongoOptions;
|
|
10
|
+
type PooledPongoClientOptions = {
|
|
11
|
+
pool: pg.Pool;
|
|
12
|
+
} | {
|
|
13
|
+
pooled: true;
|
|
14
|
+
} | {
|
|
15
|
+
pool: pg.Pool;
|
|
16
|
+
pooled: true;
|
|
17
|
+
} | object;
|
|
18
|
+
type NotPooledPongoOptions = {
|
|
19
|
+
client: pg.Client;
|
|
20
|
+
} | {
|
|
21
|
+
pooled: false;
|
|
22
|
+
} | {
|
|
23
|
+
client: pg.Client;
|
|
24
|
+
pooled: false;
|
|
25
|
+
} | {
|
|
26
|
+
connection: NodePostgresConnection;
|
|
27
|
+
pooled?: false;
|
|
28
|
+
};
|
|
29
|
+
type NodePostgresDatabaseDriverOptions = PongoDatabaseDriverOptions<NodePostgresPongoClientOptions> & {
|
|
30
|
+
databaseName?: string | undefined;
|
|
31
|
+
connectionString: string;
|
|
32
|
+
};
|
|
33
|
+
declare const pgDatabaseDriver: PongoDatabaseDriver<PongoDb<NodePostgresDriverType>, NodePostgresDatabaseDriverOptions>;
|
|
34
|
+
declare const usePgDatabaseDriver: () => void;
|
|
35
|
+
|
|
36
|
+
export { type NodePostgresPongoClientOptions, type NotPooledPongoOptions, type PooledPongoClientOptions, pgDatabaseDriver as databaseDriver, pgDatabaseDriver as pgDriver, pongoCollectionPostgreSQLMigrations, postgresSQLBuilder, usePgDatabaseDriver };
|
package/dist/pg.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import "./chunk-WH26IXHN.js";
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
+
pgDatabaseDriver,
|
|
3
4
|
pongoCollectionPostgreSQLMigrations,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
postgresSQLBuilder,
|
|
6
|
+
usePgDatabaseDriver
|
|
7
|
+
} from "./chunk-EYQDS752.js";
|
|
8
|
+
import "./chunk-NCNRRYVE.js";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
pgDatabaseDriver as databaseDriver,
|
|
11
|
+
pgDatabaseDriver as pgDriver,
|
|
10
12
|
pongoCollectionPostgreSQLMigrations,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
postgresSQLBuilder
|
|
13
|
+
postgresSQLBuilder,
|
|
14
|
+
usePgDatabaseDriver
|
|
14
15
|
};
|
|
15
16
|
//# sourceMappingURL=pg.js.map
|