vovk 0.2.3-beta.32 → 0.2.3-beta.33

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.
@@ -13,7 +13,7 @@ function canRequire(moduleName) {
13
13
 
14
14
  /**
15
15
  * Generates client code with string concatenation so it should be much faster than using AST
16
- * TODO: Check modules for existence before compiling, use vovk-zod by default
16
+ * TODO: Check fetcher and streamFetcher for existence
17
17
  * @type {(rcPath: string) => Promise<void>}
18
18
  */
19
19
  async function generateClient(rcPath) {
@@ -23,7 +23,7 @@ async function generateClient(rcPath) {
23
23
  ? path.join(__dirname, '../../..', vovkrc.fetcher)
24
24
  : vovkrc.fetcher;
25
25
  const streamFetcherPath = vovkrc.streamFetcher.startsWith('.')
26
- ? path.join(process.cwd(), vovkrc.streamFetcher)
26
+ ? path.join(__dirname, '../../..', vovkrc.streamFetcher)
27
27
  : vovkrc.streamFetcher;
28
28
 
29
29
  if (typeof vovkrc.validateOnClient === 'undefined') {
@@ -34,18 +34,6 @@ async function generateClient(rcPath) {
34
34
  );
35
35
  }
36
36
 
37
- if (!canRequire(fetcherPath)) {
38
- throw new Error(
39
- `Unble to generate Vovk Client: cannot find "fetcher" module '${fetcherPath}'. Check your .vovkrc.js file`
40
- );
41
- }
42
-
43
- if (!canRequire(streamFetcherPath)) {
44
- throw new Error(
45
- `Unble to generate Vovk Client: cannot find "streamFetcher" module '${streamFetcherPath}'. Check your .vovkrc.js file`
46
- );
47
- }
48
-
49
37
  if (!canRequire(jsonPath)) {
50
38
  throw new Error(`Unble to generate Vovk Client: cannot find ".vovk.json" file '${jsonPath}'.`);
51
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "0.2.3-beta.32",
3
+ "version": "0.2.3-beta.33",
4
4
  "description": "Structural add-on for Next.js",
5
5
  "bin": "./cli/index.js",
6
6
  "scripts": {