Skip to content

Commit

Permalink
ci(github): add ci build check for package json files
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeyoungone committed Nov 24, 2021
1 parent f463f5e commit 5ae7650
Show file tree
Hide file tree
Showing 65 changed files with 1,698 additions and 1,691 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:
lint-git-repo-request: '{"cloneUrl": "${{ github.server_url }}/${{ github.repository }}.git", "fetchArgs": ["--update-head-ok", "--no-tags", "--prune", "--progress", "--no-recurse-submodules", "--depth=1", "origin" ,"+${{ github.sha }}:${{ github.ref }}"], "checkoutArgs": [ "${{ github.ref }}"], "targetPhrasePatterns": [], "configDefaultsUrl": "https://inclusivenaming.org/json/dci-lint-config-recommended-v1.json" }'
- name: Get the output response
run: echo "${{ steps.lint-git-repo.outputs.lint-git-repo-response }}"

check-package-json:
runs-on: ubuntu-20.04
name: check-package-json
continue-on-error: false
steps:
- name: checks if the root package json and their child package json files are sorted
run: sort-package-json "package.json" "**/package.json" --check

build-node-14:
runs-on: ubuntu-20.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"fabric-client": "1.0.2",
"fabric-ca-client": "1.0.2",
"fabric-client": "1.0.2",
"grpc": "1.4.1"
}
}
82 changes: 41 additions & 41 deletions examples/cactus-example-carbon-accounting-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,22 @@
"name": "@hyperledger/cactus-example-carbon-accounting-backend",
"version": "1.0.0-rc.2",
"description": "An example application showing how to use Cactus when implementing a Carbon Accounting Application where two or more blockchains are sharing data with each other to achieve a certain business outcome beneficial to multiple parties (business organizations).",
"main": "dist/lib/main/typescript/index.js",
"mainMinified": "dist/cactus-example-carbon-accounting-backend.node.umd.min.js",
"browser": "dist/cactus-example-carbon-accounting-backend.web.umd.js",
"browserMinified": "dist/cactus-example-carbon-accounting-backend.web.umd.min.js",
"module": "dist/lib/main/typescript/index.js",
"types": "dist/lib/main/typescript/index.d.ts",
"files": [
"dist/*"
],
"scripts": {
"start": "CONFIG_FILE=./example-config.json node dist/lib/main/typescript/carbon-accounting-app-cli.js",
"solidity": "hardhat compile",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js",
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js"
},
"watch": {
"solidity": {
"patterns": [
"./src/main/solidity/"
],
"extensions": "sol"
}
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=10",
"npm": ">=6"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"keywords": [
"Hyperledger",
"Cactus",
"Integration",
"Blockchain",
"Distributed Ledger Technology"
],
"homepage": "https://github.com/hyperledger/cactus#readme",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"license": "Apache-2.0",
"author": {
"name": "Hyperledger Cactus Contributors",
"email": "cactus@lists.hyperledger.org",
Expand All @@ -63,11 +35,22 @@
"url": "https://accenture.com"
}
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
"main": "dist/lib/main/typescript/index.js",
"module": "dist/lib/main/typescript/index.js",
"browser": "dist/cactus-example-carbon-accounting-backend.web.umd.js",
"types": "dist/lib/main/typescript/index.d.ts",
"files": [
"dist/*"
],
"scripts": {
"solidity": "hardhat compile",
"start": "CONFIG_FILE=./example-config.json node dist/lib/main/typescript/carbon-accounting-app-cli.js",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js",
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"homepage": "https://github.com/hyperledger/cactus#readme",
"dependencies": {
"@hyperledger/cactus-api-client": "1.0.0-rc.2",
"@hyperledger/cactus-cmd-api-server": "1.0.0-rc.2",
Expand Down Expand Up @@ -98,5 +81,22 @@
"hardhat": "2.6.0",
"http-status-codes": "2.1.4",
"jose": "1.28.1"
},
"engines": {
"node": ">=10",
"npm": ">=6"
},
"publishConfig": {
"access": "public"
},
"browserMinified": "dist/cactus-example-carbon-accounting-backend.web.umd.min.js",
"mainMinified": "dist/cactus-example-carbon-accounting-backend.node.umd.min.js",
"watch": {
"solidity": {
"patterns": [
"./src/main/solidity/"
],
"extensions": "sol"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@
"name": "utility_missions_chaincode",
"version": "0.0.1",
"description": "Utility Emissions Contract",
"license": "Apache-2.0",
"author": "hyperledger",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.test.ts'",
"fix_lint": "tslint --fix -c tslint.json 'src/**/*.ts' 'test/**/*.test.ts' || true",
"test": "mocha -r ts-node/register 'test/**/*.test.ts'",
"start": "node dist/index.js"
"lint": "tslint -c tslint.json 'src/**/*.ts' 'test/**/*.test.ts'",
"start": "node dist/index.js",
"test": "mocha -r ts-node/register 'test/**/*.test.ts'"
},
"dependencies": {
"crypto-js": "^4.0.0",
"fabric-shim": "^2.2.1"
},
"author": "hyperledger",
"license": "Apache-2.0",
"devDependencies": {
"@types/chai": "^4.2.16",
"@types/crypto-js": "^4.0.1",
Expand All @@ -24,9 +28,5 @@
"ts-node": "^9.1.1",
"tslint": "^6.1.3",
"typescript": "^4.2.3"
},
"dependencies": {
"crypto-js": "^4.0.0",
"fabric-shim": "^2.2.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,22 @@
"name": "@hyperledger/cactus-example-carbon-accounting-business-logic-plugin",
"version": "1.0.0-rc.2",
"description": "An example business logic plugin implementation for Cactus",
"main": "dist/lib/main/typescript/index.js",
"mainMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.node.umd.min.js",
"browser": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.js",
"browserMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.min.js",
"module": "dist/lib/main/typescript/index.js",
"types": "dist/lib/main/typescript/index.d.ts",
"files": [
"dist/*"
],
"scripts": {
"generate-sdk": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected",
"codegen:openapi": "npm run generate-sdk",
"codegen": "run-p 'codegen:*'",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js",
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js"
},
"watch": {
"codegen:openapi": {
"patterns": [
"./src/main/json/openapi.json"
]
}
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=10",
"npm": ">=6"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"keywords": [
"Hyperledger",
"Cactus",
"Integration",
"Blockchain",
"Distributed Ledger Technology"
],
"homepage": "https://github.com/hyperledger/cactus#readme",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"license": "Apache-2.0",
"author": {
"name": "Hyperledger Cactus Contributors",
"email": "cactus@lists.hyperledger.org",
Expand All @@ -63,11 +35,23 @@
"url": "https://accenture.com"
}
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
"main": "dist/lib/main/typescript/index.js",
"module": "dist/lib/main/typescript/index.js",
"browser": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.js",
"types": "dist/lib/main/typescript/index.d.ts",
"files": [
"dist/*"
],
"scripts": {
"codegen": "run-p 'codegen:*'",
"codegen:openapi": "npm run generate-sdk",
"generate-sdk": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios --reserved-words-mappings protected=protected",
"watch": "npm-watch",
"webpack": "npm-run-all webpack:dev",
"webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web",
"webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js",
"webpack:dev:web": "webpack --env=dev --target=web --config ../../webpack.config.js"
},
"homepage": "https://github.com/hyperledger/cactus#readme",
"dependencies": {
"@hyperledger/cactus-api-client": "1.0.0-rc.2",
"@hyperledger/cactus-common": "1.0.0-rc.2",
Expand All @@ -88,5 +72,21 @@
"@types/express": "4.17.13",
"@types/ssh2": "0.5.47",
"@types/uuid": "8.3.1"
},
"engines": {
"node": ">=10",
"npm": ">=6"
},
"publishConfig": {
"access": "public"
},
"browserMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.web.umd.min.js",
"mainMinified": "dist/cactus-example-carbon-accounting-business-logic-plugin.node.umd.min.js",
"watch": {
"codegen:openapi": {
"patterns": [
"./src/main/json/openapi.json"
]
}
}
}
80 changes: 40 additions & 40 deletions examples/cactus-example-carbon-accounting-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,50 @@
"name": "@hyperledger/cactus-example-carbon-accounting-frontend",
"version": "1.0.0-rc.2",
"description": "The frontend component of an example project demonstrating how Cactus can be used for cross-chain dapp development.",
"keywords": [
"Hyperledger",
"Cactus",
"Blockchain Integration",
"Distributed Ledger Technology"
],
"homepage": "https://github.com/hyperledger/cactus#readme",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"license": "Apache-2.0",
"author": {
"name": "Hyperledger Cactus Contributors",
"email": "cactus@lists.hyperledger.org",
"url": "https://www.hyperledger.org/use/cactus"
},
"contributors": [
{
"name": "Please add yourself to the list of contributors",
"email": "your.name@example.com",
"url": "https://example.com"
},
{
"name": "Peter Somogyvari",
"email": "peter.somogyvari@accenture.com",
"url": "https://accenture.com"
}
],
"files": [
"www/*"
],
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"serve": "ng serve",
"serve:proxy": "ng serve -- --proxy-config proxy.conf.json",
"build:dev:frontend": "ng build",
"build:prod:frontend": "ng build",
"prepublishOnly": "ng build"
"ng": "ng",
"prepublishOnly": "ng build",
"serve": "ng serve",
"serve:proxy": "ng serve -- --proxy-config proxy.conf.json",
"start": "ng serve"
},
"dependencies": {
"@angular/common": "12.2.0",
Expand Down Expand Up @@ -62,43 +94,11 @@
"tslint": "6.1.3",
"typescript": "4.3.5"
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=10",
"npm": ">=6"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hyperledger/cactus.git"
},
"keywords": [
"Hyperledger",
"Cactus",
"Blockchain Integration",
"Distributed Ledger Technology"
],
"author": {
"name": "Hyperledger Cactus Contributors",
"email": "cactus@lists.hyperledger.org",
"url": "https://www.hyperledger.org/use/cactus"
},
"contributors": [
{
"name": "Please add yourself to the list of contributors",
"email": "your.name@example.com",
"url": "https://example.com"
},
{
"name": "Peter Somogyvari",
"email": "peter.somogyvari@accenture.com",
"url": "https://accenture.com"
}
],
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/hyperledger/cactus/issues"
},
"homepage": "https://github.com/hyperledger/cactus#readme"
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 5ae7650

Please sign in to comment.