Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno support #83

Open
harastaivan opened this issue Jun 20, 2023 · 2 comments
Open

Deno support #83

harastaivan opened this issue Jun 20, 2023 · 2 comments
Labels
feature request New feature or request

Comments

@harastaivan
Copy link

harastaivan commented Jun 20, 2023

Hello,
I tried to use kysely-codegen with Deno. Since kysely supports Deno, I thought kysely-codegen will work too.

I ran:

deno run npm:kysely-codegen

It outputs:

• Loaded environment variables from .env file.
• No dialect specified. Assuming 'postgres'.

But it seems it doesn't do anything. Could you test it and possibly help me what's the problem? I'm happy to help with investigation but need some guide

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@RobinBlomberg RobinBlomberg added the feature request New feature or request label Aug 8, 2023
@kbaba1001
Copy link

I was able to run like this on deno.json:

"tasks": {
	"kysely-codegen": "echo \"import 'npm:pg@^8.11.3'; import 'npm:kysely-codegen@^0.11.0';\" | deno run --allow-env -A npm:kysely-codegen@^0.11.0 - kysely-codegen --dialect=postgres --out-file ./src/database-types.ts --env-file .env"
},

@w7it
Copy link

w7it commented Apr 27, 2024

Or try to cache required package before run codegen:

deno cache npm:pg && deno run -A npm:kysely-codegen --out-file=./db_schema.ts 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants