diff --git a/.github/workflows/test-token.yml b/.github/workflows/test-token.yml index dcfd9a4..fb9bbfa 100644 --- a/.github/workflows/test-token.yml +++ b/.github/workflows/test-token.yml @@ -20,13 +20,14 @@ jobs: GITHUB_TOKEN: ${{ steps.token.outputs.token }} run: | node -e ' - const res = await fetch("https://api.github.com/repos/" + process.env.GITHUB_REPOSITORY, { + const res = await fetch("https://api.github.com/installation/repositories?per_page=1", { headers: { Authorization: "token " + process.env.GITHUB_TOKEN, Accept: "application/vnd.github+json", }, }); - if (!res.ok) throw new Error("GET repo failed: " + res.status + " " + (await res.text())); - const repo = await res.json(); - console.log("authenticated as installation — repo:", repo.full_name, "private:", repo.private); + if (!res.ok) throw new Error("GET installation/repositories failed: " + res.status + " " + (await res.text())); + const data = await res.json(); + console.log("authenticated — installation has access to", data.total_count, "repo(s)"); + console.log("first repo:", data.repositories[0].full_name); ' diff --git a/package.json b/package.json index dc52818..420c363 100644 --- a/package.json +++ b/package.json @@ -74,24 +74,14 @@ "url": "https://github.com/pullfrog/pullfrog/issues" }, "homepage": "https://github.com/pullfrog/pullfrog#readme", - "zshy": { - "exports": "./index.ts" - }, - "main": "./dist/index.js", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", "exports": { ".": { "@pullfrog/source": "./index.ts", - "types": "./dist/index.d.cts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" + "default": "./index.ts" }, "./internal": { "@pullfrog/source": "./internal/index.ts", - "types": "./dist/internal.d.cts", - "import": "./dist/internal.js", - "default": "./dist/internal.js" + "default": "./internal/index.ts" }, "./package.json": "./package.json" },