mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
* Move the apps to the root dir * Update all references from sdk/apps/ to apps/ * Update dependencies * Install bun types * Fix types * Fix types * Fix linter * Ingore apps from vscode * Fix security warning * Fix windows install * Enable windows dev mode * Revert "Enable windows dev mode" This reverts commita46c99282e. * Revert "Ingore apps from vscode" This reverts commit47f7b265d2. * Revert "Fix windows install" This reverts commit1dabba1556. * update the repo root * fix root dir * fix path * fix other path * Fix unrelated changes * fix: address apps move follow-up blockers (#11228) * fix: update root app command paths * fix: include moved apps in root checks * fix: clean up moved app path references --------- Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
export interface BuildOptions {
|
|
single: boolean;
|
|
skipInstall: boolean;
|
|
skipSdkBuild: boolean;
|
|
installNativeVariants: boolean;
|
|
}
|
|
|
|
export function parseBuildOptions(args: readonly string[]): BuildOptions {
|
|
return {
|
|
single: args.includes("--single"),
|
|
skipInstall: args.includes("--skip-install"),
|
|
skipSdkBuild: args.includes("--skip-sdk-build"),
|
|
installNativeVariants: args.includes("--install-native-variants"),
|
|
};
|
|
}
|
|
|
|
export function shouldInstallNativeVariants(input: {
|
|
options: BuildOptions;
|
|
opentuiVersion: string | undefined;
|
|
}): boolean {
|
|
return Boolean(
|
|
input.opentuiVersion &&
|
|
input.options.installNativeVariants &&
|
|
!input.options.skipInstall,
|
|
);
|
|
}
|
|
|
|
export function validateBuildOptions(input: {
|
|
options: BuildOptions;
|
|
opentuiVersion: string | undefined;
|
|
targetCount: number;
|
|
}): string | undefined {
|
|
if (input.targetCount === 0) {
|
|
return "No matching targets for this platform.";
|
|
}
|
|
if (
|
|
input.opentuiVersion &&
|
|
!input.options.single &&
|
|
!input.options.skipInstall &&
|
|
!input.options.installNativeVariants
|
|
) {
|
|
return [
|
|
"Cross-platform OpenTUI builds require native package variants.",
|
|
"Pass --install-native-variants to allow the build script to run bun install for all OpenTUI native packages.",
|
|
"Pass --skip-install only when those packages are already installed.",
|
|
].join("\n");
|
|
}
|
|
return undefined;
|
|
}
|