-
Notifications
You must be signed in to change notification settings - Fork 0
repair cli #22
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
Merged
Merged
repair cli #22
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
15a65c6
chore: cli setup
hugomrdias 0e9755e
chore: repair commands
hugomrdias 46786fc
chore: update repair-cli package and commands
hugomrdias 04f44a1
chore: lock
hugomrdias 0a70d3d
chore: update dependencies and improve repair-cli functionality
hugomrdias e098865
feat: enhance repair-cli with new filtering and upsert functionalities
hugomrdias 2a339ba
refactor: update CLI versioning and enhance dataset commands
hugomrdias 67174ff
refactor: streamline repair dataset handling and enhance CLI function…
hugomrdias 5c1532c
fix: progress and new synpase-core
hugomrdias acb45c6
refactor: enhance repair CLI functionality and streamline dataset man…
hugomrdias 8d01480
chore: update dependencies in pnpm-lock and package.json
hugomrdias 977b2bc
chore: update TypeScript configuration for repair-cli
hugomrdias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Early repair CLI (`@filoz/repair-cli`) | ||
|
|
||
| CLI for preparing and running early repair jobs that move pieces away from a faulty Filecoin service provider and into a target PDP provider. | ||
|
|
||
| The package is built with [incur](https://www.npmjs.com/package/incur), Drizzle ORM, and `@filoz/synapse-core`. It uses the indexer Postgres database as a read-only catalog of providers, datasets, and pieces, plus a local SQLite database for repair jobs and per-piece operation state. | ||
|
|
||
| ## Conventions | ||
|
|
||
| - Prefer existing command, middleware, and DB helper patterns over new abstractions. | ||
| - Extract reusable indexer queries and local database mutations under `src/db/`. | ||
| - Keep command files focused on CLI arguments, context wiring, and response shaping. | ||
| - Add JSDoc on exported functions/types; use inline comments only for non-obvious logic such as dedupe, pagination, or on-chain state sync. | ||
| - Repairs use one IPFS-enabled target dataset with CDN disabled. Do not add per-operation dataset grouping. | ||
| - Use `contextMiddleware` for commands that need config, wallet client, indexer DB, or local DB access. | ||
| - Do not document or preserve compatibility with unshipped in-progress behavior; update docs to match the current implementation. | ||
|
|
||
| ## Build And Lint | ||
|
|
||
| ```bash | ||
| pnpm --filter @filoz/repair-cli build | ||
| pnpm --filter @filoz/repair-cli lint | ||
| ``` |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,20 @@ | ||
| // TODO | ||
| #!/usr/bin/env node | ||
| import { Cli } from 'incur' | ||
| import { datasets } from './commands/datasets.ts' | ||
| import { providers } from './commands/providers.ts' | ||
| import { repair } from './commands/repair.ts' | ||
| import { setup } from './commands/setup.ts' | ||
| import { wallet } from './commands/wallet.ts' | ||
| import { version } from './utils.ts' | ||
|
|
||
| const cli = Cli.create('repair', { | ||
| version, | ||
| description: 'Early repair for faulty service providers and datasets', | ||
| }) | ||
|
|
||
| cli.command(setup) | ||
| cli.command(wallet) | ||
| cli.command(repair) | ||
| cli.command(datasets) | ||
| cli.command(providers) | ||
| cli.serve() | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.