@feardread/fear 1.0.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/FEAR.js +459 -0
- package/FEARServer.js +280 -0
- package/controllers/agent.js +438 -0
- package/controllers/auth/index.js +345 -0
- package/controllers/auth/token.js +50 -0
- package/controllers/blog.js +105 -0
- package/controllers/brand.js +10 -0
- package/controllers/cart.js +425 -0
- package/controllers/category.js +9 -0
- package/controllers/coupon.js +63 -0
- package/controllers/crud/crud.js +508 -0
- package/controllers/crud/index.js +36 -0
- package/controllers/email.js +34 -0
- package/controllers/enquiry.js +65 -0
- package/controllers/events.js +9 -0
- package/controllers/order.js +125 -0
- package/controllers/payment.js +31 -0
- package/controllers/product.js +147 -0
- package/controllers/review.js +247 -0
- package/controllers/tag.js +10 -0
- package/controllers/task.js +10 -0
- package/controllers/upload.js +41 -0
- package/controllers/user.js +401 -0
- package/index.js +7 -0
- package/libs/agent/index.js +561 -0
- package/libs/agent/modules/ai/ai.js +285 -0
- package/libs/agent/modules/ai/chat.js +518 -0
- package/libs/agent/modules/ai/config.js +688 -0
- package/libs/agent/modules/ai/operations.js +787 -0
- package/libs/agent/modules/analyze/api.js +546 -0
- package/libs/agent/modules/analyze/dorks.js +395 -0
- package/libs/agent/modules/ccard/README.md +454 -0
- package/libs/agent/modules/ccard/audit.js +479 -0
- package/libs/agent/modules/ccard/checker.js +674 -0
- package/libs/agent/modules/ccard/payment-processors.json +16 -0
- package/libs/agent/modules/ccard/validator.js +629 -0
- package/libs/agent/modules/code/analyzer.js +303 -0
- package/libs/agent/modules/code/jquery.js +1093 -0
- package/libs/agent/modules/code/react.js +1536 -0
- package/libs/agent/modules/code/refactor.js +499 -0
- package/libs/agent/modules/crypto/exchange.js +564 -0
- package/libs/agent/modules/net/proxy.js +409 -0
- package/libs/agent/modules/security/cve.js +442 -0
- package/libs/agent/modules/security/monitor.js +360 -0
- package/libs/agent/modules/security/scanner.js +300 -0
- package/libs/agent/modules/security/vulnerability.js +506 -0
- package/libs/agent/modules/security/web.js +465 -0
- package/libs/agent/modules/utils/browser.js +492 -0
- package/libs/agent/modules/utils/colorizer.js +285 -0
- package/libs/agent/modules/utils/manager.js +478 -0
- package/libs/cloud/index.js +228 -0
- package/libs/config/db.js +21 -0
- package/libs/config/validator.js +82 -0
- package/libs/db/index.js +318 -0
- package/libs/emailer/imap.js +126 -0
- package/libs/emailer/info.js +41 -0
- package/libs/emailer/smtp.js +77 -0
- package/libs/handler/async.js +3 -0
- package/libs/handler/error.js +66 -0
- package/libs/handler/index.js +161 -0
- package/libs/logger/index.js +49 -0
- package/libs/logger/morgan.js +24 -0
- package/libs/passport/passport.js +109 -0
- package/libs/search/api.js +384 -0
- package/libs/search/features.js +219 -0
- package/libs/search/service.js +64 -0
- package/libs/swagger/config.js +18 -0
- package/libs/swagger/index.js +35 -0
- package/libs/validator/index.js +254 -0
- package/models/blog.js +31 -0
- package/models/brand.js +12 -0
- package/models/cart.js +14 -0
- package/models/category.js +11 -0
- package/models/coupon.js +9 -0
- package/models/customer.js +0 -0
- package/models/enquiry.js +29 -0
- package/models/events.js +13 -0
- package/models/order.js +94 -0
- package/models/product.js +32 -0
- package/models/review.js +14 -0
- package/models/tag.js +10 -0
- package/models/task.js +11 -0
- package/models/user.js +68 -0
- package/package.json +12 -0
- package/routes/agent.js +615 -0
- package/routes/auth.js +13 -0
- package/routes/blog.js +19 -0
- package/routes/brand.js +15 -0
- package/routes/cart.js +105 -0
- package/routes/category.js +16 -0
- package/routes/coupon.js +15 -0
- package/routes/enquiry.js +14 -0
- package/routes/events.js +16 -0
- package/routes/mail.js +170 -0
- package/routes/order.js +19 -0
- package/routes/product.js +22 -0
- package/routes/review.js +11 -0
- package/routes/task.js +12 -0
- package/routes/user.js +17 -0
package/FEAR.js
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const express = require("express");
|
|
4
|
+
const compression = require("compression");
|
|
5
|
+
const cookieParser = require("cookie-parser");
|
|
6
|
+
const fileUpload = require("express-fileupload");
|
|
7
|
+
const cors = require("cors");
|
|
8
|
+
|
|
9
|
+
module.exports = FEAR = (() => {
|
|
10
|
+
// Private constants
|
|
11
|
+
const DEFAULT_PORT = 4000;
|
|
12
|
+
const DEFAULT_JSON_LIMIT = '10mb';
|
|
13
|
+
const DEFAULT_ROUTE_PATH = '/fear/api';
|
|
14
|
+
const AGENT_ROUTE_PATH = '/fear/api/agent';
|
|
15
|
+
|
|
16
|
+
// Constructor function
|
|
17
|
+
const FEAR = function() {
|
|
18
|
+
this.app = express();
|
|
19
|
+
this.Router = express.Router;
|
|
20
|
+
this.server = null;
|
|
21
|
+
this.registeredRouters = [];
|
|
22
|
+
this.env = null;
|
|
23
|
+
this.logger = null;
|
|
24
|
+
this.morgan = null;
|
|
25
|
+
this.cloud = null;
|
|
26
|
+
this.agentService = null;
|
|
27
|
+
this.agentWebInterface = null;
|
|
28
|
+
this.db = null;
|
|
29
|
+
this.handler = null;
|
|
30
|
+
this.validator = null;
|
|
31
|
+
this.logo = null;
|
|
32
|
+
this.origins = [];
|
|
33
|
+
this.corsConfig = null;
|
|
34
|
+
|
|
35
|
+
// Initialize
|
|
36
|
+
this.setupEnvironment();
|
|
37
|
+
this.setupDependencies();
|
|
38
|
+
this.setupMiddleware();
|
|
39
|
+
this.corsConfig = this.getCorsConfig();
|
|
40
|
+
this.setupRoutes();
|
|
41
|
+
//this.setupAiAgent();
|
|
42
|
+
//this.setupAgentWebInterface();
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// Consolidated prototype
|
|
46
|
+
FEAR.prototype = {
|
|
47
|
+
constructor: FEAR,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initialize AI Agent service
|
|
51
|
+
*/
|
|
52
|
+
setupAiAgent() {
|
|
53
|
+
const { getInstance } = require("./libs/agent");
|
|
54
|
+
|
|
55
|
+
if (!this.agentService) {
|
|
56
|
+
this.agentService = getInstance();
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Initialize Agent Web Interface
|
|
62
|
+
*/
|
|
63
|
+
setupAgentWebInterface() {
|
|
64
|
+
try {
|
|
65
|
+
const AgentWebInterface = require("./libs/agent");
|
|
66
|
+
|
|
67
|
+
this.agentWebInterface = new AgentWebInterface(this);
|
|
68
|
+
|
|
69
|
+
// Register agent routes
|
|
70
|
+
this.useRouter(
|
|
71
|
+
this.agentWebInterface.getRouter(),
|
|
72
|
+
AGENT_ROUTE_PATH
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
this.logger.info(`Agent Web Interface initialized at ${AGENT_ROUTE_PATH}`);
|
|
76
|
+
} catch (error) {
|
|
77
|
+
this.logger.error("Failed to initialize Agent Web Interface:", error);
|
|
78
|
+
this.logger.warn("Agent Web Interface will not be available");
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get AI Agent service instance
|
|
84
|
+
*/
|
|
85
|
+
getAiAgent() {
|
|
86
|
+
return this.agentService;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get Agent Web Interface instance
|
|
91
|
+
*/
|
|
92
|
+
getAgentWebInterface() {
|
|
93
|
+
return this.agentWebInterface;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Clear global FearRouter
|
|
98
|
+
*/
|
|
99
|
+
clearGlobal() {
|
|
100
|
+
delete global.FearRouter;
|
|
101
|
+
return this;
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get Express app instance
|
|
106
|
+
*/
|
|
107
|
+
getApp() {
|
|
108
|
+
return this.app;
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get logger instance
|
|
113
|
+
*/
|
|
114
|
+
getLogger() {
|
|
115
|
+
return this.logger;
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Get database instance
|
|
120
|
+
*/
|
|
121
|
+
getDatabase() {
|
|
122
|
+
return this.db;
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get environment configuration
|
|
127
|
+
*/
|
|
128
|
+
getEnvironment() {
|
|
129
|
+
return this.env;
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Get cloud service instance
|
|
134
|
+
*/
|
|
135
|
+
getCloud() {
|
|
136
|
+
return this.cloud;
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Get Express Router
|
|
141
|
+
*/
|
|
142
|
+
getRouter() {
|
|
143
|
+
return this.Router;
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Get validator instance
|
|
148
|
+
*/
|
|
149
|
+
getValidator() {
|
|
150
|
+
return this.validator;
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Get handler instance
|
|
155
|
+
*/
|
|
156
|
+
getHandler() {
|
|
157
|
+
return this.handler;
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Get CORS configuration
|
|
162
|
+
*/
|
|
163
|
+
getCorsConfigValue() {
|
|
164
|
+
return this.corsConfig;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Setup environment variables from .env file
|
|
169
|
+
*/
|
|
170
|
+
setupEnvironment() {
|
|
171
|
+
const envResult = require("dotenv").config({ path: ".env" });
|
|
172
|
+
|
|
173
|
+
if (!envResult || envResult.error) {
|
|
174
|
+
throw new Error(`Environment configuration error: ${envResult?.error?.message || 'Unknown error'}`);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
this.env = envResult.parsed;
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Setup core dependencies
|
|
182
|
+
*/
|
|
183
|
+
setupDependencies() {
|
|
184
|
+
this.logger = require("./libs/logger");
|
|
185
|
+
this.morgan = require("./libs/logger/morgan");
|
|
186
|
+
this.cloud = require("./libs/cloud");
|
|
187
|
+
this.db = require("./libs/db");
|
|
188
|
+
this.handler = require("./libs/handler");
|
|
189
|
+
this.validator = require("./libs/validator");
|
|
190
|
+
this.logo = this.env.FEAR_LOGO;
|
|
191
|
+
this.origins = this.getAllowedOrigins();
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Setup Express middleware
|
|
196
|
+
*/
|
|
197
|
+
setupMiddleware() {
|
|
198
|
+
this.app.set("PORT", this.env.NODE_PORT || DEFAULT_PORT);
|
|
199
|
+
|
|
200
|
+
this.app.use(this.morgan);
|
|
201
|
+
this.app.use(express.json({ limit: DEFAULT_JSON_LIMIT }));
|
|
202
|
+
this.app.use(compression());
|
|
203
|
+
this.app.use(fileUpload());
|
|
204
|
+
this.app.use(cookieParser());
|
|
205
|
+
|
|
206
|
+
// Request logging middleware
|
|
207
|
+
this.app.use((req, res, next) => {
|
|
208
|
+
this.logger.info(`FEAR API Query :: ${req.url}`);
|
|
209
|
+
res.locals.user = req.user;
|
|
210
|
+
next();
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Parse allowed origins from environment
|
|
216
|
+
*/
|
|
217
|
+
getAllowedOrigins() {
|
|
218
|
+
if (!this.env.ALLOWED_ORIGINS) return [];
|
|
219
|
+
|
|
220
|
+
return this.env.ALLOWED_ORIGINS
|
|
221
|
+
.split(',')
|
|
222
|
+
.map(origin => origin.trim())
|
|
223
|
+
.filter(origin => origin.length > 0);
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Get CORS configuration object
|
|
228
|
+
*/
|
|
229
|
+
getCorsConfig() {
|
|
230
|
+
return {
|
|
231
|
+
credentials: true,
|
|
232
|
+
origin: (origin, callback) => {
|
|
233
|
+
if (!origin) return callback(null, true);
|
|
234
|
+
|
|
235
|
+
if (this.origins.includes(origin)) {
|
|
236
|
+
callback(null, true);
|
|
237
|
+
} else {
|
|
238
|
+
this.logger.error(`Origin :: ${origin} :: Not allowed by CORS`);
|
|
239
|
+
callback(new Error("Not allowed by CORS"));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
},
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Auto-load routes from routes directory
|
|
247
|
+
*/
|
|
248
|
+
setupRoutes() {
|
|
249
|
+
const routesDir = path.join(__dirname, "routes");
|
|
250
|
+
|
|
251
|
+
if (!fs.existsSync(routesDir)) {
|
|
252
|
+
this.logger.warn(`Routes directory does not exist: ${routesDir}`);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
try {
|
|
257
|
+
const routeFiles = fs.readdirSync(routesDir)
|
|
258
|
+
.filter(file => file.endsWith('.js'));
|
|
259
|
+
|
|
260
|
+
routeFiles.forEach(file => {
|
|
261
|
+
try {
|
|
262
|
+
const routeName = file.replace(/\.js$/, '');
|
|
263
|
+
const routeModule = require(`./routes/${file}`);
|
|
264
|
+
const routePath = `${DEFAULT_ROUTE_PATH}/${routeName}`;
|
|
265
|
+
|
|
266
|
+
this.useRouter(routeModule(this), routePath);
|
|
267
|
+
|
|
268
|
+
} catch (error) {
|
|
269
|
+
this.logger.error(`Failed to load route ${file}:`, error);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
} catch (error) {
|
|
273
|
+
this.logger.error(`Failed to read routes directory:`, error);
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Register a single router
|
|
279
|
+
*/
|
|
280
|
+
useRouter(router, routePath = DEFAULT_ROUTE_PATH, corsOptions = null) {
|
|
281
|
+
if (!router || typeof router !== 'function') {
|
|
282
|
+
throw new Error('Router must be a valid Express router instance');
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const corsConfig = corsOptions || this.corsConfig;
|
|
286
|
+
|
|
287
|
+
const routerInfo = {
|
|
288
|
+
router,
|
|
289
|
+
path: routePath,
|
|
290
|
+
corsConfig
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
this.registeredRouters.push(routerInfo);
|
|
294
|
+
this.app.use(routePath, cors(corsConfig), router);
|
|
295
|
+
this.logger.info(`Single router registered :: ${routePath}`);
|
|
296
|
+
|
|
297
|
+
return this;
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Register multiple routers
|
|
302
|
+
*/
|
|
303
|
+
useRouters(routers) {
|
|
304
|
+
if (!Array.isArray(routers)) {
|
|
305
|
+
throw new Error('Routers must be an array');
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
routers.forEach(config => {
|
|
309
|
+
if (typeof config === 'function') {
|
|
310
|
+
this.useRouter(config);
|
|
311
|
+
} else if (config && config.router) {
|
|
312
|
+
this.useRouter(config.router, config.path, config.cors);
|
|
313
|
+
} else {
|
|
314
|
+
throw new Error('Invalid router configuration');
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
return this;
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Create a new router with FEAR utilities attached
|
|
323
|
+
*/
|
|
324
|
+
createRouter() {
|
|
325
|
+
const router = express.Router();
|
|
326
|
+
|
|
327
|
+
router.getLogger = () => this.logger;
|
|
328
|
+
router.getDatabase = () => this.db;
|
|
329
|
+
router.getCloud = () => this.cloud;
|
|
330
|
+
router.getEnvironment = () => this.env;
|
|
331
|
+
router.getHandler = () => this.handler;
|
|
332
|
+
router.getValidator = () => this.validator;
|
|
333
|
+
router.getAiAgent = () => this.agentService;
|
|
334
|
+
//router.getAgentWebInterface = () => this.agentWebInterface;
|
|
335
|
+
|
|
336
|
+
return router;
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Get list of registered routers
|
|
341
|
+
*/
|
|
342
|
+
getRegisteredRouters() {
|
|
343
|
+
return this.registeredRouters.map(info => ({
|
|
344
|
+
path: info.path,
|
|
345
|
+
corsEnabled: !!info.corsConfig
|
|
346
|
+
}));
|
|
347
|
+
},
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Start the HTTP server
|
|
351
|
+
*/
|
|
352
|
+
start(port = null) {
|
|
353
|
+
const serverPort = port || this.app.get("PORT") || DEFAULT_PORT;
|
|
354
|
+
|
|
355
|
+
return new Promise((resolve, reject) => {
|
|
356
|
+
this.server = this.app.listen(serverPort, (err) => {
|
|
357
|
+
if (err) {
|
|
358
|
+
this.logger.error(`Failed to start server on port ${serverPort}:`, err);
|
|
359
|
+
return reject(err);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
this.logger.info(`FEAR server started on port ${serverPort}`);
|
|
363
|
+
|
|
364
|
+
// Log agent interface status
|
|
365
|
+
if (this.agentWebInterface) {
|
|
366
|
+
this.logger.info(`Agent Web Interface available at ${AGENT_ROUTE_PATH}`);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
resolve(this.server);
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Gracefully shutdown the server
|
|
376
|
+
*/
|
|
377
|
+
shutdown() {
|
|
378
|
+
this.logger.info('Initiating graceful shutdown...');
|
|
379
|
+
|
|
380
|
+
return new Promise((resolve) => {
|
|
381
|
+
if (!this.server) {
|
|
382
|
+
this.logger.warn('No server instance to close.');
|
|
383
|
+
return resolve();
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
this.server.close((err) => {
|
|
387
|
+
if (err) {
|
|
388
|
+
this.logger.error('Error closing HTTP server:', err);
|
|
389
|
+
} else {
|
|
390
|
+
this.logger.info('HTTP server closed.');
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// Shutdown agent web interface
|
|
394
|
+
const agentShutdown = this.agentWebInterface &&
|
|
395
|
+
typeof this.agentWebInterface.shutdown === 'function' ?
|
|
396
|
+
this.agentWebInterface.shutdown() :
|
|
397
|
+
Promise.resolve();
|
|
398
|
+
|
|
399
|
+
agentShutdown
|
|
400
|
+
.then(() => {
|
|
401
|
+
return this.closeDatabase();
|
|
402
|
+
})
|
|
403
|
+
.then(() => {
|
|
404
|
+
this.logger.info('Database connections closed.');
|
|
405
|
+
this.logger.info('Graceful shutdown completed.');
|
|
406
|
+
resolve();
|
|
407
|
+
})
|
|
408
|
+
.catch((error) => {
|
|
409
|
+
this.logger.error('Error during shutdown:', error);
|
|
410
|
+
resolve();
|
|
411
|
+
});
|
|
412
|
+
});
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Close database connections
|
|
418
|
+
*/
|
|
419
|
+
closeDatabase() {
|
|
420
|
+
return new Promise((resolve, reject) => {
|
|
421
|
+
if (this.db && typeof this.db.disconnect === 'function') {
|
|
422
|
+
this.db.disconnect((err) => {
|
|
423
|
+
if (err) {
|
|
424
|
+
return reject(err);
|
|
425
|
+
}
|
|
426
|
+
resolve();
|
|
427
|
+
});
|
|
428
|
+
} else {
|
|
429
|
+
resolve();
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
},
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Set FEAR utilities as global
|
|
436
|
+
*/
|
|
437
|
+
setAsGlobal() {
|
|
438
|
+
global.FearRouter = {
|
|
439
|
+
createRouter: () => this.createRouter(),
|
|
440
|
+
getLogger: () => this.logger,
|
|
441
|
+
getDatabase: () => this.db,
|
|
442
|
+
getEnvironment: () => this.env,
|
|
443
|
+
getCloud: () => this.cloud,
|
|
444
|
+
getAiAgent: () => this.agentService,
|
|
445
|
+
getAgentWebInterface: () => this.agentWebInterface
|
|
446
|
+
};
|
|
447
|
+
return this;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
return FEAR;
|
|
452
|
+
})();
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Factory function to create new FEAR instance
|
|
456
|
+
*/
|
|
457
|
+
exports.FearFactory = () => {
|
|
458
|
+
return new FEAR();
|
|
459
|
+
};
|