@mrtujiawei/bin
Advanced tools
Comparing version 1.2.13 to 1.2.14
@@ -11,3 +11,3 @@ #!/bin/env node | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "https", "fs", "path", "koa", "koa-static", "koa-router", "koa-bodyparser", "@mrtujiawei/node-utils", "./utils"], factory); | ||
define(["require", "exports", "https", "fs", "path", "koa", "koa-static", "koa-router", "@koa/cors", "koa-bodyparser", "@mrtujiawei/node-utils", "./utils"], factory); | ||
} | ||
@@ -23,2 +23,3 @@ })(function (require, exports) { | ||
const koa_router_1 = __importDefault(require("koa-router")); | ||
const cors_1 = __importDefault(require("@koa/cors")); | ||
const koa_bodyparser_1 = __importDefault(require("koa-bodyparser")); | ||
@@ -51,2 +52,3 @@ const node_utils_1 = require("@mrtujiawei/node-utils"); | ||
server | ||
.use((0, cors_1.default)()) | ||
.use((0, koa_bodyparser_1.default)()) | ||
@@ -53,0 +55,0 @@ .use((0, koa_static_1.default)(config.directory)) |
{ | ||
"name": "@mrtujiawei/bin", | ||
"version": "1.2.13", | ||
"version": "1.2.14", | ||
"description": "我的命令行工具", | ||
@@ -36,2 +36,3 @@ "main": "", | ||
"dependencies": { | ||
"@koa/cors": "^3.3.0", | ||
"@mrtujiawei/node-utils": "0.1.10", | ||
@@ -54,2 +55,3 @@ "@mrtujiawei/utils": "^2.2.0", | ||
"@types/koa-static": "^4.0.2", | ||
"@types/koa__cors": "^3.3.0", | ||
"@types/node": "^17.0.9", | ||
@@ -56,0 +58,0 @@ "typescript": "^4.5.4" |
@@ -9,2 +9,3 @@ #!/bin/env node | ||
import Router from 'koa-router'; | ||
import cors from '@koa/cors'; | ||
import bodyParser from 'koa-bodyparser'; | ||
@@ -43,2 +44,3 @@ import { getIps, getFormattedArgs } from '@mrtujiawei/node-utils'; | ||
server | ||
.use(cors()) | ||
.use(bodyParser()) | ||
@@ -45,0 +47,0 @@ .use(Static(config.directory)) |
Sorry, the diff of this file is not supported yet
36959
561
7
6
+ Added@koa/cors@^3.3.0
+ Added@koa/cors@3.4.3(transitive)