From 06e72a16fd5dee9f8d7576feaa2393a7d7d415bd Mon Sep 17 00:00:00 2001 From: Michael Weichert Date: Tue, 29 Oct 2024 12:42:55 -0400 Subject: [PATCH] Fixes #1939, simulation task execution not displaying result or error message --- lerna.json | 2 +- package.json | 2 +- taqueria-analytics/package.json | 2 +- taqueria-lib-ligo/compile-all.ts | 2 +- taqueria-lib-ligo/package.json | 2 +- taqueria-plugin-archetype/package.json | 2 +- taqueria-plugin-contract-types/package.json | 2 +- taqueria-plugin-core/package.json | 2 +- taqueria-plugin-flextesa/package.json | 2 +- taqueria-plugin-helloworld/package.json | 2 +- taqueria-plugin-ipfs-pinata/package.json | 2 +- taqueria-plugin-jest/package.json | 2 +- taqueria-plugin-ligo-legacy/package.json | 2 +- taqueria-plugin-ligo/package.json | 2 +- taqueria-plugin-metadata/package.json | 2 +- taqueria-plugin-mock/package.json | 2 +- taqueria-plugin-octez-client/common.ts | 2 +- taqueria-plugin-octez-client/package.json | 2 +- taqueria-plugin-octez-client/simulate.ts | 6 ++++++ taqueria-plugin-smartpy-legacy/package.json | 2 +- taqueria-plugin-smartpy/package.json | 2 +- taqueria-plugin-taquito/package.json | 2 +- taqueria-plugin-tezbox/package.json | 2 +- taqueria-plugin-tzcompose/package.json | 2 +- taqueria-protocol/package.json | 2 +- taqueria-sdk/index.ts | 8 +++++--- taqueria-sdk/package.json | 2 +- taqueria-toolkit/package.json | 2 +- taqueria-vscode-extension-web-ui/package.json | 2 +- taqueria-vscode-extension/package.json | 2 +- tests/package.json | 2 +- 31 files changed, 40 insertions(+), 32 deletions(-) diff --git a/lerna.json b/lerna.json index 71afb15f9..747543c19 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "0.62.0", + "version": "0.62.1", "packages": [ "taqueria-protocol", "taqueria-lib*", diff --git a/package.json b/package.json index b23644df6..87a02b8d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/root", - "version": "0.62.0", + "version": "0.62.1", "description": "An easy to use opinionated tool for building, testing, and deploying Tezos software", "main": "index.ts", "directories": { diff --git a/taqueria-analytics/package.json b/taqueria-analytics/package.json index 601298d13..287f36d28 100644 --- a/taqueria-analytics/package.json +++ b/taqueria-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/analytics", - "version": "0.62.0", + "version": "0.62.1", "description": "A TypeScript SDK submitting events for Taqueria activity", "main": "./index.js", "source": "./index.ts", diff --git a/taqueria-lib-ligo/compile-all.ts b/taqueria-lib-ligo/compile-all.ts index ab6430f19..1e3cd707a 100644 --- a/taqueria-lib-ligo/compile-all.ts +++ b/taqueria-lib-ligo/compile-all.ts @@ -28,7 +28,7 @@ const compileAll = async (commonObj: Common, parsedArgs: Opts): Promise => return Promise.all(compilePromises) .then(tables => tables.flat()) .then(sendJsonRes) - .catch(err => sendErr(err, false)); + .catch(err => sendErr(err, false) as void); }; export default compileAll; diff --git a/taqueria-lib-ligo/package.json b/taqueria-lib-ligo/package.json index ec0c8fe4f..b8ff3e6f1 100644 --- a/taqueria-lib-ligo/package.json +++ b/taqueria-lib-ligo/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/lib-ligo", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria library which provides common functionality for the LIGO and LIGO Legacy Plugins", "targets": { "default": { diff --git a/taqueria-plugin-archetype/package.json b/taqueria-plugin-archetype/package.json index caefd5e24..bb85259de 100644 --- a/taqueria-plugin-archetype/package.json +++ b/taqueria-plugin-archetype/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-archetype", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for compiling Archetype smart contracts", "targets": { "default": { diff --git a/taqueria-plugin-contract-types/package.json b/taqueria-plugin-contract-types/package.json index 53934af5e..afa09ae1a 100644 --- a/taqueria-plugin-contract-types/package.json +++ b/taqueria-plugin-contract-types/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-contract-types", - "version": "0.62.0", + "version": "0.62.1", "main": "index.cjs", "module": "index.js", "source": "index.ts", diff --git a/taqueria-plugin-core/package.json b/taqueria-plugin-core/package.json index 4b80dd1bb..48983dee3 100644 --- a/taqueria-plugin-core/package.json +++ b/taqueria-plugin-core/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-core", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for core tasks", "targets": { "default": { diff --git a/taqueria-plugin-flextesa/package.json b/taqueria-plugin-flextesa/package.json index fcd017687..1f4bb73ad 100644 --- a/taqueria-plugin-flextesa/package.json +++ b/taqueria-plugin-flextesa/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-flextesa", - "version": "0.62.0", + "version": "0.62.1", "description": "A plugin for Taqueria providing local sandbox capabilities built on Flextesa", "keywords": [ "taqueria", diff --git a/taqueria-plugin-helloworld/package.json b/taqueria-plugin-helloworld/package.json index d339d4da8..5309eca90 100644 --- a/taqueria-plugin-helloworld/package.json +++ b/taqueria-plugin-helloworld/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-helloworld", - "version": "0.62.0", + "version": "0.62.1", "description": "An example of a plugin for Taqueria", "main": "index.js", "scripts": { diff --git a/taqueria-plugin-ipfs-pinata/package.json b/taqueria-plugin-ipfs-pinata/package.json index 73a072c95..7bfbafc89 100644 --- a/taqueria-plugin-ipfs-pinata/package.json +++ b/taqueria-plugin-ipfs-pinata/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-ipfs-pinata", - "version": "0.62.0", + "version": "0.62.1", "description": "A plugin for Taqueria providing ipfs publishing and pinning using the Pinata service", "keywords": [ "taqueria", diff --git a/taqueria-plugin-jest/package.json b/taqueria-plugin-jest/package.json index ea9d5dcf7..bebfb4c66 100644 --- a/taqueria-plugin-jest/package.json +++ b/taqueria-plugin-jest/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-jest", - "version": "0.62.0", + "version": "0.62.1", "main": "index.cjs", "module": "index.js", "source": "index.ts", diff --git a/taqueria-plugin-ligo-legacy/package.json b/taqueria-plugin-ligo-legacy/package.json index 6105f5748..102b26ca8 100644 --- a/taqueria-plugin-ligo-legacy/package.json +++ b/taqueria-plugin-ligo-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-ligo-legacy", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for compiling LIGO smart contracts that target LIGO v0.73.0 and earlier.", "targets": { "default": { diff --git a/taqueria-plugin-ligo/package.json b/taqueria-plugin-ligo/package.json index cec89fbf6..a41dcfffd 100644 --- a/taqueria-plugin-ligo/package.json +++ b/taqueria-plugin-ligo/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-ligo", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for compiling LIGO smart contracts", "targets": { "default": { diff --git a/taqueria-plugin-metadata/package.json b/taqueria-plugin-metadata/package.json index deb4b5e11..5a9c2f02f 100644 --- a/taqueria-plugin-metadata/package.json +++ b/taqueria-plugin-metadata/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-metadata", - "version": "0.62.0", + "version": "0.62.1", "description": "A plugin for Taqueria providing metadata creation and validation.", "keywords": [ "taqueria", diff --git a/taqueria-plugin-mock/package.json b/taqueria-plugin-mock/package.json index cfb34d9e4..3bde4e920 100644 --- a/taqueria-plugin-mock/package.json +++ b/taqueria-plugin-mock/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-mock", - "version": "0.62.0", + "version": "0.62.1", "description": "A plugin used to test Taqueria", "private": true, "scripts": { diff --git a/taqueria-plugin-octez-client/common.ts b/taqueria-plugin-octez-client/common.ts index e2fc4c597..e6c422201 100644 --- a/taqueria-plugin-octez-client/common.ts +++ b/taqueria-plugin-octez-client/common.ts @@ -48,7 +48,7 @@ export const getCheckFileExistenceCommand = async (parsedArgs: UnionOpts, source if (!projectDir) throw `No project directory provided`; const arch = getArchSync(); const baseCmd = - `docker run --rm -v \"${projectDir}\":/project -w /project --platform ${arch} ${getClientDockerImage()} ls`; + `docker run --rm -v \"${projectDir}\":/project -w /project --platform ${arch} --entrypoint /bin/ls ${getClientDockerImage()}`; const inputFile = getInputFilename(parsedArgs, sourceFile); const cmd = `${baseCmd} ${inputFile}`; return cmd; diff --git a/taqueria-plugin-octez-client/package.json b/taqueria-plugin-octez-client/package.json index d58f2f3b9..3d50b1010 100644 --- a/taqueria-plugin-octez-client/package.json +++ b/taqueria-plugin-octez-client/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-octez-client", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for utilizing octez-client", "targets": { "default": { diff --git a/taqueria-plugin-octez-client/simulate.ts b/taqueria-plugin-octez-client/simulate.ts index 35ac0791c..ef77eeefb 100644 --- a/taqueria-plugin-octez-client/simulate.ts +++ b/taqueria-plugin-octez-client/simulate.ts @@ -4,6 +4,7 @@ import { getArch, getContractContent, getParameter, + joinPaths, sendAsyncErr, sendErr, sendJsonRes, @@ -71,6 +72,11 @@ const getSimulateCmd = async (parsedArgs: Opts, sourceFile: string): Promise => getCheckFileExistenceCommand(parsedArgs, sourceFile) .then(execCmd) + .catch(_ => + Promise.reject( + new Error(`${joinPaths(parsedArgs.config.artifactsDir ?? 'artifacts', sourceFile)} does not exist`), + ) + ) .then(() => retrySimulateCmd(parsedArgs, sourceFile, 0) .then(({ stdout, stderr }) => { diff --git a/taqueria-plugin-smartpy-legacy/package.json b/taqueria-plugin-smartpy-legacy/package.json index fe0c50faa..429d604d3 100644 --- a/taqueria-plugin-smartpy-legacy/package.json +++ b/taqueria-plugin-smartpy-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-smartpy-legacy", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for compiling SmartPy smart contracts using SmartPy v0.16 (legacy syntax).", "targets": { "default": { diff --git a/taqueria-plugin-smartpy/package.json b/taqueria-plugin-smartpy/package.json index fe9c9952a..611d4b6d6 100644 --- a/taqueria-plugin-smartpy/package.json +++ b/taqueria-plugin-smartpy/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-smartpy", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin used to test and compile smart contracts written in SmartPy.", "main": "index.js", "targets": { diff --git a/taqueria-plugin-taquito/package.json b/taqueria-plugin-taquito/package.json index ad3198ffb..117a424e3 100644 --- a/taqueria-plugin-taquito/package.json +++ b/taqueria-plugin-taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-taquito", - "version": "0.62.0", + "version": "0.62.1", "description": "A taqueria plugin for originating smart contracts using Taquito", "targets": { "default": { diff --git a/taqueria-plugin-tezbox/package.json b/taqueria-plugin-tezbox/package.json index 3760878cb..d904b300b 100644 --- a/taqueria-plugin-tezbox/package.json +++ b/taqueria-plugin-tezbox/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-tezbox", - "version": "0.62.0", + "version": "0.62.1", "description": "A plugin for Taqueria providing local sandbox capabilities built on TezBox", "keywords": [ "taqueria", diff --git a/taqueria-plugin-tzcompose/package.json b/taqueria-plugin-tzcompose/package.json index dabdeeab7..029bfd13c 100644 --- a/taqueria-plugin-tzcompose/package.json +++ b/taqueria-plugin-tzcompose/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/plugin-tzcompose", - "version": "0.62.0", + "version": "0.62.1", "description": "A TzCompose plugin for Taqueria using the GoTz SDK", "main": "index.js", "scripts": { diff --git a/taqueria-protocol/package.json b/taqueria-protocol/package.json index b3cadbbf0..403c93829 100644 --- a/taqueria-protocol/package.json +++ b/taqueria-protocol/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/protocol", - "version": "0.62.0", + "version": "0.62.1", "description": "A TypeScript package which contains types that are to be shared between @taqueria/node-sdk and @taqueria/taqueria.", "main": "index.js", "scripts": { diff --git a/taqueria-sdk/index.ts b/taqueria-sdk/index.ts index cf38503d9..04deec4d3 100644 --- a/taqueria-sdk/index.ts +++ b/taqueria-sdk/index.ts @@ -253,13 +253,15 @@ export const sendAsyncRes = (msg: string, newline = true): Promise => Prom export const sendErr = (msg: string, newline = true) => { if (!msg || msg.length === 0) return; const output = newline ? msg + '\n' : msg; - return process.stderr.write(output) as unknown as void; + process.stderr.write(output); + return output; }; export const sendWarn = (msg: string, newline = true) => { if (!msg || msg.length === 0) return; const output = newline ? msg + '\n' : msg; - return process.stderr.write(output) as unknown as void; + process.stderr.write(output); + return output; }; export const sendAsyncErr = (msg: string, newline = true) => Promise.reject(sendErr(msg, newline)); // should this be Promise.reject? @@ -773,7 +775,7 @@ export const getContracts = (regex: RegExp, config: Protocol.LoadedConfig.t) => ); }; -const joinPaths = (...paths: string[]): string => paths.join('/'); +export const joinPaths = (...paths: string[]): string => paths.join('/'); export const stringToSHA256 = (s: string) => SHA256.toSHA256(s); const getPackageName = () => { diff --git a/taqueria-sdk/package.json b/taqueria-sdk/package.json index 207dbd2c0..d64a39608 100644 --- a/taqueria-sdk/package.json +++ b/taqueria-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/node-sdk", - "version": "0.62.0", + "version": "0.62.1", "description": "A TypeScript SDK for NodeJS used for Taqueria plugin development.", "main": "./index.js", "source": "./index.ts", diff --git a/taqueria-toolkit/package.json b/taqueria-toolkit/package.json index 9e449ad64..3bffc0457 100644 --- a/taqueria-toolkit/package.json +++ b/taqueria-toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/toolkit", - "version": "0.62.0", + "version": "0.62.1", "description": "A TypeScript library for NodeJS to work with Taqueria projects", "source": "./index.ts", "main": "./index.js", diff --git a/taqueria-vscode-extension-web-ui/package.json b/taqueria-vscode-extension-web-ui/package.json index ff6a53c66..341081818 100644 --- a/taqueria-vscode-extension-web-ui/package.json +++ b/taqueria-vscode-extension-web-ui/package.json @@ -1,7 +1,7 @@ { "name": "taqueria-vscode-extension-web-ui", "private": true, - "version": "0.62.0", + "version": "0.62.1", "type": "module", "scripts": { "dev": "vite", diff --git a/taqueria-vscode-extension/package.json b/taqueria-vscode-extension/package.json index 17bd60ac8..d9f264943 100644 --- a/taqueria-vscode-extension/package.json +++ b/taqueria-vscode-extension/package.json @@ -3,7 +3,7 @@ "displayName": "Taqueria", "description": "A better way to build on Tezos", "publisher": "TezosTaqueria", - "version": "0.62.0", + "version": "0.62.1", "private": true, "engines": { "vscode": "^1.84.2" diff --git a/tests/package.json b/tests/package.json index 0a09ee766..b95b73d34 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,6 +1,6 @@ { "name": "@taqueria/tests", - "version": "0.62.0", + "version": "0.62.1", "type": "module", "private": true, "description": "This is Taqueria testing project includes unit, integration and e2e tests",