Loading files
442335385This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
442335385This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env node
import { readFile,writeFile,mkdir } from 'node:fs/promises';
import { resolve,join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { validateProject } from '../studio/project.mjs';
import { buildBrand } from './build.mjs';
const root=fileURLToPath(new URL('..',import.meta.url));
if(!process.argv[2])throw new Error('Usage: node tools/import-project.mjs saved.forme.json');
const bytes=await readFile(resolve(process.argv[2]),'utf8');if(bytes.length>36000000)throw new Error('Project exceeds 36 MB.');
const project=validateProject(JSON.parse(bytes));delete project.revision;
const backup=join(root,'.harness/history',new Date().toISOString().replace(/[:.]/g,'-'));
await mkdir(backup,{recursive:true});await writeFile(join(backup,'project.json'),await readFile(join(root,'board/project.json')));
await writeFile(join(root,'board/project.json'),JSON.stringify(project,null,2)+'\n');
console.log(JSON.stringify({...await buildBrand(root),backup}));