@secure-exec/core 0.1.1-rc.2 → 0.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm-compiler.d.ts +5 -1
- package/dist/esm-compiler.js +5 -1
- package/dist/fs-helpers.d.ts +1 -1
- package/dist/generated/isolate-runtime.d.ts +15 -15
- package/dist/generated/isolate-runtime.js +15 -15
- package/dist/index.d.ts +25 -6
- package/dist/index.js +23 -3
- package/dist/isolate-runtime/apply-custom-global-policy.js +3 -3
- package/dist/isolate-runtime/apply-timing-mitigation-freeze.js +10 -8
- package/dist/isolate-runtime/apply-timing-mitigation-off.js +2 -2
- package/dist/isolate-runtime/bridge-attach.js +2 -2
- package/dist/isolate-runtime/bridge-initial-globals.js +3 -3
- package/dist/isolate-runtime/eval-script-result.js +1 -1
- package/dist/isolate-runtime/global-exposure-helpers.js +2 -2
- package/dist/isolate-runtime/init-commonjs-module-globals.js +2 -2
- package/dist/isolate-runtime/override-process-cwd.js +1 -1
- package/dist/isolate-runtime/override-process-env.js +1 -1
- package/dist/isolate-runtime/require-setup.js +2236 -19
- package/dist/isolate-runtime/set-commonjs-file-globals.js +2 -2
- package/dist/isolate-runtime/set-stdin-data.js +1 -1
- package/dist/isolate-runtime/setup-dynamic-import.js +47 -15
- package/dist/isolate-runtime/setup-fs-facade.js +2 -2
- package/dist/kernel/command-registry.d.ts +44 -0
- package/dist/kernel/command-registry.js +114 -0
- package/dist/kernel/device-layer.d.ts +12 -0
- package/dist/kernel/device-layer.js +262 -0
- package/dist/kernel/dns-cache.d.ts +29 -0
- package/dist/kernel/dns-cache.js +52 -0
- package/dist/kernel/fd-table.d.ts +84 -0
- package/dist/kernel/fd-table.js +278 -0
- package/dist/kernel/file-lock.d.ts +34 -0
- package/dist/kernel/file-lock.js +123 -0
- package/dist/kernel/host-adapter.d.ts +50 -0
- package/dist/kernel/host-adapter.js +8 -0
- package/dist/kernel/index.d.ts +36 -0
- package/dist/kernel/index.js +34 -0
- package/dist/kernel/inode-table.d.ts +43 -0
- package/dist/kernel/inode-table.js +85 -0
- package/dist/kernel/kernel.d.ts +9 -0
- package/dist/kernel/kernel.js +1396 -0
- package/dist/kernel/permissions.d.ts +27 -0
- package/dist/kernel/permissions.js +118 -0
- package/dist/kernel/pipe-manager.d.ts +64 -0
- package/dist/kernel/pipe-manager.js +267 -0
- package/dist/kernel/proc-layer.d.ts +11 -0
- package/dist/kernel/proc-layer.js +501 -0
- package/dist/kernel/process-table.d.ts +124 -0
- package/dist/kernel/process-table.js +631 -0
- package/dist/kernel/pty.d.ts +108 -0
- package/dist/kernel/pty.js +541 -0
- package/dist/kernel/socket-table.d.ts +305 -0
- package/dist/kernel/socket-table.js +1124 -0
- package/dist/kernel/timer-table.d.ts +54 -0
- package/dist/kernel/timer-table.js +108 -0
- package/dist/kernel/types.d.ts +500 -0
- package/dist/kernel/types.js +89 -0
- package/dist/kernel/user.d.ts +29 -0
- package/dist/kernel/user.js +35 -0
- package/dist/kernel/vfs.d.ts +54 -0
- package/dist/kernel/vfs.js +8 -0
- package/dist/kernel/wait.d.ts +45 -0
- package/dist/kernel/wait.js +112 -0
- package/dist/kernel/wstatus.d.ts +21 -0
- package/dist/kernel/wstatus.js +33 -0
- package/dist/module-resolver.d.ts +4 -0
- package/dist/module-resolver.js +4 -0
- package/dist/package-bundler.d.ts +6 -1
- package/dist/runtime-driver.d.ts +3 -1
- package/dist/shared/bridge-contract.d.ts +529 -94
- package/dist/shared/bridge-contract.js +86 -3
- package/dist/shared/console-formatter.js +4 -0
- package/dist/shared/global-exposure.js +345 -0
- package/dist/shared/in-memory-fs.d.ts +30 -11
- package/dist/shared/in-memory-fs.js +383 -109
- package/dist/shared/permissions.d.ts +4 -6
- package/dist/shared/permissions.js +24 -28
- package/dist/types.d.ts +20 -130
- package/dist/types.js +5 -0
- package/package.json +12 -22
- package/dist/bridge/active-handles.d.ts +0 -22
- package/dist/bridge/active-handles.js +0 -55
- package/dist/bridge/child-process.d.ts +0 -99
- package/dist/bridge/child-process.js +0 -656
- package/dist/bridge/fs.d.ts +0 -281
- package/dist/bridge/fs.js +0 -2231
- package/dist/bridge/index.d.ts +0 -10
- package/dist/bridge/index.js +0 -41
- package/dist/bridge/module.d.ts +0 -75
- package/dist/bridge/module.js +0 -299
- package/dist/bridge/network.d.ts +0 -250
- package/dist/bridge/network.js +0 -1433
- package/dist/bridge/os.d.ts +0 -13
- package/dist/bridge/os.js +0 -256
- package/dist/bridge/polyfills.d.ts +0 -2
- package/dist/bridge/polyfills.js +0 -11
- package/dist/bridge/process.d.ts +0 -89
- package/dist/bridge/process.js +0 -994
- package/dist/bridge.js +0 -11766
- package/dist/python-runtime.d.ts +0 -16
- package/dist/python-runtime.js +0 -45
- package/dist/runtime.d.ts +0 -31
- package/dist/runtime.js +0 -69
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createKernel } from "./kernel/kernel.js";
|
|
2
|
+
export type { Kernel, KernelOptions, KernelInterface, ExecOptions as KernelExecOptions, ExecResult as KernelExecResult, SpawnOptions as KernelSpawnOptions, ManagedProcess, RuntimeDriver as KernelRuntimeDriver, ProcessContext, DriverProcess, ProcessEntry, ProcessInfo, FDStat, FileDescription, FDEntry, Pipe, PermissionDecision, PermissionCheck, FsAccessRequest, NetworkAccessRequest, ChildProcessAccessRequest, EnvAccessRequest, KernelErrorCode, Termios, TermiosCC, OpenShellOptions, ShellHandle, ConnectTerminalOptions, Permissions, } from "./kernel/types.js";
|
|
3
|
+
export { KernelError, defaultTermios } from "./kernel/types.js";
|
|
4
|
+
export type { VirtualFileSystem, VirtualDirEntry, VirtualStat, } from "./kernel/vfs.js";
|
|
5
|
+
export { FDTableManager, ProcessFDTable } from "./kernel/fd-table.js";
|
|
6
|
+
export { ProcessTable } from "./kernel/process-table.js";
|
|
7
|
+
export { TimerTable } from "./kernel/timer-table.js";
|
|
8
|
+
export type { KernelTimer, TimerTableOptions } from "./kernel/timer-table.js";
|
|
9
|
+
export { createDeviceLayer } from "./kernel/device-layer.js";
|
|
10
|
+
export { createProcLayer, createProcessScopedFileSystem, resolveProcSelfPath, } from "./kernel/proc-layer.js";
|
|
11
|
+
export { PipeManager } from "./kernel/pipe-manager.js";
|
|
12
|
+
export { PtyManager } from "./kernel/pty.js";
|
|
13
|
+
export type { LineDisciplineConfig } from "./kernel/pty.js";
|
|
14
|
+
export { CommandRegistry } from "./kernel/command-registry.js";
|
|
15
|
+
export { FileLockManager, LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB } from "./kernel/file-lock.js";
|
|
16
|
+
export { UserManager } from "./kernel/user.js";
|
|
17
|
+
export type { UserConfig } from "./kernel/user.js";
|
|
18
|
+
export { SocketTable } from "./kernel/socket-table.js";
|
|
19
|
+
export { AF_INET, AF_INET6, AF_UNIX, SOCK_STREAM, SOCK_DGRAM, } from "./kernel/socket-table.js";
|
|
20
|
+
export type { HostNetworkAdapter, HostSocket, HostListener, HostUdpSocket, DnsResult, } from "./kernel/host-adapter.js";
|
|
21
|
+
export { checkChildProcess } from "./kernel/permissions.js";
|
|
22
|
+
export { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_CLOEXEC, F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_DUPFD_CLOEXEC, FD_CLOEXEC, SEEK_SET, SEEK_CUR, SEEK_END, FILETYPE_UNKNOWN, FILETYPE_CHARACTER_DEVICE, FILETYPE_DIRECTORY, FILETYPE_REGULAR_FILE, FILETYPE_SYMBOLIC_LINK, FILETYPE_PIPE, SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGPIPE, SIGALRM, SIGTERM, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGWINCH, WNOHANG, } from "./kernel/types.js";
|
|
23
|
+
export { encodeExitStatus, encodeSignalStatus, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, } from "./kernel/wstatus.js";
|
|
24
|
+
export type { CommandExecutor, NetworkAdapter, NetworkServerAddress, NetworkServerListenOptions, NetworkServerRequest, NetworkServerResponse, SpawnedProcess, } from "./types.js";
|
|
2
25
|
export type { DriverRuntimeConfig, NodeRuntimeDriver, NodeRuntimeDriverFactory, PythonRuntimeDriver, PythonRuntimeDriverFactory, ResourceBudgets, RuntimeDriver, RuntimeDriverFactory, RuntimeDriverOptions, SharedRuntimeDriver, SystemDriver, } from "./runtime-driver.js";
|
|
3
26
|
export type { ExecOptions, ExecResult, ExecutionStatus, OSConfig, ProcessConfig, PythonRunOptions, PythonRunResult, RunResult, StdioChannel, StdioEvent, StdioHook, TimingMitigation, } from "./shared/api-types.js";
|
|
4
27
|
export { TIMEOUT_EXIT_CODE, TIMEOUT_ERROR_MESSAGE, } from "./shared/constants.js";
|
|
@@ -10,17 +33,13 @@ export { extractCjsNamedExports, extractDynamicImportSpecifiers, isESM, transfor
|
|
|
10
33
|
export { getRequireSetupCode } from "./shared/require-setup.js";
|
|
11
34
|
export type { ConsoleSerializationBudget } from "./shared/console-formatter.js";
|
|
12
35
|
export { DEFAULT_CONSOLE_SERIALIZATION_BUDGET, formatConsoleArgs, getConsoleSetupCode, safeStringifyConsoleValue, } from "./shared/console-formatter.js";
|
|
13
|
-
export type { BridgeGlobalKey, ChildProcessKillBridgeRef, ChildProcessSpawnStartBridgeRef, ChildProcessSpawnSyncBridgeRef, ChildProcessStdinCloseBridgeRef, ChildProcessStdinWriteBridgeRef, CryptoRandomFillBridgeRef, CryptoRandomUuidBridgeRef, DynamicImportBridgeRef, FsChmodBridgeRef, FsChownBridgeRef, FsExistsBridgeRef, FsFacadeBridge, FsLinkBridgeRef, FsLstatBridgeRef, FsMkdirBridgeRef, FsReadDirBridgeRef, FsReadFileBinaryBridgeRef, FsReadFileBridgeRef, FsReadlinkBridgeRef, FsRenameBridgeRef, FsRmdirBridgeRef, FsStatBridgeRef, FsSymlinkBridgeRef, FsTruncateBridgeRef, FsUnlinkBridgeRef, FsUtimesBridgeRef, FsWriteFileBinaryBridgeRef, FsWriteFileBridgeRef, HostBridgeGlobalKey, LoadFileBridgeRef, LoadPolyfillBridgeRef, ModuleCacheBridgeRecord, NetworkDnsLookupRawBridgeRef, NetworkFetchRawBridgeRef, NetworkHttpRequestRawBridgeRef, NetworkHttpServerCloseRawBridgeRef, NetworkHttpServerListenRawBridgeRef, ProcessErrorBridgeRef, ProcessLogBridgeRef, RegisterHandleBridgeFn, RequireFromBridgeFn, ResolveModuleBridgeRef, RuntimeBridgeGlobalKey, ScheduleTimerBridgeRef, UnregisterHandleBridgeFn, ValueOf, } from "./shared/bridge-contract.js";
|
|
36
|
+
export type { BridgeApplyRef, BridgeApplySyncPromiseRef, BridgeApplySyncRef, BridgeGlobalKey, ChildProcessKillBridgeRef, ChildProcessSpawnStartBridgeRef, ChildProcessSpawnSyncBridgeRef, ChildProcessStdinCloseBridgeRef, ChildProcessStdinWriteBridgeRef, CryptoRandomFillBridgeRef, CryptoRandomUuidBridgeRef, DynamicImportBridgeRef, FsChmodBridgeRef, FsChownBridgeRef, FsExistsBridgeRef, FsFacadeBridge, FsLinkBridgeRef, FsLstatBridgeRef, FsMkdirBridgeRef, FsReadDirBridgeRef, FsReadFileBinaryBridgeRef, FsReadFileBridgeRef, FsReadlinkBridgeRef, FsRenameBridgeRef, FsRmdirBridgeRef, FsStatBridgeRef, FsSymlinkBridgeRef, FsTruncateBridgeRef, FsUnlinkBridgeRef, FsUtimesBridgeRef, FsWriteFileBinaryBridgeRef, FsWriteFileBridgeRef, HostBridgeGlobalKey, LoadFileBridgeRef, LoadPolyfillBridgeRef, ModuleCacheBridgeRecord, NetworkDnsLookupRawBridgeRef, NetworkFetchRawBridgeRef, NetworkHttpRequestRawBridgeRef, NetworkHttpServerCloseRawBridgeRef, NetworkHttpServerListenRawBridgeRef, UpgradeSocketWriteRawBridgeRef, UpgradeSocketEndRawBridgeRef, UpgradeSocketDestroyRawBridgeRef, ProcessErrorBridgeRef, ProcessLogBridgeRef, RegisterHandleBridgeFn, RequireFromBridgeFn, ResolveModuleBridgeRef, RuntimeBridgeGlobalKey, ScheduleTimerBridgeRef, UnregisterHandleBridgeFn, ValueOf, } from "./shared/bridge-contract.js";
|
|
14
37
|
export { BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEYS, RUNTIME_BRIDGE_GLOBAL_KEY_LIST, RUNTIME_BRIDGE_GLOBAL_KEYS, } from "./shared/bridge-contract.js";
|
|
15
38
|
export type { CustomGlobalClassification, CustomGlobalInventoryEntry, } from "./shared/global-exposure.js";
|
|
16
39
|
export { exposeCustomGlobal, exposeGlobalBinding, exposeMutableRuntimeStateGlobal, HARDENED_NODE_CUSTOM_GLOBALS, ISOLATE_GLOBAL_EXPOSURE_HELPER_SOURCE, MUTABLE_NODE_CUSTOM_GLOBALS, NODE_CUSTOM_GLOBAL_INVENTORY, } from "./shared/global-exposure.js";
|
|
17
40
|
export type { IsolateRuntimeSourceId } from "./generated/isolate-runtime.js";
|
|
18
41
|
export { getIsolateRuntimeSource, ISOLATE_RUNTIME_SOURCES, } from "./generated/isolate-runtime.js";
|
|
19
42
|
export { POLYFILL_CODE_MAP } from "./generated/polyfills.js";
|
|
20
|
-
export { NodeRuntime } from "./runtime.js";
|
|
21
|
-
export type { NodeRuntimeOptions } from "./runtime.js";
|
|
22
|
-
export { PythonRuntime } from "./python-runtime.js";
|
|
23
|
-
export type { PythonRuntimeOptions } from "./python-runtime.js";
|
|
24
43
|
export type { DirEntry, StatInfo } from "./fs-helpers.js";
|
|
25
44
|
export { exists, stat, rename, readDirWithTypes, mkdir } from "./fs-helpers.js";
|
|
26
45
|
export { BUILTIN_NAMED_EXPORTS, normalizeBuiltinSpecifier, getPathDir, } from "./module-resolver.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
// Kernel — VFS, process table, FD table, device layer, pipes, PTY, command registry, permissions.
|
|
2
|
+
export { createKernel } from "./kernel/kernel.js";
|
|
3
|
+
export { KernelError, defaultTermios } from "./kernel/types.js";
|
|
4
|
+
// Kernel components.
|
|
5
|
+
export { FDTableManager, ProcessFDTable } from "./kernel/fd-table.js";
|
|
6
|
+
export { ProcessTable } from "./kernel/process-table.js";
|
|
7
|
+
export { TimerTable } from "./kernel/timer-table.js";
|
|
8
|
+
export { createDeviceLayer } from "./kernel/device-layer.js";
|
|
9
|
+
export { createProcLayer, createProcessScopedFileSystem, resolveProcSelfPath, } from "./kernel/proc-layer.js";
|
|
10
|
+
export { PipeManager } from "./kernel/pipe-manager.js";
|
|
11
|
+
export { PtyManager } from "./kernel/pty.js";
|
|
12
|
+
export { CommandRegistry } from "./kernel/command-registry.js";
|
|
13
|
+
export { FileLockManager, LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB } from "./kernel/file-lock.js";
|
|
14
|
+
export { UserManager } from "./kernel/user.js";
|
|
15
|
+
// Socket table (kernel TCP/UDP/Unix socket management).
|
|
16
|
+
export { SocketTable } from "./kernel/socket-table.js";
|
|
17
|
+
export { AF_INET, AF_INET6, AF_UNIX, SOCK_STREAM, SOCK_DGRAM, } from "./kernel/socket-table.js";
|
|
18
|
+
// Kernel permission helpers (kernel-level, different from SDK-level shared/permissions).
|
|
19
|
+
export { checkChildProcess } from "./kernel/permissions.js";
|
|
20
|
+
// Kernel constants.
|
|
21
|
+
export { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_CLOEXEC, F_DUPFD, F_GETFD, F_SETFD, F_GETFL, F_DUPFD_CLOEXEC, FD_CLOEXEC, SEEK_SET, SEEK_CUR, SEEK_END, FILETYPE_UNKNOWN, FILETYPE_CHARACTER_DEVICE, FILETYPE_DIRECTORY, FILETYPE_REGULAR_FILE, FILETYPE_SYMBOLIC_LINK, FILETYPE_PIPE, SIGHUP, SIGINT, SIGQUIT, SIGKILL, SIGPIPE, SIGALRM, SIGTERM, SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGWINCH, WNOHANG, } from "./kernel/types.js";
|
|
22
|
+
// POSIX wstatus encoding/decoding.
|
|
23
|
+
export { encodeExitStatus, encodeSignalStatus, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, } from "./kernel/wstatus.js";
|
|
1
24
|
// Shared constants.
|
|
2
25
|
export { TIMEOUT_EXIT_CODE, TIMEOUT_ERROR_MESSAGE, } from "./shared/constants.js";
|
|
3
26
|
// Shared utilities.
|
|
@@ -12,9 +35,6 @@ export { exposeCustomGlobal, exposeGlobalBinding, exposeMutableRuntimeStateGloba
|
|
|
12
35
|
export { getIsolateRuntimeSource, ISOLATE_RUNTIME_SOURCES, } from "./generated/isolate-runtime.js";
|
|
13
36
|
// Generated polyfills.
|
|
14
37
|
export { POLYFILL_CODE_MAP } from "./generated/polyfills.js";
|
|
15
|
-
// Runtime facades.
|
|
16
|
-
export { NodeRuntime } from "./runtime.js";
|
|
17
|
-
export { PythonRuntime } from "./python-runtime.js";
|
|
18
38
|
export { exists, stat, rename, readDirWithTypes, mkdir } from "./fs-helpers.js";
|
|
19
39
|
// Module resolution.
|
|
20
40
|
export { BUILTIN_NAMED_EXPORTS, normalizeBuiltinSpecifier, getPathDir, } from "./module-resolver.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-access.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-access.ts
|
|
4
4
|
function hasOwnGlobal(name) {
|
|
5
5
|
return Object.prototype.hasOwnProperty.call(globalThis, name);
|
|
6
6
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
return Reflect.get(globalThis, name);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
// isolate-runtime/src/common/global-exposure.ts
|
|
11
|
+
// ../core/isolate-runtime/src/common/global-exposure.ts
|
|
12
12
|
function defineRuntimeGlobalBinding(name, value, mutable) {
|
|
13
13
|
Object.defineProperty(globalThis, name, {
|
|
14
14
|
value,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
return createRuntimeGlobalExposer(true);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// isolate-runtime/src/inject/apply-custom-global-policy.ts
|
|
38
|
+
// ../core/isolate-runtime/src/inject/apply-custom-global-policy.ts
|
|
39
39
|
var __runtimeExposeCustomGlobal = getRuntimeExposeCustomGlobal();
|
|
40
40
|
var __runtimeExposeMutableGlobal = getRuntimeExposeMutableGlobal();
|
|
41
41
|
var __globalPolicy = globalThis.__runtimeCustomGlobalPolicy ?? {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-access.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-access.ts
|
|
4
4
|
function setGlobalValue(name, value) {
|
|
5
5
|
Reflect.set(globalThis, name, value);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
// isolate-runtime/src/inject/apply-timing-mitigation-freeze.ts
|
|
8
|
+
// ../core/isolate-runtime/src/inject/apply-timing-mitigation-freeze.ts
|
|
9
9
|
var __timingConfig = globalThis.__runtimeTimingMitigationConfig ?? {};
|
|
10
10
|
var __frozenTimeMs = typeof __timingConfig.frozenTimeMs === "number" && Number.isFinite(__timingConfig.frozenTimeMs) ? __timingConfig.frozenTimeMs : Date.now();
|
|
11
11
|
var __frozenDateNow = () => __frozenTimeMs;
|
|
12
12
|
try {
|
|
13
13
|
Object.defineProperty(Date, "now", {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
get: () => __frozenDateNow,
|
|
15
|
+
set: () => {
|
|
16
|
+
},
|
|
17
|
+
configurable: false
|
|
17
18
|
});
|
|
18
19
|
} catch {
|
|
19
20
|
Date.now = __frozenDateNow;
|
|
@@ -37,9 +38,10 @@
|
|
|
37
38
|
__FrozenDate.parse = __OrigDate.parse;
|
|
38
39
|
__FrozenDate.UTC = __OrigDate.UTC;
|
|
39
40
|
Object.defineProperty(__FrozenDate, "now", {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
get: () => __frozenDateNow,
|
|
42
|
+
set: () => {
|
|
43
|
+
},
|
|
44
|
+
configurable: false
|
|
43
45
|
});
|
|
44
46
|
try {
|
|
45
47
|
Object.defineProperty(globalThis, "Date", {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-access.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-access.ts
|
|
4
4
|
function setGlobalValue(name, value) {
|
|
5
5
|
Reflect.set(globalThis, name, value);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
// isolate-runtime/src/inject/apply-timing-mitigation-off.ts
|
|
8
|
+
// ../core/isolate-runtime/src/inject/apply-timing-mitigation-off.ts
|
|
9
9
|
if (typeof globalThis.performance === "undefined" || globalThis.performance === null) {
|
|
10
10
|
setGlobalValue("performance", {
|
|
11
11
|
now: () => Date.now()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-exposure.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-exposure.ts
|
|
4
4
|
function defineRuntimeGlobalBinding(name, value, mutable) {
|
|
5
5
|
Object.defineProperty(globalThis, name, {
|
|
6
6
|
value,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
return createRuntimeGlobalExposer(false);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// isolate-runtime/src/inject/bridge-attach.ts
|
|
24
|
+
// ../core/isolate-runtime/src/inject/bridge-attach.ts
|
|
25
25
|
var __runtimeExposeCustomGlobal = getRuntimeExposeCustomGlobal();
|
|
26
26
|
if (typeof globalThis.bridge !== "undefined") {
|
|
27
27
|
__runtimeExposeCustomGlobal("bridge", globalThis.bridge);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-exposure.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-exposure.ts
|
|
4
4
|
function defineRuntimeGlobalBinding(name, value, mutable) {
|
|
5
5
|
Object.defineProperty(globalThis, name, {
|
|
6
6
|
value,
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
return createRuntimeGlobalExposer(true);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// isolate-runtime/src/common/global-access.ts
|
|
24
|
+
// ../core/isolate-runtime/src/common/global-access.ts
|
|
25
25
|
function setGlobalValue(name, value) {
|
|
26
26
|
Reflect.set(globalThis, name, value);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// isolate-runtime/src/inject/bridge-initial-globals.ts
|
|
29
|
+
// ../core/isolate-runtime/src/inject/bridge-initial-globals.ts
|
|
30
30
|
var __runtimeExposeMutableGlobal = getRuntimeExposeMutableGlobal();
|
|
31
31
|
var __bridgeSetupConfig = globalThis.__runtimeBridgeSetupConfig ?? {};
|
|
32
32
|
var __initialCwd = typeof __bridgeSetupConfig.initialCwd === "string" ? __bridgeSetupConfig.initialCwd : "/";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/inject/eval-script-result.ts
|
|
3
|
+
// ../core/isolate-runtime/src/inject/eval-script-result.ts
|
|
4
4
|
var __runtimeIndirectEval = globalThis.eval;
|
|
5
5
|
globalThis.__scriptResult__ = __runtimeIndirectEval(
|
|
6
6
|
String(globalThis.__runtimeExecCode)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-exposure.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-exposure.ts
|
|
4
4
|
function defineRuntimeGlobalBinding(name, value, mutable) {
|
|
5
5
|
Object.defineProperty(globalThis, name, {
|
|
6
6
|
value,
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// isolate-runtime/src/inject/global-exposure-helpers.ts
|
|
34
|
+
// ../core/isolate-runtime/src/inject/global-exposure-helpers.ts
|
|
35
35
|
ensureRuntimeExposureHelpers();
|
|
36
36
|
})();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/common/global-exposure.ts
|
|
3
|
+
// ../core/isolate-runtime/src/common/global-exposure.ts
|
|
4
4
|
function defineRuntimeGlobalBinding(name, value, mutable) {
|
|
5
5
|
Object.defineProperty(globalThis, name, {
|
|
6
6
|
value,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
return createRuntimeGlobalExposer(true);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// isolate-runtime/src/inject/init-commonjs-module-globals.ts
|
|
24
|
+
// ../core/isolate-runtime/src/inject/init-commonjs-module-globals.ts
|
|
25
25
|
var __runtimeExposeMutableGlobal = getRuntimeExposeMutableGlobal();
|
|
26
26
|
__runtimeExposeMutableGlobal("module", { exports: {} });
|
|
27
27
|
__runtimeExposeMutableGlobal("exports", globalThis.module.exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// isolate-runtime/src/inject/override-process-env.ts
|
|
3
|
+
// ../core/isolate-runtime/src/inject/override-process-env.ts
|
|
4
4
|
var __envPatch = globalThis.__runtimeProcessEnvOverride;
|
|
5
5
|
if (__envPatch && typeof __envPatch === "object") {
|
|
6
6
|
Object.assign(process.env, __envPatch);
|