File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @prismatic-io/spectral" ,
3- "version" : " 10.5.15 " ,
3+ "version" : " 10.5.16 " ,
44 "description" : " Utility library for building Prismatic connectors and code-native integrations" ,
55 "keywords" : [" prismatic" ],
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ export function createCNIContext(
3232 // They are added to the context via spectral, here.
3333
3434 // @ts -expect-error _components isn't part of the public API
35- const { _components } = context ;
36-
35+ const _components = context . _components ?? { invoke : ( ) => { } } ;
3736 const invoke = ( _components as { invoke : ComponentActionInvokeFunction } ) . invoke ;
3837
3938 // Construct the component methods from the component registry
Original file line number Diff line number Diff line change @@ -878,7 +878,7 @@ const generateTriggerPerformFn = (
878878 componentRef && typeof onTrigger !== "function"
879879 ? async ( context , payload , params ) => {
880880 // @ts -expect-error: _components isn't part of the public API
881- const { _components } = context ;
881+ const _components = context . _components ?? { invokeTrigger : ( ) => { } } ;
882882 const invokeTrigger : TriggerActionInvokeFunction = _components . invokeTrigger ;
883883 const cniContext = createCNIContext ( context , componentRegistry ) ;
884884
@@ -923,8 +923,7 @@ const generateOnInstanceWrapperFn = (
923923 componentRef && typeof onTrigger !== "function"
924924 ? async ( context , params ) => {
925925 // @ts -expect-error: _components isn't part of the public API
926- const { _components } = context ;
927-
926+ const _components = context . _components ?? { invokeTrigger : ( ) => { } } ;
928927 const invokeTrigger : TriggerActionInvokeFunction = _components . invokeTrigger ;
929928 const cniContext = createCNIContext ( context , componentRegistry ) ;
930929 const invokeResponse =
You can’t perform that action at this time.
0 commit comments