@vario-software/vario-app-framework-backend 2026.15.2 → 2026.16.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/api/Api.js CHANGED
@@ -206,7 +206,7 @@ class Api
206
206
  request: {
207
207
  requestUrl: this.fullPath,
208
208
  requestOptions: this.requestOptions,
209
- body: this.body,
209
+ body: this.secret ? maskSpecificKey(this.body, this.secretsToMask) : this.body,
210
210
  },
211
211
  response: this.secret ? maskSpecificKey(response, this.secretsToMask) : response,
212
212
  duration: `${(performance.now() - this.timer).toFixed(2)}ms`,
@@ -262,7 +262,7 @@ class Api
262
262
 
263
263
  async onError(error)
264
264
  {
265
- const maskedBody = this.suppressLogs ? '[secret]' : this.body;
265
+ const maskedBody = this.suppressLogs ? '[secret]' : (this.secret ? maskSpecificKey(this.body, this.secretsToMask) : this.body);
266
266
 
267
267
  const message = {
268
268
  request: {
@@ -489,7 +489,7 @@ function maskSpecificKey(response, secretsToMask = ['value'], mask = '[secret]')
489
489
 
490
490
  function expandUrl(template, params)
491
491
  {
492
- return template.replace(/:([a-zA-Z_]\w*)/g, (match, key) =>
492
+ return template.replace(/:([a-zA-Z_-]+)/g, (match, key) =>
493
493
  {
494
494
  if (!(key in params))
495
495
  {
package/app.js CHANGED
@@ -92,7 +92,7 @@ const VarioCloudApp = class
92
92
 
93
93
  return new Promise((resolve, reject) =>
94
94
  {
95
- this.express.listen(this.port, error =>
95
+ this.httpServer = this.express.listen(this.port, error =>
96
96
  {
97
97
  if (error)
98
98
  {
@@ -102,6 +102,11 @@ const VarioCloudApp = class
102
102
 
103
103
  this.serverListening = true;
104
104
 
105
+ if (typeof this.onServerStarted === 'function')
106
+ {
107
+ this.onServerStarted(this.httpServer);
108
+ }
109
+
105
110
  resolve(this);
106
111
  });
107
112
  });
@@ -125,8 +130,12 @@ function validateClient(client)
125
130
 
126
131
  if (typeof client.appJWK === 'string')
127
132
  {
128
- try { client.appJWK = JSON.parse(client.appJWK); }
129
- catch { /* handled below */ }
133
+ try
134
+ {
135
+ client.appJWK = JSON.parse(client.appJWK);
136
+ }
137
+ catch
138
+ { /* handled below */ }
130
139
  }
131
140
 
132
141
  if (typeof client.appJWK !== 'object' || client.appJWK === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vario-software/vario-app-framework-backend",
3
- "version": "2026.15.2",
3
+ "version": "2026.16.0",
4
4
  "repository": "https://github.com/vario-software/vario-app-framework",
5
5
  "author": "VARIO Software AG",
6
6
  "homepage": "https://www.vario.ag",
package/utils/migrator.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { getApp, getContext, getRequest } = require('#backend/utils/context.js');
2
+ const { checkLicense } = require('#backend/utils/licenses.js');
2
3
  const ErpApi = require('#backend/api/ErpApi.js');
3
4
 
4
5
  const Migrator = class
@@ -510,32 +511,6 @@ const Migrator = class
510
511
  await this.methods.log(`Script-Module-Presetting "${name}" created (ID: ${scriptModule.id})\n`);
511
512
 
512
513
  scriptModuleRef = { id: scriptModule.id };
513
-
514
- // Migrate existing inline script as user script on the new module
515
- if (existingInlineScript)
516
- {
517
- const inlineScriptContent = typeof existingInlineScript === 'string'
518
- ? existingInlineScript
519
- : JSON.stringify(existingInlineScript);
520
-
521
- const { data: createdModule } = await this.ApiAdapter.fetch(
522
- `/cmn/scripting/modules/${scriptModule.id}`,
523
- { method: 'GET' },
524
- );
525
-
526
- await this.ApiAdapter.fetch(
527
- `/cmn/scripting/modules/${scriptModule.id}`,
528
- {
529
- method: 'PUT',
530
- body: {
531
- ...createdModule,
532
- script: inlineScriptContent,
533
- },
534
- },
535
- );
536
-
537
- await this.methods.log(`Migrated existing inline script for "${name}" to script module\n`);
538
- }
539
514
  }
540
515
 
541
516
  const existingProxyId = await this.methods.getAppScriptingTriggerId(name);
@@ -557,6 +532,34 @@ const Migrator = class
557
532
  await this.methods.log(`App-Script-Proxy for "${name}" successfully created\n`);
558
533
  }
559
534
 
535
+ if (existingInlineScript && await checkLicense('scripting_license', true))
536
+ {
537
+ const { data: currentModule } = await this.ApiAdapter.fetch(
538
+ `/cmn/scripting/modules/${scriptModuleRef.id}`,
539
+ { method: 'GET' },
540
+ );
541
+
542
+ if (currentModule.sameAsPresettingScript)
543
+ {
544
+ const inlineScriptContent = typeof existingInlineScript === 'string'
545
+ ? existingInlineScript
546
+ : JSON.stringify(existingInlineScript);
547
+
548
+ await this.ApiAdapter.fetch(
549
+ `/cmn/scripting/modules/${scriptModuleRef.id}`,
550
+ {
551
+ method: 'PUT',
552
+ body: {
553
+ ...currentModule,
554
+ script: inlineScriptContent,
555
+ },
556
+ },
557
+ );
558
+
559
+ await this.methods.log(`Migrated existing inline script for "${name}" to script module\n`);
560
+ }
561
+ }
562
+
560
563
  return scriptModuleRef;
561
564
  },
562
565