@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/cli.cjs
CHANGED
|
@@ -748,6 +748,12 @@ function generateLrsBridgeCode(options) {
|
|
|
748
748
|
'use strict';
|
|
749
749
|
|
|
750
750
|
var DEBUG = ${options.debug};
|
|
751
|
+
// Allow URL-based debug toggle: ?pa_debug=1 or #pa_debug
|
|
752
|
+
try {
|
|
753
|
+
if (window.location.search.indexOf('pa_debug') > -1 || window.location.hash.indexOf('pa_debug') > -1) {
|
|
754
|
+
DEBUG = true;
|
|
755
|
+
}
|
|
756
|
+
} catch (e) {}
|
|
751
757
|
var TRACK_MEDIA = ${options.trackMedia};
|
|
752
758
|
var TRACK_NAVIGATION = ${options.trackNavigation};
|
|
753
759
|
var TRACK_QUIZZES = ${options.trackQuizzes};
|
|
@@ -3119,6 +3125,17 @@ function generateLrsBridgeCode(options) {
|
|
|
3119
3125
|
function sendStatement(statement) {
|
|
3120
3126
|
log('Sending statement:', statement.verb.display['en-US'] || statement.verb.id, statement);
|
|
3121
3127
|
|
|
3128
|
+
// Log first statement visibly (not gated by DEBUG) for production diagnostics
|
|
3129
|
+
if (LRS.stats.statementsSent === 0 && LRS.stats.statementsFailed === 0 && LRS.stats.statementsQueued === 0) {
|
|
3130
|
+
if (window.console && window.console.info) {
|
|
3131
|
+
var verb = statement.verb.display ? (statement.verb.display['en-US'] || statement.verb.id) : statement.verb.id;
|
|
3132
|
+
console.info('[PA-LRS] First statement: verb=' + verb +
|
|
3133
|
+
', endpoint=' + (LRS_ENDPOINT || 'NONE') +
|
|
3134
|
+
', proxy=' + (LRS_PROXY_ENDPOINT ? 'yes' : 'no') +
|
|
3135
|
+
', mode=' + LRS.mode);
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3122
3139
|
// Store in event log
|
|
3123
3140
|
LRS.eventLog.push({
|
|
3124
3141
|
statement: statement,
|
|
@@ -4298,6 +4315,15 @@ function generateLrsBridgeCode(options) {
|
|
|
4298
4315
|
LRS.mode = 'offline';
|
|
4299
4316
|
}
|
|
4300
4317
|
|
|
4318
|
+
// Always-visible bridge summary (not gated by DEBUG)
|
|
4319
|
+
// This ensures diagnostics are available even in production builds
|
|
4320
|
+
if (window.console && window.console.info) {
|
|
4321
|
+
console.info('[PA-LRS] Bridge: mode=' + LRS.mode +
|
|
4322
|
+
', endpoint=' + (LRS_ENDPOINT ? LRS_ENDPOINT.substring(0, 30) + '...' : 'NONE') +
|
|
4323
|
+
', proxy=' + (LRS_PROXY_ENDPOINT ? 'yes' : 'no') +
|
|
4324
|
+
', actor=' + (LRS.actor ? (LRS.actor.name || 'anonymous') : 'none'));
|
|
4325
|
+
}
|
|
4326
|
+
|
|
4301
4327
|
// Set up event interceptors
|
|
4302
4328
|
setupMediaInterceptors();
|
|
4303
4329
|
setupNavigationInterceptors();
|