Skip to content
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

Feature/zkdb as a service #47

Merged
merged 15 commits into from
Nov 10, 2023
Merged

Conversation

chiro-hiro
Copy link
Contributor

Feature type

  • UI
  • Implementation
  • Specification
  • CI/CD
  • Other

Feature description

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Your code builds clean without any errors or warnings.
  • Tests for changes have been added (for bug fixes / features). If no, why?

* @returns Promise<boolean>
*/
public async isFile(path: string = ''): Promise<boolean> {
const filepath = `${this.pathBase}/${path}`;
Copy link
Collaborator

@magestrio magestrio Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String conjugation produces inconsistent results. We should use path.join instead: path.join(this.pathBase, filePath)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String conjugation produces inconsistent results. We should use path.join instead: path.join(this.pathBase, filePath)

It could be needless for IPFS. At least, I encountered an error suggesting a file didn't exist, even though it does. path.join helped me to overcome the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path.join() used os separator that mean for Windows it would be \ so your path might look like this:
/ipfs\root\{CID}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, memory is a mock engine for test.

@magestrio
Copy link
Collaborator

*development branch, otherwise we won't be consistent

@chiro-hiro chiro-hiro changed the base branch from main to development October 30, 2023 07:34
@chiro-hiro chiro-hiro marked this pull request as ready for review November 10, 2023 07:04
# Conflicts:
#	packages/zkdb/package-lock.json
#	packages/zkdb/package.json
#	packages/zkdb/src/storage-engine/ipfs.ts
#	packages/zkdb/src/storage-engine/metadata.ts
@chiro-hiro chiro-hiro merged commit d37e0e3 into development Nov 10, 2023
@chiro-hiro chiro-hiro deleted the feature/zkdb_as_a_service branch November 10, 2023 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants