@dudousxd/nestjs-durable-dashboard 0.50.0 → 0.51.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/durable-client.d.ts +2 -0
- package/dist/client/durable-client.d.ts.map +1 -1
- package/dist/client/durable-client.js +8 -0
- package/dist/client/durable-client.js.map +1 -1
- package/dist/server/index.cjs +380 -290
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +16 -3
- package/dist/server/index.d.ts +16 -3
- package/dist/server/index.js +250 -160
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/{bench-bNSq4C-e.js → bench-UvOjwMnz.js} +1 -1
- package/dist/spa/assets/{index-DYEe8Ag-.css → index-BbR4CZ1K.css} +1 -1
- package/dist/spa/assets/{index-CwX0J7uV.js → index-DnQL-Xbv.js} +15 -15
- package/dist/spa/assets/{index-CMQJ1rjL.js → index-ov2ocqi5.js} +1 -1
- package/dist/spa/assets/{preview-CehDLs8M.js → preview-BSiqTdta.js} +1 -1
- package/dist/spa/bench.html +3 -3
- package/dist/spa/index.html +3 -3
- package/dist/spa/preview.html +3 -3
- package/package.json +2 -2
package/dist/server/index.js
CHANGED
|
@@ -255,7 +255,7 @@ DashboardService = _ts_decorate([
|
|
|
255
255
|
|
|
256
256
|
// src/server/durable-api.controller.ts
|
|
257
257
|
import { ApplyFilter, ApplyFilterInterceptor, FilterRunner } from "@dudousxd/nestjs-filter";
|
|
258
|
-
import { Body, Controller, Get, Header, NotFoundException, Param, Post, Query, Sse, UseInterceptors } from "@nestjs/common";
|
|
258
|
+
import { Body, Controller, Get, Header, Headers, NotFoundException, Param, Post, Query, Res, Sse, UseFilters, UseInterceptors } from "@nestjs/common";
|
|
259
259
|
|
|
260
260
|
// src/server/durable-run.ts
|
|
261
261
|
var DurableRun = class {
|
|
@@ -330,6 +330,129 @@ function runValueAxisFor(field) {
|
|
|
330
330
|
}
|
|
331
331
|
__name(runValueAxisFor, "runValueAxisFor");
|
|
332
332
|
|
|
333
|
+
// src/server/not-modified.ts
|
|
334
|
+
import { Catch, HttpException } from "@nestjs/common";
|
|
335
|
+
|
|
336
|
+
// src/server/auth/response.ts
|
|
337
|
+
function isRecord(value) {
|
|
338
|
+
return typeof value === "object" && value !== null;
|
|
339
|
+
}
|
|
340
|
+
__name(isRecord, "isRecord");
|
|
341
|
+
function isRawCookieResponse(value) {
|
|
342
|
+
return isRecord(value) && typeof value.getHeader === "function" && typeof value.setHeader === "function";
|
|
343
|
+
}
|
|
344
|
+
__name(isRawCookieResponse, "isRawCookieResponse");
|
|
345
|
+
function resolveCookieResponse(response) {
|
|
346
|
+
if (isRawCookieResponse(response)) return response;
|
|
347
|
+
if (isRecord(response) && isRawCookieResponse(response.raw)) return response.raw;
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
__name(resolveCookieResponse, "resolveCookieResponse");
|
|
351
|
+
function existingSetCookies(response) {
|
|
352
|
+
const current = response.getHeader("set-cookie");
|
|
353
|
+
if (Array.isArray(current)) return current;
|
|
354
|
+
if (typeof current === "string") return [
|
|
355
|
+
current
|
|
356
|
+
];
|
|
357
|
+
return [];
|
|
358
|
+
}
|
|
359
|
+
__name(existingSetCookies, "existingSetCookies");
|
|
360
|
+
function appendSetCookie(response, cookie) {
|
|
361
|
+
const raw = resolveCookieResponse(response);
|
|
362
|
+
if (!raw) return;
|
|
363
|
+
raw.setHeader("set-cookie", [
|
|
364
|
+
...existingSetCookies(raw),
|
|
365
|
+
cookie
|
|
366
|
+
]);
|
|
367
|
+
}
|
|
368
|
+
__name(appendSetCookie, "appendSetCookie");
|
|
369
|
+
function isRawRedirectResponse(value) {
|
|
370
|
+
return isRecord(value) && typeof value.getHeader === "function" && typeof value.setHeader === "function" && typeof value.end === "function";
|
|
371
|
+
}
|
|
372
|
+
__name(isRawRedirectResponse, "isRawRedirectResponse");
|
|
373
|
+
function resolveRedirectResponse(response) {
|
|
374
|
+
if (isRawRedirectResponse(response)) return response;
|
|
375
|
+
if (isRecord(response) && isRawRedirectResponse(response.raw)) return response.raw;
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
__name(resolveRedirectResponse, "resolveRedirectResponse");
|
|
379
|
+
function redirectRaw(response, location, status = 302) {
|
|
380
|
+
const raw = resolveRedirectResponse(response);
|
|
381
|
+
if (!raw) return;
|
|
382
|
+
raw.statusCode = status;
|
|
383
|
+
raw.setHeader("location", location);
|
|
384
|
+
raw.end();
|
|
385
|
+
}
|
|
386
|
+
__name(redirectRaw, "redirectRaw");
|
|
387
|
+
function responseAlreadyWritten(response) {
|
|
388
|
+
const raw = resolveRedirectResponse(response);
|
|
389
|
+
return raw?.headersSent === true;
|
|
390
|
+
}
|
|
391
|
+
__name(responseAlreadyWritten, "responseAlreadyWritten");
|
|
392
|
+
function writeHtmlRaw(response, html, status = 200) {
|
|
393
|
+
const raw = resolveRedirectResponse(response);
|
|
394
|
+
if (!raw) return;
|
|
395
|
+
raw.statusCode = status;
|
|
396
|
+
raw.setHeader("content-type", "text/html; charset=utf-8");
|
|
397
|
+
raw.setHeader("cache-control", "no-store, must-revalidate");
|
|
398
|
+
raw.end(html);
|
|
399
|
+
}
|
|
400
|
+
__name(writeHtmlRaw, "writeHtmlRaw");
|
|
401
|
+
function setRawHeader(response, name, value) {
|
|
402
|
+
resolveCookieResponse(response)?.setHeader(name, value);
|
|
403
|
+
}
|
|
404
|
+
__name(setRawHeader, "setRawHeader");
|
|
405
|
+
function writeNotModifiedRaw(response, etag) {
|
|
406
|
+
const raw = resolveRedirectResponse(response);
|
|
407
|
+
if (!raw) return;
|
|
408
|
+
raw.statusCode = 304;
|
|
409
|
+
raw.setHeader("etag", etag);
|
|
410
|
+
raw.setHeader("cache-control", "private, no-cache");
|
|
411
|
+
raw.end();
|
|
412
|
+
}
|
|
413
|
+
__name(writeNotModifiedRaw, "writeNotModifiedRaw");
|
|
414
|
+
|
|
415
|
+
// src/server/not-modified.ts
|
|
416
|
+
function _ts_decorate2(decorators, target, key, desc) {
|
|
417
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
418
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
419
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
420
|
+
} else {
|
|
421
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
422
|
+
if (d = decorators[i]) {
|
|
423
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
428
|
+
}
|
|
429
|
+
__name(_ts_decorate2, "_ts_decorate");
|
|
430
|
+
var NotModifiedException = class extends HttpException {
|
|
431
|
+
static {
|
|
432
|
+
__name(this, "NotModifiedException");
|
|
433
|
+
}
|
|
434
|
+
etag;
|
|
435
|
+
constructor(etag) {
|
|
436
|
+
super("Not Modified", 304), this.etag = etag;
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
var NotModifiedFilter = class {
|
|
440
|
+
static {
|
|
441
|
+
__name(this, "NotModifiedFilter");
|
|
442
|
+
}
|
|
443
|
+
catch(exception, host) {
|
|
444
|
+
writeNotModifiedRaw(host.switchToHttp().getResponse(), exception.etag);
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
NotModifiedFilter = _ts_decorate2([
|
|
448
|
+
Catch(NotModifiedException)
|
|
449
|
+
], NotModifiedFilter);
|
|
450
|
+
function setEtag(response, etag) {
|
|
451
|
+
setRawHeader(response, "etag", etag);
|
|
452
|
+
setRawHeader(response, "cache-control", "private, no-cache");
|
|
453
|
+
}
|
|
454
|
+
__name(setEtag, "setEtag");
|
|
455
|
+
|
|
333
456
|
// src/server/run-list-row.ts
|
|
334
457
|
function toRunListRow(run) {
|
|
335
458
|
const { input: _input, output: _output, error: _error, ...row } = run;
|
|
@@ -420,7 +543,7 @@ var RunQueryDraft2 = class {
|
|
|
420
543
|
};
|
|
421
544
|
|
|
422
545
|
// src/server/run-query.adapter.ts
|
|
423
|
-
function
|
|
546
|
+
function _ts_decorate3(decorators, target, key, desc) {
|
|
424
547
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
425
548
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
426
549
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -433,7 +556,7 @@ function _ts_decorate2(decorators, target, key, desc) {
|
|
|
433
556
|
}
|
|
434
557
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
435
558
|
}
|
|
436
|
-
__name(
|
|
559
|
+
__name(_ts_decorate3, "_ts_decorate");
|
|
437
560
|
function _ts_metadata2(metadataKey, metadataValue) {
|
|
438
561
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
439
562
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -713,7 +836,7 @@ var RunQueryAdapter = class {
|
|
|
713
836
|
}
|
|
714
837
|
}
|
|
715
838
|
};
|
|
716
|
-
RunQueryAdapter =
|
|
839
|
+
RunQueryAdapter = _ts_decorate3([
|
|
717
840
|
Injectable2(),
|
|
718
841
|
_ts_metadata2("design:type", Function),
|
|
719
842
|
_ts_metadata2("design:paramtypes", [
|
|
@@ -722,7 +845,7 @@ RunQueryAdapter = _ts_decorate2([
|
|
|
722
845
|
], RunQueryAdapter);
|
|
723
846
|
|
|
724
847
|
// src/server/run.filter.ts
|
|
725
|
-
function
|
|
848
|
+
function _ts_decorate4(decorators, target, key, desc) {
|
|
726
849
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
727
850
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
728
851
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -735,7 +858,7 @@ function _ts_decorate3(decorators, target, key, desc) {
|
|
|
735
858
|
}
|
|
736
859
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
737
860
|
}
|
|
738
|
-
__name(
|
|
861
|
+
__name(_ts_decorate4, "_ts_decorate");
|
|
739
862
|
function _ts_metadata3(metadataKey, metadataValue) {
|
|
740
863
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
741
864
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -861,7 +984,7 @@ var RunFilter = class extends BaseFilter {
|
|
|
861
984
|
});
|
|
862
985
|
}
|
|
863
986
|
};
|
|
864
|
-
|
|
987
|
+
_ts_decorate4([
|
|
865
988
|
FilterFor("status"),
|
|
866
989
|
_ts_metadata3("design:type", Function),
|
|
867
990
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -869,7 +992,7 @@ _ts_decorate3([
|
|
|
869
992
|
]),
|
|
870
993
|
_ts_metadata3("design:returntype", void 0)
|
|
871
994
|
], RunFilter.prototype, "applyStatus", null);
|
|
872
|
-
|
|
995
|
+
_ts_decorate4([
|
|
873
996
|
FilterFor("workflow"),
|
|
874
997
|
_ts_metadata3("design:type", Function),
|
|
875
998
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -877,7 +1000,7 @@ _ts_decorate3([
|
|
|
877
1000
|
]),
|
|
878
1001
|
_ts_metadata3("design:returntype", void 0)
|
|
879
1002
|
], RunFilter.prototype, "applyWorkflow", null);
|
|
880
|
-
|
|
1003
|
+
_ts_decorate4([
|
|
881
1004
|
FilterFor("namespace"),
|
|
882
1005
|
_ts_metadata3("design:type", Function),
|
|
883
1006
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -885,7 +1008,7 @@ _ts_decorate3([
|
|
|
885
1008
|
]),
|
|
886
1009
|
_ts_metadata3("design:returntype", void 0)
|
|
887
1010
|
], RunFilter.prototype, "applyNamespace", null);
|
|
888
|
-
|
|
1011
|
+
_ts_decorate4([
|
|
889
1012
|
FilterFor("tag"),
|
|
890
1013
|
_ts_metadata3("design:type", Function),
|
|
891
1014
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -893,19 +1016,19 @@ _ts_decorate3([
|
|
|
893
1016
|
]),
|
|
894
1017
|
_ts_metadata3("design:returntype", void 0)
|
|
895
1018
|
], RunFilter.prototype, "applyTag", null);
|
|
896
|
-
|
|
1019
|
+
_ts_decorate4([
|
|
897
1020
|
FilterFor("origin"),
|
|
898
1021
|
_ts_metadata3("design:type", Function),
|
|
899
1022
|
_ts_metadata3("design:paramtypes", []),
|
|
900
1023
|
_ts_metadata3("design:returntype", void 0)
|
|
901
1024
|
], RunFilter.prototype, "applyOrigin", null);
|
|
902
|
-
|
|
1025
|
+
_ts_decorate4([
|
|
903
1026
|
FilterFor("unattributed"),
|
|
904
1027
|
_ts_metadata3("design:type", Function),
|
|
905
1028
|
_ts_metadata3("design:paramtypes", []),
|
|
906
1029
|
_ts_metadata3("design:returntype", void 0)
|
|
907
1030
|
], RunFilter.prototype, "applyUnattributed", null);
|
|
908
|
-
|
|
1031
|
+
_ts_decorate4([
|
|
909
1032
|
FilterFor("attr"),
|
|
910
1033
|
_ts_metadata3("design:type", Function),
|
|
911
1034
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -913,7 +1036,7 @@ _ts_decorate3([
|
|
|
913
1036
|
]),
|
|
914
1037
|
_ts_metadata3("design:returntype", void 0)
|
|
915
1038
|
], RunFilter.prototype, "applyAttributes", null);
|
|
916
|
-
|
|
1039
|
+
_ts_decorate4([
|
|
917
1040
|
FilterFor("limit"),
|
|
918
1041
|
_ts_metadata3("design:type", Function),
|
|
919
1042
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -921,7 +1044,7 @@ _ts_decorate3([
|
|
|
921
1044
|
]),
|
|
922
1045
|
_ts_metadata3("design:returntype", void 0)
|
|
923
1046
|
], RunFilter.prototype, "applyLimit", null);
|
|
924
|
-
|
|
1047
|
+
_ts_decorate4([
|
|
925
1048
|
FilterFor("offset"),
|
|
926
1049
|
_ts_metadata3("design:type", Function),
|
|
927
1050
|
_ts_metadata3("design:paramtypes", [
|
|
@@ -929,7 +1052,7 @@ _ts_decorate3([
|
|
|
929
1052
|
]),
|
|
930
1053
|
_ts_metadata3("design:returntype", void 0)
|
|
931
1054
|
], RunFilter.prototype, "applyOffset", null);
|
|
932
|
-
RunFilter =
|
|
1055
|
+
RunFilter = _ts_decorate4([
|
|
933
1056
|
Injectable3(),
|
|
934
1057
|
Filterable({
|
|
935
1058
|
entity: DurableRun,
|
|
@@ -939,7 +1062,7 @@ RunFilter = _ts_decorate3([
|
|
|
939
1062
|
], RunFilter);
|
|
940
1063
|
|
|
941
1064
|
// src/server/durable-api.controller.ts
|
|
942
|
-
function
|
|
1065
|
+
function _ts_decorate5(decorators, target, key, desc) {
|
|
943
1066
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
944
1067
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
945
1068
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -952,7 +1075,7 @@ function _ts_decorate4(decorators, target, key, desc) {
|
|
|
952
1075
|
}
|
|
953
1076
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
954
1077
|
}
|
|
955
|
-
__name(
|
|
1078
|
+
__name(_ts_decorate5, "_ts_decorate");
|
|
956
1079
|
function _ts_metadata4(metadataKey, metadataValue) {
|
|
957
1080
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
958
1081
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -1067,23 +1190,43 @@ var DurableApiController = class {
|
|
|
1067
1190
|
/**
|
|
1068
1191
|
* A run's detail. Fans wider than {@link FAN_INLINE_MAX} come back as one `FanSummary` each, their
|
|
1069
1192
|
* members paged by `runs/:id/fans/:group`; `?full=true` returns every checkpoint instead.
|
|
1193
|
+
*
|
|
1194
|
+
* When the gateway can version the detail without reading it, the response carries an `ETag`, and
|
|
1195
|
+
* a poll whose `If-None-Match` still names it gets a 304 before the timeline is read. The browser
|
|
1196
|
+
* sends that header itself (the response is `no-cache`), so a console poll needs no code for it.
|
|
1070
1197
|
*/
|
|
1071
|
-
async run(id, full) {
|
|
1198
|
+
async run(id, full, ifNoneMatch, response) {
|
|
1072
1199
|
const detail = await this.dashboard.getRunDetail(id, full === "true" ? void 0 : {
|
|
1073
|
-
summarizeFansOver: FAN_INLINE_MAX
|
|
1200
|
+
summarizeFansOver: FAN_INLINE_MAX,
|
|
1201
|
+
...ifNoneMatch && {
|
|
1202
|
+
ifNoneMatch
|
|
1203
|
+
}
|
|
1074
1204
|
});
|
|
1075
1205
|
if (!detail) throw new NotFoundException(`run ${id} not found`);
|
|
1076
|
-
|
|
1206
|
+
const { etag, notModified, ...body } = detail;
|
|
1207
|
+
if (etag) {
|
|
1208
|
+
if (notModified) throw new NotModifiedException(etag);
|
|
1209
|
+
setEtag(response, etag);
|
|
1210
|
+
}
|
|
1211
|
+
return body;
|
|
1077
1212
|
}
|
|
1078
|
-
/** One page of a summarized fan's members, in seq order. */
|
|
1079
|
-
async fanMembers(id, group, offset, limit, failed) {
|
|
1213
|
+
/** One page of a summarized fan's members, in seq order. Versioned like {@link run}. */
|
|
1214
|
+
async fanMembers(id, group, offset, limit, failed, ifNoneMatch, response) {
|
|
1080
1215
|
const page2 = await this.dashboard.getFanMembers(id, group, {
|
|
1081
1216
|
offset: offset === void 0 ? void 0 : Number(offset),
|
|
1082
1217
|
limit: limit === void 0 ? void 0 : Number(limit),
|
|
1083
|
-
failedOnly: failed === "true"
|
|
1218
|
+
failedOnly: failed === "true",
|
|
1219
|
+
...ifNoneMatch && {
|
|
1220
|
+
ifNoneMatch
|
|
1221
|
+
}
|
|
1084
1222
|
});
|
|
1085
1223
|
if (!page2) throw new NotFoundException(`fan ${group} of run ${id} not found`);
|
|
1086
|
-
|
|
1224
|
+
const { etag, notModified, ...body } = page2;
|
|
1225
|
+
if (etag) {
|
|
1226
|
+
if (notModified) throw new NotModifiedException(etag);
|
|
1227
|
+
setEtag(response, etag);
|
|
1228
|
+
}
|
|
1229
|
+
return body;
|
|
1087
1230
|
}
|
|
1088
1231
|
/** Server-Sent Events stream of a run's live lifecycle events — the dashboard tails it instead
|
|
1089
1232
|
* of polling. Cross-pod when the transport has a control plane (see DashboardService.streamRun). */
|
|
@@ -1146,7 +1289,7 @@ var DurableApiController = class {
|
|
|
1146
1289
|
return this.dashboard.update(id, name, body);
|
|
1147
1290
|
}
|
|
1148
1291
|
};
|
|
1149
|
-
|
|
1292
|
+
_ts_decorate5([
|
|
1150
1293
|
Get("runs"),
|
|
1151
1294
|
_ts_param2(0, ApplyFilter(RunFilter)),
|
|
1152
1295
|
_ts_metadata4("design:type", Function),
|
|
@@ -1155,7 +1298,7 @@ _ts_decorate4([
|
|
|
1155
1298
|
]),
|
|
1156
1299
|
_ts_metadata4("design:returntype", Promise)
|
|
1157
1300
|
], DurableApiController.prototype, "runs", null);
|
|
1158
|
-
|
|
1301
|
+
_ts_decorate5([
|
|
1159
1302
|
Get("runs/facets"),
|
|
1160
1303
|
_ts_param2(0, ApplyFilter(RunFilter)),
|
|
1161
1304
|
_ts_metadata4("design:type", Function),
|
|
@@ -1164,7 +1307,7 @@ _ts_decorate4([
|
|
|
1164
1307
|
]),
|
|
1165
1308
|
_ts_metadata4("design:returntype", void 0)
|
|
1166
1309
|
], DurableApiController.prototype, "facets", null);
|
|
1167
|
-
|
|
1310
|
+
_ts_decorate5([
|
|
1168
1311
|
Get("runs/values"),
|
|
1169
1312
|
_ts_param2(0, Query()),
|
|
1170
1313
|
_ts_metadata4("design:type", Function),
|
|
@@ -1173,20 +1316,20 @@ _ts_decorate4([
|
|
|
1173
1316
|
]),
|
|
1174
1317
|
_ts_metadata4("design:returntype", void 0)
|
|
1175
1318
|
], DurableApiController.prototype, "values", null);
|
|
1176
|
-
|
|
1319
|
+
_ts_decorate5([
|
|
1177
1320
|
Get("metrics"),
|
|
1178
1321
|
Header("Content-Type", "text/plain; version=0.0.4"),
|
|
1179
1322
|
_ts_metadata4("design:type", Function),
|
|
1180
1323
|
_ts_metadata4("design:paramtypes", []),
|
|
1181
1324
|
_ts_metadata4("design:returntype", void 0)
|
|
1182
1325
|
], DurableApiController.prototype, "metrics", null);
|
|
1183
|
-
|
|
1326
|
+
_ts_decorate5([
|
|
1184
1327
|
Get("workers"),
|
|
1185
1328
|
_ts_metadata4("design:type", Function),
|
|
1186
1329
|
_ts_metadata4("design:paramtypes", []),
|
|
1187
1330
|
_ts_metadata4("design:returntype", void 0)
|
|
1188
1331
|
], DurableApiController.prototype, "workers", null);
|
|
1189
|
-
|
|
1332
|
+
_ts_decorate5([
|
|
1190
1333
|
Get("schedules"),
|
|
1191
1334
|
_ts_param2(0, Query("namespace")),
|
|
1192
1335
|
_ts_param2(1, Query("workflow")),
|
|
@@ -1203,7 +1346,7 @@ _ts_decorate4([
|
|
|
1203
1346
|
]),
|
|
1204
1347
|
_ts_metadata4("design:returntype", void 0)
|
|
1205
1348
|
], DurableApiController.prototype, "schedules", null);
|
|
1206
|
-
|
|
1349
|
+
_ts_decorate5([
|
|
1207
1350
|
Post("schedules/:id/pause"),
|
|
1208
1351
|
_ts_param2(0, Param("id")),
|
|
1209
1352
|
_ts_metadata4("design:type", Function),
|
|
@@ -1212,7 +1355,7 @@ _ts_decorate4([
|
|
|
1212
1355
|
]),
|
|
1213
1356
|
_ts_metadata4("design:returntype", void 0)
|
|
1214
1357
|
], DurableApiController.prototype, "pauseSchedule", null);
|
|
1215
|
-
|
|
1358
|
+
_ts_decorate5([
|
|
1216
1359
|
Post("schedules/:id/resume"),
|
|
1217
1360
|
_ts_param2(0, Param("id")),
|
|
1218
1361
|
_ts_metadata4("design:type", Function),
|
|
@@ -1221,7 +1364,7 @@ _ts_decorate4([
|
|
|
1221
1364
|
]),
|
|
1222
1365
|
_ts_metadata4("design:returntype", void 0)
|
|
1223
1366
|
], DurableApiController.prototype, "resumeSchedule", null);
|
|
1224
|
-
|
|
1367
|
+
_ts_decorate5([
|
|
1225
1368
|
Post("schedules/:id/trigger"),
|
|
1226
1369
|
_ts_param2(0, Param("id")),
|
|
1227
1370
|
_ts_metadata4("design:type", Function),
|
|
@@ -1230,41 +1373,53 @@ _ts_decorate4([
|
|
|
1230
1373
|
]),
|
|
1231
1374
|
_ts_metadata4("design:returntype", void 0)
|
|
1232
1375
|
], DurableApiController.prototype, "triggerSchedule", null);
|
|
1233
|
-
|
|
1376
|
+
_ts_decorate5([
|
|
1234
1377
|
Get("topology"),
|
|
1235
1378
|
_ts_metadata4("design:type", Function),
|
|
1236
1379
|
_ts_metadata4("design:paramtypes", []),
|
|
1237
1380
|
_ts_metadata4("design:returntype", void 0)
|
|
1238
1381
|
], DurableApiController.prototype, "topology", null);
|
|
1239
|
-
|
|
1382
|
+
_ts_decorate5([
|
|
1240
1383
|
Get("runs/:id"),
|
|
1241
1384
|
_ts_param2(0, Param("id")),
|
|
1242
1385
|
_ts_param2(1, Query("full")),
|
|
1386
|
+
_ts_param2(2, Headers("if-none-match")),
|
|
1387
|
+
_ts_param2(3, Res({
|
|
1388
|
+
passthrough: true
|
|
1389
|
+
})),
|
|
1243
1390
|
_ts_metadata4("design:type", Function),
|
|
1244
1391
|
_ts_metadata4("design:paramtypes", [
|
|
1245
1392
|
String,
|
|
1246
|
-
String
|
|
1393
|
+
String,
|
|
1394
|
+
String,
|
|
1395
|
+
Object
|
|
1247
1396
|
]),
|
|
1248
1397
|
_ts_metadata4("design:returntype", Promise)
|
|
1249
1398
|
], DurableApiController.prototype, "run", null);
|
|
1250
|
-
|
|
1399
|
+
_ts_decorate5([
|
|
1251
1400
|
Get("runs/:id/fans/:group"),
|
|
1252
1401
|
_ts_param2(0, Param("id")),
|
|
1253
1402
|
_ts_param2(1, Param("group")),
|
|
1254
1403
|
_ts_param2(2, Query("offset")),
|
|
1255
1404
|
_ts_param2(3, Query("limit")),
|
|
1256
1405
|
_ts_param2(4, Query("failed")),
|
|
1406
|
+
_ts_param2(5, Headers("if-none-match")),
|
|
1407
|
+
_ts_param2(6, Res({
|
|
1408
|
+
passthrough: true
|
|
1409
|
+
})),
|
|
1257
1410
|
_ts_metadata4("design:type", Function),
|
|
1258
1411
|
_ts_metadata4("design:paramtypes", [
|
|
1259
1412
|
String,
|
|
1260
1413
|
String,
|
|
1261
1414
|
String,
|
|
1262
1415
|
String,
|
|
1263
|
-
String
|
|
1416
|
+
String,
|
|
1417
|
+
String,
|
|
1418
|
+
Object
|
|
1264
1419
|
]),
|
|
1265
1420
|
_ts_metadata4("design:returntype", Promise)
|
|
1266
1421
|
], DurableApiController.prototype, "fanMembers", null);
|
|
1267
|
-
|
|
1422
|
+
_ts_decorate5([
|
|
1268
1423
|
Sse("runs/:id/stream"),
|
|
1269
1424
|
_ts_param2(0, Param("id")),
|
|
1270
1425
|
_ts_metadata4("design:type", Function),
|
|
@@ -1273,7 +1428,7 @@ _ts_decorate4([
|
|
|
1273
1428
|
]),
|
|
1274
1429
|
_ts_metadata4("design:returntype", void 0)
|
|
1275
1430
|
], DurableApiController.prototype, "stream", null);
|
|
1276
|
-
|
|
1431
|
+
_ts_decorate5([
|
|
1277
1432
|
Post("runs/:id/retry"),
|
|
1278
1433
|
_ts_param2(0, Param("id")),
|
|
1279
1434
|
_ts_metadata4("design:type", Function),
|
|
@@ -1282,7 +1437,7 @@ _ts_decorate4([
|
|
|
1282
1437
|
]),
|
|
1283
1438
|
_ts_metadata4("design:returntype", void 0)
|
|
1284
1439
|
], DurableApiController.prototype, "retry", null);
|
|
1285
|
-
|
|
1440
|
+
_ts_decorate5([
|
|
1286
1441
|
Post("runs/:id/retry-with-input"),
|
|
1287
1442
|
_ts_param2(0, Param("id")),
|
|
1288
1443
|
_ts_param2(1, Body()),
|
|
@@ -1293,7 +1448,7 @@ _ts_decorate4([
|
|
|
1293
1448
|
]),
|
|
1294
1449
|
_ts_metadata4("design:returntype", void 0)
|
|
1295
1450
|
], DurableApiController.prototype, "retryWithInput", null);
|
|
1296
|
-
|
|
1451
|
+
_ts_decorate5([
|
|
1297
1452
|
Post("bulk/:action"),
|
|
1298
1453
|
_ts_param2(0, Param("action")),
|
|
1299
1454
|
_ts_param2(1, ApplyFilter(RunFilter)),
|
|
@@ -1306,7 +1461,7 @@ _ts_decorate4([
|
|
|
1306
1461
|
]),
|
|
1307
1462
|
_ts_metadata4("design:returntype", void 0)
|
|
1308
1463
|
], DurableApiController.prototype, "bulk", null);
|
|
1309
|
-
|
|
1464
|
+
_ts_decorate5([
|
|
1310
1465
|
Post("runs/:id/cancel"),
|
|
1311
1466
|
_ts_param2(0, Param("id")),
|
|
1312
1467
|
_ts_param2(1, Query("compensate")),
|
|
@@ -1317,7 +1472,7 @@ _ts_decorate4([
|
|
|
1317
1472
|
]),
|
|
1318
1473
|
_ts_metadata4("design:returntype", Promise)
|
|
1319
1474
|
], DurableApiController.prototype, "cancel", null);
|
|
1320
|
-
|
|
1475
|
+
_ts_decorate5([
|
|
1321
1476
|
Post("runs/:id/continue"),
|
|
1322
1477
|
_ts_param2(0, Param("id")),
|
|
1323
1478
|
_ts_metadata4("design:type", Function),
|
|
@@ -1326,7 +1481,7 @@ _ts_decorate4([
|
|
|
1326
1481
|
]),
|
|
1327
1482
|
_ts_metadata4("design:returntype", Promise)
|
|
1328
1483
|
], DurableApiController.prototype, "continue", null);
|
|
1329
|
-
|
|
1484
|
+
_ts_decorate5([
|
|
1330
1485
|
Post("runs/:id/redispatch"),
|
|
1331
1486
|
_ts_param2(0, Param("id")),
|
|
1332
1487
|
_ts_metadata4("design:type", Function),
|
|
@@ -1335,7 +1490,7 @@ _ts_decorate4([
|
|
|
1335
1490
|
]),
|
|
1336
1491
|
_ts_metadata4("design:returntype", Promise)
|
|
1337
1492
|
], DurableApiController.prototype, "redispatch", null);
|
|
1338
|
-
|
|
1493
|
+
_ts_decorate5([
|
|
1339
1494
|
Post("webhooks/:token"),
|
|
1340
1495
|
_ts_param2(0, Param("token")),
|
|
1341
1496
|
_ts_param2(1, Body()),
|
|
@@ -1346,7 +1501,7 @@ _ts_decorate4([
|
|
|
1346
1501
|
]),
|
|
1347
1502
|
_ts_metadata4("design:returntype", Promise)
|
|
1348
1503
|
], DurableApiController.prototype, "webhook", null);
|
|
1349
|
-
|
|
1504
|
+
_ts_decorate5([
|
|
1350
1505
|
Get("runs/:id/events/:key"),
|
|
1351
1506
|
_ts_param2(0, Param("id")),
|
|
1352
1507
|
_ts_param2(1, Param("key")),
|
|
@@ -1357,7 +1512,7 @@ _ts_decorate4([
|
|
|
1357
1512
|
]),
|
|
1358
1513
|
_ts_metadata4("design:returntype", void 0)
|
|
1359
1514
|
], DurableApiController.prototype, "event", null);
|
|
1360
|
-
|
|
1515
|
+
_ts_decorate5([
|
|
1361
1516
|
Post("runs/:id/updates/:name"),
|
|
1362
1517
|
_ts_param2(0, Param("id")),
|
|
1363
1518
|
_ts_param2(1, Param("name")),
|
|
@@ -1370,9 +1525,10 @@ _ts_decorate4([
|
|
|
1370
1525
|
]),
|
|
1371
1526
|
_ts_metadata4("design:returntype", void 0)
|
|
1372
1527
|
], DurableApiController.prototype, "update", null);
|
|
1373
|
-
DurableApiController =
|
|
1528
|
+
DurableApiController = _ts_decorate5([
|
|
1374
1529
|
Controller(),
|
|
1375
1530
|
UseInterceptors(ApplyFilterInterceptor),
|
|
1531
|
+
UseFilters(NotModifiedFilter),
|
|
1376
1532
|
_ts_metadata4("design:type", Function),
|
|
1377
1533
|
_ts_metadata4("design:paramtypes", [
|
|
1378
1534
|
typeof DashboardService === "undefined" ? Object : DashboardService,
|
|
@@ -1388,7 +1544,7 @@ function notFound(error) {
|
|
|
1388
1544
|
__name(notFound, "notFound");
|
|
1389
1545
|
|
|
1390
1546
|
// src/server/durable-auth.controller.ts
|
|
1391
|
-
import { BadRequestException as BadRequestException2, Body as Body2, Controller as Controller3, Get as Get3, Header as Header3, HttpCode, Inject as Inject4, Logger as Logger2, NotFoundException as NotFoundException3, Optional as Optional3, Post as Post2, Req, Res, UnauthorizedException } from "@nestjs/common";
|
|
1547
|
+
import { BadRequestException as BadRequestException2, Body as Body2, Controller as Controller3, Get as Get3, Header as Header3, HttpCode, Inject as Inject4, Logger as Logger2, NotFoundException as NotFoundException3, Optional as Optional3, Post as Post2, Req, Res as Res2, UnauthorizedException } from "@nestjs/common";
|
|
1392
1548
|
|
|
1393
1549
|
// src/server/auth/dashboard-auth-config.ts
|
|
1394
1550
|
var DASHBOARD_AUTH = Symbol("DASHBOARD_AUTH");
|
|
@@ -1628,14 +1784,14 @@ function renderSessionRequiredPage(basePath) {
|
|
|
1628
1784
|
__name(renderSessionRequiredPage, "renderSessionRequiredPage");
|
|
1629
1785
|
|
|
1630
1786
|
// src/server/auth/request.ts
|
|
1631
|
-
function
|
|
1787
|
+
function isRecord2(value) {
|
|
1632
1788
|
return typeof value === "object" && value !== null;
|
|
1633
1789
|
}
|
|
1634
|
-
__name(
|
|
1790
|
+
__name(isRecord2, "isRecord");
|
|
1635
1791
|
function readHeaders(request) {
|
|
1636
|
-
if (!
|
|
1792
|
+
if (!isRecord2(request)) return {};
|
|
1637
1793
|
const headers = request.headers;
|
|
1638
|
-
return
|
|
1794
|
+
return isRecord2(headers) ? headers : {};
|
|
1639
1795
|
}
|
|
1640
1796
|
__name(readHeaders, "readHeaders");
|
|
1641
1797
|
function headerToString(value) {
|
|
@@ -1651,14 +1807,14 @@ function readCookieHeader(request) {
|
|
|
1651
1807
|
}
|
|
1652
1808
|
__name(readCookieHeader, "readCookieHeader");
|
|
1653
1809
|
function isHttpsRequest(request) {
|
|
1654
|
-
if (
|
|
1810
|
+
if (isRecord2(request) && request.protocol === "https") return true;
|
|
1655
1811
|
const forwarded = headerToString(readHeaders(request)["x-forwarded-proto"]);
|
|
1656
1812
|
if (forwarded === void 0) return false;
|
|
1657
1813
|
return forwarded.split(",").map((proto) => proto.trim().toLowerCase()).includes("https");
|
|
1658
1814
|
}
|
|
1659
1815
|
__name(isHttpsRequest, "isHttpsRequest");
|
|
1660
1816
|
function originalRequestUrl(request) {
|
|
1661
|
-
if (!
|
|
1817
|
+
if (!isRecord2(request)) return "/";
|
|
1662
1818
|
if (typeof request.originalUrl === "string" && request.originalUrl !== "") {
|
|
1663
1819
|
return request.originalUrl;
|
|
1664
1820
|
}
|
|
@@ -1675,72 +1831,6 @@ function sanitizeReturnTo(candidate, fallback) {
|
|
|
1675
1831
|
}
|
|
1676
1832
|
__name(sanitizeReturnTo, "sanitizeReturnTo");
|
|
1677
1833
|
|
|
1678
|
-
// src/server/auth/response.ts
|
|
1679
|
-
function isRecord2(value) {
|
|
1680
|
-
return typeof value === "object" && value !== null;
|
|
1681
|
-
}
|
|
1682
|
-
__name(isRecord2, "isRecord");
|
|
1683
|
-
function isRawCookieResponse(value) {
|
|
1684
|
-
return isRecord2(value) && typeof value.getHeader === "function" && typeof value.setHeader === "function";
|
|
1685
|
-
}
|
|
1686
|
-
__name(isRawCookieResponse, "isRawCookieResponse");
|
|
1687
|
-
function resolveCookieResponse(response) {
|
|
1688
|
-
if (isRawCookieResponse(response)) return response;
|
|
1689
|
-
if (isRecord2(response) && isRawCookieResponse(response.raw)) return response.raw;
|
|
1690
|
-
return null;
|
|
1691
|
-
}
|
|
1692
|
-
__name(resolveCookieResponse, "resolveCookieResponse");
|
|
1693
|
-
function existingSetCookies(response) {
|
|
1694
|
-
const current = response.getHeader("set-cookie");
|
|
1695
|
-
if (Array.isArray(current)) return current;
|
|
1696
|
-
if (typeof current === "string") return [
|
|
1697
|
-
current
|
|
1698
|
-
];
|
|
1699
|
-
return [];
|
|
1700
|
-
}
|
|
1701
|
-
__name(existingSetCookies, "existingSetCookies");
|
|
1702
|
-
function appendSetCookie(response, cookie) {
|
|
1703
|
-
const raw = resolveCookieResponse(response);
|
|
1704
|
-
if (!raw) return;
|
|
1705
|
-
raw.setHeader("set-cookie", [
|
|
1706
|
-
...existingSetCookies(raw),
|
|
1707
|
-
cookie
|
|
1708
|
-
]);
|
|
1709
|
-
}
|
|
1710
|
-
__name(appendSetCookie, "appendSetCookie");
|
|
1711
|
-
function isRawRedirectResponse(value) {
|
|
1712
|
-
return isRecord2(value) && typeof value.getHeader === "function" && typeof value.setHeader === "function" && typeof value.end === "function";
|
|
1713
|
-
}
|
|
1714
|
-
__name(isRawRedirectResponse, "isRawRedirectResponse");
|
|
1715
|
-
function resolveRedirectResponse(response) {
|
|
1716
|
-
if (isRawRedirectResponse(response)) return response;
|
|
1717
|
-
if (isRecord2(response) && isRawRedirectResponse(response.raw)) return response.raw;
|
|
1718
|
-
return null;
|
|
1719
|
-
}
|
|
1720
|
-
__name(resolveRedirectResponse, "resolveRedirectResponse");
|
|
1721
|
-
function redirectRaw(response, location, status = 302) {
|
|
1722
|
-
const raw = resolveRedirectResponse(response);
|
|
1723
|
-
if (!raw) return;
|
|
1724
|
-
raw.statusCode = status;
|
|
1725
|
-
raw.setHeader("location", location);
|
|
1726
|
-
raw.end();
|
|
1727
|
-
}
|
|
1728
|
-
__name(redirectRaw, "redirectRaw");
|
|
1729
|
-
function responseAlreadyWritten(response) {
|
|
1730
|
-
const raw = resolveRedirectResponse(response);
|
|
1731
|
-
return raw?.headersSent === true;
|
|
1732
|
-
}
|
|
1733
|
-
__name(responseAlreadyWritten, "responseAlreadyWritten");
|
|
1734
|
-
function writeHtmlRaw(response, html, status = 200) {
|
|
1735
|
-
const raw = resolveRedirectResponse(response);
|
|
1736
|
-
if (!raw) return;
|
|
1737
|
-
raw.statusCode = status;
|
|
1738
|
-
raw.setHeader("content-type", "text/html; charset=utf-8");
|
|
1739
|
-
raw.setHeader("cache-control", "no-store, must-revalidate");
|
|
1740
|
-
raw.end(html);
|
|
1741
|
-
}
|
|
1742
|
-
__name(writeHtmlRaw, "writeHtmlRaw");
|
|
1743
|
-
|
|
1744
1834
|
// src/server/auth/cookie-header.ts
|
|
1745
1835
|
function parseCookieHeader(header) {
|
|
1746
1836
|
const cookies = {};
|
|
@@ -1940,11 +2030,11 @@ __name(maybeRenewSession, "maybeRenewSession");
|
|
|
1940
2030
|
import { existsSync, readFileSync } from "node:fs";
|
|
1941
2031
|
import { basename, extname, join, resolve, sep } from "node:path";
|
|
1942
2032
|
import { fileURLToPath } from "node:url";
|
|
1943
|
-
import { Controller as Controller2, Get as Get2, Header as Header2, Inject as Inject3, NotFoundException as NotFoundException2, Param as Param2, StreamableFile, UseFilters } from "@nestjs/common";
|
|
2033
|
+
import { Controller as Controller2, Get as Get2, Header as Header2, Inject as Inject3, NotFoundException as NotFoundException2, Param as Param2, StreamableFile, UseFilters as UseFilters2 } from "@nestjs/common";
|
|
1944
2034
|
|
|
1945
2035
|
// src/server/auth/login-redirect.exception.ts
|
|
1946
|
-
import { Catch, HttpException, HttpStatus } from "@nestjs/common";
|
|
1947
|
-
function
|
|
2036
|
+
import { Catch as Catch2, HttpException as HttpException2, HttpStatus } from "@nestjs/common";
|
|
2037
|
+
function _ts_decorate6(decorators, target, key, desc) {
|
|
1948
2038
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1949
2039
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
1950
2040
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1957,8 +2047,8 @@ function _ts_decorate5(decorators, target, key, desc) {
|
|
|
1957
2047
|
}
|
|
1958
2048
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1959
2049
|
}
|
|
1960
|
-
__name(
|
|
1961
|
-
var DashboardLoginRedirectException = class extends
|
|
2050
|
+
__name(_ts_decorate6, "_ts_decorate");
|
|
2051
|
+
var DashboardLoginRedirectException = class extends HttpException2 {
|
|
1962
2052
|
static {
|
|
1963
2053
|
__name(this, "DashboardLoginRedirectException");
|
|
1964
2054
|
}
|
|
@@ -1978,13 +2068,13 @@ var DashboardLoginRedirectFilter = class {
|
|
|
1978
2068
|
redirectRaw(response, exception.location);
|
|
1979
2069
|
}
|
|
1980
2070
|
};
|
|
1981
|
-
DashboardLoginRedirectFilter =
|
|
1982
|
-
|
|
2071
|
+
DashboardLoginRedirectFilter = _ts_decorate6([
|
|
2072
|
+
Catch2(DashboardLoginRedirectException)
|
|
1983
2073
|
], DashboardLoginRedirectFilter);
|
|
1984
2074
|
|
|
1985
2075
|
// src/server/auth/session-required.exception.ts
|
|
1986
|
-
import { Catch as
|
|
1987
|
-
function
|
|
2076
|
+
import { Catch as Catch3, HttpException as HttpException3, HttpStatus as HttpStatus2, Inject as Inject2, Logger, Optional as Optional2 } from "@nestjs/common";
|
|
2077
|
+
function _ts_decorate7(decorators, target, key, desc) {
|
|
1988
2078
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1989
2079
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
1990
2080
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1997,7 +2087,7 @@ function _ts_decorate6(decorators, target, key, desc) {
|
|
|
1997
2087
|
}
|
|
1998
2088
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1999
2089
|
}
|
|
2000
|
-
__name(
|
|
2090
|
+
__name(_ts_decorate7, "_ts_decorate");
|
|
2001
2091
|
function _ts_metadata5(metadataKey, metadataValue) {
|
|
2002
2092
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2003
2093
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -2010,7 +2100,7 @@ function _ts_param3(paramIndex, decorator) {
|
|
|
2010
2100
|
};
|
|
2011
2101
|
}
|
|
2012
2102
|
__name(_ts_param3, "_ts_param");
|
|
2013
|
-
var DashboardSessionRequiredException = class extends
|
|
2103
|
+
var DashboardSessionRequiredException = class extends HttpException3 {
|
|
2014
2104
|
static {
|
|
2015
2105
|
__name(this, "DashboardSessionRequiredException");
|
|
2016
2106
|
}
|
|
@@ -2058,8 +2148,8 @@ var DashboardSessionRequiredFilter = class _DashboardSessionRequiredFilter {
|
|
|
2058
2148
|
this.logger.warn(message);
|
|
2059
2149
|
}
|
|
2060
2150
|
};
|
|
2061
|
-
DashboardSessionRequiredFilter =
|
|
2062
|
-
|
|
2151
|
+
DashboardSessionRequiredFilter = _ts_decorate7([
|
|
2152
|
+
Catch3(DashboardSessionRequiredException),
|
|
2063
2153
|
_ts_param3(0, Optional2()),
|
|
2064
2154
|
_ts_param3(0, Inject2(DASHBOARD_AUTH)),
|
|
2065
2155
|
_ts_metadata5("design:type", Function),
|
|
@@ -2069,7 +2159,7 @@ DashboardSessionRequiredFilter = _ts_decorate6([
|
|
|
2069
2159
|
], DashboardSessionRequiredFilter);
|
|
2070
2160
|
|
|
2071
2161
|
// src/server/durable-ui.controller.ts
|
|
2072
|
-
function
|
|
2162
|
+
function _ts_decorate8(decorators, target, key, desc) {
|
|
2073
2163
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2074
2164
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2075
2165
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2082,7 +2172,7 @@ function _ts_decorate7(decorators, target, key, desc) {
|
|
|
2082
2172
|
}
|
|
2083
2173
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2084
2174
|
}
|
|
2085
|
-
__name(
|
|
2175
|
+
__name(_ts_decorate8, "_ts_decorate");
|
|
2086
2176
|
function _ts_metadata6(metadataKey, metadataValue) {
|
|
2087
2177
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2088
2178
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -2147,7 +2237,7 @@ var DurableUiController = class {
|
|
|
2147
2237
|
});
|
|
2148
2238
|
}
|
|
2149
2239
|
};
|
|
2150
|
-
|
|
2240
|
+
_ts_decorate8([
|
|
2151
2241
|
Get2(),
|
|
2152
2242
|
Header2("Content-Type", "text/html; charset=utf-8"),
|
|
2153
2243
|
Header2("Cache-Control", "no-store, must-revalidate"),
|
|
@@ -2155,7 +2245,7 @@ _ts_decorate7([
|
|
|
2155
2245
|
_ts_metadata6("design:paramtypes", []),
|
|
2156
2246
|
_ts_metadata6("design:returntype", String)
|
|
2157
2247
|
], DurableUiController.prototype, "index", null);
|
|
2158
|
-
|
|
2248
|
+
_ts_decorate8([
|
|
2159
2249
|
Get2("assets/:file"),
|
|
2160
2250
|
Header2("Cache-Control", "public, max-age=31536000, immutable"),
|
|
2161
2251
|
_ts_param4(0, Param2("file")),
|
|
@@ -2165,8 +2255,8 @@ _ts_decorate7([
|
|
|
2165
2255
|
]),
|
|
2166
2256
|
_ts_metadata6("design:returntype", typeof StreamableFile === "undefined" ? Object : StreamableFile)
|
|
2167
2257
|
], DurableUiController.prototype, "asset", null);
|
|
2168
|
-
DurableUiController =
|
|
2169
|
-
|
|
2258
|
+
DurableUiController = _ts_decorate8([
|
|
2259
|
+
UseFilters2(DashboardLoginRedirectFilter, DashboardSessionRequiredFilter),
|
|
2170
2260
|
Controller2(),
|
|
2171
2261
|
_ts_param4(0, Inject3(DASHBOARD_BASE_PATH)),
|
|
2172
2262
|
_ts_param4(1, Inject3(DASHBOARD_API_PATH)),
|
|
@@ -2178,7 +2268,7 @@ DurableUiController = _ts_decorate7([
|
|
|
2178
2268
|
], DurableUiController);
|
|
2179
2269
|
|
|
2180
2270
|
// src/server/durable-auth.controller.ts
|
|
2181
|
-
function
|
|
2271
|
+
function _ts_decorate9(decorators, target, key, desc) {
|
|
2182
2272
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2183
2273
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2184
2274
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2191,7 +2281,7 @@ function _ts_decorate8(decorators, target, key, desc) {
|
|
|
2191
2281
|
}
|
|
2192
2282
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2193
2283
|
}
|
|
2194
|
-
__name(
|
|
2284
|
+
__name(_ts_decorate9, "_ts_decorate");
|
|
2195
2285
|
function _ts_metadata7(metadataKey, metadataValue) {
|
|
2196
2286
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2197
2287
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -2299,7 +2389,7 @@ var DurableAuthController = class _DurableAuthController {
|
|
|
2299
2389
|
}
|
|
2300
2390
|
}
|
|
2301
2391
|
};
|
|
2302
|
-
|
|
2392
|
+
_ts_decorate9([
|
|
2303
2393
|
Get3("login"),
|
|
2304
2394
|
Header3("Content-Type", "text/html; charset=utf-8"),
|
|
2305
2395
|
Header3("Cache-Control", "no-store, must-revalidate"),
|
|
@@ -2307,12 +2397,12 @@ _ts_decorate8([
|
|
|
2307
2397
|
_ts_metadata7("design:paramtypes", []),
|
|
2308
2398
|
_ts_metadata7("design:returntype", String)
|
|
2309
2399
|
], DurableAuthController.prototype, "loginPage", null);
|
|
2310
|
-
|
|
2400
|
+
_ts_decorate9([
|
|
2311
2401
|
Post2("login"),
|
|
2312
2402
|
HttpCode(200),
|
|
2313
2403
|
_ts_param5(0, Body2()),
|
|
2314
2404
|
_ts_param5(1, Req()),
|
|
2315
|
-
_ts_param5(2,
|
|
2405
|
+
_ts_param5(2, Res2({
|
|
2316
2406
|
passthrough: true
|
|
2317
2407
|
})),
|
|
2318
2408
|
_ts_metadata7("design:type", Function),
|
|
@@ -2323,11 +2413,11 @@ _ts_decorate8([
|
|
|
2323
2413
|
]),
|
|
2324
2414
|
_ts_metadata7("design:returntype", Promise)
|
|
2325
2415
|
], DurableAuthController.prototype, "login", null);
|
|
2326
|
-
|
|
2416
|
+
_ts_decorate9([
|
|
2327
2417
|
Post2("session"),
|
|
2328
2418
|
HttpCode(204),
|
|
2329
2419
|
_ts_param5(0, Req()),
|
|
2330
|
-
_ts_param5(1,
|
|
2420
|
+
_ts_param5(1, Res2({
|
|
2331
2421
|
passthrough: true
|
|
2332
2422
|
})),
|
|
2333
2423
|
_ts_metadata7("design:type", Function),
|
|
@@ -2337,10 +2427,10 @@ _ts_decorate8([
|
|
|
2337
2427
|
]),
|
|
2338
2428
|
_ts_metadata7("design:returntype", Promise)
|
|
2339
2429
|
], DurableAuthController.prototype, "session", null);
|
|
2340
|
-
|
|
2430
|
+
_ts_decorate9([
|
|
2341
2431
|
Get3("logout"),
|
|
2342
2432
|
_ts_param5(0, Req()),
|
|
2343
|
-
_ts_param5(1,
|
|
2433
|
+
_ts_param5(1, Res2()),
|
|
2344
2434
|
_ts_metadata7("design:type", Function),
|
|
2345
2435
|
_ts_metadata7("design:paramtypes", [
|
|
2346
2436
|
Object,
|
|
@@ -2348,7 +2438,7 @@ _ts_decorate8([
|
|
|
2348
2438
|
]),
|
|
2349
2439
|
_ts_metadata7("design:returntype", void 0)
|
|
2350
2440
|
], DurableAuthController.prototype, "logout", null);
|
|
2351
|
-
DurableAuthController =
|
|
2441
|
+
DurableAuthController = _ts_decorate9([
|
|
2352
2442
|
Controller3(),
|
|
2353
2443
|
_ts_param5(0, Optional3()),
|
|
2354
2444
|
_ts_param5(0, Inject4(DASHBOARD_AUTH)),
|
|
@@ -2368,7 +2458,7 @@ import { ModuleRef, RouterModule } from "@nestjs/core";
|
|
|
2368
2458
|
|
|
2369
2459
|
// src/server/durable-session.guard.ts
|
|
2370
2460
|
import { Inject as Inject5, Injectable as Injectable4, UnauthorizedException as UnauthorizedException2 } from "@nestjs/common";
|
|
2371
|
-
function
|
|
2461
|
+
function _ts_decorate10(decorators, target, key, desc) {
|
|
2372
2462
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2373
2463
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2374
2464
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2381,7 +2471,7 @@ function _ts_decorate9(decorators, target, key, desc) {
|
|
|
2381
2471
|
}
|
|
2382
2472
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2383
2473
|
}
|
|
2384
|
-
__name(
|
|
2474
|
+
__name(_ts_decorate10, "_ts_decorate");
|
|
2385
2475
|
function _ts_metadata8(metadataKey, metadataValue) {
|
|
2386
2476
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") {
|
|
2387
2477
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
@@ -2434,7 +2524,7 @@ var DurableUiSessionGuard = class {
|
|
|
2434
2524
|
throw new DashboardLoginRedirectException(`${this.basePath}/login?returnTo=${returnTo}`);
|
|
2435
2525
|
}
|
|
2436
2526
|
};
|
|
2437
|
-
DurableUiSessionGuard =
|
|
2527
|
+
DurableUiSessionGuard = _ts_decorate10([
|
|
2438
2528
|
Injectable4(),
|
|
2439
2529
|
_ts_param6(0, Inject5(DASHBOARD_AUTH)),
|
|
2440
2530
|
_ts_param6(1, Inject5(DASHBOARD_BASE_PATH)),
|
|
@@ -2478,7 +2568,7 @@ var DurableApiSessionGuard = class {
|
|
|
2478
2568
|
});
|
|
2479
2569
|
}
|
|
2480
2570
|
};
|
|
2481
|
-
DurableApiSessionGuard =
|
|
2571
|
+
DurableApiSessionGuard = _ts_decorate10([
|
|
2482
2572
|
Injectable4(),
|
|
2483
2573
|
_ts_param6(0, Inject5(DASHBOARD_AUTH)),
|
|
2484
2574
|
_ts_metadata8("design:type", Function),
|
|
@@ -2488,7 +2578,7 @@ DurableApiSessionGuard = _ts_decorate9([
|
|
|
2488
2578
|
], DurableApiSessionGuard);
|
|
2489
2579
|
|
|
2490
2580
|
// src/server/durable-dashboard.module.ts
|
|
2491
|
-
function
|
|
2581
|
+
function _ts_decorate11(decorators, target, key, desc) {
|
|
2492
2582
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2493
2583
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") {
|
|
2494
2584
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2501,7 +2591,7 @@ function _ts_decorate10(decorators, target, key, desc) {
|
|
|
2501
2591
|
}
|
|
2502
2592
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2503
2593
|
}
|
|
2504
|
-
__name(
|
|
2594
|
+
__name(_ts_decorate11, "_ts_decorate");
|
|
2505
2595
|
var GUARDS_METADATA = "__guards__";
|
|
2506
2596
|
function normalize(path) {
|
|
2507
2597
|
return `/${path.replace(/^\/+|\/+$/g, "")}`;
|
|
@@ -2574,7 +2664,7 @@ var DurableApiModule = class _DurableApiModule {
|
|
|
2574
2664
|
};
|
|
2575
2665
|
}
|
|
2576
2666
|
};
|
|
2577
|
-
DurableApiModule =
|
|
2667
|
+
DurableApiModule = _ts_decorate11([
|
|
2578
2668
|
Module({})
|
|
2579
2669
|
], DurableApiModule);
|
|
2580
2670
|
var DurableDashboardModule = class _DurableDashboardModule {
|
|
@@ -2660,7 +2750,7 @@ var DurableDashboardModule = class _DurableDashboardModule {
|
|
|
2660
2750
|
};
|
|
2661
2751
|
}
|
|
2662
2752
|
};
|
|
2663
|
-
DurableDashboardModule =
|
|
2753
|
+
DurableDashboardModule = _ts_decorate11([
|
|
2664
2754
|
Module({})
|
|
2665
2755
|
], DurableDashboardModule);
|
|
2666
2756
|
export {
|