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.deviceName: 'ups...');
// $ExpectError
(Constants.deviceYearClass: 'ups...');
// $ExpectError
(Constants.experienceUrl: 'ups...');
// $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...');
});
});
checkUser = (data: User | null, error: ResultError) => {
if (error) {
return;
}
if (!data) {
const uuid = Constants.installationId + uuidv1();
const user: User = {
uuid
};
db.transaction((tx: SQLite.Transaction) => {
insertUser(tx, user, this.setUser);
});
AsyncStorage.setItem("userID", user.uuid);
// 現在のバージョンを設定
AsyncStorage.setItem("APP_VERSION", app.expo.version);
} else {
AsyncStorage.setItem("userID", data.uuid);
this.setState({
loading: false
});
}
async function _sendNextLogBatchAsync(batch: LogEntry[], logUrl: string): Promise {
let response;
let headers = {
'Content-Type': 'application/json',
Connection: 'keep-alive',
'Proxy-Connection': 'keep-alive',
Accept: 'application/json',
'Device-Id': Constants.installationId,
'Session-Id': _sessionId,
};
if (Constants.deviceName) {
headers['Device-Name'] = Constants.deviceName;
}
try {
response = await fetch(logUrl, {
method: 'POST',
headers,
body: JSON.stringify(batch),
});
} catch (error) {
_transportEventEmitter.emit('error', { error });
return;
}
async function _sendNextLogBatchAsync(batch, logUrl) {
let response;
let headers = {
'Content-Type': 'application/json',
Connection: 'keep-alive',
'Proxy-Connection': 'keep-alive',
Accept: 'application/json',
'Device-Id': Constants.installationId,
'Session-Id': _sessionId,
};
if (Constants.deviceName) {
headers['Device-Name'] = Constants.deviceName;
}
try {
response = await fetch(logUrl, {
method: 'POST',
headers,
body: JSON.stringify(batch),
});
}
catch (error) {
_transportEventEmitter.emit('error', { error });
return;
}
export default function getSnackId() {
if (!_snackId) {
let hash = sha1(Constants.installationId).toLowerCase();
_snackId = `${hash.slice(0, 4)}-${hash.slice(4, 8)}`;
}
return _snackId;
}