@aguacerowx/react-native 0.0.49 → 0.0.51

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.
Files changed (53) hide show
  1. package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +36 -0
  2. package/ios/WeatherFrameProcessorModule.swift +33 -2
  3. package/lib/commonjs/WeatherLayerManager.js +54 -6
  4. package/lib/commonjs/WeatherLayerManager.js.map +1 -1
  5. package/lib/commonjs/aguaceroCoreDebugHooks.js +144 -0
  6. package/lib/commonjs/aguaceroCoreDebugHooks.js.map +1 -0
  7. package/lib/commonjs/aguaceroRnDebug.js +351 -0
  8. package/lib/commonjs/aguaceroRnDebug.js.map +1 -0
  9. package/lib/commonjs/index.js +37 -0
  10. package/lib/commonjs/index.js.map +1 -1
  11. package/lib/commonjs/nexrad/nexradAndroidController.js +13 -0
  12. package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
  13. package/lib/commonjs/nexrad/nexradDiag.js +7 -1
  14. package/lib/commonjs/nexrad/nexradDiag.js.map +1 -1
  15. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js +15 -14
  16. package/lib/commonjs/nexrad/radarArchiveCore.bundled.js.map +1 -1
  17. package/lib/commonjs/satellite/satelliteAndroidController.js +9 -0
  18. package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
  19. package/lib/module/WeatherLayerManager.js +54 -6
  20. package/lib/module/WeatherLayerManager.js.map +1 -1
  21. package/lib/module/aguaceroCoreDebugHooks.js +136 -0
  22. package/lib/module/aguaceroCoreDebugHooks.js.map +1 -0
  23. package/lib/module/aguaceroRnDebug.js +334 -0
  24. package/lib/module/aguaceroRnDebug.js.map +1 -0
  25. package/lib/module/index.js +1 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/nexrad/nexradAndroidController.js +13 -0
  28. package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
  29. package/lib/module/nexrad/nexradDiag.js +7 -1
  30. package/lib/module/nexrad/nexradDiag.js.map +1 -1
  31. package/lib/module/nexrad/radarArchiveCore.bundled.js +15 -14
  32. package/lib/module/nexrad/radarArchiveCore.bundled.js.map +1 -1
  33. package/lib/module/satellite/satelliteAndroidController.js +9 -0
  34. package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
  35. package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
  36. package/lib/typescript/aguaceroCoreDebugHooks.d.ts +10 -0
  37. package/lib/typescript/aguaceroCoreDebugHooks.d.ts.map +1 -0
  38. package/lib/typescript/aguaceroRnDebug.d.ts +97 -0
  39. package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -0
  40. package/lib/typescript/index.d.ts +1 -0
  41. package/lib/typescript/nexrad/nexradAndroidController.d.ts.map +1 -1
  42. package/lib/typescript/nexrad/nexradDiag.d.ts.map +1 -1
  43. package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts.map +1 -1
  44. package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
  45. package/package.json +2 -2
  46. package/src/WeatherLayerManager.js +78 -21
  47. package/src/aguaceroCoreDebugHooks.js +142 -0
  48. package/src/aguaceroRnDebug.js +328 -0
  49. package/src/index.js +8 -0
  50. package/src/nexrad/nexradAndroidController.js +11 -1
  51. package/src/nexrad/nexradDiag.js +7 -1
  52. package/src/nexrad/radarArchiveCore.bundled.js +7085 -7084
  53. package/src/satellite/satelliteAndroidController.js +9 -0
