@h-rig/server 0.0.6-alpha.36 → 0.0.6-alpha.38
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/dist/src/index.js +24 -0
- package/dist/src/server-helpers/http-router.js +24 -0
- package/dist/src/server.js +24 -0
- package/package.json +4 -4
package/dist/src/index.js
CHANGED
|
@@ -7920,6 +7920,30 @@ data: ${JSON.stringify({ connectedAt: new Date().toISOString() })}
|
|
|
7920
7920
|
}
|
|
7921
7921
|
const control = buildServerControlStatus();
|
|
7922
7922
|
const switchCommand = process.env.RIG_PROJECT_ROOT_SWITCH_COMMAND?.trim();
|
|
7923
|
+
if (exists && resolve20(state.projectRoot) === normalizedRoot) {
|
|
7924
|
+
return deps.jsonResponse({
|
|
7925
|
+
ok: true,
|
|
7926
|
+
projectRoot: state.projectRoot,
|
|
7927
|
+
requestedProjectRoot: normalizedRoot,
|
|
7928
|
+
exists,
|
|
7929
|
+
control,
|
|
7930
|
+
alreadyCurrent: true,
|
|
7931
|
+
switched: false,
|
|
7932
|
+
requiresRestart: false
|
|
7933
|
+
});
|
|
7934
|
+
}
|
|
7935
|
+
if (exists && switchCommand && state.runProcesses.size > 0 && body.force !== true) {
|
|
7936
|
+
return deps.jsonResponse({
|
|
7937
|
+
ok: false,
|
|
7938
|
+
projectRoot: state.projectRoot,
|
|
7939
|
+
requestedProjectRoot: normalizedRoot,
|
|
7940
|
+
exists,
|
|
7941
|
+
control,
|
|
7942
|
+
requiresRestart: true,
|
|
7943
|
+
activeRuns: state.runProcesses.size,
|
|
7944
|
+
message: `Refusing project-root switch: ${state.runProcesses.size} run(s) are active and a switch restarts the server. Pass force:true to switch anyway.`
|
|
7945
|
+
}, 409);
|
|
7946
|
+
}
|
|
7923
7947
|
if (!exists) {
|
|
7924
7948
|
return deps.jsonResponse({
|
|
7925
7949
|
ok: false,
|
|
@@ -3712,6 +3712,30 @@ data: ${JSON.stringify({ connectedAt: new Date().toISOString() })}
|
|
|
3712
3712
|
}
|
|
3713
3713
|
const control = buildServerControlStatus();
|
|
3714
3714
|
const switchCommand = process.env.RIG_PROJECT_ROOT_SWITCH_COMMAND?.trim();
|
|
3715
|
+
if (exists && resolve13(state.projectRoot) === normalizedRoot) {
|
|
3716
|
+
return deps.jsonResponse({
|
|
3717
|
+
ok: true,
|
|
3718
|
+
projectRoot: state.projectRoot,
|
|
3719
|
+
requestedProjectRoot: normalizedRoot,
|
|
3720
|
+
exists,
|
|
3721
|
+
control,
|
|
3722
|
+
alreadyCurrent: true,
|
|
3723
|
+
switched: false,
|
|
3724
|
+
requiresRestart: false
|
|
3725
|
+
});
|
|
3726
|
+
}
|
|
3727
|
+
if (exists && switchCommand && state.runProcesses.size > 0 && body.force !== true) {
|
|
3728
|
+
return deps.jsonResponse({
|
|
3729
|
+
ok: false,
|
|
3730
|
+
projectRoot: state.projectRoot,
|
|
3731
|
+
requestedProjectRoot: normalizedRoot,
|
|
3732
|
+
exists,
|
|
3733
|
+
control,
|
|
3734
|
+
requiresRestart: true,
|
|
3735
|
+
activeRuns: state.runProcesses.size,
|
|
3736
|
+
message: `Refusing project-root switch: ${state.runProcesses.size} run(s) are active and a switch restarts the server. Pass force:true to switch anyway.`
|
|
3737
|
+
}, 409);
|
|
3738
|
+
}
|
|
3715
3739
|
if (!exists) {
|
|
3716
3740
|
return deps.jsonResponse({
|
|
3717
3741
|
ok: false,
|
package/dist/src/server.js
CHANGED
|
@@ -7414,6 +7414,30 @@ data: ${JSON.stringify({ connectedAt: new Date().toISOString() })}
|
|
|
7414
7414
|
}
|
|
7415
7415
|
const control = buildServerControlStatus();
|
|
7416
7416
|
const switchCommand = process.env.RIG_PROJECT_ROOT_SWITCH_COMMAND?.trim();
|
|
7417
|
+
if (exists && resolve20(state.projectRoot) === normalizedRoot) {
|
|
7418
|
+
return deps.jsonResponse({
|
|
7419
|
+
ok: true,
|
|
7420
|
+
projectRoot: state.projectRoot,
|
|
7421
|
+
requestedProjectRoot: normalizedRoot,
|
|
7422
|
+
exists,
|
|
7423
|
+
control,
|
|
7424
|
+
alreadyCurrent: true,
|
|
7425
|
+
switched: false,
|
|
7426
|
+
requiresRestart: false
|
|
7427
|
+
});
|
|
7428
|
+
}
|
|
7429
|
+
if (exists && switchCommand && state.runProcesses.size > 0 && body.force !== true) {
|
|
7430
|
+
return deps.jsonResponse({
|
|
7431
|
+
ok: false,
|
|
7432
|
+
projectRoot: state.projectRoot,
|
|
7433
|
+
requestedProjectRoot: normalizedRoot,
|
|
7434
|
+
exists,
|
|
7435
|
+
control,
|
|
7436
|
+
requiresRestart: true,
|
|
7437
|
+
activeRuns: state.runProcesses.size,
|
|
7438
|
+
message: `Refusing project-root switch: ${state.runProcesses.size} run(s) are active and a switch restarts the server. Pass force:true to switch anyway.`
|
|
7439
|
+
}, 409);
|
|
7440
|
+
}
|
|
7417
7441
|
if (!exists) {
|
|
7418
7442
|
return deps.jsonResponse({
|
|
7419
7443
|
ok: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/server",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"rig-server": "./dist/src/server.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
29
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
30
|
-
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.
|
|
28
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.38",
|
|
29
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.38",
|
|
30
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.38",
|
|
31
31
|
"effect": "4.0.0-beta.78"
|
|
32
32
|
}
|
|
33
33
|
}
|