@paroicms/ui-logger 1.13.0 → 1.13.2

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.
@@ -12,10 +12,10 @@ export interface FullUiLogger extends UiLogger {
12
12
  }
13
13
  export interface LogParameters {
14
14
  level: UiLoggerStrictLevels;
15
- message: any[];
15
+ message: unknown[];
16
16
  clientOnly?: boolean;
17
17
  }
18
- export type LogFn = (...messages: any[]) => void;
18
+ export type LogFn = (...messages: unknown[]) => void;
19
19
  export type UiLoggerStrictLevels = Exclude<keyof UiLogger, "log" | "wrapAsync">;
20
20
  export type UiLoggerLevels = UiLoggerStrictLevels | "none";
21
21
  export interface UiLoggerOptions {
package/dist/ui-logger.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { messageOf } from "@paroicms/public-anywhere-lib";
1
2
  const noOp = () => {
2
3
  // Nothing to do.
3
4
  };
@@ -145,7 +146,10 @@ async function postLogFromFrontend({ lines, sendToServer, logErrorFromBackend, }
145
146
  try {
146
147
  for (const line of lines)
147
148
  line.message = line.message.map(anyMessageToStringifiable);
148
- await sendToServer(lines);
149
+ await sendToServer(lines.map((line) => ({
150
+ message: line.message.map(messageOf),
151
+ level: line.level,
152
+ })));
149
153
  }
150
154
  catch (err) {
151
155
  if (logErrorFromBackend && window.console?.error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paroicms/ui-logger",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "description": "Logger for the Admin UI front of a Paroi CMS.",
5
5
  "keywords": [
6
6
  "paroicms",
@@ -22,6 +22,9 @@
22
22
  "clear": "rimraf dist/*",
23
23
  "dev": "tsc --watch --preserveWatchOutput"
24
24
  },
25
+ "dependencies": {
26
+ "@paroicms/public-anywhere-lib": "0.28.0"
27
+ },
25
28
  "devDependencies": {
26
29
  "rimraf": "~6.0.1",
27
30
  "typescript": "~5.8.3",