create-nx-workspace 17.3.0-beta.5 → 17.3.0-beta.8

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.
@@ -18,6 +18,7 @@ interface ReactArguments extends BaseArguments {
18
18
  style: string;
19
19
  bundler: 'webpack' | 'vite' | 'rspack';
20
20
  nextAppDir: boolean;
21
+ nextSrcDir: boolean;
21
22
  e2eTestRunner: 'none' | 'cypress' | 'playwright';
22
23
  }
23
24
  interface AngularArguments extends BaseArguments {
@@ -79,6 +79,10 @@ exports.commandsObject = yargs
79
79
  .option('nextAppDir', {
80
80
  describe: chalk.dim `Enable the App Router for Next.js`,
81
81
  type: 'boolean',
82
+ })
83
+ .option('nextSrcDir', {
84
+ describe: chalk.dim `Generate a 'src/' directory for Next.js`,
85
+ type: 'boolean',
82
86
  })
83
87
  .option('e2eTestRunner', {
84
88
  describe: chalk.dim `Test runner to use for end to end (E2E) tests.`,
@@ -88,7 +92,7 @@ exports.commandsObject = yargs
88
92
  .option('ssr', {
89
93
  describe: chalk.dim `Enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering) for the Angular application`,
90
94
  type: 'boolean',
91
- }), yargs_options_1.withNxCloud, yargs_options_1.withCI, yargs_options_1.withAllPrompts, yargs_options_1.withPackageManager, yargs_options_1.withGitOptions), async function handler(argv) {
95
+ }), yargs_options_1.withNxCloud, yargs_options_1.withAllPrompts, yargs_options_1.withPackageManager, yargs_options_1.withGitOptions), async function handler(argv) {
92
96
  await main(argv).catch((error) => {
93
97
  const { version } = require('../package.json');
94
98
  output_1.output.error({
@@ -120,8 +124,11 @@ async function main(parsedArgs) {
120
124
  await (0, ab_testing_1.recordStat)({
121
125
  nxVersion: nx_version_1.nxVersion,
122
126
  command: 'create-nx-workspace',
123
- useCloud: parsedArgs.nxCloud,
124
- meta: ab_testing_1.messages.codeOfSelectedPromptMessage('nxCloudCreation'),
127
+ useCloud: parsedArgs.nxCloud !== 'skip',
128
+ meta: [
129
+ ab_testing_1.messages.codeOfSelectedPromptMessage('setupCI'),
130
+ ab_testing_1.messages.codeOfSelectedPromptMessage('setupNxCloud'),
131
+ ],
125
132
  });
126
133
  if (parsedArgs.nxCloud && workspaceInfo.nxCloudInfo) {
127
134
  (0, nx_cloud_1.printNxCloudSuccessMessage)(workspaceInfo.nxCloudInfo);
@@ -190,12 +197,10 @@ async function normalizeArgsMiddleware(argv) {
190
197
  const packageManager = await (0, prompts_1.determinePackageManager)(argv);
191
198
  const defaultBase = await (0, prompts_1.determineDefaultBase)(argv);
192
199
  const nxCloud = await (0, prompts_1.determineNxCloud)(argv);
193
- const ci = await (0, prompts_1.determineCI)(argv, nxCloud);
194
200
  Object.assign(argv, {
195
201
  nxCloud,
196
202
  packageManager,
197
203
  defaultBase,
198
- ci,
199
204
  });
200
205
  }
201
206
  catch (e) {
@@ -245,6 +250,7 @@ async function determineStack(parsedArgs) {
245
250
  case preset_1.Preset.NextJs:
246
251
  case preset_1.Preset.NextJsStandalone:
247
252
  return 'react';
253
+ case preset_1.Preset.Vue:
248
254
  case preset_1.Preset.VueStandalone:
249
255
  case preset_1.Preset.VueMonorepo:
250
256
  case preset_1.Preset.Nuxt:
@@ -366,6 +372,7 @@ async function determineReactOptions(parsedArgs) {
366
372
  let bundler = undefined;
367
373
  let e2eTestRunner = undefined;
368
374
  let nextAppDir = false;
375
+ let nextSrcDir = false;
369
376
  if (parsedArgs.preset && parsedArgs.preset !== preset_1.Preset.React) {
370
377
  preset = parsedArgs.preset;
371
378
  if (preset === preset_1.Preset.ReactStandalone ||
@@ -418,6 +425,7 @@ async function determineReactOptions(parsedArgs) {
418
425
  }
419
426
  else if (preset === preset_1.Preset.NextJs || preset === preset_1.Preset.NextJsStandalone) {
420
427
  nextAppDir = await determineNextAppDir(parsedArgs);
428
+ nextSrcDir = await determineNextSrcDir(parsedArgs);
421
429
  e2eTestRunner = await determineE2eTestRunner(parsedArgs);
422
430
  }
423
431
  if (parsedArgs.style) {
@@ -463,14 +471,22 @@ async function determineReactOptions(parsedArgs) {
463
471
  ]);
464
472
  style = reply.style;
465
473
  }
466
- return { preset, style, appName, bundler, nextAppDir, e2eTestRunner };
474
+ return {
475
+ preset,
476
+ style,
477
+ appName,
478
+ bundler,
479
+ nextAppDir,
480
+ nextSrcDir,
481
+ e2eTestRunner,
482
+ };
467
483
  }
468
484
  async function determineVueOptions(parsedArgs) {
469
485
  let preset;
470
486
  let style = undefined;
471
487
  let appName;
472
488
  let e2eTestRunner = undefined;
473
- if (parsedArgs.preset) {
489
+ if (parsedArgs.preset && parsedArgs.preset !== preset_1.Preset.Vue) {
474
490
  preset = parsedArgs.preset;
475
491
  if (preset === preset_1.Preset.VueStandalone || preset === preset_1.Preset.NuxtStandalone) {
476
492
  appName = parsedArgs.appName ?? parsedArgs.name;
@@ -480,6 +496,7 @@ async function determineVueOptions(parsedArgs) {
480
496
  }
481
497
  }
482
498
  else {
499
+ const framework = await determineVueFramework(parsedArgs);
483
500
  const workspaceType = await determineStandaloneOrMonorepo();
484
501
  if (workspaceType === 'standalone') {
485
502
  appName = parsedArgs.appName ?? parsedArgs.name;
@@ -487,7 +504,6 @@ async function determineVueOptions(parsedArgs) {
487
504
  else {
488
505
  appName = await determineAppName(parsedArgs);
489
506
  }
490
- const framework = await determineVueFramework(parsedArgs);
491
507
  if (framework === 'nuxt') {
492
508
  if (workspaceType === 'standalone') {
493
509
  preset = preset_1.Preset.NuxtStandalone;
@@ -864,6 +880,27 @@ async function determineNextAppDir(parsedArgs) {
864
880
  ]);
865
881
  return reply.nextAppDir === 'Yes';
866
882
  }
883
+ async function determineNextSrcDir(parsedArgs) {
884
+ if (parsedArgs.nextSrcDir !== undefined)
885
+ return parsedArgs.nextSrcDir;
886
+ const reply = await enquirer.prompt([
887
+ {
888
+ name: 'nextSrcDir',
889
+ message: 'Would you like to use the src/ directory?',
890
+ type: 'autocomplete',
891
+ choices: [
892
+ {
893
+ name: 'Yes',
894
+ },
895
+ {
896
+ name: 'No',
897
+ },
898
+ ],
899
+ initial: 'Yes',
900
+ },
901
+ ]);
902
+ return reply.nextSrcDir === 'Yes';
903
+ }
867
904
  async function determineVueFramework(parsedArgs) {
868
905
  if (!!parsedArgs.framework)
869
906
  return parsedArgs.framework;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nx-workspace",
3
- "version": "17.3.0-beta.5",
3
+ "version": "17.3.0-beta.8",
4
4
  "private": false,
5
5
  "description": "Smart Monorepos · Fast CI",
6
6
  "repository": {
@@ -6,7 +6,7 @@ const package_manager_1 = require("./utils/package-manager");
6
6
  const child_process_utils_1 = require("./utils/child-process-utils");
7
7
  const unparse_1 = require("./utils/unparse");
8
8
  async function createPreset(preset, parsedArgs, packageManager, directory) {
9
- const { skipGit, ci, commit, nxCloud, ...restArgs } = parsedArgs;
9
+ const { skipGit, commit, nxCloud, ...restArgs } = parsedArgs;
10
10
  let args = (0, unparse_1.unparse)({
11
11
  interactive: true,
12
12
  ...restArgs,
@@ -1,19 +1,14 @@
1
+ import { NxCloud } from './utils/nx/nx-cloud';
1
2
  import { PackageManager } from './utils/package-manager';
2
- import { CI } from './utils/ci/ci-list';
3
3
  export interface CreateWorkspaceOptions {
4
4
  name: string;
5
5
  packageManager: PackageManager;
6
- nxCloud: boolean;
6
+ nxCloud: NxCloud;
7
7
  /**
8
8
  * @description Enable interactive mode with presets
9
9
  * @default true
10
10
  */
11
11
  interactive?: boolean;
12
- /**
13
- * @description Generate a CI workflow file
14
- * @default ''
15
- */
16
- ci?: CI;
17
12
  /**
18
13
  * @description Default base to use for new projects. e.g. main, master
19
14
  * @default 'main'
@@ -11,7 +11,7 @@ const git_1 = require("./utils/git/git");
11
11
  const get_third_party_preset_1 = require("./utils/preset/get-third-party-preset");
12
12
  const error_utils_1 = require("./utils/error-utils");
13
13
  async function createWorkspace(preset, options) {
14
- const { packageManager, name, nxCloud, ci = '', skipGit = false, defaultBase = 'main', commit, cliName, } = options;
14
+ const { packageManager, name, nxCloud, skipGit = false, defaultBase = 'main', commit, cliName, } = options;
15
15
  if (cliName) {
16
16
  output_1.output.setCliName(cliName ?? 'NX');
17
17
  }
@@ -26,11 +26,11 @@ async function createWorkspace(preset, options) {
26
26
  await (0, create_preset_1.createPreset)(thirdPartyPreset, options, packageManager, directory);
27
27
  }
28
28
  let nxCloudInstallRes;
29
- if (nxCloud) {
29
+ if (nxCloud !== 'skip') {
30
30
  nxCloudInstallRes = await (0, nx_cloud_1.setupNxCloud)(directory, packageManager);
31
- }
32
- if (ci) {
33
- await (0, setup_ci_1.setupCI)(directory, ci, packageManager, nxCloud && nxCloudInstallRes?.code === 0);
31
+ if (nxCloud !== 'yes') {
32
+ await (0, setup_ci_1.setupCI)(directory, nxCloud, packageManager, nxCloudInstallRes?.code === 0);
33
+ }
34
34
  }
35
35
  if (!skipGit && commit) {
36
36
  try {
@@ -1,13 +1,9 @@
1
1
  import * as yargs from 'yargs';
2
- import { CI } from '../utils/ci/ci-list';
3
2
  import { PackageManager } from '../utils/package-manager';
3
+ import { NxCloud } from '../utils/nx/nx-cloud';
4
4
  export declare function determineNxCloud(parsedArgs: yargs.Arguments<{
5
- nxCloud: boolean;
6
- }>): Promise<boolean>;
7
- export declare function determineCI(parsedArgs: yargs.Arguments<{
8
- ci?: CI;
9
- allPrompts?: boolean;
10
- }>, nxCloud: boolean): Promise<string>;
5
+ nxCloud: NxCloud;
6
+ }>): Promise<NxCloud>;
11
7
  export declare function determineDefaultBase(parsedArgs: yargs.Arguments<{
12
8
  defaultBase?: string;
13
9
  }>): Promise<string>;
@@ -1,79 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.determinePackageManager = exports.determineDefaultBase = exports.determineCI = exports.determineNxCloud = void 0;
3
+ exports.determinePackageManager = exports.determineDefaultBase = exports.determineNxCloud = void 0;
4
4
  const ab_testing_1 = require("../utils/nx/ab-testing");
5
5
  const output_1 = require("../utils/output");
6
6
  const default_base_1 = require("../utils/git/default-base");
7
7
  const package_manager_1 = require("../utils/package-manager");
8
8
  const string_utils_1 = require("../utils/string-utils");
9
9
  const enquirer = require("enquirer");
10
+ const chalk = require("chalk");
10
11
  async function determineNxCloud(parsedArgs) {
11
12
  if (parsedArgs.nxCloud === undefined) {
12
- return enquirer
13
- .prompt([
14
- {
15
- name: 'NxCloud',
16
- message: ab_testing_1.messages.getPromptMessage('nxCloudCreation'),
17
- type: 'autocomplete',
18
- choices: [
19
- {
20
- name: 'Yes',
21
- hint: 'I want faster builds',
22
- },
23
- {
24
- name: 'No',
25
- },
26
- ],
27
- initial: 'Yes',
28
- },
29
- ])
30
- .then((a) => a.NxCloud === 'Yes');
13
+ return nxCloudPrompt('setupCI');
31
14
  }
32
15
  else {
33
16
  return parsedArgs.nxCloud;
34
17
  }
35
18
  }
36
19
  exports.determineNxCloud = determineNxCloud;
37
- async function determineCI(parsedArgs, nxCloud) {
38
- if (!nxCloud) {
39
- if (parsedArgs.ci) {
40
- output_1.output.warn({
41
- title: 'Invalid CI value',
42
- bodyLines: [
43
- `CI option only works when Nx Cloud is enabled.`,
44
- `The value provided will be ignored.`,
45
- ],
46
- });
47
- }
48
- return '';
20
+ async function nxCloudPrompt(key) {
21
+ const { message, choices, initial, fallback, footer, hint } = ab_testing_1.messages.getPrompt(key);
22
+ const promptConfig = {
23
+ name: 'NxCloud',
24
+ message,
25
+ type: 'autocomplete',
26
+ choices,
27
+ initial,
28
+ }; // meeroslav: types in enquirer are not up to date
29
+ if (footer) {
30
+ promptConfig.footer = () => chalk.dim(footer);
49
31
  }
50
- if (parsedArgs.ci) {
51
- return parsedArgs.ci;
32
+ if (hint) {
33
+ promptConfig.hint = () => chalk.dim(hint);
52
34
  }
53
- if (parsedArgs.allPrompts) {
54
- return (enquirer
55
- .prompt([
56
- {
57
- name: 'CI',
58
- message: `CI workflow file to generate? `,
59
- type: 'autocomplete',
60
- initial: '',
61
- choices: [
62
- { message: 'none', name: '' },
63
- { message: 'GitHub Actions', name: 'github' },
64
- { message: 'Circle CI', name: 'circleci' },
65
- { message: 'Azure DevOps', name: 'azure' },
66
- ],
67
- },
68
- ])
69
- // enquirer ignores name and value if they are falsy and takes
70
- // first field that has a truthy value, so wee need to explicitly
71
- // check for none
72
- .then((a) => (a.CI !== 'none' ? a.CI : '')));
73
- }
74
- return '';
35
+ return enquirer.prompt([promptConfig]).then((a) => {
36
+ if (fallback && a.NxCloud === fallback.value) {
37
+ return nxCloudPrompt(fallback.key);
38
+ }
39
+ return a.NxCloud;
40
+ });
75
41
  }
76
- exports.determineCI = determineCI;
77
42
  async function determineDefaultBase(parsedArgs) {
78
43
  if (parsedArgs.defaultBase) {
79
44
  return Promise.resolve(parsedArgs.defaultBase);
@@ -1,9 +1,6 @@
1
1
  import yargs = require('yargs');
2
2
  export declare function withNxCloud<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & {
3
- nxCloud: boolean | undefined;
4
- }>;
5
- export declare function withCI<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & {
6
- ci: string | undefined;
3
+ nxCloud: string | undefined;
7
4
  }>;
8
5
  export declare function withAllPrompts<T = unknown>(argv: yargs.Argv<T>): yargs.Argv<T & {
9
6
  allPrompts: boolean;
@@ -1,27 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.withOptions = exports.withGitOptions = exports.withPackageManager = exports.withAllPrompts = exports.withCI = exports.withNxCloud = void 0;
3
+ exports.withOptions = exports.withGitOptions = exports.withPackageManager = exports.withAllPrompts = exports.withNxCloud = void 0;
4
4
  const chalk = require("chalk");
5
- const ci_list_1 = require("../utils/ci/ci-list");
6
5
  const ab_testing_1 = require("../utils/nx/ab-testing");
7
6
  const package_manager_1 = require("../utils/package-manager");
8
7
  function withNxCloud(argv) {
8
+ const { message } = ab_testing_1.messages.getPrompt('setupCI');
9
9
  const result = argv.option('nxCloud', {
10
- describe: chalk.dim(ab_testing_1.messages.getPromptMessage('nxCloudCreation')),
11
- type: 'boolean',
10
+ alias: 'ci',
11
+ describe: chalk.dim(message),
12
+ choices: ab_testing_1.NxCloudChoices,
13
+ type: 'string',
12
14
  });
13
15
  return result;
14
16
  }
15
17
  exports.withNxCloud = withNxCloud;
16
- function withCI(argv) {
17
- return argv.option('ci', {
18
- describe: chalk.dim `Generate a CI workflow file`,
19
- choices: ci_list_1.ciList,
20
- defaultDescription: '',
21
- type: 'string',
22
- });
23
- }
24
- exports.withCI = withCI;
25
18
  function withAllPrompts(argv) {
26
19
  return argv.option('allPrompts', {
27
20
  alias: 'a',
@@ -1,17 +1,67 @@
1
+ export declare const NxCloudChoices: string[];
1
2
  declare const messageOptions: {
2
- readonly nxCloudCreation: readonly [{
3
- readonly code: "set-up-distributed-caching-ci";
4
- readonly message: "Enable remote caching to make your CI faster";
3
+ readonly setupCI: readonly [{
4
+ readonly code: "enable-nx-cloud";
5
+ readonly message: "Do you want Nx Cloud to make your CI fast?";
6
+ readonly initial: "github";
7
+ readonly choices: readonly [{
8
+ readonly value: "yes";
9
+ readonly name: "Yes, enable Nx Cloud";
10
+ }, {
11
+ readonly value: "github";
12
+ readonly name: "Yes, configure Nx Cloud for GitHub Actions";
13
+ }, {
14
+ readonly value: "circleci";
15
+ readonly name: "Yes, configure Nx Cloud for Circle CI";
16
+ }, {
17
+ readonly value: "skip";
18
+ readonly name: "Skip for now";
19
+ }];
20
+ readonly footer: "\nRead more about remote cache at https://nx.dev/ci/features/remote-cache";
21
+ readonly hint: "\n(it's free and can be disabled any time)";
22
+ readonly fallback: undefined;
23
+ }, {
24
+ readonly code: "set-up-ci";
25
+ readonly message: "Set up CI with caching, distribution and test deflaking";
26
+ readonly initial: "github";
27
+ readonly choices: readonly [{
28
+ readonly value: "github";
29
+ readonly name: "Yes, for GitHub Actions with Nx Cloud";
30
+ }, {
31
+ readonly value: "circleci";
32
+ readonly name: "Yes, for CircleCI with Nx Cloud";
33
+ }, {
34
+ readonly value: "skip";
35
+ readonly name: "Skip for now";
36
+ }];
37
+ readonly footer: "\nRead more about CI benefits with Nx at https://nx.dev/ci/intro/ci-with-nx";
38
+ readonly hint: "\n(it's free and can be disabled any time)";
39
+ readonly fallback: {
40
+ readonly value: "skip";
41
+ readonly key: "setupNxCloud";
42
+ };
5
43
  }];
6
- readonly nxCloudMigration: readonly [{
7
- readonly code: "make-ci-faster";
8
- readonly message: "Enable remote caching to make your CI faster?";
44
+ readonly setupNxCloud: readonly [{
45
+ readonly code: "enable-caching";
46
+ readonly message: "Would you like remote caching to make your build faster?";
47
+ readonly initial: "yes";
48
+ readonly choices: readonly [{
49
+ readonly value: "yes";
50
+ readonly name: "Yes";
51
+ }, {
52
+ readonly value: "skip";
53
+ readonly name: "Skip for now";
54
+ }];
55
+ readonly footer: "\nRead more about remote caching at https://nx.dev/ci/features/remote-cache";
56
+ readonly hint: "\n(it's free and can be disabled any time)";
57
+ readonly fallback: undefined;
9
58
  }];
10
59
  };
11
- type MessageKey = keyof typeof messageOptions;
60
+ export type MessageKey = keyof typeof messageOptions;
61
+ type MessageData = typeof messageOptions[MessageKey][number];
12
62
  export declare class PromptMessages {
13
63
  private selectedMessages;
14
- getPromptMessage(key: MessageKey): string;
64
+ getPrompt(key: MessageKey): MessageData;
15
65
  codeOfSelectedPromptMessage(key: MessageKey): string;
16
66
  }
17
67
  export declare const messages: PromptMessages;
@@ -23,6 +73,6 @@ export declare function recordStat(opts: {
23
73
  command: string;
24
74
  nxVersion: string;
25
75
  useCloud: boolean;
26
- meta: string;
76
+ meta: string[];
27
77
  }): Promise<void>;
28
78
  export {};
@@ -1,18 +1,50 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.recordStat = exports.messages = exports.PromptMessages = void 0;
3
+ exports.recordStat = exports.messages = exports.PromptMessages = exports.NxCloudChoices = void 0;
4
4
  const is_ci_1 = require("../ci/is-ci");
5
+ exports.NxCloudChoices = ['yes', 'github', 'circleci', 'skip'];
5
6
  const messageOptions = {
6
- nxCloudCreation: [
7
+ setupCI: [
7
8
  {
8
- code: 'set-up-distributed-caching-ci',
9
- message: `Enable remote caching to make your CI faster`,
9
+ code: 'enable-nx-cloud',
10
+ message: `Do you want Nx Cloud to make your CI fast?`,
11
+ initial: 'github',
12
+ choices: [
13
+ { value: 'yes', name: 'Yes, enable Nx Cloud' },
14
+ { value: 'github', name: 'Yes, configure Nx Cloud for GitHub Actions' },
15
+ { value: 'circleci', name: 'Yes, configure Nx Cloud for Circle CI' },
16
+ { value: 'skip', name: 'Skip for now' },
17
+ ],
18
+ footer: '\nRead more about remote cache at https://nx.dev/ci/features/remote-cache',
19
+ hint: `\n(it's free and can be disabled any time)`,
20
+ fallback: undefined,
21
+ },
22
+ {
23
+ code: 'set-up-ci',
24
+ message: `Set up CI with caching, distribution and test deflaking`,
25
+ initial: 'github',
26
+ choices: [
27
+ { value: 'github', name: 'Yes, for GitHub Actions with Nx Cloud' },
28
+ { value: 'circleci', name: 'Yes, for CircleCI with Nx Cloud' },
29
+ { value: 'skip', name: 'Skip for now' },
30
+ ],
31
+ footer: '\nRead more about CI benefits with Nx at https://nx.dev/ci/intro/ci-with-nx',
32
+ hint: `\n(it's free and can be disabled any time)`,
33
+ fallback: { value: 'skip', key: 'setupNxCloud' },
10
34
  },
11
35
  ],
12
- nxCloudMigration: [
36
+ setupNxCloud: [
13
37
  {
14
- code: 'make-ci-faster',
15
- message: `Enable remote caching to make your CI faster?`,
38
+ code: 'enable-caching',
39
+ message: `Would you like remote caching to make your build faster?`,
40
+ initial: 'yes',
41
+ choices: [
42
+ { value: 'yes', name: 'Yes' },
43
+ { value: 'skip', name: 'Skip for now' },
44
+ ],
45
+ footer: '\nRead more about remote caching at https://nx.dev/ci/features/remote-cache',
46
+ hint: `\n(it's free and can be disabled any time)`,
47
+ fallback: undefined,
16
48
  },
17
49
  ],
18
50
  };
@@ -20,7 +52,7 @@ class PromptMessages {
20
52
  constructor() {
21
53
  this.selectedMessages = {};
22
54
  }
23
- getPromptMessage(key) {
55
+ getPrompt(key) {
24
56
  if (this.selectedMessages[key] === undefined) {
25
57
  if (process.env.NX_GENERATE_DOCS_PROCESS === 'true') {
26
58
  this.selectedMessages[key] = 0;
@@ -29,12 +61,12 @@ class PromptMessages {
29
61
  this.selectedMessages[key] = Math.floor(Math.random() * messageOptions[key].length);
30
62
  }
31
63
  }
32
- return messageOptions[key][this.selectedMessages[key]].message;
64
+ return messageOptions[key][this.selectedMessages[key]];
33
65
  }
34
66
  codeOfSelectedPromptMessage(key) {
35
67
  const selected = this.selectedMessages[key];
36
68
  if (selected === undefined) {
37
- return messageOptions[key][0].code;
69
+ return '';
38
70
  }
39
71
  else {
40
72
  return messageOptions[key][selected].code;
@@ -65,7 +97,7 @@ async function recordStat(opts) {
65
97
  command: opts.command,
66
98
  isCI: (0, is_ci_1.isCI)(),
67
99
  useCloud: opts.useCloud,
68
- meta: opts.meta,
100
+ meta: opts.meta.filter((v) => !!v).join(','),
69
101
  });
70
102
  }
71
103
  catch (e) {
@@ -1,4 +1,5 @@
1
1
  import { PackageManager } from '../package-manager';
2
+ export type NxCloud = 'yes' | 'github' | 'circleci' | 'skip';
2
3
  export declare function setupNxCloud(directory: string, packageManager: PackageManager): Promise<{
3
4
  code: number;
4
5
  stdout: string;
@@ -20,6 +20,7 @@ export declare enum Preset {
20
20
  Nest = "nest",
21
21
  Express = "express",
22
22
  React = "react",
23
+ Vue = "vue",
23
24
  Angular = "angular",
24
25
  NodeStandalone = "node-standalone",
25
26
  NodeMonorepo = "node-monorepo",
@@ -24,6 +24,7 @@ var Preset;
24
24
  Preset["Nest"] = "nest";
25
25
  Preset["Express"] = "express";
26
26
  Preset["React"] = "react";
27
+ Preset["Vue"] = "vue";
27
28
  Preset["Angular"] = "angular";
28
29
  Preset["NodeStandalone"] = "node-standalone";
29
30
  Preset["NodeMonorepo"] = "node-monorepo";
@@ -1,2 +0,0 @@
1
- export declare const ciList: string[];
2
- export type CI = typeof ciList[number];
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ciList = void 0;
4
- exports.ciList = [
5
- 'github',
6
- 'circleci',
7
- 'azure',
8
- 'bitbucket-pipelines',
9
- 'gitlab',
10
- ];