yuanflow-cli 0.1.20 → 0.1.21
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/package.json +1 -1
- package/src/oss-tools.js +12 -1
package/package.json
CHANGED
package/src/oss-tools.js
CHANGED
|
@@ -155,11 +155,22 @@ function result(action, endpointPath, body, response) {
|
|
|
155
155
|
ok: true,
|
|
156
156
|
action,
|
|
157
157
|
endpoint: { method: 'POST', path: endpointPath, kind: 'oss-atomic' },
|
|
158
|
-
request: { body },
|
|
158
|
+
request: { body: redactRequestBody(body) },
|
|
159
159
|
response,
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
function redactRequestBody(body) {
|
|
164
|
+
if (!body || typeof body !== 'object' || Array.isArray(body)) {
|
|
165
|
+
return body;
|
|
166
|
+
}
|
|
167
|
+
const redacted = { ...body };
|
|
168
|
+
if ('content_base64' in redacted) {
|
|
169
|
+
redacted.content_base64 = '<base64 omitted>';
|
|
170
|
+
}
|
|
171
|
+
return redacted;
|
|
172
|
+
}
|
|
173
|
+
|
|
163
174
|
function optionalField(name, value) {
|
|
164
175
|
const cleaned = cleanOptional(value);
|
|
165
176
|
return cleaned === undefined ? {} : { [name]: cleaned };
|