musora-content-services 1.0.252 → 1.0.254
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/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/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/contentTypeConfig.js +10 -9
- package/src/services/contentLikes.js +0 -0
- package/src/services/lastUpdated.js +0 -0
- package/src/services/railcontent.js +4 -0
- package/src/services/sanity.js +5 -1
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -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
- package/.editorconfig +0 -19
|
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.254](https://github.com/railroadmedia/musora-content-services/compare/v1.0.253...v1.0.254) (2024-12-20)
|
|
6
|
+
|
|
7
|
+
### [1.0.253](https://github.com/railroadmedia/musora-content-services/compare/v1.0.252...v1.0.253) (2024-12-20)
|
|
8
|
+
|
|
5
9
|
### [1.0.252](https://github.com/railroadmedia/musora-content-services/compare/v1.0.251...v1.0.252) (2024-12-19)
|
|
6
10
|
|
|
7
11
|
### [1.0.251](https://github.com/railroadmedia/musora-content-services/compare/v1.0.250...v1.0.251) (2024-12-19)
|
package/README.md
CHANGED
|
File without changes
|
package/babel.config.js
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/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/contentTypeConfig.js
CHANGED
|
@@ -24,6 +24,7 @@ const DEFAULT_FIELDS = [
|
|
|
24
24
|
];
|
|
25
25
|
|
|
26
26
|
const descriptionField = 'description[0].children[0].text';
|
|
27
|
+
const resourcesField = 'resource[]{resource_name, _key, "resource_url": coalesce(\'https://d3fzm1tzeyr5n3.cloudfront.net\'+string::split(resource_aws.asset->fileURL,\'https://s3.us-east-1.amazonaws.com/musora-web-platform\')[1], resource_url )}';
|
|
27
28
|
|
|
28
29
|
const assignmentsField = `"assignments":assignment[]{
|
|
29
30
|
"id": railcontent_id,
|
|
@@ -63,7 +64,7 @@ let contentTypeConfig = {
|
|
|
63
64
|
'album',
|
|
64
65
|
'soundslice',
|
|
65
66
|
'instrumentless',
|
|
66
|
-
|
|
67
|
+
`"resources": ${resourcesField}`,
|
|
67
68
|
],
|
|
68
69
|
'relationships': {
|
|
69
70
|
'artist': {
|
|
@@ -130,7 +131,7 @@ let contentTypeConfig = {
|
|
|
130
131
|
'"lesson_count": child_count',
|
|
131
132
|
'"instructors": instructor[]->name',
|
|
132
133
|
`"description": ${descriptionField}`,
|
|
133
|
-
|
|
134
|
+
`"resource": ${resourcesField}`,
|
|
134
135
|
'xp',
|
|
135
136
|
'total_xp',
|
|
136
137
|
`"lessons": child[]->{
|
|
@@ -148,7 +149,7 @@ let contentTypeConfig = {
|
|
|
148
149
|
'"lesson_count": child_count',
|
|
149
150
|
'"instructors": instructor[]->name',
|
|
150
151
|
`"description": ${descriptionField}`,
|
|
151
|
-
|
|
152
|
+
`"resource": ${resourcesField}`,
|
|
152
153
|
'xp',
|
|
153
154
|
'total_xp',
|
|
154
155
|
'"thumbnail_url":thumbnail.asset->url',
|
|
@@ -160,7 +161,7 @@ let contentTypeConfig = {
|
|
|
160
161
|
"image": thumbnail.asset->url,
|
|
161
162
|
"instructors": instructor[]->name,
|
|
162
163
|
length_in_seconds,
|
|
163
|
-
"resources":
|
|
164
|
+
"resources": ${resourcesField},
|
|
164
165
|
difficulty,
|
|
165
166
|
difficulty_string,
|
|
166
167
|
artist->,
|
|
@@ -211,7 +212,7 @@ let contentTypeConfig = {
|
|
|
211
212
|
'"lesson_count": child_count',
|
|
212
213
|
'"instructors": instructor[]->name',
|
|
213
214
|
`"description": ${descriptionField}`,
|
|
214
|
-
|
|
215
|
+
`"resource": ${resourcesField}`,
|
|
215
216
|
'xp',
|
|
216
217
|
'total_xp',
|
|
217
218
|
`"lessons": child[]->{
|
|
@@ -228,7 +229,7 @@ let contentTypeConfig = {
|
|
|
228
229
|
'"lesson_count": child_count',
|
|
229
230
|
'"instructors": instructor[]->name',
|
|
230
231
|
`"description": ${descriptionField}`,
|
|
231
|
-
|
|
232
|
+
`"resource": ${resourcesField}`,
|
|
232
233
|
'xp',
|
|
233
234
|
'total_xp',
|
|
234
235
|
`"lessons": child[]->{
|
|
@@ -270,7 +271,7 @@ let contentTypeConfig = {
|
|
|
270
271
|
"lesson_count": child_count,
|
|
271
272
|
${getFieldsForContentType()}
|
|
272
273
|
}`,
|
|
273
|
-
|
|
274
|
+
`"resources": ${resourcesField}`,
|
|
274
275
|
'"thumbnail": thumbnail.asset->url',
|
|
275
276
|
'"light_logo": light_mode_logo_url.asset->url',
|
|
276
277
|
'"dark_logo": dark_mode_logo_url.asset->url',
|
|
@@ -298,7 +299,7 @@ let contentTypeConfig = {
|
|
|
298
299
|
"description": ${descriptionField},
|
|
299
300
|
${getFieldsForContentType()}
|
|
300
301
|
}`,
|
|
301
|
-
|
|
302
|
+
`"resources": ${resourcesField}`,
|
|
302
303
|
'"image": logo_image_url.asset->url',
|
|
303
304
|
'"thumbnail": thumbnail.asset->url',
|
|
304
305
|
'"light_logo": light_mode_logo_url.asset->url',
|
|
@@ -333,7 +334,7 @@ let contentTypeConfig = {
|
|
|
333
334
|
'"lesson_count": child_count',
|
|
334
335
|
'"instructors": instructor[]->name',
|
|
335
336
|
`"description": ${descriptionField}`,
|
|
336
|
-
|
|
337
|
+
`"resource": ${resourcesField}`,
|
|
337
338
|
'xp',
|
|
338
339
|
'total_xp',
|
|
339
340
|
`"lessons": child[]->{
|
|
File without changes
|
|
File without changes
|
|
@@ -1168,6 +1168,10 @@ export async function playback(playlistId) {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
|
|
1170
1170
|
function fetchAbsolute(url, params) {
|
|
1171
|
+
if (globalConfig.railcontentConfig.authToken) {
|
|
1172
|
+
params.headers['Authorization'] = `Bearer ${globalConfig.railcontentConfig.authToken}`;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1171
1175
|
if (globalConfig.railcontentConfig.baseUrl) {
|
|
1172
1176
|
if (url.startsWith('/')) {
|
|
1173
1177
|
return fetch(globalConfig.railcontentConfig.baseUrl + url, params)
|
package/src/services/sanity.js
CHANGED
|
@@ -1161,7 +1161,11 @@ export async function fetchLessonContent(railContentId) {
|
|
|
1161
1161
|
const fields = `title,
|
|
1162
1162
|
published_on,
|
|
1163
1163
|
"type":_type,
|
|
1164
|
-
"resources": resource,
|
|
1164
|
+
"resources": resource[]{resource_name, _key,
|
|
1165
|
+
"resource_url": coalesce(
|
|
1166
|
+
'https://d3fzm1tzeyr5n3.cloudfront.net'+string::split(resource_aws.asset->fileURL,'https://s3.us-east-1.amazonaws.com/musora-web-platform')[1],
|
|
1167
|
+
resource_url
|
|
1168
|
+
)},
|
|
1165
1169
|
difficulty,
|
|
1166
1170
|
difficulty_string,
|
|
1167
1171
|
brand,
|
|
File without changes
|
|
File without changes
|
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
|
package/.editorconfig
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
charset = utf-8
|
|
5
|
-
end_of_line = lf
|
|
6
|
-
insert_final_newline = true
|
|
7
|
-
indent_style = space
|
|
8
|
-
indent_size = 4
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.md]
|
|
12
|
-
trim_trailing_whitespace = false
|
|
13
|
-
|
|
14
|
-
[*.{yml,yaml}]
|
|
15
|
-
indent_size = 2
|
|
16
|
-
|
|
17
|
-
[docker-compose.yml]
|
|
18
|
-
indent_size = 4
|
|
19
|
-
|