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

@account-kit/logging

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@account-kit/logging - npm Package Compare versions

Comparing version 4.3.0 to 4.3.1

14

dist/esm/client.js
import { AnalyticsBrowser } from "@segment/analytics-next";
import { uuid } from "uuidv4";
import { v4 as uuid } from "uuid";
import { WRITE_IN_DEV } from "./_writeKey.js";

@@ -28,2 +28,7 @@ import { fetchRemoteWriteKey } from "./fetchRemoteWriteKey.js";

analytics.debug(isDev);
if (isDev) {
// Super weird behaviour, but if I don't add some kind of log here,
// then I don't actually get logs in the console
console.log(`[Metrics] metrics initialized for ${context.package}`);
}
// This lets us log events in the console

@@ -58,6 +63,11 @@ if (isDev) {

ready,
anonId,
},
trackEvent: async ({ name, data }) => {
if (!(await writeKey)) {
return noopLogger.trackEvent({ name, data });
return noopLogger.trackEvent({
name,
// @ts-expect-error
data,
});
}

@@ -64,0 +74,0 @@ await analytics.track(name, { ...data, ...context });

@@ -5,4 +5,5 @@ export const noopLogger = {

ready: Promise.resolve(),
anonId: "",
},
};
//# sourceMappingURL=noop.js.map

5

dist/esm/types.d.ts

@@ -11,3 +11,5 @@ export type EventsSchema = readonly {

name: Schema[K]["EventName"];
} & (Schema[K]["EventData"] extends undefined ? {
} & ([undefined] extends [
Schema[K]["EventData"]
] ? {
data?: undefined;

@@ -23,2 +25,3 @@ } : {

ready: Promise<unknown>;
anonId: string;
};

@@ -25,0 +28,0 @@ }

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

export declare const VERSION = "4.3.0";
export declare const VERSION = "4.3.1";
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.3.0";
export const VERSION = "4.3.1";
//# sourceMappingURL=version.js.map

@@ -11,3 +11,5 @@ export type EventsSchema = readonly {

name: Schema[K]["EventName"];
} & (Schema[K]["EventData"] extends undefined ? {
} & ([undefined] extends [
Schema[K]["EventData"]
] ? {
data?: undefined;

@@ -23,2 +25,3 @@ } : {

ready: Promise<unknown>;
anonId: string;
};

@@ -25,0 +28,0 @@ }

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

export declare const VERSION = "4.3.0";
export declare const VERSION = "4.3.1";
//# sourceMappingURL=version.d.ts.map
{
"name": "@account-kit/logging",
"version": "4.3.0",
"version": "4.3.1",
"description": "Core logging library for Account Kit packages",

@@ -62,5 +62,5 @@ "author": "Alchemy",

"@segment/analytics-next": "^1.74.0",
"uuidv4": "^6.2.13"
"uuid": "^11.0.2"
},
"gitHead": "78c86103afeee309748c9d604af58bc7707c8b16"
"gitHead": "68052c506336d4c7eee1d2ee78e9b07892488351"
}
import { AnalyticsBrowser } from "@segment/analytics-next";
import { uuid } from "uuidv4";
import { v4 as uuid } from "uuid";
import { WRITE_IN_DEV } from "./_writeKey.js";

@@ -36,2 +36,8 @@ import { fetchRemoteWriteKey } from "./fetchRemoteWriteKey.js";

if (isDev) {
// Super weird behaviour, but if I don't add some kind of log here,
// then I don't actually get logs in the console
console.log(`[Metrics] metrics initialized for ${context.package}`);
}
// This lets us log events in the console

@@ -72,6 +78,11 @@ if (isDev) {

ready,
anonId,
},
trackEvent: async ({ name, data }) => {
if (!(await writeKey)) {
return noopLogger.trackEvent({ name, data });
return noopLogger.trackEvent({
name,
// @ts-expect-error
data,
});
}

@@ -78,0 +89,0 @@

@@ -7,3 +7,4 @@ import type { InnerLogger } from "./types";

ready: Promise.resolve(),
anonId: "",
},
};

@@ -12,3 +12,5 @@ export type EventsSchema = readonly {

[K in keyof Schema]: Prettify<
{ name: Schema[K]["EventName"] } & (Schema[K]["EventData"] extends undefined
{ name: Schema[K]["EventName"] } & ([undefined] extends [
Schema[K]["EventData"]
]
? { data?: undefined }

@@ -29,2 +31,3 @@ : { data: Schema[K]["EventData"] })

ready: Promise<unknown>;
anonId: string;
};

@@ -31,0 +34,0 @@ }

// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.3.0";
export const VERSION = "4.3.1";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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