@studiometa/forge-cli 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -15
- package/dist/cli.js +421 -152
- package/dist/cli.js.map +1 -1
- package/dist/commands/backups/command.d.ts.map +1 -1
- package/dist/commands/backups/handlers.d.ts +1 -0
- package/dist/commands/backups/handlers.d.ts.map +1 -1
- package/dist/commands/backups/help.d.ts.map +1 -1
- package/dist/commands/certificates/command.d.ts.map +1 -1
- package/dist/commands/certificates/handlers.d.ts +0 -1
- package/dist/commands/certificates/handlers.d.ts.map +1 -1
- package/dist/commands/certificates/help.d.ts.map +1 -1
- package/dist/commands/commands/handlers.d.ts.map +1 -1
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/daemons/command.d.ts.map +1 -1
- package/dist/commands/daemons/handlers.d.ts +1 -0
- package/dist/commands/daemons/handlers.d.ts.map +1 -1
- package/dist/commands/daemons/help.d.ts.map +1 -1
- package/dist/commands/database-users/command.d.ts.map +1 -1
- package/dist/commands/database-users/handlers.d.ts +1 -0
- package/dist/commands/database-users/handlers.d.ts.map +1 -1
- package/dist/commands/database-users/help.d.ts.map +1 -1
- package/dist/commands/deployments/handlers.d.ts.map +1 -1
- package/dist/commands/deployments/help.d.ts.map +1 -1
- package/dist/commands/monitors/handlers.d.ts.map +1 -1
- package/dist/commands/recipes/command.d.ts.map +1 -1
- package/dist/commands/recipes/handlers.d.ts +1 -0
- package/dist/commands/recipes/handlers.d.ts.map +1 -1
- package/dist/commands/recipes/help.d.ts.map +1 -1
- package/dist/commands/redirect-rules/handlers.d.ts.map +1 -1
- package/dist/commands/scheduled-jobs/handlers.d.ts.map +1 -1
- package/dist/commands/security-rules/command.d.ts.map +1 -1
- package/dist/commands/security-rules/handlers.d.ts +1 -0
- package/dist/commands/security-rules/handlers.d.ts.map +1 -1
- package/dist/commands/security-rules/help.d.ts.map +1 -1
- package/dist/commands/sites/command.d.ts.map +1 -1
- package/dist/commands/sites/handlers.d.ts +1 -0
- package/dist/commands/sites/handlers.d.ts.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/{error-handler-Byuujxh1.js → error-handler-ByMitiOr.js} +21 -10
- package/dist/error-handler-ByMitiOr.js.map +1 -0
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/output.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/args.d.ts +1 -0
- package/dist/utils/args.d.ts.map +1 -1
- package/dist/utils/command-router.d.ts.map +1 -1
- package/dist/utils/resolve.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/error-handler-Byuujxh1.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/command.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB,6GAW/B,CAAC"}
|
|
@@ -2,5 +2,6 @@ import type { CommandContext } from "../../context.ts";
|
|
|
2
2
|
export declare function backupsList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function backupsGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
4
|
export declare function backupsCreate(ctx: CommandContext): Promise<void>;
|
|
5
|
+
export declare function backupsUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
6
|
export declare function backupsDelete(args: string[], ctx: CommandContext): Promise<void>;
|
|
6
7
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/handlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCnF;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6CtE;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA+EtF;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/backups/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAmFzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,6GAOpC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CommandContext } from "../../context.ts";
|
|
2
|
-
export declare function certificatesList(ctx: CommandContext): Promise<void>;
|
|
3
2
|
export declare function certificatesGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
3
|
export declare function certificatesActivate(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
4
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA0BvD,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBxF;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/certificates/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAyC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/commands/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBrE;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/commands/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBrE;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBpF;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;GAEG;AAypBH,wBAAgB,kBAAkB,IAAI,IAAI,CA2CzC;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAM,GACxD,IAAI,CAoEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAcH,wBAAgB,cAAc,IAAI,IAAI,CAsBrC;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,GACnD,IAAI,CAwEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,6GAU/B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CommandContext } from "../../context.ts";
|
|
2
2
|
export declare function daemonsList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function daemonsGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
|
+
export declare function daemonsUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
5
|
export declare function daemonsRestart(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
6
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCnF;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BvF"}
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBpE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCnF;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAgDtF;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/daemons/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAiDzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/command.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,6GAWrC,CAAC"}
|
|
@@ -2,5 +2,6 @@ import type { CommandContext } from "../../context.ts";
|
|
|
2
2
|
export declare function databaseUsersList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function databaseUsersGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
4
|
export declare function databaseUsersCreate(ctx: CommandContext): Promise<void>;
|
|
5
|
+
export declare function databaseUsersUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
6
|
export declare function databaseUsersDelete(args: string[], ctx: CommandContext): Promise<void>;
|
|
6
7
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/handlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BzF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C5E;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA0C5F;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/database-users/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CA0E/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/deployments/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCxE;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/deployments/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkCxE;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAgE1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/deployments/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/deployments/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAgD7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/monitors/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBrE;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCpF;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/monitors/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,YAAY,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBrE;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCpF;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDvE;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,6GAU/B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CommandContext } from "../../context.ts";
|
|
2
2
|
export declare function recipesList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function recipesGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
|
+
export declare function recipesUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
5
|
export declare function recipesRun(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
6
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAYpE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAanF;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BnF"}
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,wBAAsB,WAAW,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAYpE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAanF;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBtF;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2BnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAwDzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/redirect-rules/handlers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/redirect-rules/handlers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5E;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/scheduled-jobs/handlers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/scheduled-jobs/handlers.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA0B1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqCzF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C5E;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA6B5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/command.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,6GAWrC,CAAC"}
|
|
@@ -2,5 +2,6 @@ import type { CommandContext } from "../../context.ts";
|
|
|
2
2
|
export declare function securityRulesList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function securityRulesGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
4
|
export declare function securityRulesCreate(ctx: CommandContext): Promise<void>;
|
|
5
|
+
export declare function securityRulesUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
5
6
|
export declare function securityRulesDelete(args: string[], ctx: CommandContext): Promise<void>;
|
|
6
7
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/handlers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB5E;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5F;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/security-rules/help.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CA2E/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/command.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,6GAQ7B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommandContext } from "../../context.ts";
|
|
2
2
|
export declare function sitesList(ctx: CommandContext): Promise<void>;
|
|
3
3
|
export declare function sitesGet(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
|
+
export declare function sitesUpdate(args: string[], ctx: CommandContext): Promise<void>;
|
|
4
5
|
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBlE;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/commands/sites/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,wBAAsB,SAAS,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBlE;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCjF;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDpF"}
|
package/dist/config.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export interface ForgeCliConfig {
|
|
|
14
14
|
* Resolve config from multiple sources with priority order.
|
|
15
15
|
*/
|
|
16
16
|
export declare function getConfig(cliOptions?: Record<string, string | boolean | string[]>): ForgeCliConfig;
|
|
17
|
-
export { createConfigStore, getToken, setToken, deleteToken } from "@studiometa/forge-api";
|
|
17
|
+
export { createConfigStore, getToken, setToken, deleteToken, getOrganizationSlug, setOrganizationSlug, } from "@studiometa/forge-api";
|
|
18
18
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,GACvD,cAAc,CAUhB;AAED,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,GACvD,cAAc,CAUhB;AAED,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC"}
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,sBAAsB;IACtB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC;IACtD,iDAAiD;IACjD,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,cAAmB,GAAG,cAAc,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,sBAAsB;IACtB,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAAC;IACtD,iDAAiD;IACjD,QAAQ,IAAI,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,cAAmB,GAAG,cAAc,CAiC1E;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE;IAC3C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,cAAc,CA0BjB"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { HttpClient, createConfigStore, createConfigStore as createConfigStore$1, deleteToken, getToken, getToken as getToken$1, setToken } from "@studiometa/forge-api";
|
|
1
|
+
import { HttpClient, createConfigStore, createConfigStore as createConfigStore$1, deleteToken, getOrganizationSlug, getToken, getToken as getToken$1, setOrganizationSlug, setToken } from "@studiometa/forge-api";
|
|
2
|
+
function isOutputFormat(value) {
|
|
3
|
+
return value === "json" || value === "human" || value === "table";
|
|
4
|
+
}
|
|
2
5
|
/**
|
|
3
6
|
* Error types for forge.
|
|
4
7
|
*
|
|
@@ -76,8 +79,8 @@ var ApiError = class ApiError extends CliError {
|
|
|
76
79
|
}
|
|
77
80
|
static fromForgeError(error) {
|
|
78
81
|
if (error instanceof Error && "statusCode" in error) {
|
|
79
|
-
const
|
|
80
|
-
return new ApiError(
|
|
82
|
+
const code = error.statusCode;
|
|
83
|
+
return new ApiError(error.message, typeof code === "number" ? code : void 0, void 0, error);
|
|
81
84
|
}
|
|
82
85
|
if (error instanceof Error) return new ApiError(error.message, void 0, void 0, error);
|
|
83
86
|
return new ApiError(String(error));
|
|
@@ -291,11 +294,15 @@ var OutputFormatter = class {
|
|
|
291
294
|
* Creates a command context from CLI options.
|
|
292
295
|
*/
|
|
293
296
|
function createContext(options = {}) {
|
|
297
|
+
const rawFormat = options.format ?? options.f ?? "human";
|
|
294
298
|
return {
|
|
295
|
-
formatter: new OutputFormatter(
|
|
299
|
+
formatter: new OutputFormatter(isOutputFormat(rawFormat) ? rawFormat : "human", options["no-color"] === true),
|
|
296
300
|
options,
|
|
297
301
|
createExecutorContext(token) {
|
|
298
|
-
return {
|
|
302
|
+
return {
|
|
303
|
+
client: new HttpClient({ token }),
|
|
304
|
+
organizationSlug: typeof options.org === "string" && options.org || getOrganizationSlug(createConfigStore$1()) || void 0
|
|
305
|
+
};
|
|
299
306
|
},
|
|
300
307
|
getToken() {
|
|
301
308
|
if (typeof options.token === "string" && options.token) return options.token;
|
|
@@ -320,13 +327,17 @@ function createTestContext(overrides) {
|
|
|
320
327
|
format: "json",
|
|
321
328
|
"no-color": true
|
|
322
329
|
};
|
|
323
|
-
const
|
|
330
|
+
const rawFormat = opts.format ?? "json";
|
|
331
|
+
const format = isOutputFormat(rawFormat) ? rawFormat : "json";
|
|
324
332
|
return {
|
|
325
333
|
formatter: overrides.formatter ?? new OutputFormatter(format, true),
|
|
326
334
|
options: opts,
|
|
327
335
|
createExecutorContext(_token) {
|
|
328
336
|
if (!overrides.mockClient) throw new Error("createTestContext: provide mockClient to use createExecutorContext in tests");
|
|
329
|
-
return {
|
|
337
|
+
return {
|
|
338
|
+
client: overrides.mockClient,
|
|
339
|
+
organizationSlug: "test-org"
|
|
340
|
+
};
|
|
330
341
|
},
|
|
331
342
|
getToken() {
|
|
332
343
|
if (overrides.token) return overrides.token;
|
|
@@ -366,7 +377,7 @@ function handleError(error, formatter, options) {
|
|
|
366
377
|
let cliError;
|
|
367
378
|
if (isCliError(error)) cliError = error;
|
|
368
379
|
else cliError = ApiError.fromForgeError(error);
|
|
369
|
-
if (formatter.
|
|
380
|
+
if (formatter.isJson()) formatter.output(cliError.toJSON());
|
|
370
381
|
else formatter.error(cliError.toFormattedMessage());
|
|
371
382
|
const exitCode = getExitCode(cliError);
|
|
372
383
|
if (shouldExit) process.exit(exitCode);
|
|
@@ -391,6 +402,6 @@ function exitWithValidationError(field, usage, formatter) {
|
|
|
391
402
|
handleError(error, formatter);
|
|
392
403
|
throw error;
|
|
393
404
|
}
|
|
394
|
-
export {
|
|
405
|
+
export { isOutputFormat as S, ApiError as _, createContext as a, ValidationError as b, colors as c, deleteToken as d, getConfig as f, setToken as g, setOrganizationSlug as h, runCommand as i, setColorEnabled as l, getToken$1 as m, exitWithValidationError as n, createTestContext as o, getOrganizationSlug as p, handleError as r, OutputFormatter as s, ExitCode as t, createConfigStore$1 as u, CliError as v, isCliError as x, ConfigError as y };
|
|
395
406
|
|
|
396
|
-
//# sourceMappingURL=error-handler-
|
|
407
|
+
//# sourceMappingURL=error-handler-ByMitiOr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler-ByMitiOr.js","names":[],"sources":["../src/types.ts","../src/errors.ts","../src/config.ts","../src/utils/colors.ts","../src/output.ts","../src/context.ts","../src/error-handler.ts"],"sourcesContent":["// CLI-specific types for forge\n\nexport type OutputFormat = \"json\" | \"human\" | \"table\";\n\nexport function isOutputFormat(value: unknown): value is OutputFormat {\n return value === \"json\" || value === \"human\" || value === \"table\";\n}\n\nexport interface CliOptions {\n format?: OutputFormat;\n quiet?: boolean;\n noColor?: boolean;\n}\n","/**\n * Error types for forge.\n *\n * Provides specific error types for different failure scenarios with\n * recovery hints for both humans and AI agents.\n */\n\n/**\n * Base error class for all CLI errors.\n */\nexport abstract class CliError extends Error {\n abstract readonly code: string;\n abstract readonly isRecoverable: boolean;\n\n constructor(\n message: string,\n public readonly hints?: string[],\n public readonly cause?: unknown,\n ) {\n super(message);\n this.name = this.constructor.name;\n\n Error.captureStackTrace?.(this, this.constructor);\n }\n\n toJSON(): Record<string, unknown> {\n return {\n error: this.code,\n name: this.name,\n message: this.message,\n isRecoverable: this.isRecoverable,\n ...(this.hints && this.hints.length > 0 ? { hints: this.hints } : {}),\n ...(this.cause instanceof Error ? { cause: { message: this.cause.message } } : {}),\n };\n }\n\n toFormattedMessage(): string {\n let msg = this.message;\n if (this.hints && this.hints.length > 0) {\n msg += \"\\n\\nHints:\\n\" + this.hints.map((h) => ` • ${h}`).join(\"\\n\");\n }\n return msg;\n }\n}\n\n// ── Config Errors ────────────────────────────────────\n\nexport class ConfigError extends CliError {\n readonly code = \"CONFIG_ERROR\";\n readonly isRecoverable = true;\n\n static missingToken(): ConfigError {\n return new ConfigError(\"API token not configured\", [\n \"Set via CLI flag: --token <token>\",\n \"Set via environment: export FORGE_API_TOKEN=<token>\",\n \"Set via config: forge config set YOUR_TOKEN\",\n ]);\n }\n}\n\n// ── Validation Errors ────────────────────────────────\n\nexport class ValidationError extends CliError {\n readonly code = \"VALIDATION_ERROR\";\n readonly isRecoverable = true;\n\n constructor(\n message: string,\n public readonly field?: string,\n hints?: string[],\n cause?: unknown,\n ) {\n super(message, hints, cause);\n }\n\n override toJSON() {\n return { ...super.toJSON(), field: this.field };\n }\n\n static required(field: string, hints?: string[]): ValidationError {\n return new ValidationError(`${field} is required`, field, hints);\n }\n}\n\n// ── API Errors ───────────────────────────────────────\n\nexport class ApiError extends CliError {\n readonly code = \"API_ERROR\";\n readonly isRecoverable: boolean;\n\n constructor(\n message: string,\n public readonly statusCode?: number,\n hints?: string[],\n cause?: unknown,\n ) {\n super(message, hints ?? getApiErrorHints(statusCode), cause);\n this.isRecoverable = statusCode === undefined || (statusCode >= 500 && statusCode < 600);\n }\n\n override toJSON() {\n return { ...super.toJSON(), statusCode: this.statusCode };\n }\n\n static fromForgeError(error: unknown): ApiError {\n if (error instanceof Error && \"statusCode\" in error) {\n const code = (error as { statusCode: unknown }).statusCode;\n return new ApiError(\n error.message,\n typeof code === \"number\" ? code : undefined,\n undefined,\n error,\n );\n }\n if (error instanceof Error) {\n return new ApiError(error.message, undefined, undefined, error);\n }\n return new ApiError(String(error));\n }\n}\n\nfunction getApiErrorHints(statusCode?: number): string[] {\n if (statusCode === 401) {\n return [\"Check that your API token is valid\", \"Set via: export FORGE_API_TOKEN=<token>\"];\n }\n if (statusCode === 403) {\n return [\"You may not have permission to access this resource\"];\n }\n if (statusCode === 404) {\n return [\n \"The resource may not exist\",\n \"Verify the ID is correct\",\n \"Use the list command to find valid IDs\",\n ];\n }\n if (statusCode === 429) {\n return [\"Too many requests — wait before retrying\"];\n }\n if (statusCode !== undefined && statusCode >= 500) {\n return [\"Server error — try again later\"];\n }\n return [];\n}\n\n// ── Type Guards ──────────────────────────────────────\n\nexport function isCliError(error: unknown): error is CliError {\n return error instanceof CliError;\n}\n","/**\n * Config loading for forge.\n *\n * Resolution priority (highest to lowest):\n * 1. CLI arguments (--token)\n * 2. Environment variable (FORGE_API_TOKEN)\n * 3. Config file (XDG-compliant)\n */\n\nimport { createConfigStore, getToken } from \"@studiometa/forge-api\";\n\nexport interface ForgeCliConfig {\n /** Forge API token */\n apiToken: string | undefined;\n}\n\n/**\n * Resolve config from multiple sources with priority order.\n */\nexport function getConfig(\n cliOptions?: Record<string, string | boolean | string[]>,\n): ForgeCliConfig {\n // 1. CLI argument --token\n const cliToken = cliOptions?.token;\n\n // 2. Environment variable / config file (handled by getToken)\n const storedToken = getToken(createConfigStore());\n\n return {\n apiToken: typeof cliToken === \"string\" ? cliToken : (storedToken ?? undefined),\n };\n}\n\nexport {\n createConfigStore,\n getToken,\n setToken,\n deleteToken,\n getOrganizationSlug,\n setOrganizationSlug,\n} from \"@studiometa/forge-api\";\n","/**\n * ANSI color utilities using native Node.js.\n * Provides terminal colors without external dependencies.\n */\n\n// ANSI escape codes\nconst RESET = \"\\x1b[0m\";\nconst BOLD = \"\\x1b[1m\";\nconst DIM = \"\\x1b[2m\";\n\n// Foreground colors\nconst FG_RED = \"\\x1b[31m\";\nconst FG_GREEN = \"\\x1b[32m\";\nconst FG_YELLOW = \"\\x1b[33m\";\nconst FG_CYAN = \"\\x1b[36m\";\nconst FG_GRAY = \"\\x1b[90m\";\n\n// Colors enabled by default, disabled by NO_COLOR env var\nlet colorEnabled = process.env.NO_COLOR === undefined;\n\nexport function setColorEnabled(enabled: boolean): void {\n colorEnabled = enabled;\n}\n\nexport function isColorEnabled(): boolean {\n return colorEnabled;\n}\n\nfunction colorize(text: string, code: string): string {\n if (!colorEnabled) return text;\n return `${code}${text}${RESET}`;\n}\n\nexport const colors = {\n reset: (text: string) => (colorEnabled ? `${RESET}${text}` : text),\n bold: (text: string) => colorize(text, BOLD),\n dim: (text: string) => colorize(text, DIM),\n red: (text: string) => colorize(text, FG_RED),\n green: (text: string) => colorize(text, FG_GREEN),\n yellow: (text: string) => colorize(text, FG_YELLOW),\n cyan: (text: string) => colorize(text, FG_CYAN),\n gray: (text: string) => colorize(text, FG_GRAY),\n};\n","/* eslint-disable typescript-eslint/no-base-to-string -- generic formatter converts unknown values to strings */\nimport type { OutputFormat } from \"./types.ts\";\n\nimport { colors } from \"./utils/colors.ts\";\n\n/**\n * Output formatter for CLI commands.\n * Supports human-readable, JSON, and table formats.\n */\nexport class OutputFormatter {\n constructor(\n private format: OutputFormat = \"human\",\n private noColor: boolean = false,\n ) {}\n\n /**\n * Returns true when the current format is JSON.\n */\n isJson(): boolean {\n return this.format === \"json\";\n }\n\n /**\n * Output data in the configured format.\n * Use format='json' for AI agents and structured data.\n */\n output(data: unknown): void {\n switch (this.format) {\n case \"json\":\n console.log(JSON.stringify(data, null, 2));\n break;\n case \"table\":\n this.outputTable(data);\n break;\n default:\n console.log(data);\n break;\n }\n }\n\n /**\n * Output a list with a human-readable one-liner per item and a table for table format.\n * Falls back to JSON for json format.\n *\n * @param data - Array of items to display\n * @param columns - Ordered list of field names to include in human/table output\n * @param emptyMessage - Message shown when data is empty (human format only)\n * @param lineFormat - Optional custom line formatter for human format\n */\n outputList<T extends object>(\n data: T[],\n columns: (keyof T & string)[],\n emptyMessage: string,\n lineFormat?: (item: T) => string,\n ): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify(data, null, 2));\n return;\n }\n\n if (this.format === \"table\") {\n this.outputTable(data.map((item) => Object.fromEntries(columns.map((c) => [c, item[c]]))));\n return;\n }\n\n // human\n if (data.length === 0) {\n console.log(colors.cyan(emptyMessage));\n return;\n }\n\n if (lineFormat) {\n for (const item of data) {\n console.log(lineFormat(item));\n }\n return;\n }\n\n // Default: padded columns\n const widths = columns.map((col) =>\n Math.max(\n col.length,\n ...data.map((item) => String((item as Record<string, unknown>)[col] ?? \"\").length),\n ),\n );\n for (const item of data) {\n const row = item as Record<string, unknown>;\n const line = columns.map((col, i) => String(row[col] ?? \"\").padEnd(widths[i])).join(\" \");\n console.log(line.trimEnd());\n }\n }\n\n /**\n * Output a single resource in human-readable format.\n * For json format, uses JSON.stringify. For table format, uses a two-column key/value table.\n *\n * @param data - Object to display\n * @param fields - Ordered list of fields to display (defaults to all keys)\n */\n outputOne<T extends object>(data: T, fields?: (keyof T & string)[]): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify(data, null, 2));\n return;\n }\n\n const record = data as Record<string, unknown>;\n const keys = fields ?? (Object.keys(record) as (keyof T & string)[]);\n\n if (this.format === \"table\") {\n const rows = keys.map((k) => ({ field: k, value: String(record[k] ?? \"\") }));\n this.outputTable(rows);\n return;\n }\n\n // human: key: value pairs\n const keyWidth = Math.max(...keys.map((k) => k.length));\n for (const key of keys) {\n const value = record[key];\n const valueStr =\n value !== null && typeof value === \"object\" ? JSON.stringify(value) : String(value ?? \"\");\n console.log(`${colors.cyan(key.padEnd(keyWidth))} ${valueStr}`);\n }\n }\n\n success(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"success\", message }));\n } else {\n console.log(colors.green(`✓ ${message}`));\n }\n }\n\n error(message: string, details?: unknown): void {\n if (this.format === \"json\") {\n console.error(JSON.stringify({ status: \"error\", message, details }));\n } else {\n console.error(colors.red(`✗ ${message}`));\n if (details !== undefined) {\n console.error(details);\n }\n }\n }\n\n warning(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"warning\", message }));\n } else {\n console.log(colors.yellow(`⚠ ${message}`));\n }\n }\n\n info(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"info\", message }));\n } else {\n console.log(colors.cyan(message));\n }\n }\n\n private outputTable(data: unknown): void {\n if (Array.isArray(data) && data.length > 0) {\n const headers = Object.keys(data[0] as Record<string, unknown>);\n const colWidths = headers.map((h) => {\n const maxDataWidth = Math.max(\n ...data.map((row) => String((row as Record<string, unknown>)[h] ?? \"\").length),\n );\n return Math.max(h.length, maxDataWidth);\n });\n\n // Header\n const headerRow = headers.map((h, i) => h.padEnd(colWidths[i])).join(\" | \");\n console.log(headerRow);\n console.log(colWidths.map((w) => \"-\".repeat(w)).join(\"-+-\"));\n\n // Rows\n for (const row of data) {\n const rowStr = headers\n .map((h, i) => String((row as Record<string, unknown>)[h] ?? \"\").padEnd(colWidths[i]))\n .join(\" | \");\n console.log(rowStr);\n }\n }\n }\n}\nexport const x = { a: 1, b: 2 };\n","/**\n * CLI execution context with dependency injection.\n *\n * Instead of hidden dependencies in command handlers, this module provides\n * explicit dependency passing for testability and transparency.\n */\n\nimport type { HttpClient } from \"@studiometa/forge-api\";\nimport type { ExecutorContext } from \"@studiometa/forge-core\";\n\nimport { type OutputFormat, isOutputFormat } from \"./types.ts\";\n\nimport { HttpClient as ForgeHttpClient } from \"@studiometa/forge-api\";\nimport { ConfigError } from \"./errors.ts\";\nimport { createConfigStore, getToken, getOrganizationSlug } from \"./config.ts\";\nimport { OutputFormatter } from \"./output.ts\";\n\nexport interface CommandOptions {\n [key: string]: string | boolean | string[] | undefined;\n format?: string;\n f?: string;\n token?: string;\n \"no-color\"?: boolean;\n}\n\n/**\n * Context containing all dependencies needed by command handlers.\n */\nexport interface CommandContext {\n /** Output formatter for the current format */\n readonly formatter: OutputFormatter;\n /** Raw CLI options */\n readonly options: CommandOptions;\n /** Create an ExecutorContext from this command context */\n createExecutorContext(token: string): ExecutorContext;\n /** Resolve the API token or throw ConfigError */\n getToken(): string;\n}\n\n/**\n * Creates a command context from CLI options.\n */\nexport function createContext(options: CommandOptions = {}): CommandContext {\n const rawFormat = options.format ?? options.f ?? \"human\";\n const format: OutputFormat = isOutputFormat(rawFormat) ? rawFormat : \"human\";\n const noColor = options[\"no-color\"] === true;\n const formatter = new OutputFormatter(format, noColor);\n\n return {\n formatter,\n options,\n\n createExecutorContext(token: string): ExecutorContext {\n const client: HttpClient = new ForgeHttpClient({ token });\n const orgSlug =\n (typeof options.org === \"string\" && options.org) ||\n getOrganizationSlug(createConfigStore()) ||\n undefined;\n return { client, organizationSlug: orgSlug };\n },\n\n getToken(): string {\n // 1. CLI arg\n if (typeof options.token === \"string\" && options.token) {\n return options.token;\n }\n // 2. Env var / config file\n const stored = getToken(createConfigStore());\n if (stored) {\n return stored;\n }\n // 3. Not found — throw\n throw ConfigError.missingToken();\n },\n };\n}\n\n/**\n * Creates a test context for unit tests.\n *\n * @example\n * ```typescript\n * const ctx = createTestContext({\n * mockClient: { get: async () => ({ servers: [] }) } as never,\n * });\n * ```\n */\nexport function createTestContext(overrides: {\n options?: CommandOptions;\n formatter?: OutputFormatter;\n token?: string;\n mockClient?: HttpClient;\n}): CommandContext {\n const opts: CommandOptions = overrides.options ?? {\n format: \"json\",\n \"no-color\": true,\n };\n const rawFormat = opts.format ?? \"json\";\n const format: OutputFormat = isOutputFormat(rawFormat) ? rawFormat : \"json\";\n const formatter = overrides.formatter ?? new OutputFormatter(format, true);\n\n return {\n formatter,\n options: opts,\n createExecutorContext(_token: string): ExecutorContext {\n if (!overrides.mockClient) {\n throw new Error(\n \"createTestContext: provide mockClient to use createExecutorContext in tests\",\n );\n }\n return { client: overrides.mockClient, organizationSlug: \"test-org\" };\n },\n getToken(): string {\n if (overrides.token) return overrides.token;\n if (typeof opts.token === \"string\") return opts.token;\n return \"test-token\";\n },\n };\n}\n","/**\n * Centralized error handling for forge.\n */\n\nimport type { OutputFormatter } from \"./output.ts\";\n\nimport { ApiError, CliError, ConfigError, ValidationError, isCliError } from \"./errors.ts\";\n\n/**\n * Exit codes for different error categories.\n */\nexport const ExitCode = {\n SUCCESS: 0,\n GENERAL_ERROR: 1,\n AUTHENTICATION_ERROR: 2,\n VALIDATION_ERROR: 3,\n CONFIG_ERROR: 4,\n NOT_FOUND_ERROR: 5,\n} as const;\n\nexport type ExitCode = (typeof ExitCode)[keyof typeof ExitCode];\n\n/**\n * Determine the appropriate exit code for an error.\n */\nexport function getExitCode(error: unknown): ExitCode {\n if (error instanceof ValidationError) {\n return ExitCode.VALIDATION_ERROR;\n }\n if (error instanceof ApiError) {\n if (error.statusCode === 401) return ExitCode.AUTHENTICATION_ERROR;\n if (error.statusCode === 404) return ExitCode.NOT_FOUND_ERROR;\n }\n if (isCliError(error) && error.code === \"CONFIG_ERROR\") {\n return ExitCode.CONFIG_ERROR;\n }\n return ExitCode.GENERAL_ERROR;\n}\n\n/**\n * Central error handler for all commands.\n */\nexport function handleError(\n error: unknown,\n formatter: OutputFormatter,\n options?: { exit?: boolean },\n): ExitCode {\n const shouldExit = options?.exit ?? true;\n\n let cliError: CliError;\n if (isCliError(error)) {\n cliError = error;\n } else {\n cliError = ApiError.fromForgeError(error);\n }\n\n // Output error in appropriate format\n if (formatter.isJson()) {\n formatter.output(cliError.toJSON());\n } else {\n formatter.error(cliError.toFormattedMessage());\n }\n\n const exitCode = getExitCode(cliError);\n\n if (shouldExit) {\n process.exit(exitCode);\n }\n\n return exitCode;\n}\n\n/**\n * Wraps a command function with automatic error handling.\n */\nexport async function runCommand<T>(\n fn: () => Promise<T>,\n formatter: OutputFormatter,\n): Promise<T | undefined> {\n try {\n return await fn();\n } catch (error) {\n handleError(error, formatter);\n return undefined; // unreachable due to process.exit\n }\n}\n\n/**\n * Exits with a validation error for a missing required argument.\n */\nexport function exitWithValidationError(\n field: string,\n usage: string,\n formatter: OutputFormatter,\n): never {\n const error = ValidationError.required(field, [`Usage: ${usage}`]);\n handleError(error, formatter);\n // Unreachable in production\n throw error;\n}\n\n/**\n * Exits with a config error when token is missing.\n */\nexport function exitWithConfigError(formatter: OutputFormatter): never {\n const error = ConfigError.missingToken();\n handleError(error, formatter);\n throw error;\n}\n"],"mappings":";AAIA,SAAgB,eAAe,OAAuC;AACpE,QAAO,UAAU,UAAU,UAAU,WAAW,UAAU;;;;;;;;;;;ACK5D,IAAsB,WAAtB,cAAuC,MAAM;CAI3C,YACE,SACA,OACA,OACA;AACA,QAAM,QAAQ;AAHE,OAAA,QAAA;AACA,OAAA,QAAA;AAGhB,OAAK,OAAO,KAAK,YAAY;AAE7B,QAAM,oBAAoB,MAAM,KAAK,YAAY;;CAGnD,SAAkC;AAChC,SAAO;GACL,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,SAAS,KAAK;GACd,eAAe,KAAK;GACpB,GAAI,KAAK,SAAS,KAAK,MAAM,SAAS,IAAI,EAAE,OAAO,KAAK,OAAO,GAAG,EAAE;GACpE,GAAI,KAAK,iBAAiB,QAAQ,EAAE,OAAO,EAAE,SAAS,KAAK,MAAM,SAAS,EAAE,GAAG,EAAE;GAClF;;CAGH,qBAA6B;EAC3B,IAAI,MAAM,KAAK;AACf,MAAI,KAAK,SAAS,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AAI;AACF,SAAO,MAAM,IAAI;UACV,OAAO;AACd,cAAY,OAAO,UAAU;AAC7B;;;;;;AAOJ,SAAgB,wBACd,OACA,OACA,WACO;CACP,MAAM,QAAQ,gBAAgB,SAAS,OAAO,CAAC,UAAU,QAAQ,CAAC;AAClE,aAAY,OAAO,UAAU;AAE7B,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAEhE;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAYpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,eAAe,EAC1B,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAC3B,QAAQ,
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../src/error-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAInD;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAEhE;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAYpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,eAAe,EAC1B,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Q,CAAC,aAAa,QAAQ;IAE9B,MAAM,CAAC,YAAY,IAAI,WAAW;CAOnC;AAID,qBAAa,eAAgB,SAAQ,QAAQ;aAMzB,KAAK,CAAC,EAAE,MAAM;IALhC,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,aAAa,QAAQ;gBAG5B,OAAO,EAAE,MAAM,EACC,KAAK,CAAC,EAAE,MAAM,YAAA,EAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,KAAK,CAAC,EAAE,OAAO;IAKR,MAAM;;;IAIf,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,eAAe;CAGlE;AAID,qBAAa,QAAS,SAAQ,QAAQ;aAMlB,UAAU,CAAC,EAAE,MAAM;IALrC,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;gBAG9B,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA,EACnC,KAAK,CAAC,EAAE,MAAM,EAAE,EAChB,KAAK,CAAC,EAAE,OAAO;IAMR,MAAM;;;IAIf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ;CAehD;AA2BD,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAE5D"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as ApiError, a as createContext, b as ValidationError, f as getConfig, i as runCommand, o as createTestContext, r as handleError, s as OutputFormatter, t as ExitCode, v as CliError, x as isCliError, y as ConfigError } from "./error-handler-ByMitiOr.js";
|
|
2
2
|
export { ApiError, CliError, ConfigError, ExitCode, OutputFormatter, ValidationError, createContext, createTestContext, getConfig, handleError, isCliError, runCommand };
|
package/dist/output.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C;;;GAGG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;gBADP,MAAM,GAAE,YAAsB,EAC9B,OAAO,GAAE,OAAe;IAGlC;;OAEG;IACH,MAAM,IAAI,OAAO;IAIjB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAc3B;;;;;;;;OAQG;IACH,UAAU,CAAC,CAAC,SAAS,MAAM,EACzB,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,EAC7B,YAAY,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAC/B,IAAI;IAsCP;;;;;;OAMG;IACH,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI;IAyBzE,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQ9B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAW/C,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQ9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQ3B,OAAO,CAAC,WAAW;CAwBpB;AACD,eAAO,MAAM,CAAC;;;CAAiB,CAAC"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/utils/args.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Parses process.argv into a structured format with no external deps.
|
|
4
4
|
*/
|
|
5
5
|
export type OptionValue = string | boolean | string[];
|
|
6
|
+
export type CommandOptions = Record<string, OptionValue>;
|
|
6
7
|
export interface ParsedArgs {
|
|
7
8
|
command: string[];
|
|
8
9
|
options: Record<string, OptionValue>;
|
package/dist/utils/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/utils/args.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/utils/args.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,UAAU,CAwD5E;AAED,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACpC,KAAK,EAAE,MAAM,EAAE,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAEtF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-router.d.ts","sourceRoot":"","sources":["../../src/utils/command-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"command-router.d.ts","sourceRoot":"","sources":["../../src/utils/command-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOpD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,IAE3D,YAAY,MAAM,EAClB,MAAM,MAAM,EAAE,EACd,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,KACnD,OAAO,CAAC,IAAI,CAAC,CAsDjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/utils/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/utils/resolve.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA+B9F;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,CA+BjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiometa/forge-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "CLI tool for managing Laravel Forge servers, sites, and deployments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agent",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"typecheck": "tsc --noEmit"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@studiometa/forge-api": "0.
|
|
52
|
-
"@studiometa/forge-core": "0.
|
|
51
|
+
"@studiometa/forge-api": "0.4.1",
|
|
52
|
+
"@studiometa/forge-core": "0.4.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^24.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler-Byuujxh1.js","names":[],"sources":["../src/errors.ts","../src/config.ts","../src/utils/colors.ts","../src/output.ts","../src/context.ts","../src/error-handler.ts"],"sourcesContent":["/**\n * Error types for forge.\n *\n * Provides specific error types for different failure scenarios with\n * recovery hints for both humans and AI agents.\n */\n\n/**\n * Base error class for all CLI errors.\n */\nexport abstract class CliError extends Error {\n abstract readonly code: string;\n abstract readonly isRecoverable: boolean;\n\n constructor(\n message: string,\n public readonly hints?: string[],\n public readonly cause?: unknown,\n ) {\n super(message);\n this.name = this.constructor.name;\n\n Error.captureStackTrace?.(this, this.constructor);\n }\n\n toJSON(): Record<string, unknown> {\n return {\n error: this.code,\n name: this.name,\n message: this.message,\n isRecoverable: this.isRecoverable,\n ...(this.hints && this.hints.length > 0 ? { hints: this.hints } : {}),\n ...(this.cause instanceof Error ? { cause: { message: this.cause.message } } : {}),\n };\n }\n\n toFormattedMessage(): string {\n let msg = this.message;\n if (this.hints && this.hints.length > 0) {\n msg += \"\\n\\nHints:\\n\" + this.hints.map((h) => ` • ${h}`).join(\"\\n\");\n }\n return msg;\n }\n}\n\n// ── Config Errors ────────────────────────────────────\n\nexport class ConfigError extends CliError {\n readonly code = \"CONFIG_ERROR\";\n readonly isRecoverable = true;\n\n static missingToken(): ConfigError {\n return new ConfigError(\"API token not configured\", [\n \"Set via CLI flag: --token <token>\",\n \"Set via environment: export FORGE_API_TOKEN=<token>\",\n \"Set via config: forge config set YOUR_TOKEN\",\n ]);\n }\n}\n\n// ── Validation Errors ────────────────────────────────\n\nexport class ValidationError extends CliError {\n readonly code = \"VALIDATION_ERROR\";\n readonly isRecoverable = true;\n\n constructor(\n message: string,\n public readonly field?: string,\n hints?: string[],\n cause?: unknown,\n ) {\n super(message, hints, cause);\n }\n\n override toJSON() {\n return { ...super.toJSON(), field: this.field };\n }\n\n static required(field: string, hints?: string[]): ValidationError {\n return new ValidationError(`${field} is required`, field, hints);\n }\n}\n\n// ── API Errors ───────────────────────────────────────\n\nexport class ApiError extends CliError {\n readonly code = \"API_ERROR\";\n readonly isRecoverable: boolean;\n\n constructor(\n message: string,\n public readonly statusCode?: number,\n hints?: string[],\n cause?: unknown,\n ) {\n super(message, hints ?? getApiErrorHints(statusCode), cause);\n this.isRecoverable = statusCode === undefined || (statusCode >= 500 && statusCode < 600);\n }\n\n override toJSON() {\n return { ...super.toJSON(), statusCode: this.statusCode };\n }\n\n static fromForgeError(error: unknown): ApiError {\n if (error instanceof Error && \"statusCode\" in error) {\n const e = error as Error & { statusCode?: number };\n return new ApiError(e.message, e.statusCode, undefined, e);\n }\n if (error instanceof Error) {\n return new ApiError(error.message, undefined, undefined, error);\n }\n return new ApiError(String(error));\n }\n}\n\nfunction getApiErrorHints(statusCode?: number): string[] {\n if (statusCode === 401) {\n return [\"Check that your API token is valid\", \"Set via: export FORGE_API_TOKEN=<token>\"];\n }\n if (statusCode === 403) {\n return [\"You may not have permission to access this resource\"];\n }\n if (statusCode === 404) {\n return [\n \"The resource may not exist\",\n \"Verify the ID is correct\",\n \"Use the list command to find valid IDs\",\n ];\n }\n if (statusCode === 429) {\n return [\"Too many requests — wait before retrying\"];\n }\n if (statusCode !== undefined && statusCode >= 500) {\n return [\"Server error — try again later\"];\n }\n return [];\n}\n\n// ── Type Guards ──────────────────────────────────────\n\nexport function isCliError(error: unknown): error is CliError {\n return error instanceof CliError;\n}\n","/**\n * Config loading for forge.\n *\n * Resolution priority (highest to lowest):\n * 1. CLI arguments (--token)\n * 2. Environment variable (FORGE_API_TOKEN)\n * 3. Config file (XDG-compliant)\n */\n\nimport { createConfigStore, getToken } from \"@studiometa/forge-api\";\n\nexport interface ForgeCliConfig {\n /** Forge API token */\n apiToken: string | undefined;\n}\n\n/**\n * Resolve config from multiple sources with priority order.\n */\nexport function getConfig(\n cliOptions?: Record<string, string | boolean | string[]>,\n): ForgeCliConfig {\n // 1. CLI argument --token\n const cliToken = cliOptions?.token;\n\n // 2. Environment variable / config file (handled by getToken)\n const storedToken = getToken(createConfigStore());\n\n return {\n apiToken: typeof cliToken === \"string\" ? cliToken : (storedToken ?? undefined),\n };\n}\n\nexport { createConfigStore, getToken, setToken, deleteToken } from \"@studiometa/forge-api\";\n","/**\n * ANSI color utilities using native Node.js.\n * Provides terminal colors without external dependencies.\n */\n\n// ANSI escape codes\nconst RESET = \"\\x1b[0m\";\nconst BOLD = \"\\x1b[1m\";\nconst DIM = \"\\x1b[2m\";\n\n// Foreground colors\nconst FG_RED = \"\\x1b[31m\";\nconst FG_GREEN = \"\\x1b[32m\";\nconst FG_YELLOW = \"\\x1b[33m\";\nconst FG_CYAN = \"\\x1b[36m\";\nconst FG_GRAY = \"\\x1b[90m\";\n\n// Colors enabled by default, disabled by NO_COLOR env var\nlet colorEnabled = process.env.NO_COLOR === undefined;\n\nexport function setColorEnabled(enabled: boolean): void {\n colorEnabled = enabled;\n}\n\nexport function isColorEnabled(): boolean {\n return colorEnabled;\n}\n\nfunction colorize(text: string, code: string): string {\n if (!colorEnabled) return text;\n return `${code}${text}${RESET}`;\n}\n\nexport const colors = {\n reset: (text: string) => (colorEnabled ? `${RESET}${text}` : text),\n bold: (text: string) => colorize(text, BOLD),\n dim: (text: string) => colorize(text, DIM),\n red: (text: string) => colorize(text, FG_RED),\n green: (text: string) => colorize(text, FG_GREEN),\n yellow: (text: string) => colorize(text, FG_YELLOW),\n cyan: (text: string) => colorize(text, FG_CYAN),\n gray: (text: string) => colorize(text, FG_GRAY),\n};\n","import type { OutputFormat } from \"./types.ts\";\n\nimport { colors } from \"./utils/colors.ts\";\n\n/**\n * Output formatter for CLI commands.\n * Supports human-readable, JSON, and table formats.\n */\nexport class OutputFormatter {\n constructor(\n private format: OutputFormat = \"human\",\n private noColor: boolean = false,\n ) {}\n\n /**\n * Returns true when the current format is JSON.\n */\n isJson(): boolean {\n return this.format === \"json\";\n }\n\n /**\n * Output data in the configured format.\n * Use format='json' for AI agents and structured data.\n */\n output(data: unknown): void {\n switch (this.format) {\n case \"json\":\n console.log(JSON.stringify(data, null, 2));\n break;\n case \"table\":\n this.outputTable(data);\n break;\n case \"human\":\n default:\n console.log(data);\n break;\n }\n }\n\n /**\n * Output a list with a human-readable one-liner per item and a table for table format.\n * Falls back to JSON for json format.\n *\n * @param data - Array of items to display\n * @param columns - Ordered list of field names to include in human/table output\n * @param emptyMessage - Message shown when data is empty (human format only)\n * @param lineFormat - Optional custom line formatter for human format\n */\n outputList<T extends object>(\n data: T[],\n columns: (keyof T & string)[],\n emptyMessage: string,\n lineFormat?: (item: T) => string,\n ): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify(data, null, 2));\n return;\n }\n\n if (this.format === \"table\") {\n this.outputTable(data.map((item) => Object.fromEntries(columns.map((c) => [c, item[c]]))));\n return;\n }\n\n // human\n if (data.length === 0) {\n console.log(colors.cyan(emptyMessage));\n return;\n }\n\n if (lineFormat) {\n for (const item of data) {\n console.log(lineFormat(item));\n }\n return;\n }\n\n // Default: padded columns\n const widths = columns.map((col) =>\n Math.max(\n col.length,\n ...data.map((item) => String((item as Record<string, unknown>)[col] ?? \"\").length),\n ),\n );\n for (const item of data) {\n const row = item as Record<string, unknown>;\n const line = columns.map((col, i) => String(row[col] ?? \"\").padEnd(widths[i])).join(\" \");\n console.log(line.trimEnd());\n }\n }\n\n /**\n * Output a single resource in human-readable format.\n * For json format, uses JSON.stringify. For table format, uses a two-column key/value table.\n *\n * @param data - Object to display\n * @param fields - Ordered list of fields to display (defaults to all keys)\n */\n outputOne<T extends object>(data: T, fields?: (keyof T & string)[]): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify(data, null, 2));\n return;\n }\n\n const record = data as Record<string, unknown>;\n const keys = fields ?? (Object.keys(record) as (keyof T & string)[]);\n\n if (this.format === \"table\") {\n const rows = keys.map((k) => ({ field: k, value: String(record[k] ?? \"\") }));\n this.outputTable(rows);\n return;\n }\n\n // human: key: value pairs\n const keyWidth = Math.max(...keys.map((k) => k.length));\n for (const key of keys) {\n const value = record[key];\n const valueStr =\n value !== null && typeof value === \"object\" ? JSON.stringify(value) : String(value ?? \"\");\n console.log(`${colors.cyan(key.padEnd(keyWidth))} ${valueStr}`);\n }\n }\n\n success(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"success\", message }));\n } else {\n console.log(colors.green(`✓ ${message}`));\n }\n }\n\n error(message: string, details?: unknown): void {\n if (this.format === \"json\") {\n console.error(JSON.stringify({ status: \"error\", message, details }));\n } else {\n console.error(colors.red(`✗ ${message}`));\n if (details !== undefined) {\n console.error(details);\n }\n }\n }\n\n warning(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"warning\", message }));\n } else {\n console.log(colors.yellow(`⚠ ${message}`));\n }\n }\n\n info(message: string): void {\n if (this.format === \"json\") {\n console.log(JSON.stringify({ status: \"info\", message }));\n } else {\n console.log(colors.cyan(message));\n }\n }\n\n private outputTable(data: unknown): void {\n if (Array.isArray(data) && data.length > 0) {\n const headers = Object.keys(data[0] as Record<string, unknown>);\n const colWidths = headers.map((h) => {\n const maxDataWidth = Math.max(\n ...data.map((row) => String((row as Record<string, unknown>)[h] ?? \"\").length),\n );\n return Math.max(h.length, maxDataWidth);\n });\n\n // Header\n const headerRow = headers.map((h, i) => h.padEnd(colWidths[i])).join(\" | \");\n console.log(headerRow);\n console.log(colWidths.map((w) => \"-\".repeat(w)).join(\"-+-\"));\n\n // Rows\n for (const row of data) {\n const rowStr = headers\n .map((h, i) => String((row as Record<string, unknown>)[h] ?? \"\").padEnd(colWidths[i]))\n .join(\" | \");\n console.log(rowStr);\n }\n }\n }\n}\nexport const x = { a: 1, b: 2 };\n","/**\n * CLI execution context with dependency injection.\n *\n * Instead of hidden dependencies in command handlers, this module provides\n * explicit dependency passing for testability and transparency.\n */\n\nimport type { HttpClient } from \"@studiometa/forge-api\";\nimport type { ExecutorContext } from \"@studiometa/forge-core\";\n\nimport type { OutputFormat } from \"./types.ts\";\n\nimport { HttpClient as ForgeHttpClient } from \"@studiometa/forge-api\";\nimport { ConfigError } from \"./errors.ts\";\nimport { createConfigStore, getToken } from \"./config.ts\";\nimport { OutputFormatter } from \"./output.ts\";\n\nexport interface CommandOptions {\n [key: string]: string | boolean | string[] | undefined;\n format?: string;\n f?: string;\n token?: string;\n \"no-color\"?: boolean;\n}\n\n/**\n * Context containing all dependencies needed by command handlers.\n */\nexport interface CommandContext {\n /** Output formatter for the current format */\n readonly formatter: OutputFormatter;\n /** Raw CLI options */\n readonly options: CommandOptions;\n /** Create an ExecutorContext from this command context */\n createExecutorContext(token: string): ExecutorContext;\n /** Resolve the API token or throw ConfigError */\n getToken(): string;\n}\n\n/**\n * Creates a command context from CLI options.\n */\nexport function createContext(options: CommandOptions = {}): CommandContext {\n const format = (options.format ?? options.f ?? \"human\") as OutputFormat;\n const noColor = options[\"no-color\"] === true;\n const formatter = new OutputFormatter(format, noColor);\n\n return {\n formatter,\n options,\n\n createExecutorContext(token: string): ExecutorContext {\n const client = new ForgeHttpClient({ token }) as unknown as HttpClient;\n return { client };\n },\n\n getToken(): string {\n // 1. CLI arg\n if (typeof options.token === \"string\" && options.token) {\n return options.token;\n }\n // 2. Env var / config file\n const stored = getToken(createConfigStore());\n if (stored) {\n return stored;\n }\n // 3. Not found — throw\n throw ConfigError.missingToken();\n },\n };\n}\n\n/**\n * Creates a test context for unit tests.\n *\n * @example\n * ```typescript\n * const ctx = createTestContext({\n * mockClient: { get: async () => ({ servers: [] }) } as never,\n * });\n * ```\n */\nexport function createTestContext(overrides: {\n options?: CommandOptions;\n formatter?: OutputFormatter;\n token?: string;\n mockClient?: HttpClient;\n}): CommandContext {\n const opts: CommandOptions = overrides.options ?? {\n format: \"json\",\n \"no-color\": true,\n };\n const format = (opts.format ?? \"json\") as OutputFormat;\n const formatter = overrides.formatter ?? new OutputFormatter(format, true);\n\n return {\n formatter,\n options: opts,\n createExecutorContext(_token: string): ExecutorContext {\n if (!overrides.mockClient) {\n throw new Error(\n \"createTestContext: provide mockClient to use createExecutorContext in tests\",\n );\n }\n return { client: overrides.mockClient };\n },\n getToken(): string {\n if (overrides.token) return overrides.token;\n if (typeof opts.token === \"string\") return opts.token;\n return \"test-token\";\n },\n };\n}\n","/**\n * Centralized error handling for forge.\n */\n\nimport type { OutputFormatter } from \"./output.ts\";\n\nimport { ApiError, CliError, ConfigError, ValidationError, isCliError } from \"./errors.ts\";\n\n/**\n * Exit codes for different error categories.\n */\nexport const ExitCode = {\n SUCCESS: 0,\n GENERAL_ERROR: 1,\n AUTHENTICATION_ERROR: 2,\n VALIDATION_ERROR: 3,\n CONFIG_ERROR: 4,\n NOT_FOUND_ERROR: 5,\n} as const;\n\nexport type ExitCode = (typeof ExitCode)[keyof typeof ExitCode];\n\n/**\n * Determine the appropriate exit code for an error.\n */\nexport function getExitCode(error: unknown): ExitCode {\n if (error instanceof ValidationError) {\n return ExitCode.VALIDATION_ERROR;\n }\n if (error instanceof ApiError) {\n if (error.statusCode === 401) return ExitCode.AUTHENTICATION_ERROR;\n if (error.statusCode === 404) return ExitCode.NOT_FOUND_ERROR;\n }\n if (isCliError(error) && error.code === \"CONFIG_ERROR\") {\n return ExitCode.CONFIG_ERROR;\n }\n return ExitCode.GENERAL_ERROR;\n}\n\n/**\n * Central error handler for all commands.\n */\nexport function handleError(\n error: unknown,\n formatter: OutputFormatter,\n options?: { exit?: boolean },\n): ExitCode {\n const shouldExit = options?.exit ?? true;\n\n let cliError: CliError;\n if (isCliError(error)) {\n cliError = error;\n } else {\n cliError = ApiError.fromForgeError(error);\n }\n\n // Output error in appropriate format\n const opts = formatter as unknown as { format?: string };\n if (opts.format === \"json\") {\n formatter.output(cliError.toJSON());\n } else {\n formatter.error(cliError.toFormattedMessage());\n }\n\n const exitCode = getExitCode(cliError);\n\n if (shouldExit) {\n process.exit(exitCode);\n }\n\n return exitCode;\n}\n\n/**\n * Wraps a command function with automatic error handling.\n */\nexport async function runCommand<T>(\n fn: () => Promise<T>,\n formatter: OutputFormatter,\n): Promise<T | undefined> {\n try {\n return await fn();\n } catch (error) {\n handleError(error, formatter);\n return undefined; // unreachable due to process.exit\n }\n}\n\n/**\n * Exits with a validation error for a missing required argument.\n */\nexport function exitWithValidationError(\n field: string,\n usage: string,\n formatter: OutputFormatter,\n): never {\n const error = ValidationError.required(field, [`Usage: ${usage}`]);\n handleError(error, formatter);\n // Unreachable in production\n throw error;\n}\n\n/**\n * Exits with a config error when token is missing.\n */\nexport function exitWithConfigError(formatter: OutputFormatter): never {\n const error = ConfigError.missingToken();\n handleError(error, formatter);\n throw error;\n}\n"],"mappings":";;;;;;;;;;AAUA,IAAsB,WAAtB,cAAuC,MAAM;CAI3C,YACE,SACA,OACA,OACA;AACA,QAAM,QAAQ;AAHE,OAAA,QAAA;AACA,OAAA,QAAA;AAGhB,OAAK,OAAO,KAAK,YAAY;AAE7B,QAAM,oBAAoB,MAAM,KAAK,YAAY;;CAGnD,SAAkC;AAChC,SAAO;GACL,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,SAAS,KAAK;GACd,eAAe,KAAK;GACpB,GAAI,KAAK,SAAS,KAAK,MAAM,SAAS,IAAI,EAAE,OAAO,KAAK,OAAO,GAAG,EAAE;GACpE,GAAI,KAAK,iBAAiB,QAAQ,EAAE,OAAO,EAAE,SAAS,KAAK,MAAM,SAAS,EAAE,GAAG,EAAE;GAClF;;CAGH,qBAA6B;E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