Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
habdelra committed May 13, 2024
1 parent eae67a0 commit 4aeeb10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/host/app/lib/current-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ export class CurrentRun {
deferred: Deferred<void>,
) {
console.log(
`updating index entry: ${instanceURL.href}. db-indexer-enabled=${isDbIndexerEnabled}`,
`updating index entry: ${
instanceURL.href
}. db-indexer-enabled=${isDbIndexerEnabled()}`,
);
if (isDbIndexerEnabled()) {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/realm-server/fastboot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
type RunnerOpts,
} from '@cardstack/runtime-common/search-index';
import { JSDOM } from 'jsdom';
import { type ErrorReporter } from '@cardstack/runtime-common/realm';
import { type ErrorReporter } from '@cardstack/runtime-common/error';

const appName = '@cardstack/host';
export async function makeFastBootIndexRunner(
Expand Down
7 changes: 7 additions & 0 deletions packages/realm-server/node-realm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ export class NodeAdapter implements RealmAdapter {
ensureDirSync(path);
}
let absolutePath = join(this.realmDir, path);
console.log(`reading directory: ${absolutePath}`);
let entries = readdirSync(absolutePath, { withFileTypes: true });
console.log(
`directory entries for ${absolutePath}: ${entries
.map((e) => join(path, e.name))
.join(', ')}`,
);
for await (let entry of entries) {
let isDirectory = entry.isDirectory();
let isFile = entry.isFile();
Expand Down Expand Up @@ -91,6 +97,7 @@ export class NodeAdapter implements RealmAdapter {

async openFile(path: string): Promise<FileRef | undefined> {
let absolutePath = join(this.realmDir, path);
console.log(`reading file: ${absolutePath}`);
if (!existsSync(absolutePath)) {
return undefined;
}
Expand Down

0 comments on commit 4aeeb10

Please sign in to comment.