From 926e5b380579cea413567eb5c3d99973b220a140 Mon Sep 17 00:00:00 2001 From: Etienne Donneger <23462475+Krow10@users.noreply.github.com> Date: Sun, 15 Oct 2023 08:27:14 -0400 Subject: [PATCH] Fix rebase Add CLI build with Bun and Commander (#12) * Add CLI build with Bun and Commander The build generates a CLI for running the Bun API. The config has been changed to include program argument parameters. In order to run the new `app` using custom directives (e.g port, hostname) a new function called `generateApp()` had to be created in order for the tests to be ran with the same app (previously `export default`). Closes: #7 * Fix build workflow * Skip default values check in config test --- .github/workflows/bun-build.yml | 2 +- src/tests/config.spec.ts | 2 +- src/tests/index.spec.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bun-build.yml b/.github/workflows/bun-build.yml index 75eaed2..35ddef1 100644 --- a/.github/workflows/bun-build.yml +++ b/.github/workflows/bun-build.yml @@ -24,4 +24,4 @@ jobs: - uses: softprops/action-gh-release@v1 with: files: | - substreams-clock-api \ No newline at end of file + substreams-clock-api diff --git a/src/tests/config.spec.ts b/src/tests/config.spec.ts index f3b2d09..857c7d7 100644 --- a/src/tests/config.spec.ts +++ b/src/tests/config.spec.ts @@ -35,4 +35,4 @@ describe('Commander', () => { verbose: DEFAULT_VERBOSE }); }); -}); \ No newline at end of file +}); diff --git a/src/tests/index.spec.ts b/src/tests/index.spec.ts index 27184a6..a7e6a27 100644 --- a/src/tests/index.spec.ts +++ b/src/tests/index.spec.ts @@ -2,6 +2,7 @@ import { describe, expect, it, beforeAll } from 'bun:test'; import { ZodError } from 'zod'; import config from '../config'; +import { generateApp } from '../index'; import { banner } from "../banner"; import { generateApp } from '../index'; import { supportedChainsQuery, timestampQuery } from "../queries";