@posthog/core 1.45.3 → 1.46.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/error-tracking/index.d.ts +1 -0
- package/dist/error-tracking/index.d.ts.map +1 -1
- package/dist/error-tracking/index.js +9 -0
- package/dist/error-tracking/index.mjs +1 -0
- package/dist/error-tracking/release.d.ts +10 -0
- package/dist/error-tracking/release.d.ts.map +1 -0
- package/dist/error-tracking/release.js +39 -0
- package/dist/error-tracking/release.mjs +5 -0
- package/package.json +1 -1
- package/src/error-tracking/index.ts +1 -0
- package/src/error-tracking/release.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-tracking/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,mBAAmB,SAAS,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-tracking/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,mBAAmB,SAAS,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
@@ -12,6 +12,9 @@ var __webpack_modules__ = {
|
|
|
12
12
|
"./parsers": function(module) {
|
|
13
13
|
module.exports = require("./parsers/index.js");
|
|
14
14
|
},
|
|
15
|
+
"./release": function(module) {
|
|
16
|
+
module.exports = require("./release.js");
|
|
17
|
+
},
|
|
15
18
|
"./utils?198b": function(module) {
|
|
16
19
|
module.exports = require("./utils.js");
|
|
17
20
|
}
|
|
@@ -89,6 +92,12 @@ var __webpack_exports__ = {};
|
|
|
89
92
|
return _exception_steps__WEBPACK_IMPORTED_MODULE_4__[key];
|
|
90
93
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
91
94
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
95
|
+
var _release__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./release");
|
|
96
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
97
|
+
for(var __WEBPACK_IMPORT_KEY__ in _release__WEBPACK_IMPORTED_MODULE_5__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
98
|
+
return _release__WEBPACK_IMPORTED_MODULE_5__[key];
|
|
99
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
100
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
92
101
|
})();
|
|
93
102
|
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
94
103
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the release id injected into the bundle by posthog-cli.
|
|
3
|
+
*
|
|
4
|
+
* The CLI prepends a small IIFE to each chunk that sets `globalThis._posthogReleaseId` to the
|
|
5
|
+
* release row's id (a string, first write wins so the first loaded chunk pins the release for the
|
|
6
|
+
* runtime). The SDK emits it on `$exception` events so the server resolves the release with a plain
|
|
7
|
+
* foreign-key lookup. Returns `undefined` when nothing was injected or the value is malformed.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getInjectedReleaseId(): string | undefined;
|
|
10
|
+
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/error-tracking/release.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,SAAS,CAGzD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getInjectedReleaseId: ()=>getInjectedReleaseId
|
|
28
|
+
});
|
|
29
|
+
function getInjectedReleaseId() {
|
|
30
|
+
const injected = globalThis._posthogReleaseId;
|
|
31
|
+
return 'string' == typeof injected && injected.length > 0 ? injected : void 0;
|
|
32
|
+
}
|
|
33
|
+
exports.getInjectedReleaseId = __webpack_exports__.getInjectedReleaseId;
|
|
34
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
35
|
+
"getInjectedReleaseId"
|
|
36
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
37
|
+
Object.defineProperty(exports, '__esModule', {
|
|
38
|
+
value: true
|
|
39
|
+
});
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the release id injected into the bundle by posthog-cli.
|
|
3
|
+
*
|
|
4
|
+
* The CLI prepends a small IIFE to each chunk that sets `globalThis._posthogReleaseId` to the
|
|
5
|
+
* release row's id (a string, first write wins so the first loaded chunk pins the release for the
|
|
6
|
+
* runtime). The SDK emits it on `$exception` events so the server resolves the release with a plain
|
|
7
|
+
* foreign-key lookup. Returns `undefined` when nothing was injected or the value is malformed.
|
|
8
|
+
*/
|
|
9
|
+
export function getInjectedReleaseId(): string | undefined {
|
|
10
|
+
const injected = (globalThis as any)._posthogReleaseId
|
|
11
|
+
return typeof injected === 'string' && injected.length > 0 ? injected : undefined
|
|
12
|
+
}
|