big fixes

fixes feedback from thecodacus
This commit is contained in:
Stijnus
2025-01-30 17:17:36 +01:00
parent d9a380f28a
commit d1d23d80e7
68 changed files with 2449 additions and 1350 deletions

View File

@@ -1,6 +1,6 @@
import { WebContainer } from '@webcontainer/api';
import type { WebContainer } from '@webcontainer/api';
import { path } from '~/utils/path';
import { atom, map, type MapStore } from 'nanostores';
import * as nodePath from 'node:path';
import type { ActionAlert, BoltAction } from '~/types/actions';
import { createScopedLogger } from '~/utils/logger';
import { unreachable } from '~/utils/unreachable';
@@ -276,9 +276,9 @@ export class ActionRunner {
}
const webcontainer = await this.#webcontainer;
const relativePath = nodePath.relative(webcontainer.workdir, action.filePath);
const relativePath = path.relative(webcontainer.workdir, action.filePath);
let folder = nodePath.dirname(relativePath);
let folder = path.dirname(relativePath);
// remove trailing slashes
folder = folder.replace(/\/+$/g, '');