Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed Mar 21, 2020
2 parents b2695f0 + 03fee62 commit 5109e75
Show file tree
Hide file tree
Showing 395 changed files with 17,024 additions and 6,182 deletions.
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Here the commit types used in this project:
- fix(file): fix, **PATCH**
- refactor(file): improvement, implementation change without API change, **PATCH**
- perf(file): performance improvement (same as refactor) **PATCH**, **MINOR**
- feat(file): change, addition (new feature), minor API change, **MINOR**
- BREAKING(file): big API change **MAJOR**
- feat(file): addition (new feature) or change with no API change, **MINOR**
- BREAKING(file): addition or change introducing API change **MAJOR**
- docs(file): documentation only change
- chore: CI and internal / dev tool changes
- typings: typings improvement or change **PATCH / MINOR**
- style: code formatting only change
- chorefile(): CI and internal / dev tool changes
- typings(file): typings improvement or change **PATCH / MINOR**
- style(file): code formatting and style only changes

Adding `(file)` is optional and is used to specify the file changed.

Expand Down
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ PR description/overview (changes introduced, implementation justification if nee

## **Semantic versioning classification**

- [ ] This PR introduces *BREAKING* changes.
- [ ] This PR adds new features, improve the code and implies minimal changes.
- [ ] This PR fixes a bug and references the relevant issue or documentation.
- [ ] This PR improve performance or code refactor without API changes.
- [ ] This PR **only** includes non-code changes (documentation, CI, tools...).
- [ ] MAJOR: This PR introduces *BREAKING* changes (direct API change).
- [ ] MINOR: This PR adds new features, improve the code and/or implies minimal API changes.
- [ ] PATCH: This PR fixes a bug, if needed it also references the relevant issue or documentation.
- [ ] PATCH: This PR improve performance or code refactor without API changes.
- [ ] PATCH: This PR **only** includes non-code changes (documentation, style, CI, tools...).
2 changes: 2 additions & 0 deletions .github/workflows/docgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ jobs:
node-version: 12
- name: Install dependencies
run: yarn install --frozen-lockfile
env:
CI: true
- name: Generate and commit documentation
uses: axonteam/action-docgen@master
78 changes: 43 additions & 35 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,56 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: yarn install
- run: yarn test:publish
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Dep install and test
run: |
yarn install
yarn test:publish
env:
CI: true

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Dep install
run: yarn install
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- name: Dep install
run: yarn install
env:
CI: true
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}

publish-gpr:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@khaazz'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Dep install
run: yarn install
- name: Autoscope package
uses: khaazz/action-autoscope@master
- name: Configure .npmrc
run: echo registry=https://npm.pkg.github.com/Khaazz >> .npmrc
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@khaazz'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Dep install
run: yarn install
env:
CI: true
- name: Autoscope package
uses: khaazz/action-autoscope@master
- name: Configure .npmrc
run: echo registry=https://npm.pkg.github.com/Khaazz >> .npmrc
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,22 @@ jobs:
yarn lint:ts
env:
CI: true

tsc:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install and tsc
run: |
yarn install
yarn tsc
env:
CI: true
6 changes: 3 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ logs/
# Miscellaneous
.vscode/
axoncore.code-workspace
docs/
examples/
_images/
examples/
docs/
tests/

# NPM ignore

