Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 8857f1b

Browse files
update package to run correctly
1 parent cabded0 commit 8857f1b

10 files changed

Lines changed: 81 additions & 222 deletions

File tree

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
IS_DEV=
21
SUPABASE_PROJECT_ID=
32
SUPABASE_MANAGEMENT_API_ACCESS_TOKEN=

demo/demo-next/.env

Lines changed: 0 additions & 2 deletions
This file was deleted.

demo/demo-next/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# misc
1919
.DS_Store
2020
*.pem
21+
.vscode
2122

2223
# debug
2324
npm-debug.log*

demo/demo-next/package-lock.json

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

environment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ declare global {
33
interface ProcessEnv {
44
SUPABASE_ANON_KEY: string;
55
SUPABASE_URL: string;
6-
IS_DEV: "true" | "false";
76
}
87
}
98
}

index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env node
22
import "dotenv/config";
33
import { ensureDir, remove, writeFile } from "fs-extra";
4+
import { Project } from "ts-morph";
5+
import { version } from "./package.json";
46
import { parseHookFiles } from "./src/hooks";
57
import { log } from "./src/log";
68
import { parseSupabaseFile } from "./src/supabase";
79
import { File, fetchTypes } from "./src/types";
8-
import { Project } from "ts-morph";
910

10-
const directory = process.env.IS_DEV ? "__backengine__" : "src/__backengine__";
11+
const directory = "__backengine__";
1112

1213
const fetchTableNames = (types: File): string[] => {
1314
const project = new Project();
@@ -25,7 +26,7 @@ const fetchTableNames = (types: File): string[] => {
2526
};
2627

2728
const run = async () => {
28-
log("Starting code generation");
29+
log(`Starting code generation (v${version})`);
2930
const types = await fetchTypes();
3031

3132
await remove(directory);

0 commit comments

Comments
 (0)