backtrace-console 0.0.4 → 0.0.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.
Files changed (2) hide show
  1. package/lib/feishu.js +2 -1
  2. package/package.json +1 -1
package/lib/feishu.js CHANGED
@@ -3,6 +3,7 @@ const http = require('node:http');
3
3
 
4
4
  const TEMPLATE_ID = 'AAqtY8l8Sr3hO';
5
5
  const TEMPLATE_VERSION = '1.0.3';
6
+ const BASE_URL = (process.env.BACKTRACE_CONSOLE_URL || 'http://127.0.0.1:3000').replace(/\/$/, '');
6
7
 
7
8
  function postJson(url, body) {
8
9
  return new Promise(function(resolve, reject) {
@@ -41,7 +42,7 @@ async function sendFeishuCard(webhookUrl, fingerprintData) {
41
42
  fingerprint: fingerprintData.fingerprint || '',
42
43
  errormessage: fingerprintData.errorMessage || '',
43
44
  classifiers: fingerprintData.classifiers || '',
44
- jumpurl: fingerprintData.jumpUrl || ('http://127.0.0.1:3000/chat.html?fingerprint=' + (fingerprintData.fingerprint || '')),
45
+ jumpurl: fingerprintData.jumpUrl || (BASE_URL + '/chat.html?fingerprint=' + (fingerprintData.fingerprint || '')),
45
46
  };
46
47
 
47
48
  var cardContent = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtrace-console",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "CLI server manager for backtrace-console — run/start/stop the Express server.",
5
5
  "private": false,
6
6
  "files": [