@meltstudio/meltctl 4.39.0 → 4.41.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 +49 -2
  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.39.0";
17
+ CLI_VERSION = "4.41.0";
18
18
  }
19
19
  });
20
20
 
@@ -287,6 +287,8 @@ function createAuditsResource(config) {
287
287
  params.set("latest", "true");
288
288
  if (filters?.limit)
289
289
  params.set("limit", String(filters.limit));
290
+ if (filters?.projectId)
291
+ params.set("projectId", String(filters.projectId));
290
292
  const query = params.toString();
291
293
  const path8 = `/audits${query ? `?${query}` : ""}`;
292
294
  const { data, status } = await apiFetch(config, path8);
@@ -333,6 +335,8 @@ function createPlansResource(config) {
333
335
  params.set("status", filters.status);
334
336
  if (filters?.limit)
335
337
  params.set("limit", String(filters.limit));
338
+ if (filters?.projectId)
339
+ params.set("projectId", String(filters.projectId));
336
340
  const query = params.toString();
337
341
  const path8 = `/plans${query ? `?${query}` : ""}`;
338
342
  const { data, status } = await apiFetch(config, path8);
@@ -381,6 +385,8 @@ function createEventsResource(config) {
381
385
  params.set("dateTo", filters.dateTo);
382
386
  if (filters?.limit)
383
387
  params.set("limit", String(filters.limit));
388
+ if (filters?.projectId)
389
+ params.set("projectId", String(filters.projectId));
384
390
  const query = params.toString();
385
391
  const path8 = `/events${query ? `?${query}` : ""}`;
386
392
  const { data, status } = await apiFetch(config, path8);
@@ -396,6 +402,8 @@ function createEventsResource(config) {
396
402
  params.set("dateFrom", filters.dateFrom);
397
403
  if (filters?.dateTo)
398
404
  params.set("dateTo", filters.dateTo);
405
+ if (filters?.projectId)
406
+ params.set("projectId", String(filters.projectId));
399
407
  const query = params.toString();
400
408
  const path8 = `/events/stats${query ? `?${query}` : ""}`;
401
409
  const { data, status } = await apiFetch(config, path8);
@@ -529,6 +537,44 @@ function createPeopleResource(config) {
529
537
  };
530
538
  }
531
539
 
540
+ // ../sdk/dist/resources/projects.js
541
+ function createProjectsResource(config) {
542
+ return {
543
+ async list() {
544
+ const { data, status } = await apiFetch(config, "/projects");
545
+ if (status === 403)
546
+ throw new Error("Access denied. Only Team Managers can view projects.");
547
+ if (status !== 200)
548
+ throw new Error(`Failed to fetch projects (${status})`);
549
+ return data;
550
+ },
551
+ async getRepos(projectId) {
552
+ const { data, status } = await apiFetch(config, `/projects/${projectId}/repos`);
553
+ if (status === 403)
554
+ throw new Error("Access denied.");
555
+ if (status !== 200)
556
+ throw new Error(`Failed to fetch project repos (${status})`);
557
+ return data;
558
+ },
559
+ async addRepo(projectId, input3) {
560
+ const { status } = await apiFetch(config, `/projects/${projectId}/repos`, {
561
+ method: "POST",
562
+ body: JSON.stringify(input3)
563
+ });
564
+ if (status !== 201)
565
+ throw new Error(`Failed to add repo (${status})`);
566
+ },
567
+ async removeRepo(projectId, repository) {
568
+ const { status } = await apiFetch(config, `/projects/${projectId}/repos`, {
569
+ method: "DELETE",
570
+ body: JSON.stringify({ repository })
571
+ });
572
+ if (status !== 200)
573
+ throw new Error(`Failed to remove repo (${status})`);
574
+ }
575
+ };
576
+ }
577
+
532
578
  // ../sdk/dist/client.js
533
579
  async function apiFetch(config, path8, options = {}) {
534
580
  const response = await fetch(`${config.baseUrl}${path8}`, {
@@ -552,7 +598,8 @@ function createMeltClient(config) {
552
598
  coins: createCoinsResource(config),
553
599
  templates: createTemplatesResource(config),
554
600
  auth: createAuthResource(config),
555
- people: createPeopleResource(config)
601
+ people: createPeopleResource(config),
602
+ projects: createProjectsResource(config)
556
603
  };
557
604
  }
558
605
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "4.39.0",
3
+ "version": "4.41.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",