musora-content-services 1.0.250 → 1.0.252

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/.editorconfig ADDED
@@ -0,0 +1,19 @@
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
+
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.252](https://github.com/railroadmedia/musora-content-services/compare/v1.0.251...v1.0.252) (2024-12-19)
6
+
7
+ ### [1.0.251](https://github.com/railroadmedia/musora-content-services/compare/v1.0.250...v1.0.251) (2024-12-19)
8
+
5
9
  ### [1.0.250](https://github.com/railroadmedia/musora-content-services/compare/v1.0.249...v1.0.250) (2024-12-19)
6
10
 
7
11
  ### [1.0.249](https://github.com/railroadmedia/musora-content-services/compare/v1.0.247...v1.0.249) (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.250",
3
+ "version": "1.0.252",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -2,21 +2,21 @@
2
2
 
3
3
  // Metadata is taken from the 'common' element and then merged with the <brand> metadata.
4
4
  // Brand values are prioritized and will override the same property in the 'common' element.
5
- const commonMetadata ={
5
+ const commonMetadata = {
6
6
  'instructor': {
7
7
  name: 'Coaches',
8
- icon: 'icon-coach',
9
- allowableFilters: ['genre', 'focus'],
10
- sortBy: '-published_on',
8
+ icon: 'icon-coach',
9
+ allowableFilters: ['genre', 'focus'],
10
+ sortBy: '-published_on',
11
11
  },
12
12
  'challenge': {
13
13
  name: 'Challenges',
14
- icon: 'icon-courses',
15
- description: "... ",
16
- allowableFilters: ['difficulty', 'topic', 'genre'],
17
- sortBy: '-published_on',
18
- modalText: 'Challenges are a series of guided lessons designed to build your skills day-by-day.',
19
- tabs: [
14
+ icon: 'icon-courses',
15
+ description: "... ",
16
+ allowableFilters: ['difficulty', 'topic', 'genre'],
17
+ sortBy: '-published_on',
18
+ modalText: 'Challenges are a series of guided lessons designed to build your skills day-by-day.',
19
+ tabs: [
20
20
  {
21
21
  name: 'All',
22
22
  short_name: 'All',
@@ -48,10 +48,10 @@ const commonMetadata ={
48
48
  },
49
49
  'challenge-part': {
50
50
  name: 'Challenge Part',
51
- icon: 'icon-courses',
52
- description: "... ",
53
- allowableFilters: ['difficulty', 'genre', 'topic'],
54
- sortBy: '-published_on',
51
+ icon: 'icon-courses',
52
+ description: "... ",
53
+ allowableFilters: ['difficulty', 'genre', 'topic'],
54
+ sortBy: '-published_on',
55
55
  },
56
56
  'course': {
57
57
  name: "Courses",
@@ -82,10 +82,10 @@ const commonMetadata ={
82
82
  },
83
83
  'student-review': {
84
84
  name: "Student Reviews",
85
- icon: "icon-student-focus",
86
- allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'creativity', 'lifestyle'],
87
- sortBy: '-published_on',
88
- tabs: [
85
+ icon: "icon-student-focus",
86
+ allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'creativity', 'lifestyle'],
87
+ sortBy: '-published_on',
88
+ tabs: [
89
89
  {
90
90
  name: 'Lessons',
91
91
  short_name: 'LESSONS',
@@ -107,10 +107,10 @@ const commonMetadata ={
107
107
  },
108
108
  'song': {
109
109
  name: "Songs",
110
- icon: "icon-songs",
111
- description: "Play the songs you love with note-for-note transcriptions and handy practice tools.",
112
- allowableFilters: ['difficulty', 'genre', 'lifestyle', 'instrumentless'],
113
- tabs: [
110
+ icon: "icon-songs",
111
+ description: "Play the songs you love with note-for-note transcriptions and handy practice tools.",
112
+ allowableFilters: ['difficulty', 'genre', 'lifestyle', 'instrumentless'],
113
+ tabs: [
114
114
  {
115
115
  name: 'Songs',
116
116
  short_name: 'Songs',
@@ -132,11 +132,11 @@ const commonMetadata ={
132
132
  },
133
133
  'quick-tips': {
134
134
  name: 'Quick Tips',
135
- icon: 'icon-shows',
136
- description: "Only have 10 minutes? These short lessons are designed to inspire you with quick tips and exercises, even if you don’t have lots of time to practice.",
137
- allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'lifestyle', 'creativity'],
138
- sortBy: '-published_on',
139
- tabs: [
135
+ icon: 'icon-shows',
136
+ description: "Only have 10 minutes? These short lessons are designed to inspire you with quick tips and exercises, even if you don’t have lots of time to practice.",
137
+ allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'lifestyle', 'creativity'],
138
+ sortBy: '-published_on',
139
+ tabs: [
140
140
  {
141
141
  name: 'Lessons',
142
142
  short_name: 'LESSONS',
@@ -158,15 +158,16 @@ const commonMetadata ={
158
158
  },
159
159
  'question-and-answer': {
160
160
  name: 'Q&A',
161
- description: "Each week we go live to answer your questions. Submit your questions in advance using the button below, in the Q&A thread in the forums, or live in the community chat.",
162
- allowableFilters: ['difficulty', 'genre', 'essential', 'theory'],
163
- sortBy: '-published_on',
161
+ description: "Each week we go live to answer your questions. Submit your questions in advance using the button below, in the Q&A thread in the forums, or live in the community chat.",
162
+ allowableFilters: ['difficulty', 'genre', 'essential', 'theory'],
163
+ sortBy: '-published_on',
164
164
  },
165
165
  'recommendation': {
166
166
  tabs: [
167
- { name: 'All', is_group_by: true, value: ['group_by,Recommended']},
167
+ { name: 'All', is_group_by: true, value: ['group_by,Recommended'] },
168
168
  { name: 'Songs', value: ['filter,song'] },
169
- { name: 'Lessons', value: ['filter,lesson']},
169
+ { name: 'Lessons', value: ['filter,lesson'] },
170
+ { name: 'Workouts', value: ['filter,workout'] },
170
171
  ],
171
172
  },
172
173
  'workout': {
@@ -174,7 +175,7 @@ const commonMetadata ={
174
175
  shortname: 'Workouts',
175
176
  allowableFilters: ['difficulty', 'genre', 'topic'],
176
177
  tabs: [
177
- {
178
+ {
178
179
  name: 'All',
179
180
  short_name: 'ALL',
180
181
  value: '',
@@ -191,7 +192,7 @@ const commonMetadata ={
191
192
  short_name: '10 MINS',
192
193
  is_required_field: true,
193
194
  value: 'length_in_seconds,450-750',
194
- value_web: [
195
+ value_web: [
195
196
  "length_in_seconds > 451",
196
197
  "length_in_seconds < 751"
197
198
  ]
@@ -210,10 +211,10 @@ const commonMetadata ={
210
211
  value: 'instructor',
211
212
  },
212
213
  ],
213
- modalText: 'Workouts are fun play-along lessons that help hone your musical skills. They cover various topics, and have multiple difficulty and duration options — so there’s always a perfect Workout for you. Just pick one, press start, and play along!',
214
+ modalText: 'Workouts are fun play-along lessons that help hone your musical skills. They cover various topics, and have multiple difficulty and duration options — so there’s always a perfect Workout for you. Just pick one, press start, and play along!',
214
215
  },
215
- 'coach-lessons':{
216
- allowableFilters: ['difficulty', 'genre', 'essential','theory','lifestyle','type'],
216
+ 'coach-lessons': {
217
+ allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'lifestyle', 'type'],
217
218
  },
218
219
  'lesson-history': {
219
220
  name: 'Lesson History',
@@ -262,7 +263,7 @@ const contentMetadata = {
262
263
  'song': {
263
264
  sortBy: '-published_on',
264
265
  },
265
- 'student-review' : null,
266
+ 'student-review': null,
266
267
  'student-focus': {
267
268
  name: 'Student Focus',
268
269
  icon: 'icon-student-focus',
@@ -294,7 +295,7 @@ const contentMetadata = {
294
295
  icon: 'icon-drums',
295
296
  description: "The 40 drum rudiments are essential for any drummer, no matter the style, genre, or scenario. You can use the videos below to help you learn, practice, and perfect every single one.",
296
297
  allowableFilters: ['difficulty', 'genre', 'gear', 'topic'],
297
- tabs: [
298
+ tabs: [
298
299
  {
299
300
  name: 'All',
300
301
  short_name: 'ALL',
@@ -780,7 +781,7 @@ const contentMetadata = {
780
781
  sortBy: 'sort',
781
782
  },
782
783
  },
783
- 'pianote':{
784
+ 'pianote': {
784
785
  'instructor': {
785
786
  description: "Your piano journey is unique. You need personalized coaching that helps you reach your goals. Learn from some of the best pianists in the world!",
786
787
  },
@@ -1020,7 +1021,7 @@ const contentMetadata = {
1020
1021
  description: "Want feedback on your playing? Submit a video for student review. We will watch your submission and then provide helpful encouragement and feedback. This is a great way to build accountability and benefit from the expertise of our teachers.",
1021
1022
  },
1022
1023
  },
1023
- 'singeo':{
1024
+ 'singeo': {
1024
1025
  'instructor': {
1025
1026
  description: "Your singing journey is unique. You need personalized coaching that helps you reach your goals. Learn from some of the best singers and vocal coaches in the world!",
1026
1027
  },
@@ -1151,7 +1152,7 @@ const contentMetadata = {
1151
1152
  short_name: '10 MINS',
1152
1153
  is_required_field: true,
1153
1154
  value: 'length_in_seconds,450-750',
1154
- value_web: [
1155
+ value_web: [
1155
1156
  "length_in_seconds > 451",
1156
1157
  "length_in_seconds < 751"
1157
1158
  ]
@@ -1168,8 +1169,7 @@ const contentMetadata = {
1168
1169
  };
1169
1170
 
1170
1171
  const typeWithSortOrder = ['in-rhythm', 'diy-drum-experiments', 'rhythmic-adventures-of-captain-carson'];
1171
- function processMetadata(brand, type, withFilters = false)
1172
- {
1172
+ function processMetadata(brand, type, withFilters = false) {
1173
1173
  let brandMetaData = contentMetadata[brand]?.[type];
1174
1174
  // If the type is explicitly defined as null or the brand doesn't exist return null
1175
1175
  // Specifically this is for drumeo.student-review
@@ -1177,7 +1177,7 @@ function processMetadata(brand, type, withFilters = false)
1177
1177
  return null;
1178
1178
  }
1179
1179
  let commonMetaData = commonMetadata[type];
1180
- brandMetaData = {...commonMetaData, ...brandMetaData};
1180
+ brandMetaData = { ...commonMetaData, ...brandMetaData };
1181
1181
  if (Object.keys(brandMetaData).length === 0) {
1182
1182
  return null;
1183
1183
  }
@@ -1186,7 +1186,7 @@ function processMetadata(brand, type, withFilters = false)
1186
1186
  thumbnailUrl: brandMetaData.thumbnailUrl || null,
1187
1187
  name: brandMetaData.name || null,
1188
1188
  description: brandMetaData.description || null,
1189
- url: brandMetaData.url ? (brand + brandMetaData.url): (brand +'/'+ type)
1189
+ url: brandMetaData.url ? (brand + brandMetaData.url) : (brand + '/' + type)
1190
1190
  };
1191
1191
 
1192
1192
  if (withFilters) {
@@ -542,6 +542,8 @@ export async function fetchAll(brand, type, {
542
542
  if (type === 'archives') {
543
543
  typeFilter = `&& status == "archived"`;
544
544
  bypassStatusAndPublishedValidation = true;
545
+ } else if(type === 'pack'){
546
+ typeFilter = `&& (_type == 'pack' || _type == 'semester-pack')`;
545
547
  } else {
546
548
  typeFilter = type ? `&& _type == '${type}'` : "";
547
549
  }