musora-content-services 1.2.2 → 1.2.3
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/.yarnrc.yml +1 -0
- package/CHANGELOG.md +2 -0
- package/README.md +0 -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/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -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/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.test.js +1 -1
- 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 +0 -0
- package/test/userPermissions.test.js +0 -0
- package/tools/generate-index.cjs +9 -3
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.2.3](https://github.com/railroadmedia/musora-content-services/compare/v1.2.1...v1.2.3) (2025-01-17)
|
|
6
|
+
|
|
5
7
|
### [1.2.2](https://github.com/railroadmedia/musora-content-services/compare/v1.2.1...v1.2.2) (2025-01-16)
|
|
6
8
|
|
|
7
9
|
### [1.2.1](https://github.com/railroadmedia/musora-content-services/compare/v1.2.0...v1.2.1) (2025-01-16)
|
package/README.md
CHANGED
|
File without changes
|
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/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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
globalConfig,
|
|
4
5
|
initializeService
|
|
5
6
|
} from './services/config.js';
|
|
6
7
|
|
|
@@ -243,6 +244,7 @@ declare module 'musora-content-services' {
|
|
|
243
244
|
getProgressStateByIds,
|
|
244
245
|
getResumeTimeSeconds,
|
|
245
246
|
getSortOrder,
|
|
247
|
+
globalConfig,
|
|
246
248
|
initializeService,
|
|
247
249
|
isContentLiked,
|
|
248
250
|
jumpToContinueContent,
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
globalConfig,
|
|
4
5
|
initializeService
|
|
5
6
|
} from './services/config.js';
|
|
6
7
|
|
|
@@ -242,6 +243,7 @@ export {
|
|
|
242
243
|
getProgressStateByIds,
|
|
243
244
|
getResumeTimeSeconds,
|
|
244
245
|
getSortOrder,
|
|
246
|
+
globalConfig,
|
|
245
247
|
initializeService,
|
|
246
248
|
isContentLiked,
|
|
247
249
|
jumpToContinueContent,
|
package/src/services/config.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
|
|
@@ -129,7 +129,7 @@ describe('contentProgressDataContext', function () {
|
|
|
129
129
|
let progress241247 = await getProgressPercentage(241247);
|
|
130
130
|
expect(progress241247).toBe(1);
|
|
131
131
|
|
|
132
|
-
});
|
|
132
|
+
}, 50000);
|
|
133
133
|
|
|
134
134
|
// test('completedProgressNotOverwritten', async () => {
|
|
135
135
|
// const contentId = 241262;
|
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
|
|
File without changes
|
|
File without changes
|
package/tools/generate-index.cjs
CHANGED
|
@@ -17,10 +17,16 @@ const fileExports = {};
|
|
|
17
17
|
function extractExportedFunctions(filePath) {
|
|
18
18
|
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const exportFunctionRegex = /export\s+(async\s+)?function\s+(\w+)/g;
|
|
21
|
+
const exportVariableRegex = /export\s+(let|const|var)\s+(globalConfig)\s+/g;
|
|
21
22
|
const moduleExportsRegex = /module\.exports\s*=\s*{\s*([\s\S]+?)\s*};/g;
|
|
22
23
|
|
|
23
|
-
let matches = [...fileContent.matchAll(
|
|
24
|
+
let matches = [...fileContent.matchAll(exportFunctionRegex)].map(match => match[2]);
|
|
25
|
+
|
|
26
|
+
// Match `globalConfig` variable
|
|
27
|
+
const variableMatches = [...fileContent.matchAll(exportVariableRegex)].map(match => match[2]);
|
|
28
|
+
matches = matches.concat(variableMatches);
|
|
29
|
+
|
|
24
30
|
|
|
25
31
|
const moduleExportsMatch = moduleExportsRegex.exec(fileContent);
|
|
26
32
|
if (moduleExportsMatch) {
|
|
@@ -102,4 +108,4 @@ dtsContent += '}\n';
|
|
|
102
108
|
const outputDtsPath = path.join(__dirname, '../src/index.d.ts');
|
|
103
109
|
fs.writeFileSync(outputDtsPath, dtsContent);
|
|
104
110
|
|
|
105
|
-
console.log('index.d.ts generated successfully!');
|
|
111
|
+
console.log('index.d.ts generated successfully!');
|