5htp-core 0.5.9-8 → 0.5.9-9
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp-core",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.5.9-
|
|
4
|
+
"version": "0.5.9-9",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp-core.git",
|
|
7
7
|
"license": "MIT",
|
package/server/app/index.ts
CHANGED
|
@@ -13,10 +13,10 @@ import ServicesContainer, {
|
|
|
13
13
|
ServicesContainer as ServicesContainerClass,
|
|
14
14
|
TServiceMetas
|
|
15
15
|
} from './service/container';
|
|
16
|
-
import type { ServerBug } from './container/console';
|
|
17
16
|
|
|
18
17
|
// Built-in
|
|
19
18
|
import type { default as Router, Request as ServerRequest, TRoute } from '@server/services/router';
|
|
19
|
+
import { Anomaly } from '@common/errors';
|
|
20
20
|
|
|
21
21
|
export { default as Services } from './service/container';
|
|
22
22
|
export type { TEnvConfig as Environment } from './container/config';
|
|
@@ -116,6 +116,12 @@ export abstract class Application<
|
|
|
116
116
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
public report(...anomalyArgs: ConstructorParameters<typeof Anomaly>) {
|
|
120
|
+
return this.container.Console.createBugReport(
|
|
121
|
+
new Anomaly(...anomalyArgs)
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
119
125
|
/*----------------------------------
|
|
120
126
|
- COMMANDS
|
|
121
127
|
----------------------------------*/
|
|
@@ -7,6 +7,7 @@ import type { Application } from "..";
|
|
|
7
7
|
import type { Command } from "../commands";
|
|
8
8
|
import type { TServiceMetas } from './container';
|
|
9
9
|
import type { TControllerDefinition, TRoute } from '../../services/router';
|
|
10
|
+
import { Anomaly } from "@common/errors";
|
|
10
11
|
|
|
11
12
|
export { default as schema } from 'zod';
|
|
12
13
|
|
|
@@ -182,13 +183,7 @@ export default abstract class Service<
|
|
|
182
183
|
//this.config.debug && console.info(`[hook] Run all ${name} hook (${callbacks.length}).`);
|
|
183
184
|
return Promise.all(
|
|
184
185
|
callbacks.map(
|
|
185
|
-
cb => cb(...args)
|
|
186
|
-
|
|
187
|
-
if (name !== 'error')
|
|
188
|
-
this.runHook('error', e);
|
|
189
|
-
else
|
|
190
|
-
console.error(`[hook] Error while executing hook ${name}:`, e);
|
|
191
|
-
})
|
|
186
|
+
cb => cb(...args)
|
|
192
187
|
)
|
|
193
188
|
).then(() => {
|
|
194
189
|
//this.config.debug && console.info(`[hook] Hooks ${name} executed with success.`);
|
|
@@ -410,15 +410,15 @@ export default class ServerRouter
|
|
|
410
410
|
this
|
|
411
411
|
);
|
|
412
412
|
|
|
413
|
-
// Hook
|
|
414
|
-
await this.runHook('request', request);
|
|
415
|
-
|
|
416
413
|
// Create request context so we can access request context across all the request-triggered libs
|
|
417
414
|
context.run({ channelType: 'request', channelId: requestId }, async () => {
|
|
418
415
|
|
|
419
416
|
let response: ServerResponse<this>;
|
|
420
417
|
try {
|
|
421
418
|
|
|
419
|
+
// Hook
|
|
420
|
+
await this.runHook('request', request);
|
|
421
|
+
|
|
422
422
|
// Bulk API Requests
|
|
423
423
|
if (request.path === '/api' && typeof request.data.fetchers === "object") {
|
|
424
424
|
|
package/types/icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TIcones = "times"|"solid/spinner-third"|"long-arrow-right"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"planet-ringed"|"brands/linkedin"|"
|
|
1
|
+
export type TIcones = "times"|"solid/spinner-third"|"long-arrow-right"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"rocket"|"planet-ringed"|"brands/linkedin"|"user-circle"|"crosshairs"|"plus-circle"|"comments-alt"|"arrow-right"|"user-shield"|"shield-alt"|"chart-line"|"money-bill-wave"|"star"|"link"|"file-alt"|"long-arrow-left"|"chart-bar"|"at"|"calendar-alt"|"paper-plane"|"search"|"lightbulb"|"magnet"|"angle-up"|"angle-down"|"solid/crown"|"brands/discord"|"pen"|"plus"|"file"|"key"|"user"|"user-plus"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"envelope"|"times-circle"|"globe"|"industry"|"users"|"briefcase"|"check-circle"|"magic"|"map-marker-alt"|"solid/magic"|"angle-right"|"save"|"binoculars"|"info-circle"|"exclamation-circle"|"check"|"arrow-left"|"trash"|"meh-rolling-eyes"|"bars"|"solid/star"|"solid/star-half-alt"|"regular/star"|"chevron-left"|"cog"|"power-off"|"play"|"minus-circle"|"plane-departure"|"brands/whatsapp"|"wind"|"external-link"|"question-circle"|"clock"|"arrow-to-bottom"|"ellipsis-h"|"usd-circle"|"stream"|"home-alt"|"trophy"|"map-marker"|"language"|"calendar"|"fire"|"redo"|"building"|"unlink"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"code"|"font"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"
|