@ngxs/logger-plugin 3.8.2-dev.master-09bece1 → 3.8.2-dev.master-b0e24dd
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/index.d.ts +36 -4
- package/package.json +1 -1
- package/src/action-logger.d.ts +0 -13
- package/src/internals.d.ts +0 -3
- package/src/log-writer.d.ts +0 -13
- package/src/logger.module.d.ts +0 -17
- package/src/logger.plugin.d.ts +0 -14
- package/src/public_api.d.ts +0 -3
- package/src/symbols.d.ts +0 -12
package/index.d.ts
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, ModuleWithProviders, EnvironmentProviders, Injector } from '@angular/core';
|
|
3
|
+
import { NgxsPlugin, NgxsNextPluginFn } from '@ngxs/store/plugins';
|
|
4
|
+
|
|
5
|
+
interface NgxsLoggerPluginOptions {
|
|
6
|
+
/** Auto expand logged actions */
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
/** Provide alternate console.log implementation */
|
|
9
|
+
logger?: any;
|
|
10
|
+
/** Disable the logger. Useful for prod mode. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Predicate for actions to be the logged. Takes action and state snapshot as parameters */
|
|
13
|
+
filter?: (action: any, state: any) => boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const NGXS_LOGGER_PLUGIN_OPTIONS: InjectionToken<unknown>;
|
|
16
|
+
|
|
17
|
+
declare class NgxsLoggerPluginModule {
|
|
18
|
+
static forRoot(options?: NgxsLoggerPluginOptions): ModuleWithProviders<NgxsLoggerPluginModule>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsLoggerPluginModule, never>;
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsLoggerPluginModule, never, never, never>;
|
|
21
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsLoggerPluginModule>;
|
|
22
|
+
}
|
|
23
|
+
declare function withNgxsLoggerPlugin(options?: NgxsLoggerPluginOptions): EnvironmentProviders;
|
|
24
|
+
|
|
25
|
+
declare class NgxsLoggerPlugin implements NgxsPlugin {
|
|
26
|
+
private _options;
|
|
27
|
+
private _injector;
|
|
28
|
+
private _store;
|
|
29
|
+
private _logWriter;
|
|
30
|
+
constructor(_options: NgxsLoggerPluginOptions, _injector: Injector);
|
|
31
|
+
handle(state: any, event: any, next: NgxsNextPluginFn): any;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsLoggerPlugin, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsLoggerPlugin>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { NGXS_LOGGER_PLUGIN_OPTIONS, NgxsLoggerPlugin, NgxsLoggerPluginModule, type NgxsLoggerPluginOptions, withNgxsLoggerPlugin };
|
package/package.json
CHANGED
package/src/action-logger.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Store } from '@ngxs/store';
|
|
2
|
-
import { LogWriter } from './log-writer';
|
|
3
|
-
export declare class ActionLogger {
|
|
4
|
-
private action;
|
|
5
|
-
private store;
|
|
6
|
-
private logWriter;
|
|
7
|
-
constructor(action: any, store: Store, logWriter: LogWriter);
|
|
8
|
-
dispatched(state: any): void;
|
|
9
|
-
completed(nextState: any): void;
|
|
10
|
-
errored(error: any): void;
|
|
11
|
-
private _hasPayload;
|
|
12
|
-
private _getNonEmptyProperties;
|
|
13
|
-
}
|
package/src/internals.d.ts
DELETED
package/src/log-writer.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NgxsLoggerPluginOptions } from './symbols';
|
|
2
|
-
export declare class LogWriter {
|
|
3
|
-
private options;
|
|
4
|
-
private logger;
|
|
5
|
-
constructor(options: NgxsLoggerPluginOptions);
|
|
6
|
-
startGroup(message: string): void;
|
|
7
|
-
endGroup(): void;
|
|
8
|
-
logGrey(title: string, payload: any): void;
|
|
9
|
-
logGreen(title: string, payload: any): void;
|
|
10
|
-
logRedish(title: string, payload: any): void;
|
|
11
|
-
log(title: string, color: string, payload: any): void;
|
|
12
|
-
isIE(): boolean;
|
|
13
|
-
}
|
package/src/logger.module.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EnvironmentProviders, InjectionToken, ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { NgxsLoggerPluginOptions } from './symbols';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare const USER_OPTIONS: InjectionToken<unknown>;
|
|
5
|
-
export declare function loggerOptionsFactory(options: NgxsLoggerPluginOptions): {
|
|
6
|
-
collapsed?: boolean | undefined;
|
|
7
|
-
logger?: any;
|
|
8
|
-
disabled?: boolean | undefined;
|
|
9
|
-
filter?: ((action: any, state: any) => boolean) | undefined;
|
|
10
|
-
};
|
|
11
|
-
export declare class NgxsLoggerPluginModule {
|
|
12
|
-
static forRoot(options?: NgxsLoggerPluginOptions): ModuleWithProviders<NgxsLoggerPluginModule>;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsLoggerPluginModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsLoggerPluginModule, never, never, never>;
|
|
15
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsLoggerPluginModule>;
|
|
16
|
-
}
|
|
17
|
-
export declare function withNgxsLoggerPlugin(options?: NgxsLoggerPluginOptions): EnvironmentProviders;
|
package/src/logger.plugin.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
|
-
import { NgxsNextPluginFn, NgxsPlugin } from '@ngxs/store/plugins';
|
|
3
|
-
import { NgxsLoggerPluginOptions } from './symbols';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class NgxsLoggerPlugin implements NgxsPlugin {
|
|
6
|
-
private _options;
|
|
7
|
-
private _injector;
|
|
8
|
-
private _store;
|
|
9
|
-
private _logWriter;
|
|
10
|
-
constructor(_options: NgxsLoggerPluginOptions, _injector: Injector);
|
|
11
|
-
handle(state: any, event: any, next: NgxsNextPluginFn): any;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsLoggerPlugin, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsLoggerPlugin>;
|
|
14
|
-
}
|
package/src/public_api.d.ts
DELETED
package/src/symbols.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export interface NgxsLoggerPluginOptions {
|
|
3
|
-
/** Auto expand logged actions */
|
|
4
|
-
collapsed?: boolean;
|
|
5
|
-
/** Provide alternate console.log implementation */
|
|
6
|
-
logger?: any;
|
|
7
|
-
/** Disable the logger. Useful for prod mode. */
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
/** Predicate for actions to be the logged. Takes action and state snapshot as parameters */
|
|
10
|
-
filter?: (action: any, state: any) => boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const NGXS_LOGGER_PLUGIN_OPTIONS: InjectionToken<unknown>;
|