Automatically excluded in browser bundles
341641
async function api(endpoint, token) {
	token = token ? `&access_token=${token}` : '';
	const response = await fetch(`https://api.github.com/repos/${endpoint}${token}`);
	return response.json();
}
397855
function isExcludedFromBuild(node) {
	if (node.load.excludeFromBuild) {
		return true;
	}

	if (
		node.load.metadata &&
		node.load.metadata.hasOwnProperty("bundle") &&
		node.load.metadata.bundle === false
	) {
		return true;
	}

	if (
		node.isPlugin &&
		!node.value.includeInBuild &&
		!node.load.metadata.includeInBuild
	) {
		return true;
	}

	return false;
}
780020
def set_exclude_filters(self, exclude_filters):
        '''
        
        '''
        self._exclude_filters = exclude_filters
        self.require_module = False
        for exclude_filter in exclude_filters:
            if not exclude_filter.is_path:
                self.require_module = True
                break
250290
function Bro(bundleFile) {

  var log;

  /**
   * Add bundle file to the list of files in the
   * configuration, right before the first browserified
   * test file and after everything else.
   *
   * That makes sure users can include non-commonJS files
   * prior to the browserified bundle.
   *
   * @param {BundleFile} bundleFile the file containing the browserify bundle
   * @param {Object} config the karma configuration to be updated
   */
  function addBundleFile(bundleFile, config) {

    var files = config.files,
        preprocessors = config.preprocessors;

    // list of patterns using our preprocessor
    var patterns = reduce(preprocessors, function(matched, val, key) {
      if (val.indexOf('browserify') !== -1) {
        matched.push(key);
      }
      return matched;
    }, []);

    // first file being preprocessed
    var file = find(files, function(f) {
      return some(patterns, function(p) {
        return minimatch(f.pattern, p);
      });
    });

    var idx = 0;

    if (file) {
      idx = files.indexOf(file);
    } else {
      log.debug('no matching preprocessed file was found, defaulting to prepend');
    }

    log.debug('add bundle to config.files at position', idx);

    // insert bundle on the correct spot
    files.splice(idx, 0, {
      pattern: bundleFile.location,
      served: true,
      included: true,
      watched: true
    });
  }


  /**
   * The browserify instance that creates the
   * minified bundle and gets added all test files to it.
   */
  var b;


  /**
   * The browserify framework that creates the initial logger and bundle file
   * as well as prepends the bundle file to the karma file configuration.
   */
  function framework(emitter, config, logger) {

    log = logger.create('framework.browserify');

    if (!bundleFile) {
      bundleFile = new BundleFile();
    }

    bundleFile.touch();
    log.debug('created browserify bundle: %s', bundleFile.location);

    b = createBundle(config);

    // TODO(Nikku): hook into karma karmas file update facilities
    // to remove files from the bundle once karma detects the deletion

    // hook into exit for cleanup
    emitter.on('exit', function(done) {
      log.debug('cleaning up');

      if (b.close) {
        b.close();
      }

      bundleFile.remove();
      done();
    });


    // add bundle file to the list of files defined in the
    // configuration. be smart by doing so.
    addBundleFile(bundleFile, config);

    return b;
  }

  framework.$inject = [ 'emitter', 'config', 'logger' ];


  /**
   * Create the browserify bundle
   */
  function createBundle(config) {

    var bopts = config.browserify || {},
        bundleDelay = bopts.bundleDelay || DEFAULT_BUNDLE_DELAY,
        requireName = bopts.externalRequireName || 'require';

    function warn(key) {
      log.warn('Invalid config option: "' + key + 's" should be "' + key + '"');
    }

    forEach([ 'transform', 'plugin' ], function(key) {
      if (bopts[key + 's']) {
        warn(key);
      }
    });

    var browserifyOptions = assign({
      basedir: path.resolve(config.basePath),
      // watchify.args
      cache: {},
      packageCache: {}
    }, omit(bopts, [
      'transform', 'plugin', 'configure', 'bundleDelay'
    ]));

    if ('prebundle' in browserifyOptions) {
      log.warn('The prebundle hook got removed in favor of configure');
    }

    if ('watchify' in browserifyOptions) {
      log.warn('Configure watchify via config.watchify');
    }

    var w = browserify(browserifyOptions);
    w.setMaxListeners(Infinity);

    forEach(bopts.plugin, function(p) {
      // ensure we can pass plugin options as
      // the first parameter
      if (!Array.isArray(p)) {
        p = [ p ];
      }
      w.plugin.apply(w, p);
    });

    forEach(bopts.transform, function(t) {
      // ensure we can pass transform options as
      // the first parameter
      if (!Array.isArray(t)) {
        t = [ t ];
      }
      w.transform.apply(w, t);
    });

    // test if we have a configure function
    if (bopts.configure && typeof bopts.configure === 'function') {
      bopts.configure(w);
    }

    // register rebuild bundle on change
    if (config.autoWatch) {

      if (!watchify) {
        log.error('watchify not found; install it via npm install --save-dev watchify');
        log.error('cannot perform incremental rebuild');

        throw new Error('watchify not found');
      }

      w = watchify(w, config.watchify);

      log.info('registering rebuild (autoWatch=true)');

      w.on('update', function(updated) {

        // we perform an update, karma will trigger one, too
        // because the bundling is deferred only one change will
        // be triggered. Anything else is the result of a
        // raise condition or a problem of watchify firing file
        // changes to late

        log.debug('files changed');
        deferredBundle();
      });

      w.on('log', function(msg) {
        log.info(msg);
      });

      // update bundle file
      w.on('bundled', function(err, content) {
        if (w._builtOnce) {
          bundleFile.update(err ? BUNDLE_ERROR_TPL : content.toString('utf-8'));
          log.info('bundle updated');
        }
      });
    }

    function deferredBundle(cb) {
      if (cb) {
        w.once('bundled', cb);
      }

      rebuild();
    }

    var rebuild = debounce(function rebuild() {

      if (w._bundled) {
        log.debug('resetting bundle');

        var recorded = w._recorded;
        w.reset();

        recorded.forEach(function(e) {
          // we remove missing files on the fly
          // to cope with bundle internals missing
          if (e.file && !fs.existsSync(path.resolve(config.basePath, e.file))) {
            log.debug('removing missing file', e.file);
          } else {
            w.pipeline.write(e);
          }
        });
      }

      w.emit('prebundle', w);

      log.debug('bundling');

      w.bundle(function(err, content) {

        if (err) {
          log.error('bundle error');
          log.error(String(err));
        }

        w.emit('bundled', err, content);
      });
    }, bundleDelay);


    w.bundleFile = function(file, done) {

      var absolutePath = path.resolve(file.path),
          relativePath = path.relative(config.basePath, absolutePath);

      // add file
      log.debug('updating %s in bundle', relativePath);

      // add the file during next prebundle step
      w.once('prebundle', function() {
        w.require('./' + relativePath, { expose: absolutePath });
      });

      deferredBundle(function(err) {
        var stub = 'typeof ' + requireName + ' === "function" && ' + requireName + '("' + escape(absolutePath) + '");';

        done(err, stub);
      });
    };


    /**
     * Wait for the bundle creation to have stabilized (no more additions) and invoke a callback.
     *
     * @param {Function} [callback] invoked with (err, content)
     */
    w.deferredBundle = deferredBundle;

    return w;
  }


  /**
   * A processor that preprocesses commonjs test files which should be
   * delivered via browserify.
   */
  function testFilePreprocessor() {

    return function(content, file, done) {
      b.bundleFile(file, function(err, content) {
        done(content && content.toString());
      });
    };
  }

  testFilePreprocessor.$inject = [ ];


  /**
   * A special preprocessor that builds the main browserify bundle once and
   * passes the bundle contents through on all later preprocessing request.
   */
  function bundlePreprocessor(config) {

    var debug = config.browserify && config.browserify.debug;

    function updateSourceMap(file, content) {
      var map;

      if (debug) {

        map = extractSourceMap(content);

        file.sourceMap = map && map.sourcemap;
      }
    }

    return function(content, file, done) {

      if (b._builtOnce) {
        updateSourceMap(file, content);
        return done(content);
      }

      log.debug('building bundle');

      // wait for the initial bundle to be created
      b.deferredBundle(function(err, content) {

        b._builtOnce = config.autoWatch;

        if (err) {
          return done(BUNDLE_ERROR_TPL);
        }

        content = content.toString('utf-8');
        updateSourceMap(file, content);

        log.info('bundle built');

        done(content);
      });
    };
  }

  bundlePreprocessor.$inject = [ 'config' ];


  // API

  this.framework = framework;

  this.testFilePreprocessor = testFilePreprocessor;
  this.bundlePreprocessor = bundlePreprocessor;
}
134565
function BundleFile() {

  var location = getTempFileName('.browserify.js');

  function write(content) {
    fs.writeFileSync(location, content);
  }

  function exists() {
    return fs.existsSync(location);
  }

  function remove() {
    if (exists()) {
      fs.unlinkSync(location);
    }
  }

  function touch() {
    if (!exists()) {
      write('');
    }
  }


  // API

  this.touch = touch;

  this.update = write;
  this.remove = remove;

  this.location = location;
}
1091309
private function ClearInstalledBundles()
    {
        //Clear bundles without code folder
        $bundles = PathUtil::Bundles();
        $sql = new Sql\Builder($this->connection);
        $inList = $sql->InListFromValues($bundles);
        $tbl = InstalledBundle::Schema()->Table();
        
        $where = $sql->NotIn($tbl->Field('Bundle'), $inList);
        InstalledBundle::Schema()->Delete($where);
        //Clear failed bundles
        $failedList = $sql->InListFromValues(array_keys($this->failedBundles));
        if ($failedList)
        {
            InstalledBundle::Schema()->Delete($sql->In($tbl->Field('Bundle'), $failedList));
        }
    }
