@forge/os 2.1.20 → 2.1.21-experimental-04cc2b9
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/out/os.d.ts +0 -2
- package/out/os.d.ts.map +1 -1
- package/out/os.js +1 -1
- package/out/utils/error-handling.js +4 -5
- package/out/utils/types.d.ts +1 -1
- package/out/utils/types.d.ts.map +1 -1
- package/package.json +12 -3
package/out/os.d.ts
CHANGED
package/out/os.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS/E,qBAAa,iBAAiB;YAEd,WAAW;YASX,WAAW;IAqCZ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAa3F,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAgBtD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAalC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAoBlD,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;IAgB/E,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;CAWvF;AAED,eAAO,MAAM,EAAE,mBAA0B,CAAC"}
|
package/out/os.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isForgeError = isForgeError;
|
|
4
|
+
exports.safeGetParsedBody = safeGetParsedBody;
|
|
5
|
+
exports.extractTraceId = extractTraceId;
|
|
6
|
+
exports.checkResponseError = checkResponseError;
|
|
4
7
|
const errors_1 = require("../errors");
|
|
5
8
|
const errorCodes_1 = require("../errorCodes");
|
|
6
9
|
function isForgeError(body) {
|
|
7
10
|
return typeof body === 'object' && body !== null && 'code' in body && 'message' in body;
|
|
8
11
|
}
|
|
9
|
-
exports.isForgeError = isForgeError;
|
|
10
12
|
function safeGetParsedBody(text) {
|
|
11
13
|
try {
|
|
12
14
|
return JSON.parse(text);
|
|
@@ -15,11 +17,9 @@ function safeGetParsedBody(text) {
|
|
|
15
17
|
return undefined;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
|
-
exports.safeGetParsedBody = safeGetParsedBody;
|
|
19
20
|
function extractTraceId(response) {
|
|
20
21
|
return (response.headers.get('x-b3-traceid') || response.headers.get('x-trace-id') || response.headers.get('atl-traceid'));
|
|
21
22
|
}
|
|
22
|
-
exports.extractTraceId = extractTraceId;
|
|
23
23
|
async function checkResponseError(response, message) {
|
|
24
24
|
if (response.ok) {
|
|
25
25
|
return;
|
|
@@ -46,4 +46,3 @@ async function checkResponseError(response, message) {
|
|
|
46
46
|
context: { responseText }
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
exports.checkResponseError = checkResponseError;
|
package/out/utils/types.d.ts
CHANGED
package/out/utils/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/os",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21-experimental-04cc2b9",
|
|
4
4
|
"description": "Forge Object Store SDK",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -17,12 +17,21 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "20.19.1",
|
|
19
19
|
"expect-type": "^0.17.3",
|
|
20
|
-
"jest-when": "^3.6.0"
|
|
20
|
+
"jest-when": "^3.6.0",
|
|
21
|
+
"typescript": "5.9.2"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@forge/api": "^7.2.
|
|
24
|
+
"@forge/api": "^7.2.2-experimental-04cc2b9"
|
|
24
25
|
},
|
|
25
26
|
"publishConfig": {
|
|
26
27
|
"registry": "https://packages.atlassian.com/api/npm/npm-public/"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"typescript": ">=5.0.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"typescript": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
27
36
|
}
|
|
28
37
|
}
|