Skip to content
8 changes: 8 additions & 0 deletions .oxlintrc.effect.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@
"ignorePatterns": [
"**",
"!packages/stack/**",
"!apps/cli/src/auth/**",
"!apps/cli/src/cli/**",
"!apps/cli/src/commands/**",
"!apps/cli/src/config/**",
"!apps/cli/src/docs/**",
"!apps/cli/src/globals.d.ts",
"!apps/cli/src/main.ts",
"!apps/cli/src/output/**",
"!apps/cli/src/shared/**",
"!apps/cli/src/telemetry/**",
// Last match wins across the whole list: keep bare re-exclusions after every
// `!` entry that would otherwise re-include them.
"apps/cli/src/shared/cli/bin.ts",
Expand Down
9 changes: 8 additions & 1 deletion apps/cli/scripts/generate-docs-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* The version defaults to `latest` (a leading `v` is stripped); the workspace `package.json`
* version is a semantic-release placeholder and is never used here.
*/
import { BunServices } from "@effect/platform-bun";
import { Effect } from "effect";
import path from "node:path";
import process from "node:process";
import { readDocsContent } from "../src/docs/docs-spec.content.ts";
Expand All @@ -19,7 +21,12 @@ function resolveVersion(): string {
return argument.startsWith("v") ? argument.slice(1) : argument;
}

const content = readDocsContent(path.resolve(import.meta.dir, "../docs"));
const content = await Effect.runPromise(
readDocsContent(path.resolve(import.meta.dir, "../docs")).pipe(
Effect.provide(BunServices.layer),
Effect.mapError((error) => error.cause ?? error),
),
);

const spec = buildDocsSpec({
root: rootCommand,
Expand Down
170 changes: 95 additions & 75 deletions apps/cli/src/auth/command-credentials.layer.unit.test.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/cli/src/auth/command-platform-api.layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export const makeCommandPlatformApi = Effect.gen(function* () {

const authGateToken = yield* resolveAccessToken;
if (Option.isNone(authGateToken)) {
return yield* Effect.fail(new AccessTokenRequiredError({ message: MISSING_TOKEN_MESSAGE }));
return yield* new AccessTokenRequiredError({ message: MISSING_TOKEN_MESSAGE });
}
yield* debugLogger.debug(`Supabase CLI ${CLI_VERSION}`);
yield* debugLogger.debug(`Using profile: ${cliSettings.profile} (${cliSettings.projectHost})`);
const storedToken = yield* resolveAccessToken;
if (Option.isNone(storedToken)) {
return yield* Effect.fail(new AccessTokenRequiredError({ message: MISSING_TOKEN_MESSAGE }));
return yield* new AccessTokenRequiredError({ message: MISSING_TOKEN_MESSAGE });
}

return yield* makeApiClient(
Expand Down
Loading
Loading