create-nx-workspace 23.3.0-beta.0 → 23.3.0-beta.2
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.
- package/dist/bin/create-nx-workspace.js +8 -44
- package/dist/src/create-workspace-options.d.ts +0 -5
- package/dist/src/create-workspace.js +5 -14
- package/dist/src/internal-utils/prompts.d.ts +1 -1
- package/dist/src/internal-utils/prompts.js +2 -10
- package/dist/src/utils/nx/ab-testing.d.ts +3 -0
- package/dist/src/utils/nx/ab-testing.js +9 -9
- package/dist/src/utils/nx/nx-cloud.d.ts +1 -2
- package/dist/src/utils/nx/nx-cloud.js +0 -9
- package/dist/src/utils/unparse.js +2 -4
- package/package.json +1 -2
|
@@ -436,7 +436,7 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
436
436
|
applyEmptyPresetAlias(argv);
|
|
437
437
|
argv.workspaces ??= true;
|
|
438
438
|
argv.useProjectJson ??= !argv.workspaces;
|
|
439
|
-
useCloud = argv.nxCloud !== 'skip'
|
|
439
|
+
useCloud = argv.nxCloud !== 'skip';
|
|
440
440
|
await (0, ab_testing_1.recordStat)({
|
|
441
441
|
nxVersion: nx_version_1.nxVersion,
|
|
442
442
|
command: 'create-nx-workspace',
|
|
@@ -461,37 +461,21 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
461
461
|
let nxCloud;
|
|
462
462
|
let completionMessageKey;
|
|
463
463
|
let skipCloudConnect = false;
|
|
464
|
-
let neverConnectToCloud = false;
|
|
465
464
|
if (argv.skipGit === true) {
|
|
466
465
|
nxCloud = 'skip';
|
|
467
466
|
completionMessageKey = undefined;
|
|
468
467
|
}
|
|
469
468
|
else {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
nxCloud = 'yes';
|
|
473
|
-
skipCloudConnect = false;
|
|
474
|
-
}
|
|
475
|
-
else if (cloudChoice === 'skip') {
|
|
476
|
-
nxCloud = 'skip';
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
nxCloud = 'never';
|
|
480
|
-
neverConnectToCloud = true;
|
|
481
|
-
}
|
|
482
|
-
completionMessageKey =
|
|
483
|
-
cloudChoice === 'never'
|
|
484
|
-
? undefined
|
|
485
|
-
: (0, ab_testing_1.getCompletionMessageKeyForVariant)();
|
|
469
|
+
nxCloud = await (0, prompts_1.determineNxCloudV2)(argv);
|
|
470
|
+
completionMessageKey = (0, ab_testing_1.getCompletionMessageKeyForVariant)();
|
|
486
471
|
}
|
|
487
472
|
analyticsPrompt = await (0, prompts_1.determineAnalytics)(argv);
|
|
488
473
|
const analytics = analyticsPrompt === 'yes';
|
|
489
474
|
packageManager = argv.packageManager ?? (0, package_manager_1.detectInvokedPackageManager)();
|
|
490
475
|
Object.assign(argv, {
|
|
491
476
|
nxCloud,
|
|
492
|
-
useGitHub: nxCloud !== 'skip'
|
|
477
|
+
useGitHub: nxCloud !== 'skip',
|
|
493
478
|
skipCloudConnect,
|
|
494
|
-
neverConnectToCloud,
|
|
495
479
|
completionMessageKey,
|
|
496
480
|
packageManager,
|
|
497
481
|
defaultBase: 'main',
|
|
@@ -540,7 +524,6 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
540
524
|
let useGitHub;
|
|
541
525
|
let completionMessageKey;
|
|
542
526
|
let skipCloudConnect = false;
|
|
543
|
-
let neverConnectToCloud = false;
|
|
544
527
|
if (argv.skipGit === true) {
|
|
545
528
|
nxCloud = 'skip';
|
|
546
529
|
useGitHub = undefined;
|
|
@@ -549,34 +532,16 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
549
532
|
// CLI arg provided: use existing flow (CI provider selection if needed)
|
|
550
533
|
nxCloud = await (0, prompts_1.determineNxCloud)(argv);
|
|
551
534
|
useGitHub =
|
|
552
|
-
nxCloud === 'skip'
|
|
535
|
+
nxCloud === 'skip'
|
|
553
536
|
? undefined
|
|
554
537
|
: nxCloud === 'github' ||
|
|
555
538
|
(await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
|
|
556
|
-
if (nxCloud === 'never') {
|
|
557
|
-
neverConnectToCloud = true;
|
|
558
|
-
}
|
|
559
539
|
}
|
|
560
540
|
else {
|
|
561
541
|
// No CLI arg: use simplified prompt (same as template flow)
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
skipCloudConnect = false;
|
|
566
|
-
}
|
|
567
|
-
else if (cloudChoice === 'skip') {
|
|
568
|
-
nxCloud = 'skip';
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
nxCloud = 'never';
|
|
572
|
-
neverConnectToCloud = true;
|
|
573
|
-
}
|
|
574
|
-
useGitHub =
|
|
575
|
-
nxCloud !== 'skip' && nxCloud !== 'never' ? true : undefined;
|
|
576
|
-
completionMessageKey =
|
|
577
|
-
cloudChoice === 'never'
|
|
578
|
-
? undefined
|
|
579
|
-
: (0, ab_testing_1.getCompletionMessageKeyForVariant)();
|
|
542
|
+
nxCloud = await (0, prompts_1.determineNxCloudV2)(argv);
|
|
543
|
+
useGitHub = nxCloud !== 'skip' ? true : undefined;
|
|
544
|
+
completionMessageKey = (0, ab_testing_1.getCompletionMessageKeyForVariant)();
|
|
580
545
|
}
|
|
581
546
|
analyticsPrompt = await (0, prompts_1.determineAnalytics)(argv);
|
|
582
547
|
const analytics = analyticsPrompt === 'yes';
|
|
@@ -584,7 +549,6 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
584
549
|
nxCloud,
|
|
585
550
|
useGitHub,
|
|
586
551
|
skipCloudConnect,
|
|
587
|
-
neverConnectToCloud,
|
|
588
552
|
completionMessageKey,
|
|
589
553
|
packageManager,
|
|
590
554
|
defaultBase,
|
|
@@ -57,11 +57,6 @@ export interface CreateWorkspaceOptions {
|
|
|
57
57
|
* @default false
|
|
58
58
|
*/
|
|
59
59
|
skipCloudConnect?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* @description Set neverConnectToCloud in nx.json (full opt-out)
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
neverConnectToCloud?: boolean;
|
|
65
60
|
/**
|
|
66
61
|
* @description Whether GitHub CLI (gh) is available on the system (for telemetry)
|
|
67
62
|
*/
|
|
@@ -100,9 +100,7 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
100
100
|
throw e;
|
|
101
101
|
}
|
|
102
102
|
// Connect to Nx Cloud for template flow
|
|
103
|
-
if (nxCloud !== 'skip' &&
|
|
104
|
-
nxCloud !== 'never' &&
|
|
105
|
-
!options.skipCloudConnect) {
|
|
103
|
+
if (nxCloud !== 'skip' && !options.skipCloudConnect) {
|
|
106
104
|
await (0, nx_cloud_1.connectToNxCloudForTemplate)(directory, 'create-nx-workspace', useGitHub);
|
|
107
105
|
}
|
|
108
106
|
}
|
|
@@ -142,10 +140,6 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
142
|
const isTemplate = !!options.template;
|
|
145
|
-
// Handle "Never" opt-out: set neverConnectToCloud in nx.json
|
|
146
|
-
if (options.neverConnectToCloud) {
|
|
147
|
-
(0, nx_cloud_1.setNeverConnectToCloud)(directory);
|
|
148
|
-
}
|
|
149
143
|
// For template flow, save analytics preference directly to nx.json.
|
|
150
144
|
// For preset flow, this is handled by the workspace generator via createNxJson.
|
|
151
145
|
if (isTemplate && typeof options.analytics === 'boolean') {
|
|
@@ -153,7 +147,7 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
153
147
|
}
|
|
154
148
|
// Generate CI for preset flow (not template)
|
|
155
149
|
// When nxCloud === 'yes' (from simplified prompt), use GitHub as the CI provider
|
|
156
|
-
if (nxCloud !== 'skip' &&
|
|
150
|
+
if (nxCloud !== 'skip' && !isTemplate) {
|
|
157
151
|
const ciProvider = nxCloud === 'yes' ? 'github' : nxCloud;
|
|
158
152
|
await (0, setup_ci_1.setupCI)(directory, ciProvider, packageManager);
|
|
159
153
|
}
|
|
@@ -252,7 +246,7 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
252
246
|
// Create onboarding URL AFTER git operations so getVcsRemoteInfo() can detect the repo
|
|
253
247
|
let connectUrl;
|
|
254
248
|
let nxCloudInfo;
|
|
255
|
-
if (nxCloud !== 'skip'
|
|
249
|
+
if (nxCloud !== 'skip') {
|
|
256
250
|
// "Yes" or "Maybe later" — generate URL, update README, show banner
|
|
257
251
|
const aiModeForCloud = (0, ai_output_1.isAiAgent)();
|
|
258
252
|
if (aiModeForCloud) {
|
|
@@ -281,17 +275,14 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
281
275
|
await (0, nx_cloud_1.openCloudSetupUrl)(connectUrl);
|
|
282
276
|
}
|
|
283
277
|
}
|
|
284
|
-
else if (isTemplate &&
|
|
278
|
+
else if (isTemplate && nxCloud === 'skip') {
|
|
285
279
|
// Strip marker comments from README
|
|
286
280
|
const readmeUpdated = (0, update_readme_1.addConnectUrlToReadme)(directory, undefined);
|
|
287
281
|
if (readmeUpdated && !skipGit && commit) {
|
|
288
282
|
const alreadyPushed = pushedToVcs === git_1.VcsPushStatus.PushedToVcs;
|
|
289
283
|
await (0, update_readme_1.amendOrCommitReadme)(directory, alreadyPushed);
|
|
290
284
|
}
|
|
291
|
-
|
|
292
|
-
if (nxCloud === 'skip') {
|
|
293
|
-
nxCloudInfo = (0, nx_cloud_1.getSkippedNxCloudInfo)();
|
|
294
|
-
}
|
|
285
|
+
nxCloudInfo = (0, nx_cloud_1.getSkippedNxCloudInfo)();
|
|
295
286
|
}
|
|
296
287
|
return {
|
|
297
288
|
nxCloudInfo,
|
|
@@ -8,7 +8,7 @@ export declare function determineNxCloud(parsedArgs: yargs.Arguments<{
|
|
|
8
8
|
export declare function determineNxCloudV2(parsedArgs: yargs.Arguments<{
|
|
9
9
|
nxCloud?: string;
|
|
10
10
|
interactive?: boolean;
|
|
11
|
-
}>): Promise<'yes' | 'skip'
|
|
11
|
+
}>): Promise<'yes' | 'skip'>;
|
|
12
12
|
export declare function determineIfGitHubWillBeUsed(parsedArgs: yargs.Arguments<{
|
|
13
13
|
nxCloud: NxCloud;
|
|
14
14
|
useGitHub?: boolean;
|
|
@@ -38,22 +38,14 @@ async function determineNxCloud(parsedArgs) {
|
|
|
38
38
|
async function determineNxCloudV2(parsedArgs) {
|
|
39
39
|
// Provided via flag
|
|
40
40
|
if (parsedArgs.nxCloud) {
|
|
41
|
-
|
|
42
|
-
return 'skip';
|
|
43
|
-
if (parsedArgs.nxCloud === 'never')
|
|
44
|
-
return 'never';
|
|
45
|
-
return 'yes';
|
|
41
|
+
return parsedArgs.nxCloud === 'skip' ? 'skip' : 'yes';
|
|
46
42
|
}
|
|
47
43
|
// Non-interactive mode
|
|
48
44
|
if (!parsedArgs.interactive || (0, is_ci_1.isCI)()) {
|
|
49
45
|
return 'skip';
|
|
50
46
|
}
|
|
51
47
|
const result = await nxCloudPrompt('setupNxCloudV2');
|
|
52
|
-
|
|
53
|
-
return 'never';
|
|
54
|
-
if (result === 'skip')
|
|
55
|
-
return 'skip';
|
|
56
|
-
return 'yes';
|
|
48
|
+
return result === 'skip' ? 'skip' : 'yes';
|
|
57
49
|
}
|
|
58
50
|
async function determineIfGitHubWillBeUsed(parsedArgs) {
|
|
59
51
|
if (parsedArgs.nxCloud === 'yes' || parsedArgs.nxCloud === 'circleci') {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BannerVariant, CompletionMessageKey } from './messages';
|
|
2
2
|
export declare const NX_CLOUD_URL = "https://nx.dev/nx-cloud";
|
|
3
|
+
export declare const NX_CLOUD_DEMO_URL = "https://cloud.nx.app/demo/intro";
|
|
3
4
|
/**
|
|
4
5
|
* Clickable Nx Cloud marketing link for cloud prompt footers. Every
|
|
5
6
|
* create-nx-workspace prompt reports the same content tag, so the link is a
|
|
@@ -8,6 +9,8 @@ export declare const NX_CLOUD_URL = "https://nx.dev/nx-cloud";
|
|
|
8
9
|
* without OSC 8 support just render the bare URL (CLOUD-4642).
|
|
9
10
|
*/
|
|
10
11
|
export declare const NX_CLOUD_HYPERLINK: string;
|
|
12
|
+
/** Same as `NX_CLOUD_HYPERLINK`, pointing at the Nx Cloud demo (CLOUD-4640). */
|
|
13
|
+
export declare const NX_CLOUD_DEMO_HYPERLINK: string;
|
|
11
14
|
/**
|
|
12
15
|
* Returns the flow variant for tracking (0, 1, or 2).
|
|
13
16
|
* Returns '0' for docs generation to preserve deterministic output.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.messages = exports.PromptMessages = exports.NxCloudChoices = exports.NX_CLOUD_HYPERLINK = exports.NX_CLOUD_URL = void 0;
|
|
3
|
+
exports.messages = exports.PromptMessages = exports.NxCloudChoices = exports.NX_CLOUD_DEMO_HYPERLINK = exports.NX_CLOUD_HYPERLINK = exports.NX_CLOUD_DEMO_URL = exports.NX_CLOUD_URL = void 0;
|
|
4
4
|
exports.getFlowVariant = getFlowVariant;
|
|
5
5
|
exports.getCompletionMessageKeyForVariant = getCompletionMessageKeyForVariant;
|
|
6
6
|
exports.isEnterpriseCloudUrl = isEnterpriseCloudUrl;
|
|
7
7
|
exports.getBannerVariant = getBannerVariant;
|
|
8
8
|
exports.recordStat = recordStat;
|
|
9
|
-
const tslib_1 = require("tslib");
|
|
10
9
|
const node_child_process_1 = require("node:child_process");
|
|
11
10
|
const node_fs_1 = require("node:fs");
|
|
12
11
|
const node_path_1 = require("node:path");
|
|
13
12
|
const node_os_1 = require("node:os");
|
|
14
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
15
13
|
const is_ci_1 = require("../ci/is-ci");
|
|
16
14
|
const terminal_link_1 = require("../terminal-link");
|
|
17
15
|
exports.NX_CLOUD_URL = 'https://nx.dev/nx-cloud';
|
|
16
|
+
exports.NX_CLOUD_DEMO_URL = 'https://cloud.nx.app/demo/intro';
|
|
17
|
+
const UTM_QUERY = '?utm_source=nx-cli&utm_medium=cli&utm_campaign=nx-cloud-connect&utm_content=create-nx-workspace';
|
|
18
18
|
/**
|
|
19
19
|
* Clickable Nx Cloud marketing link for cloud prompt footers. Every
|
|
20
20
|
* create-nx-workspace prompt reports the same content tag, so the link is a
|
|
@@ -22,7 +22,9 @@ exports.NX_CLOUD_URL = 'https://nx.dev/nx-cloud';
|
|
|
22
22
|
* the clean `NX_CLOUD_URL` while clicks carry UTM attribution; terminals
|
|
23
23
|
* without OSC 8 support just render the bare URL (CLOUD-4642).
|
|
24
24
|
*/
|
|
25
|
-
exports.NX_CLOUD_HYPERLINK = (0, terminal_link_1.terminalLink)(exports.NX_CLOUD_URL, `${exports.NX_CLOUD_URL}
|
|
25
|
+
exports.NX_CLOUD_HYPERLINK = (0, terminal_link_1.terminalLink)(exports.NX_CLOUD_URL, `${exports.NX_CLOUD_URL}${UTM_QUERY}`);
|
|
26
|
+
/** Same as `NX_CLOUD_HYPERLINK`, pointing at the Nx Cloud demo (CLOUD-4640). */
|
|
27
|
+
exports.NX_CLOUD_DEMO_HYPERLINK = (0, terminal_link_1.terminalLink)(exports.NX_CLOUD_DEMO_URL, `${exports.NX_CLOUD_DEMO_URL}${UTM_QUERY}`);
|
|
26
28
|
// Flow variant controls both tracking and banner display (CLOUD-4235)
|
|
27
29
|
// Variants: 0 = control, 1 = updated prompt, 2 = no prompt (auto-connect)
|
|
28
30
|
const FLOW_VARIANT_CACHE_FILE = (0, node_path_1.join)((0, node_os_1.tmpdir)(), 'nx-cnw-flow-variant');
|
|
@@ -157,7 +159,6 @@ exports.NxCloudChoices = [
|
|
|
157
159
|
'bitbucket-pipelines',
|
|
158
160
|
'circleci',
|
|
159
161
|
'skip',
|
|
160
|
-
'never',
|
|
161
162
|
'yes', // Deprecated but still handled
|
|
162
163
|
];
|
|
163
164
|
const messageOptions = {
|
|
@@ -179,7 +180,7 @@ const messageOptions = {
|
|
|
179
180
|
{ value: 'circleci', name: 'Circle CI\n' },
|
|
180
181
|
{ value: 'skip', name: 'Do it later' },
|
|
181
182
|
],
|
|
182
|
-
footer: `\nSelf-healing CI, remote caching, and task distribution are provided by Nx Cloud: ${exports.NX_CLOUD_HYPERLINK}`,
|
|
183
|
+
footer: `\nSelf-healing CI, remote caching, and task distribution are provided by Nx Cloud: ${exports.NX_CLOUD_HYPERLINK}\nSee it in action: ${exports.NX_CLOUD_DEMO_HYPERLINK}`,
|
|
183
184
|
fallback: { value: 'skip', key: 'setupNxCloud' },
|
|
184
185
|
completionMessage: 'ci-setup',
|
|
185
186
|
},
|
|
@@ -197,7 +198,7 @@ const messageOptions = {
|
|
|
197
198
|
{ value: 'yes', name: 'Yes' },
|
|
198
199
|
{ value: 'skip', name: 'Skip' },
|
|
199
200
|
],
|
|
200
|
-
footer: `\nAutomatically fix broken PRs, 70% faster CI: ${exports.NX_CLOUD_HYPERLINK}`,
|
|
201
|
+
footer: `\nAutomatically fix broken PRs, 70% faster CI: ${exports.NX_CLOUD_HYPERLINK}\nSee it in action: ${exports.NX_CLOUD_DEMO_HYPERLINK}`,
|
|
201
202
|
fallback: undefined,
|
|
202
203
|
completionMessage: 'platform-setup',
|
|
203
204
|
},
|
|
@@ -213,9 +214,8 @@ const messageOptions = {
|
|
|
213
214
|
choices: [
|
|
214
215
|
{ value: 'yes', name: 'Yes' },
|
|
215
216
|
{ value: 'skip', name: 'Skip for now' },
|
|
216
|
-
{ value: 'never', name: chalk_1.default.dim("No, don't ask again") },
|
|
217
217
|
],
|
|
218
|
-
footer: `\nFree for small teams. Remote caching and task distribution. 2-minute setup: ${exports.NX_CLOUD_HYPERLINK}`,
|
|
218
|
+
footer: `\nFree for small teams. Remote caching and task distribution. 2-minute setup: ${exports.NX_CLOUD_HYPERLINK}\nSee it in action: ${exports.NX_CLOUD_DEMO_HYPERLINK}`,
|
|
219
219
|
fallback: undefined,
|
|
220
220
|
completionMessage: 'platform-setup',
|
|
221
221
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { VcsPushStatus } from '../git/git';
|
|
2
2
|
import { CompletionMessageKey } from './messages';
|
|
3
|
-
export type NxCloud = 'yes' | 'github' | 'gitlab' | 'azure' | 'bitbucket-pipelines' | 'circleci' | 'skip'
|
|
3
|
+
export type NxCloud = 'yes' | 'github' | 'gitlab' | 'azure' | 'bitbucket-pipelines' | 'circleci' | 'skip';
|
|
4
4
|
export declare function connectToNxCloudForTemplate(directory: string, installationSource: string, useGitHub?: boolean): Promise<string | null>;
|
|
5
5
|
export declare function readNxCloudToken(directory: string): string;
|
|
6
6
|
export declare function createNxCloudOnboardingUrl(nxCloud: NxCloud, token: string | undefined, directory: string, useGitHub?: boolean): Promise<string>;
|
|
7
7
|
export declare function getNxCloudInfo(connectCloudUrl: string, pushedToVcs: VcsPushStatus, completionMessageKey?: CompletionMessageKey, workspaceName?: string): Promise<string>;
|
|
8
8
|
export declare function getSkippedNxCloudInfo(): string;
|
|
9
9
|
export declare function openCloudSetupUrl(connectUrl: string): Promise<void>;
|
|
10
|
-
export declare function setNeverConnectToCloud(directory: string): void;
|
|
@@ -6,7 +6,6 @@ exports.createNxCloudOnboardingUrl = createNxCloudOnboardingUrl;
|
|
|
6
6
|
exports.getNxCloudInfo = getNxCloudInfo;
|
|
7
7
|
exports.getSkippedNxCloudInfo = getSkippedNxCloudInfo;
|
|
8
8
|
exports.openCloudSetupUrl = openCloudSetupUrl;
|
|
9
|
-
exports.setNeverConnectToCloud = setNeverConnectToCloud;
|
|
10
9
|
const tslib_1 = require("tslib");
|
|
11
10
|
const is_ci_1 = require("../ci/is-ci");
|
|
12
11
|
const output_1 = require("../output");
|
|
@@ -100,11 +99,3 @@ async function openCloudSetupUrl(connectUrl) {
|
|
|
100
99
|
// Fail gracefully — the URL is already displayed in the terminal banner
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
|
-
function setNeverConnectToCloud(directory) {
|
|
104
|
-
const { readFileSync, writeFileSync } = require('fs');
|
|
105
|
-
const { join } = require('path');
|
|
106
|
-
const nxJsonPath = join(directory, 'nx.json');
|
|
107
|
-
const nxJson = JSON.parse(readFileSync(nxJsonPath, 'utf-8'));
|
|
108
|
-
nxJson.neverConnectToCloud = true;
|
|
109
|
-
writeFileSync(nxJsonPath, JSON.stringify(nxJson, null, 2) + '\n');
|
|
110
|
-
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.unparse = unparse;
|
|
4
|
-
const flat_1 = require("flat");
|
|
5
4
|
function unparse(options) {
|
|
6
5
|
const unparsed = [];
|
|
7
6
|
for (const key of Object.keys(options)) {
|
|
@@ -21,9 +20,8 @@ function unparseOption(key, value, unparsed) {
|
|
|
21
20
|
value.forEach((item) => unparseOption(key, item, unparsed));
|
|
22
21
|
}
|
|
23
22
|
else if (Object.prototype.toString.call(value) === '[object Object]') {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
unparseOption(`${key}.${flattenedKey}`, flattened[flattenedKey], unparsed);
|
|
23
|
+
for (const nestedKey of Object.keys(value)) {
|
|
24
|
+
unparseOption(`${key}.${nestedKey}`, value[nestedKey], unparsed);
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
else if (typeof value === 'string' && value.includes(' ')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nx-workspace",
|
|
3
|
-
"version": "23.3.0-beta.
|
|
3
|
+
"version": "23.3.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Smart Monorepos · Fast Builds",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"@clack/prompts": "^1.7.0",
|
|
41
41
|
"axios": "1.18.1",
|
|
42
42
|
"chalk": "^4.1.0",
|
|
43
|
-
"flat": "^5.0.2",
|
|
44
43
|
"open": "^8.4.0",
|
|
45
44
|
"ora": "^5.3.0",
|
|
46
45
|
"tar-stream": "~2.2.0",
|