pi-outpost 0.32.1 → 0.32.2
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.
|
@@ -12370,7 +12370,7 @@ function rulePatterns(profile, rules, sources) {
|
|
|
12370
12370
|
}
|
|
12371
12371
|
|
|
12372
12372
|
// shared/bin/validate-structured-exchange.mjs
|
|
12373
|
-
var VERSION = `validate-structured-exchange ${false ? "development" : "0.32.
|
|
12373
|
+
var VERSION = `validate-structured-exchange ${false ? "development" : "0.32.2"}`;
|
|
12374
12374
|
var USAGE = `validate-structured-exchange [file]
|
|
12375
12375
|
validate-structured-exchange --profile <profile.json> [file]
|
|
12376
12376
|
validate-structured-exchange --check-profile <profile.json>
|
package/dist/pi-outpost.mjs
CHANGED
|
@@ -189570,6 +189570,12 @@ var UPLOADS_DIRECTORY = "uploads";
|
|
|
189570
189570
|
function isPdfPath(relPath) {
|
|
189571
189571
|
return path31.extname(relPath).toLowerCase() === ".pdf";
|
|
189572
189572
|
}
|
|
189573
|
+
function isRawImagePath(relPath) {
|
|
189574
|
+
return /^\.(png|jpe?g|gif|webp|svg|avif)$/.test(path31.extname(relPath).toLowerCase());
|
|
189575
|
+
}
|
|
189576
|
+
function rawFileLimit(relPath, pdfMaxBytes) {
|
|
189577
|
+
return isPdfPath(relPath) || isRawImagePath(relPath) ? pdfMaxBytes : MAX_PREVIEW_BYTES;
|
|
189578
|
+
}
|
|
189573
189579
|
var FileBrowserError = class extends Error {
|
|
189574
189580
|
constructor(reason, message) {
|
|
189575
189581
|
super(message);
|
|
@@ -189703,7 +189709,7 @@ async function readFileRaw(root2, relPath, pdfMaxBytes = MAX_PREVIEW_BYTES) {
|
|
|
189703
189709
|
if (!stat.isFile()) {
|
|
189704
189710
|
throw new FileBrowserError("not-found", `"${relPath}" is not a file`);
|
|
189705
189711
|
}
|
|
189706
|
-
const limit =
|
|
189712
|
+
const limit = rawFileLimit(relPath, pdfMaxBytes);
|
|
189707
189713
|
if (stat.size > limit) {
|
|
189708
189714
|
const mb = (limit / (1024 * 1024)).toFixed(0);
|
|
189709
189715
|
throw new FileBrowserError("too-large", `File is larger than the ${mb} MB limit`);
|
|
@@ -200602,7 +200608,7 @@ function cacheControlFor(url) {
|
|
|
200602
200608
|
}
|
|
200603
200609
|
|
|
200604
200610
|
// ../server/src/index.ts
|
|
200605
|
-
var VERSION2 = true ? "0.32.
|
|
200611
|
+
var VERSION2 = true ? "0.32.2" : "dev";
|
|
200606
200612
|
var PI_SDK_VERSION = true ? "0.87.1" : readInstalledPiSdkVersion();
|
|
200607
200613
|
var LAUNCH_DIR = process.env.INIT_CWD ?? process.cwd();
|
|
200608
200614
|
function complain(error) {
|
|
@@ -201032,7 +201038,7 @@ app.get("/files/raw", async (req, reply) => {
|
|
|
201032
201038
|
} catch (error) {
|
|
201033
201039
|
if (error instanceof FileBrowserError) {
|
|
201034
201040
|
if (error.reason === "too-large") {
|
|
201035
|
-
const limit =
|
|
201041
|
+
const limit = rawFileLimit(relPath, config.pdf.maxBytes);
|
|
201036
201042
|
return reply.code(413).send({ error: error.reason, limit });
|
|
201037
201043
|
}
|
|
201038
201044
|
return reply.code(404).send({ error: error.reason });
|
package/dist/pi-outpost.sea.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/pi-outpost.sea.mjs
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34848854 bytes
|
|
4
|
+
sha256: 5babf7f1c43e97a3f4ffcecfc02d196006df3774a7371c5dca946a91c838c222
|
package/dist/sea-prep.blob
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/sea-prep.blob
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 34847912 bytes
|
|
4
|
+
sha256: 3a9b1f9f073b34548f877c87912ce68d68bbee2867df896167f8373fdb1a1867
|