<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for creating new documents from markdown and retrieving the current locale in the iOS app. - Introduced a shell script to automate Apollo iOS code generation tasks. - **Improvements** - Upgraded the Apollo iOS library to version 1.22.0 for improved performance and compatibility. - Enhanced metadata handling in the app to include document ID, workspace ID, server URL, and locale. - Improved JavaScript execution integration for document and workspace operations. - **Bug Fixes** - Fixed button appearance in the input bar by setting a static corner radius for the send button. - **Chores** - Removed unused dependencies and updated .gitignore entries for cleaner project management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
31 lines
892 B
TypeScript
31 lines
892 B
TypeScript
import { execSync } from 'node:child_process';
|
|
|
|
import { ProjectRoot } from '@affine-tools/utils/path';
|
|
import { Package } from '@affine-tools/utils/workspace';
|
|
|
|
const iosPackage = new Package('@affine/ios');
|
|
|
|
const PackageRoot = iosPackage.path;
|
|
|
|
console.log('[*] PackageRoot', PackageRoot);
|
|
|
|
console.log('[*] graphql...');
|
|
execSync(`${PackageRoot}/apollo-codegen-chore.sh`, { stdio: 'inherit' });
|
|
|
|
console.log('[*] rust...');
|
|
execSync(
|
|
'cargo build -p affine_mobile_native --features use-as-lib --lib --release --target aarch64-apple-ios',
|
|
{
|
|
stdio: 'inherit',
|
|
}
|
|
);
|
|
|
|
execSync(
|
|
`cargo run -p affine_mobile_native --features use-as-lib --bin uniffi-bindgen generate \
|
|
--library ${ProjectRoot}/target/aarch64-apple-ios/release/libaffine_mobile_native.a \
|
|
--language swift --out-dir ${PackageRoot}/App/App/uniffi`,
|
|
{ stdio: 'inherit' }
|
|
);
|
|
|
|
console.log('[+] codegen complete');
|