exponential-cli 1.11.0 → 1.11.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.
package/dist/index.js CHANGED
@@ -4211,18 +4211,8 @@ function createTicketsCommand() {
4211
4211
  );
4212
4212
  }
4213
4213
  const client = getClient();
4214
- let workspaceId;
4215
- let productId;
4216
- if (options.product) {
4217
- workspaceId = await resolveWorkspaceId(client, options.workspace);
4218
- productId = await resolveProductId(
4219
- client,
4220
- workspaceId,
4221
- options.product
4222
- );
4223
- }
4224
- const list = await client.tickets.list({
4225
- productId,
4214
+ const workspaceId = await resolveWorkspaceId(client, options.workspace);
4215
+ const filters = {
4226
4216
  status,
4227
4217
  type,
4228
4218
  featureId: options.feature,
@@ -4230,7 +4220,27 @@ function createTicketsCommand() {
4230
4220
  assigneeId: options.assignee,
4231
4221
  prUrl: options.pr,
4232
4222
  branchName: options.branch
4233
- });
4223
+ };
4224
+ let list;
4225
+ if (options.product) {
4226
+ const productId = await resolveProductId(
4227
+ client,
4228
+ workspaceId,
4229
+ options.product
4230
+ );
4231
+ list = await client.tickets.list({ productId, ...filters });
4232
+ } else {
4233
+ const products = await client.products.list(workspaceId);
4234
+ const settled = await Promise.allSettled(
4235
+ products.map((p) => client.tickets.list({ productId: p.id, ...filters }))
4236
+ );
4237
+ list = settled.flatMap((r) => r.status === "fulfilled" ? r.value : []);
4238
+ settled.forEach((r, i) => {
4239
+ if (r.status !== "rejected") return;
4240
+ const reason = r.reason instanceof Error ? r.reason.message : String(r.reason);
4241
+ console.error(`Warning: skipped product ${products[i].slug}: ${reason}`);
4242
+ });
4243
+ }
4234
4244
  let filtered = list;
4235
4245
  if (options.label.length > 0) {
4236
4246
  const labelIds = new Set(