@meltstudio/meltctl 4.181.2 → 4.183.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 +27 -37
  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.181.2";
17
+ CLI_VERSION = "4.183.0";
18
18
  }
19
19
  });
20
20
 
@@ -811,8 +811,8 @@ function createTrackerResource(config) {
811
811
  }
812
812
  return data;
813
813
  },
814
- async listConnections(projectId) {
815
- const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}`);
814
+ async listConnections() {
815
+ const { data, status } = await apiFetch(config, "/tracker/connections");
816
816
  if (status === 403)
817
817
  throw new Error("Access denied. Only Team Managers can view tracker connections.");
818
818
  if (status !== 200) {
@@ -821,32 +821,27 @@ function createTrackerResource(config) {
821
821
  }
822
822
  return data;
823
823
  },
824
- async listAllConnections() {
825
- const { data, status } = await apiFetch(config, `/tracker/connections`);
826
- if (status === 403)
827
- throw new Error("Access denied. Only Team Managers can view tracker connections.");
828
- if (status !== 200) {
829
- const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
830
- throw new Error(msg ?? `Failed to list tracker connections (${status})`);
831
- }
832
- return data;
833
- },
834
- async startOAuth(projectId, provider) {
835
- const { data, status } = await apiFetch(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
824
+ async startOAuth(provider, returnTo) {
825
+ const params = new URLSearchParams({ provider });
826
+ if (returnTo)
827
+ params.set("returnTo", returnTo);
828
+ const { data, status } = await apiFetch(config, `/tracker/oauth/start?${params.toString()}`);
836
829
  if (status === 503)
837
830
  throw new Error(provider === "jira" ? "Jira OAuth is not configured for this environment." : "Linear OAuth is not configured for this environment.");
838
831
  if (status !== 200)
839
832
  throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
840
833
  return data;
841
834
  },
842
- async disconnect(projectId, provider) {
843
- const { data, status } = await apiFetch(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
835
+ async deleteConnection(id) {
836
+ const { data, status } = await apiFetch(config, `/tracker/connections/${id}`, {
837
+ method: "DELETE"
838
+ });
844
839
  if (status === 403)
845
- throw new Error("Access denied. Only Team Managers can disconnect trackers.");
840
+ throw new Error("Access denied. Only Team Managers can delete tracker connections.");
846
841
  if (status === 404)
847
842
  throw new Error("Connection not found.");
848
843
  if (status >= 400)
849
- throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
844
+ throw new Error(data.error ?? `Failed to delete connection (${status})`);
850
845
  },
851
846
  async listTeams(projectId) {
852
847
  const { data, status } = await apiFetch(config, `/tracker/teams/${projectId}`);
@@ -3939,8 +3934,8 @@ function createTrackerResource2(config) {
3939
3934
  }
3940
3935
  return data;
3941
3936
  },
3942
- async listConnections(projectId) {
3943
- const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}`);
3937
+ async listConnections() {
3938
+ const { data, status } = await apiFetch2(config, "/tracker/connections");
3944
3939
  if (status === 403)
3945
3940
  throw new Error("Access denied. Only Team Managers can view tracker connections.");
3946
3941
  if (status !== 200) {
@@ -3949,32 +3944,27 @@ function createTrackerResource2(config) {
3949
3944
  }
3950
3945
  return data;
3951
3946
  },
3952
- async listAllConnections() {
3953
- const { data, status } = await apiFetch2(config, `/tracker/connections`);
3954
- if (status === 403)
3955
- throw new Error("Access denied. Only Team Managers can view tracker connections.");
3956
- if (status !== 200) {
3957
- const msg = data && typeof data === "object" && "error" in data ? data.error : void 0;
3958
- throw new Error(msg ?? `Failed to list tracker connections (${status})`);
3959
- }
3960
- return data;
3961
- },
3962
- async startOAuth(projectId, provider) {
3963
- const { data, status } = await apiFetch2(config, `/tracker/oauth/start?provider=${provider}&projectId=${projectId}`);
3947
+ async startOAuth(provider, returnTo) {
3948
+ const params = new URLSearchParams({ provider });
3949
+ if (returnTo)
3950
+ params.set("returnTo", returnTo);
3951
+ const { data, status } = await apiFetch2(config, `/tracker/oauth/start?${params.toString()}`);
3964
3952
  if (status === 503)
3965
3953
  throw new Error(provider === "jira" ? "Jira OAuth is not configured for this environment." : "Linear OAuth is not configured for this environment.");
3966
3954
  if (status !== 200)
3967
3955
  throw new Error(data.error ?? `Failed to start OAuth flow (${status})`);
3968
3956
  return data;
3969
3957
  },
3970
- async disconnect(projectId, provider) {
3971
- const { data, status } = await apiFetch2(config, `/tracker/connections/${projectId}/${provider}`, { method: "DELETE" });
3958
+ async deleteConnection(id) {
3959
+ const { data, status } = await apiFetch2(config, `/tracker/connections/${id}`, {
3960
+ method: "DELETE"
3961
+ });
3972
3962
  if (status === 403)
3973
- throw new Error("Access denied. Only Team Managers can disconnect trackers.");
3963
+ throw new Error("Access denied. Only Team Managers can delete tracker connections.");
3974
3964
  if (status === 404)
3975
3965
  throw new Error("Connection not found.");
3976
3966
  if (status >= 400)
3977
- throw new Error(data.error ?? `Failed to disconnect tracker (${status})`);
3967
+ throw new Error(data.error ?? `Failed to delete connection (${status})`);
3978
3968
  },
3979
3969
  async listTeams(projectId) {
3980
3970
  const { data, status } = await apiFetch2(config, `/tracker/teams/${projectId}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.181.2",
3
+ "version": "4.183.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",