@patch-adams/core 1.5.17 → 1.5.18
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 +16 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +16 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2272,17 +2272,27 @@ function generateLrsBridgeCode(options) {
|
|
|
2272
2272
|
function updateCourseInfoFromApi(docData) {
|
|
2273
2273
|
if (!docData || !LRS.courseInfo) return;
|
|
2274
2274
|
|
|
2275
|
-
// Document GUID
|
|
2276
|
-
|
|
2275
|
+
// Document GUID \u2014 Bravais API GUID ALWAYS overrides baked-in GUID.
|
|
2276
|
+
// The baked-in GUID is a random UUID from wrap time. The Bravais GUID is the
|
|
2277
|
+
// canonical document identifier that Analytics uses to link statements to documents.
|
|
2278
|
+
// Without this override, our statements have a different object.id than cloudplayer
|
|
2279
|
+
// statements, so Analytics treats them as unrelated to the document.
|
|
2280
|
+
if (docData.guid) {
|
|
2281
|
+
if (LRS.courseInfo.guid && LRS.courseInfo.guid !== docData.guid) {
|
|
2282
|
+
log('Overriding baked-in GUID with Bravais GUID:', LRS.courseInfo.guid, '->', docData.guid);
|
|
2283
|
+
}
|
|
2277
2284
|
LRS.courseInfo.guid = docData.guid;
|
|
2278
2285
|
LRS.courseInfo.id = 'http://xyleme.com/bravais/document/' + docData.guid;
|
|
2279
|
-
log('
|
|
2286
|
+
log('Document GUID from API:', docData.guid);
|
|
2280
2287
|
}
|
|
2281
2288
|
|
|
2282
|
-
// Version GUID
|
|
2283
|
-
if (docData.latestVersion && docData.latestVersion.guid
|
|
2289
|
+
// Version GUID \u2014 same principle: Bravais version GUID must override baked-in
|
|
2290
|
+
if (docData.latestVersion && docData.latestVersion.guid) {
|
|
2291
|
+
if (LRS.courseInfo.versionGuid && LRS.courseInfo.versionGuid !== docData.latestVersion.guid) {
|
|
2292
|
+
log('Overriding baked-in version GUID:', LRS.courseInfo.versionGuid, '->', docData.latestVersion.guid);
|
|
2293
|
+
}
|
|
2284
2294
|
LRS.courseInfo.versionGuid = docData.latestVersion.guid;
|
|
2285
|
-
log('
|
|
2295
|
+
log('Version GUID from API:', docData.latestVersion.guid);
|
|
2286
2296
|
}
|
|
2287
2297
|
|
|
2288
2298
|
// Other metadata
|