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.
- package/LICENSE +191 -0
- package/README.md +7 -0
- package/dist/bridge/active-handles.d.ts +21 -0
- package/dist/bridge/active-handles.js +60 -0
- package/dist/bridge/child-process.d.ts +87 -0
- package/dist/bridge/child-process.js +523 -0
- package/dist/bridge/fs.d.ts +227 -0
- package/dist/bridge/fs.js +1572 -0
- package/dist/bridge/index.d.ts +10 -0
- package/dist/bridge/index.js +41 -0
- package/dist/bridge/module.d.ts +73 -0
- package/dist/bridge/module.js +329 -0
- package/dist/bridge/network.d.ts +208 -0
- package/dist/bridge/network.js +1117 -0
- package/dist/bridge/os.d.ts +13 -0
- package/dist/bridge/os.js +257 -0
- package/dist/bridge/polyfills.d.ts +2 -0
- package/dist/bridge/polyfills.js +12 -0
- package/dist/bridge/process.d.ts +64 -0
- package/dist/bridge/process.js +916 -0
- package/dist/bridge-loader.d.ts +1 -0
- package/dist/bridge-loader.js +2 -0
- package/dist/bridge-setup.d.ts +1 -0
- package/dist/bridge-setup.js +2 -0
- package/dist/bridge.js +10586 -0
- package/dist/browser/driver.d.ts +42 -0
- package/dist/browser/driver.js +263 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.js +4 -0
- package/dist/browser/worker.d.ts +1 -0
- package/dist/browser/worker.js +3 -0
- package/dist/browser-runtime.d.ts +6 -0
- package/dist/browser-runtime.js +4 -0
- package/dist/esm-compiler.d.ts +1 -0
- package/dist/esm-compiler.js +2 -0
- package/dist/execution.d.ts +1 -0
- package/dist/execution.js +2 -0
- package/dist/fs-helpers.d.ts +2 -0
- package/dist/fs-helpers.js +1 -0
- package/dist/generated/isolate-runtime.d.ts +19 -0
- package/dist/generated/isolate-runtime.js +21 -0
- package/dist/generated/polyfills.d.ts +82 -0
- package/dist/generated/polyfills.js +82 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +11 -0
- package/dist/isolate-runtime/apply-custom-global-policy.js +54 -0
- package/dist/isolate-runtime/apply-timing-mitigation-freeze.js +44 -0
- package/dist/isolate-runtime/apply-timing-mitigation-off.js +14 -0
- package/dist/isolate-runtime/bridge-attach.js +29 -0
- package/dist/isolate-runtime/bridge-initial-globals.js +78 -0
- package/dist/isolate-runtime/eval-script-result.js +8 -0
- package/dist/isolate-runtime/global-exposure-helpers.js +36 -0
- package/dist/isolate-runtime/init-commonjs-module-globals.js +28 -0
- package/dist/isolate-runtime/override-process-cwd.js +8 -0
- package/dist/isolate-runtime/override-process-env.js +8 -0
- package/dist/isolate-runtime/require-setup.js +606 -0
- package/dist/isolate-runtime/set-commonjs-file-globals.js +36 -0
- package/dist/isolate-runtime/set-stdin-data.js +10 -0
- package/dist/isolate-runtime/setup-dynamic-import.js +64 -0
- package/dist/isolate-runtime/setup-fs-facade.js +40 -0
- package/dist/isolate.d.ts +1 -0
- package/dist/isolate.js +2 -0
- package/dist/module-resolver.d.ts +1 -0
- package/dist/module-resolver.js +2 -0
- package/dist/node/bridge-setup.d.ts +1 -0
- package/dist/node/bridge-setup.js +2 -0
- package/dist/node/driver.d.ts +2 -0
- package/dist/node/driver.js +2 -0
- package/dist/node/esm-compiler.d.ts +1 -0
- package/dist/node/esm-compiler.js +2 -0
- package/dist/node/execution-driver.d.ts +2 -0
- package/dist/node/execution-driver.js +2 -0
- package/dist/node/execution-lifecycle.d.ts +1 -0
- package/dist/node/execution-lifecycle.js +2 -0
- package/dist/node/isolate-bootstrap.d.ts +2 -0
- package/dist/node/isolate-bootstrap.js +1 -0
- package/dist/node/module-access.d.ts +2 -0
- package/dist/node/module-access.js +2 -0
- package/dist/node/module-resolver.d.ts +1 -0
- package/dist/node/module-resolver.js +2 -0
- package/dist/package-bundler.d.ts +2 -0
- package/dist/package-bundler.js +1 -0
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +2 -0
- package/dist/python-runtime.d.ts +2 -0
- package/dist/python-runtime.js +2 -0
- package/dist/runtime-driver.d.ts +1 -0
- package/dist/runtime-driver.js +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +2 -0
- package/dist/shared/api-types.d.ts +1 -0
- package/dist/shared/api-types.js +1 -0
- package/dist/shared/bridge-contract.d.ts +2 -0
- package/dist/shared/bridge-contract.js +1 -0
- package/dist/shared/console-formatter.d.ts +2 -0
- package/dist/shared/console-formatter.js +1 -0
- package/dist/shared/errors.d.ts +2 -0
- package/dist/shared/errors.js +1 -0
- package/dist/shared/esm-utils.d.ts +1 -0
- package/dist/shared/esm-utils.js +2 -0
- package/dist/shared/global-exposure.d.ts +2 -0
- package/dist/shared/global-exposure.js +1 -0
- package/dist/shared/in-memory-fs.d.ts +1 -0
- package/dist/shared/in-memory-fs.js +2 -0
- package/dist/shared/permissions.d.ts +1 -0
- package/dist/shared/permissions.js +2 -0
- package/dist/shared/require-setup.d.ts +1 -0
- package/dist/shared/require-setup.js +2 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +1 -0
- package/package.json +51 -4
- 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";
|
package/dist/isolate.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
export { getNearestPackageType, getModuleFormat, shouldRunAsESM, resolveReferrerDirectory, resolveESMPath, } from "@secure-exec/node/internal/module-resolver";
|
|
@@ -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 @@
|
|
|
1
|
+
export type { DriverRuntimeConfig, NodeRuntimeDriver, NodeRuntimeDriverFactory, PythonRuntimeDriver, PythonRuntimeDriverFactory, ResourceBudgets, RuntimeDriver, RuntimeDriverFactory, RuntimeDriverOptions, SharedRuntimeDriver, SystemDriver, } from "@secure-exec/core";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/runtime.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export { DEFAULT_CONSOLE_SERIALIZATION_BUDGET, formatConsoleArgs, getConsoleSetupCode, safeStringifyConsoleValue, } 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
|
+
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 @@
|
|
|
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";
|
package/dist/types.d.ts
ADDED
|
@@ -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
|
-
"
|
|
5
|
-
"
|
|
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
|