mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-08 17:30:02 +02:00
✨ Include internal debug logs
This commit is contained in:
parent
09e0d3b3eb
commit
57cfc69f1c
5 changed files with 120 additions and 5 deletions
|
@ -13,6 +13,7 @@ import { existsSync, writeFileSync } from 'fs'
|
|||
import { patchCountFile } from '../../middleware/patch-check'
|
||||
import { checkHash } from '../../utils'
|
||||
import { log } from '../../log'
|
||||
import { templateDir } from '../setupProject'
|
||||
|
||||
type ListrTaskGroup = Listr.ListrTask<unknown>
|
||||
|
||||
|
@ -95,8 +96,32 @@ function importGitPatch(): ListrTaskGroup {
|
|||
)
|
||||
}
|
||||
|
||||
export async function applyPatches(): Promise<void> {
|
||||
await new Listr([importMelonPatches(), importFolders(), importGitPatch()], {
|
||||
renderer: log.isDebug ? 'verbose' : 'default',
|
||||
}).run()
|
||||
function importInternalPatch(): ListrTaskGroup {
|
||||
const patches = sync('*.patch', {
|
||||
nodir: true,
|
||||
cwd: join(templateDir, 'patches.optional'),
|
||||
}).map((path) => ({
|
||||
name: path,
|
||||
path: join(templateDir, 'patches.optional', path),
|
||||
}))
|
||||
|
||||
return patchMethod<gitPatch.IGitPatch>(
|
||||
'gluon',
|
||||
patches,
|
||||
async (patch) => await gitPatch.apply(patch.path)
|
||||
)
|
||||
}
|
||||
|
||||
export async function applyPatches(): Promise<void> {
|
||||
await new Listr(
|
||||
[
|
||||
importInternalPatch(),
|
||||
importMelonPatches(),
|
||||
importFolders(),
|
||||
importGitPatch(),
|
||||
],
|
||||
{
|
||||
renderer: log.isDebug ? 'verbose' : 'default',
|
||||
}
|
||||
).run()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue