Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/localproxy/src/commands/clean.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { createCommand } from "commander";
import { CaddyService } from "~/services/caddy";
import { CaddyfileService } from "~/services/caddyfile";
import { HostsService } from "~/services/hosts";
import { logger } from "~/services/logger";
import type { Context } from "~/types";
import { CaddyService } from "#/services/caddy";
import { CaddyfileService } from "#/services/caddyfile";
import { HostsService } from "#/services/hosts";
import { logger } from "#/services/logger";
import type { Context } from "#/types";

type CommandOptions = {
verbose: boolean;
Expand Down
14 changes: 7 additions & 7 deletions packages/localproxy/src/commands/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import * as fs from "node:fs/promises";
import path from "node:path";
import { editor as editorPrompt } from "@inquirer/prompts";
import { createCommand } from "commander";
import { CaddyService } from "~/services/caddy";
import { CaddyfileService } from "~/services/caddyfile";
import { FileService } from "~/services/file";
import { HostsService } from "~/services/hosts";
import { logger } from "~/services/logger";
import { quietShell } from "~/services/shell";
import type { Context } from "~/types";
import { CaddyService } from "#/services/caddy";
import { CaddyfileService } from "#/services/caddyfile";
import { FileService } from "#/services/file";
import { HostsService } from "#/services/hosts";
import { logger } from "#/services/logger";
import { quietShell } from "#/services/shell";
import type { Context } from "#/types";

type CommandOptions = {
verbose: boolean;
Expand Down
6 changes: 3 additions & 3 deletions packages/localproxy/src/commands/start.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCommand } from "commander";
import { CaddyService } from "~/services/caddy";
import { logger } from "~/services/logger";
import type { Context } from "~/types";
import { CaddyService } from "#/services/caddy";
import { logger } from "#/services/logger";
import type { Context } from "#/types";

type CommandOptions = {
verbose: boolean;
Expand Down
12 changes: 6 additions & 6 deletions packages/localproxy/src/commands/status.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createCommand } from "commander";
import { CaddyService } from "~/services/caddy";
import { CaddyfileService } from "~/services/caddyfile";
import { FileService } from "~/services/file";
import { HostsService } from "~/services/hosts";
import { logger } from "~/services/logger";
import type { Context } from "~/types";
import { CaddyService } from "#/services/caddy";
import { CaddyfileService } from "#/services/caddyfile";
import { FileService } from "#/services/file";
import { HostsService } from "#/services/hosts";
import { logger } from "#/services/logger";
import type { Context } from "#/types";

export function createStatusCommand({ caddyfilePath }: Context) {
return createCommand("status")
Expand Down
6 changes: 3 additions & 3 deletions packages/localproxy/src/commands/stop.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCommand } from "commander";
import { CaddyService } from "~/services/caddy";
import { logger } from "~/services/logger";
import type { Context } from "~/types";
import { CaddyService } from "#/services/caddy";
import { logger } from "#/services/logger";
import type { Context } from "#/types";

type CommandOptions = {
verbose: boolean;
Expand Down
6 changes: 3 additions & 3 deletions packages/localproxy/test/unit/caddyfile.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, expect, it } from "bun:test";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { FixtureReader } from "test/helpers";
import { CaddyfileService, type LocalDomain } from "~/services/caddyfile";
import { type Caddyfile, CaddyfileParser } from "~/services/caddyfile/parser";
import { CaddyfileService, type LocalDomain } from "#/services/caddyfile";
import { type Caddyfile, CaddyfileParser } from "#/services/caddyfile/parser";
import { FixtureReader } from "#test/helpers";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const fixtureReader = new FixtureReader(__dirname);
Expand Down
3 changes: 2 additions & 1 deletion packages/localproxy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"],
"#/*": ["./src/*"],
"#test/*": ["./test/*"],
"@vlandoss/*": ["../../packages/*/src"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/program/__tests__/snapshots.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { afterEach, expect, test } from "bun:test";
import { createTestProgram, execCli, mocked } from "test/helpers";
import { createTestProgram, execCli, mocked } from "#test/helpers";

const { program, ctx } = await createTestProgram();
const $ = ctx.shell.$;
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/src/program/commands/check.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCommand } from "commander";
import isCI from "is-ci";
import { BiomeService } from "~/services/biome";
import type { Context } from "~/services/ctx";
import { BiomeService } from "#/services/biome";
import type { Context } from "#/services/ctx";

export function createCheckCommand(ctx: Context) {
return createCommand("check")
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/program/commands/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cwd } from "@vlandoss/clibuddy";
import { createCommand } from "commander";
import { type GlobOptions, glob } from "glob";
import { rimraf } from "rimraf";
import { logger } from "~/services/logger";
import { logger } from "#/services/logger";

type Options = {
onlyDist: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/src/program/commands/format.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createCommand } from "commander";
import { BiomeService } from "~/services/biome";
import type { Context } from "~/services/ctx";
import { BiomeService } from "#/services/biome";
import type { Context } from "#/services/ctx";

export function createFormatCommand(ctx: Context) {
return createCommand("fmt")
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/src/program/commands/lint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createCommand } from "commander";
import { BiomeService } from "~/services/biome";
import type { Context } from "~/services/ctx";
import { BiomeService } from "#/services/biome";
import type { Context } from "#/services/ctx";

export function createLintCommand(ctx: Context) {
return createCommand("lint")
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/program/commands/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createCommand } from "commander";
import type { Context } from "~/services/ctx";
import type { Context } from "#/services/ctx";

export function createRunCommand(ctx: Context) {
const program = createCommand("run")
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/src/program/commands/tools.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createCommand } from "commander";
import { BiomeService } from "~/services/biome";
import type { Context } from "~/services/ctx";
import { BiomeService } from "#/services/biome";
import type { Context } from "#/services/ctx";

function createToolCommand(toolBin: string) {
// biome-ignore format: I prefer multi-line here
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/src/program/commands/typecheck.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Project } from "@vlandoss/clibuddy";
import { createCommand } from "commander";
import type { Context } from "~/services/ctx";
import { logger } from "~/services/logger";
import type { Context } from "#/services/ctx";
import { logger } from "#/services/logger";

export function createTypecheckCommand(ctx: Context) {
return createCommand("tsc")
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/program/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getVersion } from "@vlandoss/clibuddy";
import { createCommand } from "commander";
import { createContext } from "~/services/ctx";
import { createContext } from "#/services/ctx";
import { createCheckCommand } from "./commands/check";
import { createCleanCommand } from "./commands/clean";
import { createFormatCommand } from "./commands/format";
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/services/biome.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ShellService } from "@vlandoss/clibuddy";
import { gracefullBinDir } from "~/utils/gracefullBinDir";
import { gracefullBinDir } from "#/utils/gracefullBinDir";
import type { ToolService } from "./models";

