musora-content-services 1.3.1 → 1.3.2
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/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/.yarnrc.yml +1 -0
- package/CHANGELOG.md +2 -0
- package/babel.config.cjs +0 -0
- package/docs/config.js.html +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/jest.config.js +0 -0
- package/jsdoc.json +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 +0 -0
- 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 +10 -2
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.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/sanityQueryService.test.js +1 -1
- package/test/userPermissions.test.js +0 -0
- package/tools/generate-index.cjs +0 -0
package/.prettierignore
CHANGED
|
File without changes
|
package/.prettierrc
CHANGED
|
File without changes
|
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
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.3.2](https://github.com/railroadmedia/musora-content-services/compare/v1.3.1...v1.3.2) (2025-01-30)
|
|
6
|
+
|
|
5
7
|
### [1.3.1](https://github.com/railroadmedia/musora-content-services/compare/v1.3.0...v1.3.1) (2025-01-29)
|
|
6
8
|
|
|
7
9
|
## [1.3.0](https://github.com/railroadmedia/musora-content-services/compare/v1.2.5...v1.3.0) (2025-01-29)
|
package/babel.config.cjs
CHANGED
|
File without changes
|
package/docs/config.js.html
CHANGED
|
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/jest.config.js
CHANGED
|
File without changes
|
package/jsdoc.json
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/sanity.js
CHANGED
|
@@ -84,7 +84,7 @@ export async function fetchArtists(brand) {
|
|
|
84
84
|
*[_type == "artist"]{
|
|
85
85
|
name,
|
|
86
86
|
"lessonsCount": count(*[${filter}])
|
|
87
|
-
}[lessonsCount > 0]`
|
|
87
|
+
}[lessonsCount > 0] |order(lower(name)) `
|
|
88
88
|
return fetchSanity(query, true, { processNeedAccess: false })
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -94,7 +94,15 @@ export async function fetchArtists(brand) {
|
|
|
94
94
|
* @returns {Promise<int|null>} - The fetched count of artists.
|
|
95
95
|
*/
|
|
96
96
|
export async function fetchSongArtistCount(brand) {
|
|
97
|
-
const
|
|
97
|
+
const filter = await new FilterBuilder(
|
|
98
|
+
`_type == "song" && brand == "${brand}" && references(^._id)`,
|
|
99
|
+
{ bypassPermissions: true }
|
|
100
|
+
).buildFilter()
|
|
101
|
+
const query = `
|
|
102
|
+
count(*[_type == "artist"]{
|
|
103
|
+
name,
|
|
104
|
+
"lessonsCount": count(*[${filter}])
|
|
105
|
+
}[lessonsCount > 0])`
|
|
98
106
|
return fetchSanity(query, true, { processNeedAccess: false })
|
|
99
107
|
}
|
|
100
108
|
|
|
File without changes
|
|
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
|
|
@@ -65,7 +65,7 @@ describe('Sanity Queries', function () {
|
|
|
65
65
|
test('fetchSongArtistCount', async () => {
|
|
66
66
|
const response = await fetchSongArtistCount('drumeo')
|
|
67
67
|
log(response)
|
|
68
|
-
expect(response).toBeGreaterThan(
|
|
68
|
+
expect(response).toBeGreaterThan(700)
|
|
69
69
|
}, 10000)
|
|
70
70
|
|
|
71
71
|
test('fetchSanity-WithPostProcess', async () => {
|
|
File without changes
|
package/tools/generate-index.cjs
CHANGED
|
File without changes
|