@stim-cli/server 1.22.0 → 1.23.0
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.
|
@@ -2409,6 +2409,10 @@ function protocolJsonSchema() {
|
|
|
2409
2409
|
type: "object",
|
|
2410
2410
|
maxProperties: 0
|
|
2411
2411
|
}),
|
|
2412
|
+
optionalParams("desktop.settings.schema", {
|
|
2413
|
+
type: "object",
|
|
2414
|
+
maxProperties: 0
|
|
2415
|
+
}),
|
|
2412
2416
|
request("desktop.settings.get", {
|
|
2413
2417
|
type: "object",
|
|
2414
2418
|
required: ["cwd"],
|
package/dist/protocol.mjs
CHANGED
|
@@ -1280,6 +1280,7 @@
|
|
|
1280
1280
|
"desktop-reports",
|
|
1281
1281
|
"desktop-report-platform",
|
|
1282
1282
|
"desktop-settings",
|
|
1283
|
+
"desktop-settings-schema",
|
|
1283
1284
|
"desktop-settings-write",
|
|
1284
1285
|
"desktop-full-logs",
|
|
1285
1286
|
"desktop-doctor-run",
|
|
@@ -3991,6 +3992,29 @@
|
|
|
3991
3992
|
}
|
|
3992
3993
|
}
|
|
3993
3994
|
},
|
|
3995
|
+
{
|
|
3996
|
+
"type": "object",
|
|
3997
|
+
"required": [
|
|
3998
|
+
"id",
|
|
3999
|
+
"method"
|
|
4000
|
+
],
|
|
4001
|
+
"additionalProperties": false,
|
|
4002
|
+
"properties": {
|
|
4003
|
+
"id": {
|
|
4004
|
+
"type": [
|
|
4005
|
+
"integer",
|
|
4006
|
+
"string"
|
|
4007
|
+
]
|
|
4008
|
+
},
|
|
4009
|
+
"method": {
|
|
4010
|
+
"const": "desktop.settings.schema"
|
|
4011
|
+
},
|
|
4012
|
+
"params": {
|
|
4013
|
+
"type": "object",
|
|
4014
|
+
"maxProperties": 0
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
},
|
|
3994
4018
|
{
|
|
3995
4019
|
"type": "object",
|
|
3996
4020
|
"required": [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as protocol_exports } from "./protocol-
|
|
1
|
+
import { n as protocol_exports } from "./protocol-BKpAsa9G.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { execFile, execFileSync, spawn } from "node:child_process";
|
|
4
4
|
import { appendFileSync, chmodSync, closeSync, constants, copyFileSync, cpSync, createReadStream, existsSync, futimesSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, statfsSync, watch, writeFileSync, writeSync } from "node:fs";
|
|
5
5
|
import { basename, delimiter, dirname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
6
6
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
7
|
-
import { DEVICE_HOST_LIMITS, HOSTED_APP_CHUNK_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_PARKED_CANDIDATES, KeyedEntities, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, SETTING_SCOPES, archiveDir, archivedUsage, assertHostedDeviceLedger, buildWorkerRoot, capDrops, clientIdentity, closedSegmentName, compileGrep, createDebugLog, deviceHostArea, deviceHostRoot, deviceViewersDir, footageDrops, getConcurrencyLimits, getParkedMax, hostedAndroidPlacements, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedDeviceId, hostedIosPlacements, hostedMacosBundleId, hostedMacosLogsDir, hostedNativeLogsDir, hostedWorkerSettleMs, isJournalExpired, isJsonObject, isSetupJournalPrunable, listRecordedDevices, listSegments, loadConfig, machineCapacity, machineEndpoint, macosAppState, openSegmentName, parseHostedAppOffer, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedNativeOffer, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, queryJsonLogs, readArchive, readArchiveState, readBuildHistory, readBuildMachines, readDeviceHostMachines, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readJsonObject, readLogTimeline, readLogsSince, readMacosRecord, readSetupJournal, readWorkspaceState, recordingDeviceName, rememberHostedAppBlobRename, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, setupJournalFile, sortByTs, statusViews, stimBuildDigest, tryAcquireBuildSlotClaim, validHostedAppBlob, validRunId, windowsShortDir, windowsShortDirKey, workspaceRecordingsDir } from "@stim-cli/core/state";
|
|
7
|
+
import { DEVICE_HOST_LIMITS, HOSTED_APP_CHUNK_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_PARKED_CANDIDATES, KeyedEntities, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, SETTING_SCOPES, archiveDir, archivedUsage, assertHostedDeviceLedger, buildWorkerRoot, capDrops, clientIdentity, closedSegmentName, compileGrep, createDebugLog, deviceHostArea, deviceHostRoot, deviceViewersDir, footageDrops, getConcurrencyLimits, getParkedMax, hostedAndroidPlacements, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedDeviceId, hostedIosPlacements, hostedMacosBundleId, hostedMacosLogsDir, hostedNativeLogsDir, hostedWorkerSettleMs, isJournalExpired, isJsonObject, isSetupJournalPrunable, listRecordedDevices, listSegments, loadConfig, machineCapacity, machineEndpoint, macosAppState, openSegmentName, parseHostedAppOffer, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedNativeOffer, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, queryJsonLogs, readArchive, readArchiveState, readBuildHistory, readBuildMachines, readDeviceHostMachines, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readJsonObject, readLogTimeline, readLogsSince, readMacosRecord, readSetupJournal, readWorkspaceState, recordingDeviceName, rememberHostedAppBlobRename, saturation, serverLocalSocket, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sortByTs, statusViews, stimBuildDigest, tryAcquireBuildSlotClaim, validHostedAppBlob, validRunId, windowsShortDir, windowsShortDirKey, workspaceRecordingsDir } from "@stim-cli/core/state";
|
|
8
8
|
import { availableParallelism, cpus, freemem, homedir, hostname, loadavg, tmpdir, totalmem, userInfo } from "node:os";
|
|
9
9
|
import { isDeepStrictEqual, parseArgs } from "node:util";
|
|
10
10
|
import { discoverToolchain } from "@stim-cli/core/toolchain";
|
|
@@ -14779,6 +14779,7 @@ async function startServer(options) {
|
|
|
14779
14779
|
"desktop-reports",
|
|
14780
14780
|
"desktop-report-platform",
|
|
14781
14781
|
"desktop-settings",
|
|
14782
|
+
"desktop-settings-schema",
|
|
14782
14783
|
"desktop-settings-write",
|
|
14783
14784
|
"desktop-full-logs",
|
|
14784
14785
|
"desktop-doctor-run",
|
|
@@ -16565,6 +16566,7 @@ async function startServer(options) {
|
|
|
16565
16566
|
"desktop.reports.subscribe",
|
|
16566
16567
|
"desktop.reports.invalidate",
|
|
16567
16568
|
"desktop.settings.get",
|
|
16569
|
+
"desktop.settings.schema",
|
|
16568
16570
|
"desktop.settings.write",
|
|
16569
16571
|
"desktop.logs.subscribe",
|
|
16570
16572
|
"desktop.doctor.run",
|
|
@@ -16705,16 +16707,8 @@ async function startServer(options) {
|
|
|
16705
16707
|
}) }), options.commandLimits?.timeoutMs ?? DETAILS_TIMEOUT_MS);
|
|
16706
16708
|
return Promise.resolve();
|
|
16707
16709
|
}
|
|
16708
|
-
if (method === "desktop.settings.get") {
|
|
16709
|
-
|
|
16710
|
-
error(id, "bad-request", "Choose settings with an absolute cwd.");
|
|
16711
|
-
return Promise.resolve();
|
|
16712
|
-
}
|
|
16713
|
-
const cwd = resolve(params.cwd);
|
|
16714
|
-
inProcessRead(id, "stim settings", (signal) => createStim({
|
|
16715
|
-
projectRoot: cwd,
|
|
16716
|
-
env: options.env
|
|
16717
|
-
}).settings({ signal }));
|
|
16710
|
+
if (method === "desktop.settings.schema" || method === "desktop.settings.get") {
|
|
16711
|
+
readDesktopSettings(id, method, params);
|
|
16718
16712
|
return Promise.resolve();
|
|
16719
16713
|
}
|
|
16720
16714
|
if (method === "desktop.logs.subscribe") {
|
|
@@ -16737,6 +16731,21 @@ async function startServer(options) {
|
|
|
16737
16731
|
if (method.startsWith("device-host.sessions")) return hostedSessions(id, method, params);
|
|
16738
16732
|
return method === "route.setup" ? setupRoute(id, params) : updateMachine(id, method, params);
|
|
16739
16733
|
}
|
|
16734
|
+
function readDesktopSettings(id, method, params) {
|
|
16735
|
+
if (method === "desktop.settings.schema") {
|
|
16736
|
+
if (params !== void 0 && (!isJsonObject(params) || Object.keys(params).length)) return error(id, "bad-request", "desktop.settings.schema takes no parameters.");
|
|
16737
|
+
return send(socket, {
|
|
16738
|
+
id,
|
|
16739
|
+
result: settingsJsonSchema()
|
|
16740
|
+
});
|
|
16741
|
+
}
|
|
16742
|
+
if (!isJsonObject(params) || Object.keys(params).some((key) => key !== "cwd") || typeof params.cwd !== "string" || params.cwd.length > 4096 || !isAbsolute(params.cwd)) return error(id, "bad-request", "Choose settings with an absolute cwd.");
|
|
16743
|
+
const cwd = resolve(params.cwd);
|
|
16744
|
+
inProcessRead(id, "stim settings", (signal) => createStim({
|
|
16745
|
+
projectRoot: cwd,
|
|
16746
|
+
env: options.env
|
|
16747
|
+
}).settings({ signal }));
|
|
16748
|
+
}
|
|
16740
16749
|
function desktopReport(id, method, params) {
|
|
16741
16750
|
if (method === "desktop.reports.invalidate") {
|
|
16742
16751
|
if (params !== void 0 && (!isJsonObject(params) || Object.keys(params).length)) return error(id, "bad-request", "desktop.reports.invalidate takes no parameters.");
|
package/dist/stim-server.mjs
CHANGED
|
@@ -4,6 +4,6 @@ const encode = (version) => version.split(".", 3).reduce((sum, part) => sum * 1e
|
|
|
4
4
|
if (encode(process.versions.node) < encode("22.12.0")) {
|
|
5
5
|
process.stderr.write(`STIM_NODE_UNSUPPORTED: stim-server needs Node 22.12.0 or later; this is Node ${process.versions.node} at ${process.execPath}. To run stim-server where a project pins an older Node, see https://stim.appandflow.com/docs/requirements#older-node-pins\n`);
|
|
6
6
|
process.exitCode = 1;
|
|
7
|
-
} else import("./stim-server-
|
|
7
|
+
} else import("./stim-server-aGzVV4rC.mjs");
|
|
8
8
|
//#endregion
|
|
9
9
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stim-cli/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"description": "Serves Stim status to paired clients over Tailscale, and runs reload and stop for clients granted control.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"./protocol.schema.json": "./dist/protocol.schema.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@stim-cli/agent-driver": "^1.
|
|
32
|
-
"@stim-cli/agent-driver-agent-device": "^1.
|
|
33
|
-
"@stim-cli/cache": "^1.
|
|
34
|
-
"@stim-cli/core": "^1.
|
|
35
|
-
"@stim-cli/transport": "^1.
|
|
36
|
-
"@stim-cli/transport-tailscale": "^1.
|
|
37
|
-
"stim": "1.
|
|
31
|
+
"@stim-cli/agent-driver": "^1.23.0",
|
|
32
|
+
"@stim-cli/agent-driver-agent-device": "^1.23.0",
|
|
33
|
+
"@stim-cli/cache": "^1.23.0",
|
|
34
|
+
"@stim-cli/core": "^1.23.0",
|
|
35
|
+
"@stim-cli/transport": "^1.23.0",
|
|
36
|
+
"@stim-cli/transport-tailscale": "^1.23.0",
|
|
37
|
+
"stim": "1.23.0",
|
|
38
38
|
"ws": "^8.21.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|