@devmoods/postgres-admin 0.20.1 → 0.21.0

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.
@@ -0,0 +1,11 @@
1
+ import { createPostgres } from '@devmoods/express-extras';
2
+ export interface AdminRouterOptions {
3
+ postgres?: ReturnType<typeof createPostgres>;
4
+ basename?: string;
5
+ indexHtml?: string;
6
+ uiOptions?: AdminUIOptions;
7
+ }
8
+ export interface AdminUIOptions {
9
+ title?: string;
10
+ }
11
+ export declare function createAdminRouter({ postgres: defaultPostgres, basename, indexHtml, uiOptions, }: AdminRouterOptions): import("express-serve-static-core").Router;
@@ -0,0 +1,6 @@
1
+ import { type TableDefinition } from '../types.js';
2
+ export declare function getTable(tableId: string, connectionString?: string | undefined): Promise<TableDefinition>;
3
+ export declare function readTables(connectionString?: string | undefined): Promise<{
4
+ databaseName: string;
5
+ tables: TableDefinition[];
6
+ }>;
@@ -0,0 +1,9 @@
1
+ export declare function stripIdentifier(tableName: string | undefined): string;
2
+ export declare function parseOrderBy(order: string | null | undefined): {
3
+ direction: string;
4
+ column: string;
5
+ } | null;
6
+ export declare function queryParamToArray(queryParam: qs.ParsedQs[string]): string[];
7
+ export declare function counter(): {
8
+ get: (key: string) => number;
9
+ };
@@ -0,0 +1,3 @@
1
+ export declare function normalizeBasename(basename: string): string;
2
+ export declare function getApiRootUrl(basename: string): string;
3
+ export declare function getRouterBasename(basename: string): string;
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "_index.html": {
3
- "file": "assets/index-D0LPOJy0.js",
3
+ "file": "assets/index-BfFE0lHC.js",
4
4
  "name": "index",
5
5
  "src": "_index.html",
6
6
  "isEntry": true,
7
7
  "css": [
8
- "assets/index-BbRnfFjX.css"
8
+ "assets/index-RuE672an.css"
9
9
  ]
10
10
  }
11
11
  }
@@ -13,8 +13,8 @@
13
13
  <meta name="x-title" content="{{ title }}" />
14
14
  <link rel="manifest" href="/manifest.json" />
15
15
  <title>{{ title }}</title>
16
- <script type="module" crossorigin src="./assets/index-D0LPOJy0.js"></script>
17
- <link rel="stylesheet" crossorigin href="./assets/index-BbRnfFjX.css">
16
+ <script type="module" crossorigin src="./assets/index-BfFE0lHC.js"></script>
17
+ <link rel="stylesheet" crossorigin href="./assets/index-RuE672an.css">
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>