Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] Monorepo #12

Open
wants to merge 389 commits into
base: Master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
389 commits
Select commit Hold shift + click to select a range
60a70ac
feature: implement 'cache' class
4x8Matrix Aug 24, 2024
04b75f6
feature: implement 'state' class
4x8Matrix Aug 24, 2024
2689236
chore: several minor changes to classes structure
4x8Matrix Aug 24, 2024
99b9e7d
feature(bitflag): add 'role' bitflag class
4x8Matrix Aug 24, 2024
4e35d64
feature(bitflag): add 'systemChannel' bitflag class
4x8Matrix Aug 24, 2024
509173f
feature: implement & update BitFlag support
4x8Matrix Aug 24, 2024
ec6cd56
feature: implement 'threadMember' object
4x8Matrix Aug 25, 2024
4f657ae
feature: implement 'guildMember' object
4x8Matrix Aug 25, 2024
20674c0
chore: address various 'apiType' errors
4x8Matrix Aug 25, 2024
d747104
feature(bitflags): implement 'guildMember' object
4x8Matrix Aug 25, 2024
72227e3
feature(bitflags): implement 'threadMember' object
4x8Matrix Aug 25, 2024
f78dd8c
feature(bitflags): implement 'channel' object
4x8Matrix Aug 25, 2024
e479a43
feature(channels): implement 'threadMetadata' object
4x8Matrix Aug 25, 2024
2cc3cfc
feature(channels): implement 'defaultReaction' object
4x8Matrix Aug 25, 2024
017fdd3
feature(channels): implement 'forumTag' object
4x8Matrix Aug 25, 2024
a1a37c8
feature(channels): implement 'overwrite' object
4x8Matrix Aug 25, 2024
40954d4
feature(channel-behaviours): implement 'channel' behaviour object
4x8Matrix Aug 25, 2024
96c94e7
feature(channel-behaviours): implement 'forum' behaviour object
4x8Matrix Aug 25, 2024
7a80958
feature(channel-behaviours): implement 'groupDM' behaviour object
4x8Matrix Aug 25, 2024
53382e6
feature(channel-behaviours): implement 'guild' behaviour object
4x8Matrix Aug 25, 2024
466fcb9
feature(channel-behaviours): implement 'media' behaviour object
4x8Matrix Aug 25, 2024
dbcb748
feature(channel-behaviours): implement 'text' behaviour object
4x8Matrix Aug 25, 2024
bb923b4
feature(channel-behaviours): implement 'thread' behaviour object
4x8Matrix Aug 25, 2024
a366e3c
feature(channel-behaviours): implement 'voice' behaviour object
4x8Matrix Aug 25, 2024
193ea55
feature(channel-threads): implement 'announcement' thread object
4x8Matrix Aug 25, 2024
a34f50d
feature(channel-threads): implement 'forum' thread object
4x8Matrix Aug 25, 2024
1ec147c
feature(channel-threads): implement 'media' thread object
4x8Matrix Aug 25, 2024
7e7583c
feature(channel-threads): implement 'private' thread object
4x8Matrix Aug 25, 2024
0fa819b
feature(channel-threads): implement 'public' thread object
4x8Matrix Aug 25, 2024
a15a2c0
feature(channel-types): implement 'dm' channel type
4x8Matrix Aug 25, 2024
2c3e29b
feature(channel-types): implement 'groupDm' channel type
4x8Matrix Aug 25, 2024
93bc22a
feature(channel-types): implement 'guildAnnouncement' channel type
4x8Matrix Aug 25, 2024
6d5734c
feature(channel-types): implement 'guildCategory' channel type
4x8Matrix Aug 25, 2024
8c27872
feature(channel-types): implement 'guildDirectory' channel type
4x8Matrix Aug 25, 2024
7a695a4
feature(channel-types): implement 'guildStageVoice' channel type
4x8Matrix Aug 25, 2024
770d1d6
feature(channel-types): implement 'guildText' channel type
4x8Matrix Aug 25, 2024
7a6ff28
feature(channel-types): implement 'guildVoice' channel type
4x8Matrix Aug 25, 2024
613ac37
feat(core): implement 'bot' class that implements the various classes
4x8Matrix Aug 25, 2024
72f10df
chore: add documentation for behaviours
4x8Matrix Aug 25, 2024
8f07bf5
chore(bitflags): fix invalid bit operations
4x8Matrix Aug 25, 2024
1810f8e
feat(ws): fix secret token being leaked during 'print'
4x8Matrix Aug 25, 2024
5bd8a13
feat(types): refactor permission types
4x8Matrix Aug 25, 2024
d27555f
feat(types): implement user types
4x8Matrix Aug 25, 2024
d76c2b5
feat(core): add several discord events to Bot
4x8Matrix Aug 25, 2024
6ccea1b
feat(types): implement sticker types
4x8Matrix Aug 25, 2024
126b669
feat(types): add support for passing secrets directly
4x8Matrix Aug 25, 2024
161a91b
chore(types): implement 'application' types
4x8Matrix Aug 25, 2024
52fe916
chore(types): implement 'channel' types
4x8Matrix Aug 25, 2024
c006fa1
chore(types): implement 'message' types
4x8Matrix Aug 25, 2024
d454954
chore(types): implement 'poll' types
4x8Matrix Aug 25, 2024
a0b2896
chore(types): minor refactoring to existing 'api' types
4x8Matrix Aug 25, 2024
3523c39
chore(types): implement 'embed' types
4x8Matrix Aug 25, 2024
32e7073
chore(types): update 'intents' types
4x8Matrix Aug 25, 2024
9a2d1c2
chore(types): fix broken types for several Builder classes
4x8Matrix Aug 25, 2024
755aa33
feat(builder): implement 'intents' builder object
4x8Matrix Aug 25, 2024
9023afd
feat(classes): implement 'attachment' builder object
4x8Matrix Aug 25, 2024
18a877c
feat(classes): implement 'permission' builder object
4x8Matrix Aug 25, 2024
28b31c8
feat(classes): implement 'application' builder object
4x8Matrix Aug 25, 2024
e364608
feat(classes): implement 'installParams' builder object
4x8Matrix Aug 25, 2024
f5c0873
feat(classes): implement 'member' class object
4x8Matrix Aug 25, 2024
97888ea
feat(classes): implement 'team' class object
4x8Matrix Aug 25, 2024
fa76cf0
feat(classes): implement 'application' bitflags class object
4x8Matrix Aug 25, 2024
c63bfc1
feat(classes): implement 'attachment' bitflags class object
4x8Matrix Aug 25, 2024
4f76c16
feat(classes): implement 'message' bitflags class object
4x8Matrix Aug 25, 2024
03c8d71
feat(classes): implement 'mention' class object
4x8Matrix Aug 25, 2024
13ad65b
feat(classes): implement 'embed' class object
4x8Matrix Aug 25, 2024
139c002
feat(classes): implement 'embed' bitflags class object
4x8Matrix Aug 25, 2024
e5fa7a9
feat(classes): implement 'field' bitflags class object
4x8Matrix Aug 25, 2024
01f36e2
feat(classes): implement 'footer' class object
4x8Matrix Aug 25, 2024
64cbd51
feat(classes): implement 'image' class object
4x8Matrix Aug 25, 2024
cabf131
feat(classes): implement 'provider' class object
4x8Matrix Aug 25, 2024
7463fa4
feat(classes): implement 'activity' class object
4x8Matrix Aug 25, 2024
87f06c5
feat(classes): implement 'thumbnail' class object
4x8Matrix Aug 25, 2024
7140160
feat(classes): implement 'video' class object
4x8Matrix Aug 25, 2024
6b850a5
feat(classes): implement 'call' class object
4x8Matrix Aug 25, 2024
2a1152b
feat(classes): implement 'interactionMetadata' class object
4x8Matrix Aug 25, 2024
d33a71b
feat(classes): implement 'interaction' class object
4x8Matrix Aug 25, 2024
17b8cdb
feat(classes): implement 'message' class object
4x8Matrix Aug 25, 2024
91ab353
feat(classes): implement 'reference' class object
4x8Matrix Aug 25, 2024
f8ea56d
feat(classes): implement 'roleSubscriptionData' class object
4x8Matrix Aug 25, 2024
ab169ab
feat(classes): implement 'stickerItem' class object
4x8Matrix Aug 25, 2024
87eb494
feat(classes): implement 'actionRow' class object
4x8Matrix Aug 25, 2024
f06da9f
feat(classes): implement 'button' class object
4x8Matrix Aug 25, 2024
af7c932
feat(classes): implement 'textInput' class object
4x8Matrix Aug 25, 2024
f93d5cc
feat(classes): implement 'defaultValues' class object
4x8Matrix Aug 25, 2024
0efff45
feat(classes): implement 'option' class object
4x8Matrix Aug 25, 2024
514c05f
feat(classes): implement 'selectMenu' class object
4x8Matrix Aug 25, 2024
261be1e
feat(classes): implement 'answer' class object
4x8Matrix Aug 25, 2024
1b9a784
feat(classes): implement 'answerCount' class object
4x8Matrix Aug 25, 2024
07a0037
feat(classes): implement 'mediaObject' class object
4x8Matrix Aug 25, 2024
584c285
feat(classes): implement 'poll' class object
4x8Matrix Aug 25, 2024
537cdd7
feat(classes): implement 'countDetails' class object
4x8Matrix Aug 25, 2024
2105172
feat(classes): implement 'reaction' class object
4x8Matrix Aug 25, 2024
afd518b
feat(classes): implement 'results' class object
4x8Matrix Aug 25, 2024
c3ec5ce
chore(classes): assert success state of Request
4x8Matrix Aug 25, 2024
3afa219
chore(classes): add 'state' support for Guild
4x8Matrix Aug 25, 2024
436a0d5
chore(classes): update types for Voice
4x8Matrix Aug 25, 2024
4dd10cc
chore(classes): fix types
4x8Matrix Aug 25, 2024
35e37ae
chore(classes): bug fixes, it works
4x8Matrix Aug 25, 2024
abd3ccf
feat: update 'development' script
4x8Matrix Aug 25, 2024
dd98ee7
chore: stylyua format packages
4x8Matrix Aug 25, 2024
d62f9a8
chore: selene lint fixes
4x8Matrix Aug 25, 2024
722a805
chore: implement support for correct discord intents
4x8Matrix Aug 26, 2024
f3461b4
feature: add various events to discord 'Bot' class
4x8Matrix Aug 26, 2024
d47526e
chore(README): fix remove inconsistent header line(#20)
Naymmmm Aug 26, 2024
5b95e4f
feat(types): add 'entitlement' types
4x8Matrix Aug 26, 2024
ed6033a
feat(types): add 'interaction' types
4x8Matrix Aug 26, 2024
26de077
feat(classes): implement 'entitlement' class
4x8Matrix Aug 26, 2024
99c3cd0
feat(classes): implement 'resolved' class
4x8Matrix Aug 26, 2024
0b4898e
chore(classes): refactor guildMember -> member
4x8Matrix Aug 26, 2024
b4b63d9
feat(classes): implement 'data' class
4x8Matrix Aug 26, 2024
b287a69
feat(classes): implement 'dataOption' class
4x8Matrix Aug 26, 2024
7709abf
feat(classes): implement 'interaction' class
4x8Matrix Aug 26, 2024
a198ab4
feat(util): implement 'import' class
4x8Matrix Aug 26, 2024
d070372
feat: implement minor changes to workflow
4x8Matrix Aug 26, 2024
e9842f7
Merge branch 'refactor/monorepository-origin' of https://github.com/D…
4x8Matrix Aug 26, 2024
554847f
chore: refactor names for builders
4x8Matrix Aug 26, 2024
f91a21e
feature: implement choice, interaction and option builders
4x8Matrix Aug 26, 2024
c1b7e33
chore: update docs
4x8Matrix Aug 26, 2024
366bc70
feat(interactions): break down interactions into their respective int…
4x8Matrix Aug 31, 2024
41318f4
feat(builders): implement guild builder + types
4x8Matrix Sep 1, 2024
7cf505c
feat(builders): update references + add tests
4x8Matrix Sep 1, 2024
2c9d567
feature: add 64bit library support
4x8Matrix Sep 7, 2024
40ff2d8
feature: add documentation
4x8Matrix Sep 7, 2024
41314da
feature: add documentation
4x8Matrix Sep 7, 2024
c3a4f00
test: add tests for interaction APIs
4x8Matrix Sep 9, 2024
db28e40
fix: address type errors
4x8Matrix Sep 9, 2024
bd6e25a
feat: add 'IntegrationTypesConfig' enum
4x8Matrix Sep 9, 2024
a0fcea2
feat: add 'ApplicationCommandType' enum
4x8Matrix Sep 9, 2024
3adbbe2
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
0c95a1b
fix: address invalid types
4x8Matrix Sep 9, 2024
837eca6
fix: add JSON type
4x8Matrix Sep 9, 2024
c888180
fix: add JSON type
4x8Matrix Sep 9, 2024
3db4e4e
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
faaff15
fix: add JSON type
4x8Matrix Sep 9, 2024
8b555e3
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
3fd7268
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
bea4243
fix: add JSON type
4x8Matrix Sep 9, 2024
3283420
feat: update interface + object for interaction
4x8Matrix Sep 9, 2024
57d4c2a
fix: address invalid types
4x8Matrix Sep 9, 2024
e84310f
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
b2723b4
feat: add support for application ids
4x8Matrix Sep 9, 2024
a7c5fe7
feat: implement support for slash commands
4x8Matrix Sep 9, 2024
48e4565
feat(commands): add 'choice' object
4x8Matrix Sep 9, 2024
03ed66c
feat(commands): add 'command' object
4x8Matrix Sep 9, 2024
977b029
feat(commands): add 'option' object
4x8Matrix Sep 9, 2024
0b160fe
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
ef34c3a
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
ecc2e01
fix: support 'bit' over 'bit32'
4x8Matrix Sep 9, 2024
26c8c0d
feat: implement support for slash commands
4x8Matrix Sep 9, 2024
caf2329
fix: address invalid error message
4x8Matrix Sep 9, 2024
940e0c6
feat: add support for interactions/commands
4x8Matrix Sep 9, 2024
864339b
fix: remove redundant interaction class
4x8Matrix Sep 9, 2024
349b9b6
feat: add 'Snowflake' extension class
4x8Matrix Sep 9, 2024
89bc320
fix: add support for additional information in errors
4x8Matrix Sep 9, 2024
9d95724
fix: fix capitalisation of bit64
4x8Matrix Sep 9, 2024
7b07130
fix: stylua format
4x8Matrix Sep 9, 2024
205db59
fix: fix invalid manager types
4x8Matrix Sep 9, 2024
d1e8d04
fix: remove redundant test case
4x8Matrix Sep 9, 2024
33b7759
feat: add unit tests for bit64 lib
4x8Matrix Sep 9, 2024
0c59a6f
feat: refactor interaction apiTypes to support partial discord objects
4x8Matrix Oct 15, 2024
51ddf7b
feat: refactor discord api types for various classes
4x8Matrix Oct 15, 2024
60c544f
fix: remove dated documentation
4x8Matrix Oct 15, 2024
317051f
feat: implement 'interaction' object for discord luau!
4x8Matrix Oct 15, 2024
a9a9457
fix: remove dated documentation
4x8Matrix Oct 15, 2024
5e762fb
feat: implement 'attachment' builder
4x8Matrix Oct 15, 2024
0dbc511
feat: implement 'emoji' builder
4x8Matrix Oct 15, 2024
aa6a57e
feat: implement 'embed' builder
4x8Matrix Oct 15, 2024
66c6972
feat: implement embed ' author' builder
4x8Matrix Oct 15, 2024
31a4ce3
feat: implement embed 'field' builder
4x8Matrix Oct 15, 2024
5d0736b
feat: implement embed 'footer' builder
4x8Matrix Oct 15, 2024
a8d8621
feat: implement embed 'image' builder
4x8Matrix Oct 15, 2024
a80420c
feat: implement embed 'provider' builder
4x8Matrix Oct 15, 2024
13f802a
feat: implement embed 'thumbnail' builder
4x8Matrix Oct 15, 2024
76a508a
feat: implement embed 'video' builder
4x8Matrix Oct 15, 2024
317731e
feat: implement 'message' builder
4x8Matrix Oct 15, 2024
8cc86d7
feat: implement 'allowed mentions' builder
4x8Matrix Oct 15, 2024
5a8bd76
feat: implement 'reference' builder
4x8Matrix Oct 15, 2024
b2f7a23
feat: implement 'poll' builder
4x8Matrix Oct 15, 2024
21fbf32
feat: implement poll 'media' builder
4x8Matrix Oct 15, 2024
dfa182c
feat: implement poll 'answer' builder
4x8Matrix Oct 15, 2024
d4beeec
feat: implement all message component objects
4x8Matrix Oct 15, 2024
972ff10
fix: add attachment querying
4x8Matrix Oct 15, 2024
980e5c8
fix: test + fix interactions
4x8Matrix Oct 15, 2024
c14f6e8
feat: fix type errors
4x8Matrix Oct 22, 2024
e186248
bugfix: implement more fixes for the interaction class
4x8Matrix Oct 22, 2024
d471eb0
feat: implement 'guild-preview' luau class
4x8Matrix Oct 29, 2024
b392c40
feat: implement utility function to build channel from raw data
4x8Matrix Oct 29, 2024
86eb93b
fix: fix url params breaking request handler
4x8Matrix Oct 29, 2024
1db1f57
fix: use 'partial' type
4x8Matrix Oct 29, 2024
151f571
fix: fix types for guild builder
4x8Matrix Oct 29, 2024
d2df400
feat: add comment for a guild api to implement in channel class
4x8Matrix Oct 29, 2024
b1d65db
feat: implement a variety of api methods for discord guild class
4x8Matrix Oct 29, 2024
7e9b1d8
feat: implement support for querying bot guilds
4x8Matrix Oct 29, 2024
12ef4c2
fix: update types for guild rest
4x8Matrix Oct 29, 2024
5227729
fix: address 'reflect' utility not actually reflecting the table inpu…
4x8Matrix Oct 29, 2024
f4280c0
feat: implement support for traceback in vendor module
4x8Matrix Oct 29, 2024
45e9225
feat: update development script
4x8Matrix Oct 29, 2024
8a04906
feat: implement ban object
4x8Matrix Nov 5, 2024
6061ce6
feat: implement invite object
4x8Matrix Nov 5, 2024
004edaa
feat: implement scheduled event object
4x8Matrix Nov 5, 2024
05df3c9
feat: implement voice region object
4x8Matrix Nov 5, 2024
9e4eaca
feat: fix types implementation
4x8Matrix Nov 5, 2024
58ac454
fix: fix error when trying to iterate nil value
4x8Matrix Nov 5, 2024
90b8599
feat: add several new APIs
4x8Matrix Nov 5, 2024
cf87475
feat: add notes for future api support in other classes
4x8Matrix Nov 5, 2024
e13c01e
feat: implement 'widget' class
4x8Matrix Nov 14, 2024
ed8ca57
feat: implement 'widget-settings' class
4x8Matrix Nov 14, 2024
e959749
feat: implement 'vanity-url' class
4x8Matrix Nov 14, 2024
376a324
feat: implement 'onboarding' class
4x8Matrix Nov 14, 2024
08dae71
feat: implement 'prompt' class
4x8Matrix Nov 14, 2024
b98dccb
feat: implement 'option' class
4x8Matrix Nov 14, 2024
e3c0025
feat: implement 'integration' class
4x8Matrix Nov 14, 2024
213772f
feat: implement 'account' class
4x8Matrix Nov 14, 2024
299ff0b
feat: implement 'application' class
4x8Matrix Nov 14, 2024
5fd7f1f
feat: implement 'widget-settings' builder
4x8Matrix Nov 14, 2024
2f744fc
feat: implement 'welcome-screen' builder
4x8Matrix Nov 14, 2024
973b4c6
feat: implement 'welcome-screen-channel' builder
4x8Matrix Nov 14, 2024
6b00351
feat: implement 'onboarding' builder
4x8Matrix Nov 14, 2024
21a4f18
feat: implement 'onboarding-option' builder
4x8Matrix Nov 14, 2024
3d9e977
feat: implement 'onboarding-prompt' builder
4x8Matrix Nov 14, 2024
206f362
fix: fix api types & wrong http operation
4x8Matrix Nov 14, 2024
9601266
feat: implement several new APIs for the guild class
4x8Matrix Nov 14, 2024
a01dd29
feature: implement 'member' API list
4x8Matrix Nov 19, 2024
8da8101
feature: docs
4x8Matrix Nov 19, 2024
2e18319
fix: fix ci/cd type errors
4x8Matrix Nov 19, 2024
75930c9
fix: fix ci/cd type errors
4x8Matrix Nov 19, 2024
1fb3419
Update require resolution
Sythivo Nov 20, 2024
5316255
Merge pull request #24 from Sythivo/monorepository-origin-require-rfc
4x8Matrix Nov 20, 2024
f9047e8
feat: implement 'Message' APIs
4x8Matrix Nov 26, 2024
ff462bf
fix: update api-types to fix various bugs
4x8Matrix Nov 27, 2024
b2ecdf2
feat: add 'flags' & 'icon' support to channel builder
4x8Matrix Nov 27, 2024
943c188
fix: fix types with various builder objects
4x8Matrix Nov 27, 2024
3d5be9a
feat: implement general API support for the channel class
4x8Matrix Nov 27, 2024
9228a50
feat: implement general API support for the forum class
4x8Matrix Nov 27, 2024
5c2737a
feat: implement general API support for the groupDM class
4x8Matrix Nov 27, 2024
5a80624
feat: implement general API support for the guild class
4x8Matrix Nov 27, 2024
7b46b8e
feat: implement general API support for the media class
4x8Matrix Nov 27, 2024
5b76b94
feat: implement general API support for the text class
4x8Matrix Nov 27, 2024
82b15ca
feat: implement general API support for the thread class
4x8Matrix Nov 27, 2024
e038604
fix: fix types + add apis for announcement
4x8Matrix Nov 27, 2024
3cf15a5
fix: add support for abstract channel class
4x8Matrix Nov 27, 2024
55139b1
feat: add api
4x8Matrix Nov 27, 2024
67b33c3
fix: add correct types
4x8Matrix Nov 27, 2024
5e75f4a
feat: add core 'bot' apis
4x8Matrix Nov 27, 2024
e6c3a42
feat: implement invite builder
4x8Matrix Nov 27, 2024
3082597
feat: implement forumMedia builder for threads
4x8Matrix Nov 27, 2024
134a499
feat: implement messageThread builder for threads
4x8Matrix Nov 27, 2024
d05c1fb
feat: implement noMessageThread builder for threads
4x8Matrix Nov 27, 2024
b96a57e
chore: update development script
4x8Matrix Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install tooling
uses: CompeyDev/[email protected]
with:
cache: true
- name: Check formatting
run: lune run fmt

lint:
runs-on: ubuntu-latest
needs: ["fmt"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install tooling
uses: CompeyDev/[email protected]
with:
cache: true
- name: Lint
run: lune run lint
typecheck:
runs-on: ubuntu-latest
needs: ["lint"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install tooling
uses: CompeyDev/[email protected]
with:
cache: true
- name: Setup lune typedefs
run: lune setup
- name: Typecheck
run: lune run analyze
test:
runs-on: ubuntu-latest
needs: ["typecheck"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install tooling
uses: CompeyDev/[email protected]
with:
cache: true
- name: Run unit-tests
run: lune run test
20 changes: 0 additions & 20 deletions .github/workflows/pull-request-moonwave.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull-request-selene.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/pull-request-stylua.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/update-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: DiscordLuau/Discord-Luau-Site
repository: DiscordLuau/docs
event-type: update-ref
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "extern/frktest"]
path = extern/frktest
url = https://github.com/itsfrank/frktest.git
21 changes: 13 additions & 8 deletions .luaurc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
"*": false
},
"aliases": {
"Builders": "./Package/Classes/Builders",
"Network": "./Package/Classes/Network",
"Objects": "./Package/Classes/Objects",
"Data": "./Package/Data",
"Enums": "./Package/Enums",
"Std": "./Package/Std",
"Utils": "./Package/Utils",
"Vendor": "./Package/Vendor"
"builders": "./packages/builders/src",
"cdn": "./packages/cdn/src",
"classes": "./packages/classes/src",
"core": "./packages/core/src",
"extensions": "./packages/extensions/src",
"std-polyfills": "./packages/std-polyfills/src",
"api-types": "./packages/api-types/src",
"rest": "./packages/rest/src",
"utils": "./packages/utils/src",
"vendor": "./packages/vendor/src",
"voice": "./packages/voice/src",
"websocket": "./packages/websocket/src",
"frktest": "./extern/frktest/src"
}
}
10 changes: 10 additions & 0 deletions .lune/analyze.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--> Task to typecheck packages using luau-lsp

local task = require("./task")

task.new("luau-lsp")
:addArgument("analyze")
:addArgument("--base-luaurc=.luaurc")
:addArgument("--settings=.vscode/settings.json")
:addArgument("packages")
:execute()
1 change: 1 addition & 0 deletions .lune/assets/powered-by-lune.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions .lune/fmt.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--> Task to execute StyLua for checking validity of formatting

local task = require("./task")

task.new("stylua")
:addArgument("--check")
:addArgument("--output-format")
:addArgument("Summary")
:addArgument("packages")
:execute()
5 changes: 5 additions & 0 deletions .lune/lint.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--> Task for linting packages using selene

local task = require("./task")

task.new("selene"):addArgument("packages"):execute()
65 changes: 65 additions & 0 deletions .lune/task/init.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
--> An internal library for lune scripts to execute tasks in CI/CD

-- NOTE: We use the `Lune` runtime in the CI/CD environment, so we're not going to be using the `@std-polyfills`
-- package that the discord-luau package uses.

local process = require("@lune/process")
local stdio = require("@lune/stdio")

local Task = {}

Task.Prototype = {}
Task.Interface = {}

--[[
Responsible for adding an argument to the executable.
]]
function Task.Prototype.addArgument(self: Task, argument: string): Task
table.insert(self.arguments, argument)

return self
end

--[[
Responsible for executing the task.

Inherits the standard IO of the process.
]]
function Task.Prototype.execute(self: Task): process.SpawnResult
local spawnResult = process.spawn(self.executable, self.arguments, {
stdio = "forward",
})

if not spawnResult.ok then
print(
`\n[{stdio.color("red")}error{stdio.color("reset")}] \`{self.executable}\` exited with code {spawnResult.code} `
)

process.exit(spawnResult.code)
end

return spawnResult
end

--[[
Constructor for the Task object.
]]
function Task.Interface.new(executable: string): Task
return setmetatable(
{
executable = executable,

arguments = {},
} :: Task,
{
__index = Task.Prototype,
}
)
end

export type Task = typeof(Task.Prototype) & {
executable: string,
arguments: { string },
}

return Task.Interface
36 changes: 36 additions & 0 deletions .lune/task/requireTests.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--> Runs tests located in the tests/ directory

-- NOTE: we're using the `Lune` runtime in the CI/CD environment, so we're not going to be using the `@std-polyfills`
-- package that the discord-luau package uses.

local fs = require("@lune/fs")
local stdio = require("@lune/stdio")
local process = require("@lune/process")

local requireTests
local requireFile

function requireFile(fullPath: string)
local success, result = pcall(require, fullPath)

if not success then
print(`\n{stdio.color("red")}Failed to require unit-test at \`{fullPath}\`, error:`)
print(`{stdio.style("dim")}{result}`)

process.exit(1)
else
result()
end
end

function requireTests(path: string)
for _, object in fs.readDir(path) do
if fs.isDir(`{path}/{object}`) then
requireTests(`{path}/{object}`)
else
requireFile(`{path}/{object}`)
end
end
end

return requireTests
15 changes: 15 additions & 0 deletions .lune/test.luau
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--> Task for running unit-tests using frktest

local frktest = require("@frktest/frktest")
local reporter = require("@frktest/reporters/lune_console_reporter")

local requireTests = require("./task/requireTests")

requireTests("tests")

reporter.init()

if not frktest.run() then
print("--------------------")
error(`See above for test failures.`, -1)
end
Loading