@rss3/js-sdk
Advanced tools
Comparing version 0.4.0 to 0.6.0
{ | ||
"name": "@rss3/js-sdk", | ||
"type": "module", | ||
"version": "0.4.0", | ||
"main": "./dist/index.mjs", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"./dist/*", | ||
"./dist/index.d.ts" | ||
] | ||
} | ||
"version": "0.6.0", | ||
"main": "lib/index.js", | ||
"engines": { | ||
"node": ">=v19.8.1" | ||
}, | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"./utils": { | ||
"types": "./dist/utils.d.ts", | ||
"require": "./dist/utils.cjs", | ||
"import": "./dist/utils.mjs" | ||
}, | ||
"./types": { | ||
"types": "./dist/types.d.ts", | ||
"require": "./dist/types.cjs", | ||
"import": "./dist/types.mjs" | ||
} | ||
"description": "js sdk for rss3 services", | ||
"scripts": { | ||
"generate": "npm run build && node lib/types/generate", | ||
"build": "rm -rf lib && tsc", | ||
"test": "vitest run", | ||
"lint": "cspell --no-progress '**' && eslint --max-warnings=0 src && prettier -c . && tsc --noEmit", | ||
"format": "eslint --fix && prettier -w .", | ||
"prepare": "npm run build" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"openapi-fetch": "^0.6.0" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@kecrily/eslint-config": "^0.2.6", | ||
"@types/debug": "^4.1.8", | ||
"@types/html-to-text": "^9.0.1", | ||
"@types/node": "^20.3.2", | ||
"@types/react": "^18.2.14", | ||
"@types/react-dom": "^18.2.6", | ||
"@typescript-eslint/eslint-plugin": "^5.60.1", | ||
"@typescript-eslint/parser": "^5.60.1", | ||
"cspell": "^6.31.1", | ||
"eslint": "^8.43.0", | ||
"prettier": "^2.8.8", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^5.0.4", | ||
"unbuild": "^1.2.1", | ||
"vitest": "^0.32.2" | ||
}, | ||
"eslintConfig": { | ||
"extends": "@kecrily", | ||
"ignorePatterns": [ | ||
"src/types/data.ts", | ||
"src/types/search.ts" | ||
] | ||
"dependencies": { | ||
"debug": "^4.3.4", | ||
"html-to-text": "^9.0.5", | ||
"openapi-fetch": "^0.6.0" | ||
}, | ||
"scripts": { | ||
"dev": "unbuild --stub", | ||
"build": "unbuild", | ||
"test": "vitest", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint . --cache" | ||
} | ||
} | ||
"files": [ | ||
"lib", | ||
"README.md" | ||
] | ||
} |
@@ -1,54 +0,25 @@ | ||
# index-sdk | ||
# Overview | ||
index-sdk is designed to simplify the development process and enable developers to interact with RSS3 API efficiently | ||
The JS SDK for rss3 services. | ||
## Usage | ||
```sh | ||
# npm | ||
npm i index-sdk | ||
Install the package: | ||
# yarn | ||
yarn add index-sdk | ||
# pnpm | ||
pnpm add index-sdk | ||
```bash | ||
npm i @rss3/js-sdk | ||
``` | ||
If you want to customize the endpoint, you can: | ||
Basic code example: [link](src/examples/basic.ts). | ||
```ts | ||
import { IndexClient } from 'index-sdk' | ||
For more examples see [examples](src/examples). | ||
const index = new IndexClient({ endpoint: { data: 'https://test-pregod.rss3.dev/v1' } }) | ||
``` | ||
## Development | ||
And of course you can also use [all of fetch options (`RequestInit`)](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options). | ||
Install [use-node](https://github.com/ysmood/use-node). | ||
## Examples | ||
### Get all of Vitalik's profiles on Web3 | ||
```ts | ||
import { IndexClient } from 'index-sdk' | ||
const index = new IndexClient() | ||
const { result: profiles } = await index.profiles.get('vitalik.eth') | ||
```bash | ||
use-node | ||
npm i | ||
npm t | ||
``` | ||
Now you know where to find Vitalik! | ||
### Get all notes posted by DIYgod on xLog | ||
```ts | ||
import { IndexClient } from 'index-sdk' | ||
const index = new IndexClient() | ||
const { result: notes } = await index.notes.get('diygod.eth', { | ||
platform: ['xLog'] | ||
}) | ||
``` | ||
Now you can even use xLog as a headless CMS |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
20
0
270179
3
14
6299
26
3
No
+ Addeddebug@^4.3.4
+ Addedhtml-to-text@^9.0.5
+ Added@selderee/plugin-htmlparser2@0.11.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddeepmerge@4.3.1(transitive)
+ Addeddom-serializer@2.0.0(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@5.0.3(transitive)
+ Addeddomutils@3.1.0(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedhtml-to-text@9.0.5(transitive)
+ Addedhtmlparser2@8.0.2(transitive)
+ Addedleac@0.6.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addedparseley@0.12.1(transitive)
+ Addedpeberminta@0.9.0(transitive)
+ Addedselderee@0.11.0(transitive)