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AAO,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,mBAAc,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IACvJ,CAAC,CAAC,CAAA;AACJ,CAAC;AA7BD,8BA6BC","sourcesContent":["import BluebirdPromise from \"bluebird-lst\"\nimport { asArray, log } from \"builder-util\"\nimport { copyDir, copyOrLinkFile, Filter, statOrNull, FileTransformer, USE_HARD_LINKS } from \"builder-util/out/fs\"\nimport { mkdir } from \"fs/promises\"\nimport { Minimatch } from \"minimatch\"\nimport * as path from \"path\"\nimport { Configuration, FileSet, Packager, PlatformSpecificBuildOptions } from \"./index\"\nimport { PlatformPackager } from \"./platformPackager\"\nimport { createFilter, hasMagic } from \"./util/filter\"\n\n// https://github.com/electron-userland/electron-builder/issues/733\nconst minimatchOptions = { dot: true }\n\n// noinspection SpellCheckingInspection\nexport const excludedNames =\n \".git,.hg,.svn,CVS,RCS,SCCS,\" +\n \"__pycache__,.DS_Store,thumbs.db,.gitignore,.gitkeep,.gitattributes,.npmignore,\" +\n \".idea,.vs,.flowconfig,.jshintrc,.eslintrc,.circleci,\" +\n \".yarn-integrity,.yarn-metadata.json,yarn-error.log,yarn.lock,package-lock.json,npm-debug.log,\" +\n \"appveyor.yml,.travis.yml,circle.yml,.nyc_output,.husky,.github,electron-builder.env\"\n\nexport const excludedExts =\n \"iml,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,suo,xproj,cc,d.ts,\" +\n // https://github.com/electron-userland/electron-builder/issues/7512\n \"mk,a,o,forge-meta\"\n\nfunction ensureNoEndSlash(file: string): string {\n if (path.sep !== \"/\") {\n file = file.replace(/\\//g, path.sep)\n }\n if (path.sep !== \"\\\\\") {\n file = file.replace(/\\\\/g, path.sep)\n }\n\n if (file.endsWith(path.sep)) {\n return file.substring(0, file.length - 1)\n } else {\n return file\n }\n}\n\n/** @internal */\nexport class FileMatcher {\n readonly from: string\n readonly to: string\n\n readonly patterns: Array\n\n excludePatterns: Array | null = null\n\n readonly isSpecifiedAsEmptyArray: boolean\n\n constructor(\n from: string,\n to: string,\n readonly macroExpander: (pattern: string) => string,\n patterns?: Array | string | null | undefined\n ) {\n this.from = ensureNoEndSlash(macroExpander(from))\n this.to = ensureNoEndSlash(macroExpander(to))\n this.patterns = asArray(patterns).map(it => this.normalizePattern(it))\n this.isSpecifiedAsEmptyArray = Array.isArray(patterns) && patterns.length === 0\n }\n\n normalizePattern(pattern: string) {\n if (pattern.startsWith(\"./\")) {\n pattern = pattern.substring(\"./\".length)\n }\n return path.posix.normalize(this.macroExpander(pattern.replace(/\\\\/g, \"/\")))\n }\n\n addPattern(pattern: string) {\n this.patterns.push(this.normalizePattern(pattern))\n }\n\n prependPattern(pattern: string) {\n this.patterns.unshift(this.normalizePattern(pattern))\n }\n\n isEmpty() {\n return this.patterns.length === 0\n }\n\n containsOnlyIgnore(): boolean {\n return !this.isEmpty() && this.patterns.find(it => !it.startsWith(\"!\")) == null\n }\n\n computeParsedPatterns(result: Array, fromDir?: string): void {\n const relativeFrom = fromDir == null ? null : path.relative(fromDir, this.from)\n\n if (this.patterns.length === 0 && relativeFrom != null) {\n // file mappings, from here is a file\n result.push(new Minimatch(relativeFrom, minimatchOptions))\n return\n }\n\n for (let pattern of this.patterns) {\n if (relativeFrom != null) {\n pattern = path.join(relativeFrom, pattern)\n }\n\n const parsedPattern = new Minimatch(pattern, minimatchOptions)\n result.push(parsedPattern)\n\n // do not add if contains dot (possibly file if has extension)\n if (!pattern.includes(\".\") && !hasMagic(parsedPattern)) {\n // https://github.com/electron-userland/electron-builder/issues/545\n // add **/*\n result.push(new Minimatch(`${pattern}/**/*`, minimatchOptions))\n }\n }\n }\n\n createFilter(): Filter {\n const parsedPatterns: Array = []\n this.computeParsedPatterns(parsedPatterns)\n return createFilter(this.from, parsedPatterns, this.excludePatterns)\n }\n\n toString() {\n return `from: ${this.from}, to: ${this.to}, patterns: ${this.patterns.join(\", \")}`\n }\n}\n\n/** @internal */\nexport function getMainFileMatchers(\n appDir: string,\n destination: string,\n macroExpander: (pattern: string) => string,\n platformSpecificBuildOptions: PlatformSpecificBuildOptions,\n platformPackager: PlatformPackager,\n outDir: string,\n isElectronCompile: boolean\n): Array {\n const packager = platformPackager.info\n const buildResourceDir = path.resolve(packager.projectDir, packager.buildResourcesDir)\n\n let matchers = packager.isPrepackedAppAsar\n ? null\n : getFileMatchers(packager.config, \"files\", destination, {\n macroExpander,\n customBuildOptions: platformSpecificBuildOptions,\n globalOutDir: outDir,\n defaultSrc: appDir,\n })\n if (matchers == null) {\n matchers = [new FileMatcher(appDir, destination, macroExpander)]\n }\n\n const matcher = matchers[0]\n // add default patterns, but only if from equals to app dir\n if (matcher.from !== appDir) {\n return matchers\n }\n\n // https://github.com/electron-userland/electron-builder/issues/1741#issuecomment-311111418 so, do not use inclusive patterns\n const patterns = matcher.patterns\n\n const customFirstPatterns: Array = []\n // electron-webpack - we need to copy only package.json and node_modules from root dir (and these files are added by default), so, explicit empty array is specified\n if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {\n customFirstPatterns.push(\"**/*\")\n } else if (!patterns.includes(\"package.json\")) {\n patterns.push(\"package.json\")\n }\n\n customFirstPatterns.push(\"!**/node_modules\")\n\n // https://github.com/electron-userland/electron-builder/issues/1482\n const relativeBuildResourceDir = path.relative(matcher.from, buildResourceDir)\n if (relativeBuildResourceDir.length !== 0 && !relativeBuildResourceDir.startsWith(\".\")) {\n customFirstPatterns.push(`!${relativeBuildResourceDir}{,/**/*}`)\n }\n\n const relativeOutDir = matcher.normalizePattern(path.relative(packager.projectDir, outDir))\n if (!relativeOutDir.startsWith(\".\")) {\n customFirstPatterns.push(`!${relativeOutDir}{,/**/*}`)\n }\n\n // add our default exclusions after last user possibly defined \"all\"/permissive pattern\n let insertIndex = 0\n for (let i = patterns.length - 1; i >= 0; i--) {\n if (patterns[i].startsWith(\"**/\")) {\n insertIndex = i + 1\n break\n }\n }\n patterns.splice(insertIndex, 0, ...customFirstPatterns)\n\n patterns.push(`!**/*.{${excludedExts}${packager.config.includePdb === true ? \"\" : \",pdb\"}}`)\n patterns.push(\"!**/._*\")\n patterns.push(\"!**/electron-builder.{yaml,yml,json,json5,toml,ts}\")\n patterns.push(`!**/{${excludedNames}}`)\n\n if (isElectronCompile) {\n patterns.push(\"!.cache{,/**/*}\")\n }\n patterns.push(\"!.yarn{,/**/*}\")\n\n // https://github.com/electron-userland/electron-builder/issues/1969\n // exclude ony for app root, use .yarnclean to clean node_modules\n patterns.push(\"!.editorconfig\")\n patterns.push(\"!.yarnrc.yml\")\n\n const debugLogger = packager.debugLogger\n if (debugLogger.isEnabled) {\n //tslint:disable-next-line:no-invalid-template-strings\n debugLogger.add(`${macroExpander(\"${arch}\")}.firstOrDefaultFilePatterns`, patterns)\n }\n return matchers\n}\n\n/** @internal */\nexport function getNodeModuleFileMatcher(\n appDir: string,\n destination: string,\n macroExpander: (pattern: string) => string,\n platformSpecificBuildOptions: PlatformSpecificBuildOptions,\n packager: Packager\n): FileMatcher {\n // https://github.com/electron-userland/electron-builder/pull/2948#issuecomment-392241632\n // grab only excludes\n const matcher = new FileMatcher(appDir, destination, macroExpander)\n\n function addPatterns(patterns: Array | string | null | undefined | FileSet) {\n if (patterns == null) {\n return\n } else if (!Array.isArray(patterns)) {\n if (typeof patterns === \"string\" && patterns.startsWith(\"!\")) {\n matcher.addPattern(patterns)\n return\n }\n // ignore object form\n return\n }\n\n for (const pattern of patterns) {\n if (typeof pattern === \"string\") {\n if (pattern.startsWith(\"!\")) {\n matcher.addPattern(pattern)\n }\n } else {\n const fileSet = pattern\n if (fileSet.from == null || fileSet.from === \".\") {\n for (const p of asArray(fileSet.filter)) {\n matcher.addPattern(p)\n }\n }\n }\n }\n }\n\n addPatterns(packager.config.files)\n addPatterns(platformSpecificBuildOptions.files)\n\n if (!matcher.isEmpty()) {\n matcher.prependPattern(\"**/*\")\n }\n\n const debugLogger = packager.debugLogger\n if (debugLogger.isEnabled) {\n //tslint:disable-next-line:no-invalid-template-strings\n debugLogger.add(`${macroExpander(\"${arch}\")}.nodeModuleFilePatterns`, matcher.patterns)\n }\n\n return matcher\n}\n\nexport interface GetFileMatchersOptions {\n readonly macroExpander: (pattern: string) => string\n readonly customBuildOptions: PlatformSpecificBuildOptions\n readonly globalOutDir: string\n\n readonly defaultSrc: string\n}\n\n/** @internal */\nexport function getFileMatchers(\n config: Configuration,\n name: \"files\" | \"extraFiles\" | \"extraResources\" | \"asarUnpack\" | \"extraDistFiles\",\n defaultDestination: string,\n options: GetFileMatchersOptions\n): Array | null {\n const defaultMatcher = new FileMatcher(options.defaultSrc, defaultDestination, options.macroExpander)\n const fileMatchers: Array = []\n\n function addPatterns(patterns: Array | string | null | undefined | FileSet) {\n if (patterns == null) {\n return\n } else if (!Array.isArray(patterns)) {\n if (typeof patterns === \"string\") {\n defaultMatcher.addPattern(patterns)\n return\n }\n patterns = [patterns]\n }\n\n for (const pattern of patterns) {\n if (typeof pattern === \"string\") {\n // use normalize to transform ./foo to foo\n defaultMatcher.addPattern(pattern)\n } else if (name === \"asarUnpack\") {\n throw new Error(`Advanced file copying not supported for \"${name}\"`)\n } else {\n const from = pattern.from == null ? options.defaultSrc : path.resolve(options.defaultSrc, pattern.from)\n const to = pattern.to == null ? defaultDestination : path.resolve(defaultDestination, pattern.to)\n fileMatchers.push(new FileMatcher(from, to, options.macroExpander, pattern.filter))\n }\n }\n }\n\n if (name !== \"extraDistFiles\") {\n addPatterns((config as any)[name])\n }\n addPatterns((options.customBuildOptions as any)[name])\n\n if (!defaultMatcher.isEmpty()) {\n // default matcher should be first in the array\n fileMatchers.unshift(defaultMatcher)\n }\n\n // we cannot exclude the whole out dir, because sometimes users want to use some file in the out dir in the patterns\n const relativeOutDir = defaultMatcher.normalizePattern(path.relative(options.defaultSrc, options.globalOutDir))\n if (!relativeOutDir.startsWith(\".\")) {\n defaultMatcher.addPattern(`!${relativeOutDir}/*-unpacked{,/**/*}`)\n }\n\n return fileMatchers.length === 0 ? null : fileMatchers\n}\n\n/** @internal */\nexport function copyFiles(matchers: Array | null, transformer: FileTransformer | null, isUseHardLink?: boolean): Promise {\n if (matchers == null || matchers.length === 0) {\n return Promise.resolve()\n }\n\n return BluebirdPromise.map(matchers, async (matcher: FileMatcher) => {\n const fromStat = await statOrNull(matcher.from)\n if (fromStat == null) {\n log.warn({ from: matcher.from }, `file source doesn't exist`)\n return\n }\n\n if (fromStat.isFile()) {\n const toStat = await statOrNull(matcher.to)\n // https://github.com/electron-userland/electron-builder/issues/1245\n if (toStat != null && toStat.isDirectory()) {\n return await copyOrLinkFile(matcher.from, path.join(matcher.to, path.basename(matcher.from)), fromStat, isUseHardLink)\n }\n\n await mkdir(path.dirname(matcher.to), { recursive: true })\n return await copyOrLinkFile(matcher.from, matcher.to, fromStat)\n }\n\n if (matcher.isEmpty() || matcher.containsOnlyIgnore()) {\n matcher.prependPattern(\"**/*\")\n }\n log.debug({ matcher }, \"copying files using pattern\")\n return await copyDir(matcher.from, matcher.to, { filter: matcher.createFilter(), transformer, isUseHardLink: isUseHardLink ? USE_HARD_LINKS : null })\n })\n}\n"]}