mythix 2.7.4 → 2.8.1
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 +1 -1
- package/src/application.js +1 -1
- package/src/cli/cli-utils.js +1 -1
- package/src/controllers/controller-module.js +1 -1
- package/src/http-server/http-server-module.js +1 -1
- package/src/models/model-module.js +1 -1
- package/src/modules/base-module.d.ts +1 -1
- package/src/modules/database-module.js +1 -1
- package/src/modules/file-watcher-module.js +1 -1
- package/src/tasks/task-module.js +1 -1
package/package.json
CHANGED
package/src/application.js
CHANGED
|
@@ -177,7 +177,7 @@ class Application extends EventEmitter {
|
|
|
177
177
|
|
|
178
178
|
for (let i = 0, il = modules.length; i < il; i++) {
|
|
179
179
|
let ModuleClass = modules[i];
|
|
180
|
-
if (typeof ModuleClass.shouldUse === 'function' && ModuleClass.shouldUse.call(this, options) === false)
|
|
180
|
+
if (typeof ModuleClass.shouldUse === 'function' && ModuleClass.shouldUse.call(ModuleClass, this, options) === false)
|
|
181
181
|
continue;
|
|
182
182
|
|
|
183
183
|
let moduleInstance = new ModuleClass(this);
|
package/src/cli/cli-utils.js
CHANGED
|
@@ -253,7 +253,7 @@ function defineCommand(_commandName, definer, _parent) {
|
|
|
253
253
|
applicationConfig = Nife.extend(true, { cli: true, httpServer: false, autoReload: false, logger: { level: Logger.LEVEL_WARN }, runTasks: false }, applicationConfig);
|
|
254
254
|
|
|
255
255
|
if (!applicationConfig)
|
|
256
|
-
applicationConfig = { cli: true,
|
|
256
|
+
applicationConfig = { cli: true, httpServer: false, autoReload: false, logger: { level: Logger.LEVEL_WARN }, runTasks: false };
|
|
257
257
|
|
|
258
258
|
let doStartApplication = (applicationConfig.autoStart !== false);
|
|
259
259
|
|
|
@@ -5,7 +5,7 @@ const { BaseModule } = require('../modules/base-module');
|
|
|
5
5
|
const { HTTPServer } = require('./http-server');
|
|
6
6
|
|
|
7
7
|
class HTTPServerModule extends BaseModule {
|
|
8
|
-
static shouldUse(options) {
|
|
8
|
+
static shouldUse(application, options) {
|
|
9
9
|
if (options.httpServer === false)
|
|
10
10
|
return false;
|
|
11
11
|
|
|
@@ -11,7 +11,7 @@ export declare class BaseModule {
|
|
|
11
11
|
public declare static fileWatcherQueueName: string;
|
|
12
12
|
|
|
13
13
|
public static getModuleName(): string;
|
|
14
|
-
public static shouldUse(options
|
|
14
|
+
public static shouldUse(application: Application, options: GenericObject): boolean;
|
|
15
15
|
|
|
16
16
|
public fileWatcherGetMonitorPaths(options?: GenericObject): Array<string>;
|
|
17
17
|
public fileWatcherHandler(options?: GenericObject): Promise<void>;
|