Skip to content

Commit

Permalink
chore: deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
runreal-warman committed Apr 5, 2024
1 parent ed9c037 commit fcc4e63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ await new Command()
if (script.startsWith('file://')) {
script = import.meta.resolve(script)
} else {
script = path.toFileUrl(path.resolve(script)).toString()
script = path.toFileUrl(path.resolve(script)).toString()
}
const { config }: { main: TriggerFn; config: TriggerConfig } = await import(script)

Expand All @@ -47,7 +47,7 @@ await new Command()
// We want to run this cli as the entry point
const cliPath = path.fromFileUrl(import.meta.url)
const triggerCommand = `${denoBinary} run -A ${cliPath} exec ${script} ${config.args.join(' ')}`

// Create a trigger for each type and path
const newTriggers: P4Trigger[] = []
config.type.map((type) => {
Expand All @@ -74,7 +74,7 @@ await new Command()
if (script.startsWith('file://')) {
script = import.meta.resolve(script)
} else {
script = path.toFileUrl(path.resolve(script)).toString()
script = path.toFileUrl(path.resolve(script)).toString()
}
const { config }: { main: TriggerFn; config: TriggerConfig } = await import(script)

Expand All @@ -90,7 +90,7 @@ await new Command()
// We want to run this cli as the entry point
const cliPath = path.fromFileUrl(import.meta.url)
const triggerCommand = `${denoBinary} run -A ${cliPath} exec ${script} ${config.args.join(' ')}`

// Create a trigger for each type and path
const newTriggers: P4Trigger[] = []
config.type.map((type) => {
Expand Down Expand Up @@ -135,7 +135,7 @@ await new Command()
if (script.startsWith('file://')) {
script = import.meta.resolve(script)
} else {
script = path.toFileUrl(path.resolve(script)).toString()
script = path.toFileUrl(path.resolve(script)).toString()
}
const { main, config }: { main: TriggerFn; config: TriggerConfig } = await import(script)

Expand Down
4 changes: 3 additions & 1 deletion src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ export function renderTriggerTable(triggers: P4Trigger[]): void {
new Table()
.header(Row.from(['Index', 'Name', 'Type', 'Path', 'Command']).border())
.body(
triggers.map((trigger) => new Row(trigger.index.toString(), trigger.name, trigger.type, trigger.path, trigger.command)),
triggers.map((trigger) =>
new Row(trigger.index.toString(), trigger.name, trigger.type, trigger.path, trigger.command)
),
)
.border(true)
.render()
Expand Down

0 comments on commit fcc4e63

Please sign in to comment.