5htp-core 0.6.0-65 → 0.6.0-71

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.6.0-65",
4
+ "version": "0.6.0-71",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp-core.git",
7
7
  "license": "MIT",
@@ -286,7 +286,8 @@ export default class Console {
286
286
  public async createBugReport( error: Error | CoreError | Anomaly, request?: ServerRequest ) {
287
287
 
288
288
  // Print error
289
- this.logger.error(LogPrefix, `Sending bug report for the following error:`, error);
289
+ const originalError = ('originalError' in error && error.originalError) ? error.originalError : error;
290
+ this.logger.error(LogPrefix, `Sending bug report for the following error:`, error, originalError);
290
291
  /*const youchRes = new Youch(error, {});
291
292
  const jsonResponse = await youchRes.toJSON()
292
293
  console.log( forTerminal(jsonResponse, {
@@ -371,8 +372,8 @@ export default class Console {
371
372
  } : {}),
372
373
 
373
374
  // Error
374
- error,
375
- stacktrace: error.stack || error.message,
375
+ error: originalError,
376
+ stacktrace: (originalError.stack || originalError.message || error.stack || error.message) as string,
376
377
  logs
377
378
  }
378
379
 
@@ -0,0 +1,42 @@
1
+
2
+ import type { Prisma } from '@models/types';
3
+ import * as runtime from '@/var/prisma/runtime/library.js';
4
+
5
+ export default class Facet<
6
+ D extends {
7
+ findMany(args?: any): Promise<any>
8
+ findFirst(args?: any): Promise<any>
9
+ },
10
+ S extends (...a: any[]) => Prisma.ProspectContactLeadFindFirstArgs,
11
+ R
12
+ > {
13
+ constructor(
14
+ private readonly delegate: D,
15
+ private readonly subset: S,
16
+
17
+ /* the **ONLY** line that changed ↓↓↓ */
18
+ private readonly transform: (
19
+ row: runtime.Types.Result.GetResult<
20
+ Prisma.$ProspectContactLeadPayload,
21
+ ReturnType<S>,
22
+ 'findMany'
23
+ >[number]
24
+ ) => R,
25
+ ) { }
26
+
27
+ public findMany(
28
+ ...args: Parameters<S>
29
+ ): Promise<R[]> {
30
+ return this.delegate
31
+ .findMany(this.subset(...args))
32
+ .then(rows => rows.map(this.transform))
33
+ }
34
+
35
+ public findFirst(
36
+ ...args: Parameters<S>
37
+ ): Promise<R | null> {
38
+ return this.delegate
39
+ .findFirst(this.subset(...args))
40
+ .then(result => result ? this.transform(result) : null)
41
+ }
42
+ }
@@ -13,6 +13,10 @@ declare type With<
13
13
  TAdditionnal
14
14
  )
15
15
 
16
+ declare type NonNullFields<T, K extends keyof T> = Omit<T, K> & {
17
+ [P in K]: NonNullable<T[P]>;
18
+ };
19
+
16
20
  declare type ValueOf<T> = T[keyof T];
17
21
 
18
22
  // Extrait la valeur de retour d'une promise
package/types/icons.d.ts CHANGED
@@ -1 +1 @@
1
- export type TIcones = "long-arrow-right"|"times"|"solid/spinner-third"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"rocket"|"chart-bar"|"planet-ringed"|"user-circle"|"brands/linkedin"|"crosshairs"|"plus-circle"|"comments-alt"|"arrow-right"|"user-shield"|"shield-alt"|"chart-line"|"money-bill-wave"|"star"|"link"|"file-alt"|"long-arrow-left"|"at"|"search"|"lightbulb"|"magnet"|"calendar-alt"|"paper-plane"|"angle-up"|"angle-down"|"user-plus"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"key"|"user"|"envelope"|"plus"|"solid/crown"|"brands/discord"|"pen"|"file"|"binoculars"|"times-circle"|"info-circle"|"check-circle"|"exclamation-circle"|"check"|"arrow-left"|"meh-rolling-eyes"|"trash"|"solid/star"|"solid/star-half-alt"|"regular/star"|"chevron-left"|"cog"|"power-off"|"usd-circle"|"users"|"home"|"home-alt"|"trophy"|"bars"|"question-circle"|"plane-departure"|"brands/whatsapp"|"wind"|"play"|"minus-circle"|"external-link"|"map-marker-alt"|"clock"|"arrow-to-bottom"|"ellipsis-h"|"exclamation-triangle"|"magic"|"globe"|"industry"|"briefcase"|"map-marker"|"calendar"|"fire"|"building"|"graduation-cap"|"unlink"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"code"|"font"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"|"solid/magic"
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"|"chart-bar"|"crosshairs"|"user-shield"|"shield-alt"|"chart-line"|"money-bill-wave"|"star"|"link"|"file-alt"|"long-arrow-left"|"plus-circle"|"comments-alt"|"arrow-right"|"at"|"calendar-alt"|"paper-plane"|"search"|"lightbulb"|"magnet"|"solid/crown"|"brands/discord"|"pen"|"plus"|"file"|"envelope"|"user-plus"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"angle-up"|"angle-down"|"key"|"user"|"binoculars"|"times-circle"|"info-circle"|"check-circle"|"exclamation-circle"|"check"|"users"|"bug"|"arrow-left"|"meh-rolling-eyes"|"bars"|"trash"|"solid/star"|"solid/star-half-alt"|"regular/star"|"chevron-left"|"cog"|"power-off"|"play"|"minus-circle"|"plane-departure"|"brands/whatsapp"|"wind"|"external-link"|"arrow-to-bottom"|"question-circle"|"map-marker-alt"|"clock"|"ellipsis-h"|"broom"|"exclamation-triangle"|"solid/magic"|"briefcase"|"map-marker"|"fire"|"industry"|"calendar"|"magic"|"globe"|"minus"|"building"|"graduation-cap"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"code"|"unlink"|"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"