@nizza/core 0.4.5-alpha.3 → 0.4.5-alpha.4
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 +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +828 -839
- package/dist/index.mjs.map +1 -1
- package/dist/lib/nizza-store/NizzaStore.d.ts +6 -4
- package/dist/lib/types/api-graphql-types.d.ts +1 -0
- package/dist/lib/types/nizza/chat.d.ts +1 -0
- package/dist/lib/utils/logger.d.ts +7 -27
- package/dist/package.json +5 -2
- package/package.json +4 -1
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import log from 'loglevel';
|
|
2
1
|
import { BroadcastChannelEventBus } from '../event-buses';
|
|
3
2
|
import { NizzaConfiguration, NizzaProductDataSource, NizzaState } from '../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { Logger } from '../utils/logger';
|
|
4
|
+
export type NizzaStore = ReturnType<typeof createStore>;
|
|
5
|
+
declare const createStore: () => {
|
|
7
6
|
state: NizzaState;
|
|
8
7
|
configure: (config: NizzaConfiguration) => Promise<void>;
|
|
9
8
|
setProductDataSource: (dataSource: NizzaProductDataSource) => void;
|
|
10
9
|
instanceId: string;
|
|
10
|
+
log: Logger;
|
|
11
11
|
eventBus: BroadcastChannelEventBus;
|
|
12
12
|
readonly account: import("../accounts").NizzaAccount | undefined;
|
|
13
13
|
readonly productDataSource: NizzaProductDataSource | undefined;
|
|
14
14
|
};
|
|
15
15
|
export declare const nizza: NizzaStore;
|
|
16
|
+
export declare const logger: import("loglevel").Logger;
|
|
17
|
+
export declare const coreLogger: import("loglevel").Logger;
|
|
16
18
|
export {};
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export declare function createLogger(context: string): Logger;
|
|
10
|
-
/**
|
|
11
|
-
* Register a logger instance in registry
|
|
12
|
-
* @param {string} context - The context of the logger to register
|
|
13
|
-
* @param {Logger} logger - The logger instance
|
|
14
|
-
*/
|
|
15
|
-
export declare function registerLogger(context: string, logger: Logger): void;
|
|
16
|
-
/**
|
|
17
|
-
* Get a logger instance from registry by context
|
|
18
|
-
* @param {string} context - The context to get the logger for
|
|
19
|
-
* @returns {Logger} The registered LogLevel logger
|
|
20
|
-
*/
|
|
21
|
-
export declare function getLogger(context: string): Logger;
|
|
22
|
-
/**
|
|
23
|
-
* Initialize a logger - create, register and return instance
|
|
24
|
-
* @param {string} context - The context to initialize logger for
|
|
25
|
-
* @returns {Logger} The initialized LogLevel logger instance
|
|
26
|
-
*/
|
|
27
|
-
export declare function initializeLogger(context: string): Logger;
|
|
1
|
+
import log from 'loglevel';
|
|
2
|
+
export declare class Logger {
|
|
3
|
+
private defaultLevel;
|
|
4
|
+
private namePrefix;
|
|
5
|
+
constructor(namePrefix?: string);
|
|
6
|
+
createLogger(context: string): log.Logger;
|
|
7
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nizza/core",
|
|
3
|
-
"version": "0.4.5-alpha.
|
|
3
|
+
"version": "0.4.5-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -9,5 +9,8 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {}
|
|
12
|
+
"scripts": {},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"perant": "link:/Users/jbermudez/TODO/PROJECTS/personal-assistant"
|
|
15
|
+
}
|
|
13
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nizza/core",
|
|
3
|
-
"version": "0.4.5-alpha.
|
|
3
|
+
"version": "0.4.5-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -9,5 +9,8 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"perant": "link:/Users/jbermudez/TODO/PROJECTS/personal-assistant"
|
|
14
|
+
},
|
|
12
15
|
"scripts": {}
|
|
13
16
|
}
|