@iwpnd/valhalla-ts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/decode-polyline.d.ts +22 -0
- package/dist/decode-polyline.d.ts.map +1 -0
- package/dist/decode-polyline.js +68 -0
- package/dist/decode-polyline.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/types/base.d.ts +15 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +3 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/costing.d.ts +232 -0
- package/dist/types/costing.d.ts.map +1 -0
- package/dist/types/costing.js +3 -0
- package/dist/types/costing.js.map +1 -0
- package/dist/types/error.d.ts +7 -0
- package/dist/types/error.d.ts.map +1 -0
- package/dist/types/error.js +3 -0
- package/dist/types/error.js.map +1 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +26 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/languages.d.ts +3 -0
- package/dist/types/languages.d.ts.map +1 -0
- package/dist/types/languages.js +3 -0
- package/dist/types/languages.js.map +1 -0
- package/dist/types/locations.d.ts +56 -0
- package/dist/types/locations.d.ts.map +1 -0
- package/dist/types/locations.js +3 -0
- package/dist/types/locations.js.map +1 -0
- package/dist/types/maneuver.d.ts +110 -0
- package/dist/types/maneuver.d.ts.map +1 -0
- package/dist/types/maneuver.js +46 -0
- package/dist/types/maneuver.js.map +1 -0
- package/dist/types/request.d.ts +120 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/types/request.js +3 -0
- package/dist/types/request.js.map +1 -0
- package/dist/types/response.d.ts +92 -0
- package/dist/types/response.d.ts.map +1 -0
- package/dist/types/response.js +3 -0
- package/dist/types/response.js.map +1 -0
- package/dist/types/tracing.d.ts +15 -0
- package/dist/types/tracing.d.ts.map +1 -0
- package/dist/types/tracing.js +3 -0
- package/dist/types/tracing.js.map +1 -0
- package/dist/valhalla.d.ts +76 -0
- package/dist/valhalla.d.ts.map +1 -0
- package/dist/valhalla.js +117 -0
- package/dist/valhalla.js.map +1 -0
- package/package.json +86 -0
- package/readme.md +81 -0
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iwpnd/valhalla-ts",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A nodejs client and helper utilities for valhalla routing engine",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"typings": "dist/index.d.ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/iwpnd/valhalla-ts.git"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"author": "B. Ramser <iwpnd@posteo.de>",
|
|
18
|
+
"contributors": [],
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"valhalla",
|
|
22
|
+
"routing",
|
|
23
|
+
"http-client"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20.x",
|
|
27
|
+
"yarn": "^1.22.x"
|
|
28
|
+
},
|
|
29
|
+
"private": false,
|
|
30
|
+
"scripts": {
|
|
31
|
+
"prepublishOnly": "pinst --disable && yarn run build",
|
|
32
|
+
"postpublish": "pinst --enable",
|
|
33
|
+
"build": "tsc",
|
|
34
|
+
"build:watch": "tsc --watch",
|
|
35
|
+
"clean": "rimraf {dist,tsconfig.tsbuildinfo,yarn-error.log,coverage}",
|
|
36
|
+
"lint": "eslint --ext .ts ./src",
|
|
37
|
+
"test": "jest --runInBand --verbose --testMatch '**/*test.ts' --coverage",
|
|
38
|
+
"format": "prettier --write src/{*.ts,**/*.ts}",
|
|
39
|
+
"u": "yarn upgrade-interactive --latest",
|
|
40
|
+
"up": "docker-compose up",
|
|
41
|
+
"down": "docker-compose down",
|
|
42
|
+
"coverage": "FILE=./coverage/lcov-report/index.html; test -f $FILE && open $FILE || echo 'no coverage yet, run yarn test'",
|
|
43
|
+
"prepare": "husky"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@iwpnd/rip-ts": "1.0.3",
|
|
47
|
+
"@types/geojson": "7946.0.14"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@commitlint/cli": "18.4.4",
|
|
51
|
+
"@commitlint/config-conventional": "18.4.4",
|
|
52
|
+
"@semantic-release/changelog": "6.0.3",
|
|
53
|
+
"@semantic-release/git": "10.0.1",
|
|
54
|
+
"@semantic-release/github": "9.2.6",
|
|
55
|
+
"@semantic-release/npm": "11.0.2",
|
|
56
|
+
"@semantic-release/release-notes-generator": "12.1.0",
|
|
57
|
+
"@types/chance": "1.1.6",
|
|
58
|
+
"@types/jest": "29.5.12",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "7.0.1",
|
|
60
|
+
"@typescript-eslint/parser": "7.0.1",
|
|
61
|
+
"chance": "1.1.11",
|
|
62
|
+
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
63
|
+
"devmoji": "2.3.0",
|
|
64
|
+
"eslint": "8.56.0",
|
|
65
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
66
|
+
"eslint-config-prettier": "9.1.0",
|
|
67
|
+
"eslint-import-resolver-typescript": "3.6.1",
|
|
68
|
+
"eslint-plugin-import": "2.29.1",
|
|
69
|
+
"eslint-plugin-prettier": "5.1.3",
|
|
70
|
+
"husky": "9.0.10",
|
|
71
|
+
"jest": "29.7.0",
|
|
72
|
+
"lint-staged": "15.2.2",
|
|
73
|
+
"pinst": "3.0.0",
|
|
74
|
+
"prettier": "3.2.5",
|
|
75
|
+
"rimraf": "5.0.5",
|
|
76
|
+
"semantic-release": "23.0.2",
|
|
77
|
+
"ts-jest": "29.1.2",
|
|
78
|
+
"typescript": "5.3.3"
|
|
79
|
+
},
|
|
80
|
+
"lint-staged": {
|
|
81
|
+
"*.ts": [
|
|
82
|
+
"eslint --fix",
|
|
83
|
+
"prettier --write"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<br />
|
|
2
|
+
<div align="center">
|
|
3
|
+
<h3 align="center">valhalla-ts</h3>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
valhalla api client
|
|
7
|
+
<br />
|
|
8
|
+
<a href="https://github.com/ipwnd/valhalla-ts/issues">Report Bug</a>
|
|
9
|
+
·
|
|
10
|
+
<a href="https://github.com/iwpnd/valhalla-ts/issues">Request Feature</a>
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
## About The Project
|
|
15
|
+
|
|
16
|
+
Easy to use, fully typed http client for [valhalla routing service](https://github.com/valhalla/valhalla).
|
|
17
|
+
|
|
18
|
+
### Installation
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
yarn install @iwpnd/valhalla-ts
|
|
22
|
+
|
|
23
|
+
# or
|
|
24
|
+
|
|
25
|
+
npm install @iwpnd/valhalla-ts
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { Valhalla } from '@iwpnd/valhalla-ts';
|
|
32
|
+
|
|
33
|
+
const valhalla = new Valhalla('https://localhost:8002');
|
|
34
|
+
|
|
35
|
+
const route = await valhalla.route({
|
|
36
|
+
locations: [
|
|
37
|
+
{ lat: 52.25, lon: 13.37 },
|
|
38
|
+
{ lat: 52.25, lon: 13.36 },
|
|
39
|
+
],
|
|
40
|
+
costing: 'bicycle',
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Roadmap
|
|
45
|
+
|
|
46
|
+
- [x] valhalla client
|
|
47
|
+
- [x] fully typed
|
|
48
|
+
- [ ] finish documentation
|
|
49
|
+
- [ ] request helper
|
|
50
|
+
- [ ] load balancing
|
|
51
|
+
|
|
52
|
+
## Contributing
|
|
53
|
+
|
|
54
|
+
Contributions are neither expected nor encouraged. If you for whatever
|
|
55
|
+
reason you want to contribute here, create an issue describing your problem first.
|
|
56
|
+
Unsolicited PRs are going to be deleted straight up.
|
|
57
|
+
|
|
58
|
+
If we evaluated that you're in the right repository,
|
|
59
|
+
are of a clear state of mind and have cause to do what you wanna do, please
|
|
60
|
+
follow the steps below.
|
|
61
|
+
|
|
62
|
+
1. Fork the Project
|
|
63
|
+
2. Create your Feature Branch (`git checkout -b feat/my-amazing-feature`)
|
|
64
|
+
3. Commit your Changes (`git commit -m 'feat: some amazing feature'`)
|
|
65
|
+
4. Push to the Branch (`git push origin feat/my-amazing-feature`)
|
|
66
|
+
5. Open a Pull Request
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
Distributed under the MIT License. See `LICENSE.txt` for more information.
|
|
71
|
+
|
|
72
|
+
## Contact
|
|
73
|
+
|
|
74
|
+
Benjamin Ramser - [@iwpnd](https://twitter.com/iwpnd) - iwpnd@posteo.com
|
|
75
|
+
|
|
76
|
+
Project Link: [https://github.com/iwpnd/valhalla-ts](https://github.com/iwpnd/valhalla-ts)
|
|
77
|
+
|
|
78
|
+
## Acknowledgments
|
|
79
|
+
|
|
80
|
+
- [valhalla](https://github.com/valhalla/valhalla)
|
|
81
|
+
- [gis-ops](https://github.com/gis-ops/valhalla)
|