zero-tools 1.4.1 → 1.4.4
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/bin.ts +1 -1
- package/dist/bin.js +1 -1
- package/dist/tinify.js +3 -3
- package/package.json +2 -2
- package/tinify.ts +3 -3
package/bin.ts
CHANGED
package/dist/bin.js
CHANGED
package/dist/tinify.js
CHANGED
|
@@ -179,7 +179,7 @@ var TaskParser = /** @class */ (function () {
|
|
|
179
179
|
if (!_a) return [3 /*break*/, 6];
|
|
180
180
|
return [3 /*break*/, 15];
|
|
181
181
|
case 6:
|
|
182
|
-
pathKey = inPath.replace("
|
|
182
|
+
pathKey = inPath.replace("/\\/g", "/");
|
|
183
183
|
doc = this.info[pathKey];
|
|
184
184
|
if (!(doc == null)) return [3 /*break*/, 9];
|
|
185
185
|
//没有记录
|
|
@@ -238,8 +238,8 @@ var TaskParser = /** @class */ (function () {
|
|
|
238
238
|
outMd5 = md5Hash.update(outBuffer).digest('hex');
|
|
239
239
|
this.witeBuffer(outPath, outBuffer);
|
|
240
240
|
console.log(inMd5, outMd5);
|
|
241
|
-
pathKey = inPath.replace("
|
|
242
|
-
outPath = outPath.replace("
|
|
241
|
+
pathKey = inPath.replace("/\\/g", "/");
|
|
242
|
+
outPath = outPath.replace("/\\/g", "/");
|
|
243
243
|
this.info[pathKey] = { outPath: outPath, inMd5: inMd5, outMd5: outMd5 };
|
|
244
244
|
this.saveInfo();
|
|
245
245
|
this.count++;
|
package/package.json
CHANGED
package/tinify.ts
CHANGED
|
@@ -79,7 +79,7 @@ export class TaskParser {
|
|
|
79
79
|
if (this.config.skipSpine && await this.isSpine(inPath)) {
|
|
80
80
|
} else {
|
|
81
81
|
// let doc = await this.db.findOne({ inPath })
|
|
82
|
-
let pathKey = inPath.replace("
|
|
82
|
+
let pathKey = inPath.replace("/\\/g", "/")
|
|
83
83
|
let doc = this.info[pathKey]
|
|
84
84
|
|
|
85
85
|
if (doc == null) {
|
|
@@ -116,8 +116,8 @@ export class TaskParser {
|
|
|
116
116
|
this.witeBuffer(outPath, outBuffer)
|
|
117
117
|
console.log(inMd5, outMd5)
|
|
118
118
|
// await this.db.updateOne({ inPath }, { inPath, outPath, inMd5, outMd5 }, { upsert: true })
|
|
119
|
-
let pathKey = inPath.replace("
|
|
120
|
-
outPath = outPath.replace("
|
|
119
|
+
let pathKey = inPath.replace("/\\/g", "/")
|
|
120
|
+
outPath = outPath.replace("/\\/g", "/")
|
|
121
121
|
this.info[pathKey] = { outPath, inMd5, outMd5 }
|
|
122
122
|
this.saveInfo()
|
|
123
123
|
this.count++
|