@map-colonies/mc-utils 3.1.0 → 3.3.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 (64) hide show
  1. package/README.md +67 -67
  2. package/dist/arrays/index.d.ts +1 -1
  3. package/dist/arrays/index.js +17 -17
  4. package/dist/arrays/subGroups.d.ts +8 -8
  5. package/dist/arrays/subGroups.js +33 -33
  6. package/dist/communication/http/httpClient.d.ts +29 -29
  7. package/dist/communication/http/httpClient.d.ts.map +1 -1
  8. package/dist/communication/http/httpClient.js +353 -317
  9. package/dist/communication/http/httpClient.js.map +1 -1
  10. package/dist/communication/http/index.d.ts +1 -1
  11. package/dist/communication/http/index.js +17 -17
  12. package/dist/communication/index.d.ts +1 -1
  13. package/dist/communication/index.js +17 -17
  14. package/dist/dateTime/getUTCDate.d.ts +1 -1
  15. package/dist/dateTime/getUTCDate.js +10 -10
  16. package/dist/dateTime/index.d.ts +1 -1
  17. package/dist/dateTime/index.js +17 -17
  18. package/dist/geo/bboxUtils.d.ts +23 -23
  19. package/dist/geo/bboxUtils.js +89 -89
  20. package/dist/geo/geoConvertor.d.ts +18 -18
  21. package/dist/geo/geoConvertor.js +49 -49
  22. package/dist/geo/geoHash.d.ts +24 -24
  23. package/dist/geo/geoHash.js +134 -134
  24. package/dist/geo/geoIntersection.d.ts +19 -19
  25. package/dist/geo/geoIntersection.js +70 -70
  26. package/dist/geo/index.d.ts +8 -8
  27. package/dist/geo/index.js +24 -24
  28. package/dist/geo/tileBatcher.d.ts +8 -8
  29. package/dist/geo/tileBatcher.js +97 -97
  30. package/dist/geo/tileRanger.d.ts +46 -46
  31. package/dist/geo/tileRanger.js +232 -232
  32. package/dist/geo/tiles.d.ts +82 -82
  33. package/dist/geo/tiles.js +219 -219
  34. package/dist/geo/tilesGenerator.d.ts +2 -2
  35. package/dist/geo/tilesGenerator.js +17 -17
  36. package/dist/index.d.ts +6 -6
  37. package/dist/index.js +22 -22
  38. package/dist/models/enums/gdal/dataType.d.ts +16 -16
  39. package/dist/models/enums/gdal/dataType.js +20 -20
  40. package/dist/models/enums/gdal/index.d.ts +2 -2
  41. package/dist/models/enums/gdal/index.js +18 -18
  42. package/dist/models/enums/gdal/resamplingMethod.d.ts +16 -16
  43. package/dist/models/enums/gdal/resamplingMethod.js +20 -20
  44. package/dist/models/enums/geo/index.d.ts +1 -1
  45. package/dist/models/enums/geo/index.js +17 -17
  46. package/dist/models/enums/geo/tileOrigin.d.ts +7 -7
  47. package/dist/models/enums/geo/tileOrigin.js +11 -11
  48. package/dist/models/enums/index.d.ts +2 -2
  49. package/dist/models/enums/index.js +18 -18
  50. package/dist/models/index.d.ts +2 -2
  51. package/dist/models/index.js +18 -18
  52. package/dist/models/interfaces/geo/iPoint.d.ts +7 -7
  53. package/dist/models/interfaces/geo/iPoint.js +2 -2
  54. package/dist/models/interfaces/geo/iTile.d.ts +15 -15
  55. package/dist/models/interfaces/geo/iTile.js +2 -2
  56. package/dist/models/interfaces/geo/index.d.ts +2 -2
  57. package/dist/models/interfaces/geo/index.js +18 -18
  58. package/dist/models/interfaces/index.d.ts +1 -1
  59. package/dist/models/interfaces/index.js +17 -17
  60. package/dist/utils/index.d.ts +1 -1
  61. package/dist/utils/index.js +17 -17
  62. package/dist/utils/timeout.d.ts +4 -4
  63. package/dist/utils/timeout.js +22 -22
  64. package/package.json +79 -79
