vovk-cli 0.0.1-draft.65 → 0.0.1-draft.66

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.
@@ -22,8 +22,8 @@ declare const segmentSchema: {
22
22
  ${segmentNames.map((segmentName) => ` '${segmentName}': VovkSchema;`).join('\n')}
23
23
  };
24
24
  export default segmentSchema;`;
25
- const jsAbsolutePath = path.join(schemaOutAbsolutePath, 'index.cjs');
26
- const dTsAbsolutePath = path.join(schemaOutAbsolutePath, 'index.d.cts');
25
+ const jsAbsolutePath = path.join(schemaOutAbsolutePath, 'index.js');
26
+ const dTsAbsolutePath = path.join(schemaOutAbsolutePath, 'index.d.ts');
27
27
  const existingJs = await fs.readFile(jsAbsolutePath, 'utf-8').catch(() => null);
28
28
  const existingDTs = await fs.readFile(dTsAbsolutePath, 'utf-8').catch(() => null);
29
29
  await fs.mkdir(schemaOutAbsolutePath, { recursive: true });
@@ -9,7 +9,7 @@ export default async function getProjectInfo({ port: givenPort, clientOutDir, cw
9
9
  const apiRoot = `${config.origin ?? ''}/${config.rootEntry}`;
10
10
  const apiDir = path.join(srcRoot, 'app', config.rootEntry);
11
11
  const schemaOutImportPath = path.relative(config.clientOutDir, config.schemaOutDir).replace(/\\/g, '/') + // windows fix
12
- '/index.cjs';
12
+ '/index.js';
13
13
  const fetcherClientImportPath = config.fetcherPath.startsWith('.')
14
14
  ? path.relative(config.clientOutDir, config.fetcherPath)
15
15
  : config.fetcherPath;
package/dist/index.mjs CHANGED
@@ -83,7 +83,7 @@ program
83
83
  const { cwd, config, apiDir } = projectInfo;
84
84
  const segments = await locateSegments({ dir: apiDir, config });
85
85
  const schemaOutAbsolutePath = path.join(cwd, config.schemaOutDir);
86
- const schemaImportUrl = pathToFileURL(path.join(schemaOutAbsolutePath, 'index.cjs')).href;
86
+ const schemaImportUrl = pathToFileURL(path.join(schemaOutAbsolutePath, 'index.js')).href;
87
87
  const { default: segmentsSchema } = (await import(schemaImportUrl));
88
88
  await generate({
89
89
  projectInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.65",
3
+ "version": "0.0.1-draft.66",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },