-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update build system to support a React Native bundle * Add initial implementation for React Native (requires e2e testing) * Fix CJS builds and rename 'WebViewController' to 'ReactNativeWebViewController' * Remove unnecessary return statement * Fix React dependency regex in Webpack config * Update CircleCI config * Re-organize '/core' tests to reflect additional view controllers * Organizational comments * Remove superfluous comment * Add first draft CHANGELOG entry for React Native feature * Update 'isViewReady' condition * Package 'react-native-webview' and 'whatwg-url' in the RN bundle * Add .vscode to git ignores * Add /dist to eslint ignores * Clean up Webpack config * Externalize 'react-native-webview' & fix event listener bug in 'PayloadTransport' * React native unit tests (#49) * Add constructor test for MagicSDKReactNative * Add 'magic.link' as homepage in 'package.json' * Update 'tsconfig.jsx' to 'react-native' * Revert change to tsconfig * Fix test preprocessing to support React/React Native * Fix typo * Fix 'PayloadTransport.post' tests * Cleanup test files & improve core SDK coverage after RN changes * Add unit tests for 'PayloadTransport.handleReactNativeWebViewMessage' * Update architectural overview with React Native-specific info * Add unit tests for 'ReactNativeWebViewController' methods (WIP) * Add coverage ignore comment * Add 'utils/url' tests * Add some testing cleanups
- Loading branch information
Showing
93 changed files
with
3,945 additions
and
1,279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/node_modules | ||
/dist | ||
react-native.js | ||
react-native.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["es2018", "dom"], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"target": "es5", | ||
"strict": true, | ||
"jsx": "react", | ||
"allowSyntheticDefaultImports": true, | ||
"experimentalDecorators": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"esModuleInterop": true, | ||
"downlevelIteration": true, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"sourceMap": true, | ||
"declaration": true, | ||
}, | ||
"include": [ | ||
"../src/**/*.ts", | ||
"../src/**/*.tsx", | ||
"../test/**/*.ts", | ||
"../webpack/**/*.ts" | ||
], | ||
"exclude": [ | ||
"../node_modules", | ||
"../dist" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"rootDir": "../src", | ||
"outDir": "../dist", | ||
"declaration": false | ||
}, | ||
"include": [ | ||
"../src/**/*.ts", | ||
"../src/**/*.tsx" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"rootDir": "../src", | ||
"outDir": "../dist/cjs" | ||
}, | ||
"include": [ | ||
"../src/**/*.ts", | ||
"../src/**/*.tsx" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"rootDir": "../src", | ||
"outDir": "../dist/react-native" | ||
}, | ||
"include": [ | ||
"../src/**/*.ts", | ||
"../src/**/*.tsx" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"compilerOptions": { | ||
"target": "es6", | ||
"strict": false, | ||
"noImplicitAny": false | ||
}, | ||
"include": ["../test/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "./tsconfig.base.json", | ||
"include": ["../webpack/**/*.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './dist/react-native/index.react-native.d.ts'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./dist/react-native/index.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
export const MAGIC_URL = process.env.MAGIC_URL || 'https://auth.magic.link/'; | ||
export const MGBOX_URL = process.env.MGBOX_URL || 'https://mgbox.io/'; | ||
export const IS_REACT_NATIVE = Boolean(process.env.IS_REACT_NATIVE); | ||
export const SDK_NAME = process.env.SDK_NAME!; | ||
export const SDK_VERSION = process.env.SDK_VERSION!; |
Oops, something went wrong.