@objectstack/plugin-approvals 17.0.0-rc.5 → 17.0.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/CHANGELOG.md +3144 -0
- package/dist/index.d.mts +1621 -1695
- package/dist/index.d.ts +1621 -1695
- package/dist/index.js +94 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +96 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -11
package/dist/index.mjs
CHANGED
|
@@ -51,11 +51,11 @@ var init_en_objects_generated = __esm({
|
|
|
51
51
|
label: "Status",
|
|
52
52
|
help: "Lifecycle state of the request",
|
|
53
53
|
options: {
|
|
54
|
-
pending: "
|
|
55
|
-
approved: "
|
|
56
|
-
rejected: "
|
|
57
|
-
recalled: "
|
|
58
|
-
returned: "
|
|
54
|
+
pending: "Pending",
|
|
55
|
+
approved: "Approved",
|
|
56
|
+
rejected: "Rejected",
|
|
57
|
+
recalled: "Recalled",
|
|
58
|
+
returned: "Returned"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
current_step: {
|
|
@@ -128,7 +128,7 @@ var init_en_objects_generated = __esm({
|
|
|
128
128
|
},
|
|
129
129
|
approval_reject: {
|
|
130
130
|
label: "Reject",
|
|
131
|
-
|
|
131
|
+
description: "Reject this request? A rejection is final for every approver.",
|
|
132
132
|
successMessage: "Rejected.",
|
|
133
133
|
params: {
|
|
134
134
|
comment: {
|
|
@@ -181,7 +181,7 @@ var init_en_objects_generated = __esm({
|
|
|
181
181
|
},
|
|
182
182
|
approval_recall: {
|
|
183
183
|
label: "Recall",
|
|
184
|
-
|
|
184
|
+
description: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
185
185
|
successMessage: "Recalled.",
|
|
186
186
|
params: {
|
|
187
187
|
comment: {
|
|
@@ -225,18 +225,18 @@ var init_en_objects_generated = __esm({
|
|
|
225
225
|
action: {
|
|
226
226
|
label: "Action",
|
|
227
227
|
options: {
|
|
228
|
-
submit: "
|
|
229
|
-
approve: "
|
|
230
|
-
reject: "
|
|
231
|
-
recall: "
|
|
232
|
-
escalate: "
|
|
233
|
-
reassign: "
|
|
234
|
-
remind: "
|
|
235
|
-
request_info: "
|
|
236
|
-
comment: "
|
|
237
|
-
revise: "
|
|
238
|
-
resubmit: "
|
|
239
|
-
ooo_substitute: "
|
|
228
|
+
submit: "Submit",
|
|
229
|
+
approve: "Approve",
|
|
230
|
+
reject: "Reject",
|
|
231
|
+
recall: "Recall",
|
|
232
|
+
escalate: "Escalate",
|
|
233
|
+
reassign: "Reassign",
|
|
234
|
+
remind: "Remind",
|
|
235
|
+
request_info: "Request Info",
|
|
236
|
+
comment: "Comment",
|
|
237
|
+
revise: "Revise",
|
|
238
|
+
resubmit: "Resubmit",
|
|
239
|
+
ooo_substitute: "Out-of-Office Substitution"
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
actor_id: {
|
|
@@ -372,7 +372,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
372
372
|
label: "\u72B6\u6001",
|
|
373
373
|
help: "\u8BF7\u6C42\u7684\u751F\u547D\u5468\u671F\u72B6\u6001",
|
|
374
374
|
options: {
|
|
375
|
-
pending: "\u5F85\
|
|
375
|
+
pending: "\u5F85\u5BA1\u6279",
|
|
376
376
|
approved: "\u5DF2\u6279\u51C6",
|
|
377
377
|
rejected: "\u5DF2\u62D2\u7EDD",
|
|
378
378
|
recalled: "\u5DF2\u64A4\u56DE",
|
|
@@ -418,9 +418,9 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
418
418
|
},
|
|
419
419
|
_views: {
|
|
420
420
|
my_pending: {
|
|
421
|
-
label: "\u6211\
|
|
421
|
+
label: "\u5F85\u6211\u5BA1\u6279",
|
|
422
422
|
emptyState: {
|
|
423
|
-
title: "\u6682\u65E0\u5F85\
|
|
423
|
+
title: "\u6682\u65E0\u5F85\u5BA1\u6279\u7684\u8BF7\u6C42",
|
|
424
424
|
message: "\u5168\u90E8\u5904\u7406\u5B8C\u6BD5\uFF0C\u6CA1\u6709\u7B49\u5F85\u4F60\u5BA1\u6279\u7684\u8BF7\u6C42\u3002"
|
|
425
425
|
}
|
|
426
426
|
},
|
|
@@ -449,7 +449,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
449
449
|
},
|
|
450
450
|
approval_reject: {
|
|
451
451
|
label: "\u62D2\u7EDD",
|
|
452
|
-
|
|
452
|
+
description: "\u62D2\u7EDD\u8BE5\u8BF7\u6C42\uFF1F\u62D2\u7EDD\u5BF9\u6240\u6709\u5BA1\u6279\u4EBA\u7ACB\u5373\u751F\u6548\u3002",
|
|
453
453
|
successMessage: "\u5DF2\u62D2\u7EDD\u3002",
|
|
454
454
|
params: {
|
|
455
455
|
comment: {
|
|
@@ -502,7 +502,7 @@ var init_zh_CN_objects_generated = __esm({
|
|
|
502
502
|
},
|
|
503
503
|
approval_recall: {
|
|
504
504
|
label: "\u64A4\u56DE",
|
|
505
|
-
|
|
505
|
+
description: "\u64A4\u56DE\u8BE5\u8BF7\u6C42\uFF1F\u64A4\u56DE\u540E\u5BA1\u6279\u4EBA\u5C06\u65E0\u6CD5\u7EE7\u7EED\u5904\u7406\uFF0C\u8BB0\u5F55\u968F\u5373\u89E3\u9501\u3002",
|
|
506
506
|
successMessage: "\u5DF2\u64A4\u56DE\u3002",
|
|
507
507
|
params: {
|
|
508
508
|
comment: {
|
|
@@ -739,7 +739,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
739
739
|
},
|
|
740
740
|
_views: {
|
|
741
741
|
my_pending: {
|
|
742
|
-
label: "\
|
|
742
|
+
label: "\u627F\u8A8D\u5F85\u3061",
|
|
743
743
|
emptyState: {
|
|
744
744
|
title: "\u627F\u8A8D\u5F85\u3061\u306F\u3042\u308A\u307E\u305B\u3093",
|
|
745
745
|
message: "\u3059\u3079\u3066\u51E6\u7406\u6E08\u307F\u3067\u3059\u3002\u3042\u306A\u305F\u306E\u627F\u8A8D\u3092\u5F85\u3064\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\u3002"
|
|
@@ -770,7 +770,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
770
770
|
},
|
|
771
771
|
approval_reject: {
|
|
772
772
|
label: "\u5374\u4E0B",
|
|
773
|
-
|
|
773
|
+
description: "\u3053\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u5374\u4E0B\u3057\u307E\u3059\u304B\uFF1F\u5374\u4E0B\u306F\u3059\u3079\u3066\u306E\u627F\u8A8D\u8005\u306B\u5BFE\u3057\u3066\u6700\u7D42\u6C7A\u5B9A\u306B\u306A\u308A\u307E\u3059\u3002",
|
|
774
774
|
successMessage: "\u5374\u4E0B\u3057\u307E\u3057\u305F\u3002",
|
|
775
775
|
params: {
|
|
776
776
|
comment: {
|
|
@@ -823,7 +823,7 @@ var init_ja_JP_objects_generated = __esm({
|
|
|
823
823
|
},
|
|
824
824
|
approval_recall: {
|
|
825
825
|
label: "\u53D6\u308A\u4E0B\u3052",
|
|
826
|
-
|
|
826
|
+
description: "\u3053\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u308A\u4E0B\u3052\u307E\u3059\u304B\uFF1F\u627F\u8A8D\u8005\u306F\u64CD\u4F5C\u3067\u304D\u306A\u304F\u306A\u308A\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u30ED\u30C3\u30AF\u304C\u89E3\u9664\u3055\u308C\u307E\u3059\u3002",
|
|
827
827
|
successMessage: "\u53D6\u308A\u4E0B\u3052\u307E\u3057\u305F\u3002",
|
|
828
828
|
params: {
|
|
829
829
|
comment: {
|
|
@@ -1060,7 +1060,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1060
1060
|
},
|
|
1061
1061
|
_views: {
|
|
1062
1062
|
my_pending: {
|
|
1063
|
-
label: "
|
|
1063
|
+
label: "Aprobaciones pendientes",
|
|
1064
1064
|
emptyState: {
|
|
1065
1065
|
title: "Sin aprobaciones pendientes",
|
|
1066
1066
|
message: "Est\xE1s al d\xEDa: nada espera tu aprobaci\xF3n."
|
|
@@ -1091,7 +1091,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1091
1091
|
},
|
|
1092
1092
|
approval_reject: {
|
|
1093
1093
|
label: "Rechazar",
|
|
1094
|
-
|
|
1094
|
+
description: "\xBFRechazar esta solicitud? Un rechazo es definitivo para todos los aprobadores.",
|
|
1095
1095
|
successMessage: "Rechazada.",
|
|
1096
1096
|
params: {
|
|
1097
1097
|
comment: {
|
|
@@ -1144,7 +1144,7 @@ var init_es_ES_objects_generated = __esm({
|
|
|
1144
1144
|
},
|
|
1145
1145
|
approval_recall: {
|
|
1146
1146
|
label: "Retirar",
|
|
1147
|
-
|
|
1147
|
+
description: "\xBFRetirar esta solicitud? Los aprobadores ya no podr\xE1n actuar sobre ella y el registro se desbloquear\xE1.",
|
|
1148
1148
|
successMessage: "Retirada.",
|
|
1149
1149
|
params: {
|
|
1150
1150
|
comment: {
|
|
@@ -1321,7 +1321,7 @@ var init_translations = __esm({
|
|
|
1321
1321
|
|
|
1322
1322
|
// src/sys-approval-request.object.ts
|
|
1323
1323
|
import { ObjectSchema, Field } from "@objectstack/spec/data";
|
|
1324
|
-
import { APPROVAL_STATUSES } from "@objectstack/spec/contracts";
|
|
1324
|
+
import { APPROVAL_STATUSES, APPROVAL_STATUS_LABELS } from "@objectstack/spec/contracts";
|
|
1325
1325
|
var SysApprovalRequest = ObjectSchema.create({
|
|
1326
1326
|
name: "sys_approval_request",
|
|
1327
1327
|
label: "Approval Request",
|
|
@@ -1420,10 +1420,13 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1420
1420
|
group: "Target"
|
|
1421
1421
|
}),
|
|
1422
1422
|
status: Field.select(
|
|
1423
|
-
//
|
|
1423
|
+
// Derived from the contract, not re-typed (#3786). `APPROVAL_STATUSES` is
|
|
1424
1424
|
// where the list and the reason for each entry live; `ApprovalStatus` is
|
|
1425
|
-
// derived from it, so this column and the contract cannot disagree.
|
|
1426
|
-
|
|
1425
|
+
// derived from it, so this column and the contract cannot disagree. The
|
|
1426
|
+
// authored English label per entry lives beside it in
|
|
1427
|
+
// `APPROVAL_STATUS_LABELS` (#8543) — mapped here, never re-typed, so the
|
|
1428
|
+
// `en` bundle regenerates from the contract's own text.
|
|
1429
|
+
APPROVAL_STATUSES.map((value) => ({ value, label: APPROVAL_STATUS_LABELS[value] })),
|
|
1427
1430
|
{
|
|
1428
1431
|
label: "Status",
|
|
1429
1432
|
required: true,
|
|
@@ -1555,6 +1558,15 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1555
1558
|
{
|
|
1556
1559
|
name: "approval_reject",
|
|
1557
1560
|
label: "Reject",
|
|
1561
|
+
// The confirm question lives HERE, not in `confirmText`: this action
|
|
1562
|
+
// collects params, so the console would otherwise chain a confirm dialog
|
|
1563
|
+
// and then the param dialog for one decision — and the first one already
|
|
1564
|
+
// reads as "the action ran" (#7278, maintainer ruling 2026-08-10). The
|
|
1565
|
+
// param dialog renders this as its description, and nothing is POSTed
|
|
1566
|
+
// until its own Confirm: one condition, one wording, one dialog.
|
|
1567
|
+
// NB: the top-level action `description` (#7367), never `ai.description`
|
|
1568
|
+
// — that one is the LLM-facing tool contract and is not shown to anyone.
|
|
1569
|
+
description: "Reject this request? A rejection is final for every approver.",
|
|
1558
1570
|
icon: "x-circle",
|
|
1559
1571
|
// Destructive decision — rendered in the console's danger styling so it
|
|
1560
1572
|
// reads as the irreversible action it is (objectui#2762 P1-5).
|
|
@@ -1567,7 +1579,6 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1567
1579
|
{ name: "attachments", label: "Attachments", type: "file", multiple: true, required: false }
|
|
1568
1580
|
],
|
|
1569
1581
|
visible: "record.viewer.can_act || record.viewer.can_override",
|
|
1570
|
-
confirmText: "Reject this request? A rejection is final for every approver.",
|
|
1571
1582
|
locations: ["record_section", "list_item"],
|
|
1572
1583
|
successMessage: "Rejected.",
|
|
1573
1584
|
refreshAfter: true
|
|
@@ -1651,6 +1662,9 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1651
1662
|
{
|
|
1652
1663
|
name: "approval_recall",
|
|
1653
1664
|
label: "Recall",
|
|
1665
|
+
// Confirm question as the param dialog's description, not `confirmText`
|
|
1666
|
+
// — same one-decision-one-dialog rule as `approval_reject` above (#7278).
|
|
1667
|
+
description: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
1654
1668
|
icon: "undo-2",
|
|
1655
1669
|
type: "api",
|
|
1656
1670
|
method: "POST",
|
|
@@ -1661,7 +1675,6 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1661
1675
|
// Recall applies while the request is live for the submitter — pending
|
|
1662
1676
|
// (withdraw) or returned (abandon the revision instead of resubmitting).
|
|
1663
1677
|
visible: '(record.status == "pending" || record.status == "returned") && record.viewer.is_submitter',
|
|
1664
|
-
confirmText: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
|
|
1665
1678
|
locations: ["record_section"],
|
|
1666
1679
|
successMessage: "Recalled.",
|
|
1667
1680
|
refreshAfter: true
|
|
@@ -1692,7 +1705,7 @@ var SysApprovalRequest = ObjectSchema.create({
|
|
|
1692
1705
|
|
|
1693
1706
|
// src/sys-approval-action.object.ts
|
|
1694
1707
|
import { ObjectSchema as ObjectSchema2, Field as Field2 } from "@objectstack/spec/data";
|
|
1695
|
-
import { APPROVAL_ACTION_KINDS } from "@objectstack/spec/contracts";
|
|
1708
|
+
import { APPROVAL_ACTION_KINDS, APPROVAL_ACTION_KIND_LABELS } from "@objectstack/spec/contracts";
|
|
1696
1709
|
var SysApprovalAction = ObjectSchema2.create({
|
|
1697
1710
|
name: "sys_approval_action",
|
|
1698
1711
|
label: "Approval Action",
|
|
@@ -1771,11 +1784,14 @@ var SysApprovalAction = ObjectSchema2.create({
|
|
|
1771
1784
|
group: "Target"
|
|
1772
1785
|
}),
|
|
1773
1786
|
action: Field2.select(
|
|
1774
|
-
//
|
|
1787
|
+
// Derived from the contract, not re-typed (#3786). `APPROVAL_ACTION_KINDS`
|
|
1775
1788
|
// is where the list and the per-kind notes live (which kinds move the flow
|
|
1776
1789
|
// and which are thread-only); `ApprovalActionKind` is derived from it, so
|
|
1777
|
-
// this column and the contract cannot disagree.
|
|
1778
|
-
|
|
1790
|
+
// this column and the contract cannot disagree. The authored English label
|
|
1791
|
+
// per kind lives beside it in `APPROVAL_ACTION_KIND_LABELS` (#8580 — the
|
|
1792
|
+
// #7232 humanization pass missed this field) — mapped here, never
|
|
1793
|
+
// re-typed, so the `en` bundle regenerates from the contract's own text.
|
|
1794
|
+
APPROVAL_ACTION_KINDS.map((value) => ({ value, label: APPROVAL_ACTION_KIND_LABELS[value] })),
|
|
1779
1795
|
{
|
|
1780
1796
|
label: "Action",
|
|
1781
1797
|
required: true,
|
|
@@ -4386,10 +4402,14 @@ var _ApprovalService = class _ApprovalService {
|
|
|
4386
4402
|
* class of failure stayed silent.
|
|
4387
4403
|
*
|
|
4388
4404
|
* It also could not have answered the question even if it looked: its
|
|
4389
|
-
* liveness oracle is `getRun`, which
|
|
4390
|
-
*
|
|
4391
|
-
*
|
|
4392
|
-
*
|
|
4405
|
+
* liveness oracle is `getRun`, which treats both `null` and `paused` as alive
|
|
4406
|
+
* (conservative, correct) — so it has no way to say "this run is really
|
|
4407
|
+
* gone". (Until #8050 that oracle was weaker still: after a restart it
|
|
4408
|
+
* returned `null` for a perfectly ALIVE suspended run, so "alive" and
|
|
4409
|
+
* "unknown" were the same answer. It now reports such a run as `paused`,
|
|
4410
|
+
* which does not change any branch here — both already meant "leave alone" —
|
|
4411
|
+
* but it is why the sweep below needs `hasSuspendedRun` as a second oracle
|
|
4412
|
+
* rather than a sharper reading of the first.)
|
|
4393
4413
|
*
|
|
4394
4414
|
* So this uses BOTH oracles, and a row must fail both to be reported:
|
|
4395
4415
|
*
|
|
@@ -5749,7 +5769,7 @@ function registerApprovalReviseNode(automation, logger) {
|
|
|
5749
5769
|
paradigms: ["flow"],
|
|
5750
5770
|
source: "plugin",
|
|
5751
5771
|
supportsPause: true,
|
|
5752
|
-
isAsync:
|
|
5772
|
+
// (`isAsync` stood here — retired in #6748, ADR-0049: nothing read it)
|
|
5753
5773
|
// #3823 / amended ADR-0044: THE point of this node type. The revise
|
|
5754
5774
|
// window is a service-owned continuation, so the #3801 gate must refuse
|
|
5755
5775
|
// a raw resume of it — which it does for any node type declaring this.
|
|
@@ -5801,7 +5821,7 @@ function registerApprovalNode(automation, service, logger) {
|
|
|
5801
5821
|
source: "plugin",
|
|
5802
5822
|
// Human decision: the run suspends here awaiting an external reply.
|
|
5803
5823
|
supportsPause: true,
|
|
5804
|
-
isAsync:
|
|
5824
|
+
// (`isAsync` stood here — retired in #6748, ADR-0049: nothing read it)
|
|
5805
5825
|
// #3801: this pause is NOT resumable through the generic run-resume
|
|
5806
5826
|
// route. Continuing an approval is a side effect of a DECISION, and the
|
|
5807
5827
|
// decision is the thing that must be authorized (the approver slate),
|
|
@@ -5852,6 +5872,17 @@ function registerApprovalNode(automation, service, logger) {
|
|
|
5852
5872
|
}, {
|
|
5853
5873
|
...SYSTEM_CTX4,
|
|
5854
5874
|
userId: context?.userId,
|
|
5875
|
+
// [#7135] ⚠️ This assertion SURVIVES the annotation widening, and it
|
|
5876
|
+
// is `as ExecutionContext` rather than the `as unknown as
|
|
5877
|
+
// SharingExecutionContext` double cast it replaces. The sole reason
|
|
5878
|
+
// a cast is still needed is `organizationId`, which is not a field
|
|
5879
|
+
// of the envelope at ALL — that spelling has its own history (#5858
|
|
5880
|
+
// / `check:org-identifier`) and was explicitly held out of this
|
|
5881
|
+
// change (#7070), so removing the key here would be a RUNTIME change
|
|
5882
|
+
// belonging to that card. Dropping the second hop matters: `as
|
|
5883
|
+
// unknown as` erases the value entirely, while a single assertion
|
|
5884
|
+
// still requires the literal to be comparable to the envelope, so a
|
|
5885
|
+
// `userId: 42` here is once again a compile error.
|
|
5855
5886
|
organizationId: context?.organizationId,
|
|
5856
5887
|
tenantId: context?.tenantId
|
|
5857
5888
|
});
|
|
@@ -5903,12 +5934,23 @@ var ApprovalsServicePlugin = class {
|
|
|
5903
5934
|
// ADR-0029 D7 — contribute the Approvals entries into the Setup app's
|
|
5904
5935
|
// `group_approvals` slot. This plugin owns these objects (K2.b), so it
|
|
5905
5936
|
// ships their menu too; when the plugin isn't installed the slot is empty.
|
|
5937
|
+
//
|
|
5938
|
+
// #7234 — order inside the slot is ARRAY ORDER: `applyNavContributions`
|
|
5939
|
+
// does `group.children.push(...c.items)` per contribution (sorted by
|
|
5940
|
+
// `priority`), so the inbox being first in this array is what puts it
|
|
5941
|
+
// above the raw tables. Do not reorder without meaning to.
|
|
5942
|
+
//
|
|
5943
|
+
// The inbox entry is the working surface (decision actions, node
|
|
5944
|
+
// progress, drawer); the three object entries below stay as the
|
|
5945
|
+
// admin/diagnostic view of the engine's own tables — reachable only here,
|
|
5946
|
+
// behind `group_approvals`' `manage_platform_settings` gate.
|
|
5906
5947
|
navigationContributions: [
|
|
5907
5948
|
{
|
|
5908
5949
|
app: "setup",
|
|
5909
5950
|
group: "group_approvals",
|
|
5910
5951
|
priority: 100,
|
|
5911
5952
|
items: [
|
|
5953
|
+
{ id: "nav_approvals_inbox", type: "component", label: "Approvals Inbox", componentRef: "approvals:inbox", icon: "list-checks" },
|
|
5912
5954
|
{ id: "nav_approval_requests", type: "object", label: "Requests", objectName: "sys_approval_request", icon: "inbox", requiresObject: "sys_approval_request" },
|
|
5913
5955
|
{ id: "nav_approval_actions", type: "object", label: "Action History", objectName: "sys_approval_action", icon: "history", requiresObject: "sys_approval_action" },
|
|
5914
5956
|
{ id: "nav_approval_delegations", type: "object", label: "Delegations (OOO)", objectName: "sys_approval_delegation", icon: "user-clock", requiresObject: "sys_approval_delegation" }
|
|
@@ -6021,7 +6063,14 @@ var ApprovalsServicePlugin = class {
|
|
|
6021
6063
|
};
|
|
6022
6064
|
const mountActionPages = async () => {
|
|
6023
6065
|
try {
|
|
6024
|
-
const
|
|
6066
|
+
const readServer = (name) => {
|
|
6067
|
+
try {
|
|
6068
|
+
return ctx.getService(name);
|
|
6069
|
+
} catch {
|
|
6070
|
+
return void 0;
|
|
6071
|
+
}
|
|
6072
|
+
};
|
|
6073
|
+
const http = readServer("http.server") ?? readServer("http-server");
|
|
6025
6074
|
const rawApp = http && typeof http.getRawApp === "function" ? http.getRawApp() : null;
|
|
6026
6075
|
if (!rawApp || !this.service) return;
|
|
6027
6076
|
const svc = this.service;
|