bm2 1.0.35 → 1.0.37

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/src/types.ts CHANGED
@@ -155,6 +155,7 @@ export interface StartOptions {
155
155
 
156
156
  export interface EcosystemConfig {
157
157
  apps: StartOptions[];
158
+ noDaemon?: boolean;
158
159
  deploy?: Record<string, DeployConfig>;
159
160
  }
160
161
 
package/src/utils.ts CHANGED
@@ -14,18 +14,18 @@
14
14
  * Author: Zak <zak@maxxpainn.com>
15
15
  */
16
16
 
17
- import { mkdirSync, existsSync } from "fs";
18
17
  import { join } from "path";
19
18
  import { ALL_DIRS, BM2_HOME } from "./constants";
19
+ import { mkdir } from "fs/promises";
20
20
 
21
21
  export const DUMP_FILE = join(BM2_HOME, "dump.json");
22
22
 
23
- export function ensureDirs() {
24
- for (const dir of ALL_DIRS) {
25
- if (!existsSync(dir)) {
26
- mkdirSync(dir, { recursive: true });
27
- }
28
- }
23
+ export async function ensureDirs() {
24
+ await Promise.all(
25
+ ALL_DIRS.map(async (dir) => {
26
+ await mkdir(dir, { recursive: true });
27
+ })
28
+ );
29
29
  }
30
30
 
31
31
  export function parseMemory(value: string | number): number {