Lines 6539-6589javascript
6539 await fs23.writeFile(packageJsonPath, `{"type": "module"}`);
6540 const runtimeScriptPath = await this.developRemoteService.downloadRuntimeScript();
6541 await fs23.copy(runtimeScriptPath, path25.join(shadowAppDir, "runtime.js"), { overwrite: true });
6542 const indexJsPath = path25.join(shadowAppDir, "index.js");
6543 const faasJsRuntimeUrl = pathToFileURL(require2.resolve("faas-js-runtime")).href;
6544 await fs23.writeFile(
6547 import runtime from "${faasJsRuntimeUrl}";
6548 import { handle } from "./runtime.js";
6549 runtime.start((context,body)=>{
6550 console.log("[_NEXUS_SERVER_LOG_MESSAGE_]",JSON.stringify(body));
6551 return handle(context,body)
6552 }, { port: ${config.port} });
6557 async start(context, config) {
6558 const workspaceDir = context.paths?.workspaceDir;
6559 const bootstrapPath = await this.createShadowApp(context, config);
6562 pathToFileURL(require2.resolve("tsx")).href,
6563 "--enable-source-maps",
6567 path25.join(context.paths.workspaceDir, "src")
6570 execArgv.push("--inspect");
6572 const childProcess = fork(bootstrapPath, [], {
6578 NEXUS_RUNTIME_PORT: config.port.toString(),
6579 NEXUS_GATEWAY_ENDPOINT: `http://gateway.localhost:${config.tunnelInboundPort}`,
6580 NEXUS_FETCH_ENDPOINT: `http://fetch.localhost:${config.tunnelInboundPort}`,
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
index.jsView on unpkg · L6569 6581 NEXUS_COMMAND_OPTIONS_VERBOSE: config.verbose,
6582 NEXUS_RUNTIME_APP_CODE_DIR: path25.join(context.paths.workspaceDir, "src"),
6583 NEXUS_RUNTIME_LOG_DISABLED: "true",
6584 NEXUS_RUNTIME_IS_DEV_MODE: "true"
6587 const rl = readline.createInterface({
6588 input: childProcess.stdout,