diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 9b0a8a5837..22640d6747 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -54,8 +54,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": { "@jest/test-sequencer": "29.5.0", diff --git a/packages/backend-core/src/objectStore/objectStore.ts b/packages/backend-core/src/objectStore/objectStore.ts index 059e1b228d..4ac3641de1 100644 --- a/packages/backend-core/src/objectStore/objectStore.ts +++ b/packages/backend-core/src/objectStore/objectStore.ts @@ -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) } diff --git a/packages/server/package.json b/packages/server/package.json index efdb01acca..3343515b09 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -118,8 +118,7 @@ "vm2": "3.9.16", "worker-farm": "1.7.0", "xml2js": "0.5.0", - "yargs": "13.2.4", - "zlib": "1.0.5" + "yargs": "13.2.4" }, "devDependencies": { "@babel/core": "7.17.4", diff --git a/packages/worker/src/api/index.ts b/packages/worker/src/api/index.ts index b390d36bb8..2a3133af3f 100644 --- a/packages/worker/src/api/index.ts +++ b/packages/worker/src/api/index.ts @@ -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" diff --git a/yarn.lock b/yarn.lock index f5cd450ddc..0f58666fc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1486,15 +1486,15 @@ pouchdb-promise "^6.0.4" through2 "^2.0.0" -"@budibase/pro@2.5.5-alpha.1": - version "2.5.5-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.5-alpha.1.tgz#6d9476ce724bd3e405cb2e0198c4b83b168e65bc" - integrity sha512-fEuropk/0aH1+lELX6wdFa8UUpE+SMtlvBbsgNR2ulvLgLLPEYhI2gINlhiItMWWgTtxNtele3hOs1VWhn0o2A== +"@budibase/pro@2.5.5-alpha.2": + version "2.5.5-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.5.5-alpha.2.tgz#dd3ec237997f1be5064ab931569c3621b7836b8b" + integrity sha512-pXB2BTA0/uXkZ3aCHjF06u/kxSx/mZ55T06nUAQR+64eXJ1D2BRKAqrkqjBnzXne9RGV/qEJtCu+xp8wNXII5A== dependencies: - "@budibase/backend-core" "2.5.5-alpha.1" + "@budibase/backend-core" "2.5.5-alpha.2" "@budibase/shared-core" "2.4.44-alpha.1" "@budibase/string-templates" "2.4.44-alpha.1" - "@budibase/types" "2.5.5-alpha.1" + "@budibase/types" "2.5.5-alpha.2" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" @@ -24705,8 +24705,3 @@ z-schema@^5.0.1: validator "^13.7.0" optionalDependencies: commander "^10.0.0" - -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==