@getxflow/cli 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/functions.js +1 -1
- package/dist/flags.js +1 -1
- package/dist/help.js +4 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +4 -3
|
@@ -93,7 +93,7 @@ async function functionsInvoke(args) {
|
|
|
93
93
|
const text = await response.text();
|
|
94
94
|
(0, ui_1.note)((0, ui_1.dim)(`${response.status} ${response.statusText} in ${elapsed} ms`));
|
|
95
95
|
if (text)
|
|
96
|
-
(0, ui_1.out)(prettyBody(text));
|
|
96
|
+
(0, ui_1.out)((0, args_1.flagBool)(args, 'json') ? text : prettyBody(text));
|
|
97
97
|
if (!response.ok) {
|
|
98
98
|
throw new errors_1.CliError(`The function answered ${response.status}`, `The stack and console output: xflow functions logs ${name}`);
|
|
99
99
|
}
|
package/dist/flags.js
CHANGED
|
@@ -50,7 +50,7 @@ exports.KNOWN = {
|
|
|
50
50
|
'mcp install': ['show-token'],
|
|
51
51
|
functions: ['project'],
|
|
52
52
|
'functions list': ['project'],
|
|
53
|
-
'functions invoke': ['data', 'data-file', 'method', 'project'],
|
|
53
|
+
'functions invoke': ['data', 'data-file', 'json', 'method', 'project'],
|
|
54
54
|
'functions logs': ['limit', 'project'],
|
|
55
55
|
logs: ['limit', 'project'],
|
|
56
56
|
env: ['project'],
|
package/dist/help.js
CHANGED
|
@@ -472,14 +472,15 @@ Both are taken from the platform, no local .env is needed.
|
|
|
472
472
|
--data '{"a":1}' request body (the method becomes POST by default)
|
|
473
473
|
--data-file body.json the same body from a file
|
|
474
474
|
--method GET a different method
|
|
475
|
+
--json the answer of the function alone, exactly as it came
|
|
475
476
|
|
|
476
477
|
The body has to be JSON, and it is checked before the call goes out: PowerShell
|
|
477
478
|
strips double quotes from a native call, so ${(0, ui_1.bold)('--data')} needs them escaped there
|
|
478
479
|
(${(0, ui_1.bold)('--data \'{\\"a\\":1}\'')}) and a file needs nothing.
|
|
479
480
|
|
|
480
|
-
Prints the status, the response time and the body
|
|
481
|
-
5xx: in CI such a call has to fail the step.
|
|
482
|
-
${(0, ui_1.bold)('xflow functions logs <name>')}.`,
|
|
481
|
+
Prints the status, the response time and the body; under ${(0, ui_1.bold)('--json')} the body
|
|
482
|
+
alone. A non-zero exit code on 4xx and 5xx: in CI such a call has to fail the step.
|
|
483
|
+
The cause of a crash is shown by ${(0, ui_1.bold)('xflow functions logs <name>')}.`,
|
|
483
484
|
mcp: `${(0, ui_1.bold)('xflow mcp install')}: connect the agent to the platform directly
|
|
484
485
|
|
|
485
486
|
Writes the MCP server into the configuration of a client that has its own connect
|
package/dist/version.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_API_URL = exports.CLI_VERSION = void 0;
|
|
4
4
|
/** Keep in sync with cli/package.json. */
|
|
5
|
-
exports.CLI_VERSION = '0.
|
|
5
|
+
exports.CLI_VERSION = '0.16.0';
|
|
6
6
|
/** Overridden by XFLOW_API_URL or the `api` field in xflow.json. */
|
|
7
7
|
exports.DEFAULT_API_URL = 'https://app.getxflow.com';
|
package/package.json
CHANGED
package/skills/xflow/SKILL.md
CHANGED
|
@@ -24,7 +24,7 @@ contains the fix.
|
|
|
24
24
|
|
|
25
25
|
## Keeping these instructions current
|
|
26
26
|
|
|
27
|
-
These instructions ship with xflow CLI 0.
|
|
27
|
+
These instructions ship with xflow CLI 0.16.0. They travel inside the package, so the copy
|
|
28
28
|
you are reading can be older than the CLI answering your commands, and nothing about that
|
|
29
29
|
is visible in the text itself.
|
|
30
30
|
|
|
@@ -256,8 +256,9 @@ which functions are about to go and let the user answer.
|
|
|
256
256
|
|
|
257
257
|
Debugging a deployed function is two commands: `xflow functions invoke <name>` calls it
|
|
258
258
|
the way the app does and prints status, timing and body (`--data '{"a":1}'` sends a body,
|
|
259
|
-
`--data-file body.json` sends the same from a file
|
|
260
|
-
the failures, each with its stack and the console
|
|
259
|
+
`--data-file body.json` sends the same from a file, `--json` prints the body alone), and
|
|
260
|
+
`xflow functions logs <name>` shows the failures, each with its stack and the console
|
|
261
|
+
output of that call. Only failed calls are
|
|
261
262
|
logged, so an empty output means the function never crashed, not that logging is broken.
|
|
262
263
|
|
|
263
264
|
The body has to be JSON and the CLI checks it before calling. In PowerShell the double
|