Skip to content

Commit

Permalink
Merge pull request #179 from AthennaIO/develop
Browse files Browse the repository at this point in the history
feat(types): export types
  • Loading branch information
jlenon7 authored Aug 9, 2023
2 parents 3a00a7b + d364fb6 commit 5b91435
Show file tree
Hide file tree
Showing 23 changed files with 64 additions and 111 deletions.
2 changes: 1 addition & 1 deletion bin/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ await Runner.setTsEnv()
.addReporter(specReporter())
.addPath('tests/unit/**/*.ts')
.setCliArgs(process.argv.slice(2))
.setGlobalTimeout(15000)
.setGlobalTimeout(30000)
.run()
68 changes: 34 additions & 34 deletions package-lock.json

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

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/core",
"version": "4.0.0",
"version": "4.1.0",
"description": "The plug and play Node.js framework.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down Expand Up @@ -67,14 +67,14 @@
"semver": "^7.5.3"
},
"devDependencies": {
"@athenna/artisan": "^4.1.0",
"@athenna/common": "^4.3.0",
"@athenna/config": "^4.2.0",
"@athenna/http": "^4.2.0",
"@athenna/ioc": "^4.0.0",
"@athenna/logger": "^4.1.0",
"@athenna/test": "^4.2.0",
"@athenna/view": "^4.0.0",
"@athenna/artisan": "^4.2.0",
"@athenna/common": "^4.4.0",
"@athenna/config": "^4.3.0",
"@athenna/http": "^4.3.0",
"@athenna/ioc": "^4.1.0",
"@athenna/logger": "^4.2.0",
"@athenna/test": "^4.3.0",
"@athenna/view": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.56.0",
"@typescript-eslint/parser": "^5.56.0",
"c8": "^7.12.0",
Expand Down
36 changes: 0 additions & 36 deletions src/annotations/Service.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/commands/ReplCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BaseCommand, Option } from '@athenna/artisan'
export class ReplCommand extends BaseCommand {
@Option({
signature: '-e, --env <env>',
description: 'Change the evironment where the application will run.',
description: 'Change the environment where the application will run.',
default: '',
})
public env: string
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ServeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BaseCommand, Option } from '@athenna/artisan'
export class ServeCommand extends BaseCommand {
@Option({
signature: '-e, --env <env>',
description: 'Change the evironment where the application will run.',
description: 'Change the environment where the application will run.',
default: '',
})
public env: string
Expand Down
2 changes: 1 addition & 1 deletion src/commands/TestCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { BaseCommand, Option } from '@athenna/artisan'
export class TestCommand extends BaseCommand {
@Option({
signature: '-e, --env <env>',
description: 'Change the evironment where your tests wil run.',
description: 'Change the environment where your tests wil run.',
default: 'test',
})
public env: string
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
* file that was distributed with this source code.
*/

export * from './types/index.js'

export * from '#src/ignite/Ignite'
export * from '#src/helpers/LoadHelper'

export * from '#src/annotations/Service'
export * from '#src/providers/CoreProvider'
2 changes: 1 addition & 1 deletion src/providers/CoreProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class CoreProvider extends ServiceProvider {
Config.get('rc.meta'),
)

if (Reflect.hasMetadata('provider:registered', Service)) {
if (Reflect.hasMetadata('ioc:registered', Service)) {
return
}

Expand Down
2 changes: 1 addition & 1 deletion templates/service.edge
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Service } from '@athenna/core'
import { Service } from '@athenna/ioc'

@Service()
export class {{ namePascal }} {
Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/services/DecoratedWelcomeService.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Service } from '#src'
import { Service } from '@athenna/ioc'

@Service()
export class DecoratedWelcomeService {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/applications/ArtisanTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ import { Log } from '@athenna/logger'
import { Config } from '@athenna/config'
import { File, Path } from '@athenna/common'
import { ViewProvider } from '@athenna/view'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { ArtisanProvider } from '@athenna/artisan'
import { BaseTest } from '#tests/helpers/BaseTest'
import { Artisan } from '#src/applications/Artisan'
import { CALLED_MAP } from '#tests/helpers/CalledMap'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { ConsoleKernel } from '#tests/stubs/kernels/ConsoleKernel'
import { ConsoleExceptionHandler } from '#tests/stubs/handlers/ConsoleExceptionHandler'

Expand Down
3 changes: 1 addition & 2 deletions tests/unit/applications/HttpTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
*/

import { fake } from 'sinon'
import { Test } from '@athenna/test'
import { Log } from '@athenna/logger'
import { Path } from '@athenna/common'
import { Server } from '@athenna/http'
import { Config } from '@athenna/config'
import { Http } from '#src/applications/Http'
import type { Context } from '@athenna/test/types'
import { Test, type Context } from '@athenna/test'
import { BaseTest } from '#tests/helpers/BaseTest'
import { LoadHelper } from '#src/helpers/LoadHelper'
import { CALLED_MAP } from '#tests/helpers/CalledMap'
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/MakeExceptionCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

import { File } from '@athenna/common'
import { Artisan } from '@athenna/artisan'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class MakeExceptionCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/MakeFacadeCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

import { File } from '@athenna/common'
import { Artisan } from '@athenna/artisan'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class MakeFacadeCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/MakeProviderCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import { File } from '@athenna/common'
import { Config } from '@athenna/config'
import { Artisan } from '@athenna/artisan'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class MakeProviderCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/MakeServiceCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import { File } from '@athenna/common'
import { Config } from '@athenna/config'
import { Artisan } from '@athenna/artisan'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class MakeServiceCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/MakeTestCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

import { File } from '@athenna/common'
import { Artisan } from '@athenna/artisan'
import { ExitFaker, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { Test, ExitFaker, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class MakeTestCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/ReplCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
* file that was distributed with this source code.
*/

import { Test } from '@athenna/test'
import { Artisan } from '@athenna/artisan'
import type { Context } from '@athenna/test/types'
import { Test, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class ReplCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/ServeCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
* file that was distributed with this source code.
*/

import { Test } from '@athenna/test'
import { Artisan } from '@athenna/artisan'
import type { Context } from '@athenna/test/types'
import { Test, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class ServeCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/commands/TestCommandTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
* file that was distributed with this source code.
*/

import { Test } from '@athenna/test'
import { Artisan } from '@athenna/artisan'
import type { Context } from '@athenna/test/types'
import { Test, type Context } from '@athenna/test'
import { BaseCommandTest } from '#tests/helpers/BaseCommandTest'

export default class TestCommandTest extends BaseCommandTest {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/helpers/LoadHelperTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
import { fake } from 'sinon'
import { LoadHelper } from '#src'
import { Log } from '@athenna/logger'
import { BeforeEach, Test } from '@athenna/test'
import type { Context } from '@athenna/test/types'
import { BaseTest } from '#tests/helpers/BaseTest'
import { CALLED_MAP } from '#tests/helpers/CalledMap'
import { Test, BeforeEach, type Context } from '@athenna/test'

export default class LoadHelperTest extends BaseTest {
@BeforeEach()
Expand Down
Loading

0 comments on commit 5b91435

Please sign in to comment.