@absolutejs/auth 0.57.6 → 0.57.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/agents/index.js.map +6 -6
- package/dist/cli/migrate.js +21 -11
- package/dist/cli/migrate.js.map +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +17 -17
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/runner.d.ts +11 -2
- package/dist/oidc/index.js.map +2 -2
- package/dist/server.js +21 -11
- package/dist/server.js.map +18 -18
- package/dist/vault/index.js.map +2 -2
- package/package.json +58 -20
|
@@ -2,4 +2,5 @@ import type { BlockMigrations } from './types';
|
|
|
2
2
|
export type BlockName = 'adaptive' | 'agents' | 'apikeys' | 'audit' | 'credentials' | 'fga' | 'linkedProviders' | 'lockout' | 'mfa' | 'oidc' | 'organizations' | 'passwordless' | 'portal' | 'roles' | 'scim' | 'sessions' | 'sso' | 'vault' | 'vc' | 'webauthn' | 'webhooks';
|
|
3
3
|
export declare const blockMigrations: Record<BlockName, BlockMigrations>;
|
|
4
4
|
export { runMigrations } from './runner';
|
|
5
|
+
export type { MigrationClient, MigrationQueryResult, MigrationRunResult, RunMigrationsOptions } from './runner';
|
|
5
6
|
export type { Migration, BlockMigrations } from './types';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type BlockName } from './index';
|
|
2
2
|
export type RunMigrationsOptions = {
|
|
3
|
-
|
|
3
|
+
/** Existing SQL client. When provided, the runner does not create or close a pool. */
|
|
4
|
+
client?: MigrationClient;
|
|
5
|
+
/** Postgres connection string used by the default Neon-compatible pool. */
|
|
6
|
+
databaseUrl?: string;
|
|
4
7
|
/** Subset of blocks to apply. Omit to apply every block the package ships. */
|
|
5
8
|
blocks?: BlockName[];
|
|
6
9
|
/** Optional logger; defaults to console.log. Pass `() => undefined` for silent mode. */
|
|
@@ -10,4 +13,10 @@ export type MigrationRunResult = {
|
|
|
10
13
|
applied: string[];
|
|
11
14
|
skipped: string[];
|
|
12
15
|
};
|
|
13
|
-
export
|
|
16
|
+
export type MigrationQueryResult = {
|
|
17
|
+
rows: unknown[];
|
|
18
|
+
};
|
|
19
|
+
export type MigrationClient = {
|
|
20
|
+
query: (text: string, values?: readonly unknown[]) => Promise<MigrationQueryResult>;
|
|
21
|
+
};
|
|
22
|
+
export declare const runMigrations: ({ blocks, client, databaseUrl, log }: RunMigrationsOptions) => Promise<MigrationRunResult>;
|