gcf-board 0.2.11 → 0.2.12
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/server/files.js +2 -1
- package/package.json +1 -1
package/dist/server/files.js
CHANGED
|
@@ -17,7 +17,8 @@ export const shownShape = (rel) => SHOWN.some((r) => r.test(rel));
|
|
|
17
17
|
export async function shownFile(root, rel, linked = false) {
|
|
18
18
|
if (!(linked || shownShape(rel)) || rel.split('/').includes('..'))
|
|
19
19
|
throw new HttpError(403, `${rel} is not a file the board shows`);
|
|
20
|
-
|
|
20
|
+
// resolve, not join: a plan an item links by an absolute path inside the project is one too.
|
|
21
|
+
const file = path.resolve(root, rel);
|
|
21
22
|
const real = await realpath(file).catch(() => {
|
|
22
23
|
throw new HttpError(404, `${rel} does not exist`);
|
|
23
24
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcf-board",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "A local web board for GCF game projects: shows `gcf board --json` and runs the same ai-factory gcf commands an operator runs in a console",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|