Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Jan 8, 2025
1 parent 8504b3b commit 468cb95
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Main script for building and running the playground.
*/

import fs from "node:fs"
import fsp from "node:fs/promises"
import path from "node:path"
import url from "node:url"
import http from "node:http"
import process from "node:process"
import child_process from "node:child_process"
import * as esbuild from "esbuild"
import * as fs from "node:fs"

Check failure on line 6 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:fs' or its corresponding type declarations.
import * as fsp from "node:fs/promises"

Check failure on line 7 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:fs/promises' or its corresponding type declarations.
import * as path from "node:path"

Check failure on line 8 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:path' or its corresponding type declarations.
import * as url from "node:url"

Check failure on line 9 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:url' or its corresponding type declarations.
import * as http from "node:http"

Check failure on line 10 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:http' or its corresponding type declarations.
import * as process from "node:process"

Check failure on line 11 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:process' or its corresponding type declarations.
import * as cp from "node:child_process"

Check failure on line 12 in main.js

View workflow job for this annotation

GitHub Actions / build_test

Cannot find module 'node:child_process' or its corresponding type declarations.
import * as esbuild from "esbuild"

import {
DIST_DIRNAME, CONFIG_FILENAME, HTTP_PORT, PACKAGE_DIRNAME, PLAYGROUND_DIRNAME,
Expand Down Expand Up @@ -353,11 +353,11 @@ command_handler(args.slice(1))

/**
@param {string[]} args
@param {(fs.ObjectEncodingOptions & child_process.ExecFileOptions) | undefined | null} options
@returns {child_process.ChildProcess} */
@param {(fs.ObjectEncodingOptions & cp.ExecFileOptions) | undefined | null} options
@returns {cp.ChildProcess} */
function exec(args, options) {

let process = child_process.execFile(args[0], args.slice(1), options)
let process = cp.execFile(args[0], args.slice(1), options)

console.log("\x1b[90m"+"$ odin "+args.join(" ")+"\x1b[0m")

Expand Down Expand Up @@ -616,7 +616,7 @@ function unsafePromiseToBool(/** @type {Promise<any>} */ promise) {
}

/** @returns {Promise<number>} Exit code */
function childProcessToPromise(/** @type {child_process.ChildProcess} */ child) {
function childProcessToPromise(/** @type {cp.ChildProcess} */ child) {
return new Promise(resolve => {
void child.on("close", resolve)
})
Expand Down

0 comments on commit 468cb95

Please sign in to comment.