musora-content-services 1.0.121 → 1.0.122

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 (51) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/CHANGELOG.md +2 -0
  3. package/README.md +0 -0
  4. package/babel.config.js +0 -0
  5. package/docs/config.js.html +7 -3
  6. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  14. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  24. package/docs/index.html +1 -1
  25. package/docs/module-Config.html +28 -3
  26. package/docs/module-Railcontent-Services.html +7 -7
  27. package/docs/module-Sanity-Services.html +426 -48
  28. package/docs/railcontent.js.html +37 -47
  29. package/docs/sanity.js.html +69 -12
  30. package/docs/scripts/collapse.js +0 -0
  31. package/docs/scripts/commonNav.js +0 -0
  32. package/docs/scripts/linenumber.js +0 -0
  33. package/docs/scripts/nav.js +0 -0
  34. package/docs/scripts/polyfill.js +0 -0
  35. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  36. package/docs/scripts/prettify/lang-css.js +0 -0
  37. package/docs/scripts/prettify/prettify.js +0 -0
  38. package/docs/scripts/search.js +0 -0
  39. package/docs/styles/jsdoc.css +0 -0
  40. package/docs/styles/prettify.css +0 -0
  41. package/jest.config.js +0 -0
  42. package/jsdoc.json +0 -0
  43. package/link_mcs.sh +0 -0
  44. package/package.json +1 -1
  45. package/src/contentMetaData.js +11 -0
  46. package/src/contentTypeConfig.js +6 -2
  47. package/src/services/sanity.js +64 -10
  48. package/test/localStorageMock.js +0 -0
  49. package/test/log.js +0 -0
  50. package/test/sanityQueryService.test.js +39 -0
  51. package/tools/generate-index.js +0 -0
File without changes
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.0.122](https://github.com/railroadmedia/musora-content-services/compare/v1.0.118...v1.0.122) (2024-10-02)
6
+
5
7
  ### [1.0.121](https://github.com/railroadmedia/musora-content-services/compare/v1.0.120...v1.0.121) (2024-10-01)
6
8
 
7
9
  ### [1.0.120](https://github.com/railroadmedia/musora-content-services/compare/v1.0.119...v1.0.120) (2024-09-30)
package/README.md CHANGED
File without changes
package/babel.config.js CHANGED
File without changes
@@ -51,7 +51,8 @@
51
51
 
52
52
  let globalConfig = {
53
53
  sanityConfig: {},
54
- railcontentConfig: {}
54
+ railcontentConfig: {},
55
+ localStorage: null
55
56
  };
56
57
 
57
58
  /**
@@ -71,6 +72,7 @@ let globalConfig = {
71
72
  * @param {string} config.railcontentConfig.token - The token for authenticating user-specific requests.
72
73
  * @param {string} config.railcontentConfig.userId - The user ID for fetching user-specific data.
73
74
  * @param {string} config.railcontentConfig.baseUrl - The url for the enviroment.
75
+ * @param {Object} config.localStorage - Cache to use for localStorage
74
76
 
75
77
  *
76
78
  * @example
@@ -88,12 +90,14 @@ let globalConfig = {
88
90
  * token: 'your-user-api-token',
89
91
  * userId: 'current-user-id',
90
92
  * baseUrl: 'https://web-staging-one.musora.com'
91
- * }
93
+ * },
94
+ * localStorage: localStorage
92
95
  * });
93
96
  */
94
97
  function initializeService(config) {
95
98
  globalConfig.sanityConfig = config.sanityConfig;
96
99
  globalConfig.railcontentConfig = config.railcontentConfig;
100
+ globalConfig.localStorage = config.localStorage;
97
101
  }
98
102
 
99
103
  // Export both the initialization function and the config object
@@ -115,7 +119,7 @@ module.exports = {
115
119
  <br class="clear">
116
120
 
117
121
  <footer>
118
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
122
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Oct 02 2024 12:20:08 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
119
123
  </footer>
120
124
 
121
125
  <script>prettyPrint();</script>
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/docs/index.html CHANGED
@@ -149,7 +149,7 @@ with <code>npm test -- -t=&quot;userContext&quot;</code> or just the contentLike
149
149
  <br class="clear">
150
150
 
151
151
  <footer>
152
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
152
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Oct 02 2024 12:20:08 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
153
153
  </footer>
154
154
 
155
155
  <script>prettyPrint();</script>
@@ -101,7 +101,7 @@ This function must be called before using any other functions in this library.</
101
101
 
102
102
  <dt class="tag-source">Source:</dt>
103
103
  <dd class="tag-source"><ul class="dummy"><li>
104
- <a href="config.js.html">config.js</a>, <a href="config.js.html#line47">line 47</a>
104
+ <a href="config.js.html">config.js</a>, <a href="config.js.html#line50">line 50</a>
105
105
  </li></ul></dd>
106
106
 
107
107
 
@@ -162,7 +162,8 @@ initializeService({
162
162
  token: 'your-user-api-token',
163
163
  userId: 'current-user-id',
164
164
  baseUrl: 'https://web-staging-one.musora.com'
165
- }
165
+ },
166
+ localStorage: localStorage
166
167
  });</code></pre>
