@reliverse/relinka 1.3.7 → 1.4.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.
Files changed (54) hide show
  1. package/README.md +197 -70
  2. package/bin/{relinka-impl/deprecated → deprecated}/components/levels/levels.d.ts +13 -13
  3. package/bin/{relinka-impl/deprecated → deprecated}/components/modes/basic.d.ts +19 -19
  4. package/bin/{relinka-impl/deprecated → deprecated}/components/modes/browser.d.ts +19 -19
  5. package/bin/deprecated/components/modes/shared.d.ts +2 -0
  6. package/bin/deprecated/components/modes/shared.js +1 -0
  7. package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/logger.d.ts +5 -5
  8. package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/mod.d.ts +20 -20
  9. package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/relinka.d.ts +140 -141
  10. package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/basic.d.ts +11 -11
  11. package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/browser.d.ts +10 -10
  12. package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/fancy.d.ts +10 -10
  13. package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/fancy.js +1 -3
  14. package/bin/deprecated/impl-old.js +0 -0
  15. package/bin/{relinka-types.d.ts → deprecated/types.d.ts} +161 -194
  16. package/bin/deprecated/types.js +0 -0
  17. package/bin/{relinka-impl/deprecated → deprecated}/utils/box.d.ts +114 -114
  18. package/bin/{relinka-impl/deprecated → deprecated}/utils/deprecatedColors.d.ts +69 -69
  19. package/bin/{relinka-impl/deprecated → deprecated}/utils/error.d.ts +6 -6
  20. package/bin/{relinka-impl/deprecated → deprecated}/utils/format.d.ts +14 -14
  21. package/bin/{relinka-impl/deprecated → deprecated}/utils/log.d.ts +13 -13
  22. package/bin/{relinka-impl/deprecated → deprecated}/utils/stream.d.ts +14 -15
  23. package/bin/{relinka-impl/deprecated → deprecated}/utils/string.d.ts +50 -50
  24. package/bin/{relinka-impl/deprecated → deprecated}/utils/tree.d.ts +41 -41
  25. package/bin/impl.d.ts +149 -0
  26. package/bin/impl.js +606 -0
  27. package/bin/main.d.ts +24 -22
  28. package/bin/main.js +24 -21
  29. package/bin/types.d.ts +0 -0
  30. package/bin/types.js +0 -0
  31. package/package.json +43 -8
  32. package/bin/relinka-impl/deprecated/components/modes/shared.d.ts +0 -2
  33. package/bin/relinka-impl/deprecated/components/modes/shared.js +0 -4
  34. package/bin/relinka-impl/deprecated/components/relinka-deprecated/relinka.test.d.ts +0 -1
  35. package/bin/relinka-impl/deprecated/components/relinka-deprecated/relinka.test.js +0 -57
  36. package/bin/relinka-impl/impl-mod.d.ts +0 -19
  37. package/bin/relinka-impl/impl-mod.js +0 -317
  38. /package/bin/{relinka-impl/deprecated → deprecated}/components/levels/levels.js +0 -0
  39. /package/bin/{relinka-impl/deprecated → deprecated}/components/modes/basic.js +0 -0
  40. /package/bin/{relinka-impl/deprecated → deprecated}/components/modes/browser.js +0 -0
  41. /package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/logger.js +0 -0
  42. /package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/mod.js +0 -0
  43. /package/bin/{relinka-impl/deprecated → deprecated}/components/relinka-deprecated/relinka.js +0 -0
  44. /package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/basic.js +0 -0
  45. /package/bin/{relinka-impl/deprecated → deprecated}/components/reporters/browser.js +0 -0
  46. /package/bin/{relinka-types.js → deprecated/impl-old.d.ts} +0 -0
  47. /package/bin/{relinka-impl/deprecated → deprecated}/utils/box.js +0 -0
  48. /package/bin/{relinka-impl/deprecated → deprecated}/utils/deprecatedColors.js +0 -0
  49. /package/bin/{relinka-impl/deprecated → deprecated}/utils/error.js +0 -0
  50. /package/bin/{relinka-impl/deprecated → deprecated}/utils/format.js +0 -0
  51. /package/bin/{relinka-impl/deprecated → deprecated}/utils/log.js +0 -0
  52. /package/bin/{relinka-impl/deprecated → deprecated}/utils/stream.js +0 -0
  53. /package/bin/{relinka-impl/deprecated → deprecated}/utils/string.js +0 -0
  54. /package/bin/{relinka-impl/deprecated → deprecated}/utils/tree.js +0 -0
