@postman-cse/onboarding-repo-sync 2.7.2 → 2.7.3
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/dist/action.cjs +21 -2
- package/dist/cli.cjs +21 -2
- package/dist/index.cjs +21 -2
- package/package.json +1 -1
package/dist/action.cjs
CHANGED
|
@@ -118357,8 +118357,11 @@ var PostmanGatewayAssetsClient = class {
|
|
|
118357
118357
|
path: `/jobTemplates/${uid}?_etc=true`
|
|
118358
118358
|
});
|
|
118359
118359
|
return true;
|
|
118360
|
-
} catch {
|
|
118361
|
-
|
|
118360
|
+
} catch (error2) {
|
|
118361
|
+
if (error2 instanceof HttpError && error2.status === 404) {
|
|
118362
|
+
return false;
|
|
118363
|
+
}
|
|
118364
|
+
throw error2;
|
|
118362
118365
|
}
|
|
118363
118366
|
}
|
|
118364
118367
|
async findMonitorByCollection(collectionUid, environmentUid, name) {
|
|
@@ -118366,6 +118369,22 @@ var PostmanGatewayAssetsClient = class {
|
|
|
118366
118369
|
const environment = String(environmentUid ?? "").trim();
|
|
118367
118370
|
const monitorName = String(name ?? "").trim();
|
|
118368
118371
|
const monitors = await this.listMonitors();
|
|
118372
|
+
const sameNameMatches = monitors.filter((monitor) => monitor.name === monitorName);
|
|
118373
|
+
const sameNameEnvironmentMatches = sameNameMatches.filter((monitor) => monitor.environmentUid === environment);
|
|
118374
|
+
try {
|
|
118375
|
+
this.selectExactMatch(
|
|
118376
|
+
"monitor",
|
|
118377
|
+
`workspace ${this.workspaceId}, name "${monitorName}", and environment ${environment || "(none)"}`,
|
|
118378
|
+
sameNameEnvironmentMatches
|
|
118379
|
+
);
|
|
118380
|
+
} catch (error2) {
|
|
118381
|
+
const environments = [...new Set(sameNameMatches.map((monitor) => monitor.environmentUid || "(none)"))];
|
|
118382
|
+
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
118383
|
+
throw new Error(
|
|
118384
|
+
`${message} Same-name monitor(s) also exist on environment(s): ${environments.join(", ")}.`,
|
|
118385
|
+
{ cause: error2 }
|
|
118386
|
+
);
|
|
118387
|
+
}
|
|
118369
118388
|
const matches = monitors.filter(
|
|
118370
118389
|
(monitor) => monitor.collectionUid === want && monitor.environmentUid === environment && monitor.name === monitorName
|
|
118371
118390
|
);
|
package/dist/cli.cjs
CHANGED
|
@@ -116462,8 +116462,11 @@ var PostmanGatewayAssetsClient = class {
|
|
|
116462
116462
|
path: `/jobTemplates/${uid}?_etc=true`
|
|
116463
116463
|
});
|
|
116464
116464
|
return true;
|
|
116465
|
-
} catch {
|
|
116466
|
-
|
|
116465
|
+
} catch (error) {
|
|
116466
|
+
if (error instanceof HttpError && error.status === 404) {
|
|
116467
|
+
return false;
|
|
116468
|
+
}
|
|
116469
|
+
throw error;
|
|
116467
116470
|
}
|
|
116468
116471
|
}
|
|
116469
116472
|
async findMonitorByCollection(collectionUid, environmentUid, name) {
|
|
@@ -116471,6 +116474,22 @@ var PostmanGatewayAssetsClient = class {
|
|
|
116471
116474
|
const environment = String(environmentUid ?? "").trim();
|
|
116472
116475
|
const monitorName = String(name ?? "").trim();
|
|
116473
116476
|
const monitors = await this.listMonitors();
|
|
116477
|
+
const sameNameMatches = monitors.filter((monitor) => monitor.name === monitorName);
|
|
116478
|
+
const sameNameEnvironmentMatches = sameNameMatches.filter((monitor) => monitor.environmentUid === environment);
|
|
116479
|
+
try {
|
|
116480
|
+
this.selectExactMatch(
|
|
116481
|
+
"monitor",
|
|
116482
|
+
`workspace ${this.workspaceId}, name "${monitorName}", and environment ${environment || "(none)"}`,
|
|
116483
|
+
sameNameEnvironmentMatches
|
|
116484
|
+
);
|
|
116485
|
+
} catch (error) {
|
|
116486
|
+
const environments = [...new Set(sameNameMatches.map((monitor) => monitor.environmentUid || "(none)"))];
|
|
116487
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
116488
|
+
throw new Error(
|
|
116489
|
+
`${message} Same-name monitor(s) also exist on environment(s): ${environments.join(", ")}.`,
|
|
116490
|
+
{ cause: error }
|
|
116491
|
+
);
|
|
116492
|
+
}
|
|
116474
116493
|
const matches = monitors.filter(
|
|
116475
116494
|
(monitor) => monitor.collectionUid === want && monitor.environmentUid === environment && monitor.name === monitorName
|
|
116476
116495
|
);
|
package/dist/index.cjs
CHANGED
|
@@ -118381,8 +118381,11 @@ var PostmanGatewayAssetsClient = class {
|
|
|
118381
118381
|
path: `/jobTemplates/${uid}?_etc=true`
|
|
118382
118382
|
});
|
|
118383
118383
|
return true;
|
|
118384
|
-
} catch {
|
|
118385
|
-
|
|
118384
|
+
} catch (error2) {
|
|
118385
|
+
if (error2 instanceof HttpError && error2.status === 404) {
|
|
118386
|
+
return false;
|
|
118387
|
+
}
|
|
118388
|
+
throw error2;
|
|
118386
118389
|
}
|
|
118387
118390
|
}
|
|
118388
118391
|
async findMonitorByCollection(collectionUid, environmentUid, name) {
|
|
@@ -118390,6 +118393,22 @@ var PostmanGatewayAssetsClient = class {
|
|
|
118390
118393
|
const environment = String(environmentUid ?? "").trim();
|
|
118391
118394
|
const monitorName = String(name ?? "").trim();
|
|
118392
118395
|
const monitors = await this.listMonitors();
|
|
118396
|
+
const sameNameMatches = monitors.filter((monitor) => monitor.name === monitorName);
|
|
118397
|
+
const sameNameEnvironmentMatches = sameNameMatches.filter((monitor) => monitor.environmentUid === environment);
|
|
118398
|
+
try {
|
|
118399
|
+
this.selectExactMatch(
|
|
118400
|
+
"monitor",
|
|
118401
|
+
`workspace ${this.workspaceId}, name "${monitorName}", and environment ${environment || "(none)"}`,
|
|
118402
|
+
sameNameEnvironmentMatches
|
|
118403
|
+
);
|
|
118404
|
+
} catch (error2) {
|
|
118405
|
+
const environments = [...new Set(sameNameMatches.map((monitor) => monitor.environmentUid || "(none)"))];
|
|
118406
|
+
const message = error2 instanceof Error ? error2.message : String(error2);
|
|
118407
|
+
throw new Error(
|
|
118408
|
+
`${message} Same-name monitor(s) also exist on environment(s): ${environments.join(", ")}.`,
|
|
118409
|
+
{ cause: error2 }
|
|
118410
|
+
);
|
|
118411
|
+
}
|
|
118393
118412
|
const matches = monitors.filter(
|
|
118394
118413
|
(monitor) => monitor.collectionUid === want && monitor.environmentUid === environment && monitor.name === monitorName
|
|
118395
118414
|
);
|