Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
379 commits
Select commit Hold shift + click to select a range
1f8c6c0
update discordeno 13 -> 18 (#9)
sebakocz Jan 18, 2024
d9923cb
Update interaction.ts
FinlayDaG33k Jan 23, 2024
a7c7caa
Bunch of renaming and moving stuff around to make imports and updates…
FinlayDaG33k Jan 24, 2024
ef3e8b2
Start writing proper docs
FinlayDaG33k Jan 24, 2024
47a643e
Add InteractionBuilder
FinlayDaG33k Jan 24, 2024
1fd5eee
Change exports a wee bit
FinlayDaG33k Jan 24, 2024
f19c767
Move getting started to main README.md
FinlayDaG33k Jan 24, 2024
2fa5007
Start documenting CouchDB
FinlayDaG33k Jan 24, 2024
ccf016b
Update README.md
FinlayDaG33k Jan 24, 2024
8c71f7d
Restructure documentation a bit.
FinlayDaG33k Jan 24, 2024
8605e81
Fix typo
FinlayDaG33k Jan 24, 2024
cf6b952
Add links to pages
FinlayDaG33k Jan 24, 2024
b53082c
Change wording a bit
FinlayDaG33k Jan 24, 2024
2bbe2de
Missing header
FinlayDaG33k Jan 24, 2024
7122c53
Add optimistic caching, use a Map instead of an object and add a cons…
FinlayDaG33k Jan 25, 2024
19d1226
Add Cache.dump() method
FinlayDaG33k Jan 25, 2024
b46665e
Clean up cache every hour
FinlayDaG33k Jan 25, 2024
0d15ddc
No need to check if an item existed
FinlayDaG33k Jan 25, 2024
e50a927
Over-documentation
FinlayDaG33k Jan 25, 2024
e58302d
Document Cache
FinlayDaG33k Jan 25, 2024
ca18b4c
Remove "raise" from default package
FinlayDaG33k Jan 25, 2024
5f336ef
Update README.md
FinlayDaG33k Jan 25, 2024
fe14476
Update comment
FinlayDaG33k Jan 25, 2024
058e293
Comments and allow creation of directories
FinlayDaG33k Jan 25, 2024
9ae713b
Fix minor bug
FinlayDaG33k Jan 25, 2024
c55f7d7
Set debug key by default
FinlayDaG33k Jan 25, 2024
12b18dc
Allow resetting Configure to default state
FinlayDaG33k Jan 25, 2024
d7b73c3
Start documenting the Configure
FinlayDaG33k Jan 25, 2024
69e37c2
Add linebreak
FinlayDaG33k Jan 25, 2024
fb920a3
Remove Codecov and replace with regular Deno test
FinlayDaG33k Jan 30, 2024
676bd63
Add deno lint stage
FinlayDaG33k Jan 30, 2024
e9a3753
Change when to run actions
FinlayDaG33k Jan 30, 2024
7f61bdd
Fix deprecation
FinlayDaG33k Jan 30, 2024
c108b75
Use const instead of let
FinlayDaG33k Jan 30, 2024
35fb9f3
Do allow inferrable types
FinlayDaG33k Jan 30, 2024
97d0c7a
Replace let with const
FinlayDaG33k Jan 30, 2024
62676df
Remove async and fix some type juggling
FinlayDaG33k Jan 30, 2024
89cf564
Remove redundant check
FinlayDaG33k Jan 30, 2024
ee3bd5f
Do not use async and remove unused variable
FinlayDaG33k Jan 30, 2024
8f8cc4b
Remove any from Discord
FinlayDaG33k Jan 30, 2024
962f04e
Remove any
FinlayDaG33k Jan 30, 2024
f738bf4
Method requires bigstring
FinlayDaG33k Jan 30, 2024
df4b41b
Fix type
FinlayDaG33k Jan 30, 2024
078c7d2
Add todo to find out types for spec
FinlayDaG33k Jan 30, 2024
f38a337
Add types for Redis
FinlayDaG33k Jan 30, 2024
0fca054
Optimize snowflakeToDate a bit and write a test for it
FinlayDaG33k Jan 30, 2024
e046263
Make handlebars unable to return nothing
FinlayDaG33k Jan 30, 2024
bf774d7
Make the linter a wee-bit less upset with me
FinlayDaG33k Jan 30, 2024
52bebc7
Upgrade Deno version
FinlayDaG33k Jan 30, 2024
2910e9d
Update "raise"
FinlayDaG33k Jan 30, 2024
b50ac69
Remove unused ignore
FinlayDaG33k Jan 30, 2024
2ebd5bd
Remove obsolete events
FinlayDaG33k Feb 1, 2024
122525b
Make time public
FinlayDaG33k Feb 1, 2024
0bf361d
Fix errors where Discord.getBot() could possibly be undefined
FinlayDaG33k Feb 1, 2024
9edeed3
Fix cache error and ignore TS error
FinlayDaG33k Feb 1, 2024
3a88a28
Fix variable name error
FinlayDaG33k Feb 1, 2024
bc4f784
Add type to dispatcher
FinlayDaG33k Feb 1, 2024
7c98a33
Add more types
FinlayDaG33k Feb 1, 2024
ddcbbfe
Do not allow empty interaction data
FinlayDaG33k Feb 1, 2024
15eb66f
TSIgnore error
FinlayDaG33k Feb 1, 2024
eaca257
Just ts-ignore a few things into the TODO list
FinlayDaG33k Feb 1, 2024
827a7c2
Fix error when assigning new Configure
FinlayDaG33k Feb 1, 2024
3e60952
No longer use env for debug logging
FinlayDaG33k Feb 1, 2024
cd93116
Add TODO item
FinlayDaG33k Feb 1, 2024
dfeb05d
Make LogLevels dynamic
FinlayDaG33k Feb 1, 2024
738faf6
Forgotten in previous commit
FinlayDaG33k Feb 1, 2024
02fbd5d
Disable explicit any
FinlayDaG33k Feb 1, 2024
f6afce3
Update test to handle linting and testing seperately
FinlayDaG33k Feb 1, 2024
d93ef8d
Remove env access during test
FinlayDaG33k Feb 1, 2024
1f35ac3
Update raise function and add tests (Closes #11)
FinlayDaG33k Feb 2, 2024
065d4b7
Document raise function
FinlayDaG33k Feb 2, 2024
dd75073
Finish documenting configure
FinlayDaG33k Feb 2, 2024
d6eddf8
Add PR template
FinlayDaG33k Feb 2, 2024
e48ec01
Document CheckSource
FinlayDaG33k Feb 2, 2024
77a2e22
Update documentation a bit
FinlayDaG33k Apr 2, 2024
24b7d9c
Add method to Text to allow for escaping HTML entities
FinlayDaG33k Apr 4, 2024
47232bc
Fix bug with source checks never running properly
FinlayDaG33k May 26, 2024
82389a3
Allow writing bulk to InfluxDB
FinlayDaG33k Jun 17, 2024
4519c7c
Allow multiple paths to be checked in one go
FinlayDaG33k Aug 17, 2024
e572c03
Disallow setting null and undefined
FinlayDaG33k Aug 17, 2024
adeaf7e
Standardize error codes
FinlayDaG33k Sep 1, 2024
f0019bd
Move CouchDB docs to file instead
FinlayDaG33k Sep 3, 2024
d6841d0
Allow executing a view design
FinlayDaG33k Sep 8, 2024
576d93f
Move Logger to Core
FinlayDaG33k Sep 18, 2024
0d248eb
Move old docs while I'm rewriting them
FinlayDaG33k Sep 18, 2024
1b7623d
Document Random
FinlayDaG33k Sep 18, 2024
59bbfc8
Copy-pasta too stronk
FinlayDaG33k Sep 18, 2024
954f7f7
Migrate all existing docs
FinlayDaG33k Sep 18, 2024
1515931
Fix some imports
FinlayDaG33k Sep 18, 2024
04d920d
Fix tests
FinlayDaG33k Sep 18, 2024
70fad8a
Update docs
FinlayDaG33k Sep 18, 2024
4e616d0
Ignore docs while linting
FinlayDaG33k Sep 18, 2024
ab12f8a
Fix Text test not running
FinlayDaG33k Sep 18, 2024
ddfa50d
Test Text.tokenize
FinlayDaG33k Sep 18, 2024
473f8bf
Add linting to the pipeline
FinlayDaG33k Sep 18, 2024
e006027
Run fmt
FinlayDaG33k Sep 18, 2024
86d40cc
Fix small test error
FinlayDaG33k Sep 18, 2024
eff6242
Attempt number 2
FinlayDaG33k Sep 18, 2024
a3acdce
*sigh*
FinlayDaG33k Sep 18, 2024
ab64c59
*sigh^2*
FinlayDaG33k Sep 18, 2024
f879ea9
Update workflow
FinlayDaG33k Sep 18, 2024
1dc9863
Fix error
FinlayDaG33k Sep 18, 2024
4d7564c
Add new utility for "contracts"
FinlayDaG33k Sep 21, 2024
c3c2fa7
Split up in seperate jobs so they one error doesn't cause others to fail
FinlayDaG33k Sep 21, 2024
47d80e3
Fix some errors
FinlayDaG33k Sep 21, 2024
7ff66b1
Add never types
FinlayDaG33k Nov 10, 2024
70ddae2
Add experimental read-through cache
FinlayDaG33k Nov 10, 2024
58cf23b
Add Cache metrics
FinlayDaG33k Nov 16, 2024
df189d4
Fix errors
FinlayDaG33k Nov 16, 2024
ad596a0
Create metrics entry for total
FinlayDaG33k Nov 16, 2024
b31a757
Fix bug and add note
FinlayDaG33k Nov 16, 2024
409dd95
Add byte-formatting utility
FinlayDaG33k Nov 16, 2024
648e396
Keep track of writes and swept entries as well
FinlayDaG33k Nov 16, 2024
88074da
Actually increase counter for writes
FinlayDaG33k Nov 16, 2024
da23f5e
Increase counter on miss for Cache.remember
FinlayDaG33k Nov 16, 2024
2444db5
Fix some errors and change percentage calculation
FinlayDaG33k Nov 16, 2024
9a46647
Allow getting size of cache
FinlayDaG33k Nov 22, 2024
42648ae
Add finder method
FinlayDaG33k Nov 24, 2024
1a2eda8
Export CouchOverrides
FinlayDaG33k Nov 27, 2024
2c30000
Make linter happier (might break stuff)
FinlayDaG33k Dec 7, 2024
a785a3f
Create new requireNotEmpty
FinlayDaG33k Dec 7, 2024
bc6533c
Add requireEmpty contract
FinlayDaG33k Dec 7, 2024
5508ee7
Sweep cache every minute
FinlayDaG33k Jan 2, 2025
04a75a5
Add debug logs
FinlayDaG33k Jan 2, 2025
1144536
Update README.md
FinlayDaG33k Feb 10, 2025
8f00952
Update bunch of documentation
FinlayDaG33k Feb 10, 2025
7d7a6d1
Allow loading using config.ts to put developers in charge of their co…
FinlayDaG33k Feb 12, 2025
1cb57fe
Allow configuring optimistic boundary and significantly simplify the …
FinlayDaG33k Apr 17, 2025
914ef5e
Add UptimeKuma support and add utility for fetchWithTimeout
FinlayDaG33k Apr 18, 2025
02cdc16
Add function to delimit PascalCase strings.
FinlayDaG33k Apr 19, 2025
0b884fc
Add function to dasherize strings
FinlayDaG33k Apr 19, 2025
32319d5
Add comments
FinlayDaG33k Apr 19, 2025
e41c28f
Add bunch of caching
FinlayDaG33k Apr 19, 2025
f3101e5
Refactor a bit
FinlayDaG33k Apr 19, 2025
9308cb3
Only return status code without message
FinlayDaG33k Apr 21, 2025
72f31d6
Allow getting the name of the database
FinlayDaG33k Apr 22, 2025
a335be3
Add function valueOrDefault
FinlayDaG33k Apr 26, 2025
cfd2df7
Move code from Contract.requireNotEmpty to empty, and update Contracts.
FinlayDaG33k Apr 26, 2025
968f332
Add test runner configuration
FinlayDaG33k Apr 26, 2025
a2b5a56
Significantly simplify the statement
FinlayDaG33k Apr 26, 2025
d4cd90d
Fix issues with typing
FinlayDaG33k Apr 26, 2025
e08490f
Fix type error when passing "undefined" to input
FinlayDaG33k Apr 26, 2025
5c3bd69
Fix type error when passing "null" to input
FinlayDaG33k Apr 26, 2025
0e39f1d
Add typing for cache
FinlayDaG33k Apr 26, 2025
28d1160
Add types for Configure
FinlayDaG33k Apr 26, 2025
795ae15
Allow returning null in valueOrDefault
FinlayDaG33k Apr 26, 2025
9511077
Update handling of Configure get and consume
FinlayDaG33k Apr 26, 2025
7fe2237
Fix small error
FinlayDaG33k Apr 26, 2025
dea50e6
Add sleep function
FinlayDaG33k Apr 27, 2025
9fbf845
Allow dashed method names
FinlayDaG33k May 5, 2025
c3152eb
Re-organize logger a bit and add notice level
FinlayDaG33k May 6, 2025
2c378a2
Increase spacing a bit
FinlayDaG33k May 6, 2025
cf8c1be
Update versioning guidelines
FinlayDaG33k May 14, 2025
2f3d6ba
Cache responses when using "Couchdb.get()"
FinlayDaG33k May 15, 2025
4d6b85a
Minor cleanups
FinlayDaG33k May 15, 2025
1cc1a12
Increase time we cache documents
FinlayDaG33k May 15, 2025
d1ba49c
Update README.md
FinlayDaG33k May 15, 2025
0708191
Allow specifying read cache timeout
FinlayDaG33k May 15, 2025
1101862
Minor cleanups and fix conflicts with cache when using upsert method
FinlayDaG33k May 16, 2025
d727f55
Add document header type
FinlayDaG33k May 18, 2025
0696846
Fix bug with trying to get expired cache
FinlayDaG33k May 23, 2025
c96706c
Return earlier if we have an error
FinlayDaG33k May 26, 2025
f12de15
Get data (or not) based on request method
FinlayDaG33k May 26, 2025
9790006
Parse body on POST request
FinlayDaG33k May 26, 2025
329efc6
Add new issue templatesUpdate issue and PR template
FinlayDaG33k May 26, 2025
d887f10
Allow generating odd string lengths (closes #6)
FinlayDaG33k May 26, 2025
e98288a
Only parse error object if it's a 404, otherwise return a generic one
FinlayDaG33k May 27, 2025
08cc598
Put cache sweeping in the hands of the app to allow for more flexibility
FinlayDaG33k May 28, 2025
193d899
Add "errorOrData" utility
FinlayDaG33k May 30, 2025
9a5366d
Change the way errors and successes are handled
FinlayDaG33k May 30, 2025
fc99dc6
Add trace and monitor methods to logger
FinlayDaG33k Jun 2, 2025
6d262ab
Change default text a bit
FinlayDaG33k Jun 2, 2025
9b6461f
Allow slightly more finegrained control over log levels.
FinlayDaG33k Jun 3, 2025
1751a7f
Move some log levels around
FinlayDaG33k Jun 3, 2025
a46010d
Fix bug with log levels not working properly
FinlayDaG33k Jun 3, 2025
5b3c77a
Change the way we define the type
FinlayDaG33k Jun 16, 2025
2e2e3c7
Change the way we define the type
FinlayDaG33k Jun 16, 2025
54c0b16
Hopefully fix a race condition
FinlayDaG33k Jun 16, 2025
47921b4
Do not double-assign variable
FinlayDaG33k Jun 16, 2025
79e92b5
Add crude validation class
FinlayDaG33k Jul 13, 2025
8eeba0b
Allow setting stopOnFailure and actually return the errors
FinlayDaG33k Jul 13, 2025
9e3aff2
Make some changes to validator
FinlayDaG33k Jul 14, 2025
6638989
Re-organize some code and add way for app to create (and overwrite) v…
FinlayDaG33k Jul 14, 2025
a876829
Fix small bug in is-null
FinlayDaG33k Jul 14, 2025
3091ad6
Attempt at getting more accurate IP on webserver
FinlayDaG33k Jul 21, 2025
cb072d7
Allow writing to files
FinlayDaG33k Jul 26, 2025
0c406ea
Allow copying and moving files
FinlayDaG33k Jul 26, 2025
3854236
Move create function in code
FinlayDaG33k Jul 26, 2025
75c55ac
Add some return types
FinlayDaG33k Jul 26, 2025
c012305
Use File class to load ConfigureAnd some logging changes
FinlayDaG33k Jul 26, 2025
f8378cf
Void promise
FinlayDaG33k Jul 26, 2025
8f53ed5
Add extensions to make life easier
FinlayDaG33k Sep 16, 2025
3ff4a0f
Disable linting and format tests for now
FinlayDaG33k Sep 24, 2025
7f99892
Create more globally usable Registry
FinlayDaG33k Sep 25, 2025
82a77a0
Add success log
FinlayDaG33k Oct 13, 2025
f42ce77
Fix formatting
FinlayDaG33k Oct 13, 2025
4ae9b0f
Fix issue hen error log doesn't exist and isn't set
FinlayDaG33k Oct 14, 2025
270e1a9
Add argument parser utility
FinlayDaG33k Oct 14, 2025
3b6760a
Update contracts to assert
FinlayDaG33k Nov 11, 2025
87c2a30
Add more generics
FinlayDaG33k Nov 11, 2025
8e69486
Update tests
FinlayDaG33k Nov 11, 2025
4d51493
Add empty string extension
FinlayDaG33k Nov 11, 2025
8e34adc
Rename date extensions test
FinlayDaG33k Nov 11, 2025
f9bb83b
Add includesAny array extension
FinlayDaG33k Nov 11, 2025
fb78801
Rewrite Queue to allow people to bring in their own schedulers more e…
FinlayDaG33k Nov 20, 2025
c6a7326
Remove console log
FinlayDaG33k Nov 20, 2025
276f88d
Refactor some contracts
FinlayDaG33k Nov 20, 2025
9f3033a
Add semi-colon
FinlayDaG33k Nov 26, 2025
e24001f
Add Contract.requireUnreachable
FinlayDaG33k Nov 26, 2025
4b33109
Significantly rewrite caching
FinlayDaG33k Nov 26, 2025
42ce7b4
Significantly rewrite Configure
FinlayDaG33k Nov 26, 2025
bdf3f62
Allow Log levels to be enabled or disabled independently
FinlayDaG33k Nov 27, 2025
8a0ab1e
Fix some errors
FinlayDaG33k Nov 27, 2025
7c6f584
Allow going either forward or backward
FinlayDaG33k Nov 27, 2025
2a0c0e9
Fix small error
FinlayDaG33k Nov 27, 2025
5f49108
Start moving types to a different place
FinlayDaG33k Nov 27, 2025
1d77d89
Export all by default
FinlayDaG33k Nov 27, 2025
5c38a63
Export log levels
FinlayDaG33k Nov 27, 2025
620825d
Move types around
FinlayDaG33k Dec 3, 2025
cfe454d
Turn Webserver Registry into Proxy to the new Registry
FinlayDaG33k Dec 3, 2025
1038c84
Significantly cleanup Webserver
FinlayDaG33k Dec 3, 2025
478858c
Cleanup some types
FinlayDaG33k Dec 3, 2025
ad300a3
Remove generated docs
FinlayDaG33k Dec 3, 2025
22fa1f8
Update some docs
FinlayDaG33k Dec 3, 2025
40910b0
Update some validation rules
FinlayDaG33k Dec 3, 2025
62c122b
Rename directory to more line up with current structure
FinlayDaG33k Dec 3, 2025
0474ed5
Move folders around
FinlayDaG33k Dec 3, 2025
7c3cb67
Fix small error
FinlayDaG33k Dec 3, 2025
4f53830
Fix small error
FinlayDaG33k Dec 3, 2025
b660a68
Allow definition of static salt for testing purposes
FinlayDaG33k Dec 3, 2025
37a2d8e
Fix bunch of paths
FinlayDaG33k Dec 3, 2025
99227a5
Fix path
FinlayDaG33k Dec 3, 2025
c71d86d
Move types into src folder
FinlayDaG33k Dec 4, 2025
a9b5cc8
Seriously, why can't my Git client just pick up on this immediately?
FinlayDaG33k Dec 4, 2025
b319422
Fix bunch of errors, bugs and add tests for Hashing and Password crea…
FinlayDaG33k Dec 8, 2025
9a0f3ca
Update comment
FinlayDaG33k Dec 8, 2025
965482f
Fix bunch of bugs and write tests for built-in validator rules
FinlayDaG33k Dec 8, 2025
368e746
Rename Test
FinlayDaG33k Dec 9, 2025
b2fdda0
Write test for Validation class
FinlayDaG33k Dec 9, 2025
a05d008
Add envOrDefault
FinlayDaG33k Dec 9, 2025
932c60e
Update Date extension test
FinlayDaG33k Dec 9, 2025
5ad9c75
Wrap serve in a try-catch and void promise
FinlayDaG33k Dec 18, 2025
5e4afc9
Export component in controller mod
FinlayDaG33k Dec 18, 2025
daf4ee8
Void some promises
FinlayDaG33k Dec 21, 2025
fe6c372
Replace old hex function with the @std implementation as it's ~3x fas…
FinlayDaG33k Dec 21, 2025
0ba0874
Use URLPatterns for routing instead of yanky regex.
FinlayDaG33k Dec 22, 2025
75d7bd6
Fix small errors
FinlayDaG33k Dec 22, 2025
cd4a9b5
use valueOrDefault
FinlayDaG33k Dec 22, 2025
8c76799
Use valueOrDefault
FinlayDaG33k Dec 22, 2025
f7433ea
Add test for Camelize
FinlayDaG33k Jan 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/1-feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Feature Request
description: Suggest an idea for Chomp!
title: 'Suggestion: '
body:
- type: textarea
attributes:
label: Tell us what problem the feature would solve
description: Provide as much information as possible and please be descriptive.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Did you consider any alternatives? If so, why is this the best?
description: A clear and concise description of any alternative solutions or features you've considered but why you've picked this one.
validations:
required: true
- type: textarea
attributes:
label: Additional Info
description: If applicable, add any other context or screenshots about the feature request here.
validations:
required: false
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/2-bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Bug Report
description: File a bug report.
title: "Bug: "
body:
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Provide as much information as possible and please be descriptive.
validations:
required: true
- type: dropdown
id: runtime
attributes:
label: Runtime
description: What runtime (Node, Deno, etc) are you using?
options:
- Deno
- NodeJS
- Bun
- Other (add the name to the version)
default: 0
validations:
required: true
- type: input
id: runtime-version
attributes:
label: Runtime Version
description: What version of the runtime are you using? In Deno you could get this through `deno --version`.
placeholder: 1.46.3
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: latest
attributes:
label: Latest Release
description: By submitting this issue, you confirm that you are using the latest release when this issue is present.
options:
- label: I confirm that I am running on the latest release.
required: true
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### What changes are being made
<!-- Give examples of the changes you've made in the PR. Itemized lists are preferred -->

- [INSERT CHANGE HERE]

### What is the context?
<!-- Is there any context like issues for this PR? -->

I made this PR because ...

### Some checks you should make
<!-- This checklist must all be finished before we can merge it -->

- [ ] You have no left-over console logs.
- [ ] You have no left-over debuggers.
- [ ] You have no left-over other pieces or code.
- [ ] You have kept the documentation in-sync with the code as much as possible.
- [ ] You have nothing to add after taking a break and coming in cold.

### Some checks we should make
<!-- This checklist is for reviewers, you can ignore it -->

- [ ] Changes have no left-over console logs.
- [ ] Changes have no left-over debuggers.
- [ ] Changes have no left-over "other pieces or code".
- [ ] Changes have kept the documentation in-sync with the code as much as possible.
- [ ] Changes still look good after taking a break and coming in cold.
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
#chomp-format:
# runs-on: ubuntu-latest
# steps:
# - name: Clone repository
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Set up Deno
# uses: denoland/setup-deno@v1
# with:
# deno-version: "1.40.0"
# - name: Check format
# run: deno fmt --check
#chomp-lint:
# runs-on: ubuntu-latest
# steps:
# - name: Clone repository
# uses: actions/checkout@v3
# with:
# submodules: true
# - name: Set up Deno
# uses: denoland/setup-deno@v1
# with:
# deno-version: "1.40.0"
# - name: Check lint
# run: deno lint
chomp-tests:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Deno
uses: denoland/setup-deno@v1
with:
deno-version: "1.40.0"
- name: Run tests generating coverage
run: deno task test:coverage
- name: Generate lcov report
run: deno task coverage > cov.lcov
- name: upload coverage
uses: codecov/codecov-action@v4
with:
files: ./cov.lcov
token: ${{ secrets.CODECOV_TOKEN }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Ignore IDE-specific folders
/.idea

# Ignore reports
/cov
/cov.lcov

# Ignore docs
/src/docs
5 changes: 5 additions & 0 deletions .run/Deno_ Test.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Deno: Test" type="DenoConfigurationType" inputPath="." programParameters="run test">
<method v="2" />
</configuration>
</component>
73 changes: 57 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,66 @@
# Chomp
Library of (arguably) useful Deno classes.
Should work just fine but comes with no warranties whatsoever.

Library of (arguably) useful stuff.
This library prioritizes "ease of use" over "efficiency".

Should work just fine but comes with no warranties whatsoever.

## Usage
Add the following to your file:

Chomp is structured in such a way that you can import just what you need for your app.\
A good start would be to import the most common things you might use:

```ts
import * from "https://deno.land/x/chomp/mod.ts";
import * from "https://deno.land/x/chomp/common.ts";
```

That's it!
You can visit the [documentation](https://doc.deno.land/https://deno.land/x/chomp/mod.ts) to see what Chomp is capable off!
Someday I'll write a better usage guide.
This includes (list might not always be up-to-date):

- [Cache](docs/core/cache.md)
- [Configure](docs/core/configure.md)
- [Logger](docs/logging/logger.md)
- [File](docs/filesystem/file.md)
- [Folder](docs/filesystem/folder.md)
- [CheckSource](docs/utility/check-source.md)

However, there are many more things included so feel free to explore the [docs](/docs) or [Deno.land](https://doc.deno.land/https://deno.land/x/chomp/mod.ts)
to see what more Chomp is capable off!

**NOTE**: While you can import `https://deno.land/x/chomp/mod.ts`, I advice against this as it'll load the entire
codebase, including stuff you may not actually be using.

### Configuration keys

While Chomp does try to have a lot of "good enough" defaults, sometimes you may want to set things to your own needs.
As a result, some things can be configured by you by adding entries to the Configure.

| Key | Default Value | Comment |
|-----|---------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `chomp_optimistic_delay` | `'+1 hour'` | Additional time a cache entry may exist for optimistic caching. Uses the `utility/time-string` formats |
| `chomp_couchdb_cache` | `'+1 hour'` | Time a document for `communication/couchdb` will be kept in the cache to improve read times. Uses the `utility/time-string` formats |
| `log_level` | `1.0` | Bitmask for the enabled log levels. |

### Extensions

Chomp includes a few "extensions" that _modify JavaScript's built-in prototypes_.
Most of these should be free from interference unless you use other libraries that do this.
You can load extensions by simply including them into your project.

```ts
import "https://deno.land/x/chomp/extensions/date/is-before.ts";
```

## Versioning

## Compatibility
Below a chart indicating for which Deno version this library is built and tested.
Compatibility may be more flexible, however, chances are this library may not work with older of newer versions than indicated.
As of `?.0.0.0-0`, versioning adheres to the following versioning system of `a.b.c.d-e` where:

| Library Version | Deno Version |
|-----------------|--------------|
| 1.1.0 | 1.24.0 |
| 1.0.0 | 1.15.3 |
| 0.0.2 | ??? |
| 0.0.1 | ??? |
- `a`: Some previous behaviour may have changed in a non-backwards compatible fashion (breaking).
- Impact: Serious updates may be required on your end.
- `b`: All previous deprecations were removed (potentially breaking).
- Impact: Nothing if you kept up with deprecations.
- `c`: Deprecations were added in this release.
- Impact: Deprecations may need to be fixed on your end.
- `d`: New feature(s) were added.
- Impact: New goodies for you to use.
- `e`: Small fixes (typo's, bugs, documentation etc.)
- Impact: Generally none.
31 changes: 31 additions & 0 deletions benchmarks/202512220028_hex-encode-std.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { encodeHex as std } from "jsr:@std/encoding@1.0.10";
import { Random } from "../src/security/random.ts";

// Generate dataset
const dataset: Uint8Array[] = [];
for(let i = 0; i < 10_000; i++) {
dataset.push(Random.bytes(128));
}

/**
* Old hex encoding function
*
* @param input
*/
function old(input: Uint8Array): string {
return [...new Uint8Array(input)].map((x) => x.toString(16).padStart(2, "0")).join("");
}


Deno.bench("Old Method", () => {
for(const entry of dataset) {
old(entry);
}
});

Deno.bench("Standard Library", () => {
for(const entry of dataset) {
std(entry);
}
});

8 changes: 8 additions & 0 deletions common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* These are just the exports you'll most commonly use.
* You can view the "docs"-directory to see what else there is!
*/
export { Cache, Configure, Logger } from "./src/core/mod.ts";
export { File } from "./src/filesystem/file.ts";
export { Folder } from "./src/filesystem/folder.ts";
export { CheckSource } from "./src/utility/check-source.ts";
Loading
Loading