Browse Source

feat(nocodb): add waitForStreamClose to pluginUtils

pull/4219/head
Wing-Kam Wong 2 years ago
parent
commit
97e73b5df1
  1. 12
      packages/nocodb/src/lib/utils/pluginUtils.ts

12
packages/nocodb/src/lib/utils/pluginUtils.ts

@ -0,0 +1,12 @@
import fs from 'fs';
export async function waitForStreamClose(
stream: fs.WriteStream
): Promise<void> {
stream.end();
return new Promise((resolve) => {
stream.once('finish', () => {
resolve();
});
});
}
Loading…
Cancel
Save