@meltstudio/meltctl 4.114.0 → 4.115.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 +135 -3
- 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.
|
|
17
|
+
CLI_VERSION = "4.115.1";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1045,6 +1045,72 @@ function createPmResource(config) {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
|
+
// ../sdk/dist/resources/slack.js
|
|
1049
|
+
function createSlackResource(config) {
|
|
1050
|
+
return {
|
|
1051
|
+
/** Static URL of the API's redirect endpoint. Useful for callers that can
|
|
1052
|
+
* attach the bearer token themselves; the dashboard proxies via
|
|
1053
|
+
* `startInstall()` instead because the browser can't attach the JWT on a
|
|
1054
|
+
* cross-origin top-level navigation. */
|
|
1055
|
+
installUrl() {
|
|
1056
|
+
return `${config.baseUrl}/slack/install`;
|
|
1057
|
+
},
|
|
1058
|
+
/** Returns the upstream Slack OAuth URL the user should be redirected to
|
|
1059
|
+
* next. Used by the dashboard's `/api/slack/install` proxy route. */
|
|
1060
|
+
async startInstall() {
|
|
1061
|
+
const { data, status } = await apiFetch(config, "/slack/install/start");
|
|
1062
|
+
if (status === 403)
|
|
1063
|
+
throw new Error("Access denied. Only Team Managers can install Slack.");
|
|
1064
|
+
if (status >= 400)
|
|
1065
|
+
throw new Error(`Failed to start Slack install (${status}): ${data.error ?? ""}`);
|
|
1066
|
+
return data;
|
|
1067
|
+
},
|
|
1068
|
+
async getInstallStatus() {
|
|
1069
|
+
const { data, status } = await apiFetch(config, "/slack/install/status");
|
|
1070
|
+
if (status === 403)
|
|
1071
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1072
|
+
if (status !== 200)
|
|
1073
|
+
throw new Error(`Failed to fetch Slack install status (${status})`);
|
|
1074
|
+
return data;
|
|
1075
|
+
},
|
|
1076
|
+
async listChannels() {
|
|
1077
|
+
const { data, status } = await apiFetch(config, "/slack/channels");
|
|
1078
|
+
if (status === 403)
|
|
1079
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1080
|
+
if (status !== 200)
|
|
1081
|
+
throw new Error(`Failed to list Slack channels (${status})`);
|
|
1082
|
+
return data;
|
|
1083
|
+
},
|
|
1084
|
+
async listMappings() {
|
|
1085
|
+
const { data, status } = await apiFetch(config, "/slack/mappings");
|
|
1086
|
+
if (status === 403)
|
|
1087
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1088
|
+
if (status !== 200)
|
|
1089
|
+
throw new Error(`Failed to list Slack mappings (${status})`);
|
|
1090
|
+
return data;
|
|
1091
|
+
},
|
|
1092
|
+
async upsertMapping(input3) {
|
|
1093
|
+
const { data, status } = await apiFetch(config, "/slack/mappings", { method: "PUT", body: JSON.stringify(input3) });
|
|
1094
|
+
if (status >= 400)
|
|
1095
|
+
throw new Error(`Failed to save Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1096
|
+
return data;
|
|
1097
|
+
},
|
|
1098
|
+
async deleteMapping(id) {
|
|
1099
|
+
const { data, status } = await apiFetch(config, `/slack/mappings/${id}`, {
|
|
1100
|
+
method: "DELETE"
|
|
1101
|
+
});
|
|
1102
|
+
if (status >= 400)
|
|
1103
|
+
throw new Error(`Failed to delete Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1104
|
+
},
|
|
1105
|
+
async testMapping(id) {
|
|
1106
|
+
const { data, status } = await apiFetch(config, `/slack/mappings/${id}/test`, { method: "POST" });
|
|
1107
|
+
if (status >= 400)
|
|
1108
|
+
throw new Error(`Failed to test Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1109
|
+
return data;
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1048
1114
|
// ../sdk/dist/client.js
|
|
1049
1115
|
async function apiFetch(config, path9, options = {}) {
|
|
1050
1116
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1073,7 +1139,8 @@ function createMeltClient(config) {
|
|
|
1073
1139
|
findings: createFindingsResource(config),
|
|
1074
1140
|
tracker: createTrackerResource(config),
|
|
1075
1141
|
boardAudits: createBoardAuditsResource(config),
|
|
1076
|
-
pm: createPmResource(config)
|
|
1142
|
+
pm: createPmResource(config),
|
|
1143
|
+
slack: createSlackResource(config)
|
|
1077
1144
|
};
|
|
1078
1145
|
}
|
|
1079
1146
|
|
|
@@ -3448,6 +3515,70 @@ function createPmResource2(config) {
|
|
|
3448
3515
|
}
|
|
3449
3516
|
};
|
|
3450
3517
|
}
|
|
3518
|
+
function createSlackResource2(config) {
|
|
3519
|
+
return {
|
|
3520
|
+
/** Static URL of the API's redirect endpoint. Useful for callers that can
|
|
3521
|
+
* attach the bearer token themselves; the dashboard proxies via
|
|
3522
|
+
* `startInstall()` instead because the browser can't attach the JWT on a
|
|
3523
|
+
* cross-origin top-level navigation. */
|
|
3524
|
+
installUrl() {
|
|
3525
|
+
return `${config.baseUrl}/slack/install`;
|
|
3526
|
+
},
|
|
3527
|
+
/** Returns the upstream Slack OAuth URL the user should be redirected to
|
|
3528
|
+
* next. Used by the dashboard's `/api/slack/install` proxy route. */
|
|
3529
|
+
async startInstall() {
|
|
3530
|
+
const { data, status } = await apiFetch2(config, "/slack/install/start");
|
|
3531
|
+
if (status === 403)
|
|
3532
|
+
throw new Error("Access denied. Only Team Managers can install Slack.");
|
|
3533
|
+
if (status >= 400)
|
|
3534
|
+
throw new Error(`Failed to start Slack install (${status}): ${data.error ?? ""}`);
|
|
3535
|
+
return data;
|
|
3536
|
+
},
|
|
3537
|
+
async getInstallStatus() {
|
|
3538
|
+
const { data, status } = await apiFetch2(config, "/slack/install/status");
|
|
3539
|
+
if (status === 403)
|
|
3540
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3541
|
+
if (status !== 200)
|
|
3542
|
+
throw new Error(`Failed to fetch Slack install status (${status})`);
|
|
3543
|
+
return data;
|
|
3544
|
+
},
|
|
3545
|
+
async listChannels() {
|
|
3546
|
+
const { data, status } = await apiFetch2(config, "/slack/channels");
|
|
3547
|
+
if (status === 403)
|
|
3548
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3549
|
+
if (status !== 200)
|
|
3550
|
+
throw new Error(`Failed to list Slack channels (${status})`);
|
|
3551
|
+
return data;
|
|
3552
|
+
},
|
|
3553
|
+
async listMappings() {
|
|
3554
|
+
const { data, status } = await apiFetch2(config, "/slack/mappings");
|
|
3555
|
+
if (status === 403)
|
|
3556
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3557
|
+
if (status !== 200)
|
|
3558
|
+
throw new Error(`Failed to list Slack mappings (${status})`);
|
|
3559
|
+
return data;
|
|
3560
|
+
},
|
|
3561
|
+
async upsertMapping(input3) {
|
|
3562
|
+
const { data, status } = await apiFetch2(config, "/slack/mappings", { method: "PUT", body: JSON.stringify(input3) });
|
|
3563
|
+
if (status >= 400)
|
|
3564
|
+
throw new Error(`Failed to save Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3565
|
+
return data;
|
|
3566
|
+
},
|
|
3567
|
+
async deleteMapping(id) {
|
|
3568
|
+
const { data, status } = await apiFetch2(config, `/slack/mappings/${id}`, {
|
|
3569
|
+
method: "DELETE"
|
|
3570
|
+
});
|
|
3571
|
+
if (status >= 400)
|
|
3572
|
+
throw new Error(`Failed to delete Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3573
|
+
},
|
|
3574
|
+
async testMapping(id) {
|
|
3575
|
+
const { data, status } = await apiFetch2(config, `/slack/mappings/${id}/test`, { method: "POST" });
|
|
3576
|
+
if (status >= 400)
|
|
3577
|
+
throw new Error(`Failed to test Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3578
|
+
return data;
|
|
3579
|
+
}
|
|
3580
|
+
};
|
|
3581
|
+
}
|
|
3451
3582
|
async function apiFetch2(config, path22, options = {}) {
|
|
3452
3583
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
3453
3584
|
...options,
|
|
@@ -3475,7 +3606,8 @@ function createMeltClient2(config) {
|
|
|
3475
3606
|
findings: createFindingsResource2(config),
|
|
3476
3607
|
tracker: createTrackerResource2(config),
|
|
3477
3608
|
boardAudits: createBoardAuditsResource2(config),
|
|
3478
|
-
pm: createPmResource2(config)
|
|
3609
|
+
pm: createPmResource2(config),
|
|
3610
|
+
slack: createSlackResource2(config)
|
|
3479
3611
|
};
|
|
3480
3612
|
}
|
|
3481
3613
|
var auditFindingSchema2 = z2.object({
|
package/package.json
CHANGED