@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @empiricalrun/test-run
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c64161: fix: rm -rf magic token, now using API key auth
8
+
3
9
  ## 0.7.7
4
10
 
5
11
  ### Patch Changes
@@ -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,CAiDA,CAAC"}
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: `weQPMWKT`,
21
+ Authorization: `Bearer ${process.env.EMPIRICALRUN_API_KEY}`,
18
22
  },
19
23
  });
20
24
  if (!resp.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-run",
3
- "version": "0.7.7",
3
+ "version": "0.8.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"