vovk-cli 0.0.1-draft.73 → 0.0.1-draft.74

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
  }
@@ -45,8 +45,13 @@ 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
48
+ // Determine if we need to rewrite the file, ignore 1st line
49
49
  const needsWriting = existingContent.split('\n').slice(1).join('\n') !== rendered.split('\n').slice(1).join('\n');
50
+ console.log({
51
+ outPath,
52
+ rendered,
53
+ needsWriting,
54
+ });
50
55
  return {
51
56
  outPath,
52
57
  rendered,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.73",
3
+ "version": "0.0.1-draft.74",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },