musora-content-services 2.62.0 → 2.62.1

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,13 @@
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
+ ### [2.62.1](https://github.com/railroadmedia/musora-content-services/compare/v2.62.0...v2.62.1) (2025-10-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * field in fetchAll ([#522](https://github.com/railroadmedia/musora-content-services/issues/522)) ([ff723fc](https://github.com/railroadmedia/musora-content-services/commit/ff723fcb5d1ba931eb5a2f3796bfe3cca6300ecd))
11
+
5
12
  ## [2.62.0](https://github.com/railroadmedia/musora-content-services/compare/v2.61.1...v2.62.0) (2025-10-30)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.62.0",
3
+ "version": "2.62.1",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -284,7 +284,7 @@ export let contentTypeConfig = {
284
284
  'song-tutorial': {
285
285
  fields: [
286
286
  '"lesson_count": child_count',
287
- `"lessons": child[]->{
287
+ `"children": child[]->{
288
288
  "id": railcontent_id,
289
289
  title,
290
290
  "image": thumbnail.asset->url,
@@ -663,7 +663,7 @@ export async function fetchAll(
663
663
  'head_shot_picture_url': thumbnail_url.asset->url,
664
664
  'web_url_path': '/${brand}/${webUrlPath}/'+name+'?included_fieds[]=type,${type}',
665
665
  'all_lessons_count': count(*[${lessonsFilterWithRestrictions}]._id),
666
- 'lessons': *[${lessonsFilterWithRestrictions}]{
666
+ 'children': *[${lessonsFilterWithRestrictions}]{
667
667
  ${fieldsString},
668
668
  ${groupBy}
669
669
  }[0...20]
@@ -683,7 +683,7 @@ export async function fetchAll(
683
683
  'head_shot_picture_url': thumbnail_url.asset->url,
684
684
  'web_url_path': select(defined(web_url_path)=> web_url_path +'?included_fieds[]=type,${type}',!defined(web_url_path)=> '/${brand}${webUrlPath}/'+name+'/${webUrlPathType}'),
685
685
  'all_lessons_count': count(*[${lessonsFilterWithRestrictions}]._id),
686
- 'lessons': *[${lessonsFilterWithRestrictions}]{
686
+ 'children': *[${lessonsFilterWithRestrictions}]{
687
687
  ${fieldsString},
688
688
  'lesson_count': coalesce(count(child[${childrenFilter}]->), 0) ,
689
689
  ${groupBy}
@@ -693,8 +693,8 @@ export async function fetchAll(
693
693
  filter = `brand == "${brand}" ${typeFilter} ${searchFilter} ${includedFieldsFilter} ${progressFilter} ${customFilter}`
694
694
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
695
695
  entityFieldsString = ` ${fieldsString},
696
- 'lesson_count': coalesce(count(child[${childrenFilter}]->), 0) ,
697
- 'length_in_seconds': coalesce(
696
+ 'lesson_count': coalesce(count(child[${childrenFilter}]->), 0) ,
697
+ 'length_in_seconds': coalesce(
698
698
  math::sum(
699
699
  select(
700
700
  child[${childrenFilter}]->length_in_seconds
@@ -749,7 +749,7 @@ async function getProgressFilter(progress, progressIds) {
749
749
 
750
750
  export function getSortOrder(sort = '-published_on', brand, groupBy) {
751
751
  const sanitizedSort = sort?.trim() || '-published_on'
752
- const isDesc = sanitizedSort.startsWith('-')
752
+ let isDesc = sanitizedSort.startsWith('-')
753
753
  const sortField = isDesc ? sanitizedSort.substring(1) : sanitizedSort
754
754
 
755
755
  let sortOrder = ''
@@ -1,8 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(rg:*)"
5
- ],
6
- "deny": []
7
- }
8
- }