@bakers-build/addon-remote-drupal 0.8.1-next.2 → 0.8.1-next.4
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.
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +1 -24
- package/package.json +5 -5
package/dist/src/index.d.ts
CHANGED
|
@@ -39,8 +39,6 @@ export declare class DrupalBbRemote implements BbRemote {
|
|
|
39
39
|
siteTools?: SiteToolClient;
|
|
40
40
|
constructor(api: JsonApiClient, selection?: BbProjectSelection | undefined, resolvedProjectId?: string | undefined, fetchRunLog?: RunLogFetcher);
|
|
41
41
|
fetchActiveRuns(id: string): Promise<ActiveRun[]>;
|
|
42
|
-
/** Through the site's `bakers_comment_publish`, which throws on a tool error. */
|
|
43
|
-
publishTicketComment(ticketUuid: string, body: string): Promise<void>;
|
|
44
42
|
activeRunCount(id: string): Promise<number>;
|
|
45
43
|
machineCapacity(hostKey: string): Promise<{
|
|
46
44
|
maxParallel: number;
|
|
@@ -69,7 +67,6 @@ export declare class DrupalBbRemote implements BbRemote {
|
|
|
69
67
|
listConductors(owner?: 'me'): Promise<ConductorStatus[]>;
|
|
70
68
|
markRunning(uuid: string, attrs?: RunWriteAttributes): Promise<void>;
|
|
71
69
|
markFailed(uuid: string, errorLog: string): Promise<void>;
|
|
72
|
-
cancelRun(uuid: string): Promise<void>;
|
|
73
70
|
fetchFinalizableRuns(id: string): Promise<FinalizableRun[]>;
|
|
74
71
|
private finalizableRunsInState;
|
|
75
72
|
finalizeRun(uuid: string, log: string, metrics?: RunMetrics): Promise<void>;
|
package/dist/src/index.js
CHANGED
|
@@ -76,37 +76,19 @@ export class DrupalBbRemote {
|
|
|
76
76
|
.collection('bb_run')
|
|
77
77
|
.where('conductor_id.conductor_id', '=', id)
|
|
78
78
|
.whereIn('state', ACTIVE)
|
|
79
|
-
.fields([
|
|
80
|
-
'state',
|
|
81
|
-
'state_at_start',
|
|
82
|
-
'worktree_path',
|
|
83
|
-
'drupal_internal__id',
|
|
84
|
-
'agent',
|
|
85
|
-
])
|
|
79
|
+
.fields(['state', 'state_at_start', 'worktree_path'])
|
|
86
80
|
.page(100)
|
|
87
81
|
.list();
|
|
88
82
|
return Promise.all(rows.map(async (r) => ({
|
|
89
83
|
runUuid: r.id,
|
|
90
|
-
runId: Number(r.attr('drupal_internal__id')),
|
|
91
84
|
ticketUuid: r.rel('ticket_id') ?? '',
|
|
92
85
|
ticketIdentifier: await this.getRunTicketIdentifier(r.id),
|
|
93
86
|
branchName: await this.getRunTicketBranchName(r.id),
|
|
94
87
|
state: r.attr('state') ?? '',
|
|
95
88
|
stateAtStart: r.attr('state_at_start') ?? '',
|
|
96
89
|
worktreePath: r.attr('worktree_path') ?? '',
|
|
97
|
-
agent: r.attr('agent') ?? '',
|
|
98
90
|
})));
|
|
99
91
|
}
|
|
100
|
-
/** Through the site's `bakers_comment_publish`, which throws on a tool error. */
|
|
101
|
-
async publishTicketComment(ticketUuid, body) {
|
|
102
|
-
if (!this.siteTools)
|
|
103
|
-
throw new Error('no site tools to publish a comment');
|
|
104
|
-
await this.siteTools.call('bakers_comment_publish', {
|
|
105
|
-
ticket: ticketUuid,
|
|
106
|
-
type: 'comment',
|
|
107
|
-
body,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
92
|
async activeRunCount(id) {
|
|
111
93
|
// Filter on the related conductor's registration string field.
|
|
112
94
|
return this.api
|
|
@@ -514,11 +496,6 @@ export class DrupalBbRemote {
|
|
|
514
496
|
},
|
|
515
497
|
});
|
|
516
498
|
}
|
|
517
|
-
async cancelRun(uuid) {
|
|
518
|
-
await this.api.update('bb_run', uuid, {
|
|
519
|
-
attributes: { state: 'cancelled' },
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
499
|
async fetchFinalizableRuns(id) {
|
|
523
500
|
// `done` and `cancelled` finalise identically: stop the agent, capture its
|
|
524
501
|
// transcript, then close the run's terminal tab. Two queries are used
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/addon-remote-drupal",
|
|
3
|
-
"version": "0.8.1-next.
|
|
3
|
+
"version": "0.8.1-next.4",
|
|
4
4
|
"description": "bakers.build conductor remote addon: the Drupal/JSON:API control-plane remote.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"dropsh": "^0.8.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@bakers-build/conductor": "^0.8.1-next.
|
|
28
|
-
"@bakers-build/core": "^0.8.1-next.
|
|
29
|
-
"@bakers-build/message": "^0.8.1-next.
|
|
27
|
+
"@bakers-build/conductor": "^0.8.1-next.4",
|
|
28
|
+
"@bakers-build/core": "^0.8.1-next.4",
|
|
29
|
+
"@bakers-build/message": "^0.8.1-next.4"
|
|
30
30
|
},
|
|
31
31
|
"bakersBuild": {
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "ba56bec9e0a2d128491f52088a07061938e77832",
|
|
33
33
|
"channel": "next"
|
|
34
34
|
}
|
|
35
35
|
}
|