From a78d891065db6936bb2b8227ee3402469fd6fd29 Mon Sep 17 00:00:00 2001 From: BenRey Date: Wed, 29 May 2024 14:15:38 +0200 Subject: [PATCH] fix path --- packages/massa-web3/package.json | 6 +++--- .../massa-web3/src/deployerGeneration/generate-deployer.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/massa-web3/package.json b/packages/massa-web3/package.json index 4edf140c..0f424d23 100644 --- a/packages/massa-web3/package.json +++ b/packages/massa-web3/package.json @@ -13,9 +13,9 @@ "build-esm": "tsc --project tsconfig.esm.json", "build-commonjs": "tsc --project tsconfig.commonjs.json", "build": "npm-run-all clean-dist build-*", - "generate:client": "open-rpc-generator generate -c open_rpc/openrpc.config.json && mv tmp/client/typescript/src/index.ts src/experimental/generated/client.ts && rm -r tmp", - "generate:test": "ts-interface-builder src/experimental/generated/client.ts", - "generate:deployer": "ts-node ./deployer_generation/generate-deployer.ts", + "generate:client": "open-rpc-generator generate -c open_rpc/openrpc.config.json && mv tmp/client/typescript/src/index.ts src/generated/client.ts && rm -r tmp", + "generate:test": "ts-interface-builder src/generated/client.ts", + "generate:deployer": "ts-node src/deployerGeneration/generate-deployer.ts", "generate": "npm-run-all generate:*", "test": "jest --detectOpenHandles --forceExit ./test/unit", "test:cov": "jest --detectOpenHandles --coverage --forceExit", diff --git a/packages/massa-web3/src/deployerGeneration/generate-deployer.ts b/packages/massa-web3/src/deployerGeneration/generate-deployer.ts index faf719c5..c682dc81 100644 --- a/packages/massa-web3/src/deployerGeneration/generate-deployer.ts +++ b/packages/massa-web3/src/deployerGeneration/generate-deployer.ts @@ -1,6 +1,7 @@ import path from 'path' import fs from 'fs' +console.log('Generating deployer bytecode...') function populateDeployer(src?: string, dst?: string): void { const wasmPath = src ?? path.join(__dirname, 'deployer.wasm') const wasmData = fs.readFileSync(wasmPath) @@ -8,7 +9,7 @@ function populateDeployer(src?: string, dst?: string): void { const output = `export const deployer: Uint8Array = new Uint8Array([${[...wasmData]}]);\n` const outputDir = - dst ?? path.join(__dirname, '../src/generated/deployer-bytecode.ts') + dst ?? path.join(__dirname, '../generated/deployer-bytecode.ts') fs.writeFileSync(outputDir, output) }