musora-content-services 1.2.5 → 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.
Files changed (40) hide show
  1. package/.prettierignore +5 -0
  2. package/.prettierrc +8 -0
  3. package/.yarnrc.yml +1 -0
  4. package/CHANGELOG.md +11 -0
  5. package/README.md +0 -0
  6. package/babel.config.cjs +1 -1
  7. package/docs/config.js.html +0 -0
  8. package/docs/index.html +0 -0
  9. package/docs/module-Config.html +0 -0
  10. package/docs/module-Railcontent-Services.html +0 -0
  11. package/docs/module-Sanity-Services.html +0 -0
  12. package/docs/railcontent.js.html +0 -0
  13. package/docs/sanity.js.html +0 -0
  14. package/jest.config.js +9 -10
  15. package/jsdoc.json +17 -12
  16. package/package.json +2 -1
  17. package/src/contentMetaData.js +1190 -1131
  18. package/src/contentTypeConfig.js +492 -387
  19. package/src/filterBuilder.js +163 -145
  20. package/src/index.d.ts +227 -237
  21. package/src/index.js +226 -236
  22. package/src/services/config.js +12 -12
  23. package/src/services/contentLikes.js +33 -32
  24. package/src/services/contentProgress.js +233 -200
  25. package/src/services/dataContext.js +99 -93
  26. package/src/services/lastUpdated.js +7 -7
  27. package/src/services/railcontent.js +368 -364
  28. package/src/services/sanity.js +983 -955
  29. package/src/services/userPermissions.js +12 -14
  30. package/test/contentLikes.test.js +89 -86
  31. package/test/contentProgress.test.js +229 -236
  32. package/test/initializeTests.js +54 -51
  33. package/test/lastUpdated.test.js +20 -18
  34. package/test/live/contentProgressLive.test.js +135 -137
  35. package/test/live/railcontentLive.test.js +12 -14
  36. package/test/localStorageMock.js +16 -16
  37. package/test/log.js +5 -5
  38. package/test/sanityQueryService.test.js +857 -821
  39. package/test/userPermissions.test.js +15 -15
  40. package/tools/generate-index.cjs +108 -111
@@ -0,0 +1,5 @@
1
+ docs
2
+ .github
3
+ **/*.md
4
+ **/*.yaml
5
+ **/*.yml
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "trailingComma": "es5",
3
+ "tabWidth": 2,
4
+ "semi": false,
5
+ "singleQuote": true,
6
+ "printWidth": 100,
7
+ "bracketSpacing": true
8
+ }
package/.yarnrc.yml ADDED
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
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
+
7
+ ### [1.3.1](https://github.com/railroadmedia/musora-content-services/compare/v1.3.0...v1.3.1) (2025-01-29)
8
+
9
+ ## [1.3.0](https://github.com/railroadmedia/musora-content-services/compare/v1.2.5...v1.3.0) (2025-01-29)
10
+
11
+
12
+ ### Features
13
+
14
+ * implement prettier ([91a9b8d](https://github.com/railroadmedia/musora-content-services/commit/91a9b8d6af3b844821e408caeb9192c94d1bea91))
15
+
5
16
  ### [1.2.5](https://github.com/railroadmedia/musora-content-services/compare/v1.2.4...v1.2.5) (2025-01-27)
6
17
 
7
18
  ### [1.2.4](https://github.com/railroadmedia/musora-content-services/compare/v1.2.3...v1.2.4) (2025-01-20)
package/README.md CHANGED
File without changes
package/babel.config.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- presets: ['@babel/preset-env']
2
+ presets: ['@babel/preset-env'],
3
3
  }
File without changes
package/docs/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/jest.config.js CHANGED
@@ -24,7 +24,7 @@ export default {
24
24
  // collectCoverageFrom: undefined,
25
25
 
26
26
  // The directory where Jest should output its coverage files
27
- coverageDirectory: "coverage",
27
+ coverageDirectory: 'coverage',
28
28
 
29
29
  // An array of regexp pattern strings used to skip coverage collection
30
30
  // coveragePathIgnorePatterns: [
@@ -92,7 +92,7 @@ export default {
92
92
  // moduleNameMapper: {},
93
93
 
94
94
  // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
95
- modulePathIgnorePatterns: ["<rootDir>/test/live"],
95
+ modulePathIgnorePatterns: ['<rootDir>/test/live'],
96
96
 
97
97
  // Activates notifications for test results
98
98
  // notify: false,
@@ -101,7 +101,7 @@ export default {
101
101
  // notifyMode: "failure-change",
102
102
 
103
103
  // A preset that is used as a base for Jest's configuration
104
- preset: 'ts-jest',
104
+ preset: 'ts-jest',
105
105
 
106
106
  // Run tests from one or more projects
107
107
  // projects: undefined,
@@ -136,7 +136,7 @@ export default {
136
136
  // setupFiles: [],
137
137
 
138
138
  // A list of paths to modules that run some code to configure or set up the testing framework before each test
139
- setupFilesAfterEnv: ["dotenv/config"],
139
+ setupFilesAfterEnv: ['dotenv/config'],
140
140
 
141
141
  // The number of seconds after which a test is considered as slow and reported as such in the results.
142
142
  // slowTestThreshold: 5,
@@ -175,10 +175,10 @@ export default {
175
175
 
176
176
  // A map from regular expressions to paths to transformers
177
177
 
178
- transform: {
179
- '^.+\\.(ts|tsx)?$': 'ts-jest',
180
- '^.+\\.(js|jsx)$': 'babel-jest',
181
- }
178
+ transform: {
179
+ '^.+\\.(ts|tsx)?$': 'ts-jest',
180
+ '^.+\\.(js|jsx)$': 'babel-jest',
181
+ },
182
182
  // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
183
183
  // transformIgnorePatterns: [
184
184
  // "/node_modules/",
@@ -196,5 +196,4 @@ export default {
196
196
 
197
197
  // Whether to use watchman for file crawling
198
198
  // watchman: true,
199
-
200
- };
199
+ }
package/jsdoc.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
- "source": {
3
- "include": ["src/services/config.js", "src/services/sanity.js", "src/services/railcontent.js", "src/index.js"],
4
- "includePattern": ".js$",
5
- "excludePattern": "(node_modules/|docs)"
6
- },
7
- "opts": {
8
- "destination": "./docs",
9
- "recurse": true,
10
- "template": "node_modules/docdash",
11
- "readme": "./README.md"
12
- }
13
- }
2
+ "source": {
3
+ "include": [
4
+ "src/services/config.js",
5
+ "src/services/sanity.js",
6
+ "src/services/railcontent.js",
7
+ "src/index.js"
8
+ ],
9
+ "includePattern": ".js$",
10
+ "excludePattern": "(node_modules/|docs)"
11
+ },
12
+ "opts": {
13
+ "destination": "./docs",
14
+ "recurse": true,
15
+ "template": "node_modules/docdash",
16
+ "readme": "./README.md"
17
+ }
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.2.5",
3
+ "version": "1.3.2",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -24,6 +24,7 @@
24
24
  "dotenv": "^16.4.5",
25
25
  "jest": "^29.7.0",
26
26
  "jsdoc": "^4.0.3",
27
+ "prettier": "3.4.2",
27
28
  "standard-version": "^9.5.0",
28
29
  "ts-jest": "^29.2.4"
29
30
  },