520966
public void setExcludedAdUnits(com.google.api.ads.admanager.axis.v201811.AdUnitTargeting[] excludedAdUnits) {
        this.excludedAdUnits = excludedAdUnits;
    }
1131940
function (glob, opts) {
    if (opts.ignore) {
      this.map('exclude', opts.ignore, opts);
    }
    if (opts.exclude) {
      this.map('exclude', opts.exclude, opts);
    }
    if (opts.include) {
      this.map('include', opts.include, opts);
    }

    // if not disabled by the user, run the built-ins
    if (!this.disabled('builtins')) {
      if (!this.disabled('npm')) {
        this.use(npm(opts));
      }
      if (!this.disabled('dotfiles')) {
        this.use(dotfiles()(opts));
      }
      if (!this.disabled('gitignore')) {
        this.use(gitignore()(opts));
      }
    }
  }
725832
function wrapBundle () {
    let wrap = browserify.pipeline.get("wrap");
    let bannerAlreadyAdded = false;
    let banner;

    wrap.push(through(addBannerToBundle));
    if (browserify._options.debug) {
      wrap.push(through(addBannerToSourcemap));
    }

    /**
     * Injects the banner comment block into the Browserify bundle
     */
    function addBannerToBundle (chunk, enc, next) {
      if (!bannerAlreadyAdded) {
        bannerAlreadyAdded = true;
        try {
          banner = getBanner(options);
          this.push(new Buffer(banner));
        }
        catch (e) {
          next(e);
        }
      }
      this.push(chunk);
      next();
    }

    /**
     * Adjusts the sourcemap to account for the banner comment block
     */
    function addBannerToSourcemap (chunk, enc, next) {
      let pushed = false;

      if (banner) {
        // Get the sourcemap, once it exists
        let conv = convertSourcemap.fromSource(chunk.toString("utf8"));
        if (conv) {
          // Offset the sourcemap by the number of lines in the banner
          let offsetMap = offsetSourcemap(conv.toObject(), countLines(banner));
          this.push(new Buffer("\n" + convertSourcemap.fromObject(offsetMap).toComment() + "\n"));
          pushed = true;
        }
      }

      if (!pushed) {
        // This chunk doesn't contain anything for us to modify,
        // so just pass it along as-is
        this.push(chunk);
      }
      next();
    }
  }
