soda-nodejs 0.8.11 → 0.8.13
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/README.md +23 -23
- package/dist/index.cjs +47 -65
- package/dist/utils/compress.cjs +3 -3
- package/dist/utils/copy.cjs +3 -3
- package/dist/utils/execAsync.cjs +3 -3
- package/dist/utils/execAsync.d.ts +3 -2
- package/dist/utils/isPathLike.cjs +3 -3
- package/dist/utils/saveFile.cjs +3 -3
- package/dist/utils/saveResponse.cjs +3 -3
- package/dist/utils/spawnAsync.cjs +3 -3
- package/dist/utils/unzip.cjs +3 -3
- package/dist/utils/zip.cjs +3 -3
- package/package.json +2 -2
- package/src/utils/execAsync.ts +6 -2
- package/src/utils/isPathLike.ts +5 -5
- package/src/utils/unzip.ts +34 -34
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# soda-node
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.com/package/soda-node)
|
|
4
|
-
[](https://npmjs.com/package/soda-node)
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
$ pnpm install
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
$ npm run dev
|
|
14
|
-
$ npm run build
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Options
|
|
18
|
-
|
|
19
|
-
TODO
|
|
20
|
-
|
|
21
|
-
## LICENSE
|
|
22
|
-
|
|
23
|
-
MIT
|
|
1
|
+
# soda-node
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/soda-node)
|
|
4
|
+
[](https://npmjs.com/package/soda-node)
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
$ pnpm install
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
$ npm run dev
|
|
14
|
+
$ npm run build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
TODO
|
|
20
|
+
|
|
21
|
+
## LICENSE
|
|
22
|
+
|
|
23
|
+
MIT
|
package/dist/index.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"@/utils/compress"
|
|
3
|
+
"@/utils/compress" (module) {
|
|
4
4
|
module.exports = require("./utils/compress.cjs");
|
|
5
5
|
},
|
|
6
|
-
"@/utils/copy"
|
|
6
|
+
"@/utils/copy" (module) {
|
|
7
7
|
module.exports = require("./utils/copy.cjs");
|
|
8
8
|
},
|
|
9
|
-
"@/utils/execAsync"
|
|
9
|
+
"@/utils/execAsync" (module) {
|
|
10
10
|
module.exports = require("./utils/execAsync.cjs");
|
|
11
11
|
},
|
|
12
|
-
"@/utils/isPathLike"
|
|
12
|
+
"@/utils/isPathLike" (module) {
|
|
13
13
|
module.exports = require("./utils/isPathLike.cjs");
|
|
14
14
|
},
|
|
15
|
-
"@/utils/saveFile"
|
|
15
|
+
"@/utils/saveFile" (module) {
|
|
16
16
|
module.exports = require("./utils/saveFile.cjs");
|
|
17
17
|
},
|
|
18
|
-
"@/utils/saveResponse"
|
|
18
|
+
"@/utils/saveResponse" (module) {
|
|
19
19
|
module.exports = require("./utils/saveResponse.cjs");
|
|
20
20
|
},
|
|
21
|
-
"@/utils/spawnAsync"
|
|
21
|
+
"@/utils/spawnAsync" (module) {
|
|
22
22
|
module.exports = require("./utils/spawnAsync.cjs");
|
|
23
23
|
},
|
|
24
|
-
"@/utils/unzip"
|
|
24
|
+
"@/utils/unzip" (module) {
|
|
25
25
|
module.exports = require("./utils/unzip.cjs");
|
|
26
26
|
},
|
|
27
|
-
"@/utils/zip"
|
|
27
|
+
"@/utils/zip" (module) {
|
|
28
28
|
module.exports = require("./utils/zip.cjs");
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -60,7 +60,7 @@ function __webpack_require__(moduleId) {
|
|
|
60
60
|
})();
|
|
61
61
|
(()=>{
|
|
62
62
|
__webpack_require__.r = (exports1)=>{
|
|
63
|
-
if (
|
|
63
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
64
64
|
value: 'Module'
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -71,62 +71,44 @@ function __webpack_require__(moduleId) {
|
|
|
71
71
|
var __webpack_exports__ = {};
|
|
72
72
|
(()=>{
|
|
73
73
|
__webpack_require__.r(__webpack_exports__);
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
for(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
__webpack_require__.d(__webpack_exports__,
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
for(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
__webpack_require__.d(__webpack_exports__,
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
for(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
__webpack_require__.d(__webpack_exports__,
|
|
110
|
-
var _utils_spawnAsync__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("@/utils/spawnAsync");
|
|
111
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
112
|
-
for(var __WEBPACK_IMPORT_KEY__ in _utils_spawnAsync__WEBPACK_IMPORTED_MODULE_6__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
113
|
-
return _utils_spawnAsync__WEBPACK_IMPORTED_MODULE_6__[key];
|
|
114
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
115
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
116
|
-
var _utils_unzip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("@/utils/unzip");
|
|
117
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
118
|
-
for(var __WEBPACK_IMPORT_KEY__ in _utils_unzip__WEBPACK_IMPORTED_MODULE_7__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
119
|
-
return _utils_unzip__WEBPACK_IMPORTED_MODULE_7__[key];
|
|
120
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
121
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
122
|
-
var _utils_zip__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("@/utils/zip");
|
|
123
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
124
|
-
for(var __WEBPACK_IMPORT_KEY__ in _utils_zip__WEBPACK_IMPORTED_MODULE_8__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
125
|
-
return _utils_zip__WEBPACK_IMPORTED_MODULE_8__[key];
|
|
126
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
127
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
74
|
+
var _utils_compress__rspack_import_0 = __webpack_require__("@/utils/compress");
|
|
75
|
+
var __rspack_reexport = {};
|
|
76
|
+
for(const __rspack_import_key in _utils_compress__rspack_import_0)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_compress__rspack_import_0[__rspack_import_key];
|
|
77
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
78
|
+
var _utils_copy__rspack_import_1 = __webpack_require__("@/utils/copy");
|
|
79
|
+
var __rspack_reexport = {};
|
|
80
|
+
for(const __rspack_import_key in _utils_copy__rspack_import_1)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_copy__rspack_import_1[__rspack_import_key];
|
|
81
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
82
|
+
var _utils_execAsync__rspack_import_2 = __webpack_require__("@/utils/execAsync");
|
|
83
|
+
var __rspack_reexport = {};
|
|
84
|
+
for(const __rspack_import_key in _utils_execAsync__rspack_import_2)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_execAsync__rspack_import_2[__rspack_import_key];
|
|
85
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
86
|
+
var _utils_isPathLike__rspack_import_3 = __webpack_require__("@/utils/isPathLike");
|
|
87
|
+
var __rspack_reexport = {};
|
|
88
|
+
for(const __rspack_import_key in _utils_isPathLike__rspack_import_3)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_isPathLike__rspack_import_3[__rspack_import_key];
|
|
89
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
90
|
+
var _utils_saveFile__rspack_import_4 = __webpack_require__("@/utils/saveFile");
|
|
91
|
+
var __rspack_reexport = {};
|
|
92
|
+
for(const __rspack_import_key in _utils_saveFile__rspack_import_4)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_saveFile__rspack_import_4[__rspack_import_key];
|
|
93
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
94
|
+
var _utils_saveResponse__rspack_import_5 = __webpack_require__("@/utils/saveResponse");
|
|
95
|
+
var __rspack_reexport = {};
|
|
96
|
+
for(const __rspack_import_key in _utils_saveResponse__rspack_import_5)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_saveResponse__rspack_import_5[__rspack_import_key];
|
|
97
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
98
|
+
var _utils_spawnAsync__rspack_import_6 = __webpack_require__("@/utils/spawnAsync");
|
|
99
|
+
var __rspack_reexport = {};
|
|
100
|
+
for(const __rspack_import_key in _utils_spawnAsync__rspack_import_6)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_spawnAsync__rspack_import_6[__rspack_import_key];
|
|
101
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
102
|
+
var _utils_unzip__rspack_import_7 = __webpack_require__("@/utils/unzip");
|
|
103
|
+
var __rspack_reexport = {};
|
|
104
|
+
for(const __rspack_import_key in _utils_unzip__rspack_import_7)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_unzip__rspack_import_7[__rspack_import_key];
|
|
105
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
106
|
+
var _utils_zip__rspack_import_8 = __webpack_require__("@/utils/zip");
|
|
107
|
+
var __rspack_reexport = {};
|
|
108
|
+
for(const __rspack_import_key in _utils_zip__rspack_import_8)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_utils_zip__rspack_import_8[__rspack_import_key];
|
|
109
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
128
110
|
})();
|
|
129
|
-
for(var
|
|
111
|
+
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
130
112
|
Object.defineProperty(exports, '__esModule', {
|
|
131
113
|
value: true
|
|
132
114
|
});
|
package/dist/utils/compress.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -46,9 +46,9 @@ async function compress({ input, output }) {
|
|
|
46
46
|
return (0, external_path_namespaceObject.resolve)(output);
|
|
47
47
|
}
|
|
48
48
|
exports.compress = __webpack_exports__.compress;
|
|
49
|
-
for(var
|
|
49
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
50
50
|
"compress"
|
|
51
|
-
].indexOf(
|
|
51
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
52
52
|
Object.defineProperty(exports, '__esModule', {
|
|
53
53
|
value: true
|
|
54
54
|
});
|
package/dist/utils/copy.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -59,9 +59,9 @@ async function copy({ input, output, mode }) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
exports.copy = __webpack_exports__.copy;
|
|
62
|
-
for(var
|
|
62
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
63
63
|
"copy"
|
|
64
|
-
].indexOf(
|
|
64
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
65
65
|
Object.defineProperty(exports, '__esModule', {
|
|
66
66
|
value: true
|
|
67
67
|
});
|
package/dist/utils/execAsync.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -53,9 +53,9 @@ async function execAsync(command, options) {
|
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
exports.execAsync = __webpack_exports__.execAsync;
|
|
56
|
-
for(var
|
|
56
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
57
57
|
"execAsync"
|
|
58
|
-
].indexOf(
|
|
58
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
59
59
|
Object.defineProperty(exports, '__esModule', {
|
|
60
60
|
value: true
|
|
61
61
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExecOptions } from "child_process";
|
|
2
2
|
import { ObjectEncodingOptions } from "fs";
|
|
3
|
-
import {
|
|
3
|
+
import { type DecodeOptions as IconvLiteDecodeOptions } from "iconv-lite";
|
|
4
|
+
export { type DecodeOptions as IconvLiteDecodeOptions } from "iconv-lite";
|
|
4
5
|
export type IconvDecodeOptions = {
|
|
5
6
|
encoding: string;
|
|
6
|
-
options?:
|
|
7
|
+
options?: IconvLiteDecodeOptions;
|
|
7
8
|
};
|
|
8
9
|
export declare function execAsync(command: string): Promise<string>;
|
|
9
10
|
export declare function execAsync(command: string, options: {
|
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -30,9 +30,9 @@ function isPathLike(path) {
|
|
|
30
30
|
return "string" == typeof path || path instanceof Buffer || path instanceof URL;
|
|
31
31
|
}
|
|
32
32
|
exports.isPathLike = __webpack_exports__.isPathLike;
|
|
33
|
-
for(var
|
|
33
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
34
34
|
"isPathLike"
|
|
35
|
-
].indexOf(
|
|
35
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
36
36
|
Object.defineProperty(exports, '__esModule', {
|
|
37
37
|
value: true
|
|
38
38
|
});
|
package/dist/utils/saveFile.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -35,9 +35,9 @@ async function saveFile({ input, output }) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
exports.saveFile = __webpack_exports__.saveFile;
|
|
38
|
-
for(var
|
|
38
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
39
39
|
"saveFile"
|
|
40
|
-
].indexOf(
|
|
40
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
41
41
|
Object.defineProperty(exports, '__esModule', {
|
|
42
42
|
value: true
|
|
43
43
|
});
|
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -33,9 +33,9 @@ async function saveResponse(response, file) {
|
|
|
33
33
|
await new Promise((resolve, reject)=>external_stream_namespaceObject.Readable.fromWeb(response.body).pipe(writeable).on("close", resolve).on("error", reject));
|
|
34
34
|
}
|
|
35
35
|
exports.saveResponse = __webpack_exports__.saveResponse;
|
|
36
|
-
for(var
|
|
36
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
37
37
|
"saveResponse"
|
|
38
|
-
].indexOf(
|
|
38
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
39
39
|
Object.defineProperty(exports, '__esModule', {
|
|
40
40
|
value: true
|
|
41
41
|
});
|
|
@@ -13,7 +13,7 @@ var __webpack_require__ = {};
|
|
|
13
13
|
})();
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if (
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
17
|
value: 'Module'
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -68,11 +68,11 @@ function spawnAsync(command, args, options) {
|
|
|
68
68
|
exports.getDefaultOptions = __webpack_exports__.getDefaultOptions;
|
|
69
69
|
exports.setDefaultOptions = __webpack_exports__.setDefaultOptions;
|
|
70
70
|
exports.spawnAsync = __webpack_exports__.spawnAsync;
|
|
71
|
-
for(var
|
|
71
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
72
72
|
"getDefaultOptions",
|
|
73
73
|
"setDefaultOptions",
|
|
74
74
|
"spawnAsync"
|
|
75
|
-
].indexOf(
|
|
75
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
76
76
|
Object.defineProperty(exports, '__esModule', {
|
|
77
77
|
value: true
|
|
78
78
|
});
|
package/dist/utils/unzip.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -45,9 +45,9 @@ async function unzip({ input, output, cwd }) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
exports.unzip = __webpack_exports__.unzip;
|
|
48
|
-
for(var
|
|
48
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
49
49
|
"unzip"
|
|
50
|
-
].indexOf(
|
|
50
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
51
51
|
Object.defineProperty(exports, '__esModule', {
|
|
52
52
|
value: true
|
|
53
53
|
});
|
package/dist/utils/zip.cjs
CHANGED
|
@@ -22,7 +22,7 @@ var __webpack_require__ = {};
|
|
|
22
22
|
})();
|
|
23
23
|
(()=>{
|
|
24
24
|
__webpack_require__.r = (exports1)=>{
|
|
25
|
-
if (
|
|
25
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
26
26
|
value: 'Module'
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports1, '__esModule', {
|
|
@@ -51,9 +51,9 @@ async function zip({ input, output, thread = "auto", level, password, cwd, filte
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
exports.zip = __webpack_exports__.zip;
|
|
54
|
-
for(var
|
|
54
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
55
55
|
"zip"
|
|
56
|
-
].indexOf(
|
|
56
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
57
57
|
Object.defineProperty(exports, '__esModule', {
|
|
58
58
|
value: true
|
|
59
59
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soda-nodejs",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"which": "^5.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/node": "^24.
|
|
43
|
+
"@types/node": "^24.12.4",
|
|
44
44
|
"@types/which": "^3.0.4",
|
|
45
45
|
"typescript": ">=5.8.3"
|
|
46
46
|
},
|
package/src/utils/execAsync.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/* eslint-disable no-restricted-syntax */
|
|
2
|
+
|
|
1
3
|
import { exec, ExecOptions } from "child_process"
|
|
2
4
|
import { ObjectEncodingOptions } from "fs"
|
|
3
5
|
|
|
4
|
-
import iconv, {
|
|
6
|
+
import iconv, { type DecodeOptions as IconvLiteDecodeOptions } from "iconv-lite"
|
|
7
|
+
|
|
8
|
+
export { type DecodeOptions as IconvLiteDecodeOptions } from "iconv-lite"
|
|
5
9
|
|
|
6
10
|
export type IconvDecodeOptions = {
|
|
7
11
|
encoding: string
|
|
8
|
-
options?:
|
|
12
|
+
options?: IconvLiteDecodeOptions
|
|
9
13
|
}
|
|
10
14
|
|
|
11
15
|
export async function execAsync(command: string): Promise<string>
|
package/src/utils/isPathLike.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PathLike } from "fs"
|
|
2
|
-
|
|
3
|
-
export function isPathLike(path: unknown): path is PathLike {
|
|
4
|
-
return typeof path === "string" || path instanceof Buffer || path instanceof URL
|
|
5
|
-
}
|
|
1
|
+
import { PathLike } from "fs"
|
|
2
|
+
|
|
3
|
+
export function isPathLike(path: unknown): path is PathLike {
|
|
4
|
+
return typeof path === "string" || path instanceof Buffer || path instanceof URL
|
|
5
|
+
}
|
package/src/utils/unzip.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import which from "which"
|
|
2
|
-
|
|
3
|
-
import { execAsync } from "./execAsync"
|
|
4
|
-
|
|
5
|
-
export type UnzipOptions = {
|
|
6
|
-
/**
|
|
7
|
-
* 要解压的文件
|
|
8
|
-
*/
|
|
9
|
-
input: string
|
|
10
|
-
/**
|
|
11
|
-
* 解压到的目标文件夹位置
|
|
12
|
-
*/
|
|
13
|
-
output: string
|
|
14
|
-
/**
|
|
15
|
-
* 压缩文件时的工作目录
|
|
16
|
-
*/
|
|
17
|
-
cwd?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 使用 7z 命令解压文件
|
|
22
|
-
* - 如果没有安装 7z,请先安装 7z 后再执行
|
|
23
|
-
* - 下载地址:https://www.7-zip.org/download.html
|
|
24
|
-
* - 如果已经安装,请按照以下步骤将 7z 添加到环境变量中
|
|
25
|
-
* 1. 设置 → 系统 → 右侧系统信息 → 高级系统设置 → 环境变量
|
|
26
|
-
* 2. 在系统变量中找到并选中 Path,点击编辑
|
|
27
|
-
* 3. 点击新建,输入 7z 的安装路径(默认是 C:\Program Files\7-Zip),点击确定
|
|
28
|
-
* 4. 重启终端,输入 7z,如果出现 7z 的版本信息,则安装成功
|
|
29
|
-
* 5. 如果没有出现版本信息,请重启电脑,或者检查 7z 的安装路径是否正确
|
|
30
|
-
*/
|
|
31
|
-
export async function unzip({ input, output, cwd }: UnzipOptions) {
|
|
32
|
-
await which("7z")
|
|
33
|
-
return await execAsync(`7z x ${input} -o${output}`, { cwd })
|
|
34
|
-
}
|
|
1
|
+
import which from "which"
|
|
2
|
+
|
|
3
|
+
import { execAsync } from "./execAsync"
|
|
4
|
+
|
|
5
|
+
export type UnzipOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* 要解压的文件
|
|
8
|
+
*/
|
|
9
|
+
input: string
|
|
10
|
+
/**
|
|
11
|
+
* 解压到的目标文件夹位置
|
|
12
|
+
*/
|
|
13
|
+
output: string
|
|
14
|
+
/**
|
|
15
|
+
* 压缩文件时的工作目录
|
|
16
|
+
*/
|
|
17
|
+
cwd?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 使用 7z 命令解压文件
|
|
22
|
+
* - 如果没有安装 7z,请先安装 7z 后再执行
|
|
23
|
+
* - 下载地址:https://www.7-zip.org/download.html
|
|
24
|
+
* - 如果已经安装,请按照以下步骤将 7z 添加到环境变量中
|
|
25
|
+
* 1. 设置 → 系统 → 右侧系统信息 → 高级系统设置 → 环境变量
|
|
26
|
+
* 2. 在系统变量中找到并选中 Path,点击编辑
|
|
27
|
+
* 3. 点击新建,输入 7z 的安装路径(默认是 C:\Program Files\7-Zip),点击确定
|
|
28
|
+
* 4. 重启终端,输入 7z,如果出现 7z 的版本信息,则安装成功
|
|
29
|
+
* 5. 如果没有出现版本信息,请重启电脑,或者检查 7z 的安装路径是否正确
|
|
30
|
+
*/
|
|
31
|
+
export async function unzip({ input, output, cwd }: UnzipOptions) {
|
|
32
|
+
await which("7z")
|
|
33
|
+
return await execAsync(`7z x ${input} -o${output}`, { cwd })
|
|
34
|
+
}
|