@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.
- package/dist/data/locales/de.json +1 -1
- package/dist/data/locales/en.json +1 -1
- package/dist/data/locales/fr.json +1 -1
- package/dist/data/locales/ja.json +1 -1
- package/dist/services/APIService.d.ts +53 -4
- package/dist/services/APIService.d.ts.map +1 -1
- package/dist/services/APIService.js +192 -28
- package/dist/services/APIService.js.map +1 -1
- package/dist/types/index.d.ts +47 -374
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +17 -72
- package/dist/types/index.js.map +1 -1
- package/dist/types/logger.d.ts +10 -71
- package/dist/types/logger.d.ts.map +1 -1
- package/dist/types/logger.js +7 -43
- package/dist/types/logger.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -4
package/dist/types/logger.d.ts
CHANGED
|
@@ -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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
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
|
|
17
|
+
export type { Logger } from '@xivdyetools/logger/library';
|
|
69
18
|
/**
|
|
70
|
-
*
|
|
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
|
|
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
|
|
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"}
|
package/dist/types/logger.js
CHANGED
|
@@ -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
|
-
* @
|
|
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
|
-
* @
|
|
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
|
-
*
|
|
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
|
|
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
|
package/dist/types/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/types/logger.ts"],"names":[],"mappings":"AAAA
|
|
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
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xivdyetools/core",
|
|
3
|
-
"version": "1.
|
|
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": "^
|
|
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
|
|
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
|
+
}
|