Skip to content

Commit 6873dda

Browse files
committed
Use process module explicitly
1 parent 92e18e0 commit 6873dda

21 files changed

+33
-2
lines changed

bin/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env node
22
'use strict'
33

4+
const process = require('node:process')
5+
46
const constants = require('../dist/constants')
57

68
const { DIST_TYPE } = constants

src/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env node
22

3+
import process from 'node:process'
34
import { pathToFileURL } from 'node:url'
45

56
import { messageWithCauses, stackWithCauses } from 'pony-cause'

src/commands/cdxgen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { existsSync, promises as fs } from 'node:fs'
22
import path from 'node:path'
3+
import process from 'node:process'
34

45
import yargsParse from 'yargs-parser'
56
import colors from 'yoctocolors-cjs'

src/commands/info.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
import meow from 'meow'
24
import colors from 'yoctocolors-cjs'
35

src/commands/raw-npm.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
import spawn from '@npmcli/promise-spawn'
24
import meow from 'meow'
35

src/commands/raw-npx.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
import spawn from '@npmcli/promise-spawn'
24
import meow from 'meow'
35

src/commands/report/create.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'node:path'
2+
import process from 'node:process'
23

34
import { betterAjvErrors } from '@apideck/better-ajv-errors'
45
import meow from 'meow'

src/commands/report/view.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
import meow from 'meow'
24
import { ErrorWithCause } from 'pony-cause'
35
import colors from 'yoctocolors-cjs'

src/commands/scan/create.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { stdin as inputText, stdout as output } from 'node:process'
1+
import process from 'node:process'
22
import readline from 'node:readline/promises'
33

44
import meow from 'meow'
@@ -241,7 +241,10 @@ async function createFullScan(
241241
const link = colors.underline(colors.cyan(`${result.data.html_report_url}`))
242242
console.log(`Available at: ${link}`)
243243

244-
const rl = readline.createInterface({ input: inputText, output })
244+
const rl = readline.createInterface({
245+
input: process.stdin,
246+
output: process.stdout
247+
})
245248

246249
const answer = await rl.question(
247250
'Would you like to open it in your browser? (y/n)'

src/commands/threat-feed.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from 'node:process'
2+
13
// @ts-ignore
24
import ScreenWidget from 'blessed/lib/widgets/screen'
35
// @ts-ignore

0 commit comments

Comments
 (0)