@sap-ux/preview-middleware 0.20.64 → 0.20.66

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.
@@ -349,17 +349,17 @@ function generateTestRunners(configs, manifest, fs, webappPath, flpTemplConfig)
349
349
  for (const test of configs ?? []) {
350
350
  const testConfig = (0, test_1.mergeTestConfigDefaults)(test);
351
351
  if (['QUnit', 'OPA5'].includes(test.framework)) {
352
- const testTemlpate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'test/qunit.html'), 'utf-8');
352
+ const testTemplate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'test/qunit.ejs'), 'utf-8');
353
353
  const testTemplateConfig = createTestTemplateConfig(testConfig, manifest['sap.app'].id, flpTemplConfig.ui5.theme);
354
- fs.write((0, path_1.join)(webappPath, testConfig.path), (0, ejs_1.render)(testTemlpate, testTemplateConfig));
354
+ fs.write((0, path_1.join)(webappPath, testConfig.path), (0, ejs_1.render)(testTemplate, testTemplateConfig));
355
355
  }
356
356
  else if (test.framework === 'Testsuite') {
357
- const testTemlpate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'test/testsuite.qunit.html'), 'utf-8');
357
+ const testTemplate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'test/testsuite.qunit.ejs'), 'utf-8');
358
358
  const testTemplateConfig = {
359
359
  basePath: flpTemplConfig.basePath,
360
360
  initPath: testConfig.init
361
361
  };
362
- fs.write((0, path_1.join)(webappPath, testConfig.path), (0, ejs_1.render)(testTemlpate, testTemplateConfig));
362
+ fs.write((0, path_1.join)(webappPath, testConfig.path), (0, ejs_1.render)(testTemplate, testTemplateConfig));
363
363
  }
364
364
  }
365
365
  }
@@ -380,7 +380,7 @@ async function generatePreviewFiles(basePath, config, fs, logger = new logger_1.
380
380
  fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
381
381
  }
382
382
  // generate FLP configuration
383
- const flpTemplate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'flp/sandbox.html'), 'utf-8');
383
+ const flpTemplate = (0, fs_1.readFileSync)((0, path_1.join)(TEMPLATE_PATH, 'flp/sandbox.ejs'), 'utf-8');
384
384
  const flpConfig = getFlpConfigWithDefaults(config.flp);
385
385
  const webappPath = await (0, project_access_1.getWebappPath)(basePath, fs);
386
386
  let manifest;
package/dist/base/flp.js CHANGED
@@ -267,7 +267,7 @@ class FlpSandbox {
267
267
  if (scenario === 'ADAPTATION_PROJECT') {
268
268
  templatePreviewUrl = templatePreviewUrl.replace('?', `?sap-ui-layer=${rta.layer}&`);
269
269
  }
270
- const template = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/flp/editor.html'), 'utf-8');
270
+ const template = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/flp/editor.ejs'), 'utf-8');
271
271
  const features = feature_toggle_1.FeatureToggleAccess.getAllFeatureToggles();
272
272
  const envPort = process.env.FIORI_TOOLS_LIVERELOAD_PORT;
273
273
  let livereloadPort = envPort ? parseInt(envPort, 10) : DEFAULT_LIVERELOAD_PORT;
@@ -459,7 +459,7 @@ class FlpSandbox {
459
459
  this.logger.info(`Using sandbox template for UI5 version: ${ui5Version.major}.${ui5Version.minor}.${ui5Version.patch}${ui5Version.label ? `-${ui5Version.label}` : ''}.`);
460
460
  const filePrefix = ui5Version.major > 1 || ui5Version.label?.includes('legacy-free') ? '2' : '';
461
461
  const template = this.flpConfig.enhancedHomePage ? 'cdm' : 'sandbox';
462
- return (0, fs_1.readFileSync)((0, path_1.join)(__dirname, `../../templates/flp/${template}${filePrefix}.html`), 'utf-8');
462
+ return (0, fs_1.readFileSync)((0, path_1.join)(__dirname, `../../templates/flp/${template}${filePrefix}.ejs`), 'utf-8');
463
463
  }
464
464
  /**
465
465
  * For UI5 version 1.71 and below, the asyncHints.requests need to be removed from the template configuration
@@ -659,7 +659,7 @@ class FlpSandbox {
659
659
  this.logger.warn('Skip testsuite generation. No test frameworks configured.');
660
660
  return;
661
661
  }
662
- const testsuite = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/test/testsuite.qunit.html'), 'utf-8');
662
+ const testsuite = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/test/testsuite.qunit.ejs'), 'utf-8');
663
663
  const config = (0, test_1.mergeTestConfigDefaults)(testsuiteConfig);
664
664
  this.logger.debug(`Add route for ${config.path}`);
665
665
  this.router.get(config.path, async (_req, res) => {
@@ -755,7 +755,7 @@ class FlpSandbox {
755
755
  */
756
756
  addTestRoutes(configs, id) {
757
757
  const ns = id.replace(/\./g, '/');
758
- const htmlTemplate = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/test/qunit.html'), 'utf-8');
758
+ const htmlTemplate = (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../templates/test/qunit.ejs'), 'utf-8');
759
759
  for (const testConfig of configs) {
760
760
  const config = (0, test_1.mergeTestConfigDefaults)(testConfig);
761
761
  this.logger.debug(`Add route for ${config.path}`);
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.20.64",
12
+ "version": "0.20.66",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -25,9 +25,9 @@
25
25
  "ejs": "3.1.10",
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
- "@sap-ux/adp-tooling": "0.15.2",
28
+ "@sap-ux/adp-tooling": "0.15.3",
29
29
  "@sap-ux/btp-utils": "1.1.0",
30
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.7",
30
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.6.8",
31
31
  "@sap-ux/feature-toggle": "0.3.0",
32
32
  "@sap-ux/logger": "0.7.0",
33
33
  "@sap-ux/project-access": "1.30.7",
@@ -53,7 +53,7 @@
53
53
  "@sap-ux/axios-extension": "1.22.3",
54
54
  "@sap-ux/i18n": "0.3.1",
55
55
  "@sap-ux/store": "1.1.2",
56
- "@sap-ux/ui5-info": "0.12.0"
56
+ "@sap-ux/ui5-info": "0.12.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "express": "4"
File without changes
File without changes
File without changes
File without changes
File without changes