-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
The codegen script should run successfully. However, the SATP hermes requires "foundry" to compile smart contract ABIs.
To Reproduce
yarn codegen
Expected behavior
Codegen runs successfully. Returns 0.
Logs/Stack traces
[main] INFO o.o.codegen.TemplateManager - writing file /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/common.ts
[main] INFO o.o.codegen.TemplateManager - writing file /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/api.ts
[main] INFO o.o.codegen.TemplateManager - writing file /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/configuration.ts
[main] INFO o.o.codegen.TemplateManager - Ignored /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/git_push.sh (Ignored by rule in ignore file.)
[main] INFO o.o.codegen.TemplateManager - Ignored /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/.gitignore (Ignored by rule in ignore file.)
[main] INFO o.o.codegen.TemplateManager - Ignored /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/.npmignore (Ignored by rule in ignore file.)
[main] INFO o.o.codegen.TemplateManager - Ignored /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/.openapi-generator-ignore (Ignored by rule in ignore file.)
[main] INFO o.o.codegen.TemplateManager - writing file /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION
[main] INFO o.o.codegen.TemplateManager - writing file /home/andre/cacti/examples/cactus-example-supply-chain-business-logic-plugin/./src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES
################################################################################
# Thanks for using OpenAPI Generator. #
# Please consider donation to help us maintain this project 🙏 #
# https://opencollective.com/openapi_generator/donate #
################################################################################
lerna-lite ERR! yarn run codegen exited 1 in '@hyperledger-cacti/cactus-plugin-satp-hermes'
lerna-lite ERR! yarn run codegen stdout:
Building Protobuf
lerna-lite ERR! yarn run codegen stderr:
command not found: forge
ERROR: "forge:build:contracts" exited with 127.
ERROR: "forge:build:all" exited with 1.
ERROR: "codegen:abi" exited with 1.
lerna-lite ERR! yarn run codegen exited 1 in '@hyperledger-cacti/cactus-plugin-satp-hermes'
lerna-lite WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
file:///home/andre/cacti/node_modules/.store/execa-npm-8.0.1-0211bd404c/package/lib/error.js:60
error = new Error(message);
^
Error: Command failed with exit code 1: yarn run codegen
command not found: forge
ERROR: "forge:build:contracts" exited with 127.
ERROR: "forge:build:all" exited with 1.
ERROR: "codegen:abi" exited with 1.
Building Protobuf
at makeError (file:///home/andre/cacti/node_modules/.store/execa-npm-8.0.1-0211bd404c/package/lib/error.js:60:11)
at handlePromise (file:///home/andre/cacti/node_modules/.store/execa-npm-8.0.1-0211bd404c/package/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/andre/cacti/node_modules/.store/p-queue-npm-8.1.1-cd85b366ce/package/dist/index.js:230:36 {
shortMessage: 'Command failed with exit code 1: yarn run codegen',
command: 'yarn run codegen',
escapedCommand: 'yarn run codegen',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: 'Building Protobuf',
stderr: 'command not found: forge\n' +
'ERROR: "forge:build:contracts" exited with 127.\n' +
'ERROR: "forge:build:all" exited with 1.\n' +
'ERROR: "codegen:abi" exited with 1.',
cwd: '/home/andre/cacti/packages/cactus-plugin-satp-hermes',
failed: true,
timedOut: false,
isCanceled: false,
killed: false,
pkg: Package {
_id: '',
isBumpOnlyVersion: false,
licensePath: '',
localDependencies: Map(0) {},
name: '@hyperledger-cacti/cactus-plugin-satp-hermes',
[Symbol(location)]: '/home/andre/cacti/packages/cactus-plugin-satp-hermes',
[Symbol(resolved)]: Result {
type: 'directory',
registry: undefined,
where: '/home/andre/cacti',
raw: '@hyperledger-cacti/cactus-plugin-satp-hermes@file:packages/cactus-plugin-satp-hermes',
name: '@hyperledger-cacti/cactus-plugin-satp-hermes',
escapedName: '@hyperledger-cacti%2fcactus-plugin-satp-hermes',
scope: '@hyperledger-cacti',
rawSpec: 'file:packages/cactus-plugin-satp-hermes',
saveSpec: 'file:packages/cactus-plugin-satp-hermes',
fetchSpec: '/home/andre/cacti/packages/cactus-plugin-satp-hermes',
gitRange: undefined,
gitCommittish: undefined,
gitSubdir: undefined,
hosted: undefined
},
[Symbol(rootPath)]: '/home/andre/cacti',
[Symbol(scripts)]: {
build: 'run-s codegen tsc',
'build:bundle': 'ncc build ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js --out=./dist/bundle/ncc/ --external=fabric-common --external=bufferutil --external=pg-cloudflare --external=sqlite3',
'build:bundle:prod': 'ncc build ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js --minify --out=./dist/bundle/ncc/ --external=fabric-common --external=bufferutil --external=pg-cloudflare --external=sqlite3',
'build:dev:backend:postbuild': '',
'bundle-openapi-json': 'swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/json/openapi-blo-bundled.json -r -t json',
'bundle-openapi-yaml': 'swagger-cli bundle ./src/main/yml/bol/openapi-blo.yml -o ./src/main/yml/bol/openapi-blo-bundled.yml -r -t yaml',
codegen: "run-p 'codegen:*'",
'codegen:abi': 'run-s forge:build:all',
'codegen:openapi': 'run-s generate-sdk',
'codegen:proto': "echo 'Building Protobuf' && buf build --verbose && buf generate --verbose",
'db:cleanup': "find src/knex/ -name '.dev.local-*.sqlite3' -delete",
'db:destroy': 'docker-compose down -v && npm run db:cleanup',
'db:init': 'run-s db:init:local db:init:remote',
'db:init:local': 'knex migrate:latest --knexfile src/knex/knexfile.ts',
'db:init:remote': 'knex migrate:latest --knexfile src/knex/knexfile-remote.ts',
'db:migrate': 'knex migrate:latest --knexfile src/knex/knexfile.js',
'db:migrate:production': 'knex migrate:latest --env production --knexfile src/knex/knexfile.ts',
'db:reset': 'run-s db:destroy db:start db:migrate db:seed',
'db:rollback': 'run-s db:rollback:local db:rollback:remote',
'db:rollback:local': 'knex migrate:rollback --knexfile src/knex/knexfile.ts',
'db:rollback:remote': 'knex migrate:rollback --knexfile src/knex/knexfile-remote.ts',
'db:seed': 'knex seed:run --knexfile src/knex/knexfile.ts',
'db:setup': "bash -c 'npm run db:destroy || true && run-s db:start db:migrate db:seed'",
'db:start': 'docker-compose up -d',
'db:stop': 'docker-compose down',
'docker:build:dev': 'npm run build:bundle && cd ../.. && docker build --file ./packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile -t hyperledger/cacti-satp-hermes-gateway:$(date +"%Y-%m-%d")-dev-$(git rev-parse --short HEAD) ./packages/cactus-plugin-satp-hermes',
'docker:build:latest': 'npm run build:bundle && cd ../.. && docker build --file ./packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile -t hyperledger/cacti-satp-hermes-gateway:latest ./packages/cactus-plugin-satp-hermes',
'docker:build:stable': `npm run build:bundle && cd ../.. && docker build --file ./packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile -t hyperledger/cacti-satp-hermes-gateway:$(node -e "console.log(require('./package.json').customMetadata['satp-package-version'])") ./packages/cactus-plugin-satp-hermes`,
'docker:build:stg': 'npm run build:bundle && cd ../.. && docker build --file ./packages/cactus-plugin-satp-hermes/satp-hermes-gateway.Dockerfile -t hyperledger/cacti-satp-hermes-gateway:$(date +"%Y-%m-%d")-stg-$(git rev-parse --short HEAD) ./packages/cactus-plugin-satp-hermes',
'docker:compose': 'docker compose --project-directory ./ -f ./docker-compose.yml up --build',
'docker:run:dev': 'docker run -it hyperledger/cacti-satp-hermes-gateway:$(date +"%Y-%m-%d")-dev-$(git rev-parse --short HEAD)',
'docker:run:stable': `docker run -it hyperledger/cacti-satp-hermes-gateway:$(node -e "console.log(require('./package.json').customMetadata['satp-package-version'])")`,
'docker:run:stg': 'docker run -it hyperledger/cacti-satp-hermes-gateway:$(date +"%Y-%m-%d")-stg-$(git rev-parse --short HEAD)',
'docs:build': "npm run docs:clean && npm run docs:generate && echo 'Documentation built successfully!'",
'docs:check': "npm run build && npm run docs:validate && echo 'All SATP components documented!'",
'docs:clean': "rm -rf ./public/typedoc && find ./assets/diagrams -type f \\( -name '*.png' -o -name '*.svg' -o -name '*.pdf' \\) -delete 2>/dev/null || true",
'docs:dev': 'npm run docs:generate && npm run docs:serve',
'docs:diagrams': "mkdir -p assets/diagrams && echo 'Generating architecture diagrams...' && echo ' architecture-overview.svg' && mmdc -i docs/diagrams/architecture-overview.mmd -o assets/diagrams/architecture-overview.svg -t default -b transparent -s 2 && echo ' entrypoint-flow.svg' && mmdc -i docs/diagrams/entrypoint-flow.mmd -o assets/diagrams/entrypoint-flow.svg -t default -b transparent -s 2 && echo ' entrypoint-use-cases.svg' && mmdc -i docs/diagrams/entrypoint-use-cases.mmd -o assets/diagrams/entrypoint-use-cases.svg -t default -b transparent -s 2 && echo 'Generating module diagrams...' && echo ' module-core.svg' && mmdc -i docs/diagrams/module-core.mmd -o assets/diagrams/module-core.svg -t default -b transparent -s 2 && echo ' module-api.svg' && mmdc -i docs/diagrams/module-api.mmd -o assets/diagrams/module-api.svg -t default -b transparent -s 2 && echo ' module-cross-chain.svg' && mmdc -i docs/diagrams/module-cross-chain.mmd -o assets/diagrams/module-cross-chain.svg -t default -b transparent -s 2 && echo ' module-database.svg' && mmdc -i docs/diagrams/module-database.mmd -o assets/diagrams/module-database.svg -t default -b transparent -s 2 && echo ' module-services.svg' && mmdc -i docs/diagrams/module-services.mmd -o assets/diagrams/module-services.svg -t default -b transparent -s 2 && echo ' module-factory.svg' && mmdc -i docs/diagrams/module-factory.mmd -o assets/diagrams/module-factory.svg -t default -b transparent -s 2 && echo 'Generating API diagrams...' && echo ' api1-endpoints.svg' && mmdc -i docs/diagrams/api1-endpoints.mmd -o assets/diagrams/api1-endpoints.svg -t default -b transparent -s 2 && echo ' api3-satp-protocol.svg' && mmdc -i docs/diagrams/api3-satp-protocol.mmd -o assets/diagrams/api3-satp-protocol.svg -t default -b transparent -s 2 && echo 'Generated 11 diagrams successfully'",
'docs:diagrams:all': "run-s docs:diagrams docs:diagrams:png docs:diagrams:pdf && echo 'Generated SVG, PNG, and PDF versions of all diagrams'",
'docs:diagrams:pdf': 'mkdir -p assets/diagrams && echo \'Generating PDF diagrams...\' && for diagram in architecture-overview entrypoint-flow entrypoint-use-cases module-core module-api module-cross-chain module-database module-services module-factory api1-endpoints api3-satp-protocol; do echo " ${diagram}.pdf"; mmdc -i docs/diagrams/${diagram}.mmd -o assets/diagrams/${diagram}.pdf -t default -b white -s 3; done && echo \'All PDF diagrams generated\'',
'docs:diagrams:png': 'mkdir -p assets/diagrams && echo \'Generating 4K PNG diagrams...\' && for diagram in architecture-overview entrypoint-flow entrypoint-use-cases module-core module-api module-cross-chain module-database module-services module-factory api1-endpoints api3-satp-protocol; do echo " ${diagram}.png"; mmdc -i docs/diagrams/${diagram}.mmd -o assets/diagrams/${diagram}.png -t default -b transparent -w 3840 -s 2; done && echo \'All PNG diagrams generated\'',
'docs:generate': "run-s docs:diagrams && typedoc --options typedoc.json && mkdir -p ./public/typedoc/assets && cp -r ./assets/diagrams ./public/typedoc/assets/ && mkdir -p ./public/typedoc/docs && rsync -av --exclude='assets' --exclude='diagrams' --exclude='dist' ./docs/ ./public/typedoc/docs/",
'docs:open': 'open ./public/typedoc/index.html || xdg-open ./public/typedoc/index.html || start ./public/typedoc/index.html',
'docs:serve': 'run-s docs:generate && run-p docs:serve:only docs:open',
'docs:serve:only': 'python3 -m http.server 8080 --directory ./public/typedoc || python -m SimpleHTTPServer 8080',
'docs:validate': 'typedoc --options typedoc.json --validation.notDocumented',
'docs:validate:strict': 'typedoc --options typedoc.json --validation.notDocumented --treatWarningsAsErrors',
'docs:watch': 'typedoc --options typedoc.json --watch',
'forge:all': "run-s 'forge:build:all' 'forge:test'",
'forge:build:all': 'run-s forge:build:contracts forge:build:test',
'forge:build:contracts': 'forge build ./src/main/solidity/contracts/*.sol --out ./src/main/solidity/generated',
'forge:build:test': 'forge build ./src/test/solidity/contracts/*.sol --out ./src/test/solidity/generated',
'forge:test': 'forge test --out ./src/test/solidity/generated',
'format:eslint': "npx eslint --config ./eslint.config.mjs '**/*.{js,ts}' --quiet --fix",
'format:prettier': 'prettier --write --config ../../.prettierrc.js --ignore-path .prettierignore "**/{openapi.json,*.ts,*.js}"',
'generate-sdk': "run-s 'generate-sdk:*'",
'generate-sdk:typescript-axios-bol': 'yarn bundle-openapi-yaml && yarn bundle-openapi-json && openapi-generator-cli generate -i ./src/main/yml/bol/openapi-blo-bundled.yml -g typescript-axios -o ./src/main/typescript/generated/gateway-client/typescript-axios/ --reserved-words-mappings protected=protected --enable-post-process-file',
lint: "run-s 'lint:*' 'lint-code'",
'lint-code': 'run-s format:eslint format:prettier',
'lint:oapi': 'vacuum lint --ignore-file vacuum-ignore.yml -d ./src/main/yml/bol/openapi-blo-bundled.yml',
'lint:oapi:dashboard': 'vacuum dashboard --watch ./src/main/yml/bol/openapi-blo-bundled.yml',
'lint:protobuf': 'buf lint --verbose',
'start-gateway': 'node ./dist/lib/main/typescript/plugin-satp-hermes-gateway-cli.js',
test: 'run-s test:unit test:integration',
'test:integration': 'NODE_OPTIONS=--max-old-space-size=8192 npx jest ./src/test/typescript/integration --runInBand --forceExit --config=jest.config-integration.ts',
'test:integration:bridge': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/bridge --runInBand --forceExit --config=jest.config-integration-bridge.ts',
'test:integration:docker': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/docker --runInBand --forceExit --config=jest.config-integration-docker.ts',
'test:integration:gateway': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/gateway --runInBand --forceExit --config=jest.config-integration-gateway.ts',
'test:integration:oracle': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/oracle --runInBand --forceExit --config=jest.config-integration-oracle.ts',
'test:integration:recovery': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/recovery --runInBand --forceExit --config=jest.config-integration.ts',
'test:integration:rollback': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/integration/rollback --runInBand --forceExit --config=jest.config-integration.ts',
'test:unit': 'NODE_OPTIONS=--max-old-space-size=4096 npx jest ./src/test/typescript/unit --runInBand --forceExit --config=jest.config-unit.ts',
pretsc: 'npm run generate-sdk',
tsc: 'tsc --project ./tsconfig.json',
watch: 'tsc --build --watch'
}
}
}
Node.js v20.20.0
ERROR: "codegen:lerna" exited with 1.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation