musora-content-services 1.0.234 → 1.0.236
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/.github/workflows/node.js.yml +0 -0
- package/CHANGELOG.md +4 -0
- package/README.md +0 -0
- package/babel.config.js +0 -0
- package/docs/config.js.html +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +0 -0
- package/docs/module-Config.html +0 -0
- package/docs/module-Railcontent-Services.html +0 -0
- package/docs/module-Sanity-Services.html +0 -0
- package/docs/railcontent.js.html +0 -0
- package/docs/sanity.js.html +0 -0
- package/docs/scripts/collapse.js +0 -0
- package/docs/scripts/commonNav.js +0 -0
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/nav.js +0 -0
- package/docs/scripts/polyfill.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/styles/jsdoc.css +0 -0
- package/docs/styles/prettify.css +0 -0
- package/jest.config.js +0 -0
- package/jsdoc.json +0 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +0 -0
- package/src/services/config.js +0 -0
- package/src/services/contentLikes.js +0 -0
- package/src/services/contentProgress.js +1 -1
- package/src/services/dataContext.js +0 -0
- package/src/services/lastUpdated.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/sanity.js +4 -3
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.test.js +10 -0
- package/test/initializeTests.js +0 -0
- package/test/lastUpdated.test.js +0 -0
- package/test/live/contentProgressLive.test.js +0 -0
- package/test/live/railcontentLive.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/userPermissions.test.js +0 -0
- package/tools/generate-index.js +0 -0
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.236](https://github.com/railroadmedia/musora-content-services/compare/v1.0.235...v1.0.236) (2024-12-13)
|
|
6
|
+
|
|
7
|
+
### [1.0.235](https://github.com/railroadmedia/musora-content-services/compare/v1.0.234...v1.0.235) (2024-12-13)
|
|
8
|
+
|
|
5
9
|
### [1.0.234](https://github.com/railroadmedia/musora-content-services/compare/v1.0.233...v1.0.234) (2024-12-13)
|
|
6
10
|
|
|
7
11
|
### [1.0.233](https://github.com/railroadmedia/musora-content-services/compare/v1.0.218...v1.0.233) (2024-12-12)
|
package/README.md
CHANGED
|
File without changes
|
package/babel.config.js
CHANGED
|
File without changes
|
package/docs/config.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/index.html
CHANGED
|
File without changes
|
package/docs/module-Config.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/railcontent.js.html
CHANGED
|
File without changes
|
package/docs/sanity.js.html
CHANGED
|
File without changes
|
package/docs/scripts/collapse.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/nav.js
CHANGED
|
File without changes
|
package/docs/scripts/polyfill.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/search.js
CHANGED
|
File without changes
|
package/docs/styles/jsdoc.css
CHANGED
|
File without changes
|
package/docs/styles/prettify.css
CHANGED
|
File without changes
|
package/jest.config.js
CHANGED
|
File without changes
|
package/jsdoc.json
CHANGED
|
File without changes
|
package/link_mcs.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
File without changes
|
package/src/filterBuilder.js
CHANGED
|
File without changes
|
package/src/index.d.ts
CHANGED
|
File without changes
|
package/src/index.js
CHANGED
|
File without changes
|
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -230,7 +230,7 @@ export async function recordWatchSession(contentId, mediaType, mediaCategory, me
|
|
|
230
230
|
if (mediaLengthSeconds <= 0) {
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
|
-
let progress = Math.min(99, Math.round(currentSeconds ?? 0 / Math.max(1, mediaLengthSeconds ?? 0) * 100));
|
|
233
|
+
let progress = Math.min(99, Math.round((currentSeconds ?? 0) / Math.max(1, mediaLengthSeconds ?? 0) * 100));
|
|
234
234
|
let hierarchy = await fetchHierarchy(contentId);
|
|
235
235
|
saveContentProgress(localContext, contentId, progress, currentSeconds, hierarchy);
|
|
236
236
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/sanity.js
CHANGED
|
@@ -518,12 +518,13 @@ export async function fetchAll(brand, type, {
|
|
|
518
518
|
const start = (page - 1) * limit;
|
|
519
519
|
const end = start + limit;
|
|
520
520
|
let bypassStatusAndPublishedValidation = (type == 'instructor' || groupBy == 'artist' || groupBy == 'genre' || groupBy == 'instructor');
|
|
521
|
-
|
|
521
|
+
let bypassPermissions = bypassStatusAndPublishedValidation;
|
|
522
522
|
// Construct the type filter
|
|
523
523
|
let typeFilter;
|
|
524
524
|
|
|
525
525
|
if( type === 'archives' ) {
|
|
526
|
-
typeFilter = `&& status == "archived"
|
|
526
|
+
typeFilter = `&& status == "archived"`;
|
|
527
|
+
bypassStatusAndPublishedValidation = true;
|
|
527
528
|
} else {
|
|
528
529
|
typeFilter = type ? `&& _type == '${type}'` : "";
|
|
529
530
|
}
|
|
@@ -598,7 +599,7 @@ export async function fetchAll(brand, type, {
|
|
|
598
599
|
|
|
599
600
|
const filterWithRestrictions = await new FilterBuilder(filter, {
|
|
600
601
|
bypassStatuses: bypassStatusAndPublishedValidation,
|
|
601
|
-
bypassPermissions:
|
|
602
|
+
bypassPermissions: bypassPermissions,
|
|
602
603
|
bypassPublishedDateRestriction: bypassStatusAndPublishedValidation
|
|
603
604
|
}).buildFilter();
|
|
604
605
|
query = buildEntityAndTotalQuery(
|
|
File without changes
|
|
File without changes
|
|
@@ -155,6 +155,16 @@ describe('contentProgressDataContext', function () {
|
|
|
155
155
|
expect(state).toBe("started");
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
+
|
|
159
|
+
// test('recordWatchSession', async () => {
|
|
160
|
+
// const contentId = 241250;
|
|
161
|
+
// let progress = await getProgressPercentage(contentId); //force load context
|
|
162
|
+
//
|
|
163
|
+
// await recordWatchSession(contentId, 'video', 'vimeo', 1673, 554, 5);
|
|
164
|
+
// progress = await getProgressPercentage(241250);
|
|
165
|
+
//
|
|
166
|
+
// expect(progress).toBe(33);
|
|
167
|
+
// });
|
|
158
168
|
// test('assignmentCompleteBubblingToCompleted', async () => {
|
|
159
169
|
// let assignmentId = 241685;
|
|
160
170
|
// let contentId = 241257;
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
package/test/lastUpdated.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.js
CHANGED
|
File without changes
|
|
File without changes
|
package/tools/generate-index.js
CHANGED
|
File without changes
|