@wisemen/coordinates 0.0.2

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/README.md ADDED
File without changes
@@ -0,0 +1,8 @@
1
+ import { CoordinatesCommand } from './coordinates.command.js';
2
+ export declare class CoordinatesCommandBuilder {
3
+ private point;
4
+ constructor();
5
+ withLatitude(lat: number): CoordinatesCommandBuilder;
6
+ withLongitude(long: number): CoordinatesCommandBuilder;
7
+ build(): CoordinatesCommand;
8
+ }
@@ -0,0 +1,21 @@
1
+ import { CoordinatesCommand } from './coordinates.command.js';
2
+ export class CoordinatesCommandBuilder {
3
+ point;
4
+ constructor() {
5
+ this.point = new CoordinatesCommand();
6
+ this.point.latitude = 50.894565509367055;
7
+ this.point.longitude = 5.420593668305642;
8
+ }
9
+ withLatitude(lat) {
10
+ this.point.latitude = lat;
11
+ return this;
12
+ }
13
+ withLongitude(long) {
14
+ this.point.longitude = long;
15
+ return this;
16
+ }
17
+ build() {
18
+ return this.point;
19
+ }
20
+ }
21
+ //# sourceMappingURL=coordinates-command.builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates-command.builder.js","sourceRoot":"","sources":["../lib/coordinates-command.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE7D,MAAM,OAAO,yBAAyB;IAC5B,KAAK,CAAoB;IAEjC;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,kBAAkB,EAAE,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,kBAAkB,CAAA;QACxC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,iBAAiB,CAAA;IAC1C,CAAC;IAED,YAAY,CAAE,GAAW;QACvB,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAA;QAEzB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,aAAa,CAAE,IAAY;QACzB,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;QAE3B,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ import { Coordinates } from './coordinates.js';
2
+ export declare class CoordinatesCommand {
3
+ longitude: number;
4
+ latitude: number;
5
+ toCoordinates(): Coordinates;
6
+ }
@@ -0,0 +1,38 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { ApiProperty } from '@nestjs/swagger';
11
+ import { IsLatitude, IsLongitude, IsNumber } from 'class-validator';
12
+ import { Coordinates } from './coordinates.js';
13
+ export class CoordinatesCommand {
14
+ longitude;
15
+ latitude;
16
+ toCoordinates() {
17
+ return new Coordinates(this.latitude, this.longitude);
18
+ }
19
+ }
20
+ __decorate([
21
+ ApiProperty({
22
+ type: Number,
23
+ example: 5.420593668305642
24
+ }),
25
+ IsNumber(),
26
+ IsLongitude(),
27
+ __metadata("design:type", Number)
28
+ ], CoordinatesCommand.prototype, "longitude", void 0);
29
+ __decorate([
30
+ ApiProperty({
31
+ type: Number,
32
+ example: 50.894565509367055
33
+ }),
34
+ IsNumber(),
35
+ IsLatitude(),
36
+ __metadata("design:type", Number)
37
+ ], CoordinatesCommand.prototype, "latitude", void 0);
38
+ //# sourceMappingURL=coordinates.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.command.js","sourceRoot":"","sources":["../lib/coordinates.command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,MAAM,OAAO,kBAAkB;IAO7B,SAAS,CAAQ;IAQjB,QAAQ,CAAQ;IAEhB,aAAa;QACX,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACvD,CAAC;CACF;AAbC;IANC,WAAW,CAAC;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IACD,QAAQ,EAAE;IACV,WAAW,EAAE;;qDACG;AAQjB;IANC,WAAW,CAAC;QACX,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,kBAAkB;KAC5B,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;oDACG"}
@@ -0,0 +1,9 @@
1
+ import { Point } from 'typeorm';
2
+ export declare class Coordinates {
3
+ readonly latitude: number;
4
+ readonly longitude: number;
5
+ constructor(point: Point);
6
+ constructor(latitude: number, longitude: number);
7
+ toPoint(): Point;
8
+ equals(other: Coordinates): boolean;
9
+ }
@@ -0,0 +1,31 @@
1
+ import { isLatLong, isObject } from 'class-validator';
2
+ export class Coordinates {
3
+ latitude;
4
+ longitude;
5
+ constructor(pointOrLatitude, longitude) {
6
+ let latitude;
7
+ if (isObject(pointOrLatitude)) {
8
+ latitude = pointOrLatitude.coordinates[1];
9
+ longitude = pointOrLatitude.coordinates[0];
10
+ }
11
+ else {
12
+ latitude = pointOrLatitude;
13
+ longitude = longitude;
14
+ }
15
+ if (!isLatLong(`${latitude},${longitude}`)) {
16
+ throw new Error(`${latitude},${longitude} are not valid coordinates`);
17
+ }
18
+ this.latitude = latitude;
19
+ this.longitude = longitude;
20
+ }
21
+ toPoint() {
22
+ return {
23
+ type: 'Point',
24
+ coordinates: [this.longitude, this.latitude]
25
+ };
26
+ }
27
+ equals(other) {
28
+ return this.latitude === other.latitude && this.longitude === other.longitude;
29
+ }
30
+ }
31
+ //# sourceMappingURL=coordinates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.js","sourceRoot":"","sources":["../lib/coordinates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAGrD,MAAM,OAAO,WAAW;IACN,QAAQ,CAAQ;IAChB,SAAS,CAAQ;IAIjC,YAAa,eAA+B,EAAE,SAAkB;QAC9D,IAAI,QAAgB,CAAA;QACpB,IAAI,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;YAC9B,QAAQ,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;YACzC,SAAS,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QAC5C,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,eAAe,CAAA;YAC1B,SAAS,GAAG,SAAmB,CAAA;QACjC,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,IAAI,SAAS,4BAA4B,CAAC,CAAA;QACvE,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,OAAO;QACL,OAAO;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC;SAC7C,CAAA;IACH,CAAC;IAED,MAAM,CAAE,KAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;IAC/E,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ import { Coordinates } from './coordinates.js';
2
+ export declare class CoordinatesResponse {
3
+ longitude: number;
4
+ latitude: number;
5
+ constructor(coordinates: Coordinates);
6
+ }
@@ -0,0 +1,27 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { ApiProperty } from '@nestjs/swagger';
11
+ export class CoordinatesResponse {
12
+ longitude;
13
+ latitude;
14
+ constructor(coordinates) {
15
+ this.longitude = coordinates.longitude;
16
+ this.latitude = coordinates.latitude;
17
+ }
18
+ }
19
+ __decorate([
20
+ ApiProperty({ type: Number }),
21
+ __metadata("design:type", Number)
22
+ ], CoordinatesResponse.prototype, "longitude", void 0);
23
+ __decorate([
24
+ ApiProperty({ type: Number }),
25
+ __metadata("design:type", Number)
26
+ ], CoordinatesResponse.prototype, "latitude", void 0);
27
+ //# sourceMappingURL=coordinates.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.response.js","sourceRoot":"","sources":["../lib/coordinates.response.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAG7C,MAAM,OAAO,mBAAmB;IAE9B,SAAS,CAAQ;IAGjB,QAAQ,CAAQ;IAEhB,YAAa,WAAwB;QACnC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAA;IACtC,CAAC;CACF;AATC;IADC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACb;AAGjB;IADC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDACd"}
@@ -0,0 +1,4 @@
1
+ export * from './coordinates.js';
2
+ export * from './coordinates.command.js';
3
+ export * from './coordinates-command.builder.js';
4
+ export * from './coordinates.response.js';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './coordinates.js';
2
+ export * from './coordinates.command.js';
3
+ export * from './coordinates-command.builder.js';
4
+ export * from './coordinates.response.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,kCAAkC,CAAA;AAChD,cAAc,2BAA2B,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ import { describe, it } from 'node:test';
2
+ import { expect } from 'expect';
3
+ import { Coordinates } from '../coordinates.js';
4
+ describe('Coordinates', () => {
5
+ it('throws an error when -Infinity latitude is provided to the constructor', () => {
6
+ expect(() => new Coordinates(-Infinity, 0)).toThrow();
7
+ });
8
+ it('throws an error when NaN latitude is provided to the constructor', () => {
9
+ expect(() => new Coordinates(NaN, 0)).toThrow();
10
+ });
11
+ it('throws an error when less than 90 latitude is provided to the constructor', () => {
12
+ expect(() => new Coordinates(-90.1, 0)).toThrow();
13
+ });
14
+ it('throws an error when more than 90 latitude is provided to the constructor', () => {
15
+ expect(() => new Coordinates(90.1, 0)).toThrow();
16
+ });
17
+ it('throws an error when Infinity latitude is provided to the constructor', () => {
18
+ expect(() => new Coordinates(Infinity, 0)).toThrow();
19
+ });
20
+ it('Creates a new Coordinates instance with the maximum latitude', () => {
21
+ expect(() => new Coordinates(90, 0)).not.toThrow();
22
+ });
23
+ it('Creates a new Coordinates instance with the minimum latitude', () => {
24
+ expect(() => new Coordinates(-90, 0)).not.toThrow();
25
+ });
26
+ it('Creates a new Coordinates instance with valid coordinates', () => {
27
+ expect(() => new Coordinates(0, 0)).not.toThrow();
28
+ });
29
+ it('throws an error when -Infinity longitude is provided to the constructor', () => {
30
+ expect(() => new Coordinates(0, -Infinity)).toThrow();
31
+ });
32
+ it('throws an error when NaN longitude is provided to the constructor', () => {
33
+ expect(() => new Coordinates(0, NaN)).toThrow();
34
+ });
35
+ it('throws an error when less than 180 longitude is provided to the constructor', () => {
36
+ expect(() => new Coordinates(0, -180.1)).toThrow();
37
+ });
38
+ it('throws an error when more than 180 longitude is provided to the constructor', () => {
39
+ expect(() => new Coordinates(0, 180.1)).toThrow();
40
+ });
41
+ it('throws an error when Infinity longitude is provided to the constructor', () => {
42
+ expect(() => new Coordinates(0, Infinity)).toThrow();
43
+ });
44
+ it('Creates a new Coordinates instance with the maximum longitude', () => {
45
+ expect(() => new Coordinates(0, 180)).not.toThrow();
46
+ });
47
+ it('Creates a new Coordinates instance with the minimum longitude', () => {
48
+ expect(() => new Coordinates(0, -180)).not.toThrow();
49
+ });
50
+ it('Maps Coordinates to a GeoJSON point', () => {
51
+ const coordinates = new Coordinates(50.894565509367055, 5.420593668305642);
52
+ const point = coordinates.toPoint();
53
+ expect(point).toStrictEqual({
54
+ type: 'Point',
55
+ coordinates: [5.420593668305642, 50.894565509367055]
56
+ });
57
+ });
58
+ it('Creates coordinates from a GeoJSON point', () => {
59
+ const point = {
60
+ type: 'Point',
61
+ coordinates: [5.420593668305642, 50.894565509367055]
62
+ };
63
+ const coordinates = new Coordinates(point);
64
+ expect(coordinates.latitude).toBe(50.894565509367055);
65
+ expect(coordinates.longitude).toBe(5.420593668305642);
66
+ });
67
+ it('Returns true when comparing the same locations', () => {
68
+ const coordinates = new Coordinates(50.894565509367055, 5.420593668305642);
69
+ const otherCoordinates = new Coordinates(50.894565509367055, 5.420593668305642);
70
+ expect(coordinates.equals(otherCoordinates)).toBe(true);
71
+ });
72
+ it('Returns true when comparing to self', () => {
73
+ const coordinates = new Coordinates(50.894565509367055, 5.420593668305642);
74
+ expect(coordinates.equals(coordinates)).toBe(true);
75
+ });
76
+ it('Returns false when comparing to other coordinates', () => {
77
+ const coordinates = new Coordinates(50.894565509367055, 5.420593668305642);
78
+ const otherCoordinates = new Coordinates(50, 5);
79
+ expect(coordinates.equals(otherCoordinates)).toBe(false);
80
+ });
81
+ });
82
+ //# sourceMappingURL=coordinates.unit.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinates.unit.test.js","sourceRoot":"","sources":["../../lib/tests/coordinates.unit.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;QAChF,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;IACjD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;QACnF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,GAAG,EAAE;QAC3D,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAA;QAC1E,MAAM,gBAAgB,GAAG,IAAI,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC1D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@wisemen/coordinates",
3
+ "version": "0.0.2",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
+ "type": "module",
7
+ "files": [
8
+ "dist/"
9
+ ],
10
+ "scripts": {
11
+ "lint": "eslint lib",
12
+ "prebuild": "rm -rf ./dist",
13
+ "clean": "rm -rf ./dist",
14
+ "build": "tsc",
15
+ "pretest": "npm run clean && npm run build",
16
+ "test": "node --test",
17
+ "prerelease": "npm run build",
18
+ "release": "release-it"
19
+ },
20
+ "dependencies": {
21
+ "class-validator": "^0.14.0",
22
+ "typeorm": "^0.3.20",
23
+ "@nestjs/swagger": "^11.0.3"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20.2.5",
27
+ "expect": "^29.5.0",
28
+ "typescript": "^5.0.4",
29
+ "release-it": "^15.11.0"
30
+ },
31
+ "author": "Kobe Kwanten",
32
+ "license": "GPL",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git@github.com:wisemen-digital/node-core.git"
36
+ }
37
+ }