@forge/resolver 1.5.32 → 1.5.33

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