@contentstorage/core 0.6.1 → 0.6.2
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/dist/lib/configLoader.js
CHANGED
|
@@ -32,14 +32,9 @@ export async function loadConfig() {
|
|
|
32
32
|
...DEFAULT_CONFIG,
|
|
33
33
|
...userConfig,
|
|
34
34
|
};
|
|
35
|
-
// Validate required fields
|
|
36
|
-
if (!mergedConfig.contentKey) {
|
|
37
|
-
console.error(chalk.red('Error: Configuration is missing the required "contentKey" property.'));
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
35
|
const finalConfig = {
|
|
41
36
|
languageCodes: mergedConfig.languageCodes || [],
|
|
42
|
-
contentKey: mergedConfig.contentKey,
|
|
37
|
+
contentKey: mergedConfig.contentKey || '',
|
|
43
38
|
contentDir: path.resolve(process.cwd(), mergedConfig.contentDir),
|
|
44
39
|
typesOutputFile: path.resolve(process.cwd(), mergedConfig.typesOutputFile),
|
|
45
40
|
};
|
|
@@ -9,6 +9,11 @@ export async function pullContent() {
|
|
|
9
9
|
console.log(chalk.blue('Starting content pull...'));
|
|
10
10
|
// Load configuration (assuming this function is defined elsewhere and works)
|
|
11
11
|
const config = await loadConfig();
|
|
12
|
+
// Validate required fields
|
|
13
|
+
if (!config.contentKey) {
|
|
14
|
+
console.error(chalk.red('Error: Configuration is missing the required "contentKey" property.'));
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
12
17
|
console.log(chalk.blue(`Content key: ${config.contentKey}`));
|
|
13
18
|
console.log(chalk.blue(`Saving content to: ${config.contentDir}`));
|
|
14
19
|
try {
|
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.
|
|
5
|
+
"version": "0.6.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"description": "Fetch content from contentstorage and generate TypeScript types",
|
|
8
8
|
"module": "dist/index.js",
|