@storm-software/config-tools 1.190.150 → 1.190.152
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/bin/config.cjs +20 -40
- package/bin/config.mjs +19 -38
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/config-file/get-config-file.cjs +1 -2
- package/dist/config-file/get-config-file.d.cts +0 -2
- package/dist/config-file/get-config-file.d.mts +0 -2
- package/dist/config-file/get-config-file.mjs +1 -2
- package/dist/create-storm-config.cjs +1 -2
- package/dist/create-storm-config.d.cts +0 -2
- package/dist/create-storm-config.d.mts +0 -2
- package/dist/create-storm-config.mjs +1 -2
- package/dist/env/get-env.cjs +1 -2
- package/dist/env/get-env.d.cts +0 -2
- package/dist/env/get-env.d.mts +0 -2
- package/dist/env/get-env.mjs +1 -2
- package/dist/env/set-env.cjs +1 -2
- package/dist/env/set-env.d.cts +0 -2
- package/dist/env/set-env.d.mts +0 -2
- package/dist/env/set-env.mjs +1 -2
- package/dist/get-config.cjs +1 -2
- package/dist/get-config.d.cts +0 -2
- package/dist/get-config.d.mts +0 -2
- package/dist/get-config.mjs +1 -2
- package/dist/logger/chalk.cjs +1 -2
- package/dist/logger/chalk.d.cts +0 -2
- package/dist/logger/chalk.d.mts +0 -2
- package/dist/logger/chalk.mjs +1 -2
- package/dist/logger/console-icons.cjs +1 -2
- package/dist/logger/console-icons.d.cts +0 -2
- package/dist/logger/console-icons.d.mts +0 -2
- package/dist/logger/console-icons.mjs +1 -2
- package/dist/logger/console.cjs +1 -2
- package/dist/logger/console.d.cts +0 -2
- package/dist/logger/console.d.mts +0 -2
- package/dist/logger/console.mjs +1 -2
- package/dist/logger/create-logger.cjs +1 -2
- package/dist/logger/create-logger.d.cts +0 -2
- package/dist/logger/create-logger.d.mts +0 -2
- package/dist/logger/create-logger.mjs +1 -2
- package/dist/logger/format-timestamp.cjs +1 -2
- package/dist/logger/format-timestamp.d.cts +0 -2
- package/dist/logger/format-timestamp.d.mts +0 -2
- package/dist/logger/format-timestamp.mjs +1 -2
- package/dist/logger/get-log-level.cjs +1 -2
- package/dist/logger/get-log-level.d.cts +0 -2
- package/dist/logger/get-log-level.d.mts +0 -2
- package/dist/logger/get-log-level.mjs +1 -2
- package/dist/logger/is-unicode-supported.cjs +1 -2
- package/dist/logger/is-unicode-supported.d.cts +0 -2
- package/dist/logger/is-unicode-supported.d.mts +0 -2
- package/dist/logger/is-unicode-supported.mjs +1 -2
- package/dist/types.cjs +1 -2
- package/dist/types.d.cts +0 -2
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +1 -2
- package/dist/utilities/apply-workspace-tokens.cjs +1 -2
- package/dist/utilities/apply-workspace-tokens.d.cts +0 -2
- package/dist/utilities/apply-workspace-tokens.d.mts +0 -2
- package/dist/utilities/apply-workspace-tokens.mjs +1 -2
- package/dist/utilities/colors.cjs +1 -2
- package/dist/utilities/colors.d.cts +0 -2
- package/dist/utilities/colors.d.mts +0 -2
- package/dist/utilities/colors.mjs +1 -2
- package/dist/utilities/correct-paths.cjs +1 -2
- package/dist/utilities/correct-paths.d.cts +0 -2
- package/dist/utilities/correct-paths.d.mts +0 -2
- package/dist/utilities/correct-paths.mjs +1 -2
- package/dist/utilities/file-path-utils.cjs +1 -2
- package/dist/utilities/file-path-utils.d.cts +0 -2
- package/dist/utilities/file-path-utils.d.mts +0 -2
- package/dist/utilities/file-path-utils.mjs +1 -2
- package/dist/utilities/find-up.cjs +1 -2
- package/dist/utilities/find-up.d.cts +0 -2
- package/dist/utilities/find-up.d.mts +0 -2
- package/dist/utilities/find-up.mjs +1 -2
- package/dist/utilities/find-workspace-root.cjs +1 -2
- package/dist/utilities/find-workspace-root.d.cts +0 -2
- package/dist/utilities/find-workspace-root.d.mts +0 -2
- package/dist/utilities/find-workspace-root.mjs +1 -2
- package/dist/utilities/format-error-message.cjs +1 -2
- package/dist/utilities/format-error-message.d.cts +0 -2
- package/dist/utilities/format-error-message.d.mts +0 -2
- package/dist/utilities/format-error-message.mjs +1 -2
- package/dist/utilities/get-default-config.cjs +1 -2
- package/dist/utilities/get-default-config.d.cts +0 -2
- package/dist/utilities/get-default-config.d.mts +0 -2
- package/dist/utilities/get-default-config.mjs +1 -2
- package/dist/utilities/process-handler.cjs +1 -2
- package/dist/utilities/process-handler.d.cts +0 -2
- package/dist/utilities/process-handler.d.mts +0 -2
- package/dist/utilities/process-handler.mjs +1 -2
- package/dist/utilities/run.cjs +1 -2
- package/dist/utilities/run.d.cts +0 -2
- package/dist/utilities/run.d.mts +0 -2
- package/dist/utilities/run.mjs +1 -2
- package/dist/utilities/toml.cjs +1 -2
- package/dist/utilities/toml.d.cts +0 -2
- package/dist/utilities/toml.d.mts +0 -2
- package/dist/utilities/toml.mjs +1 -2
- package/package.json +4 -4
package/dist/get-config.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
2
|
-
//#region src/get-config.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get the config for the current Storm workspace
|
|
5
4
|
*
|
|
@@ -40,5 +39,4 @@ declare function getWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceCo
|
|
|
40
39
|
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
41
40
|
*/
|
|
42
41
|
declare function tryGetWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceConfigOptions): Promise<StormWorkspaceConfig | undefined>;
|
|
43
|
-
//#endregion
|
|
44
42
|
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
|
package/dist/get-config.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
4
|
-
//#region src/get-config.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get the config for the current Storm workspace
|
|
7
6
|
*
|
|
@@ -42,5 +41,4 @@ declare function getWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceCo
|
|
|
42
41
|
* @returns The config for the current Storm workspace, or undefined if the config file could not be loaded
|
|
43
42
|
*/
|
|
44
43
|
declare function tryGetWorkspaceConfig(skipLogs?: boolean, options?: GetWorkspaceConfigOptions): Promise<StormWorkspaceConfig | undefined>;
|
|
45
|
-
//#endregion
|
|
46
44
|
export { GetWorkspaceConfigOptions, getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
|
package/dist/get-config.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { findWorkspaceRoot } from "./utilities/find-workspace-root.mjs";
|
|
5
5
|
import { loadStormWorkspaceConfig, tryLoadStormWorkspaceConfig } from "./create-storm-config.mjs";
|
|
6
|
-
|
|
6
|
+
// src/get-config.ts
|
|
7
7
|
/**
|
|
8
8
|
* Get the config for the current Storm workspace
|
|
9
9
|
*
|
|
@@ -42,5 +42,4 @@ async function tryGetWorkspaceConfig(skipLogs = true, options = {}) {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { getConfig, getWorkspaceConfig, tryGetWorkspaceConfig };
|
package/dist/logger/chalk.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
let chalk = require("chalk");
|
|
4
4
|
chalk = require_runtime.__toESM(chalk, 1);
|
|
5
|
-
|
|
5
|
+
// src/logger/chalk.ts
|
|
6
6
|
const chalkDefault = {
|
|
7
7
|
hex: (_) => (message) => message,
|
|
8
8
|
bgHex: (_) => ({
|
|
@@ -39,5 +39,4 @@ const getChalk = () => {
|
|
|
39
39
|
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) _chalk = chalkDefault;
|
|
40
40
|
return _chalk;
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
exports.getChalk = getChalk;
|
package/dist/logger/chalk.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/logger/chalk.d.ts
|
|
2
1
|
type GetChalkReturn = {
|
|
3
2
|
hex: (_: string) => (message?: string) => string | undefined;
|
|
4
3
|
bgHex: (_: string) => {
|
|
@@ -31,5 +30,4 @@ type GetChalkReturn = {
|
|
|
31
30
|
* @returns The chalk instance
|
|
32
31
|
*/
|
|
33
32
|
declare const getChalk: () => GetChalkReturn;
|
|
34
|
-
//#endregion
|
|
35
33
|
export { GetChalkReturn, getChalk };
|
package/dist/logger/chalk.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/logger/chalk.d.ts
|
|
4
3
|
type GetChalkReturn = {
|
|
5
4
|
hex: (_: string) => (message?: string) => string | undefined;
|
|
6
5
|
bgHex: (_: string) => {
|
|
@@ -33,5 +32,4 @@ type GetChalkReturn = {
|
|
|
33
32
|
* @returns The chalk instance
|
|
34
33
|
*/
|
|
35
34
|
declare const getChalk: () => GetChalkReturn;
|
|
36
|
-
//#endregion
|
|
37
35
|
export { GetChalkReturn, getChalk };
|
package/dist/logger/chalk.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
|
|
5
|
+
// src/logger/chalk.ts
|
|
6
6
|
const chalkDefault = {
|
|
7
7
|
hex: (_) => (message) => message,
|
|
8
8
|
bgHex: (_) => ({
|
|
@@ -39,5 +39,4 @@ const getChalk = () => {
|
|
|
39
39
|
if (!_chalk?.hex || !_chalk?.bold?.hex || !_chalk?.bgHex || !_chalk?.whiteBright || !_chalk?.white) _chalk = chalkDefault;
|
|
40
40
|
return _chalk;
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { getChalk };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_types = require("../types.cjs");
|
|
3
3
|
const require_logger_is_unicode_supported = require("./is-unicode-supported.cjs");
|
|
4
|
-
|
|
4
|
+
// src/logger/console-icons.ts
|
|
5
5
|
const useIcon = (c, fallback) => require_logger_is_unicode_supported.isUnicodeSupported() ? c : fallback;
|
|
6
6
|
const CONSOLE_ICONS = {
|
|
7
7
|
[require_types.LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -14,5 +14,4 @@ const CONSOLE_ICONS = {
|
|
|
14
14
|
[require_types.LogLevelLabel.TRACE]: useIcon("⚙", "T"),
|
|
15
15
|
[require_types.LogLevelLabel.ALL]: useIcon("✉", "→")
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
exports.CONSOLE_ICONS = CONSOLE_ICONS;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { LogLevelLabel } from "../types.mjs";
|
|
4
|
-
//#region src/logger/console-icons.d.ts
|
|
5
4
|
declare const CONSOLE_ICONS: { [k in LogLevelLabel]?: string; };
|
|
6
|
-
//#endregion
|
|
7
5
|
export { CONSOLE_ICONS };
|
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { LogLevelLabel } from "../types.mjs";
|
|
5
5
|
import { isUnicodeSupported } from "./is-unicode-supported.mjs";
|
|
6
|
-
|
|
6
|
+
// src/logger/console-icons.ts
|
|
7
7
|
const useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
8
8
|
const CONSOLE_ICONS = {
|
|
9
9
|
[LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -16,5 +16,4 @@ const CONSOLE_ICONS = {
|
|
|
16
16
|
[LogLevelLabel.TRACE]: useIcon("⚙", "T"),
|
|
17
17
|
[LogLevelLabel.ALL]: useIcon("✉", "→")
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { CONSOLE_ICONS };
|
package/dist/logger/console.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const require_logger_console_icons = require("./console-icons.cjs");
|
|
|
6
6
|
const require_logger_format_timestamp = require("./format-timestamp.cjs");
|
|
7
7
|
const require_logger_get_log_level = require("./get-log-level.cjs");
|
|
8
8
|
let date_fns_formatDistanceToNow = require("date-fns/formatDistanceToNow");
|
|
9
|
-
|
|
9
|
+
// src/logger/console.ts
|
|
10
10
|
/**
|
|
11
11
|
* Get the log function for a log level
|
|
12
12
|
*
|
|
@@ -179,7 +179,6 @@ const _isFunction = (value) => {
|
|
|
179
179
|
* @returns The brand icon
|
|
180
180
|
*/
|
|
181
181
|
const brandIcon = (config = {}, _chalk = require_logger_chalk.getChalk()) => _chalk.hex(require_utilities_colors.getColor("brand", config))("🗲");
|
|
182
|
-
//#endregion
|
|
183
182
|
exports.brandIcon = brandIcon;
|
|
184
183
|
exports.formatLogMessage = formatLogMessage;
|
|
185
184
|
exports.getLogFn = getLogFn;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LogLevel } from "../types.cjs";
|
|
2
2
|
import { getChalk } from "./chalk.cjs";
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
-
//#region src/logger/console.d.ts
|
|
5
4
|
interface GetLogFnOptions {
|
|
6
5
|
/**
|
|
7
6
|
* Whether to include the full date and time in the log message (defaults to `false`, which only includes the time)
|
|
@@ -120,5 +119,4 @@ declare const formatLogMessage: (message?: any, options?: FormatLogMessageOption
|
|
|
120
119
|
* @returns The brand icon
|
|
121
120
|
*/
|
|
122
121
|
declare const brandIcon: (config?: Partial<StormWorkspaceConfig>, _chalk?: ReturnType<typeof getChalk>) => string | undefined;
|
|
123
|
-
//#endregion
|
|
124
122
|
export { FormatLogMessageOptions, GetLogFnOptions, brandIcon, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writePerformance, writeSuccess, writeSystem, writeTrace, writeWarning };
|
|
@@ -3,7 +3,6 @@ import __tsdown_shims_url from 'node:url';
|
|
|
3
3
|
import { LogLevel } from "../types.mjs";
|
|
4
4
|
import { getChalk } from "./chalk.mjs";
|
|
5
5
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
6
|
-
//#region src/logger/console.d.ts
|
|
7
6
|
interface GetLogFnOptions {
|
|
8
7
|
/**
|
|
9
8
|
* Whether to include the full date and time in the log message (defaults to `false`, which only includes the time)
|
|
@@ -122,5 +121,4 @@ declare const formatLogMessage: (message?: any, options?: FormatLogMessageOption
|
|
|
122
121
|
* @returns The brand icon
|
|
123
122
|
*/
|
|
124
123
|
declare const brandIcon: (config?: Partial<StormWorkspaceConfig>, _chalk?: ReturnType<typeof getChalk>) => string | undefined;
|
|
125
|
-
//#endregion
|
|
126
124
|
export { FormatLogMessageOptions, GetLogFnOptions, brandIcon, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writePerformance, writeSuccess, writeSystem, writeTrace, writeWarning };
|
package/dist/logger/console.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { CONSOLE_ICONS } from "./console-icons.mjs";
|
|
|
8
8
|
import { formatTimestamp } from "./format-timestamp.mjs";
|
|
9
9
|
import { getLogLevel } from "./get-log-level.mjs";
|
|
10
10
|
import { formatDistanceToNow } from "date-fns/formatDistanceToNow";
|
|
11
|
-
|
|
11
|
+
// src/logger/console.ts
|
|
12
12
|
/**
|
|
13
13
|
* Get the log function for a log level
|
|
14
14
|
*
|
|
@@ -181,5 +181,4 @@ const _isFunction = (value) => {
|
|
|
181
181
|
* @returns The brand icon
|
|
182
182
|
*/
|
|
183
183
|
const brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("🗲");
|
|
184
|
-
//#endregion
|
|
185
184
|
export { brandIcon, formatLogMessage, getLogFn, getStopwatch, writeDebug, writeError, writeFatal, writeInfo, writePerformance, writeSuccess, writeSystem, writeTrace, writeWarning };
|
|
@@ -4,7 +4,7 @@ const require_types = require("../types.cjs");
|
|
|
4
4
|
const require_logger_console = require("./console.cjs");
|
|
5
5
|
let chalk = require("chalk");
|
|
6
6
|
chalk = require_runtime.__toESM(chalk, 1);
|
|
7
|
-
|
|
7
|
+
// src/logger/create-logger.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a logger instance with the specified configuration.
|
|
10
10
|
*
|
|
@@ -30,5 +30,4 @@ async function createLogger(config) {
|
|
|
30
30
|
getStopwatch: require_logger_console.getStopwatch
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
exports.createLogger = createLogger;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Logger } from "../types.cjs";
|
|
2
2
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
3
|
-
//#region src/logger/create-logger.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Create a logger instance with the specified configuration.
|
|
6
5
|
*
|
|
@@ -8,5 +7,4 @@ import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
|
8
7
|
* @returns A promise that resolves to a Logger instance.
|
|
9
8
|
*/
|
|
10
9
|
declare function createLogger(config?: Partial<StormWorkspaceConfig>): Promise<Logger>;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { createLogger };
|
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { Logger } from "../types.mjs";
|
|
4
4
|
import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
5
|
-
//#region src/logger/create-logger.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Create a logger instance with the specified configuration.
|
|
8
7
|
*
|
|
@@ -10,5 +9,4 @@ import { StormWorkspaceConfig } from "@storm-software/config/types";
|
|
|
10
9
|
* @returns A promise that resolves to a Logger instance.
|
|
11
10
|
*/
|
|
12
11
|
declare function createLogger(config?: Partial<StormWorkspaceConfig>): Promise<Logger>;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { createLogger };
|
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { LogLevel } from "../types.mjs";
|
|
5
5
|
import { getLogFn, getStopwatch } from "./console.mjs";
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
-
|
|
7
|
+
// src/logger/create-logger.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a logger instance with the specified configuration.
|
|
10
10
|
*
|
|
@@ -30,5 +30,4 @@ async function createLogger(config) {
|
|
|
30
30
|
getStopwatch
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { createLogger };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/logger/format-timestamp.ts
|
|
3
3
|
/**
|
|
4
4
|
* Format a timestamp to a human-readable string.
|
|
5
5
|
*
|
|
@@ -10,5 +10,4 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
10
10
|
const formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
11
11
|
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
exports.formatTimestamp = formatTimestamp;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/logger/format-timestamp.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Format a timestamp to a human-readable string.
|
|
4
3
|
*
|
|
@@ -7,5 +6,4 @@
|
|
|
7
6
|
* @returns The formatted timestamp.
|
|
8
7
|
*/
|
|
9
8
|
declare const formatTimestamp: (fullDateTime?: boolean, date?: Date) => string;
|
|
10
|
-
//#endregion
|
|
11
9
|
export { formatTimestamp };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/logger/format-timestamp.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Format a timestamp to a human-readable string.
|
|
6
5
|
*
|
|
@@ -9,5 +8,4 @@ import __tsdown_shims_url from 'node:url';
|
|
|
9
8
|
* @returns The formatted timestamp.
|
|
10
9
|
*/
|
|
11
10
|
declare const formatTimestamp: (fullDateTime?: boolean, date?: Date) => string;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { formatTimestamp };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/logger/format-timestamp.ts
|
|
5
5
|
/**
|
|
6
6
|
* Format a timestamp to a human-readable string.
|
|
7
7
|
*
|
|
@@ -12,5 +12,4 @@ import.meta.url;
|
|
|
12
12
|
const formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
13
13
|
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
14
14
|
};
|
|
15
|
-
//#endregion
|
|
16
15
|
export { formatTimestamp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_types = require("../types.cjs");
|
|
3
|
-
|
|
3
|
+
// src/logger/get-log-level.ts
|
|
4
4
|
/**
|
|
5
5
|
* Convert the log level label to a log level
|
|
6
6
|
*
|
|
@@ -48,7 +48,6 @@ const getLogLevelLabel = (logLevel = require_types.LogLevel.INFO) => {
|
|
|
48
48
|
const isVerbose = (label = require_types.LogLevelLabel.SILENT) => {
|
|
49
49
|
return (typeof label === "string" ? getLogLevel(label) : label) >= require_types.LogLevel.DEBUG;
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
exports.getLogLevel = getLogLevel;
|
|
53
52
|
exports.getLogLevelLabel = getLogLevelLabel;
|
|
54
53
|
exports.isVerbose = isVerbose;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LogLevel, LogLevelLabel } from "../types.cjs";
|
|
2
|
-
//#region src/logger/get-log-level.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Convert the log level label to a log level
|
|
5
4
|
*
|
|
@@ -21,5 +20,4 @@ declare const getLogLevelLabel: (logLevel?: number) => LogLevelLabel;
|
|
|
21
20
|
* @returns True if the log level is verbose
|
|
22
21
|
*/
|
|
23
22
|
declare const isVerbose: (label?: string | LogLevel) => boolean;
|
|
24
|
-
//#endregion
|
|
25
23
|
export { getLogLevel, getLogLevelLabel, isVerbose };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { LogLevel, LogLevelLabel } from "../types.mjs";
|
|
4
|
-
//#region src/logger/get-log-level.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Convert the log level label to a log level
|
|
7
6
|
*
|
|
@@ -23,5 +22,4 @@ declare const getLogLevelLabel: (logLevel?: number) => LogLevelLabel;
|
|
|
23
22
|
* @returns True if the log level is verbose
|
|
24
23
|
*/
|
|
25
24
|
declare const isVerbose: (label?: string | LogLevel) => boolean;
|
|
26
|
-
//#endregion
|
|
27
25
|
export { getLogLevel, getLogLevelLabel, isVerbose };
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { LogLevel, LogLevelLabel } from "../types.mjs";
|
|
5
|
-
|
|
5
|
+
// src/logger/get-log-level.ts
|
|
6
6
|
/**
|
|
7
7
|
* Convert the log level label to a log level
|
|
8
8
|
*
|
|
@@ -50,5 +50,4 @@ const getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
50
50
|
const isVerbose = (label = LogLevelLabel.SILENT) => {
|
|
51
51
|
return (typeof label === "string" ? getLogLevel(label) : label) >= LogLevel.DEBUG;
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { getLogLevel, getLogLevelLabel, isVerbose };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/logger/is-unicode-supported.ts
|
|
3
3
|
function isUnicodeSupported() {
|
|
4
4
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
5
5
|
return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
exports.isUnicodeSupported = isUnicodeSupported;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/logger/is-unicode-supported.ts
|
|
5
5
|
function isUnicodeSupported() {
|
|
6
6
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
7
7
|
return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
8
8
|
}
|
|
9
|
-
//#endregion
|
|
10
9
|
export { isUnicodeSupported };
|
package/dist/types.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/types.ts
|
|
3
3
|
const LogLevel = {
|
|
4
4
|
SILENT: 0,
|
|
5
5
|
FATAL: 10,
|
|
@@ -24,6 +24,5 @@ const LogLevelLabel = {
|
|
|
24
24
|
TRACE: "trace",
|
|
25
25
|
ALL: "all"
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.LogLevel = LogLevel;
|
|
29
28
|
exports.LogLevelLabel = LogLevelLabel;
|
package/dist/types.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
2
|
-
//#region src/types.d.ts
|
|
3
2
|
type LogLevel = 0 | 10 | 20 | 30 | 35 | 40 | 50 | 60 | 70 | 100;
|
|
4
3
|
declare const LogLevel: {
|
|
5
4
|
readonly SILENT: LogLevel;
|
|
@@ -47,5 +46,4 @@ interface ProjectTokenizerOptions extends BaseTokenizerOptions {
|
|
|
47
46
|
sourceRoot?: string;
|
|
48
47
|
}
|
|
49
48
|
type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; };
|
|
50
|
-
//#endregion
|
|
51
49
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { StormWorkspaceConfig } from "@storm-software/config";
|
|
4
|
-
//#region src/types.d.ts
|
|
5
4
|
type LogLevel = 0 | 10 | 20 | 30 | 35 | 40 | 50 | 60 | 70 | 100;
|
|
6
5
|
declare const LogLevel: {
|
|
7
6
|
readonly SILENT: LogLevel;
|
|
@@ -49,5 +48,4 @@ interface ProjectTokenizerOptions extends BaseTokenizerOptions {
|
|
|
49
48
|
sourceRoot?: string;
|
|
50
49
|
}
|
|
51
50
|
type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; };
|
|
52
|
-
//#endregion
|
|
53
51
|
export { BaseTokenizerOptions, DeepPartial, LogLevel, LogLevelLabel, Logger, ProjectTokenizerOptions };
|
package/dist/types.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/types.ts
|
|
5
5
|
const LogLevel = {
|
|
6
6
|
SILENT: 0,
|
|
7
7
|
FATAL: 10,
|
|
@@ -26,5 +26,4 @@ const LogLevelLabel = {
|
|
|
26
26
|
TRACE: "trace",
|
|
27
27
|
ALL: "all"
|
|
28
28
|
};
|
|
29
|
-
//#endregion
|
|
30
29
|
export { LogLevel, LogLevelLabel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_utilities_find_workspace_root = require("./find-workspace-root.cjs");
|
|
3
|
-
|
|
3
|
+
// src/utilities/apply-workspace-tokens.ts
|
|
4
4
|
const applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
5
5
|
let result = option;
|
|
6
6
|
if (!result) return result;
|
|
@@ -31,7 +31,6 @@ const applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
31
31
|
else result[option] = options[option];
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
exports.applyWorkspaceBaseTokens = applyWorkspaceBaseTokens;
|
|
36
35
|
exports.applyWorkspaceProjectTokens = applyWorkspaceProjectTokens;
|
|
37
36
|
exports.applyWorkspaceTokens = applyWorkspaceTokens;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BaseTokenizerOptions, ProjectTokenizerOptions } from "../types.cjs";
|
|
2
|
-
//#region src/utilities/apply-workspace-tokens.d.ts
|
|
3
2
|
declare const applyWorkspaceBaseTokens: <TTokenizerOptions extends BaseTokenizerOptions = BaseTokenizerOptions>(option: string, tokenParams: TTokenizerOptions) => Promise<string>;
|
|
4
3
|
declare const applyWorkspaceProjectTokens: <TTokenizerOptions extends ProjectTokenizerOptions = ProjectTokenizerOptions>(option: string, tokenParams: TTokenizerOptions) => Promise<string>;
|
|
5
4
|
declare const applyWorkspaceTokens: <TTokenizerOptions extends BaseTokenizerOptions = BaseTokenizerOptions>(options: Record<string, any>, tokenParams: TTokenizerOptions, tokenizerFn: (option: string, tokenParams: TTokenizerOptions) => string | Promise<string>) => Promise<Record<string, any>>;
|
|
6
|
-
//#endregion
|
|
7
5
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { BaseTokenizerOptions, ProjectTokenizerOptions } from "../types.mjs";
|
|
4
|
-
//#region src/utilities/apply-workspace-tokens.d.ts
|
|
5
4
|
declare const applyWorkspaceBaseTokens: <TTokenizerOptions extends BaseTokenizerOptions = BaseTokenizerOptions>(option: string, tokenParams: TTokenizerOptions) => Promise<string>;
|
|
6
5
|
declare const applyWorkspaceProjectTokens: <TTokenizerOptions extends ProjectTokenizerOptions = ProjectTokenizerOptions>(option: string, tokenParams: TTokenizerOptions) => Promise<string>;
|
|
7
6
|
declare const applyWorkspaceTokens: <TTokenizerOptions extends BaseTokenizerOptions = BaseTokenizerOptions>(options: Record<string, any>, tokenParams: TTokenizerOptions, tokenizerFn: (option: string, tokenParams: TTokenizerOptions) => string | Promise<string>) => Promise<Record<string, any>>;
|
|
8
|
-
//#endregion
|
|
9
7
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens };
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { findWorkspaceRoot } from "./find-workspace-root.mjs";
|
|
5
|
-
|
|
5
|
+
// src/utilities/apply-workspace-tokens.ts
|
|
6
6
|
const applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
7
7
|
let result = option;
|
|
8
8
|
if (!result) return result;
|
|
@@ -33,5 +33,4 @@ const applyWorkspaceTokens = async (options, tokenParams, tokenizerFn) => {
|
|
|
33
33
|
else result[option] = options[option];
|
|
34
34
|
return result;
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { applyWorkspaceBaseTokens, applyWorkspaceProjectTokens, applyWorkspaceTokens };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/utilities/colors.ts
|
|
3
3
|
/**
|
|
4
4
|
* Storm theme config values used for styling various workspace elements
|
|
5
5
|
*/
|
|
@@ -91,7 +91,6 @@ function getGradient(config) {
|
|
|
91
91
|
const result = (typeof colors["dark"] === "object" ? colors["dark"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG["dark"].gradient;
|
|
92
92
|
if (result && Array.isArray(result) && result.length > 0) return result;
|
|
93
93
|
}
|
|
94
|
-
//#endregion
|
|
95
94
|
exports.DEFAULT_COLOR_CONFIG = DEFAULT_COLOR_CONFIG;
|
|
96
95
|
exports.getColor = getColor;
|
|
97
96
|
exports.getColors = getColors;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Colors, MultiThemeColors, StormWorkspaceConfig } from "@storm-software/config/types";
|
|
2
|
-
//#region src/utilities/colors.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Storm theme config values used for styling various workspace elements
|
|
5
4
|
*/
|
|
@@ -27,5 +26,4 @@ declare function getColor(key: "background" | "foreground" | "brand" | "discover
|
|
|
27
26
|
* @returns The color value for the specified key, or a default value if not defined.
|
|
28
27
|
*/
|
|
29
28
|
declare function getGradient(config?: Partial<Pick<StormWorkspaceConfig, "colors">>): string[] | undefined;
|
|
30
|
-
//#endregion
|
|
31
29
|
export { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { Colors, MultiThemeColors, StormWorkspaceConfig } from "@storm-software/config/types";
|
|
4
|
-
//#region src/utilities/colors.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Storm theme config values used for styling various workspace elements
|
|
7
6
|
*/
|
|
@@ -29,5 +28,4 @@ declare function getColor(key: "background" | "foreground" | "brand" | "discover
|
|
|
29
28
|
* @returns The color value for the specified key, or a default value if not defined.
|
|
30
29
|
*/
|
|
31
30
|
declare function getGradient(config?: Partial<Pick<StormWorkspaceConfig, "colors">>): string[] | undefined;
|
|
32
|
-
//#endregion
|
|
33
31
|
export { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/utilities/colors.ts
|
|
5
5
|
/**
|
|
6
6
|
* Storm theme config values used for styling various workspace elements
|
|
7
7
|
*/
|
|
@@ -93,5 +93,4 @@ function getGradient(config) {
|
|
|
93
93
|
const result = (typeof colors["dark"] === "object" ? colors["dark"].gradient : colors.gradient) || DEFAULT_COLOR_CONFIG["dark"].gradient;
|
|
94
94
|
if (result && Array.isArray(result) && result.length > 0) return result;
|
|
95
95
|
}
|
|
96
|
-
//#endregion
|
|
97
96
|
export { DEFAULT_COLOR_CONFIG, getColor, getColors, getGradient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/utilities/correct-paths.ts
|
|
3
3
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
4
4
|
function normalizeWindowsPath(input = "") {
|
|
5
5
|
if (!input) return input;
|
|
@@ -184,7 +184,6 @@ const parse = function(p) {
|
|
|
184
184
|
name: base.slice(0, base.length - extension.length)
|
|
185
185
|
};
|
|
186
186
|
};
|
|
187
|
-
//#endregion
|
|
188
187
|
exports.basename = basename;
|
|
189
188
|
exports.correctPaths = correctPaths;
|
|
190
189
|
exports.dirname = dirname;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
//#region src/utilities/correct-paths.d.ts
|
|
3
2
|
declare function normalizeWindowsPath(input?: string): string;
|
|
4
3
|
/**
|
|
5
4
|
* Constant for path separator.
|
|
@@ -26,5 +25,4 @@ declare const dirname: typeof path.dirname;
|
|
|
26
25
|
declare const format: typeof path.format;
|
|
27
26
|
declare const basename: typeof path.basename;
|
|
28
27
|
declare const parse: typeof path.parse;
|
|
29
|
-
//#endregion
|
|
30
28
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
//#region src/utilities/correct-paths.d.ts
|
|
5
4
|
declare function normalizeWindowsPath(input?: string): string;
|
|
6
5
|
/**
|
|
7
6
|
* Constant for path separator.
|
|
@@ -28,5 +27,4 @@ declare const dirname: typeof path.dirname;
|
|
|
28
27
|
declare const format: typeof path.format;
|
|
29
28
|
declare const basename: typeof path.basename;
|
|
30
29
|
declare const parse: typeof path.parse;
|
|
31
|
-
//#endregion
|
|
32
30
|
export { basename, correctPaths, dirname, extname, format, isAbsolute, joinPaths, normalizeString, normalizeWindowsPath, parse, relative, resolve, sep, toNamespacedPath };
|