167
168
 
168
169
 
@@ -673,6 +674,30 @@ initializeService({
673
674
  </tr>
674
675
 
675
676
 
677
+
678
+ <tr>
679
+
680
+ <td class="name"><code>localStorage</code></td>
681
+
682
+
683
+ <td class="type">
684
+
685
+
686
+ <span class="param-type">Object</span>
687
+
688
+
689
+
690
+
691
+ </td>
692
+
693
+
694
+
695
+
696
+
697
+ <td class="description last">Cache to use for localStorage</td>
698
+ </tr>
699
+
700
+
676
701
  </tbody>
677
702
  </table>
678
703
 
@@ -721,7 +746,7 @@ initializeService({
721
746
  <br class="clear">
722
747
 
723
748
  <footer>
724
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
749
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Oct 02 2024 12:20:08 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
725
750
  </footer>
726
751
 
727
752
  <script>prettyPrint();</script>
@@ -100,7 +100,7 @@
100
100
 
101
101
  <dt class="tag-source">Source:</dt>
102
102
  <dd class="tag-source"><ul class="dummy"><li>
103
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line85">line 85</a>
103
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line86">line 86</a>
104
104
  </li></ul></dd>
105
105
 
106
106
 
@@ -265,7 +265,7 @@
265
265
 
266
266
  <dt class="tag-source">Source:</dt>
267
267
  <dd class="tag-source"><ul class="dummy"><li>
268
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line195">line 195</a>
268
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line196">line 196</a>
269
269
  </li></ul></dd>
270
270
 
271
271
 
@@ -727,7 +727,7 @@
727
727
 
728
728
  <dt class="tag-source">Source:</dt>
729
729
  <dd class="tag-source"><ul class="dummy"><li>
730
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line153">line 153</a>
730
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line154">line 154</a>
731
731
  </li></ul></dd>
732
732
 
733
733
 
@@ -1024,7 +1024,7 @@
1024
1024
 
1025
1025
  <dt class="tag-source">Source:</dt>
1026
1026
  <dd class="tag-source"><ul class="dummy"><li>
1027
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line235">line 235</a>
1027
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line236">line 236</a>
1028
1028
  </li></ul></dd>
1029
1029
 
1030
1030
 
@@ -1189,7 +1189,7 @@
1189
1189
 
1190
1190
  <dt class="tag-source">Source:</dt>
1191
1191
  <dd class="tag-source"><ul class="dummy"><li>
1192
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line117">line 117</a>
1192
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line118">line 118</a>
1193
1193
  </li></ul></dd>
1194
1194
 
1195
1195
 
@@ -1354,7 +1354,7 @@
1354
1354
 
1355
1355
  <dt class="tag-source">Source:</dt>
1356
1356
  <dd class="tag-source"><ul class="dummy"><li>
1357
- <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line50">line 50</a>
1357
+ <a href="railcontent.js.html">railcontent.js</a>, <a href="railcontent.js.html#line51">line 51</a>
1358
1358
  </li></ul></dd>
1359
1359
 
1360
1360
 
@@ -1518,7 +1518,7 @@
1518
1518
  <br class="clear">
1519
1519
 
1520
1520
  <footer>
1521
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Sep 27 2024 21:58:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1521
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Oct 02 2024 12:20:08 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1522
1522
  </footer>
1523
1523
 
1524
1524
  <script>prettyPrint();</script>