@event-driven-io/dumbo 0.13.0-beta.4 → 0.13.0-beta.41

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 (83) hide show
  1. package/dist/cloudflare.cjs +397 -0
  2. package/dist/cloudflare.cjs.map +1 -0
  3. package/dist/cloudflare.d.cts +99 -0
  4. package/dist/cloudflare.d.ts +99 -0
  5. package/dist/cloudflare.js +361 -0
  6. package/dist/cloudflare.js.map +1 -0
  7. package/dist/core-BMeDuqBQ.js +2265 -0
  8. package/dist/core-BMeDuqBQ.js.map +1 -0
  9. package/dist/core-BPNgo5b6.js +379 -0
  10. package/dist/core-BPNgo5b6.js.map +1 -0
  11. package/dist/core-CIVu4cNp.cjs +588 -0
  12. package/dist/core-CIVu4cNp.cjs.map +1 -0
  13. package/dist/core-D5W_5J8k.cjs +3246 -0
  14. package/dist/core-D5W_5J8k.cjs.map +1 -0
  15. package/dist/core-DqUjje4u.cjs +450 -0
  16. package/dist/core-DqUjje4u.cjs.map +1 -0
  17. package/dist/core-gu5fi784.js +451 -0
  18. package/dist/core-gu5fi784.js.map +1 -0
  19. package/dist/{index-C2z_XBn6.d.ts → index-B-q2er0S.d.cts} +122 -75
  20. package/dist/{index-C0h0c380.d.cts → index-B5qbt5nP.d.ts} +122 -75
  21. package/dist/index-BJJAkyuJ.d.ts +68 -0
  22. package/dist/index-CRbkvVjT.d.ts +1587 -0
  23. package/dist/index-Cmdlb0KP.d.cts +1587 -0
  24. package/dist/index-D7qxqMf9.d.cts +67 -0
  25. package/dist/index-DtRCGhFP.d.cts +68 -0
  26. package/dist/index-m5LDyNNF.d.ts +67 -0
  27. package/dist/index.cjs +219 -270
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +3 -127
  30. package/dist/index.d.ts +3 -127
  31. package/dist/index.js +56 -269
  32. package/dist/index.js.map +1 -1
  33. package/dist/pg.cjs +373 -659
  34. package/dist/pg.cjs.map +1 -1
  35. package/dist/pg.d.cts +140 -153
  36. package/dist/pg.d.ts +140 -153
  37. package/dist/pg.js +326 -658
  38. package/dist/pg.js.map +1 -1
  39. package/dist/postgreSQLMetadata-Khf1e9CT.js +65 -0
  40. package/dist/postgreSQLMetadata-Khf1e9CT.js.map +1 -0
  41. package/dist/postgreSQLMetadata-Ri_p5u6i.cjs +118 -0
  42. package/dist/postgreSQLMetadata-Ri_p5u6i.cjs.map +1 -0
  43. package/dist/postgresql.cjs +25 -0
  44. package/dist/postgresql.d.cts +3 -0
  45. package/dist/postgresql.d.ts +3 -0
  46. package/dist/postgresql.js +4 -0
  47. package/dist/sqlite.cjs +30 -0
  48. package/dist/sqlite.d.cts +3 -0
  49. package/dist/sqlite.d.ts +3 -0
  50. package/dist/sqlite.js +4 -0
  51. package/dist/sqlite3.cjs +437 -273
  52. package/dist/sqlite3.cjs.map +1 -1
  53. package/dist/sqlite3.d.cts +92 -70
  54. package/dist/sqlite3.d.ts +92 -70
  55. package/dist/sqlite3.js +402 -272
  56. package/dist/sqlite3.js.map +1 -1
  57. package/dist/sqliteMetadata-CpmoZxqb.cjs +46 -0
  58. package/dist/sqliteMetadata-CpmoZxqb.cjs.map +1 -0
  59. package/dist/sqliteMetadata-viYmVwA5.js +29 -0
  60. package/dist/sqliteMetadata-viYmVwA5.js.map +1 -0
  61. package/package.json +60 -37
  62. package/dist/chunk-32AL3EAS.cjs +0 -47
  63. package/dist/chunk-32AL3EAS.cjs.map +0 -1
  64. package/dist/chunk-6IHCIJ7S.js +0 -47
  65. package/dist/chunk-6IHCIJ7S.js.map +0 -1
  66. package/dist/chunk-IYEHOE4S.cjs +0 -405
  67. package/dist/chunk-IYEHOE4S.cjs.map +0 -1
  68. package/dist/chunk-N7RWT46K.js +0 -2011
  69. package/dist/chunk-N7RWT46K.js.map +0 -1
  70. package/dist/chunk-OJ34O3Q2.cjs +0 -2011
  71. package/dist/chunk-OJ34O3Q2.cjs.map +0 -1
  72. package/dist/chunk-XVV3OOQX.js +0 -405
  73. package/dist/chunk-XVV3OOQX.js.map +0 -1
  74. package/dist/columnProcessors-BX-sH7ah.d.cts +0 -8
  75. package/dist/columnProcessors-DMPpTPqM.d.ts +0 -8
  76. package/dist/connectionString-B1wm0TFc.d.cts +0 -1271
  77. package/dist/connectionString-B1wm0TFc.d.ts +0 -1271
  78. package/dist/d1.cjs +0 -277
  79. package/dist/d1.cjs.map +0 -1
  80. package/dist/d1.d.cts +0 -72
  81. package/dist/d1.d.ts +0 -72
  82. package/dist/d1.js +0 -277
  83. package/dist/d1.js.map +0 -1
