link-platform.mjs 530 B

12345678910
  1. /** Link the downloaded platform artifact for dependency-free ABI tests. */
  2. import fs from 'node:fs';
  3. import path from 'node:path';
  4. import { fileURLToPath } from 'node:url';
  5. const packages = fileURLToPath(new URL('../packages/', import.meta.url));
  6. const platform = `${process.platform}-${process.arch}`;
  7. const parent = path.join(packages, 'entry/node_modules/@deepseek-ai');
  8. fs.mkdirSync(parent, { recursive: true });
  9. fs.symlinkSync(path.join(packages, platform), path.join(parent, `node-addon-system-${platform}`), 'junction');