@@ -0,0 +1,351 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.aguaceroDebug = aguaceroDebug;
7
+ exports.aguaceroDebugWarn = aguaceroDebugWarn;
8
+ exports.augmentProcessFrameOptionsForDebug = augmentProcessFrameOptionsForDebug;
9
+ exports.configureAguaceroRnDebug = configureAguaceroRnDebug;
10
+ exports.describeSecret = describeSecret;
11
+ exports.fingerprintSecret = fingerprintSecret;
12
+ exports.getAguaceroAuthDiagnosticSnapshot = getAguaceroAuthDiagnosticSnapshot;
13
+ exports.installGlobalFetchLogger = installGlobalFetchLogger;
14
+ exports.isAguaceroRnDebugEnabled = isAguaceroRnDebugEnabled;
15
+ exports.redactApiKeyFromUrl = redactApiKeyFromUrl;
16
+ exports.setAguaceroRnDebugEnabled = setAguaceroRnDebugEnabled;
17
+ exports.shouldLogAguaceroUrl = shouldLogAguaceroUrl;
18
+ var _reactNative = require("react-native");
19
+ /**
20
+ * React Native SDK auth / HTTP diagnostics.
21
+ *
22
+ * Enable in your app (pick one):
23
+ *
24
+ * 1. **Recommended** — pass `debug={true}` on {@link WeatherLayerManager}:
25
+ * ```jsx
26
+ * <WeatherLayerManager apiKey={key} debug gridRequestSiteOrigin="https://your-allowed-origin.com" />
27
+ * ```
28
+ *
29
+ * 2. **Global** — before rendering weather (works in release builds):
30
+ * ```js
31
+ * import { configureAguaceroRnDebug } from '@aguacerowx/react-native';
32
+ * configureAguaceroRnDebug({ enabled: true });
33
+ * ```
34
+ * or: `globalThis.__AGUACERO_DEBUG__ = true` in your entry file.
35
+ *
36
+ * Logs use the prefix `[AguaceroRN][debug]` (Metro, Xcode, Logcat).
37
+ * API keys are never printed in full — only length, fingerprint, and whitespace hints.
38
+ */
39
+
40
+ const LOG_PREFIX = '[AguaceroRN][debug]';
41
+
42
+ /** @type {boolean | null} */
43
+ let _explicitEnabled = null;
44
+ let _fetchLoggerInstalled = false;
45
+ let _fetchSeq = 0;
46
+ const AGUACERO_URL_MARKERS = ['cloudfront.net', 'lambda-url.us-east-2.on.aws', 'amazonaws.com', 'noaa.gov'];
47
+
48
+ /**
49
+ * @param {boolean} enabled
50
+ */
51
+ function setAguaceroRnDebugEnabled(enabled) {
52
+ configureAguaceroRnDebug({
53
+ enabled: Boolean(enabled)
54
+ });
55
+ }
56
+
57
+ /**
58
+ * @param {{ enabled?: boolean }} opts
59
+ */
60
+ function configureAguaceroRnDebug(opts = {}) {
61
+ if (opts && typeof opts.enabled === 'boolean') {
62
+ _explicitEnabled = opts.enabled;
63
+ }
64
+ const on = isAguaceroRnDebugEnabled();
65
+ try {
66
+ if (typeof globalThis !== 'undefined') {
67
+ globalThis.__AGUACERO_DEBUG__ = on;
68
+ globalThis.__AGUACERO_WX_GRID_DEBUG__ = on;
69
+ globalThis.__AGUACERO_NEXRAD_DEBUG__ = on;
70
+ }
71
+ } catch {
72
+ /* ignore */
73
+ }
74
+ if (on) {
75
+ installGlobalFetchLogger();
76
+ aguaceroDebug('debug.enabled', {
77
+ platform: _reactNative.Platform.OS,
78
+ explicitFlag: _explicitEnabled,
79
+ globalFlag: safeGlobalDebugFlag()
80
+ });
81
+ }
82
+ }
83
+
84
+ /**
85
+ * True when `debug={true}`, {@link configureAguaceroRnDebug}, or `globalThis.__AGUACERO_DEBUG__ === true`.
86
+ * @returns {boolean}
87
+ */
88
+ function isAguaceroRnDebugEnabled() {
89
+ if (_explicitEnabled === true) return true;
90
+ if (_explicitEnabled === false) {
91
+ try {
92
+ return typeof globalThis !== 'undefined' && globalThis.__AGUACERO_DEBUG__ === true;
93
+ } catch {
94
+ return false;
95
+ }
96
+ }
97
+ try {
98
+ if (typeof __DEV__ !== 'undefined' && __DEV__) return false;
99
+ } catch {
100
+ /* ignore */
101
+ }
102
+ try {
103
+ return typeof globalThis !== 'undefined' && globalThis.__AGUACERO_DEBUG__ === true;
104
+ } catch {
105
+ return false;
106
+ }
107
+ }
108
+ function safeGlobalDebugFlag() {
109
+ try {
110
+ return typeof globalThis !== 'undefined' ? globalThis.__AGUACERO_DEBUG__ === true : false;
111
+ } catch {
112
+ return false;
113
+ }
114
+ }
115
+
116
+ /**
117
+ * @param {string | null | undefined} secret
118
+ * @returns {Record<string, unknown>}
119
+ */
120
+ function describeSecret(secret) {
121
+ if (secret == null || secret === '') {
122
+ return {
123
+ present: false,
124
+ length: 0
125
+ };
126
+ }
127
+ const s = String(secret);
128
+ const trimmed = s.trim();
129
+ return {
130
+ present: true,
131
+ length: s.length,
132
+ trimmedLength: trimmed.length,
133
+ hasLeadingWhitespace: s.length > 0 && s !== trimmed && /^\s/.test(s),
134
+ hasTrailingWhitespace: s.length > 0 && s !== trimmed && /\s$/.test(s),
135
+ hasInternalWhitespace: /\s/.test(trimmed) && trimmed.indexOf(' ') >= 0,
136
+ fingerprint: fingerprintSecret(trimmed || s),
137
+ looksLikePlaceholder: /^(your[-_]?)?api[-_]?key|xxx+|test+$/i.test(trimmed)
138
+ };
139
+ }
140
+
141
+ /**
142
+ * @param {string} s
143
+ * @returns {string}
144
+ */
145
+ function fingerprintSecret(s) {
146
+ if (!s) return '(empty)';
147
+ if (s.length <= 8) return `len${s.length}`;
148
+ return `${s.slice(0, 4)}…${s.slice(-4)} (len=${s.length})`;
149
+ }
150
+
151
+ /**
152
+ * @param {string} u
153
+ * @returns {string}
154
+ */
155
+ function redactApiKeyFromUrl(u) {
156
+ if (!u || typeof u !== 'string') return String(u);
157
+ return u.replace(/([?&])apiKey=[^&]*/gi, '$1apiKey=(redacted)');
158
+ }
159
+
160
+ /**
161
+ * @param {string} url
162
+ * @returns {boolean}
163
+ */
164
+ function shouldLogAguaceroUrl(url) {
165
+ if (!url || typeof url !== 'string') return false;
166
+ const lower = url.toLowerCase();
167
+ return AGUACERO_URL_MARKERS.some(m => lower.includes(m));
168
+ }
169
+
170
+ /**
171
+ * @param {string} tag
172
+ * @param {Record<string, unknown> | undefined} detail
173
+ */
174
+ function aguaceroDebug(tag, detail) {
175
+ if (!isAguaceroRnDebugEnabled()) return;
176
+ if (detail !== undefined) {
177
+ console.warn(`${LOG_PREFIX}[${tag}]`, detail);
178
+ } else {
179
+ console.warn(`${LOG_PREFIX}[${tag}]`);
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Auth / HTTP failures: logged when debug is on (same prefix).
185
+ * @param {string} tag
186
+ * @param {Record<string, unknown> | undefined} detail
187
+ */
188
+ function aguaceroDebugWarn(tag, detail) {
189
+ if (!isAguaceroRnDebugEnabled()) return;
190
+ if (detail !== undefined) {
191
+ console.warn(`${LOG_PREFIX}[WARN][${tag}]`, detail);
192
+ } else {
193
+ console.warn(`${LOG_PREFIX}[WARN][${tag}]`);
194
+ }
195
+ }
196
+
197
+ /**
198
+ * @param {import('@aguacerowx/javascript-sdk').AguaceroCore | { apiKey?: string; bundleId?: string | null; gridRequestSiteOrigin?: string | null; baseGridUrl?: string; isReactNative?: boolean }} core
199
+ * @param {Record<string, unknown>} [extra]
200
+ */
201
+ function getAguaceroAuthDiagnosticSnapshot(core, extra = {}) {
202
+ const apiKey = core?.apiKey;
203
+ const bundleId = core?.bundleId;
204
+ const origin = core?.gridRequestSiteOrigin;
205
+ return {
206
+ platform: _reactNative.Platform.OS,
207
+ isReactNative: Boolean(core?.isReactNative),
208
+ baseGridUrl: core?.baseGridUrl ?? null,
209
+ apiKey: describeSecret(apiKey),
210
+ bundleId: bundleId ? {
211
+ present: true,
212
+ value: String(bundleId),
213
+ length: String(bundleId).length
214
+ } : {
215
+ present: false,
216
+ hint: 'Install react-native-device-info for x-app-identifier on CDN requests'
217
+ },
218
+ gridRequestSiteOrigin: origin ? {
219
+ present: true,
220
+ value: String(origin),
221
+ length: String(origin).length
222
+ } : {
223
+ present: false,
224
+ hint: 'Pass gridRequestSiteOrigin on WeatherLayerManager — many CloudFront rules require Origin + Referer'
225
+ },
226
+ willSendAppIdentifier: Boolean(bundleId && core?.isReactNative),
227
+ willSendOriginHeaders: Boolean(origin && String(origin).trim()),
228
+ ...extra
229
+ };
230
+ }
231
+
232
+ /**
233
+ * @param {Record<string, unknown>} options - {@link buildGridFrameProcessOptions} output
234
+ * @param {import('@aguacerowx/javascript-sdk').AguaceroCore} [core]
235
+ * @returns {Record<string, unknown>}
236
+ */
237
+ function augmentProcessFrameOptionsForDebug(options, core) {
238
+ const out = {
239
+ ...options
240
+ };
241
+ if (!isAguaceroRnDebugEnabled()) {
242
+ return out;
243
+ }
244
+ out.debug = true;
245
+ aguaceroDebug('processFrame.options', {
246
+ url: redactApiKeyFromUrl(out.url),
247
+ hasApiKeyInQuery: typeof out.url === 'string' && /[?&]apiKey=/i.test(out.url),
248
+ apiKey: describeSecret(out.apiKey),
249
+ bundleId: out.bundleId ? {
250
+ present: true,
251
+ value: String(out.bundleId)
252
+ } : {
253
+ present: false
254
+ },
255
+ gridRequestSiteOrigin: out.gridRequestSiteOrigin ?? null,
256
+ coreSnapshot: core ? getAguaceroAuthDiagnosticSnapshot(core) : undefined
257
+ });
258
+ return out;
259
+ }
260
+
261
+ /**
262
+ * @param {string | Request} input
263
+ * @param {RequestInit | undefined} init
264
+ */
265
+ function summarizeFetchRequest(input, init) {
266
+ const url = typeof input === 'string' ? input : input?.url;
267
+ const headers = new Headers(typeof input !== 'string' && input?.headers || init?.headers || undefined);
268
+ const headerRecord = {};
269
+ headers.forEach((v, k) => {
270
+ const lk = k.toLowerCase();
271
+ if (lk === 'x-api-key' || lk === 'authorization') {
272
+ headerRecord[k] = describeSecret(v);
273
+ } else {
274
+ headerRecord[k] = v;
275
+ }
276
+ });
277
+ return {
278
+ url: redactApiKeyFromUrl(url || ''),
279
+ method: init?.method || (typeof input !== 'string' ? input?.method : undefined) || 'GET',
280
+ headers: headerRecord,
281
+ hasApiKeyQuery: typeof url === 'string' && /[?&]apiKey=/i.test(url)
282
+ };
283
+ }
284
+
285
+ /**
286
+ * Patches `global.fetch` once to log Aguacero CDN / API traffic when debug is enabled.
287
+ */
288
+ function installGlobalFetchLogger() {
289
+ if (_fetchLoggerInstalled || !isAguaceroRnDebugEnabled()) return;
290
+ if (typeof globalThis === 'undefined' || typeof globalThis.fetch !== 'function') return;
291
+ const originalFetch = globalThis.fetch.bind(globalThis);
292
+ _fetchLoggerInstalled = true;
293
+ globalThis.fetch = async function aguaceroInstrumentedFetch(input, init) {
294
+ const url = typeof input === 'string' ? input : input?.url;
295
+ const shouldLog = shouldLogAguaceroUrl(url || '');
296
+ const reqId = shouldLog ? `f${++_fetchSeq}` : null;
297
+ const started = Date.now();
298
+ if (shouldLog) {
299
+ aguaceroDebug('fetch.start', {
300
+ reqId,
301
+ ...summarizeFetchRequest(input, init)
302
+ });
303
+ }
304
+ try {
305
+ const response = await originalFetch(input, init);
306
+ if (shouldLog) {
307
+ const elapsedMs = Date.now() - started;
308
+ const base = {
309
+ reqId,
310
+ status: response.status,
311
+ statusText: response.statusText,
312
+ ok: response.ok,
313
+ elapsedMs,
314
+ url: redactApiKeyFromUrl(url || '')
315
+ };
316
+ if (!response.ok) {
317
+ let bodySnippet = null;
318
+ try {
319
+ const clone = response.clone();
320
+ const text = await clone.text();
321
+ bodySnippet = text.length > 600 ? `${text.slice(0, 600)}…` : text;
322
+ } catch {
323
+ bodySnippet = '(could not read body)';
324
+ }
325
+ aguaceroDebugWarn('fetch.httpError', {
326
+ ...base,
327
+ bodySnippet,
328
+ hint403: response.status === 403 ? '403 usually means: invalid/disabled API key, bundleId not allowlisted (x-app-identifier), or missing/wrong gridRequestSiteOrigin (Origin/Referer). Compare snapshot at core.created / processFrame.options.' : undefined
329
+ });
330
+ } else {
331
+ aguaceroDebug('fetch.ok', base);
332
+ }
333
+ }
334
+ return response;
335
+ } catch (err) {
336
+ if (shouldLog) {
337
+ aguaceroDebugWarn('fetch.throw', {
338
+ reqId,
339
+ message: err?.message || String(err),
340
+ elapsedMs: Date.now() - started,
341
+ url: redactApiKeyFromUrl(url || '')
342
+ });
343
+ }
344
+ throw err;
345
+ }
346
+ };
347
+ aguaceroDebug('fetch.hookInstalled', {
348
+ platform: _reactNative.Platform.OS
349
+ });
350
+ }
351
+ //# sourceMappingURL=aguaceroRnDebug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","LOG_PREFIX","_explicitEnabled","_fetchLoggerInstalled","_fetchSeq","AGUACERO_URL_MARKERS","setAguaceroRnDebugEnabled","enabled","configureAguaceroRnDebug","Boolean","opts","on","isAguaceroRnDebugEnabled","globalThis","__AGUACERO_DEBUG__","__AGUACERO_WX_GRID_DEBUG__","__AGUACERO_NEXRAD_DEBUG__","installGlobalFetchLogger","aguaceroDebug","platform","Platform","OS","explicitFlag","globalFlag","safeGlobalDebugFlag","__DEV__","describeSecret","secret","present","length","s","String","trimmed","trim","trimmedLength","hasLeadingWhitespace","test","hasTrailingWhitespace","hasInternalWhitespace","indexOf","fingerprint","fingerprintSecret","looksLikePlaceholder","slice","redactApiKeyFromUrl","u","replace","shouldLogAguaceroUrl","url","lower","toLowerCase","some","m","includes","tag","detail","undefined","console","warn","aguaceroDebugWarn","getAguaceroAuthDiagnosticSnapshot","core","extra","apiKey","bundleId","origin","gridRequestSiteOrigin","isReactNative","baseGridUrl","value","hint","willSendAppIdentifier","willSendOriginHeaders","augmentProcessFrameOptionsForDebug","options","out","debug","hasApiKeyInQuery","coreSnapshot","summarizeFetchRequest","input","init","headers","Headers","headerRecord","forEach","v","k","lk","method","hasApiKeyQuery","fetch","originalFetch","bind","aguaceroInstrumentedFetch","shouldLog","reqId","started","Date","now","response","elapsedMs","base","status","statusText","ok","bodySnippet","clone","text","hint403","err","message"],"sourceRoot":"..\\..\\src","sources":["aguaceroRnDebug.js"],"mappings":";;;;;;;;;;;;;;;;;AAqBA,IAAAA,YAAA,GAAAC,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMC,UAAU,GAAG,qBAAqB;;AAExC;AACA,IAAIC,gBAAgB,GAAG,IAAI;AAE3B,IAAIC,qBAAqB,GAAG,KAAK;AACjC,IAAIC,SAAS,GAAG,CAAC;AAEjB,MAAMC,oBAAoB,GAAG,CACzB,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,UAAU,CACb;;AAED;AACA;AACA;AACO,SAASC,yBAAyBA,CAACC,OAAO,EAAE;EAC/CC,wBAAwB,CAAC;IAAED,OAAO,EAAEE,OAAO,CAACF,OAAO;EAAE,CAAC,CAAC;AAC3D;;AAEA;AACA;AACA;AACO,SAASC,wBAAwBA,CAACE,IAAI,GAAG,CAA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EACHT,QAAQ,CAACG,MAAM,KAAK,GAAG,GACjB,6MAA6M,GAC7M/C;UACd,CAAC,CAAC;QACN,CAAC,MAAM;UACHtC,aAAa,CAAC,UAAU,EAAEoF,IAAI,CAAC;QACnC;MACJ;MACA,OAAOF,QAAQ;IACnB,CAAC,CAAC,OAAOU,GAAG,EAAE;MACV,IAAIf,SAAS,EAAE;QACXpC,iBAAiB,CAAC,aAAa,EAAE;UAC7BqC,KAAK;UACLe,OAAO,EAAED,GAAG,EAAEC,OAAO,IAAIhF,MAAM,CAAC+E,GAAG,CAAC;UACpCT,SAAS,EAAEH,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGF,OAAO;UAC/BjD,GAAG,EAAEJ,mBAAmB,CAACI,GAAG,IAAI,EAAE;QACtC,CAAC,CAAC;MACN;MACA,MAAM8D,GAAG;IACb;EACJ,CAAC;EAED5F,aAAa,CAAC,qBAAqB,EAAE;IAAEC,QAAQ,EAAEC,qBAAQ,CAACC;EAAG,CAAC,CAAC;AACnE","ignoreList":[]}
@@ -33,8 +33,45 @@ Object.defineProperty(exports, "WeatherLayerManager", {
33
33
  return _WeatherLayerManager.WeatherLayerManager;
34
34
  }
35
35
  });
36
+ Object.defineProperty(exports, "aguaceroDebug", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _aguaceroRnDebug.aguaceroDebug;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "aguaceroDebugWarn", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _aguaceroRnDebug.aguaceroDebugWarn;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "configureAguaceroRnDebug", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _aguaceroRnDebug.configureAguaceroRnDebug;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "getAguaceroAuthDiagnosticSnapshot", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _aguaceroRnDebug.getAguaceroAuthDiagnosticSnapshot;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "isAguaceroRnDebugEnabled", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _aguaceroRnDebug.isAguaceroRnDebugEnabled;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "setAguaceroRnDebugEnabled", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _aguaceroRnDebug.setAguaceroRnDebugEnabled;
70
+ }
71
+ });
36
72
  var _MapManager = require("./MapManager");
