@faable/faable 1.38.0 → 1.38.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.
@@ -108,9 +108,6 @@ class FaableApi {
108
108
  async getApp(app_id) {
109
109
  return data(this.client.get(`/app/${app_id}`));
110
110
  }
111
- async getRegistry(app_id) {
112
- return data(this.client.get(`/app/${app_id}/registry`));
113
- }
114
111
  // `image`/`type` are optional to support the failure path: a failed build
115
112
  // is recorded as a deployment without an image (and without `type`, which
116
113
  // would otherwise rewrite the app's runtime_strategy server-side).
@@ -99,11 +99,10 @@ const deployment_detail = (args) => {
99
99
  if (artifact?.purged_at) {
100
100
  lines.push(label('Purged', `${when(artifact.purged_at)} — source no longer stored`));
101
101
  }
102
- if (d.image)
103
- lines.push(label('Image', d.image));
104
- if (d.status?.runtime_image) {
105
- lines.push(label('Runtime', d.status.runtime_image));
106
- }
102
+ // Deliberately NOT rendered: `image` and `status.runtime_image`. Both are
103
+ // full registry references to OUR infrastructure (account, region, repo
104
+ // naming) — platform internals with no use to the app's owner. The runtime
105
+ // that matters is already on the Artifact line.
107
106
  if (d.redeploy_of)
108
107
  lines.push(label('Rebuild of', d.redeploy_of));
109
108
  if (d.quota_released_at) {
package/dist/log.js CHANGED
@@ -8,11 +8,34 @@ import { buildLog } from './lib/log_buffer.js';
8
8
  //
9
9
  // Tee: terminal stream (colorized) + a plain-text copy into the build-log
10
10
  // buffer so CLI messages land in the logs attached to the deployment.
11
+ // What the terminal shows: just the message. pino's envelope
12
+ // (`[12:03:44.101] INFO (54834):`) is noise for a CLI — a timestamp and a pid
13
+ // per line are for a log file, not for someone waiting on a deploy.
14
+ //
15
+ // Dropping the level token would also drop its color (pino-pretty tints the
16
+ // whole line cyan otherwise), so the level is carried by the MESSAGE color
17
+ // instead: warnings yellow, errors red, everything else the usual cyan.
18
+ const LEVEL_COLOR = {
19
+ 40: "\u001b[33m", // warn
20
+ 50: "\u001b[31m", // error
21
+ 60: "\u001b[31m", // fatal
22
+ };
23
+ const TERMINAL_FORMAT = {
24
+ ignore: "pid,hostname,time,level",
25
+ messageFormat: (log, key) => {
26
+ const message = String(log[key] ?? "");
27
+ const color = LEVEL_COLOR[Number(log.level)];
28
+ return color ? `${color}${message}\u001b[39m` : message;
29
+ },
30
+ };
31
+ // The archived copy KEEPS the envelope: these lines are attached to the
32
+ // deployment and read later (support, post-mortems), where the timestamp and
33
+ // level are the whole point.
11
34
  const toPlainText = prettyFactory({ colorize: false, sync: true });
12
35
  // NB: the two-arg form matters — pino(multistream) alone would treat the
13
36
  // multistream object as the options bag and log raw JSON to stdout.
14
37
  const log = pino({}, pino.multistream([
15
- { stream: pretty({ colorize: true, sync: true }) },
38
+ { stream: pretty({ colorize: true, sync: true, ...TERMINAL_FORMAT }) },
16
39
  {
17
40
  stream: {
18
41
  write(line) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/faable",
3
- "version": "1.38.0",
3
+ "version": "1.38.1",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Marc Pomar <marc@faable.com>",