package/README.md CHANGED
@@ -1,89 +1,189 @@
1
- # Relinka: Stylish Logging Made Simple
1
+ # Relinka: Logging that Actually Feels Good
2
2
 
3
- [💖 GitHub Sponsors](https://github.com/sponsors/blefnk) • [💬 Discord](https://discord.gg/Pb8uKbwpsJ) • [✨ Repo](https://github.com/reliverse/relinka-logger) • [📦 NPM](https://npmjs.com/@reliverse/relinka) • [📚 Docs](https://docs.reliverse.org)
3
+ [💖 GitHub Sponsors](https://github.com/sponsors/blefnk) • [💬 Discord](https://discord.gg/Pb8uKbwpsJ) • [✨ Repo](https://github.com/reliverse/relinka-logger) • [📦 NPM](https://npmjs.com/@reliverse/relinka)
4
4
 
5
- **@reliverse/relinka** is your next favorite logging library built to make your terminal (and browser consolesoon) output look good, stay clean, and be actually helpful. It’s styled, structured, and smart. Oh, and it works with configs, files, and colors out of the box.
5
+ **@reliverse/relinka** is a modern, minimal logging library that actually *feels* right. It's not just pretty outputit's a system: smart formatting, file-safe logging, runtime config support, and a `fatal` mode built for developers who care about correctness.
6
6
 
7
- ## 🌟 Features
7
+ Whether you're building CLI tools, SDKs, or full-stack apps — Relinka helps you log with intention.
8
8
 
9
- - 🧙 Drop-in replacement for `node:console` and `consola`
10
- - 💬 `relinka` supports: `info`, `warn`, `success`, `error`, `verbose`
11
- - 🎨 Beautiful, color-coded logs in the terminal
12
- - 🧠 Auto-formats messages, objects, and errors
13
- - 📁 Save logs to file (with daily logs, cleanup, and rotation)
14
- - 📦 Use it programmatically or through CLI-compatible tools
15
- - ⚙️ Smart customization via config
16
- - ✨ Extensible and future-proof
9
+ ## Why Relinka
17
10
 
18
- ## 🚀 Getting Started
11
+ - 🧙 Drop-in replacement for `node:console`, `consola`, or your internal logger
12
+ - 💬 Supports: `info`, `warn`, `success`, `error`, `verbose`, `fatal`, `clear`
13
+ - 🎨 Terminal output that *pops*, with automatic color handling
14
+ - 📁 Save logs to file (with daily rotation, cleanup, and max-file limits)
15
+ - 🧠 Structured message formatting (objects, errors, stacks — handled!)
16
+ - ⚙️ Runtime config via `relinka.config.ts` (powered by `reconf`)
17
+ - 🚨 `fatal` logs halt execution and trigger `debugger` in dev
18
+ - 🧩 Sync-first, async, & CLI-friendly thanks to buffer flushing
19
19
 
20
- ### 1. Install
20
+ ## Getting Started
21
+
22
+ ### 2️⃣ Install
21
23
 
22
24
  ```bash
23
25
  bun add @reliverse/relinka
24
26
  ```
25
27
 
26
- And, optionally, install the CLI globally to manage your config:
28
+ ### 2️⃣ Use It
27
29
 
28
- ```bash
29
- bun i -g @reliverse/relinka-cli
30
+ #### Direct Method (Recommended)
31
+
32
+ - Place this **at the START** of your app's main function:
33
+
34
+ ```ts
35
+ await relinkaConfig;
30
36
  ```
31
37
 
32
- ### 2. Basic Usage
38
+ - Place this **at the END** of your app's main function:
33
39
 
34
40
  ```ts
35
- import { relinkaConfig, relinka } from "@reliverse/relinka";
41
+ await relinkaShutdown();
42
+ ```
43
+
44
+ **Usage example**:
45
+
46
+ ```ts
47
+ import {
48
+ relinka,
49
+ relinkaAsync,
50
+ relinkaConfig,
51
+ relinkaShutdown,
52
+ } from "@reliverse/relinka";
36
53
  export async function main() {
37
- await relinkaConfig;
54
+ await relinkaAsync(
55
+ // this automatically loads the config
56
+ "verbose",
57
+ "This ASYNC verbose message can be seen only if verbose=true (in user config)",
58
+ );
59
+ await relinkaConfig; // place this at your main function or just at the top of your entry file
38
60
  relinka(
39
61
  "verbose",
40
- "This message can be seen only if config was loaded AND debug is enabled",
62
+ "This SYNC verbose message can be seen only if verbose=true (in user config) AND config was loaded ",
41
63
  );
64
+ relinka("log", "Hello! 👋");
65
+ relinka("log", "Great to see you here!");
42
66
  relinka("info", "Everything is running smoothly");
43
67
  relinka("warn", "This might be a problem");
44
- relinka("error", "Uh oh, something broke");
45
- relinka("success", "Thanks for using Relinka! 👋");
68
+ relinka(
69
+ "error", // non-fatal issue level can be recovered
70
+ "Uh oh, something broke",
71
+ );
72
+ // relinka(
73
+ // "fatal",
74
+ // "We should never reach this code! This should never happen! (see <anonymous> line)",
75
+ // ); // fatal level throws error and halts execution
76
+ relinka("success", "Thanks for using Relinka!");
77
+ // Make sure to shut down the logger at the end of your program
78
+ // This is important to flush all buffers and close file handles
79
+ await relinkaShutdown();
46
80
  }
47
81
  await main();
48
82
  ```
49
83
 
50
- ## 🧪 Advanced Usage
84
+ #### [🔜 Soon] Singleton Method
85
+
86
+ ```ts
87
+ const logger = initRelinkaInstance();
88
+ logger("info", "Looks great!");
89
+ ```
51
90
 
52
- Want a clean blank line?
91
+ #### [🔜 Soon] Object Method
53
92
 
54
93
  ```ts
55
- relinka("info", ""); // Just prints a newline
94
+ await relinkaConfig;
95
+ relinka.info("Looks great!");
56
96
  ```
57
97
 
58
- 🔜 Use the async logger if you want some advanced features (like typing text animation - soon):
98
+ ## Advanced Usage
59
99
 
60
100
  ```ts
101
+ // Clear terminal:
102
+ relinka("clear", "");
103
+ // Blank line:
104
+ relinka("info", "");
105
+ // Async variant:
61
106
  import { relinkaAsync } from "@reliverse/relinka";
62
-
107
+ await relinkaAsync("info", "Logged from async context");
108
+ // Coming soon:
63
109
  await relinkaAsync("info", "Something happened", { animate: true });
64
110
  ```
65
111
 
66
- ## ⚙️ Configuration
112
+ ## Config
67
113
 
68
- Create a `relinka.config.ts` file with a content like:
114
+ Create `relinka.config.ts`:
69
115
 
70
116
  ```ts
71
117
  import { defineConfig } from "@reliverse/relinka";
118
+ /**
119
+ * RELINKA CONFIGURATION FILE
120
+ * - Hover over a field to see the information
121
+ * - Use intellisense to see available options
122
+ * @see https://github.com/reliverse/relinka
123
+ */
72
124
  export default defineConfig({
73
- // Enable debug to see verbose logs
74
- debug: true,
75
- // Show timestamp in each log message
76
- withTimestamp: false,
125
+ // Enable to see verbose logs
126
+ verbose: false,
127
+
128
+ // Timestamp configuration
129
+ timestamp: {
130
+ enabled: false,
131
+ format: "HH:mm:ss",
132
+ },
133
+
77
134
  // Control whether logs are saved to a file
78
135
  saveLogsToFile: true,
136
+
79
137
  // Disable colors in the console
80
138
  disableColors: false,
139
+
81
140
  // Log file path
82
141
  logFilePath: "relinka.log",
142
+
143
+ levels: {
144
+ success: {
145
+ symbol: "✓",
146
+ fallbackSymbol: "[OK]",
147
+ color: "greenBright",
148
+ spacing: 3,
149
+ },
150
+ info: {
151
+ symbol: "i",
152
+ fallbackSymbol: "[i]",
153
+ color: "cyanBright",
154
+ spacing: 3,
155
+ },
156
+ error: {
157
+ symbol: "✖",
158
+ fallbackSymbol: "[ERR]",
159
+ color: "redBright",
160
+ spacing: 3,
161
+ },
162
+ warn: {
163
+ symbol: "⚠",
164
+ fallbackSymbol: "[WARN]",
165
+ color: "yellowBright",
166
+ spacing: 3,
167
+ },
168
+ fatal: {
169
+ symbol: "‼",
170
+ fallbackSymbol: "[FATAL]",
171
+ color: "redBright",
172
+ spacing: 3,
173
+ },
174
+ verbose: {
175
+ symbol: "✧",
176
+ fallbackSymbol: "[VERBOSE]",
177
+ color: "gray",
178
+ spacing: 3,
179
+ },
180
+ log: { symbol: "│", fallbackSymbol: "|", color: "dim", spacing: 3 },
181
+ },
182
+
83
183
  // Directory settings
84
184
  dirs: {
85
185
  dailyLogs: true,
86
- logDir: ".reliverse/logs", // store logs in a custom folder
186
+ logDir: "logs", // store logs in a custom folder
87
187
  maxLogFiles: 5, // keep only the 5 most recent log files
88
188
  specialDirs: {
89
189
  distDirNames: [],
@@ -93,62 +193,89 @@ export default defineConfig({
93
193
  });
94
194
  ```
95
195
 
96
- Supported config file names:
196
+ Supported files:
97
197
 
98
198
  - `relinka.config.ts`
99
- - 🔜 `.relinka.config.js`
100
- - 🔜 `.relinkarc`
101
- - 🔜 or any other supported by c12
199
+ - 🔜 other formats, supported by `reconf`, are coming soon
200
+
201
+ ## Log Files
202
+
203
+ - Default: `logs/relinka.log`
204
+ - Daily mode: `2025-04-11-relinka.log`
205
+ - Auto-cleanup: keep latest N logs
206
+
207
+ ## API Summary
208
+
209
+ ```ts
210
+ relinka("info", "message", optionalDetails);
211
+ relinka("fatal", "something broke"); // throws
212
+ relinka("clear", ""); // clears terminal
213
+
214
+ await relinkaAsync("warn", "something async");
215
+ ```
216
+
217
+ ```ts
218
+ defineConfig({ ... }) // helper for relinka.config.ts
219
+ ```
220
+
221
+ ## Built-in Utilities
222
+
223
+ - ✅ Timestamping
224
+ - ✅ File-safe formatting
225
+ - ✅ Log rotation
226
+ - ✅ Fatal logging (with debugger)
227
+ - ✅ Colorized terminal output
102
228
 
103
- ## 📁 Log Files
229
+ ## FAQ
104
230
 
105
- - Stored in `.reliverse/logs/` by default
106
- - Filename: `relinka.log` or `YYYY-MM-DD-relinka.log` if daily logs are enabled
107
- - Auto-rotates based on `maxLogFiles`
231
+ ### Why `relinka.config.ts` doesn't works for me?
108
232
 
109
- ## 📚 API Summary
233
+ You forget to load user's config by using `await relinkaConfig;` **at the START** of your app's main function.
110
234
 
111
- ### relinka(level, message, ...args)
235
+ ### Why my terminal stucks after last relinka() usage?
112
236
 
113
- Logs synchronously. Skips debug logs if `debug: false`.
237
+ You forget to flush the buffer. Place `await relinkaShutdown();` **at the END** of your app's main function.
114
238
 
115
- ### relinkaAsync(level, message, ...args)
239
+ ### Why does TS linter tells that something wrong with `relinka("info", args)`?
116
240
 
117
- Async logger that waits for config automatically, and provides some additional advanced features.
241
+ Add empty string: `relinka("info", "", args)`
118
242
 
119
- ### defineConfig(config)
243
+ ### Does `fatal` throw?
120
244
 
121
- Helper to define typed config in `relinka.config.ts`
245
+ Yes, always. It will halt execution and trigger `debugger` in dev mode.
122
246
 
123
- ## 🧰 Utilities
247
+ ### What's coming next?
124
248
 
125
- Timestamping
126
- Log file rotation
127
- ✅ File-safe formatting
128
- ANSI color support
129
- Error object handling
249
+ - Relinka is designed to be used in the different ways:
250
+ - Use `relinka(level, message, ...args)` (recommended).
251
+ - 🔜 Or, just `relinka.level(message, ...args)`
252
+ - 🔜 Both designed to work with both sync (default) and async/await.
253
+ - 🔜 Both designed to work with both direct and wrapper methods.
254
+ - 🔜 Use the async logger if you want some advanced features (like typing text streaming animation).
130
255
 
131
- ## 💡 Tips
256
+ ## Tips
132
257
 
133
- - Want `@ts-expect-error` auto-injection? Check out [`@reliverse/reinject`](https://npmjs.com/@reliverse/reinject).
134
- - Using this in a CLI tool? Combine with [`@reliverse/prompts`](https://npmjs.com/@reliverse/prompts).
258
+ - Building CLIs? Use with [`@reliverse/prompts`](https://npmjs.com/@reliverse/prompts)
259
+ - Want type-safe injections? Try [`@reliverse/reinject`](https://npmjs.com/@reliverse/reinject)
260
+ - For advanced bundling? Pair with [`@reliverse/relidler`](https://npmjs.com/@reliverse/relidler)
135
261
 
136
- ## ✅ TODO
262
+ ## Roadmap
137
263
 
138
- - [x] File-based logging
139
- - [x] Timestamp support
264
+ - [x] File logging
265
+ - [x] Timestamps
140
266
  - [x] Daily logs
141
- - [x] Smart config
142
267
  - [x] Log rotation
143
- - [ ] CLI interface (optional)
144
- - [ ] Plugin support (custom formatters, log levels, etc)
268
+ - [x] `fatal` type
269
+ - [x] Runtime config
270
+ - [ ] CLI interface (to manage logs, config, etc.)
271
+ - [ ] Plugin support (custom formatters, hooks)
145
272
 
146
- ## 🙌 Shoutout
273
+ ## Thanks
147
274
 
148
- Relinka was inspired by this gem:
275
+ Relinka's DX design was inspired by this gem:
149
276
 
150
- - [unjs/consola](https://github.com/unjs/consola#readme)
277
+ - [unjs/consola](https://github.com/unjs/consola)
151
278
 
152
- ## 📄 License
279
+ ## License
153
280
 
154
- 💖 MIT © [blefnk (Nazar Kornienko)](https://github.com/blefnk)
281
+ 💖 MIT © 2025 [blefnk Nazar Kornienko](https://github.com/blefnk)
@@ -1,13 +1,13 @@
1
- import type { LogObject, LogTypeDeprecated } from "../../../../relinka-types.js";
2
- /**
3
- * A mapping of `LogTypeDeprecated` to its corresponding numeric log level.
4
- *
5
- * @type {Record<LogTypeDeprecated, number>} LogLevelsDeprecated - key-value pairs of log types to their numeric levels. See {@link LogTypeDeprecated}.
6
- */
7
- export declare const LogLevelsDeprecated: Record<LogTypeDeprecated, number>;
8
- /**
9
- * Maps `LogTypeDeprecated` to a `Partial<LogObject>`, primarily defining the log level.
10
- *
11
- * @type {Record<LogTypeDeprecated, Partial<LogObject>>} LogTypesDeprecated - key-value pairs of log types to partial log objects, specifying log levels. See {@link LogTypeDeprecated} and {@link LogObject}.
12
- */
13
- export declare const LogTypesDeprecated: Record<LogTypeDeprecated, Partial<LogObject>>;
1
+ import type { LogObject, LogTypeDeprecated } from "../../types.js";
2
+ /**
3
+ * A mapping of `LogTypeDeprecated` to its corresponding numeric log level.
4
+ *
5
+ * @type {Record<LogTypeDeprecated, number>} LogLevelsDeprecated - key-value pairs of log types to their numeric levels. See {@link LogTypeDeprecated}.
6
+ */
7
+ export declare const LogLevelsDeprecated: Record<LogTypeDeprecated, number>;
8
+ /**
9
+ * Maps `LogTypeDeprecated` to a `Partial<LogObject>`, primarily defining the log level.
10
+ *
11
+ * @type {Record<LogTypeDeprecated, Partial<LogObject>>} LogTypesDeprecated - key-value pairs of log types to partial log objects, specifying log levels. See {@link LogTypeDeprecated} and {@link LogObject}.
12
+ */
13
+ export declare const LogTypesDeprecated: Record<LogTypeDeprecated, Partial<LogObject>>;
@@ -1,19 +1,19 @@
1
- import type { RelinkaInstanceDeprecated } from "../relinka-deprecated/relinka.js";
2
- import type { RelinkaOptionsDeprecated } from "../../../../relinka-types.js";
3
- export * from "./shared.js";
4
- /**
5
- * Factory function to create a new Relinka instance
6
- *
7
- * @param {Partial<RelinkaOptionsDeprecated & { fancy: boolean }>} [options={}] - Optional configuration options. See {@link RelinkaOptionsDeprecated}.
8
- * @returns {RelinkaInstanceDeprecated} A new Relinka instance configured with the given options.
9
- */
10
- export declare function createRelinkaBaseDeprecated(options?: Partial<RelinkaOptionsDeprecated & {
11
- fancy: boolean;
12
- }>): RelinkaInstanceDeprecated;
13
- /**
14
- * Creates and exports a standard instance of Relinka with the default configuration.
15
- * This instance can be used directly for logging throughout the application.
16
- *
17
- * @type {RelinkaInstanceDeprecated} relinka - The default instance of Relinka.
18
- */
19
- export declare const relinkaBasicDeprecated: RelinkaInstanceDeprecated;
1
+ import type { RelinkaInstanceDeprecated } from "../relinka-deprecated/relinka.js";
2
+ import type { RelinkaOptionsDeprecated } from "../../types.js";
3
+ export * from "./shared.js";
4
+ /**
5
+ * Factory function to create a new Relinka instance
6
+ *
7
+ * @param {Partial<RelinkaOptionsDeprecated & { fancy: boolean }>} [options={}] - Optional configuration options. See {@link RelinkaOptionsDeprecated}.
8
+ * @returns {RelinkaInstanceDeprecated} A new Relinka instance configured with the given options.
9
+ */
10
+ export declare function createRelinkaBaseDeprecated(options?: Partial<RelinkaOptionsDeprecated & {
11
+ fancy: boolean;
12
+ }>): RelinkaInstanceDeprecated;
13
+ /**
14
+ * Creates and exports a standard instance of Relinka with the default configuration.
15
+ * This instance can be used directly for logging throughout the application.
16
+ *
17
+ * @type {RelinkaInstanceDeprecated} relinka - The default instance of Relinka.
18
+ */
19
+ export declare const relinkaBasicDeprecated: RelinkaInstanceDeprecated;
@@ -1,19 +1,19 @@
1
- import type { RelinkaOptionsDeprecated } from "../../../../relinka-types.js";
2
- import { type RelinkaInstanceDeprecated } from "../relinka-deprecated/relinka.js";
3
- export * from "./shared.js";
4
- /**
5
- * Creates a new Relinka instance configured specifically for browser environments.
6
- * This function sets up default reporters and a prompt method tailored to the browser's dialogue APIs.
7
- *
8
- * @param {Partial<RelinkaOptionsDeprecated>} [options={}] - Optional configuration options.
9
- * The options can override the default reporter and prompt behavior. See {@link RelinkaOptionsDeprecated}.
10
- * @returns {RelinkaInstanceDeprecated} A new Relinka instance optimized for use in browser environments.
11
- */
12
- export declare function createRelinkaBrowserDeprecatedDeprecated(options?: Partial<RelinkaOptionsDeprecated>): any;
13
- /**
14
- * A standard Relinka instance created with browser-specific configurations.
15
- * This instance can be used throughout a browser-based project.
16
- *
17
- * @type {RelinkaInstanceDeprecated} relinka - The default browser-configured Relinka instance.
18
- */
19
- export declare const relinkaBrowserDeprecated: RelinkaInstanceDeprecated;
1
+ import type { RelinkaOptionsDeprecated } from "../../types.js";
2
+ import { type RelinkaInstanceDeprecated } from "../relinka-deprecated/relinka.js";
3
+ export * from "./shared.js";
4
+ /**
5
+ * Creates a new Relinka instance configured specifically for browser environments.
6
+ * This function sets up default reporters and a prompt method tailored to the browser's dialogue APIs.
7
+ *
8
+ * @param {Partial<RelinkaOptionsDeprecated>} [options={}] - Optional configuration options.
9
+ * The options can override the default reporter and prompt behavior. See {@link RelinkaOptionsDeprecated}.
10
+ * @returns {RelinkaInstanceDeprecated} A new Relinka instance optimized for use in browser environments.
11
+ */
12
+ export declare function createRelinkaBrowserDeprecatedDeprecated(options?: Partial<RelinkaOptionsDeprecated>): any;
13
+ /**
14
+ * A standard Relinka instance created with browser-specific configurations.
15
+ * This instance can be used throughout a browser-based project.
16
+ *
17
+ * @type {RelinkaInstanceDeprecated} relinka - The default browser-configured Relinka instance.
18
+ */
19
+ export declare const relinkaBrowserDeprecated: RelinkaInstanceDeprecated;
@@ -0,0 +1,2 @@
1
+ export { LogTypesDeprecated } from "../levels/levels.js";
2
+ export type * from "../../types.js";
@@ -0,0 +1 @@
1
+ export { LogTypesDeprecated } from "../levels/levels.js";
@@ -1,5 +1,5 @@
1
- type MessageKind = "log" | "info" | "warn" | "error" | "success";
2
- type VerboseKind = `${MessageKind}-verbose`;
3
- type AllKinds = MessageKind | VerboseKind;
4
- export declare const relinkaDeprecated: (_kind: AllKinds, title: string, content?: string, hint?: string) => void;
5
- export {};
1
+ type MessageKind = "log" | "info" | "warn" | "error" | "success";
2
+ type VerboseKind = `${MessageKind}-verbose`;
3
+ type AllKinds = MessageKind | VerboseKind;
4
+ export declare const relinkaDeprecated: (_kind: AllKinds, title: string, content?: string, hint?: string) => void;
5
+ export {};
@@ -1,20 +1,20 @@
1
- import type { RelinkaOptionsDeprecated } from "../../../../relinka-types.js";
2
- import type { RelinkaInstanceDeprecated } from "./relinka.js";
3
- export * from "../modes/shared.js";
4
- /**
5
- * Factory function to create a new Relinka instance tailored for use in different environments.
6
- * It automatically adjusts logging levels based on environment variables and execution context.
7
- *
8
- * @param {Partial<RelinkaOptionsDeprecated & { fancy: boolean }>} [options={}] - Optional configuration options. See {@link RelinkaOptionsDeprecated}.
9
- * @returns {RelinkaInstanceDeprecated} A new Relinka instance with configurations based on the given options and the execution environment.
10
- */
11
- export declare function createRelinkaSharedDeprecated(options?: Partial<RelinkaOptionsDeprecated & {
12
- fancy: boolean;
13
- }>): RelinkaInstanceDeprecated;
14
- /**
15
- * A default instance of Relinka, created and configured for immediate use.
16
- * This instance is configured based on the execution environment and the options provided.
17
- *
18
- * @type {RelinkaInstanceDeprecated} relinka - The default Relinka instance, ready to use.
19
- */
20
- export declare const relinkaInstanceDeprecated: RelinkaInstanceDeprecated;
1
+ import type { RelinkaOptionsDeprecated } from "../../types.js";
2
+ import type { RelinkaInstanceDeprecated } from "./relinka.js";
3
+ export * from "../modes/shared.js";
4
+ /**
5
+ * Factory function to create a new Relinka instance tailored for use in different environments.
6
+ * It automatically adjusts logging levels based on environment variables and execution context.
7
+ *
8
+ * @param {Partial<RelinkaOptionsDeprecated & { fancy: boolean }>} [options={}] - Optional configuration options. See {@link RelinkaOptionsDeprecated}.
9
+ * @returns {RelinkaInstanceDeprecated} A new Relinka instance with configurations based on the given options and the execution environment.
10
+ */
11
+ export declare function createRelinkaSharedDeprecated(options?: Partial<RelinkaOptionsDeprecated & {
12
+ fancy: boolean;
13
+ }>): RelinkaInstanceDeprecated;
14
+ /**
15
+ * A default instance of Relinka, created and configured for immediate use.
16
+ * This instance is configured based on the execution environment and the options provided.
17
+ *
18
+ * @type {RelinkaInstanceDeprecated} relinka - The default Relinka instance, ready to use.
19
+ */
20
+ export declare const relinkaInstanceDeprecated: RelinkaInstanceDeprecated;