@meltstudio/meltctl 4.198.0 → 4.200.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 +43 -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.200.0";
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -242,7 +242,7 @@ import path from "path";
|
|
|
242
242
|
import os from "os";
|
|
243
243
|
var AUTH_DIR = path.join(os.homedir(), ".meltctl");
|
|
244
244
|
var AUTH_FILE = path.join(AUTH_DIR, "auth.json");
|
|
245
|
-
var API_BASE = process.env["MELTCTL_API_URL"] ?? "https://
|
|
245
|
+
var API_BASE = process.env["MELTCTL_API_URL"] ?? "https://api.meltctl.meltstudio.co";
|
|
246
246
|
async function getStoredAuth() {
|
|
247
247
|
if (!await fs.pathExists(AUTH_FILE)) {
|
|
248
248
|
return void 0;
|
|
@@ -1125,6 +1125,26 @@ function createPmResource(config) {
|
|
|
1125
1125
|
const res = await apiFetch(config, `/pm/projects/${projectId}/portal-view`, { method: "POST" });
|
|
1126
1126
|
return unwrap("log portal view", res, 201);
|
|
1127
1127
|
},
|
|
1128
|
+
// ─── Client-portal access (manager-only provisioning) ─────────────────
|
|
1129
|
+
/** Active client→project access grants (Settings → Client access). */
|
|
1130
|
+
async listClientAccess() {
|
|
1131
|
+
const res = await apiFetch(config, `/pm/client-access`);
|
|
1132
|
+
return unwrap("list client access", res);
|
|
1133
|
+
},
|
|
1134
|
+
/** Grant a client email read access to a project's roadmap. Idempotent
|
|
1135
|
+
* (reactivates a revoked grant, no-ops an active one). */
|
|
1136
|
+
async grantClientAccess(input3) {
|
|
1137
|
+
const res = await apiFetch(config, `/pm/client-access`, {
|
|
1138
|
+
method: "POST",
|
|
1139
|
+
body: JSON.stringify(input3)
|
|
1140
|
+
});
|
|
1141
|
+
return unwrap("grant client access", res, [200, 201]);
|
|
1142
|
+
},
|
|
1143
|
+
/** Revoke a grant (soft delete). */
|
|
1144
|
+
async revokeClientAccess(id) {
|
|
1145
|
+
const res = await apiFetch(config, `/pm/client-access/${id}`, { method: "DELETE" });
|
|
1146
|
+
unwrap("revoke client access", res);
|
|
1147
|
+
},
|
|
1128
1148
|
// ─── Project settings ─────────────────────────────────────────────────
|
|
1129
1149
|
async getProjectSettings(projectId) {
|
|
1130
1150
|
const res = await apiFetch(config, `/pm/project-settings/${projectId}`);
|
|
@@ -4441,6 +4461,26 @@ function createPmResource2(config) {
|
|
|
4441
4461
|
const res = await apiFetch2(config, `/pm/projects/${projectId}/portal-view`, { method: "POST" });
|
|
4442
4462
|
return unwrap2("log portal view", res, 201);
|
|
4443
4463
|
},
|
|
4464
|
+
// ─── Client-portal access (manager-only provisioning) ─────────────────
|
|
4465
|
+
/** Active client→project access grants (Settings → Client access). */
|
|
4466
|
+
async listClientAccess() {
|
|
4467
|
+
const res = await apiFetch2(config, `/pm/client-access`);
|
|
4468
|
+
return unwrap2("list client access", res);
|
|
4469
|
+
},
|
|
4470
|
+
/** Grant a client email read access to a project's roadmap. Idempotent
|
|
4471
|
+
* (reactivates a revoked grant, no-ops an active one). */
|
|
4472
|
+
async grantClientAccess(input3) {
|
|
4473
|
+
const res = await apiFetch2(config, `/pm/client-access`, {
|
|
4474
|
+
method: "POST",
|
|
4475
|
+
body: JSON.stringify(input3)
|
|
4476
|
+
});
|
|
4477
|
+
return unwrap2("grant client access", res, [200, 201]);
|
|
4478
|
+
},
|
|
4479
|
+
/** Revoke a grant (soft delete). */
|
|
4480
|
+
async revokeClientAccess(id) {
|
|
4481
|
+
const res = await apiFetch2(config, `/pm/client-access/${id}`, { method: "DELETE" });
|
|
4482
|
+
unwrap2("revoke client access", res);
|
|
4483
|
+
},
|
|
4444
4484
|
// ─── Project settings ─────────────────────────────────────────────────
|
|
4445
4485
|
async getProjectSettings(projectId) {
|
|
4446
4486
|
const res = await apiFetch2(config, `/pm/project-settings/${projectId}`);
|
|
@@ -5373,7 +5413,7 @@ var RULE_BY_ID2 = new Map(ISSUE_RULES2.map((r) => [r.id, r]));
|
|
|
5373
5413
|
var FOURTEEN_DAYS_MS2 = 14 * 24 * 60 * 60 * 1e3;
|
|
5374
5414
|
var AUTH_DIR2 = path8.join(os3.homedir(), ".meltctl");
|
|
5375
5415
|
var AUTH_FILE2 = path8.join(AUTH_DIR2, "auth.json");
|
|
5376
|
-
var API_BASE2 = process.env["MELTCTL_API_URL"] ?? "https://
|
|
5416
|
+
var API_BASE2 = process.env["MELTCTL_API_URL"] ?? "https://api.meltctl.meltstudio.co";
|
|
5377
5417
|
var AuthError = class extends Error {
|
|
5378
5418
|
constructor(message) {
|
|
5379
5419
|
super(message);
|
package/package.json
CHANGED