Comparing version 1.0.5 to 1.0.6-canary.3
@@ -6,3 +6,3 @@ "use strict"; | ||
const core_1 = require("@plumier/core"); | ||
const koa_1 = tslib_1.__importDefault(require("koa")); | ||
const koa_1 = (0, tslib_1.__importDefault)(require("koa")); | ||
const path_1 = require("path"); | ||
@@ -35,3 +35,3 @@ class Plumier { | ||
set(config) { | ||
if (core_1.hasKeyOf(config, "setup")) { | ||
if ((0, core_1.hasKeyOf)(config, "setup")) { | ||
config.setup(this); | ||
@@ -51,3 +51,3 @@ this.config.facilities.push(config); | ||
if (this.config.rootDir === "__UNSET__") | ||
this.config.rootDir = path_1.dirname(require.main.filename); | ||
this.config.rootDir = (0, path_1.dirname)(require.main.filename); | ||
//pre initialize | ||
@@ -68,6 +68,6 @@ for (const facility of this.config.facilities) { | ||
if (this.config.mode === "debug") { | ||
core_1.printAnalysis(core_1.analyzeRoutes(routes, this.config)); | ||
(0, core_1.printAnalysis)((0, core_1.analyzeRoutes)(routes, this.config)); | ||
} | ||
const actionRoutes = routes.filter((x) => x.kind === "ActionRoute"); | ||
this.koa.use(core_1.router(actionRoutes, this.config)); | ||
this.koa.use((0, core_1.router)(actionRoutes, this.config)); | ||
this.koa.proxy = this.config.trustProxyHeader; | ||
@@ -74,0 +74,0 @@ return this.koa; |
@@ -5,8 +5,8 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const cors_1 = tslib_1.__importDefault(require("@koa/cors")); | ||
const cors_1 = (0, tslib_1.__importDefault)(require("@koa/cors")); | ||
const core_1 = require("@plumier/core"); | ||
const generic_controller_1 = require("@plumier/generic-controller"); | ||
const chalk_1 = tslib_1.__importDefault(require("chalk")); | ||
const koa_body_1 = tslib_1.__importDefault(require("koa-body")); | ||
const qs_1 = tslib_1.__importDefault(require("qs")); | ||
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk")); | ||
const koa_body_1 = (0, tslib_1.__importDefault)(require("koa-body")); | ||
const qs_1 = (0, tslib_1.__importDefault)(require("qs")); | ||
function createQuery(queryString, extra) { | ||
@@ -52,4 +52,4 @@ const parsed = qs_1.default.parse(queryString); | ||
const { controller } = app.config; | ||
const controllers = await core_1.generateRoutes(controller, Object.assign(Object.assign({}, app.config), this.opt)); | ||
const generics = await generic_controller_1.generateGenericControllerRoutes(controller, Object.assign(Object.assign({}, app.config), this.opt)); | ||
const controllers = await (0, core_1.generateRoutes)(controller, Object.assign(Object.assign({}, app.config), this.opt)); | ||
const generics = await (0, generic_controller_1.generateGenericControllerRoutes)(controller, Object.assign(Object.assign({}, app.config), this.opt)); | ||
return [...controllers, ...generics]; | ||
@@ -60,11 +60,11 @@ } | ||
const option = Object.assign({}, this.opt); | ||
if ((_a = option.forceHttps) !== null && _a !== void 0 ? _a : core_1.toBoolean(process.env.PLUM_FORCE_HTTPS || "__none")) { | ||
if ((_a = option.forceHttps) !== null && _a !== void 0 ? _a : (0, core_1.toBoolean)(process.env.PLUM_FORCE_HTTPS || "__none")) { | ||
app.use(new ForceHttpsMiddleware()); | ||
} | ||
app.koa.use(koa_body_1.default(option.bodyParser)); | ||
app.koa.use((0, koa_body_1.default)(option.bodyParser)); | ||
if (typeof option.cors !== "boolean" && option.cors) { | ||
app.koa.use(cors_1.default(option.cors)); | ||
app.koa.use((0, cors_1.default)(option.cors)); | ||
} | ||
else if (option.cors) { | ||
app.koa.use(cors_1.default()); | ||
app.koa.use((0, cors_1.default)()); | ||
} | ||
@@ -163,4 +163,4 @@ if (option.dependencyResolver) | ||
const controller = this.option.controller; | ||
const controllers = await core_1.generateRoutes(controller, Object.assign(Object.assign({}, app.config), this.option)); | ||
const generics = await generic_controller_1.generateGenericControllerRoutes(controller, Object.assign(Object.assign({}, app.config), this.option)); | ||
const controllers = await (0, core_1.generateRoutes)(controller, Object.assign(Object.assign({}, app.config), this.option)); | ||
const generics = await (0, generic_controller_1.generateGenericControllerRoutes)(controller, Object.assign(Object.assign({}, app.config), this.option)); | ||
return [...controllers, ...generics]; | ||
@@ -167,0 +167,0 @@ } |
@@ -39,3 +39,3 @@ "use strict"; | ||
Object.defineProperty(exports, "ControllerBuilder", { enumerable: true, get: function () { return generic_controller_1.ControllerBuilder; } }); | ||
tslib_1.__exportStar(require("./facility"), exports); | ||
(0, tslib_1.__exportStar)(require("./facility"), exports); | ||
var query_parser_1 = require("@plumier/query-parser"); | ||
@@ -42,0 +42,0 @@ Object.defineProperty(exports, "filterParser", { enumerable: true, get: function () { return query_parser_1.filterParser; } }); |
@@ -5,5 +5,5 @@ "use strict"; | ||
const core_1 = require("@plumier/core"); | ||
const bytes_1 = tslib_1.__importDefault(require("bytes")); | ||
const bytes_1 = (0, tslib_1.__importDefault)(require("bytes")); | ||
function validateSize(opt, val, msg) { | ||
const expected = (typeof opt === "string") ? bytes_1.default(opt) : opt; | ||
const expected = (typeof opt === "string") ? (0, bytes_1.default)(opt) : opt; | ||
if (val > expected) | ||
@@ -10,0 +10,0 @@ return msg !== null && msg !== void 0 ? msg : "File size exceed the limit allowed"; |
{ | ||
"name": "plumier", | ||
"version": "1.0.5", | ||
"version": "1.0.6-canary.3+b235819", | ||
"description": "Delightful Node.js Rest Framework", | ||
@@ -22,8 +22,8 @@ "main": "lib/index.js", | ||
"@koa/cors": "^3.1.0", | ||
"@plumier/core": "^1.0.5", | ||
"@plumier/generic-controller": "^1.0.5", | ||
"@types/bytes": "^3.1.0", | ||
"@types/koa": "^2.13.3", | ||
"@types/koa__cors": "^3.0.2", | ||
"@types/qs": "^6.9.6", | ||
"@plumier/core": "1.0.6-canary.3+b235819", | ||
"@plumier/generic-controller": "1.0.6-canary.3+b235819", | ||
"@types/bytes": "^3.1.1", | ||
"@types/koa": "^2.13.4", | ||
"@types/koa__cors": "^3.0.3", | ||
"@types/qs": "^6.9.7", | ||
"bytes": "^3.1.0", | ||
@@ -47,3 +47,3 @@ "koa": "^2.13.1", | ||
}, | ||
"gitHead": "5f6d204483657909bac31851522176b2b500e583" | ||
"gitHead": "b2358195477eaafb0654e92c8605bc1ecf7a8350" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29689
2
1
+ Added@types/express-serve-static-core@5.0.1(transitive)
+ Added@types/node@22.9.1(transitive)
- Removed@plumier/core@1.1.3(transitive)
- Removed@plumier/generic-controller@1.1.3(transitive)
- Removed@plumier/reflect@1.1.3(transitive)
- Removed@plumier/validator@1.1.3(transitive)
- Removed@types/acorn@4.0.6(transitive)
- Removed@types/debug@4.1.12(transitive)
- Removed@types/estree@1.0.6(transitive)
- Removed@types/express-serve-static-core@5.0.2(transitive)
- Removed@types/glob@7.2.0(transitive)
- Removed@types/minimatch@5.1.2(transitive)
- Removed@types/ms@0.7.34(transitive)
- Removed@types/node@22.9.3(transitive)
- Removed@types/validator@13.12.2(transitive)
- Removedacorn@8.8.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedinflight@1.0.6(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-to-regexp@6.3.0(transitive)
- Removedreflect-metadata@0.1.14(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtslib@2.8.1(transitive)
- Removedvalidator@13.12.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updated@types/bytes@^3.1.1
Updated@types/koa@^2.13.4
Updated@types/koa__cors@^3.0.3
Updated@types/qs@^6.9.7