From bcfb12421316fa79deead319dd551528d5f1c60c Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Mon, 3 Jul 2023 10:06:27 +0000 Subject: [PATCH 1/7] sourcmap tools: replace SourceMapUploader with SymbolUploader --- .../sourcemap-tools/src/SourceMapUploader.ts | 195 ------------- tools/sourcemap-tools/src/SymbolUploader.ts | 86 ++++++ tools/sourcemap-tools/src/index.ts | 2 +- .../tests/SourceMapUploader.spec.ts | 267 ------------------ .../tests/SymbolUploader.spec.ts | 144 ++++++++++ 5 files changed, 231 insertions(+), 463 deletions(-) delete mode 100644 tools/sourcemap-tools/src/SourceMapUploader.ts create mode 100644 tools/sourcemap-tools/src/SymbolUploader.ts delete mode 100644 tools/sourcemap-tools/tests/SourceMapUploader.spec.ts create mode 100644 tools/sourcemap-tools/tests/SymbolUploader.spec.ts diff --git a/tools/sourcemap-tools/src/SourceMapUploader.ts b/tools/sourcemap-tools/src/SourceMapUploader.ts deleted file mode 100644 index a30f627e..00000000 --- a/tools/sourcemap-tools/src/SourceMapUploader.ts +++ /dev/null @@ -1,195 +0,0 @@ -import crypto from 'crypto'; -import fs from 'fs'; -import http from 'http'; -import https from 'https'; -import { Readable } from 'stream'; -import { SOURCEMAP_DEBUG_ID_KEY } from './DebugIdGenerator'; - -export const DEBUG_ID_QUERY = 'symbolication_id'; - -interface Sourcemap { - version: number; - [SOURCEMAP_DEBUG_ID_KEY]?: string; -} - -interface UploadResponse { - response: 'ok' | string; - _rxid: string; -} - -export interface UploadResult { - rxid: string; - debugId: string; -} - -export interface SourceMapUploaderOptions { - ignoreSsl?: boolean; - headers?: http.OutgoingHttpHeaders; -} - -/** - * Class responsible for uploading source maps to Backtrace. - * - * Expects symbol upload responses. - */ -export class SourceMapUploader { - private readonly _url: URL; - - constructor(url: string | URL, private readonly _options?: SourceMapUploaderOptions) { - this._url = new URL(url); - } - - /** - * Uploads the sourcemap to Backtrace from stream. The sourcemap will be parsed from JSON. - * @param fileStream File stream to use. - * @param debugId Debug ID to use. If not provided, debug ID will be read from the sourcemap. - * If not available, a random one will be generated. - */ - public async upload(fileStream: Readable, debugId?: string): Promise; - /** - * Uploads the sourcemap to Backtrace from file. The sourcemap will be parsed from JSON. - * @param filePath File path to use. - * @param debugId Debug ID to use. If not provided, debug ID will be read from the sourcemap. - * If not available, a random one will be generated. - */ - public async upload(filePath: string, debugId?: string): Promise; - public async upload(pathOrStream: string | Readable, debugId?: string): Promise { - if (typeof pathOrStream === 'string') { - pathOrStream = fs.createReadStream(pathOrStream); - } - - const content = await this.readStreamToEnd(pathOrStream); - const sourcemap = JSON.parse(content.toString('utf-8')); - - pathOrStream.destroy(); - - return this.uploadSourcemap(sourcemap, debugId); - } - - /** - * Uploads the sourcemap to Backtrace from string. The sourcemap will be parsed from JSON. - * @param content Sourcemap JSON string. - * @param debugId Debug ID to use. If not provided, debug ID will be read from the sourcemap. - * If not available, a random one will be generated. - */ - public async uploadContent(content: string, debugId?: string): Promise; - /** - * Uploads the sourcemap to Backtrace. - * @param content Sourcemap JSON object. - * @param debugId Debug ID to use. If not provided, debug ID will be read from the sourcemap. - * If not available, a random one will be generated. - */ - public async uploadContent(content: object, debugId?: string): Promise; - public uploadContent(content: string | object, debugId?: string): Promise { - if (typeof content === 'string') { - content = JSON.parse(content) as object; - } - - return this.uploadSourcemap(content, debugId); - } - - private async uploadSourcemap(sourcemap: unknown, debugId?: string): Promise { - this.assertValidSourcemap(sourcemap); - - if (!debugId) { - debugId = sourcemap[SOURCEMAP_DEBUG_ID_KEY]; - - if (!debugId) { - debugId = crypto.randomUUID(); - console.warn(`Sourcemap does not have a debug ID. Using ${debugId}`); - } - } - - const uploadUrl = this.buildUploadUrl(debugId); - const protocol = uploadUrl.protocol === 'https:' ? https : http; - - return new Promise((resolve, reject) => { - const request = protocol.request( - uploadUrl, - { - method: 'POST', - rejectUnauthorized: !this._options?.ignoreSsl, - headers: this._options?.headers, - }, - (response) => { - if (!response.statusCode) { - return reject(new Error('Failed to upload sourcemap: failed to make the request.')); - } - - const data: Buffer[] = []; - response.on('data', (chunk) => { - data.push(chunk); - }); - - response.on('end', () => { - const rawResponse = Buffer.concat(data).toString('utf-8'); - if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 300) { - return reject( - new Error( - `Failed to upload sourcemap: ${response.statusCode}. Response data: ${rawResponse}`, - ), - ); - } - - try { - const responseData = JSON.parse(rawResponse) as UploadResponse; - if (responseData.response === 'ok') { - return resolve({ - debugId: debugId as string, - rxid: responseData._rxid, - }); - } else { - return reject(new Error(`Non-OK response received from Coroner: ${rawResponse}`)); - } - } catch (err) { - return reject(new Error(`Cannot parse response from Coroner: ${rawResponse}`)); - } - }); - }, - ); - - request.on('error', reject); - request.write(JSON.stringify(sourcemap)); - - request.end(); - }); - } - - private assertValidSourcemap(value: unknown): asserts value is Sourcemap { - if (typeof value !== 'object') { - throw new Error('Sourcemap must be an object.'); - } - - if (!value) { - throw new Error('Sourcemap must not be null.'); - } - - const sourcemap = value as Partial; - if (!sourcemap.version) { - throw new Error('Sourcemap object does not have a version.'); - } - } - - private async readStreamToEnd(stream: Readable): Promise { - return new Promise((resolve, reject) => { - stream.on('error', reject); - - const chunks: Buffer[] = []; - stream.on('data', (chunk) => chunks.push(chunk)); - stream.on('end', () => { - resolve(Buffer.concat(chunks)); - }); - }); - } - - private buildUploadUrl(debugId: string) { - const url = new URL(this._url); - - const existing = url.searchParams.get(DEBUG_ID_QUERY); - if (!existing || existing === 'SYMBOLICATION_ID' || existing === 'DEBUG_ID') { - url.searchParams.set(DEBUG_ID_QUERY, debugId); - } - - return url; - } -} diff --git a/tools/sourcemap-tools/src/SymbolUploader.ts b/tools/sourcemap-tools/src/SymbolUploader.ts new file mode 100644 index 00000000..0c0301ce --- /dev/null +++ b/tools/sourcemap-tools/src/SymbolUploader.ts @@ -0,0 +1,86 @@ +import http from 'http'; +import https from 'https'; +import { Readable } from 'stream'; + +interface CoronerUploadResponse { + response: 'ok' | string; + _rxid: string; +} + +export interface UploadResult { + rxid: string; +} + +export interface SymbolUploaderOptions { + ignoreSsl?: boolean; + headers?: http.OutgoingHttpHeaders; +} + +/** + * Class responsible for uploading symbols to Backtrace. + * + * Expects symbol upload responses. + */ +export class SymbolUploader { + private readonly _url: URL; + + constructor(url: string | URL, private readonly _options?: SymbolUploaderOptions) { + this._url = new URL(url); + } + + /** + * Uploads the symbol to Backtrace. + * @param content Symbol stream. + */ + public async uploadSymbol(readable: Readable): Promise { + const protocol = this._url.protocol === 'https:' ? https : http; + + return new Promise((resolve, reject) => { + const request = protocol.request( + this._url, + { + method: 'POST', + rejectUnauthorized: !this._options?.ignoreSsl, + headers: this._options?.headers, + }, + (response) => { + if (!response.statusCode) { + return reject(new Error('Failed to upload symbol: failed to make the request.')); + } + + const data: Buffer[] = []; + response.on('data', (chunk) => { + data.push(chunk); + }); + + response.on('end', () => { + const rawResponse = Buffer.concat(data).toString('utf-8'); + if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 300) { + return reject( + new Error( + `Failed to upload symbol: ${response.statusCode}. Response data: ${rawResponse}`, + ), + ); + } + + try { + const responseData = JSON.parse(rawResponse) as CoronerUploadResponse; + if (responseData.response === 'ok') { + return resolve({ + rxid: responseData._rxid, + }); + } else { + return reject(new Error(`Non-OK response received from Coroner: ${rawResponse}`)); + } + } catch (err) { + return reject(new Error(`Cannot parse response from Coroner: ${rawResponse}`)); + } + }); + }, + ); + + request.on('error', reject); + readable.pipe(request); + }); + } +} diff --git a/tools/sourcemap-tools/src/index.ts b/tools/sourcemap-tools/src/index.ts index 63156965..da6a771c 100644 --- a/tools/sourcemap-tools/src/index.ts +++ b/tools/sourcemap-tools/src/index.ts @@ -1,4 +1,4 @@ export * from './ContentAppender'; export * from './DebugIdGenerator'; -export * from './SourceMapUploader'; export * from './SourceProcessor'; +export * from './SymbolUploader'; diff --git a/tools/sourcemap-tools/tests/SourceMapUploader.spec.ts b/tools/sourcemap-tools/tests/SourceMapUploader.spec.ts deleted file mode 100644 index c6b81b2b..00000000 --- a/tools/sourcemap-tools/tests/SourceMapUploader.spec.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { fail } from 'assert'; -import crypto from 'crypto'; -import fs from 'fs'; -import nock from 'nock'; -import path from 'path'; -import { SOURCEMAP_DEBUG_ID_KEY } from '../src/DebugIdGenerator'; -import { DEBUG_ID_QUERY, SourceMapUploader } from '../src/SourceMapUploader'; - -describe('SourceMapUploader', () => { - function getSourcemap(debugId?: string | null) { - const sourcemap: Record = { - version: 3, - }; - - if (debugId !== null) { - sourcemap[SOURCEMAP_DEBUG_ID_KEY] = debugId ?? crypto.randomUUID(); - } - - return sourcemap; - } - - it('should POST to https URL', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`https://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should POST to http URL', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should upload object sourcemap as POST body', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/', JSON.stringify(sourcemap)) - .query(true) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should upload string sourcemap as POST body', async () => { - const sourcemap = JSON.stringify(getSourcemap()); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/', sourcemap) - .query(true) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should upload file sourcemap as POST body', async () => { - const sourcemapPath = path.join(__dirname, './testFiles/sourcemap.js.map'); - const sourcemap = await fs.promises.readFile(sourcemapPath, 'utf-8'); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/', sourcemap) - .query(true) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.upload(sourcemapPath); - - scope.done(); - }); - - it('should upload stream sourcemap as POST body', async () => { - const sourcemapPath = path.join(__dirname, './testFiles/sourcemap.js.map'); - const sourcemap = await fs.promises.readFile(sourcemapPath, 'utf-8'); - const stream = fs.createReadStream(sourcemapPath); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/', sourcemap) - .query(true) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.upload(stream); - - scope.done(); - }); - - it('should return rxid in response', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`http://upload-test/`); - const expected = crypto.randomUUID(); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: expected }); - - const uploader = new SourceMapUploader(uploadUrl); - const response = await uploader.uploadContent(sourcemap); - - scope.done(); - - expect(response.rxid).toEqual(expected); - }); - - it('should return debugId in response', async () => { - const expected = crypto.randomUUID(); - const sourcemap = getSourcemap(expected); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - const response = await uploader.uploadContent(sourcemap); - - scope.done(); - - expect(response.debugId).toEqual(expected); - }); - - it('should use passed debugId in query', async () => { - const expected = crypto.randomUUID(); - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`http://upload-test/?${DEBUG_ID_QUERY}=${expected}`); - - const scope = nock(uploadUrl.origin) - .post('/') - .query({ [DEBUG_ID_QUERY]: expected }) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should use debugId from sourcemap in query', async () => { - const expected = crypto.randomUUID(); - const sourcemap = getSourcemap(expected); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/') - .query({ [DEBUG_ID_QUERY]: expected }) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should generate debugId randomly when it is not passed anywhere', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`http://upload-test/`); - - const scope = nock(uploadUrl.origin) - .post('/') - .query({ [DEBUG_ID_QUERY]: /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/ }) - .reply(200, { response: 'ok', _rxid: 'rxid' }); - - const uploader = new SourceMapUploader(uploadUrl); - await uploader.uploadContent(sourcemap); - - scope.done(); - }); - - it('should throw on non 2xx HTTP response', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`https://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(400); - - const uploader = new SourceMapUploader(uploadUrl); - await expect(() => uploader.uploadContent(sourcemap)).rejects.toThrow(); - - scope.done(); - }); - - it('should throw on non 2xx HTTP response with response data', async () => { - const expected = 'RESPONSE FROM SERVER'; - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`https://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(400, expected); - - const uploader = new SourceMapUploader(uploadUrl); - try { - await uploader.uploadContent(sourcemap); - fail(); - } catch (err) { - expect((err as Error).message).toContain(expected); - } - - scope.done(); - }); - - it('should throw on response with response not equal to "ok"', async () => { - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`https://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'not-ok', _rxid: 'rxid' }); - const uploader = new SourceMapUploader(uploadUrl); - await expect(() => uploader.uploadContent(sourcemap)).rejects.toThrow(); - - scope.done(); - }); - - it('should throw on response with response not equal to "ok" with response data', async () => { - const expected = JSON.stringify({ response: 'not-ok', _rxid: 'rxid' }); - const sourcemap = getSourcemap(); - const uploadUrl = new URL(`https://upload-test/`); - - const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, expected); - const uploader = new SourceMapUploader(uploadUrl); - try { - await uploader.uploadContent(sourcemap); - fail(); - } catch (err) { - expect((err as Error).message).toContain(expected); - } - - scope.done(); - }); - - it('should throw on sourcemap without version', async () => { - const sourcemap = getSourcemap(); - delete sourcemap['version']; - - const uploader = new SourceMapUploader(new URL(`https://upload-test/`)); - await expect(() => uploader.uploadContent(sourcemap)).rejects.toThrow(); - }); - - it('should throw if passed sourcemap is not an object', async () => { - const sourcemap = getSourcemap(); - delete sourcemap['version']; - - const uploader = new SourceMapUploader(new URL(`https://upload-test/`)); - await expect(() => uploader.uploadContent('123')).rejects.toThrow(); - }); - - it('should throw if passed sourcemap is null', async () => { - const sourcemap = getSourcemap(); - delete sourcemap['version']; - - const uploader = new SourceMapUploader(new URL(`https://upload-test/`)); - await expect(() => uploader.uploadContent('null')).rejects.toThrow(); - }); -}); diff --git a/tools/sourcemap-tools/tests/SymbolUploader.spec.ts b/tools/sourcemap-tools/tests/SymbolUploader.spec.ts new file mode 100644 index 00000000..e548ef1a --- /dev/null +++ b/tools/sourcemap-tools/tests/SymbolUploader.spec.ts @@ -0,0 +1,144 @@ +import { fail } from 'assert'; +import crypto from 'crypto'; +import fs from 'fs'; +import nock from 'nock'; +import path from 'path'; +import { Readable } from 'stream'; +import { SymbolUploader } from '../src/SymbolUploader'; + +describe('SymbolUploader', () => { + function getReadable() { + return Readable.from(crypto.randomBytes(16)); + } + + it('should POST to https URL', async () => { + const uploadData = getReadable(); + const uploadUrl = new URL(`https://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: 'rxid' }); + + const uploader = new SymbolUploader(uploadUrl); + await uploader.uploadSymbol(uploadData); + + scope.done(); + }); + + it('should POST to http URL', async () => { + const uploadData = getReadable(); + const uploadUrl = new URL(`http://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: 'rxid' }); + + const uploader = new SymbolUploader(uploadUrl); + await uploader.uploadSymbol(uploadData); + + scope.done(); + }); + + it('should upload file as POST body', async () => { + const buffer = crypto.randomBytes(16); + const uploadData = Readable.from(buffer); + + const uploadUrl = new URL(`http://upload-test/`); + + const scope = nock(uploadUrl.origin) + .post('/', buffer) + .query(true) + .reply(200, { response: 'ok', _rxid: 'rxid' }); + + const uploader = new SymbolUploader(uploadUrl); + await uploader.uploadSymbol(uploadData); + + scope.done(); + }); + + it('should upload stream as POST body', async () => { + const sourcemapPath = path.join(__dirname, './testFiles/sourcemap.js.map'); + const uploadData = await fs.promises.readFile(sourcemapPath, 'utf-8'); + const stream = fs.createReadStream(sourcemapPath); + const uploadUrl = new URL(`http://upload-test/`); + + const scope = nock(uploadUrl.origin) + .post('/', uploadData) + .query(true) + .reply(200, { response: 'ok', _rxid: 'rxid' }); + + const uploader = new SymbolUploader(uploadUrl); + await uploader.uploadSymbol(stream); + + scope.done(); + }); + + it('should return rxid in response', async () => { + const uploadData = getReadable(); + const uploadUrl = new URL(`http://upload-test/`); + const expected = crypto.randomUUID(); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'ok', _rxid: expected }); + + const uploader = new SymbolUploader(uploadUrl); + const response = await uploader.uploadSymbol(uploadData); + + scope.done(); + + expect(response.rxid).toEqual(expected); + }); + + it('should throw on non 2xx HTTP response', async () => { + const uploadData = getReadable(); + const uploadUrl = new URL(`https://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(400); + + const uploader = new SymbolUploader(uploadUrl); + await expect(() => uploader.uploadSymbol(uploadData)).rejects.toThrow(); + + scope.done(); + }); + + it('should throw on non 2xx HTTP response with response data', async () => { + const expected = 'RESPONSE FROM SERVER'; + const uploadData = getReadable(); + const uploadUrl = new URL(`https://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(400, expected); + + const uploader = new SymbolUploader(uploadUrl); + try { + await uploader.uploadSymbol(uploadData); + fail(); + } catch (err) { + expect((err as Error).message).toContain(expected); + } + + scope.done(); + }); + + it('should throw on response with response not equal to "ok"', async () => { + const uploadData = getReadable(); + const uploadUrl = new URL(`https://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, { response: 'not-ok', _rxid: 'rxid' }); + const uploader = new SymbolUploader(uploadUrl); + await expect(() => uploader.uploadSymbol(uploadData)).rejects.toThrow(); + + scope.done(); + }); + + it('should throw on response with response not equal to "ok" with response data', async () => { + const expected = JSON.stringify({ response: 'not-ok', _rxid: 'rxid' }); + const uploadData = getReadable(); + const uploadUrl = new URL(`https://upload-test/`); + + const scope = nock(uploadUrl.origin).post('/').query(true).reply(200, expected); + const uploader = new SymbolUploader(uploadUrl); + try { + await uploader.uploadSymbol(uploadData); + fail(); + } catch (err) { + expect((err as Error).message).toContain(expected); + } + + scope.done(); + }); +}); From 759b95a4663846b1f82843f1d1b390490cc88314 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Mon, 3 Jul 2023 10:06:46 +0000 Subject: [PATCH 2/7] sourcmap tools: add ZipArchive --- package-lock.json | 1360 ++++++++++++++++- tools/sourcemap-tools/package.json | 4 + tools/sourcemap-tools/src/ZipArchive.ts | 35 + tools/sourcemap-tools/src/index.ts | 1 + tools/sourcemap-tools/tests/.gitignore | 1 + .../sourcemap-tools/tests/ZipArchive.spec.ts | 44 + 6 files changed, 1383 insertions(+), 62 deletions(-) create mode 100644 tools/sourcemap-tools/src/ZipArchive.ts create mode 100644 tools/sourcemap-tools/tests/.gitignore create mode 100644 tools/sourcemap-tools/tests/ZipArchive.spec.ts diff --git a/package-lock.json b/package-lock.json index de5efb5b..75e6d5b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1257,6 +1257,15 @@ "node": ">= 10" } }, + "node_modules/@types/archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-IctHreBuWE5dvBDz/0WeKtyVKVRs4h75IblxOACL92wU66v+HGAfEYAOyXkOFphvRJMhuXdI9huDXpX0FC6lCw==", + "dev": true, + "dependencies": { + "@types/readdir-glob": "*" + } + }, "node_modules/@types/babel__core": { "version": "7.20.1", "dev": true, @@ -1294,6 +1303,15 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/decompress": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@types/decompress/-/decompress-4.2.4.tgz", + "integrity": "sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/eslint": { "version": "8.40.2", "license": "MIT", @@ -1380,6 +1398,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/readdir-glob": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-ImM6TmoF8bgOwvehGviEj3tRdRBbQujr1N+0ypaln/GWjaerOB26jb93vsRHmdMtvVQZQebOlqt2HROark87mQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/semver": { "version": "7.5.0", "dev": true, @@ -2031,6 +2058,75 @@ "dev": true, "license": "ISC" }, + "node_modules/archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/archiver-utils/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/archiver/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/argparse": { "version": "2.0.1", "dev": true, @@ -2186,6 +2282,11 @@ "node": ">=0.10.0" } }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, "node_modules/async-each": { "version": "1.0.6", "dev": true, @@ -2312,7 +2413,6 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "dev": true, "license": "MIT" }, "node_modules/base": { @@ -2345,7 +2445,6 @@ }, "node_modules/base64-js": { "version": "1.5.1", - "dev": true, "funding": [ { "type": "github", @@ -2379,6 +2478,52 @@ "node": ">=8" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/bluebird": { "version": "3.7.2", "dev": true, @@ -2391,7 +2536,6 @@ }, "node_modules/brace-expansion": { "version": "1.1.11", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -2549,6 +2693,36 @@ "isarray": "^1.0.0" } }, + "node_modules/buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "node_modules/buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, + "node_modules/buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", + "dev": true + }, "node_modules/buffer-from": { "version": "1.1.2", "license": "MIT" @@ -3021,9 +3195,35 @@ "dev": true, "license": "MIT" }, + "node_modules/compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/compress-commons/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", - "dev": true, "license": "MIT" }, "node_modules/concat-stream": { @@ -3107,9 +3307,44 @@ }, "node_modules/core-util-is": { "version": "1.0.3", - "dev": true, "license": "MIT" }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/crc32-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "dev": true, @@ -3243,12 +3478,215 @@ "dev": true, "license": "MIT" }, - "node_modules/decode-uri-component": { - "version": "0.2.2", + "node_modules/decode-uri-component": { + "version": "0.2.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "dependencies": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tar/node_modules/bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/decompress-tar/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-tar/node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2/node_modules/file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-tarbz2/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "dependencies": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-targz/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "dev": true, + "dependencies": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress-unzip/node_modules/file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-unzip/node_modules/get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", + "dev": true, + "dependencies": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-unzip/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress/node_modules/make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress/node_modules/make-dir/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/decompress/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, - "license": "MIT", "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, "node_modules/dedent": { @@ -3450,7 +3888,6 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", - "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" @@ -4294,6 +4731,15 @@ "bser": "2.1.1" } }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, "node_modules/figgy-pudding": { "version": "3.5.2", "dev": true, @@ -4310,6 +4756,15 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/fill-range": { "version": "7.0.1", "dev": true, @@ -4558,6 +5013,11 @@ "readable-stream": "^2.0.0" } }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "node_modules/fs-write-stream-atomic": { "version": "1.0.10", "dev": true, @@ -4571,7 +5031,6 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", - "dev": true, "license": "ISC" }, "node_modules/function-bind": { @@ -5049,7 +5508,6 @@ }, "node_modules/ieee754": { "version": "1.2.1", - "dev": true, "funding": [ { "type": "github", @@ -5127,7 +5585,6 @@ }, "node_modules/inflight": { "version": "1.0.6", - "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -5136,7 +5593,6 @@ }, "node_modules/inherits": { "version": "2.0.4", - "dev": true, "license": "ISC" }, "node_modules/internal-slot": { @@ -5338,6 +5794,12 @@ "node": ">=0.10.0" } }, + "node_modules/is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", + "dev": true + }, "node_modules/is-negative-zero": { "version": "2.0.2", "dev": true, @@ -5507,7 +5969,6 @@ }, "node_modules/isarray": { "version": "1.0.0", - "dev": true, "license": "MIT" }, "node_modules/isexe": { @@ -6332,6 +6793,17 @@ "node": ">=6" } }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, "node_modules/leven": { "version": "3.1.0", "dev": true, @@ -6407,6 +6879,26 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "dev": true, @@ -6417,6 +6909,11 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, "node_modules/lru-cache": { "version": "9.1.1", "dev": true, @@ -6576,7 +7073,6 @@ }, "node_modules/minimatch": { "version": "3.1.2", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -6804,7 +7300,6 @@ }, "node_modules/normalize-path": { "version": "3.0.0", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6985,7 +7480,6 @@ }, "node_modules/once": { "version": "1.4.0", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -7157,7 +7651,6 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7214,6 +7707,12 @@ "node": ">=0.12" } }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "license": "ISC" @@ -7237,6 +7736,27 @@ "node": ">=6" } }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/pirates": { "version": "4.0.5", "dev": true, @@ -7368,7 +7888,6 @@ }, "node_modules/process-nextick-args": { "version": "2.0.1", - "dev": true, "license": "MIT" }, "node_modules/promise-inflight": { @@ -7542,7 +8061,6 @@ }, "node_modules/readable-stream": { "version": "2.3.8", - "dev": true, "license": "MIT", "dependencies": { "core-util-is": "~1.0.0", @@ -7556,17 +8074,42 @@ }, "node_modules/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", - "dev": true, "license": "MIT" }, "node_modules/readable-stream/node_modules/string_decoder": { "version": "1.1.1", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.1.0" } }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/readdirp": { "version": "3.6.0", "dev": true, @@ -7853,6 +8396,19 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "dependencies": { + "commander": "^2.8.1" + }, + "bin": { + "seek-bunzip": "bin/seek-bunzip", + "seek-table": "bin/seek-bzip-table" + } + }, "node_modules/semver": { "version": "7.5.1", "dev": true, @@ -8388,7 +8944,6 @@ }, "node_modules/string_decoder": { "version": "1.3.0", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -8539,6 +9094,15 @@ "node": ">=4" } }, + "node_modules/strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "dependencies": { + "is-natural-number": "^4.0.1" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "dev": true, @@ -8592,6 +9156,34 @@ "node": ">=6" } }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/terser": { "version": "5.18.1", "license": "BSD-2-Clause", @@ -8710,6 +9302,12 @@ "dev": true, "license": "MIT" }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "node_modules/through2": { "version": "2.0.5", "dev": true, @@ -8740,6 +9338,12 @@ "dev": true, "license": "MIT" }, + "node_modules/to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, "node_modules/to-fast-properties": { "version": "2.0.0", "dev": true, @@ -9070,6 +9674,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unbzip2-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/union-value": { "version": "1.0.1", "dev": true, @@ -9251,7 +9889,6 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "dev": true, "license": "MIT" }, "node_modules/util/node_modules/inherits": { @@ -10377,7 +11014,6 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": { @@ -10494,6 +11130,16 @@ "node": ">=8" } }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "dev": true, @@ -10505,6 +11151,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "dependencies": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "packages/browser": { "name": "@backtrace/browser", "version": "0.0.1", @@ -10577,10 +11249,14 @@ "version": "0.0.1", "license": "MIT", "dependencies": { + "archiver": "^5.3.1", "source-map": "^0.7.4" }, "devDependencies": { + "@types/archiver": "^5.3.2", + "@types/decompress": "^4.2.4", "@types/jest": "^29.5.1", + "decompress": "^4.2.1", "jest": "^29.5.0", "nock": "^13.3.1", "ts-jest": "^29.1.0", @@ -11049,7 +11725,11 @@ "@backtrace/sourcemap-tools": { "version": "file:tools/sourcemap-tools", "requires": { + "@types/archiver": "^5.3.2", + "@types/decompress": "*", "@types/jest": "^29.5.1", + "archiver": "^5.3.1", + "decompress": "^4.2.1", "jest": "^29.5.0", "nock": "^13.3.1", "source-map": "^0.7.4", @@ -11515,6 +12195,15 @@ "version": "2.0.0", "dev": true }, + "@types/archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-IctHreBuWE5dvBDz/0WeKtyVKVRs4h75IblxOACL92wU66v+HGAfEYAOyXkOFphvRJMhuXdI9huDXpX0FC6lCw==", + "dev": true, + "requires": { + "@types/readdir-glob": "*" + } + }, "@types/babel__core": { "version": "7.20.1", "dev": true, @@ -11548,6 +12237,15 @@ "@babel/types": "^7.20.7" } }, + "@types/decompress": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@types/decompress/-/decompress-4.2.4.tgz", + "integrity": "sha512-/C8kTMRTNiNuWGl5nEyKbPiMv6HA+0RbEXzFhFBEzASM6+oa4tJro9b8nj7eRlOFfuLdzUU+DS/GPDlvvzMOhA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/eslint": { "version": "8.40.2", "requires": { @@ -11621,6 +12319,15 @@ "version": "2.7.2", "dev": true }, + "@types/readdir-glob": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-ImM6TmoF8bgOwvehGviEj3tRdRBbQujr1N+0ypaln/GWjaerOB26jb93vsRHmdMtvVQZQebOlqt2HROark87mQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/semver": { "version": "7.5.0", "dev": true @@ -12053,6 +12760,64 @@ "version": "1.2.0", "dev": true }, + "archiver": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz", + "integrity": "sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w==", + "requires": { + "archiver-utils": "^2.1.0", + "async": "^3.2.3", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.0.0", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "requires": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "argparse": { "version": "2.0.1", "dev": true @@ -12157,6 +12922,11 @@ "version": "1.0.0", "dev": true }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + }, "async-each": { "version": "1.0.6", "dev": true, @@ -12234,8 +13004,7 @@ } }, "balanced-match": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "base": { "version": "0.11.2", @@ -12260,8 +13029,7 @@ } }, "base64-js": { - "version": "1.5.1", - "dev": true + "version": "1.5.1" }, "big.js": { "version": "5.2.2", @@ -12272,6 +13040,37 @@ "dev": true, "optional": true }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "bluebird": { "version": "3.7.2", "dev": true @@ -12282,7 +13081,6 @@ }, "brace-expansion": { "version": "1.1.11", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -12403,6 +13201,33 @@ "isarray": "^1.0.0" } }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==", + "dev": true + }, "buffer-from": { "version": "1.1.2" }, @@ -12719,9 +13544,31 @@ "version": "1.3.0", "dev": true }, + "compress-commons": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.1.tgz", + "integrity": "sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ==", + "requires": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "concat-map": { - "version": "0.0.1", - "dev": true + "version": "0.0.1" }, "concat-stream": { "version": "1.6.2", @@ -12783,8 +13630,33 @@ "dev": true }, "core-util-is": { - "version": "1.0.3", - "dev": true + "version": "1.0.3" + }, + "crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==" + }, + "crc32-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.2.tgz", + "integrity": "sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w==", + "requires": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } }, "create-ecdh": { "version": "4.0.4", @@ -12894,6 +13766,173 @@ "version": "0.2.2", "dev": true }, + "decompress": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", + "dev": true, + "requires": { + "decompress-tar": "^4.0.0", + "decompress-tarbz2": "^4.0.0", + "decompress-targz": "^4.0.0", + "decompress-unzip": "^4.0.1", + "graceful-fs": "^4.1.10", + "make-dir": "^1.0.0", + "pify": "^2.3.0", + "strip-dirs": "^2.0.0" + }, + "dependencies": { + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true + } + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + } + } + }, + "decompress-tar": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", + "dev": true, + "requires": { + "file-type": "^5.2.0", + "is-stream": "^1.1.0", + "tar-stream": "^1.5.2" + }, + "dependencies": { + "bl": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + } + } + }, + "decompress-tarbz2": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.0", + "file-type": "^6.1.0", + "is-stream": "^1.1.0", + "seek-bzip": "^1.0.5", + "unbzip2-stream": "^1.0.9" + }, + "dependencies": { + "file-type": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true + } + } + }, + "decompress-targz": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", + "dev": true, + "requires": { + "decompress-tar": "^4.1.1", + "file-type": "^5.2.0", + "is-stream": "^1.1.0" + }, + "dependencies": { + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "dev": true + } + } + }, + "decompress-unzip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", + "integrity": "sha512-1fqeluvxgnn86MOh66u8FjbtJpAFv5wgCT9Iw8rcBqQcCo5tO8eiJw7NNTrvt9n4CRBVq7CstiS922oPgyGLrw==", + "dev": true, + "requires": { + "file-type": "^3.8.0", + "get-stream": "^2.2.0", + "pify": "^2.3.0", + "yauzl": "^2.4.2" + }, + "dependencies": { + "file-type": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha512-RLoqTXE8/vPmMuTI88DAzhMYC99I8BWv7zYP4A1puo5HIjEJ5EX48ighy4ZyKMG9EDXxBgW6e++cn7d1xuFghA==", + "dev": true + }, + "get-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", + "integrity": "sha512-AUGhbbemXxrZJRD5cDvKtQxLuYaIbNtDTK8YqupCI393Q2KSTreEsLUN3ZxAWFGiKTzL6nKuzfcIvieflUX9qA==", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + } + } + }, "dedent": { "version": "0.7.0", "dev": true @@ -13031,7 +14070,6 @@ }, "end-of-stream": { "version": "1.4.4", - "dev": true, "requires": { "once": "^1.4.0" } @@ -13612,6 +14650,15 @@ "bser": "2.1.1" } }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, "figgy-pudding": { "version": "3.5.2", "dev": true @@ -13623,6 +14670,12 @@ "flat-cache": "^3.0.4" } }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha512-Iq1nJ6D2+yIO4c8HHg4fyVb8mAJieo1Oloy1mLLaB2PvezNedhBVm+QU7g0qM42aiMbRXTxKKwGD17rjKNJYVQ==", + "dev": true + }, "fill-range": { "version": "7.0.1", "dev": true, @@ -13784,6 +14837,11 @@ "readable-stream": "^2.0.0" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, "fs-write-stream-atomic": { "version": "1.0.10", "dev": true, @@ -13795,8 +14853,7 @@ } }, "fs.realpath": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "function-bind": { "version": "1.1.1", @@ -14094,8 +15151,7 @@ } }, "ieee754": { - "version": "1.2.1", - "dev": true + "version": "1.2.1" }, "iferr": { "version": "0.1.5", @@ -14131,15 +15187,13 @@ }, "inflight": { "version": "1.0.6", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { - "version": "2.0.4", - "dev": true + "version": "2.0.4" }, "internal-slot": { "version": "1.0.5", @@ -14261,6 +15315,12 @@ "is-extglob": "^2.1.1" } }, + "is-natural-number": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", + "integrity": "sha512-Y4LTamMe0DDQIIAlaer9eKebAlDSV6huy+TWhJVPlzZh2o4tRP5SQWFlLn5N0To4mDD22/qdOq+veo1cSISLgQ==", + "dev": true + }, "is-negative-zero": { "version": "2.0.2", "dev": true @@ -14351,8 +15411,7 @@ "dev": true }, "isarray": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "isexe": { "version": "2.0.0", @@ -14916,6 +15975,14 @@ "version": "3.0.3", "dev": true }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "requires": { + "readable-stream": "^2.0.5" + } + }, "leven": { "version": "3.1.0", "dev": true @@ -14961,6 +16028,26 @@ "version": "4.17.21", "dev": true }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, "lodash.memoize": { "version": "4.1.2", "dev": true @@ -14969,6 +16056,11 @@ "version": "4.6.2", "dev": true }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, "lru-cache": { "version": "9.1.1", "dev": true @@ -15077,7 +16169,6 @@ }, "minimatch": { "version": "3.1.2", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -15248,8 +16339,7 @@ "version": "2.0.12" }, "normalize-path": { - "version": "3.0.0", - "dev": true + "version": "3.0.0" }, "npm-run-path": { "version": "4.0.1", @@ -15363,7 +16453,6 @@ }, "once": { "version": "1.4.0", - "dev": true, "requires": { "wrappy": "1" } @@ -15475,8 +16564,7 @@ "dev": true }, "path-is-absolute": { - "version": "1.0.1", - "dev": true + "version": "1.0.1" }, "path-key": { "version": "3.1.1", @@ -15509,6 +16597,12 @@ "sha.js": "^2.4.8" } }, + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, "picocolors": { "version": "1.0.0" }, @@ -15520,6 +16614,21 @@ "version": "4.0.1", "dev": true }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, "pirates": { "version": "4.0.5", "dev": true @@ -15594,8 +16703,7 @@ "dev": true }, "process-nextick-args": { - "version": "2.0.1", - "dev": true + "version": "2.0.1" }, "promise-inflight": { "version": "1.0.1", @@ -15712,7 +16820,6 @@ }, "readable-stream": { "version": "2.3.8", - "dev": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -15724,18 +16831,42 @@ }, "dependencies": { "safe-buffer": { - "version": "5.1.2", - "dev": true + "version": "5.1.2" }, "string_decoder": { "version": "1.1.1", - "dev": true, "requires": { "safe-buffer": "~5.1.0" } } } }, + "readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "requires": { + "minimatch": "^5.1.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "readdirp": { "version": "3.6.0", "dev": true, @@ -15898,6 +17029,15 @@ "ajv-keywords": "^3.5.2" } }, + "seek-bzip": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", + "dev": true, + "requires": { + "commander": "^2.8.1" + } + }, "semver": { "version": "7.5.1", "dev": true, @@ -16278,7 +17418,6 @@ }, "string_decoder": { "version": "1.3.0", - "dev": true, "requires": { "safe-buffer": "~5.2.0" } @@ -16373,6 +17512,15 @@ "version": "3.0.0", "dev": true }, + "strip-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", + "dev": true, + "requires": { + "is-natural-number": "^4.0.1" + } + }, "strip-final-newline": { "version": "2.0.0", "dev": true @@ -16399,6 +17547,30 @@ "tapable": { "version": "2.2.1" }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, "terser": { "version": "5.18.1", "requires": { @@ -16470,6 +17642,12 @@ "version": "0.2.0", "dev": true }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "through2": { "version": "2.0.5", "dev": true, @@ -16493,6 +17671,12 @@ "version": "1.0.1", "dev": true }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "dev": true @@ -16683,6 +17867,28 @@ "which-boxed-primitive": "^1.0.2" } }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, "union-value": { "version": "1.0.1", "dev": true, @@ -16811,8 +18017,7 @@ } }, "util-deprecate": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "v8-to-istanbul": { "version": "9.1.0", @@ -17603,8 +18808,7 @@ } }, "wrappy": { - "version": "1.0.2", - "dev": true + "version": "1.0.2" }, "write-file-atomic": { "version": "4.0.2", @@ -17677,9 +18881,41 @@ "version": "21.1.1", "dev": true }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, "yocto-queue": { "version": "0.1.0", "dev": true + }, + "zip-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } } } } diff --git a/tools/sourcemap-tools/package.json b/tools/sourcemap-tools/package.json index 27795e1f..6be76532 100644 --- a/tools/sourcemap-tools/package.json +++ b/tools/sourcemap-tools/package.json @@ -37,13 +37,17 @@ }, "homepage": "https://github.com/backtrace-labs/backtrace-javascript#readme", "devDependencies": { + "@types/archiver": "^5.3.2", + "@types/decompress": "^4.2.4", "@types/jest": "^29.5.1", + "decompress": "^4.2.1", "jest": "^29.5.0", "nock": "^13.3.1", "ts-jest": "^29.1.0", "typescript": "^5.0.4" }, "dependencies": { + "archiver": "^5.3.1", "source-map": "^0.7.4" } } diff --git a/tools/sourcemap-tools/src/ZipArchive.ts b/tools/sourcemap-tools/src/ZipArchive.ts new file mode 100644 index 00000000..16c8bc1f --- /dev/null +++ b/tools/sourcemap-tools/src/ZipArchive.ts @@ -0,0 +1,35 @@ +import archiver from 'archiver'; +import { Readable, Transform, TransformCallback, TransformOptions } from 'stream'; + +export class ZipArchive extends Transform { + private readonly _archive: archiver.Archiver; + + constructor(opts?: TransformOptions) { + super(opts); + this._archive = archiver('zip'); + } + + public append(name: string, sourceMap: string | Readable | Buffer) { + this._archive.append(sourceMap, { name }); + return this; + } + + public finalize() { + return this._archive.finalize(); + } + + public override pipe( + destination: T, + options?: { end?: boolean | undefined } | undefined, + ): T { + return this._archive.pipe(destination, options); + } + + public override _transform(chunk: unknown, encoding: BufferEncoding, callback: TransformCallback): void { + return this._archive._transform(chunk, encoding, callback); + } + + public override _flush(callback: TransformCallback): void { + return this._archive._flush(callback); + } +} diff --git a/tools/sourcemap-tools/src/index.ts b/tools/sourcemap-tools/src/index.ts index da6a771c..050b899d 100644 --- a/tools/sourcemap-tools/src/index.ts +++ b/tools/sourcemap-tools/src/index.ts @@ -2,3 +2,4 @@ export * from './ContentAppender'; export * from './DebugIdGenerator'; export * from './SourceProcessor'; export * from './SymbolUploader'; +export * from './ZipArchive'; diff --git a/tools/sourcemap-tools/tests/.gitignore b/tools/sourcemap-tools/tests/.gitignore new file mode 100644 index 00000000..37334214 --- /dev/null +++ b/tools/sourcemap-tools/tests/.gitignore @@ -0,0 +1 @@ +testOutput/ diff --git a/tools/sourcemap-tools/tests/ZipArchive.spec.ts b/tools/sourcemap-tools/tests/ZipArchive.spec.ts new file mode 100644 index 00000000..1084563b --- /dev/null +++ b/tools/sourcemap-tools/tests/ZipArchive.spec.ts @@ -0,0 +1,44 @@ +import assert from 'assert'; +import decompress from 'decompress'; +import fs from 'fs'; +import path from 'path'; +import { ZipArchive } from '../src'; + +describe('ZipArchive', () => { + const outputFile = path.join(__dirname, './testOutput/archive.zip'); + + beforeEach(async () => { + try { + await fs.promises.unlink(outputFile); + } catch { + // Do nothing + } + }); + + it('should create a zip archive', async () => { + const archive = new ZipArchive(); + const outputStream = fs.createWriteStream(outputFile); + archive.pipe(outputStream); + + const entries = [ + ['entry1', Buffer.from('entry1')], + ['entry2', Buffer.from('entry2')], + ] as const; + + for (const [name, buf] of entries) { + archive.append(name, buf); + } + + await archive.finalize(); + + const files = await decompress(outputFile); + expect(files.length).toBeGreaterThan(0); + + for (const file of files) { + const entry = entries.find(([e]) => e === file.path); + assert(entry); + + expect(entry[1]).toEqual(file.data); + } + }); +}); From 4a2273127ad046c2405909c79c7a3e242362f763 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Mon, 3 Jul 2023 10:14:43 +0000 Subject: [PATCH 3/7] webpack plugin: change uploading of sourcemaps to ZIP upload --- tools/webpack-plugin/src/BacktracePlugin.ts | 68 +++++++++++-------- .../src/helpers/statsPrinter.ts | 52 -------------- tools/webpack-plugin/src/models/AssetStats.ts | 7 -- .../src/models/BacktracePluginOptions.ts | 4 +- .../webpack-plugin/tests/e2e/createE2ETest.ts | 4 +- tools/webpack-plugin/webpack.config.js | 2 +- 6 files changed, 46 insertions(+), 91 deletions(-) delete mode 100644 tools/webpack-plugin/src/helpers/statsPrinter.ts delete mode 100644 tools/webpack-plugin/src/models/AssetStats.ts diff --git a/tools/webpack-plugin/src/BacktracePlugin.ts b/tools/webpack-plugin/src/BacktracePlugin.ts index 4929f84e..8e4898f7 100644 --- a/tools/webpack-plugin/src/BacktracePlugin.ts +++ b/tools/webpack-plugin/src/BacktracePlugin.ts @@ -1,23 +1,22 @@ -import { DebugIdGenerator, SourceMapUploader, SourceProcessor } from '@backtrace/sourcemap-tools'; +import { DebugIdGenerator, SourceProcessor, SymbolUploader, ZipArchive } from '@backtrace/sourcemap-tools'; import path from 'path'; import webpack, { WebpackPluginInstance } from 'webpack'; -import { statsPrinter } from './helpers/statsPrinter'; -import { AssetStats } from './models/AssetStats'; import { BacktracePluginOptions } from './models/BacktracePluginOptions'; export class BacktracePlugin implements WebpackPluginInstance { private readonly _sourceProcessor: SourceProcessor; - private readonly _sourceMapUploader?: SourceMapUploader; + private readonly _sourceMapUploader?: SymbolUploader; constructor(public readonly options?: BacktracePluginOptions) { this._sourceProcessor = new SourceProcessor(new DebugIdGenerator()); this._sourceMapUploader = options?.uploadUrl - ? new SourceMapUploader(options.uploadUrl, options.uploadOptions) + ? new SymbolUploader(options.uploadUrl, options.uploadOptions) : undefined; } public apply(compiler: webpack.Compiler) { - const assetStats = new Map(); + const processResults = new Map(); + let uploadResult: string | Error | undefined; compiler.hooks.afterEmit.tapPromise(BacktracePlugin.name, async (compilation) => { const logger = compilation.getLogger(BacktracePlugin.name); @@ -52,45 +51,60 @@ export class BacktracePlugin implements WebpackPluginInstance { logger.log(`received ${entries.length} files for processing`); for (const [asset, sourcePath, sourceMapPath] of entries) { - const stats: AssetStats = {}; - assetStats.set(asset, stats); - let debugId: string; logger.time(`[${asset}] process source and sourcemap`); try { debugId = await this._sourceProcessor.processSourceAndSourceMapFiles(sourcePath, sourceMapPath); - stats.debugId = debugId; - stats.processSource = true; + processResults.set(asset, debugId); } catch (err) { logger.error(`[${asset}] process source and sourcemap failed:`, err); - stats.processSource = err instanceof Error ? err : new Error('Unknown error.'); + processResults.set(asset, err instanceof Error ? err : new Error('Unknown error.')); continue; } finally { logger.timeEnd(`[${asset}] process source and sourcemap`); } + } - if (!this._sourceMapUploader) { - logger.log(`[${asset}] file processed`); - continue; - } - - logger.time(`[${asset}] upload sourcemap`); + if (this._sourceMapUploader) { + logger.time(`upload sourcemaps`); try { - const result = await this._sourceMapUploader.upload(sourceMapPath, debugId); - stats.sourceMapUpload = result; - logger.log(`[${asset}] file processed and sourcemap uploaded`); + const archive = new ZipArchive(); + const request = this._sourceMapUploader.uploadSymbol(archive); + + for (const [asset, , sourceMapPath] of entries) { + archive.append(`${asset}.map`, sourceMapPath); + } + + await archive.finalize(); + const result = await request; + uploadResult = result.rxid; } catch (err) { - logger.error(`[${asset}] upload sourcemap failed:`, err); - stats.sourceMapUpload = err instanceof Error ? err : new Error('Unknown error.'); + logger.error(`upload sourcemaps failed:`, err); + uploadResult = err instanceof Error ? err : new Error('Unknown error.'); } finally { - logger.timeEnd(`[${asset}] upload sourcemap`); + logger.timeEnd(`upload sourcemaps`); } } - const printer = statsPrinter(compilation.getLogger(BacktracePlugin.name)); - for (const [key, stats] of assetStats) { - printer(key, stats); + for (const [key, result] of processResults) { + if (typeof result === 'string') { + logger.info(`[${key}] processed file successfully`); + logger.debug(`\tdebugId: ${result}`); + } else { + logger.error(`[${key}] failed to process file: ${result.message}`); + logger.debug(`Error stack trace: ${result.stack}`); + } + } + + if (uploadResult) { + if (typeof uploadResult === 'string') { + logger.info(`uploaded sourcemaps successfully`); + logger.debug(`\trxid: ${uploadResult}`); + } else { + logger.error(`failed to upload sourcemaps: ${uploadResult.message}`); + logger.debug(`Error stack trace: ${uploadResult.stack}`); + } } }); } diff --git a/tools/webpack-plugin/src/helpers/statsPrinter.ts b/tools/webpack-plugin/src/helpers/statsPrinter.ts deleted file mode 100644 index 73f4a81c..00000000 --- a/tools/webpack-plugin/src/helpers/statsPrinter.ts +++ /dev/null @@ -1,52 +0,0 @@ -import webpack from 'webpack'; -import { AssetStats } from '../models/AssetStats'; - -function statToString(stat: boolean | string | Error) { - if (typeof stat === 'string') { - return stat; - } - - if (typeof stat === 'boolean') { - return stat ? 'successful' : 'skipped'; - } - - return stat.message; -} - -export function statsPrinter(logger: webpack.Compilation['logger']) { - return function printStats(key: string, stats: AssetStats) { - const errors = [stats.sourceMapUpload, stats.processSource].some((v) => v instanceof Error); - - const infoLog = errors - ? (...args: unknown[]) => logger.error(...args) - : (...args: unknown[]) => logger.info(...args); - - const debugLog = (...args: unknown[]) => logger.log(...args); - - if (!errors) { - if (!!stats.sourceMapUpload && !(stats.sourceMapUpload instanceof Error)) { - infoLog(`[${key}] processed file and uploaded sourcemap successfully`); - } else { - infoLog(`[${key}] processed file successfully`); - } - } else { - infoLog(`[${key}] processed file with errors`); - } - - debugLog(`\tdebugId: ${stats.debugId ?? ''}`); - - if (stats.processSource != null) { - debugLog(`\tsource snippet append: ${statToString(stats.processSource) ?? ''}`); - } - - if (stats.sourceMapUpload != null) { - if (stats.sourceMapUpload === false || stats.sourceMapUpload instanceof Error) { - debugLog(`\tsourcemap upload: ${statToString(stats.sourceMapUpload)}`); - } else { - debugLog( - `\tsourcemap upload: yes, rxid: ${stats.sourceMapUpload.rxid}, debugId: ${stats.sourceMapUpload.debugId}`, - ); - } - } - }; -} diff --git a/tools/webpack-plugin/src/models/AssetStats.ts b/tools/webpack-plugin/src/models/AssetStats.ts deleted file mode 100644 index 1d1cb2a6..00000000 --- a/tools/webpack-plugin/src/models/AssetStats.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { UploadResult } from '@backtrace/sourcemap-tools'; - -export interface AssetStats { - debugId?: string; - processSource?: boolean | string | Error; - sourceMapUpload?: false | UploadResult | Error; -} diff --git a/tools/webpack-plugin/src/models/BacktracePluginOptions.ts b/tools/webpack-plugin/src/models/BacktracePluginOptions.ts index e402d1e4..a0e7641f 100644 --- a/tools/webpack-plugin/src/models/BacktracePluginOptions.ts +++ b/tools/webpack-plugin/src/models/BacktracePluginOptions.ts @@ -1,4 +1,4 @@ -import { SourceMapUploaderOptions } from '@backtrace/sourcemap-tools'; +import { SymbolUploaderOptions } from '@backtrace/sourcemap-tools'; export interface BacktracePluginOptions { /** @@ -12,5 +12,5 @@ export interface BacktracePluginOptions { /** * Additional upload options. */ - uploadOptions?: SourceMapUploaderOptions; + uploadOptions?: SymbolUploaderOptions; } diff --git a/tools/webpack-plugin/tests/e2e/createE2ETest.ts b/tools/webpack-plugin/tests/e2e/createE2ETest.ts index 65e03f46..5dd9c230 100644 --- a/tools/webpack-plugin/tests/e2e/createE2ETest.ts +++ b/tools/webpack-plugin/tests/e2e/createE2ETest.ts @@ -1,4 +1,4 @@ -import { SourceMapUploader, SourceProcessor } from '@backtrace/sourcemap-tools'; +import { SourceProcessor, SymbolUploader } from '@backtrace/sourcemap-tools'; import assert from 'assert'; import fs from 'fs'; import path from 'path'; @@ -8,7 +8,7 @@ import { asyncWebpack, expectSuccess, getFiles, removeDir, webpackModeTest } fro export function createE2ETest(configBuilder: (mode: webpack.Configuration['mode']) => webpack.Configuration) { webpackModeTest((mode) => { function mockUploader() { - return jest.spyOn(SourceMapUploader.prototype, 'upload').mockImplementation((_, debugId) => + return jest.spyOn(SymbolUploader.prototype, 'upload').mockImplementation((_, debugId) => Promise.resolve({ debugId: debugId ?? crypto.randomUUID(), rxid: crypto.randomUUID(), diff --git a/tools/webpack-plugin/webpack.config.js b/tools/webpack-plugin/webpack.config.js index 5a09c65a..6ac5974f 100644 --- a/tools/webpack-plugin/webpack.config.js +++ b/tools/webpack-plugin/webpack.config.js @@ -35,5 +35,5 @@ module.exports = { additionalModuleDirs: ['../../node_modules'], }), ], - plugins: [new BacktracePlugin({})], + plugins: [new BacktracePlugin()], }; From 4af87c21e84c1fa82d98122f422027ac11879f0d Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Mon, 3 Jul 2023 10:18:39 +0000 Subject: [PATCH 4/7] build: update webpack tsconfig.json path --- tsconfig.packages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.packages.json b/tsconfig.packages.json index 6ffe53ed..03e54fe3 100644 --- a/tsconfig.packages.json +++ b/tsconfig.packages.json @@ -8,7 +8,7 @@ "path": "tools/sourcemap-tools" }, { - "path": "tools/webpack-plugin" + "path": "tools/webpack-plugin/tsconfig.build.json" } ] } From aaffdb5d96f06f31925bfb5a9a6b236caea178d7 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Mon, 3 Jul 2023 10:32:38 +0000 Subject: [PATCH 5/7] sourcemap tools: fix ZipArchive test missing dir --- tools/sourcemap-tools/tests/ZipArchive.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/sourcemap-tools/tests/ZipArchive.spec.ts b/tools/sourcemap-tools/tests/ZipArchive.spec.ts index 1084563b..a31ab34c 100644 --- a/tools/sourcemap-tools/tests/ZipArchive.spec.ts +++ b/tools/sourcemap-tools/tests/ZipArchive.spec.ts @@ -8,6 +8,8 @@ describe('ZipArchive', () => { const outputFile = path.join(__dirname, './testOutput/archive.zip'); beforeEach(async () => { + await fs.promises.mkdir(path.dirname(outputFile), { recursive: true }); + try { await fs.promises.unlink(outputFile); } catch { From 7ca7bf2bd8ee34d803eeb027906921ee60a72506 Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Tue, 11 Jul 2023 08:36:03 +0000 Subject: [PATCH 6/7] webpack plugin: fix zipping sourcemaps by passing stream instead of string --- tools/webpack-plugin/src/BacktracePlugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/webpack-plugin/src/BacktracePlugin.ts b/tools/webpack-plugin/src/BacktracePlugin.ts index 8e4898f7..386a595e 100644 --- a/tools/webpack-plugin/src/BacktracePlugin.ts +++ b/tools/webpack-plugin/src/BacktracePlugin.ts @@ -1,4 +1,5 @@ import { DebugIdGenerator, SourceProcessor, SymbolUploader, ZipArchive } from '@backtrace/sourcemap-tools'; +import fs from 'fs'; import path from 'path'; import webpack, { WebpackPluginInstance } from 'webpack'; import { BacktracePluginOptions } from './models/BacktracePluginOptions'; @@ -72,8 +73,9 @@ export class BacktracePlugin implements WebpackPluginInstance { const archive = new ZipArchive(); const request = this._sourceMapUploader.uploadSymbol(archive); - for (const [asset, , sourceMapPath] of entries) { - archive.append(`${asset}.map`, sourceMapPath); + for (const [asset, _, sourceMapPath] of entries) { + const stream = fs.createReadStream(sourceMapPath); + archive.append(`${asset}.map`, stream); } await archive.finalize(); From 0a25e5b97b309abb90cd53bfa169324fea7b38eb Mon Sep 17 00:00:00 2001 From: Sebastian Alex Date: Tue, 11 Jul 2023 08:36:19 +0000 Subject: [PATCH 7/7] sourcemap tools: minor type fixes in ZipArchive --- tools/sourcemap-tools/src/ZipArchive.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/sourcemap-tools/src/ZipArchive.ts b/tools/sourcemap-tools/src/ZipArchive.ts index 16c8bc1f..f5ac1536 100644 --- a/tools/sourcemap-tools/src/ZipArchive.ts +++ b/tools/sourcemap-tools/src/ZipArchive.ts @@ -18,10 +18,7 @@ export class ZipArchive extends Transform { return this._archive.finalize(); } - public override pipe( - destination: T, - options?: { end?: boolean | undefined } | undefined, - ): T { + public override pipe(destination: T, options?: { end?: boolean }): T { return this._archive.pipe(destination, options); }