@particle-academy/fancy-flow 0.30.0 → 0.32.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.
package/dist/engine.cjs CHANGED
@@ -477,7 +477,7 @@ function validateAliases(aliases2, problems) {
477
477
  }
478
478
  function validateRuntimes(runtimes, problems) {
479
479
  if (typeof runtimes !== "object" || runtimes === null || Array.isArray(runtimes)) {
480
- problems.push(err("runtimes", "Required \u2014 an object of runtime id to { entry | package, engine }."));
480
+ problems.push(err("runtimes", "Required \u2014 an object of runtime id to { files, engine }."));
481
481
  return;
482
482
  }
483
483
  const entries = Object.entries(runtimes);
@@ -487,17 +487,26 @@ function validateRuntimes(runtimes, problems) {
487
487
  }
488
488
  for (const [runtime, spec] of entries) {
489
489
  if (typeof spec !== "object" || spec === null || Array.isArray(spec)) {
490
- problems.push(err(`runtimes.${runtime}`, "Must be an object of { entry | package, engine }."));
490
+ problems.push(err(`runtimes.${runtime}`, "Must be an object of { files, engine }."));
491
491
  continue;
492
492
  }
493
493
  const s = spec;
494
- const hasEntry = typeof s.entry === "string" && s.entry.trim() !== "";
495
- const hasPackage = typeof s.package === "string" && s.package.trim() !== "";
496
- if (!hasEntry && !hasPackage) {
497
- problems.push(err(`runtimes.${runtime}`, "Needs `entry` (a module path) or `package` (a dependency requirement)."));
494
+ const files = Array.isArray(s.files) ? s.files : null;
495
+ if (!files || files.length === 0 || files.some((f) => typeof f !== "string" || f.trim() === "")) {
496
+ problems.push(
497
+ err(
498
+ `runtimes.${runtime}`,
499
+ "Needs `files` \u2014 the node source directories this runtime's backend lives in, relative to the node."
500
+ )
501
+ );
498
502
  }
499
- if (hasEntry && hasPackage) {
500
- problems.push(err(`runtimes.${runtime}`, "Declare `entry` or `package`, not both \u2014 which one is authoritative is otherwise ambiguous."));
503
+ if (s.entry !== void 0 || s.package !== void 0) {
504
+ problems.push(
505
+ err(
506
+ `runtimes.${runtime}`,
507
+ "`entry` / `package` are gone \u2014 nodes are copied into a project, not installed from a registry. Declare `files` instead."
508
+ )
509
+ );
501
510
  }
502
511
  if (typeof s.engine !== "string" || s.engine.trim() === "") {
503
512
  problems.push(