* docs(mobile): prepare release changelog * release(mobile): release v0.4.1 * fix(ssr): route dist-external assets (#4956) * fix(cli): close login callback sockets (#4957) * fix(ci): sync release branches to dev via pull request * fix(mobile): increase ai summary font size * fix(desktop): improve pdf export layout and branding * fix(mobile): refresh social login state * fix: correct French translation language detection * build(deps): bump android-actions/setup-android from 3 to 4 (#4929) Bumps [android-actions/setup-android](https://github.com/android-actions/setup-android) from 3 to 4. - [Release notes](https://github.com/android-actions/setup-android/releases) - [Commits](https://github.com/android-actions/setup-android/compare/v3...v4) --- updated-dependencies: - dependency-name: android-actions/setup-android dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ai-chat): show reset date for future credits * feat: refine spotlight settings and highlighting * feat: add spotlight settings across desktop and mobile * build(deps): bump actions/github-script from 8 to 9 (#4961) Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v8...v9) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump signpath/github-action-submit-signing-request (#4960) Bumps [signpath/github-action-submit-signing-request](https://github.com/signpath/github-action-submit-signing-request) from 2.0 to 2.1. - [Release notes](https://github.com/signpath/github-action-submit-signing-request/releases) - [Commits](https://github.com/signpath/github-action-submit-signing-request/compare/v2.0...v2.1) --- updated-dependencies: - dependency-name: signpath/github-action-submit-signing-request dependency-version: '2.1' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(mobile): avoid YouTube embed error on iOS close #4958 * fix(mobile): patch fmt for Xcode 26.4 builds * build(deps): bump pnpm/action-setup from 4 to 5 (#4922) Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 4 to 5. - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v4...v5) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat(desktop): migrate tts to folo service * docs(ota): add OTA service design spec * feat(ota): scaffold Cloudflare worker app * fix(ota): align scaffold with task spec * fix(ota): use standard worker types * fix(ota): tighten scaffold schema and dev config * fix(ota): require at least one platform * fix(ota): use dev env for local wrangler * docs(ota): add implementation plan and release scoping * chore(ota): update lockfile for worker deps * feat(ota): add release selection primitives * test(ota): cover incompatible newer release selection * fix(ota): tighten release compatibility checks * fix(ota): reject empty platform payloads * feat(ota): add kv helpers and policy logic * fix(ota): enforce min binary store policy * feat(ota): fetch OTA releases from GitHub * fix(ota): return GitHub release etags * feat(ota): mirror release payloads into R2 * fix(ota): stream mirrored archive extraction * fix(ota): verify mirrored asset hashes * feat(ota): serve manifests assets and policy * fix(ota): harden manifest and policy routes * fix(ota): validate route semver inputs * fix(ota): verify manifest pointer version * feat(ota): add sync orchestration routes * fix(ota): dedupe concurrent sync passes * feat(mobile): enable OTA background updates * fix(mobile): restore OTA provider typecheck * feat(mobile): add streaming tts playback * fix(mobile): align OTA provider state * feat(mobile): add ota policy client and debug controls * fix(mobile): harden ota policy and debug controls * test(mobile): cover ota provider helpers * ci(desktop): automate Mac App Store pkg upload * feat(ota): generate release assets from mobile export * test(mobile): fix ota provider test typing * test(mobile): discover ota script test via explicit config * fix: tighten OTA release asset metadata handling * fix: require OTA platform asset arrays * ci(ota): publish releases and trigger sync * fix(ci): harden ota publish workflow * ci(ota): tighten trailer validation * docs(ota): add rollout and rollback runbook * feat(mobile): upgrade expo sdk 55 and rnfirebase * fix(ota): emit expo-compatible update identifiers * fix(ota): support private GitHub release assets * fix(mobile): unblock ios archive on expo sdk 55 * build(deps): bump pnpm/action-setup from 5 to 6 (#4962) Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 5 to 6. - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](https://github.com/pnpm/action-setup/compare/v5...v6) --- updated-dependencies: - dependency-name: pnpm/action-setup dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ci): restore ota typing and tailwind config compatibility * test(mobile): fix ota provider test typing * chore(ota): persist production cloudflare bindings * fix(ci): restore semver types and ota test mocks * feat(release): drive mobile release mode from config files * fix(ota): sign manifests and pin runtime version * fix(ci): disable frozen lockfile for local eas builds * docs(spec): add desktop ota unification design * feat(ota): unify desktop updates with ota service * fix(ota): harden desktop sync and updater flow * docs(skill): update desktop release workflow * fix(release): repair ota and desktop update flows * feat: cache storefront versions for ota policy * feat: expose ota version badges * feat: expose ota version badges * fix: backfill github version badges * fix: backfill github version badges * docs(skills): align release modes with implementation * fix: update Discord invite link in README.md * fix: update macOS and Windows app store links in README.md * fix: update GitHub badge labels in README.md * build(deps): bump actions/download-artifact from 5 to 8 (#4969) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 8. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v8) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump softprops/action-gh-release from 2 to 3 (#4968) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2 to 3. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v2...v3) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs(release): prepare desktop and mobile release metadata * release(desktop): release v1.6.0 * fix(desktop): restore spotlight settings sync * fix(desktop): apply spotlight highlights in entry rendering * fix(desktop): extend spotlight highlight coverage --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
212 lines
6.1 KiB
TypeScript
212 lines
6.1 KiB
TypeScript
import type { ConfigContext, ExpoConfig } from "expo/config"
|
|
import { resolve } from "pathe"
|
|
|
|
const PKG = require("./package.json") as typeof import("./package.json")
|
|
|
|
// const roundedIconPath = resolve(__dirname, "../../resources/icon.png")
|
|
const iconPathMap = {
|
|
production: resolve(__dirname, "./assets/icon.png"),
|
|
development: resolve(__dirname, "./assets/icon-dev.png"),
|
|
"ios-simulator": resolve(__dirname, "./assets/icon-dev.png"),
|
|
preview: resolve(__dirname, "./assets/icon-staging.png"),
|
|
} as Record<string, string>
|
|
const iconPath = iconPathMap[process.env.PROFILE || "production"] || iconPathMap.production
|
|
|
|
const adaptiveIconPath = resolve(__dirname, "./assets/adaptive-icon.png")
|
|
const splashIconPath = resolve(__dirname, "./assets/splash-icon.png")
|
|
|
|
const isDev = process.env.NODE_ENV === "development"
|
|
const semverPattern = /^\d+\.\d+\.\d+$/
|
|
const channelNameMap = {
|
|
development: "development",
|
|
"ios-simulator": "development",
|
|
preview: "preview",
|
|
"e2e-android": "preview",
|
|
"e2e-ios-simulator": "preview",
|
|
production: "production",
|
|
} as Record<string, string>
|
|
|
|
export const resolveRuntimeVersion = ({
|
|
isDevelopment,
|
|
packageVersion,
|
|
otaRuntimeVersionOverride,
|
|
}: {
|
|
isDevelopment: boolean
|
|
packageVersion: string
|
|
otaRuntimeVersionOverride?: string | null
|
|
}) => {
|
|
if (isDevelopment) {
|
|
return "0.0.0-dev"
|
|
}
|
|
|
|
if (otaRuntimeVersionOverride) {
|
|
if (!semverPattern.test(otaRuntimeVersionOverride)) {
|
|
throw new Error(
|
|
`Expected OTA_RUNTIME_VERSION to be a plain x.y.z version, got ${otaRuntimeVersionOverride}`,
|
|
)
|
|
}
|
|
|
|
return otaRuntimeVersionOverride
|
|
}
|
|
|
|
return packageVersion
|
|
}
|
|
|
|
export default ({ config }: ConfigContext): ExpoConfig => {
|
|
const profile = process.env.PROFILE || "production"
|
|
const channelName = channelNameMap[profile] || channelNameMap.production
|
|
const runtimeVersion = resolveRuntimeVersion({
|
|
isDevelopment: isDev,
|
|
packageVersion: PKG.version,
|
|
otaRuntimeVersionOverride: process.env.OTA_RUNTIME_VERSION ?? null,
|
|
})
|
|
|
|
const result: ExpoConfig = {
|
|
...config,
|
|
|
|
extra: {
|
|
eas: {
|
|
projectId: "a6335b14-fb84-45aa-ba80-6f6ab8926920",
|
|
},
|
|
e2eEnvProfile: process.env.EXPO_PUBLIC_E2E_ENV_PROFILE ?? null,
|
|
e2eLanguage: process.env.EXPO_PUBLIC_E2E_LANGUAGE ?? null,
|
|
},
|
|
owner: "follow",
|
|
updates: {
|
|
url: "https://ota.folo.is/manifest",
|
|
requestHeaders: {
|
|
"expo-channel-name": channelName,
|
|
},
|
|
codeSigningCertificate: "./code-signing/certificate.pem",
|
|
codeSigningMetadata: {
|
|
keyid: "main",
|
|
alg: "rsa-v1_5-sha256",
|
|
},
|
|
checkAutomatically: "NEVER",
|
|
},
|
|
runtimeVersion,
|
|
|
|
name: "Folo",
|
|
slug: "follow",
|
|
version: PKG.version,
|
|
orientation: "portrait" as const,
|
|
icon: iconPath,
|
|
scheme: ["follow", "folo"],
|
|
userInterfaceStyle: "automatic" as const,
|
|
ios: {
|
|
supportsTablet: true,
|
|
bundleIdentifier: "is.follow",
|
|
usesAppleSignIn: true,
|
|
infoPlist: {
|
|
LSApplicationCategoryType: "public.app-category.news",
|
|
ITSAppUsesNonExemptEncryption: false,
|
|
UIBackgroundModes: ["audio"],
|
|
LSApplicationQueriesSchemes: ["bilibili", "youtube"],
|
|
CFBundleAllowMixedLocalizations: true,
|
|
// apps/mobile/src/@types/constants.ts currentSupportedLanguages
|
|
CFBundleLocalizations: ["en", "ja", "zh-CN", "zh-TW", "fr-FR"],
|
|
CFBundleDevelopmentRegion: "en",
|
|
},
|
|
googleServicesFile: "./build/GoogleService-Info.plist",
|
|
},
|
|
android: {
|
|
package: "is.follow",
|
|
adaptiveIcon: {
|
|
foregroundImage: adaptiveIconPath,
|
|
monochromeImage: adaptiveIconPath,
|
|
backgroundColor: "#FF5C00",
|
|
},
|
|
googleServicesFile: "./build/google-services.json",
|
|
},
|
|
// web: {
|
|
// bundler: "metro",
|
|
// output: "static",
|
|
// favicon: iconPath,
|
|
// },
|
|
plugins: [
|
|
[
|
|
"expo-document-picker",
|
|
{
|
|
iCloudContainerEnvironment: "Production",
|
|
},
|
|
],
|
|
"expo-localization",
|
|
[
|
|
"expo-splash-screen",
|
|
{
|
|
android: {
|
|
image: splashIconPath,
|
|
imageWidth: 200,
|
|
},
|
|
},
|
|
],
|
|
[
|
|
"expo-build-properties",
|
|
{
|
|
ios: {
|
|
// Expo SDK 55 archive builds regress with use_frameworks + prebuilt RN core.
|
|
buildReactNativeFromSource: true,
|
|
useFrameworks: "static",
|
|
forceStaticLinking: ["RNFBApp", "RNFBAnalytics", "RNFBMessaging", "RNFBAppCheck"],
|
|
},
|
|
},
|
|
],
|
|
"expo-sqlite",
|
|
[
|
|
"expo-media-library",
|
|
{
|
|
photosPermission: "Allow $(PRODUCT_NAME) to access your photos.",
|
|
savePhotosPermission: "Allow $(PRODUCT_NAME) to save photos.",
|
|
isAccessMediaLocationEnabled: true,
|
|
},
|
|
],
|
|
"expo-apple-authentication",
|
|
"expo-web-browser",
|
|
"expo-image",
|
|
"expo-sharing",
|
|
[
|
|
"expo-video",
|
|
{
|
|
supportsBackgroundPlayback: true,
|
|
supportsPictureInPicture: true,
|
|
},
|
|
],
|
|
[
|
|
require("./plugins/with-follow-assets.js"),
|
|
{
|
|
// Add asset directory paths, the plugin copies the files in the given paths to the app bundle folder named Assets
|
|
assetsPath: resolve(__dirname, "..", "..", "out", "rn-web"),
|
|
},
|
|
],
|
|
require("./plugins/with-follow-ios-resources.js"),
|
|
require("./plugins/with-rnfb-build-properties.js"),
|
|
|
|
require("./plugins/with-gradle-jvm-heap-size-increase.js"),
|
|
require("./plugins/with-android-jdk-21.js"),
|
|
require("./plugins/with-android-manifest-plugin.js"),
|
|
"expo-secure-store",
|
|
"@react-native-firebase/app",
|
|
[
|
|
"expo-image-picker",
|
|
{
|
|
photosPermission: "Allow $(PRODUCT_NAME) to access your photos.",
|
|
},
|
|
],
|
|
[
|
|
"expo-notifications",
|
|
{
|
|
enableBackgroundRemoteNotifications: true,
|
|
},
|
|
],
|
|
"expo-background-task",
|
|
],
|
|
}
|
|
|
|
if (process.env.PROFILE !== "production") {
|
|
result.plugins ||= []
|
|
result.plugins.push(require("./plugins/android-trust-user-certs.js"))
|
|
}
|
|
|
|
return result
|
|
}
|