@@ -1,5 +1,5 @@
1
- export declare function timeout(ms: number): Promise<void>;
2
- export declare class TimeoutError extends Error {
3
- }
4
- export declare const racePromiseWithTimeout: <T>(msTimeout: number, promise: Promise<T>) => Promise<T>;
1
+ export declare function timeout(ms: number): Promise<void>;
2
+ export declare class TimeoutError extends Error {
3
+ }
4
+ export declare const racePromiseWithTimeout: <T>(msTimeout: number, promise: Promise<T>) => Promise<T>;
5
5
  //# sourceMappingURL=timeout.d.ts.map
@@ -1,23 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.racePromiseWithTimeout = exports.TimeoutError = exports.timeout = void 0;
4
- async function timeout(ms) {
5
- return new Promise((resolve) => setTimeout(resolve, ms));
6
- }
7
- exports.timeout = timeout;
8
- class TimeoutError extends Error {
9
- }
10
- exports.TimeoutError = TimeoutError;
11
- const racePromiseWithTimeout = async (msTimeout, promise) => {
12
- // Create a promise that rejects in <ms> milliseconds
13
- const timeout = new Promise((_, reject) => {
14
- const id = setTimeout(() => {
15
- clearTimeout(id);
16
- reject(new TimeoutError(`Timed out in + ${msTimeout} + ms.`));
17
- }, msTimeout);
18
- });
19
- // Returns a race between our timeout and the passed in promise
20
- return Promise.race([promise, timeout]);
21
- };
22
- exports.racePromiseWithTimeout = racePromiseWithTimeout;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.racePromiseWithTimeout = exports.TimeoutError = exports.timeout = void 0;
4
+ async function timeout(ms) {
5
+ return new Promise((resolve) => setTimeout(resolve, ms));
6
+ }
7
+ exports.timeout = timeout;
8
+ class TimeoutError extends Error {
9
+ }
10
+ exports.TimeoutError = TimeoutError;
11
+ const racePromiseWithTimeout = async (msTimeout, promise) => {
12
+ // Create a promise that rejects in <ms> milliseconds
13
+ const timeout = new Promise((_, reject) => {
14
+ const id = setTimeout(() => {
15
+ clearTimeout(id);
16
+ reject(new TimeoutError(`Timed out in + ${msTimeout} + ms.`));
17
+ }, msTimeout);
18
+ });
19
+ // Returns a race between our timeout and the passed in promise
20
+ return Promise.race([promise, timeout]);
21
+ };
22
+ exports.racePromiseWithTimeout = racePromiseWithTimeout;
23
23
  //# sourceMappingURL=timeout.js.map
