musora-content-services 1.2.4 → 1.3.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/.prettierignore +5 -0
- package/.prettierrc +8 -0
- package/CHANGELOG.md +11 -0
- package/babel.config.cjs +1 -1
- package/jest.config.js +9 -10
- package/jsdoc.json +17 -12
- package/package.json +2 -1
- package/src/contentMetaData.js +1190 -1131
- package/src/contentTypeConfig.js +492 -387
- package/src/filterBuilder.js +163 -145
- package/src/index.d.ts +227 -237
- package/src/index.js +226 -236
- package/src/services/config.js +12 -12
- package/src/services/contentLikes.js +33 -32
- package/src/services/contentProgress.js +233 -200
- package/src/services/dataContext.js +99 -93
- package/src/services/lastUpdated.js +7 -7
- package/src/services/railcontent.js +368 -364
- package/src/services/sanity.js +975 -955
- package/src/services/userPermissions.js +12 -14
- package/test/contentLikes.test.js +89 -86
- package/test/contentProgress.test.js +229 -236
- package/test/initializeTests.js +54 -51
- package/test/lastUpdated.test.js +20 -18
- package/test/live/contentProgressLive.test.js +135 -137
- package/test/live/railcontentLive.test.js +12 -14
- package/test/localStorageMock.js +16 -16
- package/test/log.js +5 -5
- package/test/sanityQueryService.test.js +857 -821
- package/test/userPermissions.test.js +15 -15
- package/tools/generate-index.cjs +108 -111
- package/.yarnrc.yml +0 -1
package/.prettierignore
ADDED
package/.prettierrc
ADDED
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.1](https://github.com/railroadmedia/musora-content-services/compare/v1.3.0...v1.3.1) (2025-01-29)
|
|
6
|
+
|
|
7
|
+
## [1.3.0](https://github.com/railroadmedia/musora-content-services/compare/v1.2.5...v1.3.0) (2025-01-29)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* implement prettier ([91a9b8d](https://github.com/railroadmedia/musora-content-services/commit/91a9b8d6af3b844821e408caeb9192c94d1bea91))
|
|
13
|
+
|
|
14
|
+
### [1.2.5](https://github.com/railroadmedia/musora-content-services/compare/v1.2.4...v1.2.5) (2025-01-27)
|
|
15
|
+
|
|
5
16
|
### [1.2.4](https://github.com/railroadmedia/musora-content-services/compare/v1.2.3...v1.2.4) (2025-01-20)
|
|
6
17
|
|
|
7
18
|
### [1.2.3](https://github.com/railroadmedia/musora-content-services/compare/v1.2.1...v1.2.3) (2025-01-17)
|
package/babel.config.cjs
CHANGED
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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.
|
|
3
|
+
"version": "1.3.1",
|
|
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
|
},
|