@oas-tools/oas-telemetry 0.7.0 → 0.7.1-demo-anon

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.
Files changed (53) hide show
  1. package/dist/cjs/config/config.cjs +1 -1
  2. package/dist/cjs/docs/openapi.yaml +3 -3
  3. package/dist/cjs/index.cjs +1 -0
  4. package/dist/cjs/routesManager.cjs +3 -3
  5. package/dist/esm/config/config.js +1 -1
  6. package/dist/esm/docs/openapi.yaml +3 -3
  7. package/dist/esm/index.js +1 -0
  8. package/dist/esm/routesManager.js +3 -3
  9. package/dist/types/index.d.ts +2 -1
  10. package/dist/ui/assets/ApiDocsPage-DW6Tqlek.js +16 -0
  11. package/dist/ui/assets/{CollapsibleCard-B3KR_8mL.js → CollapsibleCard-CFXtL8_t.js} +1 -1
  12. package/dist/ui/assets/DevToolsPage-BtJIh2qV.js +1 -0
  13. package/dist/ui/assets/{LandingPage-CppFBA6K.js → LandingPage-BzTwUjlg.js} +1 -1
  14. package/dist/ui/assets/{LogsPage-9Fq8GArS.js → LogsPage-BJNAUgWD.js} +1 -1
  15. package/dist/ui/assets/{NotFoundPage-B3quk3P1.js → NotFoundPage-B9GPTNZL.js} +1 -1
  16. package/dist/ui/assets/{PluginCreatePage-X_aCH4t4.js → PluginCreatePage-BwtAzJnG.js} +1 -1
  17. package/dist/ui/assets/{PluginPage-DMDSihrZ.js → PluginPage-0lvdxgb9.js} +1 -1
  18. package/dist/ui/assets/{alert-jQ9HCPIf.js → alert-iLzU-PVI.js} +1 -1
  19. package/dist/ui/assets/{badge-CNq0-mH5.js → badge-CtnhTRvY.js} +1 -1
  20. package/dist/ui/assets/{card-DFAwwhN3.js → card-kbyBhNwO.js} +1 -1
  21. package/dist/ui/assets/{chevron-down-CPsvsmqj.js → chevron-down-Cc9mQAQw.js} +1 -1
  22. package/dist/ui/assets/{chevron-up-Df9jMo1X.js → chevron-up-DpkowYln.js} +1 -1
  23. package/dist/ui/assets/{circle-alert-DOPQPvU8.js → circle-alert-DdJ6APo_.js} +1 -1
  24. package/dist/ui/assets/{index-CERGVYZK.js → index-BfnNz64w.js} +52 -67
  25. package/dist/ui/assets/{index-BkD6DijD.js → index-BrK0WhOL.js} +1 -1
  26. package/dist/ui/assets/{input-Dzvg_ZEZ.js → input-BvW8vKOl.js} +1 -1
  27. package/dist/ui/assets/{label-DuVnkZ4q.js → label-DreCetCR.js} +1 -1
  28. package/dist/ui/assets/{loader-circle-CrvlRy5o.js → loader-circle-CZ6AxwMP.js} +1 -1
  29. package/dist/ui/assets/loginPage-CuRLIVKZ.js +6 -0
  30. package/dist/ui/assets/{select-DhS8YUtJ.js → select-BKrytphV.js} +1 -1
  31. package/dist/ui/assets/{separator-isK4chBP.js → separator-CbY_Nj0H.js} +1 -1
  32. package/dist/ui/assets/{severityOptions-O38dSOfk.js → severityOptions-D2G_j2im.js} +1 -1
  33. package/dist/ui/assets/{switch-Z3mImG9n.js → switch-BC9lkk6G.js} +1 -1
  34. package/dist/ui/assets/{tabs-_77MUUQe.js → tabs-EcdFi4sQ.js} +1 -1
  35. package/dist/ui/assets/{upload-C1LT4Gkb.js → upload-QuW8_Tqt.js} +1 -1
  36. package/dist/ui/assets/{utilService-DNyqzwj0.js → utilService-B2WfsS_i.js} +1 -1
  37. package/dist/ui/index.html +1 -1
  38. package/package.json +14 -15
  39. package/dist/cjs/telemetry/custom-implementations/exporters/PluginLogExporter.cjs +0 -45
  40. package/dist/cjs/telemetry/custom-implementations/exporters/PluginMetricExporter.cjs +0 -46
  41. package/dist/cjs/telemetry/custom-implementations/exporters/PluginSpanExporter.cjs +0 -61
  42. package/dist/cjs/tlm-ai/knownMicroservices.cjs +0 -13
  43. package/dist/esm/telemetry/custom-implementations/exporters/PluginLogExporter.js +0 -36
  44. package/dist/esm/telemetry/custom-implementations/exporters/PluginMetricExporter.js +0 -35
  45. package/dist/esm/telemetry/custom-implementations/exporters/PluginSpanExporter.js +0 -52
  46. package/dist/esm/tlm-ai/knownMicroservices.js +0 -5
  47. package/dist/types/telemetry/custom-implementations/exporters/PluginLogExporter.d.ts +0 -8
  48. package/dist/types/telemetry/custom-implementations/exporters/PluginMetricExporter.d.ts +0 -12
  49. package/dist/types/telemetry/custom-implementations/exporters/PluginSpanExporter.d.ts +0 -14
  50. package/dist/types/tlm-ai/knownMicroservices.d.ts +0 -6
  51. package/dist/ui/assets/ApiDocsPage-C_VVPPHa.js +0 -16
  52. package/dist/ui/assets/DevToolsPage-OyZcDcmw.js +0 -1
  53. package/dist/ui/assets/loginPage-qa4V-B70.js +0 -6
