@chaosity/location-client 0.5.1 → 0.6.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.
Files changed (71) hide show
  1. package/README.md +14 -0
  2. package/dist/adapters/GeoPlaces.d.ts +1 -1
  3. package/dist/auth/TokenProvider.js +3 -3
  4. package/dist/cjs/adapters/GeoPlaces.d.ts +64 -0
  5. package/dist/cjs/adapters/GeoPlaces.js +213 -0
  6. package/dist/cjs/auth/TokenProvider.d.ts +64 -0
  7. package/dist/cjs/auth/TokenProvider.js +144 -0
  8. package/dist/cjs/auth/tokenRefresh.d.ts +37 -0
  9. package/dist/cjs/auth/tokenRefresh.js +58 -0
  10. package/dist/cjs/client/GeoPlacesClient.d.ts +39 -0
  11. package/dist/cjs/client/GeoPlacesClient.js +68 -0
  12. package/dist/cjs/errors/LocationServiceException.d.ts +44 -0
  13. package/dist/cjs/errors/LocationServiceException.js +60 -0
  14. package/dist/cjs/index.d.ts +24 -0
  15. package/dist/cjs/index.js +72 -0
  16. package/dist/cjs/maps/Utils.d.ts +2 -0
  17. package/dist/cjs/maps/Utils.js +8 -0
  18. package/dist/cjs/maps/createTransformRequest.d.ts +10 -0
  19. package/dist/cjs/maps/createTransformRequest.js +43 -0
  20. package/dist/cjs/maps/mapEnums.d.ts +102 -0
  21. package/dist/cjs/maps/mapEnums.js +103 -0
  22. package/dist/cjs/maps/mapLanguage.d.ts +43 -0
  23. package/dist/cjs/maps/mapLanguage.js +75 -0
  24. package/dist/cjs/maps/mapPoi.d.ts +44 -0
  25. package/dist/cjs/maps/mapPoi.js +64 -0
  26. package/dist/cjs/maps/mapStyle.d.ts +77 -0
  27. package/dist/cjs/maps/mapStyle.js +111 -0
  28. package/dist/cjs/maps/staticMap.d.ts +85 -0
  29. package/dist/cjs/maps/staticMap.js +81 -0
  30. package/dist/cjs/package.json +3 -0
  31. package/dist/cjs/server/LocationServiceConnector.d.ts +55 -0
  32. package/dist/cjs/server/LocationServiceConnector.js +91 -0
  33. package/dist/cjs/server/getClientConfig.d.ts +40 -0
  34. package/dist/cjs/server/getClientConfig.js +130 -0
  35. package/dist/cjs/server/index.d.ts +6 -0
  36. package/dist/cjs/server/index.js +9 -0
  37. package/dist/cjs/transport/endpoints.d.ts +2 -0
  38. package/dist/cjs/transport/endpoints.js +34 -0
  39. package/dist/cjs/transport/errors.d.ts +19 -0
  40. package/dist/cjs/transport/errors.js +104 -0
  41. package/dist/cjs/transport/http.d.ts +24 -0
  42. package/dist/cjs/transport/http.js +142 -0
  43. package/dist/cjs/types/index.d.ts +34 -0
  44. package/dist/cjs/types/index.js +3 -0
  45. package/dist/cjs/utils/roundPosition.d.ts +66 -0
  46. package/dist/cjs/utils/roundPosition.js +109 -0
  47. package/dist/cjs/utils/tokenClaims.d.ts +55 -0
  48. package/dist/cjs/utils/tokenClaims.js +61 -0
  49. package/dist/client/GeoPlacesClient.d.ts +3 -3
  50. package/dist/client/GeoPlacesClient.js +4 -4
  51. package/dist/index.d.ts +22 -22
  52. package/dist/index.js +12 -12
  53. package/dist/maps/Utils.d.ts +1 -1
  54. package/dist/maps/Utils.js +1 -1
  55. package/dist/maps/mapLanguage.d.ts +1 -1
  56. package/dist/maps/mapStyle.d.ts +1 -1
  57. package/dist/maps/mapStyle.js +2 -2
  58. package/dist/maps/staticMap.d.ts +1 -1
  59. package/dist/maps/staticMap.js +1 -1
  60. package/dist/server/LocationServiceConnector.d.ts +2 -2
  61. package/dist/server/LocationServiceConnector.js +6 -6
  62. package/dist/server/getClientConfig.d.ts +1 -1
  63. package/dist/server/getClientConfig.js +2 -2
  64. package/dist/server/index.d.ts +6 -6
  65. package/dist/server/index.js +3 -3
  66. package/dist/transport/endpoints.d.ts +1 -1
  67. package/dist/transport/endpoints.js +1 -1
  68. package/dist/transport/errors.d.ts +1 -1
  69. package/dist/transport/errors.js +1 -1
  70. package/dist/transport/http.js +2 -2
  71. package/package.json +33 -11
