@sentinelqa/playwright-reporter 0.1.40 → 0.1.42

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 +15 -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,17 @@ class SentinelReporter {
56
58
  }
57
59
  console.log("");
58
60
  }
61
+ if (hasWorkspaceToken && !hasCiEnv && !localUploadEnabled) {
62
+ console.log([
63
+ "Sentinel: Upload skipped.",
64
+ "Reason: Local workspace uploads require SENTINEL_UPLOAD_LOCAL=1.",
65
+ "",
66
+ "Next step:",
67
+ "- Set SENTINEL_UPLOAD_LOCAL=1 to allow a local workspace upload.",
68
+ "- Or remove SENTINEL_TOKEN to generate a free public hosted report instead."
69
+ ].join("\n"));
70
+ return;
71
+ }
59
72
  if (hasWorkspaceToken) {
60
73
  console.log("");
61
74
  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.42",
4
4
  "private": false,
5
5
  "description": "Playwright reporter for CI debugging with optional Sentinel cloud dashboards",
6
6
  "license": "MIT",