@teambit/ripple 0.0.44 → 0.0.45

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.
@@ -1,5 +1,6 @@
1
1
  import stripAnsi from 'strip-ansi';
2
- import type { RippleMain } from './ripple.main.runtime';
2
+ import type { LastExportData } from '@teambit/export';
3
+ import type { RippleMain, RippleJobFull } from './ripple.main.runtime';
3
4
  export { stripAnsi };
4
5
  export declare function colorPhase(phase?: string): string;
5
6
  export declare function isFailedPhase(phase?: string): boolean;
@@ -8,17 +9,27 @@ export declare function isFailedPhase(phase?: string): boolean;
8
9
  * e.g. "scope/name@abc123" → "scope/name"
9
10
  */
10
11
  export declare function stripComponentVersion(id: string): string;
12
+ export type ResolveSource = 'arg' | 'lane' | 'last-export';
13
+ export type ResolvedJobId = {
14
+ id: string;
15
+ source: ResolveSource;
16
+ lastExport?: LastExportData;
17
+ job?: RippleJobFull;
18
+ } | {
19
+ error: string;
20
+ };
11
21
  /**
12
- * resolve a job ID from explicit argument, --lane flag, or auto-detected workspace lane.
13
- * when no jobId is given, finds the latest job for the lane and optionally validates its phase.
22
+ * resolve a job ID from explicit argument, --lane flag, current workspace lane, or the
23
+ * last-export.json written by the export command (used when on main).
24
+ * when opts.allowedPhases is set, the resolved job's phase is validated.
14
25
  */
15
26
  export declare function resolveJobId(ripple: RippleMain, jobId: string | undefined, flags: {
16
27
  lane?: string;
17
28
  }, opts?: {
18
29
  allowedPhases?: string[];
19
30
  actionVerb?: string;
20
- }): Promise<{
21
- id: string;
22
- } | {
23
- error: string;
24
- }>;
31
+ }): Promise<ResolvedJobId>;
32
+ /**
33
+ * format a relative time delta (e.g. "2 minutes ago", "3 days ago") for a contextual header.
34
+ */
35
+ export declare function formatAge(timestamp: string): string;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.colorPhase = colorPhase;
7
+ exports.formatAge = formatAge;
7
8
  exports.isFailedPhase = isFailedPhase;
8
9
  exports.resolveJobId = resolveJobId;
