packages/umc-managed-store/src/parse-structure.js
function getEntityNameKeyMap(structure) {
    const result = {};
    for (const kk in structure) {
      const vv = structure[kk];
      if (typeof vv === 'string') {
        if (types.isMap(vv)) {
          const info = types.getTypeInfo(vv);
          const entityName = info.entity;

          if (_entityNameType[entityName]) throw new Error(`Duplicate entity ${entityName}`);
          _entityNameType[entityName] = vv;

          result[entityName] = kk;
          delete structure[kk];
        }
      }
    }
    return result;
  }
function getEntityNameKeyMap(structure) {
    const result = {};
    for (const kk in structure) {
      const vv = structure[kk];
      if (typeof vv === 'string') {
        if (types.isMap(vv)) {
          const info = types.getTypeInfo(vv);
          const entityName = info.entity;

          if (_entityNameType[entityName]) throw new Error(`Duplicate entity ${entityName}`);
          _entityNameType[entityName] = vv;

          result[entityName] = kk;
          delete structure[kk];
        }
      }
    }
    return result;
  }
function getEntityNameKeyMap ( structure ) { const result = { } ; for ( const kk in structure ) { const vv = structure [ kk ] ; if ( typeof vv === 'string' ) { if ( types . isMap ( vv ) ) { const info = types . getTypeInfo ( vv ) ; const entityName = info . entity ; if ( _entityNameType [ entityName ] ) throw new Error ( ` ${ entityName } ` ) ; _entityNameType [ entityName ] = vv ; result [ entityName ] = kk ; delete structure [ kk ] ; } } } return result ; }
currently only support top level key
currently only support top level key