@meltstudio/meltctl 4.120.0 → 4.122.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/index.js +55 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var CLI_VERSION;
14
14
  var init_version = __esm({
15
15
  "src/utils/version.ts"() {
16
16
  "use strict";
17
- CLI_VERSION = "4.120.0";
17
+ CLI_VERSION = "4.122.0";
18
18
  }
19
19
  });
20
20
 
@@ -785,6 +785,33 @@ function createTrackerResource(config) {
785
785
  }
786
786
  return data;
787
787
  },
788
+ async listConnections(projectId) {
789
+ const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}`);
790
+ if (status === 403)
791
+ throw new Error("Access denied. Only Team Managers can view tracker connections.");
792
+ if (status !== 200) {
793
+ const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
794
+ throw new Error(msg ?? `Failed to list tracker connections (${status})`);
795
+ }
796
+ return data;
797
+ },
798
+ async startOAuth(projectId, provider) {
799
+ const { data, status } = await apiFetch(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
800
+ if (status === 503)
801
+ throw new Error("Linear OAuth is not configured for this environment.");
802
+ if (status !== 200)
803
+ throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
804
+ return data;
805
+ },
806
+ async disconnect(projectId, provider) {
807
+ const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
808
+ if (status === 403)
809
+ throw new Error("Access denied. Only Team Managers can disconnect trackers.");
810
+ if (status === 404)
811
+ throw new Error("Connection not found.");
812
+ if (status >= 400)
813
+ throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
814
+ },
788
815
  async getTicketsByProject() {
789
816
  const { data, status } = await apiFetch(config, "/tracker/tickets/by-project");
790
817
  if (status === 403)
@@ -3283,6 +3310,33 @@ function createTrackerResource2(config) {
3283
3310
  }
3284
3311
  return data;
3285
3312
  },
3313
+ async listConnections(projectId) {
3314
+ const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}`);
3315
+ if (status === 403)
3316
+ throw new Error("Access denied. Only Team Managers can view tracker connections.");
3317
+ if (status !== 200) {
3318
+ const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
3319
+ throw new Error(msg ?? `Failed to list tracker connections (${status})`);
3320
+ }
3321
+ return data;
3322
+ },
3323
+ async startOAuth(projectId, provider) {
3324
+ const { data, status } = await apiFetch2(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
3325
+ if (status === 503)
3326
+ throw new Error("Linear OAuth is not configured for this environment.");
3327
+ if (status !== 200)
3328
+ throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
3329
+ return data;
3330
+ },
3331
+ async disconnect(projectId, provider) {
3332
+ const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
3333
+ if (status === 403)
3334
+ throw new Error("Access denied. Only Team Managers can disconnect trackers.");
3335
+ if (status === 404)
3336
+ throw new Error("Connection not found.");
3337
+ if (status >= 400)
3338
+ throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
3339
+ },
3286
3340
  async getTicketsByProject() {
3287
3341
  const { data, status } = await apiFetch2(config, "/tracker/tickets/by-project");
3288
3342
  if (status === 403)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.120.0",
3
+ "version": "4.122.0",
4
4
  "description": "AI-first development tools for teams - set up AGENTS.md, Claude Code, Cursor, and OpenCode standards",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",