Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-controller

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-controller - npm Package Compare versions

Comparing version 0.1.13 to 0.1.14

11

app.js

@@ -10,12 +10,7 @@ "use strict";

if (config.autoLoad) {
[].concat(config.dir).forEach(dir => {
if (!path.isAbsolute(dir)) {
dir = path.join(app.baseDir, dir);
}
if (fs.existsSync(dir)) {
util_1.loadDir(dir).forEach(file => require(file));
}
});
[].concat(config.dir)
.map(dir => path.isAbsolute(dir) ? dir : path.join(app.baseDir, dir))
.forEach(dir => fs.existsSync(dir) && util_1.loadDir(dir).forEach(file => require(file)));
}
register_1.registerRoute(app);
};

@@ -1,1 +0,1 @@

export declare function genAPISDK(projectPath: string): Promise<void>;
export declare function genAPISDK(baseDir: string): Promise<void>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const egg_mock_1 = require("egg-mock");
const path = require("path");
const meta_1 = require("../meta");
function genAPISDK(projectPath) {
const utils = require('egg-utils');
function genAPISDK(baseDir) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const app = egg_mock_1.default.app({ baseDir: projectPath });
const framework = utils.getFrameworkPath({ baseDir });
const egg = require(framework);
const app = new egg.Application();
const config = app.config.controller;
yield meta_1.genAPISDKByPath(config.dir, config.SDKDir, config.templatePath);
yield Promise.all([].concat(config.dir)
.map(dir => path.isAbsolute(dir) ? dir : path.join(app.baseDir, dir))
.map((dir) => tslib_1.__awaiter(this, void 0, void 0, function* () { return meta_1.genAPISDKByPath(dir, config.SDKDir, config.templatePath); })));
console.log('[egg-controller] gen api sdk.');

@@ -12,0 +17,0 @@ });

@@ -15,2 +15,3 @@ "use strict";

gen_sdk_1.genAPISDK(baseDir)
.then(_ => process.exit(0))
.catch(error => console.log('Gen Error:\n', error));

@@ -17,0 +18,0 @@ });

{
"name": "egg-controller",
"version": "0.1.13",
"version": "0.1.14",
"description": "controller for egg.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc