@getxflow/cli 0.32.0 → 0.33.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 +1 -1
- package/dist/help.js +5 -4
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +7 -5
package/dist/commands/db.js
CHANGED
|
@@ -130,7 +130,7 @@ async function dbStatus(args) {
|
|
|
130
130
|
(0, ui_1.table)(rows);
|
|
131
131
|
if (rows.some((row) => row[1] === 'applied, file changed')) {
|
|
132
132
|
(0, ui_1.out)('');
|
|
133
|
-
(0, ui_1.warn)('A changed file
|
|
133
|
+
(0, ui_1.warn)('A changed file is never applied again and db migrate refuses it: write a new migration');
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
function serverRow(server) {
|
package/dist/help.js
CHANGED
|
@@ -354,13 +354,14 @@ kept for 7 days: that is a "caught it right away" safety net, not a backup.
|
|
|
354
354
|
${(0, ui_1.bold)('DROP DATABASE')} is never allowed, because the database is shared across the
|
|
355
355
|
organization.
|
|
356
356
|
|
|
357
|
-
Editing an already applied file achieves nothing:
|
|
358
|
-
content
|
|
359
|
-
instead.
|
|
357
|
+
Editing an already applied file achieves nothing: ${(0, ui_1.bold)('migrate')} refuses a name that is
|
|
358
|
+
already applied with different content, and ${(0, ui_1.bold)('xflow db status')} lists such a file
|
|
359
|
+
separately. Write a new migration instead.
|
|
360
360
|
|
|
361
361
|
One logical database can be attached to several projects, so the history may hold
|
|
362
362
|
migrations that are not in your repository. That is normal, but it also means your
|
|
363
|
-
migration can break somebody else's application
|
|
363
|
+
migration can break somebody else's application, and that a name already in that history
|
|
364
|
+
is taken for you too: ${(0, ui_1.bold)('0001_init')} of a neighbour leaves yours no room.`,
|
|
364
365
|
logs: `${(0, ui_1.bold)('xflow logs')} and ${(0, ui_1.bold)('xflow functions logs')}: project errors
|
|
365
366
|
|
|
366
367
|
One stream per project: crashes of the released application in the browser and
|
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.33.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
|
@@ -22,7 +22,7 @@ contains the fix.
|
|
|
22
22
|
|
|
23
23
|
## Keeping these instructions current
|
|
24
24
|
|
|
25
|
-
These instructions ship with xflow CLI 0.
|
|
25
|
+
These instructions ship with xflow CLI 0.33.0, so the copy you are reading can be older than
|
|
26
26
|
the CLI answering your commands.
|
|
27
27
|
|
|
28
28
|
When the CLI says this file does not match it, run `xflow skills --refresh` and then **read
|
|
@@ -48,8 +48,8 @@ the error points away from the cause. The sections below carry the details.
|
|
|
48
48
|
3. Never delete a `functions/<name>/` directory unless the user asked for that
|
|
49
49
|
function to go. The next deploy removes it from the cloud together with its
|
|
50
50
|
schedules, and a function created again later gets a different address.
|
|
51
|
-
4. An already applied migration is never re-run,
|
|
52
|
-
|
|
51
|
+
4. An already applied migration is never re-run, and `xflow db migrate` refuses a
|
|
52
|
+
name it already holds with different content. A schema change is always a new file.
|
|
53
53
|
5. When inserts start failing with `db_write_locked`, the database is over its plan size
|
|
54
54
|
and Postgres itself refuses. Reads and deletes keep working, so the fix is a migration
|
|
55
55
|
that deletes data, never a rewrite of the SQL. Write comes back within the hour.
|
|
@@ -450,8 +450,10 @@ xflow functions logs report # empty output means it never crashed
|
|
|
450
450
|
|
|
451
451
|
Schema changes are files: `migrations/0001_init.sql`, `migrations/0002_orders.sql`, applied
|
|
452
452
|
in filename order by `xflow db migrate`. `xflow db status` shows what is applied and what
|
|
453
|
-
waits. History lives in the database itself,
|
|
454
|
-
|
|
453
|
+
waits. History lives in the database itself, and the database can be shared with other
|
|
454
|
+
projects of the organization, so a migration name is taken once for all of them: `migrate`
|
|
455
|
+
refuses a name that is already applied with different content. Never edit an applied file,
|
|
456
|
+
write a new migration instead.
|
|
455
457
|
|
|
456
458
|
The browser never reaches the database directly. The app reads and writes through a cloud
|
|
457
459
|
function, and inside the handler the connection string is already there:
|