@xivdyetools/core 1.3.7 → 1.5.0

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.
@@ -4,81 +4,20 @@
4
4
  * Injectable logger interface for library consumers to customize logging behavior.
5
5
  * Prevents library code from polluting consumer application logs.
6
6
  *
7
- * @module types/logger
8
- */
9
- /**
10
- * Logger interface for customizable logging
11
- *
12
- * Implement this interface to control how the library logs messages.
13
- * By default, the library uses a no-op logger that suppresses all output.
14
- *
15
- * @example Using the console logger
16
- * ```typescript
17
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
18
- *
19
- * // Enable console logging for debugging
20
- * const dyeService = new DyeService({ logger: ConsoleLogger });
21
- * ```
7
+ * NOTE: This file now re-exports from @xivdyetools/logger/library for consistency
8
+ * across the xivdyetools ecosystem. For new projects, consider importing
9
+ * directly from @xivdyetools/logger/library.
22
10
  *
23
- * @example Creating a custom logger
24
- * ```typescript
25
- * const myLogger: Logger = {
26
- * info: (msg) => myLoggingFramework.info(`[xivdyetools] ${msg}`),
27
- * warn: (msg) => myLoggingFramework.warn(`[xivdyetools] ${msg}`),
28
- * error: (msg, error) => myLoggingFramework.error(`[xivdyetools] ${msg}`, error),
29
- * debug: (msg) => myLoggingFramework.debug(`[xivdyetools] ${msg}`),
30
- * };
31
- * ```
11
+ * @module types/logger
32
12
  */
33
- export interface Logger {
34
- /**
35
- * Log an informational message
36
- * @param message - Message to log
37
- */
38
- info: (message: string) => void;
39
- /**
40
- * Log a warning message
41
- * @param message - Message to log
42
- */
43
- warn: (message: string) => void;
44
- /**
45
- * Log an error message
46
- * @param message - Message to log
47
- * @param error - Optional error object for additional context
48
- */
49
- error: (message: string, error?: unknown) => void;
50
- /**
51
- * Log a debug message (optional, typically suppressed in production)
52
- * @param message - Message to log
53
- */
54
- debug?: (message: string) => void;
55
- }
56
13
  /**
57
- * No-op logger that suppresses all output
58
- *
59
- * This is the default logger used by the library to prevent
60
- * polluting consumer application logs.
61
- *
62
- * @example
63
- * ```typescript
64
- * // Default behavior - no console output
65
- * const service = new DyeService();
66
- * ```
14
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
15
+ * These re-exports will be removed in the next major version.
67
16
  */
68
- export declare const NoOpLogger: Logger;
17
+ export type { Logger } from '@xivdyetools/logger/library';
69
18
  /**
70
- * Console logger for development and debugging
71
- *
72
- * Use this when you want to see library log messages in the console.
73
- * Prefixes all messages with [xivdyetools] for easy identification.
74
- *
75
- * @example
76
- * ```typescript
77
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
78
- *
79
- * // Enable verbose logging during development
80
- * const dyeService = new DyeService({ logger: ConsoleLogger });
81
- * ```
19
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
20
+ * These re-exports will be removed in the next major version.
82
21
  */
83
- export declare const ConsoleLogger: Logger;
22
+ export { NoOpLogger, ConsoleLogger, createLibraryLogger } from '@xivdyetools/logger/library';
84
23
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;OAGG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;;OAIG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,EAAE,MAKxB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,EAAE,MAW3B,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,YAAY,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC1D;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -4,51 +4,15 @@
4
4
  * Injectable logger interface for library consumers to customize logging behavior.
5
5
  * Prevents library code from polluting consumer application logs.
6
6
  *
7
- * @module types/logger
8
- */
9
- /**
10
- * No-op logger that suppresses all output
11
- *
12
- * This is the default logger used by the library to prevent
13
- * polluting consumer application logs.
7
+ * NOTE: This file now re-exports from @xivdyetools/logger/library for consistency
8
+ * across the xivdyetools ecosystem. For new projects, consider importing
9
+ * directly from @xivdyetools/logger/library.
14
10
  *
15
- * @example
16
- * ```typescript
17
- * // Default behavior - no console output
18
- * const service = new DyeService();
19
- * ```
11
+ * @module types/logger
20
12
  */
