cloesce 0.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,eAAO,MAAM,EAAE,EAAE,cAAyB,CAAC;AAC3C,eAAO,MAAM,WAAW,EAAE,cAAyB,CAAC;AACpD,eAAO,MAAM,UAAU,EAAE,iBAA4B,CAAC;AACtD,eAAO,MAAM,GAAG,EAAE,eAA0B,CAAC;AAC7C,eAAO,MAAM,IAAI,EAAE,eAA0B,CAAC;AAC9C,eAAO,MAAM,GAAG,EAAE,eAA0B,CAAC;AAC7C,eAAO,MAAM,KAAK,EAAE,eAA0B,CAAC;AAC/C,eAAO,MAAM,MAAM,EAAE,eAA0B,CAAC;AAChD,eAAO,MAAM,UAAU,EAAE,iBAA4B,CAAC;AACtD,eAAO,MAAM,SAAS,MAChB,MAAM,KAAG,iBACL,CAAC;AACX,eAAO,MAAM,QAAQ,MACf,MAAM,KAAG,iBACL,CAAC;AACX,eAAO,MAAM,UAAU,MACjB,MAAM,KAAG,iBACL,CAAC;AACX,eAAO,MAAM,UAAU,GACpB,CAAC,KAAK,CAAC,KAAG,iBACH,CAAC;AACX,eAAO,MAAM,MAAM,EAAE,kBAA6B,CAAC;AAGnD,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAChF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAC5C,KAAK,GACL;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GACrC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAC3B,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,CAAC;AAGN,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EACpD,IAAI,EAAE,GAAG,EACT,IAAI,EAAE;IAAE,QAAQ,CAAC,CAAA;CAAE,GAClB,CAAC,EAAE,CAKL"}
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ export { cloesce, modelsFromSql } from "./cloesce.js";
2
+ // Compiler hints
3
+ export const D1 = () => { };
4
+ export const PlainOldObject = () => { };
5
+ export const WranglerEnv = () => { };
6
+ export const PrimaryKey = () => { };
7
+ export const GET = () => { };
8
+ export const POST = () => { };
9
+ export const PUT = () => { };
10
+ export const PATCH = () => { };
11
+ export const DELETE = () => { };
12
+ export const DataSource = () => { };
13
+ export const OneToMany = (_) => () => { };
14
+ export const OneToOne = (_) => () => { };
15
+ export const ManyToMany = (_) => () => { };
16
+ export const ForeignKey = (_) => () => { };
17
+ export const Inject = () => { };
18
+ // Helpers
19
+ export function instantiateObjectArray(data, ctor) {
20
+ if (Array.isArray(data)) {
21
+ return data.map((x) => instantiateObjectArray(x, ctor)).flat();
22
+ }
23
+ return [Object.assign(new ctor(), data)];
24
+ }
@@ -0,0 +1,4 @@
1
+ export interface D1Db {
2
+ }
3
+ export type Handler = (db: D1Db, req: Request, ...args: any[]) => Promise<Response>;
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;CAAG;AAExB,MAAM,MAAM,OAAO,GAAG,CACpB,EAAE,EAAE,IAAI,EACR,GAAG,EAAE,OAAO,EACZ,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,OAAO,CAAC,QAAQ,CAAC,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "cloesce",
3
+ "version": "0.0.3",
4
+ "description": "A tool to extract and compile TypeScript code into something wrangler can consume and deploy for D1 Databases and Cloudflare Workers",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./cli": "./dist/cli.js"
16
+ },
17
+ "bin": {
18
+ "cloesce": "./dist/cli.js"
19
+ },
20
+
21
+ "files": [
22
+ "dist/**",
23
+ "wasm/**",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "sideEffects": false,
28
+ "engines": { "node": ">=18.17" },
29
+
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.json",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "vitest --run",
34
+ "format": "prettier --check .",
35
+ "format:fix": "prettier --write .",
36
+ "prepublishOnly": "npm run typecheck && npm run build && npm run test"
37
+ },
38
+
39
+ "dependencies": {
40
+ "cmd-ts": "^0.14.1",
41
+ "ts-morph": "^22.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@cloudflare/workers-types": "^4.20250906.0",
45
+ "prettier": "^3.6.2",
46
+ "ts-node": "^10.9.2",
47
+ "typescript": "^5.6.0",
48
+ "vitest": "^3.2.4",
49
+ "wrangler": "^4.34.0"
50
+ },
51
+
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "git+https://github.com/bens-schreiber/cloesce.git"
55
+ },
56
+ "homepage": "https://github.com/bens-schreiber/cloesce",
57
+ "keywords": ["cloudflare", "workers", "d1", "orm", "cli"]
58
+ }