vovk 0.2.3-beta.5 → 0.2.3-beta.6

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.
@@ -1,5 +1,6 @@
1
1
  const { watch } = require('node:fs/promises');
2
2
  const path = require('path');
3
+ const fs = require('fs/promises');
3
4
  const generateClient = require('./generateClient');
4
5
 
5
6
  const yargs = require('yargs/yargs');
@@ -8,6 +9,16 @@ const { hideBin } = require('yargs/helpers');
8
9
  const argv = yargs(hideBin(process.argv)).argv;
9
10
 
10
11
  async function watchMetadata() {
12
+ const exists = await fs
13
+ .access(path.join(__dirname, '../../.vovk/vovk-metadata.json'))
14
+ .then(() => true)
15
+ .catch(() => false);
16
+
17
+ if (!exists) {
18
+ await fs.mkdir(path.join(__dirname, '../../.vovk'));
19
+ await fs.writeFile(path.join(__dirname, '../../.vovk/vovk-metadata.json'), '{}');
20
+ }
21
+
11
22
  const jsonWatcher = watch(path.join(__dirname, '../../.vovk/vovk-metadata.json'));
12
23
 
13
24
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "0.2.3-beta.5",
3
+ "version": "0.2.3-beta.6",
4
4
  "description": "Structural add-on for Next.js",
5
5
  "bin": "./cli/index.js",
6
6
  "scripts": {