fix: use dynamic import for ArchiveHdi

This commit is contained in:
Amin Yahyaabadi 2024-02-17 01:30:22 -08:00
parent 8ce16c2fbc
commit 32bae2b687
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
13 changed files with 62 additions and 52 deletions

2
dist/actions/hdi.a7c9a962.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/actions/hdi.a7c9a962.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/legacy/hdi.37193ff6.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/legacy/hdi.37193ff6.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/modern/hdi.9840a557.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/modern/hdi.9840a557.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,8 @@
import { ArchiveHdi } from "@shockpkg/archive-files/esm/archive/hdi.mjs"
import { join } from "path"
export async function setupDmg(path: string, destDir: string) {
const { ArchiveHdi } = await import("@shockpkg/archive-files/esm/archive/hdi.mjs")
const dmg = new ArchiveHdi(path)
await dmg.read(async (entry) => {
await entry.extract(join(destDir, entry.path))