@getxflow/cli 0.6.3 → 0.6.4
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/deploy.js +4 -0
- package/dist/commands/env.js +6 -1
- package/dist/commands/sources.js +16 -0
- package/dist/version.js +1 -1
- package/package.json +3 -2
package/dist/commands/deploy.js
CHANGED
|
@@ -120,6 +120,10 @@ async function deploy(args) {
|
|
|
120
120
|
if (started.removed_functions?.length) {
|
|
121
121
|
(0, ui_1.warn)(`Removed from the cloud, gone from the sources: ${started.removed_functions.join(', ')}`);
|
|
122
122
|
}
|
|
123
|
+
if (started.revoked_connections?.length) {
|
|
124
|
+
(0, ui_1.warn)(`Access revoked by the provider: ${started.revoked_connections.join(', ')}`);
|
|
125
|
+
(0, ui_1.note)((0, ui_1.dim)(' Reconnect the account in the platform settings: another build will not fix this'));
|
|
126
|
+
}
|
|
123
127
|
const build = await waitForBuild(client, config.projectId, started);
|
|
124
128
|
if (build.phase === 'failed') {
|
|
125
129
|
if (build.log_tail) {
|
package/dist/commands/env.js
CHANGED
|
@@ -12,6 +12,11 @@ const config_1 = require("../config");
|
|
|
12
12
|
const errors_1 = require("../errors");
|
|
13
13
|
const session_1 = require("../session");
|
|
14
14
|
const ui_1 = require("../ui");
|
|
15
|
+
const SCOPE_LABEL = {
|
|
16
|
+
organization: 'the whole organization',
|
|
17
|
+
project: 'this project only',
|
|
18
|
+
connection: 'from a connected service, read-only',
|
|
19
|
+
};
|
|
15
20
|
const FUNCTIONS_DIR = 'functions';
|
|
16
21
|
/** Matches `process.env.NAME` and `process.env['NAME']`. */
|
|
17
22
|
const ENV_REFERENCE = /process\.env(?:\.([A-Z0-9_]+)|\[['"]([A-Z0-9_]+)['"]\])/g;
|
|
@@ -70,7 +75,7 @@ async function envList() {
|
|
|
70
75
|
(0, ui_1.note)((0, ui_1.dim)(' To store one: xflow env set SMTP_PASSWORD=secret'));
|
|
71
76
|
return;
|
|
72
77
|
}
|
|
73
|
-
(0, ui_1.table)(rows.map((row) => [row.name, row.scope
|
|
78
|
+
(0, ui_1.table)(rows.map((row) => [row.name, SCOPE_LABEL[row.scope] ?? SCOPE_LABEL.organization]));
|
|
74
79
|
(0, ui_1.note)((0, ui_1.dim)(' The platform never returns values: they are visible only inside the function'));
|
|
75
80
|
}
|
|
76
81
|
/** Check that every referenced variable is stored. */
|
package/dist/commands/sources.js
CHANGED
|
@@ -176,6 +176,22 @@ async function status() {
|
|
|
176
176
|
(0, ui_1.out)('');
|
|
177
177
|
(0, ui_1.out)(`Built version: ${card.dev_deploy_id ?? '(no build)'}`);
|
|
178
178
|
(0, ui_1.out)(`Visitors see: ${card.live_deploy_id ?? '(never published)'}`);
|
|
179
|
+
// Two different problems, two different fixes: an expiring token is renewed by
|
|
180
|
+
// any build, a revoked one is not renewed by anything until a human reconnects
|
|
181
|
+
// the account. Telling them apart saves a pointless rebuild.
|
|
182
|
+
const ailing = (card.connections ?? []).filter((c) => c.health !== 'ok');
|
|
183
|
+
if (ailing.length > 0) {
|
|
184
|
+
(0, ui_1.out)('');
|
|
185
|
+
(0, ui_1.out)((0, ui_1.bold)('Connected accounts needing attention:'));
|
|
186
|
+
for (const connection of ailing) {
|
|
187
|
+
const problem = connection.health === 'expiring'
|
|
188
|
+
? `expires in ${connection.days_left} days, any build renews it`
|
|
189
|
+
: connection.health === 'expired'
|
|
190
|
+
? 'access has expired, reconnect the account in the platform settings'
|
|
191
|
+
: 'access was revoked by the provider, reconnect the account in the platform settings';
|
|
192
|
+
(0, ui_1.out)(` ${connection.label} (${connection.alias}): ${problem}`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
179
195
|
(0, ui_1.out)('');
|
|
180
196
|
(0, ui_1.out)(card.project_url);
|
|
181
197
|
}
|
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.6.
|
|
5
|
+
exports.CLI_VERSION = '0.6.4';
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getxflow/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "CLI for the XFlow platform: source sync, deployment and publishing of applications",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"engines": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"skills"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "tsc -p tsconfig.json"
|
|
17
|
+
"build": "tsc -p tsconfig.json",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
18
19
|
},
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public"
|