0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
Commit graph

37893 commits

Author SHA1 Message Date
Fabien "egg" O'Carroll
e18487d848 fixup! Added auth/permissions nest concepts 2024-01-22 11:14:05 +07:00
Fabien "egg" O'Carroll
68a2179de7 Fixed slack notification test 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
8a64bda7cd Addecd role and type to Actor 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
61a33fdff7 Added auth/permissions nest concepts 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
f8555100bc Cleaned up snippets routes and skipped auth
We want to handle auth inside the Nest application, so we're skipping it
for these routes based on the feature flag
2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
1d817a7275 Removed old controller/dto files 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
cca1978b2f Abstracted Nest "Provider" registration from boot
This allows us to make underlying changes to how it works
2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
e285ddcafa Fixed naming of app.module.ts 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
dc4d421e14 Decoupled admin auth logic from express middleware
This will allow us to reuse the logic in the context of Nest
2024-01-22 11:13:04 +07:00
Hannah Wolfe
c559c59dd2 Structured the common folder slightly
- gave everything a type in it's file name
- grouped things into folders
- subject to much change!
2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
38e5935d40 Renamed HandleEvent -> OnEvent 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
cad0da1d20 Renamed handler -> listener 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
edc89d4b3d Fixed slack notifications handler 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
fdbfbfa985 Fixed linting 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
822f6ec496 Wired up slack notifications handler
This is an example of how we deal with events and handlers
2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
58d8f0d26d Added initial decorator for wiring up events 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
1b39d12212 Disabled coverage checking whilst in dev 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
62b8bcf329 Fixed unit tests for controller 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
e7dd8be247 Fixing linting and usage of any 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
cc55dbc170 Removed bookshelf repository 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
1eb8a36c67 Cleaning up types 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
d65788a274 Getting rid of the any types in repository code 2024-01-22 11:13:04 +07:00
Fabien "egg" O'Carroll
d75f988a8d Initial wire up of url transforms
The current url-utils implementation doesn't have good defaults for the
transform methods, even though we use the same values everywhere they're called
in Ghost. Rather than adding loads of things to inject, I've instead simplified
the interface and hardcoded the defaults for now. This should be done in the
`url-utils` service and underlying library in the long run though
2024-01-22 11:13:04 +07:00
Hannah Wolfe
cee382f2bd Renamed library definitions file in line with convention
- we have a strong naming convention, this matches our convention and works out of the box, so we will use this instead of just .d.
2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
ee78fd1b14 Finished off BREAD for snippets 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
7862871203 Allowed editing name of snippet 2024-01-22 11:11:34 +07:00
Naz
be04a8f7ae Added comment to bookshelf repo
refs bf00d7efc2 (r133860581)

- Making it very clear that the implementation choice was not optimal and was not meant as an "example" implementation. Currently the knex implementation has already taken over in our spike and the bookshelf repository implementation will be removed.
2024-01-22 11:11:34 +07:00
Naz
d9516ba234 Fixed @tryghost/ghost build configuration 2024-01-22 11:11:34 +07:00
Naz
9c9afc934f Added dependency to @tryghost/ghost
- The legacy ghost/core code was missing an explicit dependency to the NestJS package
2024-01-22 11:11:34 +07:00
Naz
df1f9e8a5c Fixed count query in snippets bookshelf repository
refs https://github.com/TryGhost/Arch/issues/99

- Added naive version of the count method using bookshelf models metadata. We aim to use knex anyway, so this is just to get the tests passing
2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
98ea0b1ac3 Enabled add and read 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
e3713b549a Added exception handling 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
fbce8c2a52 Fixed location header interceptor 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
51546d8d5f Moved interceptors 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
247bae2169 Disabled routes while in dev 2024-01-22 11:11:34 +07:00
Fabien "egg" O'Carroll
000e1e5048 Added defaults to DTO 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
ded18049b0 Wired up read&add to Admin API 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
1abc99cab3 Added add method for snippets controller
We force the updatedAt here because there is a bug in the original API
2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
e1d2905d21 Added initial interceptor for location headers 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
474dec08b3 Updated Entity to handle dates and defaults 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
a7d20dbe61 Added support for deleting entities
We need to improve DX here, shouldn't need to pass `deleted` property
2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
d54e7053ff Refactor BaseKnexRepository into separate file 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
8601f68347 Refactor sentry handling into base class 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
a4345afb82 Initial refactor for base repository 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
b65b4cb057 Refactored entity -> row mapping 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
0431ab64e0 Formatting 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
c37d6bf2eb Refactored getAll & getSome shared code 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
3c2939c8a9 Refactored row -> entity mapping 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
323e102def Switched to knex repository 2024-01-22 11:11:33 +07:00
Fabien "egg" O'Carroll
12e192cdae Added knex to NestJS DI Container 2024-01-22 11:11:33 +07:00