Fetch main Monaco bundles.
344918
function loadMonaco(monaco) {
		var deps = [
			'vs/editor/editor.main.nls',
			'vs/editor/editor.main'
		];

		charto.monaco = monaco;

		// Monaco loader sets exports, then gets confused by them.
		exports = void 0;

		return(new Promise(function(resolve, reject) {
			monaco.require(deps, resolve);
		}));
	}
1210064
protected function GetIncludes()
    {
        Requirements::combine_files(
            'frontend-lib.js',
            array(
            THIRDPARTY_DIR.'/jquery/jquery.js',
            FRAMEWORK_DIR.'/javascript/jquery-ondemand/jquery.ondemand.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/lib.js',
            THIRDPARTY_DIR.'/jquery-ui/jquery-ui.js',
//            THIRDPARTY_DIR . '/json-js/json2.js',
            THIRDPARTY_DIR.'/jquery-entwine/dist/jquery.entwine-dist.js',
//            THIRDPARTY_DIR . '/jquery-cookie/jquery.cookie.js',
            THIRDPARTY_DIR.'/jquery-query/jquery.query.js',
            THIRDPARTY_DIR.'/jquery-form/jquery.form.js',
            FRAMEWORK_ADMIN_DIR.'/thirdparty/jquery-notice/jquery.notice.js',
//            FRAMEWORK_ADMIN_DIR . '/thirdparty/jsizes/lib/jquery.sizes.js',
            FRAMEWORK_ADMIN_DIR.'/thirdparty/jlayout/lib/jlayout.border.js',
            FRAMEWORK_ADMIN_DIR.'/thirdparty/jlayout/lib/jquery.jlayout.js',
//            FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.js',
//            FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js',
//            FRAMEWORK_ADMIN_DIR . '/thirdparty/history-js/scripts/uncompressed/history.html4.js',
//            THIRDPARTY_DIR . '/jstree/jquery.jstree.js',
            FRAMEWORK_ADMIN_DIR.'/thirdparty/chosen/chosen/chosen.jquery.js',
            FRAMEWORK_ADMIN_DIR.'/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js',
//            FRAMEWORK_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js',
            FRAMEWORK_DIR.'/javascript/i18n.js',
//            FRAMEWORK_DIR . '/javascript/TreeDropdownField.js',
//            FRAMEWORK_DIR . '/javascript/DateField.js',
            FRAMEWORK_DIR.'/javascript/HtmlEditorField.js',
//            FRAMEWORK_DIR . '/javascript/TabSet.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/ssui.core.js',
//            FRAMEWORK_DIR . '/javascript/GridField.js',
            )
        );
        Requirements::combine_files(
            'frontend-cmsmain.js',
            array_merge(
                array(
            CMS_DIR.'/javascript/CMSMain.js',
            CMS_DIR.'/javascript/CMSMain.EditForm.js',
            CMS_DIR.'/javascript/CMSMain.AddForm.js',
            CMS_DIR.'/javascript/CMSPageHistoryController.js',
            CMS_DIR.'/javascript/CMSMain.Tree.js',
            CMS_DIR.'/javascript/SilverStripeNavigator.js',
            CMS_DIR.'/javascript/SiteTreeURLSegmentField.js'
                ), Requirements::add_i18n_javascript(CMS_DIR.'/javascript/lang', true, true)
            )
        );

        $leftAndMainIncludes = array_unique(array_merge(
                array(
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Layout.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.ActionTabSet.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Panel.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Tree.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Content.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.EditForm.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Menu.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Preview.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.BatchActions.js',
            FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.FieldHelp.js',
//            FRAMEWORK_ADMIN_DIR . '/javascript/LeftAndMain.TreeDropdownField.js',
                ), Requirements::add_i18n_javascript(FRAMEWORK_DIR.'/javascript/lang', true, true),
                                                     Requirements::add_i18n_javascript(FRAMEWORK_ADMIN_DIR.'/javascript/lang', true, true)
        ));

        if ($this->config()->session_keepalive_ping) {
            $leftAndMainIncludes[] = FRAMEWORK_ADMIN_DIR.'/javascript/LeftAndMain.Ping.js';
        }

        $jsMin = (Director::isDev()) ? "" : ".min";
        Requirements::javascript(FRONTEND_ADMIN_DIR.'/javascript/dist/FrontEndEditorToolbar'.$jsMin.'.js');
        Requirements::css(FRAMEWORK_ADMIN_DIR.'/thirdparty/chosen/chosen/chosen.css');
        Requirements::css(FRAMEWORK_DIR.'/thirdparty/jquery-ui-themes/smoothness/jquery-ui.css');
        Requirements::css(CMS_DIR."/css/screen.css");
        Requirements::css(FRAMEWORK_DIR.'/css/AssetUploadField.css');
        Requirements::css(FRAMEWORK_DIR.'/css/UploadField.css');
        Requirements::css(FRAMEWORK_ADMIN_DIR."/css/screen.css");
    }
