@getxflow/cli 1.11.0 → 1.12.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/db.js +3 -1
- package/dist/help.js +1 -1
- package/dist/moment.js +4 -4
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +2 -2
package/dist/commands/db.js
CHANGED
|
@@ -369,7 +369,9 @@ async function dbBranch(args) {
|
|
|
369
369
|
(0, ui_1.out)(JSON.stringify(data.branch, null, 2));
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
(0, ui_1.ok)(`Branch ${name}: the project database ${data.branch.at ? `as of ${
|
|
372
|
+
(0, ui_1.ok)(`Branch ${name}: the project database ${data.branch.at ? `as of ${data.branch.at}` : 'as it is now'}`);
|
|
373
|
+
if (at && !data.branch.at)
|
|
374
|
+
(0, ui_1.note)((0, ui_1.dim)(` --at ${at} is within the last seconds: that is the database as it is now`));
|
|
373
375
|
(0, ui_1.note)((0, ui_1.dim)(` Work in it: xflow db query --branch ${name} '...', db exec and db migrate take --branch too`));
|
|
374
376
|
(0, ui_1.note)((0, ui_1.dim)(` Rows back into the project database: xflow db restore --from ${name} --table <table>`));
|
|
375
377
|
(0, ui_1.note)((0, ui_1.dim)(` Deleted on its own in ${left(data.branch.expires_at)}; more time: xflow db branch extend ${name}`));
|
package/dist/help.js
CHANGED
|
@@ -295,7 +295,7 @@ will work.`,
|
|
|
295
295
|
with their SQL (cut to 2 KB), dropped connections; 7 days,
|
|
296
296
|
1 on the Free plan (--limit, --cursor for older)
|
|
297
297
|
xflow db branch [list] branches of the database (--json)
|
|
298
|
-
xflow db branch create <name> a branch as the database is now; --at 2h, --at 14:05 or
|
|
298
|
+
xflow db branch create <name> a branch as the database is now; --at 30s, --at 2h, --at 14:05 or
|
|
299
299
|
--at 2026-10-30T14:05+03:00 for a moment of its history,
|
|
300
300
|
--at r12 for when functions revision 12 went live;
|
|
301
301
|
--ttl 12h or --ttl 3d to delete it sooner than the plan does
|
package/dist/moment.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.parseMoment = parseMoment;
|
|
4
4
|
exports.parseTtl = parseTtl;
|
|
5
5
|
const errors_1 = require("./errors");
|
|
6
|
-
const UNIT_MS = { m: 60_000, h: 3_600_000, d: 86_400_000 };
|
|
7
|
-
/** `30m`/`2h`/`1d` ago, `14:05` local (yesterday if still ahead), an ISO date, or `r12` (the platform resolves it). */
|
|
6
|
+
const UNIT_MS = { s: 1_000, m: 60_000, h: 3_600_000, d: 86_400_000 };
|
|
7
|
+
/** `30s`/`30m`/`2h`/`1d` ago, `14:05` local (yesterday if still ahead), an ISO date, or `r12` (the platform resolves it). */
|
|
8
8
|
function parseMoment(text, now = new Date()) {
|
|
9
9
|
if (/^r\d{1,6}$/.test(text))
|
|
10
10
|
return text;
|
|
11
|
-
const ago = /^(\d{1,
|
|
11
|
+
const ago = /^(\d{1,5})([smhd])$/.exec(text);
|
|
12
12
|
if (ago)
|
|
13
13
|
return new Date(now.getTime() - Number(ago[1]) * UNIT_MS[ago[2]]).toISOString();
|
|
14
14
|
const clock = /^(\d{1,2}):(\d{2})$/.exec(text);
|
|
@@ -21,7 +21,7 @@ function parseMoment(text, now = new Date()) {
|
|
|
21
21
|
}
|
|
22
22
|
const at = new Date(text);
|
|
23
23
|
if (!/^\d{4}-\d{2}-\d{2}/.test(text) || Number.isNaN(at.getTime())) {
|
|
24
|
-
throw new errors_1.CliError(`--at ${text} is not a moment`, 'For example: --at 2h (two hours ago), --at 14:05 (today), --at 2026-10-30T14:05+03:00, --at r12 (when functions revision 12 went live)');
|
|
24
|
+
throw new errors_1.CliError(`--at ${text} is not a moment`, 'For example: --at 30s, --at 2h (two hours ago), --at 14:05 (today), --at 2026-10-30T14:05+03:00, --at r12 (when functions revision 12 went live)');
|
|
25
25
|
}
|
|
26
26
|
return at.toISOString();
|
|
27
27
|
}
|
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 = '1.
|
|
5
|
+
exports.CLI_VERSION = '1.12.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
|
@@ -28,7 +28,7 @@ instead of guessing; give the person https://docs.getxflow.com when they ask how
|
|
|
28
28
|
|
|
29
29
|
## Keeping these instructions current
|
|
30
30
|
|
|
31
|
-
These instructions ship with xflow CLI 1.
|
|
31
|
+
These instructions ship with xflow CLI 1.12.0, so the copy you are reading can be older than
|
|
32
32
|
the CLI answering your commands.
|
|
33
33
|
|
|
34
34
|
When the CLI says this file does not match it, run `xflow skills --refresh` and then **read
|
|
@@ -553,7 +553,7 @@ There is no undo: read the rows with `db query` first.
|
|
|
553
553
|
|
|
554
554
|
A branch is a database of its own, as the project database is now or was at a moment of its
|
|
555
555
|
history (6 hours back on Free, 3 days on Start, 7 days on Business), made in seconds without
|
|
556
|
-
copying: `xflow db branch create try-orders [--at 2h|14:05|<ISO date>|r12]` (`r12`: when functions
|
|
556
|
+
copying: `xflow db branch create try-orders [--at 30s|2h|14:05|<ISO date>|r12]` (`r12`: when functions
|
|
557
557
|
revision 12 went live; rolling functions back with `--revision` leaves the database as it is). Try a migration or a fix
|
|
558
558
|
there first (`db migrate`, `db exec`, `db query` take `--branch <name>`); nothing reaches the
|
|
559
559
|
project database. After a data mistake, do not roll anything back: branch as of a moment before
|