electron-injector 1.1.4 → 1.1.6
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/dist/index.cjs +6 -5
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +4 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
Controller: () => Controller,
|
|
38
38
|
ControllerIsNotValid: () => ControllerIsNotValid,
|
|
39
39
|
Ctx: () => Ctx,
|
|
40
|
+
DEV_LOGGER: () => DEV_LOGGER,
|
|
40
41
|
DataValidationError: () => DataValidationError,
|
|
41
42
|
ElectronInjectorError: () => ElectronInjectorError,
|
|
42
43
|
Event: () => Event,
|
|
@@ -46,6 +47,7 @@ __export(index_exports, {
|
|
|
46
47
|
IsNotExceptionFilter: () => IsNotExceptionFilter,
|
|
47
48
|
OnInvoke: () => OnInvoke,
|
|
48
49
|
OnSend: () => OnSend,
|
|
50
|
+
PROD_LOGGER: () => PROD_LOGGER,
|
|
49
51
|
Payload: () => Payload,
|
|
50
52
|
ProviderIsNotInjectable: () => ProviderIsNotInjectable,
|
|
51
53
|
ProviderNotFound: () => ProviderNotFound,
|
|
@@ -262,11 +264,8 @@ var Container = class {
|
|
|
262
264
|
var import_debug = __toESM(require("debug"), 1);
|
|
263
265
|
var prodLogger = (0, import_debug.default)("app:prod");
|
|
264
266
|
var devLogger = (0, import_debug.default)("app:dev");
|
|
265
|
-
if (
|
|
266
|
-
|
|
267
|
-
} else {
|
|
268
|
-
import_debug.default.enable("app:*");
|
|
269
|
-
}
|
|
267
|
+
if (process.env.APP_LOGGER && process.env.APP_LOGGER.toLowerCase() === "true") import_debug.default.enable("app:prod");
|
|
268
|
+
else import_debug.default.enable("app:*");
|
|
270
269
|
var PROD_LOGGER = prodLogger;
|
|
271
270
|
var DEV_LOGGER = devLogger;
|
|
272
271
|
|
|
@@ -550,6 +549,7 @@ __name(Catch, "Catch");
|
|
|
550
549
|
Controller,
|
|
551
550
|
ControllerIsNotValid,
|
|
552
551
|
Ctx,
|
|
552
|
+
DEV_LOGGER,
|
|
553
553
|
DataValidationError,
|
|
554
554
|
ElectronInjectorError,
|
|
555
555
|
Event,
|
|
@@ -559,6 +559,7 @@ __name(Catch, "Catch");
|
|
|
559
559
|
IsNotExceptionFilter,
|
|
560
560
|
OnInvoke,
|
|
561
561
|
OnSend,
|
|
562
|
+
PROD_LOGGER,
|
|
562
563
|
Payload,
|
|
563
564
|
ProviderIsNotInjectable,
|
|
564
565
|
ProviderNotFound,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { IpcMainEvent, IpcMainInvokeEvent } from 'electron';
|
|
3
3
|
import { ValidatorOptions, ValidationError } from 'class-validator';
|
|
4
|
+
import debug from 'debug';
|
|
4
5
|
|
|
5
6
|
declare class Reflector {
|
|
6
7
|
get<T = any>(key: any, target: any): T;
|
|
@@ -21,7 +22,7 @@ declare class ExecutionContext {
|
|
|
21
22
|
set payload(payload: any);
|
|
22
23
|
}
|
|
23
24
|
declare function applyDecorators(...decorators: CallableFunction[]): (target: Object, _propertyKey?: string | symbol, descriptor?: PropertyDescriptor) => void;
|
|
24
|
-
declare function createParamDecorator(fn: (context: ExecutionContext) => any): ParameterDecorator;
|
|
25
|
+
declare function createParamDecorator(fn: (context: ExecutionContext) => any): () => ParameterDecorator;
|
|
25
26
|
|
|
26
27
|
type Class<T = any> = new (...args: any[]) => T;
|
|
27
28
|
type InjectableType = 'singleton' | 'transient';
|
|
@@ -101,4 +102,13 @@ declare class ForbiddenAccessError extends ElectronInjectorError {
|
|
|
101
102
|
constructor(path: string, guardName: string);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Este logger funciona este o no este definido la variable de entorno APP_LOGGER
|
|
107
|
+
*/
|
|
108
|
+
declare const PROD_LOGGER: debug.Debugger;
|
|
109
|
+
/**
|
|
110
|
+
* Este logger solo funciona si esta definida la variable de entorno APP_LOGGER
|
|
111
|
+
*/
|
|
112
|
+
declare const DEV_LOGGER: debug.Debugger;
|
|
113
|
+
|
|
114
|
+
export { Application, type CanActivate, Catch, CircularDependency, type ConfigOptions, Controller, ControllerIsNotValid, Ctx, DEV_LOGGER, DataValidationError, ElectronInjectorError, Event, type ExceptionFilter, ExecutionContext, ForbiddenAccessError, Injectable, type InjectableType, IsNotExceptionFilter, OnInvoke, OnSend, PROD_LOGGER, Payload, ProviderIsNotInjectable, ProviderNotFound, Reflector, SetMetadata, UseGuards, applyDecorators, createParamDecorator };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { IpcMainEvent, IpcMainInvokeEvent } from 'electron';
|
|
3
3
|
import { ValidatorOptions, ValidationError } from 'class-validator';
|
|
4
|
+
import debug from 'debug';
|
|
4
5
|
|
|
5
6
|
declare class Reflector {
|
|
6
7
|
get<T = any>(key: any, target: any): T;
|
|
@@ -21,7 +22,7 @@ declare class ExecutionContext {
|
|
|
21
22
|
set payload(payload: any);
|
|
22
23
|
}
|
|
23
24
|
declare function applyDecorators(...decorators: CallableFunction[]): (target: Object, _propertyKey?: string | symbol, descriptor?: PropertyDescriptor) => void;
|
|
24
|
-
declare function createParamDecorator(fn: (context: ExecutionContext) => any): ParameterDecorator;
|
|
25
|
+
declare function createParamDecorator(fn: (context: ExecutionContext) => any): () => ParameterDecorator;
|
|
25
26
|
|
|
26
27
|
type Class<T = any> = new (...args: any[]) => T;
|
|
27
28
|
type InjectableType = 'singleton' | 'transient';
|
|
@@ -101,4 +102,13 @@ declare class ForbiddenAccessError extends ElectronInjectorError {
|
|
|
101
102
|
constructor(path: string, guardName: string);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Este logger funciona este o no este definido la variable de entorno APP_LOGGER
|
|
107
|
+
*/
|
|
108
|
+
declare const PROD_LOGGER: debug.Debugger;
|
|
109
|
+
/**
|
|
110
|
+
* Este logger solo funciona si esta definida la variable de entorno APP_LOGGER
|
|
111
|
+
*/
|
|
112
|
+
declare const DEV_LOGGER: debug.Debugger;
|
|
113
|
+
|
|
114
|
+
export { Application, type CanActivate, Catch, CircularDependency, type ConfigOptions, Controller, ControllerIsNotValid, Ctx, DEV_LOGGER, DataValidationError, ElectronInjectorError, Event, type ExceptionFilter, ExecutionContext, ForbiddenAccessError, Injectable, type InjectableType, IsNotExceptionFilter, OnInvoke, OnSend, PROD_LOGGER, Payload, ProviderIsNotInjectable, ProviderNotFound, Reflector, SetMetadata, UseGuards, applyDecorators, createParamDecorator };
|
package/dist/index.js
CHANGED
|
@@ -208,11 +208,8 @@ var Container = class {
|
|
|
208
208
|
import debug from "debug";
|
|
209
209
|
var prodLogger = debug("app:prod");
|
|
210
210
|
var devLogger = debug("app:dev");
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
} else {
|
|
214
|
-
debug.enable("app:*");
|
|
215
|
-
}
|
|
211
|
+
if (process.env.APP_LOGGER && process.env.APP_LOGGER.toLowerCase() === "true") debug.enable("app:prod");
|
|
212
|
+
else debug.enable("app:*");
|
|
216
213
|
var PROD_LOGGER = prodLogger;
|
|
217
214
|
var DEV_LOGGER = devLogger;
|
|
218
215
|
|
|
@@ -495,6 +492,7 @@ export {
|
|
|
495
492
|
Controller,
|
|
496
493
|
ControllerIsNotValid,
|
|
497
494
|
Ctx,
|
|
495
|
+
DEV_LOGGER,
|
|
498
496
|
DataValidationError,
|
|
499
497
|
ElectronInjectorError,
|
|
500
498
|
Event,
|
|
@@ -504,6 +502,7 @@ export {
|
|
|
504
502
|
IsNotExceptionFilter,
|
|
505
503
|
OnInvoke,
|
|
506
504
|
OnSend,
|
|
505
|
+
PROD_LOGGER,
|
|
507
506
|
Payload,
|
|
508
507
|
ProviderIsNotInjectable,
|
|
509
508
|
ProviderNotFound,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electron-injector",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Biblioteca para el desarrollo de aplicaciones con electron que proporciona una arquitectura robusta con inyección e inversion de dependencias.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|