rest-hooks
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "rest-hooks", | ||
"version": "0.0.1", | ||
"description": "Hooks for rest APIs", | ||
"version": "0.0.2", | ||
"description": "Easy react hooks for REST apis", | ||
"sideEffects": false, | ||
"main": "lib/index.js", | ||
"module": "lib/index.js", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
"build:lib": "NODE_ENV=production babel src --out-dir lib --source-maps inline --extensions '.ts' --ignore '**/__tests__/**'", | ||
"build:types": "tsc --emitDeclarationOnly -p ./src", | ||
"build:clean": "rimraf lib", | ||
"build": "npm run build:clean && npm run build:lib && npm run build:types", | ||
"prepare": "npm run build:clean && npm run build", | ||
"lint": "eslint src", | ||
"test": "bnr run-test", | ||
"test:watch": "npm test -- --watch", | ||
"coverage": "bnr run-coverage --silent" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/ntucker/anansi-fetch.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ntucker/anansi-fetch/issues" | ||
}, | ||
"homepage": "https://github.com/ntucker/anansi-fetch#readme", | ||
"keywords": [ | ||
"anansi", | ||
"rest", | ||
"react", | ||
"redux", | ||
"immutable", | ||
"immutablejs", | ||
"ajax", | ||
@@ -15,3 +42,63 @@ "networking" | ||
"author": "Nathaniel Tucker", | ||
"license": "BSD" | ||
"license": "BSD", | ||
"betterScripts": { | ||
"run-test": { | ||
"command": "jest", | ||
"env": { | ||
"NODE_ENV": "test", | ||
"NODE_PATH": "./src" | ||
} | ||
}, | ||
"run-coverage": { | ||
"command": "nyc better-npm-run run-test --silent --reporter min", | ||
"env": { | ||
"NODE_ENV": "test", | ||
"NODE_PATH": "./src" | ||
} | ||
} | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"src" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@anansi/babel-preset": "0.11.1", | ||
"@anansi/eslint-config": "^0.5.2", | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.2.2", | ||
"@types/jest": "^23.3.13", | ||
"@types/nock": "^9.3.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"better-npm-run": "^0.1.1", | ||
"enzyme": "^3.8.0", | ||
"enzyme-adapter-react-16": "^1.7.1", | ||
"eslint": "^5.12.1", | ||
"flow-bin": "^0.88.0", | ||
"flow-copy-source": "^2.0.2", | ||
"flow-typed": "^2.5.1", | ||
"ignore-styles": "^5.0.1", | ||
"jest": "^23.6.0", | ||
"nock": "^10.0.6", | ||
"nsp": "^3.2.1", | ||
"nyc": "^13.1.0", | ||
"prop-types": "^15.6.2", | ||
"react": "16.8.0-alpha.1", | ||
"react-immutable-proptypes": "^2.1.0", | ||
"sinon": "^7.2.3", | ||
"ts-jest": "^23.10.5", | ||
"typescript": "^3.2.4" | ||
}, | ||
"dependencies": { | ||
"@types/react": "^16.7.20", | ||
"@types/superagent": "^3.8.6", | ||
"flux-standard-action": "^2.0.3", | ||
"normalizr": "^3.3.0", | ||
"qs": "^6.6.0", | ||
"superagent": "^4.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "16.8.0-alpha.1" | ||
} | ||
} |
# Rest hooks: Data fetching and binding hooks | ||
Rest hooks builds on the core tenants of REST to make dynamic sites easy, performant, and scalable. | ||
## Getting Started | ||
* [Installation](docs/getting-started/installation.md) | ||
* [Usage](docs/getting-started/usage.md) | ||
## API | ||
* Model: | ||
* State: | ||
* [ModelResource](docs/ModelResource.md) | ||
* mixins | ||
* createModelRegistry | ||
* registerModel | ||
* reducer | ||
* Hooks: | ||
* connect | ||
* fetch | ||
* mutate | ||
* block | ||
* selectResource | ||
* fetchResource | ||
* useResource | ||
## Patterns & Examples | ||
* Basics | ||
* Awaiting resolution of API calls | ||
* Usage with redux-form | ||
* Inheritance with ModelResource | ||
* [Cross-orgin requests with JSONP](docs/guides/jsonp.md) | ||
* Authentication | ||
* Performance Optimizations (optional) | ||
* [Nesting related resources (server-side join)](docs/guides/nested-response.md) | ||
* Batching related resources (client-side join) | ||
* Reducing overfetching | ||
* Optimistic query update on create | ||
* Cross-resource multi-update RPC |
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
35636
22
322
33
0
7
26
2
+ Added@types/react@^16.7.20
+ Added@types/superagent@^3.8.6
+ Addedflux-standard-action@^2.0.3
+ Addednormalizr@^3.3.0
+ Addedqs@^6.6.0
+ Addedsuperagent@^4.1.0
+ Added@types/cookiejar@2.1.5(transitive)
+ Added@types/node@22.10.6(transitive)
+ Added@types/prop-types@15.7.14(transitive)
+ Added@types/react@16.14.62(transitive)
+ Added@types/scheduler@0.16.8(transitive)
+ Added@types/superagent@3.8.7(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcomponent-emitter@1.3.1(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedflux-standard-action@2.1.2(transitive)
+ Addedform-data@2.5.2(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedlodash.isplainobject@4.0.6(transitive)
+ Addedlodash.isstring@4.0.1(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@2.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedms@2.1.3(transitive)
+ Addednormalizr@3.6.2(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedqs@6.14.0(transitive)
+ Addedreact@16.8.0-alpha.1(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedscheduler@0.13.6(transitive)
+ Addedside-channel@1.1.0(transitive)
+ Addedside-channel-list@1.0.0(transitive)
+ Addedside-channel-map@1.0.1(transitive)
+ Addedside-channel-weakmap@1.0.2(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedsuperagent@4.1.0(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)