mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-18 09:21:56 +08:00
feat: rename input
to inputs
, output
to outputs
This commit is contained in:
parent
ae11d5ee3d
commit
01ede08a79
@ -32,12 +32,12 @@ type Workflow struct {
|
||||
}
|
||||
|
||||
type WorkflowNode struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Next *WorkflowNode `json:"next"`
|
||||
Config map[string]any `json:"config"`
|
||||
Input []WorkflowNodeIO `json:"input"`
|
||||
Output []WorkflowNodeIO `json:"output"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Next *WorkflowNode `json:"next"`
|
||||
Config map[string]any `json:"config"`
|
||||
Inputs []WorkflowNodeIO `json:"inputs"`
|
||||
Outputs []WorkflowNodeIO `json:"outputs"`
|
||||
|
||||
Validated bool `json:"validated"`
|
||||
Type string `json:"type"`
|
||||
|
@ -88,7 +88,7 @@ func (a *applyNode) Run(ctx context.Context) error {
|
||||
NodeId: a.node.Id,
|
||||
Node: a.node,
|
||||
Succeeded: true,
|
||||
Outputs: a.node.Output,
|
||||
Outputs: a.node.Outputs,
|
||||
}
|
||||
|
||||
certX509, err := x509.ParseCertificateFromPEM(certificate.Certificate)
|
||||
|
@ -237,7 +237,7 @@ const DeployNodeForm = ({ node }: DeployFormProps) => {
|
||||
options={previousOutput.map((item) => {
|
||||
return {
|
||||
label: item.name,
|
||||
options: item.output?.map((output) => {
|
||||
options: item.outputs?.map((output) => {
|
||||
return {
|
||||
label: `${item.name} - ${output.label}`,
|
||||
value: `${item.id}#${output.name}`,
|
||||
|
@ -83,8 +83,8 @@ export type WorkflowNode = {
|
||||
type: WorkflowNodeType;
|
||||
|
||||
config?: Record<string, unknown>;
|
||||
input?: WorkflowNodeIO[];
|
||||
output?: WorkflowNodeIO[];
|
||||
inputs?: WorkflowNodeIO[];
|
||||
outputs?: WorkflowNodeIO[];
|
||||
|
||||
next?: WorkflowNode;
|
||||
branches?: WorkflowNode[];
|
||||
@ -191,8 +191,8 @@ export const newNode = (nodeType: WorkflowNodeType, options: NewNodeOptions = {}
|
||||
case WorkflowNodeType.Deploy:
|
||||
{
|
||||
node.config = {} as Record<string, unknown>;
|
||||
node.input = workflowNodeTypeDefaultInputs.get(nodeType);
|
||||
node.output = workflowNodeTypeDefaultOutputs.get(nodeType);
|
||||
node.inputs = workflowNodeTypeDefaultInputs.get(nodeType);
|
||||
node.outputs = workflowNodeTypeDefaultOutputs.get(nodeType);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -347,10 +347,10 @@ export const getWorkflowOutputBeforeId = (node: WorkflowNode, id: string, type:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (current.type !== WorkflowNodeType.Branch && current.output && current.output.some((io) => io.type === type)) {
|
||||
if (current.type !== WorkflowNodeType.Branch && current.outputs && current.outputs.some((io) => io.type === type)) {
|
||||
output.push({
|
||||
...current,
|
||||
output: current.output.filter((io) => io.type === type),
|
||||
outputs: current.outputs.filter((io) => io.type === type),
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user