chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.

This commit is contained in:
cpojer
2026-02-01 10:03:47 +09:00
parent ad943bd8cf
commit f06dd8df06
1778 changed files with 2949 additions and 4242 deletions

View File

@@ -1,9 +1,7 @@
import fs from "node:fs";
import json5 from "json5";
import { resolveConfigPath } from "../config/paths.js";
import fs from "node:fs";
import type { OpenClawConfig } from "../config/types.js";
import { resolveConfigPath } from "../config/paths.js";
type LoggingConfig = OpenClawConfig["logging"];

View File

@@ -1,9 +1,7 @@
import crypto from "node:crypto";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
enableConsoleCapture,
resetLogger,

View File

@@ -1,5 +1,4 @@
import { describe, expect, it } from "vitest";
import { stripRedundantSubsystemPrefixForConsole } from "../logging.js";
describe("stripRedundantSubsystemPrefixForConsole", () => {

View File

@@ -1,12 +1,11 @@
import { createRequire } from "node:module";
import util from "node:util";
import type { OpenClawConfig } from "../config/types.js";
import { isVerbose } from "../globals.js";
import { stripAnsi } from "../terminal/ansi.js";
import { readLoggingConfig } from "./config.js";
import { type LogLevel, normalizeLogLevel } from "./levels.js";
import { getLogger, type LoggerSettings } from "./logger.js";
import { readLoggingConfig } from "./config.js";
import { loggingState } from "./state.js";
export type ConsoleStyle = "pretty" | "compact" | "json";

View File

@@ -1,13 +1,11 @@
import { createRequire } from "node:module";
import fs from "node:fs";
import { createRequire } from "node:module";
import path from "node:path";
import { Logger as TsLogger } from "tslog";
import type { OpenClawConfig } from "../config/types.js";
import type { ConsoleStyle } from "./console.js";
import { type LogLevel, levelToMinLevel, normalizeLogLevel } from "./levels.js";
import { readLoggingConfig } from "./config.js";
import { type LogLevel, levelToMinLevel, normalizeLogLevel } from "./levels.js";
import { loggingState } from "./state.js";
// Pin to /tmp so mac Debug UI and docs match; os.tmpdir() can be a per-user

View File

@@ -1,5 +1,4 @@
import { describe, expect, it } from "vitest";
import { parseLogLine } from "./parse-log-line.js";
describe("parseLogLine", () => {

View File

@@ -1,5 +1,4 @@
import { describe, expect, it } from "vitest";
import { getDefaultRedactPatterns, redactSensitiveText } from "./redact.js";
const defaults = getDefaultRedactPatterns();

View File

@@ -1,5 +1,4 @@
import { createRequire } from "node:module";
import type { OpenClawConfig } from "../config/config.js";
const requireConfig = createRequire(import.meta.url);

View File

@@ -1,14 +1,13 @@
import { Chalk } from "chalk";
import type { Logger as TsLogger } from "tslog";
import { Chalk } from "chalk";
import { CHAT_CHANNEL_ORDER } from "../channels/registry.js";
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
import { getConsoleSettings, shouldLogSubsystemToConsole } from "./console.js";
import { isVerbose } from "../globals.js";
import { defaultRuntime, type RuntimeEnv } from "../runtime.js";
import { clearActiveProgressLine } from "../terminal/progress-line.js";
import { getConsoleSettings, shouldLogSubsystemToConsole } from "./console.js";
import { type LogLevel, levelToMinLevel } from "./levels.js";
import { getChildLogger } from "./logger.js";
import { loggingState } from "./state.js";
import { clearActiveProgressLine } from "../terminal/progress-line.js";
type LogObj = { date?: Date } & Record<string, unknown>;