@contentstorage/core 0.6.3 → 1.0.0

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.
@@ -1,3 +1,3 @@
1
1
  export const CONTENTSTORAGE_CONFIG = {
2
- BASE_URL: 'https://di0fmnnsdfsl2.cloudfront.net',
2
+ BASE_URL: 'https://cdn.contentstorage.app',
3
3
  };
@@ -18,7 +18,7 @@ export declare function initContentStorage(config: Pick<AppConfig, 'contentKey'
18
18
  * Autocompletion for pathString is enabled via module augmentation of CustomContentStructure.
19
19
  * `setContentLanguage()` must be called successfully before using this.
20
20
  *
21
- * @param contentKey A dot-notation path string (e.g., 'HomePage.Login'). Autocompletion is provided.
21
+ * @param contentId A dot-notation path string (e.g., 'HomePage.Login'). Autocompletion is provided.
22
22
  * @param variables Variables help to render dynamic content inside text strings
23
23
  * If not provided, and path is not found/value not string, undefined is returned.
24
24
  * @returns The text string from the JSON, or the fallbackValue, or undefined.
@@ -50,7 +50,7 @@ export function initContentStorage(config) {
50
50
  * Autocompletion for pathString is enabled via module augmentation of CustomContentStructure.
51
51
  * `setContentLanguage()` must be called successfully before using this.
52
52
  *
53
- * @param contentKey A dot-notation path string (e.g., 'HomePage.Login'). Autocompletion is provided.
53
+ * @param contentId A dot-notation path string (e.g., 'HomePage.Login'). Autocompletion is provided.
54
54
  * @param variables Variables help to render dynamic content inside text strings
55
55
  * If not provided, and path is not found/value not string, undefined is returned.
56
56
  * @returns The text string from the JSON, or the fallbackValue, or undefined.
@@ -135,7 +135,7 @@ export function getImage(contentId) {
135
135
  current.contentstorage_type === 'image' &&
136
136
  typeof current.url === 'string') {
137
137
  const currentData = current;
138
- const key = `https://di0fmnnsdfsl2.cloudfront.net/${currentData.url}`;
138
+ const key = `https://cdn.contentstorage.app/${currentData.url}`;
139
139
  if (window.parent && window.parent !== window) {
140
140
  const existingEntry = window.memoryMap.get(key);
141
141
  const idSet = existingEntry ? existingEntry.ids : new Set();
@@ -27,6 +27,7 @@ export async function generateTypes() {
27
27
  else if (key === 'output') {
28
28
  cliConfig.typesOutputFile = value;
29
29
  }
30
+ // Skip the value in the next iteration
30
31
  i++;
31
32
  }
32
33
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@contentstorage/core",
3
3
  "author": "Kaido Hussar <kaidohus@gmail.com>",
4
4
  "homepage": "https://contentstorage.app",
5
- "version": "0.6.3",
5
+ "version": "1.0.0",
6
6
  "type": "module",
7
7
  "description": "Fetch content from contentstorage and generate TypeScript types",
8
8
  "module": "dist/index.js",