Files
openclaw/src/plugin-sdk/string-coerce-runtime.ts
Peter Steinberger 00d8d7ead0 refactor: extract normalization core package
Extract shared normalization/coercion helpers into private @openclaw/normalization-core workspace package while preserving existing plugin SDK helper subpaths.\n\nAlso keeps direct normalization-core imports internal, wires UI/build/loader resolution, and replaces the slow PR network CodeQL lane with a fast added-line boundary scan while retaining full CodeQL for scheduled/manual runs.\n\nVerification: local moved tests, plugin SDK boundary tests, extension loader tests, agents-support shard, UI build/test, build artifacts, lint, workflow guards, autoreview, and GitHub CI passed on PR head 963d893715.
2026-05-31 01:33:00 +01:00

52 lines
1.6 KiB
TypeScript

// Narrow primitive coercion helpers for plugins that do not need the full text-runtime barrel.
export {
hasNonEmptyString,
localeLowercasePreservingWhitespace,
lowercasePreservingWhitespace,
normalizeFastMode,
normalizeLowercaseStringOrEmpty,
normalizeNullableString,
normalizeOptionalLowercaseString,
normalizeOptionalString,
normalizeOptionalStringifiedId,
normalizeStringifiedEntries,
normalizeStringifiedOptionalString,
readStringValue,
} from "../../packages/normalization-core/src/string-coerce.js";
export {
asFiniteNumberInRange,
asFiniteNumber,
asPositiveSafeInteger,
asSafeIntegerInRange,
parseFiniteNumber,
parseStrictFiniteNumber,
parseStrictInteger,
parseStrictNonNegativeInteger,
parseStrictPositiveInteger,
} from "../../packages/normalization-core/src/number-coercion.js";
export { asBoolean, parseBooleanValue } from "../utils/boolean.js";
export {
asRecord,
asNullableRecord,
asOptionalRecord,
readStringField,
} from "../../packages/normalization-core/src/record-coerce.js";
export { isRecord } from "../utils.js";
export {
normalizeAtHashSlug,
normalizeHyphenSlug,
normalizeOptionalTrimmedStringList,
normalizeSortedUniqueTrimmedStringList,
normalizeSingleOrTrimmedStringList,
normalizeStringEntries,
normalizeStringEntriesLower,
normalizeUniqueStringEntries,
normalizeUniqueTrimmedStringList,
normalizeTrimmedStringList,
sortUniqueStrings,
uniqueStrings,
uniqueValues,
} from "../../packages/normalization-core/src/string-normalization.js";
export { summarizeStringEntries } from "../shared/string-sample.js";