@ngxs/logger-plugin 18.1.2 → 18.1.3-dev.master-b2b97a8
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/LICENSE +22 -0
- package/index.d.ts +36 -4
- package/package.json +3 -3
- 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/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 <amcdaniel2@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngxs/logger-plugin",
|
|
3
3
|
"description": "logger plugin for @ngxs/store",
|
|
4
|
-
"version": "18.1.
|
|
4
|
+
"version": "18.1.3-dev.master-b2b97a8",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@ngxs/store": "^18.1.2 || ^18.1.2-dev",
|
|
8
7
|
"@angular/core": ">=16.0.0 <19.0.0",
|
|
8
|
+
"@ngxs/store": "^18.1.3 || ^18.1.3-dev",
|
|
9
9
|
"rxjs": ">=6.5.5"
|
|
10
10
|
},
|
|
11
11
|
"module": "fesm2022/ngxs-logger-plugin.mjs",
|
|
@@ -68,4 +68,4 @@
|
|
|
68
68
|
"type": "opencollective",
|
|
69
69
|
"url": "https://opencollective.com/ngxs"
|
|
70
70
|
}
|
|
71
|
-
}
|
|
71
|
+
}
|
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>;
|