musora-content-services 2.128.0 → 2.129.0

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.
Files changed (46) hide show
  1. package/.coderabbit.yaml +0 -0
  2. package/.editorconfig +0 -0
  3. package/.github/pull_request_template.md +0 -0
  4. package/.github/workflows/conventional-commits.yaml +0 -0
  5. package/.github/workflows/node.js.yml +0 -0
  6. package/.prettierignore +0 -0
  7. package/.prettierrc +0 -0
  8. package/CHANGELOG.md +8 -0
  9. package/jest.config.js +0 -0
  10. package/package.json +1 -1
  11. package/src/filterBuilder.js +3 -3
  12. package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
  13. package/src/infrastructure/http/index.ts +0 -0
  14. package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
  15. package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
  16. package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
  17. package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
  18. package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
  19. package/src/services/api/types.js +0 -0
  20. package/src/services/api/types.ts +0 -0
  21. package/src/services/content-org/content-org.js +0 -0
  22. package/src/services/content-org/playlists-types.js +0 -0
  23. package/src/services/eventsAPI.js +0 -0
  24. package/src/services/gamification/gamification.js +0 -0
  25. package/src/services/imageSRCBuilder.js +0 -0
  26. package/src/services/imageSRCVerify.js +0 -0
  27. package/src/services/permissions/PermissionsV2Adapter.ts +9 -11
  28. package/src/services/user/user-management-system.js +0 -0
  29. package/test/contentLikes.test.js +0 -0
  30. package/test/dataContext.test.js +0 -0
  31. package/test/imageSRCBuilder.test.js +0 -0
  32. package/test/imageSRCVerify.test.js +0 -0
  33. package/test/lib/lastUpdated.test.js +0 -0
  34. package/test/live/railcontentLive.test.js +0 -0
  35. package/test/localStorageMock.js +0 -0
  36. package/test/log.js +0 -0
  37. package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
  38. package/test/mockData/mockData_progress_content.json +0 -0
  39. package/test/mockData/mockData_sanity_progress_content.json +0 -0
  40. package/test/mockData/mockData_user_practices.json +0 -0
  41. package/test/notifications.test.js +0 -0
  42. package/test/progressRows.test.js +0 -0
  43. package/test/streakMessage.test.js +0 -0
  44. package/test/user/permissions.test.js +0 -0
  45. package/test/userActivity.test.js +0 -0
  46. package/.claude/settings.local.json +0 -9
package/.coderabbit.yaml CHANGED
File without changes
package/.editorconfig CHANGED
File without changes
File without changes
File without changes
File without changes
package/.prettierignore CHANGED
File without changes
package/.prettierrc CHANGED
File without changes
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
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.129.0](https://github.com/railroadmedia/musora-content-services/compare/v2.126.0...v2.129.0) (2026-02-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * allows LP cards through on Your Progress section ([#745](https://github.com/railroadmedia/musora-content-services/issues/745)) ([5ed313a](https://github.com/railroadmedia/musora-content-services/commit/5ed313ac1db434856a2cd189793fa1137d18d384))
11
+ * **BEH-1514:** badge rear ([#756](https://github.com/railroadmedia/musora-content-services/issues/756)) ([201ccea](https://github.com/railroadmedia/musora-content-services/commit/201cceaced4607e085b6504761bc376deaee8f0b))
12
+
5
13
  ## [2.128.0](https://github.com/railroadmedia/musora-content-services/compare/v2.127.0...v2.128.0) (2026-01-31)
6
14
 
7
15
 
package/jest.config.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.128.0",
3
+ "version": "2.129.0",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -58,7 +58,7 @@ export class FilterBuilder {
58
58
  }
59
59
 
60
60
  async buildFilter() {
61
- if (this.bypassPermissions) {
61
+ if (this.bypassPermissions && !this.showOnlyOwnedContent) {
62
62
  this.userData = { permissions: [], isAdmin: false }
63
63
  } else {
64
64
  const adapter = getPermissionsAdapter()
@@ -134,10 +134,10 @@ export class FilterBuilder {
134
134
  }
135
135
 
136
136
  _applyPermissions() {
137
- if (this.bypassPermissions) return this
137
+ if (this.bypassPermissions && !this.showOnlyOwnedContent) return this
138
138
  const adapter = getPermissionsAdapter()
139
139
  // Check if admin (admins bypass permissions)
140
- if (adapter.isAdmin(this.userData)) return this
140
+ if (adapter.isAdmin(this.userData) && !this.showOnlyOwnedContent) return this
141
141
 
142
142
  // Generate permissions filter using adapter
143
143
  const permissionsFilter = adapter.generatePermissionsFilter(this.userData, {
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
@@ -98,29 +98,27 @@ export class PermissionsV2Adapter extends PermissionsAdapter {
98
98
  showOnlyOwnedContent = false,
99
99
  } = options
100
100
 
101
- // Admins bypass permission filter
102
- if (this.isAdmin(userPermissions)) {
103
- return null
104
- }
105
-
106
101
  // If showOnlyOwnedContent, show only purchased/owned content
107
102
  if (showOnlyOwnedContent) {
108
103
  return this.buildOwnedContentFilter(userPermissions)
109
104
  }
110
105
 
111
- let userPermissionIds = this.getUserPermissionIds(userPermissions)
112
- const isDereferencedContext = prefix === '@->'
113
-
114
- // If showing membership restricted content
115
- if (showMembershipRestrictedContent) {
116
- return ` ${prefix}membership_tier in ${arrayToStringRepresentation([plusMembershipTier, basicMembershipTier])} `
106
+ // Admins bypass permission filter
107
+ if (this.isAdmin(userPermissions)) {
108
+ return null
117
109
  }
118
110
 
111
+ let userPermissionIds = this.getUserPermissionIds(userPermissions)
112
+ const isDereferencedContext = prefix === '@->'
119
113
  const filter = this.buildStandardPermissionFilter(
120
114
  userPermissionIds,
121
115
  prefix,
122
116
  isDereferencedContext
123
117
  )
118
+ // If showing membership restricted content
119
+ if (showMembershipRestrictedContent) {
120
+ return ` (${prefix}membership_tier in ${arrayToStringRepresentation([plusMembershipTier, basicMembershipTier])} || ${filter} )`
121
+ }
124
122
 
125
123
  return filter
126
124
  }
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/test/log.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
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(rg:*)",
5
- "Bash(npm run lint:*)"
6
- ],
7
- "deny": []
8
- }
9
- }