MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / requiredPaths

Function requiredPaths

apps/desktop/scripts/check-build-resources.ts:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29const buildResources = config.directories?.buildResources ?? "build";
30
31const requiredPaths = (): readonly string[] => {
32 const paths = new Set<string>();
33
34 // electron-builder finds the app icon by convention
35 // (`<buildResources>/icon.png`) rather than from a config field, so there is
36 // no value to read here — the convention has to be spelled out.
37 paths.add(`${buildResources}/icon.png`);
38
39 const mac = config.mac;
40 for (const entitlements of [mac?.entitlements, mac?.entitlementsInherit]) {
41 if (typeof entitlements === "string") paths.add(entitlements);
42 }
43
44 return [...paths].sort();
45};
46
47const isPlistShaped = (text: string): boolean =>
48 text.includes("<plist") && text.includes("</plist>") && text.includes("<dict>");

Callers 2

checkBuildResourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected