vovk-cli 0.0.1-draft.73 → 0.0.1-draft.75
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.
|
@@ -35,6 +35,7 @@ export default fullSchema;`;
|
|
|
35
35
|
const existingDTs = await fs.readFile(dTsAbsolutePath, 'utf-8').catch(() => null);
|
|
36
36
|
const existingTs = await fs.readFile(tsAbsolutePath, 'utf-8').catch(() => null);
|
|
37
37
|
await fs.mkdir(schemaOutAbsolutePath, { recursive: true });
|
|
38
|
+
// ignore 1st lines at the files
|
|
38
39
|
if (existingJs?.split('\n').slice(1).join('\n') !== jsContent.split('\n').slice(1).join('\n')) {
|
|
39
40
|
await fs.writeFile(jsAbsolutePath, jsContent);
|
|
40
41
|
}
|
package/dist/generate/index.mjs
CHANGED
|
@@ -45,8 +45,8 @@ export default async function generate({ projectInfo, segments, segmentsSchema,
|
|
|
45
45
|
}
|
|
46
46
|
// Read existing file content to compare
|
|
47
47
|
const existingContent = await fs.readFile(outPath, 'utf-8').catch(() => '');
|
|
48
|
-
// Determine if we need to rewrite the file
|
|
49
|
-
const needsWriting = existingContent.split('\n').slice(1).join('\n') !== rendered.split('\n').slice(1).join('\n');
|
|
48
|
+
// Determine if we need to rewrite the file, ignore 1st line
|
|
49
|
+
const needsWriting = existingContent.trim().split('\n').slice(1).join('\n') !== rendered.trim().split('\n').slice(1).join('\n');
|
|
50
50
|
return {
|
|
51
51
|
outPath,
|
|
52
52
|
rendered,
|