(1st MR) Refactorings to prepare to add a Logger
Preparing for: #18 (closed)
This was extracted from the (2nd MR) !205 (merged)
Context in this conversation: !205 (comment 2078617851)
What has been done in this MR?
-
.gitignore
ingwrangler.toml
because it's generated by GDK, which makes it show up in thegit diff
. The original file content has been copied towrangler.toml.example
instead. - Moving all the classify logic into
classify.ts
- Moving the main rules matching into a new class
RouterEngine
that can encapsulate all the logic of rules matching and applying the matching rule. And keeping the main part of the Router minimalexport default
. - Adding unique ID to the rules, so that we log which rule has been matched. Maybe we can add a validation that the IDs of the rules are unique in a follow up issue?
- Refactor the Documentation. Moved the development into its own page and added Blueprint relevant pages.
Validate changes
On both values GITLAB_RULES_CONFIG=passthrough
& GITLAB_RULES_CONFIG=firstcell
in your wrangler.toml
in env.dev
section, the Router should still forward requests to the GitLab instance. By visiting http://gdk.test:3000 you should still see GitLab running.
Edited by Omar Qunsul