@faable/faable 4.44.0 → 4.44.1
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.
|
@@ -3,6 +3,7 @@ import { requireProject } from '../../api/project.js';
|
|
|
3
3
|
import { CliError } from '../../lib/errors.js';
|
|
4
4
|
import { print_json, json_option } from '../../lib/listing.js';
|
|
5
5
|
import { log } from '../../log.js';
|
|
6
|
+
import { reachable_timeout_ms, wait_reachable } from './reachable.js';
|
|
6
7
|
import { catalog_lines, parse_inputs, missing_fields, wait_for_installation } from './install_lib.js';
|
|
7
8
|
|
|
8
9
|
// `faable deploy install wordpress` — the dashboard's «Install an app»:
|
|
@@ -105,9 +106,20 @@ const install = {
|
|
|
105
106
|
.then(a => (a.url ? `https://${a.url}` : undefined))
|
|
106
107
|
.catch(() => undefined);
|
|
107
108
|
}
|
|
109
|
+
// Ready on the platform is not yet a URL that answers: the edge takes
|
|
110
|
+
// a minute or two to route a new app, and its "app not found" is
|
|
111
|
+
// cached for 120 s — the URL right away would look broken (17-11,
|
|
112
|
+
// wp-catalog-canary). Same check as a deploy's (reachable.ts, F9).
|
|
113
|
+
if (waited.ok && url) {
|
|
114
|
+
const timeout = reachable_timeout_ms();
|
|
115
|
+
if (timeout > 0)
|
|
116
|
+
waited.reachable = await wait_reachable(url, timeout);
|
|
117
|
+
}
|
|
108
118
|
if (!args.json) {
|
|
109
119
|
log.info(waited.ok
|
|
110
|
-
?
|
|
120
|
+
? waited.reachable === false
|
|
121
|
+
? `✅ Ready${url ? `: ${url}` : ''} — the address may take another minute to answer`
|
|
122
|
+
: `✅ Ready${url ? `: ${url}` : ''}`
|
|
111
123
|
: waited.done
|
|
112
124
|
? `❌ The installation failed: ${waited.error ?? 'see the dashboard'}`
|
|
113
125
|
: `⏳ Still ${waited.state} after ${args.timeout}s — it goes on; check it in the dashboard`);
|