21
- export const NoOpLogger = {
22
- info: () => { },
23
- warn: () => { },
24
- error: () => { },
25
- debug: () => { },
26
- };
27
13
  /**
28
- * Console logger for development and debugging
29
- *
30
- * Use this when you want to see library log messages in the console.
31
- * Prefixes all messages with [xivdyetools] for easy identification.
32
- *
33
- * @example
34
- * ```typescript
35
- * import { ConsoleLogger, DyeService } from 'xivdyetools-core';
36
- *
37
- * // Enable verbose logging during development
38
- * const dyeService = new DyeService({ logger: ConsoleLogger });
39
- * ```
14
+ * @deprecated Import directly from '@xivdyetools/logger/library' instead.
15
+ * These re-exports will be removed in the next major version.
40
16
  */
41
- export const ConsoleLogger = {
42
- info: (message) => console.info(`[xivdyetools] ${message}`),
43
- warn: (message) => console.warn(`[xivdyetools] ${message}`),
44
- error: (message, error) => {
45
- if (error) {
46
- console.error(`[xivdyetools] ${message}`, error);
47
- }
48
- else {
49
- console.error(`[xivdyetools] ${message}`);
50
- }
51
- },
52
- debug: (message) => console.debug(`[xivdyetools] ${message}`),
53
- };
17
+ export { NoOpLogger, ConsoleLogger, createLibraryLogger } from '@xivdyetools/logger/library';
54
18
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqDH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;IACf,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,OAAO,EAAE,CAAC;IACnE,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,OAAO,EAAE,CAAC;IACnE,KAAK,EAAE,CAAC,OAAe,EAAE,KAAe,EAAE,EAAE;QAC1C,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,iBAAiB,OAAO,EAAE,CAAC;CACtE,CAAC"}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
package/dist/version.d.ts CHANGED
@@ -7,5 +7,5 @@
7
7
  * Current library version
8
8
  * Automatically synced with package.json version
9
9
  */
10
- export declare const VERSION = "1.3.7";
10
+ export declare const VERSION = "1.5.0";
11
11
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -7,5 +7,5 @@
7
7
  * Current library version
8
8
  * Automatically synced with package.json version
9
9
  */
10
- export const VERSION = '1.3.7';
10
+ export const VERSION = '1.5.0';
11
11
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xivdyetools/core",
3
- "version": "1.3.7",
3
+ "version": "1.5.0",
4
4
  "description": "Core color algorithms and dye database for XIV Dye Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "url": "git+https://github.com/FlashGalatine/xivdyetools-core.git"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^20.10.0",
59
+ "@types/node": "^22.10.2",
60
60
  "@typescript-eslint/eslint-plugin": "^6.15.0",
61
61
  "@typescript-eslint/parser": "^6.15.0",
62
62
  "@vitest/coverage-v8": "^4.0.14",
@@ -68,17 +68,21 @@
68
68
  "tsx": "^4.7.0",
69
69
  "typedoc": "^0.28.14",
70
70
  "typedoc-plugin-markdown": "^4.9.0",
71
- "typescript": "^5.3.2",
71
+ "typescript": "^5.9.3",
72
72
  "vitest": "^4.0.13",
73
73
  "yaml": "^2.3.4"
74
74
  },
75
75
  "engines": {
76
76
  "node": ">=18.0.0"
77
77
  },
78
+ "dependencies": {
79
+ "@xivdyetools/types": "^1.0.0",
80
+ "@xivdyetools/logger": "^1.0.0"
81
+ },
78
82
  "lint-staged": {
79
83
  "*.ts": [
80
84
  "eslint --fix",
81
85
  "prettier --write"
82
86
  ]
83
87
  }
84
- }
88
+ }