Skip to content

Commit

Permalink
fix: eliminate the need for json import
Browse files Browse the repository at this point in the history
  • Loading branch information
npenin committed Aug 3, 2024
1 parent 60e9735 commit 5d5af48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/pm/src/fork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { program, buildCliContextFromProcess, ErrorMessage, NamespaceMiddleware
import { Stats } from 'fs';
import { registerCommands, SelfDefinedCommand, parseMetadata, StructuredParameters } from '@akala/commands';
import { fileURLToPath } from 'url';
import commands from './container.js';

var isPm = false;

Expand Down Expand Up @@ -113,7 +114,7 @@ program.option<string, 'program'>('program', { needsValue: true, normalize: true
if (!isPm)
{
//eslint-disable-next-line @typescript-eslint/no-var-requires
const pmMeta = await import(new URL('../../commands.json', import.meta.url).toString());
const pmMeta = commands.meta;
if (process.connected)
{
pm = new ac.Container('pm', null, new ac.Processors.JsonRpc(ac.Processors.JsonRpc.getConnection(new IpcAdapter(process), cliContainer))) as ac.Container<unknown> & pmDef.container;
Expand Down

0 comments on commit 5d5af48

Please sign in to comment.