-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cli] try to detect if deep link was successful #18839
Conversation
ENG-6120 Take user to interstitial when launching dev client project from versioned CLI
|
d47fcd8
to
0c895d9
Compare
@@ -70,7 +70,9 @@ export class MetroBundlerDevServer extends BundlerDevServer { | |||
// https://github.com/expo/expo/issues/13114 | |||
prependMiddleware(middleware, manifestMiddleware); | |||
|
|||
middleware.use(new InterstitialPageMiddleware(this.projectRoot).getHandler()); | |||
middleware.use( | |||
new InterstitialPageMiddleware(this.projectRoot, options.location.scheme).getHandler() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other middleware uses the format of projectRoot, { options as object }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scheme
here is capable of being dynamic, seems like we shouldn't pass in the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you point me to where the scheme should come from then? Do you mean retrieve it using getOptionalDevClientSchemeAsync
inside of the InterstitialPageMiddleware (and fall back to this value if that returns null)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommended a TODO, for now. I can implement this later since it's an edge case they may only happen theoretically.
packages/@expo/cli/src/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
packages/@expo/cli/src/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
packages/@expo/cli/src/start/server/middleware/InterstitialPageMiddleware.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check comments
packages/@expo/cli/src/start/server/middleware/__tests__/InterstitialPageMiddleware-test.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
6112afd
to
e7c6a4b
Compare
0b56b1c
to
ed6174f
Compare
…r.ts Co-authored-by: Evan Bacon <bacon@expo.io>
ed6174f
to
0337efb
Compare
Why
fourth step of ENG-6120; ports expo/expo-cli@9777ad6 and the relevant portions of expo/expo-cli@b5c59a7 to the new CLI
How
Test Plan
Added unit tests for all new functionality and updated existing tests. Tested manually to ensure the page looks as expected (parity with old CLI).
Checklist
expo prebuild
& EAS Build (eg: updated a module plugin).