Skip to content

Commit ee4e947

Browse files
committed
chore: wip
1 parent d6114bc commit ee4e947

19 files changed

+78
-56
lines changed

packages/launchpad/src/commands/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,10 @@ const command: Command = {
367367

368368
if (args.action === 'get' || args.get) {
369369
const key = args.get
370+
if (!key) {
371+
console.error('Key is required for get operation')
372+
return 1
373+
}
370374
const val = getByPath(effectiveConfig, key)
371375
const out = val === undefined ? getByPath(defaultConfig, key) : val
372376

packages/launchpad/src/commands/dev.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Command } from '../cli/types'
2+
import process from 'node:process'
23

34
const cmd: Command = {
45
name: 'dev',

packages/launchpad/src/commands/find-project-root.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Command } from '../cli/types'
2+
import process from 'node:process'
23

34
const cmd: Command = {
45
name: 'find-project-root',
@@ -11,6 +12,7 @@ const cmd: Command = {
1112
try {
1213
const result = findProjectRoot(startDir)
1314
if (result) {
15+
// eslint-disable-next-line no-console
1416
console.log(result)
1517
return 0
1618
}

packages/launchpad/src/commands/install.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ async function installPackagesGlobally(packages: string[], options: { verbose?:
141141

142142
await createGlobalBinarySymlinks(globalEnvDir)
143143
// Skip shell integration in CI environments or if explicitly disabled
144-
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true' ||
145-
process.env.CI === 'true' ||
146-
process.env.GITHUB_ACTIONS === 'true'
144+
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true'
145+
|| process.env.CI === 'true'
146+
|| process.env.GITHUB_ACTIONS === 'true'
147147
if (!options.quiet && !options.noInteractive && !skipShellIntegration) {
148148
await ensureShellIntegrationInstalled()
149149
triggerShellGlobalRefresh()
@@ -376,7 +376,7 @@ async function installGlobalDependencies(options: { dryRun?: boolean, quiet?: bo
376376
try {
377377
process.env.LAUNCHPAD_SUPPRESS_INSTALL_SUMMARY = 'true'
378378
const pkgNames = ['php', 'php.net']
379-
const isListed = (val: unknown): boolean => {
379+
const _isListed = (val: unknown): boolean => {
380380
if (typeof val === 'string')
381381
return pkgNames.includes(val)
382382
if (Array.isArray(val))
@@ -509,9 +509,9 @@ const command: Command = {
509509
await createGlobalBinarySymlinks(basePath)
510510
}
511511
// Skip shell integration in CI environments or if explicitly disabled
512-
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true' ||
513-
process.env.CI === 'true' ||
514-
process.env.GITHUB_ACTIONS === 'true'
512+
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true'
513+
|| process.env.CI === 'true'
514+
|| process.env.GITHUB_ACTIONS === 'true'
515515
if (!skipShellIntegration) {
516516
await ensureShellIntegrationInstalled()
517517
triggerShellGlobalRefresh()
@@ -561,9 +561,9 @@ const command: Command = {
561561
await createGlobalBinarySymlinks(basePath)
562562
}
563563
// Skip shell integration in CI environments or if explicitly disabled
564-
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true' ||
565-
process.env.CI === 'true' ||
566-
process.env.GITHUB_ACTIONS === 'true'
564+
const skipShellIntegration = process.env.LAUNCHPAD_SKIP_SHELL_INTEGRATION === 'true'
565+
|| process.env.CI === 'true'
566+
|| process.env.GITHUB_ACTIONS === 'true'
567567
if (!skipShellIntegration) {
568568
await ensureShellIntegrationInstalled()
569569
triggerShellGlobalRefresh()

packages/launchpad/src/commands/md5.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable no-console */
22
import type { Command } from '../cli/types'
3+
import type { Buffer } from 'node:buffer'
34

45
const cmd: Command = {
56
name: 'md5',

packages/launchpad/src/commands/reinstall.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { config } from '../config'
66
const cmd: Command = {
77
name: 'reinstall',
88
description: 'Uninstall and reinstall packages',
9-
async run({ argv, env }) {
9+
async run({ argv, env: _env }) {
1010
const { uninstall } = await import('../uninstall')
1111
const { install } = await import('../install')
1212

1313
const verbose = argv.includes('--verbose')
1414
const force = argv.includes('--force')
1515
const dryRun = argv.includes('--dry-run')
1616
const global = argv.includes('--global') || argv.includes('-g')
17-
const depsOnly = argv.includes('--deps-only')
17+
const _depsOnly = argv.includes('--deps-only')
1818
const quiet = argv.includes('--quiet')
1919

2020
// Extract path option

packages/launchpad/src/commands/scan-library-paths.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const cmd: Command = {
88
const envDir = argv[0]
99
try {
1010
const paths = await scanLibraryPaths(envDir)
11+
// eslint-disable-next-line no-console
1112
console.log(paths.join(':'))
1213
return 0
1314
}

packages/launchpad/src/commands/uninstall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Command } from '../cli/types'
44
const cmd: Command = {
55
name: 'uninstall',
66
description: 'Remove installed packages',
7-
async run({ argv, env }) {
7+
async run({ argv, env: _env }) {
88
const { uninstall } = await import('../uninstall')
99
const { config } = await import('../config')
1010

packages/launchpad/src/commands/upgrade.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function parseArgs(argv: string[]): { force: boolean, verbose: boolean, target?:
3434
return { force, verbose, target, release, dryRun }
3535
}
3636

37-
async function detectCurrentBinaryPath(verbose: boolean): Promise<string> {
37+
async function detectCurrentBinaryPath(_verbose: boolean): Promise<string> {
3838
// Try which launchpad
3939
try {
4040
const { execSync } = await import('node:child_process')

packages/launchpad/src/config-validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { LaunchpadConfig } from './types'
22
import fs from 'node:fs'
33
import path from 'node:path'
4+
import process from 'node:process'
45

56
export interface ValidationResult {
67
valid: boolean

0 commit comments

Comments
 (0)