feat: npm package @crudy/pgmorbac ships the extension SQL

The package carries the install and upgrade scripts, built from src/ on prepack
(sql/ is not committed), with extensionSql(), upgradeScripts(), version and sqlDir.
This commit is contained in:
2026-10-02 23:59:58 +02:00
parent 697e8bd682
commit 8385cea640
7 changed files with 141 additions and 3 deletions
Vendored
+16
View File
@@ -0,0 +1,16 @@
/** Absolute path to pgmorbac.control. */
export declare const controlFile: string;
/** Absolute path to the directory holding the install and upgrade scripts. */
export declare const sqlDir: string;
/** The extension version (default_version in pgmorbac.control). */
export declare const version: string;
/** The install script pgmorbac--<version>.sql, as CREATE EXTENSION would run it. */
export declare function extensionSql(): string;
export interface UpgradeScript {
from: string;
to: string;
filename: string;
sql: string;
}
/** Upgrade scripts pgmorbac--<from>--<to>.sql, in version order. */
export declare function upgradeScripts(): UpgradeScript[];