1157480
def fetch_build_eggs(self, requires):
        """"""
        resolved_dists = pkg_resources.working_set.resolve(
            pkg_resources.parse_requirements(requires),
            installer=self.fetch_build_egg,
            replace_conflicting=True,
        )
        for dist in resolved_dists:
            pkg_resources.working_set.add(dist, replace=True)
        return resolved_dists
1277113
def extract_deps(bundles, log=None):
    """"""
    def _flatten(bundle):
        deps = []
        if hasattr(bundle, 'npm'):
            deps.append(bundle.npm)
        for content in bundle.contents:
            if isinstance(content, BundleBase):
                deps.extend(_flatten(content))
        return deps

    flatten_deps = []
    for bundle in bundles:
        flatten_deps.extend(_flatten(bundle))

    packages = defaultdict(list)
    for dep in flatten_deps:
        for pkg, version in dep.items():
            packages[pkg].append(version)

    deps = {}
    for package, versions in packages.items():
        deps[package] = semver.max_satisfying(versions, '*', True)

        if log and len(versions) > 1:
            log('Warn: {0} version {1} resolved to: {2}'.format(
                repr(package), versions, repr(deps[package])
            ))

    return deps
1265172
def find_ca_bundle():
    """"""
    extant_cert_paths = filter(os.path.isfile, cert_paths)
    return (
        get_win_certfile()
        or next(extant_cert_paths, None)
        or _certifi_where()
    )
261467
function getDependencies(platform, bundleEntry) {
    return packagerServer.getDependencies({
      platform: platform,
      dev: true,
      hot: true,
      entryFile: bundleEntry,
    }).then(response => {
      const {getModuleId} = response;

      // for each dependency builds the object:
      // `{path: '/a/b/c.js', deps: ['modA', 'modB', ...]}`
      return Promise.all(Object.values(response.dependencies).map(dep => {
        return dep.getName().then(depName => {
          if (dep.isAsset() || dep.isAsset_DEPRECATED() || dep.isJSON()) {
            return Promise.resolve({path: dep.path, deps: []});
          }
          return packagerServer.getShallowDependencies({
            platform: platform,
            dev: true,
            hot: true,
            entryFile: dep.path
          })
            .then(deps => {
              return {
                path: dep.path,
                name: depName,
                deps,
              };
            });
        });
      }))
      .then(deps => {
        // list with all the dependencies' filenames the bundle entry has
        const dependenciesCache = response.dependencies.map(dep => dep.path);

        // map from module name to path
        const moduleToFilenameCache = Object.create(null);
        deps.forEach(dep => {
          moduleToFilenameCache[dep.name] = dep.path;
        });

        // map that indicates the shallow dependency each file included on the
        // bundle has
        const shallowDependencies = Object.create(null);
        deps.forEach(dep => {
          shallowDependencies[dep.path] = dep.deps;
        });

        // map from module name to the modules' dependencies the bundle entry
        // has
        const dependenciesModulesCache = Object.create(null);
        response.dependencies.forEach(dep => {
          dependenciesModulesCache[getModuleId(dep)] = dep;
        });


        const inverseDependenciesCache = Object.create(null);
        const inverseDependencies = getInverseDependencies(response);
        for (const [module, dependents] of inverseDependencies) {
          inverseDependenciesCache[getModuleId(module)] =
            Array.from(dependents).map(getModuleId);
        }

        return {
          dependenciesCache,
          dependenciesModulesCache,
          shallowDependencies,
          inverseDependenciesCache,
          resolutionResponse: response,
        };
      });
    });
  }
691447
function getAllPackages () {
  const packages = [
    // main package
    {
      entry: config.entry,
      jsName: 'index',
      cssName: 'style',
      globName: config.fullname,
      amdName: config.name,
    },
  ]

  return Promise.all([
    packagesFromPath(utils.resolve('src/component'), utils.resolve('src/component')),
    packagesFromPath(utils.resolve('src/mixin'), srcPath),
    packagesFromPath(utils.resolve('src/ol-ext'), srcPath),
    packagesFromPath(utils.resolve('src/rx-ext'), srcPath),
    packagesFromPath(utils.resolve('src/util'), srcPath),
  ]).then(otherPackages => {
    return packages.concat(otherPackages.reduce((all, packages) => all.concat(packages), []))
  })
}
465699
public static List<Bundle> getBundles( BundleContext bc, String symbolicName )
    {
        List<Bundle> bundles = new ArrayList<Bundle>();
        for( Bundle bundle : bc.getBundles() )
        {
            if( bundle.getSymbolicName().equals( symbolicName ) )
            {
                bundles.add( bundle );
            }
        }
        return bundles;
    }
