@loopback/example-todo 5.0.1 → 5.1.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/CHANGELOG.md +11 -0
- package/dist/__tests__/.http-cache/content-v2/sha512/{dd/d8/43ed04e765d7117a06016dac0be7f1560906bb4877b48254d167ee892fe0863ae0e3c00e1c3728985f3acf8a0e4931f5813999a6a4912d3ee375274c9740 → 44/64/3846b1b2a664d4fcd871377ec5d90a737a3ec98984add8bb693f6c32964c421492010dc9e37cd259f8bd0a0efd190f390352d6825894fe7dd931b82914d0} +1 -1
- package/dist/__tests__/.http-cache/index-v5/aa/8c/4c46dde270664199f12b62caf43bb1312fcc7fa68d4bfa1f059926d4a7fc +2 -2
- package/dist/__tests__/.http-cache/index-v5/e0/02/a74f0e3768a83cd7c38f719da156961f4aaa49febea917c0da9f9dfd779f +1 -1
- package/dist/__tests__/helpers.d.ts +2 -2
- package/dist/__tests__/helpers.js +5 -5
- package/dist/__tests__/helpers.js.map +1 -1
- package/dist/__tests__/integration/services/geocoder.service.integration.js +2 -2
- package/dist/__tests__/integration/services/geocoder.service.integration.js.map +1 -1
- package/package.json +15 -15
- package/src/__tests__/helpers.ts +4 -4
- package/src/__tests__/integration/services/geocoder.service.integration.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.1.0](https://github.com/loopbackio/loopback-next/compare/@loopback/example-todo@5.0.1...@loopback/example-todo@5.1.0) (2022-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* update @types/node to v12 ([65a09a4](https://github.com/loopbackio/loopback-next/commit/65a09a406e4865f774f97b58af9e616733b8b255))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [5.0.1](https://github.com/loopbackio/loopback-next/compare/@loopback/example-todo@5.0.0...@loopback/example-todo@5.0.1) (2022-01-11)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @loopback/example-todo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"result":{"input":{"benchmark":{"id":"4","benchmarkName":"Public_AR_Current","benchmarkDescription":"Public Address Ranges - Current Benchmark","isDefault":false},"address":{"address":"1 New Orchard Road, Armonk, 10504"}},"addressMatches":[{"matchedAddress":"1 NEW ORCHARD RD, ARMONK, NY, 10504","coordinates":{"x":-73.
|
|
1
|
+
{"result":{"input":{"benchmark":{"id":"4","benchmarkName":"Public_AR_Current","benchmarkDescription":"Public Address Ranges - Current Benchmark","isDefault":false},"address":{"address":"1 New Orchard Road, Armonk, 10504"}},"addressMatches":[{"matchedAddress":"1 NEW ORCHARD RD, ARMONK, NY, 10504","coordinates":{"x":-73.72466,"y":41.109657},"tigerLine":{"tigerLineId":"139823557","side":"L"},"addressComponents":{"fromAddress":"1","toAddress":"99","preQualifier":"NEW","preDirection":"","preType":"","streetName":"ORCHARD","suffixType":"RD","suffixDirection":"","suffixQualifier":"","city":"ARMONK","state":"NY","zip":"10504"}}]}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
e60b6dbb3f1621195cd7507586c5f7955280ea44 {"key":"GET https://geocoding.geo.census.gov/geocoder/locations/onelineaddress?format=json&benchmark=Public_AR_Current&address=1%20New%20Orchard%20Road%2C%20Armonk%2C%2010504","integrity":"sha512-RGQ4RrGypmTU/NhxN37F2Qpzej7JiYSt2LtpP2wylkxCFJIBDcnjfNJZ+L0KDv0ZDzkDUtaCWJT+fdkxuCkU0A==","time":1644870912148,"size":630,"metadata":{"statusCode":200,"headers":{"cache-control":"private, no-store, no-store","date":"Mon, 14 Feb 2022 20:35:10 GMT","content-type":"application/json","strict-transport-security":"max-age=31536000; includeSubDomains","x-oracle-dms-rid":"0","x-content-type-options":"nosniff","x-oracle-dms-ecid":"621bcf77-e6b6-4c5d-8309-20773e836b2c-01084074","content-language":"en-US","x-xss-protection":"1;mode=block","x-frame-options":"Deny","connection":"close","vary":"Origin","transfer-encoding":"chunked"},"createdAt":1644870912135}}
|
|
3
|
+
42b37ee973f51a1fb51a32a15bd031db85cebdf5 {"key":"GET https://geocoding.geo.census.gov/geocoder/locations/onelineaddress?format=json&benchmark=Public_AR_Current&address=1%20New%20Orchard%20Road%2C%20Armonk%2C%2010504","integrity":"sha512-RGQ4RrGypmTU/NhxN37F2Qpzej7JiYSt2LtpP2wylkxCFJIBDcnjfNJZ+L0KDv0ZDzkDUtaCWJT+fdkxuCkU0A==","time":1644870912231,"size":630,"metadata":{"statusCode":200,"headers":{"cache-control":"private, no-store, no-store","date":"Mon, 14 Feb 2022 20:35:11 GMT","content-type":"application/json","strict-transport-security":"max-age=31536000; includeSubDomains","x-oracle-dms-rid":"0","x-content-type-options":"nosniff","x-oracle-dms-ecid":"c875ba62-ea46-4d7d-acff-ecc14a1e3c7b-010be65a","content-language":"en-US","x-xss-protection":"1;mode=block","x-frame-options":"Deny","connection":"close","vary":"Origin","transfer-encoding":"chunked"},"createdAt":1644870912207}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
938a10f1a851b304be756dc1fad15e59e2015aae {"key":"GET https://geocoding.geo.census.gov/geocoder/locations/onelineaddress?format=json&benchmark=Public_AR_Current&address=this%20address%20does%20not%20exist","integrity":"sha512-LZHejgDZyaOL2Y+wl8G08gxpE7D/gxiLomO8CQbC9p3RKLdIZgvFqdc0DtF5p4vm0xyUKjwLIVzeol6m6Pp5Hg==","time":1644870913464,"size":238,"metadata":{"statusCode":200,"headers":{"cache-control":"private, no-store, no-store","date":"Mon, 14 Feb 2022 20:35:13 GMT","content-type":"application/json","strict-transport-security":"max-age=31536000; includeSubDomains","x-oracle-dms-rid":"0","x-content-type-options":"nosniff","x-oracle-dms-ecid":"c875ba62-ea46-4d7d-acff-ecc14a1e3c7b-010be697","content-language":"en-US","x-xss-protection":"1;mode=block","x-frame-options":"Deny","connection":"close","vary":"Origin","transfer-encoding":"chunked"},"createdAt":1644870913457}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpCachingProxy } from '@loopback/http-caching-proxy';
|
|
2
|
-
import { Todo } from '../models
|
|
3
|
-
import { Geocoder, GeoPoint } from '../services
|
|
2
|
+
import { Todo } from '../models';
|
|
3
|
+
import { Geocoder, GeoPoint } from '../services';
|
|
4
4
|
export declare function givenTodo(todo?: Partial<Todo>): Todo;
|
|
5
5
|
export declare const aLocation: {
|
|
6
6
|
address: string;
|
|
@@ -10,8 +10,8 @@ const http_caching_proxy_1 = require("@loopback/http-caching-proxy");
|
|
|
10
10
|
Object.defineProperty(exports, "HttpCachingProxy", { enumerable: true, get: function () { return http_caching_proxy_1.HttpCachingProxy; } });
|
|
11
11
|
const lodash_1 = require("lodash");
|
|
12
12
|
const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const datasources_1 = require("../datasources");
|
|
14
|
+
const models_1 = require("../models");
|
|
15
15
|
/*
|
|
16
16
|
==============================================================================
|
|
17
17
|
HELPER FUNCTIONS
|
|
@@ -42,18 +42,18 @@ function givenTodo(todo) {
|
|
|
42
42
|
desc: 'There are some things that need doing',
|
|
43
43
|
isComplete: false,
|
|
44
44
|
}, todo);
|
|
45
|
-
return new
|
|
45
|
+
return new models_1.Todo(data);
|
|
46
46
|
}
|
|
47
47
|
exports.givenTodo = givenTodo;
|
|
48
48
|
exports.aLocation = {
|
|
49
49
|
address: '1 New Orchard Road, Armonk, 10504',
|
|
50
|
-
geopoint: { y: 41.
|
|
50
|
+
geopoint: { y: 41.109657, x: -73.72466 },
|
|
51
51
|
get geostring() {
|
|
52
52
|
return `${this.geopoint.y},${this.geopoint.x}`;
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
function getProxiedGeoCoderConfig(proxy) {
|
|
56
|
-
return (0, lodash_1.merge)({},
|
|
56
|
+
return (0, lodash_1.merge)({}, datasources_1.GeocoderDataSource.defaultConfig, {
|
|
57
57
|
options: {
|
|
58
58
|
proxy: proxy.url,
|
|
59
59
|
tunnel: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/__tests__/helpers.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sCAAsC;AACtC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qEAA8D;AA4DtD,iGA5DA,qCAAgB,OA4DA;AA3DxB,mCAA6B;AAC7B,6DAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/__tests__/helpers.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sCAAsC;AACtC,+CAA+C;AAC/C,gEAAgE;;;;AAEhE,qEAA8D;AA4DtD,iGA5DA,qCAAgB,OA4DA;AA3DxB,mCAA6B;AAC7B,6DAAwB;AACxB,gDAAkD;AAClD,sCAA+B;AAG/B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,SAAS,CAAC,IAAoB;IAC5C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CACxB;QACE,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,uCAAuC;QAC7C,UAAU,EAAE,KAAK;KAClB,EACD,IAAI,CACL,CAAC;IACF,OAAO,IAAI,aAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAVD,8BAUC;AAEY,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,mCAAmC;IAC5C,QAAQ,EAAY,EAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAC;IAChD,IAAI,SAAS;QACX,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IACjD,CAAC;CACF,CAAC;AAEF,SAAgB,wBAAwB,CAAC,KAAuB;IAC9D,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,gCAAkB,CAAC,aAAa,EAAE;QACjD,OAAO,EAAE;YACP,KAAK,EAAE,KAAK,CAAC,GAAG;YAChB,MAAM,EAAE,KAAK;SACd;KACF,CAAC,CAAC;AACL,CAAC;AAPD,4DAOC;AAGM,KAAK,UAAU,iBAAiB;IACrC,MAAM,KAAK,GAAG,IAAI,qCAAgB,CAAC;QACjC,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC;QACjD,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,IAAI;KACd,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC;AARD,8CAQC;AAEM,KAAK,UAAU,0BAA0B,CAAC,OAAiB;IAChE,IAAI;QACF,MAAM,OAAO,CAAC,OAAO,CAAC,iBAAS,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,GAAG,EAAE;QACZ,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,EAAE;YAC1B,OAAO,KAAK,CAAC;SACd;QACD,MAAM,GAAG,CAAC;KACX;AACH,CAAC;AAVD,gEAUC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const testlab_1 = require("@loopback/testlab");
|
|
8
|
-
const
|
|
8
|
+
const datasources_1 = require("../../../datasources");
|
|
9
9
|
const services_1 = require("../../../services");
|
|
10
10
|
const helpers_1 = require("../../helpers");
|
|
11
11
|
describe('GeoLookupService', function () {
|
|
@@ -27,7 +27,7 @@ describe('GeoLookupService', function () {
|
|
|
27
27
|
});
|
|
28
28
|
async function givenGeoService() {
|
|
29
29
|
const config = (0, helpers_1.getProxiedGeoCoderConfig)(cachingProxy);
|
|
30
|
-
const dataSource = new
|
|
30
|
+
const dataSource = new datasources_1.GeocoderDataSource(config);
|
|
31
31
|
service = await new services_1.GeocoderProvider(dataSource).value();
|
|
32
32
|
}
|
|
33
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geocoder.service.integration.js","sourceRoot":"","sources":["../../../../src/__tests__/integration/services/geocoder.service.integration.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sCAAsC;AACtC,+CAA+C;AAC/C,gEAAgE;;AAEhE,+CAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"geocoder.service.integration.js","sourceRoot":"","sources":["../../../../src/__tests__/integration/services/geocoder.service.integration.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sCAAsC;AACtC,+CAA+C;AAC/C,gEAAgE;;AAEhE,+CAAyC;AACzC,sDAAwD;AACxD,gDAA6D;AAC7D,2CAMuB;AAEvB,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IAExB,IAAI,YAA8B,CAAC;IACnC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,YAAY,GAAG,MAAM,IAAA,2BAAiB,GAAE,CAAC,CAAC,CAAC;IAC/D,KAAK,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;IAEjC,IAAI,OAAiB,CAAC;IACtB,MAAM,CAAC,eAAe,CAAC,CAAC;IAExB,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,SAAS,GAAG,MAAM,IAAA,oCAA0B,EAAC,OAAO,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK;QAC5C,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QAEnC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,mBAAS,CAAC,OAAO,CAAC,CAAC;QAExD,IAAA,gBAAM,EAAC,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,mBAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,KAAK,UAAU,eAAe;QAC5B,MAAM,MAAM,GAAG,IAAA,kCAAwB,EAAC,YAAY,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,gCAAkB,CAAC,MAAM,CAAC,CAAC;QAClD,OAAO,GAAG,MAAM,IAAI,2BAAgB,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAC;IAC3D,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/example-todo",
|
|
3
3
|
"description": "Tutorial example on how to build an application with LoopBack 4",
|
|
4
|
-
"version": "5.0
|
|
4
|
+
"version": "5.1.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"loopback",
|
|
7
7
|
"LoopBack",
|
|
@@ -51,27 +51,27 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@loopback/boot": "^4.0
|
|
55
|
-
"@loopback/core": "^3.0
|
|
56
|
-
"@loopback/repository": "^4.0
|
|
57
|
-
"@loopback/rest": "^11.0
|
|
58
|
-
"@loopback/rest-explorer": "^4.0
|
|
59
|
-
"@loopback/service-proxy": "^4.0
|
|
54
|
+
"@loopback/boot": "^4.1.0",
|
|
55
|
+
"@loopback/core": "^3.1.0",
|
|
56
|
+
"@loopback/repository": "^4.1.0",
|
|
57
|
+
"@loopback/rest": "^11.1.0",
|
|
58
|
+
"@loopback/rest-explorer": "^4.1.0",
|
|
59
|
+
"@loopback/service-proxy": "^4.1.0",
|
|
60
60
|
"loopback-connector-rest": "^4.0.1",
|
|
61
61
|
"morgan": "^1.10.0",
|
|
62
62
|
"tslib": "^2.3.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@loopback/build": "^8.0
|
|
66
|
-
"@loopback/eslint-config": "^12.0.
|
|
67
|
-
"@loopback/http-caching-proxy": "^3.0
|
|
68
|
-
"@loopback/testlab": "^4.0
|
|
65
|
+
"@loopback/build": "^8.1.0",
|
|
66
|
+
"@loopback/eslint-config": "^12.0.2",
|
|
67
|
+
"@loopback/http-caching-proxy": "^3.1.0",
|
|
68
|
+
"@loopback/testlab": "^4.1.0",
|
|
69
69
|
"@types/lodash": "^4.14.178",
|
|
70
70
|
"@types/morgan": "^1.9.3",
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"eslint": "^8.
|
|
71
|
+
"@types/node": "^12.20.43",
|
|
72
|
+
"eslint": "^8.8.0",
|
|
73
73
|
"lodash": "^4.17.21",
|
|
74
|
-
"typescript": "~4.5.
|
|
74
|
+
"typescript": "~4.5.5"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "e16818ccb01edc0269ef6c45b022c5f1b67f852c"
|
|
77
77
|
}
|
package/src/__tests__/helpers.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import {HttpCachingProxy} from '@loopback/http-caching-proxy';
|
|
7
7
|
import {merge} from 'lodash';
|
|
8
8
|
import path from 'path';
|
|
9
|
-
import {GeocoderDataSource} from '../datasources
|
|
10
|
-
import {Todo} from '../models
|
|
11
|
-
import {Geocoder, GeoPoint} from '../services
|
|
9
|
+
import {GeocoderDataSource} from '../datasources';
|
|
10
|
+
import {Todo} from '../models';
|
|
11
|
+
import {Geocoder, GeoPoint} from '../services';
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
==============================================================================
|
|
@@ -48,7 +48,7 @@ export function givenTodo(todo?: Partial<Todo>) {
|
|
|
48
48
|
|
|
49
49
|
export const aLocation = {
|
|
50
50
|
address: '1 New Orchard Road, Armonk, 10504',
|
|
51
|
-
geopoint: <GeoPoint>{y: 41.
|
|
51
|
+
geopoint: <GeoPoint>{y: 41.109657, x: -73.72466},
|
|
52
52
|
get geostring() {
|
|
53
53
|
return `${this.geopoint.y},${this.geopoint.x}`;
|
|
54
54
|
},
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
6
|
import {expect} from '@loopback/testlab';
|
|
7
|
-
import {GeocoderDataSource} from '../../../datasources
|
|
7
|
+
import {GeocoderDataSource} from '../../../datasources';
|
|
8
8
|
import {Geocoder, GeocoderProvider} from '../../../services';
|
|
9
9
|
import {
|
|
10
10
|
aLocation,
|