@sentinelqa/playwright-reporter 0.1.40 → 0.1.41

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.
Files changed (2) hide show
  1. package/dist/reporter.js +18 -2
  2. package/package.json +1 -1
package/dist/reporter.js CHANGED
@@ -44,9 +44,11 @@ class SentinelReporter {
44
44
  }
45
45
  async onEnd() {
46
46
  const hasWorkspaceToken = Boolean(process.env.SENTINEL_TOKEN);
47
+ const hasCiEnv = (0, node_1.hasSupportedCiEnv)(process.env);
48
+ const localUploadEnabled = (0, node_1.isLocalUploadEnabled)(process.env);
47
49
  const usingImplicitLocalPublicMode = !hasWorkspaceToken &&
48
- !(0, node_1.hasSupportedCiEnv)(process.env) &&
49
- !(0, node_1.isLocalUploadEnabled)(process.env);
50
+ !hasCiEnv &&
51
+ !localUploadEnabled;
50
52
  const quickDiagnosis = (0, quickDiagnosis_1.buildQuickDiagnosis)(this.options.playwrightJsonPath);
51
53
  console.log("");
52
54
  if (quickDiagnosis?.lines.length) {
@@ -56,6 +58,20 @@ class SentinelReporter {
56
58
  }
57
59
  console.log("");
58
60
  }
61
+ if (hasWorkspaceToken && !hasCiEnv && !localUploadEnabled) {
62
+ throw new Error([
63
+ "Sentinel: Upload failed.",
64
+ "Reason: Local workspace uploads require SENTINEL_UPLOAD_LOCAL=1.",
65
+ "",
66
+ "Details:",
67
+ "- A Sentinel workspace token was detected, so the reporter selected workspace mode.",
68
+ "- No supported CI environment variables were found for GitLab, GitHub, or CircleCI.",
69
+ "",
70
+ "Next step:",
71
+ "- Set SENTINEL_UPLOAD_LOCAL=1 to allow a local workspace upload.",
72
+ "- Or remove SENTINEL_TOKEN to generate a free public hosted report instead."
73
+ ].join("\n"));
74
+ }
59
75
  if (hasWorkspaceToken) {
60
76
  console.log("");
61
77
  console.log(green("✔ Artifacts collected"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentinelqa/playwright-reporter",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "private": false,
5
5
  "description": "Playwright reporter for CI debugging with optional Sentinel cloud dashboards",
6
6
  "license": "MIT",