Files
react-test/docs/scripts/syncTeamMembers.ts
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

31 lines
724 B
TypeScript

/* eslint-disable no-console */
import url from 'url';
import * as fs from 'fs/promises';
import path from 'path';
async function run() {
// Same as https://tools-public.mui.com/prod/pages/muicomabout
const response = await fetch(
'https://tools-public.mui.com/prod/api/data/muicomabout/queryAbout',
{
method: 'POST',
headers: {
'content-type': 'application/json',
},
},
);
const apiResponse = await response.json();
const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url));
await fs.writeFile(
path.resolve(currentDirectory, '../data/about/teamMembers.json'),
JSON.stringify(apiResponse.data),
'utf8',
);
console.log('done');
}
run();