@empiricalrun/test-run 0.7.7 → 0.8.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.
- package/CHANGELOG.md +6 -0
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/dashboard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,wBAAwB,gBACtB,MAAM,mBACF,MAAM,KACtB,QAAQ;IACT,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,wBAAwB,gBACtB,MAAM,mBACF,MAAM,KACtB,QAAQ;IACT,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,CAuDA,CAAC"}
|
package/dist/dashboard.js
CHANGED
|
@@ -10,11 +10,15 @@ const DOMAIN = process.env.DASHBOARD_DOMAIN || "https://dash.empirical.run";
|
|
|
10
10
|
const fetchEnvironmentAndBuild = async (projectName, environmentSlug) => {
|
|
11
11
|
const projectRepo = (0, utils_1.buildRepoName)(projectName);
|
|
12
12
|
const data = await (0, async_retry_1.default)(async (bail) => {
|
|
13
|
+
if (!process.env.EMPIRICALRUN_API_KEY) {
|
|
14
|
+
console.error("No API token found. Skipping fetch environment and latest build from dashboard.");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
13
17
|
const resp = await fetch(`${DOMAIN}/api/environments?project_repo_name=${projectRepo}&environment_slug=${environmentSlug}`, {
|
|
14
18
|
method: "GET",
|
|
15
19
|
headers: {
|
|
16
20
|
"Content-Type": "application/json",
|
|
17
|
-
Authorization: `
|
|
21
|
+
Authorization: `Bearer ${process.env.EMPIRICALRUN_API_KEY}`,
|
|
18
22
|
},
|
|
19
23
|
});
|
|
20
24
|
if (!resp.ok) {
|