Skip to content

Commit 0e9ae2b

Browse files
committed
fix(angular-mcp-server): builder import fix
1 parent a516abf commit 0e9ae2b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/angular-mcp-server/src/lib/tools/ds/component-contract/builder/build-component-contract.tool.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { buildComponentContract } from './utils/build-contract.js';
77
import { generateContractSummary } from '../shared/utils/contract-file-ops.js';
88
import { ContractResult } from './models/types.js';
99
import { resolveCrossPlatformPath } from '../../shared/utils/cross-platform-path.js';
10+
import { createHash } from 'node:crypto';
1011

1112
interface BuildComponentContractOptions extends BaseHandlerOptions {
1213
saveLocation: string;
@@ -52,10 +53,7 @@ export const buildComponentContractHandler = createHandler<
5253
);
5354

5455
const contractString = JSON.stringify(contract, null, 2);
55-
const hash = require('node:crypto')
56-
.createHash('sha256')
57-
.update(contractString)
58-
.digest('hex');
56+
const hash = createHash('sha256').update(contractString).digest('hex');
5957

6058
const effectiveSaveLocation = resolveCrossPlatformPath(cwd, saveLocation);
6159

0 commit comments

Comments
 (0)