Conversation
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/hercules/-/pipelines/2442426504 Status: Passed Job summariesdocs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/13858219905/artifacts/out/index.html |
Co-authored-by: Nico Sammito <nsammito@code0.tech> Signed-off-by: Dario Pranjic <96529060+Knerio@users.noreply.github.com>
d25c501 to
52d7868
Compare
nicosammito
left a comment
There was a problem hiding this comment.
The sdk is in generally really confusing and it's hard to understand what and when something is happening.
| RuntimeErrorException, RuntimeParameter, Signature | ||
| } from "@code0-tech/hercules"; | ||
|
|
||
| const sdk = createSdk({ |
There was a problem hiding this comment.
All those settings besides the version should be within a .env file
| runtimeName: "number", | ||
| defaultValue: 20 | ||
| }) | ||
| class FibonacciFunction { |
There was a problem hiding this comment.
All implementations should be outsourced to a separate file. Also for data types and flow types
| @@ -0,0 +1,18 @@ | |||
| import { defineConfig } from 'vite'; | |||
| build: { | ||
| target: "node18", | ||
| ssr: resolve(__dirname, 'index.ts'), // ✅ correct SSR entry | ||
| rollupOptions: { |
| @@ -20,9 +24,9 @@ export interface HerculesFunctionContext { | |||
|
|
|||
| export interface HerculesDataType { | |||
There was a problem hiding this comment.
version is generally not overrideable. It always is the SDK version number
| } | ||
| state.stream = state.client.transfer(builtOptions); | ||
|
|
||
| await handleDataTypes(state, builtOptions, config); |
There was a problem hiding this comment.
Why do we handle the DataTypes before Logon?
|
|
||
| return new Promise(async (resolve, reject) => { | ||
| try { | ||
| for await (let message of state?.stream?.responses || []) { |
| import {constructValue, toAllowedValue} from "@code0-tech/tucana/helpers"; | ||
| import {logger} from "./logger"; | ||
| import 'reflect-metadata'; | ||
| import {connect as connectHelper} from "./sdk/connection/connection"; |
There was a problem hiding this comment.
This is really confusing. Just dont use alias imports
| import {registerRuntimeFunctionDefinitionClass} from "./builder/registerRuntimeFunctionDefinitionClass"; | ||
|
|
||
|
|
||
| const createSdk = (config: ActionSdk["config"], configDefinitions?: HerculesActionConfigurationDefinition[]): ActionSdk => { |
There was a problem hiding this comment.
Why not using EventEmitter in general for js based communication?
| import {buildRuntimeFunctionDefinition} from "./builder"; | ||
| import {constructValue} from "@code0-tech/tucana/helpers"; | ||
|
|
||
| export function registerFunctionDefinitionClass(config: { |
There was a problem hiding this comment.
Why do I need to provide a config to register a function Definition
close #20