@forge/resolver 1.5.34-next.0-experimental-c6147b1 → 1.5.35-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 +9 -2
- package/out/index.js +12 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# @forge/resolver
|
|
2
2
|
|
|
3
|
-
## 1.5.
|
|
3
|
+
## 1.5.35-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6b04ab2]
|
|
8
|
+
- @forge/api@3.7.1-next.0
|
|
9
|
+
|
|
10
|
+
## 1.5.34
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
6
13
|
|
|
7
14
|
- Updated dependencies [2cd49c2]
|
|
8
|
-
- @forge/api@3.7.0
|
|
15
|
+
- @forge/api@3.7.0
|
|
9
16
|
|
|
10
17
|
## 1.5.34-next.0
|
|
11
18
|
|
package/out/index.js
CHANGED
|
@@ -20,12 +20,15 @@ const defaultFunctions = {
|
|
|
20
20
|
body = JSON.parse(body);
|
|
21
21
|
}
|
|
22
22
|
catch (e) { }
|
|
23
|
-
return
|
|
23
|
+
return { ...response, body };
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
class Resolver {
|
|
27
|
+
functions;
|
|
27
28
|
constructor() {
|
|
28
|
-
this.functions =
|
|
29
|
+
this.functions = {
|
|
30
|
+
...defaultFunctions
|
|
31
|
+
};
|
|
29
32
|
}
|
|
30
33
|
define(functionKey, cb) {
|
|
31
34
|
if (!cb || typeof cb !== 'function') {
|
|
@@ -48,11 +51,16 @@ class Resolver {
|
|
|
48
51
|
}
|
|
49
52
|
getDefinitions() {
|
|
50
53
|
const resolve = async ({ call: { functionKey, payload: callPayload, jobId }, context }, backendRuntimePayload) => {
|
|
51
|
-
var _a;
|
|
52
54
|
const cb = this.getFunction(functionKey);
|
|
53
55
|
const result = await cb({
|
|
54
56
|
payload: callPayload || {},
|
|
55
|
-
context:
|
|
57
|
+
context: {
|
|
58
|
+
...context,
|
|
59
|
+
installContext: backendRuntimePayload?.installContext,
|
|
60
|
+
accountId: backendRuntimePayload?.principal?.accountId,
|
|
61
|
+
license: backendRuntimePayload?.license,
|
|
62
|
+
jobId: jobId
|
|
63
|
+
}
|
|
56
64
|
});
|
|
57
65
|
if (typeof result === 'object') {
|
|
58
66
|
return this.sanitizeObject(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/resolver",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.35-next.0",
|
|
4
4
|
"description": "Forge function resolver",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
"compile": "tsc -b -v"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forge/api": "3.7.
|
|
15
|
+
"@forge/api": "3.7.1-next.0"
|
|
16
16
|
}
|
|
17
17
|
}
|