Skip to content

Commit

Permalink
chore(npm): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jan 2, 2025
1 parent ccc3839 commit ed09464
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 121 deletions.
30 changes: 7 additions & 23 deletions package-lock.json

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

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/core",
"version": "5.9.0",
"version": "5.10.0",
"description": "One foundation for multiple applications.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down Expand Up @@ -85,7 +85,7 @@
"@athenna/common": "^5.5.0",
"@athenna/config": "^5.1.0",
"@athenna/cron": "^5.4.0",
"@athenna/http": "^5.14.0",
"@athenna/http": "^5.15.0",
"@athenna/ioc": "^5.0.0",
"@athenna/logger": "^5.1.0",
"@athenna/test": "^5.2.0",
Expand All @@ -106,8 +106,7 @@
"lint-staged": "^12.5.0",
"nodemon": "^3.1.9",
"prettier": "^2.8.8",
"vite": "^6.0.6",
"vite-plugin-restart": "^0.4.2"
"vite": "^6.0.6"
},
"c8": {
"all": true,
Expand Down
5 changes: 1 addition & 4 deletions src/applications/Http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ export class Http {

ioc.safeUse('Athenna/Core/HttpRoute').register()

if (process.argv.includes('--vite')) {
await server.viteReady()
}

await server.viteReady()
await server.listen({ host: options.host, port: options.port })

if (Config.notExists('rc.bootLogs') || Config.is('rc.bootLogs', false)) {
Expand Down
15 changes: 1 addition & 14 deletions src/commands/ServeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ export class ServeCommand extends BaseCommand {
})
public watch: boolean

@Option({
signature: '-v, --vite',
description:
'Turn on vite dev server for HMR and static files compilation.',
default: false
})
public vite: boolean

public static signature(): string {
return 'serve'
}
Expand All @@ -44,15 +36,9 @@ export class ServeCommand extends BaseCommand {

if (this.watch) {
const nodemon = this.getNodemon()
const nodeArgs = []

if (this.vite) {
nodeArgs.push('--vite')
}

nodemon({
script: entrypoint.replace('.ts', '.js'),
args: nodeArgs,
ignore: [
'.git',
'.github',
Expand All @@ -61,6 +47,7 @@ export class ServeCommand extends BaseCommand {
'.fleet',
'public',
'*.edge',
'vite.config.*',
'node_modules/**/node_modules'
],
watch: [
Expand Down
30 changes: 0 additions & 30 deletions tests/fixtures/consoles/serve-vite-with-logs.ts

This file was deleted.

28 changes: 0 additions & 28 deletions tests/fixtures/consoles/serve-vite.ts

This file was deleted.

18 changes: 0 additions & 18 deletions tests/unit/commands/ServeCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,4 @@ export default class ServeCommandTest extends BaseCommandTest {

output.assertSucceeded()
}

@Test()
public async shouldBeAbleToExecuteServeCommandWithVite({ command }: Context) {
const output = await command.run('serve --vite', {
path: Path.fixtures('consoles/serve-vite.ts')
})

output.assertSucceeded()
}

@Test()
public async shouldBeAbleToExecuteServeCommandWithViteWithLogs({ command }: Context) {
const output = await command.run('serve --vite', {
path: Path.fixtures('consoles/serve-vite-with-logs.ts')
})

output.assertSucceeded()
}
}

0 comments on commit ed09464

Please sign in to comment.