@secrecy/lib 1.41.0-feat-remove-me-domain.3 → 1.41.0-feat-remove-me-domain.4

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.
@@ -19,11 +19,12 @@ export function parseInfos() {
19
19
  }
20
20
  export const getUrl = ({ hash, path, }) => {
21
21
  const lang = document.documentElement.lang;
22
- const authUrl = process.env.NEXT_PUBLIC_VERCEL_URL
23
- ? `${process.env.NEXT_PUBLIC_VERCEL_URL}${lang}/auth`
24
- : `https://auth.secrecy.tech/${lang}`;
22
+ const protocol = process.env.NEXT_PUBLIC_VERCEL_ENV !== 'development' ? 'https' : 'http';
23
+ const url = process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production'
24
+ ? `${process.env.NEXT_PUBLIC_VERCEL_URL}/${lang}/auth`
25
+ : `auth.secrecy.tech/${lang}`;
25
26
  path = path.startsWith('/') ? path : `/${path}`;
26
- return `${authUrl}${path}#${hash}`;
27
+ return `${protocol}://${url}${path}#${hash}`;
27
28
  };
28
29
  export function getSecrecyClient(session) {
29
30
  const storage = getStorage(session);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.41.0-feat-remove-me-domain.3",
5
+ "version": "1.41.0-feat-remove-me-domain.4",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"
@@ -88,6 +88,5 @@
88
88
  "spark-md5": "^3.0.2",
89
89
  "superjson": "2.2.1",
90
90
  "zod": "3.23.8"
91
- },
92
- "packageManager": "pnpm@7.33.7+sha512.7afe2410642b39c698df46da4ce5c7231a5cce360698d69f8cf8f42257d40b3e43f231053b07b8de849fd4ffbf4a71ff57b835137777a352388f3d3da747200e"
91
+ }
93
92
  }