Open haikyuu opened 1 year ago
When D1 is available I will make it work!
Hi, I would like to find out more about this. As of today D1 has entered General Availability state.
It has arrived! The greatest D1 ORM of all time.
https://github.com/thebinarysearchtree/flyweight#cloudflare-d1
% npx create-flyweight d1 src/database
Need to install the following packages:
create-flyweight@1.0.46
Ok to proceed? (y) y
up to date, audited 240 packages in 474ms
38 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
up to date, audited 240 packages in 462ms
38 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
node:internal/fs/promises:1023
const result = await PromisePrototypeThen(
^
Error: ENOENT: no such file or directory, lstat '/Users/bart/.npm/_npx/013ae53d1681031b/node_modules/create-flyweight/d1/migrations'
at async lstat (node:internal/fs/promises:1023:18)
at async Promise.all (index 0)
at async checkPaths (node:internal/fs/cp/cp:76:39)
at async cpFn (node:internal/fs/cp/cp:65:17)
at async copy (file:///Users/bart/.npm/_npx/013ae53d1681031b/node_modules/create-flyweight/index.js:46:3)
at async file:///Users/bart/.npm/_npx/013ae53d1681031b/node_modules/create-flyweight/index.js:51:1 {
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path: '/Users/bart/.npm/_npx/013ae53d1681031b/node_modules/create-flyweight/d1/migrations'
}
@louwers hopefully it works now.
in project root:
rm -rf src/database
npm uninstall create-flyweight
npx create-flyweight d1 src/database
Hello, i love the conventions and ergonomics of this ORM. Can it run in D1?