text: const injection = {
    cds: global.cds,
    inject (cds, force = false) {
      if (force || !injection.cds) {
        if (!cds || typeof cds !== 'object') {
          throw new Error('Injected value is not of type `cds`')
        }
  
        if (Object.keys(cds).length === 0) {
          return
        }
  
        injection.cds = cds
      }
  
      require('@sap/cds-sql').inject(injection.cds, force)
    }
  }
  
  const handler = {
    get: (target, name) => {
      switch (name) {
        case 'inject':
        case 'cds':
          return target[name]
      }
  
      if (name === 'config' && (!target.cds || !target.cds.config)) {
        return { data: {} }
      }
  
      return target.cds[name]
    }
  }
  
  module.exports = new Proxy(injection, handler)
  