Skip to content

Commit

Permalink
feat(cloudflare): add missing process exports (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored Oct 15, 2024
1 parent 4685643 commit f32d35d
Showing 1 changed file with 25 additions and 47 deletions.
72 changes: 25 additions & 47 deletions src/runtime/node/process/$cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ import type nodeProcess from "node:process";
export {
_debugEnd,
_debugProcess,
// TODO: implemented yet in unenv
//_events,
_events,
_eventsCount,
// TODO: implemented yet in unenv
//_exiting,
_exiting,
_fatalException,
_getActiveHandles,
_getActiveRequests,
_kill,
// TODO: implemented yet in unenv
//_linkedBinding,
// TODO: implemented yet in unenv
//_maxListeners,
_linkedBinding,
_maxListeners,
_preload_modules,
_rawDebug,
_startProfilerIdleNotifier,
Expand All @@ -37,8 +33,7 @@ export {
cwd,
debugPort,
dlopen,
// TODO: implemented yet in unenv
//domain,
domain,
emit,
emitWarning,
eventNames,
Expand Down Expand Up @@ -101,19 +96,15 @@ export {
import {
_debugEnd,
_debugProcess,
// TODO: implemented yet in unenv
//_events,
_events,
_eventsCount,
// TODO: implemented yet in unenv
//_exiting,
_exiting,
_fatalException,
_getActiveHandles,
_getActiveRequests,
_kill,
// TODO: implemented yet in unenv
//_linkedBinding,
// TODO: implemented yet in unenv
//_maxListeners,
_linkedBinding,
_maxListeners,
_preload_modules,
_rawDebug,
_startProfilerIdleNotifier,
Expand All @@ -135,8 +126,7 @@ import {
cwd,
debugPort,
dlopen,
// TODO: implemented yet in unenv
//domain,
domain,
emit,
emitWarning,
eventNames,
Expand All @@ -154,28 +144,24 @@ import {
getuid,
hasUncaughtExceptionCaptureCallback,
hrtime,
// TODO: implemented yet in unenv
//initgroups,
initgroups,
kill,
listenerCount,
listeners,
loadEnvFile,
memoryUsage,
// TODO: implemented yet in unenv
//moduleLoadList,
moduleLoadList,
off,
on,
once,
// TODO: implemented yet in unenv
//openStdin,
openStdin,
pid,
platform,
ppid,
prependListener,
prependOnceListener,
rawListeners,
// TODO: implemented yet in unenv
//reallyExit,
reallyExit,
release,
removeAllListeners,
removeListener,
Expand Down Expand Up @@ -216,7 +202,8 @@ export const getBuiltinModule =

const workerdProcess = getBuiltinModule("node:process") as typeof nodeProcess;

// TODO: Ideally this list is not hardcoded but instead is generated when the preset is being generated in the `env()` call
// TODO: Ideally this list is not hardcoded but instead is generated when the preset is being
// generated in the `env()` call.
// This generation should use information from https://github.com/cloudflare/workerd/issues/2097
export const { env, nextTick } = workerdProcess;

Expand All @@ -227,19 +214,15 @@ const _process = {
// @ts-expect-error (not typed)
_debugEnd,
_debugProcess,
// TODO: implemented yet in unenv
//_events,
_events,
_eventsCount,
// TODO: implemented yet in unenv
//_exiting,
_exiting,
_fatalException,
_getActiveHandles,
_getActiveRequests,
_kill,
// TODO: implemented yet in unenv
//_linkedBinding,
// TODO: implemented yet in unenv
//_maxListeners,
_linkedBinding,
_maxListeners,
_preload_modules,
_rawDebug,
_startProfilerIdleNotifier,
Expand All @@ -261,8 +244,7 @@ const _process = {
cwd,
debugPort,
dlopen,
// TODO: implemented yet in unenv
//domain,
domain,
emit,
emitWarning,
eventNames,
Expand All @@ -280,28 +262,24 @@ const _process = {
getuid,
hasUncaughtExceptionCaptureCallback,
hrtime,
// TODO: implemented yet in unenv
//initgroups,
initgroups,
kill,
listenerCount,
listeners,
loadEnvFile,
memoryUsage,
// TODO: implemented yet in unenv
//moduleLoadList,
moduleLoadList,
off,
on,
once,
// TODO: implemented yet in unenv
//openStdin,
openStdin,
pid,
platform,
ppid,
prependListener,
prependOnceListener,
rawListeners,
// TODO: implemented yet in unenv
//reallyExit,
reallyExit,
release,
removeAllListeners,
removeListener,
Expand Down

0 comments on commit f32d35d

Please sign in to comment.