chore: merge develop to feat/protocol

This commit is contained in:
Ryan Manuel
2023-04-28 16:28:23 -05:00
505 changed files with 11395 additions and 5843 deletions
+1
View File
@@ -88,6 +88,7 @@ const getDependencyPathsToKeep = async (buildAppDir) => {
'@swc/core',
'emitter',
'ts-loader',
'@babel/preset-typescript/package.json',
],
})
+32
View File
@@ -0,0 +1,32 @@
const fs = require('fs-extra')
const path = require('path')
function delay (n) {
return new Promise((resolve) => setTimeout(resolve, n))
}
async function waitUntilExists (dir, { freq, maxAttempts }, numAttempts = 0) {
const exists = await fs.pathExists(dir)
if (exists) {
return true
}
if (numAttempts > maxAttempts) {
throw Error(`Failed to detect path at ${dir} after ${maxAttempts}.`)
}
console.log(`[@packages/runner/webpack.config.ts]: ${dir} not found. Will check again in ${freq}ms. Attempt: ${numAttempts}/${maxAttempts}`)
await delay(freq)
return waitUntilExists(dir, { freq, maxAttempts }, numAttempts + 1)
}
async function waitUntilIconsBuilt () {
await waitUntilExists(path.join(__dirname, '..', 'packages', 'icons', 'dist', 'favicon'), { freq: 1000, maxAttempts: 10 })
}
module.exports = {
waitUntilIconsBuilt,
}