@@ -77,11 +77,11 @@ const createSdk = (config: ActionSdk["config"], configDefinitions?: HerculesActi
7777 defaultValue : constructValue ( param . defaultValue || null ) ,
7878 hidden : param . hidden || false ,
7979 optional : param . hidden || false ,
80- runtimeDefinitionName : param . runtimeDefinitionName || param . runtimeName
80+ // runtimeDefinitionName: param.runtimeDefinitionName || param.runtimeName
8181 } ) ) ,
8282 signature : functionDefinition . signature ,
8383 throwsError : functionDefinition . throwsError || false ,
84- runtimeDefinitionName : functionDefinition . runtimeDefinitionName
84+ // runtimeDefinitionName: functionDefinition.runtimeDefinitionName
8585 }
8686 } ) ;
8787 }
@@ -315,22 +315,22 @@ async function connect(state: SdkState, config: ActionSdk["config"], options?: R
315315 }
316316 } )
317317
318- const FunctionDefinitionClient = new FunctionDefinitionServiceClient ( state . transport )
319- await FunctionDefinitionClient . update (
320- FunctionDefinitionUpdateRequest . create (
321- {
322- functions : [
323- ...state . functions . map ( func => ( {
324- ...func . definition ,
325- } ) )
326- ]
327- }
328- ) , builtOptions
329- ) . then ( value => {
330- if ( ! value . response . success ) {
331- return Promise . reject ( value . response ) ;
332- }
333- } )
318+ // const FunctionDefinitionClient = new FunctionDefinitionServiceClient(state.transport)
319+ // await FunctionDefinitionClient.update(
320+ // FunctionDefinitionUpdateRequest.create(
321+ // {
322+ // functions: [
323+ // ...state.functions.map(func => ({
324+ // ...func.definition,
325+ // }))
326+ // ]
327+ // }
328+ // ), builtOptions
329+ // ).then(value => {
330+ // if (!value.response.success) {
331+ // return Promise.reject(value.response);
332+ // }
333+ // })
334334
335335 const flowTypeClient = new FlowTypeServiceClient ( state . transport )
336336 await flowTypeClient . update ( FlowTypeUpdateRequest . create ( {
@@ -388,19 +388,23 @@ function handleExecutionRequest(state: SdkState, message: TransferResponse) {
388388 }
389389 const execution = message . data . execution as ExecutionRequest ;
390390 const func = state . runtimeFunctions . find ( value => value . identifier == execution . functionIdentifier ) ;
391+
391392 if ( func ) {
392393 const params = Object . entries ( execution . parameters ! . fields ! ) . map ( ( [ key , value ] ) => {
393394 const param = func . definition . runtimeParameterDefinitions
394395 . find ( p => p . runtimeName === key ) ;
395396
396397 return param ? toAllowedValue ( value ) : undefined ;
397398 } ) ;
398- const conf = state . projectConfigurations . find ( config => {
399+ let conf = state . projectConfigurations . find ( config => {
399400 return true
400401 } )
401402 if ( ! conf ) {
402403 console . error ( `No configuration found for project ${ execution . projectId } ` )
403- return ;
404+ conf = {
405+ projectId : 0n ,
406+ actionConfigurations : [ ]
407+ }
404408 }
405409
406410 const context : HerculesFunctionContext = {
@@ -437,6 +441,7 @@ function handleExecutionRequest(state: SdkState, message: TransferResponse) {
437441 }
438442 } )
439443 result . then ( ( value : any ) => {
444+ console . log ( constructValue ( value ) )
440445 state . stream ! . requests . send (
441446 TransferRequest . create ( {
442447 data : {
0 commit comments