Files
directus/packages/cli
José Varela 23f6baa4db SDK: refactor constructors (#9080)
* 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>
2021-11-04 13:30:30 -04:00
..
2021-06-14 15:10:50 -04:00
2021-11-04 13:30:30 -04:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00
2021-11-03 19:29:41 -04:00
2021-05-12 20:38:30 +00:00
2021-05-12 20:38:30 +00:00

Directus CLI

The official Directus CLI tool. Allows you to connect to, and manage, any given Directus instance through the command line interface.

Installation

npm install -g @directus/cli

Usage

$ directusctl --help

Docs

See the docs