Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// $ExpectError
(Constants.expoRuntimeVersion: 'ups...');
// $ExpectError
(Constants.expoVersion: 'ups...');
// $ExpectError
(Constants.isDetached: 'ups...');
// $ExpectError
(Constants.intentUri: 'ups...');
// $ExpectError
(Constants.installationId: 'ups...');
// $ExpectError
(Constants.isDevice: 'ups...');
// $ExpectError
(Constants.isHeadless: 'ups...');
// $ExpectError
(Constants.linkingUri: 'ups...');
// $ExpectError
(Constants.sessionId: 'ups...');
// $ExpectError
(Constants.statusBarHeight: 'ups...');
// $ExpectError
(Constants.systemVersion: 'ups...');
// $ExpectError
(Constants.systemFonts: 'ups...');
});
});
function getHostUri(): string {
if (!manifest.hostUri && !usesCustomScheme()) {
// we're probably not using up-to-date xdl, so just fake it for now
// we have to remove the /--/ on the end since this will be inserted again later
return removeScheme(Constants.linkingUri).replace(/\/--($|\/.*$)/, '');
}
return manifest.hostUri;
}
import Constants from 'expo-constants';
import qs from 'qs';
import Linking from './LinkingModule';
const { manifest } = Constants;
const USES_CUSTOM_SCHEME = Constants.appOwnership === 'standalone' && manifest.scheme;
let HOST_URI = manifest.hostUri;
if (!HOST_URI && !USES_CUSTOM_SCHEME) {
// we're probably not using up-to-date xdl, so just fake it for now
// we have to remove the /--/ on the end since this will be inserted again later
HOST_URI = _removeScheme(Constants.linkingUri).replace(/\/--($|\/.*$)/, '');
}
const IS_EXPO_HOSTED = HOST_URI &&
(/^(.*\.)?(expo\.io|exp\.host|exp\.direct|expo\.test)(:.*)?(\/.*)?$/.test(HOST_URI) ||
manifest.developer);
function _removeScheme(url) {
return url.replace(/^[a-zA-Z0-9+.-]+:\/\//, '');
}
function _removePort(url) {
return url.replace(/(?=([a-zA-Z0-9+.-]+:\/\/)?[^/]):\d+/, '');
}
function _removeLeadingSlash(url) {
return url.replace(/^\//, '');
}
function _removeTrailingSlash(url) {
return url.replace(/\/$/, '');
}
import Constants from 'expo-constants';
import qs from 'qs';
import { ParsedURL } from './Linking.types';
import Linking from './LinkingModule';
const { manifest } = Constants;
const USES_CUSTOM_SCHEME = Constants.appOwnership === 'standalone' && manifest.scheme;
let HOST_URI = manifest.hostUri;
if (!HOST_URI && !USES_CUSTOM_SCHEME) {
// we're probably not using up-to-date xdl, so just fake it for now
// we have to remove the /--/ on the end since this will be inserted again later
HOST_URI = _removeScheme(Constants.linkingUri).replace(/\/--($|\/.*$)/, '');
}
const IS_EXPO_HOSTED =
HOST_URI &&
(/^(.*\.)?(expo\.io|exp\.host|exp\.direct|expo\.test)(:.*)?(\/.*)?$/.test(HOST_URI) ||
manifest.developer);
function _removeScheme(url) {
return url.replace(/^[a-zA-Z0-9+.-]+:\/\//, '');
}
function _removePort(url) {
return url.replace(/(?=([a-zA-Z0-9+.-]+:\/\/)?[^/]):\d+/, '');
}
function _removeLeadingSlash(url) {
return url.replace(/^\//, '');
onAmazonLogin = () => {
Linking.addEventListener('url', event => this.redirect(event));
const url = `https://peperomia.info/login/amazon?aaa=aa12&redirect_uri=${Constants.linkingUri}`;
Linking.openURL(url);
};
const navigate = this.props.navigation.navigate;
return (
);
}