weaver-work-cli 0.1.60 → 0.1.61
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/chunks/{archive-4SQAVTIB.js → archive-S2VKZWQ3.js} +2 -2
- package/dist/chunks/{archive-oa-W2UEJ67L.js → archive-oa-HEDSIUUY.js} +2 -2
- package/dist/chunks/{asset-EGZEABBI.js → asset-HYH4W357.js} +2 -2
- package/dist/chunks/{asset-idle-EBUZBB6M.js → asset-idle-N7REBNGL.js} +2 -2
- package/dist/chunks/{attachment-content-I6WHKGR2.js → attachment-content-VYYA75FR.js} +3 -3
- package/dist/chunks/{blog-2YKMWOWI.js → blog-SLMZZICV.js} +2 -2
- package/dist/chunks/{caizhilian-5NM4X5HG.js → caizhilian-RV43KKBT.js} +4 -4
- package/dist/chunks/{calendar-H4QTJCUY.js → calendar-DMVZ4OLY.js} +2 -2
- package/dist/chunks/{chunk-VLL6JOB4.js → chunk-6XSSAUNW.js} +4 -4
- package/dist/chunks/{chunk-VQWPQTEY.js → chunk-BIA2NKUG.js} +4 -4
- package/dist/chunks/{chunk-VMCCRWFO.js → chunk-BQYX2UX5.js} +2 -2
- package/dist/chunks/{chunk-XF7S6FQW.js → chunk-DTCQFTHW.js} +1 -1
- package/dist/chunks/{chunk-CPG6NLN4.js → chunk-E5YD5JWR.js} +1 -1
- package/dist/chunks/{chunk-PH7N4UFT.js → chunk-EGANE35F.js} +1 -1
- package/dist/chunks/{chunk-Z4IPY5GV.js → chunk-H6YOMI3U.js} +2 -2
- package/dist/chunks/{chunk-HHH4K3YY.js → chunk-ILALC2N6.js} +1 -1
- package/dist/chunks/{chunk-WINR2Q6K.js → chunk-KXJA42EA.js} +86 -19
- package/dist/chunks/{chunk-CQ4OVCKG.js → chunk-KY3R42RS.js} +2 -2
- package/dist/chunks/{chunk-WVH5ESDA.js → chunk-NRYDJN4J.js} +1 -1
- package/dist/chunks/{chunk-TGM7BWEH.js → chunk-P6TXQK75.js} +2 -2
- package/dist/chunks/{chunk-6YWHRXEQ.js → chunk-QBDXJS2W.js} +119 -9
- package/dist/chunks/{chunk-2IGZUMNG.js → chunk-SHX7XBYR.js} +180 -18
- package/dist/chunks/{chunk-P7RXQDCA.js → chunk-T2KVJFWJ.js} +4 -4
- package/dist/chunks/{chunk-FMNCSYIG.js → chunk-TEZHIB6T.js} +2 -2
- package/dist/chunks/{chunk-HMIIVM2L.js → chunk-UBGWIXU3.js} +97 -45
- package/dist/chunks/{chunk-5N222HK6.js → chunk-UBRWONP4.js} +2 -2
- package/dist/chunks/{chunk-7U5YHCW7.js → chunk-UQFPF4EX.js} +2 -2
- package/dist/chunks/{chunk-4GG72JAT.js → chunk-V2LASYKO.js} +2 -2
- package/dist/chunks/{chunk-BDBTZVYA.js → chunk-VBFBMM7G.js} +55 -55
- package/dist/chunks/{chunk-YHSOCGKO.js → chunk-VNYOUAWV.js} +11 -11
- package/dist/chunks/{chunk-SFM3M2L3.js → chunk-WIWDVETN.js} +19 -3
- package/dist/chunks/{chunk-44KJ7WFA.js → chunk-XT77MP54.js} +2 -2
- package/dist/chunks/{chunk-JFKMPRZB.js → chunk-YI2YMW5N.js} +50 -3
- package/dist/chunks/{conflict-QMDLS2EW.js → conflict-GFJRS6I7.js} +2 -2
- package/dist/chunks/{contract-LLRKMLQQ.js → contract-U3ZGNRWB.js} +2 -2
- package/dist/chunks/{cowork-2RDFBZWB.js → cowork-EX7PKIDK.js} +2 -2
- package/dist/chunks/{create-flow-5ODJ7WJO.js → create-flow-EJZD434E.js} +6 -6
- package/dist/chunks/{data-LVDFIRNG.js → data-FOODGAMF.js} +278 -121
- package/dist/chunks/{ebuilder-form-7WA6X6ZI.js → ebuilder-form-I2EOKODG.js} +3 -3
- package/dist/chunks/{ehr-52GBKNJR.js → ehr-TE4RFNID.js} +2 -2
- package/dist/chunks/{entry-mode-73BJML22.js → entry-mode-ZOLSXEGX.js} +9 -5
- package/dist/chunks/{env-OHFS76HV.js → env-TID5NFR6.js} +2 -2
- package/dist/chunks/{esb-HJSXCEOM.js → esb-7L6MHYLB.js} +4 -4
- package/dist/chunks/{factory-FRTA2LP4.js → factory-OG7BPMH5.js} +1 -1
- package/dist/chunks/{fna-OBACRT3J.js → fna-6V2ENR3Y.js} +2 -2
- package/dist/chunks/{group-chat-KBFRPCR2.js → group-chat-5DKPWIHL.js} +3 -3
- package/dist/chunks/{host-TTSGY5NZ.js → host-3DLYA54R.js} +3 -3
- package/dist/chunks/{host-KJT3G5D2.js → host-GOJHHTPY.js} +3 -3
- package/dist/chunks/{host-KOWUMNAY.js → host-OGBHL75G.js} +3 -3
- package/dist/chunks/{host-MFXRA2MY.js → host-ONZC6AE7.js} +3 -3
- package/dist/chunks/{host-W4JCNRFS.js → host-TJ5VVHM7.js} +3 -3
- package/dist/chunks/{host-2BKMPWDH.js → host-VTPAWDZV.js} +3 -3
- package/dist/chunks/{hrm-AK3WGBMN.js → hrm-2N7NFQDZ.js} +3 -3
- package/dist/chunks/{im-JZSBPO4Z.js → im-XCH47ZBN.js} +3 -3
- package/dist/chunks/{invoice-6XDMPCWB.js → invoice-XQRKMGNY.js} +3 -3
- package/dist/chunks/{jiuchuanhui-K4EQU6GK.js → jiuchuanhui-PL6DRPBM.js} +2 -2
- package/dist/chunks/{lazy-dispatch-GCA6HDOB.js → lazy-dispatch-UATEN7H7.js} +5 -5
- package/dist/chunks/{mail-IKVCQCVZ.js → mail-Q7Z4CQ4D.js} +2 -2
- package/dist/chunks/{meeting-ARHVWK7G.js → meeting-5E3BNARL.js} +13 -13
- package/dist/chunks/{minute-doc-547KSYKR.js → minute-doc-NXRE5C77.js} +4 -4
- package/dist/chunks/{okr-KV43FPPX.js → okr-3O3XNYOK.js} +2 -2
- package/dist/chunks/{operations-6NXJ7RTE.js → operations-EZWG72FH.js} +4 -4
- package/dist/chunks/performance-Y7CPNSOR.js +1295 -0
- package/dist/chunks/{plan-WOYR4WEG.js → plan-BLGPZF5M.js} +2 -2
- package/dist/chunks/{project-CQJKBUIL.js → project-6MZMLJMP.js} +2 -2
- package/dist/chunks/{reception-MPBU3JXC.js → reception-F2VT2X52.js} +2 -2
- package/dist/chunks/{recruit-stage-USTTRHOX.js → recruit-stage-4ETIBMIW.js} +2 -2
- package/dist/chunks/{registry-GURQG4ZV.js → registry-3FYSWV3U.js} +3 -3
- package/dist/chunks/{registry-SS5J2FZQ.js → registry-7RS74TCK.js} +4 -4
- package/dist/chunks/{registry-H5HQ5QNH.js → registry-I4DVPDMU.js} +11 -11
- package/dist/chunks/{room-recommend-3UBROMZE.js → room-recommend-GWCVKCXW.js} +4 -4
- package/dist/chunks/{schedule-FTUQML6O.js → schedule-6AN63MJQ.js} +4 -4
- package/dist/chunks/{smart-extract-APX2PNIN.js → smart-extract-SR4SJJKN.js} +3 -3
- package/dist/chunks/{workflow-WMPW3WSB.js → workflow-KF7FA2UQ.js} +7 -7
- package/dist/cmd/refs/index.js +124 -4
- package/dist/core/output.js +199 -26
- package/dist/core/refs.js +36 -0
- package/dist/index.js +38 -33
- package/dist/internal/e10/auth/xiaoe.js +25 -3
- package/dist/shortcuts/caizhilian/operations/files.js +86 -15
- package/dist/shortcuts/data/index.js +12 -2
- package/dist/shortcuts/data/manifest.js +4 -2
- package/dist/shortcuts/data/operations/attribution.js +229 -0
- package/dist/shortcuts/data/operations/ds.js +87 -90
- package/dist/shortcuts/data/operations/index.js +3 -1
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/meeting/operations/eb/create-flow.js +84 -16
- package/dist/shortcuts/meeting/operations/eb/entry-mode.js +61 -7
- package/dist/shortcuts/performance/continuation.js +74 -0
- package/dist/shortcuts/performance/errors.js +65 -0
- package/dist/shortcuts/performance/host.js +105 -0
- package/dist/shortcuts/performance/index.js +109 -0
- package/dist/shortcuts/performance/manifest.js +30 -0
- package/dist/shortcuts/performance/operations/hrm-resolve.js +114 -0
- package/dist/shortcuts/performance/operations/registry.js +44 -0
- package/dist/shortcuts/performance/operations/scheme-detail.js +70 -0
- package/dist/shortcuts/performance/operations/scheme-draft.js +116 -0
- package/dist/shortcuts/performance/operations/scheme-publish.js +158 -0
- package/dist/shortcuts/performance/operations/types.js +32 -0
- package/dist/shortcuts/performance/scheme-validate.js +307 -0
- package/dist/shortcuts/performance/shared.js +158 -0
- package/docs/agent-io-channel-design.md +67 -3
- package/docs/data.md +2 -1
- package/package.json +1 -1
- package/scripts/xiaoe_env.py +6 -1
- package/skill-template/business-info.json +19 -0
- package/skill-template/domains/performance.md +18 -0
- package/skills/weaver-e10-caizhilian/SKILL.md +1 -1
- package/skills/weaver-e10-data/references/datasource.md +2 -1
- package/skills/weaver-e10-meeting/SKILL.md +5 -3
- package/skills/weaver-e10-performance/SKILL.md +202 -0
- package/skills/weaver-e10-performance/agents/openai.yaml +74 -0
- package/skills/weaver-e10-performance/references/default-assembly.md +108 -0
- package/skills/weaver-e10-performance/references/entity-resolution.md +69 -0
- package/skills/weaver-e10-performance/references/enums-and-normalization.md +80 -0
- package/skills/weaver-e10-performance/references/examples.md +146 -0
- package/skills/weaver-e10-performance/references/extraction-guide.md +144 -0
- package/skills/weaver-e10-performance/references/scheme-edit-req-fields.md +185 -0
- package/skills/weaver-e10-performance/references/scheme-setting-page.md +62 -0
- package/skills/weaver-e10-performance/scripts/parse_appraisal_doc.py +483 -0
- package/skills/weaver-e10-shared/references/json-output-contract.md +5 -0
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
createE10RequestRuntime,
|
|
6
6
|
isE10SessionExpiredResponse,
|
|
7
7
|
requireE10Session
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NRYDJN4J.js";
|
|
9
9
|
import {
|
|
10
10
|
E10_SESSION_EXPIRED_MESSAGE
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WIWDVETN.js";
|
|
12
12
|
import "./chunk-SHYQUBY3.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError
|
|
@@ -171,11 +171,11 @@ function createDataHost(ctx, dependencies = {}) {
|
|
|
171
171
|
return { status: response.status, text: response.text, value: response.value };
|
|
172
172
|
}
|
|
173
173
|
async function request(request2) {
|
|
174
|
-
const { status, value, text } = await requestText(request2);
|
|
174
|
+
const { status, value, text: text2 } = await requestText(request2);
|
|
175
175
|
if (status < 200 || status >= 300) {
|
|
176
176
|
throw dataApiError("http_error", `\u63A5\u53E3 HTTP ${status}`, {
|
|
177
177
|
code: status,
|
|
178
|
-
details: { status, body: String(
|
|
178
|
+
details: { status, body: String(text2 ?? "").slice(0, 500) },
|
|
179
179
|
exitCode: 7
|
|
180
180
|
});
|
|
181
181
|
}
|
|
@@ -233,9 +233,9 @@ function parseJsonSafe(raw) {
|
|
|
233
233
|
function readJsonArg(value, label) {
|
|
234
234
|
if (value === void 0 || value === null || value === true) return void 0;
|
|
235
235
|
const raw = String(value);
|
|
236
|
-
const
|
|
236
|
+
const text2 = raw.startsWith("@") ? readFileSync(raw.slice(1), "utf-8") : raw;
|
|
237
237
|
try {
|
|
238
|
-
return parseJsonSafe(
|
|
238
|
+
return parseJsonSafe(text2);
|
|
239
239
|
} catch (error) {
|
|
240
240
|
throw dataValidationError("json_invalid", `${label} \u4E0D\u662F\u5408\u6CD5 JSON\uFF1A${error.message}`);
|
|
241
241
|
}
|
|
@@ -441,8 +441,8 @@ function tipsLines(tips) {
|
|
|
441
441
|
function cell(value) {
|
|
442
442
|
if (value === null || value === void 0) return "";
|
|
443
443
|
if (typeof value === "object") {
|
|
444
|
-
const
|
|
445
|
-
return
|
|
444
|
+
const text2 = JSON.stringify(value);
|
|
445
|
+
return text2.length > 80 ? `${text2.slice(0, 80)}\u2026` : text2;
|
|
446
446
|
}
|
|
447
447
|
return String(value);
|
|
448
448
|
}
|
|
@@ -513,65 +513,42 @@ async function executeQuery(input, host) {
|
|
|
513
513
|
}
|
|
514
514
|
|
|
515
515
|
// src/shortcuts/data/operations/ds.ts
|
|
516
|
-
var
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
[37, "\u7B7E\u540D", "weaver-signature-service", null],
|
|
553
|
-
[38, "\u90AE\u4EF6", "weaver-mail-base-service", "email"],
|
|
554
|
-
[39, "\u85AA\u916C", "weaver-hrm-salary", "hrmsalary"],
|
|
555
|
-
[40, "\u7CFB\u7EDF\u5B89\u5168", "weaver-security-framework-service", "security"],
|
|
556
|
-
[41, "\u516C\u6587\u4EA4\u6362\u4E2D\u5FC3", "weaver-odocexchange-service", "odocexchange"],
|
|
557
|
-
[42, "\u62DB\u8058\u7BA1\u7406", "weaver-recruit-service", "recruit"],
|
|
558
|
-
[43, "\u5FAE\u641C", "weaver-esearch-search-service", null],
|
|
559
|
-
[44, "\u7EDF\u4E00\u5BA1\u6279\u4E2D\u5FC3", "weaver-intunifytodo-server-config-service", "intunifytodos"],
|
|
560
|
-
[45, "\u516C\u5171\u6570\u636E\u6E90", "weaver-component-web-service", "common"],
|
|
561
|
-
[46, "\u6570\u636E\u5206\u6790", "weaver-analyze-service", "analyze"],
|
|
562
|
-
[47, "\u8D22\u52A1\u6A21\u5757", "weaver-fna-expense-servicefexs", "fna"],
|
|
563
|
-
[48, "ESB\u8FDE\u63A5\u5668", "weaver-esb-setting-serviceesbConnect", "esb"],
|
|
564
|
-
[49, "AI\u8FDE\u63A5\u5668", "weaver-ai-application-service", "ai"],
|
|
565
|
-
[50, "\u5916\u90E8\u6D41\u7A0B", "weaver-workflow-core-serviceworkflowCoreOuterwf", "workflow"],
|
|
566
|
-
[51, "\u7EE9\u6548\u8003\u6838", "weaver-wr-performance-eb-service", "ebuilder"],
|
|
567
|
-
[52, "\u95EE\u9898\u5B9A\u4F4D\u5E73\u53F0", "weaver-tissot-service", "tissot"],
|
|
568
|
-
[53, "\u5DE5\u4F5C\u6D41\u57FA\u7840\u6548\u7387", "weaver-workflow-report-serviceworkflowEffReport", "workflow"],
|
|
569
|
-
[54, "\u5DE5\u4F5C\u6D41\u64CD\u4F5C\u8005\u6548\u7387", "weaver-workflow-report-serviceworkflowEffOperateReport", "workflow"],
|
|
570
|
-
[55, "\u5DE5\u4F5C\u6D41\u8282\u70B9\u6548\u7387", "weaver-workflow-report-serviceworkflowEffNodeReport", "workflow"],
|
|
571
|
-
[56, "\u89C4\u5219\u5F15\u64CE", "weaver-logicflow-service", "logicflow"],
|
|
572
|
-
[57, "\u5DE5\u4F5C\u6D41\u8868\u5355", "weaver-workflow-report-serviceworkflowFormReport", "workflow"],
|
|
573
|
-
[58, "\u7EDF\u4E00\u8BA4\u8BC1\u4E2D\u5FC3", "weaver-intunifyauth-server-base-service", null]
|
|
574
|
-
];
|
|
516
|
+
var DS_GROUPS_PATH = "/api/dw/ds/group";
|
|
517
|
+
var DS_GROUPS_SOURCE_TYPE = "LOGIC";
|
|
518
|
+
function normalizeServiceMark(raw) {
|
|
519
|
+
return typeof raw === "string" && raw.trim() !== "" ? raw : null;
|
|
520
|
+
}
|
|
521
|
+
function groupIndex(groups) {
|
|
522
|
+
return new Map(groups.map((group) => [group.groupId, group]));
|
|
523
|
+
}
|
|
524
|
+
async function fetchGroups(host) {
|
|
525
|
+
const response = await host.request({
|
|
526
|
+
method: "GET",
|
|
527
|
+
path: DS_GROUPS_PATH,
|
|
528
|
+
query: { sourceType: DS_GROUPS_SOURCE_TYPE },
|
|
529
|
+
operation: "ds.groups"
|
|
530
|
+
});
|
|
531
|
+
const rows = response?.data;
|
|
532
|
+
if (response?.code !== void 0 && response.code !== 200) {
|
|
533
|
+
throw dataApiError(
|
|
534
|
+
"groups_failed",
|
|
535
|
+
`\u5206\u7EC4\u6E05\u5355\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25\uFF1A${response?.msg || `code=${response.code}`}`,
|
|
536
|
+
{ code: response.code, details: { sourceType: DS_GROUPS_SOURCE_TYPE } }
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
if (!Array.isArray(rows)) {
|
|
540
|
+
throw dataApiError(
|
|
541
|
+
"groups_failed",
|
|
542
|
+
`\u5206\u7EC4\u6E05\u5355\u63A5\u53E3\u5F02\u5E38\uFF1A${response?.msg || "\u672A\u8FD4\u56DE data \u6570\u7EC4"}`,
|
|
543
|
+
{ code: response?.code, details: { sourceType: DS_GROUPS_SOURCE_TYPE } }
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
return rows.filter((row) => row && typeof row.id === "string" && row.id !== "").map((row) => ({
|
|
547
|
+
groupId: row.id,
|
|
548
|
+
label: String(row.name ?? ""),
|
|
549
|
+
serviceMark: normalizeServiceMark(row.serviceMark)
|
|
550
|
+
}));
|
|
551
|
+
}
|
|
575
552
|
var DS_CORE_GROUPS = [
|
|
576
553
|
"weaver-formreport-service",
|
|
577
554
|
"weaver-ebuilder-form-service",
|
|
@@ -590,13 +567,11 @@ var DS_FIND_SEMANTIC_RULES = [
|
|
|
590
567
|
{ tag: "\u90AE\u4EF6/\u516C\u6587", re: /邮件|收件箱|公文|发文|档案|借阅/, groups: ["weaver-mail-base-service", "weaver-odoc-service"] },
|
|
591
568
|
{ tag: "\u8D44\u4EA7/\u65E5\u5FD7", re: /资产|台账|日志|动作流|自动化/, groups: ["weaver-elog-service", "weaver-esb-setting-serviceesbCustom"] }
|
|
592
569
|
];
|
|
593
|
-
function groupLabel(groupId) {
|
|
594
|
-
|
|
595
|
-
return hit ? hit[1] : null;
|
|
570
|
+
function groupLabel(index, groupId) {
|
|
571
|
+
return index?.get(groupId)?.label ?? null;
|
|
596
572
|
}
|
|
597
|
-
function groupMark(groupId) {
|
|
598
|
-
|
|
599
|
-
return hit ? hit[3] : null;
|
|
573
|
+
function groupMark(index, groupId) {
|
|
574
|
+
return index?.get(groupId)?.serviceMark ?? null;
|
|
600
575
|
}
|
|
601
576
|
function explicitAppId(input) {
|
|
602
577
|
const appId = input.app_id;
|
|
@@ -635,17 +610,23 @@ function renderFields(response) {
|
|
|
635
610
|
}
|
|
636
611
|
return lines.length ? lines.join("\n") : "(\u7A7A\uFF1A\u672A\u8FD4\u56DE\u5B57\u6BB5)";
|
|
637
612
|
}
|
|
638
|
-
async function dsGroups(input) {
|
|
613
|
+
async function dsGroups(input, host) {
|
|
639
614
|
const pattern = input.pattern ? String(input.pattern) : null;
|
|
640
|
-
const
|
|
615
|
+
const live = await fetchGroups(host);
|
|
616
|
+
const groups = live.filter((item) => !pattern || item.groupId.includes(pattern) || item.label.includes(pattern));
|
|
617
|
+
const liveIds = new Set(live.map((item) => item.groupId));
|
|
641
618
|
const data = {
|
|
642
619
|
count: groups.length,
|
|
643
620
|
groups,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
621
|
+
sourceType: DS_GROUPS_SOURCE_TYPE,
|
|
622
|
+
coreGroups: DS_CORE_GROUPS.filter((groupId) => liveIds.has(groupId)),
|
|
623
|
+
semanticRules: DS_FIND_SEMANTIC_RULES.map((rule) => ({ tag: rule.tag, groups: rule.groups.filter((groupId) => liveIds.has(groupId)) })).filter((rule) => rule.groups.length > 0),
|
|
624
|
+
note: `\u5206\u7EC4\u6E05\u5355\u6765\u81EA ${DS_GROUPS_PATH} \u5B9E\u65F6\u8FD4\u56DE\uFF08sourceType=${DS_GROUPS_SOURCE_TYPE}\uFF09\uFF0C\u63A5\u53E3\u8FD4\u56DE\u4EC0\u4E48\u5C31\u662F\u4EC0\u4E48\u3001\u968F\u73AF\u5883\u589E\u51CF\uFF1Bds find \u7684\u9ED8\u8BA4\u626B\u63CF\u5019\u9009\u540C\u6837\u53EA\u53D6\u5B9E\u65F6\u5206\u7EC4\uFF0C\u9700\u7F29\u5C0F\u8303\u56F4\u65F6\u7528 --groups \u663E\u5F0F\u6307\u5B9A`
|
|
625
|
+
};
|
|
626
|
+
return {
|
|
627
|
+
data,
|
|
628
|
+
text: renderTable(`\u5206\u7EC4\u6E05\u5355 ${groups.length} \u4E2A\uFF08\u5B9E\u65F6\uFF09`, groups, ["groupId", "label", "serviceMark"])
|
|
647
629
|
};
|
|
648
|
-
return { data, text: renderTable(`\u5185\u7F6E\u5206\u7EC4\u6E05\u5355 ${groups.length} \u4E2A`, groups, ["groupId", "label", "serviceMark"]) };
|
|
649
630
|
}
|
|
650
631
|
async function dsTables(input, host) {
|
|
651
632
|
const groupId = needArg(input, "group");
|
|
@@ -765,15 +746,16 @@ async function dsCount(input, host) {
|
|
|
765
746
|
text: [...tipsLines(tips), `totalCount = ${response?.data?.totalCount ?? "-"}`].join("\n")
|
|
766
747
|
};
|
|
767
748
|
}
|
|
768
|
-
function pickFindGroups(input, keyword) {
|
|
749
|
+
function pickFindGroups(input, keyword, live) {
|
|
769
750
|
if (input.groups) {
|
|
770
751
|
return { mode: "explicit", groups: String(input.groups).split(",").map((item) => item.trim()).filter(Boolean) };
|
|
771
752
|
}
|
|
772
|
-
if (input.all_groups) return { mode: "all", groups:
|
|
753
|
+
if (input.all_groups) return { mode: "all", groups: live.map((item) => item.groupId) };
|
|
773
754
|
const max = Math.max(Number(input.max_groups || "6") || 6, DS_CORE_GROUPS.length);
|
|
755
|
+
const liveIds = new Set(live.map((item) => item.groupId));
|
|
774
756
|
const picked = [];
|
|
775
757
|
const push = (groupId) => {
|
|
776
|
-
if (groupId && !picked.includes(groupId)) picked.push(groupId);
|
|
758
|
+
if (groupId && liveIds.has(groupId) && !picked.includes(groupId)) picked.push(groupId);
|
|
777
759
|
};
|
|
778
760
|
for (const groupId of DS_CORE_GROUPS) push(groupId);
|
|
779
761
|
for (const rule of DS_FIND_SEMANTIC_RULES) {
|
|
@@ -794,12 +776,12 @@ async function mapLimit(items, limit, fn) {
|
|
|
794
776
|
await Promise.all(workers);
|
|
795
777
|
return out;
|
|
796
778
|
}
|
|
797
|
-
async function scanGroups(host, groupIds, keyword, sourceType, pageSize, concurrency, appId, pages) {
|
|
779
|
+
async function scanGroups(host, index, groupIds, keyword, sourceType, pageSize, concurrency, appId, pages) {
|
|
798
780
|
return mapLimit(groupIds, concurrency, async (groupId) => {
|
|
799
781
|
const result = {
|
|
800
782
|
groupId,
|
|
801
|
-
label: groupLabel(groupId),
|
|
802
|
-
serviceMark: groupMark(groupId),
|
|
783
|
+
label: groupLabel(index, groupId),
|
|
784
|
+
serviceMark: groupMark(index, groupId),
|
|
803
785
|
records: [],
|
|
804
786
|
error: null,
|
|
805
787
|
total: null,
|
|
@@ -895,7 +877,7 @@ function routeHint(candidates) {
|
|
|
895
877
|
if (has((c) => c.serviceMark === "attend")) return { channel: "EHR", desc: "EHR \u6A21\u5757\u914D\u7F6E\u901A\u9053\uFF08\u8003\u52E4/\u4EBA\u4E8B\uFF09", reason: "\u547D\u4E2D\u8003\u52E4\u5206\u7EC4" };
|
|
896
878
|
if (has((c) => c.serviceMark === "blog")) return { channel: "BLOG_DAILY", desc: "BLOG_DAILY \u6A21\u5757\u914D\u7F6E\u901A\u9053\uFF08\u65E5\u62A5\uFF09", reason: "\u547D\u4E2D\u65E5\u62A5\u5206\u7EC4" };
|
|
897
879
|
if (has((c) => c.serviceMark === "document")) return { channel: "DOCUMENT", desc: "DOCUMENT \u6A21\u5757\u914D\u7F6E\u901A\u9053\uFF08\u6587\u6863\uFF09", reason: "\u547D\u4E2D\u6587\u6863\u5206\u7EC4" };
|
|
898
|
-
if (has((c) => c.serviceMark === "customer" || c.serviceMark === "scrm")) {
|
|
880
|
+
if (has((c) => c.serviceMark === "customer" || c.serviceMark === "crm" || c.serviceMark === "scrm")) {
|
|
899
881
|
return { channel: "CRM", desc: "CRM \u6A21\u5757\u914D\u7F6E\u901A\u9053\uFF08\u5BA2\u6237/\u5546\u673A/\u7EBF\u7D22\uFF09", reason: "\u547D\u4E2D CRM \u5206\u7EC4" };
|
|
900
882
|
}
|
|
901
883
|
if (has((c) => c.serviceMark === "esb")) return { channel: "ESB", desc: "\u52A8\u4F5C\u6D41\uFF08ESB\uFF09\u2014\u2014 \u65E0\u6807\u51C6\u95EE\u6570\u901A\u9053\uFF0C\u9700\u4EBA\u5DE5\u786E\u8BA4", reason: "\u4EC5\u547D\u4E2D\u52A8\u4F5C\u6D41\u5206\u7EC4" };
|
|
@@ -909,9 +891,11 @@ async function dsFind(input, host) {
|
|
|
909
891
|
const pages = Math.min(Math.max(Number(input.pages || "1") || 1, 1), 50);
|
|
910
892
|
const concurrency = Math.max(1, Number(input.concurrency || "10") || 10);
|
|
911
893
|
const appId = explicitAppId(input);
|
|
912
|
-
const
|
|
894
|
+
const live = await fetchGroups(host);
|
|
895
|
+
const index = groupIndex(live);
|
|
896
|
+
const picked = pickFindGroups(input, keyword, live);
|
|
913
897
|
const startedAt = Date.now();
|
|
914
|
-
let scan = await scanGroups(host, picked.groups, keyword, sourceType, pageSize, concurrency, appId, pages);
|
|
898
|
+
let scan = await scanGroups(host, index, picked.groups, keyword, sourceType, pageSize, concurrency, appId, pages);
|
|
915
899
|
const keywordNorm = keyword.replace(/\s+/g, "").toLowerCase();
|
|
916
900
|
const looseSample = [];
|
|
917
901
|
let looseDropped = 0;
|
|
@@ -939,8 +923,8 @@ async function dsFind(input, host) {
|
|
|
939
923
|
if (!scan.some((result) => result.records.length) && picked.mode === "core" && !input.no_escalate && escalateOk) {
|
|
940
924
|
escalated = true;
|
|
941
925
|
const seen = new Set(picked.groups);
|
|
942
|
-
const extra =
|
|
943
|
-
scan = scan.concat(applyStrict(await scanGroups(host, extra, keyword, sourceType, pageSize, concurrency, appId, pages)));
|
|
926
|
+
const extra = live.map((item) => item.groupId).filter((groupId) => !seen.has(groupId));
|
|
927
|
+
scan = scan.concat(applyStrict(await scanGroups(host, index, extra, keyword, sourceType, pageSize, concurrency, appId, pages)));
|
|
944
928
|
}
|
|
945
929
|
const elapsedMs = Date.now() - startedAt;
|
|
946
930
|
const okScan = scan.filter((result) => !result.error);
|
|
@@ -1062,6 +1046,12 @@ async function dsDescribe(input, host) {
|
|
|
1062
1046
|
const tableId = String(needArg(input, "table"));
|
|
1063
1047
|
const sourceType = String(input.source_type || "LOGIC");
|
|
1064
1048
|
const startedAt = Date.now();
|
|
1049
|
+
let index = null;
|
|
1050
|
+
try {
|
|
1051
|
+
index = groupIndex(await fetchGroups(host));
|
|
1052
|
+
} catch {
|
|
1053
|
+
index = null;
|
|
1054
|
+
}
|
|
1065
1055
|
const branches = await Promise.all([
|
|
1066
1056
|
(async () => {
|
|
1067
1057
|
try {
|
|
@@ -1112,7 +1102,7 @@ async function dsDescribe(input, host) {
|
|
|
1112
1102
|
}
|
|
1113
1103
|
})()
|
|
1114
1104
|
]);
|
|
1115
|
-
const data = { groupId, groupLabel: groupLabel(groupId), tableId, sourceType, branches: branches.length };
|
|
1105
|
+
const data = { groupId, groupLabel: groupLabel(index, groupId), tableId, sourceType, branches: branches.length };
|
|
1116
1106
|
const errors = [];
|
|
1117
1107
|
for (const branch of branches) {
|
|
1118
1108
|
if (branch.error) {
|
|
@@ -1123,7 +1113,7 @@ async function dsDescribe(input, host) {
|
|
|
1123
1113
|
}
|
|
1124
1114
|
}
|
|
1125
1115
|
data.relatedFields = relatedHint(groupId, data.fields?.detailCount || 0);
|
|
1126
|
-
data.channelHint = routeHint([{ groupId, serviceMark: groupMark(groupId) }]);
|
|
1116
|
+
data.channelHint = routeHint([{ groupId, serviceMark: groupMark(index, groupId) }]);
|
|
1127
1117
|
data.permissionNote = groupId === "weaver-ebuilder-form-service" ? "\u8BE5\u5206\u7EC4\u662F EB \u5EFA\u6A21\u8868\u5355\uFF1A\u53D6\u6570\u4E0D\u518D\u505A\u6743\u9650\u524D\u7F6E\u6821\u9A8C\uFF0C--app-id \u76F4\u63A5\u53D6 ebdf_obj.app_id\uFF08obj_id = ebdf_obj.id = \u6570\u636E\u6E90 tableId\uFF09" : "\u975E EB \u5206\u7EC4\uFF0C\u6570\u636E\u6E90\u901A\u9053\u65E0\u9700 appId";
|
|
1128
1118
|
data.elapsedMs = Date.now() - startedAt;
|
|
1129
1119
|
if (errors.length && input.require) {
|
|
@@ -1323,6 +1313,166 @@ async function nounScope(input, host) {
|
|
|
1323
1313
|
return { data: { scopeIds: ids, count: docs.length, globalCount, scopedCount, docs }, text: lines.join("\n") };
|
|
1324
1314
|
}
|
|
1325
1315
|
|
|
1316
|
+
// src/shortcuts/data/operations/attribution.ts
|
|
1317
|
+
var ATTRIBUTION_PATH = "/api/dw/newetl/chatBi/attribution/getAttributionMetricByScopeId";
|
|
1318
|
+
function parseIds(value, flag) {
|
|
1319
|
+
const raw = String(readListArg(value) ?? "").trim();
|
|
1320
|
+
if (!raw) return [];
|
|
1321
|
+
const ids = raw.replace(/^\[|\]$/g, "").split(/[,\s]+/).map((item) => item.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
|
|
1322
|
+
for (const id of ids) {
|
|
1323
|
+
if (!/^\d+$/.test(id)) {
|
|
1324
|
+
throw dataValidationError("ids_invalid", `${flag} \u542B\u975E\u6CD5\u9879\u300C${id}\u300D\uFF08\u987B\u4E3A\u6570\u5B57\u578B id\uFF1A\u5206\u7EC4 id \u53D6\u81EA scene groups\uFF0C\u6761\u76EE id \u53D6\u81EA scene items\uFF09`);
|
|
1325
|
+
}
|
|
1326
|
+
if (BigInt(id) > 9223372036854775807n) {
|
|
1327
|
+
throw dataValidationError("ids_invalid", `${flag} \u542B\u8D85\u51FA Long \u4E0A\u9650\u7684 id\uFF1A${id}`);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
return ids;
|
|
1331
|
+
}
|
|
1332
|
+
function parseAttributionScopeIds(input) {
|
|
1333
|
+
const ids = [
|
|
1334
|
+
.../* @__PURE__ */ new Set([
|
|
1335
|
+
...parseIds(input.ids, "--ids"),
|
|
1336
|
+
...parseIds(input.group_ids, "--group-ids"),
|
|
1337
|
+
...parseIds(input.item_ids, "--item-ids")
|
|
1338
|
+
])
|
|
1339
|
+
];
|
|
1340
|
+
if (!ids.length) {
|
|
1341
|
+
throw dataValidationError(
|
|
1342
|
+
"missing_argument",
|
|
1343
|
+
"\u7F3A\u5C11\u751F\u6548\u8303\u56F4 id\uFF1A\u8BF7\u4F20 --ids\uFF08\u5206\u7EC4 id + \u6761\u76EE id \u5408\u5E76\uFF09\uFF0C\u6216\u5206\u522B\u4F20 --group-ids / --item-ids\uFF08\u5982 --ids 1060565684758507537,2120434818314403840 \u6216 --ids @ids.json\uFF09"
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
return ids;
|
|
1347
|
+
}
|
|
1348
|
+
function text(value) {
|
|
1349
|
+
return value === null || value === void 0 ? "" : String(value).trim();
|
|
1350
|
+
}
|
|
1351
|
+
function splitDimensions(raw) {
|
|
1352
|
+
const value = text(raw);
|
|
1353
|
+
if (!value) return [];
|
|
1354
|
+
return value.split(/[;;]/).map((item) => item.trim()).filter(Boolean);
|
|
1355
|
+
}
|
|
1356
|
+
function parseDrillPaths(raw) {
|
|
1357
|
+
if (Array.isArray(raw)) return raw.map((item) => splitPath(text(item))).filter((path) => path.length);
|
|
1358
|
+
const value = text(raw);
|
|
1359
|
+
if (!value) return [];
|
|
1360
|
+
try {
|
|
1361
|
+
const parsed = JSON.parse(value);
|
|
1362
|
+
if (Array.isArray(parsed)) return parsed.map((item) => splitPath(text(item))).filter((path) => path.length);
|
|
1363
|
+
if (typeof parsed === "string") return [splitPath(parsed)].filter((path) => path.length);
|
|
1364
|
+
} catch {
|
|
1365
|
+
}
|
|
1366
|
+
return value.split(/[;;]/).map(splitPath).filter((path) => path.length);
|
|
1367
|
+
}
|
|
1368
|
+
function splitPath(value) {
|
|
1369
|
+
return value.split(/\s*>\s*/).map((item) => item.trim()).filter(Boolean);
|
|
1370
|
+
}
|
|
1371
|
+
function scopeLevelOf(record, groupIds, itemIds, allIds) {
|
|
1372
|
+
const effectId = text(record?.scopeEffectId);
|
|
1373
|
+
const allScope = record?.allScope === null || record?.allScope === void 0 ? null : Number(record.allScope);
|
|
1374
|
+
if (effectId) {
|
|
1375
|
+
if (itemIds.includes(effectId)) return { level: "item", matchedId: effectId };
|
|
1376
|
+
if (groupIds.includes(effectId)) return { level: "group", matchedId: effectId };
|
|
1377
|
+
if (allIds.includes(effectId)) return { level: "scoped", matchedId: effectId };
|
|
1378
|
+
return { level: "other", matchedId: effectId };
|
|
1379
|
+
}
|
|
1380
|
+
if (allScope === 1) return { level: "global", matchedId: "" };
|
|
1381
|
+
return { level: "other", matchedId: "" };
|
|
1382
|
+
}
|
|
1383
|
+
var LEVEL_ORDER = { item: 0, group: 1, scoped: 2, other: 3, global: 4 };
|
|
1384
|
+
var LEVEL_LABEL = {
|
|
1385
|
+
item: "\u6761\u76EE\u7EA7",
|
|
1386
|
+
group: "\u5206\u7EC4\u7EA7",
|
|
1387
|
+
scoped: "\u672C\u6B21\u8303\u56F4",
|
|
1388
|
+
other: "\u5176\u5B83\u8303\u56F4",
|
|
1389
|
+
global: "\u5168\u5C40"
|
|
1390
|
+
};
|
|
1391
|
+
function normalizeAttributionMetric(record, groupIds = [], itemIds = [], allIds = []) {
|
|
1392
|
+
const { level, matchedId } = scopeLevelOf(record, groupIds, itemIds, allIds);
|
|
1393
|
+
const normalized = {
|
|
1394
|
+
id: text(record?.id),
|
|
1395
|
+
metricName: text(record?.metricName),
|
|
1396
|
+
caliber: text(record?.caliber),
|
|
1397
|
+
dimensions: splitDimensions(record?.dimensions),
|
|
1398
|
+
drillPaths: parseDrillPaths(record?.drillPaths),
|
|
1399
|
+
allScope: record?.allScope === null || record?.allScope === void 0 ? null : Number(record.allScope),
|
|
1400
|
+
scopeEffectId: text(record?.scopeEffectId),
|
|
1401
|
+
scopeLevel: level,
|
|
1402
|
+
matchedId,
|
|
1403
|
+
scopes: text(record?.scopes),
|
|
1404
|
+
scopeTableInfo: parseJsonOrRaw(record?.scopeTableInfo)
|
|
1405
|
+
};
|
|
1406
|
+
if (record?.creator !== void 0) normalized.creator = text(record.creator);
|
|
1407
|
+
if (record?.createTime !== void 0) normalized.createTime = text(record.createTime);
|
|
1408
|
+
if (record?.updateTime !== void 0) normalized.updateTime = text(record.updateTime);
|
|
1409
|
+
return normalized;
|
|
1410
|
+
}
|
|
1411
|
+
function parseJsonOrRaw(value) {
|
|
1412
|
+
const raw = text(value);
|
|
1413
|
+
if (!raw) return value ?? null;
|
|
1414
|
+
try {
|
|
1415
|
+
return JSON.parse(raw);
|
|
1416
|
+
} catch {
|
|
1417
|
+
return raw;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function renderRecord(record) {
|
|
1421
|
+
const lines = [];
|
|
1422
|
+
const scope = record.scopeEffectId ? `${LEVEL_LABEL[record.scopeLevel]} ${record.scopeEffectId}` : LEVEL_LABEL[record.scopeLevel];
|
|
1423
|
+
lines.push(`\u3010${record.metricName || "(\u672A\u547D\u540D\u6307\u6807)"}\u3011 [${scope}]`);
|
|
1424
|
+
if (record.caliber) lines.push(` \u8BA1\u7B97\u53E3\u5F84\uFF1A${record.caliber.replace(/\n/g, " ")}`);
|
|
1425
|
+
if (record.dimensions.length) lines.push(` \u53EF\u5173\u8054\u7EF4\u5EA6\uFF1A${record.dimensions.join(" / ")}`);
|
|
1426
|
+
if (record.drillPaths.length) {
|
|
1427
|
+
lines.push(` \u4E0B\u94BB\u8DEF\u5F84\uFF1A${record.drillPaths.map((path) => path.join(" > ")).join("\uFF1B")}`);
|
|
1428
|
+
}
|
|
1429
|
+
if (!record.dimensions.length && !record.drillPaths.length) lines.push(" (\u8BE5\u6761\u8BBE\u7F6E\u672A\u914D\u7F6E\u7EF4\u5EA6 / \u4E0B\u94BB\u8DEF\u5F84)");
|
|
1430
|
+
return lines;
|
|
1431
|
+
}
|
|
1432
|
+
async function attributionMetric(input, host) {
|
|
1433
|
+
const ids = parseAttributionScopeIds(input);
|
|
1434
|
+
const groupIds = parseIds(input.group_ids, "--group-ids");
|
|
1435
|
+
const itemIds = parseIds(input.item_ids, "--item-ids");
|
|
1436
|
+
const response = await host.request({
|
|
1437
|
+
method: "POST",
|
|
1438
|
+
path: ATTRIBUTION_PATH,
|
|
1439
|
+
body: ids.map(String),
|
|
1440
|
+
operation: "attribution.metric"
|
|
1441
|
+
});
|
|
1442
|
+
const code = response?.actionMsg?.code ?? response?.code;
|
|
1443
|
+
const message = response?.actionMsg?.message ?? response?.msg;
|
|
1444
|
+
const bad = code !== void 0 && Number(code) !== 0 || response?.fail === true;
|
|
1445
|
+
if (bad) {
|
|
1446
|
+
throw dataApiError(
|
|
1447
|
+
"attribution_metric_failed",
|
|
1448
|
+
`getAttributionMetricByScopeId \u4E1A\u52A1\u5931\u8D25\uFF1Acode=${code} msg=${message || "(\u65E0 msg)"}`,
|
|
1449
|
+
{ code }
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
const rawList = Array.isArray(response?.data) ? response.data : response?.data ? [response.data] : [];
|
|
1453
|
+
const metrics = rawList.map((record) => normalizeAttributionMetric(record, groupIds, itemIds, ids)).sort((a, b) => LEVEL_ORDER[a.scopeLevel] - LEVEL_ORDER[b.scopeLevel]);
|
|
1454
|
+
const scoped = metrics.filter((record) => record.scopeLevel !== "global");
|
|
1455
|
+
const lines = [`== \u5F52\u56E0\u8BBE\u7F6E ${metrics.length} \u6761\uFF08\u751F\u6548\u8303\u56F4 id ${ids.length} \u4E2A\uFF1B\u975E\u5168\u5C40 ${scoped.length} \uFF0B \u5168\u5C40 ${metrics.length - scoped.length}\uFF09==`];
|
|
1456
|
+
if (!metrics.length) {
|
|
1457
|
+
lines.push("(\u7A7A\uFF1A\u8BE5\u73AF\u5883\u672A\u8FD4\u56DE\u4EFB\u4F55\u5F52\u56E0\u8BBE\u7F6E \u21D2 \u6309\u6280\u80FD\u901A\u7528\u89C4\u5219\u5F52\u56E0)");
|
|
1458
|
+
} else {
|
|
1459
|
+
for (const record of metrics) lines.push(...renderRecord(record));
|
|
1460
|
+
if (!scoped.length) {
|
|
1461
|
+
lines.push("(\u63D0\u793A\uFF1A\u672C\u6B21\u53EA\u547D\u4E2D\u5168\u5C40\u8BBE\u7F6E\uFF0C\u6240\u9009\u5206\u7EC4 / \u6761\u76EE\u672C\u8EAB\u672A\u5355\u72EC\u7ED1\u5B9A\u5F52\u56E0\u53E3\u5F84)");
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
return {
|
|
1465
|
+
data: {
|
|
1466
|
+
scopeIds: ids,
|
|
1467
|
+
count: metrics.length,
|
|
1468
|
+
scopedCount: scoped.length,
|
|
1469
|
+
globalCount: metrics.length - scoped.length,
|
|
1470
|
+
metrics
|
|
1471
|
+
},
|
|
1472
|
+
text: lines.join("\n")
|
|
1473
|
+
};
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1326
1476
|
// src/shortcuts/data/operations/conf.ts
|
|
1327
1477
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
1328
1478
|
var CONF_PREFIX_TYPE = [["CONN_", "conn"], ["DS_", "ds"], ["WF_", "wf"], ["API_", "api"]];
|
|
@@ -1548,33 +1698,33 @@ async function resolveAll(host, keys, group) {
|
|
|
1548
1698
|
}
|
|
1549
1699
|
return map;
|
|
1550
1700
|
}
|
|
1551
|
-
async function resolveText(host,
|
|
1552
|
-
const found = [...new Set([...
|
|
1701
|
+
async function resolveText(host, text2, group) {
|
|
1702
|
+
const found = [...new Set([...text2.matchAll(CONF_TOKEN_RE)].map((match) => match[1]))];
|
|
1553
1703
|
const map = found.length ? await resolveAll(host, found, group) : {};
|
|
1554
|
-
const output =
|
|
1704
|
+
const output = text2.replace(CONF_TOKEN_RE, (whole, key) => {
|
|
1555
1705
|
const config = map[key];
|
|
1556
1706
|
if (!config) throw dataApiError("conf_missing", `\u914D\u7F6E\u4E0D\u5B58\u5728\u6216\u4E3A\u7A7A: ${key}`, { code: key });
|
|
1557
1707
|
return config.confValue ?? "";
|
|
1558
1708
|
});
|
|
1559
1709
|
return {
|
|
1560
|
-
input:
|
|
1710
|
+
input: text2,
|
|
1561
1711
|
output,
|
|
1562
1712
|
resolved: Object.fromEntries(Object.entries(map).map(([key, value]) => [key, value.confValue ?? ""]))
|
|
1563
1713
|
};
|
|
1564
1714
|
}
|
|
1565
1715
|
async function confResolve(input, host) {
|
|
1566
|
-
let
|
|
1567
|
-
if (!
|
|
1568
|
-
|
|
1569
|
-
if (
|
|
1570
|
-
const result = await resolveText(host,
|
|
1716
|
+
let text2 = input.text ?? positionals(input, "keys")[0];
|
|
1717
|
+
if (!text2) throw dataValidationError("missing_argument", "conf resolve \u7F3A\u5C11\u6587\u672C\uFF08\u7528\u6CD5: conf resolve '<\u542B#{KEY}\u6587\u672C>' | @file.txt [--group g]\uFF09");
|
|
1718
|
+
text2 = String(text2);
|
|
1719
|
+
if (text2.startsWith("@")) text2 = readFileSync2(text2.slice(1), "utf-8");
|
|
1720
|
+
const result = await resolveText(host, text2, input.group);
|
|
1571
1721
|
return { data: result, text: result.output };
|
|
1572
1722
|
}
|
|
1573
1723
|
async function confResolveFile(input, host) {
|
|
1574
1724
|
const path = input.resolve_file ?? positionals(input, "keys")[0];
|
|
1575
1725
|
if (!path) throw dataValidationError("missing_argument", "conf resolve-file \u7F3A\u5C11\u6587\u4EF6\u8DEF\u5F84");
|
|
1576
|
-
const
|
|
1577
|
-
const result = await resolveText(host,
|
|
1726
|
+
const text2 = readFileSync2(String(path), "utf-8");
|
|
1727
|
+
const result = await resolveText(host, text2, input.group);
|
|
1578
1728
|
return { data: result, text: result.output };
|
|
1579
1729
|
}
|
|
1580
1730
|
async function confAdd(input, host) {
|
|
@@ -1721,13 +1871,13 @@ function flagsOf(obj, payload) {
|
|
|
1721
1871
|
if (payload && typeof payload === "object" && !Array.isArray(payload) && payload.pageUid === "checkSecondFail") {
|
|
1722
1872
|
flags.push("pageUid=checkSecondFail\uFF08\u4E8C\u6B21\u8EAB\u4EFD\u9A8C\u8BC1\uFF1Atotal \u53EF\u4FE1\u3001\u660E\u7EC6\u6052 0 \u884C \u2192 \u5982\u5B9E\u8BF4\u660E\uFF0C\u4E0D\u5F97\u5F53\u65E0\u6570\u636E\uFF09");
|
|
1723
1873
|
}
|
|
1724
|
-
let
|
|
1874
|
+
let text2 = "";
|
|
1725
1875
|
try {
|
|
1726
|
-
|
|
1876
|
+
text2 = JSON.stringify(obj).slice(0, 4e3);
|
|
1727
1877
|
} catch {
|
|
1728
|
-
|
|
1878
|
+
text2 = "";
|
|
1729
1879
|
}
|
|
1730
|
-
if (PERM_WORDS.some((word) =>
|
|
1880
|
+
if (PERM_WORDS.some((word) => text2.includes(word))) flags.push("\u54CD\u5E94\u542B\u6743\u9650\u5173\u952E\u8BCD \u2192 \u6309\u300C\u65E0\u6743\u9650\u5373\u7EC8\u6B62\u300D\u5904\u7406");
|
|
1731
1881
|
return flags;
|
|
1732
1882
|
}
|
|
1733
1883
|
function loadConfFile(path) {
|
|
@@ -1919,7 +2069,7 @@ async function moduleCall(input, host) {
|
|
|
1919
2069
|
for (const [key, value] of Object.entries(extraHeaders)) {
|
|
1920
2070
|
if (/^token$/i.test(key) || ["cookie", "eteamsid", "user-agent"].includes(key.toLowerCase())) trustedHeaders[key] = value;
|
|
1921
2071
|
}
|
|
1922
|
-
const { status, text } = await host.requestText({
|
|
2072
|
+
const { status, text: text2 } = await host.requestText({
|
|
1923
2073
|
method: effMethod,
|
|
1924
2074
|
path: apiPath + queryString,
|
|
1925
2075
|
body: effMethod === "POST" ? jsonBody : void 0,
|
|
@@ -1934,16 +2084,16 @@ async function moduleCall(input, host) {
|
|
|
1934
2084
|
}
|
|
1935
2085
|
let obj = null;
|
|
1936
2086
|
try {
|
|
1937
|
-
obj = parseJsonSafe(
|
|
2087
|
+
obj = parseJsonSafe(text2);
|
|
1938
2088
|
} catch {
|
|
1939
2089
|
obj = null;
|
|
1940
2090
|
}
|
|
1941
2091
|
if (obj === null) {
|
|
1942
|
-
const out2 = { ok: status >= 200 && status < 300, api_name: apiName, http: status, nonJson:
|
|
2092
|
+
const out2 = { ok: status >= 200 && status < 300, api_name: apiName, http: status, nonJson: text2.slice(0, 2e3) };
|
|
1943
2093
|
if (status < 200 || status >= 300) {
|
|
1944
2094
|
throw dataApiError("non_json", `HTTP ${status} \u4E14\u54CD\u5E94\u975E JSON\uFF08\u5DF2\u539F\u6837\u8F93\u51FA\u524D 2000 \u5B57\u7B26\uFF09`, { code: 7, details: out2 });
|
|
1945
2095
|
}
|
|
1946
|
-
return { data: out2, text:
|
|
2096
|
+
return { data: out2, text: text2.slice(0, 2e3) };
|
|
1947
2097
|
}
|
|
1948
2098
|
if (input.raw) return { data: obj, text: JSON.stringify(obj, null, 1) };
|
|
1949
2099
|
const payload = payloadOf(obj);
|
|
@@ -2071,8 +2221,8 @@ async function sceneItems(input, host) {
|
|
|
2071
2221
|
function keywordsOf(raw) {
|
|
2072
2222
|
return String(raw ?? "").split(/[,,、;;\s]+/).map((item) => item.trim()).filter(Boolean);
|
|
2073
2223
|
}
|
|
2074
|
-
function hitScore(
|
|
2075
|
-
const hay = String(
|
|
2224
|
+
function hitScore(text2, keywords) {
|
|
2225
|
+
const hay = String(text2 ?? "").toLowerCase();
|
|
2076
2226
|
if (!hay) return 0;
|
|
2077
2227
|
let score = 0;
|
|
2078
2228
|
for (const keyword of keywords) if (hay.includes(keyword.toLowerCase())) score += 1;
|
|
@@ -2179,7 +2329,7 @@ async function sceneSearch(input, host) {
|
|
|
2179
2329
|
// src/shortcuts/data/operations/index.ts
|
|
2180
2330
|
var DEFINITIONS = [
|
|
2181
2331
|
{ name: "data.dsl.query", summary: "\u76F4\u63A5\u6267\u884C DSL \u67E5\u8BE2\uFF08executeQueryDsl\uFF1B\u4E0E ds list/chart/stat/count \u4E3A\u72EC\u7ACB\u901A\u9053\uFF09", capability: "dsl", handler: executeQuery, command: "query" },
|
|
2182
|
-
{ name: "data.ds.groups", summary: "\
|
|
2332
|
+
{ name: "data.ds.groups", summary: "\u6570\u636E\u6E90\u5206\u7EC4\u6E05\u5355\uFF08\u5B9E\u65F6 /api/dw/ds/group\uFF0CsourceType=LOGIC\uFF09", capability: "discovery", handler: dsGroups, command: "ds groups" },
|
|
2183
2333
|
{ name: "data.ds.find", summary: "\u6309\u5173\u952E\u8BCD\u8DE8\u5206\u7EC4\u627E\u8868\uFF08\u8FDB\u7A0B\u5185\u5E76\u53D1\u6247\u51FA + \u672C\u5730\u8FC7\u6EE4 + \u8DEF\u7531\u5EFA\u8BAE\uFF09", capability: "discovery", handler: dsFind, command: "ds find" },
|
|
2184
2334
|
{ name: "data.ds.describe", summary: "\u4E00\u6B21\u5E76\u53D1\u53D6\u56DE\u5B57\u6BB5\u5143\u6570\u636E + \u8BCD\u5E93\uFF0C\u5E76\u7ED9\u51FA\u5173\u8054\u5B57\u6BB5/\u901A\u9053\u63D0\u793A", capability: "discovery", handler: dsDescribe, command: "ds describe" },
|
|
2185
2335
|
{ name: "data.ds.tables", summary: "\u5217\u67D0\u4E2A\u5206\u7EC4\u4E0B\u7684\u6570\u636E\u96C6\uFF08\u8868\uFF09\u6E05\u5355", capability: "metadata", handler: dsTables, command: "ds tables" },
|
|
@@ -2191,6 +2341,7 @@ var DEFINITIONS = [
|
|
|
2191
2341
|
{ name: "data.ds.count", summary: "\u8BA1\u6570\uFF08getCountData\uFF09", capability: "fetch", handler: dsCount, command: "ds count" },
|
|
2192
2342
|
{ name: "data.noun.list", summary: "\u6309 skill \u53D6\u8BCD\u5E93\uFF08ChatBI \u540D\u8BCD\u89E3\u91CA\uFF09", capability: "lexicon", handler: nounList, command: "noun list" },
|
|
2193
2343
|
{ name: "data.noun.scope", summary: "\u6309\u6570\u636E\u96C6\u751F\u6548\u8303\u56F4\u6279\u91CF\u53D6\u8BCD\u5E93\uFF08getChatBiDocByScopeId\uFF09", capability: "lexicon", handler: nounScope, command: "noun scope" },
|
|
2344
|
+
{ name: "data.attribution.metric", summary: "\u6309\u751F\u6548\u8303\u56F4\u6279\u91CF\u53D6\u5F52\u56E0\u5206\u6790\u8BBE\u7F6E\uFF08getAttributionMetricByScopeId\uFF1B\u5206\u7EC4\u7EA7 / \u6761\u76EE\u7EA7\u7ED1\u5B9A\uFF09", capability: "attribution", handler: attributionMetric, command: "attribution metric" },
|
|
2194
2345
|
{ name: "data.field.name2id", summary: "\u540D\u79F0 \u2192 \u5B57\u6BB5\u503C id \u5019\u9009\uFF08\u6D4F\u89C8\u6309\u94AE\u7C7B\u5B57\u6BB5\uFF09", capability: "field", handler: fieldName2id, command: "field name2id" },
|
|
2195
2346
|
{ name: "data.field.options", summary: "Select/Radio/Checkbox \u9009\u9879\u503C\u5B57\u5178\uFF08id\u2194name\uFF09", capability: "field", handler: fieldOptions, command: "field options" },
|
|
2196
2347
|
{ name: "data.conf.get", summary: "\u6309 confKey \u53D6\u5355\u6761\u914D\u7F6E\uFF08confType \u7531\u524D\u7F00\u63A8\u5BFC\u6216 --type \u6307\u5B9A\uFF09", capability: "config", handler: confGet, command: "conf get" },
|
|
@@ -2255,6 +2406,7 @@ var INPUT_SCHEMAS = {
|
|
|
2255
2406
|
"data.ds.count": { required: ["group", "table"], optional: ["where", "source_type", "app_id"] },
|
|
2256
2407
|
"data.noun.list": { required: ["skill"], optional: ["source_type", "source_group", "source_table"] },
|
|
2257
2408
|
"data.noun.scope": { required: ["ids"], optional: [] },
|
|
2409
|
+
"data.attribution.metric": { required: [], optional: ["ids", "group_ids", "item_ids"] },
|
|
2258
2410
|
"data.field.name2id": { required: ["module", "type", "name"], optional: ["form_param", "eb_browser_param", "property_type"] },
|
|
2259
2411
|
"data.field.options": { required: ["field_name", "obj_id", "group"], optional: ["source_type"] },
|
|
2260
2412
|
"data.conf.get": { required: ["key"], optional: ["type", "group"] },
|
|
@@ -2302,7 +2454,7 @@ function inputSchemaOf(name) {
|
|
|
2302
2454
|
const spec = INPUT_SCHEMAS[name] || { required: [], optional: [] };
|
|
2303
2455
|
const properties = {};
|
|
2304
2456
|
for (const key of [...spec.required, ...spec.optional]) {
|
|
2305
|
-
properties[key] = { type: key === "keys" || key === "ids" ? "array" : "string" };
|
|
2457
|
+
properties[key] = { type: key === "keys" || key === "ids" || key === "group_ids" || key === "item_ids" ? "array" : "string" };
|
|
2306
2458
|
}
|
|
2307
2459
|
return {
|
|
2308
2460
|
type: "object",
|
|
@@ -2326,7 +2478,7 @@ var dataManifest = {
|
|
|
2326
2478
|
host: "e10-data",
|
|
2327
2479
|
status: "builtin",
|
|
2328
2480
|
sourceSkill: "weaver-e10-data",
|
|
2329
|
-
capabilities: ["dsl", "discovery", "metadata", "fetch", "lexicon", "field", "config", "scene", "module", "attend"],
|
|
2481
|
+
capabilities: ["dsl", "discovery", "metadata", "fetch", "lexicon", "field", "config", "scene", "module", "attend", "attribution"],
|
|
2330
2482
|
auth: {
|
|
2331
2483
|
required: "e10-session",
|
|
2332
2484
|
note: "\u6240\u6709\u64CD\u4F5C\u90FD\u8981\u6C42\u5DF2\u767B\u5F55 E10\uFF1B\u767B\u5F55\u7EDF\u4E00\u8D70 `weaver-work-cli auth login --base-url <\u57DF\u540D>`\uFF0Cdata \u6A21\u5757\u4E0D\u63D0\u4F9B\u4EFB\u4F55\u767B\u5F55\u5165\u53E3\u3002"
|
|
@@ -2339,7 +2491,8 @@ var dataManifest = {
|
|
|
2339
2491
|
"`module call` \u7684 `token` \u5934\u5728\u8FD0\u884C\u65F6\u5C5E\u4FDD\u7559\u5934\uFF0C\u5FC5\u987B\u8D70 trustedHeaders\uFF08INVOICE \u5DF2\u5185\u7F6E\u6362\u53D6\u903B\u8F91\uFF09\u3002",
|
|
2340
2492
|
"\u4EBA\u5458 / \u90E8\u95E8 / \u5C97\u4F4D\u4E00\u5F8B\u8D70 `weaver-work-cli hrm`\uFF1Bdata \u901A\u9053\u5BF9 /api/hrm/ \u8DEF\u5F84\u6709\u9ED1\u540D\u5355\uFF08\u9000\u51FA\u7801 6\uFF09\u3002",
|
|
2341
2493
|
"`hasSearchRight=false` \u662F\u6743\u9650\u53D7\u9650\uFF08\u7EC8\u7AEF\u6001\uFF09\uFF1A\u7ED3\u679C\u7167\u5E38\u7ED9\u51FA\u4F46\u9000\u51FA\u7801 4\uFF0C\u4E0D\u5F97\u4EA4\u4ED8\u4E3A\u300C\u65E0\u6570\u636E\u300D\u3002",
|
|
2342
|
-
"`field name2id`\uFF08\u540D\u79F0\u2192\u5B57\u6BB5\u503C id\uFF09\u4E0E `ds fields`\uFF08\u5B57\u6BB5\u5143\u6570\u636E\uFF09\u662F\u4E24\u4EF6\u4E8B\uFF1B`id2name` \u5DF2\u505C\u7528\u5E76\u5728\u672C\u6B21\u8FC1\u79FB\u4E2D\u5220\u9664\u3002"
|
|
2494
|
+
"`field name2id`\uFF08\u540D\u79F0\u2192\u5B57\u6BB5\u503C id\uFF09\u4E0E `ds fields`\uFF08\u5B57\u6BB5\u5143\u6570\u636E\uFF09\u662F\u4E24\u4EF6\u4E8B\uFF1B`id2name` \u5DF2\u505C\u7528\u5E76\u5728\u672C\u6B21\u8FC1\u79FB\u4E2D\u5220\u9664\u3002",
|
|
2495
|
+
"`attribution metric` \u53D6\u7684\u662F**\u5F52\u56E0\u5206\u6790\u8BBE\u7F6E**\uFF08\u6307\u6807\u53E3\u5F84 / \u53EF\u5173\u8054\u7EF4\u5EA6 / \u4E0B\u94BB\u8DEF\u5F84\uFF09\uFF0C\u4E0E `noun scope` \u7684\u8BCD\u5E93\u89E3\u91CA\u4E0D\u540C\uFF1B\u5F52\u56E0\u5206\u6790\u4F18\u5148\u7528\u8FD9\u91CC\u7684\u8BBE\u7F6E\uFF0C\u672A\u914D\u7F6E\u65F6\u624D\u56DE\u9000\u901A\u7528\u6D41\u7A0B\u3002"
|
|
2343
2496
|
],
|
|
2344
2497
|
operations: dataOperations,
|
|
2345
2498
|
withheldOperations: [
|
|
@@ -2448,10 +2601,10 @@ var dataShortcut = {
|
|
|
2448
2601
|
await run(ctx, "data.dsl.query", toInput(options), false);
|
|
2449
2602
|
}));
|
|
2450
2603
|
const ds = data.command("ds").description("\u6570\u636E\u6E90\uFF1A\u5206\u7EC4 / \u627E\u8868 / \u5143\u6570\u636E / \u53D6\u6570");
|
|
2451
|
-
ds.command("groups").description("\
|
|
2604
|
+
ds.command("groups").description("\u6570\u636E\u6E90\u5206\u7EC4\u6E05\u5355\uFF08\u5B9E\u65F6 /api/dw/ds/group\uFF0CsourceType=LOGIC\uFF09").option("--pattern <sub>", "\u6309 groupId / \u4E2D\u6587\u540D\u8FC7\u6EE4").action(action(async (ctx, options) => {
|
|
2452
2605
|
await run(ctx, "data.ds.groups", toInput(options), false);
|
|
2453
2606
|
}));
|
|
2454
|
-
ds.command("find").description("\u6309\u5173\u952E\u8BCD\u8DE8\u5206\u7EC4\u627E\u8868\uFF08\u5E76\u53D1\u6247\u51FA + \u672C\u5730\u8FC7\u6EE4 + \u8DEF\u7531\u5EFA\u8BAE\uFF09").option("--name <keyword>", "\u8868\u540D\u5173\u952E\u8BCD").option("--keyword <keyword>", "\u540C --name").option("--source-type <type>", "LOGIC / ETEAMS\uFF0C\u9ED8\u8BA4 LOGIC").option("--size <n>", "\u6BCF\u9875\u6761\u6570\uFF08\u22642000\uFF09\uFF0C\u9ED8\u8BA4 100").option("--pages <n>", "\u6293\u53D6\u9875\u6570\uFF08\u226450\uFF09\uFF0C\u9ED8\u8BA4 1").option("--concurrency <n>", "\u8FDB\u7A0B\u5185\u5E76\u53D1\u6570\uFF0C\u9ED8\u8BA4 10").option("--groups <a,b>", "\u663E\u5F0F\u6307\u5B9A\u626B\u63CF\u5206\u7EC4").option("--all-groups", "\u626B\u63CF\u5168\u90E8
|
|
2607
|
+
ds.command("find").description("\u6309\u5173\u952E\u8BCD\u8DE8\u5206\u7EC4\u627E\u8868\uFF08\u5E76\u53D1\u6247\u51FA + \u672C\u5730\u8FC7\u6EE4 + \u8DEF\u7531\u5EFA\u8BAE\uFF09").option("--name <keyword>", "\u8868\u540D\u5173\u952E\u8BCD").option("--keyword <keyword>", "\u540C --name").option("--source-type <type>", "LOGIC / ETEAMS\uFF0C\u9ED8\u8BA4 LOGIC").option("--size <n>", "\u6BCF\u9875\u6761\u6570\uFF08\u22642000\uFF09\uFF0C\u9ED8\u8BA4 100").option("--pages <n>", "\u6293\u53D6\u9875\u6570\uFF08\u226450\uFF09\uFF0C\u9ED8\u8BA4 1").option("--concurrency <n>", "\u8FDB\u7A0B\u5185\u5E76\u53D1\u6570\uFF0C\u9ED8\u8BA4 10").option("--groups <a,b>", "\u663E\u5F0F\u6307\u5B9A\u626B\u63CF\u5206\u7EC4").option("--all-groups", "\u626B\u63CF\u5168\u90E8\u5B9E\u65F6\u5206\u7EC4").option("--max-groups <n>", "\u9ED8\u8BA4\u626B\u63CF\u96C6\u4E0A\u9650\uFF0C\u9ED8\u8BA4 6").option("--app-id <id>", "EB \u5206\u7EC4\u6309\u5E94\u7528\u5206\u57DF\u65F6\u663E\u5F0F\u4F20\u5165").option("--limit <n>", "\u5019\u9009\u4E0A\u9650").option("--loose", "\u5173\u95ED\u672C\u5730\u5173\u952E\u8BCD\u8FC7\u6EE4").option("--no-escalate", "\u672A\u547D\u4E2D\u65F6\u4E0D\u5347\u7EA7\u5168\u626B").action(action(async (ctx, options) => {
|
|
2455
2608
|
await run(ctx, "data.ds.find", toInput(options), false);
|
|
2456
2609
|
}));
|
|
2457
2610
|
ds.command("describe").description("\u5E76\u53D1\u53D6\u5B57\u6BB5\u5143\u6570\u636E + \u8BCD\u5E93\uFF0C\u5E76\u7ED9\u51FA\u5173\u8054\u5B57\u6BB5/\u901A\u9053\u63D0\u793A").option("--group <groupId>", "\u5206\u7EC4 ID").option("--table <tableId>", "\u6570\u636E\u96C6 ID").option("--source-type <type>", "LOGIC / ETEAMS").option("--app-id <id>", "EB \u5206\u7EC4\u5E94\u7528 ID").option("--skill <skillKey>", "\u8BCD\u5E93 skillKey\uFF0C\u9ED8\u8BA4 data-source-query").option("--require", "\u5B58\u5728\u5931\u8D25\u5206\u652F\u65F6\u76F4\u63A5\u5931\u8D25").action(action(async (ctx, options) => {
|
|
@@ -2485,6 +2638,10 @@ var dataShortcut = {
|
|
|
2485
2638
|
noun.command("scope").description("\u6309\u6570\u636E\u96C6\u751F\u6548\u8303\u56F4\u6279\u91CF\u53D6\u8BCD\u5E93").option("--ids <a,b|@f>", "\u6570\u636E\u96C6 id \u5217\u8868\uFF08\u53D6\u81EA scene items\uFF09").action(action(async (ctx, options) => {
|
|
2486
2639
|
await run(ctx, "data.noun.scope", toInput(options), false);
|
|
2487
2640
|
}));
|
|
2641
|
+
const attribution = data.command("attribution").description("\u5F52\u56E0\u5206\u6790\u8BBE\u7F6E\uFF08\u6307\u6807\u53E3\u5F84 / \u7EF4\u5EA6 / \u4E0B\u94BB\u8DEF\u5F84\uFF09");
|
|
2642
|
+
attribution.command("metric").description("\u6309\u751F\u6548\u8303\u56F4\u6279\u91CF\u53D6\u5F52\u56E0\u5206\u6790\u8BBE\u7F6E\uFF08\u5206\u7EC4\u7EA7 / \u6761\u76EE\u7EA7\u7ED1\u5B9A\uFF09").option("--ids <a,b|@f>", "\u751F\u6548\u8303\u56F4 id \u5217\u8868\uFF08\u5206\u7EC4 id + \u6761\u76EE id \u5408\u5E76\uFF09").option("--group-ids <a,b|@f>", "\u4EC5\u5206\u7EC4 id\uFF08\u4E0E --ids \u5408\u5E76\u53BB\u91CD\uFF09").option("--item-ids <a,b|@f>", "\u4EC5\u6761\u76EE id\uFF08\u4E0E --ids \u5408\u5E76\u53BB\u91CD\uFF09").action(action(async (ctx, options) => {
|
|
2643
|
+
await run(ctx, "data.attribution.metric", toInput(options), false);
|
|
2644
|
+
}));
|
|
2488
2645
|
const field = data.command("field").description("\u5B57\u6BB5\u503C\u7FFB\u8BD1 / \u9009\u9879\u5B57\u5178");
|
|
2489
2646
|
field.command("name2id").description("\u540D\u79F0 \u2192 \u5B57\u6BB5\u503C id \u5019\u9009\uFF08\u6D4F\u89C8\u6309\u94AE\u7C7B\u5B57\u6BB5\uFF09").option("--module <module>", "\u6A21\u5757\u6807\u8BC6\uFF0C\u5982 hrm / workflow").option("--type <browserType>", "\u6D4F\u89C8\u6309\u94AE\u7C7B\u578B").option("--name <text>", "\u8981\u7FFB\u8BD1\u7684\u540D\u79F0").option("--form-param <json>", "\u8868\u5355\u53C2\u6570").option("--eb-browser-param <json|@file>", "EB \u6D4F\u89C8\u53C2\u6570").option("--property-type <type>", "\u5C5E\u6027\u7C7B\u578B").action(action(async (ctx, options) => {
|
|
2490
2647
|
await run(ctx, "data.field.name2id", toInput(options), false);
|
|
@@ -2508,8 +2665,8 @@ var dataShortcut = {
|
|
|
2508
2665
|
conf.command("group-file").description("\u6309\u6587\u4EF6\u6279\u91CF\u53D6\u591A\u4E2A\u5206\u7EC4\u7684\u914D\u7F6E").argument("<file>", "JSON \u6587\u4EF6\uFF0C\u5F62\u5982 [{confType, confGroup}]").action(action(async (ctx, file, options) => {
|
|
2509
2666
|
await run(ctx, "data.conf.group-file", { ...toInput(options), group_file: file }, false);
|
|
2510
2667
|
}));
|
|
2511
|
-
conf.command("resolve").description("\u628A\u6587\u672C\u91CC\u7684 #{KEY} \u5360\u4F4D\u7B26\u66FF\u6362\u4E3A\u914D\u7F6E\u503C").argument("<text>", "\u542B #{KEY} \u7684\u6587\u672C\uFF0C\u6216 @file.txt").option("--group <confGroup>", "confGroup").action(action(async (ctx,
|
|
2512
|
-
await run(ctx, "data.conf.resolve", { ...toInput(options), text }, false);
|
|
2668
|
+
conf.command("resolve").description("\u628A\u6587\u672C\u91CC\u7684 #{KEY} \u5360\u4F4D\u7B26\u66FF\u6362\u4E3A\u914D\u7F6E\u503C").argument("<text>", "\u542B #{KEY} \u7684\u6587\u672C\uFF0C\u6216 @file.txt").option("--group <confGroup>", "confGroup").action(action(async (ctx, text2, options) => {
|
|
2669
|
+
await run(ctx, "data.conf.resolve", { ...toInput(options), text: text2 }, false);
|
|
2513
2670
|
}));
|
|
2514
2671
|
conf.command("resolve-file").description("\u6309\u6587\u4EF6\u66FF\u6362 #{KEY} \u5360\u4F4D\u7B26").argument("<path>", "\u6587\u672C\u6587\u4EF6\u8DEF\u5F84").option("--group <confGroup>", "confGroup").action(action(async (ctx, path, options) => {
|
|
2515
2672
|
await run(ctx, "data.conf.resolve-file", { ...toInput(options), path }, false);
|