"use strict";
/* Socket Lib - Built with esbuild */
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stream_exports = {};
__export(stream_exports, {
  globStreamLicenses: () => globStreamLicenses
});
module.exports = __toCommonJS(stream_exports);
var import_globs = require("../paths/globs");
var import_array = require("../primordials/array");
var import_internal = require("./_internal");
// @__NO_SIDE_EFFECTS__
function globStreamLicenses(dirname, options) {
  const {
    ignore: ignoreOpt,
    ignoreOriginals,
    recursive,
    ...globOptions
  } = { __proto__: null, ...options };
  const baseIgnore = (0, import_array.ArrayIsArray)(ignoreOpt) ? (0, import_internal.normalizeIgnorePatterns)(ignoreOpt) : import_internal.defaultIgnore;
  const ignore = [...baseIgnore, "**/*.{cjs,cts,js,json,mjs,mts,ts}"];
  if (ignoreOriginals) {
    ignore.push(import_globs.LICENSE_ORIGINAL_GLOB_RECURSIVE);
  }
  const fastGlob = (0, import_internal.getFastGlob)();
  return fastGlob.globStream(
    [recursive ? import_globs.LICENSE_GLOB_RECURSIVE : import_globs.LICENSE_GLOB],
    {
      __proto__: null,
      absolute: true,
      caseSensitiveMatch: false,
      cwd: dirname,
      ...globOptions,
      ...ignore ? { ignore } : {}
    }
  );
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  globStreamLicenses
});