964048
protected static function fetch_subsystems() {
        global $CFG;

        // NOTE: Any additions here must be verified to not collide with existing add-on modules and subplugins!!!

        $info = array(
            'access'      => null,
            'admin'       => $CFG->dirroot.'/'.$CFG->admin,
            'analytics'   => $CFG->dirroot . '/analytics',
            'antivirus'   => $CFG->dirroot . '/lib/antivirus',
            'auth'        => $CFG->dirroot.'/auth',
            'availability' => $CFG->dirroot . '/availability',
            'backup'      => $CFG->dirroot.'/backup/util/ui',
            'badges'      => $CFG->dirroot.'/badges',
            'block'       => $CFG->dirroot.'/blocks',
            'blog'        => $CFG->dirroot.'/blog',
            'bulkusers'   => null,
            'cache'       => $CFG->dirroot.'/cache',
            'calendar'    => $CFG->dirroot.'/calendar',
            'cohort'      => $CFG->dirroot.'/cohort',
            'comment'     => $CFG->dirroot.'/comment',
            'competency'  => $CFG->dirroot.'/competency',
            'completion'  => $CFG->dirroot.'/completion',
            'countries'   => null,
            'course'      => $CFG->dirroot.'/course',
            'currencies'  => null,
            'customfield' => $CFG->dirroot.'/customfield',
            'dbtransfer'  => null,
            'debug'       => null,
            'editor'      => $CFG->dirroot.'/lib/editor',
            'edufields'   => null,
            'enrol'       => $CFG->dirroot.'/enrol',
            'error'       => null,
            'favourites'  => $CFG->dirroot . '/favourites',
            'filepicker'  => null,
            'fileconverter' => $CFG->dirroot.'/files/converter',
            'files'       => $CFG->dirroot.'/files',
            'filters'     => $CFG->dirroot.'/filter',
            //'fonts'       => null, // Bogus.
            'form'        => $CFG->dirroot.'/lib/form',
            'grades'      => $CFG->dirroot.'/grade',
            'grading'     => $CFG->dirroot.'/grade/grading',
            'group'       => $CFG->dirroot.'/group',
            'help'        => null,
            'hub'         => null,
            'imscc'       => null,
            'install'     => null,
            'iso6392'     => null,
            'langconfig'  => null,
            'license'     => null,
            'mathslib'    => null,
            'media'       => $CFG->dirroot.'/media',
            'message'     => $CFG->dirroot.'/message',
            'mimetypes'   => null,
            'mnet'        => $CFG->dirroot.'/mnet',
            //'moodle.org'  => null, // Not used any more.
            'my'          => $CFG->dirroot.'/my',
            'notes'       => $CFG->dirroot.'/notes',
            'pagetype'    => null,
            'pix'         => null,
            'plagiarism'  => $CFG->dirroot.'/plagiarism',
            'plugin'      => null,
            'portfolio'   => $CFG->dirroot.'/portfolio',
            'privacy'     => $CFG->dirroot . '/privacy',
            'question'    => $CFG->dirroot.'/question',
            'rating'      => $CFG->dirroot.'/rating',
            'repository'  => $CFG->dirroot.'/repository',
            'rss'         => $CFG->dirroot.'/rss',
            'role'        => $CFG->dirroot.'/'.$CFG->admin.'/roles',
            'search'      => $CFG->dirroot.'/search',
            'table'       => null,
            'tag'         => $CFG->dirroot.'/tag',
            'timezones'   => null,
            'user'        => $CFG->dirroot.'/user',
            'userkey'     => $CFG->dirroot.'/lib/userkey',
            'webservice'  => $CFG->dirroot.'/webservice',
        );

        return $info;
    }
