Skip to content

Commit 2b9d9fb

Browse files
committed
fix npx azle generate command to use the new @icp-sdk/core imports instead of @dfinity
1 parent 77f8331 commit 2b9d9fb

File tree

1 file changed

+4
-2
lines changed
  • src/stable/build/commands/generate

1 file changed

+4
-2
lines changed

src/stable/build/commands/generate/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import { candid_to_ts_js } from './rust/candid_to_ts_js/pkg/candid_to_ts_js';
1515
*/
1616
export async function runCommand(candidPath: string): Promise<void> {
1717
const candid = await readFile(candidPath, 'utf-8');
18-
const result = candid_to_ts_js(candid);
18+
const result = candid_to_ts_js(candid) as string;
19+
// TODO remove this replacement once the candid JavaScript and TypeScript bindings are updated with @icp-sdk/core instead of @dfinity
20+
const updatedResult = result.replaceAll('@dfinity/', '@icp-sdk/core/');
1921

20-
process.stdout.write(result);
22+
process.stdout.write(updatedResult);
2123
}

0 commit comments

Comments
 (0)