sootsim 0.0.4 → 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/LICENSE +21 -0
- package/README.md +24 -9
- package/dist-cli/bin.js +15 -20
- package/dist-cli/chunks/{agent-PJAOF4JS.js → agent-EQRQGSBL.js} +4 -4
- package/dist-cli/chunks/agent-wrapper-AWKZ67GN.js +15 -0
- package/dist-cli/chunks/{assert-P47NW4AF.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-4IO3D5XG.js +2 -0
- 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-WWDJCKMI.js → chunk-B3RAGRK6.js} +1 -1
- package/dist-cli/chunks/chunk-BGAPLYMS.js +61 -0
- package/dist-cli/chunks/chunk-CX3ZIPD3.js +3 -0
- package/dist-cli/chunks/{chunk-I6XGFZPA.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-LDWXH43L.js +4 -0
- 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-6SZMLFCR.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-S74RCIVB.js +2 -0
- package/dist-cli/chunks/chunk-SK4SOISL.js +1 -0
- package/dist-cli/chunks/{chunk-AFQBSK2J.js → chunk-T5L73GJB.js} +1 -1
- package/dist-cli/chunks/{chunk-432TMHBG.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-DQKQYPIG.js → chunk-WHLHA5R5.js} +4 -4
- package/dist-cli/chunks/chunk-WLIVBPPY.js +3 -0
- package/dist-cli/chunks/{chunk-UQ3N6FZF.js → chunk-X6BP5JFC.js} +4 -4
- package/dist-cli/chunks/chunk-YFXTO4QX.js +5 -0
- package/dist-cli/chunks/{chunk-4XBPZQLW.js → chunk-Z5SVSAZO.js} +2 -2
- package/dist-cli/chunks/{chunk-5TTQKPGH.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-ILLJ7VDL.js → compat-QQ3OJDBI.js} +2 -2
- package/dist-cli/chunks/{config-CDIAJIIT.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-6SMCTPMC.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-ZNWYKTWQ.js +23 -0
- package/dist-cli/chunks/{keys-OWQ7SOTM.js → keys-5ETF6DYO.js} +2 -2
- package/dist-cli/chunks/{launch-WUEDHSO5.js → launch-DHUCNFX6.js} +3 -3
- package/dist-cli/chunks/login-KDR34JIP.js +26 -0
- package/dist-cli/chunks/logout-R6WIJYCW.js +2 -0
- package/dist-cli/chunks/maestro-ZOOJ2YVH.js +80 -0
- package/dist-cli/chunks/{preview-4RVHA2PP.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-KEWLM5JR.js → record-IWLEYATN.js} +5 -5
- package/dist-cli/chunks/runtime-WKMNKYTN.js +25 -0
- 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-DJA6QEVR.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-IWUHNFXV.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 +6 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +42 -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 +7 -21
- package/dist-lib/home-paths.cjs +112 -30
- package/dist-lib/host/bridge-host.cjs +1817 -579
- package/dist-lib/host/fetch-proxy-handler.cjs +248 -0
- package/dist-lib/index.cjs +22 -22
- package/dist-lib/metro.cjs +22 -22
- package/dist-lib/profiles.cjs +246 -0
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/vite-base.cjs +3224 -764
- package/dist-lib/vite.cjs +1 -1
- package/package.json +11 -3
- package/dist-cli/chunks/agent-wrapper-STO7PLQD.js +0 -15
- package/dist-cli/chunks/auto-bootstrap-SC2LMI2H.js +0 -2
- package/dist-cli/chunks/chunk-47S5DXXX.js +0 -11
- package/dist-cli/chunks/chunk-4VXB2DBA.js +0 -119
- package/dist-cli/chunks/chunk-AUR2LTNX.js +0 -3
- package/dist-cli/chunks/chunk-BQRM4E66.js +0 -4
- package/dist-cli/chunks/chunk-C3QLIYCS.js +0 -16
- package/dist-cli/chunks/chunk-EHMSE3Q3.js +0 -2
- package/dist-cli/chunks/chunk-F4ARVCRR.js +0 -1
- package/dist-cli/chunks/chunk-HAKR72LJ.js +0 -2
- package/dist-cli/chunks/chunk-HGFIS26A.js +0 -2
- package/dist-cli/chunks/chunk-MQDPKSCK.js +0 -308
- package/dist-cli/chunks/chunk-MZPAJ5PQ.js +0 -1
- package/dist-cli/chunks/chunk-OAHMYSMD.js +0 -2
- package/dist-cli/chunks/chunk-QIP7LYQI.js +0 -5
- package/dist-cli/chunks/chunk-QQOBLF7O.js +0 -22
- package/dist-cli/chunks/chunk-SY74J6F4.js +0 -5
- package/dist-cli/chunks/chunk-UKYK63H6.js +0 -3
- package/dist-cli/chunks/chunk-UNFERMZ3.js +0 -27
- package/dist-cli/chunks/chunk-VGXARPIH.js +0 -3
- package/dist-cli/chunks/chunk-W3TYN64D.js +0 -62
- package/dist-cli/chunks/chunk-W7CYWXRZ.js +0 -4
- package/dist-cli/chunks/chunk-WRF43M33.js +0 -4
- package/dist-cli/chunks/chunk-WVBPATRA.js +0 -2
- package/dist-cli/chunks/chunk-XJF46GU2.js +0 -2
- package/dist-cli/chunks/chunk-ZF5FCFLD.js +0 -2
- package/dist-cli/chunks/chunk-ZKNI5MRD.js +0 -1
- package/dist-cli/chunks/control-7QGKUCAX.js +0 -2
- package/dist-cli/chunks/daemon-4BLYGM5N.js +0 -49
- package/dist-cli/chunks/demo-app-registry-HLI5UGGI.js +0 -2
- package/dist-cli/chunks/detox-R4G5INNB.js +0 -49
- package/dist-cli/chunks/device-YSLCWS4E.js +0 -16
- package/dist-cli/chunks/drivers-YIXRFFBQ.js +0 -2
- package/dist-cli/chunks/electron-JZOFO37G.js +0 -15
- package/dist-cli/chunks/flow-L7X5FGIN.js +0 -2
- package/dist-cli/chunks/hints-O4QR6UGI.js +0 -2
- package/dist-cli/chunks/home-paths-4YJJYGR6.js +0 -2
- package/dist-cli/chunks/inspect-DRFAUJUH.js +0 -1030
- package/dist-cli/chunks/install-BATRTWRI.js +0 -65
- package/dist-cli/chunks/install-desktop-6X474IQ3.js +0 -23
- package/dist-cli/chunks/install-dev-desktop-CAJHPRNP.js +0 -100
- package/dist-cli/chunks/login-54YJ2KH6.js +0 -26
- package/dist-cli/chunks/logout-XECXLEXW.js +0 -2
- package/dist-cli/chunks/maestro-PMHK6EHI.js +0 -75
- package/dist-cli/chunks/profile-3IVNHUS6.js +0 -22
- package/dist-cli/chunks/runtime-PJKHEB36.js +0 -25
- package/dist-cli/chunks/screenshot-BXRAQERZ.js +0 -26
- package/dist-cli/chunks/screenshot-mode-5IXEDIUS.js +0 -17
- package/dist-cli/chunks/screenshots-T4MQF3TB.js +0 -70
- package/dist-cli/chunks/server-CIP3LH45.js +0 -29
- package/dist-cli/chunks/store-SPC247DB.js +0 -2
- package/dist-cli/chunks/upload-UPD2RSYF.js +0 -2
- package/dist-cli/chunks/whoami-MCXFWKIH.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.
|
|
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
|
+
/*! 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
|
+
/*! 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
|
+
/*! 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
|
+
/*! 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
|
+
/*! 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
|
+
/*! 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;
|
|
@@ -52,11 +52,9 @@ function normalizeNativeDevBundleUrl(bundleUrl) {
|
|
|
52
52
|
try {
|
|
53
53
|
const isAbsolute = isAbsoluteHttpUrl(bundleUrl);
|
|
54
54
|
const parsed = new URL(bundleUrl, "http://soot.local");
|
|
55
|
+
parsed.pathname = parsed.pathname.replace(/\.\.bundle$/, ".bundle");
|
|
55
56
|
if (!isNativeDevBundlePath(parsed.pathname)) return bundleUrl;
|
|
56
|
-
|
|
57
|
-
if (!parsed.searchParams.has("minify")) {
|
|
58
|
-
parsed.searchParams.set("minify", "false");
|
|
59
|
-
}
|
|
57
|
+
parsed.searchParams.delete("transform.bytecode");
|
|
60
58
|
if (isAbsolute) return parsed.toString();
|
|
61
59
|
return `${parsed.pathname}${parsed.search}${parsed.hash}`;
|
|
62
60
|
} catch {
|
|
@@ -116,16 +114,6 @@ function isBaseServerUrl(url) {
|
|
|
116
114
|
const path = url.pathname || "/";
|
|
117
115
|
return (path === "/" || path === "") && !url.search && !url.hash;
|
|
118
116
|
}
|
|
119
|
-
async function hasDirectOneBundle(baseUrl) {
|
|
120
|
-
try {
|
|
121
|
-
const oneRes = await fetchDevProbe(`${baseUrl}${ONE_BUNDLE_PATH}`, {
|
|
122
|
-
method: "HEAD"
|
|
123
|
-
});
|
|
124
|
-
return oneRes.ok;
|
|
125
|
-
} catch {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
117
|
async function probeBaseUrlBundle(baseUrl, port) {
|
|
130
118
|
const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
|
|
131
119
|
try {
|
|
@@ -137,14 +125,12 @@ async function probeBaseUrlBundle(baseUrl, port) {
|
|
|
137
125
|
const client = manifest?.extra?.expoClient || manifest?.extra || {};
|
|
138
126
|
const launchUrl = typeof manifest?.launchAsset?.url === "string" ? manifest.launchAsset.url : void 0;
|
|
139
127
|
if (launchUrl || client.name) {
|
|
140
|
-
const framework = inferManifestFramework(launchUrl, client.sdkVersion);
|
|
141
|
-
const bundleUrl = framework === "one" && await hasDirectOneBundle(normalizedBaseUrl) ? `${normalizedBaseUrl}${ONE_BUNDLE_PATH}` : normalizeNativeDevBundleUrl(
|
|
142
|
-
launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
|
|
143
|
-
);
|
|
144
128
|
return {
|
|
145
|
-
bundleUrl
|
|
129
|
+
bundleUrl: normalizeNativeDevBundleUrl(
|
|
130
|
+
launchUrl || `${normalizedBaseUrl}${METRO_BUNDLE_PATH}`
|
|
131
|
+
),
|
|
146
132
|
port,
|
|
147
|
-
framework,
|
|
133
|
+
framework: inferManifestFramework(launchUrl, client.sdkVersion),
|
|
148
134
|
projectName: client.name
|
|
149
135
|
};
|
|
150
136
|
}
|
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! sootsim v0.
|
|
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,25 +43,35 @@ __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,
|
|
61
|
+
readTelemetryEnabled: () => readTelemetryEnabled,
|
|
54
62
|
removeDaemonLockfile: () => removeDaemonLockfile,
|
|
55
63
|
runtimeDir: () => runtimeDir,
|
|
56
64
|
runtimesDir: () => runtimesDir,
|
|
57
65
|
sootsimHomeDir: () => sootsimHomeDir,
|
|
58
66
|
writeActiveRuntime: () => writeActiveRuntime,
|
|
59
|
-
writeDaemonLockfile: () => writeDaemonLockfile
|
|
67
|
+
writeDaemonLockfile: () => writeDaemonLockfile,
|
|
68
|
+
writeSharedConfig: () => writeSharedConfig,
|
|
69
|
+
writeTelemetryEnabled: () => writeTelemetryEnabled
|
|
60
70
|
});
|
|
61
71
|
module.exports = __toCommonJS(home_paths_exports);
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
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);
|
|
65
75
|
var SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
|
|
66
76
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
67
77
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
@@ -69,54 +79,116 @@ var CONFIG_FILE = "config.json";
|
|
|
69
79
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
70
80
|
function sootsimHomeDir() {
|
|
71
81
|
const override = process.env[SOOTSIM_HOME_ENV];
|
|
72
|
-
if (override && override.length > 0) return
|
|
73
|
-
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
|
+
}
|
|
74
98
|
}
|
|
75
99
|
function runtimesDir() {
|
|
76
|
-
return
|
|
100
|
+
return import_node_path.default.join(sootsimHomeDir(), "runtimes");
|
|
77
101
|
}
|
|
78
102
|
function runtimeDir(version) {
|
|
79
|
-
return
|
|
103
|
+
return import_node_path.default.join(runtimesDir(), version);
|
|
80
104
|
}
|
|
81
105
|
function activeRuntimeFile() {
|
|
82
|
-
return
|
|
106
|
+
return import_node_path.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
|
|
83
107
|
}
|
|
84
108
|
function electronDir() {
|
|
85
|
-
return
|
|
109
|
+
return import_node_path.default.join(sootsimHomeDir(), "electron");
|
|
110
|
+
}
|
|
111
|
+
function electronUserDataDir() {
|
|
112
|
+
return import_node_path.default.join(electronDir(), "userData");
|
|
86
113
|
}
|
|
87
114
|
function electronVersionDir(version) {
|
|
88
|
-
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");
|
|
89
128
|
}
|
|
90
129
|
function cacheDir() {
|
|
91
|
-
return
|
|
130
|
+
return import_node_path.default.join(sootsimHomeDir(), "cache");
|
|
92
131
|
}
|
|
93
132
|
function daemonLockfilePath() {
|
|
94
|
-
return
|
|
133
|
+
return import_node_path.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
|
|
95
134
|
}
|
|
96
135
|
function configFilePath() {
|
|
97
|
-
return
|
|
136
|
+
return import_node_path.default.join(sootsimHomeDir(), CONFIG_FILE);
|
|
137
|
+
}
|
|
138
|
+
function readSharedConfig() {
|
|
139
|
+
try {
|
|
140
|
+
const raw = import_node_fs.default.readFileSync(configFilePath(), "utf8");
|
|
141
|
+
const parsed = JSON.parse(raw);
|
|
142
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
143
|
+
} catch {
|
|
144
|
+
return {};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function writeSharedConfig(patch) {
|
|
148
|
+
ensureSootsimHome();
|
|
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
|
+
}
|
|
157
|
+
const tmp = `${configFilePath()}.tmp`;
|
|
158
|
+
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(next, null, 2)}
|
|
159
|
+
`, "utf8");
|
|
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 });
|
|
98
168
|
}
|
|
99
169
|
function ensureSootsimHome() {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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 });
|
|
103
175
|
}
|
|
104
176
|
function readActiveRuntime() {
|
|
105
177
|
try {
|
|
106
|
-
const value =
|
|
178
|
+
const value = import_node_fs.default.readFileSync(activeRuntimeFile(), "utf8").trim();
|
|
107
179
|
return value.length > 0 ? value : null;
|
|
108
180
|
} catch {
|
|
109
181
|
return null;
|
|
110
182
|
}
|
|
111
183
|
}
|
|
112
184
|
function writeActiveRuntime(version) {
|
|
113
|
-
|
|
114
|
-
|
|
185
|
+
import_node_fs.default.mkdirSync(runtimesDir(), { recursive: true });
|
|
186
|
+
import_node_fs.default.writeFileSync(activeRuntimeFile(), `${version}
|
|
115
187
|
`, "utf8");
|
|
116
188
|
}
|
|
117
189
|
function listInstalledRuntimes() {
|
|
118
190
|
try {
|
|
119
|
-
return
|
|
191
|
+
return import_node_fs.default.readdirSync(runtimesDir(), { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort(compareSemver);
|
|
120
192
|
} catch {
|
|
121
193
|
return [];
|
|
122
194
|
}
|
|
@@ -147,7 +219,7 @@ function activeRuntimeDir() {
|
|
|
147
219
|
if (!version) return null;
|
|
148
220
|
const dir = runtimeDir(version);
|
|
149
221
|
try {
|
|
150
|
-
if (
|
|
222
|
+
if (import_node_fs.default.statSync(dir).isDirectory()) return dir;
|
|
151
223
|
} catch {
|
|
152
224
|
}
|
|
153
225
|
return null;
|
|
@@ -155,10 +227,10 @@ function activeRuntimeDir() {
|
|
|
155
227
|
var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
156
228
|
function readDaemonLockfile() {
|
|
157
229
|
try {
|
|
158
|
-
const fd =
|
|
230
|
+
const fd = import_node_fs.default.openSync(daemonLockfilePath(), "r");
|
|
159
231
|
try {
|
|
160
232
|
const buf = Buffer.alloc(DAEMON_LOCKFILE_MAX_BYTES);
|
|
161
|
-
const bytesRead =
|
|
233
|
+
const bytesRead = import_node_fs.default.readSync(fd, buf, 0, DAEMON_LOCKFILE_MAX_BYTES, 0);
|
|
162
234
|
const raw = buf.subarray(0, bytesRead).toString("utf8");
|
|
163
235
|
const parsed = JSON.parse(raw);
|
|
164
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") {
|
|
@@ -166,7 +238,7 @@ function readDaemonLockfile() {
|
|
|
166
238
|
}
|
|
167
239
|
return null;
|
|
168
240
|
} finally {
|
|
169
|
-
|
|
241
|
+
import_node_fs.default.closeSync(fd);
|
|
170
242
|
}
|
|
171
243
|
} catch {
|
|
172
244
|
return null;
|
|
@@ -185,9 +257,9 @@ function isDaemonLockfileFresh(lock, now = Date.now()) {
|
|
|
185
257
|
function writeDaemonLockfile(data) {
|
|
186
258
|
ensureSootsimHome();
|
|
187
259
|
const tmp = `${daemonLockfilePath()}.tmp`;
|
|
188
|
-
|
|
260
|
+
import_node_fs.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
189
261
|
`, "utf8");
|
|
190
|
-
|
|
262
|
+
import_node_fs.default.renameSync(tmp, daemonLockfilePath());
|
|
191
263
|
}
|
|
192
264
|
function claimDaemonLockfile(data) {
|
|
193
265
|
ensureSootsimHome();
|
|
@@ -200,7 +272,7 @@ function claimDaemonLockfile(data) {
|
|
|
200
272
|
}
|
|
201
273
|
function removeDaemonLockfile() {
|
|
202
274
|
try {
|
|
203
|
-
|
|
275
|
+
import_node_fs.default.unlinkSync(daemonLockfilePath());
|
|
204
276
|
} catch {
|
|
205
277
|
}
|
|
206
278
|
}
|
|
@@ -217,18 +289,28 @@ function removeDaemonLockfile() {
|
|
|
217
289
|
claimDaemonLockfile,
|
|
218
290
|
compareSemver,
|
|
219
291
|
configFilePath,
|
|
292
|
+
daemonAppBundlePath,
|
|
293
|
+
daemonAppDir,
|
|
294
|
+
daemonAppLauncherPath,
|
|
220
295
|
daemonLockfilePath,
|
|
221
296
|
electronDir,
|
|
297
|
+
electronUserDataDir,
|
|
222
298
|
electronVersionDir,
|
|
223
299
|
ensureSootsimHome,
|
|
224
300
|
isDaemonLockfileFresh,
|
|
301
|
+
isSootsimDevCheckout,
|
|
225
302
|
listInstalledRuntimes,
|
|
303
|
+
profilesDir,
|
|
226
304
|
readActiveRuntime,
|
|
227
305
|
readDaemonLockfile,
|
|
306
|
+
readSharedConfig,
|
|
307
|
+
readTelemetryEnabled,
|
|
228
308
|
removeDaemonLockfile,
|
|
229
309
|
runtimeDir,
|
|
230
310
|
runtimesDir,
|
|
231
311
|
sootsimHomeDir,
|
|
232
312
|
writeActiveRuntime,
|
|
233
|
-
writeDaemonLockfile
|
|
313
|
+
writeDaemonLockfile,
|
|
314
|
+
writeSharedConfig,
|
|
315
|
+
writeTelemetryEnabled
|
|
234
316
|
});
|