create-opentray 0.19.0 → 0.19.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.
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from "node:url";
|
|
|
9
9
|
import sharp from "sharp";
|
|
10
10
|
import { resolveDefaultDarwinAppBundlePath, sanitizeAppBundleName } from "@opentray/packaging";
|
|
11
11
|
import { generateOpenTrayAppIcon } from "@opentray/vite-plugin";
|
|
12
|
-
import { constants } from "node:fs";
|
|
12
|
+
import { constants, realpathSync } from "node:fs";
|
|
13
13
|
import { createServer } from "node:http";
|
|
14
14
|
//#region src/app-id.ts
|
|
15
15
|
/** A token that looks like a command option, e.g. `--xx`, `-p`, or `--port=8080`. */
|
|
@@ -3810,9 +3810,16 @@ const main = async (argv) => {
|
|
|
3810
3810
|
const isMainModule = () => {
|
|
3811
3811
|
const entryPath = process.argv[1];
|
|
3812
3812
|
if (entryPath === void 0) return false;
|
|
3813
|
+
const sameFile = (a, b) => {
|
|
3814
|
+
try {
|
|
3815
|
+
return realpathSync(resolve(a)) === realpathSync(resolve(b));
|
|
3816
|
+
} catch {
|
|
3817
|
+
return resolve(a) === resolve(b);
|
|
3818
|
+
}
|
|
3819
|
+
};
|
|
3813
3820
|
const modulePath = fileURLToPath(import.meta.url);
|
|
3814
|
-
if (
|
|
3815
|
-
return
|
|
3821
|
+
if (sameFile(entryPath, modulePath)) return true;
|
|
3822
|
+
return sameFile(entryPath, modulePath.replace(/bin-[^/]*\.mjs$/u, "bin.mjs"));
|
|
3816
3823
|
};
|
|
3817
3824
|
if (isMainModule()) main(process.argv.slice(2)).then((code) => {
|
|
3818
3825
|
process.exitCode = code;
|
|
@@ -3820,4 +3827,4 @@ if (isMainModule()) main(process.argv.slice(2)).then((code) => {
|
|
|
3820
3827
|
//#endregion
|
|
3821
3828
|
export { verifyHttpService as A, resolveFaviconUrl as C, parseNetstatPorts as D, parseLsofPorts as E, toProjectDirectoryName as F, deriveDefaultAppId as M, deriveDefaultAppName as N, parsePowerShellPorts as O, isValidAppId as P, rankFaviconCandidates as S, createPortDiscovery as T, writeScaffold as _, isAuthorized as a, extractTitle as b, openMaterializedApp as c, resolveLaunchVector as d, resolveOnPath as f, materialize as g, isDirectoryOccupied as h, createWizardServer as i, waitForTcpPort as j, serviceUrl as k, pinningHint as l, expectedDarwinBundlePath as m, openBrowser as n, isLoopbackHost as o, detectPackageManager as p, parseWizardCli as r, createWizardSession as s, main as t, parseShebangInterpreter as u, tokenizeCommandLine as v, scrapeService as w, faviconCandidateSize as x, extractFaviconCandidates as y };
|
|
3822
3829
|
|
|
3823
|
-
//# sourceMappingURL=bin-
|
|
3830
|
+
//# sourceMappingURL=bin-B9VeXatR.mjs.map
|