autotel-subscribers 56.1.1 → 56.1.2
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/README.md +2 -0
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/posthog.cjs +28 -0
- package/dist/posthog.d.cts +24 -0
- package/dist/posthog.d.ts +24 -0
- package/dist/posthog.js +26 -0
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
Subscribers for [autotel](https://github.com/jagreehal/autotel) to send events to Mixpanel, Amplitude, Segment, Slack, Loki, files, and custom webhooks.
|
|
6
6
|
|
|
7
7
|
> **PostHog moved.** `PostHogSubscriber` now lives in [`autotel-posthog`](../autotel-posthog), alongside the browser session/replay join, so one package covers PostHog end to end. Import it from `autotel-posthog/subscriber`; it still extends the `EventSubscriber` base defined here.
|
|
8
|
+
>
|
|
9
|
+
> Importing it from here still resolves for one more minor, but constructing it throws with the new import path — `autotel-posthog` depends on this package, so a real re-export would make the two depend on each other.
|
|
8
10
|
|
|
9
11
|
## Why Use This?
|
|
10
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -7,6 +7,7 @@ const require_slack = require('./slack.cjs');
|
|
|
7
7
|
const require_security = require('./security.cjs');
|
|
8
8
|
const require_webhook = require('./webhook.cjs');
|
|
9
9
|
const require_loki = require('./loki.cjs');
|
|
10
|
+
const require_posthog = require('./posthog.cjs');
|
|
10
11
|
const require_architecture_snapshot = require('./architecture-snapshot.cjs');
|
|
11
12
|
const require_file = require('./file.cjs');
|
|
12
13
|
|
|
@@ -187,6 +188,7 @@ exports.EventSubscriber = require_event_subscriber_base.EventSubscriber;
|
|
|
187
188
|
exports.FileSubscriber = require_file.FileSubscriber;
|
|
188
189
|
exports.LokiSubscriber = require_loki.LokiSubscriber;
|
|
189
190
|
exports.MixpanelSubscriber = require_mixpanel.MixpanelSubscriber;
|
|
191
|
+
exports.PostHogSubscriber = require_posthog.PostHogSubscriber;
|
|
190
192
|
exports.SecuritySubscriber = require_security.SecuritySubscriber;
|
|
191
193
|
exports.SegmentSubscriber = require_segment.SegmentSubscriber;
|
|
192
194
|
exports.SlackSubscriber = require_slack.SlackSubscriber;
|
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,7 @@ import { SlackSubscriber, SlackSubscriberConfig } from "./slack.cjs";
|
|
|
8
8
|
import { FileSubscriber, FileSubscriberConfig } from "./file.cjs";
|
|
9
9
|
import { SecurityAlert, SecurityAlertSeverity, SecuritySubscriber, SecuritySubscriberConfig } from "./security.cjs";
|
|
10
10
|
import { LokiConfig, LokiSubscriber } from "./loki.cjs";
|
|
11
|
+
import { PostHogConfig, PostHogSubscriber } from "./posthog.cjs";
|
|
11
12
|
//#region src/streaming-event-subscriber.d.ts
|
|
12
13
|
/**
|
|
13
14
|
* Buffer overflow strategy
|
|
@@ -131,4 +132,4 @@ declare abstract class StreamingEventSubscriber extends EventSubscriber {
|
|
|
131
132
|
protected compressPayload(payload: string): Promise<Buffer | string>;
|
|
132
133
|
}
|
|
133
134
|
//#endregion
|
|
134
|
-
export { ARCHITECTURE_SNAPSHOT_SPEC, type AmplitudeConfig, AmplitudeSubscriber, type ArchitectureSnapshot, type ArchitectureSnapshotConfig, ArchitectureSnapshotSubscriber, type EventObservation, type EventPayload, EventSubscriber, FileSubscriber, type FileSubscriberConfig, type LokiConfig, LokiSubscriber, type MixpanelConfig, MixpanelSubscriber, type SecurityAlert, type SecurityAlertSeverity, SecuritySubscriber, type SecuritySubscriberConfig, type SegmentConfig, SegmentSubscriber, SlackSubscriber, type SlackSubscriberConfig, StreamingEventSubscriber, type WebhookConfig, WebhookSubscriber, extractFieldPaths };
|
|
135
|
+
export { ARCHITECTURE_SNAPSHOT_SPEC, type AmplitudeConfig, AmplitudeSubscriber, type ArchitectureSnapshot, type ArchitectureSnapshotConfig, ArchitectureSnapshotSubscriber, type EventObservation, type EventPayload, EventSubscriber, FileSubscriber, type FileSubscriberConfig, type LokiConfig, LokiSubscriber, type MixpanelConfig, MixpanelSubscriber, type PostHogConfig, PostHogSubscriber, type SecurityAlert, type SecurityAlertSeverity, SecuritySubscriber, type SecuritySubscriberConfig, type SegmentConfig, SegmentSubscriber, SlackSubscriber, type SlackSubscriberConfig, StreamingEventSubscriber, type WebhookConfig, WebhookSubscriber, extractFieldPaths };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { SlackSubscriber, SlackSubscriberConfig } from "./slack.js";
|
|
|
8
8
|
import { FileSubscriber, FileSubscriberConfig } from "./file.js";
|
|
9
9
|
import { SecurityAlert, SecurityAlertSeverity, SecuritySubscriber, SecuritySubscriberConfig } from "./security.js";
|
|
10
10
|
import { LokiConfig, LokiSubscriber } from "./loki.js";
|
|
11
|
+
import { PostHogConfig, PostHogSubscriber } from "./posthog.js";
|
|
11
12
|
//#region src/streaming-event-subscriber.d.ts
|
|
12
13
|
/**
|
|
13
14
|
* Buffer overflow strategy
|
|
@@ -131,4 +132,4 @@ declare abstract class StreamingEventSubscriber extends EventSubscriber {
|
|
|
131
132
|
protected compressPayload(payload: string): Promise<Buffer | string>;
|
|
132
133
|
}
|
|
133
134
|
//#endregion
|
|
134
|
-
export { ARCHITECTURE_SNAPSHOT_SPEC, type AmplitudeConfig, AmplitudeSubscriber, type ArchitectureSnapshot, type ArchitectureSnapshotConfig, ArchitectureSnapshotSubscriber, type EventObservation, type EventPayload, EventSubscriber, FileSubscriber, type FileSubscriberConfig, type LokiConfig, LokiSubscriber, type MixpanelConfig, MixpanelSubscriber, type SecurityAlert, type SecurityAlertSeverity, SecuritySubscriber, type SecuritySubscriberConfig, type SegmentConfig, SegmentSubscriber, SlackSubscriber, type SlackSubscriberConfig, StreamingEventSubscriber, type WebhookConfig, WebhookSubscriber, extractFieldPaths };
|
|
135
|
+
export { ARCHITECTURE_SNAPSHOT_SPEC, type AmplitudeConfig, AmplitudeSubscriber, type ArchitectureSnapshot, type ArchitectureSnapshotConfig, ArchitectureSnapshotSubscriber, type EventObservation, type EventPayload, EventSubscriber, FileSubscriber, type FileSubscriberConfig, type LokiConfig, LokiSubscriber, type MixpanelConfig, MixpanelSubscriber, type PostHogConfig, PostHogSubscriber, type SecurityAlert, type SecurityAlertSeverity, SecuritySubscriber, type SecuritySubscriberConfig, type SegmentConfig, SegmentSubscriber, SlackSubscriber, type SlackSubscriberConfig, StreamingEventSubscriber, type WebhookConfig, WebhookSubscriber, extractFieldPaths };
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { SlackSubscriber } from "./slack.js";
|
|
|
6
6
|
import { SecuritySubscriber } from "./security.js";
|
|
7
7
|
import { WebhookSubscriber } from "./webhook.js";
|
|
8
8
|
import { LokiSubscriber } from "./loki.js";
|
|
9
|
+
import { PostHogSubscriber } from "./posthog.js";
|
|
9
10
|
import { ARCHITECTURE_SNAPSHOT_SPEC, ArchitectureSnapshotSubscriber, extractFieldPaths } from "./architecture-snapshot.js";
|
|
10
11
|
import { FileSubscriber } from "./file.js";
|
|
11
12
|
|
|
@@ -179,4 +180,4 @@ var StreamingEventSubscriber = class extends EventSubscriber {
|
|
|
179
180
|
};
|
|
180
181
|
|
|
181
182
|
//#endregion
|
|
182
|
-
export { ARCHITECTURE_SNAPSHOT_SPEC, AmplitudeSubscriber, ArchitectureSnapshotSubscriber, EventSubscriber, FileSubscriber, LokiSubscriber, MixpanelSubscriber, SecuritySubscriber, SegmentSubscriber, SlackSubscriber, StreamingEventSubscriber, WebhookSubscriber, extractFieldPaths };
|
|
183
|
+
export { ARCHITECTURE_SNAPSHOT_SPEC, AmplitudeSubscriber, ArchitectureSnapshotSubscriber, EventSubscriber, FileSubscriber, LokiSubscriber, MixpanelSubscriber, PostHogSubscriber, SecuritySubscriber, SegmentSubscriber, SlackSubscriber, StreamingEventSubscriber, WebhookSubscriber, extractFieldPaths };
|
package/dist/posthog.cjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
//#region src/posthog.ts
|
|
4
|
+
/**
|
|
5
|
+
* Where `PostHogSubscriber` used to live.
|
|
6
|
+
*
|
|
7
|
+
* It moved to `autotel-posthog/subscriber`, so one package covers PostHog end
|
|
8
|
+
* to end - the browser join, the span enricher and this subscriber. This file
|
|
9
|
+
* exists so the old import still resolves and says where to go, instead of a
|
|
10
|
+
* bare "Property 'PostHogSubscriber' does not exist". It re-exports nothing:
|
|
11
|
+
* `autotel-posthog` already depends on this package, and importing it back
|
|
12
|
+
* would make the two packages depend on each other.
|
|
13
|
+
*
|
|
14
|
+
* Delete this in the next minor.
|
|
15
|
+
*/
|
|
16
|
+
const MOVED = "PostHogSubscriber moved to 'autotel-posthog/subscriber'. Run `pnpm add autotel-posthog` and change the import to `import { PostHogSubscriber } from 'autotel-posthog/subscriber'`. Its options and behaviour are unchanged.";
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Moved to `autotel-posthog/subscriber` - import it from there.
|
|
19
|
+
* Constructing this throws; it exists only to point at the new home.
|
|
20
|
+
*/
|
|
21
|
+
var PostHogSubscriber = class {
|
|
22
|
+
constructor(..._config) {
|
|
23
|
+
throw new Error(MOVED);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.PostHogSubscriber = PostHogSubscriber;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/posthog.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Where `PostHogSubscriber` used to live.
|
|
4
|
+
*
|
|
5
|
+
* It moved to `autotel-posthog/subscriber`, so one package covers PostHog end
|
|
6
|
+
* to end - the browser join, the span enricher and this subscriber. This file
|
|
7
|
+
* exists so the old import still resolves and says where to go, instead of a
|
|
8
|
+
* bare "Property 'PostHogSubscriber' does not exist". It re-exports nothing:
|
|
9
|
+
* `autotel-posthog` already depends on this package, and importing it back
|
|
10
|
+
* would make the two packages depend on each other.
|
|
11
|
+
*
|
|
12
|
+
* Delete this in the next minor.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Moved to `autotel-posthog/subscriber` - import it from there.
|
|
16
|
+
* Constructing this throws; it exists only to point at the new home.
|
|
17
|
+
*/
|
|
18
|
+
declare class PostHogSubscriber {
|
|
19
|
+
constructor(..._config: unknown[]);
|
|
20
|
+
}
|
|
21
|
+
/** @deprecated Moved to `autotel-posthog/subscriber` along with the subscriber. */
|
|
22
|
+
type PostHogConfig = Record<never, never>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { PostHogConfig, PostHogSubscriber };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/posthog.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Where `PostHogSubscriber` used to live.
|
|
4
|
+
*
|
|
5
|
+
* It moved to `autotel-posthog/subscriber`, so one package covers PostHog end
|
|
6
|
+
* to end - the browser join, the span enricher and this subscriber. This file
|
|
7
|
+
* exists so the old import still resolves and says where to go, instead of a
|
|
8
|
+
* bare "Property 'PostHogSubscriber' does not exist". It re-exports nothing:
|
|
9
|
+
* `autotel-posthog` already depends on this package, and importing it back
|
|
10
|
+
* would make the two packages depend on each other.
|
|
11
|
+
*
|
|
12
|
+
* Delete this in the next minor.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Moved to `autotel-posthog/subscriber` - import it from there.
|
|
16
|
+
* Constructing this throws; it exists only to point at the new home.
|
|
17
|
+
*/
|
|
18
|
+
declare class PostHogSubscriber {
|
|
19
|
+
constructor(..._config: unknown[]);
|
|
20
|
+
}
|
|
21
|
+
/** @deprecated Moved to `autotel-posthog/subscriber` along with the subscriber. */
|
|
22
|
+
type PostHogConfig = Record<never, never>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { PostHogConfig, PostHogSubscriber };
|
package/dist/posthog.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/posthog.ts
|
|
2
|
+
/**
|
|
3
|
+
* Where `PostHogSubscriber` used to live.
|
|
4
|
+
*
|
|
5
|
+
* It moved to `autotel-posthog/subscriber`, so one package covers PostHog end
|
|
6
|
+
* to end - the browser join, the span enricher and this subscriber. This file
|
|
7
|
+
* exists so the old import still resolves and says where to go, instead of a
|
|
8
|
+
* bare "Property 'PostHogSubscriber' does not exist". It re-exports nothing:
|
|
9
|
+
* `autotel-posthog` already depends on this package, and importing it back
|
|
10
|
+
* would make the two packages depend on each other.
|
|
11
|
+
*
|
|
12
|
+
* Delete this in the next minor.
|
|
13
|
+
*/
|
|
14
|
+
const MOVED = "PostHogSubscriber moved to 'autotel-posthog/subscriber'. Run `pnpm add autotel-posthog` and change the import to `import { PostHogSubscriber } from 'autotel-posthog/subscriber'`. Its options and behaviour are unchanged.";
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Moved to `autotel-posthog/subscriber` - import it from there.
|
|
17
|
+
* Constructing this throws; it exists only to point at the new home.
|
|
18
|
+
*/
|
|
19
|
+
var PostHogSubscriber = class {
|
|
20
|
+
constructor(..._config) {
|
|
21
|
+
throw new Error(MOVED);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { PostHogSubscriber };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autotel-subscribers",
|
|
3
|
-
"version": "56.1.
|
|
3
|
+
"version": "56.1.2",
|
|
4
4
|
"description": "Write Once, Observe Anywhere - Event subscribers for autotel (Mixpanel, Amplitude, Segment, Slack, webhooks, Loki, file)",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -71,6 +71,11 @@
|
|
|
71
71
|
"types": "./dist/loki.d.ts",
|
|
72
72
|
"import": "./dist/loki.js",
|
|
73
73
|
"require": "./dist/loki.cjs"
|
|
74
|
+
},
|
|
75
|
+
"./posthog": {
|
|
76
|
+
"types": "./dist/posthog.d.ts",
|
|
77
|
+
"import": "./dist/posthog.js",
|
|
78
|
+
"require": "./dist/posthog.cjs"
|
|
74
79
|
}
|
|
75
80
|
},
|
|
76
81
|
"files": [
|