@umituz/web-cloudflare 1.4.2 → 1.4.3
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/README.md +10 -5
- package/package.json +2 -2
- package/src/domains/d1/index.ts +13 -0
- package/src/{infrastructure/services/d1 → domains/d1/services}/d1.service.ts +1 -1
- package/src/{infrastructure/services/d1 → domains/d1/services}/index.ts +1 -0
- package/src/domains/d1/types/index.ts +5 -0
- package/src/domains/d1/types/service.interface.ts +12 -0
- package/src/index.ts +1 -1
- /package/src/{domain/entities/d1.entity.ts → domains/d1/entities/index.ts} +0 -0
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ const versions = await wrangler.versionsList();
|
|
|
177
177
|
await wrangler.versionsRollback(versions[0].id);
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
-
**Note:** Wrangler CLI, Workers, AI Gateway, and
|
|
180
|
+
**Note:** Wrangler CLI, Workers, AI Gateway, R2, and D1 services now follow Domain-Driven Design (DDD) architecture with their own domain structures at `src/domains/wrangler/`, `src/domains/workers/`, `src/domains/ai-gateway/`, `src/domains/r2/`, and `src/domains/d1/`.
|
|
181
181
|
|
|
182
182
|
## 📚 Subpath Exports
|
|
183
183
|
|
|
@@ -193,8 +193,8 @@ import { KVService } from '@umituz/web-cloudflare/kv';
|
|
|
193
193
|
// R2 storage (now in domains/)
|
|
194
194
|
import { R2Service, r2Service } from '@umituz/web-cloudflare/r2';
|
|
195
195
|
|
|
196
|
-
// D1 database
|
|
197
|
-
import { D1Service } from '@umituz/web-cloudflare/d1';
|
|
196
|
+
// D1 database (now in domains/)
|
|
197
|
+
import { D1Service, d1Service } from '@umituz/web-cloudflare/d1';
|
|
198
198
|
|
|
199
199
|
// Images optimization
|
|
200
200
|
import { ImagesService } from '@umituz/web-cloudflare/images';
|
|
@@ -675,13 +675,18 @@ Contributions are welcome!
|
|
|
675
675
|
│ │ │ ├── entities/ # Domain entities
|
|
676
676
|
│ │ │ ├── services/ # Domain services
|
|
677
677
|
│ │ │ └── index.ts # Domain exports
|
|
678
|
-
│ │
|
|
678
|
+
│ │ ├── r2/ # R2 storage domain
|
|
679
|
+
│ │ │ ├── entities/ # Domain entities
|
|
680
|
+
│ │ │ ├── services/ # Domain services
|
|
681
|
+
│ │ │ ├── types/ # Domain types
|
|
682
|
+
│ │ │ └── index.ts # Domain exports
|
|
683
|
+
│ │ └── d1/ # D1 database domain
|
|
679
684
|
│ │ ├── entities/ # Domain entities
|
|
680
685
|
│ │ ├── services/ # Domain services
|
|
681
686
|
│ │ ├── types/ # Domain types
|
|
682
687
|
│ │ └── index.ts # Domain exports
|
|
683
688
|
│ ├── infrastructure/
|
|
684
|
-
│ │ ├── services/ # Services (kv,
|
|
689
|
+
│ │ ├── services/ # Services (kv, images, analytics, workflows)
|
|
685
690
|
│ │ ├── router/ # Express-like router
|
|
686
691
|
│ │ ├── middleware/ # Middleware collection
|
|
687
692
|
│ │ └── utils/ # Helper functions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/web-cloudflare",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Comprehensive Cloudflare Workers integration with config-based patterns, middleware, router, workflows, and AI (Patch-only versioning: only z in x.y.z increments)",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"./workers": "./src/domains/workers/index.ts",
|
|
11
11
|
"./kv": "./src/infrastructure/services/kv/index.ts",
|
|
12
12
|
"./r2": "./src/domains/r2/index.ts",
|
|
13
|
-
"./d1": "./src/
|
|
13
|
+
"./d1": "./src/domains/d1/index.ts",
|
|
14
14
|
"./images": "./src/infrastructure/services/images/index.ts",
|
|
15
15
|
"./analytics": "./src/infrastructure/services/analytics/index.ts",
|
|
16
16
|
"./workflows": "./src/infrastructure/services/workflows/index.ts",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description Cloudflare D1 database operations
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { D1QueryResult, D1BatchResult } from "
|
|
6
|
+
import type { D1QueryResult, D1BatchResult } from "../entities";
|
|
7
7
|
import type { ID1Service } from "../../../domain/interfaces/services.interface";
|
|
8
8
|
|
|
9
9
|
export interface D1ExecOptions {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D1 Service Interface
|
|
3
|
+
* @description Abstract interface for D1 database operations
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { D1QueryResult, D1BatchResult } from '../entities';
|
|
7
|
+
|
|
8
|
+
export interface ID1Service {
|
|
9
|
+
query<T>(sql: string, params?: readonly unknown[]): Promise<D1QueryResult<T>>;
|
|
10
|
+
batch(statements: readonly { sql: string; params?: readonly unknown[] }[]): Promise<D1BatchResult>;
|
|
11
|
+
execute<T>(sql: string, params?: readonly unknown[]): Promise<D1QueryResult<T>>;
|
|
12
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -30,8 +30,8 @@ export * from "./domains/wrangler";
|
|
|
30
30
|
export * from "./domains/workers";
|
|
31
31
|
export * from "./domains/ai-gateway";
|
|
32
32
|
export * from "./domains/r2";
|
|
33
|
+
export * from "./domains/d1";
|
|
33
34
|
export * from "./infrastructure/services/kv";
|
|
34
|
-
export * from "./infrastructure/services/d1";
|
|
35
35
|
export * from "./infrastructure/services/images";
|
|
36
36
|
export * from "./infrastructure/services/analytics";
|
|
37
37
|
export * from "./infrastructure/services/workflows";
|
|
File without changes
|