612884
function skip(ignoreRouteUrls) {
    return function ignoreUrl(req) {
        const url = req.originalUrl || req.url;
        return ignoreRouteUrls.includes(url);
    };
}
1300610
function DeleteBundle(project, env, bundle) {

    var self = this;
    var reserved = [ 'framework' ];
    self.task = 'delete';//important for later in config init
    self.env = env;

    this.init = this.onInitialize = function (cb) {
        if (self.initialized == undefined) {
            self.initialized = true;
            if (typeof(cb) != 'undefined' && typeof(cb) == 'function') {
                cb(init)
            } else {
                init()
            }
        }

        return self
    }

    var init = function() {
        if ( reserved.indexOf(bundle) > -1 ) {
            console.log('[ '+bundle+' ] is a reserved name. Please, try something else.');
            process.exit(1)
        }
        self.root = getPath('root');

        try {
            self.project = project;
            self.projectData = require(project);

            if ( !fs.existsSync(env) ) {
                fs.writeFileSync(env, '{}')
            }
            self.envData = require(env);

            self.bundle = bundle;

            console.info('removing ', bundle);

            // TODO - Prompt if user want to erase related releases if exist
            var projectObj = require(self.project);
            var linkPath = new _(_(self.root +'/'+ projectObj.bundles[self.bundle].release.link));
            if ( fs.existsSync(linkPath.toString()) ) {
                linkPath.rm(function onLinkDeleted(err) {
                    if (err) {
                        console.error(err.stack||err.message);
                        process.exit(1)
                    } else {
                        deleteBundle()
                    }
                })
            } else {
                deleteBundle()
            }

        } catch (err) {
            console.error(err.stack);
            process.exit(1)
        }
    }

    var deleteSources = function() {
        if (fs.existsSync(_(self.root+'/src/'+self.bundle))) {

            var bundlePath = new _(self.root+'/src/'+self.bundle);
            bundlePath.rm( function bundleRemoved (err) {
                if (err) {
                    console.log(err.stack);
                    process.exit(1)
                }
                console.log('Bundle [ '+bundle+' ] has been removed from your project with success.');
                self.emit('delete#complete', err)
            })
        } else {
            console.log('Bundle [ '+bundle+' ] has been removed from your project with success.');
            self.emit('delete#complete', err)
        }
    }

    var deleteBundle = function() {

        var config = new Config({
            env             : process.env.NODE_ENV,
            executionPath   : self.root,
            startingApp     : self.bundle,
            ginaPath       : GINA_PATH,
            task            : self.task
        });

        config.onReady( function onConfigReady(err, obj) {

            self.conf = obj.conf[bundle][process.env.NODE_ENV];

            removeFromLogs( function logsRemoved (err) {
                if (err) {
                    console.error(err.stack);
                    process.exit(1)
                }
                cleanFile( function logsRemoved (err) {
                    if (err) {
                        console.error(err.stack);
                        process.exit(1)
                    }

                    if (
                        typeof(self.conf['releases'] != undefined)
                        && fs.existsSync(_(self.conf.releases +'/'+ bundle))
                    ) {
                        var relPath = new _(self.conf.releases +'/'+ bundle);
                        relPath.rm( function bundleRemoved (err) {
                            if (err) {
                                console.log(err.stack);
                                process.exit(1)
                            }
                            console.log('Bundle release for [ '+bundle+' ] has been removed from your project with success.');
                            deleteSources()
                        })
                    } else {
                        // deleting soruces
                        deleteSources()
                    }
                })
            })
        })//EO config.onReady
    }

    var cleanFile = function(callback) {
        try {
            if ( typeof(self.envData[self.bundle]) != 'undefined' ) {
                delete(self.envData[self.bundle]);
                fs.writeFileSync(self.env, JSON.stringify(self.envData, null, 4))
            }
            if ( typeof(self.projectData.bundles[self.bundle]) != 'undefined' ) {
                delete(self.projectData.bundles[self.bundle]);
                fs.writeFileSync(self.project, JSON.stringify(self.projectData, null, 4))
            }
            callback()
        } catch (err) {
            callback(err)
        }
    }

    var removeFromLogs = function(callback) {
        var logsPath = _(self.root+'/logs/'+self.bundle);

        if ( fs.existsSync(logsPath) ) {
            logsPath = new _(self.root+'/logs/'+self.bundle);
            logsPath.rm( function logsRemoved (err) {
                callback(err)
            })
        } else {
            callback()
        }
    }

    this.onComplete = function(callback) {
        self.once('delete#complete', function(err) {
            callback(err)
        })
        return self
    }
}
876028
function bundle() {
    return bundler.bundle()
        // log errors if they happen
        .on('error', gutil.log.bind(gutil, 'Browserify Error'))
        .pipe(source('nutella_lib.js'))
        .pipe(gulp.dest('./dist'));
}
1273139
function selectMissing(missing, manifest, fn) {
  fn(null, manifest.filter(function(file) {
    return file && ~missing.indexOf(file.hash);
  }));
}
106326
function createBundle(config) {

    var bopts = config.browserify || {},
        bundleDelay = bopts.bundleDelay || DEFAULT_BUNDLE_DELAY,
        requireName = bopts.externalRequireName || 'require';

    function warn(key) {
      log.warn('Invalid config option: "' + key + 's" should be "' + key + '"');
    }

    forEach([ 'transform', 'plugin' ], function(key) {
      if (bopts[key + 's']) {
        warn(key);
      }
    });

    var browserifyOptions = assign({
      basedir: path.resolve(config.basePath),
      // watchify.args
      cache: {},
      packageCache: {}
    }, omit(bopts, [
      'transform', 'plugin', 'configure', 'bundleDelay'
    ]));

    if ('prebundle' in browserifyOptions) {
      log.warn('The prebundle hook got removed in favor of configure');
    }

    if ('watchify' in browserifyOptions) {
      log.warn('Configure watchify via config.watchify');
    }

    var w = browserify(browserifyOptions);
    w.setMaxListeners(Infinity);

    forEach(bopts.plugin, function(p) {
      // ensure we can pass plugin options as
      // the first parameter
      if (!Array.isArray(p)) {
        p = [ p ];
      }
      w.plugin.apply(w, p);
    });

    forEach(bopts.transform, function(t) {
      // ensure we can pass transform options as
      // the first parameter
      if (!Array.isArray(t)) {
        t = [ t ];
      }
      w.transform.apply(w, t);
    });

    // test if we have a configure function
    if (bopts.configure && typeof bopts.configure === 'function') {
      bopts.configure(w);
    }

    // register rebuild bundle on change
    if (config.autoWatch) {

      if (!watchify) {
        log.error('watchify not found; install it via npm install --save-dev watchify');
        log.error('cannot perform incremental rebuild');

        throw new Error('watchify not found');
      }

      w = watchify(w, config.watchify);

      log.info('registering rebuild (autoWatch=true)');

      w.on('update', function(updated) {

        // we perform an update, karma will trigger one, too
        // because the bundling is deferred only one change will
        // be triggered. Anything else is the result of a
        // raise condition or a problem of watchify firing file
        // changes to late

        log.debug('files changed');
        deferredBundle();
      });

      w.on('log', function(msg) {
        log.info(msg);
      });

      // update bundle file
      w.on('bundled', function(err, content) {
        if (w._builtOnce) {
          bundleFile.update(err ? BUNDLE_ERROR_TPL : content.toString('utf-8'));
          log.info('bundle updated');
        }
      });
    }

    function deferredBundle(cb) {
      if (cb) {
        w.once('bundled', cb);
      }

      rebuild();
    }

    var rebuild = debounce(function rebuild() {

      if (w._bundled) {
        log.debug('resetting bundle');

        var recorded = w._recorded;
        w.reset();

        recorded.forEach(function(e) {
          // we remove missing files on the fly
          // to cope with bundle internals missing
          if (e.file && !fs.existsSync(path.resolve(config.basePath, e.file))) {
            log.debug('removing missing file', e.file);
          } else {
            w.pipeline.write(e);
          }
        });
      }

      w.emit('prebundle', w);

      log.debug('bundling');

      w.bundle(function(err, content) {

        if (err) {
          log.error('bundle error');
          log.error(String(err));
        }

        w.emit('bundled', err, content);
      });
    }, bundleDelay);


    w.bundleFile = function(file, done) {

      var absolutePath = path.resolve(file.path),
          relativePath = path.relative(config.basePath, absolutePath);

      // add file
      log.debug('updating %s in bundle', relativePath);

      // add the file during next prebundle step
      w.once('prebundle', function() {
        w.require('./' + relativePath, { expose: absolutePath });
      });

      deferredBundle(function(err) {
        var stub = 'typeof ' + requireName + ' === "function" && ' + requireName + '("' + escape(absolutePath) + '");';

        done(err, stub);
      });
    };


    /**
     * Wait for the bundle creation to have stabilized (no more additions) and invoke a callback.
     *
     * @param {Function} [callback] invoked with (err, content)
     */
    w.deferredBundle = deferredBundle;

    return w;
  }
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);
}
312191
def exclude_package(self, package):
        """"""

        pfx = package + '.'
        if self.packages:
            self.packages = [
                p for p in self.packages
                if p != package and not p.startswith(pfx)
            ]

        if self.py_modules:
            self.py_modules = [
                p for p in self.py_modules
                if p != package and not p.startswith(pfx)
            ]

        if self.ext_modules:
            self.ext_modules = [
                p for p in self.ext_modules
                if p.name != package and not p.name.startswith(pfx)
            ]
266924
function addNotPackPluginRes(target, resFiles) {
    resFiles.forEach(function (item) {
        if (target.indexOf(item) === -1) {
            target.push(item);
        }
    });
}