'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = refreshScope;

var _scope;

function _load_scope() {
  return _scope = require('../../../scope');
}

function refreshScope(path) {
  return (0, (_scope || _load_scope()).loadScope)(path).then(function (scope) {
    return scope.objects.list().then(function (objects) {
      return Promise.all(objects.map(function (o) {
        return scope.objects.persistOne(o);
      }));
    });
  });
}