humanbehavior-js 0.0.1 → 0.0.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/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -4098,7 +4098,7 @@ function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
|
|
|
4098
4098
|
return buf;
|
|
4099
4099
|
}
|
|
4100
4100
|
|
|
4101
|
-
var INGESTION_URL = process.env.HUMAN_BEHAVIOR_INGESTION_URL
|
|
4101
|
+
var INGESTION_URL = process.env.HUMAN_BEHAVIOR_INGESTION_URL; // for development
|
|
4102
4102
|
var MAX_CHUNK_SIZE_BYTES = 1024 * 1024 * 10; // 10MB chunk size
|
|
4103
4103
|
function isChunkSizeExceeded(currentChunk, newEvent, sessionId) {
|
|
4104
4104
|
var nextChunkSize = new TextEncoder().encode(JSON.stringify({
|
|
@@ -4120,6 +4120,9 @@ var HumanBehaviorAPI = /** @class */ (function () {
|
|
|
4120
4120
|
function HumanBehaviorAPI(_a) {
|
|
4121
4121
|
var apiKey = _a.apiKey;
|
|
4122
4122
|
this.apiKey = apiKey;
|
|
4123
|
+
if (!INGESTION_URL) {
|
|
4124
|
+
throw new Error('HUMAN_BEHAVIOR_INGESTION_URL is not set');
|
|
4125
|
+
}
|
|
4123
4126
|
this.baseUrl = INGESTION_URL;
|
|
4124
4127
|
}
|
|
4125
4128
|
HumanBehaviorAPI.prototype.init = function (sessionId, userId) {
|