Commit Graph

23 Commits

Author SHA1 Message Date
rijkvanzanten
4965cb0d00 Merge branch 'main' into aggregation 2021-06-28 19:18:53 -04:00
Nicola Krumschmidt
ed1127f3b1 Fix extension loading when PUBLIC_URL is absolute without origin (#6534)
* Fix extension loading when PUBLIC_URL is absolute without origin

* Minify extension bundler output

* Make extension loading in dev more robust

* Rename ensureExtensionsDirs to ensureExtensionDirs
2021-06-28 11:20:30 -04:00
rijkvanzanten
ee29fee7f1 Merge branch 'main' into aggregation 2021-06-23 18:16:21 -04:00
Nicola Krumschmidt
d544214c79 Fix extension loading on initial startup (#6471) 2021-06-23 18:16:13 -04:00
rijkvanzanten
dd67fdbdfb Merge branch 'main' into aggregation 2021-06-23 18:09:00 -04:00
Nicola Krumschmidt
051df415df Fix extensions (#6377)
* Add support for npm extensions

* Allow extensions to import vue from the main app

* Bundle app extensions on server startup

* Fix return type of useLayoutState

* Add shared package

* Add extension-sdk package

* Add type declaration files to allow deep import of shared package

* Add extension loading to shared

* Refactor extension loading to use shared package

* Remove app bundle newline replacement

* Fix extension loading in development

* Rename extension entrypoints

* Update extension build instructions

* Remove vite auto-replacement workaround

* Update package-lock.json

* Remove newline from generated extension entrypoint

* Update package-lock.json

* Build shared package as cjs and esm

* Move useLayoutState composable to shared

* Reverse vite base env check

* Share useLayoutState composable through extension-sdk

* Update layout docs

* Update package versions

* Small cleanup

* Fix layout docs

* Fix imports

* Add nickrum to codeowners

* Fix typo

* Add 'em to vite config too

* Fix email

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-23 12:43:06 -04:00
rijkvanzanten
d52f27339c Restructure fn helper 2021-06-16 15:41:16 -04:00
Rijk van Zanten
1e4850f53a Add support for CRON hooks (interval) (#6116)
* Install node-cron

* Support CRON hooks

* Document interval hook

* Fix package-lokc
2021-06-07 16:57:32 -04:00
Rijk van Zanten
77e00b7db4 Don't initialize database on file require (#6003) 2021-06-02 11:41:42 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
rijkvanzanten
3eaa375952 Provide getSchema function in hook/endpoint registration function
Fixes #4621
2021-03-22 20:13:49 -04:00
WoLfulus
b8e7c80b72 Application initialization events (#3680)
* Adds `not_found` hook

* Separate hooks and endpoints initialization process

* Adds additional application events

* Remove unused import

* Change the event order to accound for notFound and errorHandler

* Change emitAsync.catch to use the emitAsyncSafe function

* Updated docs, reordered table by lifecycle and usage
2021-02-08 12:30:09 -05:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
rijkvanzanten
e8f8e86c2c Use correct log level in hook registration
Ref #738
2020-10-21 18:28:16 +02:00
Nitwel
b0f2c92c53 Merge branch 'relational-updates' of https://github.com/directus/next into relational-updates 2020-10-14 23:40:05 +02:00
WoLfulus
484bcbb598 Fix default extension function 2020-10-13 20:14:51 -03:00
WoLfulus
4572fc8041 Remove unused import/export 2020-10-13 20:12:56 -03:00
WoLfulus
5bdde4717d Allows default exports to be used in extensions 2020-10-13 20:09:37 -03:00
rijkvanzanten
0e03847778 Create extension folders if they dont exist yet 2020-10-06 17:21:59 -04:00
rijkvanzanten
302763f7ca Remove console log 2020-09-22 17:47:55 -04:00
rijkvanzanten
85ca7b5d17 Run prettier 2020-09-22 16:11:28 -04:00
rijkvanzanten
7caf429d1d Add custom endpoints support 2020-09-22 15:55:22 -04:00