@djangocfg/monitor 2.1.289 → 2.1.291

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/client.cjs CHANGED
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
10
  var __commonJS = (cb, mod) => function __require() {
10
11
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -30,6 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
31
  mod
31
32
  ));
32
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
33
35
 
34
36
  // ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js
35
37
  var require_retry_operation = __commonJS({
@@ -343,6 +345,7 @@ var import_vanilla = require("zustand/vanilla");
343
345
  // src/_api/generated/cfg_monitor/monitor/client.ts
344
346
  var _Monitor = class _Monitor {
345
347
  constructor(client) {
348
+ __publicField(this, "client");
346
349
  this.client = client;
347
350
  }
348
351
  /**
@@ -538,6 +541,8 @@ var SENSITIVE_HEADERS = [
538
541
  ];
539
542
  var _APILogger = class _APILogger {
540
543
  constructor(config = {}) {
544
+ __publicField(this, "config");
545
+ __publicField(this, "consola");
541
546
  this.config = { ...DEFAULT_CONFIG, ...config };
542
547
  this.consola = config.consola || (0, import_consola.createConsola)({
543
548
  level: this.config.enabled ? 4 : 0
@@ -854,9 +859,13 @@ __name(withRetry, "withRetry");
854
859
  // src/_api/generated/cfg_monitor/client.ts
855
860
  var _APIClient = class _APIClient {
856
861
  constructor(baseUrl, options) {
857
- this.logger = null;
858
- this.retryConfig = null;
859
- this.tokenGetter = null;
862
+ __publicField(this, "baseUrl");
863
+ __publicField(this, "httpClient");
864
+ __publicField(this, "logger", null);
865
+ __publicField(this, "retryConfig", null);
866
+ __publicField(this, "tokenGetter", null);
867
+ // Sub-clients
868
+ __publicField(this, "monitor");
860
869
  this.baseUrl = baseUrl.replace(/\/$/, "");
861
870
  this.httpClient = options?.httpClient || new FetchAdapter();
862
871
  this.tokenGetter = options?.tokenGetter || null;
@@ -1074,6 +1083,7 @@ var APIClient = _APIClient;
1074
1083
  // src/_api/generated/cfg_monitor/storage.ts
1075
1084
  var _LocalStorageAdapter = class _LocalStorageAdapter {
1076
1085
  constructor(logger) {
1086
+ __publicField(this, "logger");
1077
1087
  this.logger = logger;
1078
1088
  }
1079
1089
  getItem(key) {
@@ -1118,7 +1128,8 @@ __name(_LocalStorageAdapter, "LocalStorageAdapter");
1118
1128
  var LocalStorageAdapter = _LocalStorageAdapter;
1119
1129
  var _MemoryStorageAdapter = class _MemoryStorageAdapter {
1120
1130
  constructor(logger) {
1121
- this.storage = /* @__PURE__ */ new Map();
1131
+ __publicField(this, "storage", /* @__PURE__ */ new Map());
1132
+ __publicField(this, "logger");
1122
1133
  this.logger = logger;
1123
1134
  }
1124
1135
  getItem(key) {
@@ -1202,9 +1213,15 @@ function detectLocale() {
1202
1213
  __name(detectLocale, "detectLocale");
1203
1214
  var _API = class _API {
1204
1215
  constructor(baseUrl, options) {
1205
- this._token = null;
1206
- this._refreshToken = null;
1207
- this._locale = null;
1216
+ __publicField(this, "baseUrl");
1217
+ __publicField(this, "_client");
1218
+ __publicField(this, "_token", null);
1219
+ __publicField(this, "_refreshToken", null);
1220
+ __publicField(this, "_locale", null);
1221
+ __publicField(this, "storage");
1222
+ __publicField(this, "options");
1223
+ // Sub-clients
1224
+ __publicField(this, "monitor");
1208
1225
  this.baseUrl = baseUrl;
1209
1226
  this.options = options;
1210
1227
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -1344,11 +1361,6 @@ function configureMonitorApi(baseUrl) {
1344
1361
  monitorApi.setBaseUrl(baseUrl);
1345
1362
  }
1346
1363
  __name(configureMonitorApi, "configureMonitorApi");
1347
- var _BaseClient = class _BaseClient {
1348
- };
1349
- __name(_BaseClient, "BaseClient");
1350
- _BaseClient.monitorApi = monitorApi;
1351
- var BaseClient = _BaseClient;
1352
1364
 
1353
1365
  // src/client/transport/ingest.ts
1354
1366
  var monitorApiBeacon = new API("", {
@@ -1373,7 +1385,7 @@ __name(sendBatch, "sendBatch");
1373
1385
  // src/client/utils/env.ts
1374
1386
  var isDevelopment = process.env.NODE_ENV === "development";
1375
1387
  var isProduction = !isDevelopment;
1376
- var MONITOR_VERSION = "2.1.289";
1388
+ var MONITOR_VERSION = "2.1.291";
1377
1389
 
1378
1390
  // src/client/constants.ts
1379
1391
  var MONITOR_INGEST_PATTERN = /cfg\/monitor\/ingest/;