Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scripts variant management script to FF & FE package json #2327

Merged
merged 19 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/purple-snakes-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@sap-ux/fiori-freestyle-writer': minor
'@sap-ux/fiori-generator-shared': minor
'@sap-ux/ui5-application-writer': minor
'@sap-ux/fiori-elements-writer': minor
'@sap-ux/odata-service-writer': minor
'@sap-ux/ui5-config': minor
'@sap-ux/generator-simple-fe': patch
---

Enhancements to FE & FF Configurations: The updates include adding the `start-variants-management` script to `package.json` for FE and FF. The OdataService interface now has an `ignoreCertError` property. UI5 application writer introduces the `sapuxLayer` property to `package.json` templates and adds `fiori-tools-preview middleware` to ui5, ui5-mock, and ui5-local.yaml. Additionally, the `addFioriToolsPreviewMiddleware` function has been added for YAML config integration.
2 changes: 1 addition & 1 deletion examples/simple-generator/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class extends Generator {
// configuring the source/template root folder to point to the folder containing the karma templates
this.sourceRoot(join(__dirname, '..', '..', 'templates', 'karma'));
// hard-coded output folder just for testing, in a real generator the .tmp prefix is not needed
this.destinationRoot(join('.tmp', this.app.package.name));
this.destinationRoot(join('.tmp', this.app.package.name ?? 'default-app-name'));
}

async writing(): Promise<void> {
Expand Down
4 changes: 4 additions & 0 deletions packages/fiori-elements-writer/src/packageConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { t } from './i18n';
import type { PackageJsonScripts } from './types';
import { getVariantPreviewAppScript } from '@sap-ux/fiori-generator-shared';

/**
* Get an object reflecting the scripts that need to be added to the package.json.
Expand Down Expand Up @@ -76,5 +77,8 @@ export function getPackageJsonTasks({
scripts['int-test'] = 'fiori run --config ./ui5-mock.yaml --open "test/integration/opaTests.qunit.html"';
}

scripts['start-variants-management'] = localOnly
? `echo \\"${t('info.mockOnlyWarning')}\\"`
: getVariantPreviewAppScript(sapClient);
return scripts;
}
1 change: 1 addition & 0 deletions packages/fiori-elements-writer/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,5 @@ export interface PackageJsonScripts {
'start-noflp'?: string;
'start-mock'?: string;
'int-test'?: string;
'start-variants-management'?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#alp2-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -74,6 +75,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp2
ui5Theme: sap_belize
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -121,6 +127,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp2
ui5Theme: sap_belize
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
Expand Down Expand Up @@ -165,6 +176,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp2
ui5Theme: sap_belize
",
"state": "modified",
},
Expand Down Expand Up @@ -6005,7 +6021,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#alp1-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -6036,6 +6053,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp1
ui5Theme: sap_belize
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -6083,6 +6105,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp1
ui5Theme: sap_belize
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
Expand Down Expand Up @@ -6125,6 +6152,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: alp1
ui5Theme: sap_belize
",
"state": "modified",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#fefeop1-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -71,6 +72,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop1
ui5Theme: sap_belize
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -118,6 +124,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop1
ui5Theme: sap_belize
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
Expand Down Expand Up @@ -160,6 +171,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop1
ui5Theme: sap_belize
",
"state": "modified",
},
Expand Down Expand Up @@ -3712,7 +3728,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#fefeop2ts-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -3780,6 +3797,11 @@ server:
overridesToOverride: true
excludePatterns:
- /Component-preload.js
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop2ts
ui5Theme: sap_belize
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -3835,6 +3857,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop2ts
ui5Theme: sap_belize
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -3893,6 +3920,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefeop2ts
ui5Theme: sap_belize
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#fefpmjs-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -72,6 +73,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmjs
ui5Theme: sap_fiori_3
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -119,6 +125,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmjs
ui5Theme: sap_fiori_3
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
Expand Down Expand Up @@ -161,6 +172,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmjs
ui5Theme: sap_fiori_3
",
"state": "modified",
},
Expand Down Expand Up @@ -3730,7 +3746,8 @@ archive.zip
\\"start-mock\\": \\"fiori run --config ./ui5-mock.yaml --open \\\\\\"test/flpSandbox.html?sap-ui-xx-viewCache=false#fefpmts-tile\\\\\\"\\",
\\"deploy\\": \\"fiori verify\\",
\\"deploy-config\\": \\"fiori add deploy-config\\",
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\"
\\"start-noflp\\": \\"fiori run --open \\\\\\"index.html?sap-ui-xx-viewCache=false\\\\\\"\\",
\\"start-variants-management\\": \\"fiori run --open \\\\\\"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\\\\\\"\\"
},
\\"sapux\\": true
}
Expand Down Expand Up @@ -3799,6 +3816,11 @@ server:
overridesToOverride: true
excludePatterns:
- /Component-preload.js
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmts
ui5Theme: sap_fiori_3
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -3854,6 +3876,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmts
ui5Theme: sap_fiori_3
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
Expand Down Expand Up @@ -3912,6 +3939,11 @@ server:
port: 35729
path: webapp
delay: 300
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: fefpmts
ui5Theme: sap_fiori_3
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
Expand Down
Loading
Loading