@@ -0,0 +1,67 @@
1
+ import { La as AnySQLToken, ci as AnyTypeValidationError, cn as QueryResult, li as TypeValidationSuccess, ln as QueryResultRow } from "./index-Cmdlb0KP.cjs";
2
+
3
+ //#region src/core/sql/valueMappers/reservedSqlWords.d.ts
4
+ declare const ansiSqlReservedMap: {
5
+ [key: string]: boolean;
6
+ };
7
+ //#endregion
8
+ //#region src/core/sql/tokenizedSQL/tokenizedSQL.d.ts
9
+ type TokenizedSQL = Readonly<{
10
+ __brand: 'tokenized-sql';
11
+ sqlChunks: ReadonlyArray<string>;
12
+ sqlTokens: ReadonlyArray<AnySQLToken>;
13
+ }>;
14
+ declare const TokenizedSQL: {
15
+ (strings: ReadonlyArray<string>, values: unknown[]): TokenizedSQL;
16
+ paramPlaceholder: string;
17
+ empty: {
18
+ __brand: "tokenized-sql";
19
+ sqlChunks: string[];
20
+ sqlTokens: never[];
21
+ };
22
+ };
23
+ declare const isTokenizedSQL: (value: unknown) => value is TokenizedSQL;
24
+ //#endregion
25
+ //#region src/core/query/mappers.d.ts
26
+ declare const mapRows: <Result extends QueryResultRow = QueryResultRow, Mapped = unknown>(getResult: Promise<QueryResult<Result>>, map: (row: Result) => Mapped) => Promise<Mapped[]>;
27
+ declare const toCamelCase: (snakeStr: string) => string;
28
+ declare const mapToCamelCase: <T extends Record<string, unknown>>(obj: Record<string, unknown>) => T;
29
+ //#endregion
30
+ //#region src/core/query/selectors.d.ts
31
+ declare const firstOrNull: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result | null>;
32
+ declare const first: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result>;
33
+ declare const singleOrNull: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result | null>;
34
+ declare const single: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result>;
35
+ type CountSQLQueryResult = {
36
+ count: number;
37
+ };
38
+ declare const count: (getResult: Promise<QueryResult<CountSQLQueryResult>>) => Promise<number>;
39
+ type ExistsSQLQueryResult = {
40
+ exists: boolean | 1 | 0;
41
+ };
42
+ declare const exists: (getResult: Promise<QueryResult<ExistsSQLQueryResult>>) => Promise<boolean>;
43
+ //#endregion
44
+ //#region src/core/testing/typesTesting.d.ts
45
+ type Expect<T extends true> = T;
46
+ type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
47
+ type IsError<T> = T extends AnyTypeValidationError ? true : false;
48
+ type IsOK<T> = T extends TypeValidationSuccess ? true : false;
49
+ //#endregion
50
+ //#region src/core/tracing/printing/color.d.ts
51
+ declare const color: {
52
+ level: 0 | 1;
53
+ hex: (value: string) => (text: string) => string;
54
+ red: (value: string) => string;
55
+ green: (value: string) => string;
56
+ blue: (value: string) => string;
57
+ cyan: (value: string) => string;
58
+ yellow: (value: string) => string;
59
+ };
60
+ //#endregion
61
+ //#region src/core/tracing/printing/pretty.d.ts
62
+ declare const prettyJson: (obj: unknown, options?: {
63
+ handleMultiline?: boolean;
64
+ }) => string;
65
+ //#endregion
66
+ export { toCamelCase as _, IsError as a, ansiSqlReservedMap as b, ExistsSQLQueryResult as c, first as d, firstOrNull as f, mapToCamelCase as g, mapRows as h, Expect as i, count as l, singleOrNull as m, color as n, IsOK as o, single as p, Equals as r, CountSQLQueryResult as s, prettyJson as t, exists as u, TokenizedSQL as v, isTokenizedSQL as y };
67
+ //# sourceMappingURL=index-D7qxqMf9.d.cts.map
@@ -0,0 +1,68 @@
1
+ import { At as DatabaseLockOptions, Dt as AcquireDatabaseLockMode, Gi as SQL, Jt as SQLExecutor, Mt as ReleaseDatabaseLockOptions, Ot as AcquireDatabaseLockOptions, Qi as DefaultSQLColumnProcessors, Ri as SQLFormatter, Wa as SQLIn, gn as DumboError, i as DatabaseConnectionString, kt as DatabaseLock, ra as SQLProcessor, rt as DatabaseDriverType, xt as MigratorOptions, za as SQLArray } from "./index-Cmdlb0KP.cjs";
2
+
3
+ //#region src/storage/postgresql/core/connections/connectionString.d.ts
4
+ declare const defaultPostgreSQLConnectionString: PostgreSQLConnectionString;
5
+ type PostgreSQLConnectionString = DatabaseConnectionString<'PostgreSQL', `postgresql://${string}` | `postgres://${string}`>;
6
+ declare const PostgreSQLConnectionString: (connectionString: string) => PostgreSQLConnectionString;
7
+ /**
8
+ * Parse database name from a PostgreSQL connection string
9
+ */
10
+ declare function parseDatabaseName(str: string): string | null;
11
+ //#endregion
12
+ //#region src/storage/postgresql/core/errors/errorMapper.d.ts
13
+ /**
14
+ * Maps a PostgreSQL error (from the `pg` driver) to a typed DumboError
15
+ * based on the SQLSTATE code.
16
+ *
17
+ * SQLSTATE reference: https://www.postgresql.org/docs/current/errcodes-appendix.html
18
+ * Transient classification based on Npgsql's PostgresException.IsTransient.
19
+ *
20
+ * Falls back to a generic DumboError (500) if the error is not a recognized PostgreSQL error.
21
+ */
22
+ declare const mapPostgresError: (error: unknown) => DumboError;
23
+ //#endregion
24
+ //#region src/storage/postgresql/core/locks/advisoryLocks.d.ts
25
+ declare const tryAcquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<boolean>;
26
+ declare const releaseAdvisoryLock: (execute: SQLExecutor, options: ReleaseDatabaseLockOptions) => Promise<boolean>;
27
+ declare const acquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<void>;
28
+ declare const AdvisoryLock: DatabaseLock;
29
+ declare const advisoryLock: (execute: SQLExecutor, options: DatabaseLockOptions) => {
30
+ acquire: (acquireOptions?: {
31
+ mode: AcquireDatabaseLockMode;
32
+ }) => Promise<void>;
33
+ tryAcquire: (acquireOptions?: {
34
+ mode: AcquireDatabaseLockMode;
35
+ }) => Promise<boolean>;
36
+ release: () => Promise<boolean>;
37
+ withAcquire: <Result>(handle: () => Promise<Result>, acquireOptions?: {
38
+ mode: AcquireDatabaseLockMode;
39
+ }) => Promise<Result>;
40
+ };
41
+ //#endregion
42
+ //#region src/storage/postgresql/core/schema/migrations.d.ts
43
+ declare const DefaultPostgreSQLMigratorOptions: MigratorOptions;
44
+ //#endregion
45
+ //#region src/storage/postgresql/core/schema/schema.d.ts
46
+ declare const defaultPostgreSqlDatabase = "postgres";
47
+ declare const tableExistsSQL: (tableName: string) => SQL;
48
+ declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
49
+ declare const functionExistsSQL: (functionName: string) => SQL;
50
+ declare const functionExists: (execute: SQLExecutor, functionName: string) => Promise<boolean>;
51
+ //#endregion
52
+ //#region src/storage/postgresql/core/sql/formatter/index.d.ts
53
+ declare const pgFormatter: SQLFormatter;
54
+ //#endregion
55
+ //#region src/storage/postgresql/core/sql/processors/arrayProcessors.d.ts
56
+ declare const PostgreSQLArrayProcessor: SQLProcessor<SQLArray>;
57
+ declare const PostgreSQLExpandSQLInProcessor: SQLProcessor<SQLIn>;
58
+ //#endregion
59
+ //#region src/storage/postgresql/core/sql/processors/columProcessors.d.ts
60
+ declare const postgreSQLColumnProcessors: DefaultSQLColumnProcessors;
61
+ //#endregion
62
+ //#region src/storage/postgresql/core/index.d.ts
63
+ type PostgreSQLDatabaseName = 'PostgreSQL';
64
+ declare const PostgreSQLDatabaseName = "PostgreSQL";
65
+ type PostgreSQLDriverType<DriverName extends string = string> = DatabaseDriverType<PostgreSQLDatabaseName, DriverName>;
66
+ //#endregion
67
+ export { tryAcquireAdvisoryLock as _, PostgreSQLExpandSQLInProcessor as a, defaultPostgreSQLConnectionString as b, functionExists as c, tableExistsSQL as d, DefaultPostgreSQLMigratorOptions as f, releaseAdvisoryLock as g, advisoryLock as h, PostgreSQLArrayProcessor as i, functionExistsSQL as l, acquireAdvisoryLock as m, PostgreSQLDriverType as n, pgFormatter as o, AdvisoryLock as p, postgreSQLColumnProcessors as r, defaultPostgreSqlDatabase as s, PostgreSQLDatabaseName as t, tableExists as u, mapPostgresError as v, parseDatabaseName as x, PostgreSQLConnectionString as y };
68
+ //# sourceMappingURL=index-DtRCGhFP.d.cts.map
@@ -0,0 +1,67 @@
1
+ import { La as AnySQLToken, ci as AnyTypeValidationError, cn as QueryResult, li as TypeValidationSuccess, ln as QueryResultRow } from "./index-CRbkvVjT.js";
2
+
3
+ //#region src/core/sql/valueMappers/reservedSqlWords.d.ts
4
+ declare const ansiSqlReservedMap: {
5
+ [key: string]: boolean;
6
+ };
7
+ //#endregion
8
+ //#region src/core/sql/tokenizedSQL/tokenizedSQL.d.ts
9
+ type TokenizedSQL = Readonly<{
10
+ __brand: 'tokenized-sql';
11
+ sqlChunks: ReadonlyArray<string>;
12
+ sqlTokens: ReadonlyArray<AnySQLToken>;
13
+ }>;
14
+ declare const TokenizedSQL: {
15
+ (strings: ReadonlyArray<string>, values: unknown[]): TokenizedSQL;
16
+ paramPlaceholder: string;
17
+ empty: {
18
+ __brand: "tokenized-sql";
19
+ sqlChunks: string[];
20
+ sqlTokens: never[];
21
+ };
22
+ };
23
+ declare const isTokenizedSQL: (value: unknown) => value is TokenizedSQL;
24
+ //#endregion
25
+ //#region src/core/query/mappers.d.ts
26
+ declare const mapRows: <Result extends QueryResultRow = QueryResultRow, Mapped = unknown>(getResult: Promise<QueryResult<Result>>, map: (row: Result) => Mapped) => Promise<Mapped[]>;
27
+ declare const toCamelCase: (snakeStr: string) => string;
28
+ declare const mapToCamelCase: <T extends Record<string, unknown>>(obj: Record<string, unknown>) => T;
29
+ //#endregion
30
+ //#region src/core/query/selectors.d.ts
31
+ declare const firstOrNull: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result | null>;
32
+ declare const first: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result>;
33
+ declare const singleOrNull: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result | null>;
34
+ declare const single: <Result extends QueryResultRow = QueryResultRow>(getResult: Promise<QueryResult<Result>>) => Promise<Result>;
35
+ type CountSQLQueryResult = {
36
+ count: number;
37
+ };
38
+ declare const count: (getResult: Promise<QueryResult<CountSQLQueryResult>>) => Promise<number>;
39
+ type ExistsSQLQueryResult = {
40
+ exists: boolean | 1 | 0;
41
+ };
42
+ declare const exists: (getResult: Promise<QueryResult<ExistsSQLQueryResult>>) => Promise<boolean>;
43
+ //#endregion
44
+ //#region src/core/testing/typesTesting.d.ts
45
+ type Expect<T extends true> = T;
46
+ type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
47
+ type IsError<T> = T extends AnyTypeValidationError ? true : false;
48
+ type IsOK<T> = T extends TypeValidationSuccess ? true : false;
49
+ //#endregion
50
+ //#region src/core/tracing/printing/color.d.ts
51
+ declare const color: {
52
+ level: 0 | 1;
53
+ hex: (value: string) => (text: string) => string;
54
+ red: (value: string) => string;
55
+ green: (value: string) => string;
56
+ blue: (value: string) => string;
57
+ cyan: (value: string) => string;
58
+ yellow: (value: string) => string;
59
+ };
60
+ //#endregion
61
+ //#region src/core/tracing/printing/pretty.d.ts
62
+ declare const prettyJson: (obj: unknown, options?: {
63
+ handleMultiline?: boolean;
64
+ }) => string;
65
+ //#endregion
66
+ export { toCamelCase as _, IsError as a, ansiSqlReservedMap as b, ExistsSQLQueryResult as c, first as d, firstOrNull as f, mapToCamelCase as g, mapRows as h, Expect as i, count as l, singleOrNull as m, color as n, IsOK as o, single as p, Equals as r, CountSQLQueryResult as s, prettyJson as t, exists as u, TokenizedSQL as v, isTokenizedSQL as y };
67
+ //# sourceMappingURL=index-m5LDyNNF.d.ts.map