Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add flag to manpage
  • Loading branch information
islandryu committed Jul 9, 2025
commit 04d8ecac9633c41ec406e936d2c26c0c0a4daa62
3 changes: 3 additions & 0 deletions doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ Enable experimental WebAssembly module support.
.It Fl -experimental-quic
Enable the experimental QUIC support.
.
.It Fl -experimental-inspector-network-resource
Enable experimental support for inspector network resources.
.
.It Fl -force-context-aware
Disable loading native addons that are not context-aware.
.
Expand Down
5 changes: 3 additions & 2 deletions test/parallel/test-inspector-network-resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ const resourceUrl = 'http://localhost:3000/app.js';
const resourcePath = path.join(__dirname, '../fixtures/inspector-network-resource/app.js.map');

const resourceText = fs.readFileSync(resourcePath, 'utf8');
const embedPath = resourcePath.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
const script = `
const { NetworkResources } = require('node:inspector');
const fs = require('fs');
NetworkResources.put('${resourceUrl}', fs.readFileSync('${resourcePath.replace(/\\/g, '\\').replace(/'/g, "\\'")}', 'utf8'));
NetworkResources.put('${resourceUrl}', fs.readFileSync('${embedPath}', 'utf8'));
console.log('Network resource loaded:', '${resourceUrl}');
Comment thread
legendecas marked this conversation as resolved.
debugger;
`;
Expand Down Expand Up @@ -117,7 +118,7 @@ test('should load resource put from another thread', async () => {
const script = `
const { NetworkResources } = require('node:inspector');
const fs = require('fs');
Comment thread
legendecas marked this conversation as resolved.
NetworkResources.put('${resourceUrl}', fs.readFileSync('${resourcePath.replace(/\\/g, '\\').replace(/'/g, "\\'")}', 'utf8'));
NetworkResources.put('${resourceUrl}', fs.readFileSync('${embedPath}', 'utf8'));
const { Worker } = require('worker_threads');
const worker = new Worker(\`${workerScript}\`, {eval: true});
`;
Expand Down
Loading