git-remote-igit 0.1.1

Git remote helper for the native igit:// InfiniGit transport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict';

const targets = {
  'darwin-arm64': 'aarch64-apple-darwin',
  'darwin-x64': 'x86_64-apple-darwin',
  'linux-arm64': 'aarch64-unknown-linux-gnu',
  'linux-x64': 'x86_64-unknown-linux-gnu',
  'win32-x64': 'x86_64-pc-windows-msvc'
};

function targetFor(platform = process.platform, arch = process.arch) {
  const target = targets[`${platform}-${arch}`];
  if (!target) throw new Error(`Unsupported platform: ${platform}-${arch}`);
  return target;
}

module.exports = { targetFor };