37
73
  var _WeatherLayerManager = require("./WeatherLayerManager");
74
+ var _aguaceroRnDebug = require("./aguaceroRnDebug");
38
75
  var _GridRenderLayerNativeComponent = _interopRequireDefault(require("./GridRenderLayerNativeComponent"));
39
76
  var _nwsAndroidConstants = require("./nws/nwsAndroidConstants");
40
77
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1 +1 @@
1
- {"version":3,"names":["_MapManager","require","_WeatherLayerManager","_GridRenderLayerNativeComponent","_interopRequireDefault","_nwsAndroidConstants","e","__esModule","default"],"sourceRoot":"..\\..\\src","sources":["index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAGmC,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["_MapManager","require","_WeatherLayerManager","_aguaceroRnDebug","_GridRenderLayerNativeComponent","_interopRequireDefault","_nwsAndroidConstants","e","__esModule","default"],"sourceRoot":"..\\..\\src","sources":["index.js"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAQA,IAAAG,+BAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AAGmC,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -13,6 +13,7 @@ var _nexradCrossSectionSampleAtLatLonBundled = require("./nexradCrossSectionSamp
13
13
  var _nexradLutBuild = require("./nexradLutBuild.js");
14
14
  var _reactNative = require("react-native");
15
15
  var _nexradDiag = require("./nexradDiag.js");
16
+ var _aguaceroRnDebug = require("../aguaceroRnDebug");
16
17
  /**
17
18
  * AguaceroCore NEXRAD → Android native custom layer (parity with mapsgl {@link NexradWeatherController}).
18
19
  */
@@ -220,6 +221,11 @@ class NexradAndroidController {
220
221
  (0, _radarArchiveCoreBundled.setNexradSitesFetchAuth)(core.apiKey || '', core.bundleId || '');
221
222
  }
222
223
  (0, _radarArchiveCoreBundled.setNexradArchiveSiteOrigin)(core.gridRequestSiteOrigin || '');
224
+ if ((0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)()) {
225
+ (0, _aguaceroRnDebug.aguaceroDebug)('nexrad.authConfigured', (0, _aguaceroRnDebug.getAguaceroAuthDiagnosticSnapshot)(core, {
226
+ phase: 'NexradAndroidController.constructor'
227
+ }));
228
+ }
223
229
  }
224
230
  _trimNativeGpuReadyKeys(max) {
225
231
  while (this._nativeGpuReadyKeys.size > max) {
@@ -683,6 +689,13 @@ class NexradAndroidController {
683
689
  (0, _radarArchiveCoreBundled.setNexradArchiveBundleId)(this.core.bundleId || '');
684
690
  (0, _radarArchiveCoreBundled.setNexradArchiveSiteOrigin)(this.core.gridRequestSiteOrigin || '');
685
691
  (0, _radarArchiveCoreBundled.setNexradSitesFetchAuth)(this.core.apiKey || '', this.core.bundleId || '');
692
+ if ((0, _aguaceroRnDebug.isAguaceroRnDebugEnabled)()) {
693
+ (0, _aguaceroRnDebug.aguaceroDebug)('nexrad.authConfigured', (0, _aguaceroRnDebug.getAguaceroAuthDiagnosticSnapshot)(this.core, {
694
+ phase: 'NexradAndroidController.preload',
695
+ site: state.nexradSite,
696
+ product: state.nexradProduct
697
+ }));
698
+ }
686
699
  const snapshot = {
687
700
  ...state
688
701
  };