create-nx-workspace 19.4.0 → 19.4.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/package.json +1 -1
- package/src/utils/nx/ab-testing.d.ts +16 -59
- package/src/utils/nx/ab-testing.js +30 -16
package/package.json
CHANGED
|
@@ -1,64 +1,21 @@
|
|
|
1
1
|
export declare const NxCloudChoices: string[];
|
|
2
|
-
declare const messageOptions:
|
|
3
|
-
readonly setupCI: readonly [{
|
|
4
|
-
readonly code: "enable-nx-cloud";
|
|
5
|
-
readonly message: "Do you want Nx Cloud to make your CI fast?";
|
|
6
|
-
readonly initial: 1;
|
|
7
|
-
readonly choices: readonly [{
|
|
8
|
-
readonly value: "yes";
|
|
9
|
-
readonly name: "Yes, enable Nx Cloud";
|
|
10
|
-
}, {
|
|
11
|
-
readonly value: "github";
|
|
12
|
-
readonly name: "Yes, configure Nx Cloud for GitHub Actions";
|
|
13
|
-
}, {
|
|
14
|
-
readonly value: "circleci";
|
|
15
|
-
readonly name: "Yes, configure Nx Cloud for Circle CI";
|
|
16
|
-
}, {
|
|
17
|
-
readonly value: "skip";
|
|
18
|
-
readonly name: "Skip for now";
|
|
19
|
-
}];
|
|
20
|
-
readonly footer: "\nWatch a short video on Nx Cloud at https://nx.dev/ci/intro/why-nx-cloud";
|
|
21
|
-
readonly hint: "\n(it's free and can be disabled any time)";
|
|
22
|
-
readonly fallback: undefined;
|
|
23
|
-
}, {
|
|
24
|
-
readonly code: "set-up-ci";
|
|
25
|
-
readonly message: "Set up CI with caching, distribution and test deflaking";
|
|
26
|
-
readonly initial: 0;
|
|
27
|
-
readonly choices: readonly [{
|
|
28
|
-
readonly value: "github";
|
|
29
|
-
readonly name: "Yes, for GitHub Actions with Nx Cloud";
|
|
30
|
-
}, {
|
|
31
|
-
readonly value: "circleci";
|
|
32
|
-
readonly name: "Yes, for CircleCI with Nx Cloud";
|
|
33
|
-
}, {
|
|
34
|
-
readonly value: "skip";
|
|
35
|
-
readonly name: "Skip for now";
|
|
36
|
-
}];
|
|
37
|
-
readonly footer: "\nWatch a short video on Nx Cloud at https://nx.dev/ci/intro/why-nx-cloud";
|
|
38
|
-
readonly hint: "\n(it's free and can be disabled any time)";
|
|
39
|
-
readonly fallback: {
|
|
40
|
-
readonly value: "skip";
|
|
41
|
-
readonly key: "setupNxCloud";
|
|
42
|
-
};
|
|
43
|
-
}];
|
|
44
|
-
readonly setupNxCloud: readonly [{
|
|
45
|
-
readonly code: "enable-caching";
|
|
46
|
-
readonly message: "Would you like remote caching to make your build faster?";
|
|
47
|
-
readonly initial: 0;
|
|
48
|
-
readonly choices: readonly [{
|
|
49
|
-
readonly value: "yes";
|
|
50
|
-
readonly name: "Yes";
|
|
51
|
-
}, {
|
|
52
|
-
readonly value: "skip";
|
|
53
|
-
readonly name: "Skip for now";
|
|
54
|
-
}];
|
|
55
|
-
readonly footer: "\nRead more about remote caching at https://nx.dev/ci/features/remote-cache";
|
|
56
|
-
readonly hint: "\n(it's free and can be disabled any time)";
|
|
57
|
-
readonly fallback: undefined;
|
|
58
|
-
}];
|
|
59
|
-
};
|
|
2
|
+
declare const messageOptions: Record<string, MessageData[]>;
|
|
60
3
|
export type MessageKey = keyof typeof messageOptions;
|
|
61
|
-
|
|
4
|
+
interface MessageData {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
initial: number;
|
|
8
|
+
choices: Array<{
|
|
9
|
+
value: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}>;
|
|
12
|
+
footer: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
fallback?: {
|
|
15
|
+
value: string;
|
|
16
|
+
key: MessageKey;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
62
19
|
export declare class PromptMessages {
|
|
63
20
|
private selectedMessages;
|
|
64
21
|
getPrompt(key: MessageKey): MessageData;
|
|
@@ -4,34 +4,48 @@ exports.recordStat = exports.messages = exports.PromptMessages = exports.NxCloud
|
|
|
4
4
|
const node_child_process_1 = require("node:child_process");
|
|
5
5
|
const is_ci_1 = require("../ci/is-ci");
|
|
6
6
|
const package_manager_1 = require("../package-manager");
|
|
7
|
-
exports.NxCloudChoices = [
|
|
7
|
+
exports.NxCloudChoices = [
|
|
8
|
+
'github',
|
|
9
|
+
'circleci',
|
|
10
|
+
'gitlab',
|
|
11
|
+
'azure',
|
|
12
|
+
'bitbucket',
|
|
13
|
+
'skip',
|
|
14
|
+
'yes', // Deprecated but still handled
|
|
15
|
+
];
|
|
8
16
|
const messageOptions = {
|
|
9
17
|
setupCI: [
|
|
10
18
|
{
|
|
11
|
-
code: '
|
|
12
|
-
message: `
|
|
13
|
-
initial:
|
|
19
|
+
code: 'which-ci-provider',
|
|
20
|
+
message: `Which CI provider would you like to use?`,
|
|
21
|
+
initial: 0,
|
|
14
22
|
choices: [
|
|
15
|
-
{ value: '
|
|
16
|
-
{ value: '
|
|
17
|
-
{ value: '
|
|
18
|
-
{ value: '
|
|
23
|
+
{ value: 'github', name: 'GitHub Actions' },
|
|
24
|
+
{ value: 'circleci', name: 'Circle CI' },
|
|
25
|
+
{ value: 'gitlab', name: 'Gitlab' },
|
|
26
|
+
{ value: 'azure', name: 'Azure DevOps' },
|
|
27
|
+
{ value: 'bitbucket', name: 'BitBucket Pipelines' },
|
|
28
|
+
{ value: 'skip', name: '\nDo it later' },
|
|
19
29
|
],
|
|
20
|
-
footer: '\
|
|
21
|
-
|
|
22
|
-
fallback: undefined,
|
|
30
|
+
footer: '\nRemote caching, task distribution, and test splitting are provided by Nx Cloud. Read more at https://nx.dev/ci',
|
|
31
|
+
fallback: { value: 'skip', key: 'setupNxCloud' },
|
|
23
32
|
},
|
|
24
33
|
{
|
|
25
34
|
code: 'set-up-ci',
|
|
26
35
|
message: `Set up CI with caching, distribution and test deflaking`,
|
|
27
36
|
initial: 0,
|
|
28
37
|
choices: [
|
|
29
|
-
{ value: 'github', name: '
|
|
30
|
-
{ value: 'circleci', name: '
|
|
31
|
-
{ value: '
|
|
38
|
+
{ value: 'github', name: 'GitHub Actions' },
|
|
39
|
+
{ value: 'circleci', name: 'CircleCI' },
|
|
40
|
+
{ value: 'gitlab', name: 'Gitlab' },
|
|
41
|
+
{ value: 'azure', name: 'Azure DevOps' },
|
|
42
|
+
{
|
|
43
|
+
value: 'bitbucket',
|
|
44
|
+
name: 'BitBucket Pipelines',
|
|
45
|
+
},
|
|
46
|
+
{ value: 'skip', name: '\nDo it later' },
|
|
32
47
|
],
|
|
33
|
-
footer: '\
|
|
34
|
-
hint: `\n(it's free and can be disabled any time)`,
|
|
48
|
+
footer: '\nRemote caching, task distribution, and test splitting are provided by Nx Cloud. Read more at https://nx.dev/ci',
|
|
35
49
|
fallback: { value: 'skip', key: 'setupNxCloud' },
|
|
36
50
|
},
|
|
37
51
|
],
|