add shebangs to migration and server scripts

In NixOS, we wrap these files in a bash script to allow users to just run them as normal executables, instead of calling them as arguments to Node.JS. In our build scripts, we just add the shebang after the files have been compiled, but adding it upstream will allow all Pangolin users to just run ./server.mjs to start their Pangolin instances.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
This commit is contained in:
Fernando Rodrigues 2025-07-27 13:07:00 +10:00
parent 0b50a5474d
commit 9e87c42d0c
No known key found for this signature in database
GPG key ID: CC3AE2EA00000000
3 changed files with 3 additions and 0 deletions

View file

@ -1,3 +1,4 @@
#! /usr/bin/env node
import "./extendZod.ts"; import "./extendZod.ts";
import { runSetupFunctions } from "./setup"; import { runSetupFunctions } from "./setup";

View file

@ -1,3 +1,4 @@
#! /usr/bin/env node
import { migrate } from "drizzle-orm/node-postgres/migrator"; import { migrate } from "drizzle-orm/node-postgres/migrator";
import { db } from "../db/pg"; import { db } from "../db/pg";
import semver from "semver"; import semver from "semver";

View file

@ -1,3 +1,4 @@
#! /usr/bin/env node
import { migrate } from "drizzle-orm/better-sqlite3/migrator"; import { migrate } from "drizzle-orm/better-sqlite3/migrator";
import { db, exists } from "../db/sqlite"; import { db, exists } from "../db/sqlite";
import path from "path"; import path from "path";