create-nx-workspace 16.7.0-beta.1 → 16.7.0-beta.3

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
+ e2eTestRunner: 'none' | 'cypress' | 'playwright';
21
22
  }
22
23
  interface AngularArguments extends BaseArguments {
23
24
  stack: 'angular';
@@ -26,6 +27,7 @@ interface AngularArguments extends BaseArguments {
26
27
  style: string;
27
28
  routing: boolean;
28
29
  standaloneApi: boolean;
30
+ e2eTestRunner: 'none' | 'cypress' | 'playwright';
29
31
  }
30
32
  interface NodeArguments extends BaseArguments {
31
33
  stack: 'node';
@@ -78,6 +78,11 @@ exports.commandsObject = yargs
78
78
  .option('nextAppDir', {
79
79
  describe: chalk.dim `Enable the App Router for Next.js`,
80
80
  type: 'boolean',
81
+ })
82
+ .option('e2eTestRunner', {
83
+ describe: chalk.dim `Test runner to use for end to end (E2E) tests.`,
84
+ choices: ['cypress', 'playwright', 'none'],
85
+ type: 'string',
81
86
  }), yargs_options_1.withNxCloud, yargs_options_1.withCI, yargs_options_1.withAllPrompts, yargs_options_1.withPackageManager, yargs_options_1.withGitOptions), function handler(argv) {
82
87
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
83
88
  yield main(argv).catch((error) => {
@@ -338,6 +343,7 @@ function determineReactOptions(parsedArgs) {
338
343
  let style = undefined;
339
344
  let appName;
340
345
  let bundler = undefined;
346
+ let e2eTestRunner = undefined;
341
347
  let nextAppDir = false;
342
348
  if (parsedArgs.preset && parsedArgs.preset !== preset_1.Preset.React) {
343
349
  preset = parsedArgs.preset;
@@ -387,9 +393,11 @@ function determineReactOptions(parsedArgs) {
387
393
  }
388
394
  if (preset === preset_1.Preset.ReactStandalone || preset === preset_1.Preset.ReactMonorepo) {
389
395
  bundler = yield determineReactBundler(parsedArgs);
396
+ e2eTestRunner = yield determineE2eTestRunner(parsedArgs);
390
397
  }
391
398
  else if (preset === preset_1.Preset.NextJs || preset === preset_1.Preset.NextJsStandalone) {
392
399
  nextAppDir = yield determineNextAppDir(parsedArgs);
400
+ e2eTestRunner = yield determineE2eTestRunner(parsedArgs);
393
401
  }
394
402
  if (parsedArgs.style) {
395
403
  style = parsedArgs.style;
@@ -434,7 +442,7 @@ function determineReactOptions(parsedArgs) {
434
442
  ]);
435
443
  style = reply.style;
436
444
  }
437
- return { preset, style, appName, bundler, nextAppDir };
445
+ return { preset, style, appName, bundler, nextAppDir, e2eTestRunner };
438
446
  });
439
447
  }
440
448
  function determineAngularOptions(parsedArgs) {
@@ -443,6 +451,7 @@ function determineAngularOptions(parsedArgs) {
443
451
  let style;
444
452
  let appName;
445
453
  let standaloneApi;
454
+ let e2eTestRunner = undefined;
446
455
  let routing;
447
456
  if (parsedArgs.preset && parsedArgs.preset !== preset_1.Preset.Angular) {
448
457
  preset = parsedArgs.preset;
@@ -492,6 +501,7 @@ function determineAngularOptions(parsedArgs) {
492
501
  ]);
493
502
  style = reply.style;
494
503
  }
504
+ e2eTestRunner = yield determineE2eTestRunner(parsedArgs);
495
505
  if (parsedArgs.standaloneApi !== undefined) {
496
506
  standaloneApi = parsedArgs.standaloneApi;
497
507
  }
@@ -536,7 +546,7 @@ function determineAngularOptions(parsedArgs) {
536
546
  ]);
537
547
  routing = reply.routing === 'Yes';
538
548
  }
539
- return { preset, style, appName, standaloneApi, routing };
549
+ return { preset, style, appName, standaloneApi, routing, e2eTestRunner };
540
550
  });
541
551
  }
542
552
  function determineNodeOptions(parsedArgs) {
@@ -805,3 +815,31 @@ function determineNodeFramework(parsedArgs) {
805
815
  return reply.framework;
806
816
  });
807
817
  }
818
+ function determineE2eTestRunner(parsedArgs) {
819
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
820
+ if (parsedArgs.e2eTestRunner)
821
+ return parsedArgs.e2eTestRunner;
822
+ const reply = yield enquirer.prompt([
823
+ {
824
+ message: 'Test runner to use for end to end (E2E) tests',
825
+ type: 'autocomplete',
826
+ name: 'e2eTestRunner',
827
+ choices: [
828
+ {
829
+ name: 'cypress',
830
+ message: 'Cypress [ https://www.cypress.io/ ]',
831
+ },
832
+ {
833
+ name: 'playwright',
834
+ message: 'Playwright [ https://playwright.dev/ ]',
835
+ },
836
+ {
837
+ name: 'none',
838
+ message: 'None',
839
+ },
840
+ ],
841
+ },
842
+ ]);
843
+ return reply.e2eTestRunner;
844
+ });
845
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nx-workspace",
3
- "version": "16.7.0-beta.1",
3
+ "version": "16.7.0-beta.3",
4
4
  "private": false,
5
5
  "description": "Smart, Fast and Extensible Build System",
6
6
  "repository": {
@@ -43,5 +43,5 @@
43
43
  },
44
44
  "main": "./index.js",
45
45
  "types": "./index.d.ts",
46
- "gitHead": "50a145bb64edcf76985184a9a83d1449dcd4f3d9"
46
+ "gitHead": "118faf4e432667fd041954d96aa6c9c99fea5ebd"
47
47
  }