Skip to content

Commit 739676b

Browse files
feat(cli): change msg when no datasource or repository exists
1 parent 6e6faad commit 739676b

File tree

1 file changed

+4
-4
lines changed
  • packages/cli/generators/repository

1 file changed

+4
-4
lines changed

packages/cli/generators/repository/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const PROMPT_MESSAGE_MODEL =
2828
'Select the model(s) you want to generate a repository';
2929
const PROMPT_MESSAGE_DATA_SOURCE = 'Please select the datasource';
3030
const ERROR_READING_FILE = 'Error reading file';
31-
const ERROR_NO_DATA_SOURCES_FOUND = 'No datasources found in';
32-
const ERROR_NO_MODELS_FOUND = 'No models found in';
31+
const ERROR_NO_DATA_SOURCES_FOUND = 'No datasources found at';
32+
const ERROR_NO_MODELS_FOUND = 'No models found at';
3333
const ERROR_NO_MODEL_SELECTED = 'You did not select a valid model';
3434
const ERROR_NO_DIRECTORY = 'The directory was not found';
3535

@@ -192,7 +192,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator {
192192
if (!fs.existsSync(this.artifactInfo.datasourcesDir)) {
193193
return this.exit(
194194
new Error(
195-
`${ERROR_NO_DIRECTORY} ${this.artifactInfo.datasourcesDir}.
195+
`${ERROR_NO_DATA_SOURCES_FOUND} ${this.artifactInfo.datasourcesDir}.
196196
${chalk.yellow(
197197
'Please visit https://loopback.io/doc/en/lb4/DataSource-generator.html for information on how datasources are discovered',
198198
)}`,
@@ -204,7 +204,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator {
204204
if (!fs.existsSync(this.artifactInfo.modelDir)) {
205205
return this.exit(
206206
new Error(
207-
`${ERROR_NO_DIRECTORY} ${this.artifactInfo.modelDir}.
207+
`${ERROR_NO_MODELS_FOUND} ${this.artifactInfo.modelDir}.
208208
${chalk.yellow(
209209
'Please visit https://loopback.io/doc/en/lb4/Model-generator.html for information on how models are discovered',
210210
)}`,

0 commit comments

Comments
 (0)