From 9ab331acbeeffa569cb1a0c374f100ea70dbde5a Mon Sep 17 00:00:00 2001 From: hs05june Date: Sun, 26 Feb 2023 12:34:02 +0530 Subject: [PATCH 1/6] Updated Readme.md Signed-off-by: hs05june --- README.md | 4 ++-- generator/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34788296..43e7c3a7 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ ![nodecloud CI](https://github.com/cloudlibz/nodecloud/workflows/nodecloud%20CI/badge.svg) [![npm version](https://badge.fury.io/js/nodecloud.svg)](https://badge.fury.io/js/nodecloud) -[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b94b1fe2ac724e8083f8237de3473c8a)](https://www.codacy.com/app/rehrumesh/nodecloud?utm_source=github.com&utm_medium=referral&utm_content=cloudlibz/nodecloud&utm_campaign=Badge_Grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b55da730103e4c679e4e180a6b890a18)](https://www.codacy.com/app/rehrumesh/nodecloud?utm_source=github.com&utm_medium=referral&utm_content=cloudlibz/nodecloud&utm_campaign=Badge_Grade) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) -[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://gitter.im/cloudlibz/cloudlibz) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#cloudlibz_cloudlibz:gitter.im) [![Read on : Medium](https://img.shields.io/badge/Read%20on-Medium-black.svg)](https://medium.com/leopards-lab) [![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues) diff --git a/generator/README.md b/generator/README.md index d5d70d46..9993a79b 100644 --- a/generator/README.md +++ b/generator/README.md @@ -2,7 +2,7 @@ ![ts](https://flat.badgen.net/badge/Built%20With/TypeScript/blue) -[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://gitter.im/cloudlibz/cloudlibz) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#cloudlibz_cloudlibz:gitter.im) [![Read on : Medium](https://img.shields.io/badge/Read%20on-Medium-black.svg)](https://medium.com/leopards-lab) [![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues) From c1c5a4c249c54b5e019ecfc516d608fd281296b7 Mon Sep 17 00:00:00 2001 From: hs05june Date: Sun, 26 Feb 2023 12:35:04 +0530 Subject: [PATCH 2/6] Updated Readme --- README.md | 172 ++++++++++++++++++++++---------------------- generator/README.md | 18 ++--- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index 43e7c3a7..629fb52a 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,18 @@ Table of Content -- [Introduction](#introduction) -- [Supported Service Providers](#-supported-service-providers) -- [Getting Started](#getting-started) - - [NodeCloud Plugins](#nodecloud-plugins) - - [Example](#example) -- [Overriding Providers](#overriding-providers) -- [Service Types](#-service-types) -- [Development setup](#-development-setup) -- [Important Notes for Developers](#important-notes-for-developers-) -- [Test Changes](#test-changes) -- [NodeCloud Code Generation tool](#nodecloud-code-generation-tool) -- [License](#-license) +- [Introduction](#introduction) +- [Supported Service Providers](#-supported-service-providers) +- [Getting Started](#getting-started) + - [NodeCloud Plugins](#nodecloud-plugins) + - [Example](#example) +- [Overriding Providers](#overriding-providers) +- [Service Types](#-service-types) +- [Development setup](#-development-setup) +- [Important Notes for Developers](#important-notes-for-developers-) +- [Test Changes](#test-changes) +- [NodeCloud Code Generation tool](#nodecloud-code-generation-tool) +- [License](#-license) # Introduction @@ -38,18 +38,18 @@ Table of Content NodeCloud will be useful to you if: -- you work on a project which uses multiple cloud providers -- you are looking for an abstract cloud API which can switch between cloud providers with fewer code changes -- you are an open-source enthusiast who is into cloud engineering or code generation -- you want to improve your skills in NodeJS, Typescript and cloud service providers +- you work on a project which uses multiple cloud providers +- you are looking for an abstract cloud API which can switch between cloud providers with fewer code changes +- you are an open-source enthusiast who is into cloud engineering or code generation +- you want to improve your skills in NodeJS, Typescript and cloud service providers ## πŸ“˜ Supported Service Providers -- Amazon Web Services (AWS) -- Azure -- Google Cloud Platform (GCP) -- DigitalOcean -- AliCloud +- Amazon Web Services (AWS) +- Azure +- Google Cloud Platform (GCP) +- DigitalOcean +- AliCloud _πŸ“’ if your required cloud provider plugin is not listed here, we'd love your help to add it :)_ @@ -95,37 +95,37 @@ This config file can contain an array of objects for all providers and all will ### Example ```js -const nodeCloudAwsPlugin = require("@nodecloud/aws-plugin"); -const nodeCloudGcpPlugin = require("@nodecloud/gcp-plugin"); -const nodeCloudAzurePlugin = require("@nodecloud/azure-plugin"); -const nodeCloudDoPlugin = require("@nodecloud/do-plugin"); +const nodeCloudAwsPlugin = require('@nodecloud/aws-plugin'); +const nodeCloudGcpPlugin = require('@nodecloud/gcp-plugin'); +const nodeCloudAzurePlugin = require('@nodecloud/azure-plugin'); +const nodeCloudDoPlugin = require('@nodecloud/do-plugin'); const providers = [ - { - name: "aws", - tag: "aws", - plugin: nodeCloudAwsPlugin, - configPath: "C:\\Users\\Rajitha\\opensource\\aws_cred.json" - }, - { - name: "google", - tag: "google", - plugin: nodeCloudGcpPlugin, - configPath: { - projectId: "astral-hold-276807", - keyFilename: "C:\\Users\\Rajitha\\opensource\\gcp_cred.json" - } - }, - { - name: "azure", - tag: "azure", - plugin: nodeCloudAzurePlugin - }, - { - name: "digitalocean", - tag: "do", - plugin: nodeCloudDoPlugin - } + { + name: 'aws', + tag: 'aws', + plugin: nodeCloudAwsPlugin, + configPath: 'C:\\Users\\Rajitha\\opensource\\aws_cred.json', + }, + { + name: 'google', + tag: 'google', + plugin: nodeCloudGcpPlugin, + configPath: { + projectId: 'astral-hold-276807', + keyFilename: 'C:\\Users\\Rajitha\\opensource\\gcp_cred.json', + }, + }, + { + name: 'azure', + tag: 'azure', + plugin: nodeCloudAzurePlugin, + }, + { + name: 'digitalocean', + tag: 'do', + plugin: nodeCloudDoPlugin, + }, ]; module.exports = providers; ``` @@ -137,52 +137,52 @@ Congratulations! You just configured NodeCloud in your project. Let's start with The below code is an example of usage in AWS. ```js -const nc = require("@nodecloud/common"); // NodeCloud common module +const nc = require('@nodecloud/common'); // NodeCloud common module const optionsProvider = { - overrideProviders: false + overrideProviders: false, }; const ncProviders = nc.getProviders(optionsProvider); const options = { - apiVersion: "2017-11-01" + apiVersion: '2017-11-01', }; const computeModule = ncProviders.aws.compute(options); function launchInstance() { - const instanceParams = { - ImageId: "ami-07ebfd5b3428b6f4d", // Image of Ubuntu Server 18.04 LTS - InstanceType: "t2.micro", - KeyName: "nodeCloud", // key name of Key pair - MinCount: 1, - MaxCount: 1 - }; - - // create AWS EC2 instance - computeModule - .create(instanceParams) - .then(res => { - console.log(`All done ! ${res}`); - }) - .catch(err => { - console.log(`Oops something happened ${err}`); - }); + const instanceParams = { + ImageId: 'ami-07ebfd5b3428b6f4d', // Image of Ubuntu Server 18.04 LTS + InstanceType: 't2.micro', + KeyName: 'nodeCloud', // key name of Key pair + MinCount: 1, + MaxCount: 1, + }; + + // create AWS EC2 instance + computeModule + .create(instanceParams) + .then(res => { + console.log(`All done ! ${res}`); + }) + .catch(err => { + console.log(`Oops something happened ${err}`); + }); } function stopInstance() { - const params = { - InstanceIds: ["i-0928af5c626f85da9"], - DryRun: false - }; - - // stop AWS EC2 instance - computeModule - .stop(params) - .then(res => { - console.log(res); - }) - .catch(err => { - console.log(err); - }); + const params = { + InstanceIds: ['i-0928af5c626f85da9'], + DryRun: false, + }; + + // stop AWS EC2 instance + computeModule + .stop(params) + .then(res => { + console.log(res); + }) + .catch(err => { + console.log(err); + }); } ``` @@ -191,9 +191,9 @@ function stopInstance() { NodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you want to use a community-driven plugin override the providers' list as follows. ```js -const nodeCloud = require("nodecloud"); +const nodeCloud = require('nodecloud'); const options = { - overrideProviders: true + overrideProviders: true, }; const ncProviders = nodeCloud.getProviders(options); ``` diff --git a/generator/README.md b/generator/README.md index 9993a79b..a092b535 100644 --- a/generator/README.md +++ b/generator/README.md @@ -23,7 +23,7 @@ The execution of the generator starts form the `main.ts` file, where the basic i ## Structure of `node-cloud.yml` file -- AWS +- AWS ``` AWS: @@ -35,7 +35,7 @@ AWS:

-- Azure +- Azure ``` Azure: @@ -47,7 +47,7 @@ Azure:

-- Google Cloud (client based) +- Google Cloud (client based) ``` GCP: @@ -67,7 +67,7 @@ GCP:

-- Google Cloud (class based) +- Google Cloud (class based) ``` GCP: @@ -82,7 +82,7 @@ GCP: For the class-based SDKs there is a minor change in the `node-cloud.yml` to record the main class of an SDK. For the above scenario, it’s the DNS class. -- Digital Ocean +- Digital Ocean ``` DO: @@ -106,11 +106,11 @@ These functions are located in the generators of the each cloud providers. Each This is the most important part of the code generator tool. Currently, there are four transformers. Two transformers for Google Cloud, and one each for AWS and Azure. All of the transformers runs three main transformations. -- `addFunctions`: In this transformation the basic structure of the code is created. Method Nodes are created to the number of functions in the `classData` object. If there are imports related to the class those statments are also added to the dummy **Abstract Syntax Tree**. +- `addFunctions`: In this transformation the basic structure of the code is created. Method Nodes are created to the number of functions in the `classData` object. If there are imports related to the class those statments are also added to the dummy **Abstract Syntax Tree**. -- `addIdentifiers`: In this transformation all the Identifier nodes are updated. After this transformation the code is logically compelete. All the neccessary code parts are added and finalized such as parameter names, parameter types, client names, class name, package names, SDK function names etc. +- `addIdentifiers`: In this transformation all the Identifier nodes are updated. After this transformation the code is logically compelete. All the neccessary code parts are added and finalized such as parameter names, parameter types, client names, class name, package names, SDK function names etc. -- `addComments`: This transformation aims to auto-generate the API documentation. All the comments are added to the structure required by `JSDoc`. The `@category` is used to categorize the generated classes depending on the cloud provider. This tag is from the `better-docs` template used with `JSDoc`. +- `addComments`: This transformation aims to auto-generate the API documentation. All the comments are added to the structure required by `JSDoc`. The `@category` is used to categorize the generated classes depending on the cloud provider. This tag is from the `better-docs` template used with `JSDoc`. ## Understanding the directory structure of generator @@ -136,4 +136,4 @@ transformer which transforms the dummy class into an working Nodecloud class for ## Running the code generation tool -- To build classes run `tsc main && node main` or 'yarn run tool' if inside generator directory and `yarn run generator` if inside nodecloud directory. +- To build classes run `tsc main && node main` or 'yarn run tool' if inside generator directory and `yarn run generator` if inside nodecloud directory. From c5c033129172454c1ce023ba211867ef275b86a7 Mon Sep 17 00:00:00 2001 From: hs05june Date: Wed, 1 Mar 2023 18:07:57 +0530 Subject: [PATCH 3/6] Updated Readme Signed-off-by: hs05june --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 629fb52a..bb918215 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ yarn ### Important Notes for Developers 😎 -❇️ This project is based on [Lerna](https://lerna.js.org/) and Yarn workspaces where there are multiple projects in the same repository. It's better to get some background knowledge about these before making any changes in the code. Check the `lerna.json` for the current configuration. +❇️ This project is based on [Lerna](https://lerna.js.org/) and [Yarn](https://classic.yarnpkg.com/lang/en/) workspaces where there are multiple projects in the same repository. It's better to get some background knowledge about these before making any changes in the code. Check the `lerna.json` for the current configuration. ❇️ `@nodecloud/aws-plugin` , `@nodecloud/gcp-plugin` , `@nodecloud/azure-plugin` and `@nodecloud/common` are `Lerna` managed yarn workspaces where the `generator` is another standalone yarn workspace. @@ -284,7 +284,7 @@ _Adding the -W flag makes it explicit that we’re adding the dependency to the lerna exec -- yarn remove dep-name ``` -❇️ Use symlinks when you want to make changes while testing them out in a demo project.** Do not use npm link** instead use yarn linking +❇️ Use symlinks when you want to make changes while testing them out in a demo project. **Do not use npm link** instead use yarn linking ``` yarn link From 1acc3764812c3242238636da6fd41f187d8da876 Mon Sep 17 00:00:00 2001 From: hs05june Date: Wed, 1 Mar 2023 18:09:31 +0530 Subject: [PATCH 4/6] Added Code of Conduct Signed-off-by: hs05june --- CODE_OF_CONDUCT.md | 42 ++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..a17719c5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,42 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + + In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + + Examples of behavior that contributes to creating a positive environment include: + + Using welcoming and inclusive language + Being respectful of differing viewpoints and experiences + Gracefully accepting constructive criticism + Focusing on what is best for the community + Showing empathy towards other community members + Examples of unacceptable behavior by participants include: + + The use of sexualized language or imagery and unwelcome sexual attention or advances + Trolling, insulting/derogatory comments, and personal or political attacks + Public or private harassment + Publishing others' private information, such as a physical or electronic address, without explicit permission + Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + + Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + + Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + + This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + + Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at **score-community@googlegroups.com**. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + + Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + + This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4). \ No newline at end of file diff --git a/README.md b/README.md index bb918215..acce22f4 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ const ncProviders = nodeCloud.getProviders(options); NodeCloud relies on the passionate members of its community to keep delivering impactful tools to people all over the world. Contributions of any kind are welcome! -You can help us in many ways. Including new features, bug fixing, error reporting and documentation. Before contributing, be sure to consult NodeClouds's contribution guidelines. As a member of our community, you must abide by our Code Of Conduct. +You can help us in many ways. Including new features, bug fixing, error reporting and documentation. Before contributing, be sure to consult NodeClouds's contribution guidelines. As a member of our community, you must abide by our [Code Of Conduct](./CODE_OF_CONDUCT.md). ### πŸ’» Development setup From 076b6a8657ce55e4c346f3ad4a4aa16cfc2c71dc Mon Sep 17 00:00:00 2001 From: hs05june Date: Wed, 1 Mar 2023 18:32:48 +0530 Subject: [PATCH 5/6] Revert "Updated Readme" This reverts commit c1c5a4c249c54b5e019ecfc516d608fd281296b7. --- README.md | 172 ++++++++++++++++++++++---------------------- generator/README.md | 18 ++--- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/README.md b/README.md index acce22f4..3bea64db 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,18 @@ Table of Content -- [Introduction](#introduction) -- [Supported Service Providers](#-supported-service-providers) -- [Getting Started](#getting-started) - - [NodeCloud Plugins](#nodecloud-plugins) - - [Example](#example) -- [Overriding Providers](#overriding-providers) -- [Service Types](#-service-types) -- [Development setup](#-development-setup) -- [Important Notes for Developers](#important-notes-for-developers-) -- [Test Changes](#test-changes) -- [NodeCloud Code Generation tool](#nodecloud-code-generation-tool) -- [License](#-license) +- [Introduction](#introduction) +- [Supported Service Providers](#-supported-service-providers) +- [Getting Started](#getting-started) + - [NodeCloud Plugins](#nodecloud-plugins) + - [Example](#example) +- [Overriding Providers](#overriding-providers) +- [Service Types](#-service-types) +- [Development setup](#-development-setup) +- [Important Notes for Developers](#important-notes-for-developers-) +- [Test Changes](#test-changes) +- [NodeCloud Code Generation tool](#nodecloud-code-generation-tool) +- [License](#-license) # Introduction @@ -38,18 +38,18 @@ Table of Content NodeCloud will be useful to you if: -- you work on a project which uses multiple cloud providers -- you are looking for an abstract cloud API which can switch between cloud providers with fewer code changes -- you are an open-source enthusiast who is into cloud engineering or code generation -- you want to improve your skills in NodeJS, Typescript and cloud service providers +- you work on a project which uses multiple cloud providers +- you are looking for an abstract cloud API which can switch between cloud providers with fewer code changes +- you are an open-source enthusiast who is into cloud engineering or code generation +- you want to improve your skills in NodeJS, Typescript and cloud service providers ## πŸ“˜ Supported Service Providers -- Amazon Web Services (AWS) -- Azure -- Google Cloud Platform (GCP) -- DigitalOcean -- AliCloud +- Amazon Web Services (AWS) +- Azure +- Google Cloud Platform (GCP) +- DigitalOcean +- AliCloud _πŸ“’ if your required cloud provider plugin is not listed here, we'd love your help to add it :)_ @@ -95,37 +95,37 @@ This config file can contain an array of objects for all providers and all will ### Example ```js -const nodeCloudAwsPlugin = require('@nodecloud/aws-plugin'); -const nodeCloudGcpPlugin = require('@nodecloud/gcp-plugin'); -const nodeCloudAzurePlugin = require('@nodecloud/azure-plugin'); -const nodeCloudDoPlugin = require('@nodecloud/do-plugin'); +const nodeCloudAwsPlugin = require("@nodecloud/aws-plugin"); +const nodeCloudGcpPlugin = require("@nodecloud/gcp-plugin"); +const nodeCloudAzurePlugin = require("@nodecloud/azure-plugin"); +const nodeCloudDoPlugin = require("@nodecloud/do-plugin"); const providers = [ - { - name: 'aws', - tag: 'aws', - plugin: nodeCloudAwsPlugin, - configPath: 'C:\\Users\\Rajitha\\opensource\\aws_cred.json', - }, - { - name: 'google', - tag: 'google', - plugin: nodeCloudGcpPlugin, - configPath: { - projectId: 'astral-hold-276807', - keyFilename: 'C:\\Users\\Rajitha\\opensource\\gcp_cred.json', - }, - }, - { - name: 'azure', - tag: 'azure', - plugin: nodeCloudAzurePlugin, - }, - { - name: 'digitalocean', - tag: 'do', - plugin: nodeCloudDoPlugin, - }, + { + name: "aws", + tag: "aws", + plugin: nodeCloudAwsPlugin, + configPath: "C:\\Users\\Rajitha\\opensource\\aws_cred.json" + }, + { + name: "google", + tag: "google", + plugin: nodeCloudGcpPlugin, + configPath: { + projectId: "astral-hold-276807", + keyFilename: "C:\\Users\\Rajitha\\opensource\\gcp_cred.json" + } + }, + { + name: "azure", + tag: "azure", + plugin: nodeCloudAzurePlugin + }, + { + name: "digitalocean", + tag: "do", + plugin: nodeCloudDoPlugin + } ]; module.exports = providers; ``` @@ -137,52 +137,52 @@ Congratulations! You just configured NodeCloud in your project. Let's start with The below code is an example of usage in AWS. ```js -const nc = require('@nodecloud/common'); // NodeCloud common module +const nc = require("@nodecloud/common"); // NodeCloud common module const optionsProvider = { - overrideProviders: false, + overrideProviders: false }; const ncProviders = nc.getProviders(optionsProvider); const options = { - apiVersion: '2017-11-01', + apiVersion: "2017-11-01" }; const computeModule = ncProviders.aws.compute(options); function launchInstance() { - const instanceParams = { - ImageId: 'ami-07ebfd5b3428b6f4d', // Image of Ubuntu Server 18.04 LTS - InstanceType: 't2.micro', - KeyName: 'nodeCloud', // key name of Key pair - MinCount: 1, - MaxCount: 1, - }; - - // create AWS EC2 instance - computeModule - .create(instanceParams) - .then(res => { - console.log(`All done ! ${res}`); - }) - .catch(err => { - console.log(`Oops something happened ${err}`); - }); + const instanceParams = { + ImageId: "ami-07ebfd5b3428b6f4d", // Image of Ubuntu Server 18.04 LTS + InstanceType: "t2.micro", + KeyName: "nodeCloud", // key name of Key pair + MinCount: 1, + MaxCount: 1 + }; + + // create AWS EC2 instance + computeModule + .create(instanceParams) + .then(res => { + console.log(`All done ! ${res}`); + }) + .catch(err => { + console.log(`Oops something happened ${err}`); + }); } function stopInstance() { - const params = { - InstanceIds: ['i-0928af5c626f85da9'], - DryRun: false, - }; - - // stop AWS EC2 instance - computeModule - .stop(params) - .then(res => { - console.log(res); - }) - .catch(err => { - console.log(err); - }); + const params = { + InstanceIds: ["i-0928af5c626f85da9"], + DryRun: false + }; + + // stop AWS EC2 instance + computeModule + .stop(params) + .then(res => { + console.log(res); + }) + .catch(err => { + console.log(err); + }); } ``` @@ -191,9 +191,9 @@ function stopInstance() { NodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you want to use a community-driven plugin override the providers' list as follows. ```js -const nodeCloud = require('nodecloud'); +const nodeCloud = require("nodecloud"); const options = { - overrideProviders: true, + overrideProviders: true }; const ncProviders = nodeCloud.getProviders(options); ``` diff --git a/generator/README.md b/generator/README.md index a092b535..9993a79b 100644 --- a/generator/README.md +++ b/generator/README.md @@ -23,7 +23,7 @@ The execution of the generator starts form the `main.ts` file, where the basic i ## Structure of `node-cloud.yml` file -- AWS +- AWS ``` AWS: @@ -35,7 +35,7 @@ AWS:

-- Azure +- Azure ``` Azure: @@ -47,7 +47,7 @@ Azure:

-- Google Cloud (client based) +- Google Cloud (client based) ``` GCP: @@ -67,7 +67,7 @@ GCP:

-- Google Cloud (class based) +- Google Cloud (class based) ``` GCP: @@ -82,7 +82,7 @@ GCP: For the class-based SDKs there is a minor change in the `node-cloud.yml` to record the main class of an SDK. For the above scenario, it’s the DNS class. -- Digital Ocean +- Digital Ocean ``` DO: @@ -106,11 +106,11 @@ These functions are located in the generators of the each cloud providers. Each This is the most important part of the code generator tool. Currently, there are four transformers. Two transformers for Google Cloud, and one each for AWS and Azure. All of the transformers runs three main transformations. -- `addFunctions`: In this transformation the basic structure of the code is created. Method Nodes are created to the number of functions in the `classData` object. If there are imports related to the class those statments are also added to the dummy **Abstract Syntax Tree**. +- `addFunctions`: In this transformation the basic structure of the code is created. Method Nodes are created to the number of functions in the `classData` object. If there are imports related to the class those statments are also added to the dummy **Abstract Syntax Tree**. -- `addIdentifiers`: In this transformation all the Identifier nodes are updated. After this transformation the code is logically compelete. All the neccessary code parts are added and finalized such as parameter names, parameter types, client names, class name, package names, SDK function names etc. +- `addIdentifiers`: In this transformation all the Identifier nodes are updated. After this transformation the code is logically compelete. All the neccessary code parts are added and finalized such as parameter names, parameter types, client names, class name, package names, SDK function names etc. -- `addComments`: This transformation aims to auto-generate the API documentation. All the comments are added to the structure required by `JSDoc`. The `@category` is used to categorize the generated classes depending on the cloud provider. This tag is from the `better-docs` template used with `JSDoc`. +- `addComments`: This transformation aims to auto-generate the API documentation. All the comments are added to the structure required by `JSDoc`. The `@category` is used to categorize the generated classes depending on the cloud provider. This tag is from the `better-docs` template used with `JSDoc`. ## Understanding the directory structure of generator @@ -136,4 +136,4 @@ transformer which transforms the dummy class into an working Nodecloud class for ## Running the code generation tool -- To build classes run `tsc main && node main` or 'yarn run tool' if inside generator directory and `yarn run generator` if inside nodecloud directory. +- To build classes run `tsc main && node main` or 'yarn run tool' if inside generator directory and `yarn run generator` if inside nodecloud directory. From 05e711991ad197ada9d06794dc18ffd8cee9283e Mon Sep 17 00:00:00 2001 From: hs05june Date: Wed, 1 Mar 2023 18:32:53 +0530 Subject: [PATCH 6/6] Revert "Updated Readme.md" This reverts commit 9ab331acbeeffa569cb1a0c374f100ea70dbde5a. --- README.md | 4 ++-- generator/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bea64db..5ece716d 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ ![nodecloud CI](https://github.com/cloudlibz/nodecloud/workflows/nodecloud%20CI/badge.svg) [![npm version](https://badge.fury.io/js/nodecloud.svg)](https://badge.fury.io/js/nodecloud) -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b55da730103e4c679e4e180a6b890a18)](https://www.codacy.com/app/rehrumesh/nodecloud?utm_source=github.com&utm_medium=referral&utm_content=cloudlibz/nodecloud&utm_campaign=Badge_Grade) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b94b1fe2ac724e8083f8237de3473c8a)](https://www.codacy.com/app/rehrumesh/nodecloud?utm_source=github.com&utm_medium=referral&utm_content=cloudlibz/nodecloud&utm_campaign=Badge_Grade) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) -[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#cloudlibz_cloudlibz:gitter.im) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://gitter.im/cloudlibz/cloudlibz) [![Read on : Medium](https://img.shields.io/badge/Read%20on-Medium-black.svg)](https://medium.com/leopards-lab) [![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues) diff --git a/generator/README.md b/generator/README.md index 9993a79b..d5d70d46 100644 --- a/generator/README.md +++ b/generator/README.md @@ -2,7 +2,7 @@ ![ts](https://flat.badgen.net/badge/Built%20With/TypeScript/blue) -[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://app.gitter.im/#/room/#cloudlibz_cloudlibz:gitter.im) +[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://gitter.im/cloudlibz/cloudlibz) [![Read on : Medium](https://img.shields.io/badge/Read%20on-Medium-black.svg)](https://medium.com/leopards-lab) [![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues)