@express-tools/oas 0.0.2 → 0.0.3
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/bin/index.js +5 -5
- package/bin/response.js +1 -1
- package/bin/router.js +1 -1
- package/bin/validation.js +1 -1
- package/package.json +2 -2
package/bin/index.js
CHANGED
|
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.validation = exports.router = exports.response = exports.documentation = exports.definition = void 0;
|
|
7
|
-
const definition_ts_1 = __importDefault(require("./definition.
|
|
7
|
+
const definition_ts_1 = __importDefault(require("./definition.js"));
|
|
8
8
|
exports.definition = definition_ts_1.default;
|
|
9
|
-
const documentation_ts_1 = __importDefault(require("./documentation.
|
|
9
|
+
const documentation_ts_1 = __importDefault(require("./documentation.js"));
|
|
10
10
|
exports.documentation = documentation_ts_1.default;
|
|
11
|
-
const response_ts_1 = __importDefault(require("./response.
|
|
11
|
+
const response_ts_1 = __importDefault(require("./response.js"));
|
|
12
12
|
exports.response = response_ts_1.default;
|
|
13
|
-
const router_ts_1 = __importDefault(require("./router.
|
|
13
|
+
const router_ts_1 = __importDefault(require("./router.js"));
|
|
14
14
|
exports.router = router_ts_1.default;
|
|
15
|
-
const validation_ts_1 = __importDefault(require("./validation.
|
|
15
|
+
const validation_ts_1 = __importDefault(require("./validation.js"));
|
|
16
16
|
exports.validation = validation_ts_1.default;
|
package/bin/response.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = response;
|
|
4
4
|
const swagger_route_validator_1 = require("swagger-route-validator");
|
|
5
|
-
const utils_ts_1 = require("./utils.
|
|
5
|
+
const utils_ts_1 = require("./utils.js");
|
|
6
6
|
function response() {
|
|
7
7
|
function OASResponse(req, res, next) {
|
|
8
8
|
if (!req.route)
|
package/bin/router.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = router;
|
|
4
|
-
const utils_ts_1 = require("./utils.
|
|
4
|
+
const utils_ts_1 = require("./utils.js");
|
|
5
5
|
function router(expressApp, spec) {
|
|
6
6
|
let scanned = false;
|
|
7
7
|
// Store a working copy of the spec in express app
|
package/bin/validation.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = validate;
|
|
4
4
|
const swagger_route_validator_1 = require("swagger-route-validator");
|
|
5
|
-
const utils_ts_1 = require("./utils.
|
|
5
|
+
const utils_ts_1 = require("./utils.js");
|
|
6
6
|
function validate() {
|
|
7
7
|
function OASValidation(req, res, next) {
|
|
8
8
|
if (!req.route)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@express-tools/oas",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "OpenAPI plugin for express",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "bin/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"typings": "types.d.ts",
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "rm -rf ./bin && mkdir ./bin && tsc --project ./tsconfig.json",
|
|
34
|
+
"build": "rm -rf ./bin && mkdir ./bin && tsc --project ./tsconfig.json && find ./bin -name '*.js' -exec sed -i \"s/\\.ts'/\\.js'/g; s/\\.ts\\\"/\\.js\\\"/g\" {} \\;",
|
|
35
35
|
"test:unit": "node --test src/*.test.ts",
|
|
36
36
|
"test:integration": "node --test tests/integration/*.test.ts",
|
|
37
37
|
"test": "npm run test:unit && npm run test:integration",
|