const { src, dest } = require("gulp");

/**
 * Copy node/credential icons (+ codex JSON) into dist so n8n can resolve
 * `icon: "file:songs2vid.svg"` next to the compiled .js files.
 */
function copyIcons() {
  return src(
    ["nodes/**/*.{png,svg,json}", "credentials/**/*.{png,svg,json}"],
    { base: "." },
  ).pipe(dest("dist"));
}

exports["build:icons"] = copyIcons;
