@empiricalrun/playwright-utils 0.25.27 → 0.26.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,15 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 9c64161: fix: rm -rf magic token, now using API key auth
8
+
9
+ ### Patch Changes
10
+
11
+ - @empiricalrun/test-gen@0.54.1
12
+
3
13
  ## 0.25.27
4
14
 
5
15
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/reporter/util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;;AAEH,OAAO,EAAS,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAgB5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK9C,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAmB7D;AAED,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAAG,SAAS,UAMhC;AAED,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5E,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC,CAyCD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ;;;EA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AAC,GAAG,EAAE,MAAM,KAAK,OAAO,GACnC,GAAG,CAIL"}
@@ -28,7 +28,6 @@ const utils_1 = require("playwright-core/lib/utils");
28
28
  const utilsBundle_1 = require("playwright-core/lib/utilsBundle");
29
29
  const logger_1 = require("../logger");
30
30
  const folderToPackageJsonPath = new Map();
31
- const API_TOKEN = "weQPMWKT";
32
31
  function getPackageJsonPath(folderPath) {
33
32
  const cached = folderToPackageJsonPath.get(folderPath);
34
33
  if (cached !== undefined)
@@ -135,12 +134,16 @@ async function sendTestCaseUpdateToDashboard(params) {
135
134
  console.warn("No dashboard domain found. Skipping send message to dashboard.");
136
135
  return;
137
136
  }
137
+ if (!process.env.EMPIRICALRUN_API_KEY) {
138
+ console.error("No API token found. Skipping send message to dashboard.");
139
+ return;
140
+ }
138
141
  await (0, async_retry_1.default)(async () => {
139
142
  const response = await fetch(`${DOMAIN}/api/test-runs/events`, {
140
143
  method: "PUT",
141
144
  headers: {
142
145
  "Content-Type": "application/json",
143
- Authorization: API_TOKEN,
146
+ Authorization: `Bearer ${process.env.EMPIRICALRUN_API_KEY}`,
144
147
  },
145
148
  body: JSON.stringify(requestBody),
146
149
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.25.27",
3
+ "version": "0.26.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -40,7 +40,7 @@
40
40
  "rimraf": "^6.0.1",
41
41
  "@empiricalrun/llm": "^0.14.8",
42
42
  "@empiricalrun/r2-uploader": "^0.3.8",
43
- "@empiricalrun/test-gen": "^0.54.0"
43
+ "@empiricalrun/test-gen": "^0.54.1"
44
44
  },
45
45
  "scripts": {
46
46
  "dev": "tsc --build --watch",