@useinsider/guido 1.0.3-beta.a04f37a → 1.0.3-beta.a058e8a

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.
@@ -0,0 +1,5 @@
1
+ const e = "insidethekube", s = "useinsider";
2
+ export {
3
+ e as KUBE_ENV_PREFIX,
4
+ s as PROD_ENV_PREFIX
5
+ };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.46.0" } }, s = {
1
+ const o = { stripo: { version: "2.42.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Environment constants
3
+ */
4
+ export declare const KUBE_ENV_PREFIX = "insidethekube";
5
+ export declare const PROD_ENV_PREFIX = "useinsider";
@@ -1,5 +1,8 @@
1
1
  /**
2
- * Gets the appropriate environment prefix by parsing from current hostname
3
- * Extracts environment prefix from domains by splitting hostname
2
+ * Checks if the current environment is Kube environment
3
+ */
4
+ export declare const isKubeEnvironment: () => boolean;
5
+ /**
6
+ * Gets the appropriate environment prefix for unsubscribe links
4
7
  */
5
8
  export declare const getEnvironmentPrefix: () => string;
@@ -1,4 +1,6 @@
1
- const n = () => window.location.hostname.split(".")[2];
1
+ import { KUBE_ENV_PREFIX as n, PROD_ENV_PREFIX as o } from "../enums/environment.js";
2
+ const t = () => window.location.hostname.includes(n), i = () => t() ? n : o;
2
3
  export {
3
- n as getEnvironmentPrefix
4
+ i as getEnvironmentPrefix,
5
+ t as isKubeEnvironment
4
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.3-beta.a04f37a",
3
+ "version": "1.0.3-beta.a058e8a",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "guido": {
85
85
  "stripo": {
86
- "version": "2.46.0"
86
+ "version": "2.42.0"
87
87
  }
88
88
  }
89
89
  }