@lumerahq/cli 0.30.15 → 0.30.18
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/{chunk-ASPEK3I6.js → chunk-2K4ZYGCE.js} +1 -1
- package/dist/{chunk-KZEOP5YF.js → chunk-E7YZ6QS6.js} +5 -0
- package/dist/{chunk-2K2LYH5O.js → chunk-ODANFLL7.js} +1 -1
- package/dist/{deps-22CUIP2M.js → deps-ZDRNDMUF.js} +2 -2
- package/dist/{dev-XBOHUDPR.js → dev-S5JVAXDD.js} +3 -3
- package/dist/index.js +12 -12
- package/dist/{init-L6D5OHMY.js → init-QVR42DUW.js} +1 -1
- package/dist/{register-SBXONOFY.js → register-G3YK77HE.js} +1 -1
- package/dist/{resources-TZD6KV4M.js → resources-WASCJ2VV.js} +30 -5
- package/dist/{run-EBTA3FKD.js → run-MSAMUYQH.js} +1 -1
- package/package.json +1 -1
|
@@ -275,6 +275,11 @@ var ApiClient = class {
|
|
|
275
275
|
body: JSON.stringify(def)
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
+
async deleteMailbox(id) {
|
|
279
|
+
await this.request(`/api/mailboxes/${encodeURIComponent(id)}`, {
|
|
280
|
+
method: "DELETE"
|
|
281
|
+
});
|
|
282
|
+
}
|
|
278
283
|
// Agents
|
|
279
284
|
async listAgents(opts) {
|
|
280
285
|
const params = new URLSearchParams({ limit: "100" });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deps,
|
|
3
3
|
syncDeps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ODANFLL7.js";
|
|
5
5
|
import "./chunk-2CR762KB.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-E7YZ6QS6.js";
|
|
7
7
|
import "./chunk-JLVVHTBY.js";
|
|
8
8
|
import "./chunk-FJFIWC7G.js";
|
|
9
9
|
import "./chunk-PNKVD2UK.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dev
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2K4ZYGCE.js";
|
|
4
4
|
import {
|
|
5
5
|
syncDeps
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ODANFLL7.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEnv
|
|
9
9
|
} from "./chunk-2CR762KB.js";
|
|
10
10
|
import {
|
|
11
11
|
createApiClient
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-E7YZ6QS6.js";
|
|
13
13
|
import {
|
|
14
14
|
findProjectRoot,
|
|
15
15
|
getApiUrl,
|
package/dist/index.js
CHANGED
|
@@ -240,32 +240,32 @@ async function main() {
|
|
|
240
240
|
switch (command) {
|
|
241
241
|
// Resource commands
|
|
242
242
|
case "plan":
|
|
243
|
-
await import("./resources-
|
|
243
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.plan(args.slice(1)));
|
|
244
244
|
break;
|
|
245
245
|
case "apply":
|
|
246
|
-
await import("./resources-
|
|
246
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.apply(args.slice(1)));
|
|
247
247
|
break;
|
|
248
248
|
case "pull":
|
|
249
|
-
await import("./resources-
|
|
249
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.pull(args.slice(1)));
|
|
250
250
|
break;
|
|
251
251
|
case "destroy":
|
|
252
|
-
await import("./resources-
|
|
252
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.destroy(args.slice(1)));
|
|
253
253
|
break;
|
|
254
254
|
case "list":
|
|
255
|
-
await import("./resources-
|
|
255
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.list(args.slice(1)));
|
|
256
256
|
break;
|
|
257
257
|
case "show":
|
|
258
|
-
await import("./resources-
|
|
258
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.show(args.slice(1)));
|
|
259
259
|
break;
|
|
260
260
|
case "diff":
|
|
261
|
-
await import("./resources-
|
|
261
|
+
await import("./resources-WASCJ2VV.js").then((m) => m.diff(args.slice(1)));
|
|
262
262
|
break;
|
|
263
263
|
// Development
|
|
264
264
|
case "dev":
|
|
265
|
-
await import("./dev-
|
|
265
|
+
await import("./dev-S5JVAXDD.js").then((m) => m.dev(args.slice(1)));
|
|
266
266
|
break;
|
|
267
267
|
case "run":
|
|
268
|
-
await import("./run-
|
|
268
|
+
await import("./run-MSAMUYQH.js").then((m) => m.run(args.slice(1)));
|
|
269
269
|
break;
|
|
270
270
|
case "functions":
|
|
271
271
|
await import("./functions-DZCNHDRJ.js").then(
|
|
@@ -279,10 +279,10 @@ async function main() {
|
|
|
279
279
|
break;
|
|
280
280
|
// Project
|
|
281
281
|
case "init":
|
|
282
|
-
await import("./init-
|
|
282
|
+
await import("./init-QVR42DUW.js").then((m) => m.init(args.slice(1)));
|
|
283
283
|
break;
|
|
284
284
|
case "register":
|
|
285
|
-
await import("./register-
|
|
285
|
+
await import("./register-G3YK77HE.js").then((m) => m.register(args.slice(1)));
|
|
286
286
|
break;
|
|
287
287
|
case "templates":
|
|
288
288
|
await import("./templates-LNUOTNLN.js").then((m) => m.templates(subcommand, args.slice(2)));
|
|
@@ -299,7 +299,7 @@ async function main() {
|
|
|
299
299
|
break;
|
|
300
300
|
// Dependencies
|
|
301
301
|
case "deps":
|
|
302
|
-
await import("./deps-
|
|
302
|
+
await import("./deps-ZDRNDMUF.js").then((m) => m.deps(args.slice(1)));
|
|
303
303
|
break;
|
|
304
304
|
// Feature flags (read the in-sandbox snapshot)
|
|
305
305
|
case "flags":
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deploy
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2K4ZYGCE.js";
|
|
4
4
|
import {
|
|
5
5
|
syncDeps
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ODANFLL7.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEnv
|
|
9
9
|
} from "./chunk-2CR762KB.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
createApiClient,
|
|
13
13
|
isApiErrorStatus,
|
|
14
14
|
validateCollectionNameLength
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E7YZ6QS6.js";
|
|
16
16
|
import {
|
|
17
17
|
findProjectRoot,
|
|
18
18
|
getApiUrl,
|
|
@@ -1529,6 +1529,8 @@ ${pc2.dim("Resources:")}
|
|
|
1529
1529
|
agents/<name> Destroy single agent
|
|
1530
1530
|
skills Destroy only project skills
|
|
1531
1531
|
skills/<slug> Destroy single project skill
|
|
1532
|
+
mailboxes Destroy only mailboxes
|
|
1533
|
+
mailboxes/<slug> Destroy single mailbox
|
|
1532
1534
|
app Delete app registration
|
|
1533
1535
|
|
|
1534
1536
|
${pc2.dim("Options:")}
|
|
@@ -1538,6 +1540,7 @@ ${pc2.dim("Options:")}
|
|
|
1538
1540
|
${pc2.dim("Examples:")}
|
|
1539
1541
|
lumera destroy # Destroy everything
|
|
1540
1542
|
lumera destroy collections/users # Destroy single collection
|
|
1543
|
+
lumera destroy mailboxes/support # Destroy single mailbox
|
|
1541
1544
|
lumera destroy app # Delete app registration
|
|
1542
1545
|
`);
|
|
1543
1546
|
}
|
|
@@ -2161,7 +2164,7 @@ async function planMailboxes(api, localMailboxes) {
|
|
|
2161
2164
|
resource: "mailbox",
|
|
2162
2165
|
id: existing.id,
|
|
2163
2166
|
name: mb.slug,
|
|
2164
|
-
details: "description differs (
|
|
2167
|
+
details: "description differs (no update endpoint)"
|
|
2165
2168
|
});
|
|
2166
2169
|
}
|
|
2167
2170
|
}
|
|
@@ -2178,7 +2181,7 @@ async function applyMailboxes(api, localMailboxes) {
|
|
|
2178
2181
|
const localDesc = (mb.description ?? "").trim();
|
|
2179
2182
|
const remoteDesc = (existing.description ?? "").trim();
|
|
2180
2183
|
if (localDesc !== remoteDesc) {
|
|
2181
|
-
console.log(pc2.yellow(" \u26A0"), `mailbox ${mb.slug}: description drift not reconcilable by CLI (no PATCH endpoint yet)
|
|
2184
|
+
console.log(pc2.yellow(" \u26A0"), `mailbox ${mb.slug}: description drift not reconcilable by CLI (no PATCH endpoint yet)`);
|
|
2182
2185
|
} else {
|
|
2183
2186
|
console.log(pc2.green(" \u2713"), pc2.dim(`mailbox ${mb.slug} already exists (${existing.email})`));
|
|
2184
2187
|
}
|
|
@@ -2493,6 +2496,7 @@ async function applyApp(args) {
|
|
|
2493
2496
|
const accessLevel = getFlagValue(args, "access-level");
|
|
2494
2497
|
const validAccessLevels = [
|
|
2495
2498
|
"org_members_with_permission",
|
|
2499
|
+
"specific_people",
|
|
2496
2500
|
"org_members",
|
|
2497
2501
|
"invited",
|
|
2498
2502
|
"signed_in",
|
|
@@ -3471,6 +3475,17 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
|
|
|
3471
3475
|
}
|
|
3472
3476
|
}
|
|
3473
3477
|
}
|
|
3478
|
+
if (!resourceType || resourceType === "mailboxes") {
|
|
3479
|
+
const localMailboxes = loadLocalMailboxes(platformDir, resourceName || void 0);
|
|
3480
|
+
const remoteMailboxes = await api.listMailboxes();
|
|
3481
|
+
const remoteBySlug = new Map(remoteMailboxes.map((mailbox) => [mailbox.slug, mailbox]));
|
|
3482
|
+
for (const local of localMailboxes) {
|
|
3483
|
+
const remote = remoteBySlug.get(local.slug);
|
|
3484
|
+
if (remote) {
|
|
3485
|
+
toDelete.push({ type: "mailbox", id: local.slug, name: local.slug, remoteId: remote.id });
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3474
3489
|
if (toDelete.length === 0) {
|
|
3475
3490
|
console.log(pc2.green(" \u2713 No resources found to delete"));
|
|
3476
3491
|
return;
|
|
@@ -3497,6 +3512,7 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
|
|
|
3497
3512
|
const skills = toDelete.filter((r) => r.type === "skill");
|
|
3498
3513
|
const hooks = toDelete.filter((r) => r.type === "hook");
|
|
3499
3514
|
const automations = toDelete.filter((r) => r.type === "automation");
|
|
3515
|
+
const mailboxes = toDelete.filter((r) => r.type === "mailbox");
|
|
3500
3516
|
const collections = toDelete.filter((r) => r.type === "collection");
|
|
3501
3517
|
let errors = 0;
|
|
3502
3518
|
for (const resource of agents) {
|
|
@@ -3535,6 +3551,15 @@ async function destroyResources(api, platformDir, resourceType, resourceName, sk
|
|
|
3535
3551
|
errors++;
|
|
3536
3552
|
}
|
|
3537
3553
|
}
|
|
3554
|
+
for (const resource of mailboxes) {
|
|
3555
|
+
try {
|
|
3556
|
+
await api.deleteMailbox(resource.remoteId);
|
|
3557
|
+
console.log(pc2.green(" \u2713"), `Deleted mailbox: ${resource.name}`);
|
|
3558
|
+
} catch (e) {
|
|
3559
|
+
console.log(pc2.red(" \u2717"), `Failed to delete mailbox ${resource.name}: ${e}`);
|
|
3560
|
+
errors++;
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3538
3563
|
const deletePlan = planCollectionDelete(collections, platformDir);
|
|
3539
3564
|
if (deletePlan.cycleNames.length > 0 && !forceCycles) {
|
|
3540
3565
|
console.log();
|