@@ -146,7 +146,7 @@ function buildSettingDecorators(settings: any[]): string[] {
146146 ...( s . optional ? [ `optional: true,` ] : [ ] ) ,
147147 ...( s . hidden ? [ `hidden: true,` ] : [ ] ) ,
148148 ] ;
149- return [ `@RuntimeEventSetting ({` , ...props . map ( p => ` ${ p } ` ) , `})` ] ;
149+ return [ `@EventSetting ({` , ...props . map ( p => ` ${ p } ` ) , `})` ] ;
150150 } ) ;
151151}
152152
@@ -159,26 +159,23 @@ function buildParameterDecorators(params: any[]): string[] {
159159 ...( p . optional ? [ `optional: true,` ] : [ ] ) ,
160160 ...( p . hidden ? [ `hidden: true,` ] : [ ] ) ,
161161 ] ;
162- return [ `@RuntimeParameter ({` , ...props . map ( p => ` ${ p } ` ) , `})` ] ;
162+ return [ `@Parameter ({` , ...props . map ( p => ` ${ p } ` ) , `})` ] ;
163163 } ) ;
164164}
165165
166166function generateRuntimeFlowType ( json : Record < string , unknown > , className : string , relModule : string ) : string {
167167 const src = ( seg : string ) => srcRelativePath ( relModule , seg ) ;
168- const linkedIds = json . linkedDataTypeIdentifiers as string [ ] | undefined ;
169168 const settings = json . runtimeSettings as any [ ] | undefined ;
170169 const metaDecorators = collectMetaDecorators ( json ) ;
171170
172171 const imports = [
173172 `import {RuntimeEventRunnable} from "${ src ( "models/runtime_event.model" ) } ";` ,
174- `import {${ metaDecorators . join ( ", " ) } } from "${ src ( "decorators/meta" ) } ";` ,
175- ...( linkedIds ?. length ? [ `import {LinkedDataTypeIdentifiers} from "${ src ( "decorators/function" ) } ";` ] : [ ] ) ,
176- ...( settings ?. length ? [ `import {RuntimeEventSetting} from "${ src ( "decorators/runtime-event" ) } ";` ] : [ ] ) ,
173+ `import {${ metaDecorators . join ( ", " ) } } from "${ src ( "decorators/meta.dec" ) } ";` ,
174+ ...( settings ?. length ? [ `import {EventSetting} from "${ src ( "decorators/event.dec" ) } ";` ] : [ ] ) ,
177175 ] ;
178176
179177 const decorators = [
180178 ...buildMetaDecorators ( json , "identifier" ) ,
181- ...( linkedIds ?. length ? [ `@LinkedDataTypeIdentifiers(${ linkedIds . map ( s => JSON . stringify ( s ) ) . join ( ", " ) } )` ] : [ ] ) ,
182179 ...buildSettingDecorators ( settings ?? [ ] ) ,
183180 ] ;
184181
@@ -193,28 +190,25 @@ function generateRuntimeFlowType(json: Record<string, unknown>, className: strin
193190
194191function generateRuntimeFunction ( json : Record < string , unknown > , className : string , relModule : string ) : string {
195192 const src = ( seg : string ) => srcRelativePath ( relModule , seg ) ;
196- const linkedIds = json . linkedDataTypeIdentifiers as string [ ] | undefined ;
197193 const params = json . runtimeParameterDefinitions as any [ ] | undefined ;
198194 const metaDecorators = collectMetaDecorators ( json ) ;
199195 const funcDecorators = [
200- "OmitFunctionDefinition" ,
201196 ...( json . throwsError ? [ "ThrowsError" ] : [ ] ) ,
202- ...( params ?. length ? [ "RuntimeParameter" ] : [ ] ) ,
203- ...( linkedIds ?. length ? [ "LinkedDataTypeIdentifiers" ] : [ ] ) ,
197+ ...( params ?. length ? [ "Parameter" ] : [ ] ) ,
204198 ] ;
205199
206200 const imports = [
207201 `import {RuntimeFunctionRunnable} from "${ src ( "models/runtime_function.model" ) } ";` ,
208- `import {${ metaDecorators . join ( ", " ) } } from "${ src ( "decorators/meta" ) } ";` ,
209- `import {${ funcDecorators . join ( ", " ) } } from "${ src ( "decorators/function" ) } ";` ,
202+ `import {${ metaDecorators . join ( ", " ) } } from "${ src ( "decorators/meta.dec" ) } ";` ,
203+ `import {OmitRuntimeFunction} from "${ src ( "decorators/runtime_function.dec" ) } ";` ,
204+ ...( funcDecorators . length ? [ `import {${ funcDecorators . join ( ", " ) } } from "${ src ( "decorators/function.dec" ) } ";` ] : [ ] ) ,
210205 `import type {PlainValue} from "@code0-tech/tucana/helpers";` ,
211206 ] ;
212207
213208 const decorators = [
214- `@OmitFunctionDefinition ()` ,
209+ `@OmitRuntimeFunction ()` ,
215210 ...buildMetaDecorators ( json , "runtimeName" ) ,
216211 ...( json . throwsError ? [ `@ThrowsError()` ] : [ ] ) ,
217- ...( linkedIds ?. length ? [ `@LinkedDataTypeIdentifiers(${ linkedIds . map ( s => JSON . stringify ( s ) ) . join ( ", " ) } )` ] : [ ] ) ,
218212 ...buildParameterDecorators ( params ?? [ ] ) ,
219213 ] ;
220214
0 commit comments