package/package.json CHANGED
@@ -1,79 +1,79 @@
1
- {
2
- "name": "@map-colonies/mc-utils",
3
- "version": "3.1.0",
4
- "description": "This is template for map colonies typescript packages",
5
- "main": "./dist/index.js",
6
- "scripts": {
7
- "test:unit": "jest --config=./tests/configurations/unit/jest.config.js",
8
- "test:integration": "jest --config=./tests/configurations/integration/jest.config.js",
9
- "format": "prettier --check .",
10
- "format:fix": "prettier --write .",
11
- "prelint:fix": "npm run format:fix",
12
- "prelint": "npm run format",
13
- "lint": "eslint .",
14
- "lint:fix": "eslint --fix .",
15
- "release": "standard-version",
16
- "test": "npm run test:unit && npm run test:integration",
17
- "prebuild": "npm run clean",
18
- "build": "tsc --project tsconfig.build.json",
19
- "start": "npm run build && cd dist && node ./index.js",
20
- "clean": "rimraf dist",
21
- "prepack": "npm run build"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git+https://github.com/MapColonies/mc-utils.git"
26
- },
27
- "author": "MapColonies",
28
- "license": "ISC",
29
- "bugs": {
30
- "url": "https://github.com/MapColonies/mc-utils/issues"
31
- },
32
- "husky": {
33
- "hooks": {
34
- "pre-commit": "pretty-quick --staged",
35
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
36
- }
37
- },
38
- "files": [
39
- "dist/**/*"
40
- ],
41
- "homepage": "https://github.com/MapColonies/mc-utils#readme",
42
- "devDependencies": {
43
- "eslint": "^8.36.0",
44
- "commitlint": "^17.4.4",
45
- "@commitlint/cli": "^17.4.4",
46
- "@commitlint/config-conventional": "^17.4.4",
47
- "@map-colonies/eslint-config": "^3.1.3",
48
- "@map-colonies/prettier-config": "0.0.1",
49
- "@types/express": "^4.17.17",
50
- "@types/jest": "^29.4.0",
51
- "@types/lodash": "^4.14.171",
52
- "@types/ngeohash": "^0.6.3",
53
- "@types/node": "^14.14.12",
54
- "cz-conventional-changelog": "^3.3.0",
55
- "husky": "^8.0.3",
56
- "jest": "^29.5.0",
57
- "jest-create-mock-instance": "^2.0.0",
58
- "jest-html-reporters": "^3.1.4",
59
- "prettier": "^2.8.4",
60
- "pretty-quick": "^3.1.3",
61
- "standard-version": "^9.5.0",
62
- "ts-jest": "^29.0.5",
63
- "ts-node": "^9.1.1",
64
- "typedoc": "^0.22.18",
65
- "typescript": "^4.2.4"
66
- },
67
- "dependencies": {
68
- "@turf/turf": "^6.5.0",
69
- "axios": "^1.3.6",
70
- "axios-retry": "^3.4.0",
71
- "http-status-codes": "^2.2.0",
72
- "lodash": "^4.17.21",
73
- "ngeohash": "^0.6.3"
74
- },
75
- "peerDependencies": {
76
- "@map-colonies/error-types": "^1.1.5",
77
- "@map-colonies/js-logger": "^1.0.1"
78
- }
79
- }
1
+ {
2
+ "name": "@map-colonies/mc-utils",
3
+ "version": "3.3.0",
4
+ "description": "This is template for map colonies typescript packages",
5
+ "main": "./dist/index.js",
6
+ "scripts": {
7
+ "test:unit": "jest --config=./tests/configurations/unit/jest.config.js",
8
+ "test:integration": "jest --config=./tests/configurations/integration/jest.config.js",
9
+ "format": "prettier --check .",
10
+ "format:fix": "prettier --write .",
11
+ "prelint:fix": "npm run format:fix",
12
+ "prelint": "npm run format",
13
+ "lint": "eslint .",
14
+ "lint:fix": "eslint --fix .",
15
+ "release": "standard-version",
16
+ "test": "npm run test:unit && npm run test:integration",
17
+ "prebuild": "npm run clean",
18
+ "build": "tsc --project tsconfig.build.json",
19
+ "start": "npm run build && cd dist && node ./index.js",
20
+ "clean": "rimraf dist",
21
+ "prepack": "npm run build"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/MapColonies/mc-utils.git"
26
+ },
27
+ "author": "MapColonies",
28
+ "license": "ISC",
29
+ "bugs": {
30
+ "url": "https://github.com/MapColonies/mc-utils/issues"
31
+ },
32
+ "husky": {
33
+ "hooks": {
34
+ "pre-commit": "pretty-quick --staged",
35
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist/**/*"
40
+ ],
41
+ "homepage": "https://github.com/MapColonies/mc-utils#readme",
42
+ "devDependencies": {
43
+ "eslint": "^8.36.0",
44
+ "commitlint": "^17.4.4",
45
+ "@commitlint/cli": "^17.4.4",
46
+ "@commitlint/config-conventional": "^17.4.4",
47
+ "@map-colonies/eslint-config": "^3.1.3",
48
+ "@map-colonies/prettier-config": "0.0.1",
49
+ "@types/express": "^4.17.17",
50
+ "@types/jest": "^29.4.0",
51
+ "@types/lodash": "^4.14.171",
52
+ "@types/ngeohash": "^0.6.3",
53
+ "@types/node": "^14.14.12",
54
+ "cz-conventional-changelog": "^3.3.0",
55
+ "husky": "^8.0.3",
56
+ "jest": "^29.5.0",
57
+ "jest-create-mock-instance": "^2.0.0",
58
+ "jest-html-reporters": "^3.1.4",
59
+ "prettier": "^2.8.4",
60
+ "pretty-quick": "^3.1.3",
61
+ "standard-version": "^9.5.0",
62
+ "ts-jest": "^29.0.5",
63
+ "ts-node": "^9.1.1",
64
+ "typedoc": "^0.22.18",
65
+ "typescript": "^4.2.4"
66
+ },
67
+ "dependencies": {
68
+ "@turf/turf": "^6.5.0",
69
+ "axios": "^1.3.6",
70
+ "axios-retry": "^3.4.0",
71
+ "http-status-codes": "^2.2.0",
72
+ "lodash": "^4.17.21",
73
+ "ngeohash": "^0.6.3"
74
+ },
75
+ "peerDependencies": {
76
+ "@map-colonies/error-types": "^1.3.1",
77
+ "@map-colonies/js-logger": "^1.0.1"
78
+ }
79
+ }