1
0
Fork 0
Commit Graph

2 Commits (1aa51775f3d4b794b256574500c0d9aa708f4688)

Author SHA1 Message Date
Mike Gerwitz e003abcd4b Integrate TokenedDataApi into system
This changes the easejs interface for DataApi, which requires adding the
param to everything.  The TS interface was created in a previous commit and
already contained this parameter.  The idea is to remove the easejs
interface in the future, but traits are a barrier to that atm.

DocumentServer and controller demonstrate the mess that we have with regards
to instantiating dependencies.  This needs to change---DocumentServer itself
was something that was started but never fully realized.  It makes this
incredibly confusing, difficult to follow, and complicates important error
handling that ought to be taking place.  It also discourages implementing
additional dependencies.

I'm not going to go through and provide a ChangeLog-style commit message for
this commit.  I'm too exhausted by this crap.
2019-10-18 09:55:11 -04:00
Mike Gerwitz 07c8b55475 TokenedDataApi: New class
This integrates the PersistentTokenStore into the DataAPI system via a
decorator.  Unfortunately, it requires an API change and propagating data
through the system is a huge mess, which is the topic of a following
commit.  The API modification was a compromise.

This modifies the interface of DataApi to include a third parameter.  I am
continuing to export the old easejs interface for an incremental migration
away from it.  That old interface will be modified next commit, since
it requires modifying a lot of files and will muddy up this commit.

* src/dapi/DataApi.ts: Rename from js.  Add types.  Add new interface.
  Continue exporting old.
* src/server/dapi/TokenedDataApi.ts: New class.
* test/server/dapi/TokenedDataApiTest.ts: New test cases.
2019-10-18 09:55:11 -04:00