work-license-server 1.0.12 → 1.0.13
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 +1 -1
- package/src/server.js +7 -0
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -392,7 +392,14 @@ export function createLicenseServerApp(options = {}) {
|
|
|
392
392
|
|
|
393
393
|
// 2. Каталог ПАК, отдельной базовой лицензии (4 млн ₽), тарифов SLA, прочих товаров, партнёрской франшизы и оферты
|
|
394
394
|
if (req.method === 'GET' && pathname === '/api/catalog') {
|
|
395
|
+
let serverVersion = '1.0.13';
|
|
396
|
+
try {
|
|
397
|
+
const pkg = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
398
|
+
serverVersion = pkg.version || serverVersion;
|
|
399
|
+
}
|
|
400
|
+
catch { /* ignore */ }
|
|
395
401
|
return sendJson(res, 200, {
|
|
402
|
+
serverVersion,
|
|
396
403
|
product: PAK_PRODUCT,
|
|
397
404
|
baseLicenseProduct: BASE_LICENSE_PRODUCT,
|
|
398
405
|
additionalProducts: ADDITIONAL_PRODUCTS,
|