exflower-license-server 1.4.1 → 1.4.2

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/db.js +3 -2
  2. package/package.json +1 -1
package/db.js CHANGED
@@ -260,9 +260,10 @@ function setSetting(key, value) {
260
260
  .run(key, value);
261
261
  }
262
262
 
263
- // Seed demo data if empty
263
+ // Seed demo data if empty(仅显式开启:SEED_DEMO=1。生产部署不应自带有效演示 license——
264
+ // key 会打印在日志里,且客户并不知情)
264
265
  const count = db.prepare('SELECT COUNT(*) as c FROM companies').get().c;
265
- if (count === 0) {
266
+ if (count === 0 && process.env.SEED_DEMO === '1') {
266
267
  const { generateLicenseKey } = require('./utils');
267
268
  const demoKey = generateLicenseKey();
268
269
  db.prepare(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exflower-license-server",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "ExFlower License Server - 在线授权验证服务",
5
5
  "main": "index.js",
6
6
  "bin": {