@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.mjs 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;
@@ -25,6 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
26
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
27
  mod
27
28
  ));
29
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
28
30
 
29
31
  // ../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js
30
32
  var require_retry_operation = __commonJS({
@@ -320,6 +322,7 @@ import { createStore } from "zustand/vanilla";
320
322
  // src/_api/generated/cfg_monitor/monitor/client.ts
321
323
  var _Monitor = class _Monitor {
322
324
  constructor(client) {
325
+ __publicField(this, "client");
323
326
  this.client = client;
324
327
  }
325
328
  /**
@@ -515,6 +518,8 @@ var SENSITIVE_HEADERS = [
515
518
  ];
516
519
  var _APILogger = class _APILogger {
517
520
  constructor(config = {}) {
521
+ __publicField(this, "config");
522
+ __publicField(this, "consola");
518
523
  this.config = { ...DEFAULT_CONFIG, ...config };
519
524
  this.consola = config.consola || createConsola({
520
525
  level: this.config.enabled ? 4 : 0
@@ -831,9 +836,13 @@ __name(withRetry, "withRetry");
831
836
  // src/_api/generated/cfg_monitor/client.ts
832
837
  var _APIClient = class _APIClient {
833
838
  constructor(baseUrl, options) {
834
- this.logger = null;
835
- this.retryConfig = null;
836
- this.tokenGetter = null;
839
+ __publicField(this, "baseUrl");
840
+ __publicField(this, "httpClient");
841
+ __publicField(this, "logger", null);
842
+ __publicField(this, "retryConfig", null);
843
+ __publicField(this, "tokenGetter", null);
844
+ // Sub-clients
845
+ __publicField(this, "monitor");
837
846
  this.baseUrl = baseUrl.replace(/\/$/, "");
838
847
  this.httpClient = options?.httpClient || new FetchAdapter();
839
848
  this.tokenGetter = options?.tokenGetter || null;
@@ -1051,6 +1060,7 @@ var APIClient = _APIClient;
1051
1060
  // src/_api/generated/cfg_monitor/storage.ts
1052
1061
  var _LocalStorageAdapter = class _LocalStorageAdapter {
1053
1062
  constructor(logger) {
1063
+ __publicField(this, "logger");
1054
1064
  this.logger = logger;
1055
1065
  }
1056
1066
  getItem(key) {
@@ -1095,7 +1105,8 @@ __name(_LocalStorageAdapter, "LocalStorageAdapter");
1095
1105
  var LocalStorageAdapter = _LocalStorageAdapter;
1096
1106
  var _MemoryStorageAdapter = class _MemoryStorageAdapter {
1097
1107
  constructor(logger) {
1098
- this.storage = /* @__PURE__ */ new Map();
1108
+ __publicField(this, "storage", /* @__PURE__ */ new Map());
1109
+ __publicField(this, "logger");
1099
1110
  this.logger = logger;
1100
1111
  }
1101
1112
  getItem(key) {
@@ -1179,9 +1190,15 @@ function detectLocale() {
1179
1190
  __name(detectLocale, "detectLocale");
1180
1191
  var _API = class _API {
1181
1192
  constructor(baseUrl, options) {
1182
- this._token = null;
1183
- this._refreshToken = null;
1184
- this._locale = null;
1193
+ __publicField(this, "baseUrl");
1194
+ __publicField(this, "_client");
1195
+ __publicField(this, "_token", null);
1196
+ __publicField(this, "_refreshToken", null);
1197
+ __publicField(this, "_locale", null);
1198
+ __publicField(this, "storage");
1199
+ __publicField(this, "options");
1200
+ // Sub-clients
1201
+ __publicField(this, "monitor");
1185
1202
  this.baseUrl = baseUrl;
1186
1203
  this.options = options;
1187
1204
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
@@ -1321,11 +1338,6 @@ function configureMonitorApi(baseUrl) {
1321
1338
  monitorApi.setBaseUrl(baseUrl);
1322
1339
  }
1323
1340
  __name(configureMonitorApi, "configureMonitorApi");
1324
- var _BaseClient = class _BaseClient {
1325
- };
1326
- __name(_BaseClient, "BaseClient");
1327
- _BaseClient.monitorApi = monitorApi;
1328
- var BaseClient = _BaseClient;
1329
1341
 
1330
1342
  // src/client/transport/ingest.ts
1331
1343
  var monitorApiBeacon = new API("", {
@@ -1350,7 +1362,7 @@ __name(sendBatch, "sendBatch");
1350
1362
  // src/client/utils/env.ts
1351
1363
  var isDevelopment = process.env.NODE_ENV === "development";
1352
1364
  var isProduction = !isDevelopment;
1353
- var MONITOR_VERSION = "2.1.289";
1365
+ var MONITOR_VERSION = "2.1.291";
1354
1366
 
1355
1367
  // src/client/constants.ts
1356
1368
  var MONITOR_INGEST_PATTERN = /cfg\/monitor\/ingest/;