Skip to content

Commit

Permalink
Fixes #1939, simulation task execution not displaying result or error…
Browse files Browse the repository at this point in the history
… message
  • Loading branch information
mweichert committed Oct 29, 2024
1 parent 16956d3 commit 06e72a1
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 32 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -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*",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-analytics/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-lib-ligo/compile-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const compileAll = async (commonObj: Common, parsedArgs: Opts): Promise<void> =>
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;
2 changes: 1 addition & 1 deletion taqueria-lib-ligo/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-archetype/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-contract-types/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-core/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-flextesa/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-helloworld/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-ipfs-pinata/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-jest/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-ligo-legacy/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-ligo/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-metadata/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-mock/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-octez-client/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-octez-client/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 6 additions & 0 deletions taqueria-plugin-octez-client/simulate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
getArch,
getContractContent,
getParameter,
joinPaths,
sendAsyncErr,
sendErr,
sendJsonRes,
Expand Down Expand Up @@ -71,6 +72,11 @@ const getSimulateCmd = async (parsedArgs: Opts, sourceFile: string): Promise<str
const simulateContract = (parsedArgs: Opts, sourceFile: string): Promise<TableRow> =>
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 }) => {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-smartpy-legacy/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-smartpy/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-taquito/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-tezbox/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-plugin-tzcompose/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-protocol/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
8 changes: 5 additions & 3 deletions taqueria-sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@ export const sendAsyncRes = (msg: string, newline = true): Promise<void> => 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?
Expand Down Expand Up @@ -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 = () => {
Expand Down
2 changes: 1 addition & 1 deletion taqueria-sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-vscode-extension-web-ui/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion taqueria-vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 06e72a1

Please sign in to comment.