Skip to content

Commit

Permalink
fix(wb): remove alias from docker-args
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Oct 3, 2023
1 parent 79c9855 commit a2d7c14
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 27 deletions.
2 changes: 0 additions & 2 deletions packages/wb/src/commands/buildIfNeeded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import chalk from 'chalk';
import type { ArgumentsCamelCase, CommandModule, InferredOptionTypes } from 'yargs';

import { project } from '../project.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
command: {
description: 'A build command',
type: 'string',
Expand Down
2 changes: 0 additions & 2 deletions packages/wb/src/commands/optimizeForDockerBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import type { PackageJson } from 'type-fest';
import type { CommandModule, InferredOptionTypes } from 'yargs';

import { project } from '../project.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
outside: {
description: 'Whether the optimization is executed outside a docker container or not',
type: 'boolean',
Expand Down
5 changes: 1 addition & 4 deletions packages/wb/src/commands/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import type { CommandModule, InferredOptionTypes } from 'yargs';
import { project } from '../project.js';
import { prismaScripts } from '../scripts/prismaScripts.js';
import { runWithSpawn } from '../scripts/run.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
} as const;
const builder = {} as const;

export const prismaCommand: CommandModule = {
command: 'prisma',
Expand Down
2 changes: 0 additions & 2 deletions packages/wb/src/commands/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import chalk from 'chalk';
import type { CommandModule, InferredOptionTypes } from 'yargs';

import { runWithSpawn } from '../scripts/run.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
retry: {
description: 'A maximum retry count',
type: 'number',
Expand Down
5 changes: 1 addition & 4 deletions packages/wb/src/commands/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ import type { ArgumentsCamelCase, CommandModule, InferredOptionTypes } from 'yar
import { project } from '../project.js';
import { promisePool } from '../promisePool.js';
import { runWithSpawn, runWithSpawnInParallel } from '../scripts/run.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
} as const;
const builder = {} as const;

export const setupCommand: CommandModule<unknown, InferredOptionTypes<typeof builder>> = {
command: 'setup',
Expand Down
6 changes: 3 additions & 3 deletions packages/wb/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ import { loadEnvironmentVariables } from '@willbooster/shared-lib-node/src';
import type { CommandModule, InferredOptionTypes } from 'yargs';

import { project } from '../project.js';
import { normalizeArgs, scriptOptionsBuilder } from '../scripts/builder.js';
import { normalizeArgs } from '../scripts/builder.js';
import type { BaseExecutionScripts } from '../scripts/execution/baseExecutionScripts.js';
import { blitzScripts } from '../scripts/execution/blitzScripts.js';
import { httpServerScripts } from '../scripts/execution/httpServerScripts.js';
import { nextScripts } from '../scripts/execution/nextScripts.js';
import { plainAppScripts } from '../scripts/execution/plainAppScripts.js';
import { remixScripts } from '../scripts/execution/remixScripts.js';
import { runWithSpawn } from '../scripts/run.js';
import type { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...scriptOptionsBuilder,
mode: {
description: 'Start mode: dev[elopment] (default) | staging | docker',
type: 'string',
alias: 'm',
},
} as const;

export const startCommand: CommandModule<unknown, InferredOptionTypes<typeof builder>> = {
export const startCommand: CommandModule<unknown, InferredOptionTypes<typeof builder & typeof sharedOptionsBuilder>> = {
command: 'start [args..]',
describe: 'Start app',
builder,
Expand Down
2 changes: 0 additions & 2 deletions packages/wb/src/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import { nextScripts } from '../scripts/execution/nextScripts.js';
import { plainAppScripts } from '../scripts/execution/plainAppScripts.js';
import { remixScripts } from '../scripts/execution/remixScripts.js';
import { runOnEachWorkspaceIfNeeded, runWithSpawn, runWithSpawnInParallel } from '../scripts/run.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
ci: {
description: 'Whether to run tests on CI',
type: 'boolean',
Expand Down
5 changes: 1 addition & 4 deletions packages/wb/src/commands/typecheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ import type { CommandModule, InferredOptionTypes } from 'yargs';

import { project } from '../project.js';
import { runWithSpawn } from '../scripts/run.js';
import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

const builder = {
...sharedOptionsBuilder,
} as const;
const builder = {} as const;

export const typeCheckCommand: CommandModule<unknown, InferredOptionTypes<typeof builder>> = {
command: 'typecheck',
Expand Down
4 changes: 0 additions & 4 deletions packages/wb/src/scripts/builder.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import type { ArgumentsCamelCase, InferredOptionTypes } from 'yargs';

import { sharedOptionsBuilder } from '../sharedOptionsBuilder.js';

export const scriptOptionsBuilder = {
...sharedOptionsBuilder,
watch: {
description: 'Whether to watch files',
type: 'boolean',
Expand All @@ -17,7 +14,6 @@ export const scriptOptionsBuilder = {
'docker-args': {
description: 'Arguments for "docker run"',
type: 'array',
alias: 'a',
default: [],
},
} as const;
Expand Down

0 comments on commit a2d7c14

Please sign in to comment.