@dudousxd/nestjs-media-dashboard 0.13.1 → 0.15.0
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/client/media-console-client.d.ts +16 -1
- package/dist/client/media-console-client.d.ts.map +1 -1
- package/dist/client/media-console-client.js +28 -0
- package/dist/client/media-console-client.js.map +1 -1
- package/dist/client/types.d.ts +38 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/server/index.cjs +250 -20
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +262 -109
- package/dist/server/index.d.ts +262 -109
- package/dist/server/index.js +257 -27
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/ArchivePreview-BnZ6v9hj.js +1 -0
- package/dist/spa/assets/CertificatePreview-BnTj-uwU.js +118 -0
- package/dist/spa/assets/MarkdownPreview-Cg0Of88H.js +67 -0
- package/dist/spa/assets/ParquetPreview-Zxc-Aex9.js +973 -0
- package/dist/spa/assets/SheetPreview-C4__dbRY.js +38 -0
- package/dist/spa/assets/SqlitePreview-Bxqm8dm3.js +1 -0
- package/dist/spa/assets/index-DeIsE7va.js +1 -0
- package/dist/spa/assets/{index-B-1X8J9e.js → index-af6EPN08.js} +1 -1
- package/dist/spa/assets/{preview-CbCAdWwU.js → preview-BaR8B_K4.js} +1 -1
- package/dist/spa/assets/sqlite.worker-BywrJP2Y.js +38 -0
- package/dist/spa/assets/sqlite3-BVKGSWc-.wasm +0 -0
- package/dist/spa/assets/sqlite3-opfs-async-proxy-D_xnb1D8.js +876 -0
- package/dist/spa/assets/sqlite3-worker1-IteDdVNs.js +36 -0
- package/dist/spa/assets/styles-CTk43nE-.js +75 -0
- package/dist/spa/assets/styles-FRkIQ83o.css +1 -0
- package/dist/spa/index.html +3 -3
- package/dist/spa/preview.html +3 -3
- package/package.json +9 -2
- package/dist/spa/assets/styles-89jQA1_A.js +0 -110
- package/dist/spa/assets/styles-DYz3hG2c.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CollectionsResponse, DiskListResponse, LibraryDetailResponse, LibraryListResponse, ObjectDetailResponse, ObjectListResponse, Topology, UploadDetailResponse, UploadListResponse } from './types.js';
|
|
1
|
+
import type { CollectionsResponse, DiskListResponse, LibraryDetailResponse, LibraryListResponse, ObjectDetailResponse, ObjectInsightsResponse, ObjectListResponse, Topology, UploadDetailResponse, UploadListResponse } from './types.js';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
__MEDIA_API__?: string;
|
|
@@ -37,6 +37,9 @@ export declare const mediaConsoleClient: {
|
|
|
37
37
|
limit?: number;
|
|
38
38
|
}) => Promise<ObjectListResponse>;
|
|
39
39
|
object: (disk: string, key: string) => Promise<ObjectDetailResponse>;
|
|
40
|
+
/** What the host knows about this object, from its registered `objectInsights` providers.
|
|
41
|
+
* `{ insights: [] }` when the host registered none. */
|
|
42
|
+
objectInsights: (disk: string, key: string) => Promise<ObjectInsightsResponse>;
|
|
40
43
|
/** Same-origin URL that streams the object bytes inline (Content-Disposition: inline) — used to
|
|
41
44
|
* embed previews that a cross-origin signed URL would download (PDFs) or that CORS would block. */
|
|
42
45
|
objectRawUrl: (disk: string, key: string) => string;
|
|
@@ -48,6 +51,18 @@ export declare const mediaConsoleClient: {
|
|
|
48
51
|
text: string;
|
|
49
52
|
bytesRead: number;
|
|
50
53
|
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Fetch a byte range of an object through the same-origin inline proxy. `end` is INCLUSIVE (HTTP
|
|
56
|
+
* `Range` semantics). This is what makes a random-access reader — a SQLite page reader, a ZIP
|
|
57
|
+
* directory reader — possible against an object far too big to download.
|
|
58
|
+
*
|
|
59
|
+
* THROWS when the server answers `200` instead of `206`, and that check is the entire point of
|
|
60
|
+
* this function rather than a nicety. A server build, a proxy, or a CDN that dropped the `Range`
|
|
61
|
+
* header answers 200 with the WHOLE body: a caller that just took `arrayBuffer()` would stream
|
|
62
|
+
* several hundred MB down the wire and then read its 64 KB page out of the front of it, looking
|
|
63
|
+
* for all the world like it worked. Failing loudly is the only way anyone finds out.
|
|
64
|
+
*/
|
|
65
|
+
objectRange: (disk: string, key: string, start: number, end: number) => Promise<Uint8Array>;
|
|
51
66
|
/** Fetch an object's raw bytes (for binary previews like XLSX) through the inline proxy. */
|
|
52
67
|
objectBytes: (disk: string, key: string) => Promise<ArrayBuffer>;
|
|
53
68
|
uploads: (params?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-console-client.d.ts","sourceRoot":"","sources":["../../src/client/media-console-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF;AAED,iGAAiG;AACjG,wBAAgB,OAAO,IAAI,MAAM,CAMhC;AA4CD,+FAA+F;AAC/F,MAAM,MAAM,gBAAgB,GACxB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAAE,GAChF;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAExC,iGAAiG;AACjG,eAAO,MAAM,kBAAkB;IAC7B,6FAA6F;cAC/E,OAAO,CAAC,gBAAgB,CAAC;IAgBvC,kGAAkG;sBAC1E,MAAM,YAAY,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC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AAO,kBAAkB,CAAC"}
|
|
@@ -83,6 +83,9 @@ export const mediaConsoleClient = {
|
|
|
83
83
|
disks: () => getJson('/disks'),
|
|
84
84
|
objects: (disk, params = {}) => getJson(withQuery(`/disks/${encodeURIComponent(disk)}/objects`, params)),
|
|
85
85
|
object: (disk, key) => getJson(withQuery(`/disks/${encodeURIComponent(disk)}/object`, { key })),
|
|
86
|
+
/** What the host knows about this object, from its registered `objectInsights` providers.
|
|
87
|
+
* `{ insights: [] }` when the host registered none. */
|
|
88
|
+
objectInsights: (disk, key) => getJson(withQuery(`/disks/${encodeURIComponent(disk)}/object/insights`, { key })),
|
|
86
89
|
/** Same-origin URL that streams the object bytes inline (Content-Disposition: inline) — used to
|
|
87
90
|
* embed previews that a cross-origin signed URL would download (PDFs) or that CORS would block. */
|
|
88
91
|
objectRawUrl: (disk, key) => `${apiBase()}${withQuery(`/disks/${encodeURIComponent(disk)}/object/raw`, { key })}`,
|
|
@@ -121,6 +124,31 @@ export const mediaConsoleClient = {
|
|
|
121
124
|
}
|
|
122
125
|
return { text: new TextDecoder().decode(merged), bytesRead };
|
|
123
126
|
},
|
|
127
|
+
/**
|
|
128
|
+
* Fetch a byte range of an object through the same-origin inline proxy. `end` is INCLUSIVE (HTTP
|
|
129
|
+
* `Range` semantics). This is what makes a random-access reader — a SQLite page reader, a ZIP
|
|
130
|
+
* directory reader — possible against an object far too big to download.
|
|
131
|
+
*
|
|
132
|
+
* THROWS when the server answers `200` instead of `206`, and that check is the entire point of
|
|
133
|
+
* this function rather than a nicety. A server build, a proxy, or a CDN that dropped the `Range`
|
|
134
|
+
* header answers 200 with the WHOLE body: a caller that just took `arrayBuffer()` would stream
|
|
135
|
+
* several hundred MB down the wire and then read its 64 KB page out of the front of it, looking
|
|
136
|
+
* for all the world like it worked. Failing loudly is the only way anyone finds out.
|
|
137
|
+
*/
|
|
138
|
+
objectRange: async (disk, key, start, end) => {
|
|
139
|
+
const response = await fetch(mediaConsoleClient.objectRawUrl(disk, key), {
|
|
140
|
+
credentials: 'same-origin',
|
|
141
|
+
headers: { Range: `bytes=${start}-${end}` },
|
|
142
|
+
});
|
|
143
|
+
if (response.status === 200) {
|
|
144
|
+
// Drop the body rather than buffering the object we deliberately did not ask for.
|
|
145
|
+
await response.body?.cancel().catch(() => undefined);
|
|
146
|
+
throw new Error(`Ranged read of "${key}" was answered 200 (full body) instead of 206 — the Range header was dropped between this page and the disk.`);
|
|
147
|
+
}
|
|
148
|
+
if (!response.ok)
|
|
149
|
+
throw new Error(`${response.status} ${response.statusText}`);
|
|
150
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
151
|
+
},
|
|
124
152
|
/** Fetch an object's raw bytes (for binary previews like XLSX) through the inline proxy. */
|
|
125
153
|
objectBytes: async (disk, key) => {
|
|
126
154
|
const response = await fetch(mediaConsoleClient.objectRawUrl(disk, key), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-console-client.js","sourceRoot":"","sources":["../../src/client/media-console-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-console-client.js","sourceRoot":"","sources":["../../src/client/media-console-client.ts"],"names":[],"mappings":"AAoBA,iGAAiG;AACjG,MAAM,UAAU,OAAO;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,MAAM,CAAC,aAAa;YAAE,OAAO,MAAM,CAAC,aAAa,CAAC;QACtD,IAAI,MAAM,CAAC,cAAc;YAAE,OAAO,GAAG,MAAM,CAAC,cAAc,MAAM,CAAC;IACnE,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,SAAS,CAAC,IAAY,EAAE,MAAmD;IAClF,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,K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E,CAAC;IACtD,2FAA2F;IAC3F,YAAY,EAAE,CAAC,IAAY,EAAE,GAAW,EAAE,IAA6B,EAAiB,EAAE,CACxF,OAAO,CACL,SAAS,CAAC,UAAU,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE;QACrD,GAAG;QACH,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC,EACF,IAAI,CACL;IACH,uEAAuE;IACvE,YAAY,EAAE,CAAC,IAAY,EAAE,MAAc,EAAiB,EAAE,CAC5D,IAAI,CAAC,MAAM,EAAE,UAAU,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC;IACvE,oFAAoF;IACpF,YAAY,EAAE,CAAC,IAAY,EAAE,MAAc,EAAiB,EAAE,CAC5D,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,UAAU,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;CACrF,CAAC"}
|
package/dist/client/types.d.ts
CHANGED
|
@@ -3,6 +3,15 @@ export interface DiskCapabilities {
|
|
|
3
3
|
multipart: boolean;
|
|
4
4
|
publicUrls: boolean;
|
|
5
5
|
list: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Can the disk serve a byte range without transferring the whole object (a ranged `object/raw`)?
|
|
8
|
+
*
|
|
9
|
+
* Optional HERE, unlike the required `ranged` on the driver's own `DriverCapabilities`, because
|
|
10
|
+
* this is a WIRE shape: the console bundle can be served by a host still running an older server
|
|
11
|
+
* build that never emits the field. `undefined` means "this server didn't say", which a caller
|
|
12
|
+
* should treat as "don't count on it" — not as `false`.
|
|
13
|
+
*/
|
|
14
|
+
ranged?: boolean;
|
|
6
15
|
}
|
|
7
16
|
export interface DiskInfo {
|
|
8
17
|
name: string;
|
|
@@ -97,4 +106,33 @@ export interface Topology {
|
|
|
97
106
|
disks: number;
|
|
98
107
|
actions: boolean;
|
|
99
108
|
}
|
|
109
|
+
/** One label/value row of an {@link ObjectInsight}. Rendered verbatim as text — no markup. */
|
|
110
|
+
export interface ObjectInsightFact {
|
|
111
|
+
label: string;
|
|
112
|
+
value: string;
|
|
113
|
+
}
|
|
114
|
+
/** A link out to the host's own screens, rendered as an anchor. */
|
|
115
|
+
export interface ObjectInsightLink {
|
|
116
|
+
label: string;
|
|
117
|
+
href: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Host-supplied context about one disk object, rendered in the console preview.
|
|
121
|
+
*
|
|
122
|
+
* The console can describe a file only as storage sees it (key, size, type). This is what the HOST
|
|
123
|
+
* knows about it — which knowledge base indexed it, which work order it belongs to — handed over as
|
|
124
|
+
* data, because the console ships as a prebuilt bundle a host cannot inject components into.
|
|
125
|
+
*/
|
|
126
|
+
export interface ObjectInsight {
|
|
127
|
+
/** Section heading, e.g. `Knowledge base`. */
|
|
128
|
+
title: string;
|
|
129
|
+
facts?: ObjectInsightFact[];
|
|
130
|
+
links?: ObjectInsightLink[];
|
|
131
|
+
/** One line of prose under the facts — a caveat, a status explanation. */
|
|
132
|
+
note?: string;
|
|
133
|
+
}
|
|
134
|
+
/** What `GET disks/:disk/object/insights` returns. Empty when the host registered no providers. */
|
|
135
|
+
export interface ObjectInsightsResponse {
|
|
136
|
+
insights: ObjectInsight[];
|
|
137
|
+
}
|
|
100
138
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../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,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8FAA8F;AAC9F,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC5B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,mGAAmG;AACnG,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B"}
|
package/dist/server/index.cjs
CHANGED
|
@@ -349,6 +349,7 @@ var MEDIA_DASHBOARD_API_PATH = Symbol("MEDIA_DASHBOARD_API_PATH");
|
|
|
349
349
|
var MEDIA_DASHBOARD_ACTIONS = Symbol("MEDIA_DASHBOARD_ACTIONS");
|
|
350
350
|
var MEDIA_CONSOLE_AUTH = Symbol("MEDIA_CONSOLE_AUTH");
|
|
351
351
|
var MEDIA_CONSOLE_COOKIE_PATH = Symbol("MEDIA_CONSOLE_COOKIE_PATH");
|
|
352
|
+
var MEDIA_CONSOLE_OBJECT_INSIGHTS = Symbol("MEDIA_CONSOLE_OBJECT_INSIGHTS");
|
|
352
353
|
|
|
353
354
|
// src/server/media-console.guard.ts
|
|
354
355
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -456,6 +457,34 @@ MediaConsoleGuard = _ts_decorate([
|
|
|
456
457
|
|
|
457
458
|
// src/server/media-console.service.ts
|
|
458
459
|
var import_common2 = require("@nestjs/common");
|
|
460
|
+
|
|
461
|
+
// src/server/object-insights.ts
|
|
462
|
+
var SAFE_LINK_SCHEMES = /* @__PURE__ */ new Set([
|
|
463
|
+
"http:",
|
|
464
|
+
"https:"
|
|
465
|
+
]);
|
|
466
|
+
function sanitizeInsight(insight) {
|
|
467
|
+
if (insight.links === void 0) {
|
|
468
|
+
return insight;
|
|
469
|
+
}
|
|
470
|
+
const links = insight.links.filter((link) => {
|
|
471
|
+
if (link.href.startsWith("/")) {
|
|
472
|
+
return !link.href.startsWith("//");
|
|
473
|
+
}
|
|
474
|
+
try {
|
|
475
|
+
return SAFE_LINK_SCHEMES.has(new URL(link.href).protocol);
|
|
476
|
+
} catch {
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
return {
|
|
481
|
+
...insight,
|
|
482
|
+
links
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
__name(sanitizeInsight, "sanitizeInsight");
|
|
486
|
+
|
|
487
|
+
// src/server/media-console.service.ts
|
|
459
488
|
function _ts_decorate2(decorators, target, key, desc) {
|
|
460
489
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
461
490
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -484,6 +513,37 @@ function lastSegment(prefix) {
|
|
|
484
513
|
return slash === -1 ? trimmed : trimmed.slice(slash + 1);
|
|
485
514
|
}
|
|
486
515
|
__name(lastSegment, "lastSegment");
|
|
516
|
+
var RangeNotSatisfiableException = class extends import_common2.HttpException {
|
|
517
|
+
static {
|
|
518
|
+
__name(this, "RangeNotSatisfiableException");
|
|
519
|
+
}
|
|
520
|
+
size;
|
|
521
|
+
constructor(size) {
|
|
522
|
+
super({
|
|
523
|
+
statusCode: import_common2.HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE,
|
|
524
|
+
message: `Requested range is not satisfiable for an object of ${size} bytes`,
|
|
525
|
+
error: "Range Not Satisfiable"
|
|
526
|
+
}, import_common2.HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE), this.size = size;
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
function resolveRange(range, size) {
|
|
530
|
+
if ("suffixLength" in range) {
|
|
531
|
+
if (!Number.isInteger(range.suffixLength) || range.suffixLength <= 0 || size === 0) return null;
|
|
532
|
+
return {
|
|
533
|
+
start: Math.max(0, size - range.suffixLength),
|
|
534
|
+
end: size - 1
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
const { start } = range;
|
|
538
|
+
if (!Number.isInteger(start) || start < 0 || start >= size) return null;
|
|
539
|
+
const end = range.end === void 0 ? size - 1 : Math.min(range.end, size - 1);
|
|
540
|
+
if (!Number.isInteger(end) || end < start) return null;
|
|
541
|
+
return {
|
|
542
|
+
start,
|
|
543
|
+
end
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
__name(resolveRange, "resolveRange");
|
|
487
547
|
function mapUpload(session) {
|
|
488
548
|
const percent = session.size !== void 0 && session.size > 0 ? Math.min(100, Math.round(session.offset / session.size * 100)) : null;
|
|
489
549
|
return {
|
|
@@ -517,7 +577,7 @@ function mapRecord(record) {
|
|
|
517
577
|
};
|
|
518
578
|
}
|
|
519
579
|
__name(mapRecord, "mapRecord");
|
|
520
|
-
var MediaConsoleService = class {
|
|
580
|
+
var MediaConsoleService = class _MediaConsoleService {
|
|
521
581
|
static {
|
|
522
582
|
__name(this, "MediaConsoleService");
|
|
523
583
|
}
|
|
@@ -525,12 +585,15 @@ var MediaConsoleService = class {
|
|
|
525
585
|
store;
|
|
526
586
|
uploads;
|
|
527
587
|
actionsEnabled;
|
|
528
|
-
|
|
588
|
+
insightProviders;
|
|
589
|
+
constructor(storage, store, uploads, actionsEnabled, insightProviders = null) {
|
|
529
590
|
this.storage = storage;
|
|
530
591
|
this.store = store;
|
|
531
592
|
this.uploads = uploads;
|
|
532
593
|
this.actionsEnabled = actionsEnabled;
|
|
594
|
+
this.insightProviders = insightProviders;
|
|
533
595
|
}
|
|
596
|
+
logger = new import_common2.Logger(_MediaConsoleService.name);
|
|
534
597
|
diskOrThrow(disk) {
|
|
535
598
|
if (!this.storage || !this.storage.diskNames().includes(disk)) {
|
|
536
599
|
throw new import_common2.NotFoundException(`Unknown disk: ${disk}`);
|
|
@@ -599,17 +662,82 @@ var MediaConsoleService = class {
|
|
|
599
662
|
url
|
|
600
663
|
};
|
|
601
664
|
}
|
|
602
|
-
/**
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
|
|
665
|
+
/**
|
|
666
|
+
* What the HOST knows about this object, from every registered provider.
|
|
667
|
+
*
|
|
668
|
+
* Its own call rather than a field on `objectDetail`, for the same reason the RAG index-status
|
|
669
|
+
* endpoint is separate from its document listing: `objectDetail` is on the path of every preview
|
|
670
|
+
* and every navigation, and providers reach into host databases. Folding them in would put a host
|
|
671
|
+
* query on reads that only wanted a presigned URL.
|
|
672
|
+
*
|
|
673
|
+
* Failures are contained per provider. A provider that throws is logged and dropped, and the
|
|
674
|
+
* others still render — annotation must never be able to stop an admin opening a file, and one
|
|
675
|
+
* host lookup being down says nothing about the rest.
|
|
676
|
+
*
|
|
677
|
+
* Providers run concurrently: they are independent host lookups, and running them in series would
|
|
678
|
+
* make the panel as slow as their sum for no gain.
|
|
679
|
+
*/
|
|
680
|
+
async objectInsights(disk, key) {
|
|
681
|
+
const providers = this.insightProviders ?? [];
|
|
682
|
+
if (providers.length === 0) {
|
|
683
|
+
return {
|
|
684
|
+
insights: []
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
this.diskOrThrow(disk);
|
|
688
|
+
const settled = await Promise.all(providers.map(async (provider) => {
|
|
689
|
+
try {
|
|
690
|
+
return await provider.resolve({
|
|
691
|
+
disk,
|
|
692
|
+
key
|
|
693
|
+
});
|
|
694
|
+
} catch (error) {
|
|
695
|
+
this.logger.warn(`Object-insight provider "${provider.id}" failed for ${disk}:${key} \u2014 ${error instanceof Error ? error.message : String(error)}`);
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
}));
|
|
699
|
+
return {
|
|
700
|
+
insights: settled.filter((insight) => insight !== null).map(sanitizeInsight)
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* The object's raw byte stream plus the metadata the controller needs to serve it inline. Used by
|
|
705
|
+
* the console's same-origin preview proxy so text/PDF render in the browser instead of downloading
|
|
706
|
+
* (and so a CORS-locked bucket is still previewable).
|
|
707
|
+
*
|
|
708
|
+
* With `range`, only that slice — which is what makes previewing a multi-hundred-MB object (a
|
|
709
|
+
* SQLite database read a page at a time) possible at all. The range is resolved HERE, not in the
|
|
710
|
+
* driver, because it has to be checked against the object's size and the `stat` for that is
|
|
711
|
+
* already on this path: the suffix form is made absolute, an overrunning `end` is clamped to the
|
|
712
|
+
* last byte, and anything genuinely unsatisfiable becomes a {@link RangeNotSatisfiableException}
|
|
713
|
+
* (HTTP 416) instead of a surprise empty body.
|
|
714
|
+
*
|
|
715
|
+
* A driver that reports `ranged: false` REFUSES a range request rather than quietly returning the
|
|
716
|
+
* whole object: the caller asked for 64 KB out of 400 MB, and silently answering with all 400 MB
|
|
717
|
+
* — which the caller would then read as if it were the slice — is the exact failure the `ranged`
|
|
718
|
+
* capability exists to make impossible.
|
|
719
|
+
*/
|
|
720
|
+
async objectStream(disk, key, range) {
|
|
606
721
|
const driver = this.diskOrThrow(disk);
|
|
607
722
|
const stat = await driver.stat(key);
|
|
608
|
-
const
|
|
723
|
+
const contentType = stat.contentType ?? "application/octet-stream";
|
|
724
|
+
if (!range) {
|
|
725
|
+
return {
|
|
726
|
+
stream: await driver.stream(key),
|
|
727
|
+
contentType,
|
|
728
|
+
size: stat.size
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
if (!driver.capabilities.ranged) {
|
|
732
|
+
throw new import_common2.NotImplementedException(`Disk "${disk}" cannot serve byte ranges`);
|
|
733
|
+
}
|
|
734
|
+
const resolved = resolveRange(range, stat.size);
|
|
735
|
+
if (!resolved) throw new RangeNotSatisfiableException(stat.size);
|
|
609
736
|
return {
|
|
610
|
-
stream,
|
|
611
|
-
contentType
|
|
612
|
-
size: stat.size
|
|
737
|
+
stream: await driver.stream(key, resolved),
|
|
738
|
+
contentType,
|
|
739
|
+
size: stat.size,
|
|
740
|
+
range: resolved
|
|
613
741
|
};
|
|
614
742
|
}
|
|
615
743
|
/** Writes an object from a byte stream (a browser upload). The caller supplies the full key
|
|
@@ -858,11 +986,14 @@ MediaConsoleService = _ts_decorate2([
|
|
|
858
986
|
_ts_param2(2, (0, import_common2.Inject)(MEDIA_UPLOAD_SESSIONS)),
|
|
859
987
|
_ts_param2(3, (0, import_common2.Optional)()),
|
|
860
988
|
_ts_param2(3, (0, import_common2.Inject)(MEDIA_DASHBOARD_ACTIONS)),
|
|
989
|
+
_ts_param2(4, (0, import_common2.Optional)()),
|
|
990
|
+
_ts_param2(4, (0, import_common2.Inject)(MEDIA_CONSOLE_OBJECT_INSIGHTS)),
|
|
861
991
|
_ts_metadata2("design:type", Function),
|
|
862
992
|
_ts_metadata2("design:paramtypes", [
|
|
863
993
|
Object,
|
|
864
994
|
Object,
|
|
865
995
|
Object,
|
|
996
|
+
Object,
|
|
866
997
|
Object
|
|
867
998
|
])
|
|
868
999
|
], MediaConsoleService);
|
|
@@ -1268,6 +1399,43 @@ function toLimit(value) {
|
|
|
1268
1399
|
return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : void 0;
|
|
1269
1400
|
}
|
|
1270
1401
|
__name(toLimit, "toLimit");
|
|
1402
|
+
var SINGLE_BYTE_RANGE = /^bytes=(\d*)-(\d*)$/;
|
|
1403
|
+
function parseRangeHeader(header) {
|
|
1404
|
+
if (header === void 0) return null;
|
|
1405
|
+
const match = SINGLE_BYTE_RANGE.exec(header.trim());
|
|
1406
|
+
if (!match) return null;
|
|
1407
|
+
const startText = match[1] ?? "";
|
|
1408
|
+
const endText = match[2] ?? "";
|
|
1409
|
+
if (startText === "" && endText === "") return null;
|
|
1410
|
+
if (startText === "") return {
|
|
1411
|
+
suffixLength: Number(endText)
|
|
1412
|
+
};
|
|
1413
|
+
const start = Number(startText);
|
|
1414
|
+
return endText === "" ? {
|
|
1415
|
+
start
|
|
1416
|
+
} : {
|
|
1417
|
+
start,
|
|
1418
|
+
end: Number(endText)
|
|
1419
|
+
};
|
|
1420
|
+
}
|
|
1421
|
+
__name(parseRangeHeader, "parseRangeHeader");
|
|
1422
|
+
function setHeader(response, name, value) {
|
|
1423
|
+
if (typeof response.setHeader === "function") {
|
|
1424
|
+
response.setHeader(name, value);
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
if (typeof response.raw?.setHeader === "function") response.raw.setHeader(name, value);
|
|
1428
|
+
}
|
|
1429
|
+
__name(setHeader, "setHeader");
|
|
1430
|
+
function setStatus(response, code) {
|
|
1431
|
+
if (typeof response.status === "function") {
|
|
1432
|
+
response.status(code);
|
|
1433
|
+
return;
|
|
1434
|
+
}
|
|
1435
|
+
if (response.raw) response.raw.statusCode = code;
|
|
1436
|
+
else response.statusCode = code;
|
|
1437
|
+
}
|
|
1438
|
+
__name(setStatus, "setStatus");
|
|
1271
1439
|
var MediaConsoleReadController = class {
|
|
1272
1440
|
static {
|
|
1273
1441
|
__name(this, "MediaConsoleReadController");
|
|
@@ -1296,16 +1464,48 @@ var MediaConsoleReadController = class {
|
|
|
1296
1464
|
object(disk, key) {
|
|
1297
1465
|
return this.service.objectDetail(disk, key);
|
|
1298
1466
|
}
|
|
1299
|
-
/**
|
|
1300
|
-
*
|
|
1301
|
-
|
|
1302
|
-
|
|
1467
|
+
/** What the host knows about this object, from its registered `objectInsights` providers. Empty
|
|
1468
|
+
* when none are registered — the console renders nothing for an empty list. */
|
|
1469
|
+
objectInsights(disk, key) {
|
|
1470
|
+
return this.service.objectInsights(disk, key);
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Streams the object's bytes inline (Content-Disposition: inline) from the same origin, so the SPA
|
|
1474
|
+
* can render text/PDF previews the browser would otherwise download, and read text past CORS.
|
|
1475
|
+
*
|
|
1476
|
+
* Honours a single-range `Range` header, which is what lets a reader pull a few KB out of a
|
|
1477
|
+
* multi-hundred-MB object (a SQLite page, a ZIP's central directory) instead of the whole file.
|
|
1478
|
+
* With no `Range` the response is byte-for-byte what it always was — a plain 200 full body, which
|
|
1479
|
+
* the PDF/text/spreadsheet previews depend on.
|
|
1480
|
+
*/
|
|
1481
|
+
async objectRaw(disk, key, rangeHeader, response) {
|
|
1482
|
+
const requested = parseRangeHeader(rangeHeader);
|
|
1483
|
+
setHeader(response, "Accept-Ranges", "bytes");
|
|
1484
|
+
let result;
|
|
1485
|
+
try {
|
|
1486
|
+
result = await this.service.objectStream(disk, key, requested ?? void 0);
|
|
1487
|
+
} catch (error) {
|
|
1488
|
+
if (error instanceof RangeNotSatisfiableException) {
|
|
1489
|
+
setHeader(response, "Content-Range", `bytes */${error.size}`);
|
|
1490
|
+
}
|
|
1491
|
+
throw error;
|
|
1492
|
+
}
|
|
1493
|
+
const { stream, contentType, size, range } = result;
|
|
1494
|
+
if (!range) {
|
|
1495
|
+
return new import_common5.StreamableFile(stream, {
|
|
1496
|
+
type: contentType,
|
|
1497
|
+
disposition: "inline",
|
|
1498
|
+
...Number.isFinite(size) ? {
|
|
1499
|
+
length: size
|
|
1500
|
+
} : {}
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
setStatus(response, 206);
|
|
1504
|
+
setHeader(response, "Content-Range", `bytes ${range.start}-${range.end}/${size}`);
|
|
1303
1505
|
return new import_common5.StreamableFile(stream, {
|
|
1304
1506
|
type: contentType,
|
|
1305
1507
|
disposition: "inline",
|
|
1306
|
-
|
|
1307
|
-
length: size
|
|
1308
|
-
} : {}
|
|
1508
|
+
length: range.end - range.start + 1
|
|
1309
1509
|
});
|
|
1310
1510
|
}
|
|
1311
1511
|
uploads(disk, prefix) {
|
|
@@ -1381,7 +1581,7 @@ _ts_decorate5([
|
|
|
1381
1581
|
_ts_metadata5("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1382
1582
|
], MediaConsoleReadController.prototype, "object", null);
|
|
1383
1583
|
_ts_decorate5([
|
|
1384
|
-
(0, import_common5.Get)("disks/:disk/object/
|
|
1584
|
+
(0, import_common5.Get)("disks/:disk/object/insights"),
|
|
1385
1585
|
_ts_param5(0, (0, import_common5.Param)("disk")),
|
|
1386
1586
|
_ts_param5(1, (0, import_common5.Query)("key")),
|
|
1387
1587
|
_ts_metadata5("design:type", Function),
|
|
@@ -1389,6 +1589,23 @@ _ts_decorate5([
|
|
|
1389
1589
|
String,
|
|
1390
1590
|
String
|
|
1391
1591
|
]),
|
|
1592
|
+
_ts_metadata5("design:returntype", typeof Promise === "undefined" ? Object : Promise)
|
|
1593
|
+
], MediaConsoleReadController.prototype, "objectInsights", null);
|
|
1594
|
+
_ts_decorate5([
|
|
1595
|
+
(0, import_common5.Get)("disks/:disk/object/raw"),
|
|
1596
|
+
_ts_param5(0, (0, import_common5.Param)("disk")),
|
|
1597
|
+
_ts_param5(1, (0, import_common5.Query)("key")),
|
|
1598
|
+
_ts_param5(2, (0, import_common5.Headers)("range")),
|
|
1599
|
+
_ts_param5(3, (0, import_common5.Res)({
|
|
1600
|
+
passthrough: true
|
|
1601
|
+
})),
|
|
1602
|
+
_ts_metadata5("design:type", Function),
|
|
1603
|
+
_ts_metadata5("design:paramtypes", [
|
|
1604
|
+
String,
|
|
1605
|
+
String,
|
|
1606
|
+
Object,
|
|
1607
|
+
typeof ConsoleHttpResponse === "undefined" ? Object : ConsoleHttpResponse
|
|
1608
|
+
]),
|
|
1392
1609
|
_ts_metadata5("design:returntype", Promise)
|
|
1393
1610
|
], MediaConsoleReadController.prototype, "objectRaw", null);
|
|
1394
1611
|
_ts_decorate5([
|
|
@@ -1504,6 +1721,10 @@ var MediaConsoleApiModule = class _MediaConsoleApiModule {
|
|
|
1504
1721
|
useValue: options.cookiePath
|
|
1505
1722
|
},
|
|
1506
1723
|
options.authProvider,
|
|
1724
|
+
options.insightsProvider ?? {
|
|
1725
|
+
provide: MEDIA_CONSOLE_OBJECT_INSIGHTS,
|
|
1726
|
+
useValue: []
|
|
1727
|
+
},
|
|
1507
1728
|
// Class guards need a DI provider so Nest can instantiate them in THIS module's context
|
|
1508
1729
|
// (where `imports` above resolves their dependencies). An already-instantiated guard needs
|
|
1509
1730
|
// none — it's used as-is.
|
|
@@ -1703,6 +1924,9 @@ var MediaDashboardModule = class _MediaDashboardModule {
|
|
|
1703
1924
|
return _MediaDashboardModule.build(options, apiBasePath, {
|
|
1704
1925
|
provide: MEDIA_CONSOLE_AUTH,
|
|
1705
1926
|
useValue: resolveConsoleAuth(options.auth)
|
|
1927
|
+
}, {
|
|
1928
|
+
provide: MEDIA_CONSOLE_OBJECT_INSIGHTS,
|
|
1929
|
+
useValue: options.objectInsights ?? []
|
|
1706
1930
|
}, options.imports);
|
|
1707
1931
|
}
|
|
1708
1932
|
static forRootAsync(options) {
|
|
@@ -1712,10 +1936,15 @@ var MediaDashboardModule = class _MediaDashboardModule {
|
|
|
1712
1936
|
inject: options.inject ?? [],
|
|
1713
1937
|
useFactory: /* @__PURE__ */ __name(async (...deps) => resolveConsoleAuth(await options.useAuth(...deps)), "useFactory")
|
|
1714
1938
|
};
|
|
1715
|
-
|
|
1939
|
+
const insightsProvider = {
|
|
1940
|
+
provide: MEDIA_CONSOLE_OBJECT_INSIGHTS,
|
|
1941
|
+
inject: options.injectObjectInsights ?? options.inject ?? [],
|
|
1942
|
+
useFactory: /* @__PURE__ */ __name(async (...deps) => options.useObjectInsights === void 0 ? [] : await options.useObjectInsights(...deps), "useFactory")
|
|
1943
|
+
};
|
|
1944
|
+
return _MediaDashboardModule.build(options, apiBasePath, authProvider, insightsProvider, options.imports);
|
|
1716
1945
|
}
|
|
1717
1946
|
/** Shared wiring: static routing + the API module, with `auth` supplied by the given provider. */
|
|
1718
|
-
static build(options, apiBasePath, authProvider, imports) {
|
|
1947
|
+
static build(options, apiBasePath, authProvider, insightsProvider, imports) {
|
|
1719
1948
|
const basePath = normalize(options.basePath ?? "/media");
|
|
1720
1949
|
const actions = options.actions === true;
|
|
1721
1950
|
stampGuards(options.guards, [
|
|
@@ -1742,6 +1971,7 @@ var MediaDashboardModule = class _MediaDashboardModule {
|
|
|
1742
1971
|
// always share one root.
|
|
1743
1972
|
cookiePath: "/",
|
|
1744
1973
|
authProvider,
|
|
1974
|
+
insightsProvider,
|
|
1745
1975
|
imports,
|
|
1746
1976
|
...options.guards ? {
|
|
1747
1977
|
guards: options.guards
|