fix(mobile): stabilize preview login and asset build (#4853)
This commit is contained in:
parent
b3371fc1fd
commit
d4aa9f40d0
|
|
@ -20,10 +20,11 @@ const isAssetReady = (assetsPath) => {
|
|||
|
||||
const withFollowAssets = (config, props) => {
|
||||
if (!isAssetReady(props.assetsPath)) {
|
||||
// TODO move to props
|
||||
const cmd = `pnpm --filter @follow/rn-micro-web-app build --outDir ${path.resolve(props.assetsPath, "html-renderer")}`
|
||||
// Build the web renderer directly to avoid workspace filter resolution issues on EAS workers.
|
||||
const webAppDir = path.resolve(__dirname, "..", "web-app")
|
||||
const cmd = `pnpm --dir ${webAppDir} build --outDir ${path.resolve(props.assetsPath, "html-renderer")}`
|
||||
console.info(`Assets source directory not found! Running \`${cmd}\` to generate assets.`)
|
||||
execSync(cmd)
|
||||
execSync(cmd, { stdio: "inherit" })
|
||||
}
|
||||
if (!isAssetReady(props.assetsPath)) {
|
||||
throw new Error(
|
||||
|
|
|
|||
|
|
@ -9,12 +9,10 @@ export async function getTokenHeaders() {
|
|||
const appCheckToken = await getLimitedUseToken(appCheck)
|
||||
token = appCheckToken.token
|
||||
} catch (error) {
|
||||
console.error("error", error)
|
||||
console.warn("[app-check] failed to get limited-use token, fallback to synthetic token", error)
|
||||
}
|
||||
|
||||
return token
|
||||
? {
|
||||
"x-token": `ac:${token}`,
|
||||
}
|
||||
: undefined
|
||||
return {
|
||||
"x-token": `ac:${token || "fallback"}`,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue