@queuebase/db 0.0.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.
@@ -0,0 +1,2 @@
1
+ export type { Job, NewJob } from './sqlite/schema.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { type PostgresJsDatabase } from 'drizzle-orm/postgres-js';
2
+ import * as schema from './schema.js';
3
+ export type PgDbSchema = typeof schema;
4
+ export type PostgresDb = PostgresJsDatabase<PgDbSchema>;
5
+ export declare function createPostgresClient(connectionString: string): {
6
+ db: PostgresDb;
7
+ close: () => Promise<void>;
8
+ };
9
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/postgres/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAW,MAAM,yBAAyB,CAAC;AAE3E,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC;AACvC,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAExD,wBAAgB,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,GAAG;IAC9D,EAAE,EAAE,UAAU,CAAC;IACf,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAQA"}
@@ -0,0 +1,12 @@
1
+ import { drizzle } from 'drizzle-orm/postgres-js';
2
+ import postgres from 'postgres';
3
+ import * as schema from './schema.js';
4
+ export function createPostgresClient(connectionString) {
5
+ const client = postgres(connectionString);
6
+ const db = drizzle(client, { schema });
7
+ return {
8
+ db,
9
+ close: () => client.end(),
10
+ };
11
+ }
12
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/postgres/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAKtC,MAAM,UAAU,oBAAoB,CAAC,gBAAwB;IAI3D,MAAM,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC1C,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAEvC,OAAO;QACL,EAAE;QACF,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE;KAC1B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { createPostgresClient, type PostgresDb, type PgDbSchema } from './client.js';
2
+ export { jobs, jobStatusEnum, backoffStrategyEnum, type Job, type NewJob, jobLogs, jobLogEventEnum, jobLogSourceEnum, type JobLog, type NewJobLog, auditLogs, type AuditLog, type NewAuditLog, cronLocks, user, session, account, verification, organization, member, invitation, project, subscription, usage, planEnum, subscriptionStatusEnum, } from './schema.js';
3
+ export { eq, and, or, sql, desc, asc, inArray, gte, lte } from 'drizzle-orm';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/postgres/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAEL,IAAI,EACJ,aAAa,EACb,mBAAmB,EACnB,KAAK,GAAG,EACR,KAAK,MAAM,EAEX,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EAEd,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAEhB,SAAS,EAET,IAAI,EACJ,OAAO,EACP,OAAO,EACP,YAAY,EAEZ,YAAY,EACZ,MAAM,EACN,UAAU,EAEV,OAAO,EAEP,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,21 @@
1
+ export { createPostgresClient } from './client.js';
2
+ export {
3
+ // Jobs
4
+ jobs, jobStatusEnum, backoffStrategyEnum,
5
+ // Job Logs
6
+ jobLogs, jobLogEventEnum, jobLogSourceEnum,
7
+ // Audit Logs
8
+ auditLogs,
9
+ // Cron Locks
10
+ cronLocks,
11
+ // Auth
12
+ user, session, account, verification,
13
+ // Organizations
14
+ organization, member, invitation,
15
+ // Projects
16
+ project,
17
+ // Billing
18
+ subscription, usage, planEnum, subscriptionStatusEnum, } from './schema.js';
19
+ // Re-export drizzle-orm operators to ensure consumers use the same instance
20
+ export { eq, and, or, sql, desc, asc, inArray, gte, lte } from 'drizzle-orm';
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/postgres/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoC,MAAM,aAAa,CAAC;AACrF,OAAO;AACL,OAAO;AACP,IAAI,EACJ,aAAa,EACb,mBAAmB;AAGnB,WAAW;AACX,OAAO,EACP,eAAe,EACf,gBAAgB;AAGhB,aAAa;AACb,SAAS;AAGT,aAAa;AACb,SAAS;AACT,OAAO;AACP,IAAI,EACJ,OAAO,EACP,OAAO,EACP,YAAY;AACZ,gBAAgB;AAChB,YAAY,EACZ,MAAM,EACN,UAAU;AACV,WAAW;AACX,OAAO;AACP,UAAU;AACV,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,4EAA4E;AAC5E,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC"}