@bakers-build/addon-remote-drupal 0.7.1-next.6 → 0.8.0

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.
Files changed (2) hide show
  1. package/dist/src/index.js +12 -1
  2. package/package.json +6 -6
package/dist/src/index.js CHANGED
@@ -172,7 +172,7 @@ export class DrupalBbRemote {
172
172
  // workspace_id` include resolves the ticket's project AND its workspace
173
173
  // in the SAME request — a `bb_project` belongs to a `bb_group` (the
174
174
  // OG group), and a `bb_group` belongs to a `bb_workspace`.
175
- const doc = (await this.api.get(`bb_ticket/bb_ticket/${uuid}?include=labels,environments,project_id.group_id.workspace_id`));
175
+ const doc = (await this.api.get(`bb_ticket/bb_ticket/${uuid}?include=labels,environments,ticket_type,recipe,project_id.group_id.workspace_id`));
176
176
  const attrs = doc.data?.attributes ?? {};
177
177
  const issueUrl = typeof attrs.origin === 'string' ? attrs.origin : undefined;
178
178
  const included = Array.isArray(doc.included) ? doc.included : [];
@@ -197,6 +197,15 @@ export class DrupalBbRemote {
197
197
  };
198
198
  })
199
199
  .filter((e) => e.name !== '');
200
+ const termName = (name) => {
201
+ const r = ref(doc.data, name);
202
+ const value = r
203
+ ? byId.get(`${r.type}:${r.id}`)?.attributes?.name
204
+ : undefined;
205
+ return typeof value === 'string' ? value : undefined;
206
+ };
207
+ const type = termName('ticket_type');
208
+ const recipe = termName('recipe');
200
209
  const projectRef = ref(doc.data, 'project_id');
201
210
  const project = projectRef
202
211
  ? byId.get(`${projectRef.type}:${projectRef.id}`)
@@ -233,6 +242,8 @@ export class DrupalBbRemote {
233
242
  ...(projectName ? { projectName } : {}),
234
243
  ...(workspaceRef ? { workspaceId: workspaceRef.id } : {}),
235
244
  ...(workspaceName ? { workspaceName } : {}),
245
+ ...(type ? { type } : {}),
246
+ ...(recipe ? { recipe } : {}),
236
247
  labels,
237
248
  environments,
238
249
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bakers-build/addon-remote-drupal",
3
- "version": "0.7.1-next.6",
3
+ "version": "0.8.0",
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.7.1-next.6",
28
- "@bakers-build/core": "^0.7.1-next.6",
29
- "@bakers-build/message": "^0.7.1-next.6"
27
+ "@bakers-build/conductor": "^0.8.0",
28
+ "@bakers-build/core": "^0.8.0",
29
+ "@bakers-build/message": "^0.8.0"
30
30
  },
31
31
  "bakersBuild": {
32
- "commit": "269bb0ea2c27fca3b5ff3ac553df9c81b6179f5f",
33
- "channel": "next"
32
+ "commit": "082d8c57436f78e751f5a9a26a4446cec42209ce",
33
+ "channel": "latest"
34
34
  }
35
35
  }