mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
attachServeStatic,
|
||||
getConfigPath,
|
||||
getConnectionCredentialsFromEnv,
|
||||
startServer
|
||||
startServer,
|
||||
} from "./platform";
|
||||
|
||||
dotenv.config();
|
||||
@@ -26,26 +26,26 @@ export const run: CliCommand = (program) => {
|
||||
new Option("-p, --port <port>", "port to run on")
|
||||
.env("PORT")
|
||||
.default(config.server.default_port)
|
||||
.argParser((v) => Number.parseInt(v))
|
||||
.argParser((v) => Number.parseInt(v)),
|
||||
)
|
||||
.addOption(
|
||||
new Option("-m, --memory", "use in-memory database").conflicts([
|
||||
"config",
|
||||
"db-url",
|
||||
"db-token"
|
||||
])
|
||||
"db-token",
|
||||
]),
|
||||
)
|
||||
.addOption(new Option("-c, --config <config>", "config file"))
|
||||
.addOption(
|
||||
new Option("--db-url <db>", "database url, can be any valid libsql url").conflicts(
|
||||
"config"
|
||||
)
|
||||
"config",
|
||||
),
|
||||
)
|
||||
.addOption(new Option("--db-token <db>", "database token").conflicts("config"))
|
||||
.addOption(
|
||||
new Option("--server <server>", "server type")
|
||||
.choices(PLATFORMS)
|
||||
.default(isBun ? "bun" : "node")
|
||||
.default(isBun ? "bun" : "node"),
|
||||
)
|
||||
.action(action);
|
||||
};
|
||||
@@ -76,7 +76,7 @@ async function makeApp(config: MakeAppConfig) {
|
||||
await config.onBuilt(app);
|
||||
}
|
||||
},
|
||||
"sync"
|
||||
"sync",
|
||||
);
|
||||
|
||||
await app.build();
|
||||
@@ -95,7 +95,7 @@ export async function makeConfigApp(config: CliBkndConfig, platform?: Platform)
|
||||
|
||||
await config.onBuilt?.(app);
|
||||
},
|
||||
"sync"
|
||||
"sync",
|
||||
);
|
||||
|
||||
await config.beforeBuild?.(app);
|
||||
@@ -141,7 +141,7 @@ async function action(options: {
|
||||
console.info("Using connection", c.cyan(connection.url));
|
||||
app = await makeApp({
|
||||
connection,
|
||||
server: { platform: options.server }
|
||||
server: { platform: options.server },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user