laconic-registry-cli/package.json
Prathamesh Musale cf4bf5ed42
All checks were successful
Lint / lint (18.x) (push) Successful in 1m15s
Publish npm package to gitea / npm_publish (18.x) (release) Successful in 1m39s
Tests / cli_tests (18.x) (push) Successful in 9m23s
Add pagination to list records CLI (#82)
Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8)
Requires cerc-io/registry-sdk#27

Example CLI commands with changes:
```bash
laconic registry record list --type WebsiteRegistrationRecord --all true | jq 'length'
# 16

laconic registry record list --limit 4 --type WebsiteRegistrationRecord --all true | jq '[.[] | {id, createTime}]'
# [
#   {
#     "id": "bafyreifmjc7kc76ihrolzqhynwrebjyr7bw7pstlv2lcdq5qu4cleql7ke",
#     "createTime": "2024-09-05T13:25:46Z"
#   },
#   {
#     "id": "bafyreifipscluxu43nx5frx54tyxnkkki2edsw3jydgexfjsluq674esfa",
#     "createTime": "2024-09-05T13:25:49Z"
#   },
#   {
#     "id": "bafyreidco4d3pjro2fp6rinlazm3xcsnfm2ibzeigsqwlmmtvne25ukpjy",
#     "createTime": "2024-09-05T13:25:52Z"
#   },
#   {
#     "id": "bafyreigqoz4ffaqod5fut3rebrtctnp3ktvph46fgocmgmfqbkofnmombe",
#     "createTime": "2024-09-05T13:25:55Z"
#   }
# ]

laconic registry record list --limit 4 --offset 2 --type WebsiteRegistrationRecord --all true | jq '[.[] | {id, createTime}]'
# [
#   {
#     "id": "bafyreidco4d3pjro2fp6rinlazm3xcsnfm2ibzeigsqwlmmtvne25ukpjy",
#     "createTime": "2024-09-05T13:25:52Z"
#   },
#   {
#     "id": "bafyreigqoz4ffaqod5fut3rebrtctnp3ktvph46fgocmgmfqbkofnmombe",
#     "createTime": "2024-09-05T13:25:55Z"
#   },
#   {
#     "id": "bafyreieku22he546fsxrgwxd3mfpbtcobwjasl6zimkizl65rwvybwerci",
#     "createTime": "2024-09-05T13:25:58Z"
#   },
#   {
#     "id": "bafyreia4zjuap7v3tnilersrzsht75mqf3mhzsk72jgpcct7u6lj54zwyq",
#     "createTime": "2024-09-05T13:26:01Z"
#   }
# ]
```

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
Reviewed-on: #82
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-09-05 13:51:42 +00:00

50 lines
1.3 KiB
JSON

{
"name": "@cerc-io/laconic-registry-cli",
"version": "0.2.7",
"main": "index.js",
"repository": "git@github.com:cerc-io/laconic-registry-cli.git",
"author": "",
"license": "UNLICENSED",
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.4.1",
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.25",
"@types/yargs": "^17.0.10",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"dotenv": "^16.3.2",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"husky": "^9.0.2",
"jest": "29.0.0",
"ts-jest": "^29.0.2",
"ts-node": "^10.2.1",
"typescript": "^4.6.3"
},
"dependencies": {
"@cerc-io/registry-sdk": "^0.2.8",
"fs-extra": "^10.1.0",
"js-yaml": "^3.14.1",
"lodash": "^4.17.21",
"lodash-clean": "^2.2.3",
"yargs": "^17.4.1"
},
"scripts": {
"test": "jest --runInBand --verbose test/cli.test.ts",
"lint": "eslint .",
"clean": "rm -rf ./dist",
"build": "tsc",
"prepare": "husky"
},
"bin": {
"laconic": "bin/laconic"
}
}