Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@logkit/client

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@logkit/client - npm Package Compare versions

Comparing version 0.0.0-b3e0954 to 0.0.0-c3ec1f0

13

dist/index.d.ts
/**
* Log an event to the Logkit ingestion endpoints.
*
* By default, this package does not have correct TypeScript type. To fix this,
* you need to generate the declarations as part of the logkit generate step:
*
* ```sh
* npx @logkit/logkit generate
* ```
*
* Make sure to check in the generated declarations to source control.
*/
export declare function log(event: never, fields: never): void;
export declare function log(event: string, payload: {}): Promise<void>;
export declare function setUrl(url: string): void;
export declare function setMode(mode: "dev" | "prod"): void;
//# sourceMappingURL=index.d.ts.map

@@ -1,2 +0,2 @@

"use strict";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var p=(t,o)=>{for(var n in o)i(t,n,{get:o[n],enumerable:!0})},r=(t,o,n,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of g(o))!h.call(t,e)&&e!==n&&i(t,e,{get:()=>o[e],enumerable:!(l=c(o,e))||l.enumerable});return t};var s=t=>r(i({},"__esModule",{value:!0}),t);var d={};p(d,{log:()=>a});module.exports=s(d);function a(t,o){fetch("http://localhost:3001/ingest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({event:t,fields:o})}),console.log("[logkit]",t,o)}0&&(module.exports={log});
"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});
//# sourceMappingURL=index.js.map
{
"name": "@logkit/client",
"version": "0.0.0-b3e0954",
"version": "0.0.0-c3ec1f0",
"description": "Next generation logging infrastructure",

@@ -12,3 +12,3 @@ "license": "MIT",

"devDependencies": {
"@types/node": "^20.1.3"
"@types/node": "^20.2.5"
},

@@ -18,6 +18,5 @@ "scripts": {

"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": "pnpm check:types",
"check:types": "tsc"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc