@posthog/core 1.27.9 → 1.28.0
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/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/logs/index.d.ts +94 -4
- package/dist/logs/index.d.ts.map +1 -1
- package/dist/logs/index.js +147 -4
- package/dist/logs/index.mjs +148 -5
- package/dist/logs/logs-utils.d.ts +2 -1
- package/dist/logs/logs-utils.d.ts.map +1 -1
- package/dist/logs/types.d.ts +140 -8
- package/dist/logs/types.d.ts.map +1 -1
- package/dist/posthog-core-stateless.d.ts +34 -0
- package/dist/posthog-core-stateless.d.ts.map +1 -1
- package/dist/posthog-core-stateless.js +39 -0
- package/dist/posthog-core-stateless.mjs +39 -0
- package/dist/surveys/events.d.ts +22 -0
- package/dist/surveys/events.d.ts.map +1 -0
- package/dist/surveys/events.js +95 -0
- package/dist/surveys/events.mjs +43 -0
- package/dist/surveys/index.d.ts +4 -0
- package/dist/surveys/index.d.ts.map +1 -0
- package/dist/surveys/index.js +83 -0
- package/dist/surveys/index.mjs +4 -0
- package/dist/surveys/translations.d.ts +38 -0
- package/dist/surveys/translations.d.ts.map +1 -0
- package/dist/surveys/translations.js +207 -0
- package/dist/surveys/translations.mjs +158 -0
- package/dist/testing/test-utils.d.ts.map +1 -1
- package/dist/testing/test-utils.js +1 -0
- package/dist/testing/test-utils.mjs +1 -0
- package/dist/types.d.ts +31 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +3 -0
- package/dist/utils/logger.mjs +3 -0
- package/package.json +26 -2
- package/src/index.ts +12 -1
- package/src/logs/index.spec.ts +891 -17
- package/src/logs/index.ts +337 -13
- package/src/logs/logs-utils.spec.ts +2 -1
- package/src/logs/logs-utils.ts +1 -1
- package/src/logs/types.ts +150 -25
- package/src/posthog-core-stateless.ts +64 -0
- package/src/surveys/events.spec.ts +52 -0
- package/src/surveys/events.ts +80 -0
- package/src/surveys/index.ts +18 -0
- package/src/surveys/translations.spec.ts +205 -0
- package/src/surveys/translations.ts +244 -0
- package/src/testing/test-utils.ts +1 -0
- package/src/types.ts +38 -2
- package/src/utils/logger.ts +6 -2
package/package.json
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"error-tracking": [
|
|
11
|
+
"dist/error-tracking/index.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"surveys": [
|
|
14
|
+
"dist/surveys/index.d.ts"
|
|
15
|
+
],
|
|
16
|
+
"testing": [
|
|
17
|
+
"dist/testing/index.d.ts"
|
|
18
|
+
],
|
|
19
|
+
"utils": [
|
|
20
|
+
"dist/utils/index.d.ts"
|
|
21
|
+
],
|
|
22
|
+
"vendor/*": [
|
|
23
|
+
"dist/vendor/*.d.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
8
27
|
"repository": {
|
|
9
28
|
"type": "git",
|
|
10
29
|
"url": "https://github.com/PostHog/posthog-js.git",
|
|
@@ -36,6 +55,11 @@
|
|
|
36
55
|
"require": "./dist/testing/index.js",
|
|
37
56
|
"import": "./dist/testing/index.mjs"
|
|
38
57
|
},
|
|
58
|
+
"./surveys": {
|
|
59
|
+
"types": "./dist/surveys/index.d.ts",
|
|
60
|
+
"require": "./dist/surveys/index.js",
|
|
61
|
+
"import": "./dist/surveys/index.mjs"
|
|
62
|
+
},
|
|
39
63
|
"./utils": {
|
|
40
64
|
"types": "./dist/utils/index.d.ts",
|
|
41
65
|
"require": "./dist/utils/index.js",
|
|
@@ -43,7 +67,7 @@
|
|
|
43
67
|
}
|
|
44
68
|
},
|
|
45
69
|
"dependencies": {
|
|
46
|
-
"@posthog/types": "1.372.
|
|
70
|
+
"@posthog/types": "1.372.6"
|
|
47
71
|
},
|
|
48
72
|
"devDependencies": {
|
|
49
73
|
"@rslib/core": "0.10.6",
|
package/src/index.ts
CHANGED
|
@@ -11,7 +11,18 @@ export {
|
|
|
11
11
|
toOtlpKeyValueList,
|
|
12
12
|
} from './logs/logs-utils'
|
|
13
13
|
export { PostHogLogs } from './logs'
|
|
14
|
-
export type {
|
|
14
|
+
export type {
|
|
15
|
+
BeforeSendLogFn,
|
|
16
|
+
BufferedLogEntry,
|
|
17
|
+
CaptureLogger,
|
|
18
|
+
LogSdkContext,
|
|
19
|
+
PostHogLogsConfig,
|
|
20
|
+
ResolvedPostHogLogsConfig,
|
|
21
|
+
} from './logs/types'
|
|
22
|
+
// Re-export the user-facing OTLP log types straight from `@posthog/types`
|
|
23
|
+
// via the `logs/types` barrel so consumers don't have to import from two
|
|
24
|
+
// packages to type their `captureLog` calls.
|
|
25
|
+
export type { CaptureLogOptions, LogAttributeValue, LogAttributes, LogSeverityLevel } from './logs/types'
|
|
15
26
|
export { uuidv7 } from './vendor/uuidv7'
|
|
16
27
|
export * from './posthog-core'
|
|
17
28
|
export * from './posthog-core-stateless'
|