veryfront 0.1.78 → 0.1.79
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/esm/cli/commands/task/command.d.ts.map +1 -1
- package/esm/cli/commands/task/command.js +2 -1
- package/esm/cli/commands/workflow/command.d.ts.map +1 -1
- package/esm/cli/commands/workflow/command.js +2 -1
- package/esm/cli/utils/sanitize-job-output.d.ts +2 -0
- package/esm/cli/utils/sanitize-job-output.d.ts.map +1 -0
- package/esm/cli/utils/sanitize-job-output.js +19 -0
- package/esm/deno.js +1 -1
- package/package.json +1 -1
- package/src/cli/commands/task/command.ts +4 -1
- package/src/cli/commands/workflow/command.ts +4 -1
- package/src/cli/utils/sanitize-job-output.ts +23 -0
- package/src/deno.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/task/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/task/command.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,WAAY,SAAQ,QAAQ;CAAG;AAEhD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4FrE"}
|
|
@@ -8,6 +8,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
8
8
|
import { cliLogger } from "../../utils/index.js";
|
|
9
9
|
import { exitProcess } from "../../utils/index.js";
|
|
10
10
|
import { withProjectSourceContext } from "../../shared/project-source-context.js";
|
|
11
|
+
import { sanitizeJobOutputForLogging } from "../../utils/sanitize-job-output.js";
|
|
11
12
|
export async function taskCommand(options) {
|
|
12
13
|
const { discoverTasks } = await import("../../../src/task/discovery.js");
|
|
13
14
|
const { runTask } = await import("../../../src/task/runner.js");
|
|
@@ -75,7 +76,7 @@ export async function taskCommand(options) {
|
|
|
75
76
|
if (result.success) {
|
|
76
77
|
cliLogger.info(`Task completed in ${result.durationMs}ms`);
|
|
77
78
|
if (result.result !== undefined) {
|
|
78
|
-
cliLogger.info(`Result: ${JSON.stringify(result.result, null, 2)}`);
|
|
79
|
+
cliLogger.info(`Result: ${JSON.stringify(sanitizeJobOutputForLogging(result.result), null, 2)}`);
|
|
79
80
|
}
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/workflow/command.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAIjD,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG;AA6DxD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmF7E"}
|
|
@@ -2,6 +2,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
2
2
|
import { cliLogger } from "../../utils/index.js";
|
|
3
3
|
import { exitProcess } from "../../utils/index.js";
|
|
4
4
|
import { withProjectSourceContext } from "../../shared/project-source-context.js";
|
|
5
|
+
import { sanitizeJobOutputForLogging } from "../../utils/sanitize-job-output.js";
|
|
5
6
|
import { getEnv } from "../../../src/platform/index.js";
|
|
6
7
|
const WORKFLOW_STATUS_POLL_INTERVAL_MS = 1_000;
|
|
7
8
|
async function createWorkflowClient(debug) {
|
|
@@ -26,7 +27,7 @@ async function waitForWorkflowExit(client, runId) {
|
|
|
26
27
|
if (run.status === "completed") {
|
|
27
28
|
cliLogger.info(`Workflow completed: ${runId}`);
|
|
28
29
|
if (run.output !== undefined) {
|
|
29
|
-
cliLogger.info(`Result: ${JSON.stringify(run.output, null, 2)}`);
|
|
30
|
+
cliLogger.info(`Result: ${JSON.stringify(sanitizeJobOutputForLogging(run.output), null, 2)}`);
|
|
30
31
|
}
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize-job-output.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/sanitize-job-output.ts"],"names":[],"mappings":"AAoBA,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEnE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function sanitizeValue(value) {
|
|
2
|
+
if (Array.isArray(value)) {
|
|
3
|
+
return value.map(sanitizeValue);
|
|
4
|
+
}
|
|
5
|
+
if (value == null || typeof value !== "object") {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
const sanitized = {};
|
|
9
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
10
|
+
if (key === "_tenant") {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
sanitized[key] = sanitizeValue(entry);
|
|
14
|
+
}
|
|
15
|
+
return sanitized;
|
|
16
|
+
}
|
|
17
|
+
export function sanitizeJobOutputForLogging(value) {
|
|
18
|
+
return sanitizeValue(value);
|
|
19
|
+
}
|
package/esm/deno.js
CHANGED
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
10
10
|
import { cliLogger } from "../../utils/index.js";
|
|
11
11
|
import { exitProcess } from "../../utils/index.js";
|
|
12
12
|
import { withProjectSourceContext } from "../../shared/project-source-context.js";
|
|
13
|
+
import { sanitizeJobOutputForLogging } from "../../utils/sanitize-job-output.js";
|
|
13
14
|
import type { TaskArgs } from "./handler.js";
|
|
14
15
|
|
|
15
16
|
export interface TaskOptions extends TaskArgs {}
|
|
@@ -95,7 +96,9 @@ export async function taskCommand(options: TaskOptions): Promise<void> {
|
|
|
95
96
|
if (result.success) {
|
|
96
97
|
cliLogger.info(`Task completed in ${result.durationMs}ms`);
|
|
97
98
|
if (result.result !== undefined) {
|
|
98
|
-
cliLogger.info(
|
|
99
|
+
cliLogger.info(
|
|
100
|
+
`Result: ${JSON.stringify(sanitizeJobOutputForLogging(result.result), null, 2)}`,
|
|
101
|
+
);
|
|
99
102
|
}
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
@@ -2,6 +2,7 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
2
2
|
import { cliLogger } from "../../utils/index.js";
|
|
3
3
|
import { exitProcess } from "../../utils/index.js";
|
|
4
4
|
import { withProjectSourceContext } from "../../shared/project-source-context.js";
|
|
5
|
+
import { sanitizeJobOutputForLogging } from "../../utils/sanitize-job-output.js";
|
|
5
6
|
import { getEnv } from "../../../src/platform/index.js";
|
|
6
7
|
import type { WorkflowArgs } from "./handler.js";
|
|
7
8
|
|
|
@@ -44,7 +45,9 @@ async function waitForWorkflowExit(
|
|
|
44
45
|
if (run.status === "completed") {
|
|
45
46
|
cliLogger.info(`Workflow completed: ${runId}`);
|
|
46
47
|
if (run.output !== undefined) {
|
|
47
|
-
cliLogger.info(
|
|
48
|
+
cliLogger.info(
|
|
49
|
+
`Result: ${JSON.stringify(sanitizeJobOutputForLogging(run.output), null, 2)}`,
|
|
50
|
+
);
|
|
48
51
|
}
|
|
49
52
|
return;
|
|
50
53
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function sanitizeValue(value: unknown): unknown {
|
|
2
|
+
if (Array.isArray(value)) {
|
|
3
|
+
return value.map(sanitizeValue);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
if (value == null || typeof value !== "object") {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const sanitized: Record<string, unknown> = {};
|
|
11
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
12
|
+
if (key === "_tenant") {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
sanitized[key] = sanitizeValue(entry);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return sanitized;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function sanitizeJobOutputForLogging(value: unknown): unknown {
|
|
22
|
+
return sanitizeValue(value);
|
|
23
|
+
}
|