Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react nodes added #119

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

react nodes added #119

wants to merge 7 commits into from

Conversation

rcraig12
Copy link
Contributor

I have reorganised my repo so that there is no errors during git work as I feel this is why there has been attributes getting messed up so apologies for the fresh pull but I could not see any other way around it :)

@lvass74
Copy link
Contributor

lvass74 commented Nov 14, 2022

@rcraig12 Can you please review Dan's comments on the previous PR?
https://github.com/Cranq-io/cranq-prototypes/pull/118/files
I think most of them still applies.

Copy link
Contributor

@lvass74 lvass74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check Dan's comments on the previous (closed) PR.
Let us know if we need any help or have any questions regarding the comments.

@@ -0,0 +1,137 @@
{
"name": "react/React Dependency Installer",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name shouldn't be title case. Suggestion: "react/React dependency installer"

},
"outputs": {
"82d5b775-4619-466e-bb33-52c9b630500b": {
"type": "{ \"stdout\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should simply be of type sting.
The minimal structure of {"error": sting} is only requested for error ports as we plan to have some consistent error structure within Cranq. For the other ports this is not neccessary.

"name": "stdout"
},
"9c6331a7-5dde-4bb4-a12d-f4a7b1b02ce1": {
"type": "{ \"stderr\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple string would be sufficient here.

"name": "error"
},
"4655960f-34c8-41ff-b9e0-3fe400b97c5d": {
"type": "{ \"bounced\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of the bounced output port should be identical to the type of the input port or the compound type of the input ports if there are more than one. The purpose of this port is to contain all input parameters so that these input parameters are preserved and used for some other operation or even for the same operation after some delay (retry) or after some corrective operations.
In this case the type should be {"dependencies": string[], "projectPath": string}.
The type can even be set dynamically as a reference to the original port types like

{"dependencies": typeof `dependencies`, "projectPath": typeof `projectPath`}

"description": "Installation path for npm installer.\n"
},
"6668cb7f-874b-4c24-ae30-89fe2e24bad1": {
"type": "boolean",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure about the boolean type.
Is there any use case where we would send a signal to this port with a false value? If this port is just a trigger, we usually call it start or use a verb specific to the action of the node like install in this case and the port's type would be any since we expect to receive a signal here in case the node should start its operation and not receive any signal in any other case.

"name": "error"
},
"4c3736af-6977-4632-b048-5446eaa87edd": {
"type": "{ \"bounced\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a type containing all the relevant inputs of the node.

"inputs": {
"93078915-107a-4854-baaf-e2cdd4c06760": {
"type": "string[]",
"name": "dependencies",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ths internal code node should receive all the required parameters in one port (parent port can sync them together for it) in order to avoid issues due to asynchronous signals.

"description": "Sends true@\"start\" right after the installer completes successfully."
},
"531c9742-9153-400a-ab29-160e618d4b04": {
"type": "{ \"stdout\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply string

"name": "stdout"
},
"c33ef99d-731e-47fc-82da-8bc9ec3cca30": {
"type": "{ \"stderr\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply string

"name": "error"
},
"ae982924-274e-4871-9d75-4725bcce2eb2": {
"type": "{ \"bounced\" : string}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be of the same type as the input(s)

@rcraig12
Copy link
Contributor Author

@rcraig12 Can you please review Dan's comments on the previous PR? https://github.com/Cranq-io/cranq-prototypes/pull/118/files I think most of them still applies.

@rcraig12 rcraig12 closed this Nov 14, 2022
@danstocker danstocker reopened this Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants