( spec: DenoSpecifier, )
| 327 | } |
| 328 | |
| 329 | function parseDenoSpecifier( |
| 330 | spec: DenoSpecifier, |
| 331 | ): { type: RequestedModuleType; specifier: string } { |
| 332 | const match = spec.match(/^\0deno::([^:]+)::(.*)$/)!; |
| 333 | |
| 334 | let specifier = match[2]; |
| 335 | |
| 336 | const specMatch = specifier.match(/^(\w+):\/([^/].*)$/); |
| 337 | if (specMatch !== null) { |
| 338 | const protocol = specMatch[1]; |
| 339 | |
| 340 | let rest = specMatch[2]; |
| 341 | if (protocol === "file") { |
| 342 | rest = "/" + rest; |
| 343 | } |
| 344 | |
| 345 | specifier = `${protocol}://${rest}`; |
| 346 | } |
| 347 | |
| 348 | if (path.isAbsolute(specifier)) { |
| 349 | specifier = path.toFileUrl(specifier).href; |
| 350 | } |
| 351 | |
| 352 | return { type: +match[1], specifier }; |
| 353 | } |
| 354 | |
| 355 | function getDenoType(id: string, type: string): RequestedModuleType { |
| 356 | switch (type) { |
nothing calls this directly
no outgoing calls
no test coverage detected