mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-23 15:42:12 +03:00
Cherry-picked onto the current tip (authorship preserved), noise stripped. Validated on BOTH runtimes: bun test tests/unit/db-adapters/ 44/44 under the pinned Bun 1.3.14 (native bun:sqlite path), and node --test on the same suite 52 pass / 0 fail / 1 skip (Bun-only adapter skips under Node, as designed). Dockerfile.bun entrypoint now matches the standalone runner shape. Follow-up to #11039. Thank you @rqzbeh!
This commit is contained in:
@@ -86,4 +86,4 @@ EXPOSE 20128
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD bun healthcheck.mjs || exit 1
|
||||
|
||||
ENTRYPOINT ["bun", "bin/omniroute.mjs", "serve", "--no-open"]
|
||||
ENTRYPOINT ["bun", "dev/run-standalone.mjs"]
|
||||
|
||||
@@ -224,7 +224,10 @@ export function createSyncDriverFactory(load: DriverLoader, betterSqliteProbe?:
|
||||
const bunOptions: Record<string, unknown> = {};
|
||||
if (options?.readonly === true) bunOptions.readonly = true;
|
||||
if (options?.create === false && filePath !== ":memory:") bunOptions.create = false;
|
||||
const db = new Database(filePath, bunOptions);
|
||||
const db =
|
||||
Object.keys(bunOptions).length > 0
|
||||
? new Database(filePath, bunOptions)
|
||||
: new Database(filePath);
|
||||
return createBunSqliteAdapter(db, filePath);
|
||||
} catch (err) {
|
||||
logSwallowedDriverError("bun:sqlite", err);
|
||||
|
||||
Reference in New Issue
Block a user