Skip to content

Commit

Permalink
Merge pull request #159 from AthennaIO/develop
Browse files Browse the repository at this point in the history
fix configure command
  • Loading branch information
jlenon7 authored Oct 15, 2023
2 parents 5ab4002 + 4df52c3 commit 178512b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/artisan",
"version": "4.15.0",
"version": "4.15.2",
"description": "The Athenna CLI application. Built on top of commander and inspired in @adonisjs/ace.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ConfigureCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ConfigureCommand extends BaseCommand {

const path = isFile
? resolve(library)
: Path.nodeModules(`${library}/configure/index.js`)
: Path.nodeModules(`${library}/configurer/index.js`)

if (!(await File.exists(path))) {
throw new NotFoundConfigurerException(path, library)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/TemplateCustomizeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export class TemplateCustomizeCommand extends BaseCommand {
templates[key] = `./resources/templates/${file.base}`
})

await this.rc.setTo('view.templates', templates).save()
await this.rc.setTo('templates', templates).save()

this.logger.success(
`Athenna RC updated: ({dim,yellow} { view.templates = ${JSON.stringify(
`Athenna RC updated: ({dim,yellow} { templates = ${JSON.stringify(
templates,
null,
2
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/commands/ConfigureCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class ConfigureCommandTest extends BaseTest {

@Test()
public async shouldBeAbleToRunAConfiguratorFilePathDirectlyInsteadOfInstallingLibraries({ command }: Context) {
const output = await command.run('configure ./tests/fixtures/configurators/foo/configure/index.js', {
const output = await command.run('configure ./tests/fixtures/configurators/foo/configurer/index.js', {
path: Path.fixtures('consoles/console-mock-prompt.ts')
})

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/commands/TemplateCustomizeCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class TemplateCustomizeCommandTest extends BaseTest {
output.assertLogged('[ success ] Template files successfully moved to resources/templates folder.')
assert.isTrue(await Folder.exists(Path.resources()))
assert.isTrue(await File.exists(Path.resources('templates/command.edge')))
assert.equal(athenna.view.templates.command, './resources/templates/command.edge')
assert.equal(athenna.templates.command, './resources/templates/command.edge')
}

@Test()
Expand All @@ -48,6 +48,6 @@ export default class TemplateCustomizeCommandTest extends BaseTest {
assert.isTrue(await Folder.exists(Path.resources()))
assert.isTrue(await File.exists(Path.resources('templates/test.edge')))
assert.isTrue(await File.exists(Path.resources('templates/command.edge')))
assert.equal(athenna.view.templates.command, './resources/templates/command.edge')
assert.equal(athenna.templates.command, './resources/templates/command.edge')
}
}

0 comments on commit 178512b

Please sign in to comment.