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.
- package/.github/workflows/node.js.yml +0 -0
- package/CHANGELOG.md +2 -0
- package/README.md +0 -0
- package/babel.config.js +0 -0
- package/docs/config.js.html +7 -3
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/index.html +1 -1
- package/docs/module-Config.html +28 -3
- package/docs/module-Railcontent-Services.html +7 -7
- package/docs/module-Sanity-Services.html +426 -48
- package/docs/railcontent.js.html +37 -47
- package/docs/sanity.js.html +69 -12
- package/docs/scripts/collapse.js +0 -0
- package/docs/scripts/commonNav.js +0 -0
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/nav.js +0 -0
- package/docs/scripts/polyfill.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/styles/jsdoc.css +0 -0
- package/docs/styles/prettify.css +0 -0
- package/jest.config.js +0 -0
- package/jsdoc.json +0 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +11 -0
- package/src/contentTypeConfig.js +6 -2
- package/src/services/sanity.js +64 -10
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/sanityQueryService.test.js +39 -0
- 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
|
package/docs/config.js.html
CHANGED
|
@@ -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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
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="userContext"</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
|
|
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>
|
package/docs/module-Config.html
CHANGED
|
@@ -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#
|
|
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
|
|
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#
|
|
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#
|
|
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#
|
|
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#
|
|
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#
|
|
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#
|
|
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
|
|
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>
|