reiji-h 1 год назад
Родитель
Сommit
4c7db971b8

+ 6 - 6
apps/app/src/migrations/20211227060705-revision-path-to-page-id-schema-migration--fixed-7549.js

@@ -63,13 +63,13 @@ module.exports = {
       })
       .pipe(batchStrem)
       .on('error', () => {
-        pagesStream.destory();
+        pagesStream.destroy();
         migratePagesStream.end();
       })
       .pipe(migratePagesStream)
       .on('error', () => {
-        pagesStream.destory();
-        batchStrem.destory();
+        pagesStream.destroy();
+        batchStrem.destroy();
       });
 
     await streamToPromise(migratePagesStream);
@@ -126,13 +126,13 @@ module.exports = {
       })
       .pipe(batchStrem)
       .on('error', () => {
-        pagesStream.destory();
+        pagesStream.destroy();
         migratePagesStream.end();
       })
       .pipe(migratePagesStream)
       .on('error', () => {
-        pagesStream.destory();
-        batchStrem.destory();
+        pagesStream.destroy();
+        batchStrem.destroy();
       });
 
     await streamToPromise(migratePagesStream);

+ 1 - 1
apps/app/src/server/service/import/import.ts

@@ -407,7 +407,7 @@ export class ImportService {
         entry
           .on('error', () => { writeStream.end() })
           .pipe(writeStream)
-          .on('error', () => { entry.destory() });
+          .on('error', () => { entry.destroy() });
         files.push(jsonFile);
       }
     });

+ 7 - 7
apps/app/src/server/service/page/index.ts

@@ -1588,12 +1588,12 @@ class PageService implements IPageService {
       })
       .pipe(batchStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         writeStream.end();
       })
       .pipe(writeStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         batchStream.destroy();
       });
 
@@ -1932,12 +1932,12 @@ class PageService implements IPageService {
       })
       .pipe(batchStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         writeStream.end();
       })
       .pipe(writeStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         batchStream.destroy();
       });
 
@@ -2209,12 +2209,12 @@ class PageService implements IPageService {
       })
       .pipe(batchStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         writeStream.end();
       })
       .pipe(writeStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         batchStream.destroy();
       });
 
@@ -2639,7 +2639,7 @@ class PageService implements IPageService {
       })
       .pipe(batchStream)
       .on('error', () => {
-        readStream.destory();
+        readStream.destroy();
         writeStream.end();
       })
       .pipe(writeStream)