@lumerahq/cli 0.19.9-dev.3 → 0.19.9

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
@@ -219,25 +219,25 @@ async function main() {
219
219
  switch (command) {
220
220
  // Resource commands
221
221
  case "plan":
222
- await import("./resources-4M4LMSSN.js").then((m) => m.plan(args.slice(1)));
222
+ await import("./resources-75I4RXB6.js").then((m) => m.plan(args.slice(1)));
223
223
  break;
224
224
  case "apply":
225
- await import("./resources-4M4LMSSN.js").then((m) => m.apply(args.slice(1)));
225
+ await import("./resources-75I4RXB6.js").then((m) => m.apply(args.slice(1)));
226
226
  break;
227
227
  case "pull":
228
- await import("./resources-4M4LMSSN.js").then((m) => m.pull(args.slice(1)));
228
+ await import("./resources-75I4RXB6.js").then((m) => m.pull(args.slice(1)));
229
229
  break;
230
230
  case "destroy":
231
- await import("./resources-4M4LMSSN.js").then((m) => m.destroy(args.slice(1)));
231
+ await import("./resources-75I4RXB6.js").then((m) => m.destroy(args.slice(1)));
232
232
  break;
233
233
  case "list":
234
- await import("./resources-4M4LMSSN.js").then((m) => m.list(args.slice(1)));
234
+ await import("./resources-75I4RXB6.js").then((m) => m.list(args.slice(1)));
235
235
  break;
236
236
  case "show":
237
- await import("./resources-4M4LMSSN.js").then((m) => m.show(args.slice(1)));
237
+ await import("./resources-75I4RXB6.js").then((m) => m.show(args.slice(1)));
238
238
  break;
239
239
  case "diff":
240
- await import("./resources-4M4LMSSN.js").then((m) => m.diff(args.slice(1)));
240
+ await import("./resources-75I4RXB6.js").then((m) => m.diff(args.slice(1)));
241
241
  break;
242
242
  // Development
243
243
  case "dev":
@@ -364,6 +364,14 @@ var hookVerifyRule = {
364
364
  description: "Validates hook file structure (config export, trigger, known keys, default handler) and verifies the script compiles via the backend.",
365
365
  appliesTo: ["hook"],
366
366
  async check(target, ctx) {
367
+ if (target.filePath.endsWith(".ts")) {
368
+ return [
369
+ error2(
370
+ target,
371
+ "TypeScript hook files are not yet supported. Rename to `.js` and remove any TypeScript-specific syntax (type annotations, `as` casts, etc.)."
372
+ )
373
+ ];
374
+ }
367
375
  const finding = parseHookFile(target.source);
368
376
  if (finding.syntaxError) {
369
377
  return [
@@ -383,7 +391,7 @@ var hookVerifyRule = {
383
391
  ];
384
392
  }
385
393
  const errors = [];
386
- if (!finding.hook?.external_id && !ctx.appName) {
394
+ if (finding.hook !== void 0 && !finding.hook.external_id && !ctx.appName) {
387
395
  errors.push(
388
396
  error2(
389
397
  target,
@@ -586,21 +594,34 @@ function safePrintLint(warnings, projectRoot) {
586
594
  if (process.env.LUMERA_DEBUG) console.error("[lint] print failed:", err);
587
595
  }
588
596
  }
597
+ async function safeLintPass(label, build) {
598
+ try {
599
+ const issues = await build();
600
+ const errors = issues.filter((issue) => issue.severity === "error");
601
+ return { issues, errors };
602
+ } catch (err) {
603
+ if (process.env.LUMERA_DEBUG) console.error(`[lint] ${label} pass failed:`, err);
604
+ return null;
605
+ }
606
+ }
589
607
  async function lintCollectionFiles(projectRoot, platformDir, filterName) {
590
- const issues = await runLint({ projectRoot, targets: buildCollectionTargets(platformDir, filterName) });
591
- const errors = issues.filter((issue) => issue.severity === "error");
592
- if (errors.length === 0) return;
593
- printLintWarnings(issues, projectRoot);
594
- throw new Error(`Found ${errors.length} collection lint error(s)`);
608
+ const result = await safeLintPass(
609
+ "collection",
610
+ async () => runLint({ projectRoot, targets: buildCollectionTargets(platformDir, filterName) })
611
+ );
612
+ if (!result || result.errors.length === 0) return;
613
+ safePrintLint(result.issues, projectRoot);
614
+ throw new Error(`Found ${result.errors.length} collection lint error(s)`);
595
615
  }
596
616
  async function lintHookFiles(api, projectRoot, platformDir, appName, filterName) {
597
- const targets = buildHookTargets(platformDir, filterName);
598
- if (targets.length === 0) return;
599
- const issues = await runLint({ projectRoot, targets, api, appName });
600
- const errors = issues.filter((issue) => issue.severity === "error");
601
- if (errors.length === 0) return;
602
- printLintWarnings(issues, projectRoot);
603
- throw new Error(`Found ${errors.length} hook lint error(s)`);
617
+ const result = await safeLintPass("hook", async () => {
618
+ const targets = buildHookTargets(platformDir, filterName);
619
+ if (targets.length === 0) return [];
620
+ return runLint({ projectRoot, targets, api, appName });
621
+ });
622
+ if (!result || result.errors.length === 0) return;
623
+ safePrintLint(result.issues, projectRoot);
624
+ throw new Error(`Found ${result.errors.length} hook lint error(s)`);
604
625
  }
605
626
  var PACKAGE_MANAGERS = ["bun", "pnpm", "yarn", "npm"];
606
627
  var PACKAGE_MANAGER_VALUE_FLAGS = /* @__PURE__ */ new Set(["--package-manager"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.19.9-dev.3",
3
+ "version": "0.19.9",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {