Skip to content

Commit

Permalink
Merge pull request #79 from AthennaIO/develop
Browse files Browse the repository at this point in the history
improve codebase
  • Loading branch information
jlenon7 authored Oct 15, 2023
2 parents a79083a + 778815b commit 28d158f
Show file tree
Hide file tree
Showing 24 changed files with 1,771 additions and 1,225 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ body:
attributes:
value: |
## Ask for help through appropriate channels
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/mZyBkA936X) before posting a bug report. The issue tracker is not a help forum.
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord](https://discord.gg/JdEbBAKw6X) before posting a bug report. The issue tracker is not a help forum.
- type: markdown
attributes:
value: |
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
For anything else, such as questions or getting help, please see:
- [The Athenna help page](https://athenna.io/help)
- [Our `#help` channel in Discord](https://discord.gg/j6FKKQQrW9)
- [Our `#help` channel in Discord](https://discord.gg/JdEbBAKw6X)
- The [AthennaIO](https://stackoverflow.com/questions/tagged/AthennaIO) tag on [StackOverflow](https://stackoverflow.com/questions/ask)
- type: checkboxes
id: no-post
Expand Down
2 changes: 1 addition & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/mZyBkA936X) for questions.
Please note this issue tracker is not a help forum. We recommend using [StackOverflow](https://stackoverflow.com/questions/tagged/athennaio) or [Discord channel](https://discord.gg/JdEbBAKw6X) for questions.

<!-- Love Athenna? Please consider supporting our collective: 👉 https://opencollective.com/athennaio/donate -->
9 changes: 3 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '18.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand All @@ -24,11 +24,8 @@ jobs:
- name: Compile code
run: npm run build

- name: Copy README to build
run: cp README.md build/README.md | true

- name: Copy LICENSE to build
run: cp LICENSE.md build/LICENSE.md | true
- name: Install dependencies for compiled code
run: cd build && npm ci --omit=dev

- name: Automatic GitHub Release
uses: justincy/[email protected]
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
strategy:
matrix:
node-version:
- 16.13.1
- 18.x
- 20.x
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -34,6 +33,9 @@ jobs:
- name: Test code compilation
run: npm run build

- name: Install dependencies for compiled code
run: cd build && npm ci --omit=dev

- name: Link the package and run the CLI
run: cd build && npm link . && athenna --version

Expand All @@ -42,8 +44,7 @@ jobs:
strategy:
matrix:
node-version:
- 16.13.1
- 18.x
- 20.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -60,6 +61,9 @@ jobs:
- name: Test code compilation
run: npm run build

- name: Install dependencies for compiled code
run: cd build && npm ci --omit=dev

- name: Link the package and run the CLI
shell: bash
run: cd build && npm link . && athenna --version
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ out
.pnp.*

# Compiled code
./dist
./build
dist
build
*.js
*.d.ts
*.js.map
!.github/ci.js
!artisan.js
!tests/Stubs/**/*.js
!tests/Stubs/**/*.d.ts
!tests/Stubs/**/*.js.map
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
7 changes: 7 additions & 0 deletions artisan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

import { Exec } from '@athenna/common'

Exec.artisan('./bin/artisan.js', {
nodeOptions: ['--enable-source-maps', '--import=@athenna/tsconfig'],
})
5 changes: 0 additions & 5 deletions bin/.bin

This file was deleted.

4 changes: 1 addition & 3 deletions bin/artisan.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env -S node --experimental-import-meta-resolve

import { Ignite } from '@athenna/core'

const ignite = await new Ignite().load(import.meta.url, { bootLogs: false })

await ignite.artisan(process.argv, { displayName: 'Artisan' })
await ignite.console(process.argv, { displayName: 'Artisan' })
9 changes: 7 additions & 2 deletions bin/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env -S node --experimental-import-meta-resolve
#!/usr/bin/env node

import 'reflect-metadata'
import sourceMapSupport from 'source-map-support'

import { Ignite } from '@athenna/core'

sourceMapSupport.install({ handleUncaughtExceptions: false })

const ignite = await new Ignite().load(import.meta.url, {
bootLogs: false,
athennaRcPath: 'bin/.athennarc.prod.json',
})

Config.set('app.version', `Athenna CLI v${process.env.APP_VERSION}`)

await ignite.artisan(process.argv, { displayName: 'Athenna' })
await ignite.console(process.argv, { displayName: 'Athenna' })
4 changes: 1 addition & 3 deletions bin/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ const ignite = await new Ignite().load(import.meta.url, { bootLogs: false })

const repl = await ignite.repl()

await import('@athenna/common').then(common => {
Object.keys(common).forEach(key => (repl.context[key] = common[key]))
})
await repl.importInContext('@athenna/common')
2 changes: 2 additions & 0 deletions bin/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { command } from '@athenna/artisan/testing/plugins'
import { Runner, assert, specReporter } from '@athenna/test'

await Runner.setTsEnv()
.addPlugin(assert())
.addPlugin(command())
.addReporter(specReporter())
.addPath('tests/e2e/**/*.ts')
.addPath('tests/unit/**/*.ts')
Expand Down
5 changes: 0 additions & 5 deletions bin/tsconfig.build.json

This file was deleted.

27 changes: 0 additions & 27 deletions node

This file was deleted.

Loading

0 comments on commit 28d158f

Please sign in to comment.