@forge/api
Advanced tools
Comparing version 1.1.0 to 1.1.1-next.0
# @forge/api | ||
## 1.1.1-next.0 | ||
### Patch Changes | ||
- b0ae6aa: Fix properties onConfluenceSpace for personal spaces | ||
## 1.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -9,14 +9,8 @@ "use strict"; | ||
const confluence_space_1 = require("./confluence-space"); | ||
const sanitizedKey = (input) => { | ||
const regex = /^[A-Za-z0-9_\-]+$/; | ||
if (!regex.test(input)) { | ||
throw new Error('Invalid context/property key'); | ||
} | ||
return input; | ||
}; | ||
const sanitized_key_1 = require("./sanitized-key"); | ||
const getPropertiesInstance = (adapter) => { | ||
const storage = { | ||
get: (key) => adapter.get(sanitizedKey(key)), | ||
set: (key, value) => adapter.set(sanitizedKey(key), value), | ||
delete: (key) => adapter.delete(sanitizedKey(key)) | ||
get: (key) => adapter.get(sanitized_key_1.sanitizedKey(key)), | ||
set: (key, value) => adapter.set(sanitized_key_1.sanitizedKey(key), value), | ||
delete: (key) => adapter.delete(sanitized_key_1.sanitizedKey(key)) | ||
}; | ||
@@ -26,6 +20,6 @@ return storage; | ||
exports.propertiesApi = { | ||
onJiraIssue: (issueKey) => getPropertiesInstance(new jira_issue_1.JiraIssueStorage(sanitizedKey(issueKey), index_1.asApp().requestJira)), | ||
onJiraProject: (projectKey) => getPropertiesInstance(new jira_project_1.JiraProjectStorage(sanitizedKey(projectKey), index_1.asApp().requestJira)), | ||
onConfluencePage: (pageId) => getPropertiesInstance(new confluence_page_1.ConfluencePageStorage(sanitizedKey(pageId), index_1.asApp().requestConfluence)), | ||
onConfluenceSpace: (spaceId) => getPropertiesInstance(new confluence_space_1.ConfluenceSpaceStorage(sanitizedKey(spaceId), index_1.asApp().requestConfluence)) | ||
onJiraIssue: (issueKey) => getPropertiesInstance(new jira_issue_1.JiraIssueStorage(sanitized_key_1.sanitizedKey(issueKey), index_1.asApp().requestJira)), | ||
onJiraProject: (projectKey) => getPropertiesInstance(new jira_project_1.JiraProjectStorage(sanitized_key_1.sanitizedKey(projectKey), index_1.asApp().requestJira)), | ||
onConfluencePage: (pageId) => getPropertiesInstance(new confluence_page_1.ConfluencePageStorage(sanitized_key_1.sanitizedKey(pageId), index_1.asApp().requestConfluence)), | ||
onConfluenceSpace: (spaceId) => getPropertiesInstance(new confluence_space_1.ConfluenceSpaceStorage(sanitized_key_1.sanitizedKey(spaceId), index_1.asApp().requestConfluence)) | ||
}; |
{ | ||
"name": "@forge/api", | ||
"version": "1.1.0", | ||
"version": "1.1.1-next.0", | ||
"description": "Forge API methods", | ||
@@ -5,0 +5,0 @@ "author": "Atlassian", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32103
42
407
2