-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: broken logic, refactoring, and dep updates #115
Conversation
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dtbuchholz Thanks for getting this working. I added two inline comments, one is a spelling error, otherwise looks great!
README.md
Outdated
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dtbuchholz Do you want to add yourself as a contributor?
@joewagner good catches! updated, just need a new 👍 and then i'll publish |
Summary
This PR implements a few things:
createProcessor
.Pinner
class &ipfs-http-client
where pinning wasn't workingpinToProvider
andpinToLocal
now 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.truncate
method 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
pinToProvider
andpinToLocal
as well as behavior for others, this needs a major bump.