musora-content-services 1.0.252 → 1.0.253

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
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.253](https://github.com/railroadmedia/musora-content-services/compare/v1.0.252...v1.0.253) (2024-12-20)
6
+
5
7
  ### [1.0.252](https://github.com/railroadmedia/musora-content-services/compare/v1.0.251...v1.0.252) (2024-12-19)
6
8
 
7
9
  ### [1.0.251](https://github.com/railroadmedia/musora-content-services/compare/v1.0.250...v1.0.251) (2024-12-19)
package/link_mcs.sh CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.252",
3
+ "version": "1.0.253",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -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
- '"resources": resource',
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
- 'resource',
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
- 'resource',
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": resource,
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
- 'resource',
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
- 'resource',
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
- '"resources": resource',
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
- '"resources": resource',
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
- 'resource',
337
+ `"resource": ${resourcesField}`,
337
338
  'xp',
338
339
  'total_xp',
339
340
  `"lessons": child[]->{
@@ -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,
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
-