create-nx-workspace 22.3.0-beta.1 → 22.3.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.
- package/bin/create-nx-workspace.d.ts.map +1 -1
- package/bin/create-nx-workspace.js +95 -8
- package/package.json +1 -1
- package/src/create-workspace.d.ts +1 -0
- package/src/create-workspace.d.ts.map +1 -1
- package/src/create-workspace.js +9 -6
- package/src/utils/nx/ab-testing.d.ts +13 -4
- package/src/utils/nx/ab-testing.d.ts.map +1 -1
- package/src/utils/nx/nx-cloud.d.ts.map +1 -1
- package/src/utils/template/clone-template.js +1 -1
|
@@ -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;
|
|
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,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,YAAY,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,QAAQ,CAAC;IAClC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;CAClD;AAED,UAAU,aAAc,SAAQ,aAAa;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,YAAY,GAAG,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,CAqLrB,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({
|
|
@@ -167,7 +169,11 @@ exports.commandsObject = yargs
|
|
|
167
169
|
flowVariant: (0, ab_testing_1.getFlowVariant)(),
|
|
168
170
|
errorCode,
|
|
169
171
|
errorMessage,
|
|
170
|
-
errorFile,
|
|
172
|
+
errorFile: errorFile ?? '',
|
|
173
|
+
template: chosenTemplate ?? '',
|
|
174
|
+
preset: chosenPreset ?? '',
|
|
175
|
+
nodeVersion: process.versions.node ?? '',
|
|
176
|
+
packageManager: packageManager ?? '',
|
|
171
177
|
},
|
|
172
178
|
});
|
|
173
179
|
if (error instanceof error_utils_1.CnwError) {
|
|
@@ -239,6 +245,9 @@ async function main(parsedArgs) {
|
|
|
239
245
|
pushedToVcs: workspaceInfo.pushedToVcs ?? '',
|
|
240
246
|
template: chosenTemplate ?? '',
|
|
241
247
|
preset: chosenPreset ?? '',
|
|
248
|
+
connectUrl: workspaceInfo.connectUrl ?? '',
|
|
249
|
+
nodeVersion: process.versions.node,
|
|
250
|
+
packageManager: packageManager ?? '',
|
|
242
251
|
},
|
|
243
252
|
});
|
|
244
253
|
if (parsedArgs.nxCloud && workspaceInfo.nxCloudInfo) {
|
|
@@ -272,6 +281,7 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
272
281
|
meta: {
|
|
273
282
|
type: 'start',
|
|
274
283
|
flowVariant: (0, ab_testing_1.getFlowVariant)(),
|
|
284
|
+
nodeVersion: process.versions.node,
|
|
275
285
|
},
|
|
276
286
|
});
|
|
277
287
|
try {
|
|
@@ -286,14 +296,28 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
286
296
|
const completionMessageKey = nxCloud === 'skip'
|
|
287
297
|
? undefined
|
|
288
298
|
: ab_testing_1.messages.completionMessageOfSelectedPrompt('setupNxCloudV2');
|
|
299
|
+
packageManager = (0, package_manager_1.detectInvokedPackageManager)();
|
|
289
300
|
Object.assign(argv, {
|
|
290
301
|
nxCloud,
|
|
291
302
|
useGitHub: nxCloud !== 'skip',
|
|
292
303
|
completionMessageKey,
|
|
293
|
-
packageManager
|
|
304
|
+
packageManager,
|
|
294
305
|
defaultBase: 'main',
|
|
295
306
|
aiAgents,
|
|
296
307
|
});
|
|
308
|
+
await (0, ab_testing_1.recordStat)({
|
|
309
|
+
nxVersion: nx_version_1.nxVersion,
|
|
310
|
+
command: 'create-nx-workspace',
|
|
311
|
+
useCloud: nxCloud !== 'skip',
|
|
312
|
+
meta: {
|
|
313
|
+
type: 'precreate',
|
|
314
|
+
flowVariant: (0, ab_testing_1.getFlowVariant)(),
|
|
315
|
+
template: chosenTemplate,
|
|
316
|
+
preset: '',
|
|
317
|
+
nodeVersion: process.versions.node ?? '',
|
|
318
|
+
packageManager,
|
|
319
|
+
},
|
|
320
|
+
});
|
|
297
321
|
}
|
|
298
322
|
else {
|
|
299
323
|
// Preset flow - existing behavior
|
|
@@ -311,21 +335,57 @@ async function normalizeArgsMiddleware(argv) {
|
|
|
311
335
|
throw new error_utils_1.CnwError('INVALID_PRESET', `Could not find preset "${argv.preset}": ${message}`);
|
|
312
336
|
}
|
|
313
337
|
}
|
|
314
|
-
|
|
338
|
+
packageManager = await (0, prompts_1.determinePackageManager)(argv);
|
|
315
339
|
const aiAgents = await (0, prompts_1.determineAiAgents)(argv);
|
|
316
340
|
const defaultBase = await (0, prompts_1.determineDefaultBase)(argv);
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
341
|
+
// Check if CLI arg was provided (use rawArgs to check original input)
|
|
342
|
+
const cliNxCloudArgProvided = rawArgs.nxCloud !== undefined;
|
|
343
|
+
let nxCloud;
|
|
344
|
+
let useGitHub;
|
|
345
|
+
let completionMessageKey;
|
|
346
|
+
if (argv.skipGit === true) {
|
|
347
|
+
nxCloud = 'skip';
|
|
348
|
+
useGitHub = undefined;
|
|
349
|
+
}
|
|
350
|
+
else if (cliNxCloudArgProvided) {
|
|
351
|
+
// CLI arg provided: use existing flow (CI provider selection if needed)
|
|
352
|
+
nxCloud = await (0, prompts_1.determineNxCloud)(argv);
|
|
353
|
+
useGitHub =
|
|
354
|
+
nxCloud === 'skip'
|
|
355
|
+
? undefined
|
|
356
|
+
: nxCloud === 'github' || (await (0, prompts_1.determineIfGitHubWillBeUsed)(argv));
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
// No CLI arg: use simplified prompt (same as template flow)
|
|
360
|
+
nxCloud = await (0, prompts_1.determineNxCloudV2)(argv);
|
|
361
|
+
useGitHub = nxCloud !== 'skip';
|
|
362
|
+
completionMessageKey =
|
|
363
|
+
nxCloud === 'skip'
|
|
364
|
+
? undefined
|
|
365
|
+
: ab_testing_1.messages.completionMessageOfSelectedPrompt('setupNxCloudV2');
|
|
366
|
+
}
|
|
321
367
|
Object.assign(argv, {
|
|
322
368
|
nxCloud,
|
|
323
369
|
useGitHub,
|
|
370
|
+
completionMessageKey,
|
|
324
371
|
packageManager,
|
|
325
372
|
defaultBase,
|
|
326
373
|
aiAgents,
|
|
327
374
|
});
|
|
328
375
|
chosenPreset = argv.preset;
|
|
376
|
+
await (0, ab_testing_1.recordStat)({
|
|
377
|
+
nxVersion: nx_version_1.nxVersion,
|
|
378
|
+
command: 'create-nx-workspace',
|
|
379
|
+
useCloud: nxCloud !== 'skip',
|
|
380
|
+
meta: {
|
|
381
|
+
type: 'precreate',
|
|
382
|
+
flowVariant: (0, ab_testing_1.getFlowVariant)(),
|
|
383
|
+
template: '',
|
|
384
|
+
preset: chosenPreset ?? '',
|
|
385
|
+
nodeVersion: process.versions.node ?? '',
|
|
386
|
+
packageManager,
|
|
387
|
+
},
|
|
388
|
+
});
|
|
329
389
|
}
|
|
330
390
|
}
|
|
331
391
|
catch (e) {
|
|
@@ -361,8 +421,22 @@ async function determineFolder(parsedArgs) {
|
|
|
361
421
|
: parsedArgs.name;
|
|
362
422
|
if (folderName) {
|
|
363
423
|
validateWorkspaceName(folderName);
|
|
424
|
+
// If directory exists, either re-prompt (interactive) or error (non-interactive)
|
|
425
|
+
if ((0, fs_1.existsSync)(folderName)) {
|
|
426
|
+
if (parsedArgs.interactive && !(0, is_ci_1.isCI)()) {
|
|
427
|
+
output_1.output.warn({
|
|
428
|
+
title: `Directory ${folderName} already exists.`,
|
|
429
|
+
});
|
|
430
|
+
// Re-prompt for a new folder name
|
|
431
|
+
return promptForFolder(parsedArgs);
|
|
432
|
+
}
|
|
433
|
+
throw new error_utils_1.CnwError('DIRECTORY_EXISTS', `The directory '${folderName}' already exists. Choose a different name or remove the existing directory.`);
|
|
434
|
+
}
|
|
364
435
|
return folderName;
|
|
365
436
|
}
|
|
437
|
+
return promptForFolder(parsedArgs);
|
|
438
|
+
}
|
|
439
|
+
async function promptForFolder(parsedArgs) {
|
|
366
440
|
const reply = await enquirer.prompt([
|
|
367
441
|
{
|
|
368
442
|
name: 'folderName',
|
|
@@ -370,11 +444,24 @@ async function determineFolder(parsedArgs) {
|
|
|
370
444
|
initial: 'org',
|
|
371
445
|
type: 'input',
|
|
372
446
|
skip: !parsedArgs.interactive || (0, is_ci_1.isCI)(),
|
|
447
|
+
validate: (value) => {
|
|
448
|
+
if (!value) {
|
|
449
|
+
return 'Folder name cannot be empty';
|
|
450
|
+
}
|
|
451
|
+
if (!/^[a-zA-Z]/.test(value)) {
|
|
452
|
+
return 'Workspace name must start with a letter';
|
|
453
|
+
}
|
|
454
|
+
if ((0, fs_1.existsSync)(value)) {
|
|
455
|
+
return `The directory '${value}' already exists`;
|
|
456
|
+
}
|
|
457
|
+
return true;
|
|
458
|
+
},
|
|
373
459
|
},
|
|
374
460
|
]);
|
|
461
|
+
// Fallback invariants in case validate is bypassed (e.g., in CI or non-interactive mode)
|
|
375
462
|
invariant(reply.folderName, 'INVALID_FOLDER_NAME', 'Folder name cannot be empty');
|
|
376
463
|
validateWorkspaceName(reply.folderName);
|
|
377
|
-
invariant(!(0, fs_1.existsSync)(reply.folderName), 'DIRECTORY_EXISTS', `The
|
|
464
|
+
invariant(!(0, fs_1.existsSync)(reply.folderName), 'DIRECTORY_EXISTS', `The directory '${reply.folderName}' already exists. Choose a different name or remove the existing directory.`);
|
|
378
465
|
return reply.folderName;
|
|
379
466
|
}
|
|
380
467
|
async function determineStack(parsedArgs) {
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ export declare function createWorkspace<T extends CreateWorkspaceOptions>(preset
|
|
|
8
8
|
nxCloudInfo: string;
|
|
9
9
|
directory: string;
|
|
10
10
|
pushedToVcs: VcsPushStatus;
|
|
11
|
+
connectUrl: string;
|
|
11
12
|
}>;
|
|
12
13
|
export declare function extractConnectUrl(text: string): string | null;
|
|
13
14
|
//# sourceMappingURL=create-workspace.d.ts.map
|
|
@@ -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
|
|
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"}
|
package/src/create-workspace.js
CHANGED
|
@@ -87,20 +87,22 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
const isTemplate = !!options.template;
|
|
90
|
-
//
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
// -
|
|
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' ||
|
|
105
|
+
(nxCloud === 'github' || nxCloud === 'yes')) {
|
|
104
106
|
pushedToVcs = await (0, git_1.pushToGitHub)(directory, {
|
|
105
107
|
skipGitHubPush,
|
|
106
108
|
name,
|
|
@@ -139,6 +141,7 @@ async function createWorkspace(preset, options, rawArgs) {
|
|
|
139
141
|
nxCloudInfo,
|
|
140
142
|
directory,
|
|
141
143
|
pushedToVcs,
|
|
144
|
+
connectUrl,
|
|
142
145
|
};
|
|
143
146
|
}
|
|
144
147
|
function extractConnectUrl(text) {
|
|
@@ -51,15 +51,24 @@ export interface RecordStatMetaComplete {
|
|
|
51
51
|
export interface RecordStatMetaError {
|
|
52
52
|
type: 'error';
|
|
53
53
|
errorCode: string;
|
|
54
|
-
flowVariant
|
|
55
|
-
errorMessage
|
|
56
|
-
errorFile
|
|
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
|
|
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/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,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,WAAW;IAavC,2BAA2B,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM;IAQpD,iCAAiC,CAAC,GAAG,EAAE,UAAU,GAAG,oBAAoB;CAQzE;AAED,eAAO,MAAM,QAAQ,gBAAuB,CAAC;AAS7C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,
|
|
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,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AM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;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"}
|
|
@@ -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;AAIpB,MAAM,MAAM,OAAO,GACf,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,qBAAqB,GACrB,UAAU,GACV,MAAM,CAAC;AAEX,wBAAsB,2BAA2B,CAC/C,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,
|
|
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;AAIpB,MAAM,MAAM,OAAO,GACf,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,qBAAqB,GACrB,UAAU,GACV,MAAM,CAAC;AAEX,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,EACb,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAED,wBAAsB,cAAc,CAClC,eAAe,EAAE,MAAM,EACvB,WAAW,EAAE,aAAa,EAC1B,oBAAoB,CAAC,EAAE,oBAAoB,mBAU5C;AAED,wBAAgB,qBAAqB,WAIpC"}
|
|
@@ -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
|
|
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());
|