Use node zlib
This commit is contained in:
parent
7c83833541
commit
5b0a0f44f5
|
@ -53,8 +53,7 @@
|
|||
"sanitize-s3-objectkey": "0.0.1",
|
||||
"semver": "7.3.7",
|
||||
"tar-fs": "2.1.1",
|
||||
"uuid": "8.3.2",
|
||||
"zlib": "1.0.5"
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@swc/core": "^1.3.25",
|
||||
|
|
|
@ -3,7 +3,7 @@ import AWS from "aws-sdk"
|
|||
import stream from "stream"
|
||||
import fetch from "node-fetch"
|
||||
import tar from "tar-fs"
|
||||
const zlib = require("zlib")
|
||||
import zlib from "zlib"
|
||||
import { promisify } from "util"
|
||||
import { join } from "path"
|
||||
import fs from "fs"
|
||||
|
@ -415,7 +415,7 @@ export const downloadTarballDirect = async (
|
|||
throw new Error(`unexpected response ${response.statusText}`)
|
||||
}
|
||||
|
||||
await streamPipeline(response.body, zlib.Unzip(), tar.extract(path))
|
||||
await streamPipeline(response.body, zlib.createUnzip(), tar.extract(path))
|
||||
}
|
||||
|
||||
export const downloadTarball = async (
|
||||
|
@ -431,7 +431,7 @@ export const downloadTarball = async (
|
|||
}
|
||||
|
||||
const tmpPath = join(budibaseTempDir(), path)
|
||||
await streamPipeline(response.body, zlib.Unzip(), tar.extract(tmpPath))
|
||||
await streamPipeline(response.body, zlib.createUnzip(), tar.extract(tmpPath))
|
||||
if (!env.isTest() && env.SELF_HOSTED) {
|
||||
await uploadDirectory(bucketName, tmpPath, path)
|
||||
}
|
||||
|
|
|
@ -119,8 +119,7 @@
|
|||
"vm2": "3.9.11",
|
||||
"worker-farm": "1.7.0",
|
||||
"xml2js": "0.4.23",
|
||||
"yargs": "13.2.4",
|
||||
"zlib": "1.0.5"
|
||||
"yargs": "13.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.17.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Router from "@koa/router"
|
||||
const compress = require("koa-compress")
|
||||
const zlib = require("zlib")
|
||||
import zlib from "zlib"
|
||||
import { routes } from "./routes"
|
||||
import { middleware as pro } from "@budibase/pro"
|
||||
import { auth, middleware } from "@budibase/backend-core"
|
||||
|
|
|
@ -25463,8 +25463,3 @@ z-schema@^5.0.1:
|
|||
validator "^13.7.0"
|
||||
optionalDependencies:
|
||||
commander "^9.4.1"
|
||||
|
||||
zlib@1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0"
|
||||
integrity sha512-40fpE2II+Cd3k8HWTWONfeKE2jL+P42iWJ1zzps5W51qcTsOUKM5Q5m2PFb0CLxlmFAaUuUdJGc3OfZy947v0w==
|
||||
|
|
Loading…
Reference in New Issue