@@ -67,7 +67,7 @@ const defaultConfig = exports.defaultConfig = {
67
67
  // e.g. "oas.json" or null if not provided
68
68
  spec: null,
69
69
  // e.g. JSON.stringify(oasSpec) or null if not provided,
70
- uiPath: "/oas-telemetry-ui" // path to the UI, e.g. "/oas-telemetry-ui" WARN: This must match the UI package's App.tsx "oas-telemetry-ui" path
70
+ uiPath: "/telemetry-ui" // path to the UI, e.g. "/telemetry-ui" WARN: This must match the UI package's App.tsx "telemetry-ui" path
71
71
  },
72
72
  auth: {
73
73
  enabled: false,
@@ -65,11 +65,11 @@ paths:
65
65
  text/html:
66
66
  schema:
67
67
  type: string
68
- example: <p>Found. Redirecting to /oas-telemetry-ui</p>
68
+ example: <p>Found. Redirecting to /telemetry-ui</p>
69
69
 
70
- /oas-telemetry-ui:
70
+ /telemetry-ui:
71
71
  get:
72
- summary: OAS-Telemetry Web UI (Only works in production mode)
72
+ summary: Telemetry Web UI (Only works in production mode)
73
73
  tags:
74
74
  - ui
75
75
  responses:
@@ -15,6 +15,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
15
15
  // Load environment variables before any other imports
16
16
  // Initialize OpenTelemetry instrumentation
17
17
 
18
+ // WARN: If changed the API, also change in packages/lib/src/types/cjs-index.d.ts (used for CJS compilation)
18
19
  /**
19
20
  * Returns the OAS-Telemetry middleware.
20
21
  * All parameters are optional. However, either `spec` or `specFileName` must be provided to enable endpoint filtering.
@@ -52,10 +52,10 @@ const configureRoutes = (router, oasTlmConfig) => {
52
52
  });
53
53
  // Redirect to the UI when accessing the base URL
54
54
  telemetryRouter.get('/', (req, res) => {
55
- res.redirect(`${telemetryBaseUrl}/oas-telemetry-ui/`);
55
+ res.redirect(`${telemetryBaseUrl}/telemetry-ui/`);
56
56
  });
57
- // WARNING: This path must be the same as the one used in the UI package App.tsx "oas-telemetry-ui"
58
- telemetryRouter.use("/oas-telemetry-ui", (0, _uiRoutes.getUIRoutes)());
57
+ // WARNING: This path must be the same as the one used in the UI package App.tsx "telemetry-ui"
58
+ telemetryRouter.use("/telemetry-ui", (0, _uiRoutes.getUIRoutes)());
59
59
  telemetryRouter.use("/utils", (0, _utilRoutes.getUtilsRoutes)(oasTlmConfig));
60
60
  // Auth routes must be registered. If authentication is not enabled, all requests will be allowed.
61
61
  // Frontend will use these endpoints;
@@ -58,7 +58,7 @@ export const defaultConfig = {
58
58
  baseUrl: "/telemetry",
59
59
  specFileName: null, // e.g. "oas.json" or null if not provided
60
60
  spec: null, // e.g. JSON.stringify(oasSpec) or null if not provided,
61
- uiPath: "/oas-telemetry-ui", // path to the UI, e.g. "/oas-telemetry-ui" WARN: This must match the UI package's App.tsx "oas-telemetry-ui" path
61
+ uiPath: "/telemetry-ui", // path to the UI, e.g. "/telemetry-ui" WARN: This must match the UI package's App.tsx "telemetry-ui" path
62
62
  },
63
63
  auth: {
64
64
  enabled: false,
@@ -65,11 +65,11 @@ paths:
65
65
  text/html:
66
66
  schema:
67
67
  type: string
68
- example: <p>Found. Redirecting to /oas-telemetry-ui</p>
68
+ example: <p>Found. Redirecting to /telemetry-ui</p>
69
69
 
70
- /oas-telemetry-ui:
70
+ /telemetry-ui:
71
71
  get:
72
- summary: OAS-Telemetry Web UI (Only works in production mode)
72
+ summary: Telemetry Web UI (Only works in production mode)
73
73
  tags:
74
74
  - ui
75
75
  responses:
package/dist/esm/index.js CHANGED
@@ -6,6 +6,7 @@ import { Router } from 'express';
6
6
  import { configureRoutes } from './routesManager.js';
7
7
  import { configureTelemetry } from './telemetry/telemetryConfigurator.js';
8
8
  import { bootEnvVariables } from "./config/bootConfig.js";
9
+ // WARN: If changed the API, also change in packages/lib/src/types/cjs-index.d.ts (used for CJS compilation)
9
10
  /**
10
11
  * Returns the OAS-Telemetry middleware.
11
12
  * All parameters are optional. However, either `spec` or `specFileName` must be provided to enable endpoint filtering.
@@ -42,10 +42,10 @@ export const configureRoutes = (router, oasTlmConfig) => {
42
42
  });
43
43
  // Redirect to the UI when accessing the base URL
44
44
  telemetryRouter.get('/', (req, res) => {
45
- res.redirect(`${telemetryBaseUrl}/oas-telemetry-ui/`);
45
+ res.redirect(`${telemetryBaseUrl}/telemetry-ui/`);
46
46
  });
47
- // WARNING: This path must be the same as the one used in the UI package App.tsx "oas-telemetry-ui"
48
- telemetryRouter.use("/oas-telemetry-ui", getUIRoutes());
47
+ // WARNING: This path must be the same as the one used in the UI package App.tsx "telemetry-ui"
48
+ telemetryRouter.use("/telemetry-ui", getUIRoutes());
49
49
  telemetryRouter.use("/utils", getUtilsRoutes(oasTlmConfig));
50
50
  // Auth routes must be registered. If authentication is not enabled, all requests will be allowed.
51
51
  // Frontend will use these endpoints;
@@ -6,4 +6,5 @@ import { UserConfig } from './config/config.types.js';
6
6
  * Returns the OAS-Telemetry middleware.
7
7
  * All parameters are optional. However, either `spec` or `specFileName` must be provided to enable endpoint filtering.
8
8
  */
9
- export default function oasTelemetry(oasTlmInputConfig?: UserConfig): Router;
9
+ declare function oasTelemetry(oasTlmInputConfig?: UserConfig): Router;
10
+ export = oasTelemetry;
@@ -0,0 +1,16 @@
1
+ import{c as w,r as i,j as e,I,B,y as O,F as P}from"./index-BfnNz64w.js";import{u as R}from"./utilService-B2WfsS_i.js";import{I as M}from"./input-BvW8vKOl.js";import{b as z,c as D,C as T,a as $}from"./card-kbyBhNwO.js";import{C as J}from"./CollapsibleCard-CFXtL8_t.js";import{S as L,T as _}from"./separator-CbY_Nj0H.js";import{S as U,U as A,D as F}from"./upload-QuW8_Tqt.js";import"./chevron-up-DpkowYln.js";import"./chevron-down-Cc9mQAQw.js";/**
2
+ * @license lucide-react v0.515.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const H=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],V=w("eye",H);/**
7
+ * @license lucide-react v0.515.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const W=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],G=w("list",W);/**
12
+ * @license lucide-react v0.515.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const K=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Q=w("shield",K);function X(c,g){var x;return(x=c.tags)==null?void 0:x.find(N=>N.name===g)}const de=()=>{const[c,g]=i.useState(null),[x,N]=i.useState(null),[u,v]=i.useState({}),[y,k]=i.useState(""),[m,h]=i.useState(null),[p,C]=i.useState(!1);if(i.useEffect(()=>{R.getOasTelemetryOpenApiSpec().then(g)},[]),!c)return e.jsx("div",{className:"flex items-center justify-center h-screen bg-background",children:e.jsx("span",{className:"text-lg text-muted-foreground",children:"Loading API spec..."})});const f={};Object.entries(c.paths).forEach(([r,a])=>{const l=(a==null?void 0:a.parameters)||[];Object.entries(a).forEach(([t,n])=>{if(t==="parameters")return;const d={...n||{},parameters:[...l||[],...(n==null?void 0:n.parameters)||[]]};(d.tags||["default"]).forEach(o=>{f[o]||(f[o]=[]),f[o].push({path:r,method:t,details:d})})})});const q=(r,a)=>{v(l=>({...l,[r]:a}))},E=async r=>{var d;C(!0),h(null);let a=r.path;const l=r.details;l.parameters&&l.parameters.forEach(s=>{s.in==="path"&&(a=a.replace(`{${s.name}}`,u[s.name]||""))});const t=[];l.parameters&&l.parameters.forEach(s=>{s.in==="query"&&u[s.name]&&t.push(`${encodeURIComponent(s.name)}=${encodeURIComponent(u[s.name])}`)}),t.length&&(a+="?"+t.join("&"));const n={method:r.method,url:a,headers:{},data:void 0};l.requestBody&&(n.headers["Content-Type"]="application/json",n.data=y.trim()?y:"{}");try{const s=await O.request(n);h({status:s.status,data:s.data})}catch(s){h({error:((d=s==null?void 0:s.response)==null?void 0:d.data)||(s==null?void 0:s.message)||"Unknown error"})}C(!1)};function b(r){var l,t;if(!r)return"";const a=(l=r.content)==null?void 0:l["application/json"];return a!=null&&a.example?JSON.stringify(a.example,null,2):(t=a==null?void 0:a.schema)!=null&&t.example?JSON.stringify(a.schema.example,null,2):""}return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("main",{className:"container mx-auto px-4 py-4 md:py-8 space-y-4 md:space-y-6",children:[e.jsx(z,{children:e.jsxs(D,{children:[e.jsx(T,{className:"text-xl sm:text-2xl font-bold",children:"Telemetry lib (redacted)"}),e.jsx($,{className:"text-xs sm:text-sm",children:c.info.version}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:c.info.description})]})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Endpoints"}),e.jsx("div",{className:"flex flex-col gap-8",children:Object.entries(f).map(([r,a])=>{var l;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-2",children:[e.jsx("span",{className:"font-bold text-base",children:r}),e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:(l=X(c,r))==null?void 0:l.description})]}),e.jsx("div",{className:"flex flex-col gap-4",children:a.map((t,n)=>{var d;return e.jsxs(J,{isOpen:x===`${r}-${n}`,onToggle:()=>{N(x===`${r}-${n}`?null:`${r}-${n}`),v({});const s=b(t.details.requestBody);k(s),h(null)},className:`border shadow-sm rounded-lg transition-all ${x===`${r}-${n}`?"border-primary":"border-muted"} bg-card`,header:e.jsxs(e.Fragment,{children:[e.jsxs(T,{className:"flex items-center gap-2",children:[Z(t.method),e.jsx("span",{className:`font-bold uppercase text-xs sm:text-sm ${Y(t.method)}`,children:t.method}),e.jsx("span",{className:"font-mono text-xs sm:text-sm break-all",children:t.path}),p&&e.jsx("svg",{className:"animate-spin h-4 w-4 text-muted-foreground ml-2",viewBox:"0 0 24 24",children:e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"})})]}),e.jsx($,{children:t.details.summary||t.details.description})]}),children:[e.jsx(L,{className:"mb-2"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("span",{className:"font-semibold text-xs",children:"Description:"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.details.description||t.details.summary})]}),t.details.security&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-semibold",children:"Security:"})," ",t.details.security.map(s=>Object.keys(s).join(", ")).join(" | ")]}),t.details.tags&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.jsx("span",{className:"font-semibold",children:"Tags:"})," ",t.details.tags.join(", ")]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold mb-2 text-xs",children:"Parameters"}),((d=t.details.parameters)==null?void 0:d.length)>0?e.jsx("ul",{className:"space-y-2",children:t.details.parameters.map(s=>{var o;return e.jsxs("li",{className:"flex flex-col gap-1 border rounded px-3 py-2 bg-muted/40",children:[e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsx("span",{className:"font-mono font-bold text-xs",children:s.name}),e.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:s.in}),e.jsx("span",{className:"text-xs text-muted-foreground",children:((o=s.schema)==null?void 0:o.type)||"-"}),s.required&&e.jsx("span",{className:"text-xs text-red-500 font-semibold",children:"required"})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.description}),e.jsx(M,{value:u[s.name]||"",onChange:j=>q(s.name,j.target.value),className:"w-full sm:w-32 h-7 text-xs mt-1",placeholder:s.name})]},s.name)})}):e.jsx("div",{className:"text-muted-foreground text-xs",children:"No parameters"})]}),t.details.requestBody&&e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold mb-2 text-xs",children:"Request Body"}),e.jsx(I,{value:y,onChange:s=>k(s.target.value),className:"w-full font-mono text-xs h-40",placeholder:"JSON body"}),b(t.details.requestBody)&&e.jsxs("div",{className:"mt-2 text-xs",children:[e.jsx("span",{className:"font-semibold",children:"Example:"}),e.jsx("pre",{className:"bg-muted p-2 rounded text-xs whitespace-pre-wrap break-words",children:b(t.details.requestBody)})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-semibold mb-2 text-xs",children:"Responses"}),e.jsx("ul",{className:"space-y-2",children:Object.entries(t.details.responses||{}).map(([s,o])=>{var j,S;return e.jsxs("li",{className:"flex flex-col gap-1 border rounded px-3 py-2 bg-muted/40",children:[e.jsxs("div",{className:"flex gap-2 items-center flex-wrap",children:[e.jsx("span",{className:"font-mono text-xs font-bold",children:s}),e.jsx("span",{className:"text-xs text-muted-foreground",children:o.description})]}),((S=(j=o.content)==null?void 0:j["application/json"])==null?void 0:S.example)&&e.jsx("pre",{className:"bg-black text-white p-2 rounded text-xs mt-1 whitespace-pre-wrap break-words overflow-x-auto",children:JSON.stringify(o.content["application/json"].example,null,2)})]},s)})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3 mb-2",children:[e.jsx(B,{onClick:()=>E(t),disabled:p,className:"h-8 px-4 text-xs shadow w-full sm:w-auto",children:p?"Calling...":"Try it out"}),p&&e.jsx("span",{className:"text-muted-foreground text-xs",children:"Calling API..."})]}),m&&e.jsxs("div",{className:"mt-2",children:[e.jsx("div",{className:"font-semibold mb-1 text-xs",children:"Result"}),e.jsx("pre",{className:"bg-black text-white p-3 rounded text-xs overflow-x-auto max-h-48 whitespace-pre-wrap break-words",children:m.error?"Error: "+(typeof m.error=="string"?m.error:JSON.stringify(m.error,null,2)):JSON.stringify(m,null,2)})]})]})]},t.method+t.path)})})]},r)})})]})]})})};function Y(c){switch(c.toLowerCase()){case"get":return"text-green-600";case"post":return"text-blue-600";case"put":return"text-yellow-600";case"delete":return"text-red-600";case"patch":return"text-purple-600";default:return"text-gray-600"}}function Z(c){switch(c.toLowerCase()){case"get":return e.jsx(F,{className:"h-4 w-4 text-green-600"});case"post":return e.jsx(A,{className:"h-4 w-4 text-blue-600"});case"put":return e.jsx(U,{className:"h-4 w-4 text-yellow-600"});case"delete":return e.jsx(_,{className:"h-4 w-4 text-red-600"});case"patch":return e.jsx(Q,{className:"h-4 w-4 text-purple-600"});case"options":return e.jsx(G,{className:"h-4 w-4 text-gray-600"});case"head":return e.jsx(V,{className:"h-4 w-4 text-gray-600"});default:return e.jsx(P,{className:"h-4 w-4 text-gray-600"})}}export{de as default};
@@ -1 +1 @@
1
- import{j as s,B as l}from"./index-CERGVYZK.js";import{b as n,c as i,d as m}from"./card-DFAwwhN3.js";import{C as c}from"./chevron-up-Df9jMo1X.js";import{C as x}from"./chevron-down-CPsvsmqj.js";const p=({isOpen:a,onToggle:r,header:e,children:o,className:t})=>s.jsxs(n,{className:t,children:[s.jsxs(i,{className:"flex flex-row items-center justify-between cursor-pointer",onClick:r,children:[s.jsx("div",{children:e}),s.jsx(l,{variant:"ghost",size:"icon","aria-label":a?"Collapse":"Expand",tabIndex:-1,className:"ml-2",children:a?s.jsx(c,{className:"h-5 w-5"}):s.jsx(x,{className:"h-5 w-5"})})]}),a&&s.jsx(m,{children:o})]});export{p as C};
1
+ import{j as s,B as l}from"./index-BfnNz64w.js";import{b as n,c as i,d as m}from"./card-kbyBhNwO.js";import{C as c}from"./chevron-up-DpkowYln.js";import{C as x}from"./chevron-down-Cc9mQAQw.js";const p=({isOpen:a,onToggle:r,header:e,children:o,className:t})=>s.jsxs(n,{className:t,children:[s.jsxs(i,{className:"flex flex-row items-center justify-between cursor-pointer",onClick:r,children:[s.jsx("div",{children:e}),s.jsx(l,{variant:"ghost",size:"icon","aria-label":a?"Collapse":"Expand",tabIndex:-1,className:"ml-2",children:a?s.jsx(c,{className:"h-5 w-5"}):s.jsx(x,{className:"h-5 w-5"})})]}),a&&s.jsx(m,{children:o})]});export{p as C};
@@ -0,0 +1 @@
1
+ import{r as a,j as e,I as M,B as g,a0 as F,t}from"./index-BfnNz64w.js";import{C as G,a as I}from"./card-kbyBhNwO.js";import{I as x}from"./input-BvW8vKOl.js";import{L as r}from"./label-DreCetCR.js";import{T as D,a as E,b as u,c as h,W as p}from"./tabs-EcdFi4sQ.js";import{S as P,a as R,b as V,c as W,d as B}from"./select-BKrytphV.js";import{s as n,l as b}from"./severityOptions-D2G_j2im.js";import{C as O}from"./CollapsibleCard-CFXtL8_t.js";import"./chevron-down-Cc9mQAQw.js";import"./chevron-up-DpkowYln.js";import"./circle-alert-DdJ6APo_.js";const H=[{value:"info",label:"Info",icon:n[2].icon},{value:"warn",label:"Warn",icon:n[3].icon},{value:"error",label:"Error",icon:n[4].icon},{value:"debug",label:"Debug",icon:n[1].icon}];function U(){const[j,f]=a.useState("custom"),[c,v]=a.useState("Hello Telemetry!"),[i,N]=a.useState("info"),[m,k]=a.useState(1),[d,C]=a.useState(50),[l,o]=a.useState(!1),[w,L]=a.useState(!1),S=async()=>{o(!0);try{await b.generateCustomLog({log:c,method:i,repeat:m}),t.success("Log(s) generated. Please wait a few seconds for them to appear.")}catch{t.error("Failed to generate log(s).")}finally{o(!1)}},y=async()=>{o(!0);try{await b.generateMockLogs(d),t.success("Mock logs generation started.")}catch{t.error("Failed to generate mock logs.")}finally{o(!1)}};return e.jsx(O,{isOpen:w,onToggle:()=>L(s=>!s),header:e.jsxs(e.Fragment,{children:[e.jsxs(G,{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-5 w-5"}),"Log Generator"]}),e.jsx(I,{children:"Generate logs for testing and demonstration purposes."})]}),children:e.jsxs(D,{value:j,onValueChange:s=>f(s),children:[e.jsxs(E,{className:"mb-4 grid grid-cols-2 w-full",children:[e.jsx(u,{value:"custom",children:"Custom Log"}),e.jsx(u,{value:"mock",children:"Mock Logs"})]}),e.jsx(h,{value:"custom",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"log-message",className:"mb-1 block",children:"Message"}),e.jsx(M,{id:"log-message",value:c,onChange:s=>v(s.target.value),placeholder:"Log text",disabled:l,className:"mb-2"})]}),e.jsxs("div",{className:"flex gap-4 flex-col sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex gap-4 flex-row",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"log-method",className:"mb-1 block",children:"Method"}),e.jsxs(P,{value:i,onValueChange:N,disabled:l,children:[e.jsx(R,{className:"min-w-[120px]",children:e.jsx(V,{placeholder:"Method"})}),e.jsx(W,{children:H.map(s=>{const T=s.icon;return e.jsxs(B,{value:s.value,className:"flex items-center gap-2",children:[e.jsx(T,{className:"h-4 w-4 mr-1"}),s.label]},s.value)})})]})]}),e.jsxs("div",{children:[e.jsx(r,{htmlFor:"log-repeat",className:"mb-1 block",children:"Repeat"}),e.jsx(x,{id:"log-repeat",type:"number",min:1,value:m,onChange:s=>k(Number(s.target.value)),disabled:l,className:"w-20"})]})]}),e.jsxs(g,{onClick:S,disabled:l,children:[e.jsx(F,{className:"h-4 w-4 mr-2"}),"Generate"]})]})]})}),e.jsx(h,{value:"mock",children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 sm:items-end",children:[e.jsxs("div",{children:[e.jsx(r,{htmlFor:"mock-count",className:"mb-1 block",children:"Number of Mock Logs"}),e.jsx(x,{id:"mock-count",type:"number",min:1,value:d,onChange:s=>C(Number(s.target.value)),disabled:l,className:"w-32"})]}),e.jsxs(g,{onClick:y,disabled:l,className:"mt-2 sm:mt-0",children:[e.jsx(p,{className:"h-4 w-4 mr-2"}),"Generate Mock Logs"]})]})})]})})}function ee(){return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("main",{className:"container mx-auto px-4 py-4 md:py-8 space-y-4 md:space-y-6",children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Dev Tools"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Utilities for testing and development."}),e.jsx(U,{})]})})}export{ee as default};
@@ -1,4 +1,4 @@
1
- import{c as he,r as i,u as O,a as ve,j as t,P as W,b as te,d as ge,e as V,f as ye,g as ne,h as be,i as Ne,R as je,A as Ce,k as we,l as Ee,C as Te,m as Pe,n as Re,o as Oe,p as Y,F as X,M as De,W as Le,q as Ae,B as _e,s as Me,U as ke}from"./index-CERGVYZK.js";import{B as Se}from"./badge-CNq0-mH5.js";import{C as A,a as _,b as K,c as J,d as Q}from"./card-DFAwwhN3.js";import{L as Ie}from"./label-DuVnkZ4q.js";import{S as Fe}from"./switch-Z3mImG9n.js";import{u as Ue}from"./utilService-DNyqzwj0.js";/**
1
+ import{c as he,r as i,u as O,a as ve,j as t,P as W,b as te,d as ge,e as V,f as ye,g as ne,h as be,i as Ne,R as je,A as Ce,k as we,l as Ee,C as Te,m as Pe,n as Re,o as Oe,p as Y,F as X,M as De,W as Le,q as Ae,B as _e,s as Me,U as ke}from"./index-BfnNz64w.js";import{B as Se}from"./badge-CtnhTRvY.js";import{C as A,a as _,b as K,c as J,d as Q}from"./card-kbyBhNwO.js";import{L as Ie}from"./label-DreCetCR.js";import{S as Fe}from"./switch-BC9lkk6G.js";import{u as Ue}from"./utilService-B2WfsS_i.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as At,r as h,u as zt,a as Dr,j as c,P as Be,b as Po,d as $r,e as Zn,g as Oo,i as Fr,R as Wr,f as _r,h as it,A as Lo,k as Vr,J as Ur,K as Gr,L as qr,N as Kr,O as Xr,C as Jr,l as Yr,o as fe,Q as jt,B as Je,G as Zr,X as Qr,I as es,V as Ao,t as Se,Y as D,Z as ts}from"./index-CERGVYZK.js";import{s as bn,l as qe}from"./severityOptions-O38dSOfk.js";import{C as Ln,a as An}from"./card-DFAwwhN3.js";import{I as yn}from"./input-Dzvg_ZEZ.js";import{L as pt}from"./label-DuVnkZ4q.js";import{S as In,T as ns}from"./separator-isK4chBP.js";import{B as Jt}from"./badge-CNq0-mH5.js";import{R as os,d as rs,O as ss,C as ls,P as Qn,a as is}from"./index-BkD6DijD.js";import{C as eo}from"./chevron-down-CPsvsmqj.js";import{C as un,W as zo,T as as,a as cs,b as to,c as no}from"./tabs-_77MUUQe.js";import{C as zn}from"./CollapsibleCard-B3KR_8mL.js";import"./circle-alert-DOPQPvU8.js";import"./chevron-up-Df9jMo1X.js";/**
1
+ import{c as At,r as h,u as zt,a as Dr,j as c,P as Be,b as Po,d as $r,e as Zn,g as Oo,i as Fr,R as Wr,f as _r,h as it,A as Lo,k as Vr,J as Ur,K as Gr,L as qr,N as Kr,O as Xr,C as Jr,l as Yr,o as fe,Q as jt,B as Je,G as Zr,X as Qr,I as es,V as Ao,t as Se,Y as D,Z as ts}from"./index-BfnNz64w.js";import{s as bn,l as qe}from"./severityOptions-D2G_j2im.js";import{C as Ln,a as An}from"./card-kbyBhNwO.js";import{I as yn}from"./input-BvW8vKOl.js";import{L as pt}from"./label-DreCetCR.js";import{S as In,T as ns}from"./separator-CbY_Nj0H.js";import{B as Jt}from"./badge-CtnhTRvY.js";import{R as os,d as rs,O as ss,C as ls,P as Qn,a as is}from"./index-BrK0WhOL.js";import{C as eo}from"./chevron-down-Cc9mQAQw.js";import{C as un,W as zo,T as as,a as cs,b as to,c as no}from"./tabs-EcdFi4sQ.js";import{C as zn}from"./CollapsibleCard-CFXtL8_t.js";import"./circle-alert-DdJ6APo_.js";import"./chevron-up-DpkowYln.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{p as a,j as e,B as s}from"./index-CERGVYZK.js";function n(){const t=a();return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx("section",{className:"bg-gradient-to-r from-blue-600 to-purple-700 text-white py-20",children:e.jsxs("div",{className:"container mx-auto px-6 text-center",children:[e.jsx("h1",{className:"text-5xl font-bold mb-6",children:"Page Not Found"}),e.jsx("p",{className:"text-xl mb-8 max-w-3xl mx-auto",children:"The page you are looking for does not exist. You can return to the home page using the button below."}),e.jsx(s,{variant:"default",size:"lg",onClick:()=>t("/"),className:"bg-white text-blue-600 hover:bg-gray-200",children:"Go to Home"})]})}),e.jsx("div",{className:"my-56"})]})}export{n as default};
1
+ import{p as a,j as e,B as s}from"./index-BfnNz64w.js";function n(){const t=a();return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx("section",{className:"bg-gradient-to-r from-blue-600 to-purple-700 text-white py-20",children:e.jsxs("div",{className:"container mx-auto px-6 text-center",children:[e.jsx("h1",{className:"text-5xl font-bold mb-6",children:"Page Not Found"}),e.jsx("p",{className:"text-xl mb-8 max-w-3xl mx-auto",children:"The page you are looking for does not exist. You can return to the home page using the button below."}),e.jsx(s,{variant:"default",size:"lg",onClick:()=>t("/"),className:"bg-white text-blue-600 hover:bg-gray-200",children:"Go to Home"})]})}),e.jsx("div",{className:"my-56"})]})}export{n as default};
@@ -1,4 +1,4 @@
1
- import{c as _,p as q,v as z,r,j as e,B as d,t as j}from"./index-CERGVYZK.js";import{a as M,b as A,C as G,G as W,A as v,g as R}from"./alert-jQ9HCPIf.js";import{I as b}from"./input-Dzvg_ZEZ.js";import{L as l}from"./label-DuVnkZ4q.js";import{S as U,a as H,b as V,c as B,d as S}from"./select-DhS8YUtJ.js";import{W as Q,T as Y,a as K,b as E,c as k,I as X}from"./tabs-_77MUUQe.js";import{b as Z,c as $,C as ee,a as se,d as ne}from"./card-DFAwwhN3.js";import{S as L}from"./switch-Z3mImG9n.js";import{C as ie}from"./circle-alert-DOPQPvU8.js";import{L as ae}from"./loader-circle-CrvlRy5o.js";import"./chevron-down-CPsvsmqj.js";import"./chevron-up-Df9jMo1X.js";/**
1
+ import{c as _,p as q,v as z,r,j as e,B as d,t as j}from"./index-BfnNz64w.js";import{a as M,b as A,C as G,G as W,A as v,g as R}from"./alert-iLzU-PVI.js";import{I as b}from"./input-BvW8vKOl.js";import{L as l}from"./label-DreCetCR.js";import{S as U,a as H,b as V,c as B,d as S}from"./select-BKrytphV.js";import{W as Q,T as Y,a as K,b as E,c as k,I as X}from"./tabs-EcdFi4sQ.js";import{b as Z,c as $,C as ee,a as se,d as ne}from"./card-kbyBhNwO.js";import{S as L}from"./switch-BC9lkk6G.js";import{C as ie}from"./circle-alert-DdJ6APo_.js";import{L as ae}from"./loader-circle-CZ6AxwMP.js";import"./chevron-down-Cc9mQAQw.js";import"./chevron-up-DpkowYln.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as G,r as l,u as q,e as U,i as ee,j as e,f as se,h as te,P as F,p as K,B as b,T as ne,o as A,X as ae,F as re,S as ie,t as S,q as oe}from"./index-CERGVYZK.js";import{b as C,d as P,c as E,C as L,a as _}from"./card-DFAwwhN3.js";import{B as R}from"./badge-CNq0-mH5.js";import{G as le,C as ce,g as k,A as M,a as B,b as J}from"./alert-jQ9HCPIf.js";import{L as T}from"./loader-circle-CrvlRy5o.js";import{C as de}from"./chevron-down-CPsvsmqj.js";import{P as ue,a as me,R as fe,T as xe,C as he,b as pe,c as ge,D as je,d as Ne,O as ve}from"./index-BkD6DijD.js";import{D as V,S as we,U as ye}from"./upload-C1LT4Gkb.js";import{I as be}from"./input-Dzvg_ZEZ.js";import{L as Ce}from"./label-DuVnkZ4q.js";import{C as Se}from"./circle-alert-DOPQPvU8.js";/**
1
+ import{c as G,r as l,u as q,e as U,i as ee,j as e,f as se,h as te,P as F,p as K,B as b,T as ne,o as A,X as ae,F as re,S as ie,t as S,q as oe}from"./index-BfnNz64w.js";import{b as C,d as P,c as E,C as L,a as _}from"./card-kbyBhNwO.js";import{B as R}from"./badge-CtnhTRvY.js";import{G as le,C as ce,g as k,A as M,a as B,b as J}from"./alert-iLzU-PVI.js";import{L as T}from"./loader-circle-CZ6AxwMP.js";import{C as de}from"./chevron-down-Cc9mQAQw.js";import{P as ue,a as me,R as fe,T as xe,C as he,b as pe,c as ge,D as je,d as Ne,O as ve}from"./index-BrK0WhOL.js";import{D as V,S as we,U as ye}from"./upload-QuW8_Tqt.js";import{I as be}from"./input-BvW8vKOl.js";import{L as Ce}from"./label-DreCetCR.js";import{C as Se}from"./circle-alert-DdJ6APo_.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as an,y as Xe,z as be,D as Et,E as ai,j as ln,o as cn,G as li}from"./index-CERGVYZK.js";/**
1
+ import{c as an,y as Xe,z as be,D as Et,E as ai,j as ln,o as cn,G as li}from"./index-BfnNz64w.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as n,$ as s,o,G as d}from"./index-CERGVYZK.js";const c=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function u({className:e,variant:r,asChild:t=!1,...a}){const i=t?s:"span";return n.jsx(i,{"data-slot":"badge",className:o(c({variant:r}),e),...a})}export{u as B};
1
+ import{j as n,$ as s,o,G as d}from"./index-BfnNz64w.js";const c=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function u({className:e,variant:r,asChild:t=!1,...a}){const i=t?s:"span";return n.jsx(i,{"data-slot":"badge",className:o(c({variant:r}),e),...a})}export{u as B};
@@ -1 +1 @@
1
- import{j as r,o as e}from"./index-CERGVYZK.js";function o({className:a,...t}){return r.jsx("div",{"data-slot":"card",className:e("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...t})}function s({className:a,...t}){return r.jsx("div",{"data-slot":"card-header",className:e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...t})}function n({className:a,...t}){return r.jsx("div",{"data-slot":"card-title",className:e("leading-none font-semibold",a),...t})}function c({className:a,...t}){return r.jsx("div",{"data-slot":"card-description",className:e("text-muted-foreground text-sm",a),...t})}function i({className:a,...t}){return r.jsx("div",{"data-slot":"card-content",className:e("px-6",a),...t})}function l({className:a,...t}){return r.jsx("div",{"data-slot":"card-footer",className:e("flex items-center px-6 [.border-t]:pt-6",a),...t})}export{n as C,c as a,o as b,s as c,i as d,l as e};
1
+ import{j as r,o as e}from"./index-BfnNz64w.js";function o({className:a,...t}){return r.jsx("div",{"data-slot":"card",className:e("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...t})}function s({className:a,...t}){return r.jsx("div",{"data-slot":"card-header",className:e("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...t})}function n({className:a,...t}){return r.jsx("div",{"data-slot":"card-title",className:e("leading-none font-semibold",a),...t})}function c({className:a,...t}){return r.jsx("div",{"data-slot":"card-description",className:e("text-muted-foreground text-sm",a),...t})}function i({className:a,...t}){return r.jsx("div",{"data-slot":"card-content",className:e("px-6",a),...t})}function l({className:a,...t}){return r.jsx("div",{"data-slot":"card-footer",className:e("flex items-center px-6 [.border-t]:pt-6",a),...t})}export{n as C,c as a,o as b,s as c,i as d,l as e};
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CERGVYZK.js";/**
1
+ import{c as o}from"./index-BfnNz64w.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CERGVYZK.js";/**
1
+ import{c as o}from"./index-BfnNz64w.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-CERGVYZK.js";/**
1
+ import{c as e}from"./index-BfnNz64w.js";/**
2
2
  * @license lucide-react v0.515.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.