@firfi/huly-mcp 0.1.54 → 0.1.55

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.cjs CHANGED
@@ -154634,7 +154634,8 @@ var findProjectWithStatuses = (projectIdentifier) => Effect_exports.gen(function
154634
154634
  }
154635
154635
  }
154636
154636
  }
154637
- return { client, project: project3, statuses };
154637
+ const defaultStatusId = project3.defaultIssueStatus || statuses[0]?._id;
154638
+ return { client, project: project3, statuses, defaultStatusId };
154638
154639
  });
154639
154640
  var parseIssueIdentifier = (identifier2, projectIdentifier) => {
154640
154641
  const idStr = String(identifier2).trim();
@@ -174139,7 +174140,7 @@ var PostHog = class extends PostHogBackendClient {
174139
174140
  };
174140
174141
 
174141
174142
  // src/version.ts
174142
- var VERSION = true ? "0.1.53" : "0.0.0-dev";
174143
+ var VERSION = true ? "0.1.54" : "0.0.0-dev";
174143
174144
 
174144
174145
  // src/telemetry/posthog.ts
174145
174146
  var POSTHOG_API_KEY = "phc_TGfFqCGdnF0p68wuFzd5WSw1IsBvOJW0YgoMJDyZPjm";
@@ -181305,12 +181306,7 @@ var resolveAssignee = (client, assigneeIdentifier) => Effect_exports.gen(functio
181305
181306
  return person;
181306
181307
  });
181307
181308
  var createIssue = (params) => Effect_exports.gen(function* () {
181308
- const result = params.status !== void 0 ? yield* findProjectWithStatuses(params.project) : yield* Effect_exports.map(findProject(params.project), ({ client: client2, project: project4 }) => ({
181309
- client: client2,
181310
- project: project4,
181311
- statuses: []
181312
- }));
181313
- const { client, project: project3, statuses } = result;
181309
+ const { client, defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
181314
181310
  const issueId = (0, import_core32.generateId)();
181315
181311
  const incOps = { $inc: { sequence: 1 } };
181316
181312
  const incResult = yield* client.updateDoc(
@@ -181321,7 +181317,7 @@ var createIssue = (params) => Effect_exports.gen(function* () {
181321
181317
  true
181322
181318
  );
181323
181319
  const sequence = extractUpdatedSequence(incResult) ?? project3.sequence + 1;
181324
- const statusRef = params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) : project3.defaultIssueStatus;
181320
+ const statusRef = params.status !== void 0 ? yield* resolveStatusByName(statuses, params.status, params.project) : defaultStatusId !== void 0 ? defaultStatusId : yield* Effect_exports.fail(new InvalidStatusError({ status: "(default)", project: params.project }));
181325
181321
  const assigneeRef = params.assignee !== void 0 ? (yield* resolveAssignee(client, params.assignee))._id : null;
181326
181322
  const lastIssue = yield* client.findOne(
181327
181323
  tracker.class.Issue,
@@ -183220,8 +183216,8 @@ var listProjects = (params) => Effect_exports.gen(function* () {
183220
183216
  };
183221
183217
  });
183222
183218
  var getProject = (params) => Effect_exports.gen(function* () {
183223
- const { project: project3, statuses } = yield* findProjectWithStatuses(params.project);
183224
- const defaultStatus = statuses.find((s) => s._id === project3.defaultIssueStatus);
183219
+ const { defaultStatusId, project: project3, statuses } = yield* findProjectWithStatuses(params.project);
183220
+ const defaultStatus = defaultStatusId !== void 0 ? statuses.find((s) => s._id === defaultStatusId) : void 0;
183225
183221
  return yield* parseProject({
183226
183222
  identifier: project3.identifier,
183227
183223
  name: project3.name,