vovk-cli 0.0.1-draft.346 → 0.0.1-draft.348

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.
@@ -285,6 +285,7 @@ export class VovkDev {
285
285
  segments: this.#schemaSegments,
286
286
  meta: getMetaSchema({
287
287
  config: this.#projectInfo.config,
288
+ useEmitConfig: false,
288
289
  }),
289
290
  };
290
291
  return generate({
@@ -7,6 +7,7 @@ export default async function writeMetaJson(schemaOutAbsolutePath, projectInfo)
7
7
  const metaJsonPath = path.join(schemaOutAbsolutePath, META_FILE_NAME + '.json');
8
8
  const metaStr = JSON.stringify(getMetaSchema({
9
9
  config: projectInfo.config,
10
+ useEmitConfig: true,
10
11
  }), null, 2);
11
12
  const existingStr = await fs.readFile(metaJsonPath, 'utf-8').catch(() => null);
12
13
  if (existingStr !== metaStr) {
@@ -21,7 +21,7 @@ export default async function ensureClient(projectInfo, locatedSegments) {
21
21
  fullSchema: {
22
22
  $schema: VovkSchemaIdEnum.SCHEMA,
23
23
  segments: getEmptySegmentRecordSchema(locatedSegments.map(({ segmentName }) => segmentName)),
24
- meta: getMetaSchema({ config: projectInfo.config }),
24
+ meta: getMetaSchema({ config: projectInfo.config, useEmitConfig: false }),
25
25
  },
26
26
  locatedSegments,
27
27
  });
@@ -10,6 +10,7 @@ export async function getProjectFullSchema({ schemaOutAbsolutePath, isNextInstal
10
10
  segments: {},
11
11
  meta: getMetaSchema({
12
12
  config,
13
+ useEmitConfig: false,
13
14
  }),
14
15
  };
15
16
  const isEmptyLogOrWarn = isNextInstalled ? log.warn : log.debug;
@@ -1,6 +1,7 @@
1
1
  import { VovkSchemaIdEnum, VovkStrictConfig } from 'vovk';
2
- export default function getMetaSchema({ config }: {
2
+ export default function getMetaSchema({ config, useEmitConfig }: {
3
3
  config: VovkStrictConfig;
4
+ useEmitConfig: boolean;
4
5
  }): {
5
6
  config: VovkStrictConfig;
6
7
  $schema: VovkSchemaIdEnum;
@@ -1,12 +1,14 @@
1
1
  import { VovkSchemaIdEnum } from 'vovk';
2
2
  import pick from 'lodash/pick.js';
3
- export default function getMetaSchema({ config }) {
3
+ export default function getMetaSchema({ config, useEmitConfig }) {
4
4
  return {
5
5
  $schema: VovkSchemaIdEnum.META,
6
6
  ...{
7
- config: (config
8
- ? pick(config, [...config.emitConfig, '$schema'])
9
- : {}),
7
+ config: useEmitConfig
8
+ ? (config
9
+ ? pick(config, [...config.emitConfig, '$schema'])
10
+ : {})
11
+ : config,
10
12
  },
11
13
  };
12
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.346",
3
+ "version": "0.0.1-draft.348",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "homepage": "https://vovk.dev",
37
37
  "peerDependencies": {
38
- "vovk": "^3.0.0-draft.407"
38
+ "vovk": "^3.0.0-draft.409"
39
39
  },
40
40
  "optionalDependencies": {
41
41
  "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.31"