@powerlines/core 0.46.2 → 0.46.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/constants/index.cjs +5 -0
- package/dist/constants/index.d.cts +2 -2
- package/dist/constants/index.d.mts +2 -2
- package/dist/constants/index.mjs +2 -2
- package/dist/constants/log-level.cjs +47 -1
- package/dist/constants/log-level.d.cts +24 -1
- package/dist/constants/log-level.d.cts.map +1 -1
- package/dist/constants/log-level.d.mts +24 -1
- package/dist/constants/log-level.d.mts.map +1 -1
- package/dist/constants/log-level.mjs +42 -1
- package/dist/constants/log-level.mjs.map +1 -1
- package/dist/index.cjs +0 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -3
- package/dist/plugin-utils/logging.cjs +21 -19
- package/dist/plugin-utils/logging.d.cts.map +1 -1
- package/dist/plugin-utils/logging.d.mts.map +1 -1
- package/dist/plugin-utils/logging.mjs +5 -3
- package/dist/plugin-utils/logging.mjs.map +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/logging.d.cts +2 -23
- package/dist/types/logging.d.cts.map +1 -1
- package/dist/types/logging.d.mts +2 -23
- package/dist/types/logging.d.mts.map +1 -1
- package/package.json +2 -2
- package/dist/types/index.cjs +0 -1
- package/dist/types/index.mjs +0 -3
- package/dist/types/logging.cjs +0 -48
- package/dist/types/logging.mjs +0 -45
- package/dist/types/logging.mjs.map +0 -1
package/dist/constants/index.cjs
CHANGED
|
@@ -20,6 +20,11 @@ exports.DEFAULT_TEST_LOG_LEVEL = require_constants_log_level.DEFAULT_TEST_LOG_LE
|
|
|
20
20
|
exports.GLOBAL_ENVIRONMENT = require_constants_environments.GLOBAL_ENVIRONMENT;
|
|
21
21
|
exports.HOOKS_LIST_ORDERS = require_constants_hooks.HOOKS_LIST_ORDERS;
|
|
22
22
|
exports.KNOWN_PLUGIN_FIELDS = require_constants_plugin.KNOWN_PLUGIN_FIELDS;
|
|
23
|
+
exports.LOG_CATEGORIES = require_constants_log_level.LOG_CATEGORIES;
|
|
24
|
+
exports.LOG_CATEGORIES_ARRAY = require_constants_log_level.LOG_CATEGORIES_ARRAY;
|
|
25
|
+
exports.LOG_LEVELS = require_constants_log_level.LOG_LEVELS;
|
|
26
|
+
exports.LogCategories = require_constants_log_level.LogCategories;
|
|
27
|
+
exports.LogLevels = require_constants_log_level.LogLevels;
|
|
23
28
|
exports.PLUGIN_HOOKS_FIELDS = require_constants_plugin.PLUGIN_HOOKS_FIELDS;
|
|
24
29
|
exports.PLUGIN_NON_HOOK_FIELDS = require_constants_plugin.PLUGIN_NON_HOOK_FIELDS;
|
|
25
30
|
exports.POWERLINES_API_FUNCTIONS = require_constants_api.POWERLINES_API_FUNCTIONS;
|
|
@@ -3,8 +3,8 @@ import { SUPPORTED_COMMANDS } from "./commands.cjs";
|
|
|
3
3
|
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./environments.cjs";
|
|
4
4
|
import { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from "./fs.cjs";
|
|
5
5
|
import { HOOKS_LIST_ORDERS } from "./hooks.cjs";
|
|
6
|
-
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL } from "./log-level.cjs";
|
|
6
|
+
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels } from "./log-level.cjs";
|
|
7
7
|
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./meta.cjs";
|
|
8
8
|
import { BUILDER_VARIANTS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, UNPLUGIN_BUILDER_VARIANTS } from "./plugin.cjs";
|
|
9
9
|
import { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX } from "./virtual-modules.cjs";
|
|
10
|
-
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
|
10
|
+
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
|
@@ -3,8 +3,8 @@ import { SUPPORTED_COMMANDS } from "./commands.mjs";
|
|
|
3
3
|
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./environments.mjs";
|
|
4
4
|
import { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from "./fs.mjs";
|
|
5
5
|
import { HOOKS_LIST_ORDERS } from "./hooks.mjs";
|
|
6
|
-
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL } from "./log-level.mjs";
|
|
6
|
+
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels } from "./log-level.mjs";
|
|
7
7
|
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./meta.mjs";
|
|
8
8
|
import { BUILDER_VARIANTS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, UNPLUGIN_BUILDER_VARIANTS } from "./plugin.mjs";
|
|
9
9
|
import { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX } from "./virtual-modules.mjs";
|
|
10
|
-
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
|
10
|
+
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
package/dist/constants/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { BUILDER_VARIANTS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_
|
|
|
4
4
|
import { CLIENT_ENVIRONMENT, DEFAULT_ENVIRONMENT, GLOBAL_ENVIRONMENT, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT } from "./environments.mjs";
|
|
5
5
|
import { STORAGE_PRESETS, __VFS_PATCH__, __VFS_REVERT__ } from "./fs.mjs";
|
|
6
6
|
import { HOOKS_LIST_ORDERS } from "./hooks.mjs";
|
|
7
|
-
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL } from "./log-level.mjs";
|
|
7
|
+
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels } from "./log-level.mjs";
|
|
8
8
|
import { CACHE_HASH_LENGTH, ROOT_HASH_LENGTH } from "./meta.mjs";
|
|
9
9
|
import { VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX } from "./virtual-modules.mjs";
|
|
10
10
|
|
|
11
|
-
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
|
11
|
+
export { BASE_API_FUNCTIONS, BUILDER_VARIANTS, CACHE_HASH_LENGTH, CLIENT_ENVIRONMENT, DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_ENVIRONMENT, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, GLOBAL_ENVIRONMENT, HOOKS_LIST_ORDERS, KNOWN_PLUGIN_FIELDS, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels, PLUGIN_HOOKS_FIELDS, PLUGIN_NON_HOOK_FIELDS, POWERLINES_API_FUNCTIONS, ROOT_HASH_LENGTH, RSC_ENVIRONMENT, SERVER_ENVIRONMENT, SSR_ENVIRONMENT, STORAGE_PRESETS, SUPPORTED_COMMANDS, UNPLUGIN_BUILDER_VARIANTS, VIRTUAL_MODULE_PREFIX, VIRTUAL_MODULE_PREFIX_REGEX, __VFS_PATCH__, __VFS_REVERT__ };
|
|
@@ -1,6 +1,47 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
//#region src/constants/log-level.ts
|
|
4
|
+
const LogLevels = {
|
|
5
|
+
SILENT: "silent",
|
|
6
|
+
ERROR: "error",
|
|
7
|
+
WARN: "warn",
|
|
8
|
+
INFO: "info",
|
|
9
|
+
DEBUG: "debug",
|
|
10
|
+
TRACE: "trace"
|
|
11
|
+
};
|
|
12
|
+
const LOG_LEVELS = [
|
|
13
|
+
LogLevels.SILENT,
|
|
14
|
+
LogLevels.ERROR,
|
|
15
|
+
LogLevels.WARN,
|
|
16
|
+
LogLevels.INFO,
|
|
17
|
+
LogLevels.DEBUG,
|
|
18
|
+
LogLevels.TRACE
|
|
19
|
+
];
|
|
20
|
+
const LogCategories = {
|
|
21
|
+
GENERAL: "general",
|
|
22
|
+
FS: "fs",
|
|
23
|
+
PERFORMANCE: "performance",
|
|
24
|
+
CONFIG: "config",
|
|
25
|
+
PLUGINS: "plugins",
|
|
26
|
+
HOOKS: "hooks",
|
|
27
|
+
ENV: "env",
|
|
28
|
+
IPC: "ipc",
|
|
29
|
+
BABEL: "babel",
|
|
30
|
+
NETWORK: "network"
|
|
31
|
+
};
|
|
32
|
+
const LOG_CATEGORIES_ARRAY = Object.values(LogCategories);
|
|
33
|
+
const LOG_CATEGORIES = [
|
|
34
|
+
LogCategories.GENERAL,
|
|
35
|
+
LogCategories.FS,
|
|
36
|
+
LogCategories.PERFORMANCE,
|
|
37
|
+
LogCategories.CONFIG,
|
|
38
|
+
LogCategories.PLUGINS,
|
|
39
|
+
LogCategories.HOOKS,
|
|
40
|
+
LogCategories.ENV,
|
|
41
|
+
LogCategories.IPC,
|
|
42
|
+
LogCategories.NETWORK,
|
|
43
|
+
LogCategories.BABEL
|
|
44
|
+
];
|
|
4
45
|
const DEFAULT_DEVELOPMENT_LOG_LEVEL = {
|
|
5
46
|
general: "debug",
|
|
6
47
|
fs: "info",
|
|
@@ -41,4 +82,9 @@ const DEFAULT_PRODUCTION_LOG_LEVEL = {
|
|
|
41
82
|
//#endregion
|
|
42
83
|
exports.DEFAULT_DEVELOPMENT_LOG_LEVEL = DEFAULT_DEVELOPMENT_LOG_LEVEL;
|
|
43
84
|
exports.DEFAULT_PRODUCTION_LOG_LEVEL = DEFAULT_PRODUCTION_LOG_LEVEL;
|
|
44
|
-
exports.DEFAULT_TEST_LOG_LEVEL = DEFAULT_TEST_LOG_LEVEL;
|
|
85
|
+
exports.DEFAULT_TEST_LOG_LEVEL = DEFAULT_TEST_LOG_LEVEL;
|
|
86
|
+
exports.LOG_CATEGORIES = LOG_CATEGORIES;
|
|
87
|
+
exports.LOG_CATEGORIES_ARRAY = LOG_CATEGORIES_ARRAY;
|
|
88
|
+
exports.LOG_LEVELS = LOG_LEVELS;
|
|
89
|
+
exports.LogCategories = LogCategories;
|
|
90
|
+
exports.LogLevels = LogLevels;
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
//#region src/constants/log-level.d.ts
|
|
2
|
+
declare const LogLevels: {
|
|
3
|
+
readonly SILENT: "silent";
|
|
4
|
+
readonly ERROR: "error";
|
|
5
|
+
readonly WARN: "warn";
|
|
6
|
+
readonly INFO: "info";
|
|
7
|
+
readonly DEBUG: "debug";
|
|
8
|
+
readonly TRACE: "trace";
|
|
9
|
+
};
|
|
10
|
+
declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug", "trace"];
|
|
11
|
+
declare const LogCategories: {
|
|
12
|
+
readonly GENERAL: "general";
|
|
13
|
+
readonly FS: "fs";
|
|
14
|
+
readonly PERFORMANCE: "performance";
|
|
15
|
+
readonly CONFIG: "config";
|
|
16
|
+
readonly PLUGINS: "plugins";
|
|
17
|
+
readonly HOOKS: "hooks";
|
|
18
|
+
readonly ENV: "env";
|
|
19
|
+
readonly IPC: "ipc";
|
|
20
|
+
readonly BABEL: "babel";
|
|
21
|
+
readonly NETWORK: "network";
|
|
22
|
+
};
|
|
23
|
+
declare const LOG_CATEGORIES_ARRAY: ("plugins" | "config" | "fs" | "general" | "performance" | "hooks" | "env" | "ipc" | "babel" | "network")[];
|
|
24
|
+
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "env", "ipc", "network", "babel"];
|
|
2
25
|
declare const DEFAULT_DEVELOPMENT_LOG_LEVEL: {
|
|
3
26
|
readonly general: "debug";
|
|
4
27
|
readonly fs: "info";
|
|
@@ -36,5 +59,5 @@ declare const DEFAULT_PRODUCTION_LOG_LEVEL: {
|
|
|
36
59
|
readonly babel: "warn";
|
|
37
60
|
};
|
|
38
61
|
//#endregion
|
|
39
|
-
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL };
|
|
62
|
+
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels };
|
|
40
63
|
//# sourceMappingURL=log-level.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-level.d.cts","names":[],"sources":["../../src/constants/log-level.ts"],"mappings":";cAkBa,6BAAA;EAAA;;;;;;;;;;;cAaA,sBAAA;EAAA;;;;;;;;;;;cAaA,4BAAA;EAAA"}
|
|
1
|
+
{"version":3,"file":"log-level.d.cts","names":[],"sources":["../../src/constants/log-level.ts"],"mappings":";cAkBa,SAAA;EAAA;;;;;;;cASA,UAAA;AAAA,cASA,aAAA;EAAA;;;;;;;;;;;cAaA,oBAAA;AAAA,cAEA,cAAA;AAAA,cAaA,6BAAA;EAAA;;;;;;;;;;;cAaA,sBAAA;EAAA;;;;;;;;;;;cAaA,4BAAA;EAAA"}
|
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
//#region src/constants/log-level.d.ts
|
|
2
|
+
declare const LogLevels: {
|
|
3
|
+
readonly SILENT: "silent";
|
|
4
|
+
readonly ERROR: "error";
|
|
5
|
+
readonly WARN: "warn";
|
|
6
|
+
readonly INFO: "info";
|
|
7
|
+
readonly DEBUG: "debug";
|
|
8
|
+
readonly TRACE: "trace";
|
|
9
|
+
};
|
|
10
|
+
declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug", "trace"];
|
|
11
|
+
declare const LogCategories: {
|
|
12
|
+
readonly GENERAL: "general";
|
|
13
|
+
readonly FS: "fs";
|
|
14
|
+
readonly PERFORMANCE: "performance";
|
|
15
|
+
readonly CONFIG: "config";
|
|
16
|
+
readonly PLUGINS: "plugins";
|
|
17
|
+
readonly HOOKS: "hooks";
|
|
18
|
+
readonly ENV: "env";
|
|
19
|
+
readonly IPC: "ipc";
|
|
20
|
+
readonly BABEL: "babel";
|
|
21
|
+
readonly NETWORK: "network";
|
|
22
|
+
};
|
|
23
|
+
declare const LOG_CATEGORIES_ARRAY: ("plugins" | "config" | "fs" | "general" | "performance" | "hooks" | "env" | "ipc" | "babel" | "network")[];
|
|
24
|
+
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "env", "ipc", "network", "babel"];
|
|
2
25
|
declare const DEFAULT_DEVELOPMENT_LOG_LEVEL: {
|
|
3
26
|
readonly general: "debug";
|
|
4
27
|
readonly fs: "info";
|
|
@@ -36,5 +59,5 @@ declare const DEFAULT_PRODUCTION_LOG_LEVEL: {
|
|
|
36
59
|
readonly babel: "warn";
|
|
37
60
|
};
|
|
38
61
|
//#endregion
|
|
39
|
-
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL };
|
|
62
|
+
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels };
|
|
40
63
|
//# sourceMappingURL=log-level.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-level.d.mts","names":[],"sources":["../../src/constants/log-level.ts"],"mappings":";cAkBa,6BAAA;EAAA;;;;;;;;;;;cAaA,sBAAA;EAAA;;;;;;;;;;;cAaA,4BAAA;EAAA"}
|
|
1
|
+
{"version":3,"file":"log-level.d.mts","names":[],"sources":["../../src/constants/log-level.ts"],"mappings":";cAkBa,SAAA;EAAA;;;;;;;cASA,UAAA;AAAA,cASA,aAAA;EAAA;;;;;;;;;;;cAaA,oBAAA;AAAA,cAEA,cAAA;AAAA,cAaA,6BAAA;EAAA;;;;;;;;;;;cAaA,sBAAA;EAAA;;;;;;;;;;;cAaA,4BAAA;EAAA"}
|
|
@@ -1,4 +1,45 @@
|
|
|
1
1
|
//#region src/constants/log-level.ts
|
|
2
|
+
const LogLevels = {
|
|
3
|
+
SILENT: "silent",
|
|
4
|
+
ERROR: "error",
|
|
5
|
+
WARN: "warn",
|
|
6
|
+
INFO: "info",
|
|
7
|
+
DEBUG: "debug",
|
|
8
|
+
TRACE: "trace"
|
|
9
|
+
};
|
|
10
|
+
const LOG_LEVELS = [
|
|
11
|
+
LogLevels.SILENT,
|
|
12
|
+
LogLevels.ERROR,
|
|
13
|
+
LogLevels.WARN,
|
|
14
|
+
LogLevels.INFO,
|
|
15
|
+
LogLevels.DEBUG,
|
|
16
|
+
LogLevels.TRACE
|
|
17
|
+
];
|
|
18
|
+
const LogCategories = {
|
|
19
|
+
GENERAL: "general",
|
|
20
|
+
FS: "fs",
|
|
21
|
+
PERFORMANCE: "performance",
|
|
22
|
+
CONFIG: "config",
|
|
23
|
+
PLUGINS: "plugins",
|
|
24
|
+
HOOKS: "hooks",
|
|
25
|
+
ENV: "env",
|
|
26
|
+
IPC: "ipc",
|
|
27
|
+
BABEL: "babel",
|
|
28
|
+
NETWORK: "network"
|
|
29
|
+
};
|
|
30
|
+
const LOG_CATEGORIES_ARRAY = Object.values(LogCategories);
|
|
31
|
+
const LOG_CATEGORIES = [
|
|
32
|
+
LogCategories.GENERAL,
|
|
33
|
+
LogCategories.FS,
|
|
34
|
+
LogCategories.PERFORMANCE,
|
|
35
|
+
LogCategories.CONFIG,
|
|
36
|
+
LogCategories.PLUGINS,
|
|
37
|
+
LogCategories.HOOKS,
|
|
38
|
+
LogCategories.ENV,
|
|
39
|
+
LogCategories.IPC,
|
|
40
|
+
LogCategories.NETWORK,
|
|
41
|
+
LogCategories.BABEL
|
|
42
|
+
];
|
|
2
43
|
const DEFAULT_DEVELOPMENT_LOG_LEVEL = {
|
|
3
44
|
general: "debug",
|
|
4
45
|
fs: "info",
|
|
@@ -37,5 +78,5 @@ const DEFAULT_PRODUCTION_LOG_LEVEL = {
|
|
|
37
78
|
};
|
|
38
79
|
|
|
39
80
|
//#endregion
|
|
40
|
-
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL };
|
|
81
|
+
export { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels };
|
|
41
82
|
//# sourceMappingURL=log-level.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-level.mjs","names":[],"sources":["../../src/constants/log-level.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const DEFAULT_DEVELOPMENT_LOG_LEVEL = {\n general: \"debug\",\n fs: \"info\",\n config: \"info\",\n plugins: \"debug\",\n hooks: \"debug\",\n performance: \"debug\",\n env: \"info\",\n ipc: \"info\",\n network: \"debug\",\n babel: \"debug\"\n} as const;\n\nexport const DEFAULT_TEST_LOG_LEVEL = {\n general: \"info\",\n fs: \"warn\",\n config: \"warn\",\n plugins: \"warn\",\n hooks: \"warn\",\n performance: \"info\",\n env: \"warn\",\n ipc: \"warn\",\n network: \"warn\",\n babel: \"warn\"\n} as const;\n\nexport const DEFAULT_PRODUCTION_LOG_LEVEL = {\n general: \"info\",\n fs: \"error\",\n config: \"warn\",\n plugins: \"warn\",\n hooks: \"warn\",\n performance: \"info\",\n env: \"error\",\n ipc: \"error\",\n network: \"error\",\n babel: \"warn\"\n} as const;\n"],"mappings":";AAkBA,MAAa,gCAAgC;CAC3C,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR;AAED,MAAa,yBAAyB;CACpC,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR;AAED,MAAa,+BAA+B;CAC1C,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR"}
|
|
1
|
+
{"version":3,"file":"log-level.mjs","names":[],"sources":["../../src/constants/log-level.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nexport const LogLevels = {\n SILENT: \"silent\",\n ERROR: \"error\",\n WARN: \"warn\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\"\n} as const;\n\nexport const LOG_LEVELS = [\n LogLevels.SILENT,\n LogLevels.ERROR,\n LogLevels.WARN,\n LogLevels.INFO,\n LogLevels.DEBUG,\n LogLevels.TRACE\n] as const;\n\nexport const LogCategories = {\n GENERAL: \"general\",\n FS: \"fs\",\n PERFORMANCE: \"performance\",\n CONFIG: \"config\",\n PLUGINS: \"plugins\",\n HOOKS: \"hooks\",\n ENV: \"env\",\n IPC: \"ipc\",\n BABEL: \"babel\",\n NETWORK: \"network\"\n} as const;\n\nexport const LOG_CATEGORIES_ARRAY = Object.values(LogCategories);\n\nexport const LOG_CATEGORIES = [\n LogCategories.GENERAL,\n LogCategories.FS,\n LogCategories.PERFORMANCE,\n LogCategories.CONFIG,\n LogCategories.PLUGINS,\n LogCategories.HOOKS,\n LogCategories.ENV,\n LogCategories.IPC,\n LogCategories.NETWORK,\n LogCategories.BABEL\n] as const;\n\nexport const DEFAULT_DEVELOPMENT_LOG_LEVEL = {\n general: \"debug\",\n fs: \"info\",\n config: \"info\",\n plugins: \"debug\",\n hooks: \"debug\",\n performance: \"debug\",\n env: \"info\",\n ipc: \"info\",\n network: \"debug\",\n babel: \"debug\"\n} as const;\n\nexport const DEFAULT_TEST_LOG_LEVEL = {\n general: \"info\",\n fs: \"warn\",\n config: \"warn\",\n plugins: \"warn\",\n hooks: \"warn\",\n performance: \"info\",\n env: \"warn\",\n ipc: \"warn\",\n network: \"warn\",\n babel: \"warn\"\n} as const;\n\nexport const DEFAULT_PRODUCTION_LOG_LEVEL = {\n general: \"info\",\n fs: \"error\",\n config: \"warn\",\n plugins: \"warn\",\n hooks: \"warn\",\n performance: \"info\",\n env: \"error\",\n ipc: \"error\",\n network: \"error\",\n babel: \"warn\"\n} as const;\n"],"mappings":";AAkBA,MAAa,YAAY;CACvB,QAAQ;CACR,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;CACR;AAED,MAAa,aAAa;CACxB,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACX;AAED,MAAa,gBAAgB;CAC3B,SAAS;CACT,IAAI;CACJ,aAAa;CACb,QAAQ;CACR,SAAS;CACT,OAAO;CACP,KAAK;CACL,KAAK;CACL,OAAO;CACP,SAAS;CACV;AAED,MAAa,uBAAuB,OAAO,OAAO,cAAc;AAEhE,MAAa,iBAAiB;CAC5B,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACf;AAED,MAAa,gCAAgC;CAC3C,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR;AAED,MAAa,yBAAyB;CACpC,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR;AAED,MAAa,+BAA+B;CAC1C,SAAS;CACT,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;CACL,SAAS;CACT,OAAO;CACR"}
|
package/dist/index.cjs
CHANGED
|
@@ -10,13 +10,7 @@ const require_lib_utilities_format = require('./lib/utilities/format.cjs');
|
|
|
10
10
|
const require_lib_utilities_source_map = require('./lib/utilities/source-map.cjs');
|
|
11
11
|
const require_lib_utilities_write_file = require('./lib/utilities/write-file.cjs');
|
|
12
12
|
require('./lib/index.cjs');
|
|
13
|
-
const require_logging = require('./types/logging.cjs');
|
|
14
|
-
require('./types/index.cjs');
|
|
15
13
|
|
|
16
|
-
exports.LOG_CATEGORIES = require_logging.LOG_CATEGORIES;
|
|
17
|
-
exports.LOG_LEVELS = require_logging.LOG_LEVELS;
|
|
18
|
-
exports.LogCategories = require_logging.LogCategories;
|
|
19
|
-
exports.LogLevels = require_logging.LogLevels;
|
|
20
14
|
exports.combineContexts = require_lib_unplugin_helpers.combineContexts;
|
|
21
15
|
exports.createUnplugin = require_lib_unplugin_plugin.createUnplugin;
|
|
22
16
|
exports.createUnpluginModuleResolutionFunctions = require_lib_unplugin_module_resolution.createUnpluginModuleResolutionFunctions;
|
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
5
5
|
import { WorkerProcess, __ΩWorkerProcess } from "./types/utils.cjs";
|
|
6
6
|
import { API, APIFunctions, BaseAPIFunctions, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, SupportedCommands, __ΩAPI, __ΩAPIFunctions, __ΩBaseAPIFunctions, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩSupportedCommands } from "./types/api.cjs";
|
|
7
7
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.cjs";
|
|
8
|
-
import { CustomLogger, CustomLoggerMessage,
|
|
8
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./types/logging.cjs";
|
|
9
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.cjs";
|
|
10
10
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./types/context.cjs";
|
|
11
11
|
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InferOverridableConfig, InitialPluginConfig, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInferOverridableConfig, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./types/config.cjs";
|
|
@@ -19,4 +19,4 @@ import { format, formatFolder } from "./lib/utilities/format.cjs";
|
|
|
19
19
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.cjs";
|
|
20
20
|
import { generateSourceMap } from "./lib/utilities/source-map.cjs";
|
|
21
21
|
import { writeFile } from "./lib/utilities/write-file.cjs";
|
|
22
|
-
export { API, APIFunctions, AnyOutputUserConfig, AnyUserConfig, BaseAPIFunctions, BaseCommandType, BaseContext, BasePlugin, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, Context, CopyConfig, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, Engine, EngineContext, EngineOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, Execution, ExecutionContext, ExecutionOptions, ExecutionState, ExecutionStateItem, ExecutionWorkerParams, ExecutionWorkerProcess, FetchOptions, FileHeaderOptions, HookExecutionStateItem, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialPluginConfig, InlineConfig,
|
|
22
|
+
export { API, APIFunctions, AnyOutputUserConfig, AnyUserConfig, BaseAPIFunctions, BaseCommandType, BaseContext, BasePlugin, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, Context, CopyConfig, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, Engine, EngineContext, EngineOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, Execution, ExecutionContext, ExecutionOptions, ExecutionState, ExecutionStateItem, ExecutionWorkerParams, ExecutionWorkerProcess, FetchOptions, FileHeaderOptions, HookExecutionStateItem, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialPluginConfig, InlineConfig, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NewInlineConfig, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesCommand, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypesInlineConfig, TypesResult, UnimportContext, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginInitialConfig, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigFn, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkerProcess, WorkspaceConfig, WriteData, WriteOptions, __ΩAPI, __ΩAPIFunctions, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseAPIFunctions, __ΩBaseCommandType, __ΩBaseContext, __ΩBasePlugin, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfig, __ΩContext, __ΩCopyConfig, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngine, __ΩEngineContext, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩExecution, __ΩExecutionContext, __ΩExecutionOptions, __ΩExecutionState, __ΩExecutionStateItem, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩHookExecutionStateItem, __ΩHookFunctions, __ΩHookListOrders, __ΩHooks, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferOverridableConfig, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩInitContextOptions, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLevel, __ΩLintInlineConfig, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩMetaInfo, __ΩMode, __ΩNewInlineConfig, __ΩNormalizedStringFilter, __ΩOptions, __ΩOutputConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFilter, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPowerlinesMessage, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolveResult, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩSupportedCommands, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTestInlineConfig, __ΩTransformHookFilter, __ΩTransformResult, __ΩTypesInlineConfig, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginInitialConfig, __ΩUnpluginOptions, __ΩUnresolvedContext, __ΩUserConfig, __ΩUserConfigFn, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkerProcess, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, combineContexts, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
5
5
|
import { WorkerProcess, __ΩWorkerProcess } from "./types/utils.mjs";
|
|
6
6
|
import { API, APIFunctions, BaseAPIFunctions, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, SupportedCommands, __ΩAPI, __ΩAPIFunctions, __ΩBaseAPIFunctions, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩSupportedCommands } from "./types/api.mjs";
|
|
7
7
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./types/fs.mjs";
|
|
8
|
-
import { CustomLogger, CustomLoggerMessage,
|
|
8
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./types/logging.mjs";
|
|
9
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./types/tsconfig.mjs";
|
|
10
10
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./types/context.mjs";
|
|
11
11
|
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InferOverridableConfig, InitialPluginConfig, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInferOverridableConfig, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./types/config.mjs";
|
|
@@ -19,4 +19,4 @@ import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
|
19
19
|
import { getMagicString, getSourceFile, getString } from "./lib/utilities/source-file.mjs";
|
|
20
20
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
21
21
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
22
|
-
export { API, APIFunctions, AnyOutputUserConfig, AnyUserConfig, BaseAPIFunctions, BaseCommandType, BaseContext, BasePlugin, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, Context, CopyConfig, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, Engine, EngineContext, EngineOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, Execution, ExecutionContext, ExecutionOptions, ExecutionState, ExecutionStateItem, ExecutionWorkerParams, ExecutionWorkerProcess, FetchOptions, FileHeaderOptions, HookExecutionStateItem, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialPluginConfig, InlineConfig,
|
|
22
|
+
export { API, APIFunctions, AnyOutputUserConfig, AnyUserConfig, BaseAPIFunctions, BaseCommandType, BaseContext, BasePlugin, BuildInlineConfig, BuildPluginContext, BuilderVariant, CallHookOptions, CleanInlineConfig, CommandType, Commands, Config, Context, CopyConfig, CreateUnpluginModuleResolutionFunctionsOptions, CreateUnpluginOptions, CreateUnpluginResolverOptions, CustomLogger, CustomLoggerMessage, DeepkitOptions, DeployInlineConfig, DocsInlineConfig, EmitEntryOptions, EmitOptions, Engine, EngineContext, EngineOptions, EnvironmentConfig, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, Execution, ExecutionContext, ExecutionOptions, ExecutionState, ExecutionStateItem, ExecutionWorkerParams, ExecutionWorkerProcess, FetchOptions, FileHeaderOptions, HookExecutionStateItem, HookFunctions, HookListOrders, Hooks, HooksList, HooksListItem, InferHookFunction, InferHookParameters, InferHookReturnType, InferHookThisType, InferOverridableConfig, InferUnpluginOptions, InferUnpluginVariant, InitContextOptions, InitialPluginConfig, InlineConfig, Level, LintInlineConfig, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, MetaInfo, Mode, NewInlineConfig, NormalizedStringFilter, Options, OutputConfig, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PartiallyResolvedContext, Plugin, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginContext, PluginFactory, PluginFilter, PluginHook, PluginHookFields, PluginHookObject, PluginHooks, PluginNonHookFields, PowerlinesCommand, PowerlinesMessage, PrepareInlineConfig, ProjectType, RawReflectionMode, ReflectionMode, ResolveConfig, ResolveOptions, ResolveResult, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, StorageAdapter, StoragePort, StoragePreset, SupportedCommands, TSCompilerOptions, TSConfig, TestInlineConfig, TransformHookFilter, TransformResult, TypesInlineConfig, TypesResult, UnimportContext, UnpluginAsyncFactory, UnpluginBuilderVariant, UnpluginFactory, UnpluginHookFunctions, UnpluginInitialConfig, UnpluginOptions, UnresolvedContext, UserConfig, UserConfigFn, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WithUnpluginBuildContext, WorkerProcess, WorkspaceConfig, WriteData, WriteOptions, __ΩAPI, __ΩAPIFunctions, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBaseAPIFunctions, __ΩBaseCommandType, __ΩBaseContext, __ΩBasePlugin, __ΩBuildInlineConfig, __ΩBuildPluginContext, __ΩBuilderVariant, __ΩCallHookOptions, __ΩCleanInlineConfig, __ΩCommandType, __ΩCommands, __ΩConfig, __ΩContext, __ΩCopyConfig, __ΩCreateUnpluginModuleResolutionFunctionsOptions, __ΩCreateUnpluginOptions, __ΩCreateUnpluginResolverOptions, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩDeepkitOptions, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngine, __ΩEngineContext, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩEnvironmentResolvedConfig, __ΩExecution, __ΩExecutionContext, __ΩExecutionOptions, __ΩExecutionState, __ΩExecutionStateItem, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩFetchOptions, __ΩFileHeaderOptions, __ΩHookExecutionStateItem, __ΩHookFunctions, __ΩHookListOrders, __ΩHooks, __ΩHooksList, __ΩHooksListItem, __ΩInferHookFunction, __ΩInferHookParameters, __ΩInferHookReturnType, __ΩInferHookThisType, __ΩInferOverridableConfig, __ΩInferUnpluginOptions, __ΩInferUnpluginVariant, __ΩInitContextOptions, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLevel, __ΩLintInlineConfig, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩMetaInfo, __ΩMode, __ΩNewInlineConfig, __ΩNormalizedStringFilter, __ΩOptions, __ΩOutputConfig, __ΩParseOptions, __ΩParsedTypeScriptConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPartiallyResolvedContext, __ΩPlugin, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginContext, __ΩPluginFactory, __ΩPluginFilter, __ΩPluginHook, __ΩPluginHookFields, __ΩPluginHookObject, __ΩPluginHooks, __ΩPluginNonHookFields, __ΩPowerlinesCommand, __ΩPowerlinesMessage, __ΩPrepareInlineConfig, __ΩProjectType, __ΩRawReflectionMode, __ΩReflectionMode, __ΩResolveConfig, __ΩResolveOptions, __ΩResolveResult, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩSupportedCommands, __ΩTSCompilerOptions, __ΩTSConfig, __ΩTestInlineConfig, __ΩTransformHookFilter, __ΩTransformResult, __ΩTypesInlineConfig, __ΩTypesResult, __ΩUnimportContext, __ΩUnpluginAsyncFactory, __ΩUnpluginBuilderVariant, __ΩUnpluginFactory, __ΩUnpluginHookFunctions, __ΩUnpluginInitialConfig, __ΩUnpluginOptions, __ΩUnresolvedContext, __ΩUserConfig, __ΩUserConfigFn, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWithUnpluginBuildContext, __ΩWorkerProcess, __ΩWorkspaceConfig, __ΩWriteData, __ΩWriteOptions, combineContexts, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,5 @@ import { format, formatFolder } from "./lib/utilities/format.mjs";
|
|
|
9
9
|
import { generateSourceMap } from "./lib/utilities/source-map.mjs";
|
|
10
10
|
import { writeFile } from "./lib/utilities/write-file.mjs";
|
|
11
11
|
import "./lib/index.mjs";
|
|
12
|
-
import { LOG_CATEGORIES, LOG_LEVELS, LogCategories, LogLevels } from "./types/logging.mjs";
|
|
13
|
-
import "./types/index.mjs";
|
|
14
12
|
|
|
15
|
-
export {
|
|
13
|
+
export { combineContexts, createUnplugin, createUnpluginModuleResolutionFunctions, createUnpluginResolver, defineConfig, format, formatFolder, generateSourceMap, getFileHeader, getFileHeaderWarning, getFileHeaderWarningText, getMagicString, getSourceFile, getString, getTypescriptFileHeader, getUniqueInputs, isResolvedEntryTypeDefinition, isTypeDefinition, isUnpluginBuilderVariant, loadUserConfigFile, loadWorkspaceConfig, resolveEntryOutput, resolveInput, resolveInputs, resolveInputsSync, writeFile };
|
|
@@ -2,7 +2,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_constants_environments = require('../constants/environments.cjs');
|
|
4
4
|
const require_constants_log_level = require('../constants/log-level.cjs');
|
|
5
|
-
const require_logging = require('../types/logging.cjs');
|
|
6
5
|
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
7
6
|
let defu = require("defu");
|
|
8
7
|
let _stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
@@ -74,7 +73,10 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
74
73
|
config: defaultLogLevel.config,
|
|
75
74
|
babel: logLevel
|
|
76
75
|
};
|
|
77
|
-
else if ((0, _stryke_type_checks_is_set_object.isSetObject)(logLevel))
|
|
76
|
+
else if ((0, _stryke_type_checks_is_set_object.isSetObject)(logLevel)) {
|
|
77
|
+
if (Object.values(logLevel).filter((level) => (0, _stryke_type_checks_is_set_string.isSetString)(level)).length === require_constants_log_level.LOG_CATEGORIES_ARRAY.length) return logLevel;
|
|
78
|
+
return (0, defu.defu)(logLevel, defaultLogLevel);
|
|
79
|
+
}
|
|
78
80
|
return defaultLogLevel;
|
|
79
81
|
}
|
|
80
82
|
const BADGE_COLORS = [
|
|
@@ -131,12 +133,12 @@ const colorBackground = (text) => {
|
|
|
131
133
|
const title = (0, _stryke_string_format_title_case.titleCase)(text);
|
|
132
134
|
return chalk.default.inverse.hex(getTextColor(title))(` ${title} `);
|
|
133
135
|
};
|
|
134
|
-
const consoleLog = (meta, ...args) => (0, _storm_software_config_tools_logger.getLogFn)((0, _storm_software_config_tools_logger.getLogLevel)(meta.category ===
|
|
136
|
+
const consoleLog = (meta, ...args) => (0, _storm_software_config_tools_logger.getLogFn)((0, _storm_software_config_tools_logger.getLogLevel)(meta.category === require_constants_log_level.LogCategories.PERFORMANCE ? "performance" : meta.type), { logLevel: "all" })(`${meta.name ? chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.name)) : ""}${meta.name ? chalk.default.grey(" > ") : ""}${meta.command ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.command))}${chalk.default.grey(" > ")}` : ""}${meta.environment && (0, _stryke_string_format_kebab_case.kebabCase)(meta.environment) !== "default" ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.environment))}${chalk.default.grey(" > ")}` : ""}${meta.plugin ? `${chalk.default.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.default.grey(" > ")}` : ""}${meta.source ? `${chalk.default.bold.hex(BRAND_COLOR)((0, _stryke_string_format_kebab_case.kebabCase)(meta.source))}${chalk.default.grey(" > ")}` : ""}${meta.category && meta.category !== require_constants_log_level.LogCategories.GENERAL && meta.category !== require_constants_log_level.LogCategories.PERFORMANCE ? `${colorBackground((0, _stryke_string_format_kebab_case.kebabCase)(meta.category))} ` : ""}${args.join(" ")} `.trim());
|
|
135
137
|
function isValidLogLevel(logLevel, type) {
|
|
136
|
-
if (logLevel ===
|
|
137
|
-
return
|
|
138
|
+
if (logLevel === require_constants_log_level.LogLevels.SILENT) return false;
|
|
139
|
+
return require_constants_log_level.LOG_LEVELS.indexOf(logLevel) >= require_constants_log_level.LOG_LEVELS.indexOf(type);
|
|
138
140
|
}
|
|
139
|
-
function isValidLogLevelConfig(type, logLevel, category =
|
|
141
|
+
function isValidLogLevelConfig(type, logLevel, category = require_constants_log_level.LogCategories.GENERAL) {
|
|
140
142
|
return isValidLogLevel(logLevel[category], type);
|
|
141
143
|
}
|
|
142
144
|
/**
|
|
@@ -152,19 +154,19 @@ const createLogFn = (name, options) => {
|
|
|
152
154
|
const logMeta = (0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? {
|
|
153
155
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
154
156
|
timestamp: Date.now(),
|
|
155
|
-
category:
|
|
157
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
156
158
|
...options,
|
|
157
159
|
...meta,
|
|
158
160
|
name
|
|
159
161
|
} : {
|
|
160
162
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
161
163
|
timestamp: Date.now(),
|
|
162
|
-
category:
|
|
164
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
163
165
|
...options,
|
|
164
166
|
type: meta,
|
|
165
167
|
name
|
|
166
168
|
};
|
|
167
|
-
if (logMeta.$$ipc || isValidLogLevelConfig(logMeta.type, logLevel, logMeta.category ? logMeta.category :
|
|
169
|
+
if (logMeta.$$ipc || isValidLogLevelConfig(logMeta.type, logLevel, logMeta.category ? logMeta.category : require_constants_log_level.LogCategories.GENERAL)) consoleLog(logMeta, ...args);
|
|
168
170
|
};
|
|
169
171
|
};
|
|
170
172
|
const validateLogger = (type, name, options, callback) => {
|
|
@@ -176,7 +178,7 @@ const validateLogger = (type, name, options, callback) => {
|
|
|
176
178
|
meta: {
|
|
177
179
|
type,
|
|
178
180
|
name,
|
|
179
|
-
category:
|
|
181
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
180
182
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
181
183
|
timestamp: Date.now(),
|
|
182
184
|
...options
|
|
@@ -189,7 +191,7 @@ const validateLogger = (type, name, options, callback) => {
|
|
|
189
191
|
meta: {
|
|
190
192
|
type,
|
|
191
193
|
name,
|
|
192
|
-
category:
|
|
194
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
193
195
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
194
196
|
timestamp: Date.now(),
|
|
195
197
|
plugin: message.plugin,
|
|
@@ -207,7 +209,7 @@ const validateCustomLogger = (type, name, options, callback, customCallback) =>
|
|
|
207
209
|
name,
|
|
208
210
|
plugin: options.plugin,
|
|
209
211
|
meta: {
|
|
210
|
-
category:
|
|
212
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
211
213
|
...options,
|
|
212
214
|
type,
|
|
213
215
|
name,
|
|
@@ -220,7 +222,7 @@ const validateCustomLogger = (type, name, options, callback, customCallback) =>
|
|
|
220
222
|
plugin: options.plugin,
|
|
221
223
|
...message,
|
|
222
224
|
meta: {
|
|
223
|
-
category:
|
|
225
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
224
226
|
...options,
|
|
225
227
|
type,
|
|
226
228
|
name,
|
|
@@ -309,7 +311,7 @@ const withLogFn = (logger, logFn) => {
|
|
|
309
311
|
error: validateLogger("error", logger.options.name, logger.options, (msg) => {
|
|
310
312
|
logger.error?.(msg);
|
|
311
313
|
logFn({
|
|
312
|
-
category:
|
|
314
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
313
315
|
...logger.options,
|
|
314
316
|
type: "error",
|
|
315
317
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
@@ -320,7 +322,7 @@ const withLogFn = (logger, logFn) => {
|
|
|
320
322
|
warn: validateLogger("warn", logger.options.name, logger.options, (msg) => {
|
|
321
323
|
logger.warn?.(msg);
|
|
322
324
|
logFn({
|
|
323
|
-
category:
|
|
325
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
324
326
|
...logger.options,
|
|
325
327
|
type: "warn",
|
|
326
328
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
@@ -331,7 +333,7 @@ const withLogFn = (logger, logFn) => {
|
|
|
331
333
|
info: validateLogger("info", logger.options.name, logger.options, (msg) => {
|
|
332
334
|
logger.info?.(msg);
|
|
333
335
|
logFn({
|
|
334
|
-
category:
|
|
336
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
335
337
|
...logger.options,
|
|
336
338
|
type: "info",
|
|
337
339
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
@@ -342,7 +344,7 @@ const withLogFn = (logger, logFn) => {
|
|
|
342
344
|
debug: validateLogger("debug", logger.options.name, logger.options, (msg) => {
|
|
343
345
|
logger.debug?.(msg);
|
|
344
346
|
logFn({
|
|
345
|
-
category:
|
|
347
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
346
348
|
...logger.options,
|
|
347
349
|
type: "debug",
|
|
348
350
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
@@ -353,7 +355,7 @@ const withLogFn = (logger, logFn) => {
|
|
|
353
355
|
trace: validateLogger("trace", logger.options.name, logger.options, (msg) => {
|
|
354
356
|
logger.trace?.(msg);
|
|
355
357
|
logFn({
|
|
356
|
-
category:
|
|
358
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
357
359
|
...logger.options,
|
|
358
360
|
type: "trace",
|
|
359
361
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
@@ -430,7 +432,7 @@ const withCustomLogger = (logger, customLogger) => {
|
|
|
430
432
|
};
|
|
431
433
|
const consoleLogger = (meta, message) => consoleLog({
|
|
432
434
|
type: (0, _stryke_type_checks_is_set_string.isSetString)(meta) ? meta : meta.type,
|
|
433
|
-
category:
|
|
435
|
+
category: require_constants_log_level.LogCategories.GENERAL,
|
|
434
436
|
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
435
437
|
timestamp: Date.now(),
|
|
436
438
|
...(0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? meta : {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAA;AAQ1B;;;;;AAyBA;AAzBA,iBAAgB,SAAA,CAAU,OAAA,EAAS,iBAAA;;;;;;;;iBAyBnB,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;;AAkGH;cAAa,YAAA,GAAgB,IAAA;;;;AAiB7B;;;cAAa,SAAA,GAAa,IAAA;;AAY1B;;;;;cAAa,eAAA,GAAmB,IAAA;AAAA,cAMnB,UAAA,GAAc,IAAA,EAAM,OAAA,KAAY,IAAA;AAAA,iBAwC7B,eAAA,CAAgB,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,QAAA;AAAA,iBAQ1C,qBAAA,CACd,IAAA,EAAM,QAAA,EACN,QAAA,EAAU,sBAAA,EACV,QAAA,GAAU,WAAA;;;;;;AAXZ;;cAuBa,WAAA,GAAe,IAAA,UAAc,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;;cA4IrD,UAAA,GAAc,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,MAAA,KAAS,MAAA;;;;;;;;cAuFxD,SAAA,GAAa,MAAA,EAAQ,MAAA,EAAQ,KAAA,EAAO,KAAA,KAAQ,MAAA;;;;;;;;cAuI5C,gBAAA,GACX,MAAA,EAAQ,MAAA,EACR,YAAA,EAAc,YAAA,KACb,MAAA;AAAA,cAoEU,aAAA,EAAe,KAAA;;;;;;;;cAmBf,YAAA,GACX,IAAA,UACA,OAAA,EAAS,aAAA,EACT,QAAA,GAAU,KAAA,KACT,MAAA;AA5TH;;;;;;;AAAA,cAmXa,WAAA,GAAe,KAAA,EAAO,KAAA,EAAO,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;;cAsBrD,YAAA,GACX,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,aAAA,KACR,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/plugin-utils/logging.ts"],"mappings":";;;;;;;AA+DA;;;;iBAAgB,SAAA,CAAU,QAAA;AAQ1B;;;;;AAyBA;AAzBA,iBAAgB,SAAA,CAAU,OAAA,EAAS,iBAAA;;;;;;;;iBAyBnB,eAAA,CACd,QAAA,GAAW,kBAAA,EACX,IAAA,GAAO,IAAA,GACN,sBAAA;;;;;;AAkGH;cAAa,YAAA,GAAgB,IAAA;;;;AAiB7B;;;cAAa,SAAA,GAAa,IAAA;;AAY1B;;;;;cAAa,eAAA,GAAmB,IAAA;AAAA,cAMnB,UAAA,GAAc,IAAA,EAAM,OAAA,KAAY,IAAA;AAAA,iBAwC7B,eAAA,CAAgB,QAAA,EAAU,QAAA,EAAU,IAAA,EAAM,QAAA;AAAA,iBAQ1C,qBAAA,CACd,IAAA,EAAM,QAAA,EACN,QAAA,EAAU,sBAAA,EACV,QAAA,GAAU,WAAA;;;;;;AAXZ;;cAuBa,WAAA,GAAe,IAAA,UAAc,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;;cA4IrD,UAAA,GAAc,MAAA,EAAQ,MAAA,EAAQ,eAAA,EAAiB,MAAA,KAAS,MAAA;;;;;;;;cAuFxD,SAAA,GAAa,MAAA,EAAQ,MAAA,EAAQ,KAAA,EAAO,KAAA,KAAQ,MAAA;;;;;;;;cAuI5C,gBAAA,GACX,MAAA,EAAQ,MAAA,EACR,YAAA,EAAc,YAAA,KACb,MAAA;AAAA,cAoEU,aAAA,EAAe,KAAA;;;;;;;;cAmBf,YAAA,GACX,IAAA,UACA,OAAA,EAAS,aAAA,EACT,QAAA,GAAU,KAAA,KACT,MAAA;AA5TH;;;;;;;AAAA,cAmXa,WAAA,GAAe,KAAA,EAAO,KAAA,EAAO,OAAA,EAAS,YAAA,KAAe,KAAA;;;;;;;;cAsBrD,YAAA,GACX,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,aAAA,KACR,MAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_ENVIRONMENT } from "../constants/environments.mjs";
|
|
2
|
-
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL } from "../constants/log-level.mjs";
|
|
3
|
-
import { LOG_LEVELS, LogCategories, LogLevels } from "../types/logging.mjs";
|
|
2
|
+
import { DEFAULT_DEVELOPMENT_LOG_LEVEL, DEFAULT_PRODUCTION_LOG_LEVEL, DEFAULT_TEST_LOG_LEVEL, LOG_CATEGORIES_ARRAY, LOG_LEVELS, LogCategories, LogLevels } from "../constants/log-level.mjs";
|
|
4
3
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
5
4
|
import { defu as defu$1 } from "defu";
|
|
6
5
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
@@ -71,7 +70,10 @@ function resolveLogLevel(logLevel, mode) {
|
|
|
71
70
|
config: defaultLogLevel.config,
|
|
72
71
|
babel: logLevel
|
|
73
72
|
};
|
|
74
|
-
else if (isSetObject(logLevel))
|
|
73
|
+
else if (isSetObject(logLevel)) {
|
|
74
|
+
if (Object.values(logLevel).filter((level) => isSetString(level)).length === LOG_CATEGORIES_ARRAY.length) return logLevel;
|
|
75
|
+
return defu$1(logLevel, defaultLogLevel);
|
|
76
|
+
}
|
|
75
77
|
return defaultLogLevel;
|
|
76
78
|
}
|
|
77
79
|
const BADGE_COLORS = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.mjs","names":["defu"],"sources":["../../src/plugin-utils/logging.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\nimport { LOG_LEVELS, LogCategories, Logger, LogLevels } from \"../types/logging\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n\n/**\n * Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.\n *\n * @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.\n * @param mode - The current mode of the application (e.g., \"development\", \"test\", \"production\"), which determines the default log levels.\n * @returns A LogLevelResolvedConfig object specifying the log level for each log category.\n */\nexport function resolveLogLevel(\n logLevel?: LogLevelUserConfig,\n mode?: Mode\n): LogLevelResolvedConfig {\n if (logLevel === \"trace\") {\n return {\n general: \"trace\",\n fs: \"trace\",\n performance: \"trace\",\n network: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n ipc: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n network: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n ipc: \"silent\",\n config: \"silent\",\n babel: \"silent\"\n };\n }\n\n let defaultLogLevel: LogLevelResolvedConfig;\n if (mode === \"development\") {\n defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mode === \"test\") {\n defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n\n if (isSetString(logLevel)) {\n return {\n general: logLevel,\n fs: defaultLogLevel.fs,\n performance: logLevel,\n network: defaultLogLevel.network,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n ipc: defaultLogLevel.ipc,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst BADGE_COLORS = [\n \"#00A0DD\",\n \"#6FCE4E\",\n \"#FBBF24\",\n \"#F43F5E\",\n \"#3B82F6\",\n \"#A855F7\",\n \"#469592\",\n \"#288EDF\",\n \"#D8B4FE\",\n \"#10B981\",\n \"#EF4444\",\n \"#F0EC56\",\n \"#F472B6\",\n \"#22D3EE\",\n \"#EAB308\",\n \"#84CC16\",\n \"#F87171\",\n \"#0EA5E9\",\n \"#D946EF\",\n \"#FACC15\",\n \"#34D399\",\n \"#8B5CF6\"\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): string => {\n return (\n BADGE_COLORS[\n text\n .split(\"\")\n .map(char => char.charCodeAt(0))\n .reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length\n ] || BADGE_COLORS[0]\n );\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.hex(getTextColor(title))(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse.hex(getTextColor(title))(` ${title} `);\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name!,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name!,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name!,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name!,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name!,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name!,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name!,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name!,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name!,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name!,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name!,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name!,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name!,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name!,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name!,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { ...options, name },\n error: validateLogger(\"error\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2EA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,kBAAkB,GACrC,oBACA,kBAAkB,OAAO;AAE7B,QAAO,UAAU,WAAW,UAAU;;;;;;;;;AAUxC,SAAgB,gBACd,UACA,MACwB;AACxB,KAAI,aAAa,QACf,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;EACR;UACQ,aAAa,SACtB,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;EACR;CAGH,IAAI;AACJ,KAAI,SAAS,cACX,mBAAkB;UACT,SAAS,OAClB,mBAAkB;KAElB,mBAAkB;AAGpB,KAAI,YAAY,SAAS,CACvB,QAAO;EACL,SAAS;EACT,IAAI,gBAAgB;EACpB,aAAa;EACb,SAAS,gBAAgB;EACzB,SAAS;EACT,OAAO;EACP,KAAK,g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AM,OAAO;EAAE,GAAG,OAAO;EAAS,GAAG;EAAS;CAK9C,MAAM,SAAS;EACb,SAAS;EACT,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,OAAO,CAAC;EAC1E,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,OAAO,CAAC;EACvE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,OAAO,CAAC;EACvE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,OAAO,CAAC;EAC1E,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,OAAO,CAAC;EAC3E;AAED,QAAO,OAAO,MAAgB,YAAoC;AAChE,UAAQ,MAAR;GACE,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK;AACH,WAAO,KAAK,QAAQ;AACpB;GACF,KAAK;AACH,WAAO,KAAK,QAAQ;AACpB;GACF,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK,SACH;GACF;AACE,WAAO,KAAK,QAAQ;AACpB;;;AAIN,QAAO"}
|
|
1
|
+
{"version":3,"file":"logging.mjs","names":["defu"],"sources":["../../src/plugin-utils/logging.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { getLogFn, getLogLevel } from \"@storm-software/config-tools/logger\";\nimport { getColor } from \"@storm-software/config-tools/utilities/colors\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { RequiredKeys } from \"@stryke/types/base\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport chalk from \"chalk\";\nimport { defu } from \"defu\";\nimport { DEFAULT_ENVIRONMENT } from \"../constants/environments\";\nimport {\n DEFAULT_DEVELOPMENT_LOG_LEVEL,\n DEFAULT_PRODUCTION_LOG_LEVEL,\n DEFAULT_TEST_LOG_LEVEL,\n LOG_CATEGORIES_ARRAY,\n LOG_LEVELS,\n LogCategories,\n LogLevels\n} from \"../constants/log-level\";\nimport { Mode } from \"../types/config\";\nimport { UnresolvedContext } from \"../types/context\";\nimport type {\n CustomLogger,\n CustomLoggerMessage,\n LogCategory,\n LogFn,\n LogFnMeta,\n LogFnOptions,\n Logger,\n LoggerMessage,\n LoggerOptions,\n LogLevel,\n LogLevelResolvedConfig,\n LogLevelUserConfig,\n LogMeta\n} from \"../types/logging\";\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevel - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(logLevel: string): boolean;\n\n/**\n * Determines if the provided context is considered verbose (debug or trace).\n *\n * @param context - The context to check, which contains the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(context: UnresolvedContext): boolean;\n\n/**\n * Determines if the provided log level is considered verbose (debug or trace).\n *\n * @param logLevelOrContext - The log level to check, which can be a string or an UnresolvedContext containing the log level in its config.\n * @returns True if the log level is \"debug\" or \"trace\", false otherwise.\n */\nexport function isVerbose(\n logLevelOrContext: string | UnresolvedContext\n): boolean {\n const level = isString(logLevelOrContext)\n ? logLevelOrContext\n : logLevelOrContext.config.logLevel;\n\n return level === \"debug\" || level === \"trace\";\n}\n\n/**\n * Resolves the log level configuration based on the provided log level and mode, returning a complete LogLevelResolvedConfig object that specifies the log level for each log category.\n *\n * @param logLevel - The user-provided log level configuration, which can be a string or an object specifying log levels for each category.\n * @param mode - The current mode of the application (e.g., \"development\", \"test\", \"production\"), which determines the default log levels.\n * @returns A LogLevelResolvedConfig object specifying the log level for each log category.\n */\nexport function resolveLogLevel(\n logLevel?: LogLevelUserConfig,\n mode?: Mode\n): LogLevelResolvedConfig {\n if (logLevel === \"trace\") {\n return {\n general: \"trace\",\n fs: \"trace\",\n performance: \"trace\",\n network: \"trace\",\n plugins: \"trace\",\n hooks: \"trace\",\n env: \"trace\",\n ipc: \"trace\",\n config: \"trace\",\n babel: \"trace\"\n };\n } else if (logLevel === \"silent\") {\n return {\n general: \"silent\",\n fs: \"silent\",\n performance: \"silent\",\n network: \"silent\",\n plugins: \"silent\",\n hooks: \"silent\",\n env: \"silent\",\n ipc: \"silent\",\n config: \"silent\",\n babel: \"silent\"\n };\n }\n\n let defaultLogLevel: LogLevelResolvedConfig;\n if (mode === \"development\") {\n defaultLogLevel = DEFAULT_DEVELOPMENT_LOG_LEVEL;\n } else if (mode === \"test\") {\n defaultLogLevel = DEFAULT_TEST_LOG_LEVEL;\n } else {\n defaultLogLevel = DEFAULT_PRODUCTION_LOG_LEVEL;\n }\n\n if (isSetString(logLevel)) {\n return {\n general: logLevel,\n fs: defaultLogLevel.fs,\n performance: logLevel,\n network: defaultLogLevel.network,\n plugins: logLevel,\n hooks: logLevel,\n env: defaultLogLevel.env,\n ipc: defaultLogLevel.ipc,\n config: defaultLogLevel.config,\n babel: logLevel\n };\n } else if (isSetObject(logLevel)) {\n if (\n Object.values(logLevel).filter(level => isSetString(level)).length ===\n LOG_CATEGORIES_ARRAY.length\n ) {\n return logLevel as LogLevelResolvedConfig;\n }\n\n return defu(logLevel, defaultLogLevel) as LogLevelResolvedConfig;\n }\n\n return defaultLogLevel;\n}\n\nconst BADGE_COLORS = [\n \"#00A0DD\",\n \"#6FCE4E\",\n \"#FBBF24\",\n \"#F43F5E\",\n \"#3B82F6\",\n \"#A855F7\",\n \"#469592\",\n \"#288EDF\",\n \"#D8B4FE\",\n \"#10B981\",\n \"#EF4444\",\n \"#F0EC56\",\n \"#F472B6\",\n \"#22D3EE\",\n \"#EAB308\",\n \"#84CC16\",\n \"#F87171\",\n \"#0EA5E9\",\n \"#D946EF\",\n \"#FACC15\",\n \"#34D399\",\n \"#8B5CF6\"\n] as const;\n\nconst BRAND_COLOR = getColor(\"brand\");\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const getTextColor = (text: string): string => {\n return (\n BADGE_COLORS[\n text\n .split(\"\")\n .map(char => char.charCodeAt(0))\n .reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length\n ] || BADGE_COLORS[0]\n );\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorText = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.hex(getTextColor(title))(title);\n};\n\n/**\n * Generate a consistent color based on the input text.\n *\n * @param text - The input text to generate the color from.\n * @return A hexadecimal color string.\n */\nexport const colorBackground = (text: string): string => {\n const title = titleCase(text);\n\n return chalk.inverse.hex(getTextColor(title))(` ${title} `);\n};\n\nexport const consoleLog = (meta: LogMeta, ...args: string[]) =>\n getLogFn(\n getLogLevel(\n meta.category === LogCategories.PERFORMANCE ? \"performance\" : meta.type\n ),\n {\n logLevel: \"all\"\n }\n )(\n `${meta.name ? chalk.bold.hex(BRAND_COLOR)(kebabCase(meta.name)) : \"\"}${meta.name ? chalk.grey(\" > \") : \"\"}${\n meta.command\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.command)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.environment && kebabCase(meta.environment) !== DEFAULT_ENVIRONMENT\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.environment)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.plugin\n ? `${chalk.bold.hex(BRAND_COLOR)(meta.plugin)}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.source\n ? `${chalk.bold.hex(BRAND_COLOR)(\n kebabCase(meta.source)\n )}${chalk.grey(\" > \")}`\n : \"\"\n }${\n meta.category &&\n meta.category !== LogCategories.GENERAL &&\n meta.category !== LogCategories.PERFORMANCE\n ? `${colorBackground(kebabCase(meta.category))} `\n : \"\"\n }${args.join(\" \")} `.trim()\n );\n\nexport function isValidLogLevel(logLevel: LogLevel, type: LogLevel): boolean {\n if (logLevel === LogLevels.SILENT) {\n return false;\n }\n\n return LOG_LEVELS.indexOf(logLevel) >= LOG_LEVELS.indexOf(type);\n}\n\nexport function isValidLogLevelConfig(\n type: LogLevel,\n logLevel: LogLevelResolvedConfig,\n category: LogCategory = LogCategories.GENERAL\n): boolean {\n return isValidLogLevel(logLevel[category], type);\n}\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogFn = (name: string, options: LogFnOptions): LogFn => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (meta: LogFnMeta | LogLevel, ...args: string[]) => {\n const logMeta = isSetObject(meta)\n ? {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n ...meta,\n name\n }\n : {\n logId: uuid(),\n timestamp: Date.now(),\n category: LogCategories.GENERAL,\n ...options,\n type: meta,\n name\n };\n\n if (\n logMeta.$$ipc ||\n isValidLogLevelConfig(\n logMeta.type,\n logLevel,\n logMeta.category ? logMeta.category : LogCategories.GENERAL\n )\n ) {\n consoleLog(logMeta, ...args);\n }\n };\n};\n\nconst validateLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback: (message: LoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...options\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n type,\n name,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...options,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback(params);\n }\n };\n};\n\nconst validateCustomLogger = (\n type: LogLevel,\n name: string | undefined,\n options: LoggerOptions,\n callback?: (message: string | LoggerMessage) => void,\n customCallback?: (message: CustomLoggerMessage) => void\n) => {\n const logLevel = resolveLogLevel(options.logLevel, options.mode);\n\n return (message: string | LoggerMessage) => {\n const params = isSetString(message)\n ? {\n name,\n plugin: options.plugin,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now()\n },\n message\n }\n : {\n name,\n plugin: options.plugin,\n ...message,\n meta: {\n category: LogCategories.GENERAL,\n ...options,\n type,\n name,\n logId: uuid(),\n timestamp: Date.now(),\n plugin: message.plugin,\n ...message.meta\n }\n };\n\n if (\n params.meta.$$ipc ||\n isValidLogLevelConfig(type, logLevel, params.meta.category)\n ) {\n callback?.(params);\n customCallback?.(params);\n }\n };\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param secondaryLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogger = (logger: Logger, secondaryLogger: Logger): Logger => {\n const options = { ...secondaryLogger.options, ...logger.options };\n\n const result = {\n options,\n error: validateLogger(\n \"error\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.error?.(message);\n secondaryLogger.error?.(message);\n }\n ),\n warn: validateLogger(\n \"warn\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.warn?.(message);\n secondaryLogger.warn?.(message);\n }\n ),\n info: validateLogger(\n \"info\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.info?.(message);\n secondaryLogger.info?.(message);\n }\n ),\n debug: validateLogger(\n \"debug\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.debug?.(message);\n secondaryLogger.debug?.(message);\n }\n ),\n trace: validateLogger(\n \"trace\",\n options.name,\n options,\n (message: LoggerMessage) => {\n logger.trace?.(message);\n secondaryLogger.trace?.(message);\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param logFn - The custom logging function to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logging function, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withLogFn = (logger: Logger, logFn: LogFn): Logger => {\n const result = {\n options: logger.options,\n error: validateLogger(\n \"error\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.error?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"error\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n warn: validateLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.warn?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"warn\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n info: validateLogger(\n \"info\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.info?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"info\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n debug: validateLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.debug?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"debug\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n ),\n trace: validateLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n (msg: LoggerMessage) => {\n logger.trace?.(msg);\n logFn(\n {\n category: LogCategories.GENERAL,\n ...logger.options,\n type: \"trace\",\n logId: uuid(),\n timestamp: Date.now(),\n ...msg.meta\n },\n msg.message\n );\n }\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param logger - The original logger to wrap with the custom logger.\n * @param customLogger - The custom logger to use for logging messages, which can be used to override the default logging behavior of the original logger.\n * @returns A new logger that combines the original logger's options with the custom logger's methods, allowing for customized logging behavior while still maintaining the original logger's configuration.\n */\nexport const withCustomLogger = (\n logger: Logger,\n customLogger: CustomLogger\n): Logger => {\n const result = {\n options: logger.options,\n error: validateCustomLogger(\n \"error\",\n logger.options.name,\n logger.options,\n logger.error.bind(logger),\n customLogger.error?.bind(customLogger)\n ),\n warn: validateCustomLogger(\n \"warn\",\n logger.options.name,\n logger.options,\n logger.warn.bind(logger),\n customLogger.warn?.bind(customLogger)\n ),\n info: validateCustomLogger(\n \"info\",\n logger.options.name,\n logger.options,\n logger.info.bind(logger),\n customLogger.info?.bind(customLogger)\n ),\n debug: validateCustomLogger(\n \"debug\",\n logger.options.name,\n logger.options,\n logger.debug.bind(logger),\n customLogger.debug?.bind(customLogger)\n ),\n trace: validateCustomLogger(\n \"trace\",\n logger.options.name,\n logger.options,\n logger.trace.bind(logger),\n customLogger.trace?.bind(customLogger)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\nexport const consoleLogger: LogFn = (meta: LogFnMeta, message: string) =>\n consoleLog(\n {\n type: isSetString(meta) ? meta : meta.type,\n category: LogCategories.GENERAL,\n logId: uuid(),\n timestamp: Date.now(),\n ...(isSetObject(meta) ? meta : {})\n },\n message\n );\n\n/**\n * Create a logging function with a specific name and options.\n *\n * @param name - The name of the logging function.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the logging function.\n * @returns A logging function.\n */\nexport const createLogger = (\n name: string,\n options: LoggerOptions,\n callback: LogFn = consoleLogger\n): Logger => {\n const result = {\n options: { ...options, name },\n error: validateLogger(\"error\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"error\" }, data.message)\n ),\n warn: validateLogger(\"warn\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"warn\" }, data.message)\n ),\n info: validateLogger(\"info\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"info\" }, data.message)\n ),\n debug: validateLogger(\"debug\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"debug\" }, data.message)\n ),\n trace: validateLogger(\"trace\", name, { ...options, name }, data =>\n callback({ ...data.meta, type: \"trace\" }, data.message)\n )\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n\n/**\n * Extend a logging function with a specific name, adding a colored badge to the log output.\n *\n * @param logFn - The original logging function to extend.\n * @param options - The overlay metadata to use for the badge in the log output.\n * @returns A new logging function that includes the badge in its output.\n */\nexport const extendLogFn = (logFn: LogFn, options: LogFnOptions): LogFn => {\n return (meta, ...args) =>\n options.source || options.category\n ? logFn(\n isSetObject(meta)\n ? { ...options, ...meta }\n : { ...options, type: meta },\n `${colorBackground(String(options.source || options.category))} ${args\n .filter(Boolean)\n .map(arg => String(arg).trim())\n .join(\" \")} `\n )\n : logFn(meta, ...args);\n};\n\n/**\n * Extend a logger with a specific name and options, adding a colored badge to the log output for each log message generated by the logger.\n *\n * @param logger - The original logger to extend.\n * @param options - The options to configure the logging function, including the source, command, environment, plugin, log level, custom logger, and colors. These options can be used to customize the appearance and behavior of the log messages generated by the extended logger.\n * @returns A new logger that includes the badge in its output for each log message.\n */\nexport const extendLogger = (\n logger: Logger,\n options: LoggerOptions\n): Logger => {\n const opts = { ...logger.options, ...options } as RequiredKeys<\n LoggerOptions,\n \"name\"\n >;\n\n const result = {\n options: opts,\n error: validateLogger(\"error\", opts.name, opts, logger.error.bind(logger)),\n warn: validateLogger(\"warn\", opts.name, opts, logger.warn.bind(logger)),\n info: validateLogger(\"info\", opts.name, opts, logger.info.bind(logger)),\n debug: validateLogger(\"debug\", opts.name, opts, logger.debug.bind(logger)),\n trace: validateLogger(\"trace\", opts.name, opts, logger.trace.bind(logger))\n } as Logger;\n\n result.log = (type: LogLevel, message: string | LoggerMessage) => {\n switch (type) {\n case \"error\":\n result.error(message);\n break;\n case \"warn\":\n result.warn(message);\n break;\n case \"info\":\n result.info(message);\n break;\n case \"debug\":\n result.debug(message);\n break;\n case \"trace\":\n result.trace(message);\n break;\n case \"silent\":\n break;\n default:\n result.info(message);\n break;\n }\n };\n\n return result;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,UACd,mBACS;CACT,MAAM,QAAQ,SAAS,kBAAkB,GACrC,oBACA,kBAAkB,OAAO;AAE7B,QAAO,UAAU,WAAW,UAAU;;;;;;;;;AAUxC,SAAgB,gBACd,UACA,MACwB;AACxB,KAAI,aAAa,QACf,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;EACR;UACQ,aAAa,SACtB,QAAO;EACL,SAAS;EACT,IAAI;EACJ,aAAa;EACb,SAAS;EACT,SAAS;EACT,OAAO;EACP,KAAK;EACL,KAAK;EACL,QAAQ;EACR,OAAO;EACR;CAGH,IAAI;AACJ,KAAI,SAAS,cACX,mBAAkB;UACT,SAAS,OAClB,mBAAkB;KAElB,mBAAkB;AAGpB,KAAI,YAAY,SAAS,CACvB,QAAO;EACL,SAAS;EACT,IAAI,gBAAgB;EACpB,aAAa;EACb,SAAS,gBAAgB;EACzB,SAAS;EACT,OAAO;EACP,KAAK,gBAAgB;EACrB,KAAK,gBAAgB;EACrB,QAAQ,gBAAgB;EACxB,OAAO;EACR;UACQ,YAAY,SAAS,EAAE;AAChC,MACE,OAAO,OAAO,SAAS,CAAC,QAAO,UAAS,YAAY,MAAM,CAAC,CAAC,WAC5D,qBAAqB,OAErB,QAAO;AAGT,SAAOA,OAAK,UAAU,gBAAgB;;AAGxC,QA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KAAK,OAAO,CAAC;EAC1E,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,OAAO,CAAC;EACvE,MAAM,eAAe,QAAQ,KAAK,MAAM,MAAM,OAAO,KAAK,KAAK,OAAO,CAAC;EACvE,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,OAAO,CAAC;EAC1E,OAAO,eAAe,SAAS,KAAK,MAAM,MAAM,OAAO,MAAM,KAAK,OAAO,CAAC;EAC3E;AAED,QAAO,OAAO,MAAgB,YAAoC;AAChE,UAAQ,MAAR;GACE,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK;AACH,WAAO,KAAK,QAAQ;AACpB;GACF,KAAK;AACH,WAAO,KAAK,QAAQ;AACpB;GACF,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK;AACH,WAAO,MAAM,QAAQ;AACrB;GACF,KAAK,SACH;GACF;AACE,WAAO,KAAK,QAAQ;AACpB;;;AAIN,QAAO"}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
5
5
|
import { WorkerProcess, __ΩWorkerProcess } from "./utils.cjs";
|
|
6
6
|
import { API, APIFunctions, BaseAPIFunctions, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, SupportedCommands, __ΩAPI, __ΩAPIFunctions, __ΩBaseAPIFunctions, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩSupportedCommands } from "./api.cjs";
|
|
7
7
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./fs.cjs";
|
|
8
|
-
import { CustomLogger, CustomLoggerMessage,
|
|
8
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./logging.cjs";
|
|
9
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./tsconfig.cjs";
|
|
10
10
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.cjs";
|
|
11
11
|
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InferOverridableConfig, InitialPluginConfig, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInferOverridableConfig, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./config.cjs";
|
package/dist/types/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { CallHookOptions, HookListOrders, HooksList, HooksListItem, InferHookFun
|
|
|
5
5
|
import { WorkerProcess, __ΩWorkerProcess } from "./utils.mjs";
|
|
6
6
|
import { API, APIFunctions, BaseAPIFunctions, Engine, Execution, ExecutionWorkerParams, ExecutionWorkerProcess, SupportedCommands, __ΩAPI, __ΩAPIFunctions, __ΩBaseAPIFunctions, __ΩEngine, __ΩExecution, __ΩExecutionWorkerParams, __ΩExecutionWorkerProcess, __ΩSupportedCommands } from "./api.mjs";
|
|
7
7
|
import { ResolveOptions, StorageAdapter, StoragePort, StoragePreset, VirtualFile, VirtualFileData, VirtualFileExtension, VirtualFileMetadata, VirtualFileSystemInterface, WriteData, WriteOptions, __ΩResolveOptions, __ΩStorageAdapter, __ΩStoragePort, __ΩStoragePreset, __ΩVirtualFile, __ΩVirtualFileData, __ΩVirtualFileExtension, __ΩVirtualFileMetadata, __ΩVirtualFileSystemInterface, __ΩWriteData, __ΩWriteOptions } from "./fs.mjs";
|
|
8
|
-
import { CustomLogger, CustomLoggerMessage,
|
|
8
|
+
import { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage } from "./logging.mjs";
|
|
9
9
|
import { DeepkitOptions, Level, ParsedTypeScriptConfig, RawReflectionMode, ReflectionMode, TSCompilerOptions, TSConfig, __ΩDeepkitOptions, __ΩLevel, __ΩParsedTypeScriptConfig, __ΩRawReflectionMode, __ΩReflectionMode, __ΩTSCompilerOptions, __ΩTSConfig } from "./tsconfig.mjs";
|
|
10
10
|
import { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, ExecutionState, ExecutionStateItem, FetchOptions, HookExecutionStateItem, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩExecutionState, __ΩExecutionStateItem, __ΩFetchOptions, __ΩHookExecutionStateItem, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext } from "./context.mjs";
|
|
11
11
|
import { AnyOutputUserConfig, AnyUserConfig, BuildInlineConfig, CleanInlineConfig, Config, CopyConfig, DeployInlineConfig, DocsInlineConfig, EngineOptions, EnvironmentConfig, EnvironmentResolvedConfig, ExecutionOptions, InferOverridableConfig, InitialPluginConfig, InlineConfig, LintInlineConfig, Mode, NewInlineConfig, Options, OutputConfig, ParsedUserConfig, PartialPlugin, PartialPluginFactory, PluginConfig, PluginConfigObject, PluginConfigTuple, PluginFactory, PowerlinesCommand, PrepareInlineConfig, ProjectType, ResolveConfig, ResolvedAssetGlob, ResolvedConfig, ResolvedCopyConfig, ResolvedEntryTypeDefinition, ResolvedEnvironmentConfig, ResolvedOutputConfig, ResolvedResolveConfig, TestInlineConfig, TypesInlineConfig, UserConfig, UserConfigFn, WorkspaceConfig, __ΩAnyOutputUserConfig, __ΩAnyUserConfig, __ΩBuildInlineConfig, __ΩCleanInlineConfig, __ΩConfig, __ΩCopyConfig, __ΩDeployInlineConfig, __ΩDocsInlineConfig, __ΩEngineOptions, __ΩEnvironmentConfig, __ΩEnvironmentResolvedConfig, __ΩExecutionOptions, __ΩInferOverridableConfig, __ΩInitialPluginConfig, __ΩInlineConfig, __ΩLintInlineConfig, __ΩMode, __ΩNewInlineConfig, __ΩOptions, __ΩOutputConfig, __ΩParsedUserConfig, __ΩPartialPlugin, __ΩPartialPluginFactory, __ΩPluginConfig, __ΩPluginConfigObject, __ΩPluginConfigTuple, __ΩPluginFactory, __ΩPowerlinesCommand, __ΩPrepareInlineConfig, __ΩProjectType, __ΩResolveConfig, __ΩResolvedAssetGlob, __ΩResolvedConfig, __ΩResolvedCopyConfig, __ΩResolvedEntryTypeDefinition, __ΩResolvedEnvironmentConfig, __ΩResolvedOutputConfig, __ΩResolvedResolveConfig, __ΩTestInlineConfig, __ΩTypesInlineConfig, __ΩUserConfig, __ΩUserConfigFn, __ΩWorkspaceConfig } from "./config.mjs";
|
package/dist/types/logging.d.cts
CHANGED
|
@@ -1,31 +1,10 @@
|
|
|
1
|
+
import { LOG_CATEGORIES, LOG_LEVELS } from "../constants/log-level.cjs";
|
|
1
2
|
import { Mode } from "./config.cjs";
|
|
2
3
|
import { PartialKeys, RequiredKeys } from "@stryke/types/base";
|
|
3
4
|
import { UnpluginMessage } from "unplugin";
|
|
4
5
|
|
|
5
6
|
//#region src/types/logging.d.ts
|
|
6
|
-
declare const LogLevels: {
|
|
7
|
-
readonly SILENT: "silent";
|
|
8
|
-
readonly ERROR: "error";
|
|
9
|
-
readonly WARN: "warn";
|
|
10
|
-
readonly INFO: "info";
|
|
11
|
-
readonly DEBUG: "debug";
|
|
12
|
-
readonly TRACE: "trace";
|
|
13
|
-
};
|
|
14
|
-
declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug", "trace"];
|
|
15
7
|
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
16
|
-
declare const LogCategories: {
|
|
17
|
-
readonly GENERAL: "general";
|
|
18
|
-
readonly FS: "fs";
|
|
19
|
-
readonly PERFORMANCE: "performance";
|
|
20
|
-
readonly CONFIG: "config";
|
|
21
|
-
readonly PLUGINS: "plugins";
|
|
22
|
-
readonly HOOKS: "hooks";
|
|
23
|
-
readonly ENV: "env";
|
|
24
|
-
readonly IPC: "ipc";
|
|
25
|
-
readonly BABEL: "babel";
|
|
26
|
-
readonly NETWORK: "network";
|
|
27
|
-
};
|
|
28
|
-
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "env", "ipc", "network", "babel"];
|
|
29
8
|
type LogCategory = (typeof LOG_CATEGORIES)[number];
|
|
30
9
|
interface LogMeta {
|
|
31
10
|
/**
|
|
@@ -177,5 +156,5 @@ declare type __ΩCustomLogger = any[];
|
|
|
177
156
|
declare type __ΩLogLevelUserConfig = any[];
|
|
178
157
|
declare type __ΩLogLevelResolvedConfig = any[];
|
|
179
158
|
//#endregion
|
|
180
|
-
export { CustomLogger, CustomLoggerMessage,
|
|
159
|
+
export { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage };
|
|
181
160
|
//# sourceMappingURL=logging.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/types/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"logging.d.cts","names":[],"sources":["../../src/types/logging.ts"],"mappings":";;;;;;KAuBY,QAAA,WAAmB,UAAA;AAAA,KAEnB,WAAA,WAAsB,cAAA;AAAA,UAEjB,OAAA;EAJG;;;EAQlB,KAAA;EANU;;;EAUV,IAAA,EAAM,QAAA;EAVwC;AAEhD;;EAYE,QAAA,EAAU,WAAA;EAAW;;;EAIrB,SAAA;EAJA;;;EAQA,IAAA;EAIA;;;EAAA,WAAA;EAgBA;;;EAZA,cAAA;EA0BK;;AAGP;EAzBE,OAAA;;;;EAIA,IAAA;EAyBO;;;EArBP,WAAA;EAiByB;;;EAbzB,MAAA;EAiBO;;;EAbP,MAAA;EAc6B;AAG/B;;;;EAXE,KAAA;AAAA;AAAA,KAGU,YAAA,GAAe,IAAA,CACzB,OAAA,CAAQ,OAAA;EAGR,IAAA,GAAO,IAAA;EACP,QAAA,GAAW,kBAAA;AAAA;AAAA,KAGD,SAAA,GACR,QAAA,GACA,WAAA,CAAY,OAAA;AAAA,KAEJ,KAAA,IAAS,IAAA,EAAM,SAAA,EAAW,OAAA;AAAA,KAE1B,UAAA,GAAa,WAAA,CACvB,IAAA,CAAK,OAAA;AAAA,KAIK,aAAA,GAAgB,IAAA,CAAK,UAAA;EAC/B,IAAA,GAAO,IAAA;EACP,QAAA,GAAW,kBAAA;AAAA;AAAA,UAGI,iBAAA,gBAAiC,eAAA;EAChD,IAAA,EAAM,KAAA;AAAA;AAAA,KAGI,UAAA,GAAa,iBAAA,CAAkB,OAAA,CAAQ,OAAA;;AAdnD;;KAmBY,aAAA,GAAgB,iBAAA,CAAkB,UAAA;;;;UAK7B,MAAA;EACf,OAAA,EAAS,aAAA;EACT,KAAA,GAAQ,OAAA,WAAkB,aAAA;EAC1B,IAAA,GAAO,OAAA,WAAkB,aAAA;EACzB,IAAA,GAAO,OAAA,WAAkB,aAAA;EACzB,KAAA,GAAQ,OAAA,WAAkB,aAAA;EAC1B,KAAA,GAAQ,OAAA,WAAkB,aAAA;EAC1B,GAAA,GAAM,IAAA,EAAM,QAAA,EAAU,OAAA,WAAkB,aAAA;AAAA;;;;KAM9B,mBAAA,GAAsB,iBAAA,CAAkB,IAAA,CAAK,OAAA;;;;UAKxC,YAAA;EArCgB;;;;;;EA4C/B,KAAA,IAAS,OAAA,EAAS,mBAAA;EAvCH;;;;;;EA8Cf,IAAA,IAAQ,OAAA,EAAS,mBAAA;EA7CX;;;AAGR;;;EAiDE,IAAA,IAAQ,OAAA,EAAS,mBAAA;EAjDwB;;;;;;EAwDzC,KAAA,IAAS,OAAA,EAAS,mBAAA;EAxDsC;;AAK1D;;;;EA0DE,KAAA,IAAS,OAAA,EAAS,mBAAA;AAAA;AAAA,KAGR,kBAAA,GACR,QAAA,GACA,YAAA,CACE,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA,KAItB,sBAAA,GAAyB,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA"}
|
package/dist/types/logging.d.mts
CHANGED
|
@@ -1,31 +1,10 @@
|
|
|
1
|
+
import { LOG_CATEGORIES, LOG_LEVELS } from "../constants/log-level.mjs";
|
|
1
2
|
import { Mode } from "./config.mjs";
|
|
2
3
|
import { UnpluginMessage } from "unplugin";
|
|
3
4
|
import { PartialKeys, RequiredKeys } from "@stryke/types/base";
|
|
4
5
|
|
|
5
6
|
//#region src/types/logging.d.ts
|
|
6
|
-
declare const LogLevels: {
|
|
7
|
-
readonly SILENT: "silent";
|
|
8
|
-
readonly ERROR: "error";
|
|
9
|
-
readonly WARN: "warn";
|
|
10
|
-
readonly INFO: "info";
|
|
11
|
-
readonly DEBUG: "debug";
|
|
12
|
-
readonly TRACE: "trace";
|
|
13
|
-
};
|
|
14
|
-
declare const LOG_LEVELS: readonly ["silent", "error", "warn", "info", "debug", "trace"];
|
|
15
7
|
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
16
|
-
declare const LogCategories: {
|
|
17
|
-
readonly GENERAL: "general";
|
|
18
|
-
readonly FS: "fs";
|
|
19
|
-
readonly PERFORMANCE: "performance";
|
|
20
|
-
readonly CONFIG: "config";
|
|
21
|
-
readonly PLUGINS: "plugins";
|
|
22
|
-
readonly HOOKS: "hooks";
|
|
23
|
-
readonly ENV: "env";
|
|
24
|
-
readonly IPC: "ipc";
|
|
25
|
-
readonly BABEL: "babel";
|
|
26
|
-
readonly NETWORK: "network";
|
|
27
|
-
};
|
|
28
|
-
declare const LOG_CATEGORIES: readonly ["general", "fs", "performance", "config", "plugins", "hooks", "env", "ipc", "network", "babel"];
|
|
29
8
|
type LogCategory = (typeof LOG_CATEGORIES)[number];
|
|
30
9
|
interface LogMeta {
|
|
31
10
|
/**
|
|
@@ -177,5 +156,5 @@ declare type __ΩCustomLogger = any[];
|
|
|
177
156
|
declare type __ΩLogLevelUserConfig = any[];
|
|
178
157
|
declare type __ΩLogLevelResolvedConfig = any[];
|
|
179
158
|
//#endregion
|
|
180
|
-
export { CustomLogger, CustomLoggerMessage,
|
|
159
|
+
export { CustomLogger, CustomLoggerMessage, LogCategory, LogFn, LogFnMeta, LogFnOptions, LogLevel, LogLevelResolvedConfig, LogLevelUserConfig, LogMessage, LogMeta, Logger, LoggerMessage, LoggerMeta, LoggerOptions, PowerlinesMessage, __ΩCustomLogger, __ΩCustomLoggerMessage, __ΩLogCategory, __ΩLogFn, __ΩLogFnMeta, __ΩLogFnOptions, __ΩLogLevel, __ΩLogLevelResolvedConfig, __ΩLogLevelUserConfig, __ΩLogMessage, __ΩLogMeta, __ΩLogger, __ΩLoggerMessage, __ΩLoggerMeta, __ΩLoggerOptions, __ΩPowerlinesMessage };
|
|
181
160
|
//# sourceMappingURL=logging.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logging.d.mts","names":[],"sources":["../../src/types/logging.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"log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AA,GAAM,IAAA,EAAM,QAAA,EAAU,OAAA,WAAkB,aAAA;AAAA;;;;KAM9B,mBAAA,GAAsB,iBAAA,CAAkB,IAAA,CAAK,OAAA;;;;UAKxC,YAAA;EArCgB;;;;;;EA4C/B,KAAA,IAAS,OAAA,EAAS,mBAAA;EAvCH;;;;;;EA8Cf,IAAA,IAAQ,OAAA,EAAS,mBAAA;EA7CX;;;AAGR;;;EAiDE,IAAA,IAAQ,OAAA,EAAS,mBAAA;EAjDwB;;;;;;EAwDzC,KAAA,IAAS,OAAA,EAAS,mBAAA;EAxDsC;;AAK1D;;;;EA0DE,KAAA,IAAS,OAAA,EAAS,mBAAA;AAAA;AAAA,KAGR,kBAAA,GACR,QAAA,GACA,YAAA,CACE,OAAA,CAAQ,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA,KAItB,sBAAA,GAAyB,MAAA,CAAO,WAAA,EAAa,QAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/core",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "An internal core package for Powerlines - please use the `powerlines` package for public usage.",
|
|
6
6
|
"homepage": "https://stormsoftware.com",
|
|
@@ -238,5 +238,5 @@
|
|
|
238
238
|
"typescript": "^6.0.3"
|
|
239
239
|
},
|
|
240
240
|
"publishConfig": { "access": "public" },
|
|
241
|
-
"gitHead": "
|
|
241
|
+
"gitHead": "2e5eff0d36cb4a1a54242017a16c5af5d9ce2cc3"
|
|
242
242
|
}
|
package/dist/types/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const require_logging = require('./logging.cjs');
|
package/dist/types/index.mjs
DELETED
package/dist/types/logging.cjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/types/logging.ts
|
|
3
|
-
const LogLevels = {
|
|
4
|
-
SILENT: "silent",
|
|
5
|
-
ERROR: "error",
|
|
6
|
-
WARN: "warn",
|
|
7
|
-
INFO: "info",
|
|
8
|
-
DEBUG: "debug",
|
|
9
|
-
TRACE: "trace"
|
|
10
|
-
};
|
|
11
|
-
const LOG_LEVELS = [
|
|
12
|
-
LogLevels.SILENT,
|
|
13
|
-
LogLevels.ERROR,
|
|
14
|
-
LogLevels.WARN,
|
|
15
|
-
LogLevels.INFO,
|
|
16
|
-
LogLevels.DEBUG,
|
|
17
|
-
LogLevels.TRACE
|
|
18
|
-
];
|
|
19
|
-
const LogCategories = {
|
|
20
|
-
GENERAL: "general",
|
|
21
|
-
FS: "fs",
|
|
22
|
-
PERFORMANCE: "performance",
|
|
23
|
-
CONFIG: "config",
|
|
24
|
-
PLUGINS: "plugins",
|
|
25
|
-
HOOKS: "hooks",
|
|
26
|
-
ENV: "env",
|
|
27
|
-
IPC: "ipc",
|
|
28
|
-
BABEL: "babel",
|
|
29
|
-
NETWORK: "network"
|
|
30
|
-
};
|
|
31
|
-
const LOG_CATEGORIES = [
|
|
32
|
-
LogCategories.GENERAL,
|
|
33
|
-
LogCategories.FS,
|
|
34
|
-
LogCategories.PERFORMANCE,
|
|
35
|
-
LogCategories.CONFIG,
|
|
36
|
-
LogCategories.PLUGINS,
|
|
37
|
-
LogCategories.HOOKS,
|
|
38
|
-
LogCategories.ENV,
|
|
39
|
-
LogCategories.IPC,
|
|
40
|
-
LogCategories.NETWORK,
|
|
41
|
-
LogCategories.BABEL
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
//#endregion
|
|
45
|
-
exports.LOG_CATEGORIES = LOG_CATEGORIES;
|
|
46
|
-
exports.LOG_LEVELS = LOG_LEVELS;
|
|
47
|
-
exports.LogCategories = LogCategories;
|
|
48
|
-
exports.LogLevels = LogLevels;
|
package/dist/types/logging.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
//#region src/types/logging.ts
|
|
2
|
-
const LogLevels = {
|
|
3
|
-
SILENT: "silent",
|
|
4
|
-
ERROR: "error",
|
|
5
|
-
WARN: "warn",
|
|
6
|
-
INFO: "info",
|
|
7
|
-
DEBUG: "debug",
|
|
8
|
-
TRACE: "trace"
|
|
9
|
-
};
|
|
10
|
-
const LOG_LEVELS = [
|
|
11
|
-
LogLevels.SILENT,
|
|
12
|
-
LogLevels.ERROR,
|
|
13
|
-
LogLevels.WARN,
|
|
14
|
-
LogLevels.INFO,
|
|
15
|
-
LogLevels.DEBUG,
|
|
16
|
-
LogLevels.TRACE
|
|
17
|
-
];
|
|
18
|
-
const LogCategories = {
|
|
19
|
-
GENERAL: "general",
|
|
20
|
-
FS: "fs",
|
|
21
|
-
PERFORMANCE: "performance",
|
|
22
|
-
CONFIG: "config",
|
|
23
|
-
PLUGINS: "plugins",
|
|
24
|
-
HOOKS: "hooks",
|
|
25
|
-
ENV: "env",
|
|
26
|
-
IPC: "ipc",
|
|
27
|
-
BABEL: "babel",
|
|
28
|
-
NETWORK: "network"
|
|
29
|
-
};
|
|
30
|
-
const LOG_CATEGORIES = [
|
|
31
|
-
LogCategories.GENERAL,
|
|
32
|
-
LogCategories.FS,
|
|
33
|
-
LogCategories.PERFORMANCE,
|
|
34
|
-
LogCategories.CONFIG,
|
|
35
|
-
LogCategories.PLUGINS,
|
|
36
|
-
LogCategories.HOOKS,
|
|
37
|
-
LogCategories.ENV,
|
|
38
|
-
LogCategories.IPC,
|
|
39
|
-
LogCategories.NETWORK,
|
|
40
|
-
LogCategories.BABEL
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { LOG_CATEGORIES, LOG_LEVELS, LogCategories, LogLevels };
|
|
45
|
-
//# sourceMappingURL=logging.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logging.mjs","names":[],"sources":["../../src/types/logging.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PartialKeys, RequiredKeys } from \"@stryke/types/base\";\nimport { UnpluginMessage } from \"unplugin\";\nimport { Mode } from \"./config\";\n\nexport const LogLevels = {\n SILENT: \"silent\",\n ERROR: \"error\",\n WARN: \"warn\",\n INFO: \"info\",\n DEBUG: \"debug\",\n TRACE: \"trace\"\n} as const;\n\nexport const LOG_LEVELS = [\n LogLevels.SILENT,\n LogLevels.ERROR,\n LogLevels.WARN,\n LogLevels.INFO,\n LogLevels.DEBUG,\n LogLevels.TRACE\n] as const;\n\nexport type LogLevel = (typeof LOG_LEVELS)[number];\n\nexport const LogCategories = {\n GENERAL: \"general\",\n FS: \"fs\",\n PERFORMANCE: \"performance\",\n CONFIG: \"config\",\n PLUGINS: \"plugins\",\n HOOKS: \"hooks\",\n ENV: \"env\",\n IPC: \"ipc\",\n BABEL: \"babel\",\n NETWORK: \"network\"\n} as const;\n\nexport const LOG_CATEGORIES = [\n LogCategories.GENERAL,\n LogCategories.FS,\n LogCategories.PERFORMANCE,\n LogCategories.CONFIG,\n LogCategories.PLUGINS,\n LogCategories.HOOKS,\n LogCategories.ENV,\n LogCategories.IPC,\n LogCategories.NETWORK,\n LogCategories.BABEL\n] as const;\n\nexport type LogCategory = (typeof LOG_CATEGORIES)[number];\n\nexport interface LogMeta {\n /**\n * A unique identifier for the log message, which can be used to correlate related log entries across different parts of the system or different executions.\n */\n logId: string;\n /**\n * The log level of the message, which indicates the severity or importance of the log entry. The log level can be used to filter log messages based on their importance, allowing users to focus on critical issues or relevant information while ignoring less important messages.\n */\n type: LogLevel;\n /**\n * The category of the log message, which can be used to classify and filter log entries based on their purpose or origin.\n */\n category: LogCategory;\n /**\n * The timestamp when the IPC message was created, represented as the number of milliseconds since the Unix epoch.\n */\n timestamp: number;\n /**\n * The name of the project or package associated with the log message, which can be used to identify the source of the log entry and provide context for the message.\n */\n name?: string;\n /**\n * A unique identifier for the current execution instance, which can be used for logging and other purposes to distinguish between different executions in the same process.\n */\n executionId?: string;\n /**\n * The zero-based index of the current execution within the sequence of executions in the same process.\n */\n executionIndex?: number;\n /**\n * Optional command identifier to specify the command or task associated with the log message, which can be used to provide additional context about the operation being performed when the log entry was generated.\n */\n command?: string;\n /**\n * Optional hook name to specify the plugin hook associated with the log message, which can be used to provide additional context about the specific plugin hook being executed when the log entry was generated.\n */\n hook?: string;\n /**\n * Optional environment identifier to specify the context or environment in which the message is being processed.\n */\n environment?: string;\n /**\n * Optional plugin name to specify the source plugin of the log message.\n */\n plugin?: string;\n /**\n * The name of the logger or source of the log message, which can be used to identify the origin of the log entry.\n */\n source?: string;\n /**\n * Indicates whether the log message is related to inter-process communication (IPC).\n *\n * @internal\n */\n $$ipc?: boolean;\n}\n\nexport type LogFnOptions = Omit<\n Partial<LogMeta>,\n \"logId\" | \"timestamp\" | \"name\" | \"type\"\n> & {\n mode?: Mode;\n logLevel?: LogLevelUserConfig;\n};\n\nexport type LogFnMeta =\n | LogLevel\n | PartialKeys<LogMeta, \"logId\" | \"timestamp\" | \"name\" | \"category\">;\n\nexport type LogFn = (meta: LogFnMeta, message: string) => void;\n\nexport type LoggerMeta = PartialKeys<\n Omit<LogMeta, \"type\">,\n \"logId\" | \"timestamp\" | \"name\" | \"category\"\n>;\n\nexport type LoggerOptions = Omit<LoggerMeta, \"logId\" | \"timestamp\" | \"type\"> & {\n mode?: Mode;\n logLevel?: LogLevelUserConfig;\n};\n\nexport interface PowerlinesMessage<TMeta> extends UnpluginMessage {\n meta: TMeta;\n}\n\nexport type LogMessage = PowerlinesMessage<Partial<LogMeta>>;\n\n/**\n * A type representing a log message that can be passed to the logging methods defined in the {@link Logger} interface, which includes the log metadata and message content. This type is used as the parameter for the logging methods defined in the {@link Logger} interface, allowing users to log messages with rich metadata that can be used for filtering, formatting, or other purposes in the logging implementation.\n */\nexport type LoggerMessage = PowerlinesMessage<LoggerMeta>;\n\n/**\n * An internal interface representing a logger instance used within Powerlines for logging messages at various log levels, including \"error\", \"warn\", \"info\", \"debug\", and \"trace\". This interface defines methods for logging messages at each log level, which accept a message parameter that can be either a string or an object containing the log metadata and message content. The logger instance also includes an options property that contains the configuration options used for the logger, such as the source, command, environment, plugin, log level, and other relevant metadata. This interface is intended for internal use within Powerlines and is not meant to be implemented by users directly; instead, users can provide a custom logger that implements the {@link CustomLogger} interface to integrate with Powerlines' logging system.\n */\nexport interface Logger {\n options: LoggerOptions;\n error: (message: string | LoggerMessage) => void;\n warn: (message: string | LoggerMessage) => void;\n info: (message: string | LoggerMessage) => void;\n debug: (message: string | LoggerMessage) => void;\n trace: (message: string | LoggerMessage) => void;\n log: (type: LogLevel, message: string | LoggerMessage) => void;\n}\n\n/**\n * A type representing a log message that can be passed to a custom logger, which includes the log metadata and message content. This type is used as the parameter for the logging methods defined in the {@link CustomLogger} interface, allowing users to log messages with rich metadata that can be used for filtering, formatting, or other purposes in their custom logging implementation.\n */\nexport type CustomLoggerMessage = PowerlinesMessage<Omit<LogMeta, \"type\">>;\n\n/**\n * An interface representing a custom logger that can be provided by the user to override the default logging behavior of Powerlines. This interface defines methods for logging messages at different log levels, including \"error\", \"warn\", \"info\", \"debug\", and \"trace\". Each method accepts a message parameter, which can be either a string or an object containing the log metadata and message content. By implementing this interface, users can integrate their own logging system with Powerlines or customize the logging behavior to suit their specific needs.\n */\nexport interface CustomLogger {\n /**\n * A function to log messages at the \"error\" level, which indicates a serious issue that has caused a failure in the build process or a critical problem that needs immediate attention.\n *\n * @param message - The log message to be recorded, which can be a string or an object containing the log metadata and message content. The log message should provide sufficient information to understand the context and nature of the error being reported.\n * @returns void\n */\n error?: (message: CustomLoggerMessage) => void;\n /**\n * A function to log messages at the \"warn\" level, which indicates a potential issue or a situation that may require attention but does not necessarily cause a failure in the build process.\n *\n * @param message - The log message to be recorded, which can be a string or an object containing the log metadata and message content. The log message should provide sufficient information to understand the context and nature of the warning being reported.\n * @returns void\n */\n warn?: (message: CustomLoggerMessage) => void;\n /**\n * A function to log messages at the \"info\" level, which indicates general informational messages about the build process, such as the start and completion of tasks, configuration details, or other relevant information that may be useful for monitoring the build process.\n *\n * @param message - The log message to be recorded, which can be a string or an object containing the log metadata and message content. The log message should provide sufficient information to understand the context and nature of the informational message being reported.\n * @returns void\n */\n info?: (message: CustomLoggerMessage) => void;\n /**\n * A function to log messages at the \"debug\" level, which indicates detailed debugging information that may be useful for diagnosing issues during development or troubleshooting problems in the build process.\n *\n * @param message - The log message to be recorded, which can be a string or an object containing the log metadata and message content. The log message should provide sufficient information to understand the context and nature of the debug information being reported.\n * @returns void\n */\n debug?: (message: CustomLoggerMessage) => void;\n /**\n * A function to log messages at the \"trace\" level, which indicates very detailed tracing information that may be useful for in-depth analysis of the build process or for tracking the flow of execution through various stages of the build.\n *\n * @param message - The log message to be recorded, which can be a string or an object containing the log metadata and message content. The log message should provide sufficient information to understand the context and nature of the trace information being reported.\n * @returns void\n */\n trace?: (message: CustomLoggerMessage) => void;\n}\n\nexport type LogLevelUserConfig =\n | LogLevel\n | RequiredKeys<\n Partial<Record<LogCategory, LogLevel | boolean | undefined>>,\n \"general\"\n >;\n\nexport type LogLevelResolvedConfig = Record<LogCategory, LogLevel>;\n"],"mappings":";AAsBA,MAAa,YAAY;CACvB,QAAQ;CACR,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;CACR;AAED,MAAa,aAAa;CACxB,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACX;AAID,MAAa,gBAAgB;CAC3B,SAAS;CACT,IAAI;CACJ,aAAa;CACb,QAAQ;CACR,SAAS;CACT,OAAO;CACP,KAAK;CACL,KAAK;CACL,OAAO;CACP,SAAS;CACV;AAED,MAAa,iBAAiB;CAC5B,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACd,cAAc;CACf"}
|