@forge/bundler 4.6.1-next.3 → 4.6.1-next.5

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/bundler
2
2
 
3
+ ## 4.6.1-next.5
4
+
5
+ ### Patch Changes
6
+
7
+ - d9ebc65d: Bumping dependencies via Renovate:
8
+
9
+ - @types/readable-stream
10
+
11
+ ## 4.6.1-next.4
12
+
13
+ ### Patch Changes
14
+
15
+ - 47a05cdc: Fix tunnel not logging errors when using node runtime
16
+
3
17
  ## 4.6.1-next.3
4
18
 
5
19
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"log-events.d.ts","sourceRoot":"","sources":["../../src/stubs/log-events.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AACtD,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C,wBAAgB,cAAc,IAAI,MAAM,CAavC;AA4CD,aAAK,SAAS;IACZ,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AA8BD,wBAAgB,eAAe,CAAC,WAAW,EAAE,GAAG;;;;EAE/C;AAED,wBAAgB,yBAAyB;;;;EAExC;AAED,wBAAgB,qBAAqB;;;;EAEpC;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,GAAG;;;;EAE/C"}
1
+ {"version":3,"file":"log-events.d.ts","sourceRoot":"","sources":["../../src/stubs/log-events.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,wBAAwB,gBAAgB,CAAC;AACtD,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C,wBAAgB,cAAc,IAAI,MAAM,CAavC;AA4CD,aAAK,SAAS;IACZ,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AA0CD,wBAAgB,eAAe,CAAC,WAAW,EAAE,GAAG;;;;EAE/C;AAED,wBAAgB,yBAAyB;;;;EAExC;AAED,wBAAgB,qBAAqB;;;;EAEpC;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,GAAG;;;;EAG/C"}
@@ -4,6 +4,7 @@ exports.emitErrorEvent = exports.emitFailedFooterEvent = exports.emitSuccessfulF
4
4
  const api_1 = require("@forge/api");
5
5
  const bunyan_1 = require("bunyan");
6
6
  const console_1 = require("./console");
7
+ const runtime_1 = require("@forge/runtime");
7
8
  exports.AWS_EXECUTION_ENV_PREFIX = 'AWS_Lambda_';
8
9
  exports.RUNTIME_NAME_FALLBACK = 'node';
9
10
  function getRuntimeName() {
@@ -81,6 +82,16 @@ function simpleBunyanLogEvent(eventType, eventLevel, data) {
81
82
  process.stdout.write(JSON.stringify(logEvent) + '\n');
82
83
  return logEvent;
83
84
  }
85
+ function logErrorToTunnelProcess(caughtObject) {
86
+ if (global.__forge_tunnel__) {
87
+ const logEventData = {
88
+ invocationId: (0, api_1.getRuntime)().lambdaContext.awsRequestId,
89
+ logLevel: runtime_1.LogLevel.ERROR,
90
+ logArguments: [caughtObject]
91
+ };
92
+ process.stdout.write(JSON.stringify((0, console_1.starSerializer)(logEventData)) + '\n');
93
+ }
94
+ }
84
95
  function emitHeaderEvent(lambdaEvent) {
85
96
  return simpleBunyanLogEvent(EventType.HEADER, bunyan_1.levelFromName.info, invocationHeaderLogs(lambdaEvent));
86
97
  }
@@ -94,6 +105,7 @@ function emitFailedFooterEvent() {
94
105
  }
95
106
  exports.emitFailedFooterEvent = emitFailedFooterEvent;
96
107
  function emitErrorEvent(caughtObject) {
108
+ logErrorToTunnelProcess(caughtObject);
97
109
  return simpleBunyanLogEvent(EventType.LOG, bunyan_1.levelFromName.error, caughtObject);
98
110
  }
99
111
  exports.emitErrorEvent = emitErrorEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/bundler",
3
- "version": "4.6.1-next.3",
3
+ "version": "4.6.1-next.5",
4
4
  "description": "Default bundler for Forge apps",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Atlassian",
@@ -58,7 +58,7 @@
58
58
  "@types/jest": "^29.1.2",
59
59
  "@types/node": "^12.12.63",
60
60
  "@types/react": "^17.0.53",
61
- "@types/readable-stream": "^2.3.5",
61
+ "@types/readable-stream": "^2.3.15",
62
62
  "@types/webpack-bundle-analyzer": "^4.6.0",
63
63
  "@typescript-eslint/eslint-plugin": "^5.40.0",
64
64
  "@typescript-eslint/parser": "^5.40.0",