@hkdigital/lib-core 0.3.4 → 0.3.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/components/index.d.ts +11 -0
- package/dist/components/index.js +23 -2
- package/dist/{features → components}/presenter/Presenter.svelte +1 -1
- package/dist/logging/index.d.ts +4 -5
- package/dist/logging/index.js +5 -6
- package/dist/logging/{adapters → internal/adapters}/console.js +1 -1
- package/dist/logging/internal/adapters/index.d.ts +2 -0
- package/dist/logging/internal/adapters/index.js +2 -0
- package/dist/logging/{adapters → internal/adapters}/pino.js +33 -8
- package/dist/logging/{factories → internal/factories}/client.d.ts +1 -1
- package/dist/logging/{factories → internal/factories}/client.js +2 -2
- package/dist/logging/{factories → internal/factories}/server.d.ts +1 -1
- package/dist/logging/{factories → internal/factories}/server.js +2 -2
- package/dist/logging/{factories → internal/factories}/universal.d.ts +2 -2
- package/dist/logging/{factories → internal/factories}/universal.js +1 -2
- package/dist/{classes/logging → logging/internal/unified-logger}/Logger.d.ts +3 -3
- package/dist/{classes/logging → logging/internal/unified-logger}/Logger.js +19 -12
- package/dist/{classes/logging → logging/internal/unified-logger}/constants.d.ts +1 -0
- package/dist/{classes/logging → logging/internal/unified-logger}/constants.js +8 -2
- package/dist/{classes/logging → logging/internal/unified-logger}/index.d.ts +1 -0
- package/dist/{classes/logging → logging/internal/unified-logger}/index.js +2 -0
- package/dist/{components → primitives}/buttons/button/Button.svelte.d.ts +1 -1
- package/dist/{components → primitives}/drag-drop/DropZoneArea.svelte.d.ts +1 -1
- package/dist/primitives/index.d.ts +0 -0
- package/dist/primitives/index.js +2 -0
- package/dist/{components → primitives}/layout/grid-layers/util.js +1 -1
- package/dist/{components → primitives}/rows/panel-grid-row/PanelGridRow.svelte.d.ts +1 -1
- package/dist/{components → primitives}/rows/panel-row-2/PanelRow2.svelte.d.ts +1 -1
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/internal/index.d.ts +6 -0
- package/dist/services/internal/index.js +8 -0
- package/dist/{classes/services → services/internal/service-base}/ServiceBase.d.ts +2 -2
- package/dist/{classes/services → services/internal/service-base}/ServiceBase.js +3 -3
- package/dist/{classes/services/service-states.d.ts → services/internal/service-base/constants.d.ts} +0 -61
- package/dist/{classes/services/service-states.js → services/internal/service-base/constants.js} +0 -95
- package/dist/services/internal/service-base/index.d.ts +3 -0
- package/dist/services/internal/service-base/index.js +3 -0
- package/dist/{classes/services → services/internal/service-base}/typedef.d.ts +34 -138
- package/dist/{classes/services → services/internal/service-base}/typedef.js +31 -98
- package/dist/{classes/services → services/internal/service-manager}/ServiceManager.d.ts +6 -5
- package/dist/{classes/services → services/internal/service-manager}/ServiceManager.js +6 -5
- package/dist/services/internal/service-manager/constants.d.ts +4 -0
- package/dist/services/internal/service-manager/constants.js +6 -0
- package/dist/services/internal/service-manager/typedef.d.ts +104 -0
- package/dist/services/internal/service-manager/typedef.js +90 -0
- package/package.json +1 -1
- package/dist/classes/services/index.d.ts +0 -4
- package/dist/classes/services/index.js +0 -5
- package/dist/features/index.d.ts +0 -11
- package/dist/features/index.js +0 -23
- package/dist/logging/constants.d.ts +0 -1
- package/dist/logging/constants.js +0 -1
- package/dist/server/index.d.ts +0 -1
- package/dist/server/index.js +0 -1
- package/dist/server/logger.d.ts +0 -25
- package/dist/server/logger.js +0 -94
- /package/dist/classes/{events → event-emitter}/EventEmitter.d.ts +0 -0
- /package/dist/classes/{events → event-emitter}/EventEmitter.js +0 -0
- /package/dist/classes/{events → event-emitter}/index.d.ts +0 -0
- /package/dist/classes/{events → event-emitter}/index.js +0 -0
- /package/dist/{features → components}/button-group/ButtonGroup.svelte +0 -0
- /package/dist/{features → components}/button-group/ButtonGroup.svelte.d.ts +0 -0
- /package/dist/{features → components}/button-group/typedef.d.ts +0 -0
- /package/dist/{features → components}/button-group/typedef.js +0 -0
- /package/dist/{features → components}/compare-left-right/CompareLeftRight.svelte +0 -0
- /package/dist/{features → components}/compare-left-right/CompareLeftRight.svelte.d.ts +0 -0
- /package/dist/{features → components}/compare-left-right/index.d.ts +0 -0
- /package/dist/{features → components}/compare-left-right/index.js +0 -0
- /package/dist/{features → components}/game-box/GameBox.svelte +0 -0
- /package/dist/{features → components}/game-box/GameBox.svelte.d.ts +0 -0
- /package/dist/{features → components}/game-box/gamebox.util.d.ts +0 -0
- /package/dist/{features → components}/game-box/gamebox.util.js +0 -0
- /package/dist/{features → components}/hk-app-layout/HkAppLayout.state.svelte.d.ts +0 -0
- /package/dist/{features → components}/hk-app-layout/HkAppLayout.state.svelte.js +0 -0
- /package/dist/{features → components}/hk-app-layout/HkAppLayout.svelte +0 -0
- /package/dist/{features → components}/hk-app-layout/HkAppLayout.svelte.d.ts +0 -0
- /package/dist/{features → components}/image-box/ImageBox.svelte +0 -0
- /package/dist/{features → components}/image-box/ImageBox.svelte.d.ts +0 -0
- /package/dist/{features → components}/image-box/index.d.ts +0 -0
- /package/dist/{features → components}/image-box/index.js +0 -0
- /package/dist/{features → components}/image-box/typedef.d.ts +0 -0
- /package/dist/{features → components}/image-box/typedef.js +0 -0
- /package/dist/{features → components}/presenter/ImageSlide.svelte +0 -0
- /package/dist/{features → components}/presenter/ImageSlide.svelte.d.ts +0 -0
- /package/dist/{features → components}/presenter/Presenter.state.svelte.d.ts +0 -0
- /package/dist/{features → components}/presenter/Presenter.state.svelte.js +0 -0
- /package/dist/{features → components}/presenter/Presenter.svelte.d.ts +0 -0
- /package/dist/{features → components}/presenter/constants.d.ts +0 -0
- /package/dist/{features → components}/presenter/constants.js +0 -0
- /package/dist/{features → components}/presenter/index.d.ts +0 -0
- /package/dist/{features → components}/presenter/index.js +0 -0
- /package/dist/{features → components}/presenter/typedef.d.ts +0 -0
- /package/dist/{features → components}/presenter/typedef.js +0 -0
- /package/dist/{features → components}/presenter/util.d.ts +0 -0
- /package/dist/{features → components}/presenter/util.js +0 -0
- /package/dist/{features → components}/virtual-viewport/VirtualViewport.svelte +0 -0
- /package/dist/{features → components}/virtual-viewport/VirtualViewport.svelte.d.ts +0 -0
- /package/dist/logging/{adapters → internal/adapters}/console.d.ts +0 -0
- /package/dist/logging/{adapters → internal/adapters}/pino.d.ts +0 -0
- /package/dist/{classes/logging → logging/internal/unified-logger}/typedef.d.ts +0 -0
- /package/dist/{classes/logging → logging/internal/unified-logger}/typedef.js +0 -0
- /package/dist/{components → primitives}/area/HkArea.svelte +0 -0
- /package/dist/{components → primitives}/area/HkArea.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/area/HkGridArea.svelte +0 -0
- /package/dist/{components → primitives}/area/HkGridArea.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/area/index.d.ts +0 -0
- /package/dist/{components → primitives}/area/index.js +0 -0
- /package/dist/{components → primitives}/buttons/button/Button.svelte +0 -0
- /package/dist/{components → primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte +0 -0
- /package/dist/{components → primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/buttons/button-text/TextButton.svelte +0 -0
- /package/dist/{components → primitives}/buttons/button-text/TextButton.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/buttons/index.d.ts +0 -0
- /package/dist/{components → primitives}/buttons/index.js +0 -0
- /package/dist/{components → primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte +0 -0
- /package/dist/{components → primitives}/debug/debug-panel-design-scaling/DebugPanelDesignScaling.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/debug/index.d.ts +0 -0
- /package/dist/{components → primitives}/debug/index.js +0 -0
- /package/dist/{components → primitives}/drag-drop/DragController.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/DragController.js +0 -0
- /package/dist/{components → primitives}/drag-drop/DragDropContext.svelte +0 -0
- /package/dist/{components → primitives}/drag-drop/DragDropContext.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/Draggable.svelte +0 -0
- /package/dist/{components → primitives}/drag-drop/Draggable.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/DropZone.svelte +0 -0
- /package/dist/{components → primitives}/drag-drop/DropZone.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/DropZoneArea.svelte +0 -0
- /package/dist/{components → primitives}/drag-drop/DropZoneList.svelte +0 -0
- /package/dist/{components → primitives}/drag-drop/DropZoneList.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/actions.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/actions.js +0 -0
- /package/dist/{components → primitives}/drag-drop/drag-state.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/drag-state.svelte.js +0 -0
- /package/dist/{components → primitives}/drag-drop/index.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/index.js +0 -0
- /package/dist/{components → primitives}/drag-drop/util.d.ts +0 -0
- /package/dist/{components → primitives}/drag-drop/util.js +0 -0
- /package/dist/{components → primitives}/hkdev/blocks/TextBlock.svelte +0 -0
- /package/dist/{components → primitives}/hkdev/blocks/TextBlock.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/hkdev/buttons/CheckButton.svelte +0 -0
- /package/dist/{components → primitives}/hkdev/buttons/CheckButton.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/icons/HkIcon.svelte +0 -0
- /package/dist/{components → primitives}/icons/HkIcon.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/icons/HkTabIcon.svelte +0 -0
- /package/dist/{components → primitives}/icons/HkTabIcon.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/icons/SteezeIcon.svelte +0 -0
- /package/dist/{components → primitives}/icons/SteezeIcon.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/icons/index.d.ts +0 -0
- /package/dist/{components → primitives}/icons/index.js +0 -0
- /package/dist/{components → primitives}/icons/typedef.d.ts +0 -0
- /package/dist/{components → primitives}/icons/typedef.js +0 -0
- /package/dist/{components → primitives}/inputs/index.d.ts +0 -0
- /package/dist/{components → primitives}/inputs/index.js +0 -0
- /package/dist/{components → primitives}/inputs/text-input/TestTextInput.svelte__ +0 -0
- /package/dist/{components → primitives}/inputs/text-input/TextInput.svelte +0 -0
- /package/dist/{components → primitives}/inputs/text-input/TextInput.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/inputs/text-input/TextInput.svelte___ +0 -0
- /package/dist/{components → primitives}/inputs/text-input/assets/IconInvalid.svelte +0 -0
- /package/dist/{components → primitives}/inputs/text-input/assets/IconInvalid.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/inputs/text-input/assets/IconValid.svelte +0 -0
- /package/dist/{components → primitives}/inputs/text-input/assets/IconValid.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/layout/grid-layers/GridLayers.svelte +0 -0
- /package/dist/{components → primitives}/layout/grid-layers/GridLayers.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/layout/grid-layers/GridLayers.svelte__heightFrom__ +0 -0
- /package/dist/{components → primitives}/layout/grid-layers/util.d.ts +0 -0
- /package/dist/{components → primitives}/layout/index.d.ts +0 -0
- /package/dist/{components → primitives}/layout/index.js +0 -0
- /package/dist/{components → primitives}/panels/index.d.ts +0 -0
- /package/dist/{components → primitives}/panels/index.js +0 -0
- /package/dist/{components → primitives}/panels/panel/Panel.svelte +0 -0
- /package/dist/{components → primitives}/panels/panel/Panel.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/rows/index.d.ts +0 -0
- /package/dist/{components → primitives}/rows/index.js +0 -0
- /package/dist/{components → primitives}/rows/panel-grid-row/PanelGridRow.svelte +0 -0
- /package/dist/{components → primitives}/rows/panel-row-2/PanelRow2.svelte +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBar.state.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBar.state.svelte.js +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBar.svelte +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBar.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBarSelector.state.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBarSelector.state.svelte.js +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBarSelector.svelte +0 -0
- /package/dist/{components → primitives}/tab-bar/HkTabBarSelector.svelte.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/index.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/index.js +0 -0
- /package/dist/{components → primitives}/tab-bar/typedef.d.ts +0 -0
- /package/dist/{components → primitives}/tab-bar/typedef.js +0 -0
package/dist/server/logger.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type LoggerContext = {
|
|
2
|
-
route?: {
|
|
3
|
-
id: string;
|
|
4
|
-
};
|
|
5
|
-
componentName?: string;
|
|
6
|
-
};
|
|
7
|
-
export type ExtendedLogger = pino.Logger & LoggerExtension;
|
|
8
|
-
export type LoggerExtension = {
|
|
9
|
-
context: (context: LoggerContext) => ExtendedLogger;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {object} LoggerContext
|
|
13
|
-
* @property {{ id: string }} [route]
|
|
14
|
-
* @property {string} [componentName]
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* @typedef {pino.Logger & LoggerExtension} ExtendedLogger
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* @typedef {Object} LoggerExtension
|
|
21
|
-
* @property {( context: LoggerContext )=> ExtendedLogger} context
|
|
22
|
-
*/
|
|
23
|
-
/** @type {pino.Logger & LoggerExtension} */
|
|
24
|
-
export const logger: pino.Logger & LoggerExtension;
|
|
25
|
-
import pino from 'pino';
|
package/dist/server/logger.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
*
|
|
4
|
-
* import { logger } from './logger.js';
|
|
5
|
-
*
|
|
6
|
-
* logger.info('Hello there!');
|
|
7
|
-
* logger.info( { a: 1, b: 2 }, 'Test vars');
|
|
8
|
-
*
|
|
9
|
-
* export function load({ route }) {
|
|
10
|
-
* logger.context({route}).info('Log');
|
|
11
|
-
* }
|
|
12
|
-
*
|
|
13
|
-
* @note
|
|
14
|
-
* Set a 'handleError' hook to log errors captured by svelte
|
|
15
|
-
*
|
|
16
|
-
* // hooks.server.js
|
|
17
|
-
* export const handleError = ({ status, error, message }) => {
|
|
18
|
-
* if (status !== 404) {
|
|
19
|
-
* logger.error(error);
|
|
20
|
-
* }
|
|
21
|
-
*
|
|
22
|
-
* // do not return sensitive data here as it will be sent to the client
|
|
23
|
-
* return { message };
|
|
24
|
-
* };
|
|
25
|
-
*
|
|
26
|
-
* @see https://kit.svelte.dev/docs/hooks#shared-hooks-handleerror
|
|
27
|
-
* @see https://stolthq.com/blog/structured-logging-sveltekit
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
import pino from 'pino';
|
|
31
|
-
import { dev } from '$app/environment';
|
|
32
|
-
|
|
33
|
-
// import { browser, building, dev, version } from '$app/environment';
|
|
34
|
-
|
|
35
|
-
// > Setup
|
|
36
|
-
|
|
37
|
-
/** @type {pino.LoggerOptions} */
|
|
38
|
-
let options = {};
|
|
39
|
-
|
|
40
|
-
if (dev) {
|
|
41
|
-
options = {
|
|
42
|
-
level: 'debug',
|
|
43
|
-
transport: {
|
|
44
|
-
target: 'pino-pretty',
|
|
45
|
-
options: {
|
|
46
|
-
colorize: true
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// > Exports
|
|
53
|
-
|
|
54
|
-
// ?? function routeLogger( ... )
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @typedef {object} LoggerContext
|
|
58
|
-
* @property {{ id: string }} [route]
|
|
59
|
-
* @property {string} [componentName]
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @typedef {pino.Logger & LoggerExtension} ExtendedLogger
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @typedef {Object} LoggerExtension
|
|
68
|
-
* @property {( context: LoggerContext )=> ExtendedLogger} context
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
/** @type {pino.Logger & LoggerExtension} */
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
const logger = pino(options);
|
|
74
|
-
|
|
75
|
-
Object.assign(logger, {
|
|
76
|
-
/**
|
|
77
|
-
* @param {LoggerContext} _
|
|
78
|
-
*
|
|
79
|
-
* @returns {pino.Logger}
|
|
80
|
-
*/
|
|
81
|
-
context({ route, componentName }) {
|
|
82
|
-
if (route) {
|
|
83
|
-
// @ts-ignore
|
|
84
|
-
return this.child({ route: route.id });
|
|
85
|
-
} else if (componentName) {
|
|
86
|
-
// @ts-ignore
|
|
87
|
-
return this.child({ componentName });
|
|
88
|
-
} else {
|
|
89
|
-
throw new Error(`Missing input parameter`);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
export { logger };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → primitives}/buttons/button-icon-steeze/SteezeIconButton.svelte.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|