-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from bndkt/nathan-ahn/0.5.0
0.5.0 Release Features: - `.clip` extension support and docs - `enabled` configuration option - Push notification support Fixes: - Device family bugs - Unsupported plist keys - Cross platform issues - Non-Expo module excluded packages
- Loading branch information
Showing
24 changed files
with
242 additions
and
52 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
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,29 @@ | ||
export const run = async ( | ||
config: { | ||
dependencies: Record<string, object>; | ||
}, | ||
exclude: string[], | ||
) => { | ||
// Validation | ||
if (typeof config !== "object") { | ||
throw new Error("config must be an object"); | ||
} | ||
if (!config.dependencies) { | ||
throw new Error("config must have a dependencies key"); | ||
} | ||
if (!Array.isArray(exclude)) { | ||
throw new Error("exclude must be an array"); | ||
} | ||
for (const packageName of exclude) { | ||
if (typeof packageName !== "string") { | ||
throw new Error("exclude must be an array of strings"); | ||
} | ||
} | ||
|
||
// Removing excluded packages | ||
for (const packageName of exclude) { | ||
delete config.dependencies[packageName]; | ||
} | ||
|
||
console.log(JSON.stringify(config)); | ||
}; |
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
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
5 changes: 4 additions & 1 deletion
5
src/ReactNativeAppClipModule.ts → ...lipModule/ReactNativeAppClipModule.ios.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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import { requireNativeModule } from "expo-modules-core"; | ||
import { ReactNativeAppClipModuleType } from "./types"; | ||
|
||
// It loads the native module object from the JSI or falls back to | ||
// the bridge module (from NativeModulesProxy) if the remote debugger is on. | ||
export default requireNativeModule("ReactNativeAppClip"); | ||
export default requireNativeModule<ReactNativeAppClipModuleType>( | ||
"ReactNativeAppClip", | ||
); |
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,16 @@ | ||
import { ReactNativeAppClipModuleType } from "./types"; | ||
|
||
const ReactNativeAppClipModule: ReactNativeAppClipModuleType = { | ||
getContainerURL: (groupIdentifier: string) => { | ||
return null; | ||
}, | ||
getBundleIdentifier: () => { | ||
return null; | ||
}, | ||
displayOverlay: () => {}, | ||
setSharedCredential: () => {}, | ||
getSharedCredential: () => { | ||
return null; | ||
}, | ||
}; | ||
export default ReactNativeAppClipModule; |
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,2 @@ | ||
import ReactNativeAppClipModule from "./ReactNativeAppClipModule"; | ||
export default ReactNativeAppClipModule; |
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 @@ | ||
import { GetBundleIdentiferFn } from "../getBundleIdentifier/types"; | ||
|
||
export interface ReactNativeAppClipModuleType { | ||
getContainerURL: (groupIdentifier: string) => string | null; | ||
getBundleIdentifier: GetBundleIdentiferFn; | ||
displayOverlay: () => void; | ||
setSharedCredential: (groupIdentifier: string, credential: string) => void; | ||
getSharedCredential: (groupIdentifier: string) => string | null; | ||
} |
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 @@ | ||
import ReactNativeAppClipModule from "../ReactNativeAppClipModule"; | ||
import { GetBundleIdentiferFn } from "./types"; | ||
|
||
let bundleIdentifier: string | null = null; | ||
const getBundleIdentifier: GetBundleIdentiferFn = () => { | ||
// Bundle identifier doesn't change during runtime | ||
if (bundleIdentifier) return bundleIdentifier; | ||
bundleIdentifier = ReactNativeAppClipModule.getBundleIdentifier(); | ||
return bundleIdentifier; | ||
}; | ||
export default getBundleIdentifier; |
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,6 @@ | ||
import { GetBundleIdentiferFn } from "./types"; | ||
|
||
const getBundleIdentifier: GetBundleIdentiferFn = () => { | ||
return null; | ||
}; | ||
export default getBundleIdentifier; |
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,2 @@ | ||
import getBundleIdentifier from "./getBundleIdentifier"; | ||
export default getBundleIdentifier; |
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 type GetBundleIdentiferFn = () => string | null; |
Oops, something went wrong.