@event-driven-io/pongo 0.17.0-alpha.6 → 0.17.0-beta.1

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.
Files changed (53) hide show
  1. package/dist/chunk-3KNMMQUV.cjs +362 -0
  2. package/dist/chunk-3KNMMQUV.cjs.map +1 -0
  3. package/dist/chunk-5LN762VW.js +362 -0
  4. package/dist/chunk-5LN762VW.js.map +1 -0
  5. package/dist/chunk-7W6X4QGY.cjs +10 -0
  6. package/dist/chunk-7W6X4QGY.cjs.map +1 -0
  7. package/dist/{chunk-OO7GMTMP.js → chunk-DL4E3N6J.js} +574 -873
  8. package/dist/chunk-DL4E3N6J.js.map +1 -0
  9. package/dist/chunk-IBJKZ6TS.js +10 -0
  10. package/dist/chunk-IBJKZ6TS.js.map +1 -0
  11. package/dist/chunk-YLV7YIPZ.cjs +876 -0
  12. package/dist/chunk-YLV7YIPZ.cjs.map +1 -0
  13. package/dist/cli.cjs +94 -35
  14. package/dist/cli.cjs.map +1 -1
  15. package/dist/cli.js +92 -33
  16. package/dist/cli.js.map +1 -1
  17. package/dist/index.cjs +3 -6
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +58 -18
  20. package/dist/index.d.ts +58 -18
  21. package/dist/index.js +14 -17
  22. package/dist/pg-WUYRNGST.js +11 -0
  23. package/dist/pg-WUYRNGST.js.map +1 -0
  24. package/dist/pg-XCWP4FAM.cjs +11 -0
  25. package/dist/pg-XCWP4FAM.cjs.map +1 -0
  26. package/dist/pg.cjs +4 -3
  27. package/dist/pg.cjs.map +1 -1
  28. package/dist/pg.d.cts +33 -6
  29. package/dist/pg.d.ts +33 -6
  30. package/dist/pg.js +10 -9
  31. package/dist/pongoCollectionSchemaComponent-BsHlVyN-.d.cts +422 -0
  32. package/dist/pongoCollectionSchemaComponent-BsHlVyN-.d.ts +422 -0
  33. package/dist/shim.cjs +38 -8
  34. package/dist/shim.cjs.map +1 -1
  35. package/dist/shim.d.cts +10 -8
  36. package/dist/shim.d.ts +10 -8
  37. package/dist/shim.js +35 -5
  38. package/dist/shim.js.map +1 -1
  39. package/dist/sqlite3.cjs +382 -1
  40. package/dist/sqlite3.cjs.map +1 -1
  41. package/dist/sqlite3.d.cts +12 -1
  42. package/dist/sqlite3.d.ts +12 -1
  43. package/dist/sqlite3.js +381 -0
  44. package/dist/sqlite3.js.map +1 -1
  45. package/package.json +20 -12
  46. package/README.md +0 -230
  47. package/dist/chunk-AV4SHJQB.cjs +0 -1175
  48. package/dist/chunk-AV4SHJQB.cjs.map +0 -1
  49. package/dist/chunk-OO7GMTMP.js.map +0 -1
  50. package/dist/pg-BfTNWLV9.d.ts +0 -39
  51. package/dist/pg-C9NmCQe7.d.cts +0 -39
  52. package/dist/pongoClient-D8jPedlZ.d.cts +0 -364
  53. package/dist/pongoClient-D8jPedlZ.d.ts +0 -364
