@lumerahq/cli 0.30.1-dev.1 → 0.30.2

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-3JZS5SVJ.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-3JZS5SVJ.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-3JZS5SVJ.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-3JZS5SVJ.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-3JZS5SVJ.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-3JZS5SVJ.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-3JZS5SVJ.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++;
@@ -2234,20 +2234,16 @@ async function syncPresets(api, automationId, localPresets) {
2234
2234
  for (const [presetKey, preset] of Object.entries(localPresets)) {
2235
2235
  const presetName = preset.label || presetKey;
2236
2236
  const existing = remoteByName.get(presetName);
2237
- if (existing) {
2238
- try {
2237
+ try {
2238
+ if (existing) {
2239
2239
  await api.updatePreset(existing.id, { name: presetName, inputs: preset.inputs });
2240
2240
  console.log(pc2.dim(` Updated preset: ${presetName}`));
2241
- } catch (e) {
2242
- throw new Error(`Failed to update preset '${presetName}': ${String(e)}`);
2243
- }
2244
- } else {
2245
- try {
2241
+ } else {
2246
2242
  await api.createPreset(automationId, { name: presetName, inputs: preset.inputs });
2247
2243
  console.log(pc2.dim(` Created preset: ${presetName}`));
2248
- } catch (e) {
2249
- throw new Error(`Failed to create preset '${presetName}': ${String(e)}`);
2250
2244
  }
2245
+ } catch (e) {
2246
+ console.log(pc2.yellow(` \u26A0 Failed to sync preset ${presetName}: ${e}`));
2251
2247
  }
2252
2248
  }
2253
2249
  }
@@ -2264,7 +2260,7 @@ async function deleteStalePresets(api, automationId, localPresets, preservePrese
2264
2260
  await api.deletePreset(remote.id);
2265
2261
  console.log(pc2.dim(` Deleted preset: ${remote.name}`));
2266
2262
  } catch (e) {
2267
- throw new Error(`Failed to delete preset '${remote.name}': ${String(e)}`);
2263
+ console.log(pc2.yellow(` \u26A0 Failed to delete preset ${remote.name}: ${e}`));
2268
2264
  }
2269
2265
  }
2270
2266
  }
@@ -2273,27 +2269,19 @@ async function setSchedule(api, automationId, schedule, localPresets) {
2273
2269
  const remotePresets = await api.listPresets(automationId);
2274
2270
  const preset = remotePresets.find((p) => p.name === presetName);
2275
2271
  if (!preset) {
2276
- throw new Error(`Schedule preset '${presetName}' not found`);
2272
+ console.log(pc2.yellow(` \u26A0 Schedule preset '${schedule.preset}' not found, skipping schedule`));
2273
+ return;
2277
2274
  }
2278
- const expectedSchedule = {
2279
- schedule: schedule.cron,
2280
- schedule_tz: schedule.timezone || "UTC",
2281
- schedule_preset_id: preset.id
2282
- };
2283
- await api.updateAutomation(automationId, expectedSchedule);
2284
- let persisted;
2285
2275
  try {
2286
- 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}`));
2287
2282
  } catch (e) {
2288
- throw new Error(`Failed to verify persisted schedule: ${String(e)}`);
2289
- }
2290
- const mismatches = Object.keys(expectedSchedule).filter((field) => persisted[field] !== expectedSchedule[field]).map(
2291
- (field) => `${field} expected ${JSON.stringify(expectedSchedule[field])}, got ${JSON.stringify(persisted[field])}`
2292
- );
2293
- if (mismatches.length > 0) {
2294
- throw new Error(`Schedule update was not persisted: ${mismatches.join("; ")}`);
2283
+ console.log(pc2.yellow(` \u26A0 Failed to set schedule: ${e}`));
2295
2284
  }
2296
- console.log(pc2.dim(` Set schedule: ${schedule.cron}`));
2297
2285
  }
2298
2286
  async function applyHooks(api, localHooks, collections, projectId) {
2299
2287
  let errors = 0;
@@ -4531,7 +4519,6 @@ async function diff(args) {
4531
4519
  export {
4532
4520
  apply,
4533
4521
  applyAgents,
4534
- applyAutomations,
4535
4522
  applyCollections,
4536
4523
  applySkills,
4537
4524
  convertCollectionToApiFormat,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.30.1-dev.1",
3
+ "version": "0.30.2",
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",
@@ -12,8 +12,8 @@ importers:
12
12
  .:
13
13
  dependencies:
14
14
  '@lumerahq/ui':
15
- specifier: ^0.14.0
16
- version: 0.14.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
15
+ specifier: ^0.14.1
16
+ version: 0.14.1(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
17
17
  '@tanstack/react-query':
18
18
  specifier: ^5.90.11
19
19
  version: 5.101.0(react@19.2.7)
@@ -457,8 +457,8 @@ packages:
457
457
  '@jridgewell/trace-mapping@0.3.31':
458
458
  resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
459
459
 
460
- '@lumerahq/ui@0.14.0':
461
- resolution: {integrity: sha512-zV3HaeNkUJwieStWVf44UJzb+BDES+Dhjr5DfBxqCcc2mlKPm19TjWCjett6GfweFe9NhSgoIOk1txUm76B/GA==}
460
+ '@lumerahq/ui@0.14.1':
461
+ resolution: {integrity: sha512-GCyW9xQJ9cQzYP2wBTogGdUGTwIcwQvz5YXAp2AafaKiNSCy9f72PeXdEjNJfcTDbpatTiECfwJiT5Kw+wzqoQ==}
462
462
  peerDependencies:
463
463
  react: ^18.0.0 || ^19.0.0
464
464
  react-dom: ^18.0.0 || ^19.0.0
@@ -2311,7 +2311,7 @@ snapshots:
2311
2311
  '@jridgewell/resolve-uri': 3.1.2
2312
2312
  '@jridgewell/sourcemap-codec': 1.5.5
2313
2313
 
2314
- '@lumerahq/ui@0.14.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2314
+ '@lumerahq/ui@0.14.1(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)':
2315
2315
  dependencies:
2316
2316
  '@base-ui/react': 1.5.0(@types/react@19.2.16)(react-dom@19.2.7(react@19.2.7))(react@19.2.7)
2317
2317
  '@tanstack/react-query': 5.101.0(react@19.2.7)