tmcsplit 0.0.10 → 0.0.12
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/libtmcsplit/fs-worker.js +1 -0
- package/dist/libtmcsplit/index.html +31 -0
- package/dist/libtmcsplit/libtmcsplit.js +1 -0
- package/dist/tmcsplit/fs-worker.js +1 -0
- package/dist/tmcsplit/index.html +31 -0
- package/dist/tmcsplit/tmcsplit.js +2 -0
- package/eslint.config.mjs +12 -11
- package/fs-worker.webpack.config.cjs +21 -3
- package/libtmcsplit +51 -18
- package/libtmcsplit.webpack.config.cjs +7 -12
- package/package.json +14 -14
- package/webpack.config.cjs +10 -13
- package/fs-worker.js +0 -1
- package/tmcsplit.js +0 -2
package/libtmcsplit
CHANGED
|
@@ -33,37 +33,61 @@
|
|
|
33
33
|
"local" } ] */
|
|
34
34
|
|
|
35
35
|
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
_split_file =
|
|
41
|
-
_split_file_module._split_file;
|
|
42
|
-
const
|
|
43
|
-
_split_file_by_size =
|
|
44
|
-
_split_file_module._split_file_by_size;
|
|
36
|
+
_libcrash_module =
|
|
37
|
+
await import(
|
|
38
|
+
"libcrash-js");
|
|
45
39
|
const
|
|
46
40
|
_libcrash =
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
_libcrash_module.default;
|
|
42
|
+
/* global
|
|
43
|
+
_basename */
|
|
49
44
|
const
|
|
50
45
|
_basename =
|
|
51
46
|
_libcrash._basename;
|
|
47
|
+
/* global
|
|
48
|
+
_dirname */
|
|
52
49
|
const
|
|
53
50
|
_dirname =
|
|
54
51
|
_libcrash._dirname;
|
|
52
|
+
/* global
|
|
53
|
+
_ls */
|
|
55
54
|
const
|
|
56
55
|
_ls =
|
|
57
56
|
_libcrash._ls;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_libcrash._msg_info;
|
|
57
|
+
/* global
|
|
58
|
+
_msg_error */
|
|
61
59
|
const
|
|
62
60
|
_msg_error =
|
|
63
61
|
_libcrash._msg_error;
|
|
62
|
+
/* global
|
|
63
|
+
_msg_info */
|
|
64
|
+
const
|
|
65
|
+
_msg_info =
|
|
66
|
+
_libcrash._msg_info;
|
|
67
|
+
/* global
|
|
68
|
+
_mv */
|
|
64
69
|
const
|
|
65
70
|
_mv =
|
|
66
71
|
_libcrash._mv;
|
|
72
|
+
/* global
|
|
73
|
+
_require */
|
|
74
|
+
const
|
|
75
|
+
_require =
|
|
76
|
+
_libcrash._require;
|
|
77
|
+
const
|
|
78
|
+
_split_file_module =
|
|
79
|
+
await _require(
|
|
80
|
+
"split-file");
|
|
81
|
+
/* global
|
|
82
|
+
_split_file */
|
|
83
|
+
const
|
|
84
|
+
_split_file =
|
|
85
|
+
_split_file_module._split_file;
|
|
86
|
+
/* global
|
|
87
|
+
_split_file_by_size */
|
|
88
|
+
const
|
|
89
|
+
_split_file_by_size =
|
|
90
|
+
_split_file_module._split_file_by_size;
|
|
67
91
|
|
|
68
92
|
async function
|
|
69
93
|
_output_files_get(
|
|
@@ -105,7 +129,8 @@ async function
|
|
|
105
129
|
`${_input_file}.sf-part${_part_no}`,
|
|
106
130
|
_output_file
|
|
107
131
|
];
|
|
108
|
-
_mv(
|
|
132
|
+
_mv.apply(
|
|
133
|
+
null,
|
|
109
134
|
_mv_args);
|
|
110
135
|
_output_files.push(
|
|
111
136
|
_output_file);
|
|
@@ -160,7 +185,15 @@ async function
|
|
|
160
185
|
return _output_files;
|
|
161
186
|
}
|
|
162
187
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
188
|
+
// ES exports
|
|
189
|
+
|
|
190
|
+
export {
|
|
191
|
+
_split
|
|
166
192
|
};
|
|
193
|
+
|
|
194
|
+
// Common Javascript exports
|
|
195
|
+
|
|
196
|
+
// module.exports = {
|
|
197
|
+
// _split:
|
|
198
|
+
// _split
|
|
199
|
+
// };
|
|
@@ -47,13 +47,9 @@ const
|
|
|
47
47
|
_output_file_name
|
|
48
48
|
};
|
|
49
49
|
const
|
|
50
|
-
|
|
50
|
+
_node_fs_ignore =
|
|
51
51
|
{ resourceRegExp:
|
|
52
|
-
/^
|
|
53
|
-
const
|
|
54
|
-
_web_worker_ignore =
|
|
55
|
-
{ resourceRegExp:
|
|
56
|
-
/^web-worker$/ };
|
|
52
|
+
/^node:fs$/ };
|
|
57
53
|
const
|
|
58
54
|
_yargs_ignore =
|
|
59
55
|
{ resourceRegExp:
|
|
@@ -70,13 +66,9 @@ const
|
|
|
70
66
|
_ignore_plugin =
|
|
71
67
|
_webpack.IgnorePlugin;
|
|
72
68
|
const
|
|
73
|
-
|
|
69
|
+
_node_fs_ignore_plugin =
|
|
74
70
|
new _ignore_plugin(
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
_web_worker_ignore_plugin =
|
|
78
|
-
new _ignore_plugin(
|
|
79
|
-
_web_worker_ignore);
|
|
71
|
+
_node_fs_ignore);
|
|
80
72
|
const
|
|
81
73
|
_yargs_ignore_plugin =
|
|
82
74
|
new _ignore_plugin(
|
|
@@ -121,6 +113,8 @@ module.exports = {
|
|
|
121
113
|
'node_modules/yargs-parser/browser.mjs'),
|
|
122
114
|
},
|
|
123
115
|
fallback: {
|
|
116
|
+
"node:fs":
|
|
117
|
+
false,
|
|
124
118
|
"utils":
|
|
125
119
|
false,
|
|
126
120
|
"web-worker":
|
|
@@ -135,6 +129,7 @@ module.exports = {
|
|
|
135
129
|
{ yargs:
|
|
136
130
|
'yargs' },
|
|
137
131
|
plugins: [
|
|
132
|
+
_node_fs_ignore_plugin,
|
|
138
133
|
_yargs_ignore_plugin,
|
|
139
134
|
_yargs_helpers_ignore_plugin
|
|
140
135
|
]
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name":
|
|
3
3
|
"tmcsplit",
|
|
4
4
|
"version":
|
|
5
|
-
"0.0.
|
|
5
|
+
"0.0.12",
|
|
6
6
|
"description":
|
|
7
7
|
"Basic Javascript implementation of GNU Split.",
|
|
8
8
|
"funding": {
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"AUTHORS.rst",
|
|
18
18
|
"COPYING",
|
|
19
19
|
"README.md",
|
|
20
|
+
"dist",
|
|
20
21
|
"eslint.config.mjs",
|
|
21
22
|
"package.json",
|
|
22
|
-
"tmcsplit.js",
|
|
23
23
|
"tmcsplit",
|
|
24
|
-
"fs-worker.js",
|
|
25
24
|
"fs-worker.webpack.config.cjs",
|
|
26
25
|
"index.html",
|
|
27
26
|
"serve.json",
|
|
27
|
+
"libtmcsplit",
|
|
28
28
|
"libtmcsplit.webpack.config.cjs",
|
|
29
29
|
"webpack.config.cjs"
|
|
30
30
|
],
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"crash-js-webpack":
|
|
60
|
-
"^0.0.
|
|
60
|
+
"^0.0.56",
|
|
61
61
|
"eslint":
|
|
62
62
|
"^10.0.3",
|
|
63
63
|
"globals":
|
|
@@ -65,20 +65,20 @@
|
|
|
65
65
|
"@eslint/js":
|
|
66
66
|
"^10.0.1",
|
|
67
67
|
"safely-serve":
|
|
68
|
-
"^0.0.
|
|
68
|
+
"^0.0.14",
|
|
69
69
|
"webpack":
|
|
70
|
-
"^5.
|
|
70
|
+
"^5.109.2",
|
|
71
71
|
"webpack-cli":
|
|
72
|
-
"^
|
|
72
|
+
"^7.2.2"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"
|
|
76
|
-
"
|
|
75
|
+
"libcrash-js":
|
|
76
|
+
"npm:crash-js@^11.1000000000000001.1000000000000001",
|
|
77
77
|
"split-file":
|
|
78
78
|
"npm:@themartiancompany/split-file@2.3.15"
|
|
79
79
|
},
|
|
80
80
|
"type":
|
|
81
|
-
"
|
|
81
|
+
"module",
|
|
82
82
|
"main":
|
|
83
83
|
"libtmcsplit",
|
|
84
84
|
"bin":
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"tmcsplit" },
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build-fs-worker":
|
|
89
|
-
"npx webpack --mode 'production' --config 'fs-worker.webpack.config.cjs' --stats-error-details",
|
|
89
|
+
"npx webpack --mode 'production' --config 'fs-worker.webpack.config.cjs' --stats-error-details && cp 'fs-worker.js' 'dist/libtmcsplit' && cp 'fs-worker.js' 'dist/tmcsplit'",
|
|
90
90
|
"build-lib":
|
|
91
|
-
"npx webpack --mode 'production' --config 'libtmcsplit.webpack.config.cjs' --stats-error-details",
|
|
91
|
+
"npx webpack --mode 'production' --config 'libtmcsplit.webpack.config.cjs' --stats-error-details && cp 'libtmcsplit.js' 'dist/libtmcsplit'",
|
|
92
92
|
"build-bin":
|
|
93
|
-
"npx webpack --mode 'production' --config 'webpack.config.cjs' --stats-error-details",
|
|
93
|
+
"npx webpack --mode 'production' --config 'webpack.config.cjs' --stats-error-details&& cp 'tmcsplit.js' 'dist/tmcsplit'",
|
|
94
94
|
"build":
|
|
95
95
|
"npm run build-fs-worker && npm run build-lib && npm run build-bin",
|
|
96
96
|
"lint":
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"publish-npm":
|
|
99
99
|
"npm lint && npm run build && npm publish --access public",
|
|
100
100
|
"start":
|
|
101
|
-
"npx safely-serve
|
|
101
|
+
"npx safely-serve 'dist/tmcsplit'",
|
|
102
102
|
"test":
|
|
103
103
|
"echo \"Error: no test specified\" && exit 1"
|
|
104
104
|
}
|
package/webpack.config.cjs
CHANGED
|
@@ -47,13 +47,9 @@ const
|
|
|
47
47
|
_output_file_name
|
|
48
48
|
};
|
|
49
49
|
const
|
|
50
|
-
|
|
50
|
+
_node_fs_ignore =
|
|
51
51
|
{ resourceRegExp:
|
|
52
|
-
/^
|
|
53
|
-
const
|
|
54
|
-
_web_worker_ignore =
|
|
55
|
-
{ resourceRegExp:
|
|
56
|
-
/^web-worker$/ };
|
|
52
|
+
/^node:fs$/ };
|
|
57
53
|
const
|
|
58
54
|
_yargs_ignore =
|
|
59
55
|
{ resourceRegExp:
|
|
@@ -70,13 +66,9 @@ const
|
|
|
70
66
|
_ignore_plugin =
|
|
71
67
|
_webpack.IgnorePlugin;
|
|
72
68
|
const
|
|
73
|
-
|
|
74
|
-
new _ignore_plugin(
|
|
75
|
-
_utils_ignore);
|
|
76
|
-
const
|
|
77
|
-
_web_worker_ignore_plugin =
|
|
69
|
+
_node_fs_ignore_plugin =
|
|
78
70
|
new _ignore_plugin(
|
|
79
|
-
|
|
71
|
+
_node_fs_ignore);
|
|
80
72
|
const
|
|
81
73
|
_yargs_ignore_plugin =
|
|
82
74
|
new _ignore_plugin(
|
|
@@ -98,7 +90,11 @@ module.exports = {
|
|
|
98
90
|
"fs":
|
|
99
91
|
_path.resolve(
|
|
100
92
|
__dirname,
|
|
101
|
-
'node_modules/
|
|
93
|
+
'node_modules/tmcfs/fs'),
|
|
94
|
+
"opfs":
|
|
95
|
+
_path.resolve(
|
|
96
|
+
__dirname,
|
|
97
|
+
'node_modules/opfs/opfs'),
|
|
102
98
|
"path":
|
|
103
99
|
_path.resolve(
|
|
104
100
|
__dirname,
|
|
@@ -135,6 +131,7 @@ module.exports = {
|
|
|
135
131
|
{ yargs:
|
|
136
132
|
'yargs' },
|
|
137
133
|
plugins: [
|
|
134
|
+
_node_fs_ignore_plugin,
|
|
138
135
|
_yargs_ignore_plugin,
|
|
139
136
|
_yargs_helpers_ignore_plugin
|
|
140
137
|
]
|
package/fs-worker.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=_opfs_module_auto_detect();else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
|