9
10
  Object.defineProperty(exports, "stripAnsi", {
@@ -59,39 +60,84 @@ function stripComponentVersion(id) {
59
60
  const atIdx = id.indexOf('@');
60
61
  return atIdx > 0 ? id.substring(0, atIdx) : id;
61
62
  }
62
-
63
63
  /**
64
- * resolve a job ID from explicit argument, --lane flag, or auto-detected workspace lane.
65
- * when no jobId is given, finds the latest job for the lane and optionally validates its phase.
64
+ * resolve a job ID from explicit argument, --lane flag, current workspace lane, or the
65
+ * last-export.json written by the export command (used when on main).
66
+ * when opts.allowedPhases is set, the resolved job's phase is validated.
66
67
  */
67
68
  async function resolveJobId(ripple, jobId, flags, opts) {
68
69
  if (jobId) return {
69
- id: jobId
70
+ id: jobId,
71
+ source: 'arg'
70
72
  };
71
73
  const laneId = flags.lane || ripple.getCurrentLaneId();
72
- if (!laneId) {
73
- return {
74
- error: 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.'
74
+ const lastExport = await ripple.getLastExport();
75
+ const lastLaneStr = lastExport?.lane ? `${lastExport.lane.scope}/${lastExport.lane.name}` : undefined;
76
+
77
+ // prefer last-export when its lane matches the user's current context (or both are main).
78
+ // last-export is per-workspace, so it identifies *this user's* last export — more specific than
79
+ // the latest lane job, which might be someone else's.
80
+ if (lastExport?.rippleJobs?.length && lastLaneStr === laneId) {
81
+ const slug = lastExport.rippleJobs[lastExport.rippleJobs.length - 1];
82
+ const job = await ripple.getJobBySlug(slug);
83
+ if (!job) {
84
+ return {
85
+ error: `Could not find Ripple CI job for your last export "${slug}".`
86
+ };
87
+ }
88
+ const phaseError = checkPhase(job, opts, 'Last export job');
89
+ if (phaseError) return {
90
+ error: phaseError
75
91
  };
76
- }
77
- const found = await ripple.findLatestJobForLane(laneId);
78
- if (!found) {
79
92
  return {
80
- error: `No Ripple CI job found for lane "${laneId}".`
93
+ id: job.id,
94
+ source: 'last-export',
95
+ lastExport,
96
+ job
81
97
  };
82
98
  }
83
- if (opts?.allowedPhases) {
84
- const phase = found.status?.phase?.toUpperCase();
85
- if (!opts.allowedPhases.includes(phase || '')) {
86
- const verb = opts.actionVerb || 'act on';
99
+ if (laneId) {
100
+ const found = await ripple.findLatestJobForLane(laneId);
101
+ if (!found) {
87
102
  return {
88
- error: `Latest job for lane "${laneId}" is ${found.status?.phase || 'unknown'} (${found.id}), cannot ${verb}. Provide a specific job ID.`
103
+ error: `No Ripple CI job found for lane "${laneId}".`
89
104
  };
90
105
  }
106
+ const phaseError = checkPhase(found, opts, `Latest job for lane "${laneId}"`);
107
+ if (phaseError) return {
108
+ error: phaseError
109
+ };
110
+ return {
111
+ id: found.id,
112
+ source: 'lane'
113
+ };
91
114
  }
92
115
  return {
93
- id: found.id
116
+ error: 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace with a recent export.'
94
117
  };
95
118
  }
119
+ function checkPhase(job, opts, contextLabel) {
120
+ if (!opts?.allowedPhases) return null;
121
+ const phase = job.status?.phase?.toUpperCase();
122
+ if (opts.allowedPhases.includes(phase || '')) return null;
123
+ const verb = opts.actionVerb || 'act on';
124
+ return `${contextLabel} is ${job.status?.phase || 'unknown'} (${job.id}), cannot ${verb}. Provide a specific job ID.`;
125
+ }
126
+
127
+ /**
128
+ * format a relative time delta (e.g. "2 minutes ago", "3 days ago") for a contextual header.
129
+ */
130
+ function formatAge(timestamp) {
131
+ const ms = Date.now() - new Date(timestamp).getTime();
132
+ if (!Number.isFinite(ms) || ms < 0) return 'just now';
133
+ const seconds = Math.floor(ms / 1000);
134
+ if (seconds < 60) return 'just now';
135
+ const minutes = Math.floor(seconds / 60);
136
+ if (minutes < 60) return `${minutes} minute${minutes === 1 ? '' : 's'} ago`;
137
+ const hours = Math.floor(minutes / 60);
138
+ if (hours < 24) return `${hours} hour${hours === 1 ? '' : 's'} ago`;
139
+ const days = Math.floor(hours / 24);
140
+ return `${days} day${days === 1 ? '' : 's'} ago`;
141
+ }
96
142
 
97
143
  //# sourceMappingURL=ripple-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_stripAnsi","e","__esModule","default","colorPhase","phase","chalk","yellow","toUpperCase","green","red","blue","gray","isFailedPhase","p","stripComponentVersion","id","atIdx","indexOf","substring","resolveJobId","ripple","jobId","flags","opts","laneId","lane","getCurrentLaneId","error","found","findLatestJobForLane","allowedPhases","status","includes","verb","actionVerb"],"sources":["ripple-utils.ts"],"sourcesContent":["import chalk from 'chalk';\nimport stripAnsi from 'strip-ansi';\nimport type { RippleMain } from './ripple.main.runtime';\n\nexport { stripAnsi };\n\nexport function colorPhase(phase?: string): string {\n if (!phase) return chalk.yellow('unknown');\n switch (phase.toUpperCase()) {\n case 'SUCCESS':\n return chalk.green(phase);\n case 'FAILED':\n case 'FAILURE':\n return chalk.red(phase);\n case 'RUNNING':\n case 'IN_PROGRESS':\n return chalk.blue(phase);\n case 'STOPPED':\n case 'PAUSED':\n return chalk.gray(phase);\n default:\n return chalk.yellow(phase);\n }\n}\n\nexport function isFailedPhase(phase?: string): boolean {\n const p = phase?.toUpperCase();\n return p === 'FAILURE' || p === 'FAILED';\n}\n\n/**\n * strip \"@hash\" or \"@version\" suffix from a component ID.\n * e.g. \"scope/name@abc123\" → \"scope/name\"\n */\nexport function stripComponentVersion(id: string): string {\n const atIdx = id.indexOf('@');\n return atIdx > 0 ? id.substring(0, atIdx) : id;\n}\n\n/**\n * resolve a job ID from explicit argument, --lane flag, or auto-detected workspace lane.\n * when no jobId is given, finds the latest job for the lane and optionally validates its phase.\n */\nexport async function resolveJobId(\n ripple: RippleMain,\n jobId: string | undefined,\n flags: { lane?: string },\n opts?: { allowedPhases?: string[]; actionVerb?: string }\n): Promise<{ id: string } | { error: string }> {\n if (jobId) return { id: jobId };\n const laneId = flags.lane || ripple.getCurrentLaneId();\n if (!laneId) {\n return {\n error: 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.',\n };\n }\n const found = await ripple.findLatestJobForLane(laneId);\n if (!found) {\n return { error: `No Ripple CI job found for lane \"${laneId}\".` };\n }\n if (opts?.allowedPhases) {\n const phase = found.status?.phase?.toUpperCase();\n if (!opts.allowedPhases.includes(phase || '')) {\n const verb = opts.actionVerb || 'act on';\n return {\n error: `Latest job for lane \"${laneId}\" is ${found.status?.phase || 'unknown'} (${found.id}), cannot ${verb}. Provide a specific job ID.`,\n };\n }\n }\n return { id: found.id };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmC,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAK5B,SAASG,UAAUA,CAACC,KAAc,EAAU;EACjD,IAAI,CAACA,KAAK,EAAE,OAAOC,gBAAK,CAACC,MAAM,CAAC,SAAS,CAAC;EAC1C,QAAQF,KAAK,CAACG,WAAW,CAAC,CAAC;IACzB,KAAK,SAAS;MACZ,OAAOF,gBAAK,CAACG,KAAK,CAACJ,KAAK,CAAC;IAC3B,KAAK,QAAQ;IACb,KAAK,SAAS;MACZ,OAAOC,gBAAK,CAACI,GAAG,CAACL,KAAK,CAAC;IACzB,KAAK,SAAS;IACd,KAAK,aAAa;MAChB,OAAOC,gBAAK,CAACK,IAAI,CAACN,KAAK,CAAC;IAC1B,KAAK,SAAS;IACd,KAAK,QAAQ;MACX,OAAOC,gBAAK,CAACM,IAAI,CAACP,KAAK,CAAC;IAC1B;MACE,OAAOC,gBAAK,CAACC,MAAM,CAACF,KAAK,CAAC;EAC9B;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EAAE3B,KAAK,IAAI,SAAS,KAAKwB,KAAK,CAACb,EAAE,aAAakB,IAAI;MAC7G,CAAC;IACH;EACF;EACA,OAAO;IAAElB,EAAE,EAAEa,KAAK,CAACb;EAAG,CAAC;AACzB","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_stripAnsi","e","__esModule","default","colorPhase","phase","chalk","yellow","toUpperCase","green","red","blue","gray","isFailedPhase","p","stripComponentVersion","id","atIdx","indexOf","substring","resolveJobId","ripple","jobId","flags","opts","source","laneId","lane","getCurrentLaneId","lastExport","getLastExport","lastLaneStr","scope","name","undefined","rippleJobs","length","slug","job","getJobBySlug","error","phaseError","checkPhase","found","findLatestJobForLane","contextLabel","allowedPhases","status","includes","verb","actionVerb","formatAge","timestamp","ms","Date","now","getTime","Number","isFinite","seconds","Math","floor","minutes","hours","days"],"sources":["ripple-utils.ts"],"sourcesContent":["import chalk from 'chalk';\nimport stripAnsi from 'strip-ansi';\nimport type { LastExportData } from '@teambit/export';\nimport type { RippleMain, RippleJobFull } from './ripple.main.runtime';\n\nexport { stripAnsi };\n\nexport function colorPhase(phase?: string): string {\n if (!phase) return chalk.yellow('unknown');\n switch (phase.toUpperCase()) {\n case 'SUCCESS':\n return chalk.green(phase);\n case 'FAILED':\n case 'FAILURE':\n return chalk.red(phase);\n case 'RUNNING':\n case 'IN_PROGRESS':\n return chalk.blue(phase);\n case 'STOPPED':\n case 'PAUSED':\n return chalk.gray(phase);\n default:\n return chalk.yellow(phase);\n }\n}\n\nexport function isFailedPhase(phase?: string): boolean {\n const p = phase?.toUpperCase();\n return p === 'FAILURE' || p === 'FAILED';\n}\n\n/**\n * strip \"@hash\" or \"@version\" suffix from a component ID.\n * e.g. \"scope/name@abc123\" → \"scope/name\"\n */\nexport function stripComponentVersion(id: string): string {\n const atIdx = id.indexOf('@');\n return atIdx > 0 ? id.substring(0, atIdx) : id;\n}\n\nexport type ResolveSource = 'arg' | 'lane' | 'last-export';\n\nexport type ResolvedJobId =\n | { id: string; source: ResolveSource; lastExport?: LastExportData; job?: RippleJobFull }\n | { error: string };\n\n/**\n * resolve a job ID from explicit argument, --lane flag, current workspace lane, or the\n * last-export.json written by the export command (used when on main).\n * when opts.allowedPhases is set, the resolved job's phase is validated.\n */\nexport async function resolveJobId(\n ripple: RippleMain,\n jobId: string | undefined,\n flags: { lane?: string },\n opts?: { allowedPhases?: string[]; actionVerb?: string }\n): Promise<ResolvedJobId> {\n if (jobId) return { id: jobId, source: 'arg' };\n\n const laneId = flags.lane || ripple.getCurrentLaneId();\n const lastExport = await ripple.getLastExport();\n const lastLaneStr = lastExport?.lane ? `${lastExport.lane.scope}/${lastExport.lane.name}` : undefined;\n\n // prefer last-export when its lane matches the user's current context (or both are main).\n // last-export is per-workspace, so it identifies *this user's* last export — more specific than\n // the latest lane job, which might be someone else's.\n if (lastExport?.rippleJobs?.length && lastLaneStr === laneId) {\n const slug = lastExport.rippleJobs[lastExport.rippleJobs.length - 1];\n const job = await ripple.getJobBySlug(slug);\n if (!job) {\n return { error: `Could not find Ripple CI job for your last export \"${slug}\".` };\n }\n const phaseError = checkPhase(job, opts, 'Last export job');\n if (phaseError) return { error: phaseError };\n return { id: job.id, source: 'last-export', lastExport, job };\n }\n\n if (laneId) {\n const found = await ripple.findLatestJobForLane(laneId);\n if (!found) {\n return { error: `No Ripple CI job found for lane \"${laneId}\".` };\n }\n const phaseError = checkPhase(found, opts, `Latest job for lane \"${laneId}\"`);\n if (phaseError) return { error: phaseError };\n return { id: found.id, source: 'lane' };\n }\n\n return {\n error:\n 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace with a recent export.',\n };\n}\n\nfunction checkPhase(\n job: { id: string; status?: { phase?: string } },\n opts: { allowedPhases?: string[]; actionVerb?: string } | undefined,\n contextLabel: string\n): string | null {\n if (!opts?.allowedPhases) return null;\n const phase = job.status?.phase?.toUpperCase();\n if (opts.allowedPhases.includes(phase || '')) return null;\n const verb = opts.actionVerb || 'act on';\n return `${contextLabel} is ${job.status?.phase || 'unknown'} (${job.id}), cannot ${verb}. Provide a specific job ID.`;\n}\n\n/**\n * format a relative time delta (e.g. \"2 minutes ago\", \"3 days ago\") for a contextual header.\n */\nexport function formatAge(timestamp: string): string {\n const ms = Date.now() - new Date(timestamp).getTime();\n if (!Number.isFinite(ms) || ms < 0) return 'just now';\n const seconds = Math.floor(ms / 1000);\n if (seconds < 60) return 'just now';\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes} minute${minutes === 1 ? '' : 's'} ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours} hour${hours === 1 ? '' : 's'} ago`;\n const days = Math.floor(hours / 24);\n return `${days} day${days === 1 ? '' : 's'} ago`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmC,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAM5B,SAASG,UAAUA,CAACC,KAAc,EAAU;EACjD,IAAI,CAACA,KAAK,EAAE,OAAOC,gBAAK,CAACC,MAAM,CAAC,SAAS,CAAC;EAC1C,QAAQF,KAAK,CAACG,WAAW,CAAC,CAAC;IACzB,KAAK,SAAS;MACZ,OAAOF,gBAAK,CAACG,KAAK,CAACJ,KAAK,CAAC;IAC3B,KAAK,QAAQ;IACb,KAAK,SAAS;MACZ,OAAOC,gBAAK,CAACI,GAAG,CAACL,KAAK,CAAC;IACzB,KAAK,SAAS;IACd,KAAK,aAA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teambit/cli';
2
+ import type { LastExportData } from '@teambit/export';
2
3
  import type { RippleMain, RippleJob, CiGraphNode } from './ripple.main.runtime';
3
4
  export declare class RippleCmd implements Command {
4
5
  name: string;
@@ -69,18 +70,14 @@ export declare class RippleLogCmd implements Command {
69
70
  lane?: string;
70
71
  component?: string;
71
72
  }): Promise<{
72
- job: RippleJob & {
73
- hash?: string;
74
- ciGraph?: string;
75
- ciComponentGraph?: string;
76
- };
73
+ job: import("./ripple.main.runtime").RippleJobFull;
77
74
  componentBuild: import("./ripple.main.runtime").ComponentBuildSummary | null;
75
+ source: import("./ripple-utils").ResolveSource;
76
+ lastExport: LastExportData | undefined;
78
77
  } | {
79
- job: (RippleJob & {
80
- hash?: string;
81
- ciGraph?: string;
82
- ciComponentGraph?: string;
83
- }) | null;
78
+ job: import("./ripple.main.runtime").RippleJobFull | null;
79
+ source: import("./ripple-utils").ResolveSource | undefined;
80
+ lastExport: LastExportData | undefined;
84
81
  componentBuild?: undefined;
85
82
  }>;
86
83
  }
@@ -109,10 +106,14 @@ export declare class RippleErrorsCmd implements Command {
109
106
  job: null;
110
107
  ciNodes: never[];
111
108
  containerLogs: {};
109
+ source: "lane" | "arg" | "last-export" | undefined;
110
+ lastExport: LastExportData | undefined;
112
111
  } | {
113
112
  job: any;
114
113
  ciNodes: CiGraphNode[];
115
114
  containerLogs: Record<string, string[]>;
115
+ source: "lane" | "arg" | "last-export" | undefined;
116
+ lastExport: LastExportData | undefined;
116
117
  error?: undefined;
117
118
  }>;
118
119
  private getErrors;
@@ -29,6 +29,27 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
29
29
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
30
30
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
31
31
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
+ /**
33
+ * a last-export entry matches the target context when its saved lane equals the current lane
34
+ * (or both are undefined / "main"). this prevents using a stale last-export from a different lane
35
+ * after the user has switched lanes.
36
+ */
37
+ function lastExportMatchesTarget(last, targetLane) {
38
+ const lastLaneStr = last.lane ? `${last.lane.scope}/${last.lane.name}` : undefined;
39
+ return lastLaneStr === targetLane;
40
+ }
41
+ function lastExportHeader(lastExport, job) {
42
+ const age = (0, _rippleUtils().formatAge)(lastExport.timestamp);
43
+ const target = lastExport.lane ? `lane "${lastExport.lane.scope}/${lastExport.lane.name}"` : 'main';
44
+ const phase = job.status?.phase?.toUpperCase();
45
+ if (phase === 'SUCCESS') {
46
+ return _chalk().default.green(`✓ Your last export (${age}) to ${target} succeeded.`);
47
+ }
48
+ if ((0, _rippleUtils().isFailedPhase)(phase)) {
49
+ return _chalk().default.red(`✗ Your last export (${age}) to ${target} failed.`);
50
+ }
51
+ return _chalk().default.gray(`Your last export (${age}) to ${target} — status: ${(0, _rippleUtils().colorPhase)(phase)}.`);
52
+ }
32
53
  class RippleCmd {
33
54
  constructor() {
34
55
  _defineProperty(this, "name", 'ripple <sub-command>');
@@ -153,38 +174,49 @@ class RippleLogCmd {
153
174
  constructor(ripple) {
154
175
  this.ripple = ripple;
155
176
  _defineProperty(this, "name", 'log [job-id]');
156
- _defineProperty(this, "description", 'show job details and component build task summaries (auto-detects current lane when no job-id given)');
177
+ _defineProperty(this, "description", 'show job details and component build task summaries (auto-detects current lane, or your last export when on main)');
157
178
  _defineProperty(this, "skipWorkspace", true);
158
179
  _defineProperty(this, "remoteOp", true);
159
180
  _defineProperty(this, "alias", '');
160
181
  _defineProperty(this, "options", [['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'], ['c', 'component <component>', 'show build tasks for a specific component (full component ID)'], ['j', 'json', 'return the output as JSON']]);
161
182
  _defineProperty(this, "arguments", [{
162
183
  name: 'job-id',
163
- description: 'the Ripple CI job ID (optional — auto-detects from current lane)'
184
+ description: 'the Ripple CI job ID (optional — auto-detects from current lane, or your last export when on main)'
164
185
  }]);
165
186
  }
166
187
  async resolveJob(jobId, flags) {
167
- if (jobId) {
168
- return this.ripple.getJob(jobId);
169
- }
170
- const laneId = flags.lane || this.ripple.getCurrentLaneId();
171
- if (!laneId) return null;
172
- const found = await this.ripple.findLatestJobForLane(laneId);
173
- return found ? this.ripple.getJob(found.id) : null;
188
+ const resolved = await (0, _rippleUtils().resolveJobId)(this.ripple, jobId, flags);
189
+ if ('error' in resolved) return {
190
+ job: null,
191
+ error: resolved.error,
192
+ source: undefined,
193
+ lastExport: undefined
194
+ };
195
+ // when resolved from last-export, the resolver already fetched the full job — reuse it
196
+ const job = resolved.job ?? (await this.ripple.getJob(resolved.id));
197
+ return {
198
+ job,
199
+ error: undefined,
200
+ source: resolved.source,
201
+ lastExport: resolved.lastExport
202
+ };
174
203
  }
175
204
  async report([jobId], flags) {
176
- const job = await this.resolveJob(jobId, flags);
205
+ const {
206
+ job,
207
+ error,
208
+ source,
209
+ lastExport
210
+ } = await this.resolveJob(jobId, flags);
177
211
  if (!job) {
178
- if (!jobId) {
179
- const laneId = flags.lane || this.ripple.getCurrentLaneId();
180
- if (laneId) {
181
- return _chalk().default.red(`No Ripple CI job found for lane "${laneId}".`);
182
- }
183
- return _chalk().default.red('Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.');
184
- }
185
- return _chalk().default.red(`Job "${jobId}" not found.`);
212
+ if (jobId) return _chalk().default.red(`Job "${jobId}" not found.`);
213
+ return _chalk().default.red(error || 'Could not find a Ripple CI job.');
186
214
  }
187
215
  const lines = [];
216
+ if (source === 'last-export' && lastExport) {
217
+ lines.push(lastExportHeader(lastExport, job));
218
+ lines.push('');
219
+ }
188
220
  lines.push(_chalk().default.bold('Job Details'));
189
221
  lines.push(` ${_chalk().default.cyan('ID:')} ${job.id}`);
190
222
  if (job.name) lines.push(` ${_chalk().default.cyan('Name:')} ${job.name}`);
@@ -266,16 +298,24 @@ class RippleLogCmd {
266
298
  }
267
299
  }
268
300
  async json([jobId], flags) {
269
- const job = await this.resolveJob(jobId, flags);
301
+ const {
302
+ job,
303
+ source,
304
+ lastExport
305
+ } = await this.resolveJob(jobId, flags);
270
306
  if (flags.component && job) {
271
307
  const summary = await this.ripple.getComponentBuildSummary(job.id, flags.component);
272
308
  return {
273
309
  job,
274
- componentBuild: summary
310
+ componentBuild: summary,
311
+ source,
312
+ lastExport
275
313
  };
276
314
  }
277
315
  return {
278
- job
316
+ job,
317
+ source,
318
+ lastExport
279
319
  };
280
320
  }
281
321
  }
@@ -284,20 +324,23 @@ class RippleErrorsCmd {
284
324
  constructor(ripple) {
285
325
  this.ripple = ripple;
286
326
  _defineProperty(this, "name", 'errors [job-id]');
287
- _defineProperty(this, "description", 'show build errors for a Ripple CI job (auto-detects current lane when no job-id given)');
327
+ _defineProperty(this, "description", 'show build errors for a Ripple CI job (auto-detects current lane, or your last export when on main)');
288
328
  _defineProperty(this, "skipWorkspace", true);
289
329
  _defineProperty(this, "remoteOp", true);
290
330
  _defineProperty(this, "alias", '');
291
- _defineProperty(this, "options", [['', 'lane <lane>', 'lane ID to find the latest failed job for (default: detected from .bitmap)'], ['', 'log', 'show full build log for failed containers (not just the error summary)'], ['j', 'json', 'return the output as JSON']]);
331
+ _defineProperty(this, "options", [['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'], ['', 'log', 'show full build log for failed containers (not just the error summary)'], ['j', 'json', 'return the output as JSON']]);
292
332
  _defineProperty(this, "arguments", [{
293
333
  name: 'job-id',
294
- description: 'the Ripple CI job ID (optional — auto-detects from current lane)'
334
+ description: 'the Ripple CI job ID (optional — auto-detects from current lane, or your last export when on main)'
295
335
  }]);
296
336
  }
297
337
  async report([jobId], flags) {
298
338
  const {
299
339
  job,
300
- ciNodes
340
+ ciNodes,
341
+ source,
342
+ lastExport,
343
+ error
301
344
  } = await this.getErrors(jobId, flags);
302
345
  if (!job) {
303
346
  if (jobId) {
@@ -305,11 +348,15 @@ class RippleErrorsCmd {
305
348
  }
306
349
  const laneId = flags.lane || this.ripple.getCurrentLaneId();
307
350
  if (laneId) {
308
- return _chalk().default.red(`No failed Ripple CI job found for lane "${laneId}".`);
351
+ return _chalk().default.red(`No Ripple CI job found for lane "${laneId}".`);
309
352
  }
310
- return _chalk().default.red('Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.');
353
+ return _chalk().default.red(error || 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace with a recent export.');
311
354
  }
312
355
  const lines = [];
356
+ if (source === 'last-export' && lastExport) {
357
+ lines.push(lastExportHeader(lastExport, job));
358
+ lines.push('');
359
+ }
313
360
  lines.push(_chalk().default.bold(`Ripple CI Errors — ${job.name || job.id}`));
314
361
  lines.push(` ${_chalk().default.cyan('Job ID:')} ${job.id}`);
315
362
  lines.push(` ${_chalk().default.cyan('Status:')} ${(0, _rippleUtils().colorPhase)(job.status?.phase)}`);
@@ -383,14 +430,21 @@ class RippleErrorsCmd {
383
430
  async json([jobId], flags) {
384
431
  const {
385
432
  job,
386
- ciNodes
433
+ ciNodes,
434
+ source,
435
+ lastExport,
436
+ error
387
437
  } = await this.getErrors(jobId, flags);
388
- if (!job) return {
389
- error: 'No job found',
390
- job: null,
391
- ciNodes: [],
392
- containerLogs: {}
393
- };
438
+ if (!job) {
439
+ return {
440
+ error: error || 'No job found',
441
+ job: null,
442
+ ciNodes: [],
443
+ containerLogs: {},
444
+ source,
445
+ lastExport
446
+ };
447
+ }
394
448
 
395
449
  // fetch error logs for failed containers in parallel
396
450
  const failedNodes = ciNodes.filter(n => (0, _rippleUtils().isFailedPhase)(n.phase));
@@ -403,28 +457,47 @@ class RippleErrorsCmd {
403
457
  return {
404
458
  job,
405
459
  ciNodes,
406
- containerLogs
460
+ containerLogs,
461
+ source,
462
+ lastExport
407
463
  };
408
464
  }
409
465
  async getErrors(jobId, flags) {
410
- let job;
466
+ let job = null;
467
+ let source;
468
+ let lastExport;
411
469
  if (jobId) {
412
470
  job = await this.ripple.getJob(jobId);
471
+ source = 'arg';
413
472
  } else {
414
473
  const laneId = flags.lane || this.ripple.getCurrentLaneId();
415
- if (!laneId) {
416
- return {
417
- job: null,
418
- ciNodes: []
419
- };
474
+ const last = await this.ripple.getLastExport();
475
+ if (last?.rippleJobs?.length && lastExportMatchesTarget(last, laneId)) {
476
+ const slug = last.rippleJobs[last.rippleJobs.length - 1];
477
+ job = await this.ripple.getJobBySlug(slug);
478
+ source = 'last-export';
479
+ lastExport = last;
480
+ if (!job) {
481
+ return {
482
+ job: null,
483
+ ciNodes: [],
484
+ source: 'last-export',
485
+ lastExport: last,
486
+ error: `Could not find Ripple CI job for your last export "${slug}".`
487
+ };
488
+ }
489
+ } else if (laneId) {
490
+ const found = await this.ripple.findLatestJobForLane(laneId);
491
+ job = found ? await this.ripple.getJob(found.id) : null;
492
+ source = 'lane';
420
493
  }
421
- const found = await this.ripple.findLatestJobForLane(laneId, 'FAILURE');
422
- job = found ? await this.ripple.getJob(found.id) : null;
423
494
  }
424
495
  if (!job) {
425
496
  return {
426
497
  job: null,
427
- ciNodes: []
498
+ ciNodes: [],
499
+ source,
500
+ lastExport
428
501
  };
429
502
  }
430
503
 
@@ -432,7 +505,9 @@ class RippleErrorsCmd {
432
505
  const ciNodes = this.ripple.getCiGraphNodes(job);
433
506
  return {
434
507
  job,
435
- ciNodes
508
+ ciNodes,
509
+ source,
510
+ lastExport
436
511
  };
437
512
  }
438
513
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cliTable","_rippleUtils","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RippleCmd","constructor","report","code","exports","RippleListCmd","ripple","args","flags","jobs","ownerUsed","getFilteredJobs","length","hint","lane","scope","tip","chalk","yellow","table","Table","head","cyan","chars","top","bottom","left","mid","right","middle","style","job","push","id","truncate","name","getScopeFromLaneId","laneId","colorPhase","status","phase","user","username","formatDate","startedAt","formatDuration","finishedAt","header","gray","toString","filter","Boolean","join","json","requestedLimit","limit","parseInt","isFinite","Error","filters","all","owner","getDefaultOwner","owners","lanes","scopes","toUpperCase","needsClientFilter","fetchLimit","Math","max","listJobs","userFilter","toLowerCase","j","includes","slice","RippleLogCmd","description","resolveJob","jobId","getJob","getCurrentLaneId","found","findLatestJobForLane","red","lines","bold","displayName","Date","toLocaleString","jobUrl","getJobUrl","component","appendComponentDetail","appendComponentList","componentId","summary","getComponentBuildSummary","tasks","task","startTime","warnings","ciNodes","getCiGraphNodes","totalComponents","reduce","sum","n","componentIds","shown","node","compId","icon","isFailedPhase","green","componentBuild","RippleErrorsCmd","getErrors","failedNodes","succeededNodes","otherNodes","failedComponents","flatMap","blockedComponents","containerNames","map","containerName","logMap","getContainerLogs","compList","logMessages","get","errorLines","log","extractErrorsFromLog","msg","clean","stripAnsi","test","succeededCount","error","containerLogs","messages","RippleRetryCmd","resolved","resolveJobId","allowedPhases","actionVerb","result","retryJob","RippleStopCmd","stopJob","dateStr","start","getTime","end","now","ms","seconds","floor","minutes","remainingSeconds","hours","remainingMinutes","split","str","substring"],"sources":["ripple.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport Table from 'cli-table';\nimport type { RippleMain, RippleJob, CiGraphNode } from './ripple.main.runtime';\nimport { colorPhase, isFailedPhase, stripAnsi, resolveJobId } from './ripple-utils';\n\nexport class RippleCmd implements Command {\n name = 'ripple <sub-command>';\n description = 'manage Ripple CI jobs on bit.cloud';\n extendedDescription = 'view, retry, and manage Ripple CI jobs that build your components in the cloud after export.';\n group = 'collaborate';\n skipWorkspace = true;\n remoteOp = true;\n\n options: CommandOptions = [];\n commands: Command[] = [];\n\n async report() {\n return { code: 1, data: '[ripple] please specify a subcommand. See --help for available commands.' };\n }\n}\n\nexport class RippleListCmd implements Command {\n name = 'list';\n description = 'list recent Ripple CI jobs (filtered by workspace owner by default)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'all', 'show jobs from all owners, not just the workspace owner'],\n ['o', 'owner <owner>', 'filter by organization (default: detected from workspace defaultScope)'],\n ['s', 'scope <scope>', 'filter by scope (e.g. \"teambit.cloud\")'],\n ['', 'lane <lane>', 'filter by lane ID (e.g. \"scope/lane-name\")'],\n ['u', 'user <user>', 'filter by username'],\n ['', 'status <status>', 'filter by status (e.g. SUCCESS, FAILURE, RUNNING)'],\n ['l', 'limit <limit>', 'max number of jobs to show (default: 20)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report(\n args: [],\n flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }\n ) {\n const { jobs, ownerUsed } = await this.getFilteredJobs(flags);\n\n if (!jobs || jobs.length === 0) {\n let hint = '';\n if (flags.lane) hint = ` for lane \"${flags.lane}\"`;\n else if (flags.scope) hint = ` for scope \"${flags.scope}\"`;\n else if (ownerUsed) hint = ` for owner \"${ownerUsed}\"`;\n const tip = ownerUsed ? ' Use --all to see jobs from all owners.' : '';\n return chalk.yellow(`No Ripple CI jobs found${hint}.${tip}`);\n }\n\n const table = new Table({\n head: [\n chalk.cyan('Job ID'),\n chalk.cyan('Name'),\n chalk.cyan('Scope'),\n chalk.cyan('Status'),\n chalk.cyan('User'),\n chalk.cyan('Started'),\n chalk.cyan('Duration'),\n ],\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 1, 'padding-right': 1 },\n });\n\n for (const job of jobs) {\n table.push([\n job.id,\n truncate(job.name || '-', 40),\n getScopeFromLaneId(job.laneId),\n colorPhase(job.status?.phase),\n job.user?.username || '-',\n formatDate(job.status?.startedAt),\n formatDuration(job.status?.startedAt, job.status?.finishedAt),\n ]);\n }\n\n const header = ownerUsed ? chalk.gray(`showing jobs for owner \"${ownerUsed}\" (use --all for all jobs)`) : '';\n return [header, table.toString()].filter(Boolean).join('\\n');\n }\n\n async json(\n args: [],\n flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }\n ) {\n const { jobs } = await this.getFilteredJobs(flags);\n return { jobs: jobs || [] };\n }\n\n private async getFilteredJobs(flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }): Promise<{ jobs: RippleJob[]; ownerUsed?: string }> {\n const requestedLimit = flags.limit ? parseInt(flags.limit, 10) : 20;\n if (!Number.isFinite(requestedLimit) || requestedLimit < 1) {\n throw new Error(`Invalid --limit value \"${flags.limit}\". Expected a positive integer.`);\n }\n\n // build server-side filters\n const filters: { lanes?: string[]; owners?: string[]; scopes?: string[]; status?: string } = {};\n\n // determine owner for default filtering (skip when --lane or --scope is given explicitly)\n let ownerUsed: string | undefined;\n if (!flags.all && !flags.lane && !flags.scope) {\n ownerUsed = flags.owner || this.ripple.getDefaultOwner();\n } else if (flags.owner) {\n ownerUsed = flags.owner;\n }\n\n if (ownerUsed) filters.owners = [ownerUsed];\n if (flags.lane) filters.lanes = [flags.lane];\n if (flags.scope) filters.scopes = [flags.scope];\n if (flags.status) filters.status = flags.status.toUpperCase();\n\n // user filter is not supported server-side, so overfetch if needed\n const needsClientFilter = !!flags.user;\n const fetchLimit = needsClientFilter ? Math.max(requestedLimit * 5, 100) : requestedLimit;\n let jobs = await this.ripple.listJobs({ filters, limit: fetchLimit });\n\n // apply client-side filters for fields not supported by FilterOptions\n if (flags.user) {\n const userFilter = flags.user.toLowerCase();\n jobs = jobs.filter((j) => j.user?.username?.toLowerCase().includes(userFilter));\n }\n\n jobs = jobs.slice(0, requestedLimit);\n\n return { jobs, ownerUsed };\n }\n}\n\nexport class RippleLogCmd implements Command {\n name = 'log [job-id]';\n description = 'show job details and component build task summaries (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['c', 'component <component>', 'show build tasks for a specific component (full component ID)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [{ name: 'job-id', description: 'the Ripple CI job ID (optional — auto-detects from current lane)' }];\n\n constructor(private ripple: RippleMain) {}\n\n private async resolveJob(jobId: string | undefined, flags: { lane?: string }) {\n if (jobId) {\n return this.ripple.getJob(jobId);\n }\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n if (!laneId) return null;\n const found = await this.ripple.findLatestJobForLane(laneId);\n return found ? this.ripple.getJob(found.id) : null;\n }\n\n async report([jobId]: [string], flags: { lane?: string; component?: string }) {\n const job = await this.resolveJob(jobId, flags);\n if (!job) {\n if (!jobId) {\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n if (laneId) {\n return chalk.red(`No Ripple CI job found for lane \"${laneId}\".`);\n }\n return chalk.red(\n 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.'\n );\n }\n return chalk.red(`Job \"${jobId}\" not found.`);\n }\n\n const lines: string[] = [];\n lines.push(chalk.bold('Job Details'));\n lines.push(` ${chalk.cyan('ID:')} ${job.id}`);\n if (job.name) lines.push(` ${chalk.cyan('Name:')} ${job.name}`);\n lines.push(` ${chalk.cyan('Status:')} ${colorPhase(job.status?.phase)}`);\n if (job.laneId) lines.push(` ${chalk.cyan('Lane:')} ${job.laneId}`);\n if (job.user?.displayName)\n lines.push(` ${chalk.cyan('User:')} ${job.user.displayName} (${job.user.username})`);\n if (job.status?.startedAt)\n lines.push(` ${chalk.cyan('Started:')} ${new Date(job.status.startedAt).toLocaleString()}`);\n if (job.status?.finishedAt)\n lines.push(` ${chalk.cyan('Finished:')} ${new Date(job.status.finishedAt).toLocaleString()}`);\n const jobUrl = this.ripple.getJobUrl(job);\n lines.push(` ${chalk.cyan('URL:')} ${jobUrl}`);\n\n if (flags.component) {\n await this.appendComponentDetail(lines, job.id, flags.component);\n } else {\n this.appendComponentList(lines, job);\n }\n\n return lines.join('\\n');\n }\n\n private async appendComponentDetail(lines: string[], jobId: string, componentId: string) {\n const summary = await this.ripple.getComponentBuildSummary(jobId, componentId);\n if (!summary) {\n lines.push('');\n lines.push(chalk.yellow(`No build summary found for component \"${componentId}\" in this job.`));\n return;\n }\n lines.push('');\n lines.push(chalk.bold(`Build Tasks for ${summary.name || componentId}`));\n if (!summary.tasks || summary.tasks.length === 0) {\n lines.push(chalk.gray(' No build tasks found.'));\n return;\n }\n const table = new Table({\n head: [chalk.cyan('Task'), chalk.cyan('Status'), chalk.cyan('Started'), chalk.cyan('Warnings')],\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 1, 'padding-right': 1 },\n });\n for (const task of summary.tasks) {\n table.push([\n task.name || '-',\n colorPhase(task.status?.status),\n task.startTime ? new Date(task.startTime).toLocaleString() : '-',\n task.status?.warnings ? chalk.yellow(String(task.status.warnings)) : '0',\n ]);\n }\n lines.push(table.toString());\n }\n\n private appendComponentList(lines: string[], job: { ciGraph?: string }) {\n const ciNodes = this.ripple.getCiGraphNodes(job);\n if (ciNodes.length === 0) return;\n const totalComponents = ciNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n lines.push('');\n lines.push(chalk.bold(`Components (${totalComponents})`));\n lines.push(chalk.gray(' Use --component <id> to see build tasks for a specific component'));\n let shown = 0;\n for (const node of ciNodes) {\n if (shown >= 30) {\n lines.push(chalk.gray(` ... and ${totalComponents - shown} more`));\n break;\n }\n for (const compId of node.componentIds) {\n if (shown >= 30) break;\n const icon = isFailedPhase(node.phase)\n ? chalk.red('✗')\n : node.phase === 'SUCCESS'\n ? chalk.green('✓')\n : chalk.yellow('○');\n lines.push(` ${icon} ${compId}`);\n shown++;\n }\n }\n }\n\n async json([jobId]: [string], flags: { lane?: string; component?: string }) {\n const job = await this.resolveJob(jobId, flags);\n if (flags.component && job) {\n const summary = await this.ripple.getComponentBuildSummary(job.id, flags.component);\n return { job, componentBuild: summary };\n }\n return { job };\n }\n}\n\nexport class RippleErrorsCmd implements Command {\n name = 'errors [job-id]';\n description = 'show build errors for a Ripple CI job (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest failed job for (default: detected from .bitmap)'],\n ['', 'log', 'show full build log for failed containers (not just the error summary)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [{ name: 'job-id', description: 'the Ripple CI job ID (optional — auto-detects from current lane)' }];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string; log?: boolean }) {\n const { job, ciNodes } = await this.getErrors(jobId, flags);\n\n if (!job) {\n if (jobId) {\n return chalk.red(`Job \"${jobId}\" not found.`);\n }\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n if (laneId) {\n return chalk.red(`No failed Ripple CI job found for lane \"${laneId}\".`);\n }\n return chalk.red(\n 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace on a lane.'\n );\n }\n\n const lines: string[] = [];\n lines.push(chalk.bold(`Ripple CI Errors — ${job.name || job.id}`));\n lines.push(` ${chalk.cyan('Job ID:')} ${job.id}`);\n lines.push(` ${chalk.cyan('Status:')} ${colorPhase(job.status?.phase)}`);\n if (job.laneId) lines.push(` ${chalk.cyan('Lane:')} ${job.laneId}`);\n lines.push(` ${chalk.cyan('URL:')} ${this.ripple.getJobUrl(job)}`);\n\n if (ciNodes.length === 0) {\n lines.push('');\n lines.push(chalk.yellow('Could not determine which components are in this job.'));\n return lines.join('\\n');\n }\n\n const failedNodes = ciNodes.filter((n) => isFailedPhase(n.phase));\n const succeededNodes = ciNodes.filter((n) => n.phase === 'SUCCESS');\n const otherNodes = ciNodes.filter((n) => !isFailedPhase(n.phase) && n.phase !== 'SUCCESS');\n\n const totalComponents = ciNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n const failedComponents = failedNodes.flatMap((n) => n.componentIds);\n const blockedComponents = otherNodes.flatMap((n) => n.componentIds);\n\n if (failedComponents.length === 0) {\n if (job.status?.phase?.toUpperCase() === 'FAILURE') {\n lines.push('');\n lines.push(\n chalk.yellow(`${totalComponents} component(s) in this job — no individual component failures found.`)\n );\n lines.push(chalk.yellow('The failure may be in a pipeline-level step. Check the Ripple CI URL above.'));\n } else {\n lines.push('');\n lines.push(chalk.green(`All ${totalComponents} component(s) built successfully.`));\n }\n return lines.join('\\n');\n }\n\n lines.push('');\n lines.push(chalk.red.bold(`${failedComponents.length} component(s) with build failures:`));\n\n // fetch all build logs in parallel\n const containerNames = failedNodes.map((n) => n.containerName);\n const logMap = await this.ripple.getContainerLogs(job.id, containerNames);\n\n for (const node of failedNodes) {\n const compList = node.componentIds.join(', ');\n lines.push('');\n lines.push(chalk.bold(` ${compList}`));\n\n const logMessages = logMap.get(node.containerName);\n if (logMessages && logMessages.length > 0) {\n const errorLines = flags.log ? logMessages : this.ripple.extractErrorsFromLog(logMessages);\n if (errorLines.length > 0) {\n for (const msg of errorLines) {\n const clean = stripAnsi(msg);\n // skip stack trace lines (noisy) unless --log is used\n if (!flags.log && /^\\s+at\\s/.test(clean)) continue;\n if (clean.length > 0) {\n lines.push(` ${clean}`);\n }\n }\n } else {\n lines.push(chalk.gray(' No error details found in build log.'));\n }\n } else {\n lines.push(chalk.gray(' Build log not available.'));\n }\n }\n\n if (blockedComponents.length > 0) {\n lines.push('');\n lines.push(chalk.yellow(`${blockedComponents.length} component(s) not built (blocked by failure):`));\n for (const compId of blockedComponents) {\n lines.push(` ${chalk.yellow('○')} ${compId}`);\n }\n }\n\n if (succeededNodes.length > 0) {\n const succeededCount = succeededNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n lines.push('');\n lines.push(chalk.green(`${succeededCount} component(s) built successfully.`));\n }\n\n return lines.join('\\n');\n }\n\n async json([jobId]: [string], flags: { lane?: string; log?: boolean }) {\n const { job, ciNodes } = await this.getErrors(jobId, flags);\n if (!job) return { error: 'No job found', job: null, ciNodes: [], containerLogs: {} };\n\n // fetch error logs for failed containers in parallel\n const failedNodes = ciNodes.filter((n) => isFailedPhase(n.phase));\n const containerNames = failedNodes.map((n) => n.containerName);\n const logMap = await this.ripple.getContainerLogs(job.id, containerNames);\n const containerLogs: Record<string, string[]> = {};\n for (const [name, messages] of logMap) {\n containerLogs[name] = flags.log ? messages : this.ripple.extractErrorsFromLog(messages);\n }\n\n return { job, ciNodes, containerLogs };\n }\n\n private async getErrors(\n jobId: string | undefined,\n flags: { lane?: string }\n ): Promise<{\n job: any;\n ciNodes: CiGraphNode[];\n }> {\n let job;\n\n if (jobId) {\n job = await this.ripple.getJob(jobId);\n } else {\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n if (!laneId) {\n return { job: null, ciNodes: [] };\n }\n const found = await this.ripple.findLatestJobForLane(laneId, 'FAILURE');\n job = found ? await this.ripple.getJob(found.id) : null;\n }\n\n if (!job) {\n return { job: null, ciNodes: [] };\n }\n\n // use ciGraph (internal graph) for job-specific build status per container/component\n const ciNodes = this.ripple.getCiGraphNodes(job);\n\n return { job, ciNodes };\n }\n}\n\nexport class RippleRetryCmd implements Command {\n name = 'retry [job-id]';\n description = 'retry a failed Ripple CI job (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n { name: 'job-id', description: 'the Ripple CI job ID to retry (optional — auto-detects from current lane)' },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['FAILURE', 'FAILED'],\n actionVerb: 'retry',\n });\n if ('error' in resolved) return chalk.red(resolved.error);\n\n const result = await this.ripple.retryJob(resolved.id);\n if (!result) {\n return chalk.red(`Failed to retry job \"${resolved.id}\". Make sure the job exists and has failed.`);\n }\n const lines: string[] = [];\n lines.push(chalk.green(`Successfully retried job \"${resolved.id}\".`));\n if (result.id) lines.push(` ${chalk.cyan('New Job ID:')} ${result.id}`);\n if (result.status?.phase) lines.push(` ${chalk.cyan('Status:')} ${result.status.phase}`);\n const jobUrl = this.ripple.getJobUrl(result);\n lines.push(` ${chalk.cyan('URL:')} ${jobUrl}`);\n return lines.join('\\n');\n }\n\n async json([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['FAILURE', 'FAILED'],\n actionVerb: 'retry',\n });\n if ('error' in resolved) return { error: resolved.error };\n const result = await this.ripple.retryJob(resolved.id);\n return { job: result };\n }\n}\n\nexport class RippleStopCmd implements Command {\n name = 'stop [job-id]';\n description = 'stop a running Ripple CI job (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n { name: 'job-id', description: 'the Ripple CI job ID to stop (optional — auto-detects from current lane)' },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['RUNNING', 'IN_PROGRESS', 'PROCESSING'],\n actionVerb: 'stop',\n });\n if ('error' in resolved) return chalk.red(resolved.error);\n\n const result = await this.ripple.stopJob(resolved.id);\n if (!result) {\n return chalk.red(`Failed to stop job \"${resolved.id}\". Make sure the job exists and is currently running.`);\n }\n return chalk.green(`Successfully stopped job \"${resolved.id}\".`);\n }\n\n async json([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['RUNNING', 'IN_PROGRESS', 'PROCESSING'],\n actionVerb: 'stop',\n });\n if ('error' in resolved) return { error: resolved.error };\n const result = await this.ripple.stopJob(resolved.id);\n return { job: result };\n }\n}\n\nfunction formatDate(dateStr?: string): string {\n if (!dateStr) return '-';\n try {\n return new Date(dateStr).toLocaleString();\n } catch {\n return dateStr;\n }\n}\n\nfunction formatDuration(startedAt?: string, finishedAt?: string): string {\n if (!startedAt) return '-';\n const start = new Date(startedAt).getTime();\n const end = finishedAt ? new Date(finishedAt).getTime() : Date.now();\n const ms = end - start;\n if (ms < 0) return '-';\n const seconds = Math.floor(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n if (minutes < 60) return `${minutes}m ${remainingSeconds}s`;\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = minutes % 60;\n return `${hours}h ${remainingMinutes}m`;\n}\n\nfunction getScopeFromLaneId(laneId?: string): string {\n if (!laneId) return '-';\n return laneId.split('/')[0] || '-';\n}\n\nfunction truncate(str: string, max: number): string {\n if (str.length <= max) return str;\n return `${str.substring(0, max - 1)}…`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,S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GAAG,EAAE,EAAE,OAAO,GAAGA,OAAO,GAAG;EACtC,MAAME,OAAO,GAAG5F,IAAI,CAAC2F,KAAK,CAACD,OAAO,GAAG,EAAE,CAAC;EACxC,MAAMG,gBAAgB,GAAGH,OAAO,GAAG,EAAE;EACrC,IAAIE,OAAO,GAAG,EAAE,EAAE,OAAO,GAAGA,OAAO,KAAKC,gBAAgB,GAAG;EAC3D,MAAMC,KAAK,GAAG9F,IAAI,CAAC2F,KAAK,CAACC,OAAO,GAAG,EAAE,CAAC;EACtC,MAAMG,gBAAgB,GAAGH,OAAO,GAAG,EAAE;EACrC,OAAO,GAAGE,KAAK,KAAKC,gBAAgB,GAAG;AACzC;AAEA,SAAShI,kBAAkBA,CAACC,MAAe,EAAU;EACnD,IAAI,CAACA,MAAM,EAAE,OAAO,GAAG;EACvB,OAAOA,MAAM,CAACgI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG;AACpC;AAEA,SAASnI,QAAQA,CAACoI,GAAW,EAAEhG,GAAW,EAAU;EAClD,IAAIgG,GAAG,CAAC1J,MAAM,IAAI0D,GAAG,EAAE,OAAOgG,GAAG;EACjC,OAAO,GAAGA,GAAG,CAACC,SAAS,CAAC,CAAC,EAAEjG,GAAG,GAAG,CAAC,CAAC,GAAG;AACxC","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_cliTable","_rippleUtils","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","lastExportMatchesTarget","last","targetLane","lastLaneStr","lane","scope","name","undefined","lastExportHeader","lastExport","job","age","formatAge","timestamp","target","phase","status","toUpperCase","chalk","green","isFailedPhase","red","gray","colorPhase","RippleCmd","constructor","report","code","exports","RippleListCmd","ripple","args","flags","jobs","ownerUsed","getFilteredJobs","length","hint","tip","yellow","table","Table","head","cyan","chars","top","bottom","left","mid","right","middle","style","push","id","truncate","getScopeFromLaneId","laneId","user","username","formatDate","startedAt","formatDuration","finishedAt","header","toString","filter","Boolean","join","json","requestedLimit","limit","parseInt","isFinite","Error","filters","all","owner","getDefaultOwner","owners","lanes","scopes","needsClientFilter","fetchLimit","Math","max","listJobs","userFilter","toLowerCase","j","includes","slice","RippleLogCmd","description","resolveJob","jobId","resolved","resolveJobId","error","source","getJob","lines","bold","displayName","Date","toLocaleString","jobUrl","getJobUrl","component","appendComponentDetail","appendComponentList","componentId","summary","getComponentBuildSummary","tasks","task","startTime","warnings","ciNodes","getCiGraphNodes","totalComponents","reduce","sum","n","componentIds","shown","node","compId","icon","componentBuild","RippleErrorsCmd","getErrors","getCurrentLaneId","failedNodes","succeededNodes","otherNodes","failedComponents","flatMap","blockedComponents","containerNames","map","containerName","logMap","getContainerLogs","compList","logMessages","get","errorLines","log","extractErrorsFromLog","msg","clean","stripAnsi","test","succeededCount","containerLogs","messages","getLastExport","rippleJobs","slug","getJobBySlug","found","findLatestJobForLane","RippleRetryCmd","allowedPhases","actionVerb","result","retryJob","RippleStopCmd","stopJob","dateStr","start","getTime","end","now","ms","seconds","floor","minutes","remainingSeconds","hours","remainingMinutes","split","str","substring"],"sources":["ripple.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport Table from 'cli-table';\nimport type { LastExportData } from '@teambit/export';\nimport type { RippleMain, RippleJob, CiGraphNode } from './ripple.main.runtime';\nimport { colorPhase, isFailedPhase, stripAnsi, resolveJobId, formatAge } from './ripple-utils';\n\n/**\n * a last-export entry matches the target context when its saved lane equals the current lane\n * (or both are undefined / \"main\"). this prevents using a stale last-export from a different lane\n * after the user has switched lanes.\n */\nfunction lastExportMatchesTarget(last: LastExportData, targetLane: string | undefined): boolean {\n const lastLaneStr = last.lane ? `${last.lane.scope}/${last.lane.name}` : undefined;\n return lastLaneStr === targetLane;\n}\n\nfunction lastExportHeader(lastExport: LastExportData, job: { status?: { phase?: string } }): string {\n const age = formatAge(lastExport.timestamp);\n const target = lastExport.lane ? `lane \"${lastExport.lane.scope}/${lastExport.lane.name}\"` : 'main';\n const phase = job.status?.phase?.toUpperCase();\n if (phase === 'SUCCESS') {\n return chalk.green(`✓ Your last export (${age}) to ${target} succeeded.`);\n }\n if (isFailedPhase(phase)) {\n return chalk.red(`✗ Your last export (${age}) to ${target} failed.`);\n }\n return chalk.gray(`Your last export (${age}) to ${target} — status: ${colorPhase(phase)}.`);\n}\n\nexport class RippleCmd implements Command {\n name = 'ripple <sub-command>';\n description = 'manage Ripple CI jobs on bit.cloud';\n extendedDescription = 'view, retry, and manage Ripple CI jobs that build your components in the cloud after export.';\n group = 'collaborate';\n skipWorkspace = true;\n remoteOp = true;\n\n options: CommandOptions = [];\n commands: Command[] = [];\n\n async report() {\n return { code: 1, data: '[ripple] please specify a subcommand. See --help for available commands.' };\n }\n}\n\nexport class RippleListCmd implements Command {\n name = 'list';\n description = 'list recent Ripple CI jobs (filtered by workspace owner by default)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'all', 'show jobs from all owners, not just the workspace owner'],\n ['o', 'owner <owner>', 'filter by organization (default: detected from workspace defaultScope)'],\n ['s', 'scope <scope>', 'filter by scope (e.g. \"teambit.cloud\")'],\n ['', 'lane <lane>', 'filter by lane ID (e.g. \"scope/lane-name\")'],\n ['u', 'user <user>', 'filter by username'],\n ['', 'status <status>', 'filter by status (e.g. SUCCESS, FAILURE, RUNNING)'],\n ['l', 'limit <limit>', 'max number of jobs to show (default: 20)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report(\n args: [],\n flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }\n ) {\n const { jobs, ownerUsed } = await this.getFilteredJobs(flags);\n\n if (!jobs || jobs.length === 0) {\n let hint = '';\n if (flags.lane) hint = ` for lane \"${flags.lane}\"`;\n else if (flags.scope) hint = ` for scope \"${flags.scope}\"`;\n else if (ownerUsed) hint = ` for owner \"${ownerUsed}\"`;\n const tip = ownerUsed ? ' Use --all to see jobs from all owners.' : '';\n return chalk.yellow(`No Ripple CI jobs found${hint}.${tip}`);\n }\n\n const table = new Table({\n head: [\n chalk.cyan('Job ID'),\n chalk.cyan('Name'),\n chalk.cyan('Scope'),\n chalk.cyan('Status'),\n chalk.cyan('User'),\n chalk.cyan('Started'),\n chalk.cyan('Duration'),\n ],\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 1, 'padding-right': 1 },\n });\n\n for (const job of jobs) {\n table.push([\n job.id,\n truncate(job.name || '-', 40),\n getScopeFromLaneId(job.laneId),\n colorPhase(job.status?.phase),\n job.user?.username || '-',\n formatDate(job.status?.startedAt),\n formatDuration(job.status?.startedAt, job.status?.finishedAt),\n ]);\n }\n\n const header = ownerUsed ? chalk.gray(`showing jobs for owner \"${ownerUsed}\" (use --all for all jobs)`) : '';\n return [header, table.toString()].filter(Boolean).join('\\n');\n }\n\n async json(\n args: [],\n flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }\n ) {\n const { jobs } = await this.getFilteredJobs(flags);\n return { jobs: jobs || [] };\n }\n\n private async getFilteredJobs(flags: {\n all?: boolean;\n owner?: string;\n scope?: string;\n lane?: string;\n user?: string;\n status?: string;\n limit?: string;\n }): Promise<{ jobs: RippleJob[]; ownerUsed?: string }> {\n const requestedLimit = flags.limit ? parseInt(flags.limit, 10) : 20;\n if (!Number.isFinite(requestedLimit) || requestedLimit < 1) {\n throw new Error(`Invalid --limit value \"${flags.limit}\". Expected a positive integer.`);\n }\n\n // build server-side filters\n const filters: { lanes?: string[]; owners?: string[]; scopes?: string[]; status?: string } = {};\n\n // determine owner for default filtering (skip when --lane or --scope is given explicitly)\n let ownerUsed: string | undefined;\n if (!flags.all && !flags.lane && !flags.scope) {\n ownerUsed = flags.owner || this.ripple.getDefaultOwner();\n } else if (flags.owner) {\n ownerUsed = flags.owner;\n }\n\n if (ownerUsed) filters.owners = [ownerUsed];\n if (flags.lane) filters.lanes = [flags.lane];\n if (flags.scope) filters.scopes = [flags.scope];\n if (flags.status) filters.status = flags.status.toUpperCase();\n\n // user filter is not supported server-side, so overfetch if needed\n const needsClientFilter = !!flags.user;\n const fetchLimit = needsClientFilter ? Math.max(requestedLimit * 5, 100) : requestedLimit;\n let jobs = await this.ripple.listJobs({ filters, limit: fetchLimit });\n\n // apply client-side filters for fields not supported by FilterOptions\n if (flags.user) {\n const userFilter = flags.user.toLowerCase();\n jobs = jobs.filter((j) => j.user?.username?.toLowerCase().includes(userFilter));\n }\n\n jobs = jobs.slice(0, requestedLimit);\n\n return { jobs, ownerUsed };\n }\n}\n\nexport class RippleLogCmd implements Command {\n name = 'log [job-id]';\n description =\n 'show job details and component build task summaries (auto-detects current lane, or your last export when on main)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['c', 'component <component>', 'show build tasks for a specific component (full component ID)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n {\n name: 'job-id',\n description: 'the Ripple CI job ID (optional — auto-detects from current lane, or your last export when on main)',\n },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n private async resolveJob(jobId: string | undefined, flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags);\n if ('error' in resolved) return { job: null, error: resolved.error, source: undefined, lastExport: undefined };\n // when resolved from last-export, the resolver already fetched the full job — reuse it\n const job = resolved.job ?? (await this.ripple.getJob(resolved.id));\n return { job, error: undefined, source: resolved.source, lastExport: resolved.lastExport };\n }\n\n async report([jobId]: [string], flags: { lane?: string; component?: string }) {\n const { job, error, source, lastExport } = await this.resolveJob(jobId, flags);\n if (!job) {\n if (jobId) return chalk.red(`Job \"${jobId}\" not found.`);\n return chalk.red(error || 'Could not find a Ripple CI job.');\n }\n\n const lines: string[] = [];\n if (source === 'last-export' && lastExport) {\n lines.push(lastExportHeader(lastExport, job));\n lines.push('');\n }\n lines.push(chalk.bold('Job Details'));\n lines.push(` ${chalk.cyan('ID:')} ${job.id}`);\n if (job.name) lines.push(` ${chalk.cyan('Name:')} ${job.name}`);\n lines.push(` ${chalk.cyan('Status:')} ${colorPhase(job.status?.phase)}`);\n if (job.laneId) lines.push(` ${chalk.cyan('Lane:')} ${job.laneId}`);\n if (job.user?.displayName)\n lines.push(` ${chalk.cyan('User:')} ${job.user.displayName} (${job.user.username})`);\n if (job.status?.startedAt)\n lines.push(` ${chalk.cyan('Started:')} ${new Date(job.status.startedAt).toLocaleString()}`);\n if (job.status?.finishedAt)\n lines.push(` ${chalk.cyan('Finished:')} ${new Date(job.status.finishedAt).toLocaleString()}`);\n const jobUrl = this.ripple.getJobUrl(job);\n lines.push(` ${chalk.cyan('URL:')} ${jobUrl}`);\n\n if (flags.component) {\n await this.appendComponentDetail(lines, job.id, flags.component);\n } else {\n this.appendComponentList(lines, job);\n }\n\n return lines.join('\\n');\n }\n\n private async appendComponentDetail(lines: string[], jobId: string, componentId: string) {\n const summary = await this.ripple.getComponentBuildSummary(jobId, componentId);\n if (!summary) {\n lines.push('');\n lines.push(chalk.yellow(`No build summary found for component \"${componentId}\" in this job.`));\n return;\n }\n lines.push('');\n lines.push(chalk.bold(`Build Tasks for ${summary.name || componentId}`));\n if (!summary.tasks || summary.tasks.length === 0) {\n lines.push(chalk.gray(' No build tasks found.'));\n return;\n }\n const table = new Table({\n head: [chalk.cyan('Task'), chalk.cyan('Status'), chalk.cyan('Started'), chalk.cyan('Warnings')],\n chars: {\n top: '',\n 'top-mid': '',\n 'top-left': '',\n 'top-right': '',\n bottom: '',\n 'bottom-mid': '',\n 'bottom-left': '',\n 'bottom-right': '',\n left: '',\n 'left-mid': '',\n mid: '',\n 'mid-mid': '',\n right: '',\n 'right-mid': '',\n middle: ' ',\n },\n style: { 'padding-left': 1, 'padding-right': 1 },\n });\n for (const task of summary.tasks) {\n table.push([\n task.name || '-',\n colorPhase(task.status?.status),\n task.startTime ? new Date(task.startTime).toLocaleString() : '-',\n task.status?.warnings ? chalk.yellow(String(task.status.warnings)) : '0',\n ]);\n }\n lines.push(table.toString());\n }\n\n private appendComponentList(lines: string[], job: { ciGraph?: string }) {\n const ciNodes = this.ripple.getCiGraphNodes(job);\n if (ciNodes.length === 0) return;\n const totalComponents = ciNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n lines.push('');\n lines.push(chalk.bold(`Components (${totalComponents})`));\n lines.push(chalk.gray(' Use --component <id> to see build tasks for a specific component'));\n let shown = 0;\n for (const node of ciNodes) {\n if (shown >= 30) {\n lines.push(chalk.gray(` ... and ${totalComponents - shown} more`));\n break;\n }\n for (const compId of node.componentIds) {\n if (shown >= 30) break;\n const icon = isFailedPhase(node.phase)\n ? chalk.red('✗')\n : node.phase === 'SUCCESS'\n ? chalk.green('✓')\n : chalk.yellow('○');\n lines.push(` ${icon} ${compId}`);\n shown++;\n }\n }\n }\n\n async json([jobId]: [string], flags: { lane?: string; component?: string }) {\n const { job, source, lastExport } = await this.resolveJob(jobId, flags);\n if (flags.component && job) {\n const summary = await this.ripple.getComponentBuildSummary(job.id, flags.component);\n return { job, componentBuild: summary, source, lastExport };\n }\n return { job, source, lastExport };\n }\n}\n\nexport class RippleErrorsCmd implements Command {\n name = 'errors [job-id]';\n description = 'show build errors for a Ripple CI job (auto-detects current lane, or your last export when on main)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['', 'log', 'show full build log for failed containers (not just the error summary)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n {\n name: 'job-id',\n description: 'the Ripple CI job ID (optional — auto-detects from current lane, or your last export when on main)',\n },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string; log?: boolean }) {\n const { job, ciNodes, source, lastExport, error } = await this.getErrors(jobId, flags);\n\n if (!job) {\n if (jobId) {\n return chalk.red(`Job \"${jobId}\" not found.`);\n }\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n if (laneId) {\n return chalk.red(`No Ripple CI job found for lane \"${laneId}\".`);\n }\n return chalk.red(\n error ||\n 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace with a recent export.'\n );\n }\n\n const lines: string[] = [];\n if (source === 'last-export' && lastExport) {\n lines.push(lastExportHeader(lastExport, job));\n lines.push('');\n }\n lines.push(chalk.bold(`Ripple CI Errors — ${job.name || job.id}`));\n lines.push(` ${chalk.cyan('Job ID:')} ${job.id}`);\n lines.push(` ${chalk.cyan('Status:')} ${colorPhase(job.status?.phase)}`);\n if (job.laneId) lines.push(` ${chalk.cyan('Lane:')} ${job.laneId}`);\n lines.push(` ${chalk.cyan('URL:')} ${this.ripple.getJobUrl(job)}`);\n\n if (ciNodes.length === 0) {\n lines.push('');\n lines.push(chalk.yellow('Could not determine which components are in this job.'));\n return lines.join('\\n');\n }\n\n const failedNodes = ciNodes.filter((n) => isFailedPhase(n.phase));\n const succeededNodes = ciNodes.filter((n) => n.phase === 'SUCCESS');\n const otherNodes = ciNodes.filter((n) => !isFailedPhase(n.phase) && n.phase !== 'SUCCESS');\n\n const totalComponents = ciNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n const failedComponents = failedNodes.flatMap((n) => n.componentIds);\n const blockedComponents = otherNodes.flatMap((n) => n.componentIds);\n\n if (failedComponents.length === 0) {\n if (job.status?.phase?.toUpperCase() === 'FAILURE') {\n lines.push('');\n lines.push(\n chalk.yellow(`${totalComponents} component(s) in this job — no individual component failures found.`)\n );\n lines.push(chalk.yellow('The failure may be in a pipeline-level step. Check the Ripple CI URL above.'));\n } else {\n lines.push('');\n lines.push(chalk.green(`All ${totalComponents} component(s) built successfully.`));\n }\n return lines.join('\\n');\n }\n\n lines.push('');\n lines.push(chalk.red.bold(`${failedComponents.length} component(s) with build failures:`));\n\n // fetch all build logs in parallel\n const containerNames = failedNodes.map((n) => n.containerName);\n const logMap = await this.ripple.getContainerLogs(job.id, containerNames);\n\n for (const node of failedNodes) {\n const compList = node.componentIds.join(', ');\n lines.push('');\n lines.push(chalk.bold(` ${compList}`));\n\n const logMessages = logMap.get(node.containerName);\n if (logMessages && logMessages.length > 0) {\n const errorLines = flags.log ? logMessages : this.ripple.extractErrorsFromLog(logMessages);\n if (errorLines.length > 0) {\n for (const msg of errorLines) {\n const clean = stripAnsi(msg);\n // skip stack trace lines (noisy) unless --log is used\n if (!flags.log && /^\\s+at\\s/.test(clean)) continue;\n if (clean.length > 0) {\n lines.push(` ${clean}`);\n }\n }\n } else {\n lines.push(chalk.gray(' No error details found in build log.'));\n }\n } else {\n lines.push(chalk.gray(' Build log not available.'));\n }\n }\n\n if (blockedComponents.length > 0) {\n lines.push('');\n lines.push(chalk.yellow(`${blockedComponents.length} component(s) not built (blocked by failure):`));\n for (const compId of blockedComponents) {\n lines.push(` ${chalk.yellow('○')} ${compId}`);\n }\n }\n\n if (succeededNodes.length > 0) {\n const succeededCount = succeededNodes.reduce((sum, n) => sum + n.componentIds.length, 0);\n lines.push('');\n lines.push(chalk.green(`${succeededCount} component(s) built successfully.`));\n }\n\n return lines.join('\\n');\n }\n\n async json([jobId]: [string], flags: { lane?: string; log?: boolean }) {\n const { job, ciNodes, source, lastExport, error } = await this.getErrors(jobId, flags);\n if (!job) {\n return { error: error || 'No job found', job: null, ciNodes: [], containerLogs: {}, source, lastExport };\n }\n\n // fetch error logs for failed containers in parallel\n const failedNodes = ciNodes.filter((n) => isFailedPhase(n.phase));\n const containerNames = failedNodes.map((n) => n.containerName);\n const logMap = await this.ripple.getContainerLogs(job.id, containerNames);\n const containerLogs: Record<string, string[]> = {};\n for (const [name, messages] of logMap) {\n containerLogs[name] = flags.log ? messages : this.ripple.extractErrorsFromLog(messages);\n }\n\n return { job, ciNodes, containerLogs, source, lastExport };\n }\n\n private async getErrors(\n jobId: string | undefined,\n flags: { lane?: string }\n ): Promise<{\n job: any;\n ciNodes: CiGraphNode[];\n source?: 'arg' | 'lane' | 'last-export';\n lastExport?: LastExportData;\n error?: string;\n }> {\n let job: any = null;\n let source: 'arg' | 'lane' | 'last-export' | undefined;\n let lastExport: LastExportData | undefined;\n\n if (jobId) {\n job = await this.ripple.getJob(jobId);\n source = 'arg';\n } else {\n const laneId = flags.lane || this.ripple.getCurrentLaneId();\n const last = await this.ripple.getLastExport();\n if (last?.rippleJobs?.length && lastExportMatchesTarget(last, laneId)) {\n const slug = last.rippleJobs[last.rippleJobs.length - 1];\n job = await this.ripple.getJobBySlug(slug);\n source = 'last-export';\n lastExport = last;\n if (!job) {\n return {\n job: null,\n ciNodes: [],\n source: 'last-export',\n lastExport: last,\n error: `Could not find Ripple CI job for your last export \"${slug}\".`,\n };\n }\n } else if (laneId) {\n const found = await this.ripple.findLatestJobForLane(laneId);\n job = found ? await this.ripple.getJob(found.id) : null;\n source = 'lane';\n }\n }\n\n if (!job) {\n return { job: null, ciNodes: [], source, lastExport };\n }\n\n // use ciGraph (internal graph) for job-specific build status per container/component\n const ciNodes = this.ripple.getCiGraphNodes(job);\n\n return { job, ciNodes, source, lastExport };\n }\n}\n\nexport class RippleRetryCmd implements Command {\n name = 'retry [job-id]';\n description = 'retry a failed Ripple CI job (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n { name: 'job-id', description: 'the Ripple CI job ID to retry (optional — auto-detects from current lane)' },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['FAILURE', 'FAILED'],\n actionVerb: 'retry',\n });\n if ('error' in resolved) return chalk.red(resolved.error);\n\n const result = await this.ripple.retryJob(resolved.id);\n if (!result) {\n return chalk.red(`Failed to retry job \"${resolved.id}\". Make sure the job exists and has failed.`);\n }\n const lines: string[] = [];\n lines.push(chalk.green(`Successfully retried job \"${resolved.id}\".`));\n if (result.id) lines.push(` ${chalk.cyan('New Job ID:')} ${result.id}`);\n if (result.status?.phase) lines.push(` ${chalk.cyan('Status:')} ${result.status.phase}`);\n const jobUrl = this.ripple.getJobUrl(result);\n lines.push(` ${chalk.cyan('URL:')} ${jobUrl}`);\n return lines.join('\\n');\n }\n\n async json([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['FAILURE', 'FAILED'],\n actionVerb: 'retry',\n });\n if ('error' in resolved) return { error: resolved.error };\n const result = await this.ripple.retryJob(resolved.id);\n return { job: result };\n }\n}\n\nexport class RippleStopCmd implements Command {\n name = 'stop [job-id]';\n description = 'stop a running Ripple CI job (auto-detects current lane when no job-id given)';\n skipWorkspace = true;\n remoteOp = true;\n alias = '';\n\n options: CommandOptions = [\n ['', 'lane <lane>', 'lane ID to find the latest job for (default: detected from .bitmap)'],\n ['j', 'json', 'return the output as JSON'],\n ];\n\n arguments = [\n { name: 'job-id', description: 'the Ripple CI job ID to stop (optional — auto-detects from current lane)' },\n ];\n\n constructor(private ripple: RippleMain) {}\n\n async report([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['RUNNING', 'IN_PROGRESS', 'PROCESSING'],\n actionVerb: 'stop',\n });\n if ('error' in resolved) return chalk.red(resolved.error);\n\n const result = await this.ripple.stopJob(resolved.id);\n if (!result) {\n return chalk.red(`Failed to stop job \"${resolved.id}\". Make sure the job exists and is currently running.`);\n }\n return chalk.green(`Successfully stopped job \"${resolved.id}\".`);\n }\n\n async json([jobId]: [string], flags: { lane?: string }) {\n const resolved = await resolveJobId(this.ripple, jobId, flags, {\n allowedPhases: ['RUNNING', 'IN_PROGRESS', 'PROCESSING'],\n actionVerb: 'stop',\n });\n if ('error' in resolved) return { error: resolved.error };\n const result = await this.ripple.stopJob(resolved.id);\n return { job: result };\n }\n}\n\nfunction formatDate(dateStr?: string): string {\n if (!dateStr) return '-';\n try {\n return new Date(dateStr).toLocaleString();\n } catch {\n return dateStr;\n }\n}\n\nfunction formatDuration(startedAt?: string, finishedAt?: string): string {\n if (!startedAt) return '-';\n const start = new Date(startedAt).getTime();\n const end = finishedAt ? new Date(finishedAt).getTime() : Date.now();\n const ms = end - start;\n if (ms < 0) return '-';\n const seconds = Math.floor(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n if (minutes < 60) return `${minutes}m ${remainingSeconds}s`;\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = minutes % 60;\n return `${hours}h ${remainingMinutes}m`;\n}\n\nfunction getScopeFromLaneId(laneId?: string): string {\n if (!laneId) return '-';\n return laneId.split('/')[0] || '-';\n}\n\nfunction truncate(str: string, max: number): string {\n if (str.length <= max) return str;\n return `${str.substring(0, max - 1)}…`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,aAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAA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EACxC,MAAMG,gBAAgB,GAAGH,OAAO,GAAG,EAAE;EACrC,IAAIE,OAAO,GAAG,EAAE,EAAE,OAAO,GAAGA,OAAO,KAAKC,gBAAgB,GAAG;EAC3D,MAAMC,KAAK,GAAGhG,IAAI,CAAC6F,KAAK,CAACC,OAAO,GAAG,EAAE,CAAC;EACtC,MAAMG,gBAAgB,GAAGH,OAAO,GAAG,EAAE;EACrC,OAAO,GAAGE,KAAK,KAAKC,gBAAgB,GAAG;AACzC;AAEA,SAAS7H,kBAAkBA,CAACC,MAAe,EAAU;EACnD,IAAI,CAACA,MAAM,EAAE,OAAO,GAAG;EACvB,OAAOA,MAAM,CAAC6H,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG;AACpC;AAEA,SAAS/H,QAAQA,CAACgI,GAAW,EAAElG,GAAW,EAAU;EAClD,IAAIkG,GAAG,CAAClJ,MAAM,IAAIgD,GAAG,EAAE,OAAOkG,GAAG;EACjC,OAAO,GAAGA,GAAG,CAACC,SAAS,CAAC,CAAC,EAAEnG,GAAG,GAAG,CAAC,CAAC,GAAG;AACxC","ignoreList":[]}
@@ -3,6 +3,7 @@ import { type CLIMain } from '@teambit/cli';
3
3
  import { type LoggerMain, type Logger } from '@teambit/logger';
4
4
  import { type CloudMain } from '@teambit/cloud';
5
5
  import type { Workspace } from '@teambit/workspace';
6
+ import { type LastExportData } from '@teambit/export';
6
7
  export type JobStatus = {
7
8
  startedAt?: string;
8
9
  finishedAt?: string;
@@ -10,6 +11,8 @@ export type JobStatus = {
10
11
  };
11
12
  export type RippleJob = {
12
13
  id: string;
14
+ /** url-safe identifier used by the cloud UI; the bit.cloud /ripple-ci/job/ page resolves by slug, not id */
15
+ slug?: string;
13
16
  name?: string;
14
17
  laneId?: string;
15
18
  simulation?: boolean;
@@ -19,6 +22,11 @@ export type RippleJob = {
19
22
  };
20
23
  status?: JobStatus;
21
24
  };
25
+ export type RippleJobFull = RippleJob & {
26
+ hash?: string;
27
+ ciGraph?: string;
28
+ ciComponentGraph?: string;
29
+ };
22
30
  export type BuildTaskStatus = {
23
31
  status?: string;
24
32
  warnings?: number;
@@ -48,6 +56,7 @@ export declare class RippleMain {
48
56
  constructor(cloud: CloudMain, logger: Logger, workspace?: Workspace | undefined);
49
57
  private static LIST_JOBS;
50
58
  private static GET_JOB;
59
+ private static GET_JOB_BY_SLUG;
51
60
  private static GET_COMPONENT_BUILD_SUMMARY;
52
61
  private static RETRY_JOB;
53
62
  private static STOP_JOB;
@@ -63,11 +72,7 @@ export declare class RippleMain {
63
72
  status?: string;
64
73
  };
65
74
  }): Promise<RippleJob[]>;
66
- getJob(jobId: string): Promise<(RippleJob & {
67
- hash?: string;
68
- ciGraph?: string;
69
- ciComponentGraph?: string;
70
- }) | null>;
75
+ getJob(jobId: string): Promise<RippleJobFull | null>;
71
76
  /**
72
77
  * parse a job's ciGraph (internal graph) to extract per-node build status.
73
78
  * ciGraph has the job-specific build results (unlike ciComponentGraph which is static).
@@ -98,6 +103,16 @@ export declare class RippleMain {
98
103
  * returns the laneId in "scope/lane-name" format, or undefined if not on a lane.
99
104
  */
100
105
  getCurrentLaneId(): string | undefined;
106
+ /**
107
+ * read the last-export.json written by ExportMain after a successful export.
108
+ * used to auto-resolve the ripple job when the user is on main (no current lane).
109
+ */
110
+ getLastExport(): Promise<LastExportData | null>;
111
+ /**
112
+ * the central-hub returns url slugs in `metadata.jobs`, not the GraphQL job ids accepted by getJob(jobId).
113
+ * the schema also supports getJob(slug: ID!), which we use here to fetch the job directly from a slug.
114
+ */
115
+ getJobBySlug(slug: string): Promise<RippleJobFull | null>;
101
116
  /**
102
117
  * find the latest job for a given laneId, optionally filtered by status phase.
103
118
  */
@@ -39,6 +39,13 @@ function _legacy() {
39
39
  };
40
40
  return data;
41
41
  }
42
+ function _export() {
43
+ const data = require("@teambit/export");
44
+ _export = function () {
45
+ return data;
46
+ };
47
+ return data;
48
+ }
42
49
  function _rippleUtils() {
43
50
  const data = require("./ripple-utils");
44
51
  _rippleUtils = function () {
@@ -285,6 +292,26 @@ class RippleMain {
285
292
  return laneId.toString();
286
293
  }
287
294
 
295
+ /**
296
+ * read the last-export.json written by ExportMain after a successful export.
297
+ * used to auto-resolve the ripple job when the user is on main (no current lane).
298
+ */
299
+ async getLastExport() {
300
+ if (!this.workspace) return null;
301
+ return (0, _export().readLastExport)(this.workspace.scope.path);
302
+ }
303
+
304
+ /**
305
+ * the central-hub returns url slugs in `metadata.jobs`, not the GraphQL job ids accepted by getJob(jobId).
306
+ * the schema also supports getJob(slug: ID!), which we use here to fetch the job directly from a slug.
307
+ */
308
+ async getJobBySlug(slug) {
309
+ const data = await this.fetchRippleGQL(RippleMain.GET_JOB_BY_SLUG, {
310
+ slug
311
+ });
312
+ return data?.getJob ?? null;
313
+ }
314
+
288
315
  /**
289
316
  * find the latest job for a given laneId, optionally filtered by status phase.
290
317
  */
@@ -311,15 +338,18 @@ class RippleMain {
311
338
  return defaultScope.split('.')[0];
312
339
  }
313
340
  getJobUrl(job) {
341
+ // the bit.cloud UI resolves the /ripple-ci/job/<id-or-slug> segment by slug;
342
+ // job.id (a uuid) returns "No CI job found", so prefer slug when present.
343
+ const segment = job.slug || job.id;
314
344
  if (job.laneId) {
315
345
  // laneId format: "scope/lane-name", e.g. "att-bit.duc/my-lane"
316
346
  const [scope, ...laneParts] = job.laneId.split('/');
317
347
  const laneName = laneParts.join('/');
318
348
  if (scope && laneName) {
319
- return `https://${(0, _legacy().getCloudDomain)()}/${scope.split('.').join('/')}/~lane/${laneName}/~ripple-ci/job/${job.id}`;
349
+ return `https://${(0, _legacy().getCloudDomain)()}/${scope.split('.').join('/')}/~lane/${laneName}/~ripple-ci/job/${segment}`;
320
350
  }
321
351
  }
322
- return `https://${(0, _legacy().getCloudDomain)()}/ripple-ci/job/${job.id}`;
352
+ return `https://${(0, _legacy().getCloudDomain)()}/ripple-ci/job/${segment}`;
323
353
  }
324
354
  static async provider([cli, cloud, loggerAspect, workspace]) {
325
355
  const logger = loggerAspect.createLogger(_ripple().RippleAspect.id);
@@ -349,6 +379,23 @@ _defineProperty(RippleMain, "GET_JOB", `
349
379
  query getJob($jobId: ID!) {
350
380
  getJob(jobId: $jobId) {
351
381
  id
382
+ slug
383
+ name
384
+ laneId
385
+ hash
386
+ simulation
387
+ user { username displayName }
388
+ status { startedAt finishedAt phase }
389
+ ciGraph
390
+ ciComponentGraph
391
+ }
392
+ }
393
+ `);
394
+ _defineProperty(RippleMain, "GET_JOB_BY_SLUG", `
395
+ query getJobBySlug($slug: ID!) {
396
+ getJob(slug: $slug) {
397
+ id
398
+ slug
352
399
  name
353
400
  laneId
354
401
  hash
@@ -378,6 +425,7 @@ _defineProperty(RippleMain, "RETRY_JOB", `
378
425
  mutation retryJob($jobId: ID!) {
379
426
  retryJob(jobId: $jobId) {
380
427
  id
428
+ slug
381
429
  name
382
430
  laneId
383
431
  status { startedAt finishedAt phase }
@@ -388,6 +436,7 @@ _defineProperty(RippleMain, "STOP_JOB", `
388
436
  mutation stopJob($jobId: ID!) {
389
437
  stopJob(jobId: $jobId) {
390
438
  id
439
+ slug
391
440
  name
392
441
  laneId
393
442
  status { startedAt finishedAt phase }
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_logger","_cloud","_workspace","_legacy","_rippleUtils","_stripAnsi","_interopRequireDefault","_ripple","_ripple2","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RippleMain","constructor","cloud","logger","workspace","ensureAuthenticated","getAuthToken","Error","fetchRippleGQL","query","variables","graphqlUrl","getCloudApi","body","JSON","stringify","headers","getAuthHeader","response","fetch","method","ok","text","catch","status","json","errors","messages","map","message","join","listJobs","opts","LIST_JOBS","filters","limit","offset","getJob","jobId","GET_JOB","getCiGraphNodes","job","ciGraph","graph","parse","nodes","node","attr","ids","id","stripComponentVersion","componentIds","containerName","name","phase","getComponentBuildSummary","componentId","GET_COMPONENT_BUILD_SUMMARY","getContainerLog","url","Accept","controller","AbortController","hardTimeout","setTimeout","abort","idleTimer","signal","clearTimeout","reader","getReader","decoder","TextDecoder","buffer","resetIdle","done","read","decode","stream","lines","split","pop","line","startsWith","parsed","substring","err","warn","getContainerLogs","containerNames","results","Promise","allSettled","log","logMap","Map","result","set","extractErrorsFromLog","patterns","pattern","idx","findIndex","m","stripAnsi","includes","slice","retryJob","RETRY_JOB","stopJob","STOP_JOB","getCurrentLaneId","undefined","laneId","isDefault","toString","findLatestJobForLane","lanes","jobs","getDefaultOwner","defaultScope","getJobUrl","scope","laneParts","laneName","getCloudDomain","provider","cli","loggerAspect","createLogger","RippleAspect","ripple","rippleCmd","RippleCmd","commands","RippleListCmd","RippleLogCmd","RippleErrorsCmd","RippleRetryCmd","RippleStopCmd","register","exports","MainRuntime","CLIAspect","CloudAspect","LoggerAspect","WorkspaceAspect","addRuntime"],"sources":["ripple.main.runtime.ts"],"sourcesContent":["import type { RuntimeDefinition } from '@teambit/harmony';\nimport { CLIAspect, type CLIMain, MainRuntime } from '@teambit/cli';\nimport { LoggerAspect, type LoggerMain, type Logger } from '@teambit/logger';\nimport { CloudAspect, type CloudMain } from '@teambit/cloud';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport { getCloudDomain } from '@teambit/legacy.constants';\nimport { stripComponentVersion } from './ripple-utils';\nimport stripAnsi from 'strip-ansi';\nimport { RippleAspect } from './ripple.aspect';\nimport { RippleCmd, RippleListCmd, RippleLogCmd, RippleErrorsCmd, RippleRetryCmd, RippleStopCmd } from './ripple.cmd';\n\nexport type JobStatus = {\n startedAt?: string;\n finishedAt?: string;\n phase?: string;\n};\n\nexport type RippleJob = {\n id: string;\n name?: string;\n laneId?: string;\n simulation?: boolean;\n user?: { username?: string; displayName?: string };\n status?: JobStatus;\n};\n\nexport type BuildTaskStatus = {\n status?: string;\n warnings?: number;\n};\n\nexport type BuildTaskSummary = {\n name?: string;\n description?: string;\n startTime?: string;\n status?: BuildTaskStatus;\n};\n\nexport type ComponentBuildSummary = {\n id?: string;\n name?: string;\n tasks?: BuildTaskSummary[];\n};\n\nexport type CiGraphNode = {\n componentIds: string[];\n containerName: string;\n phase: string;\n};\n\nexport class RippleMain {\n static runtime: RuntimeDefinition = MainRuntime;\n static dependencies = [CLIAspect, CloudAspect, LoggerAspect, WorkspaceAspect];\n\n constructor(\n private cloud: CloudMain,\n private logger: Logger,\n private workspace?: Workspace\n ) {}\n\n private static LIST_JOBS = `\n query listJobs($filters: FilterOptions, $limit: Int, $offset: Int) {\n listJobs(filters: $filters, limit: $limit, offset: $offset) {\n id\n name\n laneId\n simulation\n user { username displayName }\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private static GET_JOB = `\n query getJob($jobId: ID!) {\n getJob(jobId: $jobId) {\n id\n name\n laneId\n hash\n simulation\n user { username displayName }\n status { startedAt finishedAt phase }\n ciGraph\n ciComponentGraph\n }\n }\n `;\n\n private static GET_COMPONENT_BUILD_SUMMARY = `\n query getComponentBuildSummary($jobId: ID!, $componentId: String!) {\n getComponentBuildSummary(jobId: $jobId, componentId: $componentId) {\n id\n name\n tasks {\n name\n description\n startTime\n status { status warnings }\n }\n }\n }\n `;\n\n private static RETRY_JOB = `\n mutation retryJob($jobId: ID!) {\n retryJob(jobId: $jobId) {\n id\n name\n laneId\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private static STOP_JOB = `\n mutation stopJob($jobId: ID!) {\n stopJob(jobId: $jobId) {\n id\n name\n laneId\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private ensureAuthenticated(): void {\n if (!this.cloud.getAuthToken()) {\n throw new Error('You are not logged in. Please run \"bit login\" first.');\n }\n }\n\n private async fetchRippleGQL<T>(query: string, variables?: Record<string, any>): Promise<T | null> {\n this.ensureAuthenticated();\n const graphqlUrl = `${this.cloud.getCloudApi()}/graphql`;\n const body = JSON.stringify({ query, variables });\n const headers = {\n 'Content-Type': 'application/json',\n ...this.cloud.getAuthHeader(),\n };\n const response = await fetch(graphqlUrl, { method: 'POST', headers, body });\n if (!response.ok) {\n const text = await response.text().catch(() => '');\n throw new Error(`Ripple CI API returned HTTP ${response.status}: ${text}`);\n }\n const json = (await response.json()) as { data?: T; errors?: Array<{ message: string }> };\n if (json.errors?.length) {\n const messages = json.errors.map((e) => e.message).join(', ');\n throw new Error(`Ripple CI API error: ${messages}`);\n }\n return json.data ?? null;\n }\n\n async listJobs(opts: {\n limit?: number;\n offset?: number;\n filters?: { lanes?: string[]; owners?: string[]; scopes?: string[]; status?: string };\n }): Promise<RippleJob[]> {\n const data = await this.fetchRippleGQL<{ listJobs: RippleJob[] }>(RippleMain.LIST_JOBS, {\n filters: opts.filters,\n limit: opts.limit ?? 20,\n offset: opts.offset,\n });\n return data?.listJobs ?? [];\n }\n\n async getJob(\n jobId: string\n ): Promise<(RippleJob & { hash?: string; ciGraph?: string; ciComponentGraph?: string }) | null> {\n const data = await this.fetchRippleGQL<{\n getJob: RippleJob & { hash?: string; ciGraph?: string; ciComponentGraph?: string };\n }>(RippleMain.GET_JOB, { jobId });\n return data?.getJob ?? null;\n }\n\n /**\n * parse a job's ciGraph (internal graph) to extract per-node build status.\n * ciGraph has the job-specific build results (unlike ciComponentGraph which is static).\n * each node represents a build container that builds one or more components.\n */\n getCiGraphNodes(job: { ciGraph?: string }): CiGraphNode[] {\n if (!job.ciGraph) return [];\n try {\n const graph = JSON.parse(job.ciGraph) as { nodes?: Array<{ id: string; attr: string | Record<string, any> }> };\n if (!graph.nodes) return [];\n return graph.nodes.map((node) => {\n const attr = typeof node.attr === 'string' ? JSON.parse(node.attr) : node.attr;\n const ids: string[] = (attr.ids || []).map((id: string) => stripComponentVersion(id));\n return {\n componentIds: ids,\n containerName: attr.status?.name || node.id,\n phase: attr.status?.phase || 'UNKNOWN',\n };\n });\n } catch {\n return [];\n }\n }\n\n async getComponentBuildSummary(jobId: string, componentId: string): Promise<ComponentBuildSummary | null> {\n const data = await this.fetchRippleGQL<{ getComponentBuildSummary: ComponentBuildSummary }>(\n RippleMain.GET_COMPONENT_BUILD_SUMMARY,\n { jobId, componentId }\n );\n return data?.getComponentBuildSummary ?? null;\n }\n\n /**\n * fetch build logs for a specific container in a job via the REST SSE endpoint.\n * uses an idle timeout to detect end-of-stream (SSE connections may not close).\n */\n async getContainerLog(jobId: string, containerName: string): Promise<string[]> {\n this.ensureAuthenticated();\n const url = `${this.cloud.getCloudApi()}/ripple-ci/api/job/log/${jobId}/${containerName}`;\n const headers = {\n Accept: 'text/event-stream',\n ...this.cloud.getAuthHeader(),\n };\n const controller = new AbortController();\n // hard cap to avoid hanging forever\n const hardTimeout = setTimeout(() => controller.abort(), 30_000);\n const messages: string[] = [];\n let idleTimer: ReturnType<typeof setTimeout> | undefined;\n try {\n const response = await fetch(url, { headers, signal: controller.signal });\n if (!response.ok || !response.body) {\n clearTimeout(hardTimeout);\n return [];\n }\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n const resetIdle = () => {\n if (idleTimer) clearTimeout(idleTimer);\n idleTimer = setTimeout(() => controller.abort(), 3_000);\n };\n resetIdle();\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // eslint-disable-next-line no-await-in-loop\n const { done, value } = await reader.read();\n if (done) break;\n resetIdle();\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() || '';\n for (const line of lines) {\n if (!line.startsWith('data: ')) continue;\n try {\n const parsed = JSON.parse(line.substring(6)) as { message?: string };\n if (parsed.message != null) messages.push(parsed.message);\n } catch {\n // skip malformed lines\n }\n }\n }\n } catch (err: any) {\n if (err?.name !== 'AbortError') {\n this.logger.warn(`Failed to fetch container log: ${err?.message}`);\n }\n } finally {\n if (idleTimer) clearTimeout(idleTimer);\n clearTimeout(hardTimeout);\n }\n return messages;\n }\n\n /**\n * fetch build logs for multiple containers in parallel.\n */\n async getContainerLogs(jobId: string, containerNames: string[]): Promise<Map<string, string[]>> {\n const results = await Promise.allSettled(\n containerNames.map(async (name) => {\n const log = await this.getContainerLog(jobId, name);\n return { name, log };\n })\n );\n const logMap = new Map<string, string[]>();\n for (const result of results) {\n if (result.status === 'fulfilled') {\n logMap.set(result.value.name, result.value.log);\n }\n }\n return logMap;\n }\n\n /**\n * extract the error section from container log messages.\n * looks for common error patterns in the build output.\n */\n extractErrorsFromLog(messages: string[]): string[] {\n const patterns = ['errors were found', 'Failed task', 'threw an error', 'Error:', 'FAIL'];\n for (const pattern of patterns) {\n const idx = messages.findIndex((m) => stripAnsi(m).includes(pattern));\n if (idx >= 0) {\n return messages.slice(idx);\n }\n }\n // last resort: grab the last 30 lines if the log has content\n if (messages.length > 0) {\n return messages.slice(-30);\n }\n return [];\n }\n\n async retryJob(jobId: string): Promise<RippleJob | null> {\n const data = await this.fetchRippleGQL<{ retryJob: RippleJob }>(RippleMain.RETRY_JOB, { jobId });\n return data?.retryJob ?? null;\n }\n\n async stopJob(jobId: string): Promise<RippleJob | null> {\n const data = await this.fetchRippleGQL<{ stopJob: RippleJob }>(RippleMain.STOP_JOB, { jobId });\n return data?.stopJob ?? null;\n }\n\n /**\n * detect the current lane from the workspace.\n * returns the laneId in \"scope/lane-name\" format, or undefined if not on a lane.\n */\n getCurrentLaneId(): string | undefined {\n if (!this.workspace) return undefined;\n const laneId = this.workspace.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\n return laneId.toString();\n }\n\n /**\n * find the latest job for a given laneId, optionally filtered by status phase.\n */\n async findLatestJobForLane(laneId: string, phase?: string): Promise<RippleJob | null> {\n const filters: { lanes: string[]; status?: string } = { lanes: [laneId] };\n if (phase) {\n filters.status = phase;\n }\n const jobs = await this.listJobs({ filters, limit: 1 });\n return jobs[0] ?? null;\n }\n\n /**\n * detect the workspace owner from the workspace defaultScope.\n */\n getDefaultOwner(): string | undefined {\n const defaultScope = this.workspace?.defaultScope;\n if (!defaultScope?.includes('.')) return undefined;\n return defaultScope.split('.')[0];\n }\n\n getJobUrl(job: RippleJob): string {\n if (job.laneId) {\n // laneId format: \"scope/lane-name\", e.g. \"att-bit.duc/my-lane\"\n const [scope, ...laneParts] = job.laneId.split('/');\n const laneName = laneParts.join('/');\n if (scope && laneName) {\n return `https://${getCloudDomain()}/${scope.split('.').join('/')}/~lane/${laneName}/~ripple-ci/job/${job.id}`;\n }\n }\n return `https://${getCloudDomain()}/ripple-ci/job/${job.id}`;\n }\n\n static async provider([cli, cloud, loggerAspect, workspace]: [CLIMain, CloudMain, LoggerMain, Workspace]) {\n const logger = loggerAspect.createLogger(RippleAspect.id);\n const ripple = new RippleMain(cloud, logger, workspace);\n\n const rippleCmd = new RippleCmd();\n rippleCmd.commands = [\n new RippleListCmd(ripple),\n new RippleLogCmd(ripple),\n new RippleErrorsCmd(ripple),\n new RippleRetryCmd(ripple),\n new RippleStopCmd(ripple),\n ];\n cli.register(rippleCmd);\n\n return ripple;\n }\n}\n\nRippleAspect.addRuntime(RippleMain);\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAA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AY,CAACiB,UAAU,CAACnJ,UAAU,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_logger","_cloud","_workspace","_legacy","_export","_rippleUtils","_stripAnsi","_interopRequireDefault","_ripple","_ripple2","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","RippleMain","constructor","cloud","logger","workspace","ensureAuthenticated","getAuthToken","Error","fetchRippleGQL","query","variables","graphqlUrl","getCloudApi","body","JSON","stringify","headers","getAuthHeader","response","fetch","method","ok","text","catch","status","json","errors","messages","map","message","join","listJobs","opts","LIST_JOBS","filters","limit","offset","getJob","jobId","GET_JOB","getCiGraphNodes","job","ciGraph","graph","parse","nodes","node","attr","ids","id","stripComponentVersion","componentIds","containerName","name","phase","getComponentBuildSummary","componentId","GET_COMPONENT_BUILD_SUMMARY","getContainerLog","url","Accept","controller","AbortController","hardTimeout","setTimeout","abort","idleTimer","signal","clearTimeout","reader","getReader","decoder","TextDecoder","buffer","resetIdle","done","read","decode","stream","lines","split","pop","line","startsWith","parsed","substring","err","warn","getContainerLogs","containerNames","results","Promise","allSettled","log","logMap","Map","result","set","extractErrorsFromLog","patterns","pattern","idx","findIndex","m","stripAnsi","includes","slice","retryJob","RETRY_JOB","stopJob","STOP_JOB","getCurrentLaneId","undefined","laneId","isDefault","toString","getLastExport","readLastExport","scope","path","getJobBySlug","slug","GET_JOB_BY_SLUG","findLatestJobForLane","lanes","jobs","getDefaultOwner","defaultScope","getJobUrl","segment","laneParts","laneName","getCloudDomain","provider","cli","loggerAspect","createLogger","RippleAspect","ripple","rippleCmd","RippleCmd","commands","RippleListCmd","RippleLogCmd","RippleErrorsCmd","RippleRetryCmd","RippleStopCmd","register","exports","MainRuntime","CLIAspect","CloudAspect","LoggerAspect","WorkspaceAspect","addRuntime"],"sources":["ripple.main.runtime.ts"],"sourcesContent":["import type { RuntimeDefinition } from '@teambit/harmony';\nimport { CLIAspect, type CLIMain, MainRuntime } from '@teambit/cli';\nimport { LoggerAspect, type LoggerMain, type Logger } from '@teambit/logger';\nimport { CloudAspect, type CloudMain } from '@teambit/cloud';\nimport type { Workspace } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport { getCloudDomain } from '@teambit/legacy.constants';\nimport { readLastExport, type LastExportData } from '@teambit/export';\nimport { stripComponentVersion } from './ripple-utils';\nimport stripAnsi from 'strip-ansi';\nimport { RippleAspect } from './ripple.aspect';\nimport { RippleCmd, RippleListCmd, RippleLogCmd, RippleErrorsCmd, RippleRetryCmd, RippleStopCmd } from './ripple.cmd';\n\nexport type JobStatus = {\n startedAt?: string;\n finishedAt?: string;\n phase?: string;\n};\n\nexport type RippleJob = {\n id: string;\n /** url-safe identifier used by the cloud UI; the bit.cloud /ripple-ci/job/ page resolves by slug, not id */\n slug?: string;\n name?: string;\n laneId?: string;\n simulation?: boolean;\n user?: { username?: string; displayName?: string };\n status?: JobStatus;\n};\n\nexport type RippleJobFull = RippleJob & { hash?: string; ciGraph?: string; ciComponentGraph?: string };\n\nexport type BuildTaskStatus = {\n status?: string;\n warnings?: number;\n};\n\nexport type BuildTaskSummary = {\n name?: string;\n description?: string;\n startTime?: string;\n status?: BuildTaskStatus;\n};\n\nexport type ComponentBuildSummary = {\n id?: string;\n name?: string;\n tasks?: BuildTaskSummary[];\n};\n\nexport type CiGraphNode = {\n componentIds: string[];\n containerName: string;\n phase: string;\n};\n\nexport class RippleMain {\n static runtime: RuntimeDefinition = MainRuntime;\n static dependencies = [CLIAspect, CloudAspect, LoggerAspect, WorkspaceAspect];\n\n constructor(\n private cloud: CloudMain,\n private logger: Logger,\n private workspace?: Workspace\n ) {}\n\n private static LIST_JOBS = `\n query listJobs($filters: FilterOptions, $limit: Int, $offset: Int) {\n listJobs(filters: $filters, limit: $limit, offset: $offset) {\n id\n name\n laneId\n simulation\n user { username displayName }\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private static GET_JOB = `\n query getJob($jobId: ID!) {\n getJob(jobId: $jobId) {\n id\n slug\n name\n laneId\n hash\n simulation\n user { username displayName }\n status { startedAt finishedAt phase }\n ciGraph\n ciComponentGraph\n }\n }\n `;\n\n private static GET_JOB_BY_SLUG = `\n query getJobBySlug($slug: ID!) {\n getJob(slug: $slug) {\n id\n slug\n name\n laneId\n hash\n simulation\n user { username displayName }\n status { startedAt finishedAt phase }\n ciGraph\n ciComponentGraph\n }\n }\n `;\n\n private static GET_COMPONENT_BUILD_SUMMARY = `\n query getComponentBuildSummary($jobId: ID!, $componentId: String!) {\n getComponentBuildSummary(jobId: $jobId, componentId: $componentId) {\n id\n name\n tasks {\n name\n description\n startTime\n status { status warnings }\n }\n }\n }\n `;\n\n private static RETRY_JOB = `\n mutation retryJob($jobId: ID!) {\n retryJob(jobId: $jobId) {\n id\n slug\n name\n laneId\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private static STOP_JOB = `\n mutation stopJob($jobId: ID!) {\n stopJob(jobId: $jobId) {\n id\n slug\n name\n laneId\n status { startedAt finishedAt phase }\n }\n }\n `;\n\n private ensureAuthenticated(): void {\n if (!this.cloud.getAuthToken()) {\n throw new Error('You are not logged in. Please run \"bit login\" first.');\n }\n }\n\n private async fetchRippleGQL<T>(query: string, variables?: Record<string, any>): Promise<T | null> {\n this.ensureAuthenticated();\n const graphqlUrl = `${this.cloud.getCloudApi()}/graphql`;\n const body = JSON.stringify({ query, variables });\n const headers = {\n 'Content-Type': 'application/json',\n ...this.cloud.getAuthHeader(),\n };\n const response = await fetch(graphqlUrl, { method: 'POST', headers, body });\n if (!response.ok) {\n const text = await response.text().catch(() => '');\n throw new Error(`Ripple CI API returned HTTP ${response.status}: ${text}`);\n }\n const json = (await response.json()) as { data?: T; errors?: Array<{ message: string }> };\n if (json.errors?.length) {\n const messages = json.errors.map((e) => e.message).join(', ');\n throw new Error(`Ripple CI API error: ${messages}`);\n }\n return json.data ?? null;\n }\n\n async listJobs(opts: {\n limit?: number;\n offset?: number;\n filters?: { lanes?: string[]; owners?: string[]; scopes?: string[]; status?: string };\n }): Promise<RippleJob[]> {\n const data = await this.fetchRippleGQL<{ listJobs: RippleJob[] }>(RippleMain.LIST_JOBS, {\n filters: opts.filters,\n limit: opts.limit ?? 20,\n offset: opts.offset,\n });\n return data?.listJobs ?? [];\n }\n\n async getJob(jobId: string): Promise<RippleJobFull | null> {\n const data = await this.fetchRippleGQL<{\n getJob: RippleJobFull;\n }>(RippleMain.GET_JOB, { jobId });\n return data?.getJob ?? null;\n }\n\n /**\n * parse a job's ciGraph (internal graph) to extract per-node build status.\n * ciGraph has the job-specific build results (unlike ciComponentGraph which is static).\n * each node represents a build container that builds one or more components.\n */\n getCiGraphNodes(job: { ciGraph?: string }): CiGraphNode[] {\n if (!job.ciGraph) return [];\n try {\n const graph = JSON.parse(job.ciGraph) as { nodes?: Array<{ id: string; attr: string | Record<string, any> }> };\n if (!graph.nodes) return [];\n return graph.nodes.map((node) => {\n const attr = typeof node.attr === 'string' ? JSON.parse(node.attr) : node.attr;\n const ids: string[] = (attr.ids || []).map((id: string) => stripComponentVersion(id));\n return {\n componentIds: ids,\n containerName: attr.status?.name || node.id,\n phase: attr.status?.phase || 'UNKNOWN',\n };\n });\n } catch {\n return [];\n }\n }\n\n async getComponentBuildSummary(jobId: string, componentId: string): Promise<ComponentBuildSummary | null> {\n const data = await this.fetchRippleGQL<{ getComponentBuildSummary: ComponentBuildSummary }>(\n RippleMain.GET_COMPONENT_BUILD_SUMMARY,\n { jobId, componentId }\n );\n return data?.getComponentBuildSummary ?? null;\n }\n\n /**\n * fetch build logs for a specific container in a job via the REST SSE endpoint.\n * uses an idle timeout to detect end-of-stream (SSE connections may not close).\n */\n async getContainerLog(jobId: string, containerName: string): Promise<string[]> {\n this.ensureAuthenticated();\n const url = `${this.cloud.getCloudApi()}/ripple-ci/api/job/log/${jobId}/${containerName}`;\n const headers = {\n Accept: 'text/event-stream',\n ...this.cloud.getAuthHeader(),\n };\n const controller = new AbortController();\n // hard cap to avoid hanging forever\n const hardTimeout = setTimeout(() => controller.abort(), 30_000);\n const messages: string[] = [];\n let idleTimer: ReturnType<typeof setTimeout> | undefined;\n try {\n const response = await fetch(url, { headers, signal: controller.signal });\n if (!response.ok || !response.body) {\n clearTimeout(hardTimeout);\n return [];\n }\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n const resetIdle = () => {\n if (idleTimer) clearTimeout(idleTimer);\n idleTimer = setTimeout(() => controller.abort(), 3_000);\n };\n resetIdle();\n // eslint-disable-next-line no-constant-condition\n while (true) {\n // eslint-disable-next-line no-await-in-loop\n const { done, value } = await reader.read();\n if (done) break;\n resetIdle();\n buffer += decoder.decode(value, { stream: true });\n const lines = buffer.split('\\n');\n buffer = lines.pop() || '';\n for (const line of lines) {\n if (!line.startsWith('data: ')) continue;\n try {\n const parsed = JSON.parse(line.substring(6)) as { message?: string };\n if (parsed.message != null) messages.push(parsed.message);\n } catch {\n // skip malformed lines\n }\n }\n }\n } catch (err: any) {\n if (err?.name !== 'AbortError') {\n this.logger.warn(`Failed to fetch container log: ${err?.message}`);\n }\n } finally {\n if (idleTimer) clearTimeout(idleTimer);\n clearTimeout(hardTimeout);\n }\n return messages;\n }\n\n /**\n * fetch build logs for multiple containers in parallel.\n */\n async getContainerLogs(jobId: string, containerNames: string[]): Promise<Map<string, string[]>> {\n const results = await Promise.allSettled(\n containerNames.map(async (name) => {\n const log = await this.getContainerLog(jobId, name);\n return { name, log };\n })\n );\n const logMap = new Map<string, string[]>();\n for (const result of results) {\n if (result.status === 'fulfilled') {\n logMap.set(result.value.name, result.value.log);\n }\n }\n return logMap;\n }\n\n /**\n * extract the error section from container log messages.\n * looks for common error patterns in the build output.\n */\n extractErrorsFromLog(messages: string[]): string[] {\n const patterns = ['errors were found', 'Failed task', 'threw an error', 'Error:', 'FAIL'];\n for (const pattern of patterns) {\n const idx = messages.findIndex((m) => stripAnsi(m).includes(pattern));\n if (idx >= 0) {\n return messages.slice(idx);\n }\n }\n // last resort: grab the last 30 lines if the log has content\n if (messages.length > 0) {\n return messages.slice(-30);\n }\n return [];\n }\n\n async retryJob(jobId: string): Promise<RippleJob | null> {\n const data = await this.fetchRippleGQL<{ retryJob: RippleJob }>(RippleMain.RETRY_JOB, { jobId });\n return data?.retryJob ?? null;\n }\n\n async stopJob(jobId: string): Promise<RippleJob | null> {\n const data = await this.fetchRippleGQL<{ stopJob: RippleJob }>(RippleMain.STOP_JOB, { jobId });\n return data?.stopJob ?? null;\n }\n\n /**\n * detect the current lane from the workspace.\n * returns the laneId in \"scope/lane-name\" format, or undefined if not on a lane.\n */\n getCurrentLaneId(): string | undefined {\n if (!this.workspace) return undefined;\n const laneId = this.workspace.getCurrentLaneId();\n if (!laneId || laneId.isDefault()) return undefined;\n return laneId.toString();\n }\n\n /**\n * read the last-export.json written by ExportMain after a successful export.\n * used to auto-resolve the ripple job when the user is on main (no current lane).\n */\n async getLastExport(): Promise<LastExportData | null> {\n if (!this.workspace) return null;\n return readLastExport(this.workspace.scope.path);\n }\n\n /**\n * the central-hub returns url slugs in `metadata.jobs`, not the GraphQL job ids accepted by getJob(jobId).\n * the schema also supports getJob(slug: ID!), which we use here to fetch the job directly from a slug.\n */\n async getJobBySlug(slug: string): Promise<RippleJobFull | null> {\n const data = await this.fetchRippleGQL<{\n getJob: RippleJobFull;\n }>(RippleMain.GET_JOB_BY_SLUG, { slug });\n return data?.getJob ?? null;\n }\n\n /**\n * find the latest job for a given laneId, optionally filtered by status phase.\n */\n async findLatestJobForLane(laneId: string, phase?: string): Promise<RippleJob | null> {\n const filters: { lanes: string[]; status?: string } = { lanes: [laneId] };\n if (phase) {\n filters.status = phase;\n }\n const jobs = await this.listJobs({ filters, limit: 1 });\n return jobs[0] ?? null;\n }\n\n /**\n * detect the workspace owner from the workspace defaultScope.\n */\n getDefaultOwner(): string | undefined {\n const defaultScope = this.workspace?.defaultScope;\n if (!defaultScope?.includes('.')) return undefined;\n return defaultScope.split('.')[0];\n }\n\n getJobUrl(job: RippleJob): string {\n // the bit.cloud UI resolves the /ripple-ci/job/<id-or-slug> segment by slug;\n // job.id (a uuid) returns \"No CI job found\", so prefer slug when present.\n const segment = job.slug || job.id;\n if (job.laneId) {\n // laneId format: \"scope/lane-name\", e.g. \"att-bit.duc/my-lane\"\n const [scope, ...laneParts] = job.laneId.split('/');\n const laneName = laneParts.join('/');\n if (scope && laneName) {\n return `https://${getCloudDomain()}/${scope.split('.').join('/')}/~lane/${laneName}/~ripple-ci/job/${segment}`;\n }\n }\n return `https://${getCloudDomain()}/ripple-ci/job/${segment}`;\n }\n\n static async provider([cli, cloud, loggerAspect, workspace]: [CLIMain, CloudMain, LoggerMain, Workspace]) {\n const logger = loggerAspect.createLogger(RippleAspect.id);\n const ripple = new RippleMain(cloud, logger, workspace);\n\n const rippleCmd = new RippleCmd();\n rippleCmd.commands = [\n new RippleListCmd(ripple),\n new RippleLogCmd(ripple),\n new RippleErrorsCmd(ripple),\n new RippleRetryCmd(ripple),\n new RippleStopCmd(ripple),\n ];\n cli.register(rippleCmd);\n\n return ripple;\n }\n}\n\nRippleAspect.addRuntime(RippleMain);\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,OAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,WAAA;EAA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AEvB,OAAOD,MAAM;EACf;AACF;AAACU,OAAA,CAAApJ,UAAA,GAAAA,UAAA;AAAAhB,eAAA,CA9WYgB,UAAU,aACeqJ,kBAAW;AAAArK,eAAA,CADpCgB,UAAU,kBAEC,CAACsJ,gBAAS,EAAEC,oBAAW,EAAEC,sBAAY,EAAEC,4BAAe,CAAC;AAAAzK,eAAA,CAFlEgB,UAAU,eAUM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAAAhB,eAAA,CArBUgB,UAAU,aAuBI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAAAhB,eAAA,CAtCUgB,UAAU,qBAwCY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAAAhB,eAAA,CAvDUgB,UAAU,iCAyDwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAAAhB,eAAA,CAtEUgB,UAAU,eAwEM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAAAhB,eAAA,CAlFUgB,UAAU,cAoFK;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAkRHyI,sBAAY,CAACiB,UAAU,CAAC1J,UAAU,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/ripple",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "homepage": "https://bit.cloud/teambit/cloud/ripple",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.cloud",
8
8
  "name": "ripple",
9
- "version": "0.0.44"
9
+ "version": "0.0.45"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "4.1.2",
@@ -16,8 +16,9 @@
16
16
  "@teambit/cli": "0.0.1320",
17
17
  "@teambit/legacy.constants": "0.0.26",
18
18
  "@teambit/logger": "0.0.1413",
19
- "@teambit/cloud": "0.0.1258",
20
- "@teambit/workspace": "1.0.966"
19
+ "@teambit/export": "1.0.967",
20
+ "@teambit/cloud": "0.0.1259",
21
+ "@teambit/workspace": "1.0.967"
21
22
  },
22
23
  "devDependencies": {
23
24
  "@types/cli-table": "^0.3.0",