532131
function bundleDTS() {
    const DST_PATH = path.join(__dirname, '..', config.dir.pkg);
    const TYPE_DEF_FILE = path.join(DST_PATH, config.dir.types, config.main.bundle_d_ts);
    const SRC_DEF_FILE = path.join(__dirname, '..', config.dir.built, config.main.basename + '-all.d.ts');

    let src = '\ufeff' + banner('.d.ts', config.main.basename) + fs.readFileSync(SRC_DEF_FILE).toString()
            .replace(/^\ufeff/gm, '')
            .replace(/\r\n/gm, '\n')
    ;

    const refPathInfo = [];
    const refPathDefs = src.match(/<reference path="[\s\S]*?"/g);

    if (null != refPathDefs) {
        refPathDefs.forEach((refpath) => {
            const filePath = refpath.match(/("|')[\s\S]*?("|')/)[0].replace(/("|')/g, '');
            const fileName = path.basename(filePath);
            refPathInfo.push({
                refpath: refpath,
                path: filePath,
                file: fileName,
            });
        });
        refPathInfo.forEach((target) => {
            src = src.replace(target.refpath, '<reference path="' + target.file + '"');
        });
        // remove '_dev.dependencies.d.ts' reference.
        src = src.replace(/\/\/\/ <reference path="_dev.dependencies.d.ts"[\s\S]*?\n/g, '');
    }

    if (!fs.existsSync(path.join(DST_PATH, config.dir.types))) {
        fs.mkdirSync(path.join(DST_PATH, config.dir.types));
    }
    fs.writeFileSync(TYPE_DEF_FILE, src);
}
178925
protected void getServices(BundleContext bundleCtx) {
        context = bundleCtx;

        // OSGi 4.3 uses the bundle.adapt() mechanism as a way to get to
        // behavior that is fundamentally a part of the framework
        frameworkStartLevel = bundleCtx.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).adapt(FrameworkStartLevel.class);
        frameworkStartLevel.setInitialBundleStartLevel(KernelStartLevel.ACTIVE.getLevel());

        serviceTracker = new ServiceTracker<LibertyBootRuntime, LibertyBootRuntime>(context, LibertyBootRuntime.class, null);
        serviceTracker.open();
    }
346807
function getPeerGlobals(externals = [], bundleType) {
  const peerGlobals = {}
  externals.forEach(name => {
    if (!knownGlobals[name] && bundleType === UNIVERSAL) {
      throw new Error("Cannot build UMD without a global name for: " + name)
    }
    peerGlobals[name] = knownGlobals[name]
  })
  return peerGlobals
}
272751
def get_bundle(self, bundle_name, extensions=None):
        
        if self.stats.get('status') == 'done':
            bundle = self.stats.get('chunks', {}).get(bundle_name, None)
            if bundle is None:
                raise KeyError('No such bundle {0!r}.'.format(bundle_name))
            test = self._chunk_filter(extensions)
            return [self._add_url(c) for c in bundle if test(c)]
        elif self.stats.get('status') == 'error':
            raise RuntimeError("{error}: {message}".format(**self.stats))
        else:
            raise RuntimeError(
                "Bad webpack stats file {0} status: {1!r}"
                .format(self.state.stats_file, self.stats.get('status')))
183923
def require(self, *namespecs):
        """"""
        blacklist = set([n[1:] for n in namespecs if n.startswith('!')])
        not_blacklist = [n for n in namespecs if not n.startswith('!')]
        return Bundle(*[bundle for name, version, bundle
            in self._require_recursive(*not_blacklist) if name not in blacklist])
276830
def bundle(self, bundle_id, channel=None):
        '''
        '''
        return self.entity(bundle_id, get_files=True, channel=channel)
1074952
public function getNewBundles()
    {
        $bundles = $this->bundleLocatorService->getAvailableBundles();
        $newBundles = [];

        foreach ($bundles as $bundle) {
            // Check whether this bundle has already been installed
            switch ($this->isRegisteredBundle($bundle)) {
                case Installer::STATUS_REGISTERED_NO:
                    $bundle->setStatus(Installer::STATUS_REGISTERED_NO);
                    $newBundles[] = $bundle;
                    break;

                case Installer::STATUS_REGISTERED_OLDER:
                    // Get the existing bundle.
                    /** @var Bundle $registeredBundle */
                    $registeredBundle = $this->em
                        ->getRepository('CampaignChainCoreBundle:Bundle')
                        ->findOneByName($bundle->getName());
                    // Update the existing bundle's data.
                    $registeredBundle->setType($bundle->getType());
                    $registeredBundle->setDescription($bundle->getDescription());
                    $registeredBundle->setLicense($bundle->getLicense());
                    $registeredBundle->setAuthors($bundle->getAuthors());
                    $registeredBundle->setHomepage($bundle->getHomepage());
                    $registeredBundle->setVersion($bundle->getVersion());
                    $registeredBundle->setExtra($bundle->getExtra());

                    $registeredBundle->setStatus(Installer::STATUS_REGISTERED_OLDER);
                    $newBundles[] = $registeredBundle;
                    break;

                case Installer::STATUS_REGISTERED_SAME:
                    $bundle->setStatus(Installer::STATUS_REGISTERED_SAME);
                    break;
            }
        }

        return $newBundles;
    }
269010
def get_packages(self, offset=None, limit=None, api=None):
        
        api = api or self._API
        return AutomationPackage.query(
            automation=self.id, offset=offset, limit=limit, api=api
        )