npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/people-data/index.js
Index: package/packages/ari/people-data/index.js
===================================================================
--- package/packages/ari/people-data/index.js
+++ package/packages/ari/people-data/index.js
@@ -29,9 +29,9 @@
var ValidationError = class extends Error {
};
// src/core/rules/cloud-id.ts
-function validateCloudId(cloudId, format = new RegExp("^[a-zA-Z0-9\\-]*$")) {
+function validateCloudId(cloudId, format = new RegExp("^[a-zA-Z0-9_\\-.]{0,255}$")) {
if (!cloudId.match(format))
throw new ValidationError(`Invalid cloud ID, expected ID of format ${format}.`);
}
@@ -51,9 +51,9 @@
throw new ValidationError(`ARI must have a qualifier of 'ari'. Received: ${qualifier}`);
}
// src/core/rules/resource-id.ts
-function validateResourceId(id, format = new RegExp("[!a-zA-Z0-9\\-_.~@:{}=]+(/[!a-zA-Z0-9\\-_.~@:{}=]+)*" /* ANY_RESOURCE_ID */), key = "resourceId") {
+function validateResourceId(id, format = new RegExp("[!a-zA-Z0-9\\-_.~@:;{}=]+(/[!a-zA-Z0-9\\-_.~@:;{}=]+)*" /* ANY_RESOURCE_ID */), key = "resourceId") {
let formatWithCarets = new RegExp(`^${format.source}$`);
if (!id.match(formatWithCarets))
throw new ValidationError(`Invalid ${key} - ${id}, expected ID of format ${formatWithCarets}.`);
}
@@ -286,13 +286,14 @@
var peopleDataCostCenterAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: PeopleDataCostCenterAriResourceOwner,
resourceType: PeopleDataCostCenterAriResourceType,
resourceIdSlug: "{costCenterId}",
resourceIdSegmentFormats: {
- costCenterId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ costCenterId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};
@@ -337,13 +338,14 @@
var peopleDataJobProfileAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: PeopleDataJobProfileAriResourceOwner,
resourceType: PeopleDataJobProfileAriResourceType,
resourceIdSlug: "{jobProfileId}",
resourceIdSegmentFormats: {
- jobProfileId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ jobProfileId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};
@@ -388,13 +390,14 @@
var peopleDataPositionAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: PeopleDataPositionAriResourceOwner,
resourceType: PeopleDataPositionAriResourceType,
resourceIdSlug: "{positionId}",
resourceIdSegmentFormats: {
- positionId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ positionId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};
@@ -439,13 +442,14 @@
var peopleDataSupervisoryOrgAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: PeopleDataSupervisoryOrgAriResourceOwner,
resourceType: PeopleDataSupervisoryOrgAriResourceType,
resourceIdSlug: "{supervisoryOrgId}",
resourceIdSegmentFormats: {
- supervisoryOrgId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ supervisoryOrgId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};
@@ -490,13 +494,14 @@
var peopleDataWorkerAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: PeopleDataWorkerAriResourceOwner,
resourceType: PeopleDataWorkerAriResourceType,
resourceIdSlug: "{workerId}",
resourceIdSegmentFormats: {
- workerId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ workerId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};