* Remove npmrc files which prevent lockfile creation in workspaces
Since `v8.5.0` npm will detect that it is running inside a workspace and issue commands at the root package.
* Require a minimum npm version of 8.5.0
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* refactor: more intuitive interfaces
* refactor: simpler refresh
before: on every request we were debouncing a refresh request
after: call refresh only once before now() + 'expires'
* refactor: prefix on base storage
* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'
* refactor: simpler axios transport
before: handle auth headers
after: auth headers are handled on directus instance
* refactor: simpler usage of Directus constructor
* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'
* refactor: fix tests based on previous changes
* refactor: better auth constructor
before: depends on SDK instance
after: depends on Transport and Storage instance
* accept staticToken from auth
* make transport and storage as optional on options
* fix type auth refresh
* simplify transport
* fix test for previous changes
* improve auth class
* revert some IAuth props because tests
* allow to force memory of localstorage on storage
* add tests for previous change
* document everything and simplify some things
* fix override headers on request
* better name typing
* fix private axios
* removed boolean from CLI auth.refresh()
* fix missing url in some examples
* soem grammar updates
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>