From f52e94c61263dbb3668763d85eba0599d0893c47 Mon Sep 17 00:00:00 2001 From: David Blass Date: Mon, 13 Oct 2025 14:08:54 -0400 Subject: [PATCH] 27 --- entry.cjs | 2 +- package.json | 2 +- play.ts | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/entry.cjs b/entry.cjs index 649739a..386308c 100755 --- a/entry.cjs +++ b/entry.cjs @@ -26163,7 +26163,7 @@ async function main(params) { // package.json var package_default = { name: "@pullfrog/action", - version: "0.0.26", + version: "0.0.27", type: "module", files: [ "index.js", diff --git a/package.json b/package.json index af677ce..f1fa874 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pullfrog/action", - "version": "0.0.26", + "version": "0.0.27", "type": "module", "files": [ "index.js", diff --git a/play.ts b/play.ts index 5c5cb4e..f05f97e 100644 --- a/play.ts +++ b/play.ts @@ -1,23 +1,23 @@ import { existsSync, readFileSync } from "node:fs"; -import { dirname, extname, join, resolve } from "node:path"; -import { fileURLToPath, pathToFileURL } from "node:url"; +import { extname, join, resolve } from "node:path"; +import { pathToFileURL } from "node:url"; +import { fromHere } from "@ark/fs"; import arg from "arg"; import { config } from "dotenv"; import { main } from "./main.ts"; +import packageJson from "./package.json" with { type: "json" }; import { runAct } from "./utils/act.ts"; import { setupGitHubInstallationToken } from "./utils/github.ts"; import { setupTestRepo } from "./utils/setup.ts"; config(); -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - export async function run( prompt: string, options: { act?: boolean } = {} ): Promise<{ success: boolean; output?: string | undefined; error?: string | undefined }> { try { + console.log(`🐸 Running pullfrog/action@${packageJson.version}...`); if (options.act) { console.log("🐳 Running with Docker/act..."); runAct(prompt); @@ -129,7 +129,7 @@ Examples: const ext = extname(filePath).toLowerCase(); let resolvedPath: string; - const fixturesPath = join(__dirname, "fixtures", filePath); + const fixturesPath = fromHere("fixtures", filePath); if (existsSync(fixturesPath)) { resolvedPath = fixturesPath; } else if (existsSync(filePath)) {