@xdsjs/dossierx-daemon 0.1.17 → 0.1.18
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/index.js +13 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2290,7 +2290,7 @@ function createTaskArchive(options) {
|
|
|
2290
2290
|
|
|
2291
2291
|
// src/version.ts
|
|
2292
2292
|
var DAEMON_PACKAGE_NAME = "@xdsjs/dossierx-daemon";
|
|
2293
|
-
var DAEMON_VERSION = "0.1.
|
|
2293
|
+
var DAEMON_VERSION = "0.1.18";
|
|
2294
2294
|
|
|
2295
2295
|
// src/local-api/server.ts
|
|
2296
2296
|
var DEFAULT_MAX_FILE_BYTES = 5 * 1024 * 1024;
|
|
@@ -2587,10 +2587,10 @@ async function startWorkspaceReadServer(options) {
|
|
|
2587
2587
|
const url = requestUrl(request);
|
|
2588
2588
|
const origin = allowedOrigin(request, options.allowedOrigins);
|
|
2589
2589
|
if (origin === null) {
|
|
2590
|
-
if (url.pathname === "/workspace/manifest") {
|
|
2590
|
+
if (url.pathname === "/workspace/manifest" || url.pathname === "/runtime/daemon") {
|
|
2591
2591
|
console.warn(
|
|
2592
2592
|
JSON.stringify({
|
|
2593
|
-
msg: "workspace manifest cors rejected",
|
|
2593
|
+
msg: url.pathname === "/workspace/manifest" ? "workspace manifest cors rejected" : "runtime daemon cors rejected",
|
|
2594
2594
|
origin: request.headers.origin ?? null,
|
|
2595
2595
|
requestedMethod: request.headers["access-control-request-method"] ?? null,
|
|
2596
2596
|
requestedPrivateNetwork: request.headers["access-control-request-private-network"] ?? null,
|
|
@@ -2603,10 +2603,10 @@ async function startWorkspaceReadServer(options) {
|
|
|
2603
2603
|
return;
|
|
2604
2604
|
}
|
|
2605
2605
|
if (request.method === "OPTIONS") {
|
|
2606
|
-
if (url.pathname === "/workspace/manifest") {
|
|
2606
|
+
if (url.pathname === "/workspace/manifest" || url.pathname === "/runtime/daemon") {
|
|
2607
2607
|
console.info(
|
|
2608
2608
|
JSON.stringify({
|
|
2609
|
-
msg: "workspace manifest preflight served",
|
|
2609
|
+
msg: url.pathname === "/workspace/manifest" ? "workspace manifest preflight served" : "runtime daemon preflight served",
|
|
2610
2610
|
origin,
|
|
2611
2611
|
requestedMethod: request.headers["access-control-request-method"] ?? null,
|
|
2612
2612
|
requestedPrivateNetwork: request.headers["access-control-request-private-network"] ?? null,
|
|
@@ -2628,6 +2628,14 @@ async function startWorkspaceReadServer(options) {
|
|
|
2628
2628
|
return;
|
|
2629
2629
|
}
|
|
2630
2630
|
if (request.method === "GET" && url.pathname === "/runtime/daemon") {
|
|
2631
|
+
console.info(
|
|
2632
|
+
JSON.stringify({
|
|
2633
|
+
msg: "runtime daemon served",
|
|
2634
|
+
origin,
|
|
2635
|
+
status: 200,
|
|
2636
|
+
currentVersion: daemonVersion
|
|
2637
|
+
})
|
|
2638
|
+
);
|
|
2631
2639
|
json(
|
|
2632
2640
|
response,
|
|
2633
2641
|
200,
|