@hugomrdias/foxer 0.0.4 → 0.0.6

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.
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hugomrdias/foxer",
3
3
  "description": "Foxer is a all-in-one application server for Filecoin.",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "author": "Hugo Dias <hugomrdias@gmail.com>",
6
6
  "license": "Apache-2.0 OR MIT",
7
7
  "type": "module",
@@ -36,10 +36,6 @@
36
36
  ]
37
37
  }
38
38
  },
39
- "scripts": {
40
- "build": "tsc --build",
41
- "lint": "tsc --build && biome check ."
42
- },
43
39
  "dependencies": {
44
40
  "@bluwy/giget-core": "^0.1.6",
45
41
  "@clack/prompts": "^1.1.0",
@@ -74,5 +70,9 @@
74
70
  "peerDependencies": {
75
71
  "hono": ">=4.5",
76
72
  "viem": ">=2"
73
+ },
74
+ "scripts": {
75
+ "build": "tsc --build",
76
+ "lint": "tsc --build && biome check ."
77
77
  }
78
- }
78
+ }
package/src/bin/index.ts CHANGED
File without changes
package/src/db/migrate.ts CHANGED
@@ -23,6 +23,13 @@ export async function runMigrations({
23
23
  const { db, driver } = dbContext
24
24
  // apply migrations
25
25
  if (driver === 'postgres') {
26
+ // check if wal is enabled
27
+ const wal = await isWalEnabled(db)
28
+ if (!wal) {
29
+ throw new Error(
30
+ 'WAL is not enabled, set wal_level=logical in your postgresql.conf or pass -c wal_level=logical to the postgres client'
31
+ )
32
+ }
26
33
  await migratePostgresJs(db, { migrationsFolder: folder })
27
34
  } else {
28
35
  await migratePglite(db, { migrationsFolder: folder })
@@ -35,14 +42,6 @@ export async function runMigrations({
35
42
  // assert tables have blockNumber column and index
36
43
  assertTablesHaveBlockNumberIndex(dbContext.db._.fullSchema, tables)
37
44
 
38
- // check if wal is enabled
39
- const wal = await isWalEnabled(db)
40
- if (!wal) {
41
- throw new Error(
42
- 'WAL is not enabled, set wal_level=logical in your postgresql.conf or pass -c wal_level=logical to the postgres client'
43
- )
44
- }
45
-
46
45
  // create publications
47
46
  await createPublications(db, tables)
48
47