@thinkingai/ae-cli 6.0.63 → 6.0.65
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/README.md +8 -3
- package/README.zh.md +8 -3
- package/dist/{ai-monitor-X5GL44JT.js → ai-monitor-ABPXAOYL.js} +5 -5
- package/dist/ai-monitor.js +6 -6
- package/dist/{auth-SPQ46XQ3.js → auth-EV4FSIFI.js} +3 -3
- package/dist/{capability-JZP4KXZC.js → capability-B35ZQSSB.js} +3 -3
- package/dist/{chunk-E457FREE.js → chunk-434DSEOC.js} +6 -5
- package/dist/{chunk-F7TCQPQX.js → chunk-4COJB2CS.js} +1 -1
- package/dist/{chunk-YJYC5PLL.js → chunk-4CRZ2YUC.js} +2 -1
- package/dist/{chunk-RYY5NJK3.js → chunk-66F7SOGR.js} +2 -2
- package/dist/{chunk-PRCHMOWT.js → chunk-7AQ5Y6F2.js} +1 -1
- package/dist/{chunk-FGGEF7MI.js → chunk-7TENODN4.js} +2 -2
- package/dist/{chunk-VR2D54AA.js → chunk-7XTWP3NB.js} +1 -1
- package/dist/{chunk-6HOM2FOJ.js → chunk-A3PREN6Q.js} +4 -14
- package/dist/{chunk-2VKMHNUU.js → chunk-KVTFUP5T.js} +3 -3
- package/dist/{compat-check-JD5D77ET.js → compat-check-V3NGDQA5.js} +1 -1
- package/dist/{config-IIMRATTP.js → config-7OPBS5RW.js} +3 -3
- package/dist/context-WAR22IGB.js +349 -0
- package/dist/index.js +22 -22
- package/dist/{metadata-ZVPG2MIA.js → metadata-OROUBOO5.js} +5 -5
- package/dist/{personal-semantic-preference-YNCV4QG3.js → personal-semantic-preference-UQXUQJO3.js} +40 -15
- package/dist/{project-semantic-E7ZAQL5S.js → project-semantic-LEU2SN6J.js} +262 -14
- package/dist/{sync-Y4OZRQAY.js → sync-JXJUSBN3.js} +2 -2
- package/dist/{te-agent-RKAUTYJZ.js → te-agent-W67K6QTR.js} +1 -1
- package/dist/{te-analysis-7N5VC4JB.js → te-analysis-TJ7XHW6J.js} +306 -49
- package/dist/{te-community-SIA2UHTS.js → te-community-YNFYG42J.js} +4 -4
- package/dist/{te-dataops-5MJQCODU.js → te-dataops-GASA7SEG.js} +721 -217
- package/dist/{te-engage-ZTLOMKO3.js → te-engage-4CGFYLP6.js} +4 -4
- package/dist/{te-kb-LDL3MF2Y.js → te-kb-2ZYZKMDW.js} +27 -7
- package/dist/{te-team-JOWHCMZA.js → te-team-ZFQANIPN.js} +4 -4
- package/dist/{things-DOQ2L3O2.js → things-AYKSVWGZ.js} +1 -1
- package/dist/{update-KUS6TCPB.js → update-EDWNZQ6B.js} +2 -2
- package/package.json +4 -3
- package/skills/ae-analysis/SKILL.md +41 -16
- package/skills/ae-analysis/references/adhoc_export.md +1 -1
- package/skills/ae-analysis/references/adhoc_run.md +8 -2
- package/skills/ae-analysis/references/analysis_drilldown_contract.md +1 -1
- package/skills/ae-analysis/references/audience_scheduling.md +30 -0
- package/skills/ae-analysis/references/business_semantics_workspace.md +57 -0
- package/skills/ae-analysis/references/command_index.md +18 -13
- package/skills/ae-analysis/references/context_prepare.md +49 -0
- package/skills/ae-analysis/references/drilldown_entities_export.md +1 -1
- package/skills/ae-analysis/references/drilldown_entities_run.md +1 -1
- package/skills/ae-analysis/references/drilldown_user_events_export.md +3 -1
- package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -1
- package/skills/ae-analysis/references/governance_recommendation_export.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +5 -1
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +4 -2
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +7 -6
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +1 -1
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +5 -1
- package/skills/ae-analysis/references/project_info_get.md +4 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +1 -1
- package/skills/ae-analysis/references/project_semantic_setup.md +60 -0
- package/skills/ae-analysis/references/report_get.md +2 -0
- package/skills/ae-analysis/references/report_presentation.md +55 -0
- package/skills/ae-analysis/references/report_update.md +4 -2
- package/skills/ae-analysis/references/system_openapi_token_batch_generate.md +20 -0
- package/skills/ae-analysis/references/system_openapi_token_get.md +14 -0
- package/skills/ae-analysis/references/user_cluster_create.md +3 -1
- package/skills/ae-analysis/references/user_cluster_models.md +2 -0
- package/skills/ae-analysis/references/user_cluster_update.md +5 -3
- package/skills/ae-analysis/references/user_tag_create.md +4 -22
- package/skills/ae-analysis/references/user_tag_models.md +8 -0
- package/skills/ae-analysis/references/user_tag_update.md +6 -14
- package/skills/ae-analysis/scripts/read-semantic-catalog.mjs +40 -0
- package/skills/ae-analysis-global/SKILL.md +2 -2
- package/skills/ae-community/SKILL.md +1 -1
- package/skills/ae-data-integration/SKILL.md +1 -1
- package/skills/ae-data-integration-helper/SKILL.md +1 -1
- package/skills/ae-dataops/SKILL.md +9 -6
- package/skills/ae-dataops/references/dataops-flow-create.md +64 -47
- package/skills/ae-dataops/references/dataops-flow-monitor.md +4 -2
- package/skills/ae-dataops/references/dataops-flow-python.md +109 -0
- package/skills/ae-generate-tracking-code/SKILL.md +1 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +2 -2
- package/skills/ae-kb/SKILL.md +10 -5
- package/skills/ae-kb/references/analysis-workflow.md +19 -10
- package/skills/ae-kb/references/query-workflow.md +34 -17
- package/skills/ae-kb-discovery/SKILL.md +4 -3
- package/skills/ae-migrate-tracking-code/SKILL.md +2 -2
- package/dist/context-BXHIPIIX.js +0 -138
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-KA5WKR5P.js";
|
|
5
5
|
import {
|
|
6
6
|
printError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7XTWP3NB.js";
|
|
8
8
|
import {
|
|
9
9
|
sourceLoggedFetch
|
|
10
10
|
} from "./chunk-NNK3JBH4.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-4CRZ2YUC.js";
|
|
12
12
|
import "./chunk-PUSFEC6B.js";
|
|
13
13
|
import {
|
|
14
14
|
SecureStoreAuthError,
|
|
@@ -57,12 +57,20 @@ var TOOL_API_MAP = {
|
|
|
57
57
|
flow_release_flow: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/flow-release" },
|
|
58
58
|
flow_create_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/tasks" },
|
|
59
59
|
flow_update_sql_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/sql-task-definition" },
|
|
60
|
+
flow_get_sql_task: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/sql-task-definition" },
|
|
60
61
|
flow_create_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-tasks" },
|
|
61
62
|
flow_update_integration_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/integration-task-definition" },
|
|
62
63
|
flow_create_workflow_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/workflow-instance-check-tasks" },
|
|
63
64
|
flow_update_workflow_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/workflow-instance-check-task-definition" },
|
|
64
65
|
flow_create_task_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-instance-check-tasks" },
|
|
65
66
|
flow_update_task_instance_check_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-instance-check-task-definition" },
|
|
67
|
+
flow_create_python_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/python-tasks" },
|
|
68
|
+
flow_update_python_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/python-task-definition" },
|
|
69
|
+
flow_get_python_task: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-task-definition" },
|
|
70
|
+
flow_list_python_versions: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-versions" },
|
|
71
|
+
flow_list_python_package_sources: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-package-sources" },
|
|
72
|
+
flow_list_python_directories: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-directories" },
|
|
73
|
+
flow_browse_python_directory: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/python-directory-tree" },
|
|
66
74
|
flow_delete_task: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-deletion" },
|
|
67
75
|
flow_add_task_relation: { method: "POST", path: "/api/cli/dataops/v1/gaia/workflow/task-relation" },
|
|
68
76
|
flow_get_flow_params: { method: "GET", path: "/api/cli/dataops/v1/gaia/workflow/flow-params" },
|
|
@@ -111,22 +119,22 @@ var TOOL_API_MAP = {
|
|
|
111
119
|
ide_get_sql_query_status: { method: "GET", path: "/api/cli/dataops/v1/gaia/ide/sql-query-status" },
|
|
112
120
|
ide_cancel_sql_query: { method: "POST", path: "/api/cli/dataops/v1/gaia/ide/sql-query-cancel" }
|
|
113
121
|
};
|
|
114
|
-
async function callDataopsApi(ctx,
|
|
115
|
-
const spec = TOOL_API_MAP[
|
|
122
|
+
async function callDataopsApi(ctx, toolName85, args = {}) {
|
|
123
|
+
const spec = TOOL_API_MAP[toolName85];
|
|
116
124
|
if (!spec) {
|
|
117
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
125
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName85}`);
|
|
118
126
|
}
|
|
119
|
-
const params = compactArgs(args,
|
|
127
|
+
const params = compactArgs(args, toolName85);
|
|
120
128
|
if (spec.method === "GET") {
|
|
121
129
|
return dataopsRequest(ctx, spec.method, spec.path, params);
|
|
122
130
|
}
|
|
123
131
|
return dataopsRequest(ctx, spec.method, spec.path, {}, params);
|
|
124
132
|
}
|
|
125
|
-
async function callDataopsFieldMutationApi(ctx,
|
|
126
|
-
return callDataopsMutationApi(ctx,
|
|
133
|
+
async function callDataopsFieldMutationApi(ctx, toolName85, args) {
|
|
134
|
+
return callDataopsMutationApi(ctx, toolName85, args, "DataOps table field mutation failed.");
|
|
127
135
|
}
|
|
128
|
-
async function callDataopsMutationApi(ctx,
|
|
129
|
-
const response = await callDataopsApi(ctx,
|
|
136
|
+
async function callDataopsMutationApi(ctx, toolName85, args, defaultMessage = "DataOps entity mutation failed.") {
|
|
137
|
+
const response = await callDataopsApi(ctx, toolName85, args);
|
|
130
138
|
const envelope = asRecord(response);
|
|
131
139
|
const result = asRecord(envelope?.result);
|
|
132
140
|
const outcome = result?.outcome;
|
|
@@ -151,12 +159,12 @@ async function callDataopsMutationApi(ctx, toolName77, args, defaultMessage = "D
|
|
|
151
159
|
meta
|
|
152
160
|
});
|
|
153
161
|
}
|
|
154
|
-
function buildDataopsApiDryRun(ctx,
|
|
155
|
-
const spec = TOOL_API_MAP[
|
|
162
|
+
function buildDataopsApiDryRun(ctx, toolName85, args = {}) {
|
|
163
|
+
const spec = TOOL_API_MAP[toolName85];
|
|
156
164
|
if (!spec) {
|
|
157
|
-
throw new Error(`DataOps API mapping not found for tool: ${
|
|
165
|
+
throw new Error(`DataOps API mapping not found for tool: ${toolName85}`);
|
|
158
166
|
}
|
|
159
|
-
const params = compactArgs(args,
|
|
167
|
+
const params = compactArgs(args, toolName85);
|
|
160
168
|
if (spec.method === "GET") {
|
|
161
169
|
return {
|
|
162
170
|
method: spec.method,
|
|
@@ -261,10 +269,11 @@ function buildUrl(host, path, params = {}) {
|
|
|
261
269
|
}
|
|
262
270
|
return url.toString();
|
|
263
271
|
}
|
|
264
|
-
function compactArgs(args,
|
|
272
|
+
function compactArgs(args, toolName85) {
|
|
265
273
|
const result = {};
|
|
266
274
|
for (const [key, value] of Object.entries(args)) {
|
|
267
|
-
|
|
275
|
+
const allowEmptyClear = toolName85 === "flow_update_flow_param" && key === "remark" || toolName85 === "flow_update_sql_task" && (key === "preSql" || key === "postSql") || toolName85 === "flow_update_python_task" && (key === "requirementsTxt" || key === "remark");
|
|
276
|
+
if (value === void 0 || value !== value || value === null || value === "" && !allowEmptyClear) {
|
|
268
277
|
continue;
|
|
269
278
|
}
|
|
270
279
|
result[key] = value;
|
|
@@ -274,9 +283,17 @@ function compactArgs(args, toolName77) {
|
|
|
274
283
|
function asRecord(value) {
|
|
275
284
|
return typeof value === "object" && value !== null ? value : void 0;
|
|
276
285
|
}
|
|
286
|
+
var DATAOPS_NO_AUTH_CODE = -10;
|
|
277
287
|
function unwrapDataResponse(data) {
|
|
278
288
|
const returnCode = data?.returnCode ?? data?.return_code;
|
|
279
289
|
const returnMessage = data?.returnMessage ?? data?.return_message;
|
|
290
|
+
if (returnCode === DATAOPS_NO_AUTH_CODE || returnCode === String(DATAOPS_NO_AUTH_CODE)) {
|
|
291
|
+
throw new PermissionError(
|
|
292
|
+
`AE API error: ${returnMessage || "Permission denied"} (code: ${returnCode})`,
|
|
293
|
+
String(returnCode),
|
|
294
|
+
"Check your space membership and required DataOps permissions with a space administrator; re-login will not resolve this error."
|
|
295
|
+
);
|
|
296
|
+
}
|
|
280
297
|
if (returnCode !== void 0 && returnCode !== 0) {
|
|
281
298
|
throw new Error(`AE API error: ${returnMessage || "unknown"} (code: ${returnCode})`);
|
|
282
299
|
}
|
|
@@ -1108,6 +1125,87 @@ function optionalString2(ctx, name) {
|
|
|
1108
1125
|
return value === "" ? void 0 : value;
|
|
1109
1126
|
}
|
|
1110
1127
|
|
|
1128
|
+
// src/commands/te-dataops/flow/task-output-param-options.ts
|
|
1129
|
+
var MAX_OUTPUT_PARAM_REMARK_LENGTH = 200;
|
|
1130
|
+
var PARAM_KEY_PATTERN = /^[a-z][a-z0-9_]{0,39}$/;
|
|
1131
|
+
function createOutputParamsFlag(desc) {
|
|
1132
|
+
return { name: "outputParams", type: "json", required: false, desc };
|
|
1133
|
+
}
|
|
1134
|
+
function requireSpaceCode(ctx) {
|
|
1135
|
+
const spaceCode = ctx.str("spaceCode");
|
|
1136
|
+
if (!spaceCode.trim()) {
|
|
1137
|
+
throw new CliValidationError("--spaceCode must be a non-empty string");
|
|
1138
|
+
}
|
|
1139
|
+
return spaceCode;
|
|
1140
|
+
}
|
|
1141
|
+
function requirePositiveSafeInt(ctx, name) {
|
|
1142
|
+
const raw = ctx.str(name).trim();
|
|
1143
|
+
const num = Number(raw);
|
|
1144
|
+
if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(num)) {
|
|
1145
|
+
throw new CliValidationError(`--${name} must be a positive safe integer`, {
|
|
1146
|
+
location: { field: name }
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
return num;
|
|
1150
|
+
}
|
|
1151
|
+
function explicitString(ctx, name) {
|
|
1152
|
+
const items = ctx.list ? ctx.list(name) : void 0;
|
|
1153
|
+
if (items && items.length > 0) {
|
|
1154
|
+
return items[0];
|
|
1155
|
+
}
|
|
1156
|
+
if (ctx.has?.(name)) {
|
|
1157
|
+
return ctx.str(name);
|
|
1158
|
+
}
|
|
1159
|
+
const value = ctx.str(name);
|
|
1160
|
+
return value === "" ? void 0 : value;
|
|
1161
|
+
}
|
|
1162
|
+
function resolveTaskOutputParams(ctx) {
|
|
1163
|
+
const raw = ctx.json("outputParams");
|
|
1164
|
+
if (raw === void 0) {
|
|
1165
|
+
return void 0;
|
|
1166
|
+
}
|
|
1167
|
+
if (!Array.isArray(raw)) {
|
|
1168
|
+
throw new CliValidationError("--outputParams must be a JSON array");
|
|
1169
|
+
}
|
|
1170
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1171
|
+
return raw.map((entry, idx) => {
|
|
1172
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
|
|
1173
|
+
throw new CliValidationError(`--outputParams[${idx}] must be an object with paramKey and optional remark`);
|
|
1174
|
+
}
|
|
1175
|
+
const record = entry;
|
|
1176
|
+
for (const key of Object.keys(record)) {
|
|
1177
|
+
if (key !== "paramKey" && key !== "remark") {
|
|
1178
|
+
throw new CliValidationError(
|
|
1179
|
+
`--outputParams[${idx}] has unsupported field "${key}"; only paramKey and remark are allowed`
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
const paramKey = record.paramKey;
|
|
1184
|
+
if (typeof paramKey !== "string" || !PARAM_KEY_PATTERN.test(paramKey) || paramKey.startsWith("ws_") || paramKey === "env") {
|
|
1185
|
+
throw new CliValidationError(
|
|
1186
|
+
`--outputParams[${idx}].paramKey must be 1-40 lowercase letters, digits, or underscores, start with a letter, and must not be env or start with ws_`
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
if (seen.has(paramKey)) {
|
|
1190
|
+
throw new CliValidationError(`--outputParams contains duplicate paramKey "${paramKey}"`);
|
|
1191
|
+
}
|
|
1192
|
+
seen.add(paramKey);
|
|
1193
|
+
const remark = record.remark;
|
|
1194
|
+
if (remark !== void 0 && remark !== null) {
|
|
1195
|
+
if (typeof remark !== "string") {
|
|
1196
|
+
throw new CliValidationError(`--outputParams[${idx}].remark must be a string`);
|
|
1197
|
+
}
|
|
1198
|
+
if (remark.length > MAX_OUTPUT_PARAM_REMARK_LENGTH) {
|
|
1199
|
+
throw new CliValidationError(
|
|
1200
|
+
`--outputParams[${idx}].remark must not exceed ${MAX_OUTPUT_PARAM_REMARK_LENGTH} characters`
|
|
1201
|
+
);
|
|
1202
|
+
}
|
|
1203
|
+
return { paramKey, remark };
|
|
1204
|
+
}
|
|
1205
|
+
return { paramKey };
|
|
1206
|
+
});
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1111
1209
|
// src/commands/te-dataops/flow/create-sql-task.ts
|
|
1112
1210
|
var toolName25 = "flow_create_sql_task";
|
|
1113
1211
|
function buildArgs25(ctx) {
|
|
@@ -1118,6 +1216,7 @@ function buildArgs25(ctx) {
|
|
|
1118
1216
|
sql: ctx.str("sql"),
|
|
1119
1217
|
preSql: ctx.str("preSql"),
|
|
1120
1218
|
postSql: ctx.str("postSql"),
|
|
1219
|
+
outputParams: resolveTaskOutputParams(ctx),
|
|
1121
1220
|
remark: ctx.str("remark"),
|
|
1122
1221
|
...buildTaskWriteArgs(ctx)
|
|
1123
1222
|
};
|
|
@@ -1125,7 +1224,7 @@ function buildArgs25(ctx) {
|
|
|
1125
1224
|
var createSqlTask = {
|
|
1126
1225
|
service: "dataops_flow",
|
|
1127
1226
|
command: "+create_sql_task",
|
|
1128
|
-
description: "Create a DEV Trino SQL task and save its SQL. Requires spaceCode, flowCode, taskName, and sql; SQL hooks, dependencies, retry policy, and remark are optional. Returns action/result/status; result includes flowCode, taskCode, taskName, taskType=TRINO_SQL, and sqlSaved=true",
|
|
1227
|
+
description: "Create a DEV Trino SQL task and save its SQL. Requires spaceCode, flowCode, taskName, and sql; SQL hooks, OUT parameter declarations (outputParams, requires SELECT query SQL), dependencies, retry policy, and remark are optional. Returns action/result/status; result includes flowCode, taskCode, taskName, taskType=TRINO_SQL, and sqlSaved=true",
|
|
1129
1228
|
flags: [
|
|
1130
1229
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1131
1230
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
@@ -1133,11 +1232,15 @@ var createSqlTask = {
|
|
|
1133
1232
|
{ name: "sql", type: "string", required: true, desc: "Trino SQL content for the task" },
|
|
1134
1233
|
{ name: "preSql", type: "string", required: false, desc: "Optional SQL to run before the main SQL" },
|
|
1135
1234
|
{ name: "postSql", type: "string", required: false, desc: "Optional SQL to run after the main SQL" },
|
|
1235
|
+
createOutputParamsFlag('Optional JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}] (VARCHAR only; requires a query SQL such as SELECT)'),
|
|
1136
1236
|
{ name: "remark", type: "string", required: false, desc: "Description" },
|
|
1137
1237
|
...createTaskWriteFlags
|
|
1138
1238
|
],
|
|
1139
1239
|
risk: "write",
|
|
1140
|
-
validate:
|
|
1240
|
+
validate: (ctx) => {
|
|
1241
|
+
validateTaskWriteArgs(ctx);
|
|
1242
|
+
resolveTaskOutputParams(ctx);
|
|
1243
|
+
},
|
|
1141
1244
|
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName25, buildArgs25(ctx)),
|
|
1142
1245
|
execute: async (ctx) => {
|
|
1143
1246
|
return callDataopsApi(ctx, toolName25, buildArgs25(ctx));
|
|
@@ -1147,46 +1250,97 @@ var createSqlTask = {
|
|
|
1147
1250
|
// src/commands/te-dataops/flow/update-sql-task.ts
|
|
1148
1251
|
var toolName26 = "flow_update_sql_task";
|
|
1149
1252
|
function buildArgs26(ctx) {
|
|
1253
|
+
const sql = explicitString(ctx, "sql");
|
|
1254
|
+
if (sql !== void 0 && !sql.trim()) {
|
|
1255
|
+
throw new CliValidationError("--sql must not be empty");
|
|
1256
|
+
}
|
|
1257
|
+
const preSql = explicitString(ctx, "preSql");
|
|
1258
|
+
const postSql = explicitString(ctx, "postSql");
|
|
1259
|
+
const outputParams = resolveTaskOutputParams(ctx);
|
|
1260
|
+
const taskWriteArgs = buildTaskWriteArgs(ctx);
|
|
1261
|
+
const mutableValues = [
|
|
1262
|
+
sql,
|
|
1263
|
+
preSql,
|
|
1264
|
+
postSql,
|
|
1265
|
+
outputParams,
|
|
1266
|
+
...Object.values(taskWriteArgs)
|
|
1267
|
+
];
|
|
1268
|
+
if (mutableValues.every((value) => value === void 0)) {
|
|
1269
|
+
throw new CliValidationError(
|
|
1270
|
+
"Pass at least one update field (--sql, --preSql, --postSql, --outputParams, --preTasks, or retry flags)"
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1150
1273
|
return {
|
|
1151
1274
|
spaceCode: ctx.str("spaceCode"),
|
|
1152
1275
|
flowCode: ctx.num("flowCode"),
|
|
1153
1276
|
taskCode: ctx.num("taskCode"),
|
|
1154
|
-
sql
|
|
1155
|
-
preSql
|
|
1156
|
-
postSql
|
|
1157
|
-
|
|
1277
|
+
sql,
|
|
1278
|
+
preSql,
|
|
1279
|
+
postSql,
|
|
1280
|
+
outputParams,
|
|
1281
|
+
...taskWriteArgs
|
|
1158
1282
|
};
|
|
1159
1283
|
}
|
|
1160
1284
|
var updateSqlTask = {
|
|
1161
1285
|
service: "dataops_flow",
|
|
1162
1286
|
command: "+update_sql_task",
|
|
1163
|
-
description:
|
|
1287
|
+
description: 'Partially update an existing DEV Trino SQL task. Requires spaceCode, flowCode, taskCode, and at least one mutable field; omitted sql, preSql, postSql, outputParams, dependencies, and retry fields keep existing values. Pass --preSql "" or --postSql "" to clear hooks; outputParams and preTasks use three-state semantics (omit to keep, [] clears, non-empty replaces). Returns action/result/status; result includes sqlSaved, flowCode, taskCode, taskType=TRINO_SQL, and task',
|
|
1164
1288
|
flags: [
|
|
1165
1289
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1166
1290
|
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
1167
1291
|
{ name: "taskCode", type: "number", required: true, desc: "Trino SQL task code" },
|
|
1168
|
-
{ name: "sql", type: "string", required:
|
|
1169
|
-
{ name: "preSql", type: "string", required: false, desc:
|
|
1170
|
-
{ name: "postSql", type: "string", required: false, desc:
|
|
1292
|
+
{ name: "sql", type: "string", required: false, desc: "Optional main Trino SQL content. Omit to keep existing SQL" },
|
|
1293
|
+
{ name: "preSql", type: "string", required: false, desc: 'Optional SQL to run before the main SQL. Omit to keep existing preSql; pass "" to clear' },
|
|
1294
|
+
{ name: "postSql", type: "string", required: false, desc: 'Optional SQL to run after the main SQL. Omit to keep existing postSql; pass "" to clear' },
|
|
1295
|
+
createOutputParamsFlag('Optional JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}]. Omit to keep existing; pass [] to clear; non-empty replaces (requires SELECT query SQL)'),
|
|
1171
1296
|
...updateTaskWriteFlags
|
|
1172
1297
|
],
|
|
1173
1298
|
risk: "write",
|
|
1174
|
-
validate:
|
|
1299
|
+
validate: (ctx) => {
|
|
1300
|
+
validateTaskWriteArgs(ctx);
|
|
1301
|
+
buildArgs26(ctx);
|
|
1302
|
+
},
|
|
1175
1303
|
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName26, buildArgs26(ctx)),
|
|
1176
1304
|
execute: async (ctx) => {
|
|
1177
1305
|
return callDataopsApi(ctx, toolName26, buildArgs26(ctx));
|
|
1178
1306
|
}
|
|
1179
1307
|
};
|
|
1180
1308
|
|
|
1309
|
+
// src/commands/te-dataops/flow/get-sql-task.ts
|
|
1310
|
+
var toolName27 = "flow_get_sql_task";
|
|
1311
|
+
function buildArgs27(ctx) {
|
|
1312
|
+
return {
|
|
1313
|
+
spaceCode: requireSpaceCode(ctx),
|
|
1314
|
+
flowCode: requirePositiveSafeInt(ctx, "flowCode"),
|
|
1315
|
+
taskCode: requirePositiveSafeInt(ctx, "taskCode")
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
var getSqlTask = {
|
|
1319
|
+
service: "dataops_flow",
|
|
1320
|
+
command: "+get_sql_task",
|
|
1321
|
+
description: "Get the DEV definition of one Trino SQL task node (taskType=TRINO_SQL). Requires spaceCode, flowCode, and taskCode. Returns sqlTask (sql, preSql, postSql), preTasks, retry policy, outputParams, taskParams, and paramSources. For historical PROD execution snapshots, use dataops_operations +get_task_instance_detail.",
|
|
1322
|
+
flags: [
|
|
1323
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1324
|
+
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
1325
|
+
{ name: "taskCode", type: "number", required: true, desc: "Trino SQL task node code" }
|
|
1326
|
+
],
|
|
1327
|
+
risk: "read",
|
|
1328
|
+
validate: (ctx) => {
|
|
1329
|
+
buildArgs27(ctx);
|
|
1330
|
+
},
|
|
1331
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName27, buildArgs27(ctx)),
|
|
1332
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName27, buildArgs27(ctx))
|
|
1333
|
+
};
|
|
1334
|
+
|
|
1181
1335
|
// src/commands/te-dataops/flow/create-integration-task.ts
|
|
1182
|
-
var
|
|
1336
|
+
var toolName28 = "flow_create_integration_task";
|
|
1183
1337
|
function validateInteger(ctx, name) {
|
|
1184
1338
|
const value = ctx.str(name).trim();
|
|
1185
1339
|
if (!/^\d+$/.test(value)) {
|
|
1186
1340
|
throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
|
|
1187
1341
|
}
|
|
1188
1342
|
}
|
|
1189
|
-
function
|
|
1343
|
+
function buildArgs28(ctx) {
|
|
1190
1344
|
return {
|
|
1191
1345
|
spaceCode: ctx.str("spaceCode"),
|
|
1192
1346
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1213,19 +1367,19 @@ var createIntegrationTask = {
|
|
|
1213
1367
|
validateInteger(ctx, "flowCode");
|
|
1214
1368
|
validateTaskWriteArgs(ctx);
|
|
1215
1369
|
},
|
|
1216
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1217
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1370
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName28, buildArgs28(ctx)),
|
|
1371
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName28, buildArgs28(ctx))
|
|
1218
1372
|
};
|
|
1219
1373
|
|
|
1220
1374
|
// src/commands/te-dataops/flow/update-integration-task.ts
|
|
1221
|
-
var
|
|
1375
|
+
var toolName29 = "flow_update_integration_task";
|
|
1222
1376
|
function validateInteger2(ctx, name) {
|
|
1223
1377
|
const value = ctx.str(name).trim();
|
|
1224
1378
|
if (!/^\d+$/.test(value)) {
|
|
1225
1379
|
throw new Error(`Invalid --${name}: expected an integer, got "${value}"`);
|
|
1226
1380
|
}
|
|
1227
1381
|
}
|
|
1228
|
-
function
|
|
1382
|
+
function buildArgs29(ctx) {
|
|
1229
1383
|
return {
|
|
1230
1384
|
spaceCode: ctx.str("spaceCode"),
|
|
1231
1385
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1251,8 +1405,8 @@ var updateIntegrationTask = {
|
|
|
1251
1405
|
validateInteger2(ctx, "taskCode");
|
|
1252
1406
|
validateTaskWriteArgs(ctx);
|
|
1253
1407
|
},
|
|
1254
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1255
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1408
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName29, buildArgs29(ctx)),
|
|
1409
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName29, buildArgs29(ctx))
|
|
1256
1410
|
};
|
|
1257
1411
|
|
|
1258
1412
|
// src/commands/te-dataops/flow/workflow-instance-check-task-options.ts
|
|
@@ -1317,8 +1471,8 @@ function optionalString3(ctx, name) {
|
|
|
1317
1471
|
}
|
|
1318
1472
|
|
|
1319
1473
|
// src/commands/te-dataops/flow/create-workflow-instance-check-task.ts
|
|
1320
|
-
var
|
|
1321
|
-
function
|
|
1474
|
+
var toolName30 = "flow_create_workflow_instance_check_task";
|
|
1475
|
+
function buildArgs30(ctx) {
|
|
1322
1476
|
return {
|
|
1323
1477
|
spaceCode: ctx.str("spaceCode"),
|
|
1324
1478
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1348,13 +1502,13 @@ var createWorkflowInstanceCheckTask = {
|
|
|
1348
1502
|
validateCheckArgs(ctx);
|
|
1349
1503
|
validateTaskWriteArgs(ctx);
|
|
1350
1504
|
},
|
|
1351
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1352
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1505
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName30, buildArgs30(ctx)),
|
|
1506
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName30, buildArgs30(ctx))
|
|
1353
1507
|
};
|
|
1354
1508
|
|
|
1355
1509
|
// src/commands/te-dataops/flow/update-workflow-instance-check-task.ts
|
|
1356
|
-
var
|
|
1357
|
-
function
|
|
1510
|
+
var toolName31 = "flow_update_workflow_instance_check_task";
|
|
1511
|
+
function buildArgs31(ctx) {
|
|
1358
1512
|
return {
|
|
1359
1513
|
spaceCode: ctx.str("spaceCode"),
|
|
1360
1514
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1382,13 +1536,13 @@ var updateWorkflowInstanceCheckTask = {
|
|
|
1382
1536
|
validateCheckArgs(ctx);
|
|
1383
1537
|
validateTaskWriteArgs(ctx);
|
|
1384
1538
|
},
|
|
1385
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1386
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1539
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName31, buildArgs31(ctx)),
|
|
1540
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName31, buildArgs31(ctx))
|
|
1387
1541
|
};
|
|
1388
1542
|
|
|
1389
1543
|
// src/commands/te-dataops/flow/create-task-instance-check-task.ts
|
|
1390
|
-
var
|
|
1391
|
-
function
|
|
1544
|
+
var toolName32 = "flow_create_task_instance_check_task";
|
|
1545
|
+
function buildArgs32(ctx) {
|
|
1392
1546
|
return {
|
|
1393
1547
|
spaceCode: ctx.str("spaceCode"),
|
|
1394
1548
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1418,13 +1572,13 @@ var createTaskInstanceCheckTask = {
|
|
|
1418
1572
|
validateCheckArgs(ctx, true);
|
|
1419
1573
|
validateTaskWriteArgs(ctx);
|
|
1420
1574
|
},
|
|
1421
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1422
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1575
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName32, buildArgs32(ctx)),
|
|
1576
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName32, buildArgs32(ctx))
|
|
1423
1577
|
};
|
|
1424
1578
|
|
|
1425
1579
|
// src/commands/te-dataops/flow/update-task-instance-check-task.ts
|
|
1426
|
-
var
|
|
1427
|
-
function
|
|
1580
|
+
var toolName33 = "flow_update_task_instance_check_task";
|
|
1581
|
+
function buildArgs33(ctx) {
|
|
1428
1582
|
return {
|
|
1429
1583
|
spaceCode: ctx.str("spaceCode"),
|
|
1430
1584
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1452,12 +1606,354 @@ var updateTaskInstanceCheckTask = {
|
|
|
1452
1606
|
validateCheckArgs(ctx, true);
|
|
1453
1607
|
validateTaskWriteArgs(ctx);
|
|
1454
1608
|
},
|
|
1455
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1456
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1609
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName33, buildArgs33(ctx)),
|
|
1610
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName33, buildArgs33(ctx))
|
|
1611
|
+
};
|
|
1612
|
+
|
|
1613
|
+
// src/commands/te-dataops/flow/python-task-options.ts
|
|
1614
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
1615
|
+
import { resolve as resolve2 } from "path";
|
|
1616
|
+
var MAX_PYTHON_CONTENT_BYTES = 512 * 1024;
|
|
1617
|
+
var pythonScriptInputFlags = [
|
|
1618
|
+
{ name: "scriptFile", type: "string", required: false, desc: "Path to a single local UTF-8 .py file used as main.py (recommended; mutually exclusive with --script)" },
|
|
1619
|
+
{ name: "script", type: "string", required: false, desc: "Inline Python script content for main.py (mutually exclusive with --scriptFile)" },
|
|
1620
|
+
{ name: "requirementsFile", type: "string", required: false, desc: "Path to a local UTF-8 requirements.txt file (recommended; mutually exclusive with --requirements)" },
|
|
1621
|
+
{ name: "requirements", type: "string", required: false, desc: 'Inline pip requirements.txt text (mutually exclusive with --requirementsFile; pass "" on update to clear)' },
|
|
1622
|
+
{ name: "pythonVersion", type: "string", required: false, desc: "Python version from +list_python_versions. Omit on create to use the platform default (3.11); omit on update to keep existing" },
|
|
1623
|
+
{ name: "packageSourceId", type: "string", required: false, desc: "Enabled pip package source key from +list_python_package_sources. Omit on create to use the cluster default source; omit on update to keep existing" },
|
|
1624
|
+
createOutputParamsFlag('JSON array of OUT parameter declarations [{"paramKey":"out_dt","remark":"optional"}]. Omit on update to keep existing; pass [] to clear')
|
|
1625
|
+
];
|
|
1626
|
+
function readRegularUtf8File(rawPath, flagName) {
|
|
1627
|
+
if (!rawPath.trim()) {
|
|
1628
|
+
throw new CliValidationError(`--${flagName} must point to a regular file`);
|
|
1629
|
+
}
|
|
1630
|
+
const resolved = resolve2(rawPath);
|
|
1631
|
+
if (!existsSync(resolved)) {
|
|
1632
|
+
throw new CliValidationError(`--${flagName} file not found: ${rawPath}`);
|
|
1633
|
+
}
|
|
1634
|
+
let stat;
|
|
1635
|
+
try {
|
|
1636
|
+
stat = statSync(resolved);
|
|
1637
|
+
} catch (err) {
|
|
1638
|
+
throw new CliValidationError(
|
|
1639
|
+
`Unable to inspect --${flagName} "${rawPath}": ${err instanceof Error ? err.message : String(err)}`
|
|
1640
|
+
);
|
|
1641
|
+
}
|
|
1642
|
+
if (!stat.isFile()) {
|
|
1643
|
+
throw new CliValidationError(`--${flagName} must point to a single regular file, not a directory: ${rawPath}`);
|
|
1644
|
+
}
|
|
1645
|
+
if (stat.size > MAX_PYTHON_CONTENT_BYTES) {
|
|
1646
|
+
throw new CliValidationError(
|
|
1647
|
+
`--${flagName} exceeds the ${MAX_PYTHON_CONTENT_BYTES}-byte limit (got ${stat.size} bytes)`
|
|
1648
|
+
);
|
|
1649
|
+
}
|
|
1650
|
+
return readFileSync(resolved, "utf8");
|
|
1651
|
+
}
|
|
1652
|
+
function resolveScriptContent(ctx, required) {
|
|
1653
|
+
const inlineScript = explicitString(ctx, "script");
|
|
1654
|
+
const scriptFile = explicitString(ctx, "scriptFile");
|
|
1655
|
+
if (inlineScript !== void 0 && scriptFile !== void 0) {
|
|
1656
|
+
throw new CliValidationError("Pass either --scriptFile or --script, not both");
|
|
1657
|
+
}
|
|
1658
|
+
if (scriptFile !== void 0) {
|
|
1659
|
+
const content = readRegularUtf8File(scriptFile, "scriptFile");
|
|
1660
|
+
if (!content.trim()) {
|
|
1661
|
+
throw new CliValidationError("Python script content in --scriptFile must not be empty");
|
|
1662
|
+
}
|
|
1663
|
+
return content;
|
|
1664
|
+
}
|
|
1665
|
+
if (inlineScript !== void 0) {
|
|
1666
|
+
if (!inlineScript.trim()) {
|
|
1667
|
+
throw new CliValidationError("--script must not be empty");
|
|
1668
|
+
}
|
|
1669
|
+
return inlineScript;
|
|
1670
|
+
}
|
|
1671
|
+
if (required) {
|
|
1672
|
+
throw new CliValidationError("Pass --scriptFile or --script");
|
|
1673
|
+
}
|
|
1674
|
+
return void 0;
|
|
1675
|
+
}
|
|
1676
|
+
function resolveRequirementsContent(ctx) {
|
|
1677
|
+
const inlineReq = explicitString(ctx, "requirements");
|
|
1678
|
+
const reqFile = explicitString(ctx, "requirementsFile");
|
|
1679
|
+
if (inlineReq !== void 0 && reqFile !== void 0) {
|
|
1680
|
+
throw new CliValidationError("Pass either --requirementsFile or --requirements, not both");
|
|
1681
|
+
}
|
|
1682
|
+
if (reqFile !== void 0) {
|
|
1683
|
+
return readRegularUtf8File(reqFile, "requirementsFile");
|
|
1684
|
+
}
|
|
1685
|
+
return inlineReq;
|
|
1686
|
+
}
|
|
1687
|
+
function resolveOptionalNonBlank(ctx, name) {
|
|
1688
|
+
const val = explicitString(ctx, name);
|
|
1689
|
+
if (val !== void 0 && !val.trim()) {
|
|
1690
|
+
throw new CliValidationError(`--${name} must not be empty`);
|
|
1691
|
+
}
|
|
1692
|
+
return val;
|
|
1693
|
+
}
|
|
1694
|
+
function resolveRemark(ctx, allowEmptyClear) {
|
|
1695
|
+
const val = explicitString(ctx, "remark");
|
|
1696
|
+
if (val === void 0) {
|
|
1697
|
+
return void 0;
|
|
1698
|
+
}
|
|
1699
|
+
if (val.length > MAX_OUTPUT_PARAM_REMARK_LENGTH) {
|
|
1700
|
+
throw new CliValidationError(`--remark must not exceed ${MAX_OUTPUT_PARAM_REMARK_LENGTH} characters`);
|
|
1701
|
+
}
|
|
1702
|
+
if (!allowEmptyClear && val === "") {
|
|
1703
|
+
return void 0;
|
|
1704
|
+
}
|
|
1705
|
+
return val;
|
|
1706
|
+
}
|
|
1707
|
+
function validateCombinedSize(scriptContent, requirementsTxt) {
|
|
1708
|
+
const totalBytes = Buffer.byteLength(scriptContent ?? "", "utf8") + Buffer.byteLength(requirementsTxt ?? "", "utf8");
|
|
1709
|
+
if (totalBytes > MAX_PYTHON_CONTENT_BYTES) {
|
|
1710
|
+
throw new CliValidationError(
|
|
1711
|
+
`Combined scriptContent and requirementsTxt size (${totalBytes} UTF-8 bytes) exceeds the ${MAX_PYTHON_CONTENT_BYTES}-byte limit`
|
|
1712
|
+
);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
function buildCreatePythonTaskArgs(ctx) {
|
|
1716
|
+
const spaceCode = requireSpaceCode(ctx);
|
|
1717
|
+
const flowCode = requirePositiveSafeInt(ctx, "flowCode");
|
|
1718
|
+
const taskName = ctx.str("taskName");
|
|
1719
|
+
if (!taskName.trim()) {
|
|
1720
|
+
throw new CliValidationError("--taskName must be a non-empty string");
|
|
1721
|
+
}
|
|
1722
|
+
validateTaskWriteArgs(ctx);
|
|
1723
|
+
const scriptContent = resolveScriptContent(ctx, true);
|
|
1724
|
+
const requirementsTxt = resolveRequirementsContent(ctx);
|
|
1725
|
+
validateCombinedSize(scriptContent, requirementsTxt);
|
|
1726
|
+
const pythonVersion = resolveOptionalNonBlank(ctx, "pythonVersion");
|
|
1727
|
+
const packageSourceId = resolveOptionalNonBlank(ctx, "packageSourceId");
|
|
1728
|
+
const outputParams = resolveTaskOutputParams(ctx);
|
|
1729
|
+
const remark = resolveRemark(ctx, false);
|
|
1730
|
+
return {
|
|
1731
|
+
spaceCode,
|
|
1732
|
+
flowCode,
|
|
1733
|
+
taskName,
|
|
1734
|
+
scriptContent,
|
|
1735
|
+
requirementsTxt,
|
|
1736
|
+
pythonVersion,
|
|
1737
|
+
packageSourceId,
|
|
1738
|
+
outputParams,
|
|
1739
|
+
remark,
|
|
1740
|
+
...buildTaskWriteArgs(ctx)
|
|
1741
|
+
};
|
|
1742
|
+
}
|
|
1743
|
+
function buildUpdatePythonTaskArgs(ctx) {
|
|
1744
|
+
const spaceCode = requireSpaceCode(ctx);
|
|
1745
|
+
const flowCode = requirePositiveSafeInt(ctx, "flowCode");
|
|
1746
|
+
const taskCode = requirePositiveSafeInt(ctx, "taskCode");
|
|
1747
|
+
validateTaskWriteArgs(ctx);
|
|
1748
|
+
const scriptContent = resolveScriptContent(ctx, false);
|
|
1749
|
+
const requirementsTxt = resolveRequirementsContent(ctx);
|
|
1750
|
+
validateCombinedSize(scriptContent, requirementsTxt);
|
|
1751
|
+
const pythonVersion = resolveOptionalNonBlank(ctx, "pythonVersion");
|
|
1752
|
+
const packageSourceId = resolveOptionalNonBlank(ctx, "packageSourceId");
|
|
1753
|
+
const outputParams = resolveTaskOutputParams(ctx);
|
|
1754
|
+
const remark = resolveRemark(ctx, true);
|
|
1755
|
+
const taskWriteArgs = buildTaskWriteArgs(ctx);
|
|
1756
|
+
const mutableValues = [
|
|
1757
|
+
scriptContent,
|
|
1758
|
+
requirementsTxt,
|
|
1759
|
+
pythonVersion,
|
|
1760
|
+
packageSourceId,
|
|
1761
|
+
outputParams,
|
|
1762
|
+
remark,
|
|
1763
|
+
...Object.values(taskWriteArgs)
|
|
1764
|
+
];
|
|
1765
|
+
if (mutableValues.every((value) => value === void 0)) {
|
|
1766
|
+
throw new CliValidationError(
|
|
1767
|
+
"Pass at least one update field (--scriptFile, --script, --requirementsFile, --requirements, --pythonVersion, --packageSourceId, --outputParams, --remark, --preTasks, or retry flags)"
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1770
|
+
return {
|
|
1771
|
+
spaceCode,
|
|
1772
|
+
flowCode,
|
|
1773
|
+
taskCode,
|
|
1774
|
+
scriptContent,
|
|
1775
|
+
requirementsTxt,
|
|
1776
|
+
pythonVersion,
|
|
1777
|
+
packageSourceId,
|
|
1778
|
+
outputParams,
|
|
1779
|
+
remark,
|
|
1780
|
+
...taskWriteArgs
|
|
1781
|
+
};
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
// src/commands/te-dataops/flow/create-python-task.ts
|
|
1785
|
+
var toolName34 = "flow_create_python_task";
|
|
1786
|
+
var createPythonTask = {
|
|
1787
|
+
service: "dataops_flow",
|
|
1788
|
+
command: "+create_python_task",
|
|
1789
|
+
description: "Create a DEV single-file Python task node (taskType=PYTHON) and save its definition. Requires spaceCode, flowCode, taskName, and either --scriptFile or --script. Combined script and requirements must not exceed 524288 UTF-8 bytes. Returns action/result/status; result includes pythonTaskSaved=true, flowCode, taskCode, taskName, taskType=PYTHON, pythonVersion, and packageSourceId.",
|
|
1790
|
+
flags: [
|
|
1791
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1792
|
+
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
1793
|
+
{ name: "taskName", type: "string", required: true, desc: "Task name" },
|
|
1794
|
+
...pythonScriptInputFlags,
|
|
1795
|
+
{ name: "remark", type: "string", required: false, desc: "Optional task remark, up to 200 characters" },
|
|
1796
|
+
...createTaskWriteFlags
|
|
1797
|
+
],
|
|
1798
|
+
risk: "write",
|
|
1799
|
+
validate: (ctx) => {
|
|
1800
|
+
buildCreatePythonTaskArgs(ctx);
|
|
1801
|
+
},
|
|
1802
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName34, buildCreatePythonTaskArgs(ctx)),
|
|
1803
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName34, buildCreatePythonTaskArgs(ctx))
|
|
1804
|
+
};
|
|
1805
|
+
|
|
1806
|
+
// src/commands/te-dataops/flow/update-python-task.ts
|
|
1807
|
+
var toolName35 = "flow_update_python_task";
|
|
1808
|
+
var updatePythonTask = {
|
|
1809
|
+
service: "dataops_flow",
|
|
1810
|
+
command: "+update_python_task",
|
|
1811
|
+
description: 'Partially update an existing DEV Python task node (taskType=PYTHON). Requires spaceCode, flowCode, taskCode, and at least one update field. Omitted fields keep existing values; --requirements "" (or an empty --requirementsFile) clears dependencies; --remark "" clears remark; --outputParams and --preTasks use three-state semantics (omit keeps, [] clears, non-empty replaces).',
|
|
1812
|
+
flags: [
|
|
1813
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1814
|
+
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
1815
|
+
{ name: "taskCode", type: "number", required: true, desc: "Python task node code to update" },
|
|
1816
|
+
...pythonScriptInputFlags,
|
|
1817
|
+
{ name: "remark", type: "string", required: false, desc: 'Optional task remark, up to 200 characters; omit to keep existing, or pass "" to clear' },
|
|
1818
|
+
...updateTaskWriteFlags
|
|
1819
|
+
],
|
|
1820
|
+
risk: "write",
|
|
1821
|
+
validate: (ctx) => {
|
|
1822
|
+
buildUpdatePythonTaskArgs(ctx);
|
|
1823
|
+
},
|
|
1824
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName35, buildUpdatePythonTaskArgs(ctx)),
|
|
1825
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName35, buildUpdatePythonTaskArgs(ctx))
|
|
1826
|
+
};
|
|
1827
|
+
|
|
1828
|
+
// src/commands/te-dataops/flow/get-python-task.ts
|
|
1829
|
+
var toolName36 = "flow_get_python_task";
|
|
1830
|
+
function buildArgs34(ctx) {
|
|
1831
|
+
return {
|
|
1832
|
+
spaceCode: requireSpaceCode(ctx),
|
|
1833
|
+
flowCode: requirePositiveSafeInt(ctx, "flowCode"),
|
|
1834
|
+
taskCode: requirePositiveSafeInt(ctx, "taskCode")
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
var getPythonTask = {
|
|
1838
|
+
service: "dataops_flow",
|
|
1839
|
+
command: "+get_python_task",
|
|
1840
|
+
description: "Get the DEV definition of one Python task node (taskType=PYTHON). Requires spaceCode, flowCode, and taskCode. Returns pythonTask (scriptContent, pythonVersion, requirementsTxt, packageSourceId, runtimeMode), preTasks, retry policy, outputParams, taskParams, and paramSources. For historical PROD execution snapshots, use dataops_operations +get_task_instance_detail.",
|
|
1841
|
+
flags: [
|
|
1842
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1843
|
+
{ name: "flowCode", type: "number", required: true, desc: "Task flow code" },
|
|
1844
|
+
{ name: "taskCode", type: "number", required: true, desc: "Python task node code" }
|
|
1845
|
+
],
|
|
1846
|
+
risk: "read",
|
|
1847
|
+
validate: (ctx) => {
|
|
1848
|
+
buildArgs34(ctx);
|
|
1849
|
+
},
|
|
1850
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName36, buildArgs34(ctx)),
|
|
1851
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName36, buildArgs34(ctx))
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
// src/commands/te-dataops/flow/list-python-versions.ts
|
|
1855
|
+
var toolName37 = "flow_list_python_versions";
|
|
1856
|
+
function buildArgs35(ctx) {
|
|
1857
|
+
return { spaceCode: requireSpaceCode(ctx) };
|
|
1858
|
+
}
|
|
1859
|
+
var listPythonVersions = {
|
|
1860
|
+
service: "dataops_flow",
|
|
1861
|
+
command: "+list_python_versions",
|
|
1862
|
+
description: "List supported Python versions for workflow Python tasks in the space. Returns versions and defaultVersion (the first configured version, e.g. 3.11).",
|
|
1863
|
+
flags: [
|
|
1864
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
1865
|
+
],
|
|
1866
|
+
risk: "read",
|
|
1867
|
+
validate: (ctx) => {
|
|
1868
|
+
buildArgs35(ctx);
|
|
1869
|
+
},
|
|
1870
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName37, buildArgs35(ctx)),
|
|
1871
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName37, buildArgs35(ctx))
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
// src/commands/te-dataops/flow/list-python-package-sources.ts
|
|
1875
|
+
var toolName38 = "flow_list_python_package_sources";
|
|
1876
|
+
function buildArgs36(ctx) {
|
|
1877
|
+
return { spaceCode: requireSpaceCode(ctx) };
|
|
1878
|
+
}
|
|
1879
|
+
var listPythonPackageSources = {
|
|
1880
|
+
service: "dataops_flow",
|
|
1881
|
+
command: "+list_python_package_sources",
|
|
1882
|
+
description: "List cluster-enabled pip package sources available for workflow Python tasks. Returns packageSources (sourceKey, name, url, defaultSource) and defaultSourceKey.",
|
|
1883
|
+
flags: [
|
|
1884
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
1885
|
+
],
|
|
1886
|
+
risk: "read",
|
|
1887
|
+
validate: (ctx) => {
|
|
1888
|
+
buildArgs36(ctx);
|
|
1889
|
+
},
|
|
1890
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName38, buildArgs36(ctx)),
|
|
1891
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName38, buildArgs36(ctx))
|
|
1892
|
+
};
|
|
1893
|
+
|
|
1894
|
+
// src/commands/te-dataops/flow/list-python-directories.ts
|
|
1895
|
+
var toolName39 = "flow_list_python_directories";
|
|
1896
|
+
function buildArgs37(ctx) {
|
|
1897
|
+
return { spaceCode: requireSpaceCode(ctx) };
|
|
1898
|
+
}
|
|
1899
|
+
var listPythonDirectories = {
|
|
1900
|
+
service: "dataops_flow",
|
|
1901
|
+
command: "+list_python_directories",
|
|
1902
|
+
description: "List container mount root paths authorized for Python tasks in the space (own rw product/exchange and incoming cross-space ro exchange). Shared path contract across DEV and PROD without querying physical storage.",
|
|
1903
|
+
flags: [
|
|
1904
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
1905
|
+
],
|
|
1906
|
+
risk: "read",
|
|
1907
|
+
validate: (ctx) => {
|
|
1908
|
+
buildArgs37(ctx);
|
|
1909
|
+
},
|
|
1910
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName39, buildArgs37(ctx)),
|
|
1911
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName39, buildArgs37(ctx))
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
// src/commands/te-dataops/flow/browse-python-directory.ts
|
|
1915
|
+
var toolName40 = "flow_browse_python_directory";
|
|
1916
|
+
function buildArgs38(ctx) {
|
|
1917
|
+
const spaceCode = requireSpaceCode(ctx);
|
|
1918
|
+
const rawPath = ctx.str("path");
|
|
1919
|
+
if (rawPath !== "" && !rawPath.trim()) {
|
|
1920
|
+
throw new CliValidationError("--path must not be whitespace only");
|
|
1921
|
+
}
|
|
1922
|
+
const maxDepth = ctx.optionalNum("maxDepth");
|
|
1923
|
+
if (maxDepth !== void 0 && (!Number.isInteger(maxDepth) || maxDepth < 1 || maxDepth > 3)) {
|
|
1924
|
+
throw new CliValidationError("--maxDepth must be an integer between 1 and 3");
|
|
1925
|
+
}
|
|
1926
|
+
const maxEntries = ctx.optionalNum("maxEntries");
|
|
1927
|
+
if (maxEntries !== void 0 && (!Number.isInteger(maxEntries) || maxEntries < 1 || maxEntries > 500)) {
|
|
1928
|
+
throw new CliValidationError("--maxEntries must be an integer between 1 and 500");
|
|
1929
|
+
}
|
|
1930
|
+
return {
|
|
1931
|
+
spaceCode,
|
|
1932
|
+
path: rawPath || void 0,
|
|
1933
|
+
maxDepth,
|
|
1934
|
+
maxEntries
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1937
|
+
var browsePythonDirectory = {
|
|
1938
|
+
service: "dataops_flow",
|
|
1939
|
+
command: "+browse_python_directory",
|
|
1940
|
+
description: "Bounded browse of DEV Python workspace directories and files. Omit --path to skip virtual parent folders and expand directly from all authorized mount roots. Reflects DEV storage only, not PROD.",
|
|
1941
|
+
flags: [
|
|
1942
|
+
{ name: "spaceCode", type: "string", required: true, desc: "Space code" },
|
|
1943
|
+
{ name: "path", type: "string", required: false, desc: "Optional absolute POSIX path to browse (e.g. /dw/<space>/product/subdir). Omit to expand from all authorized mount roots" },
|
|
1944
|
+
{ name: "maxDepth", type: "number", required: false, default: 2, min: 1, max: 3, desc: "Expansion depth (1-3). Default 2" },
|
|
1945
|
+
{ name: "maxEntries", type: "number", required: false, default: 200, min: 1, max: 500, desc: "Maximum entries returned (1-500). Default 200" }
|
|
1946
|
+
],
|
|
1947
|
+
risk: "read",
|
|
1948
|
+
validate: (ctx) => {
|
|
1949
|
+
buildArgs38(ctx);
|
|
1950
|
+
},
|
|
1951
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName40, buildArgs38(ctx)),
|
|
1952
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName40, buildArgs38(ctx))
|
|
1457
1953
|
};
|
|
1458
1954
|
|
|
1459
1955
|
// src/commands/te-dataops/flow/delete-task.ts
|
|
1460
|
-
var
|
|
1956
|
+
var toolName41 = "flow_delete_task";
|
|
1461
1957
|
function validateIdentifier(ctx, name) {
|
|
1462
1958
|
const raw = ctx.str(name).trim();
|
|
1463
1959
|
if (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
|
|
@@ -1466,7 +1962,7 @@ function validateIdentifier(ctx, name) {
|
|
|
1466
1962
|
});
|
|
1467
1963
|
}
|
|
1468
1964
|
}
|
|
1469
|
-
function
|
|
1965
|
+
function buildArgs39(ctx) {
|
|
1470
1966
|
return {
|
|
1471
1967
|
spaceCode: ctx.str("spaceCode"),
|
|
1472
1968
|
flowCode: ctx.num("flowCode"),
|
|
@@ -1487,13 +1983,13 @@ var deleteTask = {
|
|
|
1487
1983
|
validateIdentifier(ctx, "flowCode");
|
|
1488
1984
|
validateIdentifier(ctx, "taskCode");
|
|
1489
1985
|
},
|
|
1490
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1491
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
1986
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName41, buildArgs39(ctx)),
|
|
1987
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName41, buildArgs39(ctx))
|
|
1492
1988
|
};
|
|
1493
1989
|
|
|
1494
1990
|
// src/commands/te-dataops/flow/list-high-frequency-release-flows.ts
|
|
1495
|
-
var
|
|
1496
|
-
function
|
|
1991
|
+
var toolName42 = "flow_list_high_frequency_release_flows";
|
|
1992
|
+
function buildArgs40(ctx) {
|
|
1497
1993
|
return {
|
|
1498
1994
|
spaceCode: ctx.str("spaceCode"),
|
|
1499
1995
|
days: ctx.optionalNum("days"),
|
|
@@ -1514,9 +2010,9 @@ var listHighFrequencyReleaseFlows = {
|
|
|
1514
2010
|
{ name: "status", type: "string", required: false, desc: "Optional release status: SUCCESS, FAIL, PART_SUCCESS, or ALL; default SUCCESS" }
|
|
1515
2011
|
],
|
|
1516
2012
|
risk: "read",
|
|
1517
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2013
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName42, buildArgs40(ctx)),
|
|
1518
2014
|
execute: async (ctx) => {
|
|
1519
|
-
return callDataopsApi(ctx,
|
|
2015
|
+
return callDataopsApi(ctx, toolName42, buildArgs40(ctx));
|
|
1520
2016
|
}
|
|
1521
2017
|
};
|
|
1522
2018
|
|
|
@@ -1539,32 +2035,40 @@ var commands2 = [
|
|
|
1539
2035
|
updateIntegrationTask,
|
|
1540
2036
|
updateWorkflowInstanceCheckTask,
|
|
1541
2037
|
updateTaskInstanceCheckTask,
|
|
2038
|
+
updatePythonTask,
|
|
1542
2039
|
addTaskRelation,
|
|
1543
2040
|
createSqlTask,
|
|
2041
|
+
getSqlTask,
|
|
1544
2042
|
createIntegrationTask,
|
|
1545
2043
|
createWorkflowInstanceCheckTask,
|
|
1546
2044
|
createTaskInstanceCheckTask,
|
|
2045
|
+
createPythonTask,
|
|
2046
|
+
getPythonTask,
|
|
2047
|
+
listPythonVersions,
|
|
2048
|
+
listPythonPackageSources,
|
|
2049
|
+
listPythonDirectories,
|
|
2050
|
+
browsePythonDirectory,
|
|
1547
2051
|
deleteTask
|
|
1548
2052
|
];
|
|
1549
2053
|
var flow_default = commands2;
|
|
1550
2054
|
|
|
1551
2055
|
// src/commands/te-dataops/integration/list-datasource-components.ts
|
|
1552
|
-
var
|
|
2056
|
+
var toolName43 = "integration_list_datasource_components";
|
|
1553
2057
|
var listDatasourceComponents = {
|
|
1554
2058
|
service: "dataops_integration",
|
|
1555
2059
|
command: "+list_datasource_components",
|
|
1556
2060
|
description: "List supported datasource components. Requires no arguments. Returns componentName, componentType, and description. Use +get_datasource_component_template before creating a datasource.",
|
|
1557
2061
|
flags: [],
|
|
1558
2062
|
risk: "read",
|
|
1559
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2063
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName43, {}),
|
|
1560
2064
|
execute: async (ctx) => {
|
|
1561
|
-
return callDataopsApi(ctx,
|
|
2065
|
+
return callDataopsApi(ctx, toolName43, {});
|
|
1562
2066
|
}
|
|
1563
2067
|
};
|
|
1564
2068
|
|
|
1565
2069
|
// src/commands/te-dataops/integration/get-datasource-component-template.ts
|
|
1566
|
-
var
|
|
1567
|
-
function
|
|
2070
|
+
var toolName44 = "integration_get_datasource_component_template";
|
|
2071
|
+
function buildArgs41(ctx) {
|
|
1568
2072
|
return {
|
|
1569
2073
|
componentName: ctx.str("componentName")
|
|
1570
2074
|
};
|
|
@@ -1577,15 +2081,15 @@ var getDatasourceComponentTemplate = {
|
|
|
1577
2081
|
{ name: "componentName", type: "string", required: true, desc: "Exact componentName returned by +list_datasource_components, e.g. MySQL, ClickHouse, DatabricksJdbc, LarkBitable, OSS, S3, HDFS" }
|
|
1578
2082
|
],
|
|
1579
2083
|
risk: "read",
|
|
1580
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2084
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName44, buildArgs41(ctx)),
|
|
1581
2085
|
execute: async (ctx) => {
|
|
1582
|
-
return callDataopsApi(ctx,
|
|
2086
|
+
return callDataopsApi(ctx, toolName44, buildArgs41(ctx));
|
|
1583
2087
|
}
|
|
1584
2088
|
};
|
|
1585
2089
|
|
|
1586
2090
|
// src/commands/te-dataops/integration/list-space-datasources.ts
|
|
1587
|
-
var
|
|
1588
|
-
function
|
|
2091
|
+
var toolName45 = "integration_list_space_datasources";
|
|
2092
|
+
function buildArgs42(ctx) {
|
|
1589
2093
|
return {
|
|
1590
2094
|
spaceCode: ctx.str("spaceCode"),
|
|
1591
2095
|
dataSourceName: ctx.str("datasourceName"),
|
|
@@ -1602,15 +2106,15 @@ var listSpaceDatasources = {
|
|
|
1602
2106
|
{ name: "componentName", type: "string", required: false, desc: "Optional component type filter, e.g. MySQL or ClickHouse" }
|
|
1603
2107
|
],
|
|
1604
2108
|
risk: "read",
|
|
1605
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2109
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName45, buildArgs42(ctx)),
|
|
1606
2110
|
execute: async (ctx) => {
|
|
1607
|
-
return callDataopsApi(ctx,
|
|
2111
|
+
return callDataopsApi(ctx, toolName45, buildArgs42(ctx));
|
|
1608
2112
|
}
|
|
1609
2113
|
};
|
|
1610
2114
|
|
|
1611
2115
|
// src/commands/te-dataops/integration/get-datasource-detail.ts
|
|
1612
|
-
var
|
|
1613
|
-
function
|
|
2116
|
+
var toolName46 = "integration_get_datasource_detail";
|
|
2117
|
+
function buildArgs43(ctx) {
|
|
1614
2118
|
return {
|
|
1615
2119
|
spaceCode: ctx.str("spaceCode"),
|
|
1616
2120
|
dataSourceName: ctx.str("datasourceName")
|
|
@@ -1625,14 +2129,14 @@ var getDatasourceDetail = {
|
|
|
1625
2129
|
{ name: "datasourceName", type: "string", required: true, desc: "Exact datasource name within the space" }
|
|
1626
2130
|
],
|
|
1627
2131
|
risk: "read",
|
|
1628
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2132
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName46, buildArgs43(ctx)),
|
|
1629
2133
|
execute: async (ctx) => {
|
|
1630
|
-
return callDataopsApi(ctx,
|
|
2134
|
+
return callDataopsApi(ctx, toolName46, buildArgs43(ctx));
|
|
1631
2135
|
}
|
|
1632
2136
|
};
|
|
1633
2137
|
|
|
1634
2138
|
// src/commands/te-dataops/integration/test-datasource-connect.ts
|
|
1635
|
-
var
|
|
2139
|
+
var toolName47 = "integration_test_datasource_connect";
|
|
1636
2140
|
var testDatasourceConnect = {
|
|
1637
2141
|
service: "dataops_integration",
|
|
1638
2142
|
command: "+test_datasource_connect",
|
|
@@ -1642,12 +2146,12 @@ var testDatasourceConnect = {
|
|
|
1642
2146
|
{ name: "datasourceName", type: "string", required: true, desc: "Existing datasource name, exact match within the space" }
|
|
1643
2147
|
],
|
|
1644
2148
|
risk: "read",
|
|
1645
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2149
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName47, {
|
|
1646
2150
|
spaceCode: ctx.str("spaceCode"),
|
|
1647
2151
|
datasourceName: ctx.str("datasourceName")
|
|
1648
2152
|
}),
|
|
1649
2153
|
execute: async (ctx) => {
|
|
1650
|
-
return callDataopsApi(ctx,
|
|
2154
|
+
return callDataopsApi(ctx, toolName47, {
|
|
1651
2155
|
spaceCode: ctx.str("spaceCode"),
|
|
1652
2156
|
datasourceName: ctx.str("datasourceName")
|
|
1653
2157
|
});
|
|
@@ -1655,8 +2159,8 @@ var testDatasourceConnect = {
|
|
|
1655
2159
|
};
|
|
1656
2160
|
|
|
1657
2161
|
// src/commands/te-dataops/integration/list-datasource-tables.ts
|
|
1658
|
-
var
|
|
1659
|
-
function
|
|
2162
|
+
var toolName48 = "integration_list_datasource_tables";
|
|
2163
|
+
function buildArgs44(ctx) {
|
|
1660
2164
|
return {
|
|
1661
2165
|
spaceCode: ctx.str("spaceCode"),
|
|
1662
2166
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1677,15 +2181,15 @@ var listDatasourceTables = {
|
|
|
1677
2181
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1678
2182
|
],
|
|
1679
2183
|
risk: "read",
|
|
1680
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2184
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName48, buildArgs44(ctx)),
|
|
1681
2185
|
execute: async (ctx) => {
|
|
1682
|
-
return callDataopsApi(ctx,
|
|
2186
|
+
return callDataopsApi(ctx, toolName48, buildArgs44(ctx));
|
|
1683
2187
|
}
|
|
1684
2188
|
};
|
|
1685
2189
|
|
|
1686
2190
|
// src/commands/te-dataops/integration/get-table-structure.ts
|
|
1687
|
-
var
|
|
1688
|
-
function
|
|
2191
|
+
var toolName49 = "integration_get_table_structure";
|
|
2192
|
+
function buildArgs45(ctx) {
|
|
1689
2193
|
return {
|
|
1690
2194
|
spaceCode: ctx.str("spaceCode"),
|
|
1691
2195
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1708,15 +2212,15 @@ var getTableStructure = {
|
|
|
1708
2212
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1709
2213
|
],
|
|
1710
2214
|
risk: "read",
|
|
1711
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2215
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName49, buildArgs45(ctx)),
|
|
1712
2216
|
execute: async (ctx) => {
|
|
1713
|
-
return callDataopsApi(ctx,
|
|
2217
|
+
return callDataopsApi(ctx, toolName49, buildArgs45(ctx));
|
|
1714
2218
|
}
|
|
1715
2219
|
};
|
|
1716
2220
|
|
|
1717
2221
|
// src/commands/te-dataops/integration/list-sync-datasources.ts
|
|
1718
|
-
var
|
|
1719
|
-
function
|
|
2222
|
+
var toolName50 = "integration_list_sync_datasources";
|
|
2223
|
+
function buildArgs46(ctx) {
|
|
1720
2224
|
return {
|
|
1721
2225
|
spaceCode: ctx.str("spaceCode"),
|
|
1722
2226
|
env: ctx.str("env")
|
|
@@ -1731,15 +2235,15 @@ var listSyncDatasources = {
|
|
|
1731
2235
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1732
2236
|
],
|
|
1733
2237
|
risk: "read",
|
|
1734
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2238
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName50, buildArgs46(ctx)),
|
|
1735
2239
|
execute: async (ctx) => {
|
|
1736
|
-
return callDataopsApi(ctx,
|
|
2240
|
+
return callDataopsApi(ctx, toolName50, buildArgs46(ctx));
|
|
1737
2241
|
}
|
|
1738
2242
|
};
|
|
1739
2243
|
|
|
1740
2244
|
// src/commands/te-dataops/integration/list-datasource-databases.ts
|
|
1741
|
-
var
|
|
1742
|
-
function
|
|
2245
|
+
var toolName51 = "integration_list_datasource_databases";
|
|
2246
|
+
function buildArgs47(ctx) {
|
|
1743
2247
|
return {
|
|
1744
2248
|
spaceCode: ctx.str("spaceCode"),
|
|
1745
2249
|
datasourceId: ctx.str("datasourceId"),
|
|
@@ -1758,15 +2262,15 @@ var listDatasourceDatabases = {
|
|
|
1758
2262
|
{ name: "env", type: "string", required: false, desc: "Environment: DEV (default) or PROD" }
|
|
1759
2263
|
],
|
|
1760
2264
|
risk: "read",
|
|
1761
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2265
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName51, buildArgs47(ctx)),
|
|
1762
2266
|
execute: async (ctx) => {
|
|
1763
|
-
return callDataopsApi(ctx,
|
|
2267
|
+
return callDataopsApi(ctx, toolName51, buildArgs47(ctx));
|
|
1764
2268
|
}
|
|
1765
2269
|
};
|
|
1766
2270
|
|
|
1767
2271
|
// src/commands/te-dataops/integration/online-datasource.ts
|
|
1768
|
-
var
|
|
1769
|
-
function
|
|
2272
|
+
var toolName52 = "integration_online_datasource";
|
|
2273
|
+
function buildArgs48(ctx) {
|
|
1770
2274
|
return {
|
|
1771
2275
|
spaceCode: ctx.str("spaceCode"),
|
|
1772
2276
|
dataSourceNames: ctx.str("dataSourceNames")
|
|
@@ -1781,15 +2285,15 @@ var onlineDatasource = {
|
|
|
1781
2285
|
{ name: "dataSourceNames", type: "string", required: true, desc: "Datasource name list (comma-separated)" }
|
|
1782
2286
|
],
|
|
1783
2287
|
risk: "write",
|
|
1784
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2288
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName52, buildArgs48(ctx)),
|
|
1785
2289
|
execute: async (ctx) => {
|
|
1786
|
-
return callDataopsApi(ctx,
|
|
2290
|
+
return callDataopsApi(ctx, toolName52, buildArgs48(ctx));
|
|
1787
2291
|
}
|
|
1788
2292
|
};
|
|
1789
2293
|
|
|
1790
2294
|
// src/commands/te-dataops/integration/add-datasource.ts
|
|
1791
|
-
var
|
|
1792
|
-
function
|
|
2295
|
+
var toolName53 = "integration_add_datasource";
|
|
2296
|
+
function buildArgs49(ctx) {
|
|
1793
2297
|
return {
|
|
1794
2298
|
spaceCode: ctx.str("spaceCode"),
|
|
1795
2299
|
componentName: ctx.str("componentName"),
|
|
@@ -1812,14 +2316,14 @@ var addDatasource = {
|
|
|
1812
2316
|
{ name: "envJsonList", type: "string", required: true, desc: "JSON array string of component connection fields. Keys must match requiredFields from +get_datasource_component_template" }
|
|
1813
2317
|
],
|
|
1814
2318
|
risk: "write",
|
|
1815
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2319
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName53, buildArgs49(ctx)),
|
|
1816
2320
|
execute: async (ctx) => {
|
|
1817
|
-
return callDataopsApi(ctx,
|
|
2321
|
+
return callDataopsApi(ctx, toolName53, buildArgs49(ctx));
|
|
1818
2322
|
}
|
|
1819
2323
|
};
|
|
1820
2324
|
|
|
1821
2325
|
// src/commands/te-dataops/integration/modify-datasource.ts
|
|
1822
|
-
var
|
|
2326
|
+
var toolName54 = "integration_modify_datasource";
|
|
1823
2327
|
function optionalBool(ctx, name) {
|
|
1824
2328
|
const flagName = `--${name}`;
|
|
1825
2329
|
const hasFlag = process.argv.some((arg) => arg === flagName || arg.startsWith(`${flagName}=`));
|
|
@@ -1827,7 +2331,7 @@ function optionalBool(ctx, name) {
|
|
|
1827
2331
|
const raw = ctx.str(name);
|
|
1828
2332
|
return raw === "true" || raw === "1" || raw === "yes";
|
|
1829
2333
|
}
|
|
1830
|
-
function
|
|
2334
|
+
function buildArgs50(ctx) {
|
|
1831
2335
|
return {
|
|
1832
2336
|
spaceCode: ctx.str("spaceCode"),
|
|
1833
2337
|
dataSourceName: ctx.str("dataSourceName"),
|
|
@@ -1848,15 +2352,15 @@ var modifyDatasource = {
|
|
|
1848
2352
|
{ name: "envJsonList", type: "string", required: false, desc: "New environment config JSON array string (not passed means not modified)" }
|
|
1849
2353
|
],
|
|
1850
2354
|
risk: "write",
|
|
1851
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2355
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName54, buildArgs50(ctx)),
|
|
1852
2356
|
execute: async (ctx) => {
|
|
1853
|
-
return callDataopsApi(ctx,
|
|
2357
|
+
return callDataopsApi(ctx, toolName54, buildArgs50(ctx));
|
|
1854
2358
|
}
|
|
1855
2359
|
};
|
|
1856
2360
|
|
|
1857
2361
|
// src/commands/te-dataops/integration/list-sync-solutions.ts
|
|
1858
|
-
var
|
|
1859
|
-
function
|
|
2362
|
+
var toolName55 = "integration_list_sync_solutions";
|
|
2363
|
+
function buildArgs51(ctx) {
|
|
1860
2364
|
return {
|
|
1861
2365
|
spaceCode: ctx.str("spaceCode")
|
|
1862
2366
|
};
|
|
@@ -1869,15 +2373,15 @@ var listSyncSolutions = {
|
|
|
1869
2373
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
1870
2374
|
],
|
|
1871
2375
|
risk: "read",
|
|
1872
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2376
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName55, buildArgs51(ctx)),
|
|
1873
2377
|
execute: async (ctx) => {
|
|
1874
|
-
return callDataopsApi(ctx,
|
|
2378
|
+
return callDataopsApi(ctx, toolName55, buildArgs51(ctx));
|
|
1875
2379
|
}
|
|
1876
2380
|
};
|
|
1877
2381
|
|
|
1878
2382
|
// src/commands/te-dataops/integration/get-sync-detail.ts
|
|
1879
|
-
var
|
|
1880
|
-
function
|
|
2383
|
+
var toolName56 = "integration_get_sync_detail";
|
|
2384
|
+
function buildArgs52(ctx) {
|
|
1881
2385
|
return {
|
|
1882
2386
|
spaceCode: ctx.str("spaceCode"),
|
|
1883
2387
|
syncId: ctx.str("syncId"),
|
|
@@ -1894,13 +2398,13 @@ var getSyncDetail = {
|
|
|
1894
2398
|
{ name: "withParams", type: "boolean", required: false, desc: "Also return usedParams; defaults to false" }
|
|
1895
2399
|
],
|
|
1896
2400
|
risk: "read",
|
|
1897
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1898
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2401
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName56, buildArgs52(ctx)),
|
|
2402
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName56, buildArgs52(ctx))
|
|
1899
2403
|
};
|
|
1900
2404
|
|
|
1901
2405
|
// src/commands/te-dataops/integration/list-sync-runs.ts
|
|
1902
|
-
var
|
|
1903
|
-
function
|
|
2406
|
+
var toolName57 = "integration_list_sync_runs";
|
|
2407
|
+
function buildArgs53(ctx) {
|
|
1904
2408
|
return {
|
|
1905
2409
|
spaceCode: ctx.str("spaceCode"),
|
|
1906
2410
|
syncId: ctx.str("syncId"),
|
|
@@ -1917,12 +2421,12 @@ var listSyncRuns = {
|
|
|
1917
2421
|
{ name: "limit", type: "number", required: false, desc: "Number of results to return, defaults to 20 if not provided" }
|
|
1918
2422
|
],
|
|
1919
2423
|
risk: "read",
|
|
1920
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
1921
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2424
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName57, buildArgs53(ctx)),
|
|
2425
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName57, buildArgs53(ctx))
|
|
1922
2426
|
};
|
|
1923
2427
|
|
|
1924
2428
|
// src/commands/te-dataops/integration/exec-sync-solution.ts
|
|
1925
|
-
var
|
|
2429
|
+
var toolName58 = "integration_exec_sync_solution";
|
|
1926
2430
|
var execSyncSolution = {
|
|
1927
2431
|
service: "dataops_integration",
|
|
1928
2432
|
command: "+exec_sync_solution",
|
|
@@ -1934,14 +2438,14 @@ var execSyncSolution = {
|
|
|
1934
2438
|
{ name: "comment", type: "string", required: false, desc: "Optional execution remark" }
|
|
1935
2439
|
],
|
|
1936
2440
|
risk: "write",
|
|
1937
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2441
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName58, {
|
|
1938
2442
|
spaceCode: ctx.str("spaceCode"),
|
|
1939
2443
|
syncId: ctx.str("syncId"),
|
|
1940
2444
|
baseDate: ctx.str("baseDate"),
|
|
1941
2445
|
comment: ctx.str("comment")
|
|
1942
2446
|
}),
|
|
1943
2447
|
execute: async (ctx) => {
|
|
1944
|
-
return callDataopsApi(ctx,
|
|
2448
|
+
return callDataopsApi(ctx, toolName58, {
|
|
1945
2449
|
spaceCode: ctx.str("spaceCode"),
|
|
1946
2450
|
syncId: ctx.str("syncId"),
|
|
1947
2451
|
baseDate: ctx.str("baseDate"),
|
|
@@ -1951,8 +2455,8 @@ var execSyncSolution = {
|
|
|
1951
2455
|
};
|
|
1952
2456
|
|
|
1953
2457
|
// src/commands/te-dataops/integration/add-sync-solution.ts
|
|
1954
|
-
var
|
|
1955
|
-
function
|
|
2458
|
+
var toolName59 = "integration_add_sync_solution";
|
|
2459
|
+
function buildArgs54(ctx) {
|
|
1956
2460
|
return {
|
|
1957
2461
|
spaceCode: ctx.str("spaceCode"),
|
|
1958
2462
|
syncName: ctx.str("syncName"),
|
|
@@ -1985,15 +2489,15 @@ var addSyncSolution = {
|
|
|
1985
2489
|
{ name: "remark", type: "string", required: false, desc: "Remark" }
|
|
1986
2490
|
],
|
|
1987
2491
|
risk: "write",
|
|
1988
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2492
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName59, buildArgs54(ctx)),
|
|
1989
2493
|
execute: async (ctx) => {
|
|
1990
|
-
return callDataopsApi(ctx,
|
|
2494
|
+
return callDataopsApi(ctx, toolName59, buildArgs54(ctx));
|
|
1991
2495
|
}
|
|
1992
2496
|
};
|
|
1993
2497
|
|
|
1994
2498
|
// src/commands/te-dataops/integration/save-sync-solution.ts
|
|
1995
|
-
var
|
|
1996
|
-
function
|
|
2499
|
+
var toolName60 = "integration_save_sync_solution";
|
|
2500
|
+
function buildArgs55(ctx) {
|
|
1997
2501
|
return {
|
|
1998
2502
|
spaceCode: ctx.str("spaceCode"),
|
|
1999
2503
|
syncId: ctx.str("syncId"),
|
|
@@ -2020,13 +2524,13 @@ var saveSyncSolution = {
|
|
|
2020
2524
|
{ name: "remark", type: "string", required: false, desc: "Updated remark" }
|
|
2021
2525
|
],
|
|
2022
2526
|
risk: "write",
|
|
2023
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2024
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2527
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName60, buildArgs55(ctx)),
|
|
2528
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName60, buildArgs55(ctx))
|
|
2025
2529
|
};
|
|
2026
2530
|
|
|
2027
2531
|
// src/commands/te-dataops/integration/stop-sync-solution.ts
|
|
2028
|
-
var
|
|
2029
|
-
function
|
|
2532
|
+
var toolName61 = "integration_stop_sync_solution";
|
|
2533
|
+
function buildArgs56(ctx) {
|
|
2030
2534
|
return {
|
|
2031
2535
|
spaceCode: ctx.str("spaceCode"),
|
|
2032
2536
|
syncId: ctx.str("syncId"),
|
|
@@ -2043,8 +2547,8 @@ var stopSyncSolution = {
|
|
|
2043
2547
|
{ name: "taskId", type: "string", required: true, desc: "Running execution task ID from +list_sync_runs" }
|
|
2044
2548
|
],
|
|
2045
2549
|
risk: "write",
|
|
2046
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2047
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2550
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName61, buildArgs56(ctx)),
|
|
2551
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName61, buildArgs56(ctx))
|
|
2048
2552
|
};
|
|
2049
2553
|
|
|
2050
2554
|
// src/commands/te-dataops/integration/index.ts
|
|
@@ -2144,7 +2648,7 @@ function formatAllowed(allowed) {
|
|
|
2144
2648
|
}
|
|
2145
2649
|
|
|
2146
2650
|
// src/commands/te-dataops/operations/create-backfill-job.ts
|
|
2147
|
-
var
|
|
2651
|
+
var toolName62 = "operations_create_backfill_job";
|
|
2148
2652
|
var JOB_TYPES = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
2149
2653
|
var FAILURE_STRATEGIES = ["END", "CONTINUE"];
|
|
2150
2654
|
var INTERVAL_UNITS = ["DAY", "WEEK", "MONTH"];
|
|
@@ -2251,8 +2755,8 @@ var createBackfillJob = {
|
|
|
2251
2755
|
flags: backfillDraftFlags(),
|
|
2252
2756
|
risk: "write",
|
|
2253
2757
|
validate: validateBackfillDraft,
|
|
2254
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2255
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2758
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName62, buildBackfillDraftArgs(ctx)),
|
|
2759
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName62, buildBackfillDraftArgs(ctx))
|
|
2256
2760
|
};
|
|
2257
2761
|
function backfillDraftFlags() {
|
|
2258
2762
|
return [
|
|
@@ -2274,7 +2778,7 @@ function backfillDraftFlags() {
|
|
|
2274
2778
|
}
|
|
2275
2779
|
|
|
2276
2780
|
// src/commands/te-dataops/operations/delete-backfill-job.ts
|
|
2277
|
-
var
|
|
2781
|
+
var toolName63 = "operations_delete_backfill_job";
|
|
2278
2782
|
var deleteBackfillJob = {
|
|
2279
2783
|
service: "dataops_operations",
|
|
2280
2784
|
command: "+delete_backfill_job",
|
|
@@ -2282,13 +2786,13 @@ var deleteBackfillJob = {
|
|
|
2282
2786
|
flags: backfillJobFlags(),
|
|
2283
2787
|
risk: "high-risk-write",
|
|
2284
2788
|
validate: validateBackfillJobId,
|
|
2285
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2286
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2789
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName63, buildBackfillJobArgs(ctx)),
|
|
2790
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName63, buildBackfillJobArgs(ctx))
|
|
2287
2791
|
};
|
|
2288
2792
|
|
|
2289
2793
|
// src/commands/te-dataops/operations/get-flow-instance-detail.ts
|
|
2290
|
-
var
|
|
2291
|
-
function
|
|
2794
|
+
var toolName64 = "operations_get_flow_instance_detail";
|
|
2795
|
+
function buildArgs57(ctx) {
|
|
2292
2796
|
return {
|
|
2293
2797
|
spaceCode: ctx.str("spaceCode"),
|
|
2294
2798
|
flowCode: ctx.num("flowCode"),
|
|
@@ -2305,14 +2809,14 @@ var getFlowInstanceDetail = {
|
|
|
2305
2809
|
{ name: "flowInstanceId", type: "number", required: true, desc: "Workflow instance ID from +search_flow_instances" }
|
|
2306
2810
|
],
|
|
2307
2811
|
risk: "read",
|
|
2308
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2812
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName64, buildArgs57(ctx)),
|
|
2309
2813
|
execute: async (ctx) => {
|
|
2310
|
-
return callDataopsApi(ctx,
|
|
2814
|
+
return callDataopsApi(ctx, toolName64, buildArgs57(ctx));
|
|
2311
2815
|
}
|
|
2312
2816
|
};
|
|
2313
2817
|
|
|
2314
2818
|
// src/commands/te-dataops/operations/get-backfill-job-detail.ts
|
|
2315
|
-
var
|
|
2819
|
+
var toolName65 = "operations_get_backfill_job_detail";
|
|
2316
2820
|
var getBackfillJobDetail = {
|
|
2317
2821
|
service: "dataops_operations",
|
|
2318
2822
|
command: "+get_backfill_job_detail",
|
|
@@ -2320,16 +2824,16 @@ var getBackfillJobDetail = {
|
|
|
2320
2824
|
flags: backfillJobFlags(),
|
|
2321
2825
|
risk: "read",
|
|
2322
2826
|
validate: validateBackfillJobId,
|
|
2323
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2324
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2827
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName65, buildBackfillJobArgs(ctx)),
|
|
2828
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName65, buildBackfillJobArgs(ctx))
|
|
2325
2829
|
};
|
|
2326
2830
|
|
|
2327
2831
|
// src/commands/te-dataops/operations/get-task-instance-detail.ts
|
|
2328
|
-
var
|
|
2832
|
+
var toolName66 = "operations_get_task_instance_detail";
|
|
2329
2833
|
function optionalBool2(ctx, name) {
|
|
2330
2834
|
return ctx.str(name) === "" ? void 0 : ctx.bool(name);
|
|
2331
2835
|
}
|
|
2332
|
-
function
|
|
2836
|
+
function buildArgs58(ctx) {
|
|
2333
2837
|
return {
|
|
2334
2838
|
spaceCode: ctx.str("spaceCode"),
|
|
2335
2839
|
flowCode: ctx.num("flowCode"),
|
|
@@ -2354,15 +2858,15 @@ var getTaskInstanceDetail = {
|
|
|
2354
2858
|
{ name: "includeLog", type: "boolean", required: false, desc: "Whether to include task logs. Default false" }
|
|
2355
2859
|
],
|
|
2356
2860
|
risk: "read",
|
|
2357
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2861
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName66, buildArgs58(ctx)),
|
|
2358
2862
|
execute: async (ctx) => {
|
|
2359
|
-
return callDataopsApi(ctx,
|
|
2863
|
+
return callDataopsApi(ctx, toolName66, buildArgs58(ctx));
|
|
2360
2864
|
}
|
|
2361
2865
|
};
|
|
2362
2866
|
|
|
2363
2867
|
// src/commands/te-dataops/operations/list-backfill-flows.ts
|
|
2364
|
-
var
|
|
2365
|
-
function
|
|
2868
|
+
var toolName67 = "operations_list_backfill_flows";
|
|
2869
|
+
function buildArgs59(ctx) {
|
|
2366
2870
|
return { spaceCode: ctx.str("spaceCode") };
|
|
2367
2871
|
}
|
|
2368
2872
|
var listBackfillFlows = {
|
|
@@ -2373,12 +2877,12 @@ var listBackfillFlows = {
|
|
|
2373
2877
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2374
2878
|
],
|
|
2375
2879
|
risk: "read",
|
|
2376
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2377
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2880
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName67, buildArgs59(ctx)),
|
|
2881
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName67, buildArgs59(ctx))
|
|
2378
2882
|
};
|
|
2379
2883
|
|
|
2380
2884
|
// src/commands/te-dataops/operations/rerun-backfill-job.ts
|
|
2381
|
-
var
|
|
2885
|
+
var toolName68 = "operations_rerun_backfill_job";
|
|
2382
2886
|
var rerunBackfillJob = {
|
|
2383
2887
|
service: "dataops_operations",
|
|
2384
2888
|
command: "+rerun_backfill_job",
|
|
@@ -2386,12 +2890,12 @@ var rerunBackfillJob = {
|
|
|
2386
2890
|
flags: backfillJobFlags(),
|
|
2387
2891
|
risk: "write",
|
|
2388
2892
|
validate: validateBackfillJobId,
|
|
2389
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2390
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2893
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName68, buildBackfillJobArgs(ctx)),
|
|
2894
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName68, buildBackfillJobArgs(ctx))
|
|
2391
2895
|
};
|
|
2392
2896
|
|
|
2393
2897
|
// src/commands/te-dataops/operations/run-backfill-job.ts
|
|
2394
|
-
var
|
|
2898
|
+
var toolName69 = "operations_run_backfill_job";
|
|
2395
2899
|
var runBackfillJob = {
|
|
2396
2900
|
service: "dataops_operations",
|
|
2397
2901
|
command: "+run_backfill_job",
|
|
@@ -2399,16 +2903,16 @@ var runBackfillJob = {
|
|
|
2399
2903
|
flags: backfillJobFlags(),
|
|
2400
2904
|
risk: "write",
|
|
2401
2905
|
validate: validateBackfillJobId,
|
|
2402
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2403
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2906
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName69, buildBackfillJobArgs(ctx)),
|
|
2907
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName69, buildBackfillJobArgs(ctx))
|
|
2404
2908
|
};
|
|
2405
2909
|
|
|
2406
2910
|
// src/commands/te-dataops/operations/search-backfill-jobs.ts
|
|
2407
|
-
var
|
|
2911
|
+
var toolName70 = "operations_search_backfill_jobs";
|
|
2408
2912
|
var JOB_TYPES2 = ["TASK_ALL", "TASK_ONLY", "TASK_PRE", "TASK_POST"];
|
|
2409
2913
|
var JOB_STATUSES = ["DRAFT", "RUNNING", "STOP", "FAIL", "SUCCESS", "READY_STOP"];
|
|
2410
2914
|
var JOB_SORTS = ["ID", "JOB_NAME", "CREATE_TIME", "UPDATE_TIME", "START_DATE", "END_DATE"];
|
|
2411
|
-
function
|
|
2915
|
+
function buildArgs60(ctx) {
|
|
2412
2916
|
return {
|
|
2413
2917
|
spaceCode: ctx.str("spaceCode"),
|
|
2414
2918
|
keyword: ctx.str("keyword"),
|
|
@@ -2468,13 +2972,13 @@ var searchBackfillJobs = {
|
|
|
2468
2972
|
],
|
|
2469
2973
|
risk: "read",
|
|
2470
2974
|
validate: validateSearch,
|
|
2471
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2472
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
2975
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName70, buildArgs60(ctx)),
|
|
2976
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName70, buildArgs60(ctx))
|
|
2473
2977
|
};
|
|
2474
2978
|
|
|
2475
2979
|
// src/commands/te-dataops/operations/search-flow-instances.ts
|
|
2476
|
-
var
|
|
2477
|
-
function
|
|
2980
|
+
var toolName71 = "operations_search_flow_instances";
|
|
2981
|
+
function buildArgs61(ctx) {
|
|
2478
2982
|
return {
|
|
2479
2983
|
spaceCode: ctx.str("spaceCode"),
|
|
2480
2984
|
keyword: ctx.str("keyword"),
|
|
@@ -2499,14 +3003,14 @@ var searchFlowInstances = {
|
|
|
2499
3003
|
{ name: "pageSize", type: "number", required: false, desc: "Optional page size; default 20, max 100" }
|
|
2500
3004
|
],
|
|
2501
3005
|
risk: "read",
|
|
2502
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3006
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName71, buildArgs61(ctx)),
|
|
2503
3007
|
execute: async (ctx) => {
|
|
2504
|
-
return callDataopsApi(ctx,
|
|
3008
|
+
return callDataopsApi(ctx, toolName71, buildArgs61(ctx));
|
|
2505
3009
|
}
|
|
2506
3010
|
};
|
|
2507
3011
|
|
|
2508
3012
|
// src/commands/te-dataops/operations/stop-backfill-job.ts
|
|
2509
|
-
var
|
|
3013
|
+
var toolName72 = "operations_stop_backfill_job";
|
|
2510
3014
|
var stopBackfillJob = {
|
|
2511
3015
|
service: "dataops_operations",
|
|
2512
3016
|
command: "+stop_backfill_job",
|
|
@@ -2514,13 +3018,13 @@ var stopBackfillJob = {
|
|
|
2514
3018
|
flags: backfillJobFlags(),
|
|
2515
3019
|
risk: "high-risk-write",
|
|
2516
3020
|
validate: validateBackfillJobId,
|
|
2517
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2518
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
3021
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName72, buildBackfillJobArgs(ctx)),
|
|
3022
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName72, buildBackfillJobArgs(ctx))
|
|
2519
3023
|
};
|
|
2520
3024
|
|
|
2521
3025
|
// src/commands/te-dataops/operations/stop-flow-instance.ts
|
|
2522
|
-
var
|
|
2523
|
-
function
|
|
3026
|
+
var toolName73 = "operations_stop_flow_instance";
|
|
3027
|
+
function buildArgs62(ctx) {
|
|
2524
3028
|
const executeId = ctx.optionalNum("executeId");
|
|
2525
3029
|
const flowInstanceId = ctx.optionalNum("flowInstanceId");
|
|
2526
3030
|
if (executeId == null && flowInstanceId == null || executeId != null && flowInstanceId != null) {
|
|
@@ -2547,15 +3051,15 @@ var stopFlowInstance = {
|
|
|
2547
3051
|
{ name: "flowInstanceId", type: "number", required: false, desc: "Workflow instance ID returned by dataops_operations +search_flow_instances" }
|
|
2548
3052
|
],
|
|
2549
3053
|
risk: "write",
|
|
2550
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3054
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName73, buildArgs62(ctx)),
|
|
2551
3055
|
execute: async (ctx) => {
|
|
2552
|
-
return callDataopsApi(ctx,
|
|
3056
|
+
return callDataopsApi(ctx, toolName73, buildArgs62(ctx));
|
|
2553
3057
|
}
|
|
2554
3058
|
};
|
|
2555
3059
|
|
|
2556
3060
|
// src/commands/te-dataops/operations/update-backfill-job.ts
|
|
2557
|
-
var
|
|
2558
|
-
function
|
|
3061
|
+
var toolName74 = "operations_update_backfill_job";
|
|
3062
|
+
function buildArgs63(ctx) {
|
|
2559
3063
|
return {
|
|
2560
3064
|
...buildBackfillDraftArgs(ctx),
|
|
2561
3065
|
jobId: ctx.num("jobId")
|
|
@@ -2577,8 +3081,8 @@ var updateBackfillJob = {
|
|
|
2577
3081
|
],
|
|
2578
3082
|
risk: "write",
|
|
2579
3083
|
validate: validateUpdate,
|
|
2580
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2581
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
3084
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName74, buildArgs63(ctx)),
|
|
3085
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName74, buildArgs63(ctx))
|
|
2582
3086
|
};
|
|
2583
3087
|
|
|
2584
3088
|
// src/commands/te-dataops/operations/index.ts
|
|
@@ -2600,16 +3104,16 @@ var commands4 = [
|
|
|
2600
3104
|
var operations_default = commands4;
|
|
2601
3105
|
|
|
2602
3106
|
// src/commands/te-dataops/repo/list-spaces.ts
|
|
2603
|
-
var
|
|
3107
|
+
var toolName75 = "repo_list_spaces";
|
|
2604
3108
|
var listSpaces = {
|
|
2605
3109
|
service: "dataops_repo",
|
|
2606
3110
|
command: "+list_spaces",
|
|
2607
3111
|
description: "List DataOps spaces accessible to the current user. Use this first when spaceCode is unknown. Returns createTime, spaceCode, and spaceDisplayName. No flags are required.",
|
|
2608
3112
|
flags: [],
|
|
2609
3113
|
risk: "read",
|
|
2610
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3114
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName75, {}),
|
|
2611
3115
|
execute: async (ctx) => {
|
|
2612
|
-
return callDataopsApi(ctx,
|
|
3116
|
+
return callDataopsApi(ctx, toolName75, {});
|
|
2613
3117
|
}
|
|
2614
3118
|
};
|
|
2615
3119
|
|
|
@@ -2620,12 +3124,12 @@ var commands5 = [
|
|
|
2620
3124
|
var repo_default = commands5;
|
|
2621
3125
|
|
|
2622
3126
|
// src/commands/te-dataops/ide/cancel-sql-query.ts
|
|
2623
|
-
var
|
|
3127
|
+
var toolName76 = "ide_cancel_sql_query";
|
|
2624
3128
|
function optionalString4(ctx, name) {
|
|
2625
3129
|
const value = ctx.str(name);
|
|
2626
3130
|
return value === "" ? void 0 : value;
|
|
2627
3131
|
}
|
|
2628
|
-
function
|
|
3132
|
+
function buildArgs64(ctx) {
|
|
2629
3133
|
return {
|
|
2630
3134
|
spaceCode: ctx.str("spaceCode"),
|
|
2631
3135
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -2642,18 +3146,18 @@ var cancelSqlQuery = {
|
|
|
2642
3146
|
{ name: "requestId", type: "string", required: false, desc: "Optional request ID returned by +submit_sql_query, used only for trace display" }
|
|
2643
3147
|
],
|
|
2644
3148
|
risk: "write",
|
|
2645
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2646
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
3149
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName76, buildArgs64(ctx)),
|
|
3150
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName76, buildArgs64(ctx))
|
|
2647
3151
|
};
|
|
2648
3152
|
|
|
2649
3153
|
// src/commands/te-dataops/ide/get-sql-query-status.ts
|
|
2650
|
-
var
|
|
3154
|
+
var toolName77 = "ide_get_sql_query_status";
|
|
2651
3155
|
var downloadPath = "/api/cli/dataops/v1/gaia/ide/sql-query-download";
|
|
2652
3156
|
function optionalString5(ctx, name) {
|
|
2653
3157
|
const value = ctx.str(name);
|
|
2654
3158
|
return value === "" ? void 0 : value;
|
|
2655
3159
|
}
|
|
2656
|
-
function
|
|
3160
|
+
function buildArgs65(ctx) {
|
|
2657
3161
|
return {
|
|
2658
3162
|
spaceCode: ctx.str("spaceCode"),
|
|
2659
3163
|
downloadTaskId: ctx.num("downloadTaskId"),
|
|
@@ -2681,9 +3185,9 @@ var getSqlQueryStatus = {
|
|
|
2681
3185
|
{ name: "downloadTo", type: "string", required: false, desc: "Optional local file path. After SUCCESS, stream the result zip and replace this path only when the download completes; use a .zip suffix, for example ./result.zip." }
|
|
2682
3186
|
],
|
|
2683
3187
|
risk: "read",
|
|
2684
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3188
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName77, buildArgs65(ctx)),
|
|
2685
3189
|
execute: async (ctx) => {
|
|
2686
|
-
const data = await callDataopsApi(ctx,
|
|
3190
|
+
const data = await callDataopsApi(ctx, toolName77, buildArgs65(ctx));
|
|
2687
3191
|
const downloadTo = optionalString5(ctx, "downloadTo");
|
|
2688
3192
|
if (downloadTo && isDownloadReady(data)) {
|
|
2689
3193
|
return { ...data, localFile: await downloadResult(ctx, data, downloadTo) };
|
|
@@ -2693,12 +3197,12 @@ var getSqlQueryStatus = {
|
|
|
2693
3197
|
};
|
|
2694
3198
|
|
|
2695
3199
|
// src/commands/te-dataops/ide/list-catalogs.ts
|
|
2696
|
-
var
|
|
3200
|
+
var toolName78 = "ide_list_catalogs";
|
|
2697
3201
|
function optionalString6(ctx, name) {
|
|
2698
3202
|
const value = ctx.str(name);
|
|
2699
3203
|
return value === "" ? void 0 : value;
|
|
2700
3204
|
}
|
|
2701
|
-
function
|
|
3205
|
+
function buildArgs66(ctx) {
|
|
2702
3206
|
return {
|
|
2703
3207
|
spaceCode: ctx.str("spaceCode"),
|
|
2704
3208
|
connType: optionalString6(ctx, "connType"),
|
|
@@ -2715,19 +3219,19 @@ var listCatalogs = {
|
|
|
2715
3219
|
{ name: "repoCode", type: "string", required: false, desc: "Optional repository code. Default te_etl" }
|
|
2716
3220
|
],
|
|
2717
3221
|
risk: "read",
|
|
2718
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3222
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName78, buildArgs66(ctx)),
|
|
2719
3223
|
execute: async (ctx) => {
|
|
2720
|
-
return callDataopsApi(ctx,
|
|
3224
|
+
return callDataopsApi(ctx, toolName78, buildArgs66(ctx));
|
|
2721
3225
|
}
|
|
2722
3226
|
};
|
|
2723
3227
|
|
|
2724
3228
|
// src/commands/te-dataops/ide/get-schema-info.ts
|
|
2725
|
-
var
|
|
3229
|
+
var toolName79 = "ide_get_schema_info";
|
|
2726
3230
|
function optionalString7(ctx, name) {
|
|
2727
3231
|
const value = ctx.str(name);
|
|
2728
3232
|
return value === "" ? void 0 : value;
|
|
2729
3233
|
}
|
|
2730
|
-
function
|
|
3234
|
+
function buildArgs67(ctx) {
|
|
2731
3235
|
return {
|
|
2732
3236
|
spaceCode: ctx.str("spaceCode"),
|
|
2733
3237
|
connType: optionalString7(ctx, "connType"),
|
|
@@ -2759,14 +3263,14 @@ var getSchemaInfo = {
|
|
|
2759
3263
|
{ name: "schema", type: "string", required: true, desc: "Schema name" }
|
|
2760
3264
|
],
|
|
2761
3265
|
risk: "read",
|
|
2762
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3266
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName79, buildArgs67(ctx)),
|
|
2763
3267
|
execute: async (ctx) => {
|
|
2764
|
-
return schemaStats(await callDataopsApi(ctx,
|
|
3268
|
+
return schemaStats(await callDataopsApi(ctx, toolName79, buildArgs67(ctx)));
|
|
2765
3269
|
}
|
|
2766
3270
|
};
|
|
2767
3271
|
|
|
2768
3272
|
// src/commands/te-dataops/ide/get-table-detail.ts
|
|
2769
|
-
var
|
|
3273
|
+
var toolName80 = "ide_get_table_detail";
|
|
2770
3274
|
function optionalString8(ctx, name) {
|
|
2771
3275
|
const value = ctx.str(name);
|
|
2772
3276
|
return value === "" ? void 0 : value;
|
|
@@ -2779,7 +3283,7 @@ function optionalEntityType(ctx) {
|
|
|
2779
3283
|
const value = optionalString8(ctx, "entityType");
|
|
2780
3284
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2781
3285
|
}
|
|
2782
|
-
function
|
|
3286
|
+
function buildArgs68(ctx) {
|
|
2783
3287
|
return {
|
|
2784
3288
|
spaceCode: ctx.str("spaceCode"),
|
|
2785
3289
|
connType: optionalString8(ctx, "connType"),
|
|
@@ -2814,19 +3318,19 @@ var getTableDetail2 = {
|
|
|
2814
3318
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2815
3319
|
}
|
|
2816
3320
|
},
|
|
2817
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3321
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName80, buildArgs68(ctx)),
|
|
2818
3322
|
execute: async (ctx) => {
|
|
2819
|
-
return callDataopsApi(ctx,
|
|
3323
|
+
return callDataopsApi(ctx, toolName80, buildArgs68(ctx));
|
|
2820
3324
|
}
|
|
2821
3325
|
};
|
|
2822
3326
|
|
|
2823
3327
|
// src/commands/te-dataops/ide/search-tables.ts
|
|
2824
|
-
var
|
|
3328
|
+
var toolName81 = "ide_search_tables";
|
|
2825
3329
|
function optionalString9(ctx, name) {
|
|
2826
3330
|
const value = ctx.str(name);
|
|
2827
3331
|
return value === "" ? void 0 : value;
|
|
2828
3332
|
}
|
|
2829
|
-
function
|
|
3333
|
+
function buildArgs69(ctx) {
|
|
2830
3334
|
return {
|
|
2831
3335
|
spaceCode: ctx.str("spaceCode"),
|
|
2832
3336
|
connType: optionalString9(ctx, "connType"),
|
|
@@ -2847,15 +3351,15 @@ var searchTables = {
|
|
|
2847
3351
|
{ name: "size", type: "number", required: false, desc: "Optional maximum results. Default 20" }
|
|
2848
3352
|
],
|
|
2849
3353
|
risk: "read",
|
|
2850
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3354
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName81, buildArgs69(ctx)),
|
|
2851
3355
|
execute: async (ctx) => {
|
|
2852
|
-
return callDataopsApi(ctx,
|
|
3356
|
+
return callDataopsApi(ctx, toolName81, buildArgs69(ctx));
|
|
2853
3357
|
}
|
|
2854
3358
|
};
|
|
2855
3359
|
|
|
2856
3360
|
// src/commands/te-dataops/ide/list-repos.ts
|
|
2857
|
-
var
|
|
2858
|
-
function
|
|
3361
|
+
var toolName82 = "ide_list_repos";
|
|
3362
|
+
function buildArgs70(ctx) {
|
|
2859
3363
|
return {
|
|
2860
3364
|
spaceCode: ctx.str("spaceCode")
|
|
2861
3365
|
};
|
|
@@ -2868,14 +3372,14 @@ var listRepos = {
|
|
|
2868
3372
|
{ name: "spaceCode", type: "string", required: true, desc: "Space code" }
|
|
2869
3373
|
],
|
|
2870
3374
|
risk: "read",
|
|
2871
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3375
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName82, buildArgs70(ctx)),
|
|
2872
3376
|
execute: async (ctx) => {
|
|
2873
|
-
return callDataopsApi(ctx,
|
|
3377
|
+
return callDataopsApi(ctx, toolName82, buildArgs70(ctx));
|
|
2874
3378
|
}
|
|
2875
3379
|
};
|
|
2876
3380
|
|
|
2877
3381
|
// src/commands/te-dataops/ide/list-tables.ts
|
|
2878
|
-
var
|
|
3382
|
+
var toolName83 = "ide_list_tables";
|
|
2879
3383
|
function optionalString10(ctx, name) {
|
|
2880
3384
|
const value = ctx.str(name);
|
|
2881
3385
|
return value === "" ? void 0 : value;
|
|
@@ -2884,7 +3388,7 @@ function optionalEntityType2(ctx) {
|
|
|
2884
3388
|
const value = optionalString10(ctx, "entityType");
|
|
2885
3389
|
return value === void 0 ? void 0 : value.toUpperCase();
|
|
2886
3390
|
}
|
|
2887
|
-
function
|
|
3391
|
+
function buildArgs71(ctx) {
|
|
2888
3392
|
return {
|
|
2889
3393
|
spaceCode: ctx.str("spaceCode"),
|
|
2890
3394
|
connType: optionalString10(ctx, "connType"),
|
|
@@ -2917,19 +3421,19 @@ var listTables = {
|
|
|
2917
3421
|
throw new Error("entityType must be TABLE or VIEW");
|
|
2918
3422
|
}
|
|
2919
3423
|
},
|
|
2920
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
3424
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName83, buildArgs71(ctx)),
|
|
2921
3425
|
execute: async (ctx) => {
|
|
2922
|
-
return callDataopsApi(ctx,
|
|
3426
|
+
return callDataopsApi(ctx, toolName83, buildArgs71(ctx));
|
|
2923
3427
|
}
|
|
2924
3428
|
};
|
|
2925
3429
|
|
|
2926
3430
|
// src/commands/te-dataops/ide/submit-sql-query.ts
|
|
2927
|
-
var
|
|
3431
|
+
var toolName84 = "ide_submit_sql_query";
|
|
2928
3432
|
function optionalString11(ctx, name) {
|
|
2929
3433
|
const value = ctx.str(name);
|
|
2930
3434
|
return value === "" ? void 0 : value;
|
|
2931
3435
|
}
|
|
2932
|
-
function
|
|
3436
|
+
function buildArgs72(ctx) {
|
|
2933
3437
|
return {
|
|
2934
3438
|
spaceCode: ctx.str("spaceCode"),
|
|
2935
3439
|
repoCode: optionalString11(ctx, "repoCode"),
|
|
@@ -2948,8 +3452,8 @@ var submitSqlQuery = {
|
|
|
2948
3452
|
{ name: "engineType", type: "string", required: false, desc: "SQL execution engine. Defaults to TASK_ENGINE_TRINO. Optional: TASK_ENGINE_STARROCKS." }
|
|
2949
3453
|
],
|
|
2950
3454
|
risk: "read",
|
|
2951
|
-
dryRun: (ctx) => buildDataopsApiDryRun(ctx,
|
|
2952
|
-
execute: async (ctx) => callDataopsApi(ctx,
|
|
3455
|
+
dryRun: (ctx) => buildDataopsApiDryRun(ctx, toolName84, buildArgs72(ctx)),
|
|
3456
|
+
execute: async (ctx) => callDataopsApi(ctx, toolName84, buildArgs72(ctx))
|
|
2953
3457
|
};
|
|
2954
3458
|
|
|
2955
3459
|
// src/commands/te-dataops/ide/index.ts
|