dbgate-api-premium 6.6.11 → 6.7.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dbgate-api-premium",
3
3
  "main": "src/index.js",
4
- "version": "6.6.11",
4
+ "version": "6.7.0",
5
5
  "homepage": "https://dbgate.org/",
6
6
  "repository": {
7
7
  "type": "git",
@@ -30,10 +30,10 @@
30
30
  "compare-versions": "^3.6.0",
31
31
  "cors": "^2.8.5",
32
32
  "cross-env": "^6.0.3",
33
- "dbgate-datalib": "^6.6.11",
33
+ "dbgate-datalib": "^6.7.0",
34
34
  "dbgate-query-splitter": "^4.11.7",
35
- "dbgate-sqltree": "^6.6.11",
36
- "dbgate-tools": "^6.6.11",
35
+ "dbgate-sqltree": "^6.7.0",
36
+ "dbgate-tools": "^6.7.0",
37
37
  "debug": "^4.3.4",
38
38
  "diff": "^5.0.0",
39
39
  "diff2html": "^3.4.13",
@@ -86,7 +86,7 @@
86
86
  "devDependencies": {
87
87
  "@types/fs-extra": "^9.0.11",
88
88
  "@types/lodash": "^4.14.149",
89
- "dbgate-types": "^6.6.11",
89
+ "dbgate-types": "^6.7.0",
90
90
  "env-cmd": "^10.1.0",
91
91
  "jsdoc-to-markdown": "^9.0.5",
92
92
  "node-loader": "^1.0.2",
@@ -1,5 +1,5 @@
1
1
 
2
2
  module.exports = {
3
- version: '6.6.11',
4
- buildTime: '2025-11-07T16:03:18.129Z'
3
+ version: '6.7.0',
4
+ buildTime: '2025-11-19T13:25:17.978Z'
5
5
  };
@@ -283,6 +283,7 @@ async function updatePremiumPromoWidget() {
283
283
  `${DBGATE_CLOUD_URL}/premium-promo-widget?identifier=${promoWidgetData?.identifier ?? 'empty'}&tags=${tags}`,
284
284
  {
285
285
  headers: {
286
+ ...getLicenseHttpHeaders(),
286
287
  ...(await getCloudInstanceHeaders()),
287
288
  'x-app-version': currentVersion.version,
288
289
  },
@@ -308,7 +309,8 @@ async function refreshPublicFiles(isRefresh) {
308
309
  } catch (err) {
309
310
  logger.error(extractErrorLogData(err), 'DBGM-00166 Error updating cloud files');
310
311
  }
311
- if (!isProApp()) {
312
+ const configSettings = await config.get();
313
+ if (!isProApp() || configSettings?.trialDaysLeft != null) {
312
314
  await updatePremiumPromoWidget();
313
315
  }
314
316
  }
@@ -17,7 +17,7 @@ class QueryStreamTableWriter {
17
17
  this.started = new Date().getTime();
18
18
  }
19
19
 
20
- initializeFromQuery(structure, resultIndex, chartDefinition, autoDetectCharts = false) {
20
+ initializeFromQuery(structure, resultIndex, chartDefinition, autoDetectCharts = false, options = {}) {
21
21
  this.jslid = crypto.randomUUID();
22
22
  this.currentFile = path.join(jsldir(), `${this.jslid}.jsonl`);
23
23
  fs.writeFileSync(
@@ -25,6 +25,7 @@ class QueryStreamTableWriter {
25
25
  JSON.stringify({
26
26
  ...structure,
27
27
  __isStreamHeader: true,
28
+ ...options
28
29
  }) + '\n'
29
30
  );
30
31
  this.currentStream = fs.createWriteStream(this.currentFile, { flags: 'a' });
@@ -179,7 +180,7 @@ class StreamHandler {
179
180
  process.send({ msgtype: 'changedCurrentDatabase', database, sesid: this.sesid });
180
181
  }
181
182
 
182
- recordset(columns) {
183
+ recordset(columns, options) {
183
184
  if (this.rowsLimitOverflow) {
184
185
  return;
185
186
  }
@@ -189,7 +190,8 @@ class StreamHandler {
189
190
  Array.isArray(columns) ? { columns } : columns,
190
191
  this.queryStreamInfoHolder.resultIndex,
191
192
  this.frontMatter?.[`chart-${this.queryStreamInfoHolder.resultIndex + 1}`],
192
- this.autoDetectCharts
193
+ this.autoDetectCharts,
194
+ options
193
195
  );
194
196
  this.queryStreamInfoHolder.resultIndex += 1;
195
197
  this.rowCounter = 0;