create-nx-workspace 22.5.3 → 22.5.4

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;AAsEnE,KAAK,qBAAqB,GACtB,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,eAAe,CAAC;AAEpB,UAAU,aAAc,SAAQ,sBAAsB;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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;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AC;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,CAoMrB,CAAC;AAib7B,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;AAsEnE,KAAK,qBAAqB,GACtB,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,eAAe,CAAC;AAEpB,UAAU,aAAc,SAAQ,sBAAsB;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,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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AG,YAAY,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,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,CAoMrB,CAAC;AA4Y7B,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAaxD"}
@@ -495,55 +495,14 @@ async function normalizeArgsMiddleware(argv) {
495
495
  packageManager = await (0, prompts_1.determinePackageManager)(argv);
496
496
  const aiAgents = await (0, prompts_1.determineAiAgents)(argv);
497
497
  const defaultBase = await (0, prompts_1.determineDefaultBase)(argv);
498
- // Check if CLI arg was provided (use rawArgs to check original input)
499
- const cliNxCloudArgProvided = rawArgs.nxCloud !== undefined;
500
- let nxCloud;
501
- let useGitHub;
502
- let completionMessageKey;
503
- let skipCloudConnect = false;
504
- let neverConnectToCloud = false;
505
- if (argv.skipGit === true) {
506
- nxCloud = 'skip';
507
- useGitHub = undefined;
508
- }
509
- else if (cliNxCloudArgProvided) {
510
- // CLI arg provided: use existing flow (CI provider selection if needed)
511
- nxCloud = await (0, prompts_1.determineNxCloud)(argv);
512
- useGitHub =
513
- nxCloud === 'skip' || nxCloud === 'never'
514
- ? undefined
515
- : nxCloud === 'github' || (await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
516
- if (nxCloud === 'never') {
517
- neverConnectToCloud = true;
518
- }
519
- }
520
- else {
521
- // No CLI arg: use simplified prompt (same as template flow)
522
- const cloudChoice = await (0, prompts_1.determineNxCloudV2)(argv);
523
- if (cloudChoice === 'yes') {
524
- nxCloud = 'yes';
525
- skipCloudConnect = false;
526
- }
527
- else if (cloudChoice === 'skip') {
528
- nxCloud = 'skip';
529
- }
530
- else {
531
- nxCloud = 'never';
532
- neverConnectToCloud = true;
533
- }
534
- useGitHub =
535
- nxCloud !== 'skip' && nxCloud !== 'never' ? true : undefined;
536
- completionMessageKey =
537
- cloudChoice === 'never'
538
- ? undefined
539
- : (0, ab_testing_1.getCompletionMessageKeyForVariant)();
540
- }
498
+ // NXC-4020: Restored v22.1.3 simple flow (CI prompt caching fallback)
499
+ const nxCloud = argv.skipGit === true ? 'skip' : await (0, prompts_1.determineNxCloud)(argv);
500
+ const useGitHub = nxCloud === 'skip'
501
+ ? undefined
502
+ : nxCloud === 'github' || (await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
541
503
  Object.assign(argv, {
542
504
  nxCloud,
543
505
  useGitHub,
544
- skipCloudConnect,
545
- neverConnectToCloud,
546
- completionMessageKey,
547
506
  packageManager,
548
507
  defaultBase,
549
508
  aiAgents,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nx-workspace",
3
- "version": "22.5.3",
3
+ "version": "22.5.4",
4
4
  "private": false,
5
5
  "description": "Smart Monorepos · 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;AA4BzB,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,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC;;;;;GA6PZ;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;AA4BzB,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,GAAG,SAAS,EAC1B,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC;;;;;GA+QZ;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI7D"}
@@ -89,20 +89,18 @@ async function createWorkspace(preset, options, rawArgs) {
89
89
  }
90
90
  }
91
91
  else {
92
- // Preset flow - existing behavior
92
+ // NXC-4020: Preset flow restored to match v22.1.3
93
93
  if (!preset) {
94
94
  throw new Error('Preset is required when not using a template. Please provide --preset or --template.');
95
95
  }
96
96
  const tmpDir = await (0, create_sandbox_1.createSandbox)(packageManager);
97
97
  const workspaceGlobs = getWorkspaceGlobsFromPreset(preset);
98
- // nx new requires a preset currently. We should probably make it optional.
98
+ // NXC-4020: Pass actual nxCloud value (v22.1.3 behavior) so nxCloudId is set in nx.json
99
+ // Previous: nxCloud: 'skip' override to defer cloud connection
99
100
  directory = await (0, create_empty_workspace_1.createEmptyWorkspace)(tmpDir, name, packageManager, {
100
101
  ...options,
101
102
  preset,
102
103
  workspaceGlobs,
103
- // We want new workspaces to have a short URL to finish Cloud onboarding, but not have nxCloudId set up since it will be handled as part of the onboarding flow.
104
- // This is skipping nxCloudId for the "custom" flow.
105
- nxCloud: 'skip',
106
104
  });
107
105
  // Mark workspace as ready for SIGINT handler
108
106
  workspaceDirectory = directory;
@@ -115,16 +113,34 @@ async function createWorkspace(preset, options, rawArgs) {
115
113
  }
116
114
  }
117
115
  const isTemplate = !!options.template;
118
- // Generate CI for preset flow (not template)
119
- // When nxCloud === 'yes' (from simplified prompt), use GitHub as the CI provider
120
- if (nxCloud !== 'skip' && nxCloud !== 'never' && !isTemplate) {
121
- const ciProvider = nxCloud === 'yes' ? 'github' : nxCloud;
122
- await (0, setup_ci_1.setupCI)(directory, ciProvider, packageManager);
123
- }
124
116
  // Handle "Never" opt-out: set neverConnectToCloud in nx.json
125
117
  if (options.neverConnectToCloud) {
126
118
  (0, nx_cloud_1.setNeverConnectToCloud)(directory);
127
119
  }
120
+ // NXC-4020: Preset flow cloud handling matches v22.1.3 exactly:
121
+ // 1. Read token (cloud was connected during createEmptyWorkspace)
122
+ // 2. Setup CI for specific providers (not 'yes')
123
+ // 3. Generate onboarding URL
124
+ // 4. Git init with connectUrl
125
+ // 5. Show completion message
126
+ let connectUrl;
127
+ let nxCloudInfo;
128
+ if (!isTemplate && nxCloud !== 'skip' && nxCloud !== 'never') {
129
+ const token = (0, nx_cloud_1.readNxCloudToken)(directory);
130
+ if (nxCloud !== 'yes') {
131
+ await (0, setup_ci_1.setupCI)(directory, nxCloud, packageManager);
132
+ }
133
+ connectUrl = await (0, nx_cloud_1.createNxCloudOnboardingUrl)(nxCloud, token, directory, useGitHub);
134
+ // Store for SIGINT handler
135
+ cloudConnectUrl = connectUrl;
136
+ }
137
+ // Template flow: CI setup and cloud connection handled separately
138
+ if (isTemplate &&
139
+ nxCloud !== 'skip' &&
140
+ nxCloud !== 'never' &&
141
+ nxCloud !== 'yes') {
142
+ await (0, setup_ci_1.setupCI)(directory, nxCloud, packageManager);
143
+ }
128
144
  let pushedToVcs = git_1.VcsPushStatus.SkippedGit;
129
145
  if (!skipGit) {
130
146
  const aiMode = (0, ai_output_1.isAiAgent)();
@@ -132,13 +148,11 @@ async function createWorkspace(preset, options, rawArgs) {
132
148
  (0, ai_output_1.logProgress)('initializing', 'Initializing git repository...');
133
149
  }
134
150
  try {
135
- await (0, git_1.initializeGitRepo)(directory, { defaultBase, commit });
136
- // Push to GitHub if commit was made, GitHub push is not skipped, and:
137
- // - CI provider is GitHub (preset flow with CLI arg), OR
138
- // - Nx Cloud enabled via simplified prompt (nxCloud === 'yes')
139
- if (commit &&
140
- !skipGitHubPush &&
141
- (nxCloud === 'github' || nxCloud === 'yes')) {
151
+ // NXC-4020: Pass connectUrl to git init (v22.1.3 behavior)
152
+ await (0, git_1.initializeGitRepo)(directory, { defaultBase, commit, connectUrl });
153
+ // NXC-4020: Only push for github CI provider (v22.1.3 behavior)
154
+ // Previous: also pushed for nxCloud === 'yes'
155
+ if (commit && !skipGitHubPush && nxCloud === 'github') {
142
156
  pushedToVcs = await (0, git_1.pushToGitHub)(directory, {
143
157
  skipGitHubPush,
144
158
  name,
@@ -149,57 +163,51 @@ async function createWorkspace(preset, options, rawArgs) {
149
163
  }
150
164
  catch (e) {
151
165
  if (e instanceof Error) {
152
- if (!aiMode) {
166
+ if (!(0, ai_output_1.isAiAgent)()) {
153
167
  output_1.output.error({
154
168
  title: 'Could not initialize git repository',
155
169
  bodyLines: (0, error_utils_1.mapErrorToBodyLines)(e),
156
170
  });
157
171
  }
158
- // In AI mode, error will be handled by the caller
159
172
  }
160
173
  else {
161
174
  console.error(e);
162
175
  }
163
176
  }
164
177
  }
165
- // Create onboarding URL AFTER git operations so getVcsRemoteInfo() can detect the repo
166
- let connectUrl;
167
- let nxCloudInfo;
168
- if (nxCloud !== 'skip' && nxCloud !== 'never') {
169
- // "Yes" or "Maybe later" — generate URL, update README, show banner
170
- const aiModeForCloud = (0, ai_output_1.isAiAgent)();
171
- if (aiModeForCloud) {
172
- (0, ai_output_1.logProgress)('configuring', 'Configuring Nx Cloud...');
173
- }
174
- // skipCloudConnect=true (Maybe later): Skip readNxCloudToken() since no token exists
175
- // skipCloudConnect=false (Yes): Read the token as before (cloud was connected)
176
- const token = options.skipCloudConnect
177
- ? undefined
178
- : (0, nx_cloud_1.readNxCloudToken)(directory);
179
- connectUrl = await (0, nx_cloud_1.createNxCloudOnboardingUrl)(nxCloud, token, directory, useGitHub);
180
- // Store for SIGINT handler
181
- cloudConnectUrl = connectUrl;
182
- // Update README with connect URL (strips markers, adds connect section)
183
- // Then commit the change - amend if not pushed, new commit if already pushed
184
- if (isTemplate) {
178
+ // NXC-4020: Preset flow completion message matches v22.1.3
179
+ if (!isTemplate && connectUrl) {
180
+ nxCloudInfo = await (0, nx_cloud_1.getNxCloudInfo)(nxCloud, connectUrl, pushedToVcs, rawArgs?.nxCloud);
181
+ }
182
+ // Template flow: cloud URL generation and completion message
183
+ if (isTemplate) {
184
+ if (nxCloud !== 'skip' && nxCloud !== 'never') {
185
+ const aiModeForCloud = (0, ai_output_1.isAiAgent)();
186
+ if (aiModeForCloud) {
187
+ (0, ai_output_1.logProgress)('configuring', 'Configuring Nx Cloud...');
188
+ }
189
+ const token = options.skipCloudConnect
190
+ ? undefined
191
+ : (0, nx_cloud_1.readNxCloudToken)(directory);
192
+ connectUrl = await (0, nx_cloud_1.createNxCloudOnboardingUrl)(nxCloud, token, directory, useGitHub);
193
+ cloudConnectUrl = connectUrl;
185
194
  const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, connectUrl);
186
195
  if (readmeUpdated && !skipGit && commit) {
187
196
  const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
188
197
  await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
189
198
  }
199
+ nxCloudInfo = await (0, nx_cloud_1.getNxCloudInfo)(nxCloud, connectUrl, pushedToVcs);
190
200
  }
191
- nxCloudInfo = await (0, nx_cloud_1.getNxCloudInfo)(connectUrl, pushedToVcs, options.completionMessageKey, name);
192
- }
193
- else if (isTemplate && (nxCloud === 'skip' || nxCloud === 'never')) {
194
- // Strip marker comments from README
195
- const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, undefined);
196
- if (readmeUpdated && !skipGit && commit) {
197
- const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
198
- await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
199
- }
200
- // Only show "nx connect" message for 'skip', not 'never'
201
- if (nxCloud === 'skip') {
202
- nxCloudInfo = (0, nx_cloud_1.getSkippedNxCloudInfo)();
201
+ else {
202
+ // Strip marker comments from README
203
+ const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, undefined);
204
+ if (readmeUpdated && !skipGit && commit) {
205
+ const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
206
+ await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
207
+ }
208
+ if (nxCloud === 'skip') {
209
+ nxCloudInfo = (0, nx_cloud_1.getSkippedNxCloudInfo)();
210
+ }
203
211
  }
204
212
  }
205
213
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../../packages/create-nx-workspace/src/internal-utils/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAEL,cAAc,EAEf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EACL,KAAK,EAGN,MAAM,6BAA6B,CAAC;AAGrC,wBAAsB,gBAAgB,CACpC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,GAChD,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAAE,OAAO,CAAC,EAAE,M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B,uBAAuB,CAC3C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,GACtD,OAAO,CAAC,cAAc,CAAC,CAiCzB"}
@@ -11,7 +11,6 @@ const enquirer = require("enquirer");
11
11
  const chalk = require("chalk");
12
12
  const ab_testing_1 = require("../utils/nx/ab-testing");
13
13
  const default_base_1 = require("../utils/git/default-base");
14
- const git_1 = require("../utils/git/git");
15
14
  const package_manager_1 = require("../utils/package-manager");
16
15
  const string_utils_1 = require("../utils/string-utils");
17
16
  const is_ci_1 = require("../utils/ci/is-ci");
@@ -90,47 +89,7 @@ async function nxCloudPrompt(key) {
90
89
  async function determineTemplate(parsedArgs) {
91
90
  if (parsedArgs.template)
92
91
  return parsedArgs.template;
93
- if (parsedArgs.preset)
94
- return 'custom';
95
- if (!parsedArgs.interactive || (0, is_ci_1.isCI)())
96
- return 'custom';
97
- // Docs generation needs preset flow to document all presets
98
- if (process.env.NX_GENERATE_DOCS_PROCESS === 'true')
99
- return 'custom';
100
- // Template flow requires git for cloning - fall back to custom preset if git is not available
101
- if (!(0, git_1.isGitAvailable)())
102
- return 'custom';
103
- const { template } = await enquirer.prompt([
104
- {
105
- name: 'template',
106
- message: 'Which starter do you want to use?',
107
- type: 'autocomplete',
108
- choices: [
109
- {
110
- name: 'nrwl/empty-template',
111
- message: 'Minimal (empty monorepo without projects)',
112
- },
113
- {
114
- name: 'nrwl/react-template',
115
- message: 'React (fullstack monorepo with React and Express)',
116
- },
117
- {
118
- name: 'nrwl/angular-template',
119
- message: 'Angular (fullstack monorepo with Angular and Express)',
120
- },
121
- {
122
- name: 'nrwl/typescript-template',
123
- message: 'NPM Packages (monorepo with TypeScript packages ready to publish)',
124
- },
125
- {
126
- name: 'custom',
127
- message: 'Custom (advanced setup with additional frameworks)',
128
- },
129
- ],
130
- initial: 0,
131
- },
132
- ]);
133
- return template;
92
+ return 'custom';
134
93
  }
135
94
  async function determineAiAgents(parsedArgs) {
136
95
  return parsedArgs.aiAgents ?? [];
@@ -1 +1 @@
1
- {"version":3,"file":"ab-testing.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/ab-testing.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAsEtE;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAKvC;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,IAAI,oBAAoB,CAExE;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAI/C;AAiBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAQ/D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa,CAajE;AAED,eAAO,MAAM,cAAc,UAS1B,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CA6DjD,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,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,UAAU,CAAA;KAAE,CAAC;IAC9C,iBAAiB,EAAE,oBAAoB,CAAC;CACzC;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,gBAAgB,CAAwC;IAEhE,SAAS,CAAC,GAAG,EAAE,UAAU,GAAG,W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oB,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"}
@@ -133,16 +133,7 @@ function isEnterpriseCloudUrl(cloudUrl) {
133
133
  * @param cloudUrl - The Nx Cloud URL. If enterprise, always returns '0'.
134
134
  */
135
135
  function getBannerVariant(cloudUrl) {
136
- // Enterprise URLs always get plain link (variant 0)
137
- if (isEnterpriseCloudUrl(cloudUrl)) {
138
- return '0';
139
- }
140
- // Docs generation uses variant 0 for deterministic output
141
- if (process.env.NX_GENERATE_DOCS_PROCESS === 'true') {
142
- return '0';
143
- }
144
- // Standard URLs get variant 2 banner
145
- return '2';
136
+ return '0';
146
137
  }
147
138
  exports.NxCloudChoices = [
148
139
  'github',
@@ -178,20 +169,21 @@ const messageOptions = {
178
169
  ],
179
170
  /**
180
171
  * These messages are a fallback for setting up CI as well as when migrating major versions
181
- * Locked to "full platform" messaging (CLOUD-4235)
172
+ * NXC-4020: Restored to v22.1.3 wording
182
173
  */
183
174
  setupNxCloud: [
184
175
  {
185
- code: 'cloud-v2-full-platform-visit',
186
- message: 'Try the full Nx platform?',
176
+ code: 'enable-caching2',
177
+ message: 'Would you like remote caching to make your build faster?',
187
178
  initial: 0,
188
179
  choices: [
189
180
  { value: 'yes', name: 'Yes' },
190
- { value: 'skip', name: 'Skip' },
181
+ { value: 'skip', name: 'No - I would not like remote caching' },
191
182
  ],
192
- footer: '\nAutomatically fix broken PRs, 70% faster CI: https://nx.dev/nx-cloud',
183
+ footer: '\nRead more about remote caching at https://nx.dev/ci/features/remote-cache',
184
+ hint: '(can be disabled any time)',
193
185
  fallback: undefined,
194
- completionMessage: 'platform-setup',
186
+ completionMessage: 'cache-setup',
195
187
  },
196
188
  ],
197
189
  /**
@@ -14,7 +14,7 @@ declare const completionMessages: {
14
14
  readonly title: "Your CI setup is almost complete.";
15
15
  };
16
16
  readonly 'cache-setup': {
17
- readonly title: "Your remote cache setup is almost complete.";
17
+ readonly title: "Your remote cache is almost complete.";
18
18
  };
19
19
  readonly 'platform-setup': {
20
20
  readonly title: "Your platform setup is almost complete.";
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,CAAC;AAuDtC;;;GAGG;AACH,QAAA,MAAM,kBAAkB;;;;;;;;;;CAUd,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAEnE,wBAAgB,oBAAoB,CAClC,oBAAoB,EAAE,oBAAoB,GAAG,SAAS,EACtD,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,WAAW,EAAE,aAAa,EAC1B,aAAa,CAAC,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,aAAa,GAC5B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CA2BxC;AAED,wBAAgB,sBAAsB,IAAI;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAUA"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,GAAG,CAAC;AAiDtC;;;GAGG;AACH,QAAA,MAAM,kBAAkB;;;;;;;;;;CAWd,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAEnE,wBAAgB,oBAAoB,CAClC,oBAAoB,EAAE,oBAAoB,GAAG,SAAS,EACtD,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,WAAW,EAAE,aAAa,EAC1B,aAAa,CAAC,EAAE,MAAM,EACtB,aAAa,CAAC,EAAE,aAAa,GAC5B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CA2BxC;AAED,wBAAgB,sBAAsB,IAAI;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAUA"}
@@ -32,19 +32,15 @@ function getBannerLines(variant, url) {
32
32
  // Variant 0: plain link (no banner)
33
33
  return [];
34
34
  }
35
- function getSetupMessage(url, pushedToVcs, workspaceName) {
36
- const githubUrl = workspaceName
37
- ? `https://github.com/new?name=${encodeURIComponent(workspaceName)}`
38
- : 'https://github.com/new';
35
+ function getSetupMessage(url, pushedToVcs) {
39
36
  if (pushedToVcs === git_1.VcsPushStatus.PushedToVcs) {
40
37
  return url
41
38
  ? `Go to Nx Cloud and finish the setup: ${url}`
42
39
  : 'Return to Nx Cloud and finish the setup.';
43
40
  }
44
- // User needs to push first
45
41
  const action = url ? 'go' : 'return';
46
42
  const urlSuffix = url ? `: ${url}` : '.';
47
- return `Push your repo (${githubUrl}), then ${action} to Nx Cloud and finish the setup${urlSuffix}`;
43
+ return `Push your repo, then ${action} to Nx Cloud and finish the setup${urlSuffix}`;
48
44
  }
49
45
  /**
50
46
  * Completion messages shown after workspace creation.
@@ -55,7 +51,8 @@ const completionMessages = {
55
51
  title: 'Your CI setup is almost complete.',
56
52
  },
57
53
  'cache-setup': {
58
- title: 'Your remote cache setup is almost complete.',
54
+ // NXC-4020: Restored to v22.1.3 wording (was "Your remote cache setup is almost complete.")
55
+ title: 'Your remote cache is almost complete.',
59
56
  },
60
57
  'platform-setup': {
61
58
  title: 'Your platform setup is almost complete.',
@@ -79,7 +76,7 @@ function getCompletionMessage(completionMessageKey, url, pushedToVcs, workspaceN
79
76
  }
80
77
  }
81
78
  // Variant 0 (control) or fallback: plain link message
82
- const bodyLines = [getSetupMessage(url, pushedToVcs, workspaceName)];
79
+ const bodyLines = [getSetupMessage(url, pushedToVcs)];
83
80
  return {
84
81
  title,
85
82
  bodyLines,
@@ -1,10 +1,9 @@
1
1
  import { VcsPushStatus } from '../git/git';
2
- import { CompletionMessageKey } from './messages';
3
2
  export type NxCloud = 'yes' | 'github' | 'gitlab' | 'azure' | 'bitbucket-pipelines' | 'circleci' | 'skip' | 'never';
4
3
  export declare function connectToNxCloudForTemplate(directory: string, installationSource: string, useGitHub?: boolean): Promise<string | null>;
5
4
  export declare function readNxCloudToken(directory: string): string;
6
5
  export declare function createNxCloudOnboardingUrl(nxCloud: NxCloud, token: string | undefined, directory: string, useGitHub?: boolean): Promise<string>;
7
- export declare function getNxCloudInfo(connectCloudUrl: string, pushedToVcs: VcsPushStatus, completionMessageKey?: CompletionMessageKey, workspaceName?: string): Promise<string>;
6
+ export declare function getNxCloudInfo(nxCloud: NxCloud, connectCloudUrl: string, pushedToVcs: VcsPushStatus, rawNxCloud?: NxCloud): Promise<string>;
8
7
  export declare function getSkippedNxCloudInfo(): string;
9
8
  export declare function setNeverConnectToCloud(directory: string): void;
10
9
  //# sourceMappingURL=nx-cloud.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nx-cloud.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/nx-cloud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAGL,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAKpB,MAAM,MAAM,OAAO,GACf,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,qBAAqB,GACrB,UAAU,GACV,MAAM,GACN,OAAO,CAAC;AAEZ,wBAAsB,2BAA2B,CAC/C,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+BxB;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAgBjD;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAED,wBAAsB,cAAc,CAClC,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,aAAa,EAC1B,oBAAoB,CAAC,EAAE,oBAAoB,EAC3C,aAAa,CAAC,EAAE,MAAM,mBAuBvB;AAED,wBAAgB,qBAAqB,WAIpC;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAO9D"}
1
+ {"version":3,"file":"nx-cloud.d.ts","sourceRoot":"","sources":["../../../../../../packages/create-nx-workspace/src/utils/nx/nx-cloud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAO3C,MAAM,MAAM,OAAO,GACf,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,qBAAqB,GACrB,UAAU,GACV,MAAM,GACN,OAAO,CAAC;AAEZ,wBAAsB,2BAA2B,CAC/C,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+BxB;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAiBjD;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAKD,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,aAAa,EAC1B,UAAU,CAAC,EAAE,OAAO,mBAUrB;AAED,wBAAgB,qBAAqB,WAIpC;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAO9D"}
@@ -42,7 +42,8 @@ function readNxCloudToken(directory) {
42
42
  // nx-ignore-next-line
43
43
  ));
44
44
  const { accessToken, nxCloudId } = getCloudOptions(directory);
45
- nxCloudSpinner.succeed('Nx Cloud configuration was successfully added');
45
+ // NXC-4020: Restored to v22.1.3 wording
46
+ nxCloudSpinner.succeed('Nx Cloud has been set up successfully');
46
47
  return accessToken || nxCloudId;
47
48
  }
48
49
  async function createNxCloudOnboardingUrl(nxCloud, token, directory, useGitHub) {
@@ -63,21 +64,17 @@ async function createNxCloudOnboardingUrl(nxCloud, token, directory, useGitHub)
63
64
  return createNxCloudOnboardingURL(source, token, meta, false, useGitHub ??
64
65
  (nxCloud === 'yes' || nxCloud === 'github' || nxCloud === 'circleci'), directory);
65
66
  }
66
- async function getNxCloudInfo(connectCloudUrl, pushedToVcs, completionMessageKey, workspaceName) {
67
+ // NXC-4020: Restored v22.1.3 signature determines message from nxCloud value,
68
+ // uses rawNxCloud to decide whether to show URL (hide when user passed --nxCloud explicitly).
69
+ // Previous signature: (connectCloudUrl, pushedToVcs, completionMessageKey?, workspaceName?)
70
+ async function getNxCloudInfo(nxCloud, connectCloudUrl, pushedToVcs, rawNxCloud) {
71
+ const completionMessageKey = nxCloud === 'yes' ? 'cache-setup' : 'ci-setup';
67
72
  const out = new output_1.CLIOutput(false);
68
- // Get the banner variant based on the cloud URL
69
- // Enterprise URLs automatically get variant 0 (plain link)
70
- const bannerVariant = (0, ab_testing_1.getBannerVariant)(connectCloudUrl);
71
- const message = (0, messages_1.getCompletionMessage)(completionMessageKey, connectCloudUrl, pushedToVcs, workspaceName, bannerVariant);
72
- // Variant 2 (deferred connection): No title, just output the banner directly
73
- // without the NX badge since nothing was actually configured
74
- if (!message.title) {
75
- out.addNewline();
76
- out.writeLines(message.bodyLines ?? []);
77
- }
78
- else {
79
- out.success(message);
80
- }
73
+ // When rawNxCloud is a string (user explicitly passed --nxCloud), hide the URL
74
+ // because the user "already knows" where to go
75
+ const url = typeof rawNxCloud === 'string' ? null : connectCloudUrl;
76
+ const message = (0, messages_1.getCompletionMessage)(completionMessageKey, url, pushedToVcs);
77
+ out.success(message);
81
78
  return out.getOutput();
82
79
  }
83
80
  function getSkippedNxCloudInfo() {