@atria/server 0.0.6 → 0.0.8
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/README.md +9 -5
- package/dist/server.d.ts +1 -1
- package/dist/server.js +115 -27
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
HTTP runtime server for atria development.
|
|
4
4
|
|
|
5
|
-
This package
|
|
5
|
+
This package powers `atria dev` by serving `public/` for the public site and `.atria/runtime` for the back-office host.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -27,7 +27,11 @@ await server.close();
|
|
|
27
27
|
|
|
28
28
|
## Behavior
|
|
29
29
|
|
|
30
|
-
- Serves
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
30
|
+
- Serves `localhost` from `<projectRoot>/public`.
|
|
31
|
+
- Serves `admin.localhost` from `<projectRoot>/.atria/runtime`.
|
|
32
|
+
- Responds to `GET /api/health` with `{ "ok": true, "site": "public" | "admin", "publicOutputPublished": boolean }`.
|
|
33
|
+
- If `public/` has no files, `GET /` returns `503 Service Unavailable`.
|
|
34
|
+
- If `public/` has no files, other public routes return `404 Not Found`.
|
|
35
|
+
- For published output, missing public files/routes return `404` (serving `public/404.html` when present).
|
|
36
|
+
- Uses SPA-style `index.html` fallback only for `admin.localhost` non-file routes.
|
|
37
|
+
- Blocks path traversal attempts outside the configured public/admin roots.
|
package/dist/server.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface DevServerHandle {
|
|
|
9
9
|
adminUrl: string;
|
|
10
10
|
servingPublicDir: string;
|
|
11
11
|
servingAdminDir: string;
|
|
12
|
-
|
|
12
|
+
publicOutputPublished: boolean;
|
|
13
13
|
close: () => Promise<void>;
|
|
14
14
|
}
|
|
15
15
|
export declare const startDevServer: (options: StartDevServerOptions) => Promise<DevServerHandle>;
|
package/dist/server.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createServer } from "node:http";
|
|
2
2
|
import { promises as fs } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { ATRIA_RUNTIME_DIR } from "@atria/shared";
|
|
5
|
-
const PUBLIC_OUTPUT_DIR = "public";
|
|
4
|
+
import { ATRIA_RUNTIME_DIR, PUBLIC_OUTPUT_DIR } from "@atria/shared";
|
|
6
5
|
const DEV_PUBLIC_HOST = "localhost";
|
|
7
6
|
const DEV_ADMIN_HOST = "admin.localhost";
|
|
8
7
|
const MIME_TYPES = {
|
|
@@ -14,16 +13,27 @@ const MIME_TYPES = {
|
|
|
14
13
|
".ico": "image/x-icon",
|
|
15
14
|
".txt": "text/plain; charset=utf-8"
|
|
16
15
|
};
|
|
16
|
+
const DEFAULT_NOT_FOUND_TEXT = "404: The requested page was not found.";
|
|
17
|
+
const DEFAULT_PUBLIC_UNAVAILABLE_TEXT = "503: Public site output is not published yet.";
|
|
17
18
|
const PUBLIC_HOST_ALIASES = new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
|
|
18
19
|
const ADMIN_HOST_ALIASES = new Set(["admin.localhost"]);
|
|
19
20
|
const isInsideDirectory = (basePath, targetPath) => {
|
|
20
21
|
const relativePath = path.relative(basePath, targetPath);
|
|
21
22
|
return relativePath !== "" && !relativePath.startsWith("..") && !path.isAbsolute(relativePath);
|
|
22
23
|
};
|
|
23
|
-
const
|
|
24
|
+
const directoryHasFiles = async (directoryPath) => {
|
|
24
25
|
try {
|
|
25
|
-
const
|
|
26
|
-
|
|
26
|
+
const entries = await fs.readdir(directoryPath, { withFileTypes: true });
|
|
27
|
+
for (const entry of entries) {
|
|
28
|
+
const entryPath = path.join(directoryPath, entry.name);
|
|
29
|
+
if (entry.isFile() || entry.isSymbolicLink()) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (entry.isDirectory() && (await directoryHasFiles(entryPath))) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
27
37
|
}
|
|
28
38
|
catch {
|
|
29
39
|
return false;
|
|
@@ -53,25 +63,83 @@ const resolveSiteTarget = (hostname) => {
|
|
|
53
63
|
}
|
|
54
64
|
return null;
|
|
55
65
|
};
|
|
56
|
-
const
|
|
66
|
+
const resolveRootIndexFile = async (rootDir) => {
|
|
67
|
+
const rootIndexPath = path.join(rootDir, "index.html");
|
|
68
|
+
try {
|
|
69
|
+
const rootIndexStats = await fs.stat(rootIndexPath);
|
|
70
|
+
if (rootIndexStats.isFile()) {
|
|
71
|
+
return { type: "file", filePath: rootIndexPath };
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
// fall through to not found
|
|
76
|
+
}
|
|
77
|
+
return { type: "not-found" };
|
|
78
|
+
};
|
|
79
|
+
const resolveRequestFile = async (rootDir, requestPath, mode) => {
|
|
57
80
|
const normalizedPath = requestPath === "/" ? "index.html" : requestPath.replace(/^\/+/, "");
|
|
58
|
-
const filePath = path.join(
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
81
|
+
const filePath = path.join(rootDir, normalizedPath);
|
|
82
|
+
if (!isInsideDirectory(rootDir, filePath)) {
|
|
83
|
+
return { type: "forbidden" };
|
|
61
84
|
}
|
|
62
85
|
try {
|
|
63
86
|
const fileStats = await fs.stat(filePath);
|
|
64
87
|
if (fileStats.isDirectory()) {
|
|
65
|
-
|
|
88
|
+
const directoryIndexPath = path.join(filePath, "index.html");
|
|
89
|
+
if (!isInsideDirectory(rootDir, directoryIndexPath)) {
|
|
90
|
+
return { type: "forbidden" };
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const directoryIndexStats = await fs.stat(directoryIndexPath);
|
|
94
|
+
if (directoryIndexStats.isFile()) {
|
|
95
|
+
return { type: "file", filePath: directoryIndexPath };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// fall through to not found/fallback response
|
|
100
|
+
}
|
|
101
|
+
return mode === "spa-fallback" ? resolveRootIndexFile(rootDir) : { type: "not-found" };
|
|
66
102
|
}
|
|
67
|
-
|
|
103
|
+
if (fileStats.isFile()) {
|
|
104
|
+
return { type: "file", filePath };
|
|
105
|
+
}
|
|
106
|
+
return { type: "not-found" };
|
|
68
107
|
}
|
|
69
108
|
catch {
|
|
70
|
-
if (path.extname(normalizedPath)) {
|
|
71
|
-
return
|
|
109
|
+
if (mode === "spa-fallback" && !path.extname(normalizedPath)) {
|
|
110
|
+
return resolveRootIndexFile(rootDir);
|
|
72
111
|
}
|
|
73
|
-
return
|
|
112
|
+
return { type: "not-found" };
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const respondWithPublicNotFound = async (response, publicDir) => {
|
|
116
|
+
const notFoundPagePath = path.join(publicDir, "404.html");
|
|
117
|
+
try {
|
|
118
|
+
const notFoundPage = await fs.readFile(notFoundPagePath);
|
|
119
|
+
response.writeHead(404, { "content-type": MIME_TYPES[".html"] });
|
|
120
|
+
response.end(notFoundPage);
|
|
121
|
+
return;
|
|
74
122
|
}
|
|
123
|
+
catch {
|
|
124
|
+
// Fall back to plain text when public/404.html is unavailable.
|
|
125
|
+
}
|
|
126
|
+
response.writeHead(404, { "content-type": MIME_TYPES[".txt"] });
|
|
127
|
+
response.end(DEFAULT_NOT_FOUND_TEXT);
|
|
128
|
+
};
|
|
129
|
+
const respondWithDefaultNotFound = (response) => {
|
|
130
|
+
response.writeHead(404, { "content-type": MIME_TYPES[".txt"] });
|
|
131
|
+
response.end(DEFAULT_NOT_FOUND_TEXT);
|
|
132
|
+
};
|
|
133
|
+
const respondWithPublicUnavailable = (response) => {
|
|
134
|
+
response.writeHead(503, {
|
|
135
|
+
"content-type": MIME_TYPES[".txt"],
|
|
136
|
+
"retry-after": "60"
|
|
137
|
+
});
|
|
138
|
+
response.end(DEFAULT_PUBLIC_UNAVAILABLE_TEXT);
|
|
139
|
+
};
|
|
140
|
+
const isRootPublicPath = (requestPath) => {
|
|
141
|
+
const normalizedPath = requestPath.replace(/\/+$/, "");
|
|
142
|
+
return normalizedPath.length === 0 || normalizedPath === "/index.html";
|
|
75
143
|
};
|
|
76
144
|
const closeServer = async (server) => new Promise((resolve, reject) => {
|
|
77
145
|
server.close((error) => {
|
|
@@ -87,41 +155,61 @@ export const startDevServer = async (options) => {
|
|
|
87
155
|
const runtimeDir = path.join(options.projectRoot, ATRIA_RUNTIME_DIR);
|
|
88
156
|
const publicOutputDir = path.join(options.projectRoot, PUBLIC_OUTPUT_DIR);
|
|
89
157
|
await fs.access(runtimeDir);
|
|
90
|
-
const hasPublicOutput = await
|
|
91
|
-
const publicDir =
|
|
92
|
-
const
|
|
158
|
+
const hasPublicOutput = await directoryHasFiles(publicOutputDir);
|
|
159
|
+
const publicDir = publicOutputDir;
|
|
160
|
+
const publicOutputPublished = hasPublicOutput;
|
|
93
161
|
const server = createServer(async (request, response) => {
|
|
94
162
|
try {
|
|
95
163
|
const hostname = parseRequestHostname(request.headers.host);
|
|
96
164
|
const siteTarget = resolveSiteTarget(hostname);
|
|
97
165
|
if (!siteTarget) {
|
|
98
|
-
response
|
|
99
|
-
response.end(`Unknown host. Use ${DEV_PUBLIC_HOST} or ${DEV_ADMIN_HOST}.`);
|
|
166
|
+
respondWithDefaultNotFound(response);
|
|
100
167
|
return;
|
|
101
168
|
}
|
|
102
169
|
const requestHost = hostname ?? DEV_PUBLIC_HOST;
|
|
103
170
|
const requestUrl = new URL(request.url ?? "/", `http://${requestHost}:${options.port}`);
|
|
104
171
|
if (requestUrl.pathname === "/api/health") {
|
|
105
172
|
response.writeHead(200, { "content-type": MIME_TYPES[".json"] });
|
|
106
|
-
response.end(JSON.stringify({
|
|
173
|
+
response.end(JSON.stringify({
|
|
174
|
+
ok: true,
|
|
175
|
+
site: siteTarget,
|
|
176
|
+
publicOutputPublished
|
|
177
|
+
}));
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
if (siteTarget === "public" && !publicOutputPublished) {
|
|
181
|
+
if (isRootPublicPath(requestUrl.pathname)) {
|
|
182
|
+
respondWithPublicUnavailable(response);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
await respondWithPublicNotFound(response, publicDir);
|
|
186
|
+
}
|
|
107
187
|
return;
|
|
108
188
|
}
|
|
109
189
|
const rootDir = siteTarget === "admin" ? runtimeDir : publicDir;
|
|
110
|
-
const
|
|
111
|
-
|
|
190
|
+
const mode = siteTarget === "admin" ? "spa-fallback" : "strict";
|
|
191
|
+
const targetFile = await resolveRequestFile(rootDir, decodeURIComponent(requestUrl.pathname), mode);
|
|
192
|
+
if (targetFile.type === "forbidden") {
|
|
112
193
|
response.writeHead(403, { "content-type": MIME_TYPES[".txt"] });
|
|
113
194
|
response.end("Forbidden");
|
|
114
195
|
return;
|
|
115
196
|
}
|
|
116
|
-
|
|
117
|
-
|
|
197
|
+
if (targetFile.type === "not-found") {
|
|
198
|
+
if (siteTarget === "public") {
|
|
199
|
+
await respondWithPublicNotFound(response, publicDir);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
respondWithDefaultNotFound(response);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const fileBuffer = await fs.readFile(targetFile.filePath);
|
|
206
|
+
const extension = path.extname(targetFile.filePath);
|
|
118
207
|
const contentType = MIME_TYPES[extension] ?? "application/octet-stream";
|
|
119
208
|
response.writeHead(200, { "content-type": contentType });
|
|
120
209
|
response.end(fileBuffer);
|
|
121
210
|
}
|
|
122
211
|
catch {
|
|
123
|
-
response
|
|
124
|
-
response.end("Not Found");
|
|
212
|
+
respondWithDefaultNotFound(response);
|
|
125
213
|
}
|
|
126
214
|
});
|
|
127
215
|
await new Promise((resolve, reject) => {
|
|
@@ -137,7 +225,7 @@ export const startDevServer = async (options) => {
|
|
|
137
225
|
adminUrl: `http://${DEV_ADMIN_HOST}:${options.port}`,
|
|
138
226
|
servingPublicDir: publicDir,
|
|
139
227
|
servingAdminDir: runtimeDir,
|
|
140
|
-
|
|
228
|
+
publicOutputPublished,
|
|
141
229
|
close: () => closeServer(server)
|
|
142
230
|
};
|
|
143
231
|
};
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoC,MAAM,WAAW,CAAC;AAC3E,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,MAAM,eAAe,GAAG,WAAW,CAAC;AACpC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AA0BzC,MAAM,UAAU,GAA2B;IACzC,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,gCAAgC;IACvC,MAAM,EAAE,yBAAyB;IACjC,OAAO,EAAE,iCAAiC;IAC1C,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,2BAA2B;CACpC,CAAC;AACF,MAAM,sBAAsB,GAAG,wCAAwC,CAAC;AACxE,MAAM,+BAA+B,GAAG,+CAA+C,CAAC;AAExF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAChF,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAExD,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAE,UAAkB,EAAW,EAAE;IAC1E,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACz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AG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC5B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,EAAE,UAAU,eAAe,IAAI,OAAO,CAAC,IAAI,EAAE;QAChD,SAAS,EAAE,UAAU,eAAe,IAAI,OAAO,CAAC,IAAI,EAAE;QACtD,QAAQ,EAAE,UAAU,cAAc,IAAI,OAAO,CAAC,IAAI,EAAE;QACpD,gBAAgB,EAAE,SAAS;QAC3B,eAAe,EAAE,UAAU;QAC3B,qBAAqB;QACrB,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC;KACjC,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atria/server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "HTTP server and runtime delivery for atria",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atria",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@atria/shared": "0.0.
|
|
27
|
+
"@atria/shared": "0.0.7"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|