FIX: QVAC (QuantumVerse Automatic Computer) Ignore Unsupported
This commit is contained in:
@@ -17,6 +17,30 @@ const ALL_64 = Object.freeze([
|
||||
'win32-arm64',
|
||||
])
|
||||
|
||||
/**
|
||||
* Hosts where `@qvac/llm-llamacpp` (and related) ship Bare prebuilds.
|
||||
* Matches prebuilds under node_modules/@qvac/llm-llamacpp/prebuilds.
|
||||
* win32-arm64 is intentionally absent — QVAC Windows is x64-only today.
|
||||
*
|
||||
* @see https://docs.qvac.tether.io/installation (Windows: x64)
|
||||
* @type {readonly string[]}
|
||||
*/
|
||||
const QVAC_NATIVE_HOSTS = Object.freeze([
|
||||
'linux-x64',
|
||||
'linux-arm64',
|
||||
'darwin-x64',
|
||||
'darwin-arm64',
|
||||
'win32-x64',
|
||||
])
|
||||
|
||||
/**
|
||||
* @param {string} host e.g. win32-arm64
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function hostSupportsQvacNative(host) {
|
||||
return QVAC_NATIVE_HOSTS.includes(host)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string|undefined} envVal comma-separated override
|
||||
* @param {readonly string[]} fallback
|
||||
@@ -73,6 +97,8 @@ module.exports = {
|
||||
SERVER_LINUX,
|
||||
ALL_64,
|
||||
CLIENT_HOSTS: ALL_64,
|
||||
QVAC_NATIVE_HOSTS,
|
||||
hostSupportsQvacNative,
|
||||
parseHostList,
|
||||
hostToElectron,
|
||||
clientNpmScript,
|
||||
|
||||
+14
-1
@@ -23,6 +23,7 @@ const {
|
||||
parseHostList,
|
||||
clientNpmScript,
|
||||
hostToElectron,
|
||||
hostSupportsQvacNative,
|
||||
} = require('./hosts.cjs')
|
||||
|
||||
const root = path.resolve(__dirname, '..')
|
||||
@@ -101,7 +102,18 @@ function makeClient(hosts = CLIENT_HOSTS) {
|
||||
process.exit(1)
|
||||
}
|
||||
const { platform, arch } = hostToElectron(host)
|
||||
console.log(`[make] client ${host} (filter prebuilds to ${platform}-${arch})`)
|
||||
// QVAC Bare prebuilds are not published for every Electron host (e.g. no win32-arm64).
|
||||
// Package a tools-only client there so the matrix still ships a binary.
|
||||
const forceSkipQvac =
|
||||
process.env.PEARDATA_SKIP_QVAC === '1' || !hostSupportsQvacNative(host)
|
||||
if (forceSkipQvac && process.env.PEARDATA_SKIP_QVAC !== '1') {
|
||||
console.log(
|
||||
`[make] client ${host}: no @qvac/llm-llamacpp prebuild — PEARDATA_SKIP_QVAC=1 (tools-only)`
|
||||
)
|
||||
}
|
||||
console.log(
|
||||
`[make] client ${host} (filter prebuilds to ${platform}-${arch}, qvac=${forceSkipQvac ? 'off' : 'on'})`
|
||||
)
|
||||
const env = {
|
||||
...process.env,
|
||||
npm_config_build_from_source: 'false',
|
||||
@@ -109,6 +121,7 @@ function makeClient(hosts = CLIENT_HOSTS) {
|
||||
PEARDATA_PACKAGE_PLATFORM: platform,
|
||||
PEARDATA_PACKAGE_ARCH: arch,
|
||||
PEARDATA_SKIP_PREPACKAGE_BUNDLE: '1',
|
||||
PEARDATA_SKIP_QVAC: forceSkipQvac ? '1' : process.env.PEARDATA_SKIP_QVAC || '0',
|
||||
DEBUG:
|
||||
process.env.DEBUG ||
|
||||
(process.env.CI ? 'electron-packager,electron-forge:lifecycle' : ''),
|
||||
|
||||
Reference in New Issue
Block a user