package/dist/index.d.ts CHANGED
@@ -1,10 +1,32 @@
1
- export { P as PongoCollectionOptions, b as PongoCollectionSQLBuilder, p as pongoCollection, c as pongoCollectionPostgreSQLMigrations, a as pongoCollectionSchemaComponent, d as postgresSQLBuilder, t as transactionExecutorOrDefault } from './pg-BfTNWLV9.js';
2
- import { d as PongoTransactionOptions, e as PongoSession, f as PongoDbTransaction } from './pongoClient-D8jPedlZ.js';
3
- export { ae as $inc, af as $push, ac as $set, ad as $unset, A as AllowedDbClientOptions, a7 as AlternativeType, E as CollectionOperationOptions, C as CollectionsMap, a8 as Condition, o as DBsMap, ak as DOCUMENT_DOES_NOT_EXIST, aj as DOCUMENT_EXISTS, K as DeleteManyOptions, J as DeleteOneOptions, a2 as Document, D as DocumentHandler, S as EnhancedOmit, ai as ExpectedDocumentVersion, ag as ExpectedDocumentVersionGeneral, ah as ExpectedDocumentVersionValue, L as FindOptions, H as HandleOptions, M as HasId, Q as InferIdType, F as InsertManyOptions, I as InsertOneOptions, al as NO_CONCURRENCY_CHECK, a6 as NonObjectIdLikeDocument, N as NotPooledPongoOptions, O as ObjectId, a5 as ObjectIdLike, aq as OperationResult, a3 as OptionalId, T as OptionalUnlessRequiredId, W as OptionalUnlessRequiredIdAndVersion, V as OptionalUnlessRequiredVersion, a4 as OptionalVersion, B as PongoClient, b as PongoClientOptions, m as PongoClientSchema, w as PongoClientSchemaMetadata, q as PongoClientWithSchema, c as PongoCollection, k as PongoCollectionSchema, u as PongoCollectionSchemaMetadata, P as PongoDb, i as PongoDbClientOptions, l as PongoDbSchema, v as PongoDbSchemaMetadata, n as PongoDbWithSchema, ax as PongoDeleteManyResult, aw as PongoDeleteResult, ay as PongoDocument, a9 as PongoFilter, ab as PongoFilterOperator, a as PongoHandleResult, at as PongoInsertManyResult, as as PongoInsertOneResult, z as PongoSchemaConfig, ap as PongoUpdate, av as PongoUpdateManyResult, au as PongoUpdateResult, g as PooledPongoClientOptions, az as PostgresDbClientOptions, a1 as RegExpOrString, R as ReplaceOneOptions, aa as RootFilterOperators, G as UpdateManyOptions, U as UpdateOneOptions, X as WithId, $ as WithIdAndVersion, Z as WithVersion, Y as WithoutId, a0 as WithoutIdAndVersion, _ as WithoutVersion, h as clientToDbOptions, ao as expectedVersion, an as expectedVersionValue, j as getPongoDb, am as isGeneralExpectedDocumentVersion, aA as isPostgresClientOptions, ar as operationResult, p as pongoClient, aC as pongoDbSchemaComponent, r as pongoSchema, aB as postgresDb, t as proxyClientWithSchema, s as proxyPongoDbWithSchema, y as toClientSchemaMetadata, x as toDbSchemaMetadata } from './pongoClient-D8jPedlZ.js';
4
- import '@event-driven-io/dumbo';
5
- import '@event-driven-io/dumbo/pg';
6
- import 'pg';
7
- import '@event-driven-io/dumbo/src';
1
+ import { DatabaseDriverType, Dumbo, MigrationStyle, SQLExecutor, DatabaseConnectionString, InferDriverDatabaseType } from '@event-driven-io/dumbo';
2
+ import { P as PongoDb, a as PongoCollectionSchemaComponent, C as CollectionOperationOptions, b as PongoDocument, c as PongoCollection, d as PongoClientSchema, e as PongoDatabaseDriver, f as PongoCollectionSchema, g as PongoDatabaseFactoryOptions, h as PongoDatabaseSchemaComponent, i as PongoDbSchema, A as AnyPongoDb, j as AnyPongoDatabaseDriver, k as PongoClientOptions, l as PongoClient, E as ExtractPongoDatabaseTypeFromDriver, m as PongoClientWithSchema, n as PongoTransactionOptions, o as PongoSession, p as PongoDbTransaction } from './pongoCollectionSchemaComponent-BsHlVyN-.js';
3
+ export { aq as $inc, ar as $push, ao as $set, ap as $unset, aj as AlternativeType, z as AnyPongoDatabaseDriverOptions, G as CollectionsMap, ak as Condition, I as DBsMap, aw as DOCUMENT_DOES_NOT_EXIST, av as DOCUMENT_EXISTS, _ as DeleteManyOptions, Z as DeleteOneOptions, ae as Document, aL as DocumentHandler, a3 as EnhancedOmit, au as ExpectedDocumentVersion, as as ExpectedDocumentVersionGeneral, at as ExpectedDocumentVersionValue, B as ExtractPongoDatabaseDriverOptions, $ as FindOptions, X as HandleOptions, a1 as HasId, a2 as InferIdType, U as InsertManyOptions, T as InsertOneOptions, ax as NO_CONCURRENCY_CHECK, ai as NonObjectIdLikeDocument, a0 as ObjectId, ah as ObjectIdLike, aC as OperationResult, af as OptionalId, a4 as OptionalUnlessRequiredId, a6 as OptionalUnlessRequiredIdAndVersion, a5 as OptionalUnlessRequiredVersion, ag as OptionalVersion, O as PongoClientSchemaMetadata, q as PongoCollectionSQLBuilder, t as PongoCollectionSchemaComponentOptions, M as PongoCollectionSchemaMetadata, s as PongoCollectionURN, r as PongoCollectionURNType, y as PongoDatabaseDriverOptions, D as PongoDatabaseDriverRegistry, x as PongoDatabaseSQLBuilder, w as PongoDatabaseSchemaComponentOptions, v as PongoDatabaseURN, u as PongoDatabaseURNType, N as PongoDbSchemaMetadata, H as PongoDbWithSchema, aJ as PongoDeleteManyResult, aI as PongoDeleteResult, al as PongoFilter, an as PongoFilterOperator, aK as PongoHandleResult, aF as PongoInsertManyResult, aE as PongoInsertOneResult, S as PongoSchemaConfig, aB as PongoUpdate, aH as PongoUpdateManyResult, aG as PongoUpdateResult, ad as RegExpOrString, Y as ReplaceOneOptions, am as RootFilterOperators, W as UpdateManyOptions, V as UpdateOneOptions, a7 as WithId, ab as WithIdAndVersion, a9 as WithVersion, a8 as WithoutId, ac as WithoutIdAndVersion, aa as WithoutVersion, aA as expectedVersion, az as expectedVersionValue, ay as isGeneralExpectedDocumentVersion, aD as operationResult, F as pongoDatabaseDriverRegistry, J as pongoSchema, L as proxyClientWithSchema, K as proxyPongoDbWithSchema, R as toClientSchemaMetadata, Q as toDbSchemaMetadata } from './pongoCollectionSchemaComponent-BsHlVyN-.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
- type Entry<T> = {
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, ConnectionString extends DatabaseConnectionString<InferDriverDatabaseType<DatabaseDriver["driverType"]>>, TypedClientSchema extends PongoClientSchema = PongoClientSchema>(options: PongoClientOptions<DatabaseDriver, ConnectionString, 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-IBJKZ6TS.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
- pongoCollectionPostgreSQLMigrations,
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-OO7GMTMP.js";
38
+ } from "./chunk-DL4E3N6J.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
- pongoCollectionPostgreSQLMigrations,
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-5LN762VW.js";
5
+ import "./chunk-DL4E3N6J.js";
6
+ export {
7
+ pgDatabaseDriver as databaseDriver,
8
+ pgDatabaseDriver as pgDriver,
9
+ usePgDatabaseDriver
10
+ };
11
+ //# sourceMappingURL=pg-WUYRNGST.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 _chunk3KNMMQUVcjs = require('./chunk-3KNMMQUV.cjs');
5
+ require('./chunk-YLV7YIPZ.cjs');
6
+
7
+
8
+
9
+
10
+ exports.databaseDriver = _chunk3KNMMQUVcjs.pgDatabaseDriver; exports.pgDriver = _chunk3KNMMQUVcjs.pgDatabaseDriver; exports.usePgDatabaseDriver = _chunk3KNMMQUVcjs.usePgDatabaseDriver;
11
+ //# sourceMappingURL=pg-XCWP4FAM.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg-XCWP4FAM.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-XCWP4FAM.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-7W6X4QGY.cjs');
2
2
 
3
3
 
4
4
 
5
5
 
6
6
 
7
- var _chunkAV4SHJQBcjs = require('./chunk-AV4SHJQB.cjs');
7
+ var _chunk3KNMMQUVcjs = require('./chunk-3KNMMQUV.cjs');
8
+ require('./chunk-YLV7YIPZ.cjs');
8
9
 
9
10
 
10
11
 
11
12
 
12
13
 
13
14
 
14
- exports.isPostgresClientOptions = _chunkAV4SHJQBcjs.isPostgresClientOptions; exports.pongoCollectionPostgreSQLMigrations = _chunkAV4SHJQBcjs.pongoCollectionPostgreSQLMigrations; exports.pongoDbSchemaComponent = _chunkAV4SHJQBcjs.pongoDbSchemaComponent; exports.postgresDb = _chunkAV4SHJQBcjs.postgresDb; exports.postgresSQLBuilder = _chunkAV4SHJQBcjs.postgresSQLBuilder;
15
+ exports.databaseDriver = _chunk3KNMMQUVcjs.pgDatabaseDriver; exports.pgDriver = _chunk3KNMMQUVcjs.pgDatabaseDriver; exports.pongoCollectionPostgreSQLMigrations = _chunk3KNMMQUVcjs.pongoCollectionPostgreSQLMigrations; exports.postgresSQLBuilder = _chunk3KNMMQUVcjs.postgresSQLBuilder; exports.usePgDatabaseDriver = _chunk3KNMMQUVcjs.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;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,kXAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/pongo/dist/pg.cjs"}
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,33 @@
1
- export { az as PostgresDbClientOptions, aA as isPostgresClientOptions, aC as pongoDbSchemaComponent, aB as postgresDb } from './pongoClient-D8jPedlZ.cjs';
2
- export { c as pongoCollectionPostgreSQLMigrations, d as postgresSQLBuilder } from './pg-C9NmCQe7.cjs';
3
- import '@event-driven-io/dumbo';
4
- import '@event-driven-io/dumbo/pg';
5
- import 'pg';
6
- import '@event-driven-io/dumbo/src';
1
+ import * as _event_driven_io_dumbo from '@event-driven-io/dumbo';
2
+ import { q as PongoCollectionSQLBuilder, e as PongoDatabaseDriver, P as PongoDb, y as PongoDatabaseDriverOptions } from './pongoCollectionSchemaComponent-BsHlVyN-.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
+ declare const pgDatabaseDriver: PongoDatabaseDriver<PongoDb<NodePostgresDriverType>, NodePostgresDatabaseDriverOptions>;
31
+ declare const usePgDatabaseDriver: () => void;
32
+
33
+ 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,33 @@
1
- export { az as PostgresDbClientOptions, aA as isPostgresClientOptions, aC as pongoDbSchemaComponent, aB as postgresDb } from './pongoClient-D8jPedlZ.js';
2
- export { c as pongoCollectionPostgreSQLMigrations, d as postgresSQLBuilder } from './pg-BfTNWLV9.js';
3
- import '@event-driven-io/dumbo';
4
- import '@event-driven-io/dumbo/pg';
5
- import 'pg';
6
- import '@event-driven-io/dumbo/src';
1
+ import * as _event_driven_io_dumbo from '@event-driven-io/dumbo';
2
+ import { q as PongoCollectionSQLBuilder, e as PongoDatabaseDriver, P as PongoDb, y as PongoDatabaseDriverOptions } from './pongoCollectionSchemaComponent-BsHlVyN-.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
+ declare const pgDatabaseDriver: PongoDatabaseDriver<PongoDb<NodePostgresDriverType>, NodePostgresDatabaseDriverOptions>;
31
+ declare const usePgDatabaseDriver: () => void;
32
+
33
+ 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-IBJKZ6TS.js";
1
2
  import {
2
- isPostgresClientOptions,
3
+ pgDatabaseDriver,
3
4
  pongoCollectionPostgreSQLMigrations,
4
- pongoDbSchemaComponent,
5
- postgresDb,
6
- postgresSQLBuilder
7
- } from "./chunk-OO7GMTMP.js";
5
+ postgresSQLBuilder,
6
+ usePgDatabaseDriver
7
+ } from "./chunk-5LN762VW.js";
8
+ import "./chunk-DL4E3N6J.js";
8
9
  export {
9
- isPostgresClientOptions,
10
+ pgDatabaseDriver as databaseDriver,
11
+ pgDatabaseDriver as pgDriver,
10
12
  pongoCollectionPostgreSQLMigrations,
11
- pongoDbSchemaComponent,
12
- postgresDb,
13
- postgresSQLBuilder
13
+ postgresSQLBuilder,
14
+ usePgDatabaseDriver
14
15
  };
15
16
  //# sourceMappingURL=pg.js.map