Android build v1.0.50

This commit is contained in:
Warren H
2026-06-21 00:27:07 -04:00
parent f7b041f86f
commit c1e2c6d8b5
7 changed files with 156 additions and 7 deletions
+7 -2
View File
@@ -1,5 +1,6 @@
import { readFileSync, writeFileSync } from 'node:fs'
import { DatabaseSync } from 'node:sqlite'
import { catalogPayload } from '../server/catalog.mjs'
import { getProfile } from '../server/game-api.mjs'
const database = new DatabaseSync(':memory:')
@@ -7,10 +8,14 @@ const database = new DatabaseSync(':memory:')
try {
database.exec(readFileSync('db/schema.sql', 'utf8'))
database.exec(readFileSync('db/seed.sql', 'utf8'))
const profile = getProfile(database, 1)
const catalog = catalogPayload(getProfile(database, 1))
writeFileSync(
'src/offline-starter-profile.json',
`${JSON.stringify(profile, null, 2)}\n`,
`${JSON.stringify(catalog.profile, null, 2)}\n`,
)
writeFileSync(
'src/offline-catalog-meta.ts',
`export const bundledCatalogHash = '${catalog.hash}'\n`,
)
console.log('Offline starter profile exported from SQLite.')
} finally {