@streamr/geoip-location 101.0.0-beta.3 → 101.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/tarHelper.js +2 -2
- package/dist/src/tarHelper.js.map +1 -1
- package/package.json +5 -5
- package/src/tarHelper.ts +2 -2
package/dist/src/tarHelper.js
CHANGED
|
@@ -5,14 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.extractFileFromTarStream = void 0;
|
|
7
7
|
const stream_1 = require("stream");
|
|
8
|
-
const tar_1 =
|
|
8
|
+
const tar_1 = require("tar");
|
|
9
9
|
const path_1 = __importDefault(require("path")); // use NodePath to avoid conflict with other 'path' symbols
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
11
|
const doExtractFileFromTarStream = (fileName, stream, downloadFolder) => {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
13
|
try {
|
|
14
14
|
const nodeStream = stream_1.Readable.fromWeb(stream);
|
|
15
|
-
(0, stream_1.pipeline)(nodeStream, tar_1.
|
|
15
|
+
(0, stream_1.pipeline)(nodeStream, (0, tar_1.extract)({
|
|
16
16
|
cwd: downloadFolder,
|
|
17
17
|
filter: (entryPath) => path_1.default.basename(entryPath) === fileName,
|
|
18
18
|
strip: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tarHelper.js","sourceRoot":"","sources":["../../src/tarHelper.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"tarHelper.js","sourceRoot":"","sources":["../../src/tarHelper.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,6BAA6B;AAE7B,gDAA2B,CAAK,2DAA2D;AAC3F,4CAAmB;AAEnB,MAAM,0BAA0B,GAAG,CAAC,QAAgB,EAAE,MAA2B,EAAE,cAAsB,EAAi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
1
|
{
|
|
2
2
|
"name": "@streamr/geoip-location",
|
|
3
|
-
"version": "101.0.0
|
|
3
|
+
"version": "101.0.0",
|
|
4
4
|
"description": "Library for getting location information from IP addresses based on MaxMind GeoLite2 databases",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"test-unit": "jest test/unit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@streamr/utils": "101.0.0
|
|
28
|
+
"@streamr/utils": "101.0.0",
|
|
29
29
|
"eventemitter3": "^5.0.0",
|
|
30
30
|
"long-timeout": "^0.1.1",
|
|
31
|
-
"mmdb-lib": "^2.1.
|
|
32
|
-
"tar": "^
|
|
33
|
-
"uuid": "^
|
|
31
|
+
"mmdb-lib": "^2.1.1",
|
|
32
|
+
"tar": "^7.4.0",
|
|
33
|
+
"uuid": "^10.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/long-timeout": "^0.1.2",
|
package/src/tarHelper.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Readable, pipeline } from 'stream'
|
|
2
|
-
import
|
|
2
|
+
import { extract } from 'tar'
|
|
3
3
|
import { ReadableStream } from 'stream/web'
|
|
4
4
|
import NodePath from 'path' // use NodePath to avoid conflict with other 'path' symbols
|
|
5
5
|
import fs from 'fs'
|
|
@@ -9,7 +9,7 @@ const doExtractFileFromTarStream = (fileName: string, stream: ReadableStream<any
|
|
|
9
9
|
try {
|
|
10
10
|
const nodeStream = Readable.fromWeb(stream)
|
|
11
11
|
pipeline(nodeStream,
|
|
12
|
-
|
|
12
|
+
extract({
|
|
13
13
|
cwd: downloadFolder,
|
|
14
14
|
filter: (entryPath: string): boolean => NodePath.basename(entryPath) === fileName,
|
|
15
15
|
strip: 1
|