@realsee/dnalogel 3.78.1-alpha.1 → 3.79.0

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.
@@ -1,23 +1,28 @@
1
- import { isAbsoluteURL as s } from "./absoluteUrl.js";
2
- import { DEFAULT_STATIC_PREFIX as a } from "./defaultUrls.js";
3
- function m(o = a, t) {
1
+ import { isAbsoluteURL as c } from "./absoluteUrl.js";
2
+ import { DEFAULT_STATIC_PREFIX as f } from "./defaultUrls.js";
3
+ function l(o = f, t) {
4
4
  if (!t || typeof t != "string")
5
5
  return t || "";
6
6
  if (!o || typeof o != "string")
7
7
  return t;
8
8
  o.startsWith("//") && (o = "http:" + o);
9
9
  try {
10
- if (!s(t))
10
+ if (!c(t))
11
11
  return t;
12
12
  let e = t;
13
13
  t.startsWith("//") && (e = "http:" + t);
14
14
  const r = new URL(e);
15
- let n = o, i = r.protocol;
16
- return o.includes("://") ? n = new URL(o).hostname : o.startsWith("//") && (n = o.substring(2)), !n || n.trim() === "" ? t : (r.hostname = n, i !== r.protocol && (r.protocol = i), t.startsWith("//") ? r.toString().replace(/^https?:\/\//, "//") : r.toString());
15
+ let n = o, s = r.protocol, i;
16
+ if (o.includes("://")) {
17
+ const a = new URL(o);
18
+ n = a.hostname, i = a.port;
19
+ } else
20
+ o.startsWith("//") && (n = o.substring(2));
21
+ return !n || n.trim() === "" ? t : (r.hostname = n, i !== void 0 && (r.port = i), s !== r.protocol && (r.protocol = s), t.startsWith("//") ? r.toString().replace(/^https?:\/\//, "//") : r.toString());
17
22
  } catch (e) {
18
23
  return console.warn(`[replaceStaticPrefix] Invalid URL: ${t}`, e), t;
19
24
  }
20
25
  }
21
26
  export {
22
- m as replaceStaticPrefix
27
+ l as replaceStaticPrefix
23
28
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.78.1-alpha.1",
3
+ "version": "3.79.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "postpublish": "cnpm sync @realsee/dnalogel",
30
30
  "lint": "eslint . --ext .ts,.tsx,.js,.jsx,.svelte",
31
31
  "format": "prettier --write \"**/*.{ts,tsx,js,jsx,svelte,scss,css,md,json}\"",
32
- "test": "echo \"No tests configured\""
32
+ "test": "vitest run --config vitest.config.ts"
33
33
  },
34
34
  "files": [
35
35
  "libs",
@@ -72,6 +72,7 @@
72
72
  "glob": "^8.1.0",
73
73
  "hammerjs": "^2.0.8",
74
74
  "hotkeys-js": "^3.13.7",
75
+ "node-gyp": "11.5.0",
75
76
  "npm-run-all": "^4.1.5",
76
77
  "object-assign-deep": "0.4.0",
77
78
  "polyline-normals": "^2.0.2",