26 Commits

Author SHA1 Message Date
haad
5032415e01 Fix OrbitDBAccessController address and return values 2023-07-29 09:18:17 +03:00
Hayden Young
04ec34ad8a fix: Correctly handle referencesCount configuration if set. 2023-07-06 23:27:43 +01:00
haad
f8acf8666a Add missing api docs for Database 2023-06-30 10:20:56 +03:00
Hayden Young
603f79f4b2 Change event doc to original. 2023-06-27 13:03:48 +01:00
Hayden Young
9befa48a7a docs: Formatting. 2023-06-24 23:50:44 +01:00
Hayden Young
24a2e1ae5f docs: Change namespace from database to databases. 2023-06-24 16:11:21 +01:00
Hayden Young
3af0fc2306 docs: Move custom examples to READMEs. 2023-06-24 15:20:46 +01:00
Hayden Young
60fbe47ee3
Jsdocs (#73)
* fix: Load correct main.

* docs: Enable markdown.

* docs: Add jsdoc blocks.

* docs: Separate orbitdb into module and namespace.

* docs: Database module and namespace.

* docs: Default values for storage.

* docs: Match param naming across modules.

* docs: Use @link where possible.

* docs: Use @example for code.

* docs: KeyStore module and namespace documentation.

* docs: API for Access controller management.

* docs: Document Database events.

* docs: Formatting.

* docs: Notes on Custom AC and including a canAppend function.

* docs: Standardize primitive data types.

* docs: Proposed submodule structure.

* docs: Composed storage. How to create custom storage.

* docs: annotations for all storage modules.

* docs: Documents.

* docs: KeyValueIndexed.

* docs: Provide example for specifying storage for keyvalue.

* docs: KeyValue.

* docs: Remove const documentation where not required.

* docs: KeyStore static functions.

* docs: Identities.

* docs: Identity.

* refactor: Remove unused param.

* docs: Address.

* docs: Address.

* docs: Manifest.

* docs: IPFSAccessController.

* docs: OrbitDBAccessController.

* docs: Utils.

* test: check for correct message.
2023-05-18 03:34:44 +08:00
haad
c117ef63ba Add jsdocs 2023-04-13 09:15:27 +03:00
haad
3030336db9 More refactoring 2023-04-06 15:25:42 +03:00
haad
eddf5b853b Refactor Database interface for configuration, add onUpdate callback 2023-04-06 10:00:52 +03:00
haad
d681bb720a Remove Log and Database dependency injection 2023-04-06 10:00:09 +03:00
Hayden Young
428ce83878
Refactor/ac (#61)
* refactor: Move Manifest to own module.

* refactor: Modularize orbitdb access controller.

* chore: Check for correct access controller path and modify if necessary.

* fix: Linting.

* refactor: AC interface no longer needed.

* refactor: Move IPFS-specific AC list back into IPFS AC.

* refactor: Explicitly name access controller param.

* refactor: Pass in manifest settings as object.

* refactor: Config access controllers.

* refactor: ACs should expose specific params before being called with generic params.

* feat: Pass write access to root IPFS AC.

* refactor: AC should handle type prefix.

* test: Test for type.

* refactor: Pass generic access to Database (and inheriting dbs).

* refactor: Use AccessControllers module to manage custom ACs.

* chore: Remove excess console logging.

* test: Fix ipfs module import.
2023-04-03 19:56:47 +08:00
Haad
a027525e5c
Merge pull request #57 from saul-jb/feat/path-refactor
feat: Remove dependence on path.
2023-03-29 18:20:11 +03:00
Haad
a5c14d5377
Fix log fetching parallelism (#60)
* Fix log traverse parallelism

* Rename pointerCount to referencesCount
2023-03-29 21:10:24 +08:00
saul
06a68bbe1c Replace usages of path with path join util. 2023-03-28 12:55:15 +13:00
Haad
4fe1b0c1a1
Add Entry index to Log (#48)
* Turn off IPFS console.log output for tests

* Fix replication and sync tests

* Close keystore after tests in IPFSAccessController tests

* Fix error event test in Sync tests

* Fix race condition

* Add entry index to Log

* Clean up storage files

* Fix tests

* Fix linter
2023-03-27 18:09:44 +08:00
haad
39f5face5a Add optional flag to disable automatic sync per database 2023-03-25 12:34:02 +02:00
Hayden Young
aabfd4e2bc
feat: Configurable heads and entry storage. (#42)
* feat: Configurable heads and entry storage.

* fix: Linting.

* test: Re-enable all tests.

* test: Custom entry storage.

* test: Check for heads paths.

* fix: Check for path using fs.
2023-03-14 05:42:05 +08:00
Hayden Young
a40bc8bdcf
Test/database (#38)
* test: Database.

* test: Remove caching test. Caching is superseded by the various storage options.

* test: db2 replicates data in existing db1.

* test: Move event tests to generic database tests.

* test: Single instance cleanup.

* fix: Linting.

* Fix Sync race condition (#39)

* test: Fix key path import.

---------

Co-authored-by: Haad <haadcode@users.noreply.github.com>
2023-03-11 21:01:05 +08:00
haad
6140c0dc07 Fix passing in database manifest meta data 2023-03-09 10:13:39 +02:00
haad
3008529511 Fix linter 2023-03-09 09:12:14 +02:00
haad
0bc17bd9f5 Cached default storage for Database 2023-03-09 08:37:53 +02:00
haad
4c31514a1b Refactor names and functions in Sync 2023-03-03 09:05:10 +02:00
haad
ebdafaa248 Improve sync protocol event handling 2023-03-03 07:38:25 +02:00
haad
4a7d3f0720 Move files, clean up 2023-03-01 18:16:06 +02:00