@markjaquith/agency 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.ts CHANGED
@@ -124,14 +124,24 @@ const commands: Record<string, Command> = {
124
124
  pr: {
125
125
  name: "pr",
126
126
  description: "Run gh pr with the emitted branch name",
127
- run: async (args: string[], options: Record<string, any>) => {
127
+ run: async (
128
+ _args: string[],
129
+ options: Record<string, any>,
130
+ rawArgs?: string[],
131
+ ) => {
128
132
  if (options.help) {
129
133
  console.log(prHelp)
130
134
  return
131
135
  }
136
+ // Pass raw args (after filtering agency flags) directly to gh pr
137
+ // This allows flags like --web to pass through without needing --
138
+ const agencyFlags = ["--help", "-h", "--silent", "-s", "--verbose", "-v"]
139
+ const filteredArgs = (rawArgs ?? []).filter(
140
+ (arg) => !agencyFlags.includes(arg),
141
+ )
132
142
  await runCommand(
133
143
  pr({
134
- args,
144
+ args: filteredArgs,
135
145
  silent: options.silent,
136
146
  verbose: options.verbose,
137
147
  }),
@@ -621,8 +631,8 @@ try {
621
631
  allowPositionals: true,
622
632
  })
623
633
 
624
- // Run the command
625
- await command.run(cmdPositionals, cmdValues)
634
+ // Run the command, passing raw args for commands that need them (like pr)
635
+ await command.run(cmdPositionals, cmdValues, commandArgs)
626
636
  } catch (error) {
627
637
  if (error instanceof Error) {
628
638
  console.error(`ⓘ ${error.message}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markjaquith/agency",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Manages personal agents files",
5
5
  "license": "MIT",
6
6
  "author": "Mark Jaquith",
@@ -422,6 +422,7 @@ export const task = (options: TaskOptions = {}) =>
422
422
  (yield* git.findDefaultRemote(targetPath))
423
423
 
424
424
  if (remote) {
425
+ log(info(`Fetching latest from ${highlight.branch(remote)}...`))
425
426
  verboseLog(`Fetching from remote: ${remote}`)
426
427
  yield* git.fetch(targetPath, remote).pipe(
427
428
  Effect.catchAll((err) => {
package/src/types.ts CHANGED
@@ -12,7 +12,11 @@ import { GitService } from "./services/GitService"
12
12
  export interface Command {
13
13
  name: string
14
14
  description: string
15
- run: (args: string[], options: Record<string, any>) => Promise<void>
15
+ run: (
16
+ args: string[],
17
+ options: Record<string, any>,
18
+ rawArgs?: string[],
19
+ ) => Promise<void>
16
20
  help?: string
17
21
  }
18
22