sootsim 0.1.36 → 0.1.37
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/README.md +20 -5
- package/dist-cli/bin.js +15 -20
- package/dist-cli/chunks/{agent-YZB6D3DR.js → agent-EQRQGSBL.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-VHCVS22I.js → agent-wrapper-AWKZ67GN.js} +10 -10
- package/dist-cli/chunks/{assert-AIVCKKLG.js → assert-ZVGELUZB.js} +2 -2
- package/dist-cli/chunks/auto-bootstrap-UEOLNAWJ.js +2 -0
- package/dist-cli/chunks/beta-4MD7WSI4.js +2 -0
- package/dist-cli/chunks/chunk-2ZPJHSIJ.js +11 -0
- package/dist-cli/chunks/{chunk-A5BRCXYE.js → chunk-4IO3D5XG.js} +1 -1
- package/dist-cli/chunks/chunk-4OHVCGMF.js +2 -0
- package/dist-cli/chunks/chunk-56BIMCDH.js +2 -0
- package/dist-cli/chunks/chunk-5FLDI6CV.js +66 -0
- package/dist-cli/chunks/{chunk-LHDWH7VS.js → chunk-B3RAGRK6.js} +1 -1
- package/dist-cli/chunks/{chunk-27P763IZ.js → chunk-BGAPLYMS.js} +2 -2
- package/dist-cli/chunks/chunk-CX3ZIPD3.js +3 -0
- package/dist-cli/chunks/{chunk-HWCKZXNJ.js → chunk-DSTV2VJT.js} +2 -2
- package/dist-cli/chunks/chunk-EDBFYOQB.js +2 -0
- package/dist-cli/chunks/chunk-ERLA3F77.js +1 -0
- package/dist-cli/chunks/chunk-FCQLQ7NA.js +117 -0
- package/dist-cli/chunks/chunk-H2HSOHXN.js +7 -0
- package/dist-cli/chunks/chunk-HYYMBXIX.js +2 -0
- package/dist-cli/chunks/chunk-JMGDVXAV.js +3 -0
- package/dist-cli/chunks/chunk-JMU5IGIU.js +1 -0
- package/dist-cli/chunks/chunk-KA5JJCWL.js +1 -0
- package/dist-cli/chunks/chunk-L4F4JRKJ.js +348 -0
- package/dist-cli/chunks/{chunk-G7XQD4KC.js → chunk-LDWXH43L.js} +2 -2
- package/dist-cli/chunks/chunk-PERKPZ7T.js +4 -0
- package/dist-cli/chunks/chunk-PN6FWLD4.js +5 -0
- package/dist-cli/chunks/chunk-QD7YIVPS.js +64 -0
- package/dist-cli/chunks/chunk-QWKO62QM.js +2 -0
- package/dist-cli/chunks/{chunk-VFDRZNPN.js → chunk-QXMZNJV5.js} +1 -1
- package/dist-cli/chunks/chunk-R77F5J3X.js +4 -0
- package/dist-cli/chunks/chunk-RLNIKWFO.js +27 -0
- package/dist-cli/chunks/chunk-RX6RHGSI.js +2 -0
- package/dist-cli/chunks/{chunk-IJMYFYDZ.js → chunk-S74RCIVB.js} +2 -2
- package/dist-cli/chunks/chunk-SK4SOISL.js +1 -0
- package/dist-cli/chunks/{chunk-YIO6S3R5.js → chunk-T5L73GJB.js} +1 -1
- package/dist-cli/chunks/{chunk-KAXZHEKM.js → chunk-UIQ3536J.js} +1 -1
- package/dist-cli/chunks/chunk-URSEYCC5.js +16 -0
- package/dist-cli/chunks/chunk-WFXYY3DU.js +3 -0
- package/dist-cli/chunks/{chunk-EWSQSALM.js → chunk-WHLHA5R5.js} +4 -4
- package/dist-cli/chunks/chunk-WLIVBPPY.js +3 -0
- package/dist-cli/chunks/{chunk-CYCXOAVZ.js → chunk-X6BP5JFC.js} +4 -4
- package/dist-cli/chunks/chunk-YFXTO4QX.js +5 -0
- package/dist-cli/chunks/{chunk-RMW5BO3S.js → chunk-Z5SVSAZO.js} +2 -2
- package/dist-cli/chunks/{chunk-OXN2PEB7.js → chunk-Z5X3PITK.js} +3 -3
- package/dist-cli/chunks/chunk-ZBOIGEGO.js +5 -0
- package/dist-cli/chunks/chunk-ZERYEI3L.js +17 -0
- package/dist-cli/chunks/{compat-Y2O2U7FL.js → compat-QQ3OJDBI.js} +2 -2
- package/dist-cli/chunks/{config-SRBOFUCI.js → config-LT27SC25.js} +2 -2
- package/dist-cli/chunks/control-3BO54QMO.js +2 -0
- package/dist-cli/chunks/cpu-profile-XEO3JCVB.js +22 -0
- package/dist-cli/chunks/daemon-3J2SAVQZ.js +83 -0
- package/dist-cli/chunks/{debug-BIDMW2PE.js → debug-OGQLIH4U.js} +4 -4
- package/dist-cli/chunks/demo-app-registry-5RZCXLWB.js +2 -0
- package/dist-cli/chunks/detox-Z2OSCIQU.js +49 -0
- package/dist-cli/chunks/device-RPTVD25S.js +16 -0
- package/dist-cli/chunks/diagnose-LAEXBNOQ.js +41 -0
- package/dist-cli/chunks/drivers-PSQUUAYC.js +2 -0
- package/dist-cli/chunks/electron-S2463O3P.js +18 -0
- package/dist-cli/chunks/flow-34YCVQDB.js +2 -0
- package/dist-cli/chunks/hints-E5PXPWFT.js +2 -0
- package/dist-cli/chunks/home-paths-F5SGBTRZ.js +2 -0
- package/dist-cli/chunks/inspect-EVGMEZ3G.js +1101 -0
- package/dist-cli/chunks/install-AM5PTJT3.js +2 -0
- package/dist-cli/chunks/{install-desktop-2MYEI4FM.js → install-desktop-ZNWYKTWQ.js} +3 -3
- package/dist-cli/chunks/{keys-7PNASIQR.js → keys-5ETF6DYO.js} +2 -2
- package/dist-cli/chunks/{launch-JNS47LAQ.js → launch-DHUCNFX6.js} +3 -3
- package/dist-cli/chunks/{login-YWZWUHBS.js → login-KDR34JIP.js} +4 -4
- package/dist-cli/chunks/{logout-O6SXMSBP.js → logout-R6WIJYCW.js} +2 -2
- package/dist-cli/chunks/maestro-ZOOJ2YVH.js +80 -0
- package/dist-cli/chunks/{preview-WGKJO5FS.js → preview-YFADHNBD.js} +2 -2
- package/dist-cli/chunks/profile-CQSC32HB.js +22 -0
- package/dist-cli/chunks/react-QSQD6CJE.js +30 -0
- package/dist-cli/chunks/{record-QPWLYH5R.js → record-IWLEYATN.js} +5 -5
- package/dist-cli/chunks/{runtime-KEMO2MSB.js → runtime-WKMNKYTN.js} +3 -3
- package/dist-cli/chunks/screenshot-VJXHV57I.js +28 -0
- package/dist-cli/chunks/screenshot-mode-FA4VQ76K.js +17 -0
- package/dist-cli/chunks/screenshots-U4FQXHVK.js +70 -0
- package/dist-cli/chunks/server-7WZLM5NQ.js +35 -0
- package/dist-cli/chunks/setup-repo-3BXLAX5E.js +2 -0
- package/dist-cli/chunks/{skills-MO7BFNVM.js → skills-KO7RCY24.js} +2 -2
- package/dist-cli/chunks/start-EBD7T2GW.js +23 -0
- package/dist-cli/chunks/store-ONX3EBS4.js +2 -0
- package/dist-cli/chunks/telemetry-MFR7TUW7.js +2 -0
- package/dist-cli/chunks/{test-XUI3KNNQ.js → test-OSVUG54G.js} +3 -3
- package/dist-cli/chunks/three-mode-MDBXZQG4.js +39 -0
- package/dist-cli/chunks/timeline-UJOKZKQR.js +22 -0
- package/dist-cli/chunks/upload-H2SMWP6T.js +2 -0
- package/dist-cli/chunks/what-happened-LFWH74FR.js +15 -0
- package/dist-cli/chunks/whoami-CUF56TLP.js +2 -0
- package/dist-lib/agent-daemon-client.cjs +4 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +41 -39
- package/dist-lib/attached-projects.cjs +30 -28
- package/dist-lib/auth/shared-session.cjs +35 -27
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +6 -2
- package/dist-lib/dev-bundle-resolution.cjs +5 -21
- package/dist-lib/home-paths.cjs +94 -38
- package/dist-lib/host/bridge-host.cjs +2131 -1333
- package/dist-lib/host/fetch-proxy-handler.cjs +248 -0
- package/dist-lib/index.cjs +21 -21
- package/dist-lib/metro.cjs +21 -21
- package/dist-lib/profiles.cjs +246 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +3402 -1640
- package/dist-lib/vite.cjs +1 -1
- package/package.json +7 -1
- package/dist-cli/chunks/auto-bootstrap-MLNTX23H.js +0 -2
- package/dist-cli/chunks/chunk-3UIWOHC2.js +0 -62
- package/dist-cli/chunks/chunk-5KGFHWVR.js +0 -1
- package/dist-cli/chunks/chunk-5QIUJNT3.js +0 -5
- package/dist-cli/chunks/chunk-6GGMKFWJ.js +0 -4
- package/dist-cli/chunks/chunk-6Z275LCY.js +0 -2
- package/dist-cli/chunks/chunk-75LBYBKW.js +0 -11
- package/dist-cli/chunks/chunk-DFN3GGH7.js +0 -5
- package/dist-cli/chunks/chunk-EBEHZJRG.js +0 -117
- package/dist-cli/chunks/chunk-EJLNUMMP.js +0 -3
- package/dist-cli/chunks/chunk-FE7UI3MT.js +0 -4
- package/dist-cli/chunks/chunk-G663654J.js +0 -1
- package/dist-cli/chunks/chunk-GW7XY5KC.js +0 -2
- package/dist-cli/chunks/chunk-H2QO4TDV.js +0 -22
- package/dist-cli/chunks/chunk-HWFHBMAQ.js +0 -27
- package/dist-cli/chunks/chunk-J7CTD37P.js +0 -1
- package/dist-cli/chunks/chunk-N32NCVL2.js +0 -3
- package/dist-cli/chunks/chunk-NIZBR7EK.js +0 -2
- package/dist-cli/chunks/chunk-NYY36OKU.js +0 -308
- package/dist-cli/chunks/chunk-PJL25JQV.js +0 -5
- package/dist-cli/chunks/chunk-SHO54NET.js +0 -2
- package/dist-cli/chunks/chunk-SMVJOWSV.js +0 -16
- package/dist-cli/chunks/chunk-TC6V7YFC.js +0 -3
- package/dist-cli/chunks/chunk-YLIIVTTQ.js +0 -3
- package/dist-cli/chunks/chunk-YR7BGGYE.js +0 -2
- package/dist-cli/chunks/chunk-ZEW3RF5Q.js +0 -1
- package/dist-cli/chunks/control-PL2V2O6S.js +0 -2
- package/dist-cli/chunks/daemon-IZC32PZW.js +0 -50
- package/dist-cli/chunks/demo-app-registry-5JFOUU3D.js +0 -2
- package/dist-cli/chunks/detox-B3FDOIS3.js +0 -49
- package/dist-cli/chunks/device-ZZSI363W.js +0 -16
- package/dist-cli/chunks/drivers-S4NGK4DB.js +0 -2
- package/dist-cli/chunks/electron-5YFHXEOI.js +0 -15
- package/dist-cli/chunks/flow-JJBO6TFY.js +0 -2
- package/dist-cli/chunks/hints-G5HBBV2O.js +0 -2
- package/dist-cli/chunks/home-paths-VWC3FWA3.js +0 -2
- package/dist-cli/chunks/inspect-POOPWUQI.js +0 -1034
- package/dist-cli/chunks/install-MP6FHXNZ.js +0 -2
- package/dist-cli/chunks/install-dev-desktop-SKH3KEHY.js +0 -100
- package/dist-cli/chunks/maestro-CW6XVUKV.js +0 -75
- package/dist-cli/chunks/profile-SUOBRPIC.js +0 -22
- package/dist-cli/chunks/screenshot-JTY46V7G.js +0 -26
- package/dist-cli/chunks/screenshot-mode-7OYBBX6D.js +0 -17
- package/dist-cli/chunks/screenshots-QISKC4GD.js +0 -70
- package/dist-cli/chunks/server-YSFJAKAV.js +0 -34
- package/dist-cli/chunks/setup-repo-LFB3HBEO.js +0 -2
- package/dist-cli/chunks/store-6MFL53I4.js +0 -2
- package/dist-cli/chunks/telemetry-CN42GMVC.js +0 -2
- package/dist-cli/chunks/upload-6FUT7AX5.js +0 -2
- package/dist-cli/chunks/whoami-TQFHY42N.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -59,8 +59,26 @@ __export(attached_projects_exports, {
|
|
|
59
59
|
module.exports = __toCommonJS(attached_projects_exports);
|
|
60
60
|
var import_node_crypto = require("node:crypto");
|
|
61
61
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
62
|
-
var
|
|
62
|
+
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
63
|
+
|
|
64
|
+
// src/home-paths.ts
|
|
65
|
+
var import_node_os = require("node:os");
|
|
63
66
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
67
|
+
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
68
|
+
function sootsimHomeDir() {
|
|
69
|
+
const override = process.env[SOOTSIM_HOME_ENV];
|
|
70
|
+
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
71
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
|
|
72
|
+
}
|
|
73
|
+
function electronDir() {
|
|
74
|
+
return import_node_path.default.join(sootsimHomeDir(), "electron");
|
|
75
|
+
}
|
|
76
|
+
function electronUserDataDir() {
|
|
77
|
+
return import_node_path.default.join(electronDir(), "userData");
|
|
78
|
+
}
|
|
79
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
80
|
+
|
|
81
|
+
// src/attached-projects.ts
|
|
64
82
|
var overrideDir = null;
|
|
65
83
|
function setUserDataDir(dir) {
|
|
66
84
|
overrideDir = dir;
|
|
@@ -70,29 +88,13 @@ function userDataDir() {
|
|
|
70
88
|
if (overrideDir) return overrideDir;
|
|
71
89
|
const fromEnv = process.env.SOOTSIM_USER_DATA_DIR;
|
|
72
90
|
if (fromEnv) return fromEnv;
|
|
73
|
-
|
|
74
|
-
const electron = require("electron");
|
|
75
|
-
if (electron.app?.getPath) return electron.app.getPath("userData");
|
|
76
|
-
} catch {
|
|
77
|
-
}
|
|
78
|
-
return platformDefaultUserDataDir();
|
|
79
|
-
}
|
|
80
|
-
function platformDefaultUserDataDir() {
|
|
81
|
-
const home = import_node_os.default.homedir();
|
|
82
|
-
if (process.platform === "darwin") {
|
|
83
|
-
return import_node_path.default.join(home, "Library", "Application Support", "sootsim");
|
|
84
|
-
}
|
|
85
|
-
if (process.platform === "win32") {
|
|
86
|
-
return import_node_path.default.join(process.env.APPDATA || home, "sootsim");
|
|
87
|
-
}
|
|
88
|
-
const xdg = process.env.XDG_CONFIG_HOME || import_node_path.default.join(home, ".config");
|
|
89
|
-
return import_node_path.default.join(xdg, "sootsim");
|
|
91
|
+
return electronUserDataDir();
|
|
90
92
|
}
|
|
91
93
|
function getUserDataDir() {
|
|
92
94
|
return userDataDir();
|
|
93
95
|
}
|
|
94
96
|
function storeFile() {
|
|
95
|
-
return
|
|
97
|
+
return import_node_path2.default.join(userDataDir(), "attached-projects.json");
|
|
96
98
|
}
|
|
97
99
|
function cloneEmpty() {
|
|
98
100
|
return {
|
|
@@ -134,7 +136,7 @@ function loadStore() {
|
|
|
134
136
|
}
|
|
135
137
|
function writeStore(store) {
|
|
136
138
|
const file = storeFile();
|
|
137
|
-
import_node_fs.default.mkdirSync(
|
|
139
|
+
import_node_fs.default.mkdirSync(import_node_path2.default.dirname(file), { recursive: true });
|
|
138
140
|
const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
|
|
139
141
|
const fd = import_node_fs.default.openSync(tmp, "w", 384);
|
|
140
142
|
try {
|
|
@@ -152,7 +154,7 @@ function mutateStore(fn) {
|
|
|
152
154
|
return store;
|
|
153
155
|
}
|
|
154
156
|
function projectIdForCwd(cwd) {
|
|
155
|
-
return (0, import_node_crypto.createHash)("sha256").update(
|
|
157
|
+
return (0, import_node_crypto.createHash)("sha256").update(import_node_path2.default.resolve(cwd)).digest("hex").slice(0, 16);
|
|
156
158
|
}
|
|
157
159
|
function newSessionId() {
|
|
158
160
|
return `s_${(0, import_node_crypto.randomBytes)(10).toString("hex")}`;
|
|
@@ -161,7 +163,7 @@ function newPreviewId() {
|
|
|
161
163
|
return `pa_${(0, import_node_crypto.randomBytes)(10).toString("hex")}`;
|
|
162
164
|
}
|
|
163
165
|
function upsertProject(input) {
|
|
164
|
-
const cwd =
|
|
166
|
+
const cwd = import_node_path2.default.resolve(input.cwd);
|
|
165
167
|
const id = projectIdForCwd(cwd);
|
|
166
168
|
let result;
|
|
167
169
|
mutateStore((store) => {
|
|
@@ -187,7 +189,7 @@ function upsertProject(input) {
|
|
|
187
189
|
const now = Date.now();
|
|
188
190
|
const created = {
|
|
189
191
|
id,
|
|
190
|
-
name: input.name ??
|
|
192
|
+
name: input.name ?? import_node_path2.default.basename(cwd),
|
|
191
193
|
cwd,
|
|
192
194
|
repoRoot: input.repoRoot,
|
|
193
195
|
sourceRoots: input.sourceRoots ?? [cwd],
|
|
@@ -214,7 +216,7 @@ function findProjectById(id) {
|
|
|
214
216
|
return loadStore().attachedProjects.find((p) => p.id === id) ?? null;
|
|
215
217
|
}
|
|
216
218
|
function findProjectByCwd(cwd) {
|
|
217
|
-
const resolved =
|
|
219
|
+
const resolved = import_node_path2.default.resolve(cwd);
|
|
218
220
|
return loadStore().attachedProjects.find((p) => p.cwd === resolved) ?? null;
|
|
219
221
|
}
|
|
220
222
|
function findProjectByBundleUrl(bundleUrl) {
|
|
@@ -344,7 +346,7 @@ function upsertPreviewAttachment(input) {
|
|
|
344
346
|
let result;
|
|
345
347
|
mutateStore((store) => {
|
|
346
348
|
const existing = store.previewAttachments.find(
|
|
347
|
-
(pa) => pa.bundleUrl === input.bundleUrl && pa.
|
|
349
|
+
(pa) => pa.bundleUrl === input.bundleUrl && pa.simId === input.simId
|
|
348
350
|
);
|
|
349
351
|
if (existing) {
|
|
350
352
|
const merged = {
|
|
@@ -361,7 +363,7 @@ function upsertPreviewAttachment(input) {
|
|
|
361
363
|
id: input.id ?? newPreviewId(),
|
|
362
364
|
projectId: input.projectId ?? null,
|
|
363
365
|
bundleUrl: input.bundleUrl,
|
|
364
|
-
|
|
366
|
+
simId: input.simId,
|
|
365
367
|
deviceModel: input.deviceModel ?? "unknown",
|
|
366
368
|
status: input.status ?? "connecting",
|
|
367
369
|
lastSeenAt: Date.now()
|
|
@@ -399,7 +401,7 @@ async function seedFromDemoAppRegistry() {
|
|
|
399
401
|
mutateStore((store) => {
|
|
400
402
|
for (const app of apps) {
|
|
401
403
|
if (!import_node_fs.default.existsSync(app.dir)) continue;
|
|
402
|
-
const cwd =
|
|
404
|
+
const cwd = import_node_path2.default.resolve(app.dir);
|
|
403
405
|
const id = projectIdForCwd(cwd);
|
|
404
406
|
if (store.attachedProjects.some((p) => p.id === id)) continue;
|
|
405
407
|
const now = Date.now();
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
10
|
var __export = (target, all) => {
|
|
9
11
|
for (var name in all)
|
|
@@ -17,6 +19,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
19
|
}
|
|
18
20
|
return to;
|
|
19
21
|
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
28
|
+
mod
|
|
29
|
+
));
|
|
20
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
31
|
|
|
22
32
|
// src/auth/shared-session.ts
|
|
@@ -30,42 +40,40 @@ __export(shared_session_exports, {
|
|
|
30
40
|
});
|
|
31
41
|
module.exports = __toCommonJS(shared_session_exports);
|
|
32
42
|
var import_node_fs = require("node:fs");
|
|
43
|
+
var import_node_path2 = require("node:path");
|
|
44
|
+
|
|
45
|
+
// src/home-paths.ts
|
|
33
46
|
var import_node_os = require("node:os");
|
|
34
|
-
var import_node_path = require("node:path");
|
|
47
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
48
|
+
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
49
|
+
function sootsimHomeDir() {
|
|
50
|
+
const override = process.env[SOOTSIM_HOME_ENV];
|
|
51
|
+
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
52
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
|
|
53
|
+
}
|
|
54
|
+
function electronDir() {
|
|
55
|
+
return import_node_path.default.join(sootsimHomeDir(), "electron");
|
|
56
|
+
}
|
|
57
|
+
function electronUserDataDir() {
|
|
58
|
+
return import_node_path.default.join(electronDir(), "userData");
|
|
59
|
+
}
|
|
60
|
+
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
61
|
+
|
|
62
|
+
// src/auth/shared-session.ts
|
|
35
63
|
var SESSION_VERSION = 1;
|
|
36
64
|
var SESSION_FILE_ENV = "SOOTSIM_SHARED_AUTH_FILE";
|
|
37
65
|
var DEFAULT_ORIGIN = "https://sootbean.com";
|
|
38
66
|
function getBaseDir() {
|
|
39
67
|
const explicit = process.env[SESSION_FILE_ENV];
|
|
40
68
|
if (explicit?.trim()) {
|
|
41
|
-
return (0,
|
|
42
|
-
}
|
|
43
|
-
const home = (0, import_node_os.homedir)();
|
|
44
|
-
if (!home) {
|
|
45
|
-
throw new Error("could not determine home directory for sootsim auth storage");
|
|
46
|
-
}
|
|
47
|
-
switch ((0, import_node_os.platform)()) {
|
|
48
|
-
case "darwin":
|
|
49
|
-
return (0, import_node_path.join)(home, "Library", "Application Support", "sootsim");
|
|
50
|
-
case "win32":
|
|
51
|
-
return (0, import_node_path.join)(process.env.APPDATA || (0, import_node_path.join)(home, "AppData", "Roaming"), "sootsim");
|
|
52
|
-
case "aix":
|
|
53
|
-
case "android":
|
|
54
|
-
case "cygwin":
|
|
55
|
-
case "freebsd":
|
|
56
|
-
case "haiku":
|
|
57
|
-
case "linux":
|
|
58
|
-
case "netbsd":
|
|
59
|
-
case "openbsd":
|
|
60
|
-
case "sunos":
|
|
61
|
-
default:
|
|
62
|
-
return (0, import_node_path.join)(process.env.XDG_CONFIG_HOME || (0, import_node_path.join)(home, ".config"), "sootsim");
|
|
69
|
+
return (0, import_node_path2.dirname)((0, import_node_path2.resolve)(explicit));
|
|
63
70
|
}
|
|
71
|
+
return electronUserDataDir();
|
|
64
72
|
}
|
|
65
73
|
function getSharedDesktopAuthFilePath() {
|
|
66
74
|
const explicit = process.env[SESSION_FILE_ENV];
|
|
67
|
-
if (explicit?.trim()) return (0,
|
|
68
|
-
return (0,
|
|
75
|
+
if (explicit?.trim()) return (0, import_node_path2.resolve)(explicit);
|
|
76
|
+
return (0, import_node_path2.join)(getBaseDir(), "desktop-auth.json");
|
|
69
77
|
}
|
|
70
78
|
function normalizeUser(input) {
|
|
71
79
|
if (!input || typeof input !== "object") return null;
|
|
@@ -115,7 +123,7 @@ function readSharedDesktopAuthSession() {
|
|
|
115
123
|
}
|
|
116
124
|
function writeSharedDesktopAuthSession(session) {
|
|
117
125
|
const filepath = getSharedDesktopAuthFilePath();
|
|
118
|
-
(0, import_node_fs.mkdirSync)((0,
|
|
126
|
+
(0, import_node_fs.mkdirSync)((0, import_node_path2.dirname)(filepath), { recursive: true });
|
|
119
127
|
const normalized = {
|
|
120
128
|
version: SESSION_VERSION,
|
|
121
129
|
token: session.token.trim(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/config.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -39,7 +39,7 @@ function hasOwnKeys(value) {
|
|
|
39
39
|
}
|
|
40
40
|
function hasSootSimConfig(config) {
|
|
41
41
|
if (!config) return false;
|
|
42
|
-
return hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.env) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
|
|
42
|
+
return hasOwnKeys(config.modules) || hasOwnKeys(config.turboModules) || hasOwnKeys(config.nativeModules) || hasOwnKeys(config.env) || hasOwnKeys(config.settings) || hasOwnKeys(config.initialState);
|
|
43
43
|
}
|
|
44
44
|
function mergeSootSimConfig(base, override) {
|
|
45
45
|
if (!hasSootSimConfig(base) && !hasSootSimConfig(override)) return void 0;
|
|
@@ -48,6 +48,10 @@ function mergeSootSimConfig(base, override) {
|
|
|
48
48
|
return {
|
|
49
49
|
modules: { ...base.modules || {}, ...override.modules || {} },
|
|
50
50
|
turboModules: { ...base.turboModules || {}, ...override.turboModules || {} },
|
|
51
|
+
nativeModules: {
|
|
52
|
+
...base.nativeModules || {},
|
|
53
|
+
...override.nativeModules || {}
|
|
54
|
+
},
|
|
51
55
|
env: { ...base.env || {}, ...override.env || {} },
|
|
52
56
|
settings: {
|
|
53
57
|
...base.settings || {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -54,10 +54,6 @@ function normalizeNativeDevBundleUrl(bundleUrl) {
|
|
|
54
54
|
const parsed = new URL(bundleUrl, "http://soot.local");
|
|
55
55
|
parsed.pathname = parsed.pathname.replace(/\.\.bundle$/, ".bundle");
|
|
56
56
|
if (!isNativeDevBundlePath(parsed.pathname)) return bundleUrl;
|
|
57
|
-
if (!parsed.searchParams.has("dev")) parsed.searchParams.set("dev", "true");
|
|
58
|
-
if (!parsed.searchParams.has("minify")) {
|
|
59
|
-
parsed.searchParams.set("minify", "false");
|
|
60
|
-
}
|
|
61
57
|
parsed.searchParams.delete("transform.bytecode");
|
|
62
58
|
if (isAbsolute) return parsed.toString();
|
|
63
59
|
return `${parsed.pathname}${parsed.search}${parsed.hash}`;
|
|
@@ -118,16 +114,6 @@ function isBaseServerUrl(url) {
|
|
|
118
114
|
const path = url.pathname || "/";
|
|
119
115
|
return (path === "/" || path === "") && !url.search && !url.hash;
|
|
120
116
|
}
|
|
121
|
-
async function hasDirectOneBundle(baseUrl) {
|
|
122
|
-
try {
|
|
123
|
-
const oneRes = await fetchDevProbe(`${baseUrl}${ONE_BUNDLE_PATH}`, {
|
|
124
|
-
method: "HEAD"
|
|
125
|
-
});
|
|
126
|
-
return oneRes.ok;
|
|
127
|
-
} catch {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
117
|
async function probeBaseUrlBundle(baseUrl, port) {
|
|
132
118
|
const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
|
|
133
119
|
try {
|
|
@@ -139,14 +125,12 @@ async function probeBaseUrlBundle(baseUrl, port) {
|
|
|
139
125
|
const client = manifest?.extra?.expoClient || manifest?.extra || {};
|
|
140
126
|
const launchUrl = typeof manifest?.launchAsset?.url === "string" ? manifest.launchAsset.url : void 0;
|
|
141
127
|
if (launchUrl || client.name) {
|
|
142
|
-
const framework = inferManifestFramework(launchUrl, client.sdkVersion);
|
|
143
|
-
const bundleUrl = framework === "one" && await hasDirectOneBundle(normalizedBaseUrl) ? `${normalizedBaseUrl}${ONE_BUNDLE_PATH}` : normalizeNativeDevBundleUrl(
|
|
144
|
-
launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
|
|
145
|
-
);
|
|
146
128
|
return {
|
|
147
|
-
bundleUrl
|
|
129
|
+
bundleUrl: normalizeNativeDevBundleUrl(
|
|
130
|
+
launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
|
|
131
|
+
),
|
|
148
132
|
port,
|
|
149
|
-
framework,
|
|
133
|
+
framework: inferManifestFramework(launchUrl, client.sdkVersion),
|
|
150
134
|
projectName: client.name
|
|
151
135
|
};
|
|
152
136
|
}
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.1.
|
|
1
|
+
/*! sootsim v0.1.37 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -43,14 +43,21 @@ __export(home_paths_exports, {
|
|
|
43
43
|
claimDaemonLockfile: () => claimDaemonLockfile,
|
|
44
44
|
compareSemver: () => compareSemver,
|
|
45
45
|
configFilePath: () => configFilePath,
|
|
46
|
+
daemonAppBundlePath: () => daemonAppBundlePath,
|
|
47
|
+
daemonAppDir: () => daemonAppDir,
|
|
48
|
+
daemonAppLauncherPath: () => daemonAppLauncherPath,
|
|
46
49
|
daemonLockfilePath: () => daemonLockfilePath,
|
|
47
50
|
electronDir: () => electronDir,
|
|
51
|
+
electronUserDataDir: () => electronUserDataDir,
|
|
48
52
|
electronVersionDir: () => electronVersionDir,
|
|
49
53
|
ensureSootsimHome: () => ensureSootsimHome,
|
|
50
54
|
isDaemonLockfileFresh: () => isDaemonLockfileFresh,
|
|
55
|
+
isSootsimDevCheckout: () => isSootsimDevCheckout,
|
|
51
56
|
listInstalledRuntimes: () => listInstalledRuntimes,
|
|
57
|
+
profilesDir: () => profilesDir,
|
|
52
58
|
readActiveRuntime: () => readActiveRuntime,
|
|
53
59
|
readDaemonLockfile: () => readDaemonLockfile,
|
|
60
|
+
readSharedConfig: () => readSharedConfig,
|
|
54
61
|
readTelemetryEnabled: () => readTelemetryEnabled,
|
|
55
62
|
removeDaemonLockfile: () => removeDaemonLockfile,
|
|
56
63
|
runtimeDir: () => runtimeDir,
|
|
@@ -58,12 +65,13 @@ __export(home_paths_exports, {
|
|
|
58
65
|
sootsimHomeDir: () => sootsimHomeDir,
|
|
59
66
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
60
67
|
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
68
|
+
writeSharedConfig: () => writeSharedConfig,
|
|
61
69
|
writeTelemetryEnabled: () => writeTelemetryEnabled
|
|
62
70
|
});
|
|
63
71
|
module.exports = __toCommonJS(home_paths_exports);
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
72
|
+
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
73
|
+
var import_node_os = require("node:os");
|
|
74
|
+
var import_node_path = __toESM(require("node:path"), 1);
|
|
67
75
|
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
68
76
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
69
77
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
@@ -71,76 +79,116 @@ var CONFIG_FILE = "config.json";
|
|
|
71
79
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
72
80
|
function sootsimHomeDir() {
|
|
73
81
|
const override = process.env[SOOTSIM_HOME_ENV];
|
|
74
|
-
if (override && override.length > 0) return
|
|
75
|
-
return
|
|
82
|
+
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
83
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".sootsim");
|
|
84
|
+
}
|
|
85
|
+
function isSootsimDevCheckout() {
|
|
86
|
+
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
87
|
+
const env = process.env.SOOTSIM_DEV;
|
|
88
|
+
if (env === "1" || env === "true") return true;
|
|
89
|
+
if (env === "0" || env === "false") return false;
|
|
90
|
+
const argv1 = process.argv[1];
|
|
91
|
+
if (!argv1) return false;
|
|
92
|
+
try {
|
|
93
|
+
const real = import_node_fs.default.realpathSync(argv1);
|
|
94
|
+
return real.includes(`${import_node_path.default.sep}packages${import_node_path.default.sep}sootsim${import_node_path.default.sep}`);
|
|
95
|
+
} catch {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
76
98
|
}
|
|
77
99
|
function runtimesDir() {
|
|
78
|
-
return
|
|
100
|
+
return import_node_path.default.join(sootsimHomeDir(), "runtimes");
|
|
79
101
|
}
|
|
80
102
|
function runtimeDir(version) {
|
|
81
|
-
return
|
|
103
|
+
return import_node_path.default.join(runtimesDir(), version);
|
|
82
104
|
}
|
|
83
105
|
function activeRuntimeFile() {
|
|
84
|
-
return
|
|
106
|
+
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
85
107
|
}
|
|
86
108
|
function electronDir() {
|
|
87
|
-
return
|
|
109
|
+
return import_node_path.default.join(sootsimHomeDir(), "electron");
|
|
110
|
+
}
|
|
111
|
+
function electronUserDataDir() {
|
|
112
|
+
return import_node_path.default.join(electronDir(), "userData");
|
|
88
113
|
}
|
|
89
114
|
function electronVersionDir(version) {
|
|
90
|
-
return
|
|
115
|
+
return import_node_path.default.join(electronDir(), version);
|
|
116
|
+
}
|
|
117
|
+
function profilesDir() {
|
|
118
|
+
return import_node_path.default.join(sootsimHomeDir(), "profiles");
|
|
119
|
+
}
|
|
120
|
+
function daemonAppDir() {
|
|
121
|
+
return import_node_path.default.join(sootsimHomeDir(), "daemon-app");
|
|
122
|
+
}
|
|
123
|
+
function daemonAppBundlePath() {
|
|
124
|
+
return import_node_path.default.join(daemonAppDir(), "SootSim Daemon.app");
|
|
125
|
+
}
|
|
126
|
+
function daemonAppLauncherPath() {
|
|
127
|
+
return import_node_path.default.join(daemonAppBundlePath(), "Contents", "MacOS", "sootsim-daemon");
|
|
91
128
|
}
|
|
92
129
|
function cacheDir() {
|
|
93
|
-
return
|
|
130
|
+
return import_node_path.default.join(sootsimHomeDir(), "cache");
|
|
94
131
|
}
|
|
95
132
|
function daemonLockfilePath() {
|
|
96
|
-
return
|
|
133
|
+
return import_node_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
|
|
97
134
|
}
|
|
98
135
|
function configFilePath() {
|
|
99
|
-
return
|
|
136
|
+
return import_node_path.default.join(sootsimHomeDir(), CONFIG_FILE);
|
|
100
137
|
}
|
|
101
138
|
function readSharedConfig() {
|
|
102
139
|
try {
|
|
103
|
-
const raw =
|
|
140
|
+
const raw = import_node_fs.default.readFileSync(configFilePath(), "utf8");
|
|
104
141
|
const parsed = JSON.parse(raw);
|
|
105
142
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
106
143
|
} catch {
|
|
107
144
|
return {};
|
|
108
145
|
}
|
|
109
146
|
}
|
|
110
|
-
function
|
|
111
|
-
const cfg = readSharedConfig();
|
|
112
|
-
return cfg.telemetry !== false;
|
|
113
|
-
}
|
|
114
|
-
function writeTelemetryEnabled(enabled) {
|
|
147
|
+
function writeSharedConfig(patch) {
|
|
115
148
|
ensureSootsimHome();
|
|
116
|
-
const
|
|
117
|
-
|
|
149
|
+
const current = readSharedConfig();
|
|
150
|
+
const next = { ...current, ...patch };
|
|
151
|
+
if (patch.settings && typeof patch.settings === "object") {
|
|
152
|
+
next.settings = {
|
|
153
|
+
...current.settings && typeof current.settings === "object" ? current.settings : {},
|
|
154
|
+
...patch.settings
|
|
155
|
+
};
|
|
156
|
+
}
|
|
118
157
|
const tmp = `${configFilePath()}.tmp`;
|
|
119
|
-
|
|
158
|
+
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
120
159
|
`, "utf8");
|
|
121
|
-
|
|
160
|
+
import_node_fs.default.renameSync(tmp, configFilePath());
|
|
161
|
+
return next;
|
|
162
|
+
}
|
|
163
|
+
function readTelemetryEnabled() {
|
|
164
|
+
return readSharedConfig().telemetry !== false;
|
|
165
|
+
}
|
|
166
|
+
function writeTelemetryEnabled(enabled) {
|
|
167
|
+
writeSharedConfig({ telemetry: enabled });
|
|
122
168
|
}
|
|
123
169
|
function ensureSootsimHome() {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
170
|
+
import_node_fs.default.mkdirSync(sootsimHomeDir(), { recursive: true });
|
|
171
|
+
import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
172
|
+
import_node_fs.default.mkdirSync(electronDir(), { recursive: true });
|
|
173
|
+
import_node_fs.default.mkdirSync(profilesDir(), { recursive: true });
|
|
174
|
+
import_node_fs.default.mkdirSync(cacheDir(), { recursive: true });
|
|
127
175
|
}
|
|
128
176
|
function readActiveRuntime() {
|
|
129
177
|
try {
|
|
130
|
-
const value =
|
|
178
|
+
const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
131
179
|
return value.length > 0 ? value : null;
|
|
132
180
|
} catch {
|
|
133
181
|
return null;
|
|
134
182
|
}
|
|
135
183
|
}
|
|
136
184
|
function writeActiveRuntime(version) {
|
|
137
|
-
|
|
138
|
-
|
|
185
|
+
import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
186
|
+
import_node_fs.default.writeFileSync(activeRuntimeFile(), `${version}
|
|
139
187
|
`, "utf8");
|
|
140
188
|
}
|
|
141
189
|
function listInstalledRuntimes() {
|
|
142
190
|
try {
|
|
143
|
-
return
|
|
191
|
+
return import_node_fs.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
|
|
144
192
|
} catch {
|
|
145
193
|
return [];
|
|
146
194
|
}
|
|
@@ -171,7 +219,7 @@ function activeRuntimeDir() {
|
|
|
171
219
|
if (!version) return null;
|
|
172
220
|
const dir = runtimeDir(version);
|
|
173
221
|
try {
|
|
174
|
-
if (
|
|
222
|
+
if (import_node_fs.default.statSync(dir).isDirectory()) return dir;
|
|
175
223
|
} catch {
|
|
176
224
|
}
|
|
177
225
|
return null;
|
|
@@ -179,10 +227,10 @@ function activeRuntimeDir() {
|
|
|
179
227
|
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
180
228
|
function readDaemonLockfile() {
|
|
181
229
|
try {
|
|
182
|
-
const fd =
|
|
230
|
+
const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
|
|
183
231
|
try {
|
|
184
232
|
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
185
|
-
const bytesRead =
|
|
233
|
+
const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
186
234
|
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
187
235
|
const parsed = JSON.parse(raw);
|
|
188
236
|
if (parsed && parsed.schema === 1 && typeof parsed.pid === "number" && typeof parsed.bridgePort === "number" && typeof parsed.runtimePort === "number" && typeof parsed.startedAt === "number" && typeof parsed.heartbeatAt === "number") {
|
|
@@ -190,7 +238,7 @@ function readDaemonLockfile() {
|
|
|
190
238
|
}
|
|
191
239
|
return null;
|
|
192
240
|
} finally {
|
|
193
|
-
|
|
241
|
+
import_node_fs.default.closeSync(fd);
|
|
194
242
|
}
|
|
195
243
|
} catch {
|
|
196
244
|
return null;
|
|
@@ -209,9 +257,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
209
257
|
function writeDaemonLockfile(data) {
|
|
210
258
|
ensureSootsimHome();
|
|
211
259
|
const tmp = `${daemonLockfilePath()}.tmp`;
|
|
212
|
-
|
|
260
|
+
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
213
261
|
`, "utf8");
|
|
214
|
-
|
|
262
|
+
import_node_fs.default.renameSync(tmp, daemonLockfilePath());
|
|
215
263
|
}
|
|
216
264
|
function claimDaemonLockfile(data) {
|
|
217
265
|
ensureSootsimHome();
|
|
@@ -224,7 +272,7 @@ function claimDaemonLockfile(data) {
|
|
|
224
272
|
}
|
|
225
273
|
function removeDaemonLockfile() {
|
|
226
274
|
try {
|
|
227
|
-
|
|
275
|
+
import_node_fs.default.unlinkSync(daemonLockfilePath());
|
|
228
276
|
} catch {
|
|
229
277
|
}
|
|
230
278
|
}
|
|
@@ -241,14 +289,21 @@ function removeDaemonLockfile() {
|
|
|
241
289
|
claimDaemonLockfile,
|
|
242
290
|
compareSemver,
|
|
243
291
|
configFilePath,
|
|
292
|
+
daemonAppBundlePath,
|
|
293
|
+
daemonAppDir,
|
|
294
|
+
daemonAppLauncherPath,
|
|
244
295
|
daemonLockfilePath,
|
|
245
296
|
electronDir,
|
|
297
|
+
electronUserDataDir,
|
|
246
298
|
electronVersionDir,
|
|
247
299
|
ensureSootsimHome,
|
|
248
300
|
isDaemonLockfileFresh,
|
|
301
|
+
isSootsimDevCheckout,
|
|
249
302
|
listInstalledRuntimes,
|
|
303
|
+
profilesDir,
|
|
250
304
|
readActiveRuntime,
|
|
251
305
|
readDaemonLockfile,
|
|
306
|
+
readSharedConfig,
|
|
252
307
|
readTelemetryEnabled,
|
|
253
308
|
removeDaemonLockfile,
|
|
254
309
|
runtimeDir,
|
|
@@ -256,5 +311,6 @@ function removeDaemonLockfile() {
|
|
|
256
311
|
sootsimHomeDir,
|
|
257
312
|
writeActiveRuntime,
|
|
258
313
|
writeDaemonLockfile,
|
|
314
|
+
writeSharedConfig,
|
|
259
315
|
writeTelemetryEnabled
|
|
260
316
|
});
|