@forge/api 2.6.1 → 2.7.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @forge/api
|
|
2
2
|
|
|
3
|
+
## 2.7.0-next.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b3ee2973: Unblock valid property API keys and handled error propagation
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [3c3c42b9]
|
|
12
|
+
- @forge/storage@1.3.0-next.0
|
|
13
|
+
|
|
3
14
|
## 2.6.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,cAAc,EAAE,MAAM,UAAU,CAAC;AAiBjD,eAAO,MAAM,aAAa;4BACA,MAAM;gCAEF,MAAM;+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/properties/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,cAAc,EAAE,MAAM,UAAU,CAAC;AAiBjD,eAAO,MAAM,aAAa;4BACA,MAAM;gCAEF,MAAM;+BACP,MAAM;iCAEJ,MAAM;CAEpC,CAAC"}
|
package/out/properties/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const getPropertiesInstance = (adapter) => {
|
|
|
17
17
|
};
|
|
18
18
|
exports.propertiesApi = {
|
|
19
19
|
onJiraIssue: (issueKey) => getPropertiesInstance(new jira_issue_1.JiraIssueStorage(sanitized_key_1.sanitizedKey(issueKey), index_1.asApp().requestJira)),
|
|
20
|
-
onJiraProject: (projectKey) => getPropertiesInstance(new jira_project_1.JiraProjectStorage(
|
|
20
|
+
onJiraProject: (projectKey) => getPropertiesInstance(new jira_project_1.JiraProjectStorage(projectKey, index_1.asApp().requestJira)),
|
|
21
21
|
onConfluencePage: (pageId) => getPropertiesInstance(new confluence_page_1.ConfluencePageStorage(sanitized_key_1.sanitizedKey(pageId), index_1.asApp().requestConfluence)),
|
|
22
22
|
onConfluenceSpace: (spaceId) => getPropertiesInstance(new confluence_space_1.ConfluenceSpaceStorage(sanitized_key_1.sanitizedKey(spaceId), index_1.asApp().requestConfluence))
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-scoped-storage.d.ts","sourceRoot":"","sources":["../../src/properties/product-scoped-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,qBAAa,oBAAqB,YAAW,cAAc;IAC7C,SAAS,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK;IAAE,SAAS,CAAC,SAAS,EAAE,oBAAoB;gBAAjF,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAY,SAAS,EAAE,oBAAoB;IAEjG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"product-scoped-storage.d.ts","sourceRoot":"","sources":["../../src/properties/product-scoped-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,qBAAa,oBAAqB,YAAW,cAAc;IAC7C,SAAS,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK;IAAE,SAAS,CAAC,SAAS,EAAE,oBAAoB;gBAAjF,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,KAAK,EAAY,SAAS,EAAE,oBAAoB;IAEjG,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAc9B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxC,SAAS,CAAC,sBAAsB,CAAC,WAAW,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,GAAG,MAAM;;;;;;;CASjF"}
|
|
@@ -10,7 +10,7 @@ class ProductScopedStorage {
|
|
|
10
10
|
async get(key) {
|
|
11
11
|
const response = await this.apiClient(this.storageApiPath(key));
|
|
12
12
|
if (!response.ok) {
|
|
13
|
-
if (/
|
|
13
|
+
if (/403|404/.test(response.status.toString())) {
|
|
14
14
|
return undefined;
|
|
15
15
|
}
|
|
16
16
|
throw storage_1.APIError.forStatus(response.status);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sanitizedKey = void 0;
|
|
4
4
|
exports.sanitizedKey = (input) => {
|
|
5
|
-
const regex = /^(~)?[A-Za-z0-9_
|
|
5
|
+
const regex = /^(~)?[A-Za-z0-9_\-\.]+$/;
|
|
6
6
|
if (!regex.test(input)) {
|
|
7
7
|
throw new Error('Invalid context/property key');
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-next.0",
|
|
4
4
|
"description": "Forge API methods",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@forge/auth": "^0.0.1",
|
|
19
|
-
"@forge/storage": "^1.
|
|
19
|
+
"@forge/storage": "^1.3.0-next.0",
|
|
20
20
|
"@types/node-fetch": "^2.5.7",
|
|
21
21
|
"node-fetch": "2.6.1"
|
|
22
22
|
}
|