Skip to content

Commit 7232b11

Browse files
committed
fix: update messages and fix tests
1 parent 9fa0fd8 commit 7232b11

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/utils/command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class BaseCommand extends Command {
147147
siteId: argv.siteId || (typeof argv.site === 'string' && argv.site) || state.get('siteId'),
148148
token,
149149
mode: 'cli',
150-
host,
150+
apiHost: host,
151151
pathPrefix,
152152
scheme,
153153
offline,

src/utils/init/utils.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ const getPromptInputs = async ({
8080
{
8181
type: 'confirm',
8282
name: 'installSinglePlugin',
83-
message: `${prefix}Recommended Build Plugin: ${formatTitle(`${name} plugin`)}${EOL}➡️ Install ${name} plugin?`,
83+
message: `${prefix}We're going to install this Build Plugin: ${formatTitle(
84+
`${name} plugin`,
85+
)}${EOL}➡️ OK to install?`,
8486
default: true,
8587
},
8688
]
@@ -92,10 +94,10 @@ const getPromptInputs = async ({
9294
{
9395
type: 'checkbox',
9496
name: 'plugins',
95-
message: `${prefix}Recommended Build Plugins: ${infos
97+
message: `${prefix}We're going to install these plugins: ${infos
9698
.map(({ name }) => `${name} plugin`)
9799
.map(formatTitle)
98-
.join(', ')}${EOL}➡️ Which plugins to install?`,
100+
.join(', ')}${EOL}➡️ OK to install??`,
99101
choices: infos.map(({ name, package }) => ({ name: `${name} plugin`, value: package })),
100102
default: infos.map(({ package }) => package),
101103
},

tests/command.init.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test('netlify init existing site', async (t) => {
130130

131131
await builder.buildAsync()
132132
await withMockApi(routes, async ({ apiUrl, requests }) => {
133-
// --force is required since we we return an existing site in the `sites` route
133+
// --force is required since we return an existing site in the `sites` route
134134
// --manual is used to avoid the config-github flow that uses GitHub API
135135
const childProcess = execa(cliPath, ['init', '--force', '--manual'], {
136136
cwd: builder.directory,
@@ -240,7 +240,7 @@ test('netlify init new Next.js site', async (t) => {
240240
answer: answerWithValue('custom-functions'),
241241
},
242242
{
243-
question: 'Install Next on Netlify plugin',
243+
question: 'OK to install',
244244
answer: CONFIRM,
245245
},
246246
{
@@ -320,7 +320,7 @@ test('netlify init existing Next.js site with existing plugins', async (t) => {
320320
answer: answerWithValue('custom-functions'),
321321
},
322322
{
323-
question: 'Install Next on Netlify plugin',
323+
question: 'OK to install',
324324
answer: CONFIRM,
325325
},
326326
{ question: 'Give this Netlify SSH public key access to your repository', answer: CONFIRM },
@@ -358,7 +358,7 @@ test('netlify init existing Next.js site with existing plugins', async (t) => {
358358

359359
await builder.buildAsync()
360360
await withMockApi(routes, async ({ apiUrl, requests }) => {
361-
// --force is required since we we return an existing site in the `sites` route
361+
// --force is required since we return an existing site in the `sites` route
362362
// --manual is used to avoid the config-github flow that uses GitHub API
363363
const childProcess = execa(cliPath, ['init', '--force', '--manual'], {
364364
cwd: builder.directory,

0 commit comments

Comments
 (0)