mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Align local version markers and GitHub Actions with Node 24, switch the default test entrypoint to the maintained Vitest runner, and replace pnpm-incompatible npm helpers in repo scripts. This also removes the obsolete AVA plus esm path and excludes disabled test fixtures from generic Vitest discovery so CI reflects the supported test surface.
34 lines
932 B
JavaScript
34 lines
932 B
JavaScript
import fs from 'fs-extra'
|
|
import axios from 'axios'
|
|
import 'dotenv/config.js'
|
|
|
|
import {
|
|
// storkVersion,
|
|
// storkExecutableName,
|
|
// storkExecutablePath,
|
|
storkTomlPath,
|
|
} from '~/helpers/stork/config.js'
|
|
|
|
export async function downloadStorkToml () {
|
|
// Check if the toml file exists
|
|
if (fs.existsSync(storkTomlPath)) {
|
|
console.log(`Stork toml file already exists at ${storkTomlPath}`)
|
|
return
|
|
}
|
|
|
|
const apiUrl = new URL( process.env.PUBLIC_API_DOMAIN )
|
|
|
|
apiUrl.pathname = storkTomlPath.replace('static/', '')
|
|
|
|
const response = await axios({
|
|
method: "get",
|
|
url: apiUrl.toString(),
|
|
})
|
|
|
|
await fs.writeFile( storkTomlPath, response.data, { encoding: null })
|
|
|
|
// Get toml file stats
|
|
const stats = await fs.stat( storkTomlPath )
|
|
console.log( stats.isFile() ? '✅' : '❌', 'TOML is file', storkTomlPath )
|
|
// console.log('TOML Stats', stats)
|
|
}
|