@vario-software/vario-app-framework-backend 2026.15.2 → 2026.17.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.17.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
@@ -350,6 +351,34 @@ const Migrator = class
350
351
  return finance;
351
352
  },
352
353
 
354
+ createBankBackend: async (label, backendType = 'APP') =>
355
+ {
356
+ const { data: bankBackend } = await this.ApiAdapter.fetch('/erp/bank/backend', {
357
+ method: 'POST',
358
+ body: JSON.stringify({
359
+ label,
360
+ appId: this.app.client.appIdentifier,
361
+ backendType,
362
+ }),
363
+ });
364
+
365
+ await this.methods.log(`Bank Backend with id "${bankBackend.id}" successfully created\n`);
366
+
367
+ return bankBackend;
368
+ },
369
+
370
+ changeBankBackend: async (id, body) =>
371
+ {
372
+ const { data: bankBackend } = await this.ApiAdapter.fetch(`/erp/bank/backend/${id}`, {
373
+ method: 'PUT',
374
+ body: JSON.stringify(body),
375
+ });
376
+
377
+ await this.methods.log(`Bank Backend with id "${bankBackend.id}" successfully updated\n`);
378
+
379
+ return bankBackend;
380
+ },
381
+
353
382
  getMultipartImportPreset: async id =>
354
383
  {
355
384
  const { data: importMultipartPreset } = await this.ApiAdapter.fetch(
@@ -510,32 +539,6 @@ const Migrator = class
510
539
  await this.methods.log(`Script-Module-Presetting "${name}" created (ID: ${scriptModule.id})\n`);
511
540
 
512
541
  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
542
  }
540
543
 
541
544
  const existingProxyId = await this.methods.getAppScriptingTriggerId(name);
@@ -557,6 +560,34 @@ const Migrator = class
557
560
  await this.methods.log(`App-Script-Proxy for "${name}" successfully created\n`);
558
561
  }
559
562
 
563
+ if (existingInlineScript && await checkLicense('scripting_license', true))
564
+ {
565
+ const { data: currentModule } = await this.ApiAdapter.fetch(
566
+ `/cmn/scripting/modules/${scriptModuleRef.id}`,
567
+ { method: 'GET' },
568
+ );
569
+
570
+ if (currentModule.sameAsPresettingScript)
571
+ {
572
+ const inlineScriptContent = typeof existingInlineScript === 'string'
573
+ ? existingInlineScript
574
+ : JSON.stringify(existingInlineScript);
575
+
576
+ await this.ApiAdapter.fetch(
577
+ `/cmn/scripting/modules/${scriptModuleRef.id}`,
578
+ {
579
+ method: 'PUT',
580
+ body: {
581
+ ...currentModule,
582
+ script: inlineScriptContent,
583
+ },
584
+ },
585
+ );
586
+
587
+ await this.methods.log(`Migrated existing inline script for "${name}" to script module\n`);
588
+ }
589
+ }
590
+
560
591
  return scriptModuleRef;
561
592
  },
562
593