@getxflow/cli 0.20.0 → 0.20.2
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/projects.js +1 -1
- package/dist/help.js +5 -4
- package/dist/limits.js +4 -0
- package/dist/session.js +6 -7
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/skills/xflow/SKILL.md +9 -4
|
@@ -210,7 +210,7 @@ async function list() {
|
|
|
210
210
|
const orgs = (0, credentials_1.listOrgs)(client.apiUrl);
|
|
211
211
|
if (client.source === 'active' && orgs.length > 1) {
|
|
212
212
|
const name = orgs.find((org) => org.active)?.name;
|
|
213
|
-
(0, ui_1.note)((0, ui_1.dim)(` Projects of ${name ? `"${name}"` : 'the active organization'}
|
|
213
|
+
(0, ui_1.note)((0, ui_1.dim)(` Projects of ${name ? `"${name}"` : 'the active organization'} only. For another organization: xflow org switch <name or id>`));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
async function get(args) {
|
package/dist/help.js
CHANGED
|
@@ -175,13 +175,14 @@ project, the flag therefore goes somewhere else than the folder does. An id hand
|
|
|
175
175
|
${(0, ui_1.bold)('projects get')} or ${(0, ui_1.bold)('link')} behaves the same way: typed by hand, it is not redirected
|
|
176
176
|
by a config lying around either.
|
|
177
177
|
|
|
178
|
-
The id is echoed back on every run
|
|
179
|
-
and a wrong id answers "not found" on a
|
|
178
|
+
The id is echoed back on every run, with the organization that holds the project. It
|
|
179
|
+
is the one place a project is named by hand, and a wrong id answers "not found" on a
|
|
180
|
+
read but works on a write.
|
|
180
181
|
|
|
181
182
|
With several organizations signed in, the one holding the project is looked for on
|
|
182
183
|
every call: there is no folder to write the answer into, and a second place to
|
|
183
|
-
remember it would be a second thing to keep true.
|
|
184
|
-
|
|
184
|
+
remember it would be a second thing to keep true. When most calls go to one project,
|
|
185
|
+
${(0, ui_1.bold)('xflow org switch')} to its organization skips that search.`,
|
|
185
186
|
projects: `${(0, ui_1.bold)('xflow projects')}: the projects of the organization
|
|
186
187
|
|
|
187
188
|
xflow projects list every project, its versions state and age
|
package/dist/limits.js
CHANGED
|
@@ -62,6 +62,10 @@ function sizeLabel(mb) {
|
|
|
62
62
|
return `${Number.isInteger(gb) ? String(gb) : gb.toFixed(1)} GB`;
|
|
63
63
|
}
|
|
64
64
|
function quotaValue(key, use) {
|
|
65
|
+
// null is a plan feature, not a missing number: the plan does not cap this.
|
|
66
|
+
if (use.limit === null) {
|
|
67
|
+
return key.endsWith('_mb') ? `${sizeLabel(use.used)} used, no limit` : `${use.used} used, no limit`;
|
|
68
|
+
}
|
|
65
69
|
// Same unit on both sides: "0.2 of 15 GB", not "245 of 15360".
|
|
66
70
|
if (key.endsWith('_mb')) {
|
|
67
71
|
const used = use.limit >= 1000 ? (use.used / 1000).toFixed(1) : String(use.used);
|
package/dist/session.js
CHANGED
|
@@ -103,10 +103,6 @@ async function connectProject(projectId, root, config) {
|
|
|
103
103
|
(0, ui_1.note)((0, ui_1.dim)(` The project belongs to "${hit.name ?? hit.organizationId}", not to the active organization: the folder is bound to it`));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
else if (hit.organizationId !== session.organizationId) {
|
|
107
|
-
// Nothing was written down, so the next command pays for the same search.
|
|
108
|
-
(0, ui_1.note)((0, ui_1.dim)(` The project belongs to "${hit.name ?? hit.organizationId}": xflow org switch spares the next command this search`));
|
|
109
|
-
}
|
|
110
106
|
return {
|
|
111
107
|
apiUrl: session.apiUrl,
|
|
112
108
|
token: hit.token,
|
|
@@ -144,11 +140,14 @@ async function projectTarget(args, options) {
|
|
|
144
140
|
if (!isProjectId(named)) {
|
|
145
141
|
throw new errors_1.CliError(`--project takes a project id, got "${named}"`, 'The ids: xflow projects list');
|
|
146
142
|
}
|
|
143
|
+
const client = await connectProject(named, null);
|
|
147
144
|
// Echoed back on every human run: the flag is the only place the id is typed by
|
|
148
|
-
// hand, and a wrong one answers 404 on a read and works on a write.
|
|
145
|
+
// hand, and a wrong one answers 404 on a read and works on a write. The
|
|
146
|
+
// organization is named too, since it may not be the active one. Under --json
|
|
149
147
|
// the line is silenced with the rest, where the payload is the whole answer.
|
|
150
|
-
(0,
|
|
151
|
-
|
|
148
|
+
const org = (0, credentials_1.listOrgs)(client.apiUrl).find((entry) => entry.organizationId === client.organizationId);
|
|
149
|
+
(0, ui_1.note)((0, ui_1.dim)(` Project ${named}${org ? ` of "${org.name ?? org.organizationId}"` : ''} (--project)`));
|
|
150
|
+
return { projectId: named, client, root: null };
|
|
152
151
|
}
|
|
153
152
|
const { root, config } = (0, config_1.requireProject)();
|
|
154
153
|
const client = options?.probe === true ? await connectProject(config.projectId, root, config) : connect(config);
|
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.20.
|
|
5
|
+
exports.CLI_VERSION = '0.20.2';
|
|
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.20.
|
|
25
|
+
These instructions ship with xflow CLI 0.20.2, 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
|
|
@@ -60,10 +60,11 @@ the error points away from the cause. The sections below carry the details.
|
|
|
60
60
|
|
|
61
61
|
## Plan limits
|
|
62
62
|
|
|
63
|
-
The organization runs on a plan with
|
|
63
|
+
The organization runs on a plan with limits: projects, databases, functions, active
|
|
64
64
|
connections, seats, database and file storage, function minutes, builds per month and at
|
|
65
|
-
once, schedules and how often they may run.
|
|
66
|
-
|
|
65
|
+
once, schedules and how often they may run. Most are finite; a plan may leave one uncapped,
|
|
66
|
+
and then `whoami` prints `no limit` instead of a ceiling. `xflow whoami` prints every one of
|
|
67
|
+
them next to what is used, and the rights of your own key with them: destroying data in a migration,
|
|
67
68
|
deleting files from storage and linking a connected account each need a right that is off by
|
|
68
69
|
default. Reading it before a long task turns a refusal halfway through the work into a
|
|
69
70
|
sentence said before it starts.
|
|
@@ -150,6 +151,10 @@ Build setup:
|
|
|
150
151
|
- Heavy media does not belong in the sources at all: the archive is capped at 10 MB and
|
|
151
152
|
the built application at 15 MB unpacked. Upload it with `xflow storage push` instead
|
|
152
153
|
and refer to the addresses it prints, see **File storage**.
|
|
154
|
+
- Every file in the project is named with latin letters, digits, spaces and `. - _ ~`.
|
|
155
|
+
A name outside that set does not survive unpacking in the build sandbox, so `Größe.png`
|
|
156
|
+
and `логотип.png` break the build the same way. This is about the file name, not its
|
|
157
|
+
contents: interface text stays in whatever language the application speaks.
|
|
153
158
|
|
|
154
159
|
Platform contract, checked across all of `src/`:
|
|
155
160
|
|