web_plsql 1.8.4 → 1.8.6

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.
@@ -6,7 +6,7 @@
6
6
  <title>web_plsql Admin Console</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/admin/assets/favicon-mQAM4tVu.svg" />
8
8
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
9
- <script type="module" crossorigin src="/admin/assets/main-DhSIoaS4.js"></script>
9
+ <script type="module" crossorigin src="/admin/assets/main-rZ2yileN.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/admin/assets/main-CBxeWHJN.css">
11
11
  </head>
12
12
  <body class="dark">
Binary file
Binary file
package/dist/index.d.mts CHANGED
@@ -4,7 +4,6 @@ import http from "node:http";
4
4
  import https from "node:https";
5
5
  import { Express, Request, RequestHandler, Router } from "express";
6
6
  import { Readable } from "node:stream";
7
-
8
7
  //#region src/backend/util/cache.d.ts
9
8
  type cacheEntryType<T> = {
10
9
  hitCount: number;
@@ -75,12 +74,6 @@ declare class Cache<T> {
75
74
  * Custom callback signature for manual transaction handling
76
75
  */
77
76
  type transactionCallbackType = (connection: Connection, procedure: string) => void | Promise<void>;
78
- /**
79
- * Defines how transactions are handled after procedure execution
80
- * 'commit': automatically commit
81
- * 'rollback': automatically rollback
82
- * callback: custom function for manual handling
83
- */
84
77
  /**
85
78
  * Basic authentication callback signature.
86
79
  * Returns the identity string on success, or null on failure.
@@ -147,10 +140,6 @@ declare const z$configType: z.ZodObject<{
147
140
  spaFallback: z.ZodOptional<z.ZodBoolean>;
148
141
  }, z.core.$strict>>;
149
142
  routePlSql: z.ZodArray<z.ZodObject<{
150
- route: z.ZodString;
151
- user: z.ZodString;
152
- password: z.ZodString;
153
- connectString: z.ZodString;
154
143
  defaultPage: z.ZodString;
155
144
  pathAlias: z.ZodOptional<z.ZodString>;
156
145
  pathAliasProcedure: z.ZodOptional<z.ZodString>;
@@ -171,6 +160,10 @@ declare const z$configType: z.ZodObject<{
171
160
  type: z.ZodLiteral<"custom">;
172
161
  callback: z.ZodCustom<CustomAuthCallback, CustomAuthCallback>;
173
162
  }, z.core.$strict>]>>;
163
+ route: z.ZodString;
164
+ user: z.ZodString;
165
+ password: z.ZodString;
166
+ connectString: z.ZodString;
174
167
  }, z.core.$strict>>;
175
168
  uploadFileSizeLimit: z.ZodOptional<z.ZodNumber>;
176
169
  loggerFilename: z.ZodString;
@@ -582,10 +575,15 @@ declare const createAdminRouter: (adminContext: AdminContext) => Router;
582
575
  //#endregion
583
576
  //#region src/backend/handler/handlerAdminConsole.d.ts
584
577
  type AdminConsoleConfig = {
585
- /** Base route for the admin console (defaults to '/admin') */adminRoute?: string | undefined; /** Path to built admin frontend directory (optional - auto-detects if omitted) */
586
- staticDir?: string | undefined; /** Optional username for basic auth */
587
- user?: string | undefined; /** Optional password for basic auth */
588
- password?: string | undefined; /** Skip static dir validation (for dev mode) */
578
+ /** Base route for the admin console (defaults to '/admin') */
579
+ adminRoute?: string | undefined;
580
+ /** Path to built admin frontend directory (optional - auto-detects if omitted) */
581
+ staticDir?: string | undefined;
582
+ /** Optional username for basic auth */
583
+ user?: string | undefined;
584
+ /** Optional password for basic auth */
585
+ password?: string | undefined;
586
+ /** Skip static dir validation (for dev mode) */
589
587
  devMode?: boolean | undefined;
590
588
  };
591
589
  /**
package/dist/index.mjs CHANGED
@@ -321,7 +321,7 @@ globalThis.__VERSION__ ??= "**development**";
321
321
  * Returns the current library version
322
322
  * @returns {string} - Version.
323
323
  */
324
- const getVersion = () => "1.8.4";
324
+ const getVersion = () => "1.8.6";
325
325
  //#endregion
326
326
  //#region src/backend/server/printBanner.ts
327
327
  const IS_TTY = process.stdout.isTTY === true;
@@ -363,7 +363,8 @@ const borderClose = () => IS_TTY ? chalk.dim(BOX.bl + BOX.h.repeat(W - 2) + BOX.
363
363
  * @returns Formatted string.
364
364
  */
365
365
  const row = (key, value, icon) => {
366
- const label = padTo(IS_TTY ? icon ? `${icon} ${key}` : ` ${key}` : `${key}`, LABEL_W);
366
+ const left = IS_TTY ? icon ? `${icon} ${key}` : ` ${key}` : `${key}`;
367
+ const label = padTo(left, LABEL_W);
367
368
  const hasValue = value !== null && value !== void 0 && value !== "";
368
369
  const valueText = hasValue ? String(value) : "—";
369
370
  const colorFn = hasValue ? chalk.white : chalk.dim;
@@ -1319,15 +1320,7 @@ const bindTypeToString = (type) => {
1319
1320
  const inspectBindParameter = (output, bind) => {
1320
1321
  const rows = Object.entries(bind);
1321
1322
  if (rows.length === 0) return;
1322
- const { html, text } = toTable([
1323
- "id",
1324
- "dir",
1325
- "maxArraySize",
1326
- "maxSize",
1327
- "bind type",
1328
- "value",
1329
- "value type"
1330
- ], rows.map(([id, row]) => {
1323
+ const body = rows.map(([id, row]) => {
1331
1324
  let dir = "";
1332
1325
  let maxArraySize = "";
1333
1326
  let maxSize = "";
@@ -1354,7 +1347,16 @@ const inspectBindParameter = (output, bind) => {
1354
1347
  value,
1355
1348
  valueType
1356
1349
  ];
1357
- }));
1350
+ });
1351
+ const { html, text } = toTable([
1352
+ "id",
1353
+ "dir",
1354
+ "maxArraySize",
1355
+ "maxSize",
1356
+ "bind type",
1357
+ "value",
1358
+ "value type"
1359
+ ], body);
1358
1360
  output.html += html;
1359
1361
  output.text += text;
1360
1362
  };
@@ -3403,7 +3405,9 @@ const createAdminRouter = (adminContext) => {
3403
3405
  });
3404
3406
  router.get("/api/logs/error", async (req, res) => {
3405
3407
  try {
3406
- const parsedLines = (await readLastLines("error.json.log", Number(req.query.limit) || 100, typeof req.query.filter === "string" ? req.query.filter : "")).map((line) => {
3408
+ const limit = Number(req.query.limit) || 100;
3409
+ const filter = typeof req.query.filter === "string" ? req.query.filter : "";
3410
+ const parsedLines = (await readLastLines("error.json.log", limit, filter)).map((line) => {
3407
3411
  try {
3408
3412
  return JSON.parse(line);
3409
3413
  } catch {
@@ -3484,7 +3488,8 @@ const createAdminRouter = (adminContext) => {
3484
3488
  try {
3485
3489
  const limit = Number(req.query.limit) || 100;
3486
3490
  const filter = typeof req.query.filter === "string" ? req.query.filter : "";
3487
- const parsedLines = (await readLastLines(traceManager.getFilePath(), limit, filter)).map((line) => {
3491
+ const logFile = traceManager.getFilePath();
3492
+ const parsedLines = (await readLastLines(logFile, limit, filter)).map((line) => {
3488
3493
  try {
3489
3494
  return JSON.parse(line);
3490
3495
  } catch {