export class BiomeService implements ToolService {
Expand Down
2 changes: 1 addition & 1 deletion packages/run-run/src/utils/gracefullBinDir.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "node:fs";
import path from "node:path";
import { logger } from "~/services/logger";
import { logger } from "#/services/logger";

export function gracefullBinDir(binPathResolver: () => string) {
try {
Expand Down
4 changes: 2 additions & 2 deletions packages/run-run/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"],
"test/*": ["./test/*"],
"#/*": ["./src/*"],
"#test/*": ["./test/*"],
"@vlandoss/*": ["../../packages/*/src"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/starter/plopfiles/plopfile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "node:path";
import type { NodePlopAPI } from "node-plop";
import { ConfigService } from "~/services/config";
import { ConfigService } from "#/services/config";
import { tsconfigPrompts } from "./prompts/tsconfig";

const validators = {
Expand Down
4 changes: 2 additions & 2 deletions packages/starter/src/actions/add.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger } from "~/services/logger";
import type { TemplateService } from "~/services/types";
import { logger } from "#/services/logger";
import type { TemplateService } from "#/services/types";
import type { AnyAction } from "./types";

type CreateOptions = {
Expand Down
4 changes: 2 additions & 2 deletions packages/starter/src/actions/init.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ShellService } from "@vlandoss/clibuddy";
import { logger } from "~/services/logger";
import type { TemplateService } from "~/services/types";
import { logger } from "#/services/logger";
import type { TemplateService } from "#/services/types";
import type { AnyAction } from "./types";

type ExecuteOptions = {
Expand Down
8 changes: 4 additions & 4 deletions packages/starter/src/program/commands/add.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { cwd } from "@vlandoss/clibuddy";
import { Argument, createCommand, Option } from "commander";
import { AddAction } from "~/actions/add";
import type { ContextValue } from "~/services/ctx";
import { logger } from "~/services/logger";
import { createPlopTemplateService } from "~/services/template";
import { AddAction } from "#/actions/add";
import type { ContextValue } from "#/services/ctx";
import { logger } from "#/services/logger";
import { createPlopTemplateService } from "#/services/template";

type AddOptions = {
dest: string;
Expand Down
8 changes: 4 additions & 4 deletions packages/starter/src/program/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { cwd } from "@vlandoss/clibuddy";
import { Argument, createCommand, Option } from "commander";
import { InitAction } from "~/actions/init";
import type { ContextValue } from "~/services/ctx";
import { logger } from "~/services/logger";
import { createPlopTemplateService } from "~/services/template";
import { InitAction } from "#/actions/init";
import type { ContextValue } from "#/services/ctx";
import { logger } from "#/services/logger";
import { createPlopTemplateService } from "#/services/template";

type InitOptions = {
dest: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/starter/src/program/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getVersion } from "@vlandoss/clibuddy";
import { Command } from "commander";
import { createContext } from "~/services/ctx";
import { createContext } from "#/services/ctx";
import { createAddCommand } from "./commands/add";
import { createInitCommand } from "./commands/init";
import { BANNER_TEXT } from "./ui";
Expand Down
2 changes: 1 addition & 1 deletion packages/starter/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"],
"#/*": ["./src/*"],
"@vlandoss/*": ["../../packages/*/src"]
}
}
Expand Down