storyloco 1.3.2 → 1.3.4
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/package.json
CHANGED
|
@@ -72,19 +72,15 @@ export default function storyblok_schema({ output_path, interval_ms, storyblok_p
|
|
|
72
72
|
// No existing file, that's fine
|
|
73
73
|
}
|
|
74
74
|
// Log in to Storyblok and pull components
|
|
75
|
-
logger.start("Preparing to pull components...");
|
|
76
75
|
await $ `chmod u+w ${components_file}`.quiet().nothrow();
|
|
77
76
|
await $ `${x} storyblok logout`.quiet().nothrow();
|
|
78
77
|
await $ `${x} storyblok login --token ${storyblok_personal_access_token} --region eu`.quiet();
|
|
79
78
|
await $ `${x} storyblok pull-components --space=${storyblok_space_id} -p ${output_path}/ -f schema`.quiet();
|
|
80
|
-
logger.succeed("Components pulled successfully.");
|
|
81
79
|
// Read the new components file
|
|
82
80
|
const new_components = await readFile(components_file, "utf-8");
|
|
83
81
|
// Compare existing and new components
|
|
84
|
-
if (existing_components === new_components)
|
|
85
|
-
logger.info("No changes detected in components. Skipping type generation.");
|
|
82
|
+
if (existing_components === new_components)
|
|
86
83
|
return;
|
|
87
|
-
}
|
|
88
84
|
// Generate types
|
|
89
85
|
logger.start("Generating TypeScript definitions...");
|
|
90
86
|
await $ `chmod u+w ${schema_ts_file}`.quiet().nothrow();
|