@mindexec/cli 0.2.406 → 0.2.408
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/package.json
CHANGED
package/port-guard.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const { execFile } = require('child_process');
|
|
2
|
+
const http = require('http');
|
|
2
3
|
const path = require('path');
|
|
3
4
|
const { promisify } = require('util');
|
|
4
5
|
|
|
5
6
|
const execFileAsync = promisify(execFile);
|
|
6
7
|
const DEFAULT_WAIT_MS = 3500;
|
|
8
|
+
const STATUS_PROBE_TIMEOUT_MS = 650;
|
|
7
9
|
|
|
8
10
|
function normalizePort(value, fallback = 5147) {
|
|
9
11
|
const parsed = Number.parseInt(String(value || '').trim(), 10);
|
|
@@ -141,6 +143,55 @@ function looksLikeMindExecBridge(details, bridgeRoot) {
|
|
|
141
143
|
|| /\bmindexec(\.cmd|\.ps1|\.exe)?\b/i.test(text);
|
|
142
144
|
}
|
|
143
145
|
|
|
146
|
+
async function probeMindExecStatus(port) {
|
|
147
|
+
return await new Promise(resolve => {
|
|
148
|
+
const request = http.request({
|
|
149
|
+
hostname: '127.0.0.1',
|
|
150
|
+
port,
|
|
151
|
+
path: '/api/status',
|
|
152
|
+
method: 'GET',
|
|
153
|
+
timeout: STATUS_PROBE_TIMEOUT_MS,
|
|
154
|
+
headers: {
|
|
155
|
+
Accept: 'application/json'
|
|
156
|
+
}
|
|
157
|
+
}, response => {
|
|
158
|
+
let body = '';
|
|
159
|
+
response.setEncoding('utf8');
|
|
160
|
+
response.on('data', chunk => {
|
|
161
|
+
body += chunk;
|
|
162
|
+
if (body.length > 64 * 1024) {
|
|
163
|
+
request.destroy();
|
|
164
|
+
resolve(false);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
response.on('end', () => {
|
|
168
|
+
if (response.statusCode !== 200) {
|
|
169
|
+
resolve(false);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
const payload = JSON.parse(body || '{}');
|
|
175
|
+
resolve(
|
|
176
|
+
payload?.app === 'MindExec' &&
|
|
177
|
+
payload?.packageName === '@mindexec/cli' &&
|
|
178
|
+
payload?.status === 'ok'
|
|
179
|
+
);
|
|
180
|
+
} catch {
|
|
181
|
+
resolve(false);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
request.on('timeout', () => {
|
|
187
|
+
request.destroy();
|
|
188
|
+
resolve(false);
|
|
189
|
+
});
|
|
190
|
+
request.on('error', () => resolve(false));
|
|
191
|
+
request.end();
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
144
195
|
async function waitForPortRelease(port, timeoutMs = DEFAULT_WAIT_MS) {
|
|
145
196
|
const started = Date.now();
|
|
146
197
|
while (Date.now() - started < timeoutMs) {
|
|
@@ -182,7 +233,9 @@ async function releaseBridgePort(options = {}) {
|
|
|
182
233
|
|
|
183
234
|
for (const pid of pids) {
|
|
184
235
|
const details = await getProcessDetails(pid);
|
|
185
|
-
const canKill = force ||
|
|
236
|
+
const canKill = force ||
|
|
237
|
+
looksLikeMindExecBridge(details, bridgeRoot) ||
|
|
238
|
+
await probeMindExecStatus(port);
|
|
186
239
|
if (!canKill) {
|
|
187
240
|
skipped.push(details);
|
|
188
241
|
continue;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const DEBUG = false;
|
|
6
6
|
const FPS_DEBUG = false;
|
|
7
7
|
const FRAME_PERF_DEBUG = false;
|
|
8
|
-
const MINDMAP_CORE_BUILD_ID = '20260628-
|
|
8
|
+
const MINDMAP_CORE_BUILD_ID = '20260628-pan-feedback-smoothing-v842';
|
|
9
9
|
const CanvasPhase = Object.freeze({
|
|
10
10
|
Booting: 'booting',
|
|
11
11
|
BoardFileLoading: 'board-file-loading',
|
|
@@ -125,8 +125,9 @@
|
|
|
125
125
|
]);
|
|
126
126
|
const LOD_PAN_VISIBILITY_REFRESH_INTERVAL_MS = 120;
|
|
127
127
|
const CAMERA_LERP_BASE_FRAME_MS = 1000 / 60;
|
|
128
|
-
const CAMERA_KEYBOARD_PAN_LERP_60HZ =
|
|
129
|
-
const CAMERA_MOUSE_PAN_LERP_60HZ =
|
|
128
|
+
const CAMERA_KEYBOARD_PAN_LERP_60HZ = 0.82;
|
|
129
|
+
const CAMERA_MOUSE_PAN_LERP_60HZ = 0.86;
|
|
130
|
+
const CAMERA_INPUT_PAN_FEEDBACK_LERP = 0.72;
|
|
130
131
|
const NODE_ADD_FRAME_BUDGET_MS = 6;
|
|
131
132
|
const NODE_ADD_LOADING_FRAME_BUDGET_MS = 8;
|
|
132
133
|
const NODE_ADD_MIN_SLICE = 8;
|
|
@@ -4158,13 +4159,32 @@ ${summaryLines.map(line => `<div>${escapeNodeFrameDebugHtml(line)}</div>`).join(
|
|
|
4158
4159
|
return finish('unchanged');
|
|
4159
4160
|
}
|
|
4160
4161
|
|
|
4161
|
-
|
|
4162
|
+
const feedbackReason = status.reason;
|
|
4163
|
+
const isPanFeedback =
|
|
4164
|
+
feedbackReason === 'pan-input' ||
|
|
4165
|
+
feedbackReason === 'trackpad-pan-input' ||
|
|
4166
|
+
feedbackReason === 'ctrl-wheel-pan-input';
|
|
4167
|
+
const feedbackLerp = isPanFeedback
|
|
4168
|
+
? CAMERA_INPUT_PAN_FEEDBACK_LERP
|
|
4169
|
+
: 1.0;
|
|
4170
|
+
const appliedX = feedbackLerp >= 1.0
|
|
4171
|
+
? nextX
|
|
4172
|
+
: currentX + (nextX - currentX) * feedbackLerp;
|
|
4173
|
+
const appliedY = feedbackLerp >= 1.0
|
|
4174
|
+
? nextY
|
|
4175
|
+
: currentY + (nextY - currentY) * feedbackLerp;
|
|
4176
|
+
const appliedZ = feedbackLerp >= 1.0
|
|
4177
|
+
? nextZ
|
|
4178
|
+
: currentZ + (nextZ - currentZ) * feedbackLerp;
|
|
4179
|
+
|
|
4180
|
+
this.camera.position.set(appliedX, appliedY, appliedZ);
|
|
4162
4181
|
this.camera.updateMatrixWorld(true);
|
|
4163
4182
|
this._viewStatePersistAfterMotion = true;
|
|
4164
4183
|
this._cameraMovingThisFrame = true;
|
|
4165
4184
|
this._immediateCameraFeedbackCount = Number(this._immediateCameraFeedbackCount || 0) + 1;
|
|
4166
4185
|
status.used = true;
|
|
4167
4186
|
status.count = this._immediateCameraFeedbackCount;
|
|
4187
|
+
status.feedbackLerp = feedbackLerp;
|
|
4168
4188
|
|
|
4169
4189
|
const flags = this.renderDebugFlags || getRenderDebugFlagsSnapshot();
|
|
4170
4190
|
const isCss3dEnabled = flags.enableCss3d !== false;
|
package/wwwroot/index.html
CHANGED
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
const base = '_content/MindExecution.Shared/js/';
|
|
582
|
-
const scriptVersion = '20260628-
|
|
582
|
+
const scriptVersion = '20260628-pan-feedback-smoothing-v842';
|
|
583
583
|
const scriptUrl = (script) => `${base}${script}?v=${scriptVersion}`;
|
|
584
584
|
console.log(`[Script Loader] Shared JS version: ${scriptVersion}`);
|
|
585
585
|
const criticalScripts = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
self.assetsManifest = {
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "yVyXGkxu",
|
|
3
3
|
"assets": [
|
|
4
4
|
{
|
|
5
5
|
"hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"url": "_content/MindExecution.Shared/js/marked.min.js"
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
|
-
"hash": "sha256-
|
|
81
|
+
"hash": "sha256-pUkpfib69+11xxOSi4C0AbmohwRy/+5JyePVFyKaexk=",
|
|
82
82
|
"url": "_content/MindExecution.Shared/js/mind-map-core.js"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
@@ -826,7 +826,7 @@
|
|
|
826
826
|
"url": "icon-512.png"
|
|
827
827
|
},
|
|
828
828
|
{
|
|
829
|
-
"hash": "sha256-
|
|
829
|
+
"hash": "sha256-1fe9T+GkNIkXk/GSyo780dH/YxldAcJXHThknJmIFcI=",
|
|
830
830
|
"url": "index.html"
|
|
831
831
|
},
|
|
832
832
|
{
|