Lines Matching refs:url

23 const { pathToFileURL, isURL } = require('internal/url');
170 * url: URL['href'];
175 * load(url: string, context: object): Promise<LoadResult>
209 url = pathToFileURL(`${process.cwd()}/[eval${++this.evalIndex}]`).href,
211 const evalInstance = (url) => {
214 const module = new ModuleWrap(url, undefined, source, 0, 0);
217 initializeImportMeta: (meta, wrap) => this.importMetaInitialize(meta, { url }),
218 importModuleDynamically: (specifier, { url }, importAttributes) => {
219 return this.import(specifier, url, importAttributes);
227 this, url, undefined, evalInstance, false, false);
228 this.loadCache.set(url, undefined, job);
255 const { url, format } = resolveResult;
257 let job = this.loadCache.get(url, resolvedImportAttributes.type);
261 this.loadCache.set(url, undefined, job = job());
265 job = this.#createModuleJob(url, resolvedImportAttributes, parentURL, format);
273 * @param {string} url The absolute URL that was resolved for this module
282 #createModuleJob(url, importAttributes, parentURL, format) {
283 const moduleProvider = async (url, isMain) => {
288 } = await this.load(url, {
308 process.send({ 'watch:import': [url] });
314 url,
321 this.loadCache.set(url, importAttributes.type, job);
362 * @returns {{ format: string, url: URL['href'] }}
409 * @param {URL['href']} url The URL/path of the module to be loaded
413 async load(url, context) {
416 await this.#customizations.load(url, context) :
417 await defaultLoad(url, context);
418 this.validateLoadResult(url, result?.format);
422 validateLoadResult(url, format) {
424 require('internal/modules/esm/load').throwUnknownModuleFormat(url, format);
466 * @returns {{ format: string, url: URL['href'] }}
479 * @returns {{ format: string, url: URL['href'] }}
492 * @param {URL['href']} url The URL/path of the module to be loaded
496 load(url, context) {
497 return hooksProxy.makeAsyncRequest('load', undefined, url, context);
536 `--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; ${ArrayPrototypeJoin(
567 * @param {string|import('url').URL} specifier
568 * @param {string|import('url').URL} [parentURL] Base to use when resolving `specifier`; optional if
571 * @param {string|import('url').URL} [options.parentURL] Base to use when resolving `specifier`
578 * register('ts-node/esm', { parentURL: import.meta.url });
579 * register('./myLoader.js', { parentURL: import.meta.url });
580 * register('ts-node/esm', import.meta.url);
581 * register('./myLoader.js', import.meta.url);
582 * register(new URL('./myLoader.js', import.meta.url));
584 * parentURL: import.meta.url,
588 * parentURL: import.meta.url,