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/cjs/index.js
CHANGED
|
@@ -4102,7 +4102,7 @@ function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
|
|
|
4102
4102
|
return buf;
|
|
4103
4103
|
}
|
|
4104
4104
|
|
|
4105
|
-
var INGESTION_URL = process.env.HUMAN_BEHAVIOR_INGESTION_URL
|
|
4105
|
+
var INGESTION_URL = process.env.HUMAN_BEHAVIOR_INGESTION_URL; // for development
|
|
4106
4106
|
var MAX_CHUNK_SIZE_BYTES = 1024 * 1024 * 10; // 10MB chunk size
|
|
4107
4107
|
function isChunkSizeExceeded(currentChunk, newEvent, sessionId) {
|
|
4108
4108
|
var nextChunkSize = new TextEncoder().encode(JSON.stringify({
|
|
@@ -4124,6 +4124,9 @@ var HumanBehaviorAPI = /** @class */ (function () {
|
|
|
4124
4124
|
function HumanBehaviorAPI(_a) {
|
|
4125
4125
|
var apiKey = _a.apiKey;
|
|
4126
4126
|
this.apiKey = apiKey;
|
|
4127
|
+
if (!INGESTION_URL) {
|
|
4128
|
+
throw new Error('HUMAN_BEHAVIOR_INGESTION_URL is not set');
|
|
4129
|
+
}
|
|
4127
4130
|
this.baseUrl = INGESTION_URL;
|
|
4128
4131
|
}
|
|
4129
4132
|
HumanBehaviorAPI.prototype.init = function (sessionId, userId) {
|