fix: broken logic, refactoring, and dep updates#115
Merged
dtbuchholz merged 11 commits intomainfrom Dec 11, 2023
Merged
Conversation
Contributor
Author
|
@joewagner could you maybe give this a passover as well? it basically cleans up existing logic to make it more usable. i've incorporated these changes in the docs site PR, too. |
joewagner
previously approved these changes
Dec 11, 2023
Contributor
joewagner
left a comment
There was a problem hiding this comment.
@dtbuchholz Thanks for getting this working. I added two inline comments, one is a spelling error, otherwise looks great!
| The [`@tableland/jeti`](https://github.com/tablelandnetwork/jeti) library builds on top of the [`@tableland/sdk`](https://github.com/tablelandnetwork/tableland-js/packages/sdk), allowing you to easily add IPFS data to Tableland and read the underlying data from Tableland. Simply import the library, connect to the Tableland network, and you are ready to start creating, updating, and reading table data. | ||
|
|
||
| Simply import the library, connect to the Tableland network, and you are ready to start creating and updating tables. | ||
| JETI (JavaScript Extension for Tableland Integrations) is also designed to be extensible. You can create you own custom plugins/processors that transform data inserted into tables or retrieved from tables. For example, the IPFS plugin processes data and inserts a CID in to a cell, and when data is read, it will "see" the CID and fetch/transform the underlying content within the query response. You can do whatever you'd like with an implementation suing the `creatorProcessor` method. |
Contributor
There was a problem hiding this comment.
spelling: should be "using" right?
| "ipfs-http-client": "^60.0.1", | ||
| "prettier": "^2.8.8", | ||
| "ts-node": "^10.9.1" | ||
| "ipfs-http-client": "^60.0.1" |
Contributor
There was a problem hiding this comment.
@dtbuchholz Do you want to add yourself as a contributor?
Contributor
Author
|
@joewagner good catches! updated, just need a new 👍 and then i'll publish |
joewagner
approved these changes
Dec 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a few things:
createProcessor.Pinnerclass &ipfs-http-clientwhere pinning wasn't workingpinToProviderandpinToLocalnow must be instantiated an IPFS node gateway URL before templating is possible.Pinner, also allow for raw strings or Uint8Arrays to be pinned, retrieving the CID contents usescat/streams to get the original text contents.truncatemethod to actually be useful where it truncates text at 1024 bytes to align with table cell limits—i.e., an alternative to using the IPFS plugin & CIDs.Details
Since the API changes for
pinToProviderandpinToLocalas well as behavior for others, this needs a major bump.