updateGlobals = parent => {

  attachOptions($tm);
  attachFunctions($tm);

  // attention: logger() cannot be called before functions are rebuild
  $tm.logger('warn', 'Rebuilt globals');

}
Builds and registers globals and the functions that depend on them.