@controlfront/detect 0.0.3 → 0.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@controlfront/detect",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -512,8 +512,8 @@ async function postBaselineDirect({
512
512
  targetCommit,
513
513
  overwrite = false,
514
514
  }) {
515
- if (!projectId) {
516
- throw new Error("CF_PROJECT_ID is required in CI mode");
515
+ if (!projectId && !ingestToken) {
516
+ throw new Error("CF_PROJECT_ID is required when not using an ingest token");
517
517
  }
518
518
  if (!appUrl) {
519
519
  throw new Error("CF_APP_URL or NEXT_PUBLIC_APP_URL is required in CI mode");
@@ -569,8 +569,8 @@ async function postSnapshotDirect({
569
569
  overwrite = false,
570
570
  progressInfo = null,
571
571
  }) {
572
- if (!projectId) {
573
- throw new Error("CF_PROJECT_ID is required in CI mode");
572
+ if (!projectId && !ingestToken) {
573
+ throw new Error("CF_PROJECT_ID is required when not using an ingest token");
574
574
  }
575
575
  if (!appUrl) {
576
576
  throw new Error("CF_APP_URL or NEXT_PUBLIC_APP_URL is required in CI mode");