@pbvision/fastify-firestore-service 0.0.8 → 0.0.10
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/package.json +3 -2
- package/src/api/api.js +3 -12
- package/src/make-logger.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pbvision/fastify-firestore-service",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Web Framework using Fastify and Firestore ORM",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"fastify": "^4.10.0",
|
|
48
48
|
"fastify-plugin": "^4.5.1",
|
|
49
49
|
"got": "^14.0.0",
|
|
50
|
-
"pino": "8.17.2",
|
|
51
50
|
"word-wrap": "^1.2.3"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
@@ -61,6 +60,7 @@
|
|
|
61
60
|
"eslint-config-standard": "17.1.0",
|
|
62
61
|
"eslint-import-resolver-webpack": "^0.13.8",
|
|
63
62
|
"eslint-plugin-import": "^2.22.0",
|
|
63
|
+
"eslint-plugin-n": "^16.6.2",
|
|
64
64
|
"eslint-plugin-node": "^11.1.0",
|
|
65
65
|
"eslint-plugin-promise": "^6.0.0",
|
|
66
66
|
"eslint-plugin-standard": "^5.0.0",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"license-webpack-plugin": "^4.0.2",
|
|
70
70
|
"nodemon": "^3.0.2",
|
|
71
71
|
"standard": "^17.1.0",
|
|
72
|
+
"superagent": "^8",
|
|
72
73
|
"superagent-defaults": "^0.1.14",
|
|
73
74
|
"supertest": "^6.3.3",
|
|
74
75
|
"tui-jsdoc-template": "^1.2.2",
|
package/src/api/api.js
CHANGED
|
@@ -117,15 +117,6 @@ class API {
|
|
|
117
117
|
return undefined
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
/**
|
|
121
|
-
* Returns the full HTTP path to this API.
|
|
122
|
-
* @param {String} service The service this API belongs to.
|
|
123
|
-
* @public
|
|
124
|
-
*/
|
|
125
|
-
static getFullPath (service) {
|
|
126
|
-
return `/${service}${this.PATH}`
|
|
127
|
-
}
|
|
128
|
-
|
|
129
120
|
/* istanbul ignore next */
|
|
130
121
|
/**
|
|
131
122
|
* A human-readable description of what this API does. It is only used when
|
|
@@ -482,14 +473,14 @@ class API {
|
|
|
482
473
|
* @package
|
|
483
474
|
*/
|
|
484
475
|
static registerAPI (registrar) {
|
|
485
|
-
const { app
|
|
476
|
+
const { app } = registrar
|
|
486
477
|
if (this.setup) {
|
|
487
478
|
app.register(this.setup)
|
|
488
479
|
}
|
|
489
480
|
const cls = this
|
|
490
481
|
app.register(async (fastify) => {
|
|
491
482
|
try {
|
|
492
|
-
await cls.registerAPIWithFastify(fastify, cls.
|
|
483
|
+
await cls.registerAPIWithFastify(fastify, cls.PATH)
|
|
493
484
|
} catch (e) {
|
|
494
485
|
if (e instanceof assert.AssertionError) {
|
|
495
486
|
e.message = `${cls.name}: ${e.message}`
|
|
@@ -502,7 +493,7 @@ class API {
|
|
|
502
493
|
if (this.CORS_ORIGIN) {
|
|
503
494
|
// create an OPTIONS method API to support CORS preflight requests from
|
|
504
495
|
// browsers
|
|
505
|
-
const path = cls.
|
|
496
|
+
const path = cls.PATH
|
|
506
497
|
const { params, querystring } = cls.swaggerSchema
|
|
507
498
|
const schema = { hide: true, params, querystring }
|
|
508
499
|
app.options(path, { schema: pruneUndefined(schema) },
|