package/package.json CHANGED
@@ -1,30 +1,43 @@
1
1
  {
2
2
  "name": "@chaosity/location-client",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Client library for Chaosity Location Service with AWS Location Service compatibility",
5
5
  "type": "module",
6
- "main": "dist/index.js",
6
+ "main": "dist/cjs/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/index.d.ts",
11
- "default": "./dist/index.js"
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/cjs/index.d.ts",
16
+ "default": "./dist/cjs/index.js"
17
+ }
12
18
  },
13
19
  "./server": {
14
- "types": "./dist/server/index.d.ts",
15
- "default": "./dist/server/index.js"
20
+ "import": {
21
+ "types": "./dist/server/index.d.ts",
22
+ "default": "./dist/server/index.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/cjs/server/index.d.ts",
26
+ "default": "./dist/cjs/server/index.js"
27
+ }
16
28
  }
17
29
  },
18
30
  "scripts": {
19
- "build": "tsc",
31
+ "build": "tsc && tsc -p tsconfig.cjs.json && node scripts/finish-cjs.mjs",
20
32
  "dev": "tsc --watch",
21
33
  "lint": "eslint . && prettier --check .",
22
34
  "lint:fix": "eslint --fix . && prettier --write .",
23
35
  "format": "prettier --write .",
24
36
  "test": "vitest run",
25
37
  "test:watch": "vitest",
26
- "prepublishOnly": "npm run build",
27
- "prepare": "husky"
38
+ "prepublishOnly": "npm run build && npm run smoke",
39
+ "prepare": "husky",
40
+ "smoke": "node scripts/smoke.mjs"
28
41
  },
29
42
  "keywords": [
30
43
  "aws",
@@ -47,19 +60,23 @@
47
60
  "dependencies": {
48
61
  "@aws-sdk/client-geo-places": "^3.0.0",
49
62
  "@aws/amazon-location-utilities-datatypes": "^1.0.0",
50
- "@maplibre/maplibre-gl-geocoder": "^1.9.4",
51
63
  "debug": "^4.4.3"
52
64
  },
53
65
  "peerDependencies": {
66
+ "@maplibre/maplibre-gl-geocoder": "^1.9.4",
54
67
  "maplibre-gl": "^5.0.0"
55
68
  },
56
69
  "peerDependenciesMeta": {
70
+ "@maplibre/maplibre-gl-geocoder": {
71
+ "optional": true
72
+ },
57
73
  "maplibre-gl": {
58
74
  "optional": true
59
75
  }
60
76
  },
61
77
  "devDependencies": {
62
78
  "@eslint/js": "^10.0.1",
79
+ "@maplibre/maplibre-gl-geocoder": "^1.9.4",
63
80
  "@types/debug": "^4.1.12",
64
81
  "@types/node": "^25.0.3",
65
82
  "@vitest/coverage-v8": "^3.0.0",
@@ -79,5 +96,10 @@
79
96
  "dist",
80
97
  "README.md",
81
98
  "LICENSE"
82
- ]
99
+ ],
100
+ "module": "dist/index.js",
101
+ "sideEffects": false,
102
+ "engines": {
103
+ "node": ">=20"
104
+ }
83
105
  }