@profullstack/g1tz 0.2.0 → 0.2.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/bin/g1tz.mjs CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import "../dist/main.js";
2
+ // `main` is called here rather than by an `import.meta.main` guard inside
3
+ // main.js: that guard is false for a module something else imported, which
4
+ // is exactly what this file does, so the installed command used to do nothing.
5
+ import { main } from "../dist/main.js";
6
+
7
+ main().catch((error) => {
8
+ console.error(error);
9
+ process.exit(1);
10
+ });
package/dist/main.d.ts CHANGED
@@ -58,6 +58,7 @@ export interface Cli {
58
58
  error?: string;
59
59
  }
60
60
  export declare function parseCli(argv: readonly string[]): Cli;
61
+ export declare function main(): Promise<void>;
61
62
  /** Diff colours from the active theme, so highlighting follows the theme. */
62
63
  export declare function diffPalette(theme: Theme): DiffPalette;
63
64
  export interface ViewArgs {
package/dist/main.js CHANGED
@@ -204,7 +204,7 @@ export function parseCli(argv) {
204
204
  }
205
205
  return cli;
206
206
  }
207
- async function main() {
207
+ export async function main() {
208
208
  const cli = parseCli(process.argv.slice(2));
209
209
  if (cli.help) {
210
210
  console.log(USAGE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profullstack/g1tz",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A git TUI that shows you the repository, not a menu of git commands.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/main.ts CHANGED
@@ -236,7 +236,7 @@ export function parseCli(argv: readonly string[]): Cli {
236
236
  return cli;
237
237
  }
238
238
 
239
- async function main(): Promise<void> {
239
+ export async function main(): Promise<void> {
240
240
  const cli = parseCli(process.argv.slice(2));
241
241
  if (cli.help) {
242
242
  console.log(USAGE);