app-builder-lib 26.4.0 → 26.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/asar/asarUtil.js +105 -73
- package/out/asar/asarUtil.js.map +1 -1
- package/out/macPackager.js +4 -0
- package/out/macPackager.js.map +1 -1
- package/out/node-module-collector/bunNodeModulesCollector.d.ts +4 -5
- package/out/node-module-collector/bunNodeModulesCollector.js +5 -9
- package/out/node-module-collector/bunNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/index.d.ts +5 -4
- package/out/node-module-collector/index.js +6 -3
- package/out/node-module-collector/index.js.map +1 -1
- package/out/node-module-collector/moduleManager.d.ts +52 -0
- package/out/node-module-collector/moduleManager.js +227 -0
- package/out/node-module-collector/moduleManager.js.map +1 -0
- package/out/node-module-collector/nodeModulesCollector.d.ts +8 -23
- package/out/node-module-collector/nodeModulesCollector.js +11 -179
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +3 -9
- package/out/node-module-collector/npmNodeModulesCollector.js +14 -85
- package/out/node-module-collector/npmNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/packageManager.d.ts +2 -1
- package/out/node-module-collector/packageManager.js +2 -0
- package/out/node-module-collector/packageManager.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.js +11 -18
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
- package/out/node-module-collector/traversalNodeModulesCollector.js +122 -0
- package/out/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
- package/out/node-module-collector/types.d.ts +5 -10
- package/out/node-module-collector/types.js.map +1 -1
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js +3 -3
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +1 -2
- package/out/node-module-collector/yarnNodeModulesCollector.js +4 -30
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +1 -1
- package/out/publish/PublishManager.js +3 -2
- package/out/publish/PublishManager.js.map +1 -1
- package/out/util/appFileCopier.js +16 -12
- package/out/util/appFileCopier.js.map +1 -1
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/package.json +8 -8
- package/out/node-module-collector/moduleCache.d.ts +0 -27
- package/out/node-module-collector/moduleCache.js +0 -65
- package/out/node-module-collector/moduleCache.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"moduleCache.js","sourceRoot":"","sources":["../../src/node-module-collector/moduleCache.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAE1C,+BAA8B;AAC9B,+BAA8B;AAS9B,MAAa,WAAW;IAkBtB;QANiB,mBAAc,GAA6B,IAAI,GAAG,EAAE,CAAA;QACpD,gBAAW,GAAwB,IAAI,GAAG,EAAE,CAAA;QAC5C,cAAS,GAAyB,IAAI,GAAG,EAAE,CAAA;QAC3C,aAAQ,GAA0B,IAAI,GAAG,EAAE,CAAA;QAC3C,sBAAiB,GAA+B,IAAI,GAAG,EAAE,CAAA;QAGxE,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;QAClG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,IAAA,qBAAM,EAAC,IAAI,CAAC,CAAC,CAAA;QACnF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;QACnF,IAAI,C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,EAAgC,EAAE;YACjD,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAW;gBACtB,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBACjB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC,CAAA;gBACvC,CAAC;gBACD,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBACtD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;oBACnB,OAAO,KAAK,CAAA;gBACd,CAAC,CAAC,CAAA;YACJ,CAAC;YACD,GAAG,CAAC,CAAC,EAAE,GAAW,EAAE,KAAQ;gBAC1B,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;gBACnB,OAAO,IAAI,CAAA;YACb,CAAC;YACD,GAAG,CAAC,CAAC,EAAE,GAAW;gBAChB,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YACrB,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;CACF;AAnED,kCAmEC","sourcesContent":["import { exists, log } from \"builder-util\"\nimport { PackageJson } from \"./types\"\nimport * as fs from \"fs-extra\"\nimport { resolve } from \"path\"\n\n// Type aliases for clarity\ntype PackageJsonCache = Record<string, Promise<PackageJson>>\ntype RealPathCache = Record<string, Promise<string>>\ntype ExistsCache = Record<string, Promise<boolean>>\ntype LstatCache = Record<string, Promise<fs.Stats>>\ntype RequireResolveCache = Record<string, Promise<string | null>>\n\nexport class ModuleCache {\n /** Cache for package.json contents (readJson/require) */\n readonly packageJson: PackageJsonCache\n /** Cache for resolved real paths (realpath) */\n readonly realPath: RealPathCache\n /** Cache for file/directory existence checks */\n readonly exists: ExistsCache\n /** Cache for lstat results */\n readonly lstat: LstatCache\n /** Cache for require.resolve results (key: \"packageName::fromDir\") */\n readonly requireResolve: RequireResolveCache\n\n private readonly packageJsonMap: Map<string, PackageJson> = new Map()\n private readonly realPathMap: Map<string, string> = new Map()\n private readonly existsMap: Map<string, boolean> = new Map()\n private readonly lstatMap: Map<string, fs.Stats> = new Map()\n private readonly requireResolveMap: Map<string, string | null> = new Map()\n\n constructor() {\n this.packageJson = this.createAsyncProxy(this.packageJsonMap, (path: string) => fs.readJson(path))\n this.exists = this.createAsyncProxy(this.existsMap, (path: string) => exists(path))\n this.lstat = this.createAsyncProxy(this.lstatMap, (path: string) => fs.lstat(path))\n this.requireResolve = this.createAsyncProxy(this.requireResolveMap, (cacheKey: string) => {\n try {\n const [name, path] = cacheKey.split(\"::\")\n return Promise.resolve(require.resolve(name, { paths: [path] }))\n } catch {\n return Promise.resolve(null)\n }\n })\n this.realPath = this.createAsyncProxy(this.realPathMap, async (path: string) => {\n const p = resolve(path)\n try {\n const stats = await this.lstat[p]\n if (stats.isSymbolicLink()) {\n return await fs.realpath(p)\n }\n return p\n } catch (error: any) {\n log.debug({ filePath: p, message: error.message || error.stack }, \"error resolving path\")\n }\n return p\n })\n }\n\n // this allows dot-notation access while still supporting async retrieval\n // e.g., cache.packageJson[somePath] returns Promise<PackageJson>\n private createAsyncProxy<T>(map: Map<string, T>, compute: (key: string) => T | Promise<T>): Record<string, Promise<T>> {\n return new Proxy({} as Record<string, Promise<T>>, {\n async get(_, key: string) {\n if (map.has(key)) {\n return Promise.resolve(map.get(key)!)\n }\n return await Promise.resolve(compute(key)).then(value => {\n map.set(key, value)\n return value\n })\n },\n set(_, key: string, value: T) {\n map.set(key, value)\n return true\n },\n has(_, key: string) {\n return map.has(key)\n },\n })\n }\n}\n"]}
|