npm package diff
Package: @forge/util
Versions: 1.4.10-next.0 - 1.4.10-next.0-experimental-effab31
File: package/packages/ari/jira-core/site/index.js
Index: package/packages/ari/jira-core/site/index.js
===================================================================
--- package/packages/ari/jira-core/site/index.js
+++ package/packages/ari/jira-core/site/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,13 +284,14 @@
var jiraCoreSiteAriStaticOpts = {
qualifier: "ari",
platformQualifier: "cloud",
cloudId: new RegExp("^$"),
+ // eslint-disable-line no-useless-escape
resourceOwner: JiraCoreSiteAriResourceOwner,
resourceType: JiraCoreSiteAriResourceType,
resourceIdSlug: "{siteId}",
resourceIdSegmentFormats: {
- siteId: /[a-zA-Z0-9\-]+/
+ siteId: /[a-zA-Z0-9_\-.]{1,255}/
// eslint-disable-line no-useless-escape
}
};