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

Update Rete CLI #6

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
},
"devDependencies": {
"rete": "^2.0.1",
"rete-cli": "^1.0.1",
"rete-cli": "^1.0.2",
"typescript": "4.8.4"
},
"dependencies": {

Unchanged files with check annotations Beta

/**
* ControlFlowNodeSetup is a set of functions that define how to execute a node.
*/
export type ControlFlowNodeSetup<T extends ClassicScheme['Node'], I extends (keyof T['inputs'])[] = string[], O extends (keyof T['outputs'])[] = string[]> = {

Check warning on line 8 in src/control-flow.ts

GitHub Actions / ci / ci

This line has a length of 158. Maximum allowed is 120

Check warning on line 8 in src/control-flow.ts

GitHub Actions / ci / ci

This line has a length of 158. Maximum allowed is 120
/** Specifies the inputs which are part of the control flow */
inputs: () => I
/** Specifies the outputs which are part of the control flow */
outputs: () => O
/** Called when the node received control from the previous node */
execute(input: I[number], forward: (output: O[number]) => any): any

Check warning on line 14 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 14 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 14 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 14 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type
}
/**
* @priority 7
*/
export class ControlFlow<Schemes extends ClassicScheme> {
setups = new Map<NodeId, ControlFlowNodeSetup<any, any, any>>()

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 22 in src/control-flow.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type
/**
* @param editor NodeEditor instance
* @param node Node instance
* @param setup Set of functions that define how to execute the node
*/
public add<T extends Schemes['Node']>(node: T, setup: ControlFlowNodeSetup<T, (keyof T['inputs'])[], (keyof T['outputs'])[]>) {

Check warning on line 34 in src/control-flow.ts

GitHub Actions / ci / ci

This line has a length of 129. Maximum allowed is 120

Check warning on line 34 in src/control-flow.ts

GitHub Actions / ci / ci

This line has a length of 129. Maximum allowed is 120
const affected = this.setups.get(node.id)
if (affected) {
import { Cache } from './utils/cache'
import { Cancellable, createCancellblePromise } from './utils/cancellable'
export type DataflowNode = { data(inputs: Record<string, any>): Promise<Record<string, any>> | Record<string, any> }

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type

Check warning on line 8 in src/dataflow-engine.ts

GitHub Actions / ci / ci

Unexpected any. Specify a different type
export type DataflowEngineScheme = GetSchemes<
ClassicScheme['Node'] & DataflowNode,
ClassicScheme['Connection']