create-nx-workspace 22.2.5 → 22.2.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"create-nx-workspace.d.ts","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/bin/create-nx-workspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,sBAAsB,EAEvB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAyDnE,UAAU,aAAc,SAAQ,sBAAsB;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,aAAc,SAAQ,aAAa;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,YAAY,CAAC;IAC9D,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,UAAU,cAAe,SAAQ,aAAa;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,YAAY,GAAG,YAAY,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM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SAAS,GACV,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,qBAAqB,CAAC;AAE1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CA4KrB,CAAC;AA+L7B,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAaxD"}
1
+ {"version":3,"file":"create-nx-workspace.d.ts","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/bin/create-nx-workspace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,sBAAsB,EAEvB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AA2DnE,UAAU,aAAc,SAAQ,sBAAsB;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,aAAc,SAAQ,aAAa;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,YAAY,CAAC;IAC9D,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,UAAU,cAAe,SAAQ,aAAa;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,YAAY,GAAG,YAAY,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,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AM,GAAG,MAAM,CAAC;CACjC;AAED,UAAU,qBAAsB,SAAQ,aAAa;IACnD,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,KAAK,SAAS,GACV,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,aAAa,GACb,qBAAqB,CAAC;AAE1B,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAgLrB,CAAC;AAsP7B,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAaxD"}
@@ -37,6 +37,8 @@ let chosenTemplate;
37
37
  let chosenPreset;
38
38
  // Track whether user opted into cloud or not for SIGINT handler.
39
39
  let useCloud;
40
+ // For stats
41
+ let packageManager;
40
42
  exports.commandsObject = yargs
41
43
  .wrap(yargs.terminalWidth())
42
44
  .parserConfiguration({
@@ -162,7 +164,11 @@ exports.commandsObject = yargs
162
164
  flowVariant: (0, ab_testing_1.getFlowVariant)(),
163
165
  errorCode,
164
166
  errorMessage,
165
- errorFile,
167
+ errorFile: errorFile ?? '',
168
+ template: chosenTemplate ?? '',
169
+ preset: chosenPreset ?? '',
170
+ nodeVersion: process.versions.node ?? '',
171
+ packageManager: packageManager ?? '',
166
172
  },
167
173
  });
168
174
  if (error instanceof error_utils_1.CnwError) {
@@ -235,6 +241,8 @@ async function main(parsedArgs) {
235
241
  template: chosenTemplate ?? '',
236
242
  preset: chosenPreset ?? '',
237
243
  connectUrl: workspaceInfo.connectUrl ?? '',
244
+ nodeVersion: process.versions.node,
245
+ packageManager: packageManager ?? '',
238
246
  },
239
247
  });
240
248
  if (parsedArgs.nxCloud && workspaceInfo.nxCloudInfo) {
@@ -268,6 +276,7 @@ async function normalizeArgsMiddleware(argv) {
268
276
  meta: {
269
277
  type: 'start',
270
278
  flowVariant: (0, ab_testing_1.getFlowVariant)(),
279
+ nodeVersion: process.versions.node,
271
280
  },
272
281
  });
