Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/actions/auth/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
Expand Down
27 changes: 14 additions & 13 deletions .github/actions/file/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
Expand Down
27 changes: 14 additions & 13 deletions .github/actions/find/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
Expand Down
27 changes: 14 additions & 13 deletions .github/actions/fix/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
}
Expand Down
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.