@patch-adams/core 1.4.18 → 1.4.19
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/cli.cjs +26 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -414,6 +414,12 @@ function generateLrsBridgeCode(options) {
|
|
|
414
414
|
'use strict';
|
|
415
415
|
|
|
416
416
|
var DEBUG = ${options.debug};
|
|
417
|
+
// Allow URL-based debug toggle: ?pa_debug=1 or #pa_debug
|
|
418
|
+
try {
|
|
419
|
+
if (window.location.search.indexOf('pa_debug') > -1 || window.location.hash.indexOf('pa_debug') > -1) {
|
|
420
|
+
DEBUG = true;
|
|
421
|
+
}
|
|
422
|
+
} catch (e) {}
|
|
417
423
|
var TRACK_MEDIA = ${options.trackMedia};
|
|
418
424
|
var TRACK_NAVIGATION = ${options.trackNavigation};
|
|
419
425
|
var TRACK_QUIZZES = ${options.trackQuizzes};
|
|
@@ -2785,6 +2791,17 @@ function generateLrsBridgeCode(options) {
|
|
|
2785
2791
|
function sendStatement(statement) {
|
|
2786
2792
|
log('Sending statement:', statement.verb.display['en-US'] || statement.verb.id, statement);
|
|
2787
2793
|
|
|
2794
|
+
// Log first statement visibly (not gated by DEBUG) for production diagnostics
|
|
2795
|
+
if (LRS.stats.statementsSent === 0 && LRS.stats.statementsFailed === 0 && LRS.stats.statementsQueued === 0) {
|
|
2796
|
+
if (window.console && window.console.info) {
|
|
2797
|
+
var verb = statement.verb.display ? (statement.verb.display['en-US'] || statement.verb.id) : statement.verb.id;
|
|
2798
|
+
console.info('[PA-LRS] First statement: verb=' + verb +
|
|
2799
|
+
', endpoint=' + (LRS_ENDPOINT || 'NONE') +
|
|
2800
|
+
', proxy=' + (LRS_PROXY_ENDPOINT ? 'yes' : 'no') +
|
|
2801
|
+
', mode=' + LRS.mode);
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2788
2805
|
// Store in event log
|
|
2789
2806
|
LRS.eventLog.push({
|
|
2790
2807
|
statement: statement,
|
|
@@ -3964,6 +3981,15 @@ function generateLrsBridgeCode(options) {
|
|
|
3964
3981
|
LRS.mode = 'offline';
|
|
3965
3982
|
}
|
|
3966
3983
|
|
|
3984
|
+
// Always-visible bridge summary (not gated by DEBUG)
|
|
3985
|
+
// This ensures diagnostics are available even in production builds
|
|
3986
|
+
if (window.console && window.console.info) {
|
|
3987
|
+
console.info('[PA-LRS] Bridge: mode=' + LRS.mode +
|
|
3988
|
+
', endpoint=' + (LRS_ENDPOINT ? LRS_ENDPOINT.substring(0, 30) + '...' : 'NONE') +
|
|
3989
|
+
', proxy=' + (LRS_PROXY_ENDPOINT ? 'yes' : 'no') +
|
|
3990
|
+
', actor=' + (LRS.actor ? (LRS.actor.name || 'anonymous') : 'none'));
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3967
3993
|
// Set up event interceptors
|
|
3968
3994
|
setupMediaInterceptors();
|
|
3969
3995
|
setupNavigationInterceptors();
|