273
282
  try {
@@ -282,14 +291,28 @@ async function normalizeArgsMiddleware(argv) {
282
291
  const completionMessageKey = nxCloud === 'skip'
283
292
  ? undefined
284
293
  : ab_testing_1.messages.completionMessageOfSelectedPrompt('setupNxCloudV2');
294
+ packageManager = (0, package_manager_1.detectInvokedPackageManager)();
285
295
  Object.assign(argv, {
286
296
  nxCloud,
287
297
  useGitHub: nxCloud !== 'skip',
288
298
  completionMessageKey,
289
- packageManager: (0, package_manager_1.detectInvokedPackageManager)(),
299
+ packageManager,
290
300
  defaultBase: 'main',
291
301
  aiAgents,
292
302
  });
303
+ await (0, ab_testing_1.recordStat)({
304
+ nxVersion: nx_version_1.nxVersion,
305
+ command: 'create-nx-workspace',
306
+ useCloud: nxCloud !== 'skip',
307
+ meta: {
308
+ type: 'precreate',
309
+ flowVariant: (0, ab_testing_1.getFlowVariant)(),
310
+ template: chosenTemplate,
311
+ preset: '',
312
+ nodeVersion: process.versions.node ?? '',
313
+ packageManager,
314
+ },
315
+ });
293
316
  }
294
317
  else {
295
318
  // Preset flow - existing behavior
@@ -307,21 +330,57 @@ async function normalizeArgsMiddleware(argv) {
307
330
  throw new error_utils_1.CnwError('INVALID_PRESET', `Could not find preset "${argv.preset}": ${message}`);
308
331
  }
309
332
  }
310
- const packageManager = await (0, prompts_1.determinePackageManager)(argv);
333
+ packageManager = await (0, prompts_1.determinePackageManager)(argv);
311
334
  const aiAgents = await (0, prompts_1.determineAiAgents)(argv);
312
335
  const defaultBase = await (0, prompts_1.determineDefaultBase)(argv);
313
- const nxCloud = argv.skipGit === true ? 'skip' : await (0, prompts_1.determineNxCloud)(argv);
314
- const useGitHub = nxCloud === 'skip'
315
- ? undefined
316
- : nxCloud === 'github' || (await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
336
+ // Check if CLI arg was provided (use rawArgs to check original input)
337
+ const cliNxCloudArgProvided = rawArgs.nxCloud !== undefined;
338
+ let nxCloud;
339
+ let useGitHub;
340
+ let completionMessageKey;
341
+ if (argv.skipGit === true) {
342
+ nxCloud = 'skip';
343
+ useGitHub = undefined;
344
+ }
345
+ else if (cliNxCloudArgProvided) {
346
+ // CLI arg provided: use existing flow (CI provider selection if needed)
347
+ nxCloud = await (0, prompts_1.determineNxCloud)(argv);
348
+ useGitHub =
349
+ nxCloud === 'skip'
350
+ ? undefined
351
+ : nxCloud === 'github' || (await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
352
+ }
353
+ else {
354
+ // No CLI arg: use simplified prompt (same as template flow)
355
+ nxCloud = await (0, prompts_1.determineNxCloudV2)(argv);
356
+ useGitHub = nxCloud !== 'skip';
357
+ completionMessageKey =
358
+ nxCloud === 'skip'
359
+ ? undefined
360
+ : ab_testing_1.messages.completionMessageOfSelectedPrompt('setupNxCloudV2');
361
+ }
317
362
  Object.assign(argv, {
318
363
  nxCloud,
319
364
  useGitHub,
365
+ completionMessageKey,
320
366
  packageManager,
321
367
  defaultBase,
322
368
  aiAgents,
323
369
  });
324
370
  chosenPreset = argv.preset;
371
+ await (0, ab_testing_1.recordStat)({
372
+ nxVersion: nx_version_1.nxVersion,
373
+ command: 'create-nx-workspace',
374
+ useCloud: nxCloud !== 'skip',
375
+ meta: {
376
+ type: 'precreate',
377
+ flowVariant: (0, ab_testing_1.getFlowVariant)(),
378
+ template: '',
379
+ preset: chosenPreset ?? '',
380
+ nodeVersion: process.versions.node ?? '',
381
+ packageManager,
382
+ },
383
+ });
325
384
  }
326
385
  }
327
386
  catch (e) {
@@ -357,8 +416,22 @@ async function determineFolder(parsedArgs) {
357
416
  : parsedArgs.name;
358
417
  if (folderName) {
359
418
  validateWorkspaceName(folderName);
419
+ // If directory exists, either re-prompt (interactive) or error (non-interactive)
420
+ if ((0, fs_1.existsSync)(folderName)) {
421
+ if (parsedArgs.interactive && !(0, is_ci_1.isCI)()) {
422
+ output_1.output.warn({
423
+ title: `Directory ${folderName} already exists.`,
424
+ });
425
+ // Re-prompt for a new folder name
426
+ return promptForFolder(parsedArgs);
427
+ }
428
+ throw new error_utils_1.CnwError('DIRECTORY_EXISTS', `The directory '${folderName}' already exists. Choose a different name or remove the existing directory.`);
429
+ }
360
430
  return folderName;
361
431
  }
432
+ return promptForFolder(parsedArgs);
433
+ }
434
+ async function promptForFolder(parsedArgs) {
362
435
  const reply = await enquirer.prompt([
363
436
  {
364
437
  name: 'folderName',
@@ -366,11 +439,24 @@ async function determineFolder(parsedArgs) {
366
439
  initial: 'org',
367
440
  type: 'input',
368
441
  skip: !parsedArgs.interactive || (0, is_ci_1.isCI)(),
442
+ validate: (value) => {
443
+ if (!value) {
444
+ return 'Folder name cannot be empty';
445
+ }
446
+ if (!/^[a-zA-Z]/.test(value)) {
447
+ return 'Workspace name must start with a letter';
448
+ }
449
+ if ((0, fs_1.existsSync)(value)) {
450
+ return `The directory '${value}' already exists`;
451
+ }
452
+ return true;
453
+ },
369
454
  },
370
455
  ]);
456
+ // Fallback invariants in case validate is bypassed (e.g., in CI or non-interactive mode)
371
457
  invariant(reply.folderName, 'INVALID_FOLDER_NAME', 'Folder name cannot be empty');
372
458
  validateWorkspaceName(reply.folderName);
373
- invariant(!(0, fs_1.existsSync)(reply.folderName), 'DIRECTORY_EXISTS', `The folder '${reply.folderName}' already exists`);
459
+ invariant(!(0, fs_1.existsSync)(reply.folderName), 'DIRECTORY_EXISTS', `The directory '${reply.folderName}' already exists. Choose a different name or remove the existing directory.`);
374
460
  return reply.folderName;
375
461
  }
376
462
  async function determineStack(parsedArgs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nx-workspace",
3
- "version": "22.2.5",
3
+ "version": "22.2.7",
4
4
  "private": false,
5
5
  "description": "Smart Repos · Fast Builds",
6
6
  "repository": {
@@ -1 +1 @@
1
- {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/src/create-workspace.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAGL,aAAa,EACd,MAAM,iBAAiB,CAAC;AAsBzB,wBAAgB,4BAA4B,IAAI;IAC9C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAEA;AAED,wBAAsB,eAAe,CAAC,CAAC,SAAS,sBAAsB,EACpE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC;;;;;GA8KZ;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI7D"}
1
+ {"version":3,"file":"create-workspace.d.ts","sourceRoot":"","sources":["../../../../packages/create-nx-workspace/src/create-workspace.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAGL,aAAa,EACd,MAAM,iBAAiB,CAAC;AAsBzB,wBAAgB,4BAA4B,IAAI;IAC9C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAEA;AAED,wBAAsB,eAAe,CAAC,CAAC,SAAS,sBAAsB,EACpE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC;;;;;GAgLZ;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI7D"}
@@ -87,20 +87,22 @@ async function createWorkspace(preset, options, rawArgs) {
87
87
  }
88
88
  }
89
89
  const isTemplate = !!options.template;
90
- // Only generate CI for preset flow (not template)
91
- if (nxCloud !== 'skip' && !isTemplate && nxCloud !== 'yes') {
92
- await (0, setup_ci_1.setupCI)(directory, nxCloud, packageManager);
90
+ // Generate CI for preset flow (not template)
91
+ // When nxCloud === 'yes' (from simplified prompt), use GitHub as the CI provider
92
+ if (nxCloud !== 'skip' && !isTemplate) {
93
+ const ciProvider = nxCloud === 'yes' ? 'github' : nxCloud;
94
+ await (0, setup_ci_1.setupCI)(directory, ciProvider, packageManager);
93
95
  }
94
96
  let pushedToVcs = git_1.VcsPushStatus.SkippedGit;
95
97
  if (!skipGit) {
96
98
  try {
97
99
  await (0, git_1.initializeGitRepo)(directory, { defaultBase, commit });
98
100
  // Push to GitHub if commit was made, GitHub push is not skipped, and:
99
- // - CI provider is GitHub (preset flow), OR
100
- // - Using template flow with Nx Cloud enabled (yes)
101
+ // - CI provider is GitHub (preset flow with CLI arg), OR
102
+ // - Nx Cloud enabled via simplified prompt (nxCloud === 'yes')
101
103
  if (commit &&
102
104
  !skipGitHubPush &&
103
- (nxCloud === 'github' || (isTemplate && nxCloud === 'yes'))) {
105
+ (nxCloud === 'github' || nxCloud === 'yes')) {
104
106
  pushedToVcs = await (0, git_1.pushToGitHub)(directory, {
105
107
  skipGitHubPush,
106
108
  name,
@@ -51,15 +51,24 @@ export interface RecordStatMetaComplete {
51
51
  export interface RecordStatMetaError {
52
52
  type: 'error';
53
53
  errorCode: string;
54
- flowVariant?: string;
55
- errorMessage?: string;
56
- errorFile?: string;
54
+ flowVariant: string;
55
+ errorMessage: string;
56
+ errorFile: string;
57
+ [key: string]: string;
57
58
  }
58
59
  export interface RecordStatMetaCancel {
59
60
  type: 'cancel';
60
61
  flowVariant?: string;
61
62
  }
62
- export type RecordStatMeta = RecordStatMetaStart | RecordStatMetaComplete | RecordStatMetaError | RecordStatMetaCancel;
63
+ export interface RecordStatMetaPrecreate {
64
+ type: 'precreate';
65
+ flowVariant: string;
66
+ template: string;
67
+ preset: string;
68
+ nodeVersion: string;
69
+ packageManager: string;
70
+ }
71
+ export type RecordStatMeta = RecordStatMetaStart | RecordStatMetaComplete | RecordStatMetaError | RecordStatMetaCancel | RecordStatMetaPrecreate;
63
72
  /**
64
73
  * We are incrementing a counter to track how often create-nx-workspace is used in CI
65
74
  * vs dev environments. No personal information is collected.
@@ -1 +1 @@
1
- {"version":3,"file":"ab-testing.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/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,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,cAAc,GACtB,mBAAmB,GACnB,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;CACtB,iBAuBA"}
1
+ {"version":3,"file":"ab-testing.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/ab-testing.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAsDvD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAO/C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAKvC;AAED,eAAO,MAAM,cAAc,UAQ1B,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAsGjD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,cAAc,CAAC;AACrD,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC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IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GACtB,mBAAmB,GACnB,sBAAsB,GACtB,mBAAmB,GACnB,oBAAoB,GACpB,uBAAuB,CAAC;AAE5B;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,CAAC;CACtB,iBAuBA"}
@@ -8,7 +8,7 @@ const path_1 = require("path");
8
8
  const error_utils_1 = require("../error-utils");
9
9
  async function cloneTemplate(templateUrl, targetDirectory) {
10
10
  if ((0, fs_1.existsSync)(targetDirectory)) {
11
- throw new error_utils_1.CnwError('DIRECTORY_EXISTS', `The directory '${targetDirectory}' already exists and is not empty. Choose a different name or remove the existing directory.`);
11
+ throw new error_utils_1.CnwError('DIRECTORY_EXISTS', `The directory '${targetDirectory}' already exists. Choose a different name or remove the existing directory.`);
12
12
  }
13
13
  try {
14
14
  await (0, child_process_utils_1.execAndWait)(`git clone --depth 1 "${templateUrl}" "${targetDirectory}"`, process.cwd());