bpmax-cli 0.2.1-beta.88 → 0.2.1-beta.89
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/bin.js +28 -2
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -540,7 +540,7 @@ function pluginAgentCapabilityForRequest(method, normalizedPath) {
|
|
|
540
540
|
// package.json
|
|
541
541
|
var package_default = {
|
|
542
542
|
name: "bpmax-cli",
|
|
543
|
-
version: "0.2.1-beta.
|
|
543
|
+
version: "0.2.1-beta.89",
|
|
544
544
|
description: "CLI for BPMAX environments with multi-profile config and local login callback flow",
|
|
545
545
|
type: "module",
|
|
546
546
|
bin: {
|
|
@@ -10098,6 +10098,31 @@ function collectTextAtKeys(value, keys, result = []) {
|
|
|
10098
10098
|
});
|
|
10099
10099
|
return result;
|
|
10100
10100
|
}
|
|
10101
|
+
var THINKJS_RAW_ES_PATH = "/api/project/raw-es-search";
|
|
10102
|
+
function collectForbiddenThinkjsPathHits(value, path29, hits) {
|
|
10103
|
+
if (typeof value === "string") {
|
|
10104
|
+
if (value.includes(THINKJS_RAW_ES_PATH)) hits.push(path29 || "(root)");
|
|
10105
|
+
return;
|
|
10106
|
+
}
|
|
10107
|
+
if (Array.isArray(value)) {
|
|
10108
|
+
value.forEach((item, index) => collectForbiddenThinkjsPathHits(item, `${path29}[${index}]`, hits));
|
|
10109
|
+
return;
|
|
10110
|
+
}
|
|
10111
|
+
if (isRecord6(value)) {
|
|
10112
|
+
Object.entries(value).forEach(([key, item]) => {
|
|
10113
|
+
collectForbiddenThinkjsPathHits(item, path29 ? `${path29}.${key}` : key, hits);
|
|
10114
|
+
});
|
|
10115
|
+
}
|
|
10116
|
+
}
|
|
10117
|
+
function lintForbiddenThinkjsProjectSearchPath(value, errors) {
|
|
10118
|
+
const hits = [];
|
|
10119
|
+
collectForbiddenThinkjsPathHits(value, "", hits);
|
|
10120
|
+
const uniqueHits = [...new Set(hits)];
|
|
10121
|
+
if (!uniqueHits.length) return;
|
|
10122
|
+
const shown = uniqueHits.slice(0, 3).join(", ");
|
|
10123
|
+
const suffix = uniqueHits.length > 3 ? ` \u7B49 ${uniqueHits.length} \u5904` : "";
|
|
10124
|
+
errors.push(`\u914D\u7F6E\u4E2D\u7981\u6B62\u51FA\u73B0 ${THINKJS_RAW_ES_PATH}\uFF1Ahuanpingtong-server \u672A\u6CE8\u518C\u8BE5\u8DEF\u7531\uFF0C\u8BF7\u6C42\u4F1A\u9000\u5316\u5230\u521B\u5EFA\u8349\u7A3F\u9879\u76EE\uFF1B\u8BF7\u6539\u7528 /bpmax/project/raw-es-search \u6216 ctx.$esQuery\u3002\u547D\u4E2D\u8DEF\u5F84\uFF1A${shown}${suffix}`);
|
|
10125
|
+
}
|
|
10101
10126
|
function lintListTemplateQuerySafety(content, errors) {
|
|
10102
10127
|
const queryTexts = collectTextAtKeys(
|
|
10103
10128
|
{
|
|
@@ -10116,7 +10141,7 @@ function lintListTemplateQuerySafety(content, errors) {
|
|
|
10116
10141
|
errors.push("list-template query safety gate forbids /bpmax/project/list, /api/project/list, or ESProjectList unless the script includes bpmax-allow-user-scope-project-list: <reason>.");
|
|
10117
10142
|
}
|
|
10118
10143
|
if (/\bdata_set_id\b/i.test(text5) && /(raw-es-search|project\/list|ESProjectList|\$esQuery|query|search)/i.test(text5)) {
|
|
10119
|
-
errors.push("list-template query safety gate forbids using data_set_id as an ES/project query entrypoint; use data_set_key with raw-es-search or ctx.$esQuery instead.");
|
|
10144
|
+
errors.push("list-template query safety gate forbids using data_set_id as an ES/project query entrypoint; use data_set_key with /bpmax/project/raw-es-search or ctx.$esQuery instead.");
|
|
10120
10145
|
}
|
|
10121
10146
|
});
|
|
10122
10147
|
}
|
|
@@ -19389,6 +19414,7 @@ async function lintConfigWorkFile(file, options = {}) {
|
|
|
19389
19414
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
19390
19415
|
errors.push("Config work file must be a JSON object.");
|
|
19391
19416
|
} else {
|
|
19417
|
+
lintForbiddenThinkjsProjectSearchPath(value, errors);
|
|
19392
19418
|
if (options.domain === "dataset-field" || Object.prototype.hasOwnProperty.call(value, "classify") && (Object.prototype.hasOwnProperty.call(value, "source_table") || isRecord6(value.source))) {
|
|
19393
19419
|
lintDatasetFieldWork(value, errors, warnings);
|
|
19394
19420
|
}
|