[SDK] Pure ESM (#18427)
# Introduction While testing the sdk and overall apps in https://github.com/prastoin/twenty-app-hello-world Faced a lot of pure `CJS` external dependencies import issue Replaced all the cjs deps to either esm equivalent or node native replacement
This commit is contained in:
+4
-3
@@ -1,8 +1,9 @@
|
||||
import { AppDevCommand } from '@/cli/commands/app/app-dev';
|
||||
import * as fs from 'fs-extra';
|
||||
import { join } from 'path';
|
||||
import { OUTPUT_DIR } from 'twenty-shared/application';
|
||||
|
||||
import { AppDevCommand } from '@/cli/commands/app/app-dev';
|
||||
import { pathExists } from '@/cli/utilities/file/fs-utils';
|
||||
|
||||
export type RunAppDevResult = {
|
||||
success: boolean;
|
||||
events?: { message: string; status: string }[];
|
||||
@@ -23,7 +24,7 @@ export const runAppDevInProcess = async (options: {
|
||||
const startTime = Date.now();
|
||||
|
||||
while (Date.now() - startTime < timeout) {
|
||||
if (await fs.pathExists(manifestPath)) {
|
||||
if (await pathExists(manifestPath)) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||
await command.close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user