@arkstack/database 0.1.1 → 0.1.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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export interface AdapterFactoryOptions {\n connectionString: string;\n}\n\nexport interface DatabaseAdapterFactory<TAdapter> {\n (options: AdapterFactoryOptions): TAdapter;\n}\n\nexport interface DatabaseClientFactory<TAdapter, TClient> {\n (options: { adapter: TAdapter }): TClient;\n}\n\nexport interface CreateDatabaseClientOptions<TAdapter, TClient> {\n connectionString?: string;\n createAdapter: DatabaseAdapterFactory<TAdapter>;\n createClient: DatabaseClientFactory<TAdapter, TClient>;\n}\n\nexport const createDatabaseClient = <TAdapter, TClient> (\n options: CreateDatabaseClientOptions<TAdapter, TClient>,\n): TClient => {\n const connectionString = options.connectionString ?? process.env.DATABASE_URL ?? \"\";\n const adapter = options.createAdapter({ connectionString });\n\n return options.createClient({ adapter });\n};\n"],"mappings":";AAkBA,MAAa,wBACT,YACU;CACV,MAAM,mBAAmB,QAAQ,oBAAoB,QAAQ,IAAI,gBAAgB;CACjF,MAAM,UAAU,QAAQ,cAAc,EAAE,kBAAkB,CAAC;AAE3D,QAAO,QAAQ,aAAa,EAAE,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["export interface AdapterFactoryOptions {\n connectionString: string;\n}\n\nexport interface DatabaseAdapterFactory<TAdapter> {\n (options: AdapterFactoryOptions): TAdapter;\n}\n\nexport interface DatabaseClientFactory<TAdapter, TClient> {\n (options: { adapter: TAdapter }): TClient;\n}\n\nexport interface CreateDatabaseClientOptions<TAdapter, TClient> {\n connectionString?: string;\n createAdapter: DatabaseAdapterFactory<TAdapter>;\n createClient: DatabaseClientFactory<TAdapter, TClient>;\n}\n\nexport const createDatabaseClient = <TAdapter, TClient> (\n options: CreateDatabaseClientOptions<TAdapter, TClient>,\n): TClient => {\n const connectionString = options.connectionString ?? process.env.DATABASE_URL ?? ''\n const adapter = options.createAdapter({ connectionString })\n\n return options.createClient({ adapter })\n}\n"],"mappings":";AAkBA,MAAa,wBACT,YACU;CACV,MAAM,mBAAmB,QAAQ,oBAAoB,QAAQ,IAAI,gBAAgB;CACjF,MAAM,UAAU,QAAQ,cAAc,EAAE,kBAAkB,CAAC;AAE3D,QAAO,QAAQ,aAAa,EAAE,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@arkstack/database",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Database package for Arkstack providing database-specific implementations of core Arkstack features such as routing, middleware, and database integration.",
6
+ "homepage": "https://arkstack.toneflix.net",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/arkstack-hq/arkstack.git",