npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/identity/third-party-group/index.js
Index: package/packages/ari/identity/third-party-group/index.js
===================================================================
--- package/packages/ari/identity/third-party-group/index.js
+++ package/packages/ari/identity/third-party-group/index.js
@@ -27,9 +27,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}.`);
}
@@ -49,9 +49,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}.`);
}
@@ -284,15 +284,16 @@
var identityThirdPartyGroupAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: IdentityThirdPartyGroupAriResourceOwner,
resourceType: IdentityThirdPartyGroupAriResourceType,
resourceIdSlug: "{directoryId}/{groupId}",
resourceIdSegmentFormats: {
directoryId: /[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}/,
// eslint-disable-line no-useless-escape
- groupId: /[!a-zA-Z0-9\-_.~@:{}=]+(\/[!a-zA-Z0-9\-_.~@:{}=]+)*/
+ groupId: /[!a-zA-Z0-9\-_.~@:;{}=]+(\/[!a-zA-Z0-9\-_.~@:;{}=]+)*/
// eslint-disable-line no-useless-escape
}
};