vovk-cli 0.0.1-draft.105 → 0.0.1-draft.106

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.
@@ -25,7 +25,7 @@ import type { VovkSegmentSchema, VovkStrictConfig } from 'vovk';
25
25
  declare const fullSchema: {
26
26
  config: Partial<VovkStrictConfig>;
27
27
  segments: {
28
- ${segmentNames.map((segmentName) => ` '${segmentName}': VovkSegmentSchema;`).join('\n')}
28
+ ${segmentNames.map((segmentName) => ` '${segmentName}': VovkSegmentSchema;`).join('\n')}
29
29
  };
30
30
  };
31
31
  export default fullSchema;`;
@@ -36,7 +36,7 @@ ${segmentNames.map((segmentName, i) => `import segment${i} from './${SEGMENTS_SC
36
36
  const fullSchema = {
37
37
  config: config as unknown as Partial<VovkStrictConfig>,
38
38
  segments: {
39
- ${segmentNames.map((segmentName, i) => ` '${segmentName}': segment${i} as unknown as VovkSegmentSchema,`).join('\n')}
39
+ ${segmentNames.map((segmentName, i) => ` '${segmentName}': segment${i} as unknown as VovkSegmentSchema,`).join('\n')}
40
40
  }
41
41
  };
42
42
  export default fullSchema;`;
@@ -31,12 +31,16 @@ export default async function getConfig({ clientOutDir, cwd }) {
31
31
  controller: 'vovk-cli/templates/controller.ejs',
32
32
  ...conf.templates,
33
33
  },
34
+ custom: conf.custom ?? {},
34
35
  };
35
- if (typeof conf.emitConfig === 'undefined' || conf.emitConfig === true) {
36
+ if (typeof conf.emitConfig === 'undefined') {
37
+ config.emitConfig = ['custom'];
38
+ }
39
+ else if (conf.emitConfig === true) {
36
40
  config.emitConfig = Object.keys(config);
37
41
  }
38
42
  else if (Array.isArray(conf.emitConfig)) {
39
43
  config.emitConfig = conf.emitConfig;
40
- }
44
+ } // else it's false and emitConfig already is []
41
45
  return { config, srcRoot, configAbsolutePaths, userConfig, error };
42
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.105",
3
+ "version": "0.0.1-draft.106",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },