Skip to content

Commit 11469d8

Browse files
CLI/Web: Update fallback directory for embedded world (#291)
1 parent 6373ab5 commit 11469d8

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.changeset/crazy-days-agree.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@workflow/cli": patch
3+
"@workflow/web": patch
4+
---
5+
6+
Update default fallback path for connecting to local world

packages/cli/src/lib/inspect/env.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ const possibleWorkflowDataPaths = [
5454
];
5555

5656
async function findWorkflowDataDir(cwd: string) {
57-
for (const path of possibleWorkflowDataPaths) {
57+
const paths = [
58+
...possibleWorkflowDataPaths,
59+
// This will be the case for testing CLI/Web from the CLI/Web
60+
// package folders directly
61+
'../../workbench/nextjs-turbopack/.next/workflow-data',
62+
];
63+
for (const path of paths) {
5864
const fullPath = join(cwd, path);
5965
if (
6066
await access(fullPath)

packages/web/src/lib/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { WorldConfig } from '@/lib/config-world';
88
// Default configuration
99
const DEFAULT_CONFIG: WorldConfig = {
1010
backend: 'embedded',
11-
dataDir: '../../workbench/nextjs-turbopack/.next/workflow-data',
11+
dataDir: './.next/workflow-data',
1212
port: '3000',
1313
env: 'production',
1414
};

0 commit comments

Comments
 (0)