mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 09:33:06 +00:00
refactor: dedupe infra lowercase helpers
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import JSON5 from "json5";
|
||||
import { LEGACY_MANIFEST_KEYS, MANIFEST_KEY } from "../compat/legacy-names.js";
|
||||
import { parseBooleanValue } from "../utils/boolean.js";
|
||||
import { readStringValue } from "./string-coerce.js";
|
||||
import { normalizeOptionalLowercaseString, readStringValue } from "./string-coerce.js";
|
||||
import { normalizeCsvOrLooseStringList } from "./string-normalization.js";
|
||||
|
||||
export function normalizeStringList(input: unknown): string[] {
|
||||
@@ -105,7 +105,7 @@ export function parseOpenClawManifestInstallBase(
|
||||
const raw = input as Record<string, unknown>;
|
||||
const kindRaw =
|
||||
typeof raw.kind === "string" ? raw.kind : typeof raw.type === "string" ? raw.type : "";
|
||||
const kind = kindRaw.trim().toLowerCase();
|
||||
const kind = normalizeOptionalLowercaseString(kindRaw) ?? "";
|
||||
if (!allowedKinds.includes(kind)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user