@teambit/ripple 0.0.0-00b17f7096ad4be0c390fbbbaa56cf2032288086

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.
@@ -0,0 +1,4 @@
1
+ import { RippleAspect } from './ripple.aspect';
2
+ export default RippleAspect;
3
+ export { RippleAspect };
4
+ export type { RippleMain } from './ripple.main.runtime';
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "RippleAspect", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _ripple().RippleAspect;
10
+ }
11
+ });
12
+ exports.default = void 0;
13
+ function _ripple() {
14
+ const data = require("./ripple.aspect");
15
+ _ripple = function () {
16
+ return data;
17
+ };
18
+ return data;
19
+ }
20
+ var _default = exports.default = _ripple().RippleAspect;
21
+
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_ripple","data","require","_default","exports","default","RippleAspect"],"sources":["index.ts"],"sourcesContent":["import { RippleAspect } from './ripple.aspect';\n\nexport default RippleAspect;\nexport { RippleAspect };\nexport type { RippleMain } from './ripple.main.runtime';\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEhCC,sBAAY","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ ;
2
+ ;
3
+
4
+ export const compositions = [];
5
+ export const overview = [];
6
+
7
+ export const compositions_metadata = {"compositions":[]};
@@ -0,0 +1,35 @@
1
+ import stripAnsi from 'strip-ansi';
2
+ import type { LastExportData } from '@teambit/export';
3
+ import type { RippleMain, RippleJobFull } from './ripple.main.runtime';
4
+ export { stripAnsi };
5
+ export declare function colorPhase(phase?: string): string;
6
+ export declare function isFailedPhase(phase?: string): boolean;
7
+ /**
8
+ * strip "@hash" or "@version" suffix from a component ID.
9
+ * e.g. "scope/name@abc123" → "scope/name"
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
+ };
21
+ /**
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.
25
+ */
26
+ export declare function resolveJobId(ripple: RippleMain, jobId: string | undefined, flags: {
27
+ lane?: string;
28
+ }, opts?: {
29
+ allowedPhases?: string[];
30
+ actionVerb?: string;
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;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.colorPhase = colorPhase;
7
+ exports.formatAge = formatAge;
8
+ exports.isFailedPhase = isFailedPhase;
9
+ exports.resolveJobId = resolveJobId;
10
+ Object.defineProperty(exports, "stripAnsi", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _stripAnsi().default;
14
+ }
15
+ });
16
+ exports.stripComponentVersion = stripComponentVersion;
17
+ function _chalk() {
18
+ const data = _interopRequireDefault(require("chalk"));
19
+ _chalk = function () {
20
+ return data;
21
+ };
22
+ return data;
23
+ }
24
+ function _stripAnsi() {
25
+ const data = _interopRequireDefault(require("strip-ansi"));
26
+ _stripAnsi = function () {
27
+ return data;
28
+ };
29
+ return data;
30
+ }
31
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
32
+ function colorPhase(phase) {
33
+ if (!phase) return _chalk().default.yellow('unknown');
34
+ switch (phase.toUpperCase()) {
35
+ case 'SUCCESS':
36
+ return _chalk().default.green(phase);
37
+ case 'FAILED':
38
+ case 'FAILURE':
39
+ return _chalk().default.red(phase);
40
+ case 'RUNNING':
41
+ case 'IN_PROGRESS':
42
+ return _chalk().default.blue(phase);
43
+ case 'STOPPED':
44
+ case 'PAUSED':
45
+ return _chalk().default.gray(phase);
46
+ default:
47
+ return _chalk().default.yellow(phase);
48
+ }
49
+ }
50
+ function isFailedPhase(phase) {
51
+ const p = phase?.toUpperCase();
52
+ return p === 'FAILURE' || p === 'FAILED';
53
+ }
54
+
55
+ /**
56
+ * strip "@hash" or "@version" suffix from a component ID.
57
+ * e.g. "scope/name@abc123" → "scope/name"
58
+ */
59
+ function stripComponentVersion(id) {
60
+ const atIdx = id.indexOf('@');
61
+ return atIdx > 0 ? id.substring(0, atIdx) : id;
62
+ }
63
+ /**
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.
67
+ */
68
+ async function resolveJobId(ripple, jobId, flags, opts) {
69
+ if (jobId) return {
70
+ id: jobId,
71
+ source: 'arg'
72
+ };
73
+ const laneId = flags.lane || ripple.getCurrentLaneId();
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
91
+ };
92
+ return {
93
+ id: job.id,
94
+ source: 'last-export',
95
+ lastExport,
96
+ job
97
+ };
98
+ }
99
+ if (laneId) {
100
+ const found = await ripple.findLatestJobForLane(laneId);
101
+ if (!found) {
102
+ return {
103
+ error: `No Ripple CI job found for lane "${laneId}".`
104
+ };
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
+ };
114
+ }
115
+ return {
116
+ error: 'Could not find a Ripple CI job. Provide a job ID, use --lane, or run from a workspace with a recent export.'
117
+ };
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
+ }
142
+
143
+ //# sourceMappingURL=ripple-utils.js.map
@@ -0,0 +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","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,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;AACF;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tB,EAAE,aAAaiC,IAAI,8BAA8B;AACvH;;AAEA;AACA;AACA;AACO,SAASE,SAASA,CAACC,SAAiB,EAAU;EACnD,MAAMC,EAAE,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAG,IAAID,IAAI,CAACF,SAAS,CAAC,CAACI,OAAO,CAAC,CAAC;EACrD,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACL,EAAE,CAAC,IAAIA,EAAE,GAAG,CAAC,EAAE,OAAO,UAAU;EACrD,MAAMM,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACR,EAAE,GAAG,IAAI,CAAC;EACrC,IAAIM,OAAO,GAAG,EAAE,EAAE,OAAO,UAAU;EACnC,MAAMG,OAAO,GAAGF,IAAI,CAACC,KAAK,CAACF,OAAO,GAAG,EAAE,CAAC;EACxC,IAAIG,OAAO,GAAG,EAAE,EAAE,OAAO,GAAGA,OAAO,UAAUA,OAAO,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;EAC3E,MAAMC,KAAK,GAAGH,IAAI,CAACC,KAAK,CAACC,OAAO,GAAG,EAAE,CAAC;EACtC,IAAIC,KAAK,GAAG,EAAE,EAAE,OAAO,GAAGA,KAAK,QAAQA,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;EACnE,MAAMC,IAAI,GAAGJ,IAAI,CAACC,KAAK,CAACE,KAAK,GAAG,EAAE,CAAC;EACnC,OAAO,GAAGC,IAAI,OAAOA,IAAI,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM;AAClD","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import { Aspect } from '@teambit/harmony';
2
+ export declare const RippleAspect: Aspect;
3
+ export default RippleAspect;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.RippleAspect = void 0;
7
+ function _harmony() {
8
+ const data = require("@teambit/harmony");
9
+ _harmony = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ const RippleAspect = exports.RippleAspect = _harmony().Aspect.create({
15
+ id: 'teambit.cloud/ripple'
16
+ });
17
+ var _default = exports.default = RippleAspect;
18
+
19
+ //# sourceMappingURL=ripple.aspect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_harmony","data","require","RippleAspect","exports","Aspect","create","id","_default","default"],"sources":["ripple.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const RippleAspect = Aspect.create({\n id: 'teambit.cloud/ripple',\n});\n\nexport default RippleAspect;\n"],"mappings":";;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAGE,iBAAM,CAACC,MAAM,CAAC;EACxCC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAJ,OAAA,CAAAK,OAAA,GAEYN,YAAY","ignoreList":[]}
@@ -0,0 +1,172 @@
1
+ import type { Command, CommandOptions } from '@teambit/cli';
2
+ import type { LastExportData } from '@teambit/export';
3
+ import type { RippleMain, RippleJob, CiGraphNode } from './ripple.main.runtime';
4
+ export declare class RippleCmd implements Command {
5
+ name: string;
6
+ description: string;
7
+ extendedDescription: string;
8
+ group: string;
9
+ skipWorkspace: boolean;
10
+ remoteOp: boolean;
11
+ options: CommandOptions;
12
+ commands: Command[];
13
+ report(): Promise<{
14
+ code: number;
15
+ data: string;
16
+ }>;
17
+ }
18
+ export declare class RippleListCmd implements Command {
19
+ private ripple;
20
+ name: string;
21
+ description: string;
22
+ skipWorkspace: boolean;
23
+ remoteOp: boolean;
24
+ alias: string;
25
+ options: CommandOptions;
26
+ constructor(ripple: RippleMain);
27
+ report(args: [], flags: {
28
+ all?: boolean;
29
+ owner?: string;
30
+ scope?: string;
31
+ lane?: string;
32
+ user?: string;
33
+ status?: string;
34
+ limit?: string;
35
+ }): Promise<string>;
36
+ json(args: [], flags: {
37
+ all?: boolean;
38
+ owner?: string;
39
+ scope?: string;
40
+ lane?: string;
41
+ user?: string;
42
+ status?: string;
43
+ limit?: string;
44
+ }): Promise<{
45
+ jobs: RippleJob[];
46
+ }>;
47
+ private getFilteredJobs;
48
+ }
49
+ export declare class RippleLogCmd implements Command {
50
+ private ripple;
51
+ name: string;
52
+ description: string;
53
+ skipWorkspace: boolean;
54
+ remoteOp: boolean;
55
+ alias: string;
56
+ options: CommandOptions;
57
+ arguments: {
58
+ name: string;
59
+ description: string;
60
+ }[];
61
+ constructor(ripple: RippleMain);
62
+ private resolveJob;
63
+ report([jobId]: [string], flags: {
64
+ lane?: string;
65
+ component?: string;
66
+ }): Promise<string>;
67
+ private appendComponentDetail;
68
+ private appendComponentList;
69
+ json([jobId]: [string], flags: {
70
+ lane?: string;
71
+ component?: string;
72
+ }): Promise<{
73
+ job: import("./ripple.main.runtime").RippleJobFull;
74
+ componentBuild: import("./ripple.main.runtime").ComponentBuildSummary | null;
75
+ source: import("./ripple-utils").ResolveSource;
76
+ lastExport: LastExportData | undefined;
77
+ } | {
78
+ job: import("./ripple.main.runtime").RippleJobFull | null;
79
+ source: import("./ripple-utils").ResolveSource | undefined;
80
+ lastExport: LastExportData | undefined;
81
+ componentBuild?: undefined;
82
+ }>;
83
+ }
84
+ export declare class RippleErrorsCmd implements Command {
85
+ private ripple;
86
+ name: string;
87
+ description: string;
88
+ skipWorkspace: boolean;
89
+ remoteOp: boolean;
90
+ alias: string;
91
+ options: CommandOptions;
92
+ arguments: {
93
+ name: string;
94
+ description: string;
95
+ }[];
96
+ constructor(ripple: RippleMain);
97
+ report([jobId]: [string], flags: {
98
+ lane?: string;
99
+ log?: boolean;
100
+ }): Promise<string>;
101
+ json([jobId]: [string], flags: {
102
+ lane?: string;
103
+ log?: boolean;
104
+ }): Promise<{
105
+ error: string;
106
+ job: null;
107
+ ciNodes: never[];
108
+ containerLogs: {};
109
+ source: "lane" | "arg" | "last-export" | undefined;
110
+ lastExport: LastExportData | undefined;
111
+ } | {
112
+ job: any;
113
+ ciNodes: CiGraphNode[];
114
+ containerLogs: Record<string, string[]>;
115
+ source: "lane" | "arg" | "last-export" | undefined;
116
+ lastExport: LastExportData | undefined;
117
+ error?: undefined;
118
+ }>;
119
+ private getErrors;
120
+ }
121
+ export declare class RippleRetryCmd implements Command {
122
+ private ripple;
123
+ name: string;
124
+ description: string;
125
+ skipWorkspace: boolean;
126
+ remoteOp: boolean;
127
+ alias: string;
128
+ options: CommandOptions;
129
+ arguments: {
130
+ name: string;
131
+ description: string;
132
+ }[];
133
+ constructor(ripple: RippleMain);
134
+ report([jobId]: [string], flags: {
135
+ lane?: string;
136
+ }): Promise<string>;
137
+ json([jobId]: [string], flags: {
138
+ lane?: string;
139
+ }): Promise<{
140
+ error: string;
141
+ job?: undefined;
142
+ } | {
143
+ job: RippleJob | null;
144
+ error?: undefined;
145
+ }>;
146
+ }
147
+ export declare class RippleStopCmd implements Command {
148
+ private ripple;
149
+ name: string;
150
+ description: string;
151
+ skipWorkspace: boolean;
152
+ remoteOp: boolean;
153
+ alias: string;
154
+ options: CommandOptions;
155
+ arguments: {
156
+ name: string;
157
+ description: string;
158
+ }[];
159
+ constructor(ripple: RippleMain);
160
+ report([jobId]: [string], flags: {
161
+ lane?: string;
162
+ }): Promise<string>;
163
+ json([jobId]: [string], flags: {
164
+ lane?: string;
165
+ }): Promise<{
166
+ error: string;
167
+ job?: undefined;
168
+ } | {
169
+ job: RippleJob | null;
170
+ error?: undefined;
171
+ }>;
172
+ }