keryx 0.10.3 → 0.10.5
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/initializers/db.ts +4 -4
- package/package.json +1 -1
- package/util/cli.ts +9 -8
package/initializers/db.ts
CHANGED
|
@@ -111,14 +111,14 @@ export class DB extends Initializer {
|
|
|
111
111
|
* Learn more @ https://orm.drizzle.team/kit-docs/overview
|
|
112
112
|
*/
|
|
113
113
|
async generateMigrations() {
|
|
114
|
-
const migrationConfig = {
|
|
115
|
-
dialect: "postgresql",
|
|
116
|
-
schema: path.join("
|
|
114
|
+
const migrationConfig: DrizzleMigrateConfig = {
|
|
115
|
+
dialect: "postgresql" as const,
|
|
116
|
+
schema: path.join("schema", "*"),
|
|
117
117
|
dbCredentials: {
|
|
118
118
|
url: config.database.connectionString,
|
|
119
119
|
},
|
|
120
120
|
out: path.join("drizzle"),
|
|
121
|
-
}
|
|
121
|
+
};
|
|
122
122
|
|
|
123
123
|
const fileContent = `export default ${JSON.stringify(migrationConfig, null, 2)}`;
|
|
124
124
|
const tmpfilePath = path.join(api.rootDir, "drizzle", "config.tmp.ts");
|
package/package.json
CHANGED
package/util/cli.ts
CHANGED
|
@@ -62,14 +62,15 @@ export async function buildProgram(opts: {
|
|
|
62
62
|
const files = await scaffoldProject(projectName, targetDir, options);
|
|
63
63
|
files.forEach((f) => console.log(` ${f}`));
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
bun dev
|
|
72
|
-
|
|
65
|
+
const steps = [` cd ${projectName}`, ` cp .env.example .env`];
|
|
66
|
+
if (options.includeDb) {
|
|
67
|
+
steps.push(` createdb ${projectName}`);
|
|
68
|
+
steps.push(` createdb ${projectName}-test`);
|
|
69
|
+
}
|
|
70
|
+
steps.push(` bun install`);
|
|
71
|
+
steps.push(` bun dev`);
|
|
72
|
+
|
|
73
|
+
console.log(`\nDone! To get started:\n\n${steps.join("\n")}\n`);
|
|
73
74
|
process.exit(0);
|
|
74
75
|
});
|
|
75
76
|
|