storyloco 1.5.2 → 1.5.3
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AUTO-GENERATED FILE. DO NOT EDIT.
|
|
3
|
-
* Generated by vite-storyblok-schema plugin on 2025-08-
|
|
3
|
+
* Generated by vite-storyblok-schema plugin on 2025-08-11T21:22:08.763Z.
|
|
4
4
|
* Any changes will be overwritten.
|
|
5
5
|
*/
|
|
6
6
|
import type { SbBlokData } from "@storyblok/svelte";
|
|
@@ -80,13 +80,13 @@ export default function storyblok_schema({ output_path, interval_ms, storyblok_p
|
|
|
80
80
|
const headers = new Headers({ Authorization: storyblok_personal_access_token });
|
|
81
81
|
const response = await fetch(url, { headers });
|
|
82
82
|
const new_components = await response.json();
|
|
83
|
-
//
|
|
83
|
+
// Make the file writable
|
|
84
84
|
await $ `chmod u+w ${components_file}`.quiet().nothrow();
|
|
85
|
-
// Write the data to the components file
|
|
86
|
-
await writeFile(components_file, JSON.stringify(new_components, null, 2));
|
|
87
85
|
// Compare existing and new components
|
|
88
|
-
if (existing_components === new_components)
|
|
86
|
+
if (JSON.stringify(JSON.parse(existing_components)) === JSON.stringify(new_components))
|
|
89
87
|
return;
|
|
88
|
+
// Write the data to the components file
|
|
89
|
+
await writeFile(components_file, JSON.stringify(new_components, null, 2));
|
|
90
90
|
// Generate types
|
|
91
91
|
logger.start("Generating TypeScript definitions...");
|
|
92
92
|
await $ `chmod u+w ${schema_ts_file}`.quiet().nothrow();
|