@bakers-build/addon-remote-drupal 0.8.0 → 0.8.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,7 @@ export declare class DrupalBbRemote implements BbRemote {
67
67
  listConductors(owner?: 'me'): Promise<ConductorStatus[]>;
68
68
  markRunning(uuid: string, attrs?: RunWriteAttributes): Promise<void>;
69
69
  markFailed(uuid: string, errorLog: string): Promise<void>;
70
+ cancelRun(uuid: string): Promise<void>;
70
71
  fetchFinalizableRuns(id: string): Promise<FinalizableRun[]>;
71
72
  private finalizableRunsInState;
72
73
  finalizeRun(uuid: string, log: string, metrics?: RunMetrics): Promise<void>;
package/dist/src/index.js CHANGED
@@ -76,7 +76,7 @@ export class DrupalBbRemote {
76
76
  .collection('bb_run')
77
77
  .where('conductor_id.conductor_id', '=', id)
78
78
  .whereIn('state', ACTIVE)
79
- .fields(['state', 'state_at_start', 'worktree_path'])
79
+ .fields(['state', 'state_at_start', 'worktree_path', 'agent'])
80
80
  .page(100)
81
81
  .list();
82
82
  return Promise.all(rows.map(async (r) => ({
@@ -87,6 +87,7 @@ export class DrupalBbRemote {
87
87
  state: r.attr('state') ?? '',
88
88
  stateAtStart: r.attr('state_at_start') ?? '',
89
89
  worktreePath: r.attr('worktree_path') ?? '',
90
+ agent: r.attr('agent') ?? '',
90
91
  })));
91
92
  }
92
93
  async activeRunCount(id) {
@@ -496,6 +497,11 @@ export class DrupalBbRemote {
496
497
  },
497
498
  });
498
499
  }
500
+ async cancelRun(uuid) {
501
+ await this.api.update('bb_run', uuid, {
502
+ attributes: { state: 'cancelled' },
503
+ });
504
+ }
499
505
  async fetchFinalizableRuns(id) {
500
506
  // `done` and `cancelled` finalise identically: stop the agent, capture its
501
507
  // transcript, then close the run's terminal tab. Two queries are used
@@ -833,7 +839,7 @@ export class DrupalBbRemote {
833
839
  }
834
840
  export function drupalRemote() {
835
841
  return {
836
- kind: 'remote',
842
+ kind: 'server',
837
843
  id: 'drupal',
838
844
  requiredModules: [],
839
845
  async createRemote(config) {
@@ -1,3 +1,3 @@
1
1
  import type { Preset } from '@bakers-build/conductor/contract';
2
- export declare const remotes: Preset['remotes'];
2
+ export declare const servers: Preset['servers'];
3
3
  export declare const scopes: Preset['scopes'];
@@ -1,4 +1,4 @@
1
1
  import { drupalRemote } from './index.js';
2
- export const remotes = (acc) => [...acc, drupalRemote()];
3
- // Conductor wiring of one project: list this addon in .bakers/conductor.config.js addons[].
2
+ export const servers = (acc) => [...acc, drupalRemote()];
3
+ // Conductor wiring of one project: list this addon in .bakers/project.config.js addons[].
4
4
  export const scopes = ['project'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-remote-drupal",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-next.1",
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.0",
28
- "@bakers-build/core": "^0.8.0",
29
- "@bakers-build/message": "^0.8.0"
27
+ "@bakers-build/conductor": "^0.8.1-next.1",
28
+ "@bakers-build/core": "^0.8.1-next.1",
29
+ "@bakers-build/message": "^0.8.1-next.1"
30
30
  },
31
31
  "bakersBuild": {
32
- "commit": "082d8c57436f78e751f5a9a26a4446cec42209ce",
33
- "channel": "latest"
32
+ "commit": "c4a887bee37bb2fed14bb9ba15ad0aacf0e26f7e",
33
+ "channel": "next"
34
34
  }
35
35
  }