doc-detective-common 3.4.0-dev.1 → 3.4.0-dev.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc-detective-common",
3
- "version": "3.4.0-dev.1",
3
+ "version": "3.4.0-dev.2",
4
4
  "description": "Shared components for Doc Detective projects.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -76,8 +76,14 @@ async function resolvePaths({
76
76
  * @returns {string} The absolute path corresponding to {@link relativePath}.
77
77
  *
78
78
  * @remark If {@link relativePath} is already absolute, it is returned unchanged. If {@link filePath} does not exist, its extension is used to infer whether it is a file or directory.
79
+ * @remark HTTP and HTTPS URLs are returned unchanged without resolution.
79
80
  */
80
81
  function resolve(baseType, relativePath, filePath) {
82
+ // If the path is an http:// or https:// URL, return it
83
+ if (relativePath.startsWith("https://") || relativePath.startsWith("http://")) {
84
+ return relativePath;
85
+ }
86
+
81
87
  // If path is already absolute, return it
82
88
  if (path.isAbsolute(relativePath)) {
83
89
  return relativePath;