@lunora/studio 1.0.0-alpha.54 → 1.0.0-alpha.55
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/dist/index.d.ts +12 -6
- package/dist/index.js +7 -7
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/ApiTab.js +1 -1
- package/dist/packem_chunks/AuditPanel.js +2 -2
- package/dist/packem_chunks/ExportImportPanel.js +2 -2
- package/dist/packem_chunks/FileBrowser.js +2 -2
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +2 -2
- package/dist/packem_chunks/HealthPanel.js +2 -2
- package/dist/packem_chunks/InsightsPanel.js +2 -2
- package/dist/packem_chunks/LogsPanel.js +7 -18
- package/dist/packem_chunks/MailPanel.js +1 -1
- package/dist/packem_chunks/MetricsPanel.js +391 -6
- package/dist/packem_chunks/MigrationsPanel.js +2 -2
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +2 -2
- package/dist/packem_chunks/SecurityAdvisorPanel.js +2 -2
- package/dist/packem_chunks/SettingsPanel.js +2 -2
- package/dist/packem_chunks/SqlEditorPanel.js +1 -1
- package/dist/packem_chunks/TableEditor.js +1 -1
- package/dist/packem_chunks/agents-panel.js +2 -2
- package/dist/packem_chunks/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +1 -1
- package/dist/packem_chunks/auth-sessions-panel.js +1 -1
- package/dist/packem_chunks/containers-panel.js +2 -2
- package/dist/packem_chunks/dashboards-panel.js +2 -2
- package/dist/packem_chunks/fanout-panel.js +2 -2
- package/dist/packem_chunks/flags-panel.js +2 -2
- package/dist/packem_chunks/issues-panel.js +2 -2
- package/dist/packem_chunks/kv-browser.js +2 -2
- package/dist/packem_chunks/log-drains-panel.js +1 -1
- package/dist/packem_chunks/organizations-panel.js +1 -1
- package/dist/packem_chunks/payments-panel.js +2 -2
- package/dist/packem_chunks/permissions-panel.js +2 -2
- package/dist/packem_chunks/queues-panel.js +2 -2
- package/dist/packem_chunks/rls-panel.js +2 -2
- package/dist/packem_chunks/schedule-panel.js +2 -2
- package/dist/packem_chunks/storage-rules-panel.js +2 -2
- package/dist/packem_chunks/subscriptions-panel.js +2 -2
- package/dist/packem_chunks/traces-panel.js +734 -0
- package/dist/packem_chunks/users-panel.js +1 -1
- package/dist/packem_chunks/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +2 -2
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DNeyYtUN.js → ADMIN_FUNCTIONS-C6TEeUiJ.js} +2 -0
- package/dist/packem_shared/{ApiDocsPanel-_aEZxAMX.js → ApiDocsPanel-CcC6ucbp.js} +1 -1
- package/dist/packem_shared/{DataBrowser-C8hejnub.js → DataBrowser-BuFEPTiv.js} +1 -1
- package/dist/packem_shared/{HomePanel-Ye8PaqQL.js → HomePanel-2I1YZm0A.js} +3 -3
- package/dist/packem_shared/{ScheduledJobs-dHMgnJbx.js → ScheduledJobs-Cz5Tr-M6.js} +1 -1
- package/dist/packem_shared/{Studio-BNGjxLVo.js → Studio-CCJBI2wP.js} +2 -2
- package/dist/packem_shared/{StudioApp-K9dn1Q9d.js → StudioApp-Daeqxw2h.js} +1 -1
- package/dist/packem_shared/{advisor-view-Cx21PS_T.js → advisor-view-1RaDWED7.js} +1 -1
- package/dist/packem_shared/{app.d-__J6S7he.d.ts → app.d-C-kxb-1T.d.ts} +1 -1
- package/dist/packem_shared/{card-DURq3ElK.js → card-F2vH_aj2.js} +1 -1
- package/dist/packem_shared/{home-panel-D62G8108.js → home-panel-DHHUtnKU.js} +2 -2
- package/dist/packem_shared/log-fields-jEH83H2G.js +18 -0
- package/dist/packem_shared/{studio-Cd21fp4v.js → studio-0479nrrm.js} +551 -524
- package/dist/standalone/{chunk-6PXHT2QI.js → chunk-4AZYW2PI.js} +1 -1
- package/dist/standalone/{chunk-V7RQA6NY.js → chunk-6LLFTVEI.js} +1 -1
- package/dist/standalone/{chunk-6CNL7BUU.js → chunk-AE3AKGOW.js} +1 -1
- package/dist/standalone/{chunk-5AXARNJ2.js → chunk-CW7LZ4SR.js} +1 -1
- package/dist/standalone/{chunk-JFT5OIL2.js → chunk-DVBY6YQK.js} +1 -1
- package/dist/standalone/chunk-EBTLTGG3.js +1 -0
- package/dist/standalone/chunk-EIZG4GOM.js +1 -0
- package/dist/standalone/{chunk-WCB3KG7C.js → chunk-EPDC422O.js} +1 -1
- package/dist/standalone/{chunk-LVDKJBWU.js → chunk-FBGC3RSU.js} +1 -1
- package/dist/standalone/{chunk-ZSUTV374.js → chunk-FPKTXKPE.js} +1 -1
- package/dist/standalone/{chunk-ONCMJKJS.js → chunk-FXNS5NBY.js} +1 -1
- package/dist/standalone/{chunk-WM2MP5ZK.js → chunk-G4GGGHEV.js} +1 -1
- package/dist/standalone/{chunk-2MYDFHDZ.js → chunk-G5CMK5GY.js} +1 -1
- package/dist/standalone/{chunk-JGCZJNMT.js → chunk-G5RC7USY.js} +1 -1
- package/dist/standalone/{chunk-GRBWXZE4.js → chunk-HNIDN3RX.js} +1 -1
- package/dist/standalone/{chunk-NYK3PFSC.js → chunk-IKVZUVHJ.js} +1 -1
- package/dist/standalone/{chunk-MN4QBJWN.js → chunk-JGCRBFFO.js} +1 -1
- package/dist/standalone/chunk-JHR3HKT5.js +3 -0
- package/dist/standalone/{chunk-K53QX72G.js → chunk-JQPHZL2A.js} +1 -1
- package/dist/standalone/{chunk-HFSJCS2N.js → chunk-LJE6PGHD.js} +1 -1
- package/dist/standalone/{chunk-B6DIQBOK.js → chunk-LTCX3QOE.js} +1 -1
- package/dist/standalone/{chunk-NWVHLLPB.js → chunk-MWH5LBNF.js} +1 -1
- package/dist/standalone/{chunk-NP7AR65U.js → chunk-N5FMEYSL.js} +1 -1
- package/dist/standalone/chunk-N7SVJOHN.js +1 -0
- package/dist/standalone/{chunk-IDK76JPE.js → chunk-NAFKYFBZ.js} +1 -1
- package/dist/standalone/{chunk-JZ4X6QMK.js → chunk-OVSBLTAA.js} +1 -1
- package/dist/standalone/chunk-PIB7VUVM.js +1 -0
- package/dist/standalone/{chunk-IDAIBUKJ.js → chunk-Q3X7IMLF.js} +1 -1
- package/dist/standalone/{chunk-777XYTDZ.js → chunk-RCSULEDU.js} +1 -1
- package/dist/standalone/{chunk-TYMKCYYT.js → chunk-RDA4VTHI.js} +1 -1
- package/dist/standalone/{chunk-3HKJ6FSC.js → chunk-RG4HLPM2.js} +1 -1
- package/dist/standalone/{chunk-RHYLU4OZ.js → chunk-SP7GSPKX.js} +1 -1
- package/dist/standalone/{chunk-HI373BLB.js → chunk-SPACAIAR.js} +1 -1
- package/dist/standalone/{chunk-ASLE5VQE.js → chunk-TTEEPVCN.js} +1 -1
- package/dist/standalone/{chunk-EXE42KMM.js → chunk-VC2VDAUO.js} +1 -1
- package/dist/standalone/{chunk-PQKG5GKG.js → chunk-VQ3YOUZB.js} +1 -1
- package/dist/standalone/{chunk-SCH473C7.js → chunk-W7ND56KZ.js} +1 -1
- package/dist/standalone/{chunk-WAVZATY2.js → chunk-WA3DGSC2.js} +1 -1
- package/dist/standalone/{chunk-SXATIQAK.js → chunk-WCLFE2ZB.js} +1 -1
- package/dist/standalone/{chunk-NBLGUSJW.js → chunk-XG4TZSP4.js} +1 -1
- package/dist/standalone/{chunk-BR7WLG6X.js → chunk-XZWFP2GI.js} +1 -1
- package/dist/standalone/chunk-YNSFQKMM.js +1 -0
- package/dist/standalone/{chunk-4YHXOOK7.js → chunk-YRE6TGXH.js} +1 -1
- package/dist/standalone/{chunk-R2SUQVIO.js → chunk-YS7NUMAN.js} +1 -1
- package/dist/standalone/{chunk-H5X5TIWZ.js → chunk-ZUTFDG76.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/standalone/chunk-G7ZBM54M.js +0 -1
- package/dist/standalone/chunk-NEQV5EQC.js +0 -3
- package/dist/standalone/chunk-REQTQOBK.js +0 -1
- package/dist/standalone/chunk-W3XY7KL4.js +0 -1
- /package/dist/standalone/{chunk-SEU5V7I6.js → chunk-Y572GMZE.js} +0 -0
|
@@ -2,7 +2,7 @@ import { useLunora } from '@lunora/react';
|
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { B as Badge } from '../packem_shared/badge-B2PKA1-5.js';
|
|
4
4
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
5
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-
|
|
5
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
6
6
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
7
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
8
8
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
@@ -2,7 +2,7 @@ import { c } from 'react/compiler-runtime';
|
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
5
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-
|
|
5
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
6
6
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
7
7
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
8
8
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useLunora } from '@lunora/react';
|
|
2
2
|
import { useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import { B as Button } from '../packem_shared/button-BhsN2uZH.js';
|
|
4
|
-
import { C as Card, a as CardContent } from '../packem_shared/card-
|
|
4
|
+
import { C as Card, a as CardContent } from '../packem_shared/card-F2vH_aj2.js';
|
|
5
5
|
import { E as EmptyState } from '../packem_shared/empty-state-DY_oe0k6.js';
|
|
6
6
|
import { I as Input } from '../packem_shared/input-XH4r1Pt1.js';
|
|
7
7
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from '../packem_shared/table-DsCa9Qp9.js';
|
|
8
8
|
import { T as Textarea } from '../packem_shared/textarea-D3gaCU_-.js';
|
|
9
9
|
import { u as useAdminQuery } from '../packem_shared/use-admin-query-BGJ010yZ.js';
|
|
10
10
|
import { useT } from '../packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
11
|
-
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-
|
|
11
|
+
import { ADMIN_FUNCTIONS } from '../packem_shared/ADMIN_FUNCTIONS-C6TEeUiJ.js';
|
|
12
12
|
import { f as fireAndForget, e as errorMessage, c as callOptions, a as adminRef } from '../packem_shared/internal-zwBoOv24.js';
|
|
13
13
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
14
14
|
|
|
@@ -22,12 +22,14 @@ const ADMIN_FUNCTIONS = {
|
|
|
22
22
|
listTableIndexes: "__lunora_admin__:listTableIndexes",
|
|
23
23
|
listWorkflows: "__lunora_admin__:listWorkflows",
|
|
24
24
|
getLogs: "__lunora_admin__:getLogs",
|
|
25
|
+
getMetricSeries: "__lunora_admin__:getMetricSeries",
|
|
25
26
|
getMetrics: "__lunora_admin__:getMetrics",
|
|
26
27
|
getPitrBookmark: "__lunora_admin__:getPitrBookmark",
|
|
27
28
|
getQueueMessages: "__lunora_admin__:getQueueMessages",
|
|
28
29
|
getRequestLog: "__lunora_admin__:getRequestLog",
|
|
29
30
|
getSecurityAudit: "__lunora_admin__:getSecurityAudit",
|
|
30
31
|
getSettings: "__lunora_admin__:getSettings",
|
|
32
|
+
getTraces: "__lunora_admin__:getTraces",
|
|
31
33
|
// eslint-disable-next-line no-secrets/no-secrets -- reserved admin RPC path constant, not a credential
|
|
32
34
|
getWorkflowInstanceStatus: "__lunora_admin__:getWorkflowInstanceStatus",
|
|
33
35
|
importShard: "__lunora_admin__:importShard",
|
|
@@ -4,7 +4,7 @@ import { useState, useEffect } from 'react';
|
|
|
4
4
|
import { B as Button } from './button-BhsN2uZH.js';
|
|
5
5
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
6
6
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
7
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-
|
|
7
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C6TEeUiJ.js';
|
|
8
8
|
import { c as callOptions, a as adminRef, g as copyToClipboard } from './internal-zwBoOv24.js';
|
|
9
9
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
|
5
5
|
import { ShardInput } from './ShardInput-CZnpHILL.js';
|
|
6
6
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
7
7
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
8
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-
|
|
8
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C6TEeUiJ.js';
|
|
9
9
|
import { h as formatCell, f as fireAndForget, c as callOptions, a as adminRef, i as formatTimestamp } from './internal-zwBoOv24.js';
|
|
10
10
|
import { useReactTable, getSortedRowModel, getCoreRowModel, flexRender } from '@tanstack/react-table';
|
|
11
11
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
@@ -2,13 +2,13 @@ import 'react/compiler-runtime';
|
|
|
2
2
|
import '@tanstack/react-router';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './badge-B2PKA1-5.js';
|
|
5
|
-
import './card-
|
|
5
|
+
import './card-F2vH_aj2.js';
|
|
6
6
|
import './empty-state-DY_oe0k6.js';
|
|
7
7
|
import './use-admin-query-BGJ010yZ.js';
|
|
8
8
|
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
|
-
import './ADMIN_FUNCTIONS-
|
|
9
|
+
import './ADMIN_FUNCTIONS-C6TEeUiJ.js';
|
|
10
10
|
import './internal-zwBoOv24.js';
|
|
11
11
|
import './utils-B05Dmz_H.js';
|
|
12
12
|
import './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';
|
|
13
|
-
export { H as HomePanel } from './home-panel-
|
|
13
|
+
export { H as HomePanel } from './home-panel-DHHUtnKU.js';
|
|
14
14
|
import 'react/jsx-dev-runtime';
|
|
@@ -2,7 +2,7 @@ import { c } from 'react/compiler-runtime';
|
|
|
2
2
|
import { useLunora } from '@lunora/react';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
5
|
-
import { C as Card, a as CardContent } from './card-
|
|
5
|
+
import { C as Card, a as CardContent } from './card-F2vH_aj2.js';
|
|
6
6
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
7
7
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
|
|
8
8
|
import { a as useClientQuery } from './use-admin-query-BGJ010yZ.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import 'react/compiler-runtime';
|
|
2
2
|
import '@tanstack/react-router';
|
|
3
3
|
import 'react';
|
|
4
|
-
export { S as Studio } from './studio-
|
|
4
|
+
export { S as Studio } from './studio-0479nrrm.js';
|
|
5
5
|
import './ErrorBoundary-BzAApI7J.js';
|
|
6
6
|
import './badge-B2PKA1-5.js';
|
|
7
7
|
import './input-XH4r1Pt1.js';
|
|
8
8
|
import './skeleton-CGhL0p20.js';
|
|
9
|
-
import './home-panel-
|
|
9
|
+
import './home-panel-DHHUtnKU.js';
|
|
10
10
|
import './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
11
11
|
import './StudioI18nProvider-B-tDCZIi.js';
|
|
12
12
|
import './data-view-params-Cd6yRVbv.js';
|
|
@@ -3,7 +3,7 @@ import { LunoraClient } from '@lunora/client';
|
|
|
3
3
|
import { LunoraProvider } from '@lunora/react';
|
|
4
4
|
import { useState, useEffect } from 'react';
|
|
5
5
|
import { ErrorBoundary } from './ErrorBoundary-BzAApI7J.js';
|
|
6
|
-
import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-
|
|
6
|
+
import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-0479nrrm.js';
|
|
7
7
|
import useDebounced from './useDebounced-Dxncpg6z.js';
|
|
8
8
|
import { useT, createStudioI18n } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
9
|
import { StudioI18nProvider } from './StudioI18nProvider-B-tDCZIi.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useMemo } from 'react';
|
|
2
2
|
import { E as ErrorAlert } from './error-alert-vIPQoN3Y.js';
|
|
3
|
-
import { C as Card, a as CardContent } from './card-
|
|
3
|
+
import { C as Card, a as CardContent } from './card-F2vH_aj2.js';
|
|
4
4
|
import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
|
|
5
5
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
6
6
|
import { c as cn } from './utils-B05Dmz_H.js';
|
|
@@ -92,7 +92,7 @@ interface FunctionDescriptor {
|
|
|
92
92
|
/** Outcome of a single `FunctionRunner` invocation. */
|
|
93
93
|
type RunStatus = "error" | "idle" | "running" | "success";
|
|
94
94
|
/** Identifier for each built-in studio tab. */
|
|
95
|
-
type StudioTab = "agents" | "analytics" | "api" | "audit" | "authConfig" | "authSessions" | "containers" | "dashboards" | "data" | "drains" | "export" | "fanout" | "files" | "flags" | "functions" | "health" | "home" | "insights" | "issues" | "kv" | "logs" | "mail" | "metrics" | "migrations" | "organizations" | "payments" | "permissions" | "pitr" | "queues" | "realtime" | "rls" | "schedule" | "schema" | "security" | "settings" | "sql" | "storageRules" | "users" | "vectors" | "workflows";
|
|
95
|
+
type StudioTab = "agents" | "analytics" | "api" | "audit" | "authConfig" | "authSessions" | "containers" | "dashboards" | "data" | "drains" | "export" | "fanout" | "files" | "flags" | "functions" | "health" | "home" | "insights" | "issues" | "kv" | "logs" | "mail" | "metrics" | "migrations" | "organizations" | "payments" | "permissions" | "pitr" | "queues" | "realtime" | "rls" | "schedule" | "schema" | "security" | "settings" | "sql" | "storageRules" | "traces" | "users" | "vectors" | "workflows";
|
|
96
96
|
interface StudioProps {
|
|
97
97
|
/**
|
|
98
98
|
* URL path prefix the studio is mounted under, passed to the router as its
|
|
@@ -2,11 +2,11 @@ import { c } from 'react/compiler-runtime';
|
|
|
2
2
|
import { useNavigate } from '@tanstack/react-router';
|
|
3
3
|
import { useState, useEffect, Suspense, lazy } from 'react';
|
|
4
4
|
import { B as Badge } from './badge-B2PKA1-5.js';
|
|
5
|
-
import { a as CardContent, C as Card } from './card-
|
|
5
|
+
import { a as CardContent, C as Card } from './card-F2vH_aj2.js';
|
|
6
6
|
import { E as EmptyState } from './empty-state-DY_oe0k6.js';
|
|
7
7
|
import { u as useAdminQuery } from './use-admin-query-BGJ010yZ.js';
|
|
8
8
|
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-
|
|
9
|
+
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-C6TEeUiJ.js';
|
|
10
10
|
import { f as fireAndForget, c as callOptions, a as adminRef, r as resolveOrigin, g as copyToClipboard, k as formatBytes } from './internal-zwBoOv24.js';
|
|
11
11
|
import { c as cn } from './utils-B05Dmz_H.js';
|
|
12
12
|
import { deriveInsights } from './DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const stringifyFieldValue = (value) => {
|
|
2
|
+
if (typeof value === "string") {
|
|
3
|
+
return value;
|
|
4
|
+
}
|
|
5
|
+
try {
|
|
6
|
+
return JSON.stringify(value) ?? String(value);
|
|
7
|
+
} catch {
|
|
8
|
+
return String(value);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const formatLogFields = (fields) => {
|
|
12
|
+
if (typeof fields !== "object" || fields === null || Array.isArray(fields)) {
|
|
13
|
+
return "";
|
|
14
|
+
}
|
|
15
|
+
return Object.entries(fields).map(([key, value]) => `${key}=${stringifyFieldValue(value)}`).join(" ");
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { formatLogFields as f };
|