mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-22 06:59:03 +00:00
* build(apps): generate native protocol models at build time * test(apps): include native preparation in CI build contract * fix(apps): share cached protocol generation across Apple destinations * fix(build): type native protocol naming helpers * fix(build): preserve native protocol tooling consumers * fix(tooling): scope native protocol build audit roots * fix(build): prepare native protocol in runtime-only builds * fix(build): preserve native preparation package and workflow contracts
15 lines
522 B
TypeScript
15 lines
522 B
TypeScript
export function upperCamel(value: string): string {
|
|
const parts = value.match(/[A-Z]+(?=[A-Z][a-z]|\d|$)|[A-Z]?[a-z]+|\d+/g);
|
|
if (!parts?.length) {
|
|
throw new Error(`Cannot create Kotlin identifier from ${JSON.stringify(value)}`);
|
|
}
|
|
return parts
|
|
.map((part) => part.toLowerCase())
|
|
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
.join("");
|
|
}
|
|
|
|
export function lowerCamel(value: string): string {
|
|
const name = upperCamel(value);
|
|
return name.charAt(0).toLowerCase() + name.slice(1);
|
|
}
|