@faable/faable 1.38.1 → 1.38.3
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.
|
@@ -36,20 +36,30 @@ const label = (name, value) => ` ${`${name}:`.padEnd(12)}${value}`;
|
|
|
36
36
|
// rendered as labeled lines so they stay in the same column as the record.
|
|
37
37
|
// A BUILD_ERROR never ran, so it has no runtime logs to offer; a retired
|
|
38
38
|
// deployment does (for 24h — the runtime window), plus its frozen build output.
|
|
39
|
-
|
|
39
|
+
//
|
|
40
|
+
// Every one carries `-a <app_id>`. These lines exist to be copied, and all of
|
|
41
|
+
// these commands call resolve_app_id first — which, without an explicit app,
|
|
42
|
+
// falls back to matching the git remote of the working directory. A suggestion
|
|
43
|
+
// that only runs inside one checkout is a suggestion that fails the moment it
|
|
44
|
+
// is pasted anywhere else, `faable deploy inspect` having been run from
|
|
45
|
+
// somewhere else being the very case that produces these lines.
|
|
46
|
+
const next_steps = (d, app_id, is_live) => {
|
|
40
47
|
const phase = d.status?.phase ?? '';
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
48
|
+
const a = `-a ${app_id}`;
|
|
49
|
+
const runtime = label('Logs', `faable deploy logs -d ${d.id} ${a}`);
|
|
50
|
+
const build = label('Build', `faable deploy logs --build -d ${d.id} ${a}`);
|
|
51
|
+
const retry = label('Retry', `faable deploy redeploy ${d.id} ${a}`);
|
|
44
52
|
if (phase === 'BUILD_ERROR')
|
|
45
53
|
return [build, retry];
|
|
46
54
|
if (phase === 'ERROR')
|
|
47
55
|
return [runtime, build, retry];
|
|
48
56
|
if (phase === 'BUILDING' || phase === 'QUEUED' || phase === 'UNKNOWN') {
|
|
49
|
-
return [
|
|
57
|
+
return [
|
|
58
|
+
label('Follow', `faable deploy logs --build -d ${d.id} ${a} --follow`)
|
|
59
|
+
];
|
|
50
60
|
}
|
|
51
61
|
if (is_live)
|
|
52
|
-
return [label('Logs',
|
|
62
|
+
return [label('Logs', `faable deploy logs ${a}`)];
|
|
53
63
|
return [runtime, build];
|
|
54
64
|
};
|
|
55
65
|
const deployment_detail = (args) => {
|
|
@@ -114,7 +124,7 @@ const deployment_detail = (args) => {
|
|
|
114
124
|
lines.push(` ${line}`);
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
|
-
lines.push(...next_steps(d, is_live));
|
|
127
|
+
lines.push(...next_steps(d, app.id, is_live));
|
|
118
128
|
return lines;
|
|
119
129
|
};
|
|
120
130
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faable/faable",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Pomar <marc@faable.com>",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@actions/core": "^3.0.0",
|
|
30
|
-
"@faable/auth-sdk": "^2.5.
|
|
30
|
+
"@faable/auth-sdk": "^2.5.39",
|
|
31
31
|
"axios": "^1.18.1",
|
|
32
32
|
"fs-extra": "^11.3.2",
|
|
33
33
|
"open": "^11.0.0",
|