Expand All @@ -23,7 +24,6 @@ _images/
.travis.yml
.github/
.git/
test/
tsconfig.json
tslint.json
CONTRIBUTING.md
Expand Down
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ AxonCore is lib agnostic, which mean you can use it indifferently with [Eris](ht
- **Translations** - Built-in support for translation and message management system.
- **Logging** - Built-in custom logging.
- **Tracking** - Easily track and debug command usage, events and errors with custom events emitted by AxonCore.
- **Typescript support** - Full typescript and intellisense support

## Philosophy

Expand All @@ -78,6 +79,10 @@ Here's how to use it:
- Available libraries: `eris`, `discordjs`.
- Available module types: `commonjs`, `esm`.

AxonCore has **FULL** typescript support.
When you install the package the first time, you can choose the library you are using, and the package will automatically link the library typings. That will allow you to have full and complete typings for your typescript project or for using intllisense.
Note: AxonCore creates a `.axoncorerc` file with the default configuration. Editing or deleting this file will change the typings link on the next install.

## Features Overview

Because it is built with the correct level abstraction, using AxonCore feels natural and powerful. Everything is easily accessible, extendable and customisable.
Expand All @@ -90,11 +95,11 @@ There's also a built-in help command that you can easily override if you want to

### Commands

You can create commands by extending [Command](src/Structures/Command/Command.js), [CommandPermissions](src/Structures/Command/CommandPermissions.js) and [CommandOptions](src/Structures/Command/CommandOptions.js).
You can create commands by extending [Command](src/Core/Command/Command.js), [CommandPermissions](src/Core/Command/CommandPermissions.js) and [CommandOptions](src/Core/Command/CommandOptions.js).

### Listeners

You can also create listeners by extending [Listener](src/Structures/Listener.js).
You can also create listeners by extending [Listener](src/Core/Listener.js).
A **Listener** is a function that is run when a Discord-specific event occurs. Many listeners can be bound to one Discord event.
A **Handler** is an object responsible of running all listeners for a specific Discord event.

Expand All @@ -108,7 +113,7 @@ There are specific providers for each type of Database, such as:
- SQL ([sequelize](https://github.com/sequelize/sequelize)) [TODO]
- SQLite () [TODO]

The only thing you will handle is a [GuildConfig](src/Structures/DataStructure/GuildConfig.js) and an [AxonConfig](src/Structures/DataStructure/AxonConfig.js) object. Those are stored in the [GuildConfigCache](src/Structures/GuildConfigCache.js).
The only thing you will handle is a [GuildConfig](src/Core/Models/GuildConfig.js) and an [AxonConfig](src/Core/Models/AxonConfig.js) object. Those are stored in the [GuildConfigCache](src/Core/GuildConfigCache.js).

### Translation support

Expand All @@ -133,9 +138,9 @@ TODO

### Execution context, error management, usage tracking

A Command always should returns a Promise wrapping a [CommandResponse](src/Structures/Command/CommandResponse.js). Either explicitely by creating a CommandResponse and wrapping it in a Promise (`CommandResponse.resolve()`), or implicitely via [`sendMessage`](a), [`sendSuccess`](a) or [`sendError`](a). CommandResponse in these last cases is filled with appropriate information regarding command execution.
A Command always should returns a Promise wrapping a [CommandResponse](src/Core/Command/CommandResponse.js). Either explicitely by creating a CommandResponse and wrapping it in a Promise (`CommandResponse.resolve()`), or implicitely via [`sendMessage`](a), [`sendSuccess`](a) or [`sendError`](a). CommandResponse in these last cases is filled with appropriate information regarding command execution.

The framework will then build a [CommandContext](src/Structures/Command/CommandContext.js) object after each command execution.
The framework will then build a [CommandContext](src/Core/Command/CommandContext.js) object after each command execution.
Two types of events will then be emitted, depending on the scenario:

- The command was executed entirely and successfully. A **commandExecution** event is emitted by AxonClient with `status = true`.
Expand All @@ -159,13 +164,17 @@ axonClient.on('listenerError', (eventName: String, listenerName: String, { liste
### Utilities

- [Embed](src/Utility/External/Embed.js)
- Resolver
- [Resolver](src/Libraries/definitions/Resolver.js)
- [Utility](src/Utility/Utils.js)
- Message Collector [TODO-outdated]
- [Collectors](src/Utility/Discord/Collectors/Collector.js)
- [Message Collector](src/Utility/Discord/Collectors/MessageCollector.js)
- Reaction collector [TODO-outdated]

- [LRUCache](src/Utility/External/LRUCache.js)
- [SortedList](src/Utility/External/SortedList.js)
- [Stack](src/Utility/External/Stack.js)
- [Queue](src/Utility/External/Queue.js)
- [FunctionQueue](src/Utility/External/FunctionQueue.js)
- [AsyncQueue](src/Utility/External/AsyncQueue.js)
- [AutoQueue](src/Utility/External/AutoQueue.js)

Expand Down
Loading

0 comments on commit 5109e75

Please sign in to comment.