@drizzle-adapter/d1 1.0.15 → 1.0.18
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/.wrangler/tmp/bundle-CHc9gh/checked-fetch.js +30 -0
- package/.wrangler/tmp/bundle-CHc9gh/middleware-insertion-facade.js +11 -0
- package/.wrangler/tmp/bundle-CHc9gh/middleware-loader.entry.ts +134 -0
- package/.wrangler/tmp/bundle-CHc9gh/strip-cf-connecting-ip-header.js +13 -0
- package/.wrangler/tmp/bundle-kh10f5/checked-fetch.js +30 -0
- package/.wrangler/tmp/bundle-kh10f5/middleware-insertion-facade.js +11 -0
- package/.wrangler/tmp/bundle-kh10f5/middleware-loader.entry.ts +134 -0
- package/.wrangler/tmp/bundle-kh10f5/strip-cf-connecting-ip-header.js +13 -0
- package/.wrangler/tmp/dev-BRrYv0/worker.js +6512 -0
- package/.wrangler/tmp/dev-BRrYv0/worker.js.map +8 -0
- package/.wrangler/tmp/dev-NlAyrN/worker.js +6512 -0
- package/.wrangler/tmp/dev-NlAyrN/worker.js.map +8 -0
- package/LICENSE +21 -674
- package/README.md +41 -0
- package/dist/Adapter/D1DrizzleAdapter.d.ts +13 -9
- package/dist/Adapter/D1DrizzleAdapter.js +14 -10
- package/dist/Adapter/D1DrizzleConnection.d.ts +6 -2
- package/dist/Adapter/D1DrizzleConnection.js +14 -2
- package/dist/Adapter/D1DrizzleDataTypes.d.ts +4 -0
- package/dist/Adapter/D1DrizzleDataTypes.js +4 -0
- package/dist/Adapter/D1DrizzleMigrator.d.ts +5 -1
- package/dist/Adapter/D1DrizzleMigrator.js +5 -1
- package/dist/Factory/D1DrizzleAdapterFactory.d.ts +8 -4
- package/dist/Factory/D1DrizzleAdapterFactory.js +6 -2
- package/dist/Factory/D1DrizzleDataTypesFactory.d.ts +5 -1
- package/dist/Factory/D1DrizzleDataTypesFactory.js +5 -1
- package/dist/Factory/D1DrizzleMigratorFactory.d.ts +6 -2
- package/dist/Factory/D1DrizzleMigratorFactory.js +6 -2
- package/dist/Interface/D1DrizzleClientInterface.d.ts +5 -1
- package/dist/Type/Types.d.ts +4 -0
- package/eslint.config.mjs +1 -1
- package/package.json +11 -10
- package/src/Adapter/D1DrizzleAdapter.ts +16 -11
- package/src/Adapter/D1DrizzleConnection.ts +18 -3
- package/src/Adapter/D1DrizzleDataTypes.ts +4 -0
- package/src/Adapter/D1DrizzleMigrator.ts +6 -1
- package/src/Factory/D1DrizzleAdapterFactory.ts +9 -4
- package/src/Factory/D1DrizzleDataTypesFactory.ts +5 -1
- package/src/Factory/D1DrizzleMigratorFactory.ts +7 -2
- package/src/Interface/D1DrizzleClientInterface.ts +5 -1
- package/src/Type/Types.ts +4 -0
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { DrizzleMigratorFactoryInterface, TypeDrizzleMigratorConfig } from '@drizzle-adapter/core';
|
|
2
|
+
|
|
2
3
|
import { D1DrizzleMigrator } from '../migrator';
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Factory for creating D1 migrator instances.
|
|
7
|
+
* Implements the DrizzleMigratorFactoryInterface for D1 database migrations.
|
|
8
|
+
*/
|
|
4
9
|
export class D1DrizzleMigratorFactory implements DrizzleMigratorFactoryInterface
|
|
5
10
|
{
|
|
6
11
|
/**
|
|
7
12
|
* Returns a new migrator.
|
|
8
13
|
*
|
|
9
|
-
* @param {TypeDrizzleMigratorConfig} config
|
|
10
|
-
* @returns {D1DrizzleMigrator}
|
|
14
|
+
* @param {TypeDrizzleMigratorConfig} config - The migrator configuration
|
|
15
|
+
* @returns {D1DrizzleMigrator} A new D1 migrator instance
|
|
11
16
|
*/
|
|
12
17
|
public create(config: TypeDrizzleMigratorConfig): D1DrizzleMigrator
|
|
13
18
|
{
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { AnyD1Database } from 'drizzle-orm/d1';
|
|
2
1
|
import type { DrizzleClientInterface } from '@drizzle-adapter/core';
|
|
2
|
+
import type { AnyD1Database } from 'drizzle-orm/d1';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Interface for D1 Drizzle client operations.
|
|
6
|
+
* Extends the core DrizzleClientInterface with D1-specific database operations.
|
|
7
|
+
*/
|
|
4
8
|
export interface D1DrizzleClientInterface extends DrizzleClientInterface
|
|
5
9
|
{
|
|
6
10
|
execute(...args: any[]): ReturnType<AnyD1Database['run']>;
|
package/src/Type/Types.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { D1Database } from '@cloudflare/workers-types';
|
|
2
2
|
import type { TypeDrizzleDatabaseConfig } from '@drizzle-adapter/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Configuration interface for D1 database connections.
|
|
6
|
+
* Extends the core database configuration with D1-specific settings.
|
|
7
|
+
*/
|
|
4
8
|
export interface TypeD1DatabaseConfig extends TypeDrizzleDatabaseConfig
|
|
5
9
|
{
|
|
6
10
|
readonly DATABASE: D1Database;
|