@enhance-eng/sdk 0.1.161 → 0.1.165
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/README.md +5 -2
- package/dist/browser/kernel.iife.js +1719 -399
- package/dist/{capture-client.client-BM_NxOqy.mjs → capture-client.client-C_8yINru.mjs} +3 -3
- package/dist/{capture-context.lib-LXUORfkL.mjs → capture-context.lib-D4OEonRp.mjs} +2 -2
- package/dist/client.mjs +1 -1
- package/dist/environment.config-Ctm1VHM9.mjs +83 -0
- package/dist/index.mjs +2 -2
- package/dist/{package-BFIjCgBc.mjs → package-C-PfWfSh.mjs} +1 -1
- package/dist/playwright/index.mjs +175 -70
- package/dist/playwright/reporter.mjs +4 -4
- package/dist/{stall-watch.lib-DgIzqC3b.mjs → stall-watch.lib-JRTp4jPK.mjs} +468 -58
- package/package.json +3 -3
- package/dist/environment.config-BlBA4N5X.mjs +0 -34
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enhance-eng/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.165",
|
|
4
4
|
"description": "Capture editable customer journeys in Enhance from your tests.",
|
|
5
5
|
"homepage": "https://enhancelabs.ai",
|
|
6
6
|
"repository": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"typescript": "^5.9.3",
|
|
51
51
|
"vitest": "^4.1.10",
|
|
52
52
|
"@enhance3/capture-browser": "0.0.0",
|
|
53
|
+
"@enhance3/contract": "0.0.0",
|
|
53
54
|
"@enhance3/eslint-config": "0.0.0",
|
|
54
|
-
"@enhance3/tsconfig": "0.0.0"
|
|
55
|
-
"@enhance3/contract": "0.0.0"
|
|
55
|
+
"@enhance3/tsconfig": "0.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"@playwright/test": ">=1.62.0 <2"
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { S as captureError } from "./stall-watch.lib-DgIzqC3b.mjs";
|
|
2
|
-
import { t as version } from "./package-BFIjCgBc.mjs";
|
|
3
|
-
import { t as createEnhance$1 } from "./capture-client.client-BM_NxOqy.mjs";
|
|
4
|
-
import process from "node:process";
|
|
5
|
-
//#region src/node/environment.config.ts
|
|
6
|
-
const endpoints = {
|
|
7
|
-
local: "http://localhost:3000",
|
|
8
|
-
development: "https://api.enhance3.karunalabs.ai",
|
|
9
|
-
production: "https://api.enhancelabs.ai"
|
|
10
|
-
};
|
|
11
|
-
const captureConnection = (options) => {
|
|
12
|
-
const selected = options.environment ?? process.env["ENHANCE_ENVIRONMENT"];
|
|
13
|
-
if (selected !== void 0 && selected !== "local" && selected !== "development" && selected !== "production") throw captureError("configuration", "ENHANCE_ENVIRONMENT must be local, development, or production.");
|
|
14
|
-
const environment = selected ?? (version.includes("-dev.") ? "development" : "production");
|
|
15
|
-
const apiUrl = options.apiUrl ?? process.env["ENHANCE_API_URL"] ?? endpoints[environment];
|
|
16
|
-
if (selected !== void 0) {
|
|
17
|
-
const url = URL.parse(apiUrl);
|
|
18
|
-
if (!(url !== null && (environment === "local" ? [
|
|
19
|
-
"localhost",
|
|
20
|
-
"127.0.0.1",
|
|
21
|
-
"[::1]"
|
|
22
|
-
].includes(url.hostname) : url.origin === endpoints[environment]))) throw captureError("configuration", `The API URL does not match the ${environment} environment. Set its matching endpoint or remove the explicit environment to use a custom API.`);
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
apiUrl,
|
|
26
|
-
token: options.token ?? process.env["ENHANCE_TOKEN"] ?? ""
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
const createEnhance = (options = {}) => createEnhance$1({
|
|
30
|
-
...options,
|
|
31
|
-
...captureConnection(options)
|
|
32
|
-
});
|
|
33
|
-
//#endregion
|
|
34
|
-
export { createEnhance as t };
|