pi-gsd 2.0.17 → 2.0.18

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.
@@ -783,13 +783,8 @@ function runLoop(content, filePath, config, projectRoot, pkgRoot, rawArguments,
783
783
  if (inDeadZone(tag.start, extractCodeFenceRegions(current))) continue;
784
784
  const incPath = tag.node.attrs["path"];
785
785
  if (!incPath) continue;
786
- const subPath = incPath.replace(/^\.pi\/gsd\//, "");
787
- const candidates = [
788
- import_node_path3.default.resolve(projectRoot, incPath),
789
- import_node_path3.default.resolve(pkgRoot, ".gsd", "harnesses", "pi", "get-shit-done", subPath)
790
- ];
791
- const abs = candidates.find((c) => import_node_fs2.default.existsSync(c));
792
- if (!abs) throw new Error(`Include not found: ${incPath} (tried project + package harness)`);
786
+ const abs = import_node_path3.default.resolve(projectRoot, incPath);
787
+ if (!import_node_fs2.default.existsSync(abs)) throw new Error(`Include not found: ${incPath}`);
793
788
  const check = checkTrustedPath(abs, config, projectRoot, pkgRoot);
794
789
  if (!check.ok) throw new Error(`Include rejected: ${check.reason}`);
795
790
  const included = import_node_fs2.default.readFileSync(abs, "utf8");
@@ -858,6 +853,14 @@ function readWorkflowVersionTag(content) {
858
853
  function copyHarness(src, dest) {
859
854
  let symlinksReplaced = 0;
860
855
  let filesCopied = 0;
856
+ try {
857
+ if ((0, import_node_fs3.existsSync)(dest) && (0, import_node_fs3.lstatSync)(dest).isSymbolicLink()) {
858
+ const { unlinkSync } = require("fs");
859
+ unlinkSync(dest);
860
+ symlinksReplaced++;
861
+ }
862
+ } catch {
863
+ }
861
864
  const walk = (srcDir, destDir) => {
862
865
  (0, import_node_fs3.mkdirSync)(destDir, { recursive: true });
863
866
  const entries = (0, import_node_fs3.readdirSync)(srcDir, { withFileTypes: true });