MCPcopy Create free account
hub / github.com/tensorflow/tfjs / sync_reactnative

Function sync_reactnative

scripts/cloud_funcs/sync_reactnative/index.js:32–59  ·  view source on GitHub ↗
(event, context, callback)

Source from the content-addressed store, hash-verified

30const appUploadId = 'tfjs-rn-integration-android';
31
32async function sync_reactnative(event, context, callback) {
33 const client = new kms.KeyManagementServiceClient();
34 const name =
35 client.cryptoKeyPath(projectId, locationId, keyRingId, cryptoKeyId);
36
37 const [result] = await client.decrypt({name, ciphertext});
38 const browserStackKey = result.plaintext.toString();
39
40 try {
41 const syncRes = await request.post(browserStackUploadUrl, {
42 auth: {
43 user: browserStackUser,
44 pass: browserStackKey,
45 },
46 form: {
47 data: JSON.stringify({'url': testAppUrl, 'custom_id': appUploadId}),
48 }
49 });
50 sendChatMsg(
51 process.env.BOTS_HANGOUTS_URL,
52 'Success syncing tfjs-react-native integration test app to BrowserStack');
53 } catch (e) {
54 console.log('Error syncing app to browserstack', e);
55 sendChatMsg(
56 process.env.HANGOUTS_URL,
57 'Error syncing tfjs-react-native integration test app to BrowserStack');
58 }
59};
60
61async function sendChatMsg(url, msg) {
62 const res = await request(url, {

Callers

nothing calls this directly

Calls 3

toStringMethod · 0.80
sendChatMsgFunction · 0.70
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…