@logkit/client
Advanced tools
Comparing version 0.0.0-f24dc22 to 0.0.0-f6e3335
@@ -1,2 +0,2 @@ | ||
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var f=(e,o)=>{for(var n in o)s(e,n,{get:o[n],enumerable:!0})},u=(e,o,n,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of p(o))!v.call(e,r)&&r!==n&&s(e,r,{get:()=>o[r],enumerable:!(l=c(o,r))||l.enumerable});return e};var L=e=>u(s({},"__esModule",{value:!0}),e);var a={};f(a,{log:()=>g,setMode:()=>_,setUrl:()=>U});module.exports=L(a);var t=null;typeof process<"u"&&"env"in process&&(typeof process.env.NEXT_PUBLIC_LOGKIT_URL=="string"?t=process.env.NEXT_PUBLIC_LOGKIT_URL:typeof process.env.LOGKIT_URL=="string"&&(t=process.env.LOGKIT_URL));async function g(e,o){if(d()==="dev"){console.log("[logkit]",e,o);return}if(t===null){console.warn("[logkit] Logkit URL not set. Please set the LOGKIT_URL environment variable or use `Logkit.setUrl()`.");return}try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:e,payload:o,mode:d()})})}catch{}}function U(e){t=e}var i=null;function _(e){i=e}function d(){if(i!==null)return i;try{let e=process.env.NODE_ENV;if(e==="development"||e==="test")return"dev"}catch{}return"prod"}0&&(module.exports={log,setMode,setUrl}); | ||
"use strict";var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var u=(e,o)=>{for(var r in o)s(e,r,{get:o[r],enumerable:!0})},f=(e,o,r,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of p(o))!v.call(e,t)&&t!==r&&s(e,t,{get:()=>o[t],enumerable:!(l=c(o,t))||l.enumerable});return e};var L=e=>f(s({},"__esModule",{value:!0}),e);var _={};u(_,{log:()=>g,setMode:()=>U,setUrl:()=>a});module.exports=L(_);var n=null;typeof process<"u"&&"env"in process&&(typeof process.env.NEXT_PUBLIC_LOGKIT_URL=="string"?n=process.env.NEXT_PUBLIC_LOGKIT_URL:typeof process.env.LOGKIT_URL=="string"&&(n=process.env.LOGKIT_URL));async function g(e,o){if(d()==="dev"){console.log("[logkit]",e,o);return}if(n===null){console.warn("[logkit] Logkit URL not set. Please set the LOGKIT_URL environment variable or use `Logkit.setUrl()`.");return}try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:e,payload:o,mode:d()}),keepalive:!0})}catch{}}function a(e){n=e}var i=null;function U(e){i=e}function d(){if(i!==null)return i;try{let e=process.env.NODE_ENV;if(e==="development"||e==="test")return"dev"}catch{}return"prod"}0&&(module.exports={log,setMode,setUrl}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@logkit/client", | ||
"version": "0.0.0-f24dc22", | ||
"version": "0.0.0-f6e3335", | ||
"description": "Next generation logging infrastructure", | ||
@@ -17,6 +17,4 @@ "license": "MIT", | ||
"dev": "concurrently -n client:build,client:types \"node -r esbuild-register --watch --watch-path src scripts/build.ts\" \"pnpm tsc -p scripts/tsconfig.extract.json --watch\"", | ||
"check": "concurrently -n client:check:types,client:check:lint \"pnpm check:types\" \"pnpm check:lint\"", | ||
"check:types": "tsc", | ||
"check:lint": "eslint --ext .js,.jsx,.ts,.tsx src/ scripts/" | ||
"check": "tsc" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
6322