@strav/cli 0.4.5 → 0.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strav/cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "type": "module",
5
5
  "description": "CLI framework and code generators for the Strav framework",
6
6
  "license": "MIT",
@@ -33,11 +33,11 @@
33
33
  "strav": "./src/cli/strav.ts"
34
34
  },
35
35
  "peerDependencies": {
36
- "@strav/kernel": "0.4.5",
37
- "@strav/http": "0.4.5",
38
- "@strav/database": "0.4.5",
39
- "@strav/queue": "0.4.5",
40
- "@strav/signal": "0.4.5"
36
+ "@strav/kernel": "0.4.7",
37
+ "@strav/http": "0.4.7",
38
+ "@strav/database": "0.4.7",
39
+ "@strav/queue": "0.4.7",
40
+ "@strav/signal": "0.4.7"
41
41
  },
42
42
  "dependencies": {
43
43
  "chalk": "^5.6.2",
@@ -24,6 +24,7 @@ export async function bootstrap(): Promise<BootstrapResult> {
24
24
  await config.load()
25
25
 
26
26
  const db = new Database(config)
27
+ await db.init()
27
28
 
28
29
  const registry = new SchemaRegistry()
29
30
  const dbPaths = await getDatabasePaths()
@@ -57,7 +57,11 @@ export async function freshDatabase(
57
57
  const actual = await introspector.introspect()
58
58
  const diff = new SchemaDiffer().diff(desired, actual)
59
59
 
60
- const sql = new SqlGenerator(db.tenantIdType).generate(diff)
60
+ const sql = new SqlGenerator(
61
+ db.tenantIdType,
62
+ db.tenantTableName,
63
+ db.tenantFkColumn
64
+ ).generate(diff)
61
65
  const version = Date.now().toString()
62
66
  const tableOrder = desired.tables.map(t => t.name)
63
67