@meltstudio/meltctl 4.113.0 → 4.115.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.
- package/dist/index.js +111 -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.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -1045,6 +1045,60 @@ function createPmResource(config) {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
|
+
// ../sdk/dist/resources/slack.js
|
|
1049
|
+
function createSlackResource(config) {
|
|
1050
|
+
return {
|
|
1051
|
+
/** Returns the URL the manager should follow to install the Slack App.
|
|
1052
|
+
* Just exposes `/slack/install` — Slack's auth UI lives upstream. */
|
|
1053
|
+
installUrl() {
|
|
1054
|
+
return `${config.baseUrl}/slack/install`;
|
|
1055
|
+
},
|
|
1056
|
+
async getInstallStatus() {
|
|
1057
|
+
const { data, status } = await apiFetch(config, "/slack/install/status");
|
|
1058
|
+
if (status === 403)
|
|
1059
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1060
|
+
if (status !== 200)
|
|
1061
|
+
throw new Error(`Failed to fetch Slack install status (${status})`);
|
|
1062
|
+
return data;
|
|
1063
|
+
},
|
|
1064
|
+
async listChannels() {
|
|
1065
|
+
const { data, status } = await apiFetch(config, "/slack/channels");
|
|
1066
|
+
if (status === 403)
|
|
1067
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1068
|
+
if (status !== 200)
|
|
1069
|
+
throw new Error(`Failed to list Slack channels (${status})`);
|
|
1070
|
+
return data;
|
|
1071
|
+
},
|
|
1072
|
+
async listMappings() {
|
|
1073
|
+
const { data, status } = await apiFetch(config, "/slack/mappings");
|
|
1074
|
+
if (status === 403)
|
|
1075
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
1076
|
+
if (status !== 200)
|
|
1077
|
+
throw new Error(`Failed to list Slack mappings (${status})`);
|
|
1078
|
+
return data;
|
|
1079
|
+
},
|
|
1080
|
+
async upsertMapping(input3) {
|
|
1081
|
+
const { data, status } = await apiFetch(config, "/slack/mappings", { method: "PUT", body: JSON.stringify(input3) });
|
|
1082
|
+
if (status >= 400)
|
|
1083
|
+
throw new Error(`Failed to save Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1084
|
+
return data;
|
|
1085
|
+
},
|
|
1086
|
+
async deleteMapping(id) {
|
|
1087
|
+
const { data, status } = await apiFetch(config, `/slack/mappings/${id}`, {
|
|
1088
|
+
method: "DELETE"
|
|
1089
|
+
});
|
|
1090
|
+
if (status >= 400)
|
|
1091
|
+
throw new Error(`Failed to delete Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1092
|
+
},
|
|
1093
|
+
async testMapping(id) {
|
|
1094
|
+
const { data, status } = await apiFetch(config, `/slack/mappings/${id}/test`, { method: "POST" });
|
|
1095
|
+
if (status >= 400)
|
|
1096
|
+
throw new Error(`Failed to test Slack mapping (${status}): ${data.error ?? ""}`);
|
|
1097
|
+
return data;
|
|
1098
|
+
}
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1048
1102
|
// ../sdk/dist/client.js
|
|
1049
1103
|
async function apiFetch(config, path9, options = {}) {
|
|
1050
1104
|
const response = await fetch(`${config.baseUrl}${path9}`, {
|
|
@@ -1073,7 +1127,8 @@ function createMeltClient(config) {
|
|
|
1073
1127
|
findings: createFindingsResource(config),
|
|
1074
1128
|
tracker: createTrackerResource(config),
|
|
1075
1129
|
boardAudits: createBoardAuditsResource(config),
|
|
1076
|
-
pm: createPmResource(config)
|
|
1130
|
+
pm: createPmResource(config),
|
|
1131
|
+
slack: createSlackResource(config)
|
|
1077
1132
|
};
|
|
1078
1133
|
}
|
|
1079
1134
|
|
|
@@ -3448,6 +3503,58 @@ function createPmResource2(config) {
|
|
|
3448
3503
|
}
|
|
3449
3504
|
};
|
|
3450
3505
|
}
|
|
3506
|
+
function createSlackResource2(config) {
|
|
3507
|
+
return {
|
|
3508
|
+
/** Returns the URL the manager should follow to install the Slack App.
|
|
3509
|
+
* Just exposes `/slack/install` — Slack's auth UI lives upstream. */
|
|
3510
|
+
installUrl() {
|
|
3511
|
+
return `${config.baseUrl}/slack/install`;
|
|
3512
|
+
},
|
|
3513
|
+
async getInstallStatus() {
|
|
3514
|
+
const { data, status } = await apiFetch2(config, "/slack/install/status");
|
|
3515
|
+
if (status === 403)
|
|
3516
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3517
|
+
if (status !== 200)
|
|
3518
|
+
throw new Error(`Failed to fetch Slack install status (${status})`);
|
|
3519
|
+
return data;
|
|
3520
|
+
},
|
|
3521
|
+
async listChannels() {
|
|
3522
|
+
const { data, status } = await apiFetch2(config, "/slack/channels");
|
|
3523
|
+
if (status === 403)
|
|
3524
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3525
|
+
if (status !== 200)
|
|
3526
|
+
throw new Error(`Failed to list Slack channels (${status})`);
|
|
3527
|
+
return data;
|
|
3528
|
+
},
|
|
3529
|
+
async listMappings() {
|
|
3530
|
+
const { data, status } = await apiFetch2(config, "/slack/mappings");
|
|
3531
|
+
if (status === 403)
|
|
3532
|
+
throw new Error("Access denied. Only Team Managers can view this.");
|
|
3533
|
+
if (status !== 200)
|
|
3534
|
+
throw new Error(`Failed to list Slack mappings (${status})`);
|
|
3535
|
+
return data;
|
|
3536
|
+
},
|
|
3537
|
+
async upsertMapping(input3) {
|
|
3538
|
+
const { data, status } = await apiFetch2(config, "/slack/mappings", { method: "PUT", body: JSON.stringify(input3) });
|
|
3539
|
+
if (status >= 400)
|
|
3540
|
+
throw new Error(`Failed to save Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3541
|
+
return data;
|
|
3542
|
+
},
|
|
3543
|
+
async deleteMapping(id) {
|
|
3544
|
+
const { data, status } = await apiFetch2(config, `/slack/mappings/${id}`, {
|
|
3545
|
+
method: "DELETE"
|
|
3546
|
+
});
|
|
3547
|
+
if (status >= 400)
|
|
3548
|
+
throw new Error(`Failed to delete Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3549
|
+
},
|
|
3550
|
+
async testMapping(id) {
|
|
3551
|
+
const { data, status } = await apiFetch2(config, `/slack/mappings/${id}/test`, { method: "POST" });
|
|
3552
|
+
if (status >= 400)
|
|
3553
|
+
throw new Error(`Failed to test Slack mapping (${status}): ${data.error ?? ""}`);
|
|
3554
|
+
return data;
|
|
3555
|
+
}
|
|
3556
|
+
};
|
|
3557
|
+
}
|
|
3451
3558
|
async function apiFetch2(config, path22, options = {}) {
|
|
3452
3559
|
const response = await fetch(`${config.baseUrl}${path22}`, {
|
|
3453
3560
|
...options,
|
|
@@ -3475,7 +3582,8 @@ function createMeltClient2(config) {
|
|
|
3475
3582
|
findings: createFindingsResource2(config),
|
|
3476
3583
|
tracker: createTrackerResource2(config),
|
|
3477
3584
|
boardAudits: createBoardAuditsResource2(config),
|
|
3478
|
-
pm: createPmResource2(config)
|
|
3585
|
+
pm: createPmResource2(config),
|
|
3586
|
+
slack: createSlackResource2(config)
|
|
3479
3587
|
};
|
|
3480
3588
|
}
|
|
3481
3589
|
var auditFindingSchema2 = z2.object({
|
package/package.json
CHANGED