@lumerahq/cli 0.30.1-dev.0 → 0.30.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 CHANGED
@@ -240,25 +240,25 @@ async function main() {
240
240
  switch (command) {
241
241
  // Resource commands
242
242
  case "plan":
243
- await import("./resources-CZ32Y3KM.js").then((m) => m.plan(args.slice(1)));
243
+ await import("./resources-5YWEX6DG.js").then((m) => m.plan(args.slice(1)));
244
244
  break;
245
245
  case "apply":
246
- await import("./resources-CZ32Y3KM.js").then((m) => m.apply(args.slice(1)));
246
+ await import("./resources-5YWEX6DG.js").then((m) => m.apply(args.slice(1)));
247
247
  break;
248
248
  case "pull":
249
- await import("./resources-CZ32Y3KM.js").then((m) => m.pull(args.slice(1)));
249
+ await import("./resources-5YWEX6DG.js").then((m) => m.pull(args.slice(1)));
250
250
  break;
251
251
  case "destroy":
252
- await import("./resources-CZ32Y3KM.js").then((m) => m.destroy(args.slice(1)));
252
+ await import("./resources-5YWEX6DG.js").then((m) => m.destroy(args.slice(1)));
253
253
  break;
254
254
  case "list":
255
- await import("./resources-CZ32Y3KM.js").then((m) => m.list(args.slice(1)));
255
+ await import("./resources-5YWEX6DG.js").then((m) => m.list(args.slice(1)));
256
256
  break;
257
257
  case "show":
258
- await import("./resources-CZ32Y3KM.js").then((m) => m.show(args.slice(1)));
258
+ await import("./resources-5YWEX6DG.js").then((m) => m.show(args.slice(1)));
259
259
  break;
260
260
  case "diff":
261
- await import("./resources-CZ32Y3KM.js").then((m) => m.diff(args.slice(1)));
261
+ await import("./resources-5YWEX6DG.js").then((m) => m.diff(args.slice(1)));
262
262
  break;
263
263
  // Development
264
264
  case "dev":
@@ -2177,7 +2177,6 @@ async function applyAutomations(api, localAutomations, projectId) {
2177
2177
  const remoteByExternalId = new Map(remoteAutomations.filter((a) => a.external_id).map((a) => [a.external_id, a]));
2178
2178
  for (const { automation, code } of localAutomations) {
2179
2179
  const remote = remoteByExternalId.get(automation.external_id);
2180
- const appliedAction = remote ? "updated" : "created";
2181
2180
  const payload = {
2182
2181
  external_id: automation.external_id,
2183
2182
  name: automation.name,
@@ -2195,9 +2194,11 @@ async function applyAutomations(api, localAutomations, projectId) {
2195
2194
  if (remote) {
2196
2195
  await api.updateAutomation(remote.id, payload);
2197
2196
  automationId = remote.id;
2197
+ console.log(pc2.green(" \u2713"), `${automation.name} (updated)`);
2198
2198
  } else {
2199
2199
  const created = await api.createAutomation(payload);
2200
2200
  automationId = created.id;
2201
+ console.log(pc2.green(" \u2713"), `${automation.name} (created)`);
2201
2202
  }
2202
2203
  const localPresets = automation.inputs?.presets;
2203
2204
  if (localPresets) {
@@ -2220,7 +2221,6 @@ async function applyAutomations(api, localAutomations, projectId) {
2220
2221
  );
2221
2222
  }
2222
2223
  }
2223
- console.log(pc2.green(" \u2713"), `${automation.name} (${appliedAction})`);
2224
2224
  } catch (e) {
2225
2225
  console.log(pc2.red(" \u2717"), `${automation.name}: ${e}`);
2226
2226
  errors++;
@@ -2269,27 +2269,19 @@ async function setSchedule(api, automationId, schedule, localPresets) {
2269
2269
  const remotePresets = await api.listPresets(automationId);
2270
2270
  const preset = remotePresets.find((p) => p.name === presetName);
2271
2271
  if (!preset) {
2272
- throw new Error(`Schedule preset '${presetName}' not found`);
2272
+ console.log(pc2.yellow(` \u26A0 Schedule preset '${schedule.preset}' not found, skipping schedule`));
2273
+ return;
2273
2274
  }
2274
- const expectedSchedule = {
2275
- schedule: schedule.cron,
2276
- schedule_tz: schedule.timezone || "UTC",
2277
- schedule_preset_id: preset.id
2278
- };
2279
- await api.updateAutomation(automationId, expectedSchedule);
2280
- let persisted;
2281
2275
  try {
2282
- persisted = await api.getAutomation(automationId);
2276
+ await api.updateAutomation(automationId, {
2277
+ schedule: schedule.cron,
2278
+ schedule_tz: schedule.timezone || "UTC",
2279
+ schedule_preset_id: preset.id
2280
+ });
2281
+ console.log(pc2.dim(` Set schedule: ${schedule.cron}`));
2283
2282
  } catch (e) {
2284
- throw new Error(`Failed to verify persisted schedule: ${String(e)}`);
2285
- }
2286
- const mismatches = Object.keys(expectedSchedule).filter((field) => persisted[field] !== expectedSchedule[field]).map(
2287
- (field) => `${field} expected ${JSON.stringify(expectedSchedule[field])}, got ${JSON.stringify(persisted[field])}`
2288
- );
2289
- if (mismatches.length > 0) {
2290
- throw new Error(`Schedule update was not persisted: ${mismatches.join("; ")}`);
2283
+ console.log(pc2.yellow(` \u26A0 Failed to set schedule: ${e}`));
2291
2284
  }
2292
- console.log(pc2.dim(` Set schedule: ${schedule.cron}`));
2293
2285
  }
2294
2286
  async function applyHooks(api, localHooks, collections, projectId) {
2295
2287
  let errors = 0;
@@ -4527,7 +4519,6 @@ async function diff(args) {
4527
4519
  export {
4528
4520
  apply,
4529
4521
  applyAgents,
4530
- applyAutomations,
4531
4522
  applyCollections,
4532
4523
  applySkills,
4533
4524
  convertCollectionToApiFormat,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.30.1-dev.0",
3
+ "version": "0.30.1",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,7 +24,7 @@
24
24
  "check:ci": "biome check . && tsr generate && tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@lumerahq/ui": "^0.14.0",
27
+ "@lumerahq/ui": "^0.14.1",
28
28
  "@tanstack/react-query": "^5.90.11",
29
29
  "@tanstack/react-router": "1.155.0",
30
30
  "clsx": "^2.1.1",