diff --git a/.github/actions/auth/bootstrap.js b/.github/actions/auth/bootstrap.js index 652b56a..7d8b060 100644 --- a/.github/actions/auth/bootstrap.js +++ b/.github/actions/auth/bootstrap.js @@ -3,22 +3,22 @@ import fs from 'node:fs' import * as url from 'node:url' -import { spawn } from 'node:child_process' +import {spawn} from 'node:child_process' -function spawnPromisified(command, args, { quiet = false, ...options } = {}) { +function spawnPromisified(command, args, {quiet = false, ...options} = {}) { return new Promise((resolve, reject) => { const proc = spawn(command, args, options) proc.stdout.setEncoding('utf8') - proc.stdout.on('data', (data) => { + proc.stdout.on('data', data => { if (!quiet) { console.log(data) } }) proc.stderr.setEncoding('utf8') - proc.stderr.on('data', (data) => { + proc.stderr.on('data', data => { console.error(data) }) - proc.on('close', (code) => { + proc.on('close', code => { if (code !== 0) { reject(code) } else { @@ -31,30 +31,31 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) { await (async () => { // If dependencies are not vendored-in, install them at runtime. try { - await fs.accessSync( - url.fileURLToPath(new URL('./node_modules', import.meta.url)), - fs.constants.R_OK - ) + await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK) } catch { try { await spawnPromisified('npm', ['ci'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + console.error(`npm ci failed: ${error}`) process.exit(1) } } finally { + const core = await import('@actions/core') // Compile TypeScript. try { await spawnPromisified('npm', ['run', 'build'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`) process.exit(1) } // Run the main script. + core.info('Running auth Action index.js...') const action = await import('./dist/index.js') await action.default() } diff --git a/.github/actions/file/bootstrap.js b/.github/actions/file/bootstrap.js index 652b56a..4a8e436 100644 --- a/.github/actions/file/bootstrap.js +++ b/.github/actions/file/bootstrap.js @@ -3,22 +3,22 @@ import fs from 'node:fs' import * as url from 'node:url' -import { spawn } from 'node:child_process' +import {spawn} from 'node:child_process' -function spawnPromisified(command, args, { quiet = false, ...options } = {}) { +function spawnPromisified(command, args, {quiet = false, ...options} = {}) { return new Promise((resolve, reject) => { const proc = spawn(command, args, options) proc.stdout.setEncoding('utf8') - proc.stdout.on('data', (data) => { + proc.stdout.on('data', data => { if (!quiet) { console.log(data) } }) proc.stderr.setEncoding('utf8') - proc.stderr.on('data', (data) => { + proc.stderr.on('data', data => { console.error(data) }) - proc.on('close', (code) => { + proc.on('close', code => { if (code !== 0) { reject(code) } else { @@ -31,30 +31,31 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) { await (async () => { // If dependencies are not vendored-in, install them at runtime. try { - await fs.accessSync( - url.fileURLToPath(new URL('./node_modules', import.meta.url)), - fs.constants.R_OK - ) + await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK) } catch { try { await spawnPromisified('npm', ['ci'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + console.error(`npm ci failed: ${error}`) process.exit(1) } } finally { + const core = await import('@actions/core') // Compile TypeScript. try { await spawnPromisified('npm', ['run', 'build'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`) process.exit(1) } // Run the main script. + core.info('Running file Action index.js...') const action = await import('./dist/index.js') await action.default() } diff --git a/.github/actions/find/bootstrap.js b/.github/actions/find/bootstrap.js index 652b56a..9204562 100644 --- a/.github/actions/find/bootstrap.js +++ b/.github/actions/find/bootstrap.js @@ -3,22 +3,22 @@ import fs from 'node:fs' import * as url from 'node:url' -import { spawn } from 'node:child_process' +import {spawn} from 'node:child_process' -function spawnPromisified(command, args, { quiet = false, ...options } = {}) { +function spawnPromisified(command, args, {quiet = false, ...options} = {}) { return new Promise((resolve, reject) => { const proc = spawn(command, args, options) proc.stdout.setEncoding('utf8') - proc.stdout.on('data', (data) => { + proc.stdout.on('data', data => { if (!quiet) { console.log(data) } }) proc.stderr.setEncoding('utf8') - proc.stderr.on('data', (data) => { + proc.stderr.on('data', data => { console.error(data) }) - proc.on('close', (code) => { + proc.on('close', code => { if (code !== 0) { reject(code) } else { @@ -31,30 +31,31 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) { await (async () => { // If dependencies are not vendored-in, install them at runtime. try { - await fs.accessSync( - url.fileURLToPath(new URL('./node_modules', import.meta.url)), - fs.constants.R_OK - ) + await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK) } catch { try { await spawnPromisified('npm', ['ci'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + console.error(`npm ci failed: ${error}`) process.exit(1) } } finally { + const core = await import('@actions/core') // Compile TypeScript. try { await spawnPromisified('npm', ['run', 'build'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`) process.exit(1) } // Run the main script. + core.info('Running find Action index.js...') const action = await import('./dist/index.js') await action.default() } diff --git a/.github/actions/fix/bootstrap.js b/.github/actions/fix/bootstrap.js index 652b56a..987add0 100644 --- a/.github/actions/fix/bootstrap.js +++ b/.github/actions/fix/bootstrap.js @@ -3,22 +3,22 @@ import fs from 'node:fs' import * as url from 'node:url' -import { spawn } from 'node:child_process' +import {spawn} from 'node:child_process' -function spawnPromisified(command, args, { quiet = false, ...options } = {}) { +function spawnPromisified(command, args, {quiet = false, ...options} = {}) { return new Promise((resolve, reject) => { const proc = spawn(command, args, options) proc.stdout.setEncoding('utf8') - proc.stdout.on('data', (data) => { + proc.stdout.on('data', data => { if (!quiet) { console.log(data) } }) proc.stderr.setEncoding('utf8') - proc.stderr.on('data', (data) => { + proc.stderr.on('data', data => { console.error(data) }) - proc.on('close', (code) => { + proc.on('close', code => { if (code !== 0) { reject(code) } else { @@ -31,30 +31,31 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) { await (async () => { // If dependencies are not vendored-in, install them at runtime. try { - await fs.accessSync( - url.fileURLToPath(new URL('./node_modules', import.meta.url)), - fs.constants.R_OK - ) + await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK) } catch { try { await spawnPromisified('npm', ['ci'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + console.error(`npm ci failed: ${error}`) process.exit(1) } } finally { + const core = await import('@actions/core') // Compile TypeScript. try { await spawnPromisified('npm', ['run', 'build'], { cwd: url.fileURLToPath(new URL('.', import.meta.url)), - quiet: true + quiet: true, }) - } catch { + } catch (error) { + core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`) process.exit(1) } // Run the main script. + core.info('Running fix Action index.js...') const action = await import('./dist/index.js') await action.default() } diff --git a/package-lock.json b/package-lock.json index 4be5789..051a872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -692,6 +692,7 @@ "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@octokit/auth-token": "^6.0.0", "@octokit/graphql": "^9.0.3", @@ -1200,6 +1201,7 @@ "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -1249,6 +1251,7 @@ "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.56.1", "@typescript-eslint/types": "8.56.1", @@ -1551,6 +1554,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1750,6 +1754,7 @@ "integrity": "sha512-uYixubwmqJZH+KLVYIVKY1JQt7tysXhtj21WSvjcSmU5SVNzMus1bgLe+pAt816yQ8opKfheVVoPLqvVMGejYw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -2338,6 +2343,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -2681,6 +2687,7 @@ "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0",