npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/unified-portable-profile/index.js
Index: package/packages/ari/unified-portable-profile/index.js
===================================================================
--- package/packages/ari/unified-portable-profile/index.js
+++ package/packages/ari/unified-portable-profile/index.js
@@ -28,9 +28,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}.`);
}
@@ -50,9 +50,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}.`);
}
@@ -285,8 +285,9 @@
var unifiedPortableProfileLinkedAccountAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: UnifiedPortableProfileLinkedAccountAriResourceOwner,
resourceType: UnifiedPortableProfileLinkedAccountAriResourceType,
resourceIdSlug: "{linkedAccountInternalId}",
resourceIdSegmentFormats: {
@@ -336,8 +337,9 @@
var unifiedPortableProfileParentAccountAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: UnifiedPortableProfileParentAccountAriResourceOwner,
resourceType: UnifiedPortableProfileParentAccountAriResourceType,
resourceIdSlug: "{parentAccountInternalId}",
resourceIdSegmentFormats: {
@@ -387,8 +389,9 @@
var unifiedPortableProfileUnifiedAccountAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: UnifiedPortableProfileUnifiedAccountAriResourceOwner,
resourceType: UnifiedPortableProfileUnifiedAccountAriResourceType,
resourceIdSlug: "{linkedAccountInternalId}",
resourceIdSegmentFormats: {
@@ -438,8 +441,9 @@
var unifiedPortableProfileUnifiedProfileAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: UnifiedPortableProfileUnifiedProfileAriResourceOwner,
resourceType: UnifiedPortableProfileUnifiedProfileAriResourceType,
resourceIdSlug: "{unifiedProfileInternalId}",
resourceIdSegmentFormats: {