Skip to content

Commit

Permalink
Update deployer minor buildnet (#294)
Browse files Browse the repository at this point in the history
* Consistent names secret key instead of private key (#155)

* add 2022 license (#173)

Repo created 2022 (October), but mainly coded in 2023, not sure which
year to choose

* add License to root (#181)

* adding Contributing.md to initializer (#179)

* 170 add powered by to sc-deployer & sc-project-initializer (#178)

* add powered_by test

* test

* Generate powered-by

* added sc-project-initializer in the job list

* Generate powered-by

* removed branch

---------

Co-authored-by: massabot <[email protected]>

* add License to initializer (#175)

* sc-deployer add contributing (#172)

* add contributing

* update

* update initialize.ts doc (#165)

* add documentation to src/cli.js (#163)

* ci instead of install for run command (#157)

* fix toMAS conversion (#156)

* Update index.ts doc (#161)

* Update index.ts

* fix prettier

* clean

---------

Co-authored-by: Ben <[email protected]>

* add maxCoins estimation (#153)

* add maxCoins estimation

* Update index.ts

* update max coins impl

* add default maxCoins value

* tsdoc fix

* remove useless cast

---------

Co-authored-by: Ben <[email protected]>

* update sc-deployer README (#188)

* Contributing.md at root dir (#185)

* Update version npm deployer (#192)

* update version web3 in deployer

* update version npm minor

* Generate powered-by

* fix missing maxCoins

---------

Co-authored-by: massabot <[email protected]>

* move_maxCoins_field (#193)

* move_maxCoins_field

* update web3 in init

* update version (#195)

* update version for testnet 22 (#194)

* added details about max_coins (#198)

* update readme of init (#189)

* update readme of init

* Update packages/sc-project-initializer/commands/init/README.md

Co-authored-by: Senji888 <[email protected]>

---------

Co-authored-by: Senji888 <[email protected]>

* update version of deployer for testnet 23 (#199)

* update version of deployer for testnet 23

* Generate powered-by

---------

Co-authored-by: massabot <[email protected]>

* update version of initializer for testnet 23 (#200)

* Add comments for deploy.ts (#204)

* setup jest (#212)

Co-authored-by: Ben <[email protected]>
Co-authored-by: julienbrs <[email protected]>

* 209 add protobuf transformer to as compiler (#214)

* 209 allow compiler to use protobuf transformer (#215)

* add the "getProtoFunctions" to retrieve the functions name, arguments (name and type) and return type from proto file (#219)

* update ci to handle buildnet an testnet (#231)

* Create ts-gen.ts & add generateTSHelper (#220)

Co-authored-by: Grégory Libert <[email protected]>

* fix ci release (#238)

* fix documentation and slightly improves the rendering of ...caller.ts (#241)

* Feature: added protofiles deployement (#216)

* feat(deployer): added proto files in deployement process

* Generate powered-by

* fix: wrong seralization method

* fix(sc-deployer): wrong op key for proto according to fetching from massa-web3

* fix(lint)

---------

Co-authored-by: massabot <[email protected]>

* fix ci release (#243)

* fix ci release

* remove unused latest

* 244 publish packages separately (#245)

* Generate powered-by

* publish packages separately

* deploy a specific package

---------

Co-authored-by: massabot <[email protected]>

* Feature: added as-gen and cli for proto-cli (#222)

Co-authored-by: Grégory Libert <[email protected]>
Co-authored-by: Ben <[email protected]>

* feat(proto-cli): added call to proto parser in cli (#248)

* fix the path issues (#242)

* Extend the cli of Massa-Proto-Cli to use ts-gen (#250)

* 252 add the blockchaincaller to ts gen (#260)

Co-authored-by: Grégory Libert <[email protected]>

* Update README.md (#262)

* Fix: proto deployement (#259)

* Fix: as generator + new build (#254)

Co-authored-by: Elli610 <[email protected]>

* Fix: Proto-Cli As caller generator + new build (#265)

* Last fix for ts gen (#264)

* fix protobuf-ts bigint support (#266)

* feat(sc-deployer/protobuf): added separator between proto files before serialization (#268)

* Create README.md for massa-proto-cli (#263)


Co-authored-by: 0xSwapFeeder <[email protected]>
Co-authored-by: Grégory Libert <[email protected]>

* add event retrieving to ts-gen (#274)

Co-authored-by: 0xSwapFeeder <[email protected]>

* update readme (#278)

* add helpers folder generation and remove unused imports (#276)

* get the actual outputs of a sc call (#280)

* Create CONTRIBUTING.md (#282)

* add LICENSE.md (MIT) (#284)

* Update powered-by.yml to genererate powered-by.md for massa-proto-cli (#286)

* Fix typo in massa proto cli (#288)

* update deployer minor buildnet

* Generate powered-by

* fix compiler missing

* update massa-web3 in massa-proto cli

* move getProtofile from web3 to protobuf.ts (#291)

* move getProtofile from web3 to protobuf.ts

* prettier

* fix

* prettier

* Update package-lock.json

* web3 version update

* Generate powered-by

---------

Co-authored-by: massabot <[email protected]>

* update lock file

---------

Co-authored-by: julienbrs <[email protected]>
Co-authored-by: Adrian C <[email protected]>
Co-authored-by: massabot <[email protected]>
Co-authored-by: Nathan HERVIER <[email protected]>
Co-authored-by: Grégory Libert <[email protected]>
Co-authored-by: 0xSwapFeeder <[email protected]>
Co-authored-by: Grégory Libert <[email protected]>
Co-authored-by: 0xSwapFeeder <[email protected]>
  • Loading branch information
9 people authored Jul 20, 2023
1 parent c6f0eea commit 2f334fd
Show file tree
Hide file tree
Showing 63 changed files with 8,262 additions and 6,486 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
extends: [
'@massalabs',
],
extends: ['@massalabs'],
};
21 changes: 21 additions & 0 deletions .github/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Massa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
npm ci
npm run build
npm run fmt:check
npm run test
toolkit-tests:
runs-on: ubuntu-latest
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/powered-by.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Generate Powered-By
on:
push:

jobs:
generate-powered-by:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: Install license-report and jq
run: |
sudo apt-get update -y && sudo apt-get install -y jq
sudo npm install -g license-report
- name: Install project dependencies
run: |
npm ci
- name: Make script executable
run: chmod +x generate_powered-by.sh

- name: Generate Powered-By for 'sc-deployer'
run: |
cd packages/sc-deployer && npm i && ./../../generate_powered-by.sh && cd ../../
- name: Generate Powered-By for 'sc-project-initializer'
run: |
cd packages/sc-project-initializer && npm i && ./../../generate_powered-by.sh && cd ../../
- name: Generate Powered-By for 'massa-proto-cli'
run: |
cd packages/massa-proto-cli && npm i && ./../../generate_powered-by.sh && cd ../../
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
token: ${{ secrets.MASSABOTCLASSIC }}
commit_message: "Generate powered-by"
file_pattern: "**/powered-by.md"
commit_user_email: [email protected]
commit_user_name: massabot
commit_author: massabot <[email protected]>
push_options: '--force'
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//this file contains code generation that breaks prettier
packages/massa-proto-cli/src/ts-gen.ts
packages/massa-proto-cli/src/as-gen.ts
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Contributing to massa-sc-toolkit

Thank you for considering contributing to [massa-sc-toolkit](https://github.com/massalabs/massa-sc-toolkit)!
We welcome contributions from the community and value the time and effort you put into improving this project.

This repository consists of two main sub-projects: [sc-deployer](https://github.com/massalabs/massa-sc-toolkit/tree/main/packages/sc-deployer) and [sc-initializer](https://github.com/massalabs/massa-sc-toolkit/tree/main/packages/sc-project-initializer), both located in the `packages` folder. Each sub-project has its own detailed contributing guide.
For more information on how to contribute to each of these sub-projects, please see the CONTRIBUTING.md files in their respective folders:

- [Contributing to sc-deployer](./packages/sc-deployer/CONTRIBUTING.md)
- [Contributing to sc-project-initializer](./packages/sc-project-initializer/CONTRIBUTING.md)

## Project Structure

This repository is organized to separate the responsibilities of `sc-deployer` and `sc-project-initializer`. Each sub-project has its own set of dependencies and tests, which helps to isolate issues and make the contribution process clearer.

## License

By contributing to `massa-sc-toolkit`, you agree that your contributions will be licensed under the MIT License.

## Additional Resources

For more information about setting up and using this project, please see the [README.md](./README.md) file at the root of this repository.
39 changes: 39 additions & 0 deletions generate_powered-by.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash +x

fileName="powered-by.md"
report=$(license-report)

echo "# Dependencies Report" > $fileName
echo "" >> $fileName
echo "The following is a list of all the dependencies of this project:" >> $fileName

#base64 encoding/decoding used to handle any potential special characters or escape sequences in the JSON data.

for row in $(echo "${report}" | jq -r '.[] | @base64'); do
_jq() {
echo "${row}" | base64 --decode | jq -r ${1}
}

name=$(_jq '.name')
url=$(_jq '.link')
licenseType=$(_jq '.licenseType')
licensePeriod=$(_jq '.licensePeriod')
installedVersion=$(_jq '.installedVersion')
author=$(_jq '.author')

if [[ $author == *" <"* ]]; then
author="[${author%% <*}](${author##*<}"
author="${author%?}" # remove the extra ">" at the end
author="${author})" # adding ")" at the end
fi


echo "## [${name}](${url})" >> $fileName
echo "" >> $fileName
echo "**License:** ${licenseType} - ${licensePeriod}" >> $fileName
echo "" >> $fileName
echo "**Used version:** ${installedVersion}" >> $fileName
echo "" >> $fileName
echo "**Many thanks to:** ${author}" >> $fileName
echo "" >> $fileName
done
7 changes: 7 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
roots: ['<rootDir>/test/'],
testMatch: ['**/*.spec.ts'],
transform: {
'^.+.(ts|tsx)$': 'ts-jest',
},
};
Loading

0 comments on commit 2f334fd

Please sign in to comment.