secure-exec 0.0.1 → 0.1.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.
Files changed (112) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +7 -0
  3. package/dist/bridge/active-handles.d.ts +21 -0
  4. package/dist/bridge/active-handles.js +60 -0
  5. package/dist/bridge/child-process.d.ts +87 -0
  6. package/dist/bridge/child-process.js +523 -0
  7. package/dist/bridge/fs.d.ts +227 -0
  8. package/dist/bridge/fs.js +1572 -0
  9. package/dist/bridge/index.d.ts +10 -0
  10. package/dist/bridge/index.js +41 -0
  11. package/dist/bridge/module.d.ts +73 -0
  12. package/dist/bridge/module.js +329 -0
  13. package/dist/bridge/network.d.ts +208 -0
  14. package/dist/bridge/network.js +1117 -0
  15. package/dist/bridge/os.d.ts +13 -0
  16. package/dist/bridge/os.js +257 -0
  17. package/dist/bridge/polyfills.d.ts +2 -0
  18. package/dist/bridge/polyfills.js +12 -0
  19. package/dist/bridge/process.d.ts +64 -0
  20. package/dist/bridge/process.js +916 -0
  21. package/dist/bridge-loader.d.ts +1 -0
  22. package/dist/bridge-loader.js +2 -0
  23. package/dist/bridge-setup.d.ts +1 -0
  24. package/dist/bridge-setup.js +2 -0
  25. package/dist/bridge.js +10586 -0
  26. package/dist/browser/driver.d.ts +42 -0
  27. package/dist/browser/driver.js +263 -0
  28. package/dist/browser/index.d.ts +5 -0
  29. package/dist/browser/index.js +4 -0
  30. package/dist/browser/worker.d.ts +1 -0
  31. package/dist/browser/worker.js +3 -0
  32. package/dist/browser-runtime.d.ts +6 -0
  33. package/dist/browser-runtime.js +4 -0
  34. package/dist/esm-compiler.d.ts +1 -0
  35. package/dist/esm-compiler.js +2 -0
  36. package/dist/execution.d.ts +1 -0
  37. package/dist/execution.js +2 -0
  38. package/dist/fs-helpers.d.ts +2 -0
  39. package/dist/fs-helpers.js +1 -0
  40. package/dist/generated/isolate-runtime.d.ts +19 -0
  41. package/dist/generated/isolate-runtime.js +21 -0
  42. package/dist/generated/polyfills.d.ts +82 -0
  43. package/dist/generated/polyfills.js +82 -0
  44. package/dist/index.d.ts +15 -0
  45. package/dist/index.js +11 -0
  46. package/dist/isolate-runtime/apply-custom-global-policy.js +54 -0
  47. package/dist/isolate-runtime/apply-timing-mitigation-freeze.js +44 -0
  48. package/dist/isolate-runtime/apply-timing-mitigation-off.js +14 -0
  49. package/dist/isolate-runtime/bridge-attach.js +29 -0
  50. package/dist/isolate-runtime/bridge-initial-globals.js +78 -0
  51. package/dist/isolate-runtime/eval-script-result.js +8 -0
  52. package/dist/isolate-runtime/global-exposure-helpers.js +36 -0
  53. package/dist/isolate-runtime/init-commonjs-module-globals.js +28 -0
  54. package/dist/isolate-runtime/override-process-cwd.js +8 -0
  55. package/dist/isolate-runtime/override-process-env.js +8 -0
  56. package/dist/isolate-runtime/require-setup.js +606 -0
  57. package/dist/isolate-runtime/set-commonjs-file-globals.js +36 -0
  58. package/dist/isolate-runtime/set-stdin-data.js +10 -0
  59. package/dist/isolate-runtime/setup-dynamic-import.js +64 -0
  60. package/dist/isolate-runtime/setup-fs-facade.js +40 -0
  61. package/dist/isolate.d.ts +1 -0
  62. package/dist/isolate.js +2 -0
  63. package/dist/module-resolver.d.ts +1 -0
  64. package/dist/module-resolver.js +2 -0
  65. package/dist/node/bridge-setup.d.ts +1 -0
  66. package/dist/node/bridge-setup.js +2 -0
  67. package/dist/node/driver.d.ts +2 -0
  68. package/dist/node/driver.js +2 -0
  69. package/dist/node/esm-compiler.d.ts +1 -0
  70. package/dist/node/esm-compiler.js +2 -0
  71. package/dist/node/execution-driver.d.ts +2 -0
  72. package/dist/node/execution-driver.js +2 -0
  73. package/dist/node/execution-lifecycle.d.ts +1 -0
  74. package/dist/node/execution-lifecycle.js +2 -0
  75. package/dist/node/isolate-bootstrap.d.ts +2 -0
  76. package/dist/node/isolate-bootstrap.js +1 -0
  77. package/dist/node/module-access.d.ts +2 -0
  78. package/dist/node/module-access.js +2 -0
  79. package/dist/node/module-resolver.d.ts +1 -0
  80. package/dist/node/module-resolver.js +2 -0
  81. package/dist/package-bundler.d.ts +2 -0
  82. package/dist/package-bundler.js +1 -0
  83. package/dist/polyfills.d.ts +1 -0
  84. package/dist/polyfills.js +2 -0
  85. package/dist/python-runtime.d.ts +2 -0
  86. package/dist/python-runtime.js +2 -0
  87. package/dist/runtime-driver.d.ts +1 -0
  88. package/dist/runtime-driver.js +1 -0
  89. package/dist/runtime.d.ts +2 -0
  90. package/dist/runtime.js +2 -0
  91. package/dist/shared/api-types.d.ts +1 -0
  92. package/dist/shared/api-types.js +1 -0
  93. package/dist/shared/bridge-contract.d.ts +2 -0
  94. package/dist/shared/bridge-contract.js +1 -0
  95. package/dist/shared/console-formatter.d.ts +2 -0
  96. package/dist/shared/console-formatter.js +1 -0
  97. package/dist/shared/errors.d.ts +2 -0
  98. package/dist/shared/errors.js +1 -0
  99. package/dist/shared/esm-utils.d.ts +1 -0
  100. package/dist/shared/esm-utils.js +2 -0
  101. package/dist/shared/global-exposure.d.ts +2 -0
  102. package/dist/shared/global-exposure.js +1 -0
  103. package/dist/shared/in-memory-fs.d.ts +1 -0
  104. package/dist/shared/in-memory-fs.js +2 -0
  105. package/dist/shared/permissions.d.ts +1 -0
  106. package/dist/shared/permissions.js +2 -0
  107. package/dist/shared/require-setup.d.ts +1 -0
  108. package/dist/shared/require-setup.js +2 -0
  109. package/dist/types.d.ts +2 -0
  110. package/dist/types.js +1 -0
  111. package/package.json +51 -4
  112. package/index.js +0 -1
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ (() => {
3
+ // isolate-runtime/src/common/global-access.ts
4
+ function isObjectLike(value) {
5
+ return value !== null && (typeof value === "object" || typeof value === "function");
6
+ }
7
+
8
+ // isolate-runtime/src/common/global-exposure.ts
9
+ function defineRuntimeGlobalBinding(name, value, mutable) {
10
+ Object.defineProperty(globalThis, name, {
11
+ value,
12
+ writable: mutable,
13
+ configurable: mutable,
14
+ enumerable: true
15
+ });
16
+ }
17
+ function createRuntimeGlobalExposer(mutable) {
18
+ return (name, value) => {
19
+ defineRuntimeGlobalBinding(name, value, mutable);
20
+ };
21
+ }
22
+ function getRuntimeExposeCustomGlobal() {
23
+ if (typeof globalThis.__runtimeExposeCustomGlobal === "function") {
24
+ return globalThis.__runtimeExposeCustomGlobal;
25
+ }
26
+ return createRuntimeGlobalExposer(false);
27
+ }
28
+
29
+ // isolate-runtime/src/inject/setup-dynamic-import.ts
30
+ var __runtimeExposeCustomGlobal = getRuntimeExposeCustomGlobal();
31
+ var __dynamicImportConfig = globalThis.__runtimeDynamicImportConfig ?? {};
32
+ var __fallbackReferrer = typeof __dynamicImportConfig.referrerPath === "string" && __dynamicImportConfig.referrerPath.length > 0 ? __dynamicImportConfig.referrerPath : "/";
33
+ var __dynamicImportHandler = async function(specifier, fromPath) {
34
+ const request = String(specifier);
35
+ const referrer = typeof fromPath === "string" && fromPath.length > 0 ? fromPath : __fallbackReferrer;
36
+ const allowRequireFallback = request.endsWith(".cjs") || request.endsWith(".json");
37
+ const namespace = await globalThis._dynamicImport.apply(
38
+ void 0,
39
+ [request, referrer],
40
+ { result: { promise: true } }
41
+ );
42
+ if (namespace !== null) {
43
+ return namespace;
44
+ }
45
+ if (!allowRequireFallback) {
46
+ throw new Error("Cannot find module '" + request + "'");
47
+ }
48
+ const runtimeRequire = globalThis.require;
49
+ if (typeof runtimeRequire !== "function") {
50
+ throw new Error("Cannot find module '" + request + "'");
51
+ }
52
+ const mod = runtimeRequire(request);
53
+ const namespaceFallback = { default: mod };
54
+ if (isObjectLike(mod)) {
55
+ for (const key of Object.keys(mod)) {
56
+ if (!(key in namespaceFallback)) {
57
+ namespaceFallback[key] = mod[key];
58
+ }
59
+ }
60
+ }
61
+ return namespaceFallback;
62
+ };
63
+ __runtimeExposeCustomGlobal("__dynamicImport", __dynamicImportHandler);
64
+ })();
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ (() => {
3
+ // isolate-runtime/src/common/global-exposure.ts
4
+ function defineRuntimeGlobalBinding(name, value, mutable) {
5
+ Object.defineProperty(globalThis, name, {
6
+ value,
7
+ writable: mutable,
8
+ configurable: mutable,
9
+ enumerable: true
10
+ });
11
+ }
12
+ function createRuntimeGlobalExposer(mutable) {
13
+ return (name, value) => {
14
+ defineRuntimeGlobalBinding(name, value, mutable);
15
+ };
16
+ }
17
+ function getRuntimeExposeCustomGlobal() {
18
+ if (typeof globalThis.__runtimeExposeCustomGlobal === "function") {
19
+ return globalThis.__runtimeExposeCustomGlobal;
20
+ }
21
+ return createRuntimeGlobalExposer(false);
22
+ }
23
+
24
+ // isolate-runtime/src/inject/setup-fs-facade.ts
25
+ var __runtimeExposeCustomGlobal = getRuntimeExposeCustomGlobal();
26
+ var __fsFacade = {
27
+ readFile: globalThis._fsReadFile,
28
+ writeFile: globalThis._fsWriteFile,
29
+ readFileBinary: globalThis._fsReadFileBinary,
30
+ writeFileBinary: globalThis._fsWriteFileBinary,
31
+ readDir: globalThis._fsReadDir,
32
+ mkdir: globalThis._fsMkdir,
33
+ rmdir: globalThis._fsRmdir,
34
+ exists: globalThis._fsExists,
35
+ stat: globalThis._fsStat,
36
+ unlink: globalThis._fsUnlink,
37
+ rename: globalThis._fsRename
38
+ };
39
+ __runtimeExposeCustomGlobal("_fs", __fsFacade);
40
+ })();
@@ -0,0 +1 @@
1
+ export { DEFAULT_TIMING_MITIGATION, TIMEOUT_EXIT_CODE, TIMEOUT_ERROR_MESSAGE, ExecutionTimeoutError, createIsolate, getExecutionDeadlineMs, getExecutionRunOptions, runWithExecutionDeadline, isExecutionTimeoutError, } from "@secure-exec/node/internal/isolate";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/isolate.ts
2
+ export { DEFAULT_TIMING_MITIGATION, TIMEOUT_EXIT_CODE, TIMEOUT_ERROR_MESSAGE, ExecutionTimeoutError, createIsolate, getExecutionDeadlineMs, getExecutionRunOptions, runWithExecutionDeadline, isExecutionTimeoutError, } from "@secure-exec/node/internal/isolate";
@@ -0,0 +1 @@
1
+ export { BUILTIN_NAMED_EXPORTS, normalizeBuiltinSpecifier, getPathDir, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core — canonical source is packages/secure-exec-core/src/module-resolver.ts
2
+ export { BUILTIN_NAMED_EXPORTS, normalizeBuiltinSpecifier, getPathDir, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { emitConsoleEvent, setupConsole, setupRequire, setupESMGlobals, } from "@secure-exec/node/internal/bridge-setup";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/bridge-setup.ts
2
+ export { emitConsoleEvent, setupConsole, setupRequire, setupESMGlobals, } from "@secure-exec/node/internal/bridge-setup";
@@ -0,0 +1,2 @@
1
+ export { createDefaultNetworkAdapter, createNodeDriver, createNodeRuntimeDriverFactory, NodeFileSystem, NodeExecutionDriver, filterEnv, } from "@secure-exec/node";
2
+ export type { NodeDriverOptions, NodeRuntimeDriverFactoryOptions, ModuleAccessOptions, } from "@secure-exec/node";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/driver.ts
2
+ export { createDefaultNetworkAdapter, createNodeDriver, createNodeRuntimeDriverFactory, NodeFileSystem, NodeExecutionDriver, filterEnv, } from "@secure-exec/node";
@@ -0,0 +1 @@
1
+ export { compileESMModule, createESMResolver, runESM, isAlreadyInstantiatedModuleError, resolveDynamicImportNamespace, precompileDynamicImports, setupDynamicImport, } from "@secure-exec/node/internal/esm-compiler";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/esm-compiler.ts
2
+ export { compileESMModule, createESMResolver, runESM, isAlreadyInstantiatedModuleError, resolveDynamicImportNamespace, precompileDynamicImports, setupDynamicImport, } from "@secure-exec/node/internal/esm-compiler";
@@ -0,0 +1,2 @@
1
+ export { NodeExecutionDriver } from "@secure-exec/node/internal/execution-driver";
2
+ export type { NodeExecutionDriverOptions } from "@secure-exec/node/internal/isolate-bootstrap";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/execution-driver.ts
2
+ export { NodeExecutionDriver } from "@secure-exec/node/internal/execution-driver";
@@ -0,0 +1 @@
1
+ export { applyExecutionOverrides, initCommonJsModuleGlobals, setCommonJsFileGlobals, applyCustomGlobalExposurePolicy, awaitScriptResult, overrideProcessConfig, setStdinData, } from "@secure-exec/node/internal/execution-lifecycle";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/execution-lifecycle.ts
2
+ export { applyExecutionOverrides, initCommonJsModuleGlobals, setCommonJsFileGlobals, applyCustomGlobalExposurePolicy, awaitScriptResult, overrideProcessConfig, setStdinData, } from "@secure-exec/node/internal/execution-lifecycle";
@@ -0,0 +1,2 @@
1
+ export type { NodeExecutionDriverOptions, BudgetState, DriverDeps, } from "@secure-exec/node/internal/isolate-bootstrap";
2
+ export { DEFAULT_BRIDGE_BASE64_TRANSFER_BYTES, DEFAULT_ISOLATE_JSON_PAYLOAD_BYTES, MIN_CONFIGURED_PAYLOAD_BYTES, MAX_CONFIGURED_PAYLOAD_BYTES, PAYLOAD_LIMIT_ERROR_CODE, RESOURCE_BUDGET_ERROR_CODE, DEFAULT_SANDBOX_CWD, DEFAULT_SANDBOX_HOME, DEFAULT_SANDBOX_TMPDIR, PayloadLimitError, normalizePayloadLimit, getUtf8ByteLength, getBase64EncodedByteLength, assertPayloadByteLength, assertTextPayloadSize, createBudgetState, checkBridgeBudget, parseJsonWithLimit, getExecutionTimeoutMs, getTimingMitigation, polyfillCodeCache, polyfillNamedExportsCache, hostBuiltinNamedExportsCache, hostRequire, isValidExportName, getHostBuiltinNamedExports, } from "@secure-exec/node/internal/isolate-bootstrap";
@@ -0,0 +1 @@
1
+ export { DEFAULT_BRIDGE_BASE64_TRANSFER_BYTES, DEFAULT_ISOLATE_JSON_PAYLOAD_BYTES, MIN_CONFIGURED_PAYLOAD_BYTES, MAX_CONFIGURED_PAYLOAD_BYTES, PAYLOAD_LIMIT_ERROR_CODE, RESOURCE_BUDGET_ERROR_CODE, DEFAULT_SANDBOX_CWD, DEFAULT_SANDBOX_HOME, DEFAULT_SANDBOX_TMPDIR, PayloadLimitError, normalizePayloadLimit, getUtf8ByteLength, getBase64EncodedByteLength, assertPayloadByteLength, assertTextPayloadSize, createBudgetState, checkBridgeBudget, parseJsonWithLimit, getExecutionTimeoutMs, getTimingMitigation, polyfillCodeCache, polyfillNamedExportsCache, hostBuiltinNamedExportsCache, hostRequire, isValidExportName, getHostBuiltinNamedExports, } from "@secure-exec/node/internal/isolate-bootstrap";
@@ -0,0 +1,2 @@
1
+ export { ModuleAccessFileSystem } from "@secure-exec/node/internal/module-access";
2
+ export type { ModuleAccessOptions } from "@secure-exec/node/internal/module-access";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/module-access.ts
2
+ export { ModuleAccessFileSystem } from "@secure-exec/node/internal/module-access";
@@ -0,0 +1 @@
1
+ export { getNearestPackageType, getModuleFormat, shouldRunAsESM, resolveReferrerDirectory, resolveESMPath, } from "@secure-exec/node/internal/module-resolver";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/module-resolver.ts
2
+ export { getNearestPackageType, getModuleFormat, shouldRunAsESM, resolveReferrerDirectory, resolveESMPath, } from "@secure-exec/node/internal/module-resolver";
@@ -0,0 +1,2 @@
1
+ export type { ResolutionCache } from "@secure-exec/core";
2
+ export { createResolutionCache, resolveModule, loadFile, bundlePackage, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { createResolutionCache, resolveModule, loadFile, bundlePackage, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { bundlePolyfill, getAvailableStdlib, hasPolyfill, prebundleAllPolyfills, } from "@secure-exec/node/internal/polyfills";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/node — canonical source is packages/secure-exec-node/src/polyfills.ts
2
+ export { bundlePolyfill, getAvailableStdlib, hasPolyfill, prebundleAllPolyfills, } from "@secure-exec/node/internal/polyfills";
@@ -0,0 +1,2 @@
1
+ export { PythonRuntime } from "@secure-exec/core";
2
+ export type { PythonRuntimeOptions } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core — canonical source is packages/secure-exec-core/src/python-runtime.ts
2
+ export { PythonRuntime } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export type { DriverRuntimeConfig, NodeRuntimeDriver, NodeRuntimeDriverFactory, PythonRuntimeDriver, PythonRuntimeDriverFactory, ResourceBudgets, RuntimeDriver, RuntimeDriverFactory, RuntimeDriverOptions, SharedRuntimeDriver, SystemDriver, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { NodeRuntime } from "@secure-exec/core";
2
+ export type { NodeRuntimeOptions } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core — canonical source is packages/secure-exec-core/src/runtime.ts
2
+ export { NodeRuntime } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export type { ExecOptions, ExecResult, ExecutionStatus, OSConfig, ProcessConfig, PythonRunOptions, PythonRunResult, RunResult, StdioChannel, StdioEvent, StdioHook, TimingMitigation, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ 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, ProcessErrorBridgeRef, ProcessLogBridgeRef, RegisterHandleBridgeFn, RequireFromBridgeFn, ResolveModuleBridgeRef, RuntimeBridgeGlobalKey, ScheduleTimerBridgeRef, UnregisterHandleBridgeFn, ValueOf, } from "@secure-exec/core";
2
+ export { BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEYS, RUNTIME_BRIDGE_GLOBAL_KEY_LIST, RUNTIME_BRIDGE_GLOBAL_KEYS, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEY_LIST, HOST_BRIDGE_GLOBAL_KEYS, RUNTIME_BRIDGE_GLOBAL_KEY_LIST, RUNTIME_BRIDGE_GLOBAL_KEYS, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ export type { ConsoleSerializationBudget } from "@secure-exec/core";
2
+ export { DEFAULT_CONSOLE_SERIALIZATION_BUDGET, formatConsoleArgs, getConsoleSetupCode, safeStringifyConsoleValue, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { DEFAULT_CONSOLE_SERIALIZATION_BUDGET, formatConsoleArgs, getConsoleSetupCode, safeStringifyConsoleValue, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ export type { SystemError } from "@secure-exec/core";
2
+ export { createEaccesError, createEnosysError, createSystemError, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { createEaccesError, createEnosysError, createSystemError, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { extractCjsNamedExports, extractDynamicImportSpecifiers, isESM, transformDynamicImport, wrapCJSForESM, wrapCJSForESMWithModulePath, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core
2
+ export { extractCjsNamedExports, extractDynamicImportSpecifiers, isESM, transformDynamicImport, wrapCJSForESM, wrapCJSForESMWithModulePath, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ export type { CustomGlobalClassification, CustomGlobalInventoryEntry, } from "@secure-exec/core";
2
+ export { exposeCustomGlobal, exposeGlobalBinding, exposeMutableRuntimeStateGlobal, HARDENED_NODE_CUSTOM_GLOBALS, ISOLATE_GLOBAL_EXPOSURE_HELPER_SOURCE, MUTABLE_NODE_CUSTOM_GLOBALS, NODE_CUSTOM_GLOBAL_INVENTORY, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { exposeCustomGlobal, exposeGlobalBinding, exposeMutableRuntimeStateGlobal, HARDENED_NODE_CUSTOM_GLOBALS, ISOLATE_GLOBAL_EXPOSURE_HELPER_SOURCE, MUTABLE_NODE_CUSTOM_GLOBALS, NODE_CUSTOM_GLOBAL_INVENTORY, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { createInMemoryFileSystem, InMemoryFileSystem, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core
2
+ export { createInMemoryFileSystem, InMemoryFileSystem, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { allowAll, allowAllChildProcess, allowAllEnv, allowAllFs, allowAllNetwork, createCommandExecutorStub, createFsStub, createNetworkStub, envAccessAllowed, filterEnv, wrapCommandExecutor, wrapFileSystem, wrapNetworkAdapter, } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core
2
+ export { allowAll, allowAllChildProcess, allowAllEnv, allowAllFs, allowAllNetwork, createCommandExecutorStub, createFsStub, createNetworkStub, envAccessAllowed, filterEnv, wrapCommandExecutor, wrapFileSystem, wrapNetworkAdapter, } from "@secure-exec/core";
@@ -0,0 +1 @@
1
+ export { getRequireSetupCode } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ // Re-exported from @secure-exec/core
2
+ export { getRequireSetupCode } from "@secure-exec/core";
@@ -0,0 +1,2 @@
1
+ export type { ChildProcessAccessRequest, CommandExecutor, EnvAccessRequest, FsAccessRequest, NetworkAccessRequest, NetworkAdapter, NetworkServerAddress, NetworkServerListenOptions, NetworkServerRequest, NetworkServerResponse, PermissionCheck, PermissionDecision, Permissions, SpawnedProcess, VirtualDirEntry, VirtualFileSystem, VirtualStat, } from "@secure-exec/core";
2
+ export type { DriverRuntimeConfig, NodeRuntimeDriver, NodeRuntimeDriverFactory, PythonRuntimeDriver, PythonRuntimeDriverFactory, RuntimeDriver, RuntimeDriverFactory, RuntimeDriverOptions, SharedRuntimeDriver, SystemDriver, } from "@secure-exec/core";
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "secure-exec",
3
- "version": "0.0.1",
4
- "description": "Secure Exec SDK",
5
- "main": "index.js"
6
- }
3
+ "version": "0.1.0-rc.1",
4
+ "type": "module",
5
+ "license": "Apache-2.0",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/rivet-dev/secure-exec.git",
15
+ "directory": "packages/secure-exec"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "import": "./dist/index.js",
20
+ "types": "./dist/index.d.ts"
21
+ },
22
+ "./browser": {
23
+ "import": "./dist/browser-runtime.js",
24
+ "types": "./dist/browser-runtime.d.ts"
25
+ }
26
+ },
27
+ "dependencies": {
28
+ "@secure-exec/browser": "0.1.0-rc.1",
29
+ "@secure-exec/core": "0.1.0-rc.1",
30
+ "@secure-exec/node": "0.1.0-rc.1",
31
+ "@secure-exec/python": "0.1.0-rc.1"
32
+ },
33
+ "devDependencies": {
34
+ "@types/node": "^22.10.2",
35
+ "@vitest/browser": "^2.1.8",
36
+ "playwright": "^1.52.0",
37
+ "tsx": "^4.19.2",
38
+ "typescript": "^5.7.2",
39
+ "vitest": "^2.1.8"
40
+ },
41
+ "scripts": {
42
+ "check-types": "tsc --noEmit",
43
+ "check-types:test": "vitest --typecheck --run tests/types/",
44
+ "build": "tsc",
45
+ "test:test-suite": "vitest run tests/test-suite.test.ts tests/test-suite-python.test.ts",
46
+ "test:runtime-driver": "vitest run tests/runtime-driver/*.test.ts",
47
+ "test:integration:node": "pnpm run test:test-suite && pnpm run test:runtime-driver",
48
+ "test:integration:browser": "vitest run --config vitest.browser.config.ts tests/test-suite/node.test.ts tests/runtime-driver/browser/runtime.test.ts",
49
+ "test:project-matrix": "vitest run tests/project-matrix.test.ts",
50
+ "test": "vitest run",
51
+ "test:watch": "vitest"
52
+ }
53
+ }
package/index.js DELETED
@@ -1 +0,0 @@
1
- // placeholder