vovk-cli 0.0.1-draft.79 → 0.0.1-draft.80

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.
@@ -5,6 +5,7 @@ import formatLoggedSegmentName from '../utils/formatLoggedSegmentName.mjs';
5
5
  import prettify from '../utils/prettify.mjs';
6
6
  import getClientTemplates from './getClientTemplates.mjs';
7
7
  import chalkHighlightThing from '../utils/chalkHighlightThing.mjs';
8
+ import uniq from 'lodash/uniq.js';
8
9
  export default async function generate({ projectInfo, segments, segmentsSchema, forceNothingWrittenLog, templates, prettify: prettifyClient, fullSchema, }) {
9
10
  templates = templates ?? projectInfo.config.experimental_clientGenerateTemplateNames;
10
11
  const noClient = templates?.[0] === 'none';
@@ -55,8 +56,8 @@ export default async function generate({ projectInfo, segments, segmentsSchema,
55
56
  templateName,
56
57
  };
57
58
  }));
58
- const usedTemplateNames = processedTemplates.filter(({ needsWriting }) => needsWriting).map(({ templateName }) => templateName);
59
- const unusedTemplateNames = processedTemplates.filter(({ needsWriting }) => !needsWriting).map(({ templateName }) => templateName);
59
+ const usedTemplateNames = uniq(processedTemplates.filter(({ needsWriting }) => needsWriting).map(({ templateName }) => templateName));
60
+ const unusedTemplateNames = uniq(processedTemplates.filter(({ needsWriting }) => !needsWriting).map(({ templateName }) => templateName));
60
61
  if (fullSchema || usedTemplateNames.length > 0) {
61
62
  // Make sure the output directory exists
62
63
  await fs.mkdir(clientOutDirAbsolutePath, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.79",
3
+ "version": "0.0.1-draft.80",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },