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 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
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
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
File without changes
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,
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;
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
@@ -17,10 +17,16 @@ const fileExports = {};
17
17
  function extractExportedFunctions(filePath) {
18
18
  const fileContent = fs.readFileSync(filePath, 'utf-8');
19
19
 
20
- const exportRegex = /export\s+(async\s+)?function\s+(\w+)/g;
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(exportRegex)].map(match => match[2]);
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!');