-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
index.js
33 lines (29 loc) · 1.12 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
* @format
*/
'use strict';
const path = require('path');
// We copy this binary resolution in the VSCode extension
// If this changes, please update accordingly in here
// https://github.com/facebook/relay/blob/main/vscode-extension/src/utils.ts
let binary;
if (process.platform === 'darwin' && process.arch === 'x64') {
binary = path.join(__dirname, 'macos-x64', 'relay');
} else if (process.platform === 'darwin' && process.arch === 'arm64') {
binary = path.join(__dirname, 'macos-arm64', 'relay');
} else if (process.platform === 'linux' && process.arch === 'x64') {
binary = path.join(__dirname, 'linux-x64', 'relay');
} else if (process.platform === 'linux' && process.arch === 'arm64') {
binary = path.join(__dirname, 'linux-arm64', 'relay');
} else if (process.platform === 'win32' && process.arch === 'x64') {
binary = path.join(__dirname, 'win-x64', 'relay.exe');
} else {
binary = null;
}
module.exports = binary;