infra-kit 0.1.82 → 0.1.87
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/.eslintcache +1 -0
- package/.turbo/turbo-eslint-check.log +4 -0
- package/.turbo/turbo-prettier-check.log +4 -0
- package/.turbo/turbo-prettier-fix.log +10 -0
- package/.turbo/turbo-test.log +14 -0
- package/.turbo/turbo-ts-check.log +4 -0
- package/dist/cli.js +27 -25
- package/dist/cli.js.map +4 -4
- package/dist/mcp.js +24 -22
- package/dist/mcp.js.map +4 -4
- package/package.json +12 -13
- package/src/commands/env-clear/env-clear.ts +2 -1
- package/src/commands/env-list/env-list.ts +2 -1
- package/src/commands/env-load/env-load.ts +5 -2
- package/src/commands/env-status/env-status.ts +2 -1
- package/src/commands/gh-merge-dev/gh-merge-dev.ts +10 -4
- package/src/commands/gh-release-deliver/gh-release-deliver.ts +3 -2
- package/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts +13 -4
- package/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts +18 -5
- package/src/commands/gh-release-list/gh-release-list.ts +2 -1
- package/src/commands/release-create/release-create.ts +3 -2
- package/src/commands/release-create-batch/release-create-batch.ts +5 -2
- package/src/commands/worktrees-add/worktrees-add.ts +26 -5
- package/src/commands/worktrees-list/worktrees-list.ts +2 -1
- package/src/commands/worktrees-remove/worktrees-remove.ts +14 -3
- package/src/commands/worktrees-sync/worktrees-sync.ts +2 -1
- package/src/entry/cli.ts +0 -18
- package/src/lib/command-echo/command-echo.ts +1 -1
- package/src/lib/release-utils/release-utils.ts +2 -1
- package/src/mcp/server.ts +1 -1
- package/src/mcp/tools/index.ts +0 -2
- package/tsconfig.tsbuildinfo +1 -0
- package/.env.example +0 -17
- package/src/commands/gh-release-deploy-service/gh-release-deploy-service.ts +0 -193
- package/src/commands/gh-release-deploy-service/index.ts +0 -1
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/doctor/doctor.ts":"1","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/doctor/index.ts":"2","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-clear/env-clear.ts":"3","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-clear/index.ts":"4","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-list/env-list.ts":"5","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-list/index.ts":"6","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-load/env-load.ts":"7","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-load/index.ts":"8","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-status/env-status.ts":"9","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-status/index.ts":"10","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-merge-dev/gh-merge-dev.ts":"11","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-merge-dev/index.ts":"12","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deliver/gh-release-deliver.ts":"13","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deliver/index.ts":"14","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts":"15","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-all/index.ts":"16","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts":"17","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-selected/index.ts":"18","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-list/gh-release-list.ts":"19","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-list/index.ts":"20","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/init/index.ts":"21","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/init/init.ts":"22","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create/index.ts":"23","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create/release-create.ts":"24","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create-batch/index.ts":"25","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create-batch/release-create-batch.ts":"26","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-add/index.ts":"27","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-add/worktrees-add.ts":"28","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-list/index.ts":"29","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-list/worktrees-list.ts":"30","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-remove/index.ts":"31","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-remove/worktrees-remove.ts":"32","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-sync/index.ts":"33","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-sync/worktrees-sync.ts":"34","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/entry/cli.ts":"35","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/entry/mcp.ts":"36","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/doppler-cli-auth.ts":"37","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/doppler-project.ts":"38","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/index.ts":"39","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-cli-auth/gh-cli-auth.ts":"40","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-cli-auth/index.ts":"41","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-release-prs/gh-release-prs.ts":"42","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-release-prs/index.ts":"43","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/index.ts":"44","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/api.ts":"45","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/index.ts":"46","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/types.ts":"47","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/command-echo/command-echo.ts":"48","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/command-echo/index.ts":"49","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/constants.ts":"50","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/error-handlers/index.ts":"51","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/git-utils/git-utils.ts":"52","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/git-utils/index.ts":"53","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/logger/index.ts":"54","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/release-utils/index.ts":"55","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/release-utils/release-utils.ts":"56","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/tool-handler/index.ts":"57","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/tool-handler/tool-handler.ts":"58","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/version-utils/index.ts":"59","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/version-utils/version-utils.ts":"60","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/prompts/index.ts":"61","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/resources/index.ts":"62","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/server.ts":"63","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/tools/index.ts":"64","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/sanity.test.tsx":"65","/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/types.ts":"66"},{"size":2678,"mtime":1775813835763,"results":"67","hashOfConfig":"68"},{"size":49,"mtime":1775813835764,"results":"69","hashOfConfig":"68"},{"size":2821,"mtime":1775986624139,"results":"70","hashOfConfig":"68"},{"size":56,"mtime":1775813835764,"results":"71","hashOfConfig":"68"},{"size":1432,"mtime":1775986580848,"results":"72","hashOfConfig":"68"},{"size":53,"mtime":1775813835765,"results":"73","hashOfConfig":"68"},{"size":3793,"mtime":1775986610000,"results":"74","hashOfConfig":"68"},{"size":53,"mtime":1775813835766,"results":"75","hashOfConfig":"68"},{"size":3084,"mtime":1775985546722,"results":"76","hashOfConfig":"68"},{"size":59,"mtime":1775813835767,"results":"77","hashOfConfig":"68"},{"size":6053,"mtime":1775986653946,"results":"78","hashOfConfig":"68"},{"size":63,"mtime":1775813835771,"results":"79","hashOfConfig":"68"},{"size":6091,"mtime":1775986666194,"results":"80","hashOfConfig":"68"},{"size":81,"mtime":1775813835772,"results":"81","hashOfConfig":"68"},{"size":5060,"mtime":1775987568617,"results":"82","hashOfConfig":"68"},{"size":88,"mtime":1775813835773,"results":"83","hashOfConfig":"68"},{"size":8025,"mtime":1775987565521,"results":"84","hashOfConfig":"68"},{"size":103,"mtime":1775813835774,"results":"85","hashOfConfig":"68"},{"size":2318,"mtime":1775985005693,"results":"86","hashOfConfig":"68"},{"size":72,"mtime":1775813835776,"results":"87","hashOfConfig":"68"},{"size":30,"mtime":1775813835776,"results":"88","hashOfConfig":"68"},{"size":3283,"mtime":1775813835777,"results":"89","hashOfConfig":"68"},{"size":71,"mtime":1775813835778,"results":"90","hashOfConfig":"68"},{"size":5698,"mtime":1775986675770,"results":"91","hashOfConfig":"68"},{"size":87,"mtime":1775813835779,"results":"92","hashOfConfig":"68"},{"size":6619,"mtime":1775986685135,"results":"93","hashOfConfig":"68"},{"size":68,"mtime":1775813835780,"results":"94","hashOfConfig":"68"},{"size":9015,"mtime":1775986703306,"results":"95","hashOfConfig":"68"},{"size":71,"mtime":1775813835780,"results":"96","hashOfConfig":"68"},{"size":2956,"mtime":1775985020664,"results":"97","hashOfConfig":"68"},{"size":77,"mtime":1775813835781,"results":"98","hashOfConfig":"68"},{"size":6420,"mtime":1775986717513,"results":"99","hashOfConfig":"68"},{"size":71,"mtime":1775813835782,"results":"100","hashOfConfig":"68"},{"size":4320,"mtime":1775986724015,"results":"101","hashOfConfig":"68"},{"size":8696,"mtime":1775987522658,"results":"102","hashOfConfig":"103"},{"size":1044,"mtime":1775813835783,"results":"104","hashOfConfig":"68"},{"size":730,"mtime":1775813835783,"results":"105","hashOfConfig":"68"},{"size":656,"mtime":1775813835784,"results":"106","hashOfConfig":"68"},{"size":117,"mtime":1775813835784,"results":"107","hashOfConfig":"68"},{"size":768,"mtime":1775813835787,"results":"108","hashOfConfig":"68"},{"size":57,"mtime":1775813835788,"results":"109","hashOfConfig":"68"},{"size":4149,"mtime":1775813835788,"results":"110","hashOfConfig":"68"},{"size":147,"mtime":1775813835788,"results":"111","hashOfConfig":"68"},{"size":204,"mtime":1775813835788,"results":"112","hashOfConfig":"68"},{"size":9253,"mtime":1775813835789,"results":"113","hashOfConfig":"68"},{"size":363,"mtime":1775813835789,"results":"114","hashOfConfig":"68"},{"size":2111,"mtime":1775813835789,"results":"115","hashOfConfig":"68"},{"size":1811,"mtime":1775813835790,"results":"116","hashOfConfig":"68"},{"size":45,"mtime":1775813835790,"results":"117","hashOfConfig":"68"},{"size":1568,"mtime":1775813835790,"results":"118","hashOfConfig":"68"},{"size":1015,"mtime":1775813835791,"results":"119","hashOfConfig":"68"},{"size":1344,"mtime":1775813835791,"results":"120","hashOfConfig":"68"},{"size":66,"mtime":1775813835791,"results":"121","hashOfConfig":"68"},{"size":1003,"mtime":1775813835791,"results":"122","hashOfConfig":"68"},{"size":237,"mtime":1775813835792,"results":"123","hashOfConfig":"68"},{"size":4683,"mtime":1775813835792,"results":"124","hashOfConfig":"68"},{"size":51,"mtime":1775813835792,"results":"125","hashOfConfig":"68"},{"size":774,"mtime":1775813835793,"results":"126","hashOfConfig":"68"},{"size":61,"mtime":1775813835793,"results":"127","hashOfConfig":"68"},{"size":733,"mtime":1775813835793,"results":"128","hashOfConfig":"68"},{"size":140,"mtime":1775813835794,"results":"129","hashOfConfig":"68"},{"size":142,"mtime":1775813835794,"results":"130","hashOfConfig":"68"},{"size":577,"mtime":1775813835794,"results":"131","hashOfConfig":"68"},{"size":1879,"mtime":1775987512070,"results":"132","hashOfConfig":"68"},{"size":149,"mtime":1775813835795,"results":"133","hashOfConfig":"134"},{"size":242,"mtime":1775813835795,"results":"135","hashOfConfig":"68"},{"filePath":"136","messages":"137","suppressedMessages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"jgfgyi",{"filePath":"139","messages":"140","suppressedMessages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","suppressedMessages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","suppressedMessages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","suppressedMessages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","suppressedMessages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","suppressedMessages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","suppressedMessages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","suppressedMessages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","suppressedMessages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","suppressedMessages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","suppressedMessages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","suppressedMessages":"174","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","suppressedMessages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","suppressedMessages":"180","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","suppressedMessages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","suppressedMessages":"186","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","suppressedMessages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","suppressedMessages":"192","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","suppressedMessages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","suppressedMessages":"198","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"199","messages":"200","suppressedMessages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","suppressedMessages":"204","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"205","messages":"206","suppressedMessages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","suppressedMessages":"210","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"211","messages":"212","suppressedMessages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","suppressedMessages":"216","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","suppressedMessages":"219","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","suppressedMessages":"222","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"223","messages":"224","suppressedMessages":"225","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"226","messages":"227","suppressedMessages":"228","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"229","messages":"230","suppressedMessages":"231","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"232","messages":"233","suppressedMessages":"234","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"235","messages":"236","suppressedMessages":"237","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","suppressedMessages":"240","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1pn6f",{"filePath":"241","messages":"242","suppressedMessages":"243","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"244","messages":"245","suppressedMessages":"246","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"247","messages":"248","suppressedMessages":"249","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","suppressedMessages":"252","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"253","messages":"254","suppressedMessages":"255","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"256","messages":"257","suppressedMessages":"258","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"259","messages":"260","suppressedMessages":"261","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","suppressedMessages":"264","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"265","messages":"266","suppressedMessages":"267","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","suppressedMessages":"270","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"271","messages":"272","suppressedMessages":"273","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","suppressedMessages":"276","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"277","messages":"278","suppressedMessages":"279","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","suppressedMessages":"282","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"283","messages":"284","suppressedMessages":"285","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","suppressedMessages":"288","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"289","messages":"290","suppressedMessages":"291","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"292","messages":"293","suppressedMessages":"294","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"295","messages":"296","suppressedMessages":"297","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"298","messages":"299","suppressedMessages":"300","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"301","messages":"302","suppressedMessages":"303","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"304","messages":"305","suppressedMessages":"306","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"307","messages":"308","suppressedMessages":"309","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"310","messages":"311","suppressedMessages":"312","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"313","messages":"314","suppressedMessages":"315","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"316","messages":"317","suppressedMessages":"318","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"319","messages":"320","suppressedMessages":"321","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"322","messages":"323","suppressedMessages":"324","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"325","messages":"326","suppressedMessages":"327","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"328","messages":"329","suppressedMessages":"330","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"193rhvy",{"filePath":"331","messages":"332","suppressedMessages":"333","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/doctor/doctor.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/doctor/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-clear/env-clear.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-clear/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-list/env-list.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-list/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-load/env-load.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-load/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-status/env-status.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/env-status/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-merge-dev/gh-merge-dev.ts",[],["334"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-merge-dev/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deliver/gh-release-deliver.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deliver/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-all/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts",[],["335"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-deploy-selected/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-list/gh-release-list.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/gh-release-list/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/init/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/init/init.ts",[],["336","337","338"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create/release-create.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create-batch/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/release-create-batch/release-create-batch.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-add/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-add/worktrees-add.ts",[],["339"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-list/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-list/worktrees-list.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-remove/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-remove/worktrees-remove.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-sync/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/commands/worktrees-sync/worktrees-sync.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/entry/cli.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/entry/mcp.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/doppler-cli-auth.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/doppler-project.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/doppler/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-cli-auth/gh-cli-auth.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-cli-auth/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-release-prs/gh-release-prs.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/gh-release-prs/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/gh/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/api.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/integrations/jira/types.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/command-echo/command-echo.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/command-echo/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/constants.ts",[],["340"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/error-handlers/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/git-utils/git-utils.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/git-utils/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/logger/index.ts",[],["341"],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/release-utils/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/release-utils/release-utils.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/tool-handler/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/tool-handler/tool-handler.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/version-utils/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/lib/version-utils/version-utils.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/prompts/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/resources/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/server.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/mcp/tools/index.ts",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/sanity.test.tsx",[],[],"/Users/arthur/projects/infra-kit/apps/infra-kit/cli/src/types.ts",[],[],{"ruleId":"342","severity":2,"message":"343","line":21,"column":87,"messageId":"344","endLine":21,"endColumn":89,"suppressions":"345"},{"ruleId":"342","severity":2,"message":"346","line":30,"column":113,"messageId":"344","endLine":30,"endColumn":115,"suppressions":"347"},{"ruleId":"348","severity":2,"message":"349","line":52,"column":53,"endLine":52,"endColumn":59,"suppressions":"350"},{"ruleId":"348","severity":2,"message":"349","line":77,"column":54,"endLine":77,"endColumn":60,"suppressions":"351"},{"ruleId":"352","severity":2,"message":"353","line":97,"column":5,"messageId":"354","endLine":97,"endColumn":47,"suppressions":"355"},{"ruleId":"342","severity":2,"message":"356","line":33,"column":100,"messageId":"344","endLine":33,"endColumn":102,"suppressions":"357"},{"ruleId":"358","severity":2,"message":"359","line":51,"column":30,"messageId":"360","endLine":51,"endColumn":54,"suppressions":"361"},{"ruleId":"358","severity":2,"message":"359","line":6,"column":30,"messageId":"360","endLine":6,"endColumn":54,"suppressions":"362"},"sonarjs/cognitive-complexity","Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.","refactorFunction",["363"],"Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.",["364"],"sonarjs/slow-regex","Make sure the regex used here, which is vulnerable to super-linear runtime due to backtracking, cannot lead to denial of service.",["365"],["366"],"no-template-curly-in-string","Unexpected template string expression.","unexpectedTemplateExpression",["367"],"Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.",["368"],"sonarjs/publicly-writable-directories","Make sure publicly writable directories are used safely here.","safeDirectory",["369"],["370"],{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},{"kind":"371","justification":"372"},"directive",""]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> infra-kit@0.1.87 prettier-fix /Users/arthur/projects/infra-kit/apps/infra-kit/cli
|
|
4
|
+
> pnpm exec prettier **/* --write --no-error-on-unmatched-pattern --log-level warn --ignore-path ../../.prettierignore
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
[[31merror[39m] No parser could be inferred for file "/Users/arthur/projects/infra-kit/apps/infra-kit/cli/dist/cli.js.map".
|
|
8
|
+
|
|
9
|
+
[[31merror[39m] No parser could be inferred for file "/Users/arthur/projects/infra-kit/apps/infra-kit/cli/dist/mcp.js.map".
|
|
10
|
+
[41m[30m ELIFECYCLE [39m[49m [31mCommand failed with exit code 2.[39m
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
> infra-kit@0.1.87 test /Users/arthur/projects/infra-kit/apps/infra-kit/cli
|
|
3
|
+
> pnpm exec vitest run --reporter=dot
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[1m[30m[46m RUN [49m[39m[22m [36mv4.1.4 [39m[90m/Users/arthur/projects/infra-kit/apps/infra-kit/cli[39m
|
|
7
|
+
|
|
8
|
+
[33m[39m[32m·[39m
|
|
9
|
+
|
|
10
|
+
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
11
|
+
[2m Tests [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
12
|
+
[2m Start at [22m 13:04:22
|
|
13
|
+
[2m Duration [22m 148ms[2m (transform 22ms, setup 19ms, import 12ms, tests 3ms, environment 0ms)[22m
|
|
14
|
+
|
package/dist/cli.js
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import
|
|
2
|
-
`);for(let t of e){let n=t.status==="pass"?"[PASS]":"[FAIL]";s.info(` ${n} ${t.name}: ${t.message}`)}let r={checks:e.map(t=>({name:t.name,status:t.status,message:t.message})),allPassed:e.every(t=>t.status==="pass")};return{content:[{type:"text",text:JSON.stringify(r,null,2)}],structuredContent:r}},
|
|
3
|
-
`).filter(t=>t.includes("=")&&!t.startsWith("set ")).map(t=>t.split("=")[0]):[],
|
|
1
|
+
import Ut,{Separator as Y}from"@inquirer/select";import{Command as Ht,Option as br}from"commander";import wr from"node:process";import{z as J}from"zod";import{$ as $r}from"zx";import kr from"node:process";import xr from"pino";import Cr from"pino-pretty";var Tr=()=>{let e=kr.argv.includes("--debug")?"debug":"info",r=["time","pid","hostname"];return e==="debug"&&r.push("level"),xr({level:e},Cr({destination:2,ignore:r.join(","),colorize:!0}))},s=Tr();var ce=async(e,r,t,n)=>{try{return await $r`${r}`,{name:e,status:"pass",message:t}}catch{return{name:e,status:"fail",message:n}}},le=async()=>{let e=await Promise.all([ce("gh installed",["gh","--version"],"GitHub CLI is installed","GitHub CLI is not installed. Install from: https://cli.github.com/"),ce("gh authenticated",["gh","auth","status"],"GitHub CLI is authenticated","GitHub CLI is not authenticated. Run: gh auth login"),ce("doppler installed",["doppler","--version"],"Doppler CLI is installed","Doppler CLI is not installed. Install from: https://docs.doppler.com/docs/install-cli"),ce("doppler authenticated",["doppler","me"],"Doppler CLI is authenticated","Doppler CLI is not authenticated. Run: doppler login")]);s.info(`Doctor check results:
|
|
2
|
+
`);for(let t of e){let n=t.status==="pass"?"[PASS]":"[FAIL]";s.info(` ${n} ${t.name}: ${t.message}`)}let r={checks:e.map(t=>({name:t.name,status:t.status,message:t.message})),allPassed:e.every(t=>t.status==="pass")};return{content:[{type:"text",text:JSON.stringify(r,null,2)}],structuredContent:r}},Pr={name:"doctor",description:"Check installation and authentication status of gh and doppler CLIs",inputSchema:{},outputSchema:{checks:J.array(J.object({name:J.string().describe("Name of the check"),status:J.enum(["pass","fail"]).describe("Check result"),message:J.string().describe("Details about the check result")})).describe("List of all check results"),allPassed:J.boolean().describe("Whether all checks passed")},handler:le};import me from"node:fs";import rr from"node:path";import Ar from"node:process";import{z as ue}from"zod";import Qe from"node:fs";import Er from"node:path";import Sr from"node:process";var P=["dev","arthur","renana","roman","eliran","oriana"],Le={"hulyo-monorepo":"hulyo","travelist-monorepo":"travelist"},Ir="./node_modules/.cache/infra-kit",L="env-load.sh",er="env-clear.sh",je="INFRA_KIT_SESSION",j="INFRA_KIT_ENV_CONFIG",M="INFRA_KIT_ENV_PROJECT",V="INFRA_KIT_ENV_LOADED_AT",pe=e=>Qe.existsSync(e)?Qe.readFileSync(e,"utf-8").split(`
|
|
3
|
+
`).filter(t=>t.includes("=")&&!t.startsWith("set ")).map(t=>t.split("=")[0]):[],F=()=>{let e=Sr.env[je];if(!e)throw new Error("INFRA_KIT_SESSION is not set. Run `source ~/.zshrc` or `infra-kit init` first.");return Er.join(Ir,e)},B="-worktrees";var de=async()=>{let e=F(),r=rr.join(e,L);if(!me.existsSync(r))return s.error("No loaded environment found. Run `env-load` first."),{content:[{type:"text",text:"No loaded environment found. Run `env-load` first."}]};let t=pe(r),n=[...t.map(i=>`unset ${i}`),`unset ${j}`,`unset ${M}`,`unset ${V}`],o=rr.resolve(e,er);me.mkdirSync(e,{recursive:!0}),me.writeFileSync(o,`${n.join(`
|
|
4
4
|
`)}
|
|
5
|
-
`),
|
|
6
|
-
`),
|
|
7
|
-
`).filter(Boolean),n={release:
|
|
8
|
-
`),s.info("Available configs:");for(let t of
|
|
5
|
+
`),Ar.stdout.write(`${o}
|
|
6
|
+
`),me.unlinkSync(r);let a={filePath:o,variableCount:t.length,unsetStatements:n};return{content:[{type:"text",text:JSON.stringify(a,null,2)}],structuredContent:a}},Nr={name:"env-clear",description:'Generate a shell script that unsets every env var previously loaded by env-load for this session, plus the infra-kit session metadata vars. Does NOT mutate the calling process \u2014 returns the path to a script that must be sourced ("source <filePath>") for the unsets to take effect. The infra-kit shell wrapper auto-sources; direct MCP callers must handle sourcing themselves or surface filePath to the user. Errors if no env is currently loaded.',inputSchema:{},outputSchema:{filePath:ue.string().describe("Path to the file that must be sourced to apply"),variableCount:ue.number().describe("Number of variables cleared"),unsetStatements:ue.array(ue.string()).describe("Unset statements generated")},handler:de};import{z as Me}from"zod";import tr from"node:process";import{$ as or}from"zx";var D=async()=>{try{await or`doppler --version`}catch(e){s.error({error:e},"Error: Doppler CLI is not installed."),s.error("Please install it from: https://docs.doppler.com/docs/install-cli"),tr.exit(1)}try{await or`doppler me`}catch(e){s.error({error:e},"Error: Doppler CLI is not authenticated."),s.error("Please authenticate by running: doppler login"),tr.exit(1)}};import _r from"node:path";import{$ as sr}from"zx";var N=async e=>{let t=(await sr`git worktree list`).stdout.split(`
|
|
7
|
+
`).filter(Boolean),n={release:Or,feature:Dr};return t.map(n[e]).filter(o=>o!==null)},Or=e=>{let r=e.split(" ").filter(Boolean);return r.length<3||!r[0]?.includes("release/v")?null:`release/${r[0]?.split("/").pop()||""}`},Dr=e=>{let r=e.split(" ").filter(Boolean);return r.length<3||!r[0]?.includes("feature/")?null:`feature/${r[0]?.split("/").pop()||""}`},E=async()=>(await sr`git rev-parse --show-toplevel`).stdout.trim();var X=async()=>{let e=await E(),r=_r.basename(e),t=Le[r];if(!t)throw new Error(`Could not determine Doppler project for directory "${r}". Expected one of: ${Object.keys(Le).join(", ")}`);return t};var fe=async()=>{await D();let e=await X();s.info(`Doppler project: ${e}
|
|
8
|
+
`),s.info("Available configs:");for(let t of P)s.info(` - ${t}`);let r={project:e,configs:P};return{content:[{type:"text",text:JSON.stringify(r,null,2)}],structuredContent:r}},Jr={name:"env-list",description:"List the environments the project is configured to support. Returns a static list defined in infra-kit constants (not a live fetch from Doppler) plus the Doppler project name auto-detected from the current directory. Read-only.",inputSchema:{},outputSchema:{project:Me.string().describe("Detected Doppler project name"),configs:Me.array(Me.string()).describe("Available environment configs")},handler:fe};import jr from"@inquirer/select";import nr from"node:fs";import Mr from"node:path";import ir from"node:process";import{z as Z}from"zod";import{$ as Ve}from"zx";var Lr=()=>{let e="",r=[],t=!1;return{start(n){e=n,r=[],t=!1},setInteractive(){t=!0},addOption(n,o){r.push({flag:n,value:o})},print(){if(!t||r.length===0)return;let n=r.map(o=>typeof o.value=="boolean"?o.value?o.flag:"":Array.isArray(o.value)?`${o.flag} "${o.value.join(", ")}"`:`${o.flag} "${o.value}"`).filter(Boolean).join(" ");s.info(`\u{1F4DF} Equivalent command:
|
|
9
9
|
pnpm exec infra-kit ${e} ${n}
|
|
10
|
-
`)},reset(){e="",r=[],t=!1}}},l=
|
|
10
|
+
`)},reset(){e="",r=[],t=!1}}},l=Lr();var he=async e=>{await D();let{config:r}=e;l.start("env-load");let t="";r?t=r:(l.setInteractive(),t=await jr({message:"Select environment config",choices:P.map(f=>({name:f,value:f}))},{output:ir.stderr})),l.addOption("--config",t);let n=await X();Ve.quiet=!0;let o=await Ve`doppler secrets download --no-file --format env --project ${n} --config ${t}`;Ve.quiet=!1;let a=o.stdout.trim(),i=new Date().toISOString(),p=["set -a",a,`${j}=${t}`,`${M}=${n}`,`${V}=${i}`,"set +a"],c=F(),m=Mr.resolve(c,L);nr.mkdirSync(c,{recursive:!0}),nr.writeFileSync(m,`${p.join(`
|
|
11
11
|
`)}
|
|
12
|
-
`),
|
|
13
|
-
`);let
|
|
14
|
-
`).filter(f=>f.includes("=")).length,project:n,config:t};return{content:[{type:"text",text:JSON.stringify(d,null,2)}],structuredContent:d}},
|
|
12
|
+
`),ir.stdout.write(`${m}
|
|
13
|
+
`);let u=a.split(`
|
|
14
|
+
`).filter(f=>f.includes("=")).length,d={filePath:m,variableCount:u,project:n,config:t};return{content:[{type:"text",text:JSON.stringify(d,null,2)}],structuredContent:d}},Vr={name:"env-load",description:'Download the env vars for a Doppler config and write them to a temporary shell script. Does NOT mutate the calling process \u2014 returns the path to a script that must be sourced ("source <filePath>") for the vars to take effect. The infra-kit shell wrapper auto-sources; direct MCP callers must handle sourcing themselves or surface filePath to the user. "config" is required when invoked via MCP (the CLI interactive picker is unreachable without a TTY).',inputSchema:{config:Z.string().describe('Doppler config / environment name to load (e.g. "dev", "arthur", "renana"). Required for MCP calls.')},outputSchema:{filePath:Z.string().describe("Path to the file that must be sourced to apply variables"),variableCount:Z.number().describe("Number of variables loaded"),project:Z.string().describe("Doppler project name"),config:Z.string().describe("Doppler config name")},handler:he};import Fr from"node:path";import Q from"node:process";import{z as W}from"zod";var ge=async()=>{await D(),s.info("Environment session status:");let e=F(),r=Q.env[je],t=Fr.join(e,L),n=0,o=0,a=Q.env[j]??null,i=Q.env[M]??null,p=Q.env[V]??null;if(a){let m=pe(t);m.length>0&&(o=m.length,n=m.filter(d=>d in Q.env).length);let u=p?.replace(/\.\d{3}Z$/,"")??null;s.info(` ${a}: ${n} of ${o} vars loaded (project: ${i}, loadedAt: ${u}, session: ${r})
|
|
15
15
|
`)}else s.info(` Session ${r}: no env loaded
|
|
16
|
-
`);let c={sessionId:r,sessionLoadedCount:n,sessionTotalCount:o,sessionConfig:
|
|
17
|
-
`);throw new Error(
|
|
16
|
+
`);let c={sessionId:r,sessionLoadedCount:n,sessionTotalCount:o,sessionConfig:a,sessionProject:i,sessionLoadedAt:p};return{content:[{type:"text",text:JSON.stringify(c,null,2)}],structuredContent:c}},Br={name:"env-status",description:"Report which Doppler project/config is currently loaded in the terminal session, when it was loaded, and how many variables are cached. Read-only \u2014 use env-load / env-clear to change the terminal session.",inputSchema:{},outputSchema:{sessionId:W.string().describe("Current terminal session ID"),sessionLoadedCount:W.number().describe("Number of cached vars active in the current session"),sessionTotalCount:W.number().describe("Total number of cached var names"),sessionConfig:W.string().nullable().describe("Doppler config name of the loaded session (environment name)"),sessionProject:W.string().nullable().describe("Doppler project name of the loaded session"),sessionLoadedAt:W.string().nullable().describe("ISO 8601 timestamp of when the env was loaded")},handler:ge};import Ur from"@inquirer/checkbox";import Hr from"@inquirer/confirm";import zr from"node:process";import{z as U}from"zod";import{$ as S}from"zx";import{$ as fs}from"zx";import Re from"node:process";import{$ as T}from"zx";import{$ as te}from"zx";import ee from"node:process";var Fe=async(e,r)=>{try{let{baseUrl:t,token:n,email:o,projectId:a}=r,i={name:e.name,projectId:e.projectId||a,description:e.description||"",released:e.released||!1,archived:e.archived||!1},p=`${t}/rest/api/3/version`,c=btoa(`${o}:${n}`),m=await fetch(p,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Basic ${c}`},body:JSON.stringify(i)});if(!m.ok){let d=await m.text();throw s.error({status:m.status,statusText:m.statusText,error:d},"Failed to create Jira version"),new Error(`HTTP ${m.status}: ${m.statusText}`)}return{success:!0,version:await m.json()}}catch(t){throw s.error({error:t},"Error creating Jira version"),t}},ve=async e=>{try{let{baseUrl:r,token:t,email:n,projectId:o}=e,a=`${r}/rest/api/3/project/${o}/versions`,i=btoa(`${n}:${t}`),p=await fetch(a,{method:"GET",headers:{Accept:"application/json",Authorization:`Basic ${i}`}});if(!p.ok){let m=await p.text();throw s.error({status:p.status,statusText:p.statusText,error:m},"Failed to get Jira project versions"),new Error(`HTTP ${p.status}: ${p.statusText}`)}return await p.json()}catch(r){throw s.error({error:r},"Error getting Jira project versions"),r}},qr=async(e,r)=>{try{return(await ve(r)).find(o=>o.name===e)||null}catch(t){throw s.error({error:t,versionName:e},"Error finding Jira version by name"),t}},Gr=async(e,r)=>{try{let{baseUrl:t,token:n,email:o}=r,a={released:e.released??!0,archived:e.archived??!1};e.releaseDate?a.releaseDate=e.releaseDate:e.released!==!1&&(a.releaseDate=new Date().toISOString().split("T")[0]),e.description!==void 0&&(a.description=e.description);let i=`${t}/rest/api/3/version/${e.versionId}`,p=btoa(`${o}:${n}`),c=await fetch(i,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Basic ${p}`},body:JSON.stringify(a)});if(!c.ok){let u=await c.text();throw s.error({status:c.status,statusText:c.statusText,error:u},"Failed to update Jira version"),new Error(`HTTP ${c.status}: ${c.statusText}`)}return{success:!0,version:await c.json()}}catch(t){throw s.error({error:t},"Error updating Jira version"),t}},Be=async(e,r)=>{try{let{versionName:t}=e,n=await qr(t,r);if(!n)throw s.error({versionName:t},"Jira version not found"),new Error(`Version "${t}" not found in Jira project`);return await Gr({versionId:n.id,released:!0,releaseDate:new Date().toISOString().split("T")[0]},r)}catch(t){throw s.error({error:t},"Error delivering Jira release"),t}},q=async()=>{let e=ee.env.JIRA_BASE_URL,r=ee.env.JIRA_TOKEN||ee.env.JIRA_API_TOKEN,t=ee.env.JIRA_PROJECT_ID,n=ee.env.JIRA_EMAIL,o=[];if(e||o.push("JIRA_BASE_URL (e.g., https://your-domain.atlassian.net)"),r||o.push("JIRA_TOKEN or JIRA_API_TOKEN (your Jira API token)"),t||o.push("JIRA_PROJECT_ID (numeric project ID)"),n||o.push("JIRA_EMAIL (your Jira email address)"),o.length>0){let i=["Jira configuration is required but incomplete.","Please configure the following environment variables:",...o.map(p=>` - ${p}`),"","You can set these in your .env file or as environment variables."].join(`
|
|
17
|
+
`);throw new Error(i)}let a=Number.parseInt(t,10);if(Number.isNaN(a))throw new TypeError(`Invalid JIRA_PROJECT_ID: "${t}" must be a numeric value (e.g., 10001)`);return{baseUrl:e.replace(/\/$/,""),token:r,projectId:a,email:n}},re=async()=>{try{return await q()}catch(e){return s.warn({error:e},"Jira configuration not available, skipping Jira integration"),null}};var ye=e=>e==="hotfix"?"main":"dev",oe=async(e="regular")=>{let r=ye(e);te.quiet=!0,await te`git fetch origin`,await te`git switch ${r}`,await te`git pull origin ${r}`,te.quiet=!1},se=async e=>{let{version:r,jiraConfig:t,description:n,type:o="regular"}=e,a=`v${r}`,i=await Fe({name:a,projectId:t.projectId,description:n||"",released:!1,archived:!1},t),p=`${t.baseUrl}/projects/${i.version.projectId}/versions/${i.version.id}/tab/release-report-all-issues`,c=await we({version:r,jiraVersionUrl:p,type:o});return{version:r,type:o,branchName:c.branchName,prUrl:c.prUrl,jiraVersionUrl:p}},w=async()=>{let e=new Map,r=await re();if(!r)return e;try{let t=await ve(r);for(let n of t)n.description&&e.set(n.name,n.description)}catch{}return e},G=(e,r,t)=>{let n=t?" ".repeat(t-e.length+3):" ",o=`[${r}]`.padEnd(11);return`${e}${n}${o}`},v=e=>e.toLowerCase().startsWith("hotfix")?"hotfix":"regular",C=e=>{let{branches:r,descriptions:t,types:n}=e,o=r.map(i=>i.replace("release/v","")),a=Math.max(...o.map(i=>i.length));return r.map((i,p)=>{let c=o[p],m=n?n.get(i)||"regular":void 0,u=t.get(`v${c}`),d=" ".repeat(a-c.length+3),f=m?G(c,m,a):c;return u&&(f=m?`${f} ${u}`:`${c}${d}${u}`),{name:f,value:i}})};var We=e=>e.replace("release/","").slice(1).split(".").map(Number),be=e=>[...e].sort((r,t)=>{let[n,o,a]=We(r),[i,p,c]=We(t);return n!==i?(n??0)-(i??0):o!==p?(o??0)-(p??0):(a??0)-(c??0)});var ar=async()=>{let e=await T`gh pr list --search "Release in:title" --base dev --json number,title,headRefName,state,baseRefName`,r=await T`gh pr list --search "Hotfix in:title" --base main --json number,title,headRefName,state,baseRefName`,t=[...JSON.parse(e.stdout),...JSON.parse(r.stdout)],n=new Set;return t.filter(o=>n.has(o.headRefName)?!1:(n.add(o.headRefName),!0))},ke=async()=>{try{let e=await ar();return e.length===0&&(s.error("\u274C No release PRs found. Check the project folder for the script. Exiting..."),Re.exit(1)),be(e.map(r=>r.headRefName))}catch(e){s.error({error:e},"\u274C Error fetching release PRs"),Re.exit(1)}},y=async()=>{try{let e=await ar();e.length===0&&(s.error("\u274C No release PRs found. Check the project folder for the script. Exiting..."),Re.exit(1));let r=be(e.map(n=>n.headRefName)),t=new Map(e.map(n=>[n.headRefName,n]));return r.map(n=>({branch:n,title:t.get(n).title}))}catch(e){s.error({error:e},"\u274C Error fetching release PRs"),Re.exit(1)}},we=async e=>{let{version:r,jiraVersionUrl:t,type:n}=e,o=n==="hotfix"?"Hotfix":"Release",a=ye(n),i=`release/v${r}`;try{T.quiet=!0,await T`git switch ${a}`,await T`git pull origin ${a}`,await T`git checkout -b ${i}`,await T`git push -u origin ${i}`,await T`git commit --allow-empty-message --allow-empty --message ''`,await T`git push origin ${i}`;let c=(await T`gh pr create --title "${o} v${r}" --body "${t} \n" --base ${a} --head ${i}`).stdout.trim();return await T`git switch ${a}`,T.quiet=!1,{branchName:i,prUrl:c}}catch(p){throw s.error({error:p,branchName:i},`Error creating release branch ${i}`),p}};var xe=async e=>{let{all:r,confirmedCommand:t}=e;l.start("merge-dev");let o=(await y()).filter(u=>v(u.title)==="regular").map(u=>u.branch);if(o.length===0)return s.info("\u2139\uFE0F No open release branches found"),l.print(),{content:[{type:"text",text:JSON.stringify({successfulMerges:0,failedMerges:0,failedBranches:[],totalBranches:0},null,2)}],structuredContent:{successfulMerges:0,failedMerges:0,failedBranches:[],totalBranches:0}};let a=[];if(r)a=o;else{l.setInteractive();let u=await w();a=await Ur({required:!0,message:"\u{1F33F} Select release branches",choices:C({branches:o,descriptions:u})})}a.length===o.length?l.addOption("--all",!0):l.addOption("--versions",a.map(u=>u.replace("release/v","")));let p=t?!0:await Hr({message:`Are you sure you want to merge dev into these branches: ${a.join(", ")}?`});t||l.setInteractive(),p||(s.info("Operation cancelled. Exiting..."),zr.exit(0)),t||l.addOption("--yes",!0),S.quiet=!0,await S`git fetch origin`,await S`git switch dev`,await S`git pull origin dev`;let c=[];for(let u of a)await Kr(u)||c.push(u);if(S.quiet=!1,c.length>0){s.info(`
|
|
18
18
|
\u26A0\uFE0F ${c.length} branch(es) failed to merge automatically.
|
|
19
19
|
`),s.info("\u{1F4CB} Manual merge script for failed branches:");for(let u of c)s.info(`# Merge dev into ${u} and resolve conflicts if any
|
|
20
|
+
|
|
20
21
|
git switch ${u} && git pull origin ${u} && git merge origin/dev
|
|
21
22
|
git push origin ${u} && git switch dev
|
|
22
|
-
`);s.info(`\u2705 ${i.length-c.length}/${i.length} merges completed successfully.`)}else s.info("\u2705 All merges completed successfully!");l.print();let m={successfulMerges:i.length-c.length,failedMerges:c.length,failedBranches:c,totalBranches:i.length};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}},et=async e=>{try{return await A`git switch ${e}`,await A`git pull origin ${e}`,await A`git merge origin/dev --no-edit`,await A`git push origin ${e}`,await A`git switch dev`,s.info(`Successfully merged dev into ${e}`),!0}catch(r){return s.error({error:r,branch:e},`Error merging dev into ${e}`),await A`git reset --merge HEAD~1`,!1}},rt={name:"gh-merge-dev",description:"Merge dev branch into selected release branches",inputSchema:{all:z.boolean().describe("Merge dev into all release branches without prompting")},outputSchema:{successfulMerges:z.number().describe("Number of successful merges"),failedMerges:z.number().describe("Number of failed merges"),failedBranches:z.array(z.string()).describe("List of branches that failed to merge"),totalBranches:z.number().describe("Total number of branches processed")},handler:Te};import tt from"@inquirer/confirm";import ot from"@inquirer/select";import Ge from"node:process";import{z as ie}from"zod";import{$ as S}from"zx";var Ce=async e=>{let{version:r,confirmedCommand:t}=e;l.start("release-deliver");let n=await y(),o=n.map(d=>d.branch),i=new Map(n.map(d=>[d.branch,v(d.title)])),a="";if(r)a=`release/v${r}`;else{l.setInteractive();let d=await w();a=await ot({message:"\u{1F33F} Select release branch",choices:x({branches:o,descriptions:d,types:i})})}let p=a.replace("release/v","");l.addOption("--version",p);let c=n.find(d=>d.branch===a);c||(s.error(`\u274C Release branch ${a} not found in open PRs. Exiting...`),Ge.exit(1));let m=v(c.title),u=t?!0:await tt({message:`Are you sure you want to deliver version ${a} to production?`});t||l.setInteractive(),u||(s.info("Operation cancelled. Exiting..."),Ge.exit(0)),l.addOption("--yes",!0);try{S.quiet=!0,m==="hotfix"?(await S`gh pr merge ${a} --squash --admin --delete-branch`,S.quiet=!1,await S`gh workflow run deploy-all.yml --ref main -f environment=prod`,S.quiet=!0,await S`git switch main && git pull && git switch dev && git pull && git merge main --no-edit && git push`):(await S`gh pr merge ${a} --squash --admin --delete-branch`,await S`gh pr create --base main --head dev --title "Release v${p} (RC)" --body ""`,await S`gh pr merge dev --squash --admin`,S.quiet=!1,await S`gh workflow run deploy-all.yml --ref main -f environment=prod`,S.quiet=!0,await S`git switch main && git pull && git switch dev && git pull && git merge main --no-edit && git push`),S.quiet=!1;let d=await te();if(d)try{let g=a.replace("release/","");await qe({versionName:g},d)}catch(g){s.error({error:g},"Failed to deliver Jira release (non-blocking)")}else s.info("\u{1F514} Jira is not configured, skipping Jira release delivery");s.info(`Successfully delivered ${a} to production!`),l.print();let f={releaseBranch:a,version:a.replace("release/v",""),type:m,success:!0};return{content:[{type:"text",text:JSON.stringify(f,null,2)}],structuredContent:f}}catch(d){s.error({error:d},"\u274C Error merging release branch into dev"),Ge.exit(1)}},st={name:"gh-release-deliver",description:"Deliver a release branch to production",inputSchema:{version:ie.string().describe('Version to deliver to production (e.g., "1.2.5")')},outputSchema:{releaseBranch:ie.string().describe("The release branch that was delivered"),version:ie.string().describe("The version that was delivered"),type:ie.enum(["regular","hotfix"]).describe("Release type"),success:ie.boolean().describe("Whether the delivery was successful")},handler:Ce};import ur from"@inquirer/select";import fr from"node:process";import{z as O}from"zod";import{$ as ze}from"zx";var Se=async e=>{let{version:r,env:t,skipTerraform:n}=e;l.start("release-deploy-all");let o="";if(r)o=r==="dev"?"dev":`release/v${r}`;else{l.setInteractive();let c=await y(),m=c.map(f=>f.branch),u=new Map(c.map(f=>[f.branch,v(f.title)])),d=await w();o=await ur({message:"\u{1F33F} Select release branch",choices:[{name:"dev",value:"dev"},...x({branches:m,descriptions:d,types:u})]})}let i=o==="dev"?"dev":o.replace("release/v","");l.addOption("--version",i);let a="";t?a=t:(l.setInteractive(),a=await ur({message:"\u{1F9EA} Select environment",choices:C.map(c=>({name:c,value:c}))})),l.addOption("--env",a),C.includes(a)||(s.error(`\u274C Invalid environment: ${a}. Exiting...`),fr.exit(1));let p=n??!1;p&&l.addOption("--skip-terraform",!0);try{ze.quiet=!0,await ze`gh workflow run deploy-all.yml --ref ${o} -f environment=${a} ${p?["-f","skip_terraform_deploy=true"]:[]}`,ze.quiet=!1,s.info(`Successfully launched deploy-all workflow_dispatch for release branch: ${o} and environment: ${a}`),l.print();let m={releaseBranch:o,version:o.replace("release/v",""),environment:a,skipTerraformDeploy:p,success:!0};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}}catch(c){s.error({error:c},"\u274C Error launching workflow"),fr.exit(1)}},nt={name:"gh-release-deploy-all",description:"Deploy a release branch to a specified environment",inputSchema:{version:O.string().describe('Version to deploy (e.g., "1.2.5")'),env:O.string().describe('Environment to deploy to (e.g., "dev", "renana", "oriana")'),skipTerraform:O.boolean().optional().describe("Skip terraform deployment step")},outputSchema:{releaseBranch:O.string().describe("The release branch that was deployed"),version:O.string().describe("The version that was deployed"),environment:O.string().describe("The environment deployed to"),skipTerraformDeploy:O.boolean().describe("Whether terraform deployment was skipped"),success:O.boolean().describe("Whether the deployment was successful")},handler:Se};import it from"@inquirer/checkbox";import gr from"@inquirer/select";import at from"node:fs/promises";import{resolve as ct}from"node:path";import ae from"node:process";import lt from"yaml";import{z as I}from"zod";import{$ as Ke}from"zx";var $e=async e=>{let{version:r,env:t,services:n,skipTerraform:o}=e;l.start("release-deploy-selected");let i="";if(r)i=r==="dev"?"dev":`release/v${r}`;else{l.setInteractive();let f=await y(),g=f.map(k=>k.branch),R=new Map(f.map(k=>[k.branch,v(k.title)])),T=await w();i=await gr({message:"\u{1F33F} Select release branch",choices:[{name:"dev",value:"dev"},...x({branches:g,descriptions:T,types:R})]})}let a=i==="dev"?"dev":i.replace("release/v","");l.addOption("--version",a);let p="";t?p=t:(l.setInteractive(),p=await gr({message:"\u{1F9EA} Select environment",choices:C.map(f=>({name:f,value:f}))})),l.addOption("--env",p),C.includes(p)||(s.error(`\u274C Invalid environment: ${p}. Exiting...`),ae.exit(1));let c=await pt();c.length===0&&(s.error("\u274C No services found in workflow file. Exiting..."),ae.exit(1));let m=[];n&&n.length>0?m=n:(l.setInteractive(),m=await it({message:"\u{1F680} Select services to deploy (space to select, enter to confirm)",choices:c.map(f=>({name:f,value:f}))})),l.addOption("--services",m),m.length===0&&(s.error("\u274C No services selected. Exiting..."),ae.exit(1));let u=m.filter(f=>!c.includes(f));u.length>0&&(s.error(`\u274C Invalid services: ${u.join(", ")}. Available services: ${c.join(", ")}`),ae.exit(1));let d=o??!1;d&&l.addOption("--skip-terraform",!0);try{Ke.quiet=!0;let f=m.flatMap(T=>["-f",`${T}=true`]);await Ke`gh workflow run deploy-selected-services.yml --ref ${i} -f environment=${p} ${f} ${d?["-f","skip_terraform_deploy=true"]:[]}`,Ke.quiet=!1,s.info(`Successfully launched deploy-selected-services workflow_dispatch for release branch: ${i}, environment: ${p}, services: ${m.join(", ")}`),l.print();let R={releaseBranch:i,version:i.replace("release/v",""),environment:p,services:m,skipTerraformDeploy:d,success:!0};return{content:[{type:"text",text:JSON.stringify(R,null,2)}],structuredContent:R}}catch(f){s.error({error:f},"\u274C Error launching workflow"),ae.exit(1)}},pt=async()=>{let e=await $(),r=ct(e,".github/workflows/deploy-selected-services.yml"),t=await at.readFile(r,"utf-8"),o=lt.parse(t).on.workflow_dispatch.inputs,i=[];for(let[a,p]of Object.entries(o))p.type==="boolean"&&a!=="skip_terraform_deploy"&&i.push(a);return i},mt={name:"gh-release-deploy-selected",description:"Deploy selected services from a release branch to a specified environment",inputSchema:{version:I.string().describe('Version to deploy (e.g., "1.2.5")'),env:I.string().describe('Environment to deploy to (e.g., "dev", "renana", "oriana")'),services:I.array(I.string()).describe('List of services to deploy (e.g., ["client-be", "client-fe"])'),skipTerraform:I.boolean().optional().describe("Skip terraform deployment step")},outputSchema:{releaseBranch:I.string().describe("The release branch that was deployed"),version:I.string().describe("The version that was deployed"),environment:I.string().describe("The environment deployed to"),services:I.array(I.string()).describe("The services that were deployed"),skipTerraformDeploy:I.boolean().describe("Whether terraform deployment was skipped"),success:I.boolean().describe("Whether the deployment was successful")},handler:$e};import He from"@inquirer/select";import dt from"node:fs/promises";import{resolve as ut}from"node:path";import Xe from"node:process";import ft from"yaml";import{z as P}from"zod";import{$ as Ye}from"zx";var Ee=async e=>{let{version:r,env:t,service:n,skipTerraform:o}=e;l.start("release-deploy-service");let i="";if(r)i=r==="dev"?"dev":`release/v${r}`;else{l.setInteractive();let d=await y(),f=d.map(T=>T.branch),g=new Map(d.map(T=>[T.branch,v(T.title)])),R=await w();i=await He({message:"\u{1F33F} Select release branch",choices:[{name:"dev",value:"dev"},...x({branches:f,descriptions:R,types:g})]})}let a=i==="dev"?"dev":i.replace("release/v","");l.addOption("--version",a);let p="";t?p=t:(l.setInteractive(),p=await He({message:"\u{1F9EA} Select environment",choices:C.map(d=>({name:d,value:d}))})),l.addOption("--env",p),C.includes(p)||(s.error(`\u274C Invalid environment: ${p}. Exiting...`),Xe.exit(1));let c=await gt(),m="";n?m=n:(l.setInteractive(),m=await He({message:"\u{1F680} Select service to deploy",choices:c.map(d=>({name:d,value:d}))})),l.addOption("--service",m),c.includes(m)||(s.error(`\u274C Invalid service: ${m}. Available services: ${c.join(", ")}`),Xe.exit(1));let u=o??!1;u&&l.addOption("--skip-terraform",!0);try{Ye.quiet=!0,await Ye`gh workflow run deploy-single-service.yml --ref ${i} -f environment=${p} -f service=${m} ${u?["-f","skip_terraform_deploy=true"]:[]}`,Ye.quiet=!1,s.info(`Successfully launched deploy-single-service workflow_dispatch for release branch: ${i}, environment: ${p}, service: ${m}`),l.print();let f={releaseBranch:i,version:i.replace("release/v",""),environment:p,service:m,skipTerraformDeploy:u,success:!0};return{content:[{type:"text",text:JSON.stringify(f,null,2)}],structuredContent:f}}catch(d){s.error({error:d},"\u274C Error launching workflow"),Xe.exit(1)}},gt=async()=>{let e=await $(),r=ut(e,".github/workflows/deploy-single-service.yml"),t=await dt.readFile(r,"utf-8");return ft.parse(t).on.workflow_dispatch.inputs.service.options},ht={name:"gh-release-deploy-service",description:"Deploy a specific service in a release branch to a specified environment",inputSchema:{version:P.string().describe('Version to deploy (e.g., "1.2.5")'),env:P.string().describe('Environment to deploy to (e.g., "dev", "renana", "oriana")'),service:P.string().describe('Service to deploy (e.g., "client-be", "client-fe")'),skipTerraform:P.boolean().optional().describe("Skip terraform deployment step")},outputSchema:{releaseBranch:P.string().describe("The release branch that was deployed"),version:P.string().describe("The version that was deployed"),environment:P.string().describe("The environment deployed to"),service:P.string().describe("The service that was deployed"),skipTerraformDeploy:P.boolean().describe("Whether terraform deployment was skipped"),success:P.boolean().describe("Whether the deployment was successful")},handler:Ee};import{z as K}from"zod";var Ie=async()=>{let r=(await y()).map(a=>({version:a.branch.replace("release/",""),type:v(a.title)})),t=await w(),n=Math.max(...r.map(a=>a.version.length)),o=r.map(a=>{let p=G(a.version,a.type,n),c=t.get(a.version);return c?`${p} ${c}`:p});s.info(`All release branches:
|
|
23
|
+
`);s.info(`\u2705 ${a.length-c.length}/${a.length} merges completed successfully.`)}else s.info(`\u2705 All merges completed successfully!
|
|
24
|
+
`);l.print();let m={successfulMerges:a.length-c.length,failedMerges:c.length,failedBranches:c,totalBranches:a.length};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}},Kr=async e=>{try{return await S`git switch ${e}`,await S`git pull origin ${e}`,await S`git merge origin/dev --no-edit`,await S`git push origin ${e}`,await S`git switch dev`,s.info(`Successfully merged dev into ${e}`),!0}catch(r){return s.error({error:r,branch:e},`Error merging dev into ${e}`),await S`git reset --merge HEAD~1`,!1}},Yr={name:"gh-merge-dev",description:"Merge origin/dev into every open regular (non-hotfix) release branch and push the result. Mutates local git state and the remote release branches. When invoked via MCP, pass all=true \u2014 the branch picker is unreachable without a TTY, and the confirmation prompt is auto-skipped for MCP calls, so the caller is responsible for gating. Irreversible once pushed.",inputSchema:{all:U.boolean().optional().describe("Target every open regular release branch. Must be true for MCP calls (the interactive picker is unavailable without a TTY).")},outputSchema:{successfulMerges:U.number().describe("Number of successful merges"),failedMerges:U.number().describe("Number of failed merges"),failedBranches:U.array(U.string()).describe("List of branches that failed to merge"),totalBranches:U.number().describe("Total number of branches processed")},handler:xe};import Xr from"@inquirer/confirm";import Zr from"@inquirer/select";import qe from"node:process";import{z as ne}from"zod";import{$ as x}from"zx";var Ce=async e=>{let{version:r,confirmedCommand:t}=e;l.start("release-deliver");let n=await y(),o=n.map(d=>d.branch),a=new Map(n.map(d=>[d.branch,v(d.title)])),i="";if(r)i=`release/v${r}`;else{l.setInteractive();let d=await w();i=await Zr({message:"\u{1F33F} Select release branch",choices:C({branches:o,descriptions:d,types:a})})}let p=i.replace("release/v","");l.addOption("--version",p);let c=n.find(d=>d.branch===i);c||(s.error(`\u274C Release branch ${i} not found in open PRs. Exiting...`),qe.exit(1));let m=v(c.title),u=t?!0:await Xr({message:`Are you sure you want to deliver version ${i} to production?`});t||l.setInteractive(),u||(s.info("Operation cancelled. Exiting..."),qe.exit(0)),l.addOption("--yes",!0);try{x.quiet=!0,m==="hotfix"?(await x`gh pr merge ${i} --squash --admin --delete-branch`,x.quiet=!1,await x`gh workflow run deploy-all.yml --ref main -f environment=prod`,x.quiet=!0,await x`git switch main && git pull && git switch dev && git pull && git merge main --no-edit && git push`):(await x`gh pr merge ${i} --squash --admin --delete-branch`,await x`gh pr create --base main --head dev --title "Release v${p} (RC)" --body ""`,await x`gh pr merge dev --squash --admin`,x.quiet=!1,await x`gh workflow run deploy-all.yml --ref main -f environment=prod`,x.quiet=!0,await x`git switch main && git pull && git switch dev && git pull && git merge main --no-edit && git push`),x.quiet=!1;let d=await re();if(d)try{let g=i.replace("release/","");await Be({versionName:g},d)}catch(g){s.error({error:g},"Failed to deliver Jira release (non-blocking)")}else s.info("\u{1F514} Jira is not configured, skipping Jira release delivery");s.info(`Successfully delivered ${i} to production!`),l.print();let f={releaseBranch:i,version:i.replace("release/v",""),type:m,success:!0};return{content:[{type:"text",text:JSON.stringify(f,null,2)}],structuredContent:f}}catch(d){s.error({error:d},"\u274C Error merging release branch into dev"),qe.exit(1)}},Qr={name:"gh-release-deliver",description:'Deliver a release to production. For hotfixes: squash-merges the release branch to main and dispatches the deploy-all workflow. For regular releases: squash-merges to dev, opens an RC PR, merges dev into main, dispatches the deploy-all workflow, then syncs main back to dev. Also releases the matching Jira fix version if Jira is configured. Dispatches the deploy workflow fire-and-forget \u2014 the tool returns once the workflow is accepted by GitHub, not when the deployment finishes. Irreversible production operation: the confirmation prompt is auto-skipped for MCP calls, so the caller is responsible for gating. "version" is required when invoked via MCP (the picker is unreachable without a TTY).',inputSchema:{version:ne.string().describe('Release version to deliver to production (e.g., "1.2.5"). Required for MCP calls.')},outputSchema:{releaseBranch:ne.string().describe("The release branch that was delivered"),version:ne.string().describe("The version that was delivered"),type:ne.enum(["regular","hotfix"]).describe("Release type"),success:ne.boolean().describe("Whether the delivery was successful")},handler:Ce};import cr from"@inquirer/select";import lr from"node:process";import{z as O}from"zod";import{$ as Ge}from"zx";var Te=async e=>{let{version:r,env:t,skipTerraform:n}=e;l.start("release-deploy-all");let o="";if(r)o=r==="dev"?"dev":`release/v${r}`;else{l.setInteractive();let c=await y(),m=c.map(f=>f.branch),u=new Map(c.map(f=>[f.branch,v(f.title)])),d=await w();o=await cr({message:"\u{1F33F} Select release branch",choices:[{name:"dev",value:"dev"},...C({branches:m,descriptions:d,types:u})]})}let a=o==="dev"?"dev":o.replace("release/v","");l.addOption("--version",a);let i="";t?i=t:(l.setInteractive(),i=await cr({message:"\u{1F9EA} Select environment",choices:P.map(c=>({name:c,value:c}))})),l.addOption("--env",i),P.includes(i)||(s.error(`\u274C Invalid environment: ${i}. Exiting...`),lr.exit(1));let p=n??!1;p&&l.addOption("--skip-terraform",!0);try{Ge.quiet=!0,await Ge`gh workflow run deploy-all.yml --ref ${o} -f environment=${i} ${p?["-f","skip_terraform_deploy=true"]:[]}`,Ge.quiet=!1,s.info(`Successfully launched deploy-all workflow_dispatch for release branch: ${o} and environment: ${i}`),l.print();let m={releaseBranch:o,version:o.replace("release/v",""),environment:i,skipTerraformDeploy:p,success:!0};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}}catch(c){s.error({error:c},"\u274C Error launching workflow"),lr.exit(1)}},et={name:"gh-release-deploy-all",description:'Dispatch the deploy-all.yml GitHub Actions workflow to deploy every service from a release branch to the given environment. Fire-and-forget \u2014 returns once GitHub accepts the workflow_dispatch, NOT when the deployment finishes; watch the workflow run for completion status. Use gh-release-deploy-selected for a subset of services. Pass version="dev" to deploy from the dev branch instead of a release branch. Both "version" and "env" are required when invoked via MCP (interactive pickers are unavailable without a TTY).',inputSchema:{version:O.string().describe('Release version to deploy from (e.g. "1.2.5") \u2014 resolves to the release/vX.Y.Z branch. Pass "dev" to deploy from the dev branch instead. Required for MCP calls.'),env:O.string().describe('Target environment name \u2014 must match an env configured for the project (e.g. "dev", "renana", "oriana"). Required for MCP calls.'),skipTerraform:O.boolean().optional().describe("Skip the terraform deployment stage.")},outputSchema:{releaseBranch:O.string().describe("The release branch that was deployed"),version:O.string().describe("The version that was deployed"),environment:O.string().describe("The environment deployed to"),skipTerraformDeploy:O.boolean().describe("Whether terraform deployment was skipped"),success:O.boolean().describe("Whether the deployment was successful")},handler:Te};import rt from"@inquirer/checkbox";import pr from"@inquirer/select";import tt from"node:fs/promises";import{resolve as ot}from"node:path";import ie from"node:process";import st from"yaml";import{z as $}from"zod";import{$ as Ue}from"zx";var $e=async e=>{let{version:r,env:t,services:n,skipTerraform:o}=e;l.start("release-deploy-selected");let a="";if(r)a=r==="dev"?"dev":`release/v${r}`;else{l.setInteractive();let f=await y(),g=f.map(k=>k.branch),R=new Map(f.map(k=>[k.branch,v(k.title)])),A=await w();a=await pr({message:"\u{1F33F} Select release branch",choices:[{name:"dev",value:"dev"},...C({branches:g,descriptions:A,types:R})]})}let i=a==="dev"?"dev":a.replace("release/v","");l.addOption("--version",i);let p="";t?p=t:(l.setInteractive(),p=await pr({message:"\u{1F9EA} Select environment",choices:P.map(f=>({name:f,value:f}))})),l.addOption("--env",p),P.includes(p)||(s.error(`\u274C Invalid environment: ${p}. Exiting...`),ie.exit(1));let c=await nt();c.length===0&&(s.error("\u274C No services found in workflow file. Exiting..."),ie.exit(1));let m=[];n&&n.length>0?m=n:(l.setInteractive(),m=await rt({message:"\u{1F680} Select services to deploy (space to select, enter to confirm)",choices:c.map(f=>({name:f,value:f}))})),l.addOption("--services",m),m.length===0&&(s.error("\u274C No services selected. Exiting..."),ie.exit(1));let u=m.filter(f=>!c.includes(f));u.length>0&&(s.error(`\u274C Invalid services: ${u.join(", ")}. Available services: ${c.join(", ")}`),ie.exit(1));let d=o??!1;d&&l.addOption("--skip-terraform",!0);try{Ue.quiet=!0;let f=m.flatMap(A=>["-f",`${A}=true`]);await Ue`gh workflow run deploy-selected-services.yml --ref ${a} -f environment=${p} ${f} ${d?["-f","skip_terraform_deploy=true"]:[]}`,Ue.quiet=!1,s.info(`Successfully launched deploy-selected-services workflow_dispatch for release branch: ${a}, environment: ${p}, services: ${m.join(", ")}`),l.print();let R={releaseBranch:a,version:a.replace("release/v",""),environment:p,services:m,skipTerraformDeploy:d,success:!0};return{content:[{type:"text",text:JSON.stringify(R,null,2)}],structuredContent:R}}catch(f){s.error({error:f},"\u274C Error launching workflow"),ie.exit(1)}},nt=async()=>{let e=await E(),r=ot(e,".github/workflows/deploy-selected-services.yml"),t=await tt.readFile(r,"utf-8"),o=st.parse(t).on.workflow_dispatch.inputs,a=[];for(let[i,p]of Object.entries(o))p.type==="boolean"&&i!=="skip_terraform_deploy"&&a.push(i);return a},it={name:"gh-release-deploy-selected",description:'Dispatch the deploy-selected-services.yml GitHub Actions workflow to deploy a chosen subset of services from a release branch to the given environment. Fire-and-forget \u2014 returns once GitHub accepts the workflow_dispatch, NOT when the deployment finishes; watch the workflow run for completion status. Service names are validated against the boolean inputs declared in the workflow. Use gh-release-deploy-all for every service. "version", "env", and "services" are all required when invoked via MCP (interactive pickers are unavailable without a TTY).',inputSchema:{version:$.string().describe('Release version to deploy from (e.g. "1.2.5") \u2014 resolves to the release/vX.Y.Z branch. Pass "dev" to deploy from the dev branch instead. Required for MCP calls.'),env:$.string().describe('Target environment name \u2014 must match an env configured for the project (e.g. "dev", "renana", "oriana"). Required for MCP calls.'),services:$.array($.string()).describe('Service names to deploy. Each must match a boolean input declared in .github/workflows/deploy-selected-services.yml (e.g. "client-be", "client-fe"). Required for MCP calls.'),skipTerraform:$.boolean().optional().describe("Skip the terraform deployment stage.")},outputSchema:{releaseBranch:$.string().describe("The release branch that was deployed"),version:$.string().describe("The version that was deployed"),environment:$.string().describe("The environment deployed to"),services:$.array($.string()).describe("The services that were deployed"),skipTerraformDeploy:$.boolean().describe("Whether terraform deployment was skipped"),success:$.boolean().describe("Whether the deployment was successful")},handler:$e};import{z as H}from"zod";var Pe=async()=>{let r=(await y()).map(i=>({version:i.branch.replace("release/",""),type:v(i.title)})),t=await w(),n=Math.max(...r.map(i=>i.version.length)),o=r.map(i=>{let p=G(i.version,i.type,n),c=t.get(i.version);return c?`${p} ${c}`:p});s.info(`All release branches:
|
|
23
25
|
`),s.info(`
|
|
24
26
|
${o.join(`
|
|
25
27
|
`)}
|
|
26
|
-
`);let
|
|
28
|
+
`);let a={releases:r.map(i=>({version:i.version,type:i.type,description:t.get(i.version)||null})),count:r.length};return{content:[{type:"text",text:JSON.stringify(a,null,2)}],structuredContent:a}},at={name:"gh-release-list",description:"List every open release PR with its version, type (regular / hotfix), and associated Jira fix-version description. Read-only; sourced from GitHub and Jira.",inputSchema:{},outputSchema:{releases:H.array(H.object({version:H.string().describe("Release version"),type:H.enum(["regular","hotfix"]).describe("Release type"),description:H.string().nullable().describe("Jira version description")})).describe("List of all release branches"),count:H.number().describe("Number of release branches")},handler:Pe};import Ee from"node:fs";import ct from"node:os";import lt from"node:path";var ur="# -- infra-kit:begin --",dr="# -- infra-kit:end --",pt=[["# region infra-kit","# endregion infra-kit"]],mt="# infra-kit shell functions",He=async()=>{let e=lt.join(ct.homedir(),".zshrc"),r=ft();if(Ee.existsSync(e)){let t=Ee.readFileSync(e,"utf-8"),n=dt(t);Ee.writeFileSync(e,n)}Ee.appendFileSync(e,`
|
|
27
29
|
${r}
|
|
28
|
-
`),s.info(`Added infra-kit shell functions to ${e}`),s.info("Run `source ~/.zshrc` or open a new terminal to activate.")},
|
|
29
|
-
${
|
|
30
|
-
`),
|
|
31
|
-
`);return n+(
|
|
32
|
-
${
|
|
33
|
-
`)};import
|
|
34
|
-
`)}catch(u){let d=u instanceof Error?u.message:String(u);
|
|
35
|
-
`)}let
|
|
36
|
-
${
|
|
30
|
+
`),s.info(`Added infra-kit shell functions to ${e}`),s.info("Run `source ~/.zshrc` or open a new terminal to activate.")},ut=e=>e.startsWith("#")||e.startsWith("alias ")||e.startsWith("env-load")||e.startsWith("env-clear")||e.startsWith("env-status")||e.startsWith("if ")||e.startsWith(" export INFRA_KIT_SESSION")||e.startsWith("fi"),mr=(e,r,t)=>{let n=e.indexOf(r),o=e.indexOf(t);if(n===-1||o===-1)return null;let a=e.slice(0,n).replace(/\n+$/,""),i=e.slice(o+t.length).replace(/^\n+/,"");return a+(i?`
|
|
31
|
+
${i}`:"")},dt=e=>{let r=mr(e,ur,dr);if(r!==null)return r;for(let[p,c]of pt){let m=mr(e,p,c);if(m!==null)return m}let t=e.indexOf(mt);if(t===-1)return e;let n=e.slice(0,t).replace(/\n+$/,""),o=e.slice(t).split(`
|
|
32
|
+
`),a=0;for(;a<o.length&&ut(o[a]);)a++;let i=o.slice(a).join(`
|
|
33
|
+
`);return n+(i?`
|
|
34
|
+
${i}`:"")},ft=()=>{let e="pnpm exec infra-kit";return[ur,'if [[ -z "${INFRA_KIT_SESSION}" ]]; then'," export INFRA_KIT_SESSION=$(head -c 4 /dev/urandom | xxd -p)","fi",`env-load() { local f; f=$(${e} env-load "$@") && source "$f" && ${e} env-status; }`,`env-clear() { local f; f=$(${e} env-clear) && source "$f" && ${e} env-status; }`,`env-status() { ${e} env-status; }`,`alias ik='${e}'`,dr].join(`
|
|
35
|
+
`)};import fr from"@inquirer/confirm";import ht from"@inquirer/select";import hr from"node:process";import{z as I}from"zod";import{$ as ze,question as gr}from"zx";var Se=async e=>{let{version:r,description:t,type:n,confirmedCommand:o,checkout:a}=e;l.start("release-create");let i=r,p=t,c=n||"regular",m=a,u=await q();i||(l.setInteractive(),i=await gr("Enter version (e.g. 1.2.5): ")),(!i||i.trim()==="")&&(s.error("No version provided. Exiting..."),hr.exit(1));let d=i.trim();l.addOption("--version",d),n||(l.setInteractive(),c=await ht({message:"Select release type:",choices:[{name:"regular",value:"regular"},{name:"hotfix",value:"hotfix"}],default:"regular"})),l.addOption("--type",c),p===void 0&&(l.setInteractive(),p=await gr("Enter description (optional, press Enter to skip): "),p.trim()===""&&(p="")),p&&l.addOption("--description",p);let f=o?!0:await fr({message:`Are you sure you want to create release branch for version ${d}?`});o||l.setInteractive(),f||(s.info("Operation cancelled. Exiting..."),hr.exit(0)),l.addOption("--yes",!0),await oe(c);let g=await se({version:d,jiraConfig:u,description:p,type:c});s.info(`\u2705 Successfully created release: v${d}`),s.info(`\u{1F517} GitHub PR: ${g.prUrl}`),s.info(`\u{1F517} Jira Version: ${g.jiraVersionUrl}`),m===void 0&&(l.setInteractive(),m=await fr({message:`Do you want to checkout to the created branch ${g.branchName}?`,default:!0})),m||l.addOption("--no-checkout",!0),m&&(ze.quiet=!0,await ze`git switch ${g.branchName}`,ze.quiet=!1,s.info(`\u{1F504} Switched to branch ${g.branchName}`)),l.print();let R={version:d,type:c,branchName:g.branchName,prUrl:g.prUrl,jiraVersionUrl:g.jiraVersionUrl,isCheckedOut:m};return{content:[{type:"text",text:JSON.stringify(R,null,2)}],structuredContent:R}},gt={name:"release-create",description:'Create a new release: cuts the release branch off the appropriate base (dev for regular releases, main for hotfixes), opens a GitHub release PR, creates the matching Jira fix version, and optionally checks out to the new branch. Confirmation is auto-skipped for MCP calls, so the caller is responsible for gating. "version" is required when invoked via MCP (the interactive input prompt is unreachable without a TTY); "type" / "description" / "checkout" default to regular / empty / true when omitted.',inputSchema:{version:I.string().describe('Version to create (e.g., "1.2.5"). Required for MCP calls.'),description:I.string().optional().describe("Optional description for the Jira version"),type:I.enum(["regular","hotfix"]).optional().default("regular").describe('Release type: "regular" or "hotfix" (default: "regular")'),checkout:I.boolean().optional().default(!0).describe("Checkout to the created branch (default: true)")},outputSchema:{version:I.string().describe("Version number"),type:I.enum(["regular","hotfix"]).describe("Release type"),branchName:I.string().describe("Release branch name"),prUrl:I.string().describe("GitHub PR URL"),jiraVersionUrl:I.string().describe("Jira version URL"),isCheckedOut:I.boolean().describe("Whether the branch was checked out")},handler:Se};import vt from"@inquirer/confirm";import yt from"@inquirer/select";import vr from"node:process";import{z as b}from"zod";import{question as wt}from"zx";var bt=async e=>{let{versions:r,type:t,confirmedCommand:n}=e,o=r,a=t||"regular";o||(l.setInteractive(),o=await wt("Enter versions by comma (e.g. 1.2.5, 1.2.6): "));let i=o.split(",").map(c=>c.trim()).filter(Boolean);l.addOption("--versions",i.join(", ")),i.length===0&&(s.error("No versions provided. Exiting..."),vr.exit(1)),t||(l.setInteractive(),a=await yt({message:"Select release type:",choices:[{name:"regular",value:"regular"},{name:"hotfix",value:"hotfix"}],default:"regular"})),l.addOption("--type",a),i.length===1&&s.warn('\u{1F4A1} You are creating only one release. Consider using "create-release" command for single releases.');let p=n?!0:await vt({message:`Are you sure you want to create release branches for these versions: ${i.join(", ")}?`});return n||l.setInteractive(),p||(s.info("Operation cancelled. Exiting..."),vr.exit(0)),l.addOption("--yes",!0),{versionsList:i,type:a}},Ie=async e=>{l.start("release-create-batch");let r=await q(),{versionsList:t,type:n}=await bt(e);await oe(n);let o=[],a=[];for(let m of t)try{let u=await se({version:m,jiraConfig:r,type:n});o.push(u),s.info(`\u2705 Successfully created release: v${m}`),s.info(`\u{1F517} GitHub PR: ${u.prUrl}`),s.info(`\u{1F517} Jira Version: ${u.jiraVersionUrl}
|
|
36
|
+
`)}catch(u){let d=u instanceof Error?u.message:String(u);a.push({version:m,error:d}),s.error(`\u274C Failed to create release: v${m}`),s.error(` Error: ${d}
|
|
37
|
+
`)}let i=o.length,p=a.length;i===t.length?s.info(`\u2705 All ${t.length} release branches were created successfully.`):i>0?(s.warn(`\u26A0\uFE0F ${i} of ${t.length} release branches were created successfully.`),s.warn(`\u274C ${p} release(s) failed.`)):s.error(`\u274C All ${t.length} release branches failed to create.`),l.print();let c={createdBranches:o.map(m=>m.branchName),successCount:i,failureCount:p,releases:o,failedReleases:a};return{content:[{type:"text",text:JSON.stringify(c,null,2)}],structuredContent:c}},Rt={name:"release-create-batch",description:'Create several releases in one pass: for each comma-separated version in "versions", cuts the release branch off the appropriate base (dev for regular releases, main for hotfixes), opens a GitHub PR, and creates the Jira fix version. Continues on per-version failure and reports which versions succeeded and which failed. Confirmation is auto-skipped for MCP calls, so the caller is responsible for gating. "versions" is required when invoked via MCP (the interactive input prompt is unreachable without a TTY). Use release-create for a single version with optional checkout.',inputSchema:{versions:b.string().describe('Comma-separated list of versions to create (e.g., "1.2.5, 1.2.6"). Required for MCP calls.'),type:b.enum(["regular","hotfix"]).optional().default("regular").describe('Release type: "regular" or "hotfix" (default: "regular")')},outputSchema:{createdBranches:b.array(b.string()).describe("List of created release branches"),successCount:b.number().describe("Number of releases created successfully"),failureCount:b.number().describe("Number of releases that failed"),releases:b.array(b.object({version:b.string().describe("Version number"),type:b.enum(["regular","hotfix"]).describe("Release type"),branchName:b.string().describe("Release branch name"),prUrl:b.string().describe("GitHub PR URL"),jiraVersionUrl:b.string().describe("Jira version URL")})).describe("Detailed information for each created release with URLs"),failedReleases:b.array(b.object({version:b.string().describe("Version number that failed"),error:b.string().describe("Error message")})).describe("List of releases that failed with error messages")},handler:Ie};import kt from"@inquirer/checkbox";import Ke from"@inquirer/confirm";import xt from"node:process";import{z as _}from"zod";import{$ as z}from"zx";var Ct="feature",Tt="release",$t="release/v",Ae=async e=>{let{confirmedCommand:r,all:t,versions:n,cursor:o,githubDesktop:a}=e;l.start("worktrees-add");try{let i=await N("release"),c=`${await E()}${B}`;await yr(`${c}/${Tt}`),await yr(`${c}/${Ct}`);let m=[];if(n)m=n.split(",").map(k=>`release/v${k.trim()}`);else{let k=await y(),_e=k.map(Je=>Je.branch);if(_e.length===0)return s.info("\u2139\uFE0F No open release branches found"),l.print(),{content:[{type:"text",text:JSON.stringify({createdWorktrees:[],count:0},null,2)}],structuredContent:{createdWorktrees:[],count:0}};if(t)m=_e;else{l.setInteractive();let Je=new Map(k.map(Ze=>[Ze.branch,v(Ze.title)])),Rr=await w();m=await kt({required:!0,message:"\u{1F33F} Select release branches",choices:C({branches:_e,descriptions:Rr,types:Je})})}}t?l.addOption("--all",!0):l.addOption("--versions",m.map(k=>k.replace("release/v","")));let u=r?!0:await Ke({message:"Are you sure you want to proceed with these worktree changes?"});r||l.setInteractive(),u||(s.info("Operation cancelled. Exiting..."),xt.exit(0)),r||l.addOption("--yes",!0);let d=o??await Ke({message:"Open created worktrees in Cursor?"});typeof o>"u"&&l.setInteractive(),d?l.addOption("--cursor",!0):l.addOption("--no-cursor",!0);let f=a??await Ke({message:"Open created worktrees in GitHub Desktop?"});typeof a>"u"&&l.setInteractive(),f?l.addOption("--github-desktop",!0):l.addOption("--no-github-desktop",!0);let{branchesToCreate:g}=Pt({selectedReleaseBranches:m,currentWorktrees:i}),R=await Et(g,c);if(St(R),d)for(let k of R)await z`cursor ${c}/${k}`;if(f)for(let k of R)await z`github ${c}/${k}`,await z`sleep 5`;l.print();let A={createdWorktrees:R,count:R.length};return{content:[{type:"text",text:JSON.stringify(A,null,2)}],structuredContent:A}}catch(i){throw s.error({error:i},"\u274C Error managing worktrees"),i}},yr=async e=>{await z`mkdir -p ${e}`},Pt=e=>{let{selectedReleaseBranches:r,currentWorktrees:t}=e,n=t.filter(a=>a.startsWith($t));return{branchesToCreate:r.filter(a=>!n.includes(a))}},Et=async(e,r)=>{let t=await Promise.allSettled(e.map(async o=>{let a=`${r}/${o}`;return await z`git worktree add ${a} ${o}`,await z({cwd:a})`pnpm install`,o})),n=[];for(let[o,a]of t.entries())if(a.status==="fulfilled")n.push(a.value);else{let i=e[o];s.error({error:a.reason},`\u274C Failed to create worktree for ${i}`)}return n},St=e=>{if(e.length>0){s.info("\u2705 Created git worktrees:");for(let r of e)s.info(r);s.info("")}else s.info("\u2139\uFE0F No new git worktrees to create")},It={name:"worktrees-add",description:'Create local git worktrees for release branches under the worktrees directory and run "pnpm install" in each. Mutates the local filesystem. When invoked via MCP, pass either "versions" (comma-separated) or all=true \u2014 the branch picker and "open in Cursor / GitHub Desktop" follow-up prompts are unreachable without a TTY, and the CLI confirmation is auto-skipped for MCP calls.',inputSchema:{all:_.boolean().optional().describe('Add worktrees for every open release branch. Either "all" or "versions" must be provided for MCP calls (the interactive picker is unavailable without a TTY). Ignored if "versions" is provided.'),versions:_.string().optional().describe('Comma-separated release versions to target (e.g. "1.2.5, 1.2.6"). Either "versions" or all=true must be provided for MCP calls. Overrides "all" when set.'),cursor:_.boolean().optional().describe("Open each created worktree in Cursor. Defaults to false in MCP mode (the follow-up prompt is not shown)."),githubDesktop:_.boolean().optional().describe("Open each created worktree in GitHub Desktop. Defaults to false in MCP mode (the follow-up prompt is not shown).")},outputSchema:{createdWorktrees:_.array(_.string()).describe("List of created git worktree branches"),count:_.number().describe("Number of git worktrees created")},handler:Ae};import{z as K}from"zod";var Ne=async()=>{let e=await N("release");if(e.length===0)return s.info("\u2139\uFE0F No active worktrees found"),{content:[{type:"text",text:JSON.stringify({worktrees:[],count:0},null,2)}],structuredContent:{worktrees:[],count:0}};let[r,t]=await Promise.all([y(),w()]),n=new Map(r.map(c=>[c.branch,v(c.title)])),o=e.map(c=>{let m=c.replace("release/",""),u=n.get(c)||"regular",d=t.get(m)||null;return{version:m,type:u,description:d}}),a=Math.max(...o.map(c=>c.version.length)),i=o.map(c=>{let m=G(c.version,c.type,a);return c.description?`${m} ${c.description}`:m});s.info("\u{1F33F} Active worktrees:"),s.info(`
|
|
38
|
+
${i.join(`
|
|
37
39
|
`)}
|
|
38
|
-
`);let p={worktrees:o,count:o.length};return{content:[{type:"text",text:JSON.stringify(p,null,2)}],structuredContent:p}},Ft={name:"worktrees-list",description:"List all git worktrees with detailed information",inputSchema:{},outputSchema:{worktrees:X.array(X.object({version:X.string().describe("Release version"),type:X.enum(["regular","hotfix"]).describe("Release type"),description:X.string().nullable().describe("Jira version description")})).describe("List of all worktrees with details"),count:X.number().describe("Number of worktrees")},handler:Oe};import Mt from"@inquirer/checkbox";import Wt from"@inquirer/confirm";import qt from"node:process";import{z as ce}from"zod";import{$ as rr}from"zx";var _e=async e=>{let{confirmedCommand:r,all:t,versions:n}=e;l.start("worktrees-remove");try{let o=await D("release");if(o.length===0)return s.info("\u2139\uFE0F No active worktrees to remove"),l.print(),{content:[{type:"text",text:JSON.stringify({removedWorktrees:[],count:0},null,2)}],structuredContent:{removedWorktrees:[],count:0}};let a=`${await $()}${W}`,p=[];if(t)p=o;else if(n)p=n.split(",").map(f=>`release/v${f.trim()}`);else{l.setInteractive();let[f,g]=await Promise.all([w(),y()]),R=new Map(g.map(T=>[T.branch,v(T.title)]));p=await Mt({required:!0,message:"\u{1F33F} Select release branches",choices:x({branches:o,descriptions:f,types:R})})}p.length===o.length?l.addOption("--all",!0):l.addOption("--versions",p.map(f=>f.replace("release/v","")));let m=r?!0:await Wt({message:"Are you sure you want to proceed with these worktree changes?"});r||l.setInteractive(),m||(s.info("Operation cancelled. Exiting..."),qt.exit(0)),r||l.addOption("--yes",!0);let u=await Ut(p,a);Gt(u),l.print();let d={removedWorktrees:u,count:u.length};return{content:[{type:"text",text:JSON.stringify(d,null,2)}],structuredContent:d}}catch(o){throw s.error({error:o},"\u274C Error managing worktrees"),o}},Ut=async(e,r)=>{let t=await Promise.allSettled(e.map(async o=>{let i=`${r}/${o}`;return await rr`git worktree remove ${i}`,o})),n=[];for(let[o,i]of t.entries())if(i.status==="fulfilled")n.push(i.value);else{let a=e[o];s.error({error:i.reason},`\u274C Failed to remove worktree for ${a}`)}return n.length===e.length&&(await rr`git worktree prune`,await rr`rm -rf ${r}`,s.info(`\u{1F5D1}\uFE0F Removed worktree folder: ${r}`),s.info("")),n},Gt=e=>{if(e.length>0){s.info("\u274C Removed worktrees:");for(let r of e)s.info(r);s.info("")}else s.info("\u2139\uFE0F No unused worktrees to remove")},zt={name:"worktrees-remove",description:"Remove selected worktrees",inputSchema:{all:ce.boolean().describe("Remove all git worktrees without prompting"),versions:ce.string().optional().describe("Specify versions by comma, e.g. 1.2.5, 1.2.6")},outputSchema:{removedWorktrees:ce.array(ce.string()).describe("List of removed git worktree branches"),count:ce.number().describe("Number of git worktrees removed")},handler:_e};import Kt from"@inquirer/confirm";import Ht from"node:process";import{z as tr}from"zod";import{$ as Xt}from"zx";var Yt="release/v",Je=async e=>{let{confirmedCommand:r}=e;l.start("worktrees-sync");try{let t=await D("release"),o=`${await $()}${W}`,i=await xe(),a=r?!0:await Kt({message:"Are you sure you want to proceed with these worktree changes?"});r||l.setInteractive(),a||(s.info("Operation cancelled. Exiting..."),Ht.exit(0)),r||l.addOption("--yes",!0);let{branchesToRemove:p}=Zt({releasePRsList:i,currentWorktrees:t}),c=await Qt(p,o);eo(c),l.print();let m={removedWorktrees:c,count:c.length};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}}catch(t){throw s.error({error:t},"\u274C Error managing worktrees"),t}},Zt=e=>{let{releasePRsList:r,currentWorktrees:t}=e;return{branchesToRemove:t.filter(i=>i.startsWith(Yt)).filter(i=>!r.includes(i))}},Qt=async(e,r)=>{let t=[];for(let n of e)try{let o=`${r}/${n}`;await Xt`git worktree remove ${o}`,t.push(n)}catch(o){s.error({error:o,branch:n},`\u274C Failed to remove worktree for ${n}`)}return t},eo=e=>{if(e.length>0){s.info("\u274C Removed worktrees:");for(let r of e)s.info(r);s.info("")}else s.info("\u2139\uFE0F No unused worktrees to remove")},ro={name:"worktrees-sync",description:"Synchronize worktrees with active release branches",inputSchema:{},outputSchema:{removedWorktrees:tr.array(tr.string()).describe("List of removed worktree branches"),count:tr.number().describe("Number of worktrees removed during sync")},handler:Je};var h=new oo;h.command("merge-dev").description("Merge dev branch into every release branch").option("-a, --all","Select all active release branches").option("-y, --yes","Skip confirmation prompt").action(async e=>{await Te({all:e.all,confirmedCommand:e.yes})});h.command("release-list").description("List all release branches").action(async()=>{await Ie()});h.command("release-create").description("Create a single release branch").option("-v, --version <version>","Specify the version to create, e.g. 1.2.5").option("-d, --description <description>","Optional description for the Jira version").addOption(new Cr("-t, --type <type>","Release type (default: regular)").choices(["regular","hotfix"])).option("-y, --yes","Skip confirmation prompt").option("--no-checkout","Do not checkout the created branch after creation (checkout is default)").action(async e=>{await Pe({version:e.version,description:e.description,type:e.type,confirmedCommand:e.yes,checkout:e.checkout})});h.command("release-create-batch").description("Create multiple release branches (batch operation)").option("-v, --versions <versions>","Specify the versions to create by comma, e.g. 1.2.5, 1.2.6").addOption(new Cr("-t, --type <type>","Release type (default: regular)").choices(["regular","hotfix"])).option("-y, --yes","Skip confirmation prompt").action(async e=>{await Ne({versions:e.versions,type:e.type,confirmedCommand:e.yes})});h.command("release-deploy-all").description("Deploy any release branch to any environment").option("-v, --version <version>","Specify the version to deploy, e.g. 1.2.5").option("-e, --env <env>","Specify the environment to deploy to, e.g. dev").option("--skip-terraform","Skip terraform deployment step").action(async e=>{await Se({version:e.version,env:e.env,skipTerraform:e.skipTerraform})});h.command("release-deploy-service").description("Deploy specific service in release branch to any environment").option("-v, --version <version>","Specify the version to deploy, e.g. 1.2.5").option("-e, --env <env>","Specify the environment to deploy to, e.g. dev").option("-s, --service <service>","Specify the service to deploy, e.g. client-be").option("--skip-terraform","Skip terraform deployment step").action(async e=>{await Ee({version:e.version,env:e.env,service:e.service,skipTerraform:e.skipTerraform})});h.command("release-deploy-selected").description("Deploy selected services from release branch to any environment").option("-v, --version <version>","Specify the version to deploy, e.g. 1.2.5").option("-e, --env <env>","Specify the environment to deploy to, e.g. dev").option("-s, --services <services...>","Specify services to deploy, e.g. client-be client-fe").option("--skip-terraform","Skip terraform deployment step").action(async e=>{await $e({version:e.version,env:e.env,services:e.services,skipTerraform:e.skipTerraform})});h.command("release-deliver").description("Release a new version to production").option("-v, --version <version>","Specify the version to release, e.g. 1.2.5").option("-y, --yes","Skip confirmation prompt").action(async e=>{await Ce({version:e.version,confirmedCommand:e.yes})});h.command("worktrees-sync").description("Remove release worktrees whose PRs are no longer open").option("-y, --yes","Skip confirmation prompt").action(async e=>{await Je({confirmedCommand:e.yes})});h.command("worktrees-add").description("Add git worktrees for release branches").option("-y, --yes","Skip confirmation prompt").option("-a, --all","Select all active release branches").option("-v, --versions <versions>","Specify versions by comma, e.g. 1.2.5, 1.2.6").option("-c, --cursor","Open created worktrees in Cursor").option("--no-cursor","Skip Cursor prompt").option("-g, --github-desktop","Open created worktrees in GitHub Desktop").option("--no-github-desktop","Skip GitHub Desktop prompt").action(async e=>{await De({confirmedCommand:e.yes,all:e.all,versions:e.versions,cursor:e.cursor,githubDesktop:e.githubDesktop})});h.command("worktrees-list").description("List all git worktrees with detailed information").action(async()=>{await Oe()});h.command("worktrees-remove").description("Remove git worktrees for release branches").option("-y, --yes","Skip confirmation prompt").option("-a, --all","Select all active release branches").option("-v, --versions <versions>","Specify versions by comma, e.g. 1.2.5, 1.2.6").action(async e=>{await _e({confirmedCommand:e.yes,all:e.all,versions:e.versions})});h.command("doctor").description("Check installation and authentication status of gh and doppler CLIs").action(async()=>{await pe()});h.command("env-status").description("Show Doppler authentication status and detected project info").action(async()=>{await ve()});h.command("env-list").description("List available Doppler configs for the detected project").action(async()=>{await ge()});h.command("init").description("Inject shell integration into your profile .zshrc").action(async()=>{await Ze()});h.command("env-load").description("Load Doppler env vars for a config. Source the returned file path to apply.").option("-c, --config <config>","Environment config name to load (e.g. dev, arthur)").action(async e=>{await he({config:e.config})});h.command("env-clear").description("Clear loaded env vars. Source the returned file path to apply.").action(async()=>{await fe()});if(Tr.argv.length<=2){let e=["merge-dev","release-list","release-create","release-create-batch","release-deploy-all","release-deploy-service","release-deploy-selected","release-deliver"],r=["worktrees-add","worktrees-list","worktrees-remove","worktrees-sync"],t=["doctor","init","env-status","env-list","env-load","env-clear"],n=new Map(h.commands.map(c=>[c.name(),c])),o=[...e,...r,...t],i=Math.max(...o.map(c=>c.length)),a=c=>c.filter(m=>n.has(m)).map(m=>({name:`${m.padEnd(i)} ${n.get(m).description()}`,value:m})),p=await to({message:"Select a command to run",choices:[new Y(" "),new Y("\u2014 Release Management \u2014"),...a(e),new Y(" "),new Y("\u2014 Worktrees \u2014"),...a(r),new Y(" "),new Y("\u2014 Environment \u2014"),...a(t)]},{output:Tr.stderr});h.parse(["node","infra-kit",p])}else h.parse();
|
|
40
|
+
`);let p={worktrees:o,count:o.length};return{content:[{type:"text",text:JSON.stringify(p,null,2)}],structuredContent:p}},At={name:"worktrees-list",description:"List existing release-branch worktrees with version, release type (regular / hotfix), and Jira fix-version description. Read-only.",inputSchema:{},outputSchema:{worktrees:K.array(K.object({version:K.string().describe("Release version"),type:K.enum(["regular","hotfix"]).describe("Release type"),description:K.string().nullable().describe("Jira version description")})).describe("List of all worktrees with details"),count:K.number().describe("Number of worktrees")},handler:Ne};import Nt from"@inquirer/checkbox";import Ot from"@inquirer/confirm";import Dt from"node:process";import{z as ae}from"zod";import{$ as Ye}from"zx";var Oe=async e=>{let{confirmedCommand:r,all:t,versions:n}=e;l.start("worktrees-remove");try{let o=await N("release");if(o.length===0)return s.info("\u2139\uFE0F No active worktrees to remove"),l.print(),{content:[{type:"text",text:JSON.stringify({removedWorktrees:[],count:0},null,2)}],structuredContent:{removedWorktrees:[],count:0}};let i=`${await E()}${B}`,p=[];if(t)p=o;else if(n)p=n.split(",").map(f=>`release/v${f.trim()}`);else{l.setInteractive();let[f,g]=await Promise.all([w(),y()]),R=new Map(g.map(A=>[A.branch,v(A.title)]));p=await Nt({required:!0,message:"\u{1F33F} Select release branches",choices:C({branches:o,descriptions:f,types:R})})}p.length===o.length?l.addOption("--all",!0):l.addOption("--versions",p.map(f=>f.replace("release/v","")));let m=r?!0:await Ot({message:"Are you sure you want to proceed with these worktree changes?"});r||l.setInteractive(),m||(s.info("Operation cancelled. Exiting..."),Dt.exit(0)),r||l.addOption("--yes",!0);let u=await _t(p,i);Jt(u),l.print();let d={removedWorktrees:u,count:u.length};return{content:[{type:"text",text:JSON.stringify(d,null,2)}],structuredContent:d}}catch(o){throw s.error({error:o},"\u274C Error managing worktrees"),o}},_t=async(e,r)=>{let t=await Promise.allSettled(e.map(async o=>{let a=`${r}/${o}`;return await Ye`git worktree remove ${a}`,o})),n=[];for(let[o,a]of t.entries())if(a.status==="fulfilled")n.push(a.value);else{let i=e[o];s.error({error:a.reason},`\u274C Failed to remove worktree for ${i}`)}return n.length===e.length&&(await Ye`git worktree prune`,await Ye`rm -rf ${r}`,s.info(`\u{1F5D1}\uFE0F Removed worktree folder: ${r}`),s.info("")),n},Jt=e=>{if(e.length>0){s.info("\u274C Removed worktrees:");for(let r of e)s.info(r);s.info("")}else s.info("\u2139\uFE0F No unused worktrees to remove")},Lt={name:"worktrees-remove",description:'Remove local git worktrees for release branches. When everything is removed, also runs "git worktree prune" and deletes the worktrees directory. When invoked via MCP, pass either "versions" (comma-separated) or all=true \u2014 the branch picker is unreachable without a TTY, and the CLI confirmation is auto-skipped for MCP calls, so the caller is responsible for gating.',inputSchema:{all:ae.boolean().optional().describe('Remove every existing worktree. Either "all" or "versions" must be provided for MCP calls (the interactive picker is unavailable without a TTY). Ignored if "versions" is provided.'),versions:ae.string().optional().describe('Comma-separated release versions to target (e.g. "1.2.5, 1.2.6"). Either "versions" or all=true must be provided for MCP calls. Overrides "all" when set.')},outputSchema:{removedWorktrees:ae.array(ae.string()).describe("List of removed git worktree branches"),count:ae.number().describe("Number of git worktrees removed")},handler:Oe};import jt from"@inquirer/confirm";import Mt from"node:process";import{z as Xe}from"zod";import{$ as Vt}from"zx";var Ft="release/v",De=async e=>{let{confirmedCommand:r}=e;l.start("worktrees-sync");try{let t=await N("release"),o=`${await E()}${B}`,a=await ke(),i=r?!0:await jt({message:"Are you sure you want to proceed with these worktree changes?"});r||l.setInteractive(),i||(s.info("Operation cancelled. Exiting..."),Mt.exit(0)),r||l.addOption("--yes",!0);let{branchesToRemove:p}=Bt({releasePRsList:a,currentWorktrees:t}),c=await Wt(p,o);qt(c),l.print();let m={removedWorktrees:c,count:c.length};return{content:[{type:"text",text:JSON.stringify(m,null,2)}],structuredContent:m}}catch(t){throw s.error({error:t},"\u274C Error managing worktrees"),t}},Bt=e=>{let{releasePRsList:r,currentWorktrees:t}=e;return{branchesToRemove:t.filter(a=>a.startsWith(Ft)).filter(a=>!r.includes(a))}},Wt=async(e,r)=>{let t=[];for(let n of e)try{let o=`${r}/${n}`;await Vt`git worktree remove ${o}`,t.push(n)}catch(o){s.error({error:o,branch:n},`\u274C Failed to remove worktree for ${n}`)}return t},qt=e=>{if(e.length>0){s.info("\u274C Removed worktrees:");for(let r of e)s.info(r);s.info("")}else s.info("\u2139\uFE0F No unused worktrees to remove")},Gt={name:"worktrees-sync",description:"Remove worktrees whose release PR is no longer open (stale cleanup). Only removes \u2014 never creates; use worktrees-add to create worktrees for new releases. The CLI confirmation is auto-skipped for MCP calls, so the caller is responsible for gating.",inputSchema:{},outputSchema:{removedWorktrees:Xe.array(Xe.string()).describe("List of removed worktree branches"),count:Xe.number().describe("Number of worktrees removed during sync")},handler:De};var h=new Ht;h.command("merge-dev").description("Merge dev branch into every release branch").option("-a, --all","Select all active release branches").option("-y, --yes","Skip confirmation prompt").action(async e=>{await xe({all:e.all,confirmedCommand:e.yes})});h.command("release-list").description("List all release branches").action(async()=>{await Pe()});h.command("release-create").description("Create a single release branch").option("-v, --version <version>","Specify the version to create, e.g. 1.2.5").option("-d, --description <description>","Optional description for the Jira version").addOption(new br("-t, --type <type>","Release type (default: regular)").choices(["regular","hotfix"])).option("-y, --yes","Skip confirmation prompt").option("--no-checkout","Do not checkout the created branch after creation (checkout is default)").action(async e=>{await Se({version:e.version,description:e.description,type:e.type,confirmedCommand:e.yes,checkout:e.checkout})});h.command("release-create-batch").description("Create multiple release branches (batch operation)").option("-v, --versions <versions>","Specify the versions to create by comma, e.g. 1.2.5, 1.2.6").addOption(new br("-t, --type <type>","Release type (default: regular)").choices(["regular","hotfix"])).option("-y, --yes","Skip confirmation prompt").action(async e=>{await Ie({versions:e.versions,type:e.type,confirmedCommand:e.yes})});h.command("release-deploy-all").description("Deploy any release branch to any environment").option("-v, --version <version>","Specify the version to deploy, e.g. 1.2.5").option("-e, --env <env>","Specify the environment to deploy to, e.g. dev").option("--skip-terraform","Skip terraform deployment step").action(async e=>{await Te({version:e.version,env:e.env,skipTerraform:e.skipTerraform})});h.command("release-deploy-selected").description("Deploy selected services from release branch to any environment").option("-v, --version <version>","Specify the version to deploy, e.g. 1.2.5").option("-e, --env <env>","Specify the environment to deploy to, e.g. dev").option("-s, --services <services...>","Specify services to deploy, e.g. client-be client-fe").option("--skip-terraform","Skip terraform deployment step").action(async e=>{await $e({version:e.version,env:e.env,services:e.services,skipTerraform:e.skipTerraform})});h.command("release-deliver").description("Release a new version to production").option("-v, --version <version>","Specify the version to release, e.g. 1.2.5").option("-y, --yes","Skip confirmation prompt").action(async e=>{await Ce({version:e.version,confirmedCommand:e.yes})});h.command("worktrees-sync").description("Remove release worktrees whose PRs are no longer open").option("-y, --yes","Skip confirmation prompt").action(async e=>{await De({confirmedCommand:e.yes})});h.command("worktrees-add").description("Add git worktrees for release branches").option("-y, --yes","Skip confirmation prompt").option("-a, --all","Select all active release branches").option("-v, --versions <versions>","Specify versions by comma, e.g. 1.2.5, 1.2.6").option("-c, --cursor","Open created worktrees in Cursor").option("--no-cursor","Skip Cursor prompt").option("-g, --github-desktop","Open created worktrees in GitHub Desktop").option("--no-github-desktop","Skip GitHub Desktop prompt").action(async e=>{await Ae({confirmedCommand:e.yes,all:e.all,versions:e.versions,cursor:e.cursor,githubDesktop:e.githubDesktop})});h.command("worktrees-list").description("List all git worktrees with detailed information").action(async()=>{await Ne()});h.command("worktrees-remove").description("Remove git worktrees for release branches").option("-y, --yes","Skip confirmation prompt").option("-a, --all","Select all active release branches").option("-v, --versions <versions>","Specify versions by comma, e.g. 1.2.5, 1.2.6").action(async e=>{await Oe({confirmedCommand:e.yes,all:e.all,versions:e.versions})});h.command("doctor").description("Check installation and authentication status of gh and doppler CLIs").action(async()=>{await le()});h.command("env-status").description("Show Doppler authentication status and detected project info").action(async()=>{await ge()});h.command("env-list").description("List available Doppler configs for the detected project").action(async()=>{await fe()});h.command("init").description("Inject shell integration into your profile .zshrc").action(async()=>{await He()});h.command("env-load").description("Load Doppler env vars for a config. Source the returned file path to apply.").option("-c, --config <config>","Environment config name to load (e.g. dev, arthur)").action(async e=>{await he({config:e.config})});h.command("env-clear").description("Clear loaded env vars. Source the returned file path to apply.").action(async()=>{await de()});if(wr.argv.length<=2){let e=["merge-dev","release-list","release-create","release-create-batch","release-deploy-all","release-deploy-selected","release-deliver"],r=["worktrees-add","worktrees-list","worktrees-remove","worktrees-sync"],t=["doctor","init","env-status","env-list","env-load","env-clear"],n=new Map(h.commands.map(c=>[c.name(),c])),o=[...e,...r,...t],a=Math.max(...o.map(c=>c.length)),i=c=>c.filter(m=>n.has(m)).map(m=>({name:`${m.padEnd(a)} ${n.get(m).description()}`,value:m})),p=await Ut({message:"Select a command to run",choices:[new Y(" "),new Y("\u2014 Release Management \u2014"),...i(e),new Y(" "),new Y("\u2014 Worktrees \u2014"),...i(r),new Y(" "),new Y("\u2014 Environment \u2014"),...i(t)]},{output:wr.stderr});h.parse(["node","infra-kit",p])}else h.parse();
|
|
39
41
|
